/* =========================================================
   完美体育 / REFRESH COURT — 共享样式 /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, h5, h6, p, ul, ol, li, figure, figcaption, blockquote, dl, dd, hr { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; }
table { border-collapse: collapse; width: 100%; }
:focus-visible { outline: 2px solid var(--volt); outline-offset: 2px; }
:target { scroll-margin-top: calc(var(--header-h) + 16px); }

/* ---------- 2. Tokens ---------- */
:root {
  --ink-900: #0B0D0E;
  --ink-850: #0E1315;
  --ink-800: #12171A;
  --ink-700: #1C2428;
  --ink-600: #2A3439;
  --muted: #8C9995;
  --chalk: #F2F5F3;
  --turf: #00A86B;
  --neon: #D4FF3F;
  --volt: #0066FF;
  --warn: #FF6B4A;
  --neon-soft: #E8FFB0;

  --font-display: "Oswald", "Archivo Narrow", "Arial Narrow", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;

  --shell: 1280px;
  --gutter: clamp(16px, 3.2vw, 40px);
  --header-h: 112px;

  --line: 1px solid var(--ink-700);
  --line-soft: 1px solid rgba(242, 245, 243, .08);
  --dur: .24s;
  --ease: cubic-bezier(.2, .7, .3, 1);
}

/* ---------- 3. 基础排版 ---------- */
body {
  min-height: 100vh;
  background-color: var(--ink-900);
  background-image: repeating-linear-gradient(115deg, rgba(0, 168, 107, .045) 0 2px, transparent 2px 46px);
  color: var(--chalk);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -.02em;
}
h1 { font-size: clamp(30px, 5.2vw, 54px); }
h2 { font-size: clamp(24px, 3.2vw, 32px); }
h3 { font-size: clamp(18px, 2vw, 20px); line-height: 1.35; }
p { max-width: 68ch; }
strong { color: var(--neon); font-weight: 600; }
::selection { background: var(--neon); color: var(--ink-900); }

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- 4. 布局 ---------- */
.shell {
  width: min(100% - (var(--gutter) * 2), var(--shell));
  margin-inline: auto;
}
#main-content { padding-top: var(--header-h); }
#main-content.main--overlay { padding-top: 0; }

.grid-editorial {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
}
.col-index { grid-column: 1 / 4; }
.col-content { grid-column: 4 / 13; }
.col-wide { grid-column: 1 / 13; }

.section { padding-block: clamp(34px, 5.5vw, 68px); border-top: var(--line); }
.section__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; margin-bottom: 20px; }
.section__index {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .2em;
  color: var(--neon);
}
.section__title { font-size: clamp(24px, 3.2vw, 32px); }
.section__lede { flex: 1 1 320px; color: var(--muted); font-size: 15px; }

.prose { max-width: 68ch; font-size: 17px; line-height: 1.75; color: #D8E0DC; }
.prose p + p { margin-top: 1.05em; }
.prose h3 { margin-top: 1.7em; margin-bottom: .5em; color: var(--chalk); }
.prose a { color: var(--neon); text-decoration: none; border-bottom: 1px solid rgba(212, 255, 63, .38); }
.prose a:hover { border-bottom-color: var(--neon); }

.note-margin {
  border-left: 2px solid var(--turf);
  padding: 4px 0 4px 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}
.note-margin p { max-width: none; }

/* ---------- 5. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 300;
  transform: translateY(-180%);
  padding: 10px 16px;
  background: var(--neon);
  border: 1px solid var(--neon);
  color: var(--ink-900);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-decoration: none;
  transition: transform var(--dur) var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- 6. 头部 ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 80;
  background: linear-gradient(180deg, rgba(11, 13, 14, .94) 0%, rgba(11, 13, 14, .62) 62%, rgba(11, 13, 14, 0) 100%);
  border-bottom: 1px solid transparent;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.site-header[data-state="solid"] {
  background: rgba(9, 11, 12, .95);
  border-bottom-color: var(--ink-700);
}
.site-header[data-state="solid"] .header-deck { border-top-color: var(--ink-700); }

.header-rail__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-block: 13px;
}

.brand {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  flex: 0 0 auto;
  padding-left: 14px;
  line-height: 1;
  text-decoration: none;
}
.brand::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 6px;
  height: calc(100% - 6px);
  background: var(--turf);
}
.brand__mark {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: .02em;
  color: var(--chalk);
  transition: color var(--dur) var(--ease);
}
.brand__sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .3em;
  color: var(--muted);
}
.brand:hover .brand__mark { color: var(--neon); }
.brand--lg .brand__mark { font-size: 27px; }
.brand--lg .brand__sub { font-size: 11px; }

.header-tagline {
  flex: 1 1 auto;
  max-width: none;
  margin-left: 4px;
  padding-left: 18px;
  border-left: 1px solid var(--ink-700);
  color: var(--muted);
  font-size: 13px;
  letter-spacing: .04em;
}

.site-nav { flex: 0 0 auto; }
.site-nav__list { display: flex; align-items: center; gap: 2px; }
.nav-link {
  display: block;
  padding: 8px 12px;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.nav-link:hover {
  color: var(--chalk);
  border-color: var(--ink-700);
  background: var(--ink-800);
}
.nav-link[aria-current="page"] {
  background: var(--neon-soft);
  border-color: var(--neon);
  color: var(--ink-900);
  font-weight: 600;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  margin-left: auto;
  border: 1px solid var(--ink-700);
  color: var(--chalk);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
}
.nav-toggle:hover { border-color: var(--neon); color: var(--neon); }
.nav-toggle__bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
}
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

.header-deck {
  border-top: 1px solid rgba(242, 245, 243, .07);
  transition: border-color var(--dur) var(--ease);
}
.header-deck__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-block: 7px;
}
.league-strip {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.league-strip::-webkit-scrollbar { display: none; }
.league-chip {
  flex: 0 0 auto;
  scroll-snap-align: start;
  padding: 6px 12px;
  border: 1px solid var(--ink-700);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  white-space: nowrap;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.league-chip:hover { color: var(--chalk); border-color: var(--turf); }
.league-chip[aria-pressed="true"] {
  background: var(--neon-soft);
  border-color: var(--neon);
  color: var(--ink-900);
  font-weight: 700;
}

.header-tools { display: flex; flex: 0 0 auto; align-items: center; gap: 14px; }
.tool-link {
  position: relative;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: .04em;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--dur) var(--ease);
}
.tool-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--neon);
  transition: width var(--dur) var(--ease);
}
.tool-link:hover { color: var(--neon); }
.tool-link:hover::after { width: 100%; }
.tool-link--fav { display: inline-flex; align-items: center; gap: 7px; }
.tool-link__dot {
  width: 7px;
  height: 7px;
  border: 1px solid var(--ink-600);
  background: transparent;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.tool-link--fav[aria-pressed="true"] { color: var(--neon); }
.tool-link--fav[aria-pressed="true"] .tool-link__dot { background: var(--neon); border-color: var(--neon); }
.tool-flag {
  padding: 2px 7px;
  border: 1px solid var(--turf);
  color: var(--turf);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  white-space: nowrap;
}
.tool-flag[hidden] { display: none; }

.scroll-meter {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  pointer-events: none;
}
.scroll-meter__bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--turf), var(--neon));
  transition: width .12s linear;
}

/* ---------- 7. 页脚 ---------- */
.site-footer {
  margin-top: clamp(40px, 7vw, 90px);
  background: #090B0C;
  border-top: 1px solid var(--ink-700);
}
.footer-hem {
  height: 6px;
  background-image: repeating-linear-gradient(115deg, var(--turf) 0 14px, transparent 14px 30px);
  opacity: .5;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.6fr repeat(4, minmax(0, 1fr));
  gap: clamp(22px, 2.6vw, 38px);
  padding-block: clamp(30px, 4vw, 52px);
}
.footer-brand { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.footer-line { margin-top: 4px; max-width: 30ch; color: var(--chalk); font-size: 15px; }
.footer-meta { max-width: 34ch; color: var(--muted); font-size: 13px; font-family: var(--font-mono); line-height: 1.7; }

.footer-title {
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--ink-700);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.footer-list { display: flex; flex-direction: column; gap: 8px; }
.footer-list a {
  color: #CDD6D2;
  font-size: 14px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.footer-list a:hover { color: var(--neon); border-bottom-color: var(--neon); }
.footer-list--plain li { color: var(--muted); font-size: 14px; }
.footer-list--plain li::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 8px;
  background: var(--ink-600);
  vertical-align: middle;
}
.footer-note {
  margin-top: 14px;
  max-width: none;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.8;
  word-break: break-all;
}
.footer-base {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  padding-block: 18px 26px;
  border-top: 1px solid var(--ink-700);
}
.footer-contact { max-width: none; color: var(--muted); font-size: 13px; }
.footer-legal {
  max-width: none;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
}

/* ---------- 8. 通用组件 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid var(--ink-600);
  background: transparent;
  color: var(--chalk);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .08em;
  text-decoration: none;
  cursor: pointer;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease), background-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn:hover { border-color: var(--neon); color: var(--neon); transform: translateY(-2px); }
.btn--neon { background: var(--neon); border-color: var(--neon); color: var(--ink-900); font-weight: 700; }
.btn--neon:hover { background: var(--neon-soft); border-color: var(--neon-soft); color: var(--ink-900); }
.btn--ghost { border-color: var(--turf); color: var(--turf); }
.btn--ghost:hover { border-color: var(--turf); background: rgba(0, 168, 107, .14); color: var(--chalk); }
.btn--block { width: 100%; justify-content: center; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid var(--ink-600);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.tag--neon { background: var(--neon-soft); border-color: var(--neon); color: var(--ink-900); font-weight: 700; }
.tag--turf { border-color: var(--turf); color: var(--turf); }
.tag--warn { border-color: var(--warn); color: var(--warn); }

.panel {
  position: relative;
  padding: 18px 20px 20px;
  border: var(--line);
  background: var(--ink-800);
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.panel:hover { border-color: var(--neon); transform: translateY(-2px); }
.panel__label {
  position: absolute;
  top: -1px;
  right: -1px;
  padding: 2px 8px;
  background: var(--ink-700);
  color: var(--neon);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.panel:hover .panel__label { background: var(--neon); color: var(--ink-900); }
.panel__title { font-size: 19px; }
.panel__body { margin-top: 10px; color: var(--muted); font-size: 15px; }

.breadcrumb { border-bottom: var(--line); background: var(--ink-850); }
.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-block: 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
}
.breadcrumb__link { color: var(--muted); text-decoration: none; transition: color var(--dur) var(--ease); }
.breadcrumb__link:hover { color: var(--neon); }
.breadcrumb__sep { color: var(--ink-600); }
.breadcrumb__current { color: var(--chalk); }

.data-band {
  width: 100%;
  padding-block: clamp(22px, 4vw, 38px);
  border-top: var(--line);
  border-bottom: var(--line);
  background: var(--ink-850);
}
.data-band__inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 18px;
  width: min(100% - (var(--gutter) * 2), var(--shell));
  margin-inline: auto;
}
.data-band__scale {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed var(--ink-600);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.timeline { position: relative; padding-left: 22px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--ink-700);
}
.timeline__item { position: relative; padding-bottom: 22px; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__node {
  position: absolute;
  left: -22px;
  top: 7px;
  width: 11px;
  height: 11px;
  border: 2px solid var(--turf);
  background: var(--ink-900);
}
.timeline__label {
  display: block;
  color: var(--neon);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.timeline__body { margin-top: 4px; color: var(--muted); font-size: 15px; }

.figure { margin: 0; border: var(--line); background: var(--ink-800); }
.figure__frame {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: var(--ink-850);
  background-image:
    linear-gradient(180deg, rgba(0, 168, 107, .18) 0%, rgba(11, 13, 14, .92) 100%),
    repeating-linear-gradient(90deg, rgba(242, 245, 243, .055) 0 1px, transparent 1px 46px),
    repeating-linear-gradient(0deg, rgba(242, 245, 243, .055) 0 1px, transparent 1px 46px);
}
.figure__frame > img,
.figure__frame > svg { width: 100%; height: 100%; object-fit: cover; }
.figure__cap {
  padding: 10px 14px;
  border-top: var(--line);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: .02em;
}
.figure--wide { grid-column: 1 / 13; }
.figure--tall .figure__frame { aspect-ratio: 3 / 4; }

/* ---------- 9. 进入视口 ---------- */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
html.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- 10. 响应式 ---------- */
@media (max-width: 1180px) {
  .header-tagline { display: none; }
}

@media (max-width: 1024px) {
  .col-index, .col-content, .col-wide { grid-column: 1 / 13; }
  .index-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
  .index-strip::-webkit-scrollbar { display: none; }
  .footer-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  :root { --header-h: 108px; }
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    z-index: 79;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    padding: 10px var(--gutter) 20px;
    border-top: 1px solid var(--ink-700);
    border-bottom: 1px solid var(--ink-700);
    background: var(--ink-850);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .18s var(--ease), transform .18s var(--ease), visibility .18s linear;
  }
  .site-nav[data-open] { opacity: 1; visibility: visible; transform: none; }
  .site-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-link { padding: 13px 10px; border: 0; border-bottom: 1px solid var(--ink-700); font-size: 16px; }
  .nav-link:hover { background: transparent; border-color: var(--ink-700); color: var(--neon); }
  .nav-link[aria-current="page"] { border-bottom-color: var(--neon); }
  .header-deck__inner { padding-block: 6px; }
  .footer-base { flex-direction: column; }
}

@media (max-width: 680px) {
  .header-tools { gap: 10px; }
  .tool-link { font-size: 12px; }
  .brand__mark { font-size: 19px; }
  .brand__sub { font-size: 9px; letter-spacing: .24em; }
  .figure__frame { aspect-ratio: 4 / 3; }
}

@media (max-width: 620px) {
  .footer-inner { grid-template-columns: minmax(0, 1fr); }
  .footer-contact, .footer-legal { font-size: 12px; }
}

@media (max-width: 400px) {
  :root { --header-h: 104px; }
  .header-tools .tool-link:not(.tool-link--fav) { display: none; }
}

/* ---------- 11. 动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  html.js [data-reveal] { opacity: 1; transform: none; }
}
