/* =========================================================
   博万赛事 · 共享样式 /assets/site.css
   骨架：俯视球场网格 + 比分牌 + 轮次刻度带
   ========================================================= */

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

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

body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure, blockquote { margin: 0; padding: 0; }

ul, ol { list-style: none; }

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

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

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

/* ---------- 2. 设计令牌 ---------- */
:root {
  --ink-900: #0A1220;
  --ink-800: #12203A;
  --ink-700: #182B4A;
  --green: #17A45A;
  --green-bright: #35D07F;
  --orange: #FF6B1A;
  --yellow: #FFC24B;
  --white: #F5F8F6;
  --muted: #9FB0C4;
  --line: #2B3B57;
  --red: #E2483C;

  --font-display: "Archivo Narrow", "Arial Narrow", "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-body: "Inter", "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;

  --maxw: 1320px;
  --edge-w: 44px;
  --r-lg: 28px;
  --r-md: 18px;
  --r-sm: 10px;
  --r-pill: 999px;

  --dur: 240ms;
  --ease: cubic-bezier(.2, .7, .25, 1);
  --shadow: 0 22px 48px -28px rgba(0, 0, 0, .85);
}

/* ---------- 3. 基础与中文排版 ---------- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--white);
  background-color: var(--ink-900);
  background-image:
    repeating-linear-gradient(0deg, rgba(43, 59, 87, .40) 0 1px, transparent 1px 120px),
    repeating-linear-gradient(90deg, rgba(43, 59, 87, .26) 0 1px, transparent 1px 120px);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

p { max-width: 46ch; }

strong { color: var(--white); font-weight: 800; }

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

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  background: var(--orange);
  color: var(--ink-900);
  font-weight: 800;
  font-size: 14px;
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: 12px; }

/* ---------- 4. 版式容器 ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(16px, 3vw, 28px);
}

.section {
  position: relative;
  padding-block: clamp(40px, 6vw, 84px);
}

.section--band {
  background: var(--ink-800);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section--narrow {
  max-width: 820px;
  margin-inline: auto;
  padding-inline: clamp(16px, 3vw, 28px);
}

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 22px;
  margin-bottom: clamp(20px, 3vw, 36px);
}

.grid {
  display: grid;
  gap: clamp(16px, 2vw, 24px);
}

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

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

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

/* ---------- 5. 文字层级 ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--green-bright);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--orange);
}

.section-title {
  font-size: clamp(28px, 4.4vw, 44px);
}

.lede {
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 1.75;
  color: var(--muted);
  max-width: 46ch;
}

.note {
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
  max-width: 62ch;
}

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

/* ---------- 6. 按钮与标签 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: .01em;
  white-space: nowrap;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn:hover { transform: translateY(-2px); }

.btn--primary {
  background: var(--green);
  color: var(--ink-900);
}
.btn--primary:hover { background: var(--green-bright); }

.btn--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--white);
}
.btn--ghost:hover { border-color: var(--green-bright); color: var(--green-bright); }

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

.btn--sm {
  padding: 8px 15px;
  font-size: 13px;
  font-weight: 700;
}

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

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--ink-800);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  white-space: nowrap;
}
.chip--green { color: var(--green-bright); border-color: rgba(53, 208, 127, .42); }
.chip--orange { color: var(--orange); border-color: rgba(255, 107, 26, .42); }
.chip--yellow { color: var(--yellow); border-color: rgba(255, 194, 75, .42); }
.chip--red { color: var(--red); border-color: rgba(226, 72, 60, .45); }

/* ---------- 7. 卡片 / 比分牌 / 刻度带 ---------- */
.card {
  position: relative;
  padding: clamp(18px, 2.4vw, 26px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--ink-800);
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--green);
  box-shadow: var(--shadow);
}

.card--score { background: var(--ink-700); }

.card--file { border-radius: var(--r-md); }
.card--file::before {
  content: attr(data-file);
  position: absolute;
  top: 14px;
  right: 16px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  color: var(--muted);
}

.card__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 20px;
  line-height: 1.25;
}

.card__meta {
  display: block;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .05em;
  color: var(--muted);
}

.card__body {
  margin-top: 10px;
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--muted);
}

.scoreboard {
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  border-radius: var(--r-lg);
  background: var(--ink-800);
}

.scoreboard__row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
}

.scoreboard__team {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(15px, 2.1vw, 22px);
  line-height: 1.2;
}
.scoreboard__team--away { text-align: right; }

.scoreboard__score {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(28px, 5vw, 50px);
  letter-spacing: -0.02em;
  color: var(--orange);
  font-variant-numeric: tabular-nums;
}

.scoreboard__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .05em;
  color: var(--muted);
}

.ticker {
  display: flex;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--ink-800);
  scrollbar-width: thin;
}

.ticker__item {
  flex: 0 0 auto;
  padding: 8px 16px;
  border-right: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  color: var(--muted);
  white-space: nowrap;
}
.ticker__item:last-child { border-right: 0; }

.ticker__item--active {
  background: var(--orange);
  color: var(--ink-900);
  font-weight: 700;
}

.edge-rail { display: none; }

/* ---------- 8. 图片容器 ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--ink-800);
}
.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(245, 248, 246, .06);
  pointer-events: none;
}

.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--tall { aspect-ratio: 3 / 4; }
.media-frame--square { aspect-ratio: 1 / 1; }

.media-frame--empty {
  background-image:
    linear-gradient(135deg, rgba(23, 164, 90, .16), rgba(255, 107, 26, .10)),
    repeating-linear-gradient(0deg, rgba(43, 59, 87, .55) 0 1px, transparent 1px 30px),
    repeating-linear-gradient(90deg, rgba(43, 59, 87, .55) 0 1px, transparent 1px 30px);
}

.media-frame__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-frame__cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 14px;
  background: rgba(10, 18, 32, .84);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--muted);
}

/* ---------- 9. 面包屑与目录 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .04em;
  color: var(--muted);
}
.breadcrumb a { color: var(--muted); transition: color var(--dur) var(--ease); }
.breadcrumb a:hover { color: var(--green-bright); }
.breadcrumb [aria-current="page"] { color: var(--white); }

.breadcrumb__sep { color: var(--line); }

.toc {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--ink-800);
}

.toc__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toc__link {
  display: block;
  padding: 8px 10px;
  border-left: 2px solid var(--line);
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease),
              background var(--dur) var(--ease);
}
.toc__link:hover { color: var(--white); }
.toc__link[aria-current="true"] {
  color: var(--white);
  background: rgba(255, 107, 26, .08);
  border-left-color: var(--orange);
}

/* ---------- 10. 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(10, 18, 32, .94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.header-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  background: var(--ink-800);
}

.header-progress__bar {
  display: block;
  width: 0;
  height: 100%;
  background: var(--orange);
  transition: width 120ms linear;
}

.header-edge { display: none; }

.header-bar {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 10px clamp(14px, 3vw, 28px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 64px;
}

.brand {
  grid-column: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand__mark {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--orange);
  color: var(--ink-900);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 16px;
  letter-spacing: -0.02em;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .22);
}

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

.brand__name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 17px;
  line-height: 1.15;
  letter-spacing: .01em;
}

.brand__domain {
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.4;
  letter-spacing: .04em;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-toggle {
  grid-column: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--ink-800);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
}
.nav-toggle:hover { border-color: var(--green); }

.nav-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  width: 16px;
}
.nav-toggle__bars i {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--green-bright);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

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

.primary-nav {
  grid-column: 1 / -1;
  display: none;
}
.primary-nav[data-open] {
  display: block;
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  animation: navDrop 220ms var(--ease) both;
}

@keyframes navDrop {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

.primary-nav__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .02em;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
.nav-link::before {
  content: "";
  flex: 0 0 3px;
  width: 3px;
  height: 12px;
  border-radius: 2px;
  background: var(--line);
  transition: background var(--dur) var(--ease), height var(--dur) var(--ease);
}
.nav-link:hover { color: var(--white); background: rgba(245, 248, 246, .05); }
.nav-link[aria-current="page"] {
  color: var(--white);
  background: var(--green);
  border-color: var(--green-bright);
}
.nav-link[aria-current="page"]::before {
  background: var(--yellow);
  height: 16px;
}

.header-utility {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 6px;
}

.search-entry {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px dashed var(--line);
  border-radius: var(--r-pill);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.search-entry::before {
  content: "//";
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--green);
}
.search-entry:hover { color: var(--white); border-color: var(--green-bright); }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--ink-800);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.status-pill:hover { color: var(--white); border-color: var(--green-bright); }

.status-pill__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green-bright);
  box-shadow: 0 0 0 3px rgba(53, 208, 127, .18);
}

/* ---------- 11. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 7vw, 96px);
  background: var(--ink-800);
  border-top: 1px solid var(--line);
}

.footer-edge {
  display: flex;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--ink-900);
}

.footer-edge__tick {
  flex: 1 1 0;
  min-width: 0;
  padding: 7px 4px;
  border-right: 1px solid var(--line);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .08em;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
}
.footer-edge__tick:last-child { border-right: 0; }

.footer-inner {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(32px, 5vw, 64px) clamp(16px, 3vw, 28px);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(24px, 4vw, 44px);
}

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

.footer-brand__lockup {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--white);
}
.footer-brand__lockup:hover { color: var(--green-bright); }

.footer-tagline {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
  max-width: 34ch;
}

.footer-contact {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 2;
  letter-spacing: .02em;
  color: var(--muted);
  word-break: break-word;
  max-width: 40ch;
}

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

.footer-col__title {
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--green-bright);
}

.footer-col__list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-link {
  display: inline-block;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
  transition: color var(--dur) var(--ease), padding-left var(--dur) var(--ease);
}
.footer-link:hover {
  color: var(--white);
  padding-left: 6px;
}

.footer-legal {
  display: grid;
  gap: 12px;
  margin-top: clamp(28px, 4vw, 48px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.footer-legal__row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .04em;
  color: var(--muted);
  max-width: none;
}

.footer-legal__links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}

.footer-note {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
  max-width: 70ch;
}

/* ---------- 12. 返回顶部与显现 ---------- */
.to-top {
  position: fixed;
  right: clamp(14px, 3vw, 28px);
  bottom: clamp(14px, 3vw, 28px);
  z-index: 70;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 17px;
  border-radius: var(--r-pill);
  background: var(--orange);
  color: var(--ink-900);
  font-size: 13px;
  font-weight: 800;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease),
              visibility var(--dur) var(--ease);
}
.to-top[data-visible] {
  opacity: 1;
  visibility: visible;
  transform: none;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 420ms var(--ease), transform 420ms var(--ease);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- 13. 平板 ---------- */
@media (min-width: 760px) {
  .grid--12 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .span-3 { grid-column: span 2; }
  .span-4 { grid-column: span 2; }
  .span-5 { grid-column: span 3; }
  .span-6 { grid-column: span 3; }
  .span-7 { grid-column: span 4; }
  .span-8 { grid-column: span 4; }
  .span-9 { grid-column: span 6; }
  .span-12 { grid-column: span 6; }

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

/* ---------- 14. 桌面：命令栏展开 ---------- */
@media (min-width: 900px) {
  .header-bar {
    display: flex;
    align-items: center;
    gap: clamp(12px, 2vw, 24px);
  }

  .nav-toggle { display: none; }

  .primary-nav {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    grid-column: auto;
  }
  .primary-nav[data-open] { margin-top: 0; padding-top: 0; border-top: 0; }

  .primary-nav__list {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
  }

  .nav-link {
    width: auto;
    padding: 8px 13px;
    border-radius: var(--r-pill);
    font-size: 14px;
    white-space: nowrap;
  }

  .header-utility {
    grid-column: auto;
    margin-left: auto;
    padding-top: 0;
    flex-wrap: nowrap;
  }
}

/* ---------- 15. 大屏：边线刻度槽 ---------- */
@media (min-width: 1080px) {
  .grid--12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .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; }

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

@media (min-width: 1180px) {
  .header-edge {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 1;
    width: var(--edge-w);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    border-right: 1px solid var(--line);
    background: var(--ink-900);
  }

  .header-edge__tick {
    font-family: var(--font-mono);
    font-size: 9.5px;
    letter-spacing: .06em;
    color: var(--muted);
  }
  .header-edge__tick--active { color: var(--orange); }

  .header-bar { padding-left: calc(var(--edge-w) + clamp(14px, 3vw, 28px)); }

  .edge-rail {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 48px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding-top: 6px;
    border-right: 1px solid var(--line);
  }

  .edge-rail__tick {
    padding-left: 8px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: .08em;
    color: var(--muted);
  }
  .edge-rail__tick--active { color: var(--orange); }

  .wrap, .section--narrow { padding-left: calc(48px + clamp(16px, 3vw, 28px)); }
}

/* ---------- 16. 小屏收缩 ---------- */
@media (max-width: 899px) {
  .header-bar { grid-template-columns: minmax(0, 1fr) auto auto; }
  .brand { grid-column: 1; }
  .header-utility { grid-column: 2; grid-row: 1; padding-top: 0; justify-content: flex-end; flex-wrap: nowrap; }
  .header-utility .search-entry,
  .header-utility .status-pill { display: none; }
  .nav-toggle { grid-column: 3; grid-row: 1; }
  .primary-nav { grid-row: 2; }
}

@media (max-width: 479px) {
  .header-bar { grid-template-columns: minmax(0, 1fr) auto; }
  .header-utility { display: none; }
  .nav-toggle { grid-column: 2; }
}

/* ---------- 17. 无障碍降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

  [data-reveal] { opacity: 1; transform: none; }

  .header-progress__bar { transition: none; }

  .card:hover, .btn:hover { transform: none; }

  .to-top { transition: none; }
}
