/* ==========================================================================
   U体育看台 · 共享样式 /assets/site.css
   轨道导航 + 档案夹母题 + 夜场配色
   ========================================================================== */

:root {
  --night-900: #050B1A;
  --night-700: #0C1B33;
  --pitch-950: #061A12;
  --pitch-600: #14523A;
  --turf-400: #2E7D5F;
  --signal: #FFD400;
  --signal-soft: #FFE04D;
  --card-yellow: #F5B324;
  --card-red: #E23A2E;
  --chalk: #F2F5F1;
  --mist: #9FB0A6;
  --ink: #08130F;

  --line: rgba(46, 125, 95, 0.34);
  --line-soft: rgba(159, 176, 166, 0.16);

  --rail-w: 88px;
  --rail-open: 200px;
  --rail-h: 56px;
  --shell-max: 1440px;

  --font-display: "Barlow Condensed", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-num: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-body: system-ui, -apple-system, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;

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

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--night-900);
  color: var(--chalk);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
p { margin: 0 0 1rem; }
button { font: inherit; }
h1, h2, h3, h4, h5 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(40px, 7vw, 88px); }
h2 { font-size: clamp(28px, 4vw, 36px); }
h3 { font-size: clamp(18px, 2vw, 20px); }

:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }
::selection { background: var(--signal); color: var(--ink); }

.num {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.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;
}

/* ---------- skip link ---------- */
.skip-link {
  position: fixed;
  top: 10px; left: 10px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--signal);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 2px;
  transform: translateY(-180%);
  transition: transform 0.18s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- 容器与栅格 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 48px);
}
.shell--narrow { max-width: 760px; }

.grid { display: grid; gap: clamp(16px, 2.4vw, 32px); grid-template-columns: 1fr; }
.grid--4-8, .grid--3-6-3, .grid--5-7 { grid-template-columns: 1fr; }
@media (min-width: 900px) {
  .grid--4-8 { grid-template-columns: 4fr 8fr; }
  .grid--3-6-3 { grid-template-columns: 3fr 6fr 3fr; }
  .grid--5-7 { grid-template-columns: 5fr 7fr; }
}

.bleed { margin-inline: 0; }
@media (min-width: 1024px) {
  body { padding-left: var(--rail-w); }
  .bleed { margin-inline-start: calc(-1 * var(--rail-w)); }
}

/* ---------- 通用文字与按钮 ---------- */
.eyebrow {
  display: block;
  font-family: var(--font-num);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--turf-400);
  margin-bottom: 10px;
}
.rule { height: 1px; border: 0; margin: 0; background: var(--line-soft); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 2px;
  background: transparent;
  color: var(--chalk);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1;
  cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.btn--signal { background: var(--signal); color: var(--ink); }
.btn--signal:hover { background: var(--signal-soft); }
.btn--outline { border-color: var(--line); color: var(--chalk); }
.btn--outline:hover { border-color: var(--signal); color: var(--signal); }
.btn--ghost { color: var(--mist); }
.btn--ghost:hover { color: var(--chalk); }

/* ---------- 面包屑 ---------- */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--mist);
}
.crumbs__link { color: var(--mist); transition: color 0.18s var(--ease); }
.crumbs__link:hover { color: var(--signal); }
.crumbs__sep { color: var(--turf-400); }

/* ---------- 页内索引条 ---------- */
.index-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  scrollbar-width: thin;
}
.index-bar__link {
  flex: none;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--mist);
  white-space: nowrap;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease), background 0.18s var(--ease);
}
.index-bar__link:hover { color: var(--chalk); border-color: var(--turf-400); }
.index-bar__link[aria-current="true"] {
  background: var(--signal);
  border-color: var(--signal);
  color: var(--ink);
  font-weight: 700;
}

/* ---------- 档案卡与标签 ---------- */
.dossier {
  position: relative;
  padding: 26px 24px 24px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(12, 27, 51, 0.92), rgba(6, 26, 18, 0.94));
}
.dossier::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(46, 125, 95, 0.14);
  pointer-events: none;
}
.dossier__index {
  display: inline-block;
  margin-bottom: 10px;
  font-family: var(--font-num);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--turf-400);
}
.dossier__title { font-size: 20px; margin-bottom: 8px; }
.dossier__text { margin: 0; font-size: 14px; color: var(--mist); }
.dossier__meta {
  margin: 14px 0 0;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--mist);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--mist);
}
.tag--signal { color: var(--signal); border-color: rgba(255, 212, 0, 0.45); }
.tag--yellow { color: var(--card-yellow); border-color: rgba(245, 179, 36, 0.45); }
.tag--red { color: var(--card-red); border-color: rgba(226, 58, 46, 0.45); }
.tag--green { color: var(--turf-400); border-color: rgba(46, 125, 95, 0.5); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-family: var(--font-num);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--mist);
  white-space: nowrap;
}
.pill__dot { display: inline-block; width: 6px; height: 7px; border-radius: 1px; background: var(--mist); }
.pill--yellow { color: var(--card-yellow); border-color: rgba(245, 179, 36, 0.5); }
.pill--yellow .pill__dot { background: var(--card-yellow); }
.pill--red { color: var(--card-red); border-color: rgba(226, 58, 46, 0.5); }
.pill--red .pill__dot { background: var(--card-red); }

.stat { display: flex; flex-direction: column; gap: 2px; }
.stat__value {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  line-height: 1;
  color: var(--signal);
}
.stat__label { font-size: 12px; letter-spacing: 0.08em; color: var(--mist); }

/* ---------- 图片容器 ---------- */
.media {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--pitch-950);
}
.media img, .media video, .media svg { width: 100%; height: 100%; object-fit: cover; }
.media--16x9 { aspect-ratio: 16 / 9; }
.media--4x3 { aspect-ratio: 4 / 3; }
.media--1x1 { aspect-ratio: 1 / 1; }
.media--3x4 { aspect-ratio: 3 / 4; }
.media__cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 10px 12px;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--chalk);
  background: linear-gradient(0deg, rgba(5, 11, 26, 0.92), rgba(5, 11, 26, 0));
}

/* ---------- 显现协议 ---------- */
[data-reveal] { transition: opacity 0.3s var(--ease), transform 0.3s var(--ease); }
html[data-js="on"] [data-reveal] { opacity: 0; transform: translateY(12px); }
html[data-js="on"] [data-reveal].is-in { opacity: 1; transform: none; }

/* ==========================================================================
   头部：侧边轨道
   ========================================================================== */
.rail {
  position: fixed;
  inset-block: 0;
  inset-inline-start: 0;
  z-index: 90;
  width: var(--rail-w);
}
.rail__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: var(--rail-w);
  height: 100%;
  padding: 20px 12px 22px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, var(--night-900) 0%, var(--pitch-950) 62%, #04120C 100%);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  transition: width 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.rail:hover .rail__inner,
.rail:focus-within .rail__inner {
  width: var(--rail-open);
  box-shadow: 24px 0 60px rgba(5, 11, 26, 0.62);
}

/* 品牌 */
.rail__brand { display: flex; align-items: center; gap: 12px; min-height: 44px; flex: none; }
.rail__mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 2px;
  background: var(--signal);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0;
}
.rail__brand-text {
  display: flex;
  flex-direction: column;
  flex: none;
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  white-space: nowrap;
  transition: opacity 0.2s var(--ease), max-width 0.3s var(--ease);
}
.rail:hover .rail__brand-text,
.rail:focus-within .rail__brand-text { max-width: 150px; opacity: 1; }
.rail__brand-name { font-family: var(--font-display); font-size: 17px; font-weight: 700; letter-spacing: 0.02em; }
.rail__brand-note { font-size: 11px; letter-spacing: 0.08em; color: var(--mist); }

/* 看台状态 */
.rail__status {
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: none;
  margin: 0;
  padding: 12px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.rail__status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  overflow: hidden;
}
.rail__status-label {
  flex: none;
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--mist);
  white-space: nowrap;
  transition: opacity 0.2s var(--ease), max-width 0.3s var(--ease);
}
.rail:hover .rail__status-label,
.rail:focus-within .rail__status-label { max-width: 90px; opacity: 1; }
.rail__status-value { font-size: 16px; font-weight: 700; color: var(--signal); line-height: 1; }

/* 移动按钮 */
.rail__toggle {
  display: none;
  align-items: center;
  gap: 9px;
  flex: none;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  color: var(--chalk);
  font-size: 12px;
  letter-spacing: 0.08em;
  cursor: pointer;
}
.rail__toggle-box { display: grid; gap: 4px; width: 16px; }
.rail__toggle-box span { display: block; height: 1px; background: var(--chalk); transition: transform 0.2s var(--ease), opacity 0.2s var(--ease); }
.rail__toggle[aria-expanded="true"] .rail__toggle-box span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.rail__toggle[aria-expanded="true"] .rail__toggle-box span:nth-child(2) { opacity: 0; }
.rail__toggle[aria-expanded="true"] .rail__toggle-box span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }
.rail__toggle-text { white-space: nowrap; }

/* 导航 */
.rail__nav { flex: 1 1 auto; min-height: 0; }
.rail__list { display: flex; flex-direction: column; gap: 2px; }
.rail__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 8px;
  border-left: 2px solid transparent;
  color: var(--mist);
  font-size: 13px;
  letter-spacing: 0.04em;
  transition: color 0.18s var(--ease), background 0.18s var(--ease), border-color 0.18s var(--ease);
}
.rail__link:hover { color: var(--chalk); background: rgba(46, 125, 95, 0.14); }
.rail__link[aria-current="page"] {
  color: var(--signal);
  border-left-color: var(--signal);
  background: rgba(255, 212, 0, 0.07);
}
.rail__idx { flex: none; width: 18px; font-size: 11px; color: var(--turf-400); }
.rail__link[aria-current="page"] .rail__idx { color: var(--signal); }
.rail__link-text {
  flex: none;
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  white-space: nowrap;
  transition: opacity 0.2s var(--ease), max-width 0.3s var(--ease);
}
.rail:hover .rail__link-text,
.rail:focus-within .rail__link-text { max-width: 120px; opacity: 1; }

/* 快捷入口 */
.rail__utility {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: none;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}
.rail__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 8px;
  border-radius: 2px;
  background: var(--signal);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
  transition: background 0.18s var(--ease);
}
.rail__cta:hover { background: var(--signal-soft); }
.rail__cta-icon { flex: none; font-size: 10px; line-height: 1; }
.rail__cta-text {
  flex: none;
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.2s var(--ease), max-width 0.3s var(--ease);
}
.rail:hover .rail__cta-text, .rail:focus-within .rail__cta-text { max-width: 120px; opacity: 1; }
.rail__mini {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  color: var(--mist);
  font-size: 12px;
  letter-spacing: 0.06em;
  transition: color 0.18s var(--ease);
}
.rail__mini:hover { color: var(--chalk); }
.rail__mini-dot {
  flex: none;
  width: 6px; height: 6px;
  border: 1px solid var(--turf-400);
  transform: rotate(45deg);
}
.rail__mini-text {
  flex: none;
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  white-space: nowrap;
  transition: opacity 0.2s var(--ease), max-width 0.3s var(--ease);
}
.rail:hover .rail__mini-text, .rail:focus-within .rail__mini-text { max-width: 120px; opacity: 1; }

/* 阅读进度 */
.rail__progress {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 3px;
  background: rgba(46, 125, 95, 0.18);
  pointer-events: none;
}
.rail__progress-fill {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--signal);
  transform: scaleY(var(--progress, 0));
  transform-origin: top center;
  transition: transform 0.12s linear;
}

/* ---------- 移动端：轨道变顶部条 + 全屏抽屉 ---------- */
@media (max-width: 1023px) {
  .rail {
    position: sticky;
    top: 0;
    left: auto;
    width: 100%;
    height: auto;
  }
  .rail__inner {
    width: 100%;
    height: var(--rail-h);
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow: visible;
  }
  .rail:hover .rail__inner,
  .rail:focus-within .rail__inner { width: 100%; box-shadow: none; }

  .rail__brand { min-height: 0; gap: 9px; }
  .rail__mark { width: 32px; height: 32px; font-size: 19px; }
  .rail__brand-text { max-width: 160px; opacity: 1; }
  .rail__brand-name { font-size: 15px; }
  .rail__brand-note { display: none; }

  .rail__status {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin-inline-start: auto;
    padding: 0;
    border: 0;
    min-width: 0;
  }
  .rail__status-row { gap: 6px; flex-wrap: nowrap; }
  .rail__status-label { display: none; }
  .rail__status-value { font-size: 13px; }
  .pill { padding: 1px 5px; font-size: 10px; gap: 4px; }
  .pill__dot { width: 5px; height: 6px; }

  .rail__toggle { display: inline-flex; }

  .rail__nav {
    position: fixed;
    top: var(--rail-h);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 88;
    padding: 18px 18px 104px;
    background: linear-gradient(180deg, var(--night-900) 0%, var(--pitch-950) 100%);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0.22s linear;
  }
  .rail[data-open] .rail__nav,
  .rail__nav[data-open] { opacity: 1; visibility: visible; transform: none; }

  .rail__list { gap: 0; }
  .rail__link {
    padding: 14px 8px;
    border-left: 0;
    border-bottom: 1px solid var(--line-soft);
    font-size: 16px;
    color: var(--chalk);
  }
  .rail__link[aria-current="page"] { border-left: 0; background: rgba(255, 212, 0, 0.08); }
  .rail__idx { width: 24px; font-size: 12px; }
  .rail__link-text { max-width: 220px; opacity: 1; }

  .rail__utility {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 89;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 18px;
    background: var(--night-900);
    border-top: 1px solid var(--line);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0.22s linear;
  }
  .rail[data-open] .rail__utility { opacity: 1; visibility: visible; transform: none; }
  .rail__cta { flex: 1 1 140px; }
  .rail__cta-text { max-width: 120px; opacity: 1; }
  .rail__mini-text { max-width: 120px; opacity: 1; }

  .rail__progress {
    inset-block: auto;
    bottom: 0;
    width: 100%;
    height: 3px;
  }
  .rail__progress-fill { transform: scaleX(var(--progress, 0)); transform-origin: left center; }

  html.nav-open { overflow: hidden; }
}

@media (max-width: 420px) {
  .rail__status-row:last-child { display: none; }
  .rail__brand-name { font-size: 14px; }
}

/* ==========================================================================
   页脚
   ========================================================================== */
.foot {
  margin-top: 72px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, var(--pitch-950) 0%, var(--night-900) 100%);
  color: var(--mist);
}
.foot__top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px 32px;
  padding: 46px 0 26px;
  border-bottom: 1px solid var(--line-soft);
}
.foot__logo {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.4vw, 34px);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--chalk);
}
.foot__tagline { margin: 0; max-width: 46ch; font-size: 13px; color: var(--mist); }

.foot__grid {
  display: grid;
  gap: 32px 28px;
  grid-template-columns: 1fr;
  padding: 38px 0 42px;
}
@media (min-width: 640px) { .foot__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .foot__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.foot__col { min-width: 0; }
.foot__col-title {
  margin-bottom: 14px;
  font-family: var(--font-num);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--turf-400);
}
.foot__list { display: flex; flex-direction: column; gap: 9px; }
.foot__link {
  font-size: 14px;
  color: var(--mist);
  transition: color 0.18s var(--ease);
}
.foot__link:hover { color: var(--signal); }
.foot__meta { margin: 0; font-size: 13px; line-height: 1.95; color: var(--mist); word-break: break-word; }
.foot__meta b { font-weight: 500; color: var(--chalk); }

.foot__base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding: 18px 0 30px;
  border-top: 1px solid var(--line-soft);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.foot__legal { margin: 0; }
.foot__links { display: flex; flex-wrap: wrap; gap: 18px; margin: 0; }
.foot__links .foot__link { font-size: 12px; }

/* ==========================================================================
   动效降级
   ========================================================================== */
@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;
  }
  html { scroll-behavior: auto; }
  html[data-js="on"] [data-reveal] { opacity: 1 !important; transform: none !important; }
  .rail__progress-fill { transition: none; }
}
