/* ============================================================
   乐橙注册指南 · 共享样式 /assets/site.css
   分段：Reset / 变量 / 排版 / 工具 / 按钮 / 头部 / 页脚 / 组件 / 动效 / 响应式
   ============================================================ */

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

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

body { margin: 0; }
h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; }
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; }
a { color: inherit; }

::selection {
  background: var(--brand-orange-500);
  color: var(--ink-900);
}

:focus-visible {
  outline: 3px solid var(--brand-orange-500);
  outline-offset: 3px;
}

/* ---------- 2. 设计变量 ---------- */
:root {
  --brand-orange-500: #FF6B1A;
  --brand-orange-600: #E4550A;
  --ink-900: #0B1F33;
  --ink-700: #17324D;
  --ink-500: #2F4A66;
  --apricot-100: #FFF0E4;
  --paper-50: #FBF8F5;
  --grey-200: #E4E7EB;
  --grey-500: #6B7684;
  --teal-500: #00A896;
  --teal-700: #007A6C;
  --slate-400: #8494A5;

  --white: #FFFFFF;
  --footer-text: #C8D5E1;
  --footer-muted: #93A6B8;

  --font-sans: "Source Han Sans SC", "Source Han Sans CN", "Noto Sans SC",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Inter", system-ui,
    -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular,
    Menlo, Consolas, "Courier New", monospace;

  --fs-display: clamp(2.6rem, 7.2vw, 5.75rem);
  --fs-h1: clamp(2rem, 4.6vw, 3.4rem);
  --fs-h2: clamp(1.6rem, 3.1vw, 2.25rem);
  --fs-h3: clamp(1.2rem, 2vw, 1.5rem);
  --fs-body: 1.0625rem;
  --fs-mono: 0.72rem;

  --shell-max: 1280px;
  --gutter: 20px;
  --radius-card: 16px;
  --radius-pill: 999px;
  --border-w: 2px;
  --shadow-hard: 6px 6px 0 var(--ink-900);
  --shadow-soft: 5px 5px 0 rgba(11, 31, 51, 0.12);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- 3. 基础排版 ---------- */
body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.75;
  font-weight: 400;
  color: var(--ink-500);
  background-color: var(--paper-50);
  background-image: radial-gradient(rgba(11, 31, 51, 0.05) 1px, transparent 1px);
  background-size: 14px 14px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  color: var(--ink-900);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.012em;
}

h1 { font-size: var(--fs-h1); font-weight: 900; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 700; }

p { margin: 0 0 1em; }
strong, b { font-weight: 800; color: var(--ink-900); }
a { text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* ---------- 4. 工具 ---------- */
.wrap {
  width: min(var(--shell-max), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 10px; left: 10px;
  z-index: 999;
  padding: 10px 18px;
  border: var(--border-w) solid var(--brand-orange-500);
  border-radius: var(--radius-pill);
  background: var(--ink-900);
  color: var(--paper-50);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-220%);
  transition: transform 0.18s var(--ease);
}
.skip-link:focus {
  transform: translateY(0);
}

.mono,
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey-500);
}
.eyebrow {
  display: inline-block;
  padding: 4px 10px;
  border: 1.5px dashed var(--grey-200);
  border-radius: var(--radius-pill);
}

.display {
  font-size: var(--fs-display);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--ink-900);
  margin: 0 0 0.3em;
}

.hl {
  position: relative;
  z-index: 0;
  font-weight: 900;
  color: var(--ink-900);
}
.hl::after {
  content: "";
  position: absolute;
  left: -0.05em; right: -0.05em; bottom: 0.05em;
  height: 0.22em;
  background: var(--brand-orange-500);
  transform-origin: left center;
  transform: scaleX(1);
  transition: transform 0.55s var(--ease);
  z-index: -1;
}
.js [data-reveal] .hl::after { transform: scaleX(0); }
.js [data-reveal].is-visible .hl::after { transform: scaleX(1); transition-delay: 0.15s; }

.prose { max-width: 68ch; }
.prose p { margin: 0 0 1.15em; }
.prose h2 { margin: 1.8em 0 0.5em; }
.prose ul, .prose ol { margin: 0 0 1.15em 1.2em; }
.prose li { margin-bottom: 0.4em; }

.breadcrumb { padding-bottom: 4px; }
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.08em;
  color: var(--grey-500);
}
.breadcrumb li { display: inline-flex; align-items: center; }
.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 8px;
  color: var(--grey-200);
}
.breadcrumb a {
  color: var(--ink-500);
  text-decoration: none;
  border-bottom: 1px solid var(--grey-200);
}
.breadcrumb a:hover {
  color: var(--brand-orange-600);
  border-bottom-color: var(--brand-orange-600);
}

.grid { display: grid; gap: clamp(16px, 2.2vw, 28px); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.section { padding-block: clamp(40px, 6vw, 80px); }
.section--apricot { background: var(--apricot-100); }
.section--paper { background: var(--paper-50); }
.section--ink {
  background: var(--ink-900);
  color: var(--footer-text);
}
.section--ink h1,
.section--ink h2,
.section--ink h3 { color: var(--paper-50); }

.section-head {
  display: grid;
  gap: 12px;
  margin-bottom: clamp(24px, 3.4vw, 44px);
}

.chapter-num {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-900);
}
.chapter-num::before {
  content: "";
  display: block;
  width: 28px;
  height: 10px;
  background: var(--brand-orange-500);
  border: var(--border-w) solid var(--ink-900);
}
.section--ink .chapter-num { color: var(--paper-50); }

.section-title { font-size: var(--fs-h2); margin: 0; }
.section-summary {
  max-width: 62ch;
  margin: 0;
  color: var(--ink-500);
}
.section--ink .section-summary { color: var(--footer-text); }

/* ---------- 5. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: var(--border-w) solid var(--ink-900);
  border-radius: var(--radius-pill);
  background: var(--paper-50);
  color: var(--ink-900);
  font-family: var(--font-sans);
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 0 0 var(--ink-900);
  transition: transform 0.16s var(--ease),
              box-shadow 0.16s var(--ease),
              background-color 0.16s var(--ease),
              color 0.16s var(--ease);
}
.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-hard);
}
.btn:active {
  transform: translate(0, 0);
  box-shadow: 0 0 0 var(--ink-900);
}

.btn--primary {
  background: var(--brand-orange-500);
  color: var(--ink-900);
}
.btn--primary:hover { background: var(--brand-orange-600); }

.btn--outline {
  background: transparent;
  color: var(--paper-50);
  border-color: var(--paper-50);
}
.btn--outline:hover {
  background: var(--brand-orange-500);
  color: var(--ink-900);
  border-color: var(--brand-orange-500);
  box-shadow: 6px 6px 0 rgba(255, 255, 255, 0.22);
}

.btn--sm {
  padding: 8px 15px;
  font-size: 0.86rem;
}

/* ---------- 6. 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 14px var(--gutter) 10px;
  pointer-events: none;
}

.header-shell {
  pointer-events: auto;
  width: min(var(--shell-max), 100%);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 9px 12px 9px 16px;
  background: var(--paper-50);
  border: var(--border-w) solid var(--ink-900);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-soft);
  transition: box-shadow 0.22s var(--ease);
}
.site-header[data-scrolled] .header-shell {
  box-shadow: var(--shadow-hard);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--ink-900);
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: var(--border-w) solid var(--ink-900);
  border-radius: 12px;
  background: var(--brand-orange-500);
  color: var(--ink-900);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.brand-text { display: block; }
.brand-name {
  display: block;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink-900);
}
.brand-meta {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.63rem;
  line-height: 1.5;
  letter-spacing: 0.05em;
  color: var(--grey-500);
}

.site-nav {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  justify-content: center;
}
.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-item { display: block; }
.nav-link {
  display: inline-block;
  padding: 8px 13px;
  border: var(--border-w) solid transparent;
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink-700);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.16s var(--ease),
              color 0.16s var(--ease),
              border-color 0.16s var(--ease);
}
.nav-link:hover {
  background: var(--apricot-100);
  color: var(--ink-900);
}
.nav-link[aria-current="page"] {
  background: var(--ink-900);
  border-color: var(--ink-900);
  color: var(--paper-50);
}

.header-side {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.header-status {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.status-chip {
  padding: 5px 10px;
  border: 1.5px dashed var(--grey-200);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.05em;
  color: var(--ink-500);
  white-space: nowrap;
}
.status-chip b {
  color: var(--brand-orange-600);
  font-weight: 700;
}
.status-chip--teal {
  border-style: solid;
  border-color: var(--teal-500);
  background: rgba(0, 168, 150, 0.1);
  color: var(--teal-700);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: var(--border-w) solid var(--ink-900);
  border-radius: var(--radius-pill);
  background: var(--ink-900);
  color: var(--paper-50);
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
}
.site-header[data-open] .nav-toggle {
  background: var(--brand-orange-500);
  color: var(--ink-900);
}
.nav-toggle-bars {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  width: 16px;
}
.nav-toggle-bars span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}
.site-header[data-open] .nav-toggle-bars span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}
.site-header[data-open] .nav-toggle-bars span:nth-child(2) {
  opacity: 0;
}
.site-header[data-open] .nav-toggle-bars span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

/* ---------- 7. 页脚 ---------- */
.site-footer {
  margin-top: clamp(48px, 7vw, 96px);
  background: var(--ink-900);
  border-top: 6px solid var(--brand-orange-500);
  color: var(--footer-text);
}
.footer-inner {
  width: min(var(--shell-max), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
  padding: clamp(36px, 5vw, 64px) 0 26px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.35fr;
  gap: clamp(20px, 3vw, 46px);
}
.footer-brand {
  display: grid;
  gap: 16px;
  align-content: start;
  justify-items: start;
}
.brand--invert .brand-name { color: var(--paper-50); }
.brand--invert .brand-meta { color: var(--footer-muted); }
.brand--invert .brand-mark {
  background: var(--brand-orange-500);
  border-color: var(--paper-50);
  color: var(--ink-900);
}
.footer-tagline {
  margin: 0;
  max-width: 34ch;
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--footer-text);
}
.footer-col { min-width: 0; }
.footer-col-title {
  margin: 0 0 16px;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--brand-orange-500);
}
.footer-links {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-links a {
  display: inline-block;
  font-size: 0.95rem;
  color: var(--footer-text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}
.footer-links a:hover {
  color: var(--white);
  border-bottom-color: var(--brand-orange-500);
}
.footer-lines {
  display: grid;
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-lines li {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--footer-text);
  word-break: break-word;
}
.footer-label {
  display: block;
  margin-bottom: 3px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--footer-muted);
}
.footer-bottom {
  margin-top: clamp(28px, 4vw, 48px);
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
}
.footer-legal,
.footer-copy {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.04em;
  color: var(--footer-muted);
}

/* ---------- 8. 通用组件 ---------- */
.card {
  display: block;
  padding: clamp(18px, 2.2vw, 26px);
  background: var(--white);
  border: var(--border-w) solid var(--ink-900);
  border-radius: var(--radius-card);
  box-shadow: 4px 4px 0 rgba(11, 31, 51, 0.1);
  color: var(--ink-500);
  text-decoration: none;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.card:hover,
.card:focus-within {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-hard);
}
.card-title {
  margin: 0 0 8px;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--ink-900);
}
.card-text {
  margin: 0 0 14px;
  font-size: 0.96rem;
  line-height: 1.75;
}
.card-tag {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border: var(--border-w) solid var(--ink-900);
  border-radius: var(--radius-pill);
  background: var(--apricot-100);
  color: var(--ink-900);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.tag--fresh {
  background: var(--teal-500);
  color: var(--ink-900);
}
.tag--muted {
  background: var(--grey-200);
  border-color: var(--grey-200);
  color: var(--ink-500);
}
.tag--paused {
  background: var(--slate-400);
  border-color: var(--slate-400);
  color: var(--ink-900);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.filter-chip {
  padding: 8px 16px;
  border: var(--border-w) solid var(--ink-900);
  border-radius: var(--radius-pill);
  background: var(--grey-200);
  color: var(--ink-700);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.16s var(--ease),
              box-shadow 0.16s var(--ease),
              background-color 0.16s var(--ease),
              color 0.16s var(--ease);
}
.filter-chip:hover {
  background: var(--apricot-100);
}
.filter-chip[aria-pressed="true"] {
  background: var(--ink-900);
  color: var(--paper-50);
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--brand-orange-500);
}
[data-filter-empty][hidden] { display: none; }
[data-filter-item][hidden] { display: none; }

.acc {
  display: grid;
  gap: 12px;
}
.acc-item {
  border: var(--border-w) solid var(--ink-900);
  border-radius: var(--radius-card);
  background: var(--white);
  overflow: hidden;
}
.acc-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 16px 20px;
  text-align: left;
  font-size: 1rem;
  font-weight: 800;
  color: var(--ink-900);
  cursor: pointer;
}
.acc-trigger::after {
  content: "+";
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  line-height: 1;
  color: var(--brand-orange-600);
  transition: transform 0.2s var(--ease);
}
.acc-trigger[aria-expanded="true"]::after {
  transform: rotate(45deg);
}
.acc-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.26s var(--ease);
}
.acc-panel[data-open] { grid-template-rows: 1fr; }
.acc-panel-inner {
  overflow: hidden;
  visibility: hidden;
  transition: visibility 0s linear 0.26s;
}
.acc-panel[data-open] > .acc-panel-inner {
  visibility: visible;
  transition-delay: 0s;
}
.acc-panel-inner > :first-child { margin-top: 0; }
.acc-panel-inner > :last-child { margin-bottom: 0; }
.acc-trigger + .acc-panel .acc-panel-inner { padding: 0 20px 18px; }

.rail-wrap {
  position: relative;
  margin-inline: calc(var(--gutter) * -1);
  padding-inline: var(--gutter);
}
.rail {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 6px 2px 18px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.rail > * {
  flex: 0 0 clamp(240px, 30vw, 320px);
  scroll-snap-align: start;
}
.rail-wrap::after {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 18px;
  width: 56px;
  pointer-events: none;
  background: linear-gradient(to left, var(--paper-50), rgba(251, 248, 245, 0));
}
.section--apricot .rail-wrap::after {
  background: linear-gradient(to left, var(--apricot-100), rgba(255, 240, 228, 0));
}
.section--ink .rail-wrap::after {
  background: linear-gradient(to left, var(--ink-900), rgba(11, 31, 51, 0));
}

.media {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  border: var(--border-w) solid var(--ink-900);
  border-radius: var(--radius-card);
  background: var(--apricot-100);
}
.media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media--16x9 { aspect-ratio: 16 / 9; }
.media--4x3 { aspect-ratio: 4 / 3; }
.media--1x1 { aspect-ratio: 1 / 1; }
.media--map { aspect-ratio: 3 / 2; }
.media--placeholder {
  background-image: radial-gradient(rgba(11, 31, 51, 0.16) 1.5px, transparent 1.5px);
  background-size: 12px 12px;
}
.media-caption {
  margin: 10px 0 0;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.06em;
  color: var(--grey-500);
}

/* ---------- 9. 动效与滚动辅助 ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}
.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  z-index: 200;
  height: 3px;
  width: 0;
  background: var(--brand-orange-500);
  pointer-events: none;
}

.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 180;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: var(--border-w) solid var(--ink-900);
  border-radius: 50%;
  background: var(--brand-orange-500);
  color: var(--ink-900);
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink-900);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.2s var(--ease),
              transform 0.2s var(--ease),
              visibility 0.2s linear,
              background-color 0.16s var(--ease);
}
.to-top[data-visible] {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.to-top:hover { background: var(--brand-orange-600); }

/* ---------- 10. 响应式 ---------- */
@media (max-width: 1200px) {
  .header-status .status-chip:last-child { display: none; }
}

@media (max-width: 1060px) {
  .header-status { display: none; }
}

@media (max-width: 1020px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 899px) {
  :root { --gutter: 14px; }

  .header-shell {
    flex-wrap: wrap;
    row-gap: 10px;
    padding: 10px 12px;
    border-radius: 26px;
  }
  .brand {
    flex: 1 1 auto;
    min-width: 0;
  }
  .brand-meta { display: none; }
  .header-side {
    order: 3;
    margin-left: 0;
  }
  .nav-toggle {
    display: inline-flex;
    order: 2;
  }
  .site-nav {
    order: 4;
    flex: 1 1 100%;
    justify-content: flex-start;
    display: none;
  }
  .site-header[data-open] .site-nav { display: flex; }
  .nav-list {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: none;
  }
  .nav-list::-webkit-scrollbar { display: none; }
  .nav-link { padding: 8px 14px; }
  .header-cta { padding: 8px 13px; font-size: 0.82rem; }
}

@media (max-width: 700px) {
  .grid--2,
  .grid--3,
  .grid--4 { grid-template-columns: minmax(0, 1fr); }
  .footer-top { grid-template-columns: minmax(0, 1fr); }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .to-top { right: 14px; bottom: 14px; }
  .rail-wrap { margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
}

/* ---------- 11. 无障碍与降级 ---------- */
@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;
  }
  .js [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
  .js [data-reveal] .hl::after { transform: scaleX(1) !important; }
  .acc-panel { transition: none; }
  .acc-panel-inner { transition: none; }
}

@media print {
  .site-header,
  .to-top,
  .scroll-progress { display: none !important; }
  body { background: #fff; }
}
