:root {
  --bg: #f3f7fa;
  --card: #e3edf5;
  --ink: #26343f;
  --ink-soft: #5d7180;
  --accent: #3f7d9e;
  --line: rgba(38, 52, 63, 0.14);
  --shadow: 0 10px 26px rgba(38, 52, 63, 0.08);
  --radius: 10px;
  --serif: Georgia, "Times New Roman", "Songti SC", SimSun, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.78;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.3;
}

p {
  margin: 0 0 12px;
}

/* 侧栏外壳 */
.rail {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 252px;
  padding: 26px 18px;
  background: var(--card);
  border-right: 1px solid var(--line);
  overflow-y: auto;
}

.rail-inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 100%;
}

.rail-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}

.brand-logo {
  max-height: 34px;
  width: auto;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}

.brand-name {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--ink);
}

.brand-slogan {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
}

.drawer {
  display: none;
  position: relative;
}

.drawer-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  list-style: none;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  font-size: 12px;
}

.drawer-toggle::-webkit-details-marker {
  display: none;
}

.drawer-bar {
  display: block;
  width: 12px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.drawer-text {
  margin-left: 4px;
  letter-spacing: 0.12em;
}

.drawer-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 200px;
  padding: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 30;
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rail-nav-sub {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.rail-link {
  display: block;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--ink);
  font-size: 14px;
  transition: background 0.2s ease, color 0.2s ease;
}

.rail-link:hover {
  background: rgba(63, 125, 158, 0.14);
  color: var(--accent);
}

.rail-link.is-current {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

.rail-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rail-sub {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-left: 14px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.rail-sub-link {
  padding: 2px 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.rail-sub-link:hover {
  color: var(--accent);
}

/* 页面容器 */
.page {
  margin-left: 252px;
  padding: 0 0 40px;
}

.shell {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 30px;
}

/* 首屏摘要卡 */
.hero {
  padding: 42px 0 4px;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.hero-card {
  padding: 26px 26px 22px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-labels {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 12px;
}

.stack-label {
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.26em;
  line-height: 1.5;
}

.hero-title {
  margin-bottom: 12px;
  font-size: 34px;
  letter-spacing: 0.01em;
}

.hero-lead {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 16px;
}

.hero-note {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
}

.hero-jump {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.jump-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.jump-item {
  flex: 1 1 150px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 16px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.jump-title {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 16px;
}

.jump-note {
  margin: 0;
  font-size: 13px;
  color: var(--ink-soft);
}

/* 区块头 */
.section {
  padding: 42px 0 4px;
}

.section-head {
  max-width: 720px;
  margin-bottom: 22px;
}

.section-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.24em;
}

.section-title {
  position: relative;
  padding-top: 14px;
  font-size: 26px;
}

.section-title::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 32px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.section-desc {
  margin: 10px 0 0;
  font-size: 15px;
}

/* 交错长条 */
.stories {
  counter-reset: story;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.story {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: center;
  padding: 22px 26px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.story-index {
  counter-increment: story;
  font-family: var(--serif);
  font-size: 54px;
  line-height: 1;
  color: rgba(63, 125, 158, 0.38);
}

.story-index::before {
  content: counter(story, decimal-leading-zero);
}

.story:nth-child(even) .story-index {
  order: 2;
  text-align: right;
}

.story:nth-child(even) .story-body {
  order: 1;
}

.story-title {
  margin-bottom: 8px;
  font-size: 19px;
}

.story-text {
  margin: 0;
  font-size: 15px;
}

/* 四栏特点 */
.features {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.feature-card {
  padding: 18px 18px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.feature-card::before {
  content: "";
  display: block;
  width: 24px;
  height: 3px;
  margin-bottom: 12px;
  background: var(--accent);
  border-radius: 2px;
}

.feature-title {
  margin-bottom: 6px;
  font-size: 17px;
}

.feature-text {
  margin: 0;
  font-size: 14px;
}

/* 方格图集 */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.gallery-item {
  position: relative;
  margin: 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--card);
  border-radius: var(--radius);
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* 折叠问答 */
.faq-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.faq-item {
  flex: 1 1 100%;
  padding: 0 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.faq-q {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 0;
  list-style: none;
  cursor: pointer;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
}

.faq-q::-webkit-details-marker {
  display: none;
}

.faq-q::after {
  content: "+";
  color: var(--accent);
  font-size: 18px;
  line-height: 1;
}

.faq-item[open] .faq-q::after {
  content: "-";
}

.faq-a {
  padding: 12px 0 16px;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

.faq-a p:last-child {
  margin-bottom: 0;
}

/* 热门讨论 / 最新发布 */
.hot-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.hot-col {
  padding: 20px 22px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hot-col-title {
  margin-bottom: 10px;
  font-size: 17px;
}

.entry-list {
  counter-reset: entry;
  margin: 0;
  padding: 0;
  list-style: none;
}

.entry {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.entry:last-child {
  border-bottom: 0;
}

.entry-num {
  counter-increment: entry;
  min-width: 26px;
  color: var(--accent);
  font-family: var(--serif);
  font-size: 13px;
}

.entry-num::before {
  content: counter(entry, decimal-leading-zero);
}

.entry-title {
  display: block;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
}

.entry-title:hover {
  color: var(--accent);
}

.entry-meta {
  display: block;
  color: var(--ink-soft);
  font-size: 12px;
}

/* 结尾行动条 */
.cta {
  padding: 40px 0 0;
}

.cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 26px;
  background: var(--accent);
  border-radius: var(--radius);
}

.cta-text {
  margin: 0;
  color: var(--bg);
  font-family: var(--serif);
  font-size: 20px;
}

.cta-link {
  padding-bottom: 2px;
  color: var(--bg);
  border-bottom: 1px solid rgba(243, 247, 250, 0.6);
  font-size: 14px;
}

/* 页脚 */
.site-foot {
  margin-top: 48px;
  background: var(--card);
  border-top: 1px solid var(--line);
}

.foot-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 24px 30px;
}

.foot-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.foot-mark {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 2px;
}

.foot-name {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 16px;
}

.foot-key {
  color: var(--ink-soft);
  font-size: 12px;
}

.foot-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}

.foot-link {
  color: var(--ink-soft);
  font-size: 13px;
}

.foot-link:hover {
  color: var(--accent);
}

.foot-copy {
  width: 100%;
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
}

/* 富文本正文 */
.prose {
  font-size: 15px;
  line-height: 1.85;
}

.prose h2,
.prose h3 {
  margin: 18px 0 8px;
  font-size: 18px;
}

.prose ul,
.prose ol {
  margin: 0 0 12px;
  padding-left: 20px;
}

.prose img {
  max-width: 100%;
  height: auto;
}

.prose table {
  width: 100%;
  max-width: 100%;
  margin: 12px 0;
  border-collapse: collapse;
  font-size: 14px;
}

.prose th,
.prose td {
  padding: 8px 10px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.prose th {
  background: var(--card);
  color: var(--ink);
}

/* 表单 */
.cms-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 560px;
  margin: 0;
}

.cms-form label {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 14px;
}

.cms-form input,
.cms-form textarea,
.cms-form select {
  width: 100%;
  max-width: 100%;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
}

.cms-form textarea {
  min-height: 120px;
  resize: vertical;
}

.cms-form input:focus,
.cms-form textarea:focus,
.cms-form select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(63, 125, 158, 0.16);
}

.cms-form button,
.cms-form .cms-submit {
  align-self: flex-start;
  padding: 10px 24px;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--bg);
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}

.cms-form button:hover,
.cms-form .cms-submit:hover {
  background: var(--ink);
  border-color: var(--ink);
}

.cms-form .error,
.cms-form .cms-error {
  color: var(--accent);
  font-size: 13px;
}

.cms-form .success,
.cms-form .cms-success {
  padding: 10px 14px;
  background: var(--card);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  color: var(--ink);
  font-size: 14px;
}

/* 平板与手机 */
@media (max-width: 1000px) {
  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .rail {
    position: sticky;
    top: 0;
    bottom: auto;
    width: 100%;
    padding: 12px 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    z-index: 20;
  }

  .rail-inner {
    gap: 0;
    min-height: 0;
  }

  .rail-top {
    width: 100%;
  }

  .drawer {
    display: block;
  }

  .rail-nav {
    display: none;
  }

  .page {
    margin-left: 0;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hot-cols {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shell {
    padding: 0 22px;
  }

  .foot-inner {
    padding: 20px 22px;
  }
}

@media (max-width: 700px) {
  .story {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 18px 20px;
  }

  .story:nth-child(even) .story-index,
  .story:nth-child(even) .story-body {
    order: 0;
    text-align: left;
  }

  .story-index {
    font-size: 40px;
  }

  .hero-title {
    font-size: 27px;
  }

  .section-title {
    font-size: 22px;
  }
}

@media (max-width: 560px) {
  .features {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 28px;
  }

  .section {
    padding-top: 32px;
  }

  .hero-card {
    padding: 20px 18px;
  }

  .cta-text {
    font-size: 17px;
  }
}

:root{--intro-bg:#f3f7fa;--intro-card:#e3edf5;--intro-ink:#26343f;--intro-accent:#3f7d9e;}
.intro-stage {
  background:
    radial-gradient(ellipse at 82% 16%, color-mix(in srgb, var(--intro-accent) 16%, transparent), transparent 54%),
    linear-gradient(160deg, var(--intro-card), var(--intro-bg));
  border-bottom: 1px solid color-mix(in srgb, var(--intro-ink) 12%, transparent);
}
.intro-wrap {
  display: grid;
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(32px, 6vw, 92px) clamp(20px, 4vw, 60px);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
}
.intro-wrap:not(.intro-center):has(> .intro-visual), .intro-wrap:has(> .intro-index) {
  grid-template-columns: minmax(0, 1fr) minmax(0, .9fr);
}
.intro-copy { min-width: 0; max-width: 54rem; }
.intro-copy h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.5rem);
  line-height: 1.08;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}
.intro-copy p {
  max-width: 38em;
  margin: 1rem 0 0;
  font-size: clamp(1rem, 1.35vw, 1.2rem);
  line-height: 1.75;
}
.intro-center { text-align: center; justify-items: center; }
.intro-center p { margin-inline: auto; }
.intro-center .intro-visual { width: min(100%, 680px); }
.intro-reverse > .intro-visual { order: -1; }
.intro-stage .intro-wrap.intro-banner { grid-template-columns: minmax(0, 1fr); }
.intro-banner .intro-visual img { aspect-ratio: 16 / 9; }
.intro-panel .intro-copy {
  padding: clamp(16px, 3vw, 36px);
  border-inline-start: 4px solid var(--intro-accent);
  background: var(--intro-bg);
}
@media (min-width: 761px) {
  .intro-wrap.intro-compact:has(> .intro-visual) {
    grid-template-columns: minmax(0, 1.55fr) minmax(0, .75fr);
  }
  .intro-wrap.intro-panel:has(> .intro-visual) {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr);
  }
}
.intro-index {
  min-width: 0;
  padding: clamp(16px, 3vw, 32px);
  background: var(--intro-bg);
  border: 1px solid color-mix(in srgb, var(--intro-ink) 14%, transparent);
  border-radius: 1rem;
  overflow-wrap: anywhere;
}
.intro-visual {
  min-width: 0;
  margin: 0;
  padding: clamp(8px, 1.5vw, 16px);
  background: var(--intro-bg);
  border: 1px solid color-mix(in srgb, var(--intro-accent) 24%, transparent);
  border-radius: clamp(12px, 2vw, 24px);
  box-shadow: 0 18px 64px color-mix(in srgb, var(--intro-ink) 16%, transparent);
}
.intro-visual img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  object-fit: cover;
  object-position: center;
  border-radius: inherit;
}
.intro-visual figcaption { margin: .6rem .35rem 0; font-size: .875rem; }
.intro-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.5rem; }
.intro-center .intro-actions { justify-content: center; }
.intro-link, .intro-actions .action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .7rem 1.25rem;
  border-radius: 2rem;
  border: 1px solid color-mix(in srgb, var(--intro-ink) 24%, transparent);
  color: var(--intro-ink);
  background: var(--intro-bg);
  text-decoration: none;
  font-weight: 650;
}
.intro-actions a.action-button { color: var(--intro-bg); background: var(--intro-ink); }
.intro-link:hover, .intro-link:focus-visible { border-color: var(--intro-accent); }
.intro-glass {
  background: color-mix(in srgb, var(--intro-bg) 88%, transparent);
  backdrop-filter: blur(14px);
}
.intro-reading {
  max-width: 840px;
  margin: 0 auto;
  padding-inline: clamp(20px, 4vw, 60px);
  overflow-wrap: anywhere;
}
@media (max-width: 760px) {
  .intro-wrap:not(.intro-center):has(> .intro-visual), .intro-wrap:has(> .intro-index) {
    grid-template-columns: minmax(0, 1fr);
  }
  .intro-reverse > .intro-visual { order: 0; }
}

/* 页面补充样式（home） */
/* 首页新增规则 */
.intro-stage .intro-wrap {
  max-width: 1040px;
  padding: clamp(28px, 4vw, 52px) 30px;
  gap: clamp(22px, 3vw, 40px);
}

.intro-stage .intro-copy h1 {
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  letter-spacing: -0.02em;
}

.intro-stage .intro-copy p {
  font-size: 1rem;
  line-height: 1.78;
}

.story-body {
  min-width: 0;
}

.hot-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.hot-flex > .hot-col {
  flex: 1 1 300px;
  min-width: 0;
}

@media (max-width: 560px) {
  .intro-stage .intro-wrap {
    padding: 24px 20px;
  }
}
