/* ============================================================
   冠竞体育 · 共享样式表 /assets/site.css
   夜灯数据仪表盘：深墨绿底 + 暖灰纸面 + 荧光橙时间语义 + 电光青核验语义
   ============================================================ */

/* ---------- 1. Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure, figcaption, blockquote, dl, dt, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
table { border-collapse: collapse; width: 100%; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

/* ---------- 2. Tokens ---------- */
:root {
  --ink: #0B1A15;
  --coal: #141C19;
  --moss: #1E4238;
  --stone: #6E7A74;
  --paper: #E8E3D9;
  --cream: #F7F3EA;
  --orange: #FF6A18;
  --cyan: #22E0CE;
  --clay: #B4552F;
  --amber: #E3A62B;

  --line: rgba(110, 122, 116, 0.34);
  --line-soft: rgba(110, 122, 116, 0.2);

  --font-sans: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, "Courier New", monospace;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  --shell: 1240px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 72px;
}

/* ---------- 3. Base ---------- */
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 112px;
}
body {
  min-height: 100vh;
  background: var(--ink);
  color: rgba(247, 243, 234, 0.86);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(120% 70% at 88% -10%, rgba(30, 66, 56, 0.55), transparent 58%),
    radial-gradient(90% 60% at 4% 8%, rgba(180, 85, 47, 0.14), transparent 60%);
}
h1, h2, h3, h4 { color: var(--cream); font-weight: 600; line-height: 1.25; letter-spacing: -0.4px; }
strong { color: var(--cream); font-weight: 600; }
::selection { background: var(--orange); color: #141C19; }
hr { border: 0; border-top: 1px dashed var(--line); margin: 32px 0; }

/* ---------- 4. Utilities ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; }
.idx {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  color: var(--stone);
}
.score {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--orange);
}
.divider { height: 1px; background: repeating-linear-gradient(90deg, var(--line) 0 10px, transparent 10px 20px); border: 0; }

/* ---------- 5. Skip link ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 12px;
  z-index: 2000;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  background: var(--orange);
  color: #141C19;
  font-size: 14px;
  font-weight: 700;
  transform: translateY(-180%);
  transition: transform 0.2s ease;
}
.skip-link:focus { transform: translateY(0); }

/* ---------- 6. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  padding: 12px var(--gutter) 14px;
  pointer-events: none;
}
.header-shell {
  position: relative;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 8px 8px 8px 14px;
  background: rgba(20, 28, 25, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  backdrop-filter: blur(10px);
  transition: padding 0.22s ease, background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.site-header[data-compact="true"] .header-shell {
  padding-block: 4px;
  background: rgba(20, 28, 25, 0.97);
  border-color: rgba(110, 122, 116, 0.5);
  box-shadow: 0 18px 44px -26px rgba(0, 0, 0, 0.95);
}

/* 品牌 */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  min-width: 0;
}
.brand-mark {
  position: relative;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: conic-gradient(from 210deg, var(--orange), var(--cyan) 52%, var(--moss) 100%);
  box-shadow: inset 0 0 0 1px rgba(247, 243, 234, 0.22);
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: var(--coal);
  box-shadow: inset 0 0 0 2px rgba(255, 106, 24, 0.9);
}
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name {
  color: var(--cream);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1.2;
  white-space: nowrap;
}
.brand-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--stone);
  line-height: 1.3;
  white-space: nowrap;
}
.brand:hover .brand-mark { box-shadow: inset 0 0 0 1px rgba(34, 224, 206, 0.7); }

/* 导航胶囊 */
.nav-pill { display: none; }
.nav-list { display: flex; align-items: center; gap: 2px; }
.nav-list a {
  display: block;
  padding: 9px 14px;
  border-radius: var(--r-pill);
  font-size: 14px;
  line-height: 1.4;
  color: rgba(247, 243, 234, 0.76);
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease;
}
.nav-list a:hover { color: var(--cream); background: rgba(232, 227, 217, 0.09); }
.nav-list a[aria-current="page"] {
  background: var(--orange);
  color: #141C19;
  font-weight: 700;
}

/* CTA */
.cta-pill {
  display: none;
  align-items: center;
  flex: none;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  background: linear-gradient(120deg, var(--orange), #FF8B4A);
  color: #141C19;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: nowrap;
  border: 1px solid rgba(255, 106, 24, 0.5);
  transition: transform 0.18s ease, filter 0.18s ease;
}
.cta-pill:hover { filter: brightness(1.08); transform: translateY(-1px); }

/* 汉堡 */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  margin-inline-start: auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  transition: border-color 0.18s ease, background 0.18s ease;
}
.nav-toggle:hover { border-color: var(--cyan); background: rgba(34, 224, 206, 0.1); }
.nav-toggle-bars { position: relative; display: block; width: 16px; height: 12px; }
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--cream);
  transition: top 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.nav-toggle-bars::before { top: 1px; }
.nav-toggle-bars::after { top: 9px; }
.site-header[data-open="true"] .nav-toggle-bars::before { top: 5px; transform: rotate(45deg); background: var(--orange); }
.site-header[data-open="true"] .nav-toggle-bars::after { top: 5px; transform: rotate(-45deg); background: var(--orange); }

/* 回到顶部 */
.to-top {
  position: fixed;
  right: var(--gutter);
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 950;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  background: rgba(20, 28, 25, 0.95);
  border: 1px solid rgba(34, 224, 206, 0.45);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  pointer-events: auto;
  backdrop-filter: blur(8px);
  transition: background 0.18s ease, transform 0.18s ease;
}
.to-top[hidden] { display: none; }
.to-top:hover { background: rgba(34, 224, 206, 0.14); transform: translateY(-2px); }
.to-top-arrow { font-size: 13px; line-height: 1; }

/* 移动端下拉面板 */
@media (max-width: 1023px) {
  .nav-pill {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: none;
    padding: 8px;
    background: rgba(20, 28, 25, 0.985);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.95);
    max-height: min(62vh, 420px);
    overflow-y: auto;
  }
  .site-header[data-open="true"] .nav-pill {
    display: block;
    animation: pill-in 0.18s ease-out;
  }
  .nav-list { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-list a { padding: 13px 16px; border-radius: var(--r-md); font-size: 15px; }
  .nav-list a[aria-current="page"] { border-radius: var(--r-md); }
}
@keyframes pill-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 460px) {
  .brand-sub { display: none; }
  .header-shell { padding-left: 12px; }
}

@media (min-width: 1024px) {
  .site-header { padding-top: 16px; }
  .header-shell { gap: 18px; padding: 9px 10px 9px 18px; }
  .nav-pill { display: block; margin-inline-start: auto; }
  .nav-list a { font-size: 14px; }
  .cta-pill { display: inline-flex; }
  .nav-toggle { display: none; }
}

/* ---------- 7. Footer ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: 80px;
  background:
    radial-gradient(120% 90% at 88% 0%, rgba(30, 66, 56, 0.6), transparent 58%),
    var(--ink);
  border-top: 1px solid var(--line-soft);
  color: rgba(247, 243, 234, 0.78);
}
.footer-shell {
  max-width: var(--shell);
  margin-inline: auto;
  padding: 44px var(--gutter) 26px;
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 24px;
  border-bottom: 1px dashed var(--line);
}
.brand--footer { align-items: center; }
.footer-note {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  line-height: 1.8;
  color: var(--stone);
  max-width: 44ch;
}
.footer-cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 22px 0 26px;
}
.footer-col { border-bottom: 1px dashed var(--line-soft); padding-block: 6px 12px; }
.footer-col:last-child { border-bottom: 0; }
.footer-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.footer-heading {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--cream);
  text-transform: uppercase;
}
.footer-col-body { padding-top: 10px; }
.footer-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
}
.footer-toggle-icon { position: relative; display: block; width: 14px; height: 14px; }
.footer-toggle-icon::before,
.footer-toggle-icon::after {
  content: "";
  position: absolute;
  background: var(--stone);
  border-radius: 1px;
  transition: transform 0.2s ease, background 0.2s ease;
}
.footer-toggle-icon::before { top: 6px; left: 0; width: 14px; height: 2px; }
.footer-toggle-icon::after { top: 0; left: 6px; width: 2px; height: 14px; }
.footer-toggle[aria-expanded="true"] .footer-toggle-icon::before { background: var(--cyan); }
.footer-toggle[aria-expanded="true"] .footer-toggle-icon::after { transform: scaleY(0); }

.footer-list { display: flex; flex-direction: column; gap: 8px; }
.footer-list a {
  font-size: 14px;
  color: rgba(247, 243, 234, 0.78);
  border-bottom: 1px solid transparent;
  transition: color 0.16s ease, border-color 0.16s ease;
}
.footer-list a:hover { color: var(--cyan); border-bottom-color: rgba(34, 224, 206, 0.5); }
.footer-list--plain li { font-size: 14px; color: rgba(247, 243, 234, 0.72); }
.footer-mono {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.05em;
  color: var(--paper) !important;
  word-break: break-all;
}
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}
.footer-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12.5px;
  color: var(--stone);
}
.footer-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--clay);
  display: inline-block;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; font-size: 13px; }
.footer-links a { color: var(--stone); transition: color 0.16s ease; }
.footer-links a:hover { color: var(--cyan); }

@media (max-width: 759px) {
  .footer-toggle { display: inline-flex; }
  .footer-col-body[hidden] { display: none; }
}
@media (min-width: 760px) {
  .footer-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
  .footer-col { border-bottom: 0; padding-block: 0; }
  .footer-col-body[hidden] { display: block; }
}

/* ---------- 8. Generic page furniture ---------- */
.section { padding-block: 44px; }
.section:first-child { padding-top: 8px; }
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 16px;
  margin-bottom: 20px;
}
.section-title {
  font-size: clamp(22px, 3.2vw, 32px);
  font-weight: 600;
  letter-spacing: -0.5px;
  color: var(--cream);
}
.section-kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--orange);
}

.prose { max-width: 38em; color: rgba(247, 243, 234, 0.82); font-size: 15.5px; line-height: 1.8; }
.prose p + p { margin-top: 1em; }
.prose a { color: var(--cyan); border-bottom: 1px solid rgba(34, 224, 206, 0.4); }
.prose a:hover { border-bottom-color: var(--cyan); }
.prose h2 { margin-top: 1.6em; font-size: 22px; }
.prose h3 { margin-top: 1.4em; font-size: 18px; }

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--stone);
  margin-bottom: 18px;
}
.breadcrumb li { display: inline-flex; align-items: center; }
.breadcrumb li::after { content: "/"; margin-inline-start: 8px; color: rgba(110, 122, 116, 0.6); }
.breadcrumb li:last-child::after { content: ""; }
.breadcrumb a { color: var(--stone); transition: color 0.16s ease; }
.breadcrumb a:hover { color: var(--cyan); }
.breadcrumb [aria-current="page"] { color: var(--paper); }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  border: 1px solid transparent;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--orange); color: #141C19; }
.btn--primary:hover { background: #FF8546; }
.btn--ghost { border-color: var(--line); color: var(--cream); }
.btn--ghost:hover { border-color: var(--cyan); color: var(--cyan); background: rgba(34, 224, 206, 0.08); }
.btn--quiet { background: rgba(232, 227, 217, 0.08); color: var(--cream); }
.btn--quiet:hover { background: rgba(232, 227, 217, 0.15); }

/* 标签与徽章 */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  line-height: 1.6;
  border: 1px solid transparent;
}
.tag--clay { background: var(--clay); color: var(--cream); border-color: rgba(247, 243, 234, 0.18); }
.tag--cyan { background: rgba(34, 224, 206, 0.14); color: var(--cyan); border-color: rgba(34, 224, 206, 0.42); }
.tag--amber { background: rgba(227, 166, 43, 0.14); color: var(--amber); border-color: rgba(227, 166, 43, 0.42); }
.tag--orange { background: rgba(255, 106, 24, 0.16); color: var(--orange); border-color: rgba(255, 106, 24, 0.45); }

/* 读数窗口：顶部与底部刻度 */
.tick-frame {
  position: relative;
  padding: 26px 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background:
    linear-gradient(180deg, rgba(30, 66, 56, 0.38), rgba(20, 28, 25, 0) 62%),
    var(--coal);
}
.tick-frame::before,
.tick-frame::after {
  content: "";
  position: absolute;
  left: 26px;
  right: 26px;
  height: 7px;
  background-image: repeating-linear-gradient(90deg, rgba(110, 122, 116, 0.62) 0 1px, transparent 1px 12px);
  pointer-events: none;
}
.tick-frame::before { top: -4px; }
.tick-frame::after { bottom: -4px; }

/* 图片容器基础规则（页面阶段放 img 占位） */
.media-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  border: 1px solid var(--line-soft);
  background: linear-gradient(140deg, var(--moss), var(--coal) 70%);
  aspect-ratio: 16 / 9;
}
.media-frame > img { width: 100%; height: 100%; object-fit: cover; }
.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(11, 26, 21, 0) 52%, rgba(11, 26, 21, 0.72) 100%),
    repeating-linear-gradient(90deg, rgba(247, 243, 234, 0.05) 0 1px, transparent 1px 72px);
}
.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--square { aspect-ratio: 1 / 1; }
.media-frame--portrait { aspect-ratio: 3 / 4; }
.media-caption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  line-height: 1.7;
  color: var(--stone);
}

/* ---------- 9. 动效降级 ---------- */
@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;
  }
  .site-header[data-open="true"] .nav-pill { animation: none; }
  .btn:hover, .to-top:hover, .cta-pill:hover { transform: none; }
}
