/* ============================================================
   优发国际址站 · /assets/site.css
   共享外壳：reset / tokens / 排版 / 头部 / 页脚 / 原子组件
   ============================================================ */

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

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

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

:focus-visible {
  outline: 2px solid #5FD0C0;
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- 2. TOKENS ---------- */
:root {
  --ink-950: #081726;
  --ink-900: #0B1F32;
  --ink-800: #10283D;
  --ink-700: #16324A;

  --paper-050: #F4F1E9;
  --paper-200: #D9D3C6;

  --mist-400: #93A6B8;
  --mist-600: #63788C;

  --signal-500: #F0662B;
  --signal-100: #FFB38C;
  --celadon-600: #2E8C7E;
  --celadon-100: #8AD8CA;
  --cyan-300: #5FD0C0;
  --sand-500: #C7A15A;
  --sand-100: #E7CF9E;
  --alert-500: #D2544A;
  --alert-100: #F0A29A;

  --font-sans: "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC",
    "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "SFMono-Regular", ui-monospace, "JetBrains Mono", "Cascadia Mono",
    Consolas, "Liberation Mono", monospace;

  --r-xs: 3px;
  --r-sm: 4px;
  --r-pill: 999px;

  --line: rgba(147, 166, 184, 0.22);
  --line-strong: rgba(147, 166, 184, 0.38);

  --paper-shadow: 0 1px 0 rgba(8, 23, 38, 0.60), 0 2px 0 rgba(8, 23, 38, 0.34),
    0 10px 24px -16px rgba(0, 0, 0, 0.85);
  --paper-shadow-lift: 0 2px 0 rgba(8, 23, 38, 0.55), 0 4px 0 rgba(8, 23, 38, 0.32),
    0 18px 32px -18px rgba(0, 0, 0, 0.90);

  --shell: 1280px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-space: 92px;

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

/* ---------- 3. BASE ---------- */
body {
  background-color: var(--ink-950);
  background-image:
    radial-gradient(120% 80% at 82% -14%, rgba(46, 140, 126, 0.15), transparent 58%),
    radial-gradient(90% 70% at -6% 6%, rgba(22, 50, 74, 0.85), transparent 62%);
  background-repeat: no-repeat;
  color: var(--paper-050);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.9;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.02em;
  color: var(--paper-050);
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.1rem, 1.8vw, 1.4rem); letter-spacing: -0.01em; }
h4 { font-size: 1rem; letter-spacing: 0; }

p { max-width: 68ch; }
strong { color: var(--paper-050); }
small { font-size: 0.85em; }

::selection {
  background: rgba(240, 102, 43, 0.35);
  color: var(--paper-050);
}

#main-content { scroll-margin-top: var(--header-space); }
[data-chapter] { scroll-margin-top: calc(var(--header-space) + 16px); }

/* ---------- 4. LAYOUT UTILITIES ---------- */
.container {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.page-shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(28px, 4vw, 56px) var(--gutter) clamp(56px, 8vw, 96px);
}

.grid {
  display: grid;
  gap: clamp(14px, 1.6vw, 22px);
  grid-template-columns: repeat(12, minmax(0, 1fr));
}
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-6 { grid-column: span 6; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.section-head__title {
  font-size: clamp(1.3rem, 2.4vw, 1.75rem);
  letter-spacing: -0.01em;
}
.section-head__aside {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--mist-400);
  text-align: right;
  white-space: nowrap;
}

.prose { max-width: 68ch; }
.prose p { margin-bottom: 1.1em; color: rgba(244, 241, 233, 0.86); }
.prose h3 { margin: 1.7em 0 0.6em; }
.prose ul { margin: 0 0 1.1em; padding: 0; }
.prose li { position: relative; padding-left: 1.1em; margin-bottom: 0.45em; }
.prose li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 5px;
  height: 5px;
  background: var(--signal-500);
  border-radius: 1px;
}
.prose a {
  color: var(--cyan-300);
  text-decoration: none;
  border-bottom: 1px solid rgba(95, 208, 192, 0.4);
}
.prose a:hover { border-bottom-color: var(--cyan-300); }

/* ---------- 5. ATOMS ---------- */
.mono {
  font-family: var(--font-mono);
  font-size: 0.86em;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

.label {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sand-500);
}
.label::before {
  content: "";
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 1px;
  flex: 0 0 auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.62em 1.1em;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--dur) var(--ease),
    border-color var(--dur) var(--ease),
    color var(--dur) var(--ease),
    transform var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}
.btn--signal {
  background: var(--signal-500);
  border-color: #FF8A58;
  color: #170903;
  box-shadow: 0 2px 0 #9E3B10;
}
.btn--signal:hover { background: #FF7B45; transform: translateY(-1px); }
.btn--signal:active { transform: translateY(1px); box-shadow: 0 1px 0 #9E3B10; }
.btn--ghost {
  background: rgba(147, 166, 184, 0.08);
  border-color: var(--line-strong);
  color: var(--paper-050);
}
.btn--ghost:hover {
  border-color: var(--cyan-300);
  color: var(--cyan-300);
  background: rgba(95, 208, 192, 0.10);
}
.btn--small { padding: 0.42em 0.85em; font-size: 12.5px; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.24em 0.6em;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-xs);
  background: rgba(147, 166, 184, 0.07);
  color: var(--mist-400);
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.7;
  letter-spacing: 0.1em;
  white-space: nowrap;
}
.tag--ok {
  border-color: rgba(46, 140, 126, 0.62);
  background: rgba(46, 140, 126, 0.16);
  color: var(--celadon-100);
}
.tag--warn {
  border-color: rgba(210, 84, 74, 0.62);
  background: rgba(210, 84, 74, 0.16);
  color: var(--alert-100);
}
.tag--info {
  border-color: rgba(199, 161, 90, 0.55);
  background: rgba(199, 161, 90, 0.14);
  color: var(--sand-100);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0 0 clamp(16px, 2vw, 26px);
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--mist-600);
}
.breadcrumb li { display: inline-flex; align-items: center; }
.breadcrumb li + li::before {
  content: "/";
  margin-inline: 0.6em;
  color: rgba(147, 166, 184, 0.45);
}
.breadcrumb a { color: var(--mist-400); text-decoration: none; }
.breadcrumb a:hover { color: var(--cyan-300); }
.breadcrumb [aria-current="page"] { color: var(--paper-200); }

.copy-btn {
  display: inline-flex;
  align-items: center;
  margin-left: 0.55em;
  padding: 1px 7px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-xs);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.7;
  letter-spacing: 0.08em;
  color: var(--mist-400);
  vertical-align: middle;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.copy-btn:hover { color: var(--cyan-300); border-color: var(--cyan-300); }
.copy-btn[data-copied] {
  color: var(--celadon-100);
  border-color: rgba(46, 140, 126, 0.7);
  background: rgba(46, 140, 126, 0.16);
}

/* ---------- 6. PANEL ---------- */
.panel {
  position: relative;
  padding: clamp(16px, 2vw, 24px);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: linear-gradient(180deg, var(--ink-800), var(--ink-900));
  box-shadow: var(--paper-shadow);
  transition: transform var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}
.panel::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 5px;
  width: 10px;
  height: 10px;
  border-top: 1px solid rgba(199, 161, 90, 0.55);
  border-right: 1px solid rgba(199, 161, 90, 0.55);
  pointer-events: none;
}
.panel:hover {
  transform: translateY(-4px);
  box-shadow: var(--paper-shadow-lift);
  border-color: rgba(95, 208, 192, 0.45);
}
.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.panel__title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.4;
}
.panel__body {
  font-size: 15px;
  line-height: 1.85;
  color: rgba(244, 241, 233, 0.82);
}

/* ---------- 7. FIGURE（页面阶段图片容器基础） ---------- */
.figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.figure__frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  aspect-ratio: 16 / 10;
  background:
    radial-gradient(120% 90% at 18% 0%, rgba(46, 140, 126, 0.30), transparent 60%),
    radial-gradient(100% 100% at 92% 100%, rgba(240, 102, 43, 0.20), transparent 62%),
    linear-gradient(160deg, var(--ink-700), var(--ink-950));
}
.figure__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(147, 166, 184, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(147, 166, 184, 0.12) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.65;
  pointer-events: none;
}
.figure__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.figure__caption {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: 0.06em;
  color: var(--mist-400);
}
.figure--wide .figure__frame { aspect-ratio: 21 / 9; }
.figure--square .figure__frame { aspect-ratio: 1 / 1; }
.figure--tall .figure__frame { aspect-ratio: 3 / 4; }

/* ---------- 8. TOC（左侧索引轨道） ---------- */
.toc {
  position: sticky;
  top: calc(var(--header-space) + 8px);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.toc__title {
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sand-500);
}
.toc__link {
  display: flex;
  align-items: baseline;
  gap: 0.7em;
  padding: 8px 10px;
  border-left: 2px solid rgba(147, 166, 184, 0.2);
  border-radius: 0 var(--r-xs) var(--r-xs) 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--mist-400);
  text-decoration: none;
  transition: color var(--dur) var(--ease),
    background-color var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}
.toc__link:hover {
  color: var(--paper-050);
  background: rgba(244, 241, 233, 0.05);
}
.toc__link[aria-current="true"] {
  color: var(--paper-050);
  border-left-color: var(--signal-500);
  background: rgba(240, 102, 43, 0.10);
}
.toc__index {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--sand-500);
}
.toc__link[aria-current="true"] .toc__index { color: var(--signal-100); }

/* ---------- 9. HEADER ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  padding: 14px clamp(12px, 3vw, 28px) 10px;
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 140%;
  background: linear-gradient(180deg, rgba(8, 23, 38, 0.94), rgba(8, 23, 38, 0));
  pointer-events: none;
  z-index: -1;
}

.skip-link {
  position: absolute;
  left: clamp(12px, 3vw, 28px);
  top: 10px;
  z-index: 99;
  padding: 10px 16px;
  border-radius: var(--r-xs);
  background: var(--paper-050);
  color: var(--ink-950);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 180ms var(--ease);
}
.skip-link:focus { transform: translateY(0); }

.read-progress {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  display: block;
  height: 2px;
  background: rgba(147, 166, 184, 0.14);
  overflow: hidden;
}
.read-progress__bar {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--celadon-600), var(--cyan-300) 58%, var(--signal-500));
  transition: width 100ms linear;
}

.header-shell {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.2vw, 18px);
  max-width: var(--shell);
  margin-inline: auto;
  padding: 8px 10px 8px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: linear-gradient(180deg, rgba(22, 50, 74, 0.94), rgba(10, 28, 44, 0.94));
  box-shadow: var(--paper-shadow);
  transition: padding var(--dur) var(--ease),
    background-color var(--dur) var(--ease);
}
.site-header[data-condensed] .header-shell {
  padding: 5px 8px 5px 14px;
  background: linear-gradient(180deg, rgba(16, 40, 61, 0.99), rgba(8, 23, 38, 0.99));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  color: var(--paper-050);
  text-decoration: none;
}
.brand__mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border: 1px solid rgba(199, 161, 90, 0.55);
  border-radius: var(--r-xs);
  background:
    repeating-linear-gradient(135deg, rgba(199, 161, 90, 0.18) 0 2px, transparent 2px 6px),
    var(--ink-950);
  color: var(--sand-100);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand__name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.brand__version {
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  color: var(--mist-400);
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  color: var(--paper-050);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.nav-toggle:hover { border-color: var(--cyan-300); color: var(--cyan-300); }
.nav-toggle__bars {
  position: relative;
  display: block;
  width: 16px;
  height: 10px;
  flex: 0 0 auto;
}
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  transition: transform var(--dur) var(--ease), top var(--dur) var(--ease);
}
.nav-toggle__bars::before { top: 0; }
.nav-toggle__bars::after { top: 8px; }
.site-header[data-open] .nav-toggle__bars::before { top: 4px; transform: rotate(45deg); }
.site-header[data-open] .nav-toggle__bars::after { top: 4px; transform: rotate(-45deg); }

.site-nav {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.site-nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-link {
  display: inline-block;
  padding: 8px 12px;
  border-radius: var(--r-pill);
  color: var(--mist-400);
  font-size: 13.5px;
  line-height: 1.5;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition: color 160ms var(--ease), background-color 160ms var(--ease),
    box-shadow 160ms var(--ease);
}
.nav-link:hover {
  color: var(--paper-050);
  background: rgba(244, 241, 233, 0.08);
}
.nav-link[aria-current="page"] {
  color: var(--sand-100);
  background: rgba(199, 161, 90, 0.16);
  box-shadow: inset 0 0 0 1px rgba(199, 161, 90, 0.55);
}

.site-nav__foot {
  display: none;
  margin: 0;
  padding-top: 18px;
  border-top: 1px dashed rgba(147, 166, 184, 0.25);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--mist-400);
}

.header-cta { flex: 0 0 auto; }

.nav-scrim {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1;
  background: rgba(4, 12, 20, 0.66);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur) var(--ease);
}
.site-header[data-open] .nav-scrim {
  opacity: 1;
  pointer-events: auto;
}

/* ---------- 10. FOOTER ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 7vw, 96px);
  padding: clamp(36px, 5vw, 64px) 0 24px;
  border-top: 1px solid rgba(199, 161, 90, 0.38);
  background:
    radial-gradient(90% 120% at 12% -10%, rgba(46, 140, 126, 0.16), transparent 62%),
    linear-gradient(180deg, var(--ink-900), #061320);
}
.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: repeating-linear-gradient(
    90deg,
    var(--sand-500) 0 2px,
    transparent 2px 12px
  );
  opacity: 0.32;
  pointer-events: none;
}

.footer-shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.3fr 1fr;
  gap: clamp(22px, 3vw, 44px);
}

.footer-col { min-width: 0; }

.brand--footer { margin-bottom: 14px; }

.footer-title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.7;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sand-500);
}

.footer-note {
  font-size: 14px;
  line-height: 1.85;
  color: var(--mist-400);
  max-width: 34ch;
}
.footer-meta {
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(147, 166, 184, 0.85);
}
.footer-tip {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed rgba(147, 166, 184, 0.22);
  font-size: 13px;
  line-height: 1.8;
  color: var(--mist-600);
  max-width: 34ch;
}

.footer-links {
  display: grid;
  gap: 8px;
}
.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  font-size: 14px;
  line-height: 1.8;
  color: var(--mist-400);
  text-decoration: none;
  transition: color 160ms var(--ease);
}
.footer-links a::before {
  content: "";
  width: 8px;
  height: 1px;
  flex: 0 0 auto;
  background: currentColor;
  opacity: 0.55;
}
.footer-links a:hover { color: var(--paper-050); }

.footer-contact {
  display: grid;
  gap: 12px;
}
.footer-contact li {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.footer-key {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sand-500);
}
.footer-value {
  font-size: 14px;
  line-height: 1.8;
  color: var(--paper-050);
  word-break: break-word;
}

.footer-icp {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: var(--mist-400);
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: clamp(28px, 4vw, 44px);
  padding-top: 18px;
  border-top: 1px solid rgba(147, 166, 184, 0.18);
}
.footer-copy {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--mist-600);
}
.footer-base__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}
.footer-base__links a,
.to-top {
  font-size: 13px;
  line-height: 1.6;
  color: var(--mist-400);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 160ms var(--ease), border-color 160ms var(--ease);
}
.footer-base__links a:hover,
.to-top:hover {
  color: var(--cyan-300);
  border-bottom-color: currentColor;
}

/* ---------- 11. REVEAL ---------- */
.has-js [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 260ms var(--ease), transform 260ms var(--ease);
}
.has-js [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* ---------- 12. RESPONSIVE ---------- */
@media (max-width: 1000px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  :root { --header-space: 84px; }

  .nav-toggle { display: inline-flex; order: 3; }
  .header-cta { order: 2; margin-left: auto; }
  .brand { order: 1; }
  .header-shell { gap: 8px; }

  .nav-scrim { display: block; }

  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    width: min(340px, 86vw);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: calc(88px + env(safe-area-inset-top, 0px)) 22px 24px;
    border-left: 1px solid rgba(199, 161, 90, 0.38);
    background: linear-gradient(180deg, #0E2438 0%, #07141F 100%);
    box-shadow: -24px 0 48px -32px #000;
    overflow-y: auto;
    transform: translateX(103%);
    transition: transform var(--dur) var(--ease);
  }
  .site-header[data-open] .site-nav { transform: translateX(0); }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
  .nav-link {
    padding: 12px 14px;
    border-radius: var(--r-xs);
    border-left: 2px solid transparent;
    background: rgba(244, 241, 233, 0.04);
    font-size: 15px;
  }
  .nav-link[aria-current="page"] {
    border-left-color: var(--sand-500);
    box-shadow: none;
  }
  .site-nav__foot { display: block; margin-top: auto; }
}

@media (max-width: 860px) {
  .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .span-2, .span-3, .span-4 { grid-column: span 3; }
  .span-6, .span-8, .span-12 { grid-column: span 6; }
  .figure--wide .figure__frame { aspect-ratio: 16 / 9; }
}

@media (max-width: 700px) {
  body { font-size: 16px; line-height: 1.85; }
  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .section-head__aside { text-align: left; }
}

@media (max-width: 620px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-base { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 560px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span-2, .span-3, .span-4, .span-6, .span-8, .span-12 { grid-column: span 2; }

  .brand__mark { width: 30px; height: 30px; font-size: 11px; }
  .brand__name { font-size: 14px; }
  .brand__version { display: none; }
  .nav-toggle__label { display: none; }
  .nav-toggle { padding: 8px 10px; }
  .header-cta { font-size: 12px; padding: 0.38em 0.7em; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .has-js [data-reveal] {
    opacity: 1;
    transform: none;
  }
  .panel:hover { transform: none; }
  .read-progress__bar { transition: none; }
}

@media print {
  .site-header, .site-footer, .toc, .copy-btn, .to-top { display: none !important; }
  body {
    background: #fff;
    color: #111;
    font-size: 12pt;
  }
  .panel { border: 1px solid #999; box-shadow: none; background: #fff; }
}
