/* ============================================================
   维基体育彩票平台 · 共享样式表 /assets/site.css
   夜间开奖数据实验室：墨夜蓝基底 + 期号时间轴 + 档案夹组件
   ============================================================ */

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

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

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

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

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

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

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

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

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- 2. 变量 ---------- */
:root {
  /* 色彩骨架 */
  --ink: #0B1729;
  --deep: #12233C;
  --grid: #1E3554;
  --grid-soft: rgba(30, 53, 84, 0.55);
  --red: #E8323C;
  --gold: #F2B441;
  --blue: #2F8BFF;
  --orange: #F27A2B;
  --green: #27C08A;
  --amber: #C98A2E;
  --crimson: #D6364B;
  --white: #EAF1FB;
  --muted: #94A6BE;
  --dim: #4C6787;

  /* 字体 */
  --mono: "JetBrains Mono", "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --serif: "Source Han Serif SC", "Songti SC", Georgia, serif;

  /* 版式 */
  --shell: 1360px;
  --gut: 48px;
  --radius: 18px;
  --radius-sm: 10px;
  --header-h: 62px;
}

/* ---------- 3. 基底 ---------- */
body {
  background-color: var(--ink);
  background-image:
    linear-gradient(rgba(30, 53, 84, 0.32) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 53, 84, 0.32) 1px, transparent 1px),
    radial-gradient(120% 80% at 78% -10%, rgba(47, 139, 255, 0.10), transparent 55%),
    radial-gradient(90% 60% at 8% 4%, rgba(232, 50, 60, 0.07), transparent 60%);
  background-size: 72px 72px, 72px 72px, 100% 100%, 100% 100%;
  color: var(--white);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.005em;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---------- 4. 中文排版与数字层 ---------- */
h1, h2, h3, h4 {
  font-family: var(--sans);
  font-weight: 800;
  line-height: 1.24;
  letter-spacing: -0.015em;
  color: var(--white);
}

h1 { font-size: clamp(30px, 3.6vw, 46px); margin-bottom: 0.55em; }
h2 { font-size: clamp(22px, 2.2vw, 28px); font-weight: 700; margin-bottom: 0.6em; }
h3 { font-size: 18px; font-weight: 700; margin-bottom: 0.5em; }

p { color: var(--muted); }
p strong { color: var(--white); font-weight: 700; }

.num,
.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: -0.01em;
}

.title-mark {
  font-family: var(--serif);
  font-weight: 800;
  color: var(--gold);
}

.eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 12px;
}

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

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

.section { padding-block: clamp(44px, 6vw, 92px); }
.section-tight { padding-block: clamp(28px, 3.5vw, 52px); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.section-head h2 { margin-bottom: 0; }

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
}

.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-12 { grid-column: span 12; }

.prose { max-width: 68ch; }
.prose p + p { margin-top: 1em; }

/* ---------- 6. Skip link ---------- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 12px 20px;
  border-radius: 0 0 12px 12px;
  background: var(--gold);
  color: #1A1204;
  font-weight: 700;
  transition: top 0.18s ease;
}

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

/* ---------- 7. 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(11, 23, 41, 0.94);
  border-bottom: 1px solid var(--grid);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(47, 139, 255, 0.10), 0 18px 40px rgba(4, 10, 20, 0.5);
}

.header-shell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  min-height: var(--header-h);
  padding: 10px var(--gut);
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: none;
  padding: 4px 2px;
  border-radius: 10px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex: none;
}

.brand-mark-ball {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: inset 0 -2px 3px rgba(0, 0, 0, 0.35);
}

.brand-mark-ball:nth-child(2) { background: var(--orange); }
.brand-mark-ball:nth-child(3) { background: var(--green); }

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }

.brand-name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--white);
}

.brand-sub {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--dim);
}

/* 移动端按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: none;
  border: 1px solid var(--grid);
  border-radius: 12px;
  background: var(--deep);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.nav-toggle:hover { border-color: var(--gold); }

.nav-toggle-icon {
  position: relative;
  display: block;
  width: 20px;
  height: 14px;
}

.nav-toggle-icon i {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--white);
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.nav-toggle-icon i:nth-child(1) { top: 0; }
.nav-toggle-icon i:nth-child(2) { top: 6px; }
.nav-toggle-icon i:nth-child(3) { top: 12px; }

.site-header[data-open] .nav-toggle-icon i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.site-header[data-open] .nav-toggle-icon i:nth-child(2) { opacity: 0; }
.site-header[data-open] .nav-toggle-icon i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* 导航 */
.primary-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  position: relative;
  display: inline-block;
  padding: 9px 12px;
  border-radius: 9px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover { color: var(--white); background: var(--deep); }

.nav-link[aria-current="page"] { color: var(--white); }

.nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--red);
}

.header-cta {
  flex: none;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(232, 50, 60, 0.28);
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.header-cta:hover {
  background: #FF4450;
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(232, 50, 60, 0.36);
}

/* 期号时间轴 */
.timeline {
  position: relative;
  border-top: 1px solid var(--grid-soft);
  overflow: hidden;
}

.timeline-track {
  --drift: 0px;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  max-width: var(--shell);
  height: 44px;
  margin-inline: auto;
  padding-inline: var(--gut);
  transform: translateX(var(--drift));
  will-change: transform;
}

.timeline-track::before {
  content: "";
  position: absolute;
  left: var(--gut);
  right: var(--gut);
  bottom: 10px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--grid) 12%, var(--grid) 88%, transparent);
}

.tick {
  position: relative;
  flex: 1 1 0;
  min-width: 28px;
  height: 100%;
}

.tick-dot {
  position: absolute;
  left: 50%;
  bottom: 7px;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  border-radius: 50%;
  background: #29466A;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.tick-label {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--dim);
  white-space: nowrap;
}

.tick.is-current .tick-dot {
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(242, 180, 65, 0.16);
}

.tick.is-current .tick-label { color: var(--gold); }

/* ---------- 8. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 8vw, 110px);
  padding-top: clamp(38px, 5vw, 64px);
  border-top: 1px solid var(--grid);
  background:
    linear-gradient(180deg, rgba(18, 35, 60, 0.72) 0%, rgba(11, 23, 41, 0.98) 62%),
    var(--ink);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(30, 53, 84, 0.4) 1px, transparent 1px);
  background-size: 72px 100%;
  opacity: 0.5;
  pointer-events: none;
}

.site-footer .container { position: relative; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 1.5fr;
  gap: 40px 32px;
  padding-bottom: clamp(34px, 4vw, 54px);
}

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

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

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

.footer-note-tight {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--dim);
  max-width: 40ch;
}

.footer-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--white);
  margin-bottom: 18px;
}

.footer-title::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--gold);
  flex: none;
}

.footer-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-list a {
  display: inline-block;
  font-size: 14.5px;
  color: var(--muted);
  transition: color 0.18s ease, transform 0.18s ease;
}

.footer-list a:hover {
  color: var(--gold);
  transform: translateX(3px);
}

.footer-list-plain li {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-size: 13.5px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.footer-key {
  flex: none;
  min-width: 32px;
  font-size: 12px;
  color: var(--dim);
}

.footer-val { color: var(--white); font-size: 13.5px; font-weight: 600; }

.footer-contact .footer-val { color: var(--white); }

.footer-bottom {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px 26px;
  flex-wrap: wrap;
  padding: 20px 0 30px;
  border-top: 1px solid var(--grid-soft);
}

.footer-rail {
  position: absolute;
  top: -6px;
  left: 0;
  width: 46px;
  height: 11px;
  border-left: 1px solid var(--grid);
  border-right: 1px solid var(--grid);
  background-image: linear-gradient(90deg, var(--grid) 40%, transparent 40%);
  background-size: 6px 1px;
  background-repeat: repeat-x;
  opacity: 0.85;
}

.footer-copy {
  font-size: 13px;
  color: var(--dim);
}

.footer-top {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  padding: 6px 12px;
  border: 1px solid var(--grid);
  border-radius: 999px;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.footer-top:hover { color: var(--gold); border-color: var(--gold); }

/* ---------- 9. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 12px 26px rgba(232, 50, 60, 0.26);
}

.btn-primary:hover { background: #FF4450; }

.btn-gold {
  background: var(--gold);
  color: #1A1204;
  box-shadow: 0 12px 26px rgba(242, 180, 65, 0.22);
}

.btn-gold:hover { background: #FFC65C; }

.btn-ghost {
  background: transparent;
  border-color: var(--grid);
  color: var(--white);
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ---------- 10. 面包屑 ---------- */
.breadcrumbs {
  padding-block: 18px 6px;
  font-size: 13px;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--dim);
}

.breadcrumbs li { display: inline-flex; align-items: center; gap: 6px; }

.breadcrumbs li + li::before {
  content: "/";
  color: #2C4A70;
}

.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--gold); }
.breadcrumbs [aria-current="page"] { color: var(--white); font-weight: 600; }

/* ---------- 11. 资料卡 / 号码球 / 热力块 ---------- */
.data-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--grid);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(18, 35, 60, 0.92), rgba(18, 35, 60, 0.55));
  box-shadow: 0 18px 40px rgba(4, 10, 20, 0.35);
  transition: border-color 0.22s ease, transform 0.22s ease;
}

.data-card:hover { border-color: #2C4A70; }

.data-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.data-card-body { display: flex; flex-direction: column; gap: 10px; }

.data-card .label {
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: var(--dim);
}

.data-card .figure-sm {
  font-family: var(--mono);
  font-size: clamp(26px, 2.6vw, 36px);
  font-weight: 700;
  color: var(--white);
  line-height: 1.1;
}

.data-card .figure-sm.is-gold { color: var(--gold); }
.data-card .figure-sm.is-red { color: var(--red); }

.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--grid);
  background: rgba(30, 53, 84, 0.4);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.tag-gold { border-color: rgba(242, 180, 65, 0.5); color: var(--gold); }
.tag-red { border-color: rgba(232, 50, 60, 0.5); color: #FF6A72; }
.tag-green { border-color: rgba(39, 192, 138, 0.45); color: var(--green); }

.ball {
  --ball-size: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--ball-size);
  height: var(--ball-size);
  flex: none;
  border-radius: 50%;
  font-family: var(--mono);
  font-size: calc(var(--ball-size) * 0.4);
  font-weight: 700;
  color: #fff;
  background: #2C4A70;
  box-shadow: inset 0 -5px 10px rgba(0, 0, 0, 0.28), inset 0 3px 8px rgba(255, 255, 255, 0.12);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.ball:hover { transform: translateY(-2px); }

.ball-blue { background: var(--blue); }
.ball-orange { background: var(--orange); }
.ball-green { background: var(--green); }
.ball-gold { background: var(--gold); color: #1A1204; }

.ball-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.heat {
  --heat: 0.4;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 22px;
  border-radius: 6px;
  background:
    linear-gradient(180deg,
      rgba(201, 138, 46, calc(0.18 + var(--heat) * 0.5)),
      rgba(214, 54, 75, calc(0.22 + var(--heat) * 0.62)));
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.heat:hover { opacity: 0.86; transform: scale(1.03); }

/* ---------- 12. 图片容器（页面阶段放置占位） ---------- */
.figure {
  position: relative;
  display: flex;
  flex-direction: column;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--grid);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(18, 35, 60, 0.95), rgba(11, 23, 41, 0.9));
}

.figure-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-image:
    repeating-linear-gradient(90deg, rgba(30, 53, 84, 0.55) 0 1px, transparent 1px 36px),
    repeating-linear-gradient(0deg, rgba(30, 53, 84, 0.55) 0 1px, transparent 1px 36px),
    radial-gradient(70% 60% at 30% 20%, rgba(47, 139, 255, 0.18), transparent 65%);
}

.figure-media > img,
.figure-media > svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.figure-caption {
  padding: 14px 18px 16px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  border-top: 1px solid var(--grid-soft);
}

.figure-caption .num { color: var(--gold); }

/* ---------- 13. 筛选按钮组 ---------- */
.filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--grid);
  border-radius: 999px;
  background: rgba(18, 35, 60, 0.6);
}

.filter-btn {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease;
}

.filter-btn:hover { color: var(--white); background: rgba(30, 53, 84, 0.7); }

.filter-btn[aria-pressed="true"] {
  background: var(--red);
  color: #fff;
  box-shadow: 0 8px 20px rgba(232, 50, 60, 0.26);
}

.filter-status {
  margin-left: auto;
  padding-right: 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dim);
}

[data-hidden] { display: none !important; }

/* ---------- 14. 折叠面板 ---------- */
.panel {
  border: 1px solid var(--grid);
  border-radius: 14px;
  background: rgba(18, 35, 60, 0.55);
  overflow: hidden;
}

.panel + .panel { margin-top: 10px; }

.panel-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 15px 20px;
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  text-align: left;
  cursor: pointer;
  transition: background 0.18s ease;
}

.panel-toggle:hover { background: rgba(30, 53, 84, 0.6); }

.panel-toggle::after {
  content: "+";
  flex: none;
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--gold);
  transition: transform 0.22s ease;
}

.panel-toggle[aria-expanded="true"]::after {
  content: "–";
  transform: rotate(180deg);
}

.panel-body {
  padding: 4px 20px 20px;
  font-size: 14.5px;
  color: var(--muted);
  border-top: 1px solid var(--grid-soft);
}

/* ---------- 15. 显现动效 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

/* ---------- 16. 响应式 ---------- */
@media (max-width: 1180px) {
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1.4fr; gap: 32px 24px; }
}

@media (max-width: 1024px) {
  :root { --gut: 32px; }
  .nav-link { padding: 8px 9px; font-size: 14px; }
  .primary-nav { gap: 12px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .span-4, .span-5, .span-7, .span-8 { grid-column: span 6; }
  .span-3 { grid-column: span 6; }
}

@media (max-width: 900px) {
  :root { --gut: 20px; --header-h: 56px; }

  .nav-toggle { display: inline-flex; }

  .primary-nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 12px;
    right: 12px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 14px;
    border: 1px solid var(--grid);
    border-radius: 16px;
    background: rgba(11, 23, 41, 0.99);
    box-shadow: 0 26px 54px rgba(3, 8, 16, 0.6);
    max-height: 72vh;
    overflow-y: auto;
  }

  .site-header[data-open] .primary-nav { display: flex; }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .nav-link {
    display: block;
    padding: 12px 14px;
    font-size: 16px;
  }

  .nav-link[aria-current="page"]::after { left: 14px; right: auto; width: 22px; bottom: 8px; }

  .header-cta {
    margin-top: 8px;
    text-align: center;
  }

  .grid-12 { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
  .span-3, .span-4, .span-5, .span-6, .span-7, .span-8, .span-12 { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  body { background-size: 48px 48px, 48px 48px, 100% 100%, 100% 100%; }

  .footer-grid { grid-template-columns: 1fr; gap: 28px; }

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

  .tick-label { display: none; }

  .filter-bar {
    border-radius: 16px;
    width: 100%;
  }

  .filter-status { margin-left: 0; padding-left: 8px; }

  .data-card { padding: 18px; }
}

@media (max-width: 400px) {
  .brand-sub { display: none; }
}

/* ---------- 17. 无障碍与降级 ---------- */
@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;
  }

  [data-reveal] { opacity: 1; transform: none; }
  .timeline-track { transform: none !important; }
}

@media print {
  .site-header, .site-footer, .nav-toggle { display: none; }
  body { background: #fff; color: #111; }
}
