/* ============================================================
   完美体育 · 共享样式表  /assets/site.css
   01 Reset · 02 Variables · 03 Base · 04 Utilities
   05 Status bar · 06 Header · 07 Footer · 08 Layout
   09 Components · 10 Media containers · 11 JS UI
   12 Responsive · 13 Reduced motion
   ============================================================ */

/* ---------- 01 Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; }
h1, h2, h3, h4, h5, p, ul, ol, dl, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
table { border-collapse: collapse; width: 100%; }

/* ---------- 02 Variables ---------- */
:root {
  --ink: #050D16;
  --panel: #0B1B2B;
  --raised: #12293F;
  --hair: #1E3B57;
  --ice: #EAF2FA;
  --body: #C3D4E4;
  --mute: #8FA6BC;
  --dim: #5D7D99;
  --lime: #A6FF3D;
  --orange: #FF7A29;
  --cyan: #2FE0C8;
  --warn: #FFC94D;
  --rail-w: 94px;
  --status-h: 36px;
  --topbar-h: 58px;
  --max: 1240px;
  --edge: 24px;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

/* ---------- 03 Base ---------- */
body {
  padding-top: var(--status-h);
  padding-left: var(--rail-w);
  background: var(--ink);
  color: var(--body);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { color: var(--ice); font-weight: 800; line-height: 1.18; letter-spacing: -.01em; }
p { max-width: 38em; }
::selection { background: var(--lime); color: #04121C; }

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

/* ---------- 04 Utilities ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap;
}
.hairline { border-top: 1px solid var(--hair); }

.skip-link {
  position: fixed;
  top: 8px; left: 8px;
  z-index: 300;
  padding: 10px 16px;
  background: var(--lime);
  color: #04121C;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .02em;
  transform: translateY(-180%);
  transition: transform .2s ease;
}
.skip-link:focus { transform: translateY(0); }

/* ---------- 05 Status bar ---------- */
.status-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--status-h);
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 var(--edge) 0 calc(var(--rail-w) + var(--edge));
  background: #03080E;
  border-bottom: 1px solid var(--hair);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1;
  color: var(--mute);
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.status-bar::-webkit-scrollbar { display: none; }
.status-dot {
  flex: 0 0 auto;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 3px rgba(166, 255, 61, .14);
}
.status-item { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; }
.status-key { color: var(--dim); letter-spacing: .06em; }
.status-val { color: var(--ice); }
.status-div { flex: 0 0 auto; width: 1px; height: 12px; background: var(--hair); }

/* ---------- 06 Header ---------- */
.site-header {
  position: fixed;
  top: var(--status-h);
  left: 0;
  bottom: 0;
  width: var(--rail-w);
  z-index: 60;
  display: flex;
  flex-direction: column;
  padding: 14px 0 18px;
  background: linear-gradient(180deg, #081421 0%, var(--ink) 62%);
  border-right: 1px solid var(--hair);
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  padding: 0 10px 16px;
  border-bottom: 1px solid var(--hair);
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  background: var(--lime);
  color: #04121C;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: -.02em;
  text-align: center;
  transition: background-color .2s ease, color .2s ease;
}
.brand:hover .brand-mark { background: var(--ice); }
.brand-text {
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: .08em;
  color: var(--dim);
  text-align: center;
}

.nav-toggle { display: none; }
.nav-toggle-bars { display: block; position: relative; width: 16px; height: 2px; background: var(--lime); }
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute; left: 0;
  width: 16px; height: 2px;
  background: var(--lime);
  transition: transform .2s ease;
}
.nav-toggle-bars::before { top: -5px; }
.nav-toggle-bars::after { top: 5px; }
.nav-toggle-text { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; }
.site-header[data-open] .nav-toggle-bars { background: transparent; }
.site-header[data-open] .nav-toggle-bars::before { transform: translateY(5px) rotate(45deg); }
.site-header[data-open] .nav-toggle-bars::after { transform: translateY(-5px) rotate(-45deg); }

.site-nav { margin-top: 12px; flex: 1 1 auto; overflow-y: auto; overflow-x: hidden; }
.nav-list { display: flex; flex-direction: column; }
.nav-list a {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 12px 12px 10px;
  min-height: 44px;
  border-left: 2px solid transparent;
  color: var(--mute);
  font-size: 12px;
  line-height: 1.35;
  letter-spacing: .01em;
  transition: color .18s ease, background-color .18s ease, border-color .18s ease;
}
.nav-num { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; opacity: .62; }
.nav-label { display: block; }
.nav-list a:hover { color: var(--ice); background: var(--raised); border-left-color: #2B5478; }
.nav-list a:hover .nav-num { opacity: 1; }
.nav-list a[aria-current="page"] {
  color: var(--lime);
  background: rgba(166, 255, 61, .07);
  border-left-color: var(--lime);
}
.nav-list a[aria-current="page"] .nav-num { color: var(--lime); opacity: 1; }

/* ---------- 07 Footer ---------- */
.site-footer {
  margin-top: 20px;
  border-top: 1px solid var(--hair);
  background: linear-gradient(180deg, #071220 0%, #03080E 100%);
  padding: 60px 0 30px;
}
.footer-grid {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--edge);
  display: grid;
  gap: 36px 40px;
  grid-template-columns: 1.5fr .9fr .9fr 1.4fr;
}
.footer-mark {
  display: inline-block;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: .02em;
  color: var(--ice);
}
.footer-mark::after {
  content: "";
  display: block;
  width: 38px; height: 3px;
  margin-top: 12px;
  background: var(--lime);
}
.footer-summary {
  margin-top: 18px;
  max-width: 30em;
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--mute);
}
.footer-note {
  margin-top: 12px;
  max-width: 30em;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.7;
  letter-spacing: .04em;
  color: var(--dim);
}
.footer-col-title {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .18em;
  color: var(--lime);
  margin-bottom: 6px;
}
.footer-links { display: flex; flex-direction: column; }
.footer-links li {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 0;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--mute);
}
.footer-links a {
  display: inline-block;
  color: var(--mute);
  border-bottom: 1px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}
.footer-links a:hover { color: var(--lime); border-bottom-color: var(--lime); }
.footer-contact .footer-links li { align-items: flex-start; }
.footer-key {
  flex: 0 0 auto;
  min-width: 34px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--dim);
  padding-top: 3px;
}
.footer-base {
  width: 100%;
  max-width: var(--max);
  margin: 44px auto 0;
  padding: 20px var(--edge) 0;
  border-top: 1px solid var(--hair);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--dim);
  letter-spacing: .04em;
}
.footer-legal { color: var(--mute); }
.footer-meta { color: var(--dim); }

/* ---------- 08 Layout ---------- */
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--edge); }
.wrap-narrow { width: 100%; max-width: 800px; margin: 0 auto; padding: 0 var(--edge); }

.chapter { padding: 68px 0; }
.chapter + .chapter { border-top: 1px solid var(--hair); }
.chapter-head {
  display: grid;
  grid-template-columns: clamp(64px, 7vw, 108px) minmax(0, 1fr);
  gap: 18px 28px;
  margin-bottom: 30px;
}
.chapter-num {
  grid-row: span 2;
  align-self: start;
  font-family: var(--mono);
  font-size: clamp(34px, 4.4vw, 58px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.04em;
  color: var(--lime);
}
.chapter-title { font-size: clamp(23px, 3vw, 36px); }
.chapter-deck {
  margin-top: 8px;
  max-width: 38em;
  font-size: 15px;
  line-height: 1.8;
  color: var(--mute);
}

.grid-2 { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-3 { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(208px, 1fr)); }

/* ---------- 09 Components ---------- */
.display {
  font-size: clamp(38px, 7vw, 84px);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -.03em;
  color: var(--ice);
}
.lede {
  max-width: 36em;
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.85;
  color: var(--body);
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .22em;
  color: var(--lime);
}
.kicker::before { content: ""; width: 24px; height: 1px; background: currentColor; opacity: .7; }

.annotation {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: .16em;
  color: var(--mute);
}
.annotation--vertical { writing-mode: vertical-rl; letter-spacing: .3em; }

.prose p { max-width: 38em; line-height: 1.85; color: var(--body); }
.prose p + p { margin-top: 15px; }
.prose h3 { margin-top: 32px; font-size: 18px; }
.prose ul { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; max-width: 38em; }
.prose li { position: relative; padding-left: 20px; line-height: 1.8; color: var(--body); }
.prose li::before {
  content: "";
  position: absolute;
  left: 0; top: .88em;
  width: 10px; height: 1px;
  background: var(--lime);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid var(--hair);
  background: var(--panel);
  color: var(--ice);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .02em;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.btn:hover { border-color: var(--lime); color: var(--lime); transform: translateY(-2px); }
.btn-primary { background: var(--lime); border-color: var(--lime); color: #04121C; }
.btn-primary:hover { background: var(--ice); border-color: var(--ice); color: #04121C; }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: rgba(166, 255, 61, .07); }

.link {
  color: var(--ice);
  border-bottom: 1px solid var(--hair);
  transition: color .18s ease, border-color .18s ease;
}
.link:hover { color: var(--lime); border-bottom-color: var(--lime); }
.link-arrow::after {
  content: "→";
  display: inline-block;
  margin-left: 6px;
  transition: transform .18s ease;
}
.link-arrow:hover::after { transform: translateX(3px); }

.card {
  background: var(--panel);
  border: 1px solid var(--hair);
  padding: 24px;
  transition: border-color .2s ease, background-color .2s ease, transform .2s ease;
}
.card:hover {
  border-color: var(--lime);
  background: var(--raised);
  transform: translateY(-2px);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid var(--hair);
  color: var(--mute);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.4;
  letter-spacing: .14em;
}
.tag-live { color: var(--lime); border-color: rgba(166, 255, 61, .45); }
.tag-warn { color: var(--warn); border-color: rgba(255, 201, 77, .45); }

.data-grid {
  display: grid;
  gap: 1px;
  background: var(--hair);
  border: 1px solid var(--hair);
}
.data-cell { background: var(--panel); padding: 20px 22px; }
.data-val {
  font-family: var(--mono);
  font-size: clamp(24px, 3.4vw, 40px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--ice);
  transition: opacity .2s ease;
}
.data-val.is-accent { color: var(--lime); }
.data-val.is-score { color: var(--orange); }
.data-lab {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: .04em;
  color: var(--mute);
}

.breadcrumbs {
  padding-top: 18px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--mute);
}
.breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.breadcrumbs li { display: inline-flex; align-items: center; }
.breadcrumbs li + li::before { content: "/"; margin-right: 8px; color: var(--hair); }
.breadcrumbs a { transition: color .18s ease; }
.breadcrumbs a:hover { color: var(--lime); }
.breadcrumbs [aria-current="page"] { color: var(--ice); }

.scroller {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 14px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--hair) transparent;
}
.scroller > * { flex: 0 0 min(320px, 78vw); scroll-snap-align: start; }
.scroller::-webkit-scrollbar { height: 6px; }
.scroller::-webkit-scrollbar-thumb { background: var(--hair); }

/* ---------- 10 Media containers ---------- */
.figure { margin: 0; }
.figure-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--hair);
  background-color: var(--panel);
  background-image:
    radial-gradient(120% 85% at 88% 12%, rgba(47, 224, 200, .16), transparent 62%),
    radial-gradient(95% 75% at 8% 92%, rgba(166, 255, 61, .12), transparent 66%),
    repeating-linear-gradient(90deg, rgba(30, 59, 87, .85) 0 1px, transparent 1px 56px),
    repeating-linear-gradient(0deg, rgba(30, 59, 87, .85) 0 1px, transparent 1px 56px);
}
.figure-frame::after {
  content: "";
  position: absolute;
  right: -14%;
  bottom: -30%;
  width: 62%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(255, 122, 41, .22);
  background: radial-gradient(circle at 35% 35%, rgba(255, 122, 41, .22), rgba(255, 122, 41, 0) 68%);
}
.figure-frame img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.figure-frame--wide { aspect-ratio: 21 / 9; }
.figure-frame--tall { aspect-ratio: 3 / 4; }
.figure-cap {
  margin-top: 10px;
  max-width: 38em;
  font-size: 12px;
  line-height: 1.7;
  color: var(--dim);
}

/* ---------- 11 JS-injected UI ---------- */
.scroll-progress {
  position: fixed;
  top: var(--status-h);
  left: 0;
  width: 100%;
  height: 2px;
  z-index: 80;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: var(--lime);
  opacity: 0;
  pointer-events: none;
  transition: transform .12s linear, opacity .2s ease;
}
.scroll-progress[data-visible="true"] { opacity: 1; }

.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 120;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  background: var(--panel);
  border: 1px solid var(--hair);
  color: var(--lime);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .22s ease, transform .22s ease, visibility .22s, border-color .2s ease, background-color .2s ease;
}
.to-top[data-visible="true"] { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { border-color: var(--lime); background: var(--raised); }

/* ---------- 12 Responsive ---------- */
@media (max-width: 1080px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-contact { grid-column: 1 / -1; }
}

@media (max-width: 899px) {
  :root { --status-h: 34px; }
  body { padding-left: 0; padding-top: calc(var(--status-h) + var(--topbar-h)); }

  .status-bar {
    gap: 12px;
    padding: 0 14px;
    font-size: 11px;
  }

  .site-header {
    top: var(--status-h);
    left: 0; right: 0; bottom: auto;
    width: auto;
    height: var(--topbar-h);
    flex-direction: row;
    align-items: center;
    padding: 0 14px;
    border-right: 0;
    border-bottom: 1px solid var(--hair);
    background: #081421;
  }
  .brand {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 0;
    border-bottom: 0;
  }
  .brand-mark { width: 34px; height: 34px; font-size: 11px; line-height: 1.02; }
  .brand-text { font-size: 12px; letter-spacing: .06em; }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-left: auto;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid var(--hair);
    color: var(--ice);
    transition: border-color .18s ease, color .18s ease;
  }
  .nav-toggle:hover { border-color: var(--lime); color: var(--lime); }

  .site-nav {
    position: fixed;
    left: 0; right: 0;
    top: calc(var(--status-h) + var(--topbar-h));
    margin-top: 0;
    max-height: 0;
    visibility: hidden;
    overflow: hidden;
    background: var(--panel);
    border-bottom: 1px solid var(--hair);
    transition: max-height .26s ease, visibility .26s ease;
  }
  .site-header[data-open] .site-nav {
    max-height: 76vh;
    overflow-y: auto;
    visibility: visible;
  }
  .nav-list a {
    flex-direction: row;
    align-items: baseline;
    gap: 14px;
    padding: 15px 18px;
    font-size: 14px;
    border-left: 0;
    border-bottom: 1px solid var(--hair);
  }
  .nav-num { font-size: 11px; min-width: 22px; }
  .nav-list a[aria-current="page"] { border-left: 0; box-shadow: inset 3px 0 0 var(--lime); }

  .chapter-head { grid-template-columns: 1fr; gap: 12px; }
  .chapter-num { grid-row: auto; }
  .chapter { padding: 52px 0; }

  .to-top { right: 14px; bottom: 14px; }
}

@media (max-width: 620px) {
  :root { --edge: 18px; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-contact { grid-column: auto; }
  .site-footer { padding-top: 44px; }
  .footer-base { justify-content: flex-start; }
}

/* ---------- 13 Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .card:hover, .btn:hover { transform: none; }
}
