/* =========================================================
   贝博CN · Site Kit /assets/site.css
   索引手册 · Index Manual
   ========================================================= */

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

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

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

ul[class],
ol[class] { list-style: none; padding: 0; }

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

a { color: inherit; }

button { font: inherit; color: inherit; background: none; border: 0; }

/* ---------- 2. Tokens ---------- */
:root {
  /* 品牌色板 */
  --beibo-blue: #155EEF;
  --deep-sea: #0B2A6F;
  --warm-orange: #F26B21;
  --deep-orange: #A63D0B;
  --mint: #2FBF9F;
  --cream: #F7F4EC;
  --haze: #E9EFF8;
  --ink: #151A22;
  --gray: #5B6573;
  --peach: #FFE3D2;
  --mint-soft: #DDF5EE;
  --white: #FFFFFF;

  /* 线与影 */
  --line: 2px solid var(--ink);
  --line-soft: 2px solid #C9D6EA;
  --shadow-hard: 6px 6px 0 var(--ink);
  --shadow-mid: 4px 4px 0 var(--ink);
  --shadow-soft: 3px 3px 0 rgba(21, 26, 34, 0.18);

  /* 形状 */
  --radius-pill: 999px;
  --radius-card: 14px;
  --radius-note: 10px;

  /* 字体 */
  --font-display: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
  --font-body: "Inter", "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", "SFMono-Regular", "Consolas", monospace;

  /* 度量 */
  --container: 1240px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --nav-h: 66px;
}

/* ---------- 3. 基础排版（中文优先） ---------- */
body {
  min-height: 100vh;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  font-weight: 400;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.012em;
  color: var(--ink);
  text-wrap: balance;
}

p { text-wrap: pretty; }

strong { font-weight: 600; }

::selection {
  background: var(--beibo-blue);
  color: var(--white);
}

:where(a, button, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--warm-orange);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: -120px;
  left: max(1rem, env(safe-area-inset-left, 0px));
  z-index: 200;
  padding: 0.7rem 1.2rem;
  background: var(--ink);
  color: var(--cream);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 10px 10px;
  border: 2px solid var(--ink);
  transition: top 180ms ease;
}

.skip-link:focus,
.skip-link:focus-visible { top: 0; }

/* ---------- 4. 布局骨架 ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(2.75rem, 6.5vw, 5.5rem);
}

.section--tight { padding-block: clamp(1.75rem, 4vw, 3rem); }

.section--haze {
  background: var(--haze);
  border-block: var(--line-soft);
}

.section--mint {
  background: var(--mint-soft);
  border-block: 2px solid #B7E8DA;
}

.section--ink {
  background: var(--deep-sea);
  color: var(--cream);
}

.section--ink h1,
.section--ink h2,
.section--ink h3 { color: var(--white); }

.grid {
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.75rem);
}

.grid--7-5 { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.grid--8-4 { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.sticky-rail {
  position: sticky;
  top: calc(var(--nav-h) + 1.75rem);
  align-self: start;
}

.rule {
  border: 0;
  border-top: 2px solid var(--ink);
  margin-block: clamp(1.5rem, 4vw, 2.5rem);
}

.rule--soft { border-top-color: #C9D6EA; }

/* ---------- 5. 文字组件 ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3.2rem, 8vw, 7.5rem);
  line-height: 0.94;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.06;
  letter-spacing: -0.018em;
}

.h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  line-height: 1.28;
  letter-spacing: -0.008em;
}

.lede {
  font-family: var(--font-body);
  font-size: clamp(1.02rem, 1.4vw, 1.18rem);
  line-height: 1.75;
  color: #2A3240;
  max-width: 60ch;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--beibo-blue);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: currentColor;
}

.prose { max-width: 68ch; }
.prose > * + * { margin-top: 1rem; }
.prose p { line-height: 1.8; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin-top: 0.4rem; }
.prose a {
  color: var(--beibo-blue);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.prose a:hover { color: var(--deep-orange); }

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

/* ---------- 6. 按钮与链接 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.6rem 1.1rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.15;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease,
              background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 5px 5px 0 var(--ink);
  border-color: var(--ink);
}

.btn:active {
  transform: translateY(1px);
  box-shadow: 1px 1px 0 var(--ink);
}

.btn--primary {
  background: var(--beibo-blue);
  color: var(--white);
  border-color: var(--deep-sea);
}

.btn--primary:hover {
  background: var(--deep-sea);
  color: var(--white);
}

.btn--action {
  background: var(--warm-orange);
  color: var(--ink);
  border-color: var(--ink);
}

.btn--action:hover { background: #DC5A12; }

.btn--quiet {
  background: var(--haze);
  color: var(--deep-sea);
  border-color: var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
}

.btn--quiet:hover { background: var(--mint-soft); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: var(--beibo-blue);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}

.link-arrow::after {
  content: "→";
  transition: transform 180ms ease;
}

.link-arrow:hover {
  color: var(--deep-orange);
  border-bottom-color: var(--deep-orange);
}

.link-arrow:hover::after { transform: translateX(3px); }

/* ---------- 7. 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  background: var(--haze);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

.tag--mono {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.tag--mint { background: var(--mint-soft); }
.tag--peach { background: var(--peach); color: var(--deep-orange); }
.tag--blue { background: var(--beibo-blue); color: var(--white); }

/* ---------- 8. 面板与便签 ---------- */
.panel {
  background: var(--white);
  border: var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-hard);
  padding: clamp(1.1rem, 2.4vw, 1.75rem);
}

.panel--flat {
  box-shadow: var(--shadow-soft);
  border-radius: var(--radius-note);
}

.note {
  position: relative;
  background: var(--peach);
  border: 2px solid var(--ink);
  border-left: 8px solid var(--warm-orange);
  border-radius: var(--radius-note);
  padding: 1rem 1.15rem;
  box-shadow: var(--shadow-soft);
}

.note--mint {
  background: var(--mint-soft);
  border-left-color: var(--mint);
}

.note__label {
  display: block;
  margin-bottom: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--deep-orange);
}

.note--mint .note__label { color: #16705C; }

/* ---------- 9. 索引列表 ---------- */
.index-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.15rem;
}

.index-list > li { border-bottom: 1px solid #C9D6EA; }

.index-list > li:last-child { border-bottom: 0; }

.index-list a {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.62rem 0.2rem;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 160ms ease, border-color 160ms ease,
              background-color 160ms ease;
}

.index-list a:hover,
.index-list a:focus-visible {
  color: var(--beibo-blue);
  border-bottom-color: var(--beibo-blue);
  background: rgba(21, 94, 239, 0.05);
}

.index-list__num {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  color: var(--beibo-blue);
}

.index-list__label {
  flex: 1 1 auto;
  font-size: 0.96rem;
  font-weight: 500;
}

/* ---------- 10. 面包屑 ---------- */
.breadcrumbs {
  font-size: 0.82rem;
  color: var(--gray);
}

.breadcrumbs__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

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

.breadcrumbs__list li + li::before {
  content: "/";
  color: #B7C3D6;
}

.breadcrumbs a {
  color: var(--gray);
  text-decoration: none;
  transition: color 160ms ease;
}

.breadcrumbs a:hover { color: var(--beibo-blue); }

.breadcrumbs [aria-current="page"] { color: var(--ink); font-weight: 600; }

/* ---------- 11. 图片容器基础 ---------- */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--haze);
  border: var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-hard);
}

.media > img,
.media > picture > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media--16-9 { aspect-ratio: 16 / 9; }
.media--4-3 { aspect-ratio: 4 / 3; }
.media--3-4 { aspect-ratio: 3 / 4; }
.media--1-1 { aspect-ratio: 1 / 1; }
.media--wide { grid-column: span 2; }

.media--flush {
  box-shadow: none;
  border-radius: var(--radius-note);
}

.media__caption {
  margin-top: 0.55rem;
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--gray);
}

.media__caption .mono {
  margin-right: 0.4rem;
  color: var(--beibo-blue);
}

/* ---------- 12. 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: max(0.7rem, env(safe-area-inset-top, 0px)) var(--gutter) 0;
}

.nav-shell {
  position: relative;
  max-width: var(--container);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 1.8vw, 1.5rem);
  padding: 0.5rem 0.6rem 0.5rem 0.85rem;
  background: rgba(247, 244, 236, 0.94);
  border: var(--line);
  border-radius: var(--radius-pill);
  box-shadow: 0 6px 0 rgba(11, 42, 111, 0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: box-shadow 220ms ease, transform 220ms ease;
}

.site-header[data-scrolled="true"] .nav-shell {
  box-shadow: 0 3px 0 rgba(11, 42, 111, 0.22);
  transform: translateY(-1px);
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--beibo-blue);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 2px 2px 0 var(--ink);
  transition: background-color 180ms ease, transform 180ms ease;
}

.brand:hover .brand-mark {
  background: var(--deep-sea);
  transform: translateY(-1px);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  line-height: 1.05;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--deep-sea);
}

.brand-tag {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  color: var(--gray);
}

/* 导航区 */
.primary-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 1.6vw, 1.25rem);
  margin-left: auto;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.12rem;
}

.nav-link {
  display: inline-block;
  padding: 0.48rem 0.82rem;
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 160ms ease, color 160ms ease,
              border-color 160ms ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  background: var(--haze);
  border-color: var(--ink);
  color: var(--deep-sea);
}

.nav-link[aria-current="page"] {
  background: var(--beibo-blue);
  border-color: var(--deep-sea);
  color: var(--white);
  font-weight: 600;
}

.nav-link[aria-current="page"]:hover,
.nav-link[aria-current="page"]:focus-visible {
  background: var(--deep-sea);
  color: var(--white);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.nav-actions .btn {
  padding: 0.5rem 0.95rem;
  font-size: 0.86rem;
}

/* 移动端按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.48rem 0.9rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  background: var(--white);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
  transition: background-color 160ms ease, box-shadow 160ms ease;
}

.nav-toggle:hover { background: var(--peach); }

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  transition: background-color 180ms ease;
}

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

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

.nav-toggle[aria-expanded="true"] {
  background: var(--ink);
  color: var(--cream);
  box-shadow: 2px 2px 0 var(--beibo-blue);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before {
  background: var(--cream);
  transform: translateY(5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
  background: var(--cream);
  transform: translateY(-5px) rotate(-45deg);
}

.nav-toggle__text {
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
}

/* 滚动进度 */
.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 150;
  pointer-events: none;
  background: transparent;
}

.scroll-progress__bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--beibo-blue) 0%, var(--mint) 100%);
  transition: width 90ms linear;
}

/* ---------- 13. 页脚 ---------- */
.site-footer {
  margin-top: clamp(3rem, 7vw, 6rem);
  background: var(--deep-sea);
  color: var(--cream);
  border-top: 3px solid var(--ink);
}

.footer-shell {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding: clamp(2.25rem, 5.5vw, 4rem) var(--gutter) clamp(1.25rem, 3vw, 2rem);
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.35fr);
  gap: clamp(1.75rem, 5vw, 4.5rem);
}

.footer-brand__name {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--white);
}

.footer-brand__line {
  margin-top: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  color: var(--mint);
}

.footer-brand__note {
  margin-top: 1rem;
  max-width: 34ch;
  font-size: 0.9rem;
  line-height: 1.75;
  color: rgba(247, 244, 236, 0.72);
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 3vw, 2.5rem);
}

.footer-col__title {
  margin-bottom: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mint);
}

.footer-links {
  display: grid;
  gap: 0.45rem;
  font-size: 0.94rem;
}

.footer-links a {
  display: inline-block;
  color: rgba(247, 244, 236, 0.86);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--white);
  border-bottom-color: var(--warm-orange);
}

.footer-contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem 2rem;
  margin-top: clamp(1.75rem, 4vw, 2.75rem);
  padding-top: clamp(1.25rem, 3vw, 1.75rem);
  border-top: 1px solid rgba(247, 244, 236, 0.2);
}

.footer-contact__item {
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-contact__k {
  display: block;
  margin-bottom: 0.28rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mint);
}

.footer-contact__v {
  color: rgba(247, 244, 236, 0.92);
  word-break: break-word;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1.5rem;
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
  padding-top: 1.25rem;
  border-top: 1px solid rgba(247, 244, 236, 0.2);
  font-size: 0.8rem;
  color: rgba(247, 244, 236, 0.66);
}

.footer-copy,
.footer-icp {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
}

.footer-meta__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
}

.footer-meta__links a {
  color: rgba(247, 244, 236, 0.82);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}

.footer-meta__links a:hover,
.footer-meta__links a:focus-visible {
  color: var(--white);
  border-bottom-color: var(--mint);
}

/* ---------- 14. 响应式 ---------- */
@media (max-width: 1080px) {
  .nav-link { padding: 0.46rem 0.68rem; font-size: 0.9rem; }
  .nav-actions .btn { padding: 0.46rem 0.8rem; font-size: 0.82rem; }
}

@media (max-width: 960px) {
  :root { --nav-h: 60px; }

  .nav-shell {
    flex-wrap: nowrap;
    justify-content: space-between;
    border-radius: 26px;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .primary-nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    margin-left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 1rem;
    max-height: calc(100vh - 8rem);
    overflow-y: auto;
    background: var(--cream);
    border: var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow-hard);
  }

  .primary-nav[data-open="true"] { display: flex; }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
  }

  .nav-link {
    display: block;
    padding: 0.72rem 0.9rem;
    border-radius: 12px;
    font-size: 1rem;
  }

  .nav-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px dashed #C9D6EA;
  }

  .nav-actions .btn {
    justify-content: center;
    padding: 0.66rem 1rem;
    font-size: 0.92rem;
  }

  .brand-tag { display: none; }

  .footer-top { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .grid--7-5,
  .grid--8-4,
  .grid--3 { grid-template-columns: minmax(0, 1fr); }

  .sticky-rail { position: static; top: auto; }

  .media--wide { grid-column: span 1; }
}

@media (max-width: 640px) {
  :root { --gutter: 1.1rem; }

  body { font-size: 16px; }

  .section { padding-block: clamp(2rem, 8vw, 3.25rem); }

  .brand-mark { width: 2rem; height: 2rem; font-size: 1rem; }
  .brand-name { font-size: 0.98rem; }

  .footer-cols { grid-template-columns: minmax(0, 1fr); }

  .footer-meta { flex-direction: column; align-items: flex-start; }

  .btn { padding: 0.56rem 0.95rem; font-size: 0.86rem; }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .btn:hover,
  .brand:hover .brand-mark,
  .site-header[data-scrolled="true"] .nav-shell {
    transform: none;
  }

  .link-arrow:hover::after { transform: none; }
}
