/* =========================================================
   利升体育 · 共享站点样式  /assets/site.css
   竞技场深蓝 · 蓝图网格 · 比分板语汇
   ========================================================= */

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

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

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

ul, ol { margin: 0; padding: 0; list-style: none; }

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

a { color: inherit; text-decoration: none; }

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

table { border-collapse: collapse; width: 100%; }

[hidden] { display: none !important; }

/* ---------- 2. 变量 ---------- */
:root {
  --ink: #0B1A33;
  --ink-2: #13294B;
  --line: #2A4165;
  --line-soft: rgba(42, 65, 101, .55);
  --signal: #FF6A1F;
  --lime: #B6FF3C;
  --yellow: #F2C200;
  --red: #E23A2E;
  --stone: #8A8F98;
  --paper: #F4F1EA;
  --moss: #4E6B57;
  --clay: #C4693A;

  --text: rgba(244, 241, 234, .86);
  --text-strong: #F4F1EA;
  --text-mute: #9AA6BC;
  --ink-text: #1B232E;

  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", Georgia, serif;
  --font-sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius: 4px;
  --radius-pill: 999px;
  --shadow-hard: 6px 6px 0 rgba(0, 0, 0, .35);
  --shadow-hard-sm: 3px 3px 0 rgba(0, 0, 0, .3);

  --maxw: 1280px;
  --gutter: clamp(16px, 4vw, 48px);
  --header-h: 74px;

  --ease: cubic-bezier(.2, .7, .3, 1);
}

/* ---------- 3. 基础 ---------- */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--ink);
  background-image:
    linear-gradient(rgba(42, 65, 101, .28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(42, 65, 101, .28) 1px, transparent 1px);
  background-size: 96px 96px;
}

#main-content { flex: 1 0 auto; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -.01em;
  color: var(--text-strong);
}

.display-1 { font-size: clamp(34px, 5.2vw, 64px); line-height: 1.08; }
.display-2 { font-size: clamp(28px, 4vw, 48px); line-height: 1.12; }
.display-3 { font-size: clamp(22px, 2.8vw, 32px); }
.headline { font-family: var(--font-sans); font-weight: 800; letter-spacing: -.02em; }

.lead {
  font-size: clamp(17px, 1.5vw, 19px);
  line-height: 1.75;
  color: rgba(244, 241, 234, .82);
  max-width: 62ch;
}

.prose { max-width: 72ch; font-size: 17px; line-height: 1.78; }
.prose > * + * { margin-top: 1.05em; }

::selection { background: var(--lime); color: var(--ink); }

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- 4. 工具类 ---------- */
.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: absolute;
  left: var(--gutter);
  top: -72px;
  z-index: 200;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  background: var(--lime);
  color: var(--ink);
  font-weight: 700;
  transition: top .18s var(--ease);
}
.skip-link:focus { top: 14px; }

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

.rule { height: 1px; border: 0; background: var(--line); }

.index-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--stone);
}
.index-label::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  flex: 0 0 auto;
}

/* ---------- 5. 网格 ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
}
.span-3 { grid-column: span 3; }
.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-9 { grid-column: span 9; }
.span-12 { grid-column: span 12; }

/* ---------- 6. 章节 ---------- */
.section {
  position: relative;
  padding-block: clamp(48px, 7vw, 96px);
}
.section--ink-2 { background: var(--ink-2); }
.section--moss { background: var(--moss); color: var(--text-strong); }
.section--paper { background: var(--paper); color: var(--ink-text); }
.section--paper h1,
.section--paper h2,
.section--paper h3,
.section--paper h4 { color: var(--ink-text); }
.section--paper .lead,
.section--paper .prose { color: rgba(27, 35, 46, .84); }
.section--paper .index-label { color: rgba(27, 35, 46, .55); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 28px;
  padding-bottom: 16px;
  margin-bottom: clamp(24px, 3vw, 40px);
  border-bottom: 1px solid var(--line);
}
.section--paper .section-head { border-bottom-color: rgba(27, 35, 46, .18); }
.section-head > p { font-family: var(--font-mono); font-size: 13px; color: var(--stone); }

/* ---------- 7. 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(11, 26, 51, .88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: background-color .18s var(--ease), box-shadow .18s var(--ease);
}
.site-header[data-condensed] {
  background: rgba(11, 26, 51, .96);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .38);
}
.site-header[data-condensed] .header-inner { padding-block: 8px; }

.header-inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 13px var(--gutter);
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 26px);
  transition: padding .18s var(--ease);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
}
.brand-bar {
  width: 42px;
  height: 14px;
  flex: 0 0 auto;
  border: 1px solid rgba(244, 241, 234, .25);
  background: linear-gradient(90deg,
    var(--signal) 0 45%,
    var(--paper) 45% 68%,
    var(--lime) 68% 100%);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--text-strong);
  transition: color .16s var(--ease);
}
.brand:hover .brand-name { color: var(--lime); }
.brand-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--stone);
}

.primary-nav { margin-inline: auto; flex: 0 1 auto; }

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: rgba(19, 41, 75, .72);
  transition: background-color .18s var(--ease);
}
.site-header[data-condensed] .nav-list { background: rgba(19, 41, 75, .95); }

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  color: rgba(226, 233, 244, .78);
  transition: color .16s var(--ease), background-color .16s var(--ease), box-shadow .16s var(--ease);
}
.nav-link:hover { color: var(--text-strong); background: rgba(244, 241, 234, .08); }
.nav-link[aria-current="page"] {
  color: var(--lime);
  background: rgba(182, 255, 60, .12);
  box-shadow: inset 0 0 0 1px rgba(182, 255, 60, .45);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
}
.header-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--stone);
  white-space: nowrap;
}
.header-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 3px rgba(182, 255, 60, .16);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: rgba(19, 41, 75, .78);
  flex: 0 0 auto;
}
.nav-toggle-lines,
.nav-toggle-lines::before,
.nav-toggle-lines::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--paper);
  transition: transform .2s var(--ease), background-color .2s var(--ease);
}
.nav-toggle-lines { position: relative; }
.nav-toggle-lines::before,
.nav-toggle-lines::after { content: ""; position: absolute; left: 0; }
.nav-toggle-lines::before { top: -6px; }
.nav-toggle-lines::after { top: 6px; }
.site-header[data-open] .nav-toggle { border-color: rgba(182, 255, 60, .5); }
.site-header[data-open] .nav-toggle-lines { background: transparent; }
.site-header[data-open] .nav-toggle-lines::before { background: var(--lime); transform: translateY(6px) rotate(45deg); }
.site-header[data-open] .nav-toggle-lines::after { background: var(--lime); transform: translateY(-6px) rotate(-45deg); }

.scroll-progress {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: rgba(42, 65, 101, .7);
  overflow: hidden;
}
.scroll-progress-bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--signal), var(--lime));
  transition: width .1s linear;
}

/* ---------- 8. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: auto;
  border-top: 1px solid var(--line);
  background-color: var(--ink);
  background-image:
    linear-gradient(rgba(42, 65, 101, .34) 1px, transparent 1px),
    linear-gradient(90deg, rgba(42, 65, 101, .34) 1px, transparent 1px);
  background-size: 72px 72px;
  color: var(--text);
}

.footer-inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(40px, 6vw, 76px) var(--gutter) 24px;
  display: grid;
  gap: clamp(26px, 3.5vw, 46px);
}

.footer-layer {
  border-top: 1px solid rgba(42, 65, 101, .8);
  padding-top: clamp(20px, 2.4vw, 28px);
}
.footer-layer--brand {
  border-top: 0;
  padding-top: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.footer-layer--links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 24px;
}
.footer-layer--contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 22px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer-brand-name {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 700;
  color: var(--text-strong);
}
.footer-brand-sub {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--stone);
}
.footer-note {
  margin-top: 14px;
  max-width: 58ch;
  font-size: 15px;
  line-height: 1.8;
  color: rgba(244, 241, 234, .74);
}
.footer-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.footer-meta-item {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--text-mute);
}

.footer-nav-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 12px;
}
.footer-nav-list { display: grid; gap: 2px; }
.footer-nav-link {
  display: inline-block;
  padding: 6px 0;
  font-size: 15px;
  color: rgba(244, 241, 234, .8);
  transition: color .16s var(--ease), transform .16s var(--ease);
}
.footer-nav-link:hover { color: var(--lime); transform: translateX(3px); }

.footer-contact {
  border-left: 2px solid var(--clay);
  padding-left: 14px;
}
.footer-contact-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--stone);
}
.footer-contact-value {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-strong);
  word-break: break-word;
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid rgba(42, 65, 101, .8);
}
.footer-base-item {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--stone);
}

.back-to-top {
  position: fixed;
  right: clamp(14px, 3vw, 28px);
  bottom: clamp(14px, 3vw, 28px);
  z-index: 70;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--ink-2);
  color: var(--paper);
  box-shadow: var(--shadow-hard-sm);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .18s var(--ease), transform .18s var(--ease), visibility .18s, background-color .16s var(--ease);
}
.back-to-top[data-visible] { opacity: 1; visibility: visible; transform: none; }
.back-to-top:hover { background: var(--signal); color: var(--ink); border-color: var(--signal); }
.back-to-top-icon { font-family: var(--font-mono); font-size: 18px; line-height: 1; }

/* ---------- 9. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  background: var(--paper);
  color: var(--ink);
  transition: transform .16s var(--ease), background-color .16s var(--ease), color .16s var(--ease), box-shadow .16s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-hard-sm); }
.btn--sm { padding: 9px 16px; font-size: 14px; }
.btn--signal { background: var(--signal); color: #101A2B; }
.btn--signal:hover { background: #ff8143; }
.btn--lime { background: var(--lime); color: #101A2B; }
.btn--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text-strong);
}
.btn--ghost:hover { border-color: var(--lime); color: var(--lime); }

/* ---------- 10. 标签与筛选 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-mute);
  white-space: nowrap;
}
.tag--lime { border-color: rgba(182, 255, 60, .5); color: var(--lime); background: rgba(182, 255, 60, .1); }
.tag--yellow { border-color: rgba(242, 194, 0, .55); color: var(--yellow); background: rgba(242, 194, 0, .1); }
.tag--red { border-color: rgba(226, 58, 46, .55); color: #ff7a70; background: rgba(226, 58, 46, .12); }
.tag--stone { border-color: var(--line); color: var(--stone); }
.tag--solid { background: var(--signal); color: #101A2B; border-color: var(--signal); }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 7px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: rgba(19, 41, 75, .6);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-mute);
  transition: color .16s var(--ease), background-color .16s var(--ease), border-color .16s var(--ease);
}
.chip:hover { color: var(--text-strong); border-color: var(--stone); }
.chip[aria-pressed="true"] {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--ink);
  font-weight: 700;
}
.filter-count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--stone);
}

/* ---------- 11. 面板 / 数据块 ---------- */
.panel {
  position: relative;
  padding: clamp(18px, 2.4vw, 28px);
  background: var(--ink-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-hard);
}
.panel--signal { border-top: 3px solid var(--signal); }
.panel--lime { border-top: 3px solid var(--lime); }
.panel--flat { box-shadow: none; }
.panel--paper {
  background: var(--paper);
  color: var(--ink-text);
  border-color: rgba(27, 35, 46, .18);
}
.panel--paper .panel-head { border-bottom-color: rgba(27, 35, 46, .18); color: rgba(27, 35, 46, .6); }

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--stone);
}

.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-value {
  font-family: var(--font-mono);
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.02em;
  color: var(--text-strong);
}
.stat--lime .stat-value { color: var(--lime); }
.stat--signal .stat-value { color: var(--signal); }
.stat-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--stone);
}

.delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
}
.delta--up { color: var(--lime); }
.delta--up::before { content: "▲"; font-size: 9px; transform: translateY(-1px); }
.delta--down { color: var(--clay); }
.delta--down::before { content: "▼"; font-size: 9px; transform: translateY(1px); }

/* ---------- 12. 表格 ---------- */
.data-table { font-size: 15px; }
.data-table caption {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--stone);
  padding-bottom: 10px;
}
.data-table th,
.data-table td {
  padding: 11px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
}
.data-table th {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--stone);
}
.data-table tbody tr { transition: background-color .16s var(--ease); }
.data-table tbody tr:hover { background: rgba(182, 255, 60, .07); }
.data-table .num,
.num {
  font-family: var(--font-mono);
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ---------- 13. 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--stone);
}
.breadcrumb li { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumb li + li::before { content: "/"; color: var(--line); }
.breadcrumb a:hover { color: var(--lime); }
.breadcrumb [aria-current="page"] { color: var(--text-strong); }

/* ---------- 14. 手风琴 ---------- */
.accordion { border-top: 1px solid var(--line); }
.accordion-item { border-bottom: 1px solid var(--line); }
.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 2px;
  text-align: left;
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 700;
  color: var(--text-strong);
}
.accordion-trigger::after {
  content: "+";
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 20px;
  line-height: 1;
  color: var(--signal);
}
.accordion-item.is-open .accordion-trigger::after { content: "–"; color: var(--lime); }
.accordion-panel {
  padding: 0 2px 20px;
  font-size: 16px;
  line-height: 1.8;
  color: rgba(244, 241, 234, .78);
}
.section--paper .accordion-trigger { color: var(--ink-text); }
.section--paper .accordion-panel { color: rgba(27, 35, 46, .82); }

/* ---------- 15. 目录跟随 ---------- */
.toc { position: sticky; top: 108px; }
.toc-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 12px;
}
.toc-list { display: grid; gap: 2px; }
.toc-link {
  display: block;
  padding: 8px 0 8px 14px;
  border-left: 1px solid var(--line);
  font-size: 14px;
  color: var(--stone);
  transition: color .16s var(--ease), border-color .16s var(--ease);
}
.toc-link:hover { color: var(--text-strong); }
.toc-link[aria-current="true"] {
  color: var(--lime);
  border-left-color: var(--lime);
}

/* ---------- 16. 图片容器 ---------- */
.figure { margin: 0; }
.figure-frame {
  position: relative;
  overflow: hidden;
  background: var(--ink-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-hard-sm);
}
.figure-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 26, 51, 0) 45%, rgba(11, 26, 51, .62));
  pointer-events: none;
}
.figure-frame--plain::after { display: none; }
.figure-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.figure-frame--16x9 { aspect-ratio: 16 / 9; }
.figure-frame--4x3 { aspect-ratio: 4 / 3; }
.figure-frame--3x4 { aspect-ratio: 3 / 4; }
.figure-frame--1x1 { aspect-ratio: 1 / 1; }
.figure-frame--21x9 { aspect-ratio: 21 / 9; }
.figure figcaption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--stone);
}

/* ---------- 17. 显现动效 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .24s var(--ease), transform .24s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- 18. 响应式 ---------- */
@media (max-width: 1120px) {
  .header-status { display: none; }
}

@media (max-width: 980px) {
  .nav-toggle { display: inline-flex; }
  .header-actions { margin-left: auto; }

  .primary-nav {
    position: absolute;
    top: calc(100% + 10px);
    left: var(--gutter);
    right: var(--gutter);
    margin: 0;
    padding: 12px;
    background: var(--ink-2);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: 0 20px 44px rgba(0, 0, 0, .48);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    max-height: calc(100vh - 150px);
    overflow-y: auto;
    transition: opacity .18s var(--ease), transform .18s var(--ease), visibility .18s;
  }
  .site-header[data-open] .primary-nav {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .nav-list {
    counter-reset: nav;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
  }
  .nav-link {
    width: 100%;
    justify-content: space-between;
    padding: 13px 14px;
    border-radius: 14px;
    font-size: 16px;
  }
  .nav-link::after {
    counter-increment: nav;
    content: "0" counter(nav);
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--stone);
  }
  .nav-link[aria-current="page"]::after { color: var(--lime); }
  .brand-sub { display: none; }
}

@media (max-width: 900px) {
  .footer-layer--brand { grid-template-columns: 1fr; }
  .toc { position: static; }
}

@media (max-width: 860px) {
  .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .grid > [class*="span-"] { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .brand-bar { width: 32px; height: 12px; }
  .brand-name { font-size: 18px; }
  .footer-base { flex-direction: column; gap: 8px; }
  .back-to-top { width: 44px; height: 44px; }
}

/* ---------- 19. 动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .back-to-top { transform: none; }
  .btn:hover,
  .footer-nav-link:hover { transform: none; }
}
