/* ============================================================
   a8体育指南 — /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, dl, dd, fieldset {
  margin: 0;
  padding: 0;
}

ul, ol { list-style: none; }

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

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

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

table { border-collapse: collapse; }

hr { border: 0; border-top: 1px solid var(--grid-line); }

/* ---------- 2. Tokens ---------- */
:root {
  /* 色彩：近单色体系 */
  --ink-deep: #06110C;
  --night-blue: #0B1A24;
  --turf: #10241B;
  --grid-line: #1E3A2C;
  --volt: #C8FF3D;
  --amber: #F2A03D;
  --text-bright: #E8F2EA;
  --text-muted: #9DB3A6;
  --text-dim: #4C6B5A;
  --screen: #7CE0FF;

  /* 骨架尺寸 */
  --rail-w: 68px;
  --bar-h: 62px;
  --gutter: clamp(16px, 3.4vw, 40px);
  --maxw: 1440px;
  --step: 8px;

  /* 字体 */
  --f-display: "Archivo Expanded", "Archivo", "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --f-body: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --f-mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* 动效 */
  --ease: cubic-bezier(.2, .7, .3, 1);
  --t-fast: 120ms;
  --t-base: 180ms;
}

/* ---------- 3. Base ---------- */
body {
  min-height: 100vh;
  padding-left: var(--rail-w);
  padding-top: var(--bar-h);
  background-color: var(--ink-deep);
  background-image:
    linear-gradient(to right, rgba(30, 58, 44, .55) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(30, 58, 44, .55) 1px, transparent 1px);
  background-size: 96px 96px;
  color: var(--text-bright);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main { display: block; }

#main-content,
:target { scroll-margin-top: calc(var(--bar-h) + var(--step) * 2); }

/* ---------- 4. Utilities ---------- */
.shell {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.shell--narrow { max-width: 900px; }

.band {
  position: relative;
  padding-block: clamp(40px, 6.5vw, 88px);
  border-bottom: 1px solid var(--grid-line);
}

.band--night { background: var(--night-blue); }
.band--turf { background: var(--turf); }
.band--volt { border-top: 2px solid var(--volt); }

.mono {
  font-family: var(--f-mono);
  font-variant-numeric: tabular-nums;
}

.h-display {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(2.2rem, 5.4vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -.02em;
  color: var(--text-bright);
}

.h-section {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 2.6vw, 2.25rem);
  line-height: 1.14;
  letter-spacing: -.01em;
  color: var(--text-bright);
}

.prose {
  max-width: 62ch;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.75;
}

.prose p + p { margin-top: 1em; }
.prose strong { color: var(--text-bright); font-weight: 600; }

.label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.label__dot {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--volt);
}

.label--volt { color: var(--volt); }
.label--amber { color: var(--amber); }
.label--amber .label__dot { background: var(--amber); }

.band-index {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.band-index__num { color: var(--volt); }
.band-index__bar { flex: 1 1 auto; height: 1px; background: var(--grid-line); }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border: 1px solid var(--grid-line);
  background: transparent;
  color: var(--text-bright);
  font-family: var(--f-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .04em;
  transition: background-color var(--t-base) var(--ease),
              color var(--t-base) var(--ease),
              border-color var(--t-base) var(--ease);
}

.btn:hover,
.btn:focus-visible {
  background: var(--volt);
  border-color: var(--volt);
  color: var(--ink-deep);
}

.btn--solid {
  background: var(--volt);
  border-color: var(--volt);
  color: var(--ink-deep);
}

.btn--solid:hover,
.btn--solid:focus-visible {
  background: transparent;
  border-color: var(--volt);
  color: var(--volt);
}

.btn--ghost { border-color: var(--text-dim); color: var(--text-muted); }

/* 面包屑 */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--text-dim);
}

.crumbs li { display: flex; align-items: center; }
.crumbs li + li::before { content: "/"; margin: 0 8px; opacity: .55; }
.crumbs a { color: var(--text-muted); transition: color var(--t-base) var(--ease); }
.crumbs a:hover, .crumbs a:focus-visible { color: var(--volt); }
.crumbs li[aria-current="page"] { color: var(--volt); }

/* 网格 */
.grid { display: grid; gap: clamp(14px, 1.6vw, 22px); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--split { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }

/* 赛道条目 */
.track {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 24px);
  padding: 14px 16px;
  border: 1px solid var(--grid-line);
  background: var(--turf);
  transition: border-color var(--t-base) var(--ease),
              transform var(--t-base) var(--ease),
              background-color var(--t-base) var(--ease);
}

.track:hover,
.track:focus-within {
  border-color: var(--volt);
  transform: translateY(-2px);
}

.track__num {
  flex: 0 0 auto;
  min-width: 2.4em;
  font-family: var(--f-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--volt);
}

.track__title { flex: 1 1 auto; font-size: 15px; font-weight: 600; color: var(--text-bright); }

.track__meta {
  flex: 0 0 auto;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--text-dim);
}

.track__meta--amber { color: var(--amber); }

/* 图片容器基础规则 */
.media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--night-blue);
  border: 1px solid var(--grid-line);
}

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

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(158deg, rgba(124, 224, 255, .09) 0%, rgba(124, 224, 255, 0) 52%);
  pointer-events: none;
}

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

.media__cap {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 1;
  padding: 6px 10px;
  border-top: 1px solid var(--grid-line);
  border-right: 1px solid var(--grid-line);
  background: rgba(6, 17, 12, .86);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--text-muted);
}

/* ---------- 5. Header ---------- */
.skip-link {
  position: fixed;
  top: 8px;
  left: calc(var(--rail-w) + 8px);
  z-index: 200;
  padding: 10px 16px;
  border: 1px solid var(--volt);
  background: var(--volt);
  color: var(--ink-deep);
  font-size: 14px;
  font-weight: 700;
  transform: translateY(-200%);
  transition: transform var(--t-base) var(--ease);
}

.skip-link:focus { transform: translateY(0); }

/* 顶部路径条 */
.path-bar {
  position: fixed;
  top: 0;
  left: var(--rail-w);
  right: 0;
  z-index: 60;
  height: var(--bar-h);
  background: rgba(6, 17, 12, .94);
  border-bottom: 1px solid var(--grid-line);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: height var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
}

.path-bar__inner {
  display: flex;
  align-items: center;
  gap: clamp(10px, 1.6vw, 24px);
  width: 100%;
  max-width: var(--maxw);
  height: 100%;
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.path-bar__progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 2px;
  background: var(--volt);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 100ms linear;
}

.site-header[data-compact] .path-bar {
  height: calc(var(--bar-h) - 10px);
  border-bottom-color: var(--volt);
}

/* 品牌 */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  height: 100%;
  padding-right: clamp(10px, 1.6vw, 22px);
  border-right: 1px solid var(--grid-line);
}

.brand__mark {
  display: inline-block;
  padding: 4px 7px;
  background: var(--volt);
  color: var(--ink-deep);
  font-family: var(--f-mono);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .06em;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand__name {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: .01em;
  color: var(--text-bright);
}

.brand__line {
  font-size: 11px;
  letter-spacing: .06em;
  color: var(--text-muted);
}

/* 一级导航 */
.path-nav { flex: 1 1 auto; min-width: 0; }

.path-nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
  counter-reset: navc;
}

.path-nav__list a {
  position: relative;
  display: block;
  padding: 8px 12px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .04em;
  white-space: nowrap;
  transition: color var(--t-base) var(--ease);
}

.path-nav__list a::before {
  counter-increment: navc;
  content: counter(navc, decimal-leading-zero);
  margin-right: 6px;
  font-family: var(--f-mono);
  font-size: 10px;
  color: var(--text-dim);
  transition: color var(--t-base) var(--ease);
}

.path-nav__list a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 1px;
  background: var(--volt);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--t-base) var(--ease);
}

.path-nav__list a:hover,
.path-nav__list a:focus-visible { color: var(--text-bright); }

.path-nav__list a:hover::after,
.path-nav__list a:focus-visible::after { transform: scaleX(1); }

.path-nav__list a[aria-current="page"] { color: var(--volt); }
.path-nav__list a[aria-current="page"]::before { color: var(--volt); }
.path-nav__list a[aria-current="page"]::after { transform: scaleX(1); }

/* 辅助区 */
.path-bar__aux {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  margin-left: auto;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid var(--grid-line);
  color: var(--text-muted);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  transition: border-color var(--t-base) var(--ease),
              color var(--t-base) var(--ease),
              background-color var(--t-base) var(--ease);
}

.chip:hover,
.chip:focus-visible {
  border-color: var(--volt);
  color: var(--volt);
}

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--grid-line);
  color: var(--text-bright);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .12em;
  transition: border-color var(--t-base) var(--ease), color var(--t-base) var(--ease);
}

.nav-toggle:hover,
.nav-toggle:focus-visible { border-color: var(--volt); color: var(--volt); }

.nav-toggle__bars {
  display: grid;
  gap: 3px;
  width: 16px;
}

.nav-toggle__bars span {
  display: block;
  height: 1px;
  background: currentColor;
  transition: transform var(--t-base) var(--ease), opacity var(--t-base) var(--ease);
}

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

/* 左缘竖排索引 */
.site-rail {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: var(--rail-w);
  padding: calc(var(--bar-h) + 18px) 0 18px;
  background: var(--night-blue);
  border-right: 1px solid var(--grid-line);
}

.site-rail__list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.rail-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid transparent;
  color: var(--text-dim);
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  transition: color var(--t-base) var(--ease),
              border-color var(--t-base) var(--ease),
              background-color var(--t-base) var(--ease);
}

.rail-link:hover,
.rail-link:focus-visible {
  color: var(--volt);
  border-color: var(--grid-line);
}

.rail-link[aria-current="page"] {
  background: var(--volt);
  border-color: var(--volt);
  color: var(--ink-deep);
}

.rail-link__label {
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  z-index: 5;
  padding: 6px 10px;
  border: 1px solid var(--grid-line);
  background: var(--turf);
  color: var(--text-bright);
  font-family: var(--f-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .04em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-6px, -50%);
  transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}

.rail-link:hover .rail-link__label,
.rail-link:focus-visible .rail-link__label {
  opacity: 1;
  transform: translate(0, -50%);
}

.site-rail__tag {
  margin-top: auto;
  padding-bottom: 4px;
  writing-mode: vertical-rl;
  color: var(--text-dim);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .34em;
}

/* ---------- 6. Footer ---------- */
.site-footer {
  border-top: 2px solid var(--volt);
  background: var(--night-blue);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(200px, 1.5fr) repeat(3, minmax(140px, 1fr));
  gap: clamp(24px, 3vw, 48px);
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) var(--gutter) clamp(28px, 4vw, 48px);
  border-bottom: 1px solid var(--grid-line);
}

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

.footer-brand .brand__mark { align-self: flex-start; }

.footer-brand__name {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -.01em;
  color: var(--text-bright);
}

.footer-brand__line {
  font-size: 13px;
  letter-spacing: .06em;
  color: var(--text-muted);
}

.footer-col__title {
  display: block;
  margin-bottom: 16px;
  color: var(--text-dim);
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.footer-col ul { display: grid; gap: 10px; }

.footer-col a {
  position: relative;
  display: inline-block;
  color: var(--text-muted);
  font-size: 14px;
  transition: color var(--t-base) var(--ease);
}

.footer-col a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--volt);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--t-base) var(--ease);
}

.footer-col a:hover,
.footer-col a:focus-visible { color: var(--volt); }

.footer-col a:hover::after,
.footer-col a:focus-visible::after { transform: scaleX(1); }

.footer-col__value {
  display: block;
  color: var(--text-muted);
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: .02em;
  word-break: break-all;
}

.footer-col__note {
  display: block;
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.6;
}

.site-footer__base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 28px;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 20px var(--gutter) 34px;
  color: var(--text-dim);
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .04em;
}

.footer-legal { display: inline-flex; align-items: center; gap: 8px; }

.footer-legal a {
  color: var(--text-muted);
  transition: color var(--t-base) var(--ease);
}

.footer-legal a:hover,
.footer-legal a:focus-visible { color: var(--volt); }

.footer-meta { color: var(--text-dim); }

/* ---------- 7. Focus ---------- */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible {
  outline: 2px solid var(--volt);
  outline-offset: 2px;
}

/* ---------- 8. Responsive ---------- */
@media (max-width: 1199px) {
  .brand__line { display: none; }
  .path-nav__list a { padding: 8px 10px; font-size: 13px; }
  .path-nav__list a::after { left: 10px; right: 10px; }
}

@media (max-width: 1023px) {
  :root { --rail-w: 0px; }

  .site-rail { display: none; }
  .path-bar { left: 0; }

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

  .path-nav {
    position: fixed;
    top: var(--bar-h);
    left: 0;
    right: 0;
    max-height: calc(100vh - var(--bar-h));
    overflow-y: auto;
    padding: 6px var(--gutter) 22px;
    background: var(--ink-deep);
    border-bottom: 2px solid var(--volt);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity var(--t-base) var(--ease),
                transform var(--t-base) var(--ease),
                visibility var(--t-base) linear;
  }

  .site-header[data-open] .path-nav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }

  .path-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .path-nav__list li { border-bottom: 1px solid var(--grid-line); }
  .path-nav__list li:last-child { border-bottom: 0; }
  .path-nav__list a { padding: 14px 2px; font-size: 15px; }
  .path-nav__list a::before { margin-right: 10px; font-size: 11px; }
  .path-nav__list a::after { display: none; }

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

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

@media (max-width: 639px) {
  :root { --bar-h: 58px; --gutter: 16px; }

  body { font-size: 15px; background-size: 64px 64px; }

  .brand { gap: 8px; padding-right: 10px; }
  .brand__name { font-size: 14px; }
  .chip { display: none; }

  .path-bar__aux { gap: 8px; }

  .grid--2,
  .grid--3,
  .grid--4,
  .grid--split { grid-template-columns: minmax(0, 1fr); }

  .track { flex-wrap: wrap; gap: 6px 12px; }
  .track__title { flex: 1 1 100%; order: 3; }

  .site-footer__grid { grid-template-columns: minmax(0, 1fr); }
  .site-footer__base { font-size: 11px; gap: 8px 18px; }
}

@media (max-width: 399px) {
  .brand__text { display: none; }
}

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