/* ============================================================
   欧皇体育 · 共享样式表 /assets/site.css
   夜间数据驾驶舱 · 侧边轨道 + 分屏骨架
   ============================================================ */

/* ---------- 1. Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:where(h1, h2, h3, h4) { font-weight: 800; line-height: 1.14; letter-spacing: -0.02em; }

/* ---------- 2. Tokens ---------- */
:root {
  --ink: #0B0F0E;
  --ink-deep: #070B0A;
  --forest: #0F2A23;
  --moss: #1F4A3B;
  --rock: #2B2F2E;
  --cream: #F2EDE3;
  --mist: #AEB8B2;
  --mist-dim: #7E8C86;
  --gold: #C9A96A;
  --mint: #39F5B5;
  --ember: #FF7A3C;

  --rail-w: 96px;
  --topbar-h: 60px;
  --shell-max: 1320px;
  --gutter: clamp(20px, 4vw, 56px);
  --radius: 3px;

  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;

  --ease: cubic-bezier(.2, .7, .3, 1);
  --scroll: 0;
}

/* ---------- 3. 基础版式 ---------- */
body {
  min-height: 100vh;
  margin: 0;
  padding-left: var(--rail-w);
  background-color: var(--ink);
  background-image:
    radial-gradient(1100px 620px at 88% -8%, rgba(31, 74, 59, .55), transparent 62%),
    radial-gradient(760px 520px at 2% 104%, rgba(201, 169, 106, .10), transparent 70%);
  color: var(--cream);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(57, 245, 181, .28);
  color: #FFFFFF;
}

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

.num,
[data-num] {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* ---------- 4. Skip link ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 300;
  padding: 11px 18px;
  border-radius: var(--radius);
  background: var(--mint);
  color: #04120D;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  transform: translateY(-180%);
  transition: transform .18s var(--ease);
}

.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--cream);
  outline-offset: 2px;
}

/* ---------- 5. Header：侧边轨道 ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail-w);
  z-index: 90;
}

.topbar { display: none; }

.rail {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background:
    linear-gradient(180deg, #0F2A23 0%, #0C1613 58%, #0B0F0E 100%);
  border-right: 1px solid rgba(201, 169, 106, .22);
}

.rail::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, transparent, rgba(57, 245, 181, .45), transparent);
  pointer-events: none;
}

/* 品牌 */
.rail__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 13px;
  padding: 22px 6px 18px;
  border-bottom: 1px solid rgba(201, 169, 106, .16);
}

.rail__mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 2px;
  background: linear-gradient(150deg, var(--mint), #16BE86);
  color: #04120D;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 6px 18px rgba(57, 245, 181, .26);
}

.rail__brand-name {
  writing-mode: vertical-rl;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .26em;
  color: var(--cream);
  line-height: 1;
}

/* 导航 */
.rail__nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px 0;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(201, 169, 106, .4) transparent;
}

.rail__nav::-webkit-scrollbar { width: 4px; }
.rail__nav::-webkit-scrollbar-thumb { background: rgba(201, 169, 106, .4); border-radius: 2px; }

.rail__list { display: flex; flex-direction: column; }

.rail__link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 13px 2px;
  color: var(--mist);
  transition: color .16s var(--ease), background-color .16s var(--ease);
}

.rail__link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 2px;
  background: transparent;
  transition: background-color .16s var(--ease);
}

.rail__index {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .12em;
  line-height: 1;
  color: var(--gold);
  opacity: .62;
  transition: opacity .16s var(--ease), color .16s var(--ease);
}

.rail__label {
  writing-mode: vertical-rl;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .2em;
  line-height: 1;
}

.rail__link:hover {
  color: var(--cream);
  background: rgba(57, 245, 181, .07);
}

.rail__link:hover::before { background: var(--gold); }
.rail__link:hover .rail__index { opacity: 1; }

.rail__link:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: -2px;
  background: rgba(57, 245, 181, .14);
  color: var(--cream);
}

.rail__link[aria-current="page"] {
  color: var(--cream);
  background: linear-gradient(90deg, rgba(57, 245, 181, .17), rgba(57, 245, 181, 0));
}

.rail__link[aria-current="page"]::before { background: var(--mint); }

.rail__link[aria-current="page"] .rail__index {
  color: var(--mint);
  opacity: 1;
}

/* 轨道底部阅读进度计 */
.rail__foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 14px 0 18px;
  border-top: 1px solid rgba(201, 169, 106, .18);
}

.rail__meter {
  position: relative;
  display: block;
  width: 3px;
  height: 54px;
  border-radius: 2px;
  background: rgba(242, 237, 227, .10);
  overflow: hidden;
}

.rail__meter-fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--mint), var(--gold));
  transform: scaleY(var(--scroll, 0));
  transform-origin: top center;
}

.rail__foot-text {
  writing-mode: vertical-rl;
  font-size: 9.5px;
  letter-spacing: .24em;
  color: var(--mist-dim);
  line-height: 1;
}

/* 移动端遮罩 */
.nav-scrim { display: none; }

/* ---------- 6. 通用版式组件 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.split {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(24px, 3vw, 48px);
  align-items: start;
}

.rule {
  height: 1px;
  border: 0;
  margin: 0;
  background: linear-gradient(90deg, rgba(201, 169, 106, .55), rgba(201, 169, 106, .04));
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .08em;
  text-align: center;
  transition: background-color .18s var(--ease), color .18s var(--ease),
              border-color .18s var(--ease), box-shadow .18s var(--ease);
}

.btn--primary {
  background: var(--mint);
  border-color: var(--mint);
  color: #04120D;
  box-shadow: 0 10px 26px rgba(57, 245, 181, .18);
}

.btn--primary:hover { background: #63FFC6; box-shadow: 0 12px 30px rgba(57, 245, 181, .30); }

.btn--ghost {
  background: transparent;
  border-color: rgba(201, 169, 106, .5);
  color: var(--cream);
}

.btn--ghost:hover { background: rgba(201, 169, 106, .12); border-color: var(--gold); }

.btn--quiet {
  background: var(--rock);
  border-color: rgba(242, 237, 227, .08);
  color: var(--cream);
}

.btn--quiet:hover { background: #3A403E; }

.btn:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }

/* 标签 */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border: 1px solid rgba(201, 169, 106, .32);
  border-radius: 2px;
  background: rgba(201, 169, 106, .10);
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  line-height: 1.4;
}

.tag--mint {
  border-color: rgba(57, 245, 181, .36);
  background: rgba(57, 245, 181, .10);
  color: var(--mint);
}

.tag--ember {
  border-color: rgba(255, 122, 60, .36);
  background: rgba(255, 122, 60, .10);
  color: var(--ember);
}

/* 面板 */
.panel {
  padding: clamp(18px, 2.2vw, 28px);
  border: 2px solid var(--rock);
  border-radius: 4px;
  background: linear-gradient(160deg, rgba(31, 74, 59, .55), rgba(11, 15, 14, .92));
  box-shadow: 8px 8px 0 rgba(7, 11, 10, .55);
}

.panel--lit {
  border-color: rgba(57, 245, 181, .38);
  box-shadow: 8px 8px 0 rgba(7, 11, 10, .55), 0 0 0 1px rgba(57, 245, 181, .12) inset;
}

/* 面包屑 */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: .10em;
  color: var(--mist);
}

.crumbs a {
  padding-bottom: 1px;
  border-bottom: 1px solid transparent;
  transition: color .16s var(--ease), border-color .16s var(--ease);
}

.crumbs a:hover { color: var(--gold); border-bottom-color: var(--gold); }
.crumbs__sep { color: var(--gold); opacity: .6; }
.crumbs [aria-current="page"] { color: var(--cream); }

/* 正文 */
.prose {
  max-width: 72ch;
  font-size: 16.5px;
  line-height: 1.85;
  color: #DDE3DF;
}

.prose > * + * { margin-top: 1.05em; }
.prose h2 { margin-top: 2em; font-size: clamp(22px, 2.4vw, 30px); color: var(--cream); }
.prose h3 { margin-top: 1.8em; font-size: clamp(17px, 1.6vw, 20px); color: var(--cream); }
.prose a { color: var(--mint); border-bottom: 1px solid rgba(57, 245, 181, .4); }
.prose a:hover { border-bottom-color: var(--mint); }
.prose ul, .prose ol { padding-left: 1.25em; }
.prose ul li { list-style: none; position: relative; }
.prose ul li::before {
  content: "";
  position: absolute;
  left: -1.1em;
  top: .72em;
  width: 6px;
  height: 1px;
  background: var(--gold);
}
.prose ol { list-style: decimal; }
.prose strong { color: var(--cream); }
.prose blockquote {
  padding-left: 18px;
  border-left: 2px solid var(--gold);
  color: var(--mist);
}

/* 图片容器基础规则（页面阶段放置占位或图片） */
.media {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 1px solid rgba(201, 169, 106, .22);
  border-radius: var(--radius);
  background:
    linear-gradient(150deg, rgba(31, 74, 59, .70), rgba(11, 15, 14, .96));
}

.media img,
.media > .media__inner {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

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

.media__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 16px;
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--cream);
  background: linear-gradient(0deg, rgba(11, 15, 14, .94), rgba(11, 15, 14, 0));
}

/* ---------- 7. Footer ---------- */
.site-footer {
  position: relative;
  margin-top: 96px;
  margin-left: calc(var(--rail-w) * -1);
  padding: clamp(40px, 6vw, 72px) var(--gutter) 26px calc(var(--rail-w) + var(--gutter));
  border-top: 1px solid rgba(201, 169, 106, .26);
  background: linear-gradient(180deg, #0B0F0E 0%, #0F2A23 100%);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px 28px;
  max-width: var(--shell-max);
  margin-inline: auto;
}

.site-footer__wordmark {
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--cream);
}

.site-footer__tagline {
  margin-top: 8px;
  font-size: 14px;
  color: var(--mist);
}

.site-footer__micro {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.75;
  letter-spacing: .02em;
  color: var(--mist-dim);
}

.site-footer__title {
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .24em;
  color: var(--gold);
}

.site-footer__list li + li { margin-top: 10px; }

.site-footer__list a {
  display: inline-block;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  font-size: 14.5px;
  color: var(--mist);
  transition: color .16s var(--ease), border-color .16s var(--ease);
}

.site-footer__list a:hover {
  color: var(--cream);
  border-bottom-color: var(--gold);
}

.site-footer__list a:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }

.site-footer__contact-line {
  font-size: 14px;
  color: var(--cream);
  letter-spacing: .02em;
}

.site-footer__contact-line + .site-footer__contact-line { margin-top: 6px; }

.site-footer__base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--shell-max);
  margin: 46px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(242, 237, 227, .10);
}

.site-footer__legal {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .02em;
  color: var(--mist);
}

.to-top {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid rgba(201, 169, 106, .45);
  border-radius: var(--radius);
  background: rgba(201, 169, 106, .07);
  color: var(--gold);
  font-size: 12px;
  letter-spacing: .16em;
  transition: background-color .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease);
}

.to-top::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-bottom: 6px solid currentColor;
}

.to-top:hover {
  background: rgba(201, 169, 106, .16);
  border-color: var(--gold);
  color: var(--cream);
}

/* ---------- 8. 平板 & 移动 ---------- */
@media (max-width: 1023px) {
  .split { grid-template-columns: minmax(0, 1fr); }
}

@media (min-width: 640px) {
  .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .site-footer__grid {
    grid-template-columns: 1.5fr 1fr 1fr 1fr 1.35fr;
    gap: 40px;
  }
  .site-footer__brand { padding-right: 12px; }
}

@media (max-width: 959px) {
  body {
    padding-left: 0;
    padding-top: var(--topbar-h);
  }

  .site-header {
    width: 100%;
    height: auto;
    bottom: auto;
  }

  .topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: var(--topbar-h);
    padding: 0 18px;
    background: rgba(11, 15, 14, .96);
    border-bottom: 1px solid rgba(201, 169, 106, .24);
  }

  .topbar__brand {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: .10em;
    color: var(--cream);
  }

  .nav-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 13px;
    border: 1px solid rgba(201, 169, 106, .42);
    border-radius: var(--radius);
    background: rgba(31, 74, 59, .45);
    color: var(--cream);
    font-size: 12px;
    letter-spacing: .16em;
  }

  .nav-toggle:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }

  .nav-toggle__bars {
    position: relative;
    display: block;
    width: 16px;
    height: 2px;
    background: var(--cream);
    transition: background-color .2s var(--ease);
  }

  .nav-toggle__bars::before,
  .nav-toggle__bars::after {
    content: "";
    position: absolute;
    left: 0;
    width: 16px;
    height: 2px;
    background: var(--cream);
    transition: transform .2s var(--ease);
  }

  .nav-toggle__bars::before { top: -5px; }
  .nav-toggle__bars::after { top: 5px; }

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

  .rail {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(312px, 86vw);
    height: 100%;
    z-index: 95;
    visibility: hidden;
    transform: translateX(-104%);
    border-right: 1px solid rgba(201, 169, 106, .34);
    box-shadow: 14px 0 40px rgba(0, 0, 0, .5);
    transition: transform .3s var(--ease), visibility .3s var(--ease);
  }

  .site-header[data-open] .rail {
    visibility: visible;
    transform: translateX(0);
  }

  .rail__brand {
    flex-direction: row;
    justify-content: flex-start;
    gap: 13px;
    padding: 18px 20px 16px;
  }

  .rail__brand-name {
    writing-mode: horizontal-tb;
    font-size: 15px;
    letter-spacing: .12em;
  }

  .rail__nav { padding: 8px 0; }

  .rail__link {
    flex-direction: row;
    justify-content: flex-start;
    gap: 14px;
    padding: 15px 20px;
  }

  .rail__link::before {
    top: 0;
    bottom: 0;
    width: 3px;
  }

  .rail__label {
    writing-mode: horizontal-tb;
    font-size: 15px;
    letter-spacing: .10em;
  }

  .rail__index { font-size: 11px; }

  .rail__foot {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px calc(16px + env(safe-area-inset-bottom, 0px));
  }

  .rail__meter {
    width: 100%;
    height: 3px;
  }

  .rail__meter-fill {
    transform: scaleX(var(--scroll, 0));
    transform-origin: left center;
    background: linear-gradient(90deg, var(--mint), var(--gold));
  }

  .rail__foot-text {
    writing-mode: horizontal-tb;
    font-size: 10px;
    letter-spacing: .2em;
    white-space: nowrap;
    margin-left: 12px;
  }

  .nav-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 94;
    background: rgba(4, 10, 8, .68);
    opacity: 0;
    pointer-events: none;
    transition: opacity .26s var(--ease);
  }

  .site-header[data-open] .nav-scrim {
    opacity: 1;
    pointer-events: auto;
  }

  .site-footer {
    margin-left: 0;
    margin-top: 64px;
    padding: clamp(34px, 8vw, 56px) var(--gutter) 22px;
  }

  .site-footer__base { margin-top: 32px; }

  .panel { box-shadow: 6px 6px 0 rgba(7, 11, 10, .55); }
}

@media (max-width: 480px) {
  body { font-size: 15.5px; }
  .btn { width: 100%; padding: 13px 18px; }
  .site-footer__base { flex-direction: column; align-items: flex-start; }
}

/* ---------- 9. 可访问性与打印 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  .rail { transition: none !important; }
  .rail__meter-fill { transition: none !important; }
}

@media print {
  .site-header,
  .nav-scrim,
  .skip-link,
  .to-top { display: none !important; }

  body {
    padding: 0;
    background: #FFFFFF;
    color: #111111;
  }

  .site-footer {
    margin: 24px 0 0;
    padding: 16px 0 0;
    background: none;
    color: #111111;
    border-top: 1px solid #999999;
  }

  .site-footer__title,
  .site-footer__list a,
  .site-footer__legal,
  .site-footer__micro,
  .site-footer__tagline,
  .site-footer__contact-line { color: #111111; }

  .panel {
    border: 1px solid #999999;
    box-shadow: none;
    background: none;
  }
}
