/* =========================================================
   B体育主站 — 共享样式表  /assets/site.css
   夜间赛场指挥室 + 编辑部目录：深墨绿底、奶油纸面、荧光青骨架
   ========================================================= */

/* ---------- 1. 设计变量 ---------- */
:root {
  --ink-night: #0A1E19;
  --ink-slab: #12332A;
  --paper: #F4EEE1;
  --ink-deep: #1B1613;
  --cyan: #35E9C8;
  --flame: #FF5A2B;
  --mist: #9DB6AC;
  --amber: #FFC857;
  --mint: #E6FFF9;

  --text-on-dark: #D9E9E2;
  --text-muted: #8FA79E;
  --line: rgba(53, 233, 200, .16);
  --line-soft: rgba(157, 182, 172, .22);
  --paper-line: rgba(27, 22, 19, .16);
  --paper-muted: rgba(27, 22, 19, .62);

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

  --rail-w: 264px;
  --topbar-h: 72px;
  --shell-max: 1280px;
  --ease: cubic-bezier(.22, .68, .36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-h) + 24px);
}

body {
  margin: 0;
  padding-left: var(--rail-w);
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.85;
  letter-spacing: .2px;
  color: var(--text-on-dark);
  background-color: var(--ink-night);
  background-image:
    radial-gradient(120% 70% at 78% -10%, rgba(53, 233, 200, .10), transparent 58%),
    radial-gradient(90% 60% at 12% 108%, rgba(255, 90, 43, .07), transparent 62%);
  background-attachment: fixed;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5, p, figure, blockquote { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; }
table { border-collapse: collapse; width: 100%; }
hr { border: 0; border-top: 1px solid var(--line-soft); }

/* ---------- 3. 中文排版基础 ---------- */
h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -.4px;
  color: var(--mint);
}

h1 { font-size: clamp(34px, 4.6vw, 62px); line-height: 1.08; }
h2 { font-size: clamp(26px, 2.9vw, 40px); }
h3 { font-size: clamp(19px, 1.7vw, 24px); letter-spacing: -.2px; }
h4 { font-size: 17px; letter-spacing: 0; }

p { max-width: 40em; }

.num,
.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: -.02em;
}

.text-dim { color: var(--text-muted); }
.caption {
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: .6px;
  color: var(--text-muted);
}

::selection { background: var(--cyan); color: var(--ink-night); }

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- 4. 跳转链接 ---------- */
.skip-link {
  position: fixed;
  top: 10px;
  left: calc(var(--rail-w) + 10px);
  z-index: 200;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .8px;
  color: var(--ink-night);
  background: var(--cyan);
  box-shadow: 0 6px 0 rgba(27, 22, 19, .55);
  transform: translateY(-220%);
  transition: transform .22s var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- 5. 容器与网格 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: 40px;
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
}

.span-full { grid-column: 1 / -1; }

/* ---------- 6. 布局基座 ---------- */
.section {
  position: relative;
  padding-block: clamp(56px, 7vw, 104px);
}

.section--slab {
  background: var(--ink-slab);
  border-block: 1px solid var(--line);
}

.section--paper {
  background: var(--paper);
  color: var(--ink-deep);
}

.section--paper h1,
.section--paper h2,
.section--paper h3,
.section--paper h4 { color: var(--ink-deep); }

.section--paper .caption { color: var(--paper-muted); }

.rule-slash {
  height: 1px;
  border: 0;
  background-image: repeating-linear-gradient(104deg, var(--line-soft) 0 12px, transparent 12px 20px);
}

/* ---------- 7. 索引与标签 ---------- */
.index-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--cyan);
}
.index-tag::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--cyan);
  flex: none;
}
.section--paper .index-tag { color: var(--flame); }
.section--paper .index-tag::before { background: var(--flame); }

.data-tag {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 13px;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: .5px;
  color: var(--mint);
  background: rgba(10, 30, 25, .88);
  border-left: 3px solid var(--flame);
  box-shadow: 0 6px 0 rgba(27, 22, 19, .5);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}
.data-tag:hover,
.data-tag:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 10px 0 0 rgba(27, 22, 19, .6);
}
.data-tag .num { color: var(--amber); font-size: 17px; }

.panel {
  position: relative;
  padding: 26px 26px 30px;
  background: linear-gradient(150deg, rgba(53, 233, 200, .09), rgba(18, 51, 42, .5) 62%);
  border: 1px solid var(--line);
  clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px);
}
.panel--paper {
  background: var(--paper);
  color: var(--ink-deep);
  border-color: var(--paper-line);
}
.panel--paper h2,
.panel--paper h3 { color: var(--ink-deep); }

/* ---------- 8. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .6px;
  line-height: 1;
  white-space: nowrap;
  color: var(--mint);
  background: rgba(53, 233, 200, .10);
  border: 1px solid rgba(53, 233, 200, .55);
  cursor: pointer;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: background .22s var(--ease), color .22s var(--ease), border-color .22s var(--ease);
}
.btn:hover { background: var(--cyan); color: var(--ink-night); border-color: var(--cyan); }

.btn--solid { background: var(--cyan); color: var(--ink-night); border-color: var(--cyan); }
.btn--solid:hover { background: var(--amber); border-color: var(--amber); }

.btn--flame { background: rgba(255, 90, 43, .14); border-color: rgba(255, 90, 43, .62); color: #FFD9CC; }
.btn--flame:hover { background: var(--flame); border-color: var(--flame); color: var(--ink-deep); }

.btn--ink { background: transparent; color: var(--ink-deep); border-color: rgba(27, 22, 19, .48); }
.btn--ink:hover { background: var(--ink-deep); color: var(--paper); border-color: var(--ink-deep); }

/* ---------- 9. 头部：左轨 + 顶栏 + 进度 ---------- */
.site-header { position: relative; z-index: 80; }

/* 左轨 */
.site-brandrail {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 26px 22px 24px;
  background: linear-gradient(180deg, rgba(18, 51, 42, .96), rgba(10, 30, 25, .99));
  border-right: 1px solid var(--line);
  z-index: 70;
}
.site-brandrail::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(104deg, rgba(53, 233, 200, .05) 0 1px, transparent 1px 26px);
  pointer-events: none;
}
.site-brandrail > * { position: relative; z-index: 1; }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.brand__mark {
  width: 40px;
  height: 40px;
  flex: none;
  background: var(--flame);
  clip-path: polygon(0 0, 100% 0, 100% 66%, 66% 100%, 0 100%);
  display: grid;
  place-items: center;
}
.brand__mark::after {
  content: "";
  width: 15px;
  height: 15px;
  background: var(--ink-night);
  clip-path: polygon(0 0, 100% 0, 100% 66%, 66% 100%, 0 100%);
}
.brand__text { display: block; min-width: 0; }
.brand__name {
  display: block;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 1px;
  line-height: 1.2;
  color: var(--mint);
}
.brand__sub {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  letter-spacing: .8px;
  line-height: 1.4;
  color: var(--text-muted);
}
.brand--bar { display: none; }

.rail-status {
  padding: 14px 14px 16px;
  background: rgba(53, 233, 200, .06);
  border-left: 3px solid var(--cyan);
}
.rail-status__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 2.4px;
  color: var(--text-muted);
}
.rail-status__value {
  display: block;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 44px;
  font-weight: 600;
  line-height: 1;
  margin: 6px 0 6px;
  color: var(--mint);
}
.rail-status__note {
  display: block;
  font-size: 12.5px;
  letter-spacing: .6px;
  color: var(--cyan);
}

.rail-scale {
  flex: 1 1 auto;
  min-height: 60px;
  position: relative;
}
.rail-scale::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, rgba(157, 182, 172, .45), rgba(157, 182, 172, .05));
}
.rail-scale::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 16px;
  background-image: repeating-linear-gradient(180deg, rgba(157, 182, 172, .42) 0 1px, transparent 1px 26px);
}

/* 顶栏 */
.site-topbar {
  position: fixed;
  top: 0;
  left: var(--rail-w);
  right: 0;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  z-index: 80;
  background: linear-gradient(180deg, rgba(10, 30, 25, .86), rgba(10, 30, 25, 0));
  transition: height .28s var(--ease), background-color .28s var(--ease), box-shadow .28s var(--ease);
}
.site-header[data-stuck] .site-topbar {
  height: 58px;
  background-color: var(--ink-night);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 14px 26px -22px rgba(0, 0, 0, .95);
}

.site-topbar__inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  padding-inline: 40px;
}

.primary-nav { min-width: 0; }
.primary-nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
}
.primary-nav__link {
  position: relative;
  display: block;
  padding: 9px 13px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .6px;
  color: var(--text-on-dark);
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.primary-nav__link:hover { color: var(--cyan); background: rgba(53, 233, 200, .08); }
.primary-nav__link[aria-current="page"] {
  color: var(--cyan);
  background: rgba(53, 233, 200, .08);
}
.primary-nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 3px;
  height: 2px;
  background: var(--cyan);
}

.site-header__cta { margin-left: 10px; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  color: var(--mint);
  cursor: pointer;
}
.nav-toggle__bars { display: grid; gap: 4px; width: 18px; }
.nav-toggle__bars i {
  display: block;
  height: 2px;
  background: var(--cyan);
  transition: transform .24s var(--ease), opacity .24s var(--ease);
}
.nav-toggle__text {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.2px;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* 阅读进度 */
.site-progress {
  position: fixed;
  top: 0;
  left: var(--rail-w);
  right: 0;
  height: 2px;
  z-index: 95;
  pointer-events: none;
  background: rgba(53, 233, 200, .10);
}
.site-progress__bar {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--cyan), var(--amber) 78%, var(--flame));
}

/* ---------- 10. 页脚（奶油纸面） ---------- */
.site-footer {
  position: relative;
  background: var(--paper);
  color: var(--ink-deep);
  border-top: 4px solid var(--ink-deep);
}
.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background-image: repeating-linear-gradient(104deg, rgba(255, 90, 43, .85) 0 10px, transparent 10px 26px);
}
.site-footer:focus-within { outline: none; }
.site-footer :focus-visible { outline-color: var(--flame); }

.site-footer__inner {
  display: grid;
  grid-template-columns: minmax(240px, 1.25fr) repeat(4, minmax(150px, 1fr));
  gap: 40px 32px;
  padding-block: clamp(52px, 6vw, 84px) clamp(36px, 4vw, 56px);
}

.footer-intro__mark {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--ink-deep);
}
.footer-intro__mark::after {
  content: "";
  display: block;
  width: 46px;
  height: 3px;
  margin-top: 10px;
  background: var(--flame);
}
.footer-intro__text {
  margin-top: 16px;
  max-width: 26em;
  font-size: 15px;
  line-height: 1.8;
  color: var(--paper-muted);
}
.footer-intro__round {
  margin-top: 18px;
  font-size: 13.5px;
  letter-spacing: .8px;
  color: var(--paper-muted);
}
.footer-intro__round .num {
  margin-left: 10px;
  font-size: 30px;
  color: var(--flame);
  vertical-align: -4px;
}
.footer-intro .btn { margin-top: 22px; }

.footer-col__title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--ink-deep);
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--paper-line);
}
.footer-col__list { display: grid; gap: 11px; }

.footer-link {
  font-size: 15px;
  color: rgba(27, 22, 19, .78);
  transition: color .2s var(--ease), padding-left .2s var(--ease);
}
.footer-link:hover { color: var(--flame); padding-left: 6px; }

.footer-contact { display: grid; gap: 3px; }
.footer-contact__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--paper-muted);
}
.footer-contact__value {
  font-size: 15px;
  color: var(--ink-deep);
  word-break: break-word;
}
.footer-col__note {
  margin-top: 14px;
  font-size: 12.5px;
  line-height: 1.7;
  letter-spacing: .3px;
  color: var(--paper-muted);
  max-width: 24em;
}

.site-footer__bottom {
  border-top: 1px solid var(--paper-line);
  background: rgba(27, 22, 19, .05);
}
.site-footer__bottom-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding-block: 18px 22px;
}
.footer-legal,
.footer-sign {
  font-size: 13px;
  letter-spacing: .8px;
  color: var(--paper-muted);
  max-width: none;
}
.footer-legal { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ---------- 11. 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  letter-spacing: .6px;
  color: var(--text-muted);
}
.breadcrumb__list { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.breadcrumb__sep { color: rgba(157, 182, 172, .55); }
.breadcrumb__link:hover { color: var(--cyan); }
.breadcrumb__link[aria-current="page"] { color: var(--mint); }

/* ---------- 12. 图片容器基础规则 ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background-color: var(--ink-slab);
  background-image:
    radial-gradient(80% 70% at 22% 18%, rgba(53, 233, 200, .22), transparent 62%),
    radial-gradient(70% 80% at 84% 88%, rgba(255, 90, 43, .18), transparent 66%),
    linear-gradient(150deg, rgba(53, 233, 200, .10), rgba(18, 51, 42, .6));
  border: 1px solid var(--line);
}
.media-frame::before {
  content: "";
  position: absolute;
  inset: 11%;
  border: 1px dashed rgba(157, 182, 172, .34);
  background-image:
    radial-gradient(circle at 50% 50%, transparent 19%, rgba(157, 182, 172, .3) 19.4%, transparent 20.2%),
    linear-gradient(to bottom, transparent calc(50% - .5px), rgba(157, 182, 172, .26) 50%, transparent calc(50% + .5px));
  pointer-events: none;
}
.media-frame img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-frame__caption {
  position: absolute;
  left: 0;
  bottom: 0;
  max-width: 88%;
  padding: 8px 13px;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .5px;
  color: var(--mint);
  background: rgba(10, 30, 25, .86);
  border-left: 3px solid var(--cyan);
}
.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--tall { aspect-ratio: 4 / 5; }
.media-frame--square { aspect-ratio: 1 / 1; }
.media-frame--paper {
  background-color: #E7DFCE;
  border-color: var(--paper-line);
}
.media-frame--paper::before { border-color: rgba(27, 22, 19, .22); }

/* ---------- 13. 显现动效 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .55s var(--ease), transform .55s var(--ease);
}
[data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* ---------- 14. 平板 ---------- */
@media (max-width: 1279px) {
  .site-footer__inner {
    grid-template-columns: minmax(220px, 1.2fr) repeat(2, minmax(150px, 1fr));
  }
  .footer-col--contact { grid-column: span 2; }
}

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

  body { padding-left: 0; font-size: 16px; }

  .site-brandrail { display: none; }

  .site-topbar { left: 0; }
  .site-header[data-stuck] .site-topbar { height: var(--topbar-h); }

  .site-topbar__inner {
    justify-content: flex-end;
    gap: 12px;
    padding-inline: 22px;
  }
  .brand--bar { display: flex; margin-right: auto; }
  .brand--bar .brand__mark { width: 32px; height: 32px; }
  .brand--bar .brand__name { font-size: 16px; }

  .nav-toggle { display: inline-flex; }
  .site-header__cta { display: none; }

  .primary-nav {
    position: fixed;
    top: var(--topbar-h);
    left: 0;
    right: 0;
    max-height: calc(100vh - var(--topbar-h));
    overflow-y: auto;
    padding: 6px 22px 22px;
    background: var(--ink-slab);
    border-top: 1px solid var(--line);
    box-shadow: 0 26px 40px -30px rgba(0, 0, 0, .95);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity .24s var(--ease), transform .24s var(--ease), visibility .24s linear;
  }
  .primary-nav[data-open] {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .primary-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .primary-nav__link {
    padding: 15px 4px;
    font-size: 16px;
    border-bottom: 1px solid rgba(157, 182, 172, .16);
  }
  .primary-nav__link[aria-current="page"] { background: rgba(53, 233, 200, .06); }
  .primary-nav__link[aria-current="page"]::after { left: 4px; right: auto; bottom: 6px; width: 34px; }

  .shell { padding-inline: 24px; }
  .grid-12 { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; }

  .site-footer__inner { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px 26px; }
  .footer-intro { grid-column: 1 / -1; }
  .footer-col--contact { grid-column: 1 / -1; }
}

/* ---------- 15. 手机 ---------- */
@media (max-width: 599px) {
  body { font-size: 15.5px; }

  .shell { padding-inline: 18px; }
  .grid-12 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

  .site-topbar__inner { padding-inline: 16px; gap: 8px; }
  .nav-toggle { padding: 9px 11px; }

  .panel { padding: 20px 18px 24px; }

  .site-footer__inner { grid-template-columns: minmax(0, 1fr); }
  .site-footer__bottom-inner { flex-direction: column; align-items: flex-start; }

  .data-tag { padding: 7px 11px; font-size: 12.5px; }
  .media-frame::before { inset: 8%; }
}

/* ---------- 16. 减少动态偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

  [data-reveal] { opacity: 1; transform: none; }

  .data-tag:hover,
  .data-tag:focus-visible { transform: none; }
}
