/* ============================================================
   LOVEBET赛场 · 共享样式 /assets/site.css
   结构：1 变量 2 复位 3 排版 4 布局骨架 5 组件 6 头部 7 页脚 8 动效降级
   ============================================================ */

/* 1. 设计变量 */
:root {
  --ink: #05070D;
  --stand: #0C1424;
  --steel: #16223A;
  --line: #2A3A55;
  --neon: #C6FF3D;
  --orange: #FF7A29;
  --paper: #F4F8FF;
  --body-c: #A9B6CC;
  --muted: #6B7A93;
  --signal: #35E5C0;

  --rail-w: 76px;
  --bar-h: 64px;
  --pad-x: clamp(18px, 4vw, 56px);
  --dur: 240ms;
  --dur-fast: 120ms;

  --font-display: 'Archivo Black', 'HarmonyOS Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-body: 'Inter', 'Noto Sans SC', system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* 2. 复位 */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--ink);
}
body {
  margin: 0;
  background: var(--ink);
  color: var(--body-c);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  overflow-x: hidden;
}
body.is-nav-open { overflow: hidden; }

h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img, svg, video { display: block; max-width: 100%; height: auto; }
table { border-collapse: collapse; width: 100%; }
::selection { background: var(--neon); color: var(--ink); }

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

/* 3. 中文排版与标题层级 */
.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--neon);
  line-height: 1.4;
}
.eyebrow--muted { color: var(--muted); }

.display {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(38px, 7vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--paper);
}
.h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(26px, 3.4vw, 42px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: var(--paper);
}
.h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--paper);
}
.lede {
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.7;
  color: var(--body-c);
  max-width: 38ch;
}
.prose { max-width: 38ch; }
.prose p { margin-bottom: 1.1em; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--paper); font-weight: 700; }

/* 4. 布局骨架 */
.wrap {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: var(--pad-x);
}
.section { padding-block: clamp(32px, 6vw, 72px); }

.grid { display: grid; gap: clamp(16px, 2.4vw, 32px); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) {
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .grid--2, .grid--3 { grid-template-columns: minmax(0, 1fr); }
}

.frame {
  position: relative;
  padding: clamp(20px, 3.2vw, 44px);
  border: 1px solid var(--line);
  background-color: var(--ink);
  background-image:
    linear-gradient(var(--neon), var(--neon)), linear-gradient(var(--neon), var(--neon)),
    linear-gradient(var(--neon), var(--neon)), linear-gradient(var(--neon), var(--neon)),
    linear-gradient(var(--neon), var(--neon)), linear-gradient(var(--neon), var(--neon)),
    linear-gradient(var(--neon), var(--neon)), linear-gradient(var(--neon), var(--neon));
  background-repeat: no-repeat;
  background-size: 18px 1px, 1px 18px, 18px 1px, 1px 18px, 18px 1px, 1px 18px, 18px 1px, 1px 18px;
  background-position:
    0 0, 0 0,
    100% 0, 100% 0,
    0 100%, 0 100%,
    100% 100%, 100% 100%;
}

.rule { height: 1px; border: 0; background: var(--line); }
.tick-rule {
  height: 10px;
  border-top: 1px solid var(--line);
  background-image: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 12px);
  background-repeat: repeat-x;
}

/* 5. 基础组件 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  line-height: 1;
  white-space: nowrap;
  transition: color var(--dur) ease, background-color var(--dur) ease, border-color var(--dur) ease;
}
.btn:hover { color: var(--neon); border-color: var(--neon); }
.btn--primary {
  background: var(--neon);
  border-color: var(--neon);
  color: var(--ink);
  font-weight: 700;
}
.btn--primary:hover { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.btn--ghost { border-color: var(--line); color: var(--body-c); }
.btn--ghost:hover { color: var(--neon); border-color: var(--neon); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  color: var(--body-c);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.4;
}
.tag--live { color: var(--orange); border-color: var(--orange); }
.tag--ok { color: var(--signal); border-color: var(--signal); }

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 18px 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.crumbs a { color: var(--body-c); border-bottom: 1px solid transparent; transition: color var(--dur) ease, border-color var(--dur) ease; }
.crumbs a:hover { color: var(--neon); border-bottom-color: var(--neon); }
.crumbs__sep { color: var(--line); }
.crumbs [aria-current="page"] { color: var(--paper); }

/* 图片容器基础：页面阶段直接放入 <img> */
.media-figure { margin: 0; }
.media {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  background-color: var(--steel);
  background-image:
    repeating-linear-gradient(135deg, rgba(42, 58, 85, 0.55) 0 1px, transparent 1px 22px),
    radial-gradient(circle at 20% 0%, rgba(198, 255, 61, 0.14), transparent 62%);
}
.media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(0deg, rgba(42, 58, 85, 0.5) 0 1px, transparent 1px 22px);
}
.media img { width: 100%; height: 100%; object-fit: cover; }
.media--wide { aspect-ratio: 16 / 9; }
.media--tall { aspect-ratio: 3 / 4; }
.media--square { aspect-ratio: 1 / 1; }
.media__cap {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* 折叠索引组 */
.collapse { border-bottom: 1px solid var(--line); }
.collapse__trigger {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 52px;
  padding: 0 4px;
  text-align: left;
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  transition: color var(--dur) ease;
}
.collapse__trigger::after {
  content: "+";
  margin-left: auto;
  color: var(--neon);
  font-size: 18px;
  line-height: 1;
}
.collapse__trigger[aria-expanded="true"]::after { content: "–"; }
.collapse__trigger:hover { color: var(--neon); }
.collapse__panel { padding: 0 4px 18px; color: var(--body-c); font-size: 15px; }

/* 章节高亮协议 */
[data-chapter] { scroll-margin-top: calc(var(--bar-h) + 20px); }
[data-chapter].is-chapter-active .eyebrow { color: var(--orange); }

/* 6. 头部 */
.site-header { position: relative; z-index: 90; }

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 300;
  padding: 10px 16px;
  background: var(--neon);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  transform: translateY(-160%);
  transition: transform var(--dur) ease;
}
.skip-link:focus,
.skip-link:focus-visible { transform: translateY(0); outline-offset: 2px; }

/* 轨道柱：桌面端常驻 */
.rail { display: none; }
@media (min-width: 1024px) {
  body { padding-left: var(--rail-w); }
  .rail {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 120;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: var(--rail-w);
    padding: 14px 0 12px;
    background: var(--stand);
    border-right: 1px solid var(--line);
    overflow-y: auto;
    scrollbar-width: none;
  }
  .rail::-webkit-scrollbar { display: none; }
}

.rail__brand {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: none;
  border: 1px solid var(--line);
  color: var(--neon);
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.04em;
  transition: border-color var(--dur) ease, color var(--dur) ease;
}
.rail__brand:hover { border-color: var(--neon); color: var(--paper); }
.rail__brand-text { line-height: 1; }

.rail__util {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  width: 100%;
}
.rail__util-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  padding: 10px 0;
  border: 1px solid transparent;
  color: var(--muted);
  transition: color var(--dur) ease, border-color var(--dur) ease;
}
.rail__util-link:hover,
.rail__util-link:focus-visible { color: var(--neon); border-color: var(--line); }
.rail__util-text {
  writing-mode: vertical-rl;
  font-size: 11px;
  letter-spacing: 0.18em;
  line-height: 1;
}

.rail__nav {
  width: 100%;
  margin: auto 0;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.rail__list { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.rail__link {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 100%;
  padding: 10px 0;
  color: var(--muted);
  transition: color var(--dur) ease;
}
.rail__coord {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--line);
  transition: color var(--dur) ease;
}
.rail__text {
  writing-mode: vertical-rl;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.24em;
}
.rail__link:hover { color: var(--paper); }
.rail__link:hover .rail__coord { color: var(--muted); }
.rail__link[aria-current="page"] { color: var(--neon); }
.rail__link[aria-current="page"] .rail__coord { color: var(--neon); }
.rail__link[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--neon);
}

.rail__foot {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
}
.rail__foot-text { writing-mode: vertical-rl; line-height: 1; letter-spacing: 0.2em; }

/* 顶部横梁 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 7, 13, 0.95);
  border-bottom: 1px solid var(--steel);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.topbar__inner {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: var(--bar-h);
  padding: 0 var(--pad-x);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
  padding: 6px 0;
}
.brand__mark {
  position: relative;
  width: 26px;
  height: 26px;
  flex: none;
  border: 1px solid var(--neon);
  background-image: linear-gradient(135deg, transparent 46%, var(--neon) 46%, var(--neon) 54%, transparent 54%);
}
.brand__mark::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -1px;
  width: 8px;
  height: 2px;
  background: var(--orange);
}
.brand__text { display: flex; flex-direction: column; gap: 2px; }
.brand__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--paper);
}
.brand__tagline {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--muted);
  line-height: 1.3;
  white-space: nowrap;
}
.topbar__cta { flex: none; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  min-width: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  transition: color var(--dur) ease, border-color var(--dur) ease;
}
.nav-toggle:hover { color: var(--neon); border-color: var(--neon); }
.nav-toggle__bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: background-color var(--dur) ease;
}
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform var(--dur) 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); }
.nav-toggle__label { line-height: 1; }

@media (min-width: 1024px) {
  .nav-toggle { display: none; }
}
@media (max-width: 560px) {
  .topbar__cta { display: none; }
  .brand__tagline { display: none; }
  .brand__name { font-size: 16px; }
}

.progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 2px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background-image: linear-gradient(90deg, var(--neon), var(--signal));
  z-index: 2;
}

/* 移动抽屉 */
.drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 130;
  display: flex;
  flex-direction: column;
  width: min(84vw, 320px);
  background: var(--stand);
  border-right: 1px solid var(--line);
  transform: translateX(-100%);
  visibility: hidden;
  overflow-y: auto;
  transition: transform var(--dur) ease, visibility var(--dur) ease;
}
.drawer[data-open] { transform: translateX(0); visibility: visible; }
.drawer-scrim {
  position: fixed;
  inset: 0;
  z-index: 125;
  background: rgba(3, 5, 10, 0.74);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur) ease;
}
.drawer-scrim[data-open] { opacity: 1; pointer-events: auto; }
@media (min-width: 1024px) {
  .drawer, .drawer-scrim { display: none; }
}

.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.drawer__title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--muted);
}
.drawer__close {
  min-height: 44px;
  min-width: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  transition: color var(--dur) ease, border-color var(--dur) ease;
}
.drawer__close:hover { color: var(--neon); border-color: var(--neon); }

.drawer__nav { padding: 6px 0; }
.drawer__list { display: flex; flex-direction: column; }
.drawer__item { border-bottom: 1px solid rgba(42, 58, 85, 0.6); }
.drawer__link {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 0 18px;
  color: var(--body-c);
  transition: color var(--dur) ease, background-color var(--dur) ease;
}
.drawer__coord {
  min-width: 52px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--line);
  transition: color var(--dur) ease;
}
.drawer__text { font-size: 15px; letter-spacing: 0.04em; }
.drawer__link:hover { background: var(--steel); color: var(--paper); }
.drawer__link[aria-current="page"] {
  color: var(--neon);
  box-shadow: inset 3px 0 0 var(--neon);
}
.drawer__link[aria-current="page"] .drawer__coord { color: var(--neon); }

.drawer__foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  padding: 14px 18px 26px;
  border-top: 1px solid var(--line);
}
.drawer__util {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--body-c);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  transition: color var(--dur) ease;
}
.drawer__util:hover { color: var(--neon); }

/* 7. 页脚 */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 8vw, 96px);
  background: var(--stand);
  border-top: 1px solid var(--line);
}
.footer__rule {
  height: 8px;
  border-bottom: 1px solid var(--line);
  background-image: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 14px);
  background-repeat: repeat-x;
  background-position: 0 0;
}
.footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(24px, 4vw, 48px);
  padding: clamp(32px, 5vw, 56px) var(--pad-x) clamp(24px, 4vw, 40px);
}
@media (min-width: 760px) {
  .footer__inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .footer__inner { grid-template-columns: 1.3fr 0.8fr 1.1fr; }
}
.footer__col { min-width: 0; }
.footer__brand {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--paper);
  border-bottom: 1px solid transparent;
  transition: color var(--dur) ease, border-color var(--dur) ease;
}
.footer__brand:hover { color: var(--neon); border-bottom-color: var(--neon); }
.footer__line {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--neon);
}
.footer__note {
  margin-top: 14px;
  max-width: 38ch;
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
}
.footer__label {
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer__list { display: flex; flex-direction: column; gap: 2px; }
.footer__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 32px;
  font-size: 14px;
  color: var(--body-c);
  border-bottom: 1px solid transparent;
  transition: color var(--dur) ease, border-color var(--dur) ease;
}
.footer__link:hover { color: var(--neon); border-bottom-color: var(--neon); }
.footer__coord {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--line);
}
.footer__contact {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.7;
}
.footer__contact-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--muted);
}
.footer__contact-strong {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--paper);
  overflow-wrap: anywhere;
}
.footer__base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  padding: 16px var(--pad-x) 22px;
  border-top: 1px solid var(--line);
  background: var(--ink);
}
.footer__copy,
.footer__icp {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.footer__legal { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.footer__legal .footer__link { min-height: 28px; font-size: 12px; }
.footer__sep { color: var(--line); }

/* 8. 动效降级 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
  .drawer { transition: none; }
}
