/* ==========================================================================
   威哥新官网 · 共享样式 /assets/site.css
   深墨蓝底 / 电光青强调 / 暖橙行动点 / 奶油纸阅读区
   ========================================================================== */

:root {
  --ink-900: #0B1B2B;
  --ink-800: #10263B;
  --ink-700: #17334D;
  --cyan-400: #4FE3D0;
  --cyan-200: #9BF2E6;
  --orange-500: #FF7A45;
  --orange-deep: #B4531F;
  --amber-300: #FFC46B;
  --cream-100: #F4EDE1;
  --cream-200: #E7DCC9;
  --brown-900: #241C17;
  --mist-300: #A9BACB;

  --font-display: "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC",
    "Noto Sans CJK SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", "Courier New", monospace;

  --shell: 1240px;
  --gutter: 24px;
  --nav-h: 62px;

  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 10px;
  --pill: 999px;

  --line-cyan: rgba(79, 227, 208, 0.22);
  --line-soft: rgba(169, 186, 203, 0.18);
  --line-ink: rgba(36, 28, 23, 0.16);
  --shadow-soft: 0 22px 46px -28px rgba(0, 0, 0, 0.85);

  --dur: 280ms;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- 1. Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 18px);
}

body {
  margin: 0;
  background-color: var(--ink-900);
  color: var(--mist-300);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(79, 227, 208, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(79, 227, 208, 0.055) 1px, transparent 1px);
  background-size: 112px 112px;
}

main,
.site-header,
.site-footer { position: relative; z-index: 1; }

.site-header { z-index: 5; }

img, svg, video, canvas {
  display: block;
  max-width: 100%;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }

ul, ol { margin: 0; padding: 0; }

a { color: var(--cyan-400); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--cyan-200); }

button { font: inherit; }

:focus-visible {
  outline: 2px solid var(--amber-300);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--cyan-400);
  color: var(--ink-900);
}

#main-content { scroll-margin-top: calc(var(--nav-h) + 18px); }

/* ---------- 2. 中文排版工具类 ---------- */
.display-line {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(42px, 8.4vw, 112px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--cream-100);
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--cyan-400);
}

.annotation {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--mist-300);
}

.annotation--vertical {
  writing-mode: vertical-rl;
  letter-spacing: 0.32em;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.chapter__index {
  display: block;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--cyan-400);
}

.chapter__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(28px, 4.2vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--cream-100);
}

.lede {
  max-width: 720px;
  font-size: 18px;
  line-height: 1.8;
  color: var(--mist-300);
}

.prose {
  max-width: 720px;
  font-size: 17px;
  line-height: 1.85;
}

.prose p { margin-bottom: 1.05em; }
.prose p:last-child { margin-bottom: 0; }
.prose h3 {
  margin: 1.6em 0 0.5em;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  color: var(--cream-100);
}
.prose ul, .prose ol { margin: 0 0 1.05em 1.15em; }
.prose li { margin-bottom: 0.4em; }

.numtag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: var(--pill);
  border: 1px solid var(--line-cyan);
  background: var(--ink-700);
  color: var(--cyan-200);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
}

.stat-figure { display: flex; flex-direction: column; gap: 4px; }
.stat-figure__value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(28px, 3.4vw, 46px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--cyan-400);
}
.stat-figure__label { font-size: 13px; color: var(--mist-300); }

/* ---------- 3. 布局容器 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  position: relative;
  padding: 76px 0;
}

.section--tight { padding: 40px 0; }

.section--ink { background: var(--ink-800); }

.section--cream {
  background: var(--cream-100);
  color: var(--brown-900);
}

.section--cream .chapter__title,
.section--cream .display-line,
.section--cream .prose h3 { color: var(--brown-900); }

.section--cream .chapter__index,
.section--cream .eyebrow { color: var(--orange-deep); }

.section--cream .lede,
.section--cream .annotation { color: #57483C; }

.section--cream .prose { color: #2F2620; }

.section--cream a { color: var(--orange-deep); }
.section--cream a:hover { color: #8A3D13; }

.section--cream .mono,
.section--cream .stat-figure__value { color: var(--orange-deep); }
.section--cream .stat-figure__label { color: #57483C; }

.section--cream .numtag {
  background: var(--cream-200);
  border-color: var(--line-ink);
  color: var(--brown-900);
}

.section__head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 34px;
}

/* 十二栅格 */
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
}

.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

/* ---------- 4. 页头 ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  padding: 12px 22px;
  border-radius: 0 0 var(--radius-sm) 0;
  background: var(--cyan-400);
  color: var(--ink-900);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
}

.skip-link:focus { left: 0; color: var(--ink-900); }

.site-header {
  position: relative;
  z-index: 5;
}

/* 上层：品牌轨道条 */
.brand-rail {
  background: var(--ink-900);
  border-bottom: 1px solid var(--line-soft);
}

.brand-rail__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.brand-mark__glyph {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(140deg, var(--cyan-400) 0%, var(--ink-700) 100%);
  color: var(--ink-900);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 20px;
}

.brand-mark__text { display: flex; flex-direction: column; min-width: 0; }

.brand-mark__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.02em;
  color: var(--cream-100);
  transition: color var(--dur) var(--ease);
}

.brand-mark:hover .brand-mark__name { color: var(--cyan-200); }

.brand-mark__tagline {
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--mist-300);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-rail__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
}

.rail-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 13px;
  border-radius: var(--pill);
  border: 1px solid var(--line-cyan);
  background: rgba(79, 227, 208, 0.1);
  color: var(--cyan-200);
  white-space: nowrap;
}

.rail-chip--muted {
  background: transparent;
  border-color: var(--line-soft);
  color: var(--mist-300);
}

/* 下层：栏目条 */
.nav-rail {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(16, 38, 59, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-cyan);
}

.nav-rail__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: var(--nav-h);
}

.main-nav { margin-right: auto; }

.main-nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}

.main-nav__link {
  position: relative;
  display: inline-block;
  padding: 10px 15px;
  border-radius: var(--pill);
  color: var(--mist-300);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.main-nav__link:hover {
  color: var(--cream-100);
  background: rgba(79, 227, 208, 0.08);
}

.main-nav__link[aria-current="page"] { color: var(--cyan-400); }

.main-nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 15px;
  right: 15px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--cyan-400);
}

.nav-rail__cta { flex: 0 0 auto; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  border-radius: var(--pill);
  border: 1px solid var(--line-cyan);
  background: rgba(79, 227, 208, 0.08);
  color: var(--cyan-200);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.nav-toggle:hover { background: rgba(79, 227, 208, 0.16); color: var(--cream-100); }

.nav-toggle__label { line-height: 1; }

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: background-color var(--dur) var(--ease);
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--dur) var(--ease);
}

.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 90;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan-400) 0%, var(--amber-300) 58%, var(--orange-500) 100%);
}

/* ---------- 5. 按钮 / 行动点 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: var(--pill);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--dur) var(--ease), background-color var(--dur) var(--ease),
    color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.btn:hover { transform: translateY(-1px); }

.btn--accent {
  background: var(--orange-500);
  color: var(--ink-900);
  box-shadow: 0 12px 26px -16px rgba(255, 122, 69, 0.95);
}

.btn--accent:hover { background: var(--amber-300); color: var(--ink-900); }

.btn--ghost {
  background: rgba(79, 227, 208, 0.1);
  border-color: var(--line-cyan);
  color: var(--cyan-200);
}

.btn--ghost:hover { background: rgba(79, 227, 208, 0.2); color: var(--cream-100); }

.btn--outline {
  background: transparent;
  border-color: var(--line-soft);
  color: var(--cream-100);
}

.btn--outline:hover { border-color: var(--cyan-400); color: var(--cyan-400); }

.section--cream .btn--ghost {
  background: rgba(36, 28, 23, 0.06);
  border-color: var(--line-ink);
  color: var(--brown-900);
}

.section--cream .btn--ghost:hover { background: rgba(36, 28, 23, 0.13); }

.section--cream .btn--outline {
  border-color: rgba(36, 28, 23, 0.28);
  color: var(--brown-900);
}

.section--cream .btn--outline:hover { border-color: var(--orange-deep); color: var(--orange-deep); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.note-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-cyan);
  background: rgba(79, 227, 208, 0.08);
  color: var(--cyan-200);
  font-size: 15px;
}

.note-bar--accent {
  border-color: rgba(255, 122, 69, 0.35);
  background: rgba(255, 122, 69, 0.1);
  color: var(--amber-300);
}

/* ---------- 6. 面包屑 ---------- */
.breadcrumbs {
  padding-top: 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
}

.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  color: var(--mist-300);
}

.breadcrumbs__list li { display: inline-flex; align-items: center; }

.breadcrumbs__list li + li::before {
  content: "/";
  margin-right: 8px;
  color: rgba(169, 186, 203, 0.5);
}

.breadcrumbs a { color: var(--cyan-200); text-decoration: none; }
.breadcrumbs a:hover { color: var(--cream-100); text-decoration: underline; }

/* ---------- 7. 图像容器 ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-cyan);
  background:
    radial-gradient(120% 120% at 12% 0%, rgba(79, 227, 208, 0.16) 0%, transparent 55%),
    linear-gradient(158deg, var(--ink-700) 0%, var(--ink-900) 100%);
}

.media-frame img,
.media-frame svg,
.media-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame--tall { aspect-ratio: 3 / 4; }
.media-frame--square { aspect-ratio: 1 / 1; }
.media-frame--none { aspect-ratio: auto; }

.media-frame--grid::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(79, 227, 208, 0.1) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(79, 227, 208, 0.1) 1px, transparent 1px);
  background-size: 48px 48px;
}

.media-frame__caption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--mist-300);
}

.section--cream .media-frame__caption { color: #57483C; }

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

/* ---------- 8. 数据表 ---------- */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-md);
}

.table-scroll .data-table { min-width: 660px; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.data-table caption {
  caption-side: bottom;
  padding-top: 12px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--mist-300);
}

.data-table th,
.data-table td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line-soft);
}

.data-table thead th {
  background: var(--ink-700);
  color: var(--cyan-200);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table tbody tr { transition: background-color var(--dur) var(--ease); }
.data-table tbody tr:hover { background: rgba(79, 227, 208, 0.07); }
.data-table .mono,
.data-table td.num { font-variant-numeric: tabular-nums; }

.section--cream .data-table th,
.section--cream .data-table td { border-color: rgba(36, 28, 23, 0.14); }
.section--cream .data-table thead th { background: var(--brown-900); color: var(--cream-100); }
.section--cream .data-table tbody tr:hover { background: rgba(36, 28, 23, 0.05); }
.section--cream .data-table caption { color: #57483C; }

/* ---------- 9. 侧边索引 ---------- */
.side-index {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.side-index__title {
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(169, 186, 203, 0.7);
}

.side-index__link {
  display: block;
  padding: 10px 12px;
  border-left: 2px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--mist-300);
  font-size: 14px;
  text-decoration: none;
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}

.side-index__link:hover {
  color: var(--cream-100);
  background: rgba(79, 227, 208, 0.07);
}

.side-index__link[aria-current] {
  background: var(--cyan-400);
  border-left-color: var(--orange-500);
  color: var(--ink-900);
  font-weight: 700;
}

/* ---------- 10. 页脚 ---------- */
.site-footer {
  background: var(--ink-900);
  border-top: 1px solid var(--line-cyan);
  color: var(--mist-300);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan-400) 0%, var(--amber-300) 42%, var(--orange-500) 66%, transparent 100%);
}

.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.4fr;
  gap: 34px;
  padding: 58px 0 36px;
}

.footer-brand__name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 26px;
  letter-spacing: 0.01em;
  color: var(--cream-100);
}

.footer-brand__line {
  margin: 12px 0 16px;
  max-width: 34ch;
  font-size: 15px;
  line-height: 1.75;
}

.footer-brand__badge {
  display: inline-block;
  padding: 6px 13px;
  border-radius: var(--pill);
  border: 1px solid var(--line-soft);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--mist-300);
}

.footer-col__title {
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan-400);
}

.footer-col__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
}

.footer-col__list a {
  color: var(--mist-300);
  font-size: 15px;
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}

.footer-col__list a:hover { color: var(--cyan-400); }

.footer-col__text {
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.8;
  color: rgba(169, 186, 203, 0.85);
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
  font-size: 14px;
}

.footer-contact li { display: flex; flex-wrap: wrap; gap: 10px; }

.footer-contact__k {
  flex: 0 0 68px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: rgba(169, 186, 203, 0.7);
  padding-top: 2px;
}

.footer-contact__v { color: var(--cream-100); word-break: break-all; }

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 20px 0 30px;
  border-top: 1px solid var(--line-soft);
  font-size: 13px;
}

.footer-legal__links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  list-style: none;
}

.footer-legal__links a {
  color: var(--mist-300);
  text-decoration: none;
}

.footer-legal__links a:hover { color: var(--cyan-200); text-decoration: underline; }

.footer-legal__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: rgba(169, 186, 203, 0.75);
}

/* ---------- 11. 返回顶部 / 显现动效 ---------- */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: var(--pill);
  border: 1px solid var(--line-cyan);
  background: rgba(16, 38, 59, 0.94);
  backdrop-filter: blur(8px);
  color: var(--cyan-200);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease),
    visibility var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.back-to-top:hover { background: var(--ink-700); color: var(--cream-100); }

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 320ms var(--ease), transform 320ms var(--ease);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- 12. 响应式 ---------- */
@media (max-width: 1080px) {
  .footer-top { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-brand { grid-column: span 3; }
}

@media (max-width: 1024px) {
  .grid-12 { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 20px; }
  .span-4,
  .span-5,
  .span-6 { grid-column: span 4; }
  .span-7,
  .span-8,
  .span-12 { grid-column: span 8; }
}

@media (max-width: 960px) {
  .nav-rail__inner { justify-content: space-between; }

  .nav-toggle { display: inline-flex; order: 2; }

  .nav-rail__cta { order: 1; }

  .main-nav {
    order: 3;
    display: none;
    position: absolute;
    top: 100%;
    left: calc(var(--gutter) * -1);
    right: calc(var(--gutter) * -1);
    margin-right: 0;
    padding: 10px var(--gutter) 20px;
    background: var(--ink-800);
    border-bottom: 1px solid var(--line-cyan);
    box-shadow: var(--shadow-soft);
    max-height: calc(100vh - var(--nav-h) - 20px);
    overflow-y: auto;
  }

  .site-header[data-open="true"] .main-nav { display: block; }

  .main-nav__list { flex-direction: column; align-items: stretch; gap: 0; }

  .main-nav__link {
    display: block;
    padding: 15px 12px;
    border-radius: 0;
    border-bottom: 1px solid var(--line-soft);
    font-size: 16px;
  }

  .main-nav__list li:last-child .main-nav__link { border-bottom: 0; }

  .main-nav__link:hover { border-radius: var(--radius-sm); }

  .main-nav__link[aria-current="page"] {
    background: rgba(79, 227, 208, 0.12);
    border-radius: var(--radius-sm);
    color: var(--cyan-400);
    font-weight: 700;
  }

  .main-nav__link[aria-current="page"]::after { display: none; }

  .site-header[data-open="true"] .nav-toggle__bars { background: transparent; }
  .site-header[data-open="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
  .site-header[data-open="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }
}

@media (max-width: 820px) {
  :root { --gutter: 20px; }

  .section { padding: 56px 0; }

  .footer-top { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-brand { grid-column: span 2; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }

  .grid-12 { grid-template-columns: 1fr; gap: 18px; }

  .span-4,
  .span-5,
  .span-6,
  .span-7,
  .span-8,
  .span-12 { grid-column: 1 / -1; }

  .brand-mark__tagline { display: none; }
  .rail-chip--muted { display: none; }

  .footer-top { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }

  .back-to-top { right: 14px; bottom: 16px; padding: 11px 15px; }
}

@media (max-width: 420px) {
  .nav-toggle__label { display: none; }
  .nav-rail__cta { padding: 11px 16px; font-size: 14px; }
}

/* ---------- 13. 动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .js .reveal { opacity: 1; transform: none; }
  .btn:hover { transform: none; }
}
