/* ==========================================================================
   site.css — BEAT365 体育亚洲 / 全站共享样式
   底色：墨绿夜幕 + 炭黑石板
   高亮：荧光青柠（状态） / 橙红脉冲（动作） / 电子薄荷（正向）
   结构：Bento 网格 + 切角面板 + 等宽索引
   ========================================================================== */

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

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

body, h1, h2, h3, h4, p, ul, ol, li, figure, blockquote, dl, dd {
  margin: 0;
  padding: 0;
}

ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; }

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

a { color: inherit; text-decoration: none; }
table { border-collapse: collapse; width: 100%; }

:focus-visible {
  outline: 2px solid #C8FF3D;
  outline-offset: 2px;
}

@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;
  }
}

/* ---------- 2. 变量 ---------- */
:root {
  --ink: #0A1C16;
  --ink-2: #121A17;
  --panel: #1E2B25;
  --line: #3A4A43;
  --lime: #C8FF3D;
  --pulse: #FF5B2E;
  --warm: #F5F2E9;
  --mist: #9FAEA6;
  --clay: #C0784F;
  --mint: #3BE0A0;

  --cut: 12px;
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-bar: 64px;
  --header-track: 38px;
  --header-h: calc(var(--header-bar) + var(--header-track));

  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC",
    "Source Han Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-narrow: "Arial Narrow", "Helvetica Neue Condensed", "HelveticaNeue-CondensedBold",
    "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "IBM Plex Mono", "Roboto Mono",
    "DejaVu Sans Mono", Consolas, "Courier New", monospace;
}

/* ---------- 3. 基础排版 ---------- */
body {
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--warm);
  background-color: var(--ink);
  background-image: repeating-linear-gradient(
    115deg,
    rgba(200, 255, 61, 0.028) 0 1px,
    transparent 1px 140px
  );
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-narrow);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.15;
  color: var(--warm);
}

h1 {
  font-size: clamp(40px, 6.5vw, 86px);
  line-height: 0.98;
  margin-bottom: 0.42em;
}

h2 { font-size: clamp(26px, 3.4vw, 40px); margin-bottom: 0.5em; }
h3 { font-size: clamp(18px, 2vw, 22px); margin-bottom: 0.5em; }

p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--lime); }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

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

#main-content { padding-top: var(--header-h); }

:target { scroll-margin-top: calc(var(--header-h) + 16px); }

/* ---------- 4. 跳转链接 ---------- */
.skip-link {
  position: absolute;
  top: 0;
  left: -9999px;
  z-index: 999;
  padding: 10px 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--ink);
  background: var(--lime);
}

.skip-link:focus {
  left: 8px;
  top: 8px;
  text-decoration: none;
}

/* ---------- 5. 页头 ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 120;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 0.28s ease, border-color 0.28s ease;
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: repeating-linear-gradient(
    115deg,
    transparent 0 32px,
    rgba(200, 255, 61, 0.16) 32px 33px
  );
  pointer-events: none;
}

.site-header[data-scrolled="true"] {
  background-color: rgba(10, 28, 22, 0.97);
  border-bottom-color: var(--line);
}

.header-inner {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.header-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: var(--header-bar);
}

/* 品牌 */
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  color: var(--warm);
}

.site-brand:hover { text-decoration: none; }

.brand-glyph {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: var(--lime);
  clip-path: polygon(0 0, 100% 0, 100% 68%, 68% 100%, 0 100%);
}

.brand-glyph-line {
  display: block;
  width: 13px;
  height: 2px;
  background: var(--ink);
}

.brand-lockup {
  display: flex;
  flex-direction: column;
  line-height: 1.12;
}

.brand-name {
  font-family: var(--font-narrow);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.09em;
}

.brand-sub {
  font-size: 10.5px;
  letter-spacing: 0.24em;
  color: var(--mist);
}

.brand-meta {
  display: none;
  align-items: center;
  gap: 8px;
  padding-left: 14px;
  margin-left: 2px;
  border-left: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--mist);
  white-space: nowrap;
}

.brand-meta .mono { color: var(--lime); font-weight: 700; }

.pulse-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 3px rgba(59, 224, 160, 0.16);
}

.brand-meta-text { display: inline-block; }

/* 菜单按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  padding: 8px 11px;
  border: 1px solid var(--line);
  color: var(--warm);
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.nav-toggle:hover { border-color: var(--lime); }

.nav-toggle-bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 18px;
}

.nav-toggle-bars span {
  display: block;
  height: 2px;
  background: var(--lime);
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.site-header[data-open="true"] .nav-toggle-bars span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.site-header[data-open="true"] .nav-toggle-bars span:nth-child(2) {
  opacity: 0;
}

.site-header[data-open="true"] .nav-toggle-bars span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.nav-toggle-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--mist);
}

/* 主导航 */
.site-nav {
  position: static;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-item { display: flex; }

.nav-link {
  display: block;
  padding: 7px 10px;
  font-size: 13.5px;
  letter-spacing: 0.02em;
  color: var(--mist);
  border: 1px solid transparent;
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.nav-link:hover {
  color: var(--warm);
  background: rgba(200, 255, 61, 0.09);
  text-decoration: none;
}

.nav-link[aria-current="page"] {
  color: var(--ink);
  background: var(--lime);
  border-color: var(--lime);
  font-weight: 600;
}

.nav-link--fixed {
  color: var(--lime);
  border-color: rgba(200, 255, 61, 0.34);
}

.nav-link--fixed::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--mint);
  vertical-align: middle;
}

.nav-link--fixed:hover {
  color: var(--lime);
  background: rgba(200, 255, 61, 0.14);
  border-color: rgba(200, 255, 61, 0.6);
}

.site-nav .nav-cta { display: none; }

/* 轮次索引带 */
.round-track {
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--header-track);
  padding-inline: var(--gutter);
  border-top: 1px solid rgba(58, 74, 67, 0.45);
  background: rgba(18, 26, 23, 0.62);
  overflow: hidden;
}

.round-track-label {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--clay);
  white-space: nowrap;
}

.round-strip {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1 1 auto;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.round-strip::-webkit-scrollbar { display: none; }
.round-strip > li { flex: 0 0 auto; display: flex; }

.round-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 22px;
  padding: 0 5px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  color: var(--mist);
  border: 1px solid transparent;
  transition: color 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

.round-chip:hover {
  color: var(--warm);
  border-color: var(--line);
  text-decoration: none;
}

.round-chip.is-current {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--ink);
  font-weight: 700;
}

/* 阅读进度 */
.reading-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: rgba(58, 74, 67, 0.55);
}

.reading-progress-bar {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--lime), var(--mint) 72%, var(--pulse));
}

/* ---------- 6. 移动端页头 ---------- */
@media (max-width: 1100px) {
  :root {
    --header-bar: 60px;
    --header-track: 34px;
  }

  .nav-toggle { display: flex; }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 110;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-left: 0;
    padding: 8px var(--gutter) 48px;
    background: var(--ink-2);
    border-top: 1px solid var(--line);
    overflow-y: auto;
  }

  .site-header[data-open="true"] .site-nav { display: flex; }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-item { display: block; }

  .nav-link {
    padding: 16px 2px;
    font-size: 17px;
    border-bottom: 1px solid rgba(58, 74, 67, 0.55);
  }

  .nav-link[aria-current="page"] {
    background: transparent;
    border-color: rgba(58, 74, 67, 0.55);
    color: var(--lime);
    font-weight: 600;
  }

  .nav-link[aria-current="page"]::before {
    content: "\203A";
    margin-right: 8px;
    color: var(--lime);
  }

  .site-nav .nav-cta {
    display: flex;
    margin-top: 24px;
  }

  .header-bar .header-cta { display: none; }
}

@media (min-width: 1400px) {
  .brand-meta { display: flex; }
}

@media (max-width: 640px) {
  .round-track-label { display: none; }
  .brand-sub { letter-spacing: 0.18em; }
}

@media (max-width: 380px) {
  .nav-toggle-label { display: none; }
}

/* ---------- 7. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 8vw, 110px);
  color: var(--mist);
  background-color: var(--ink-2);
  background-image: repeating-linear-gradient(
    115deg,
    rgba(58, 74, 67, 0.16) 0 1px,
    transparent 1px 46px
  );
  border-top: 1px solid var(--line);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 132px;
  height: 3px;
  background: var(--lime);
}

.site-footer::after {
  content: "";
  position: absolute;
  top: -1px;
  left: 132px;
  right: 0;
  height: 1px;
  background: repeating-linear-gradient(
    115deg,
    transparent 0 24px,
    rgba(200, 255, 61, 0.22) 24px 25px
  );
  pointer-events: none;
}

.footer-inner {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: clamp(40px, 5.5vw, 68px) var(--gutter) clamp(28px, 4vw, 44px);
  display: grid;
  grid-template-columns: minmax(210px, 1.3fr) repeat(3, minmax(96px, 0.6fr)) minmax(228px, 1.2fr);
  gap: clamp(22px, 3vw, 38px);
}

.footer-brand { min-width: 0; }
.footer-brand .site-brand { margin-bottom: 14px; }
.footer-brand .brand-glyph { width: 24px; height: 24px; flex-basis: 24px; }
.footer-brand .brand-glyph-line { width: 11px; }

.footer-sign {
  font-family: var(--font-narrow);
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--warm);
  margin-bottom: 8px;
}

.footer-note {
  max-width: 32ch;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--mist);
}

.footer-col { min-width: 0; }

.footer-col-title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--clay);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-links a {
  font-size: 14px;
  color: var(--mist);
  transition: color 0.16s ease;
}

.footer-links a:hover {
  color: var(--lime);
  text-decoration: none;
}

.footer-contact { min-width: 0; }

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.contact-item {
  display: flex;
  gap: 10px;
  font-size: 13px;
  line-height: 1.5;
}

.contact-key {
  flex: 0 0 42px;
  padding-top: 2px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--clay);
}

.contact-value {
  color: var(--warm);
  word-break: break-word;
}

.contact-note {
  max-width: 40ch;
  font-size: 12px;
  line-height: 1.65;
  color: var(--mist);
}

.footer-base {
  background: var(--ink);
  border-top: 1px solid var(--line);
}

.footer-base-inner {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 16px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--mist);
}

.footer-legal { color: var(--mist); }
.footer-copy { color: var(--mist); }

@media (max-width: 1180px) {
  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }
  .footer-brand { grid-column: auto; }
}

/* ---------- 8. 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  white-space: nowrap;
  background: rgba(245, 242, 233, 0.08);
  color: var(--warm);
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
  transition: background-color 0.18s ease, color 0.18s ease;
}

.btn:hover {
  background: var(--lime);
  color: var(--ink);
  text-decoration: none;
}

.btn--ghost {
  background: rgba(200, 255, 61, 0.08);
  color: var(--lime);
}

.btn--ghost:hover {
  background: var(--lime);
  color: var(--ink);
}

.btn--solid {
  background: var(--pulse);
  color: var(--ink);
  font-weight: 700;
}

.btn--solid:hover {
  background: var(--lime);
  color: var(--ink);
}

/* ---------- 9. 布局与 Bento 网格 ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.cell {
  grid-column: 1 / -1;
  min-width: 0;
}

@media (min-width: 760px) {
  .cell--3 { grid-column: span 3; }
  .cell--4 { grid-column: span 4; }
  .cell--5 { grid-column: span 5; }
  .cell--6 { grid-column: span 6; }
  .cell--7 { grid-column: span 7; }
  .cell--8 { grid-column: span 8; }
  .cell--9 { grid-column: span 9; }
  .cell--12 { grid-column: span 12; }
}

/* ---------- 10. 切角面板 ---------- */
.panel {
  position: relative;
  min-width: 0;
  padding: clamp(16px, 2vw, 22px);
  background: var(--panel);
  border: 1px solid var(--line);
  clip-path: polygon(
    0 0,
    calc(100% - var(--cut)) 0,
    100% var(--cut),
    100% 100%,
    var(--cut) 100%,
    0 calc(100% - var(--cut))
  );
}

.panel--focus {
  background: linear-gradient(160deg, rgba(200, 255, 61, 0.07), rgba(30, 43, 37, 0.97) 44%);
  border-color: rgba(200, 255, 61, 0.42);
}

.panel--focus::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(200, 255, 61, 0.4);
}

/* ---------- 11. 章节标题行 ---------- */
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px 14px;
  margin-bottom: clamp(18px, 2.4vw, 28px);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.section-index {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--clay);
}

.section-title {
  font-family: var(--font-narrow);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.15;
  color: var(--warm);
}

.section-note {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--mist);
}

/* ---------- 12. 面包屑 ---------- */
.crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--mist);
}

.crumb li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.crumb li::after {
  content: "/";
  color: var(--line);
}

.crumb li:last-child::after { display: none; }

.crumb a { color: var(--mist); }
.crumb a:hover { color: var(--lime); text-decoration: none; }
.crumb [aria-current="page"] { color: var(--warm); }

/* ---------- 13. 正文 ---------- */
.prose { max-width: 68ch; }
.prose p { font-size: 17px; line-height: 1.65; }
.prose h2, .prose h3 { margin-top: 1.6em; }

/* ---------- 14. 图片容器 ---------- */
.imgbox {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  background-color: var(--ink-2);
  background-image:
    linear-gradient(135deg, rgba(30, 43, 37, 0.9), rgba(10, 28, 22, 0.96)),
    repeating-linear-gradient(45deg, rgba(200, 255, 61, 0.06) 0 2px, transparent 2px 10px);
}

.imgbox > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.72) contrast(1.05) brightness(0.94);
}

.imgbox::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(245, 242, 233, 0.09) 1px, transparent 1px);
  background-size: 3px 3px;
  opacity: 0.5;
}

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

/* ---------- 15. 状态徽标 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mist);
  border: 1px solid var(--line);
}

.tag--lime {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--ink);
  font-weight: 700;
}

.tag--pulse {
  background: var(--pulse);
  border-color: var(--pulse);
  color: var(--ink);
  font-weight: 700;
}

.tag--mint {
  color: var(--mint);
  border-color: rgba(59, 224, 160, 0.45);
}

/* ---------- 16. 数据表 ---------- */
.data-table {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.data-table th,
.data-table td {
  padding: 9px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.data-table th {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mist);
}

.data-table tbody tr:nth-child(even) { background: rgba(18, 26, 23, 0.6); }
.data-table tbody tr:hover { background: rgba(200, 255, 61, 0.06); }

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* ---------- 17. 斜线分隔 ---------- */
.slash-rule {
  height: 1px;
  border: 0;
  margin: 0;
  background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 16px);
}

/* ---------- 18. 滚动显现 ---------- */
[data-reveal] {
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.22, 0.7, 0.3, 1);
}

[data-reveal].is-pending {
  opacity: 0;
  transform: translateY(14px);
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { transition: none; }
  [data-reveal].is-pending { opacity: 1; transform: none; }
}

/* ---------- 19. 章节高亮钩子 ---------- */
[data-section][data-active="true"] .section-index { color: var(--lime); }
[data-section][data-active="true"] .section-title { color: var(--warm); }
