/* =========================================================
   AB赛场 · 共享 Site Kit  /assets/site.css
   夜场边线通道 · 堆叠面板 · 信号青柠
   ========================================================= */

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

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

body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

img, svg, video { max-width: 100%; height: auto; }

button, input, select, textarea { font: inherit; color: inherit; }

button { background: none; border: none; cursor: pointer; }

/* ---------- 2. 变量 ---------- */
:root {
  --ink: #061A13;
  --panel: #0B2A20;
  --line: #1E4636;
  --lime: #C8FF3D;
  --lime-soft: #E4FFA3;
  --amber: #FFB43A;
  --white: #EDF7EF;
  --mist: #9CB7A6;
  --deep: #0F3B33;
  --coral: #FF6B5E;
  --paper: #F1F5E8;
  --teal: #7DE0C3;

  --rail-w: 272px;
  --gutter: clamp(18px, 3.6vw, 46px);
  --radius: 6px;

  --font-display: "Barlow Condensed", "HarmonyOS Sans SC", "Source Han Sans SC",
    "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", "Roboto Mono", SFMono-Regular, Consolas,
    "Courier New", monospace;
}

/* ---------- 3. 基础排版 ---------- */
html { background: var(--ink); }

body {
  padding-left: var(--rail-w);
  background-color: var(--ink);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.015em;
  color: var(--white);
  text-wrap: balance;
}

h1 { font-size: clamp(30px, 4.4vw, 52px); }
h2 { font-size: clamp(24px, 3vw, 36px); }
h3 { font-size: clamp(19px, 2.1vw, 24px); }
h4 { font-size: 18px; }

p { max-width: 42em; }

a {
  color: var(--lime);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.16s ease;
}

a:hover { color: var(--lime-soft); }

strong { color: var(--white); font-weight: 700; }

em { color: var(--amber); font-style: normal; }

code, kbd, samp {
  font-family: var(--font-mono);
  font-size: 0.92em;
  color: var(--lime-soft);
}

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

:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(6, 26, 19, 0.9);
  border-radius: 3px;
}

#main-content {
  display: block;
  scroll-margin-top: 24px;
}

/* ---------- 4. 跳过链接 ---------- */
.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 400;
  padding: 11px 18px;
  background: var(--lime);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 4px;
  transform: translateY(-180%);
  transition: transform 0.18s ease;
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  color: var(--ink);
}

/* ---------- 5. 头部：左侧边线通道 ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 120;
  display: flex;
  flex-direction: column;
  width: var(--rail-w);
  padding: 24px 22px 20px;
  background: linear-gradient(180deg, #082117 0%, #04140E 100%);
  border-right: 1px solid var(--line);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.site-header::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 1px;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(200, 255, 61, 0.35) 0 9px,
    transparent 9px 26px
  );
}

/* 品牌舱 */
.rail-brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  text-decoration: none;
}

.brand:hover { color: var(--white); }

.brand-mark {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: var(--lime);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  clip-path: polygon(0 0, 100% 0, 100% 64%, 64% 100%, 0 100%);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.01em;
}

.brand-note {
  font-size: 12px;
  line-height: 1.45;
  letter-spacing: 0.05em;
  color: var(--mist);
}

/* 移动端栏目按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: transparent;
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.nav-toggle:hover {
  border-color: var(--lime);
  background: rgba(200, 255, 61, 0.1);
}

.nav-toggle-lines {
  position: relative;
  display: block;
  width: 16px;
  height: 2px;
  background: var(--white);
  box-shadow: 0 -5px 0 var(--white), 0 5px 0 var(--white);
  transition: background-color 0.18s ease;
}

.site-header[data-open="true"] .nav-toggle-lines {
  background: var(--lime);
  box-shadow: 0 -5px 0 var(--lime), 0 5px 0 var(--lime);
}

.nav-toggle-label { line-height: 1; }

/* 栏目板 */
.rail-panel {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.rail-hint {
  margin: 18px 0 14px;
  padding-left: 11px;
  border-left: 2px solid var(--line);
  font-size: 12.5px;
  line-height: 1.6;
  letter-spacing: 0.02em;
  color: var(--mist);
  max-width: none;
}

.rail-nav { flex: 1 1 auto; }

.nav-list { display: block; }

.nav-item + .nav-item { border-top: 1px solid rgba(30, 70, 54, 0.6); }

.nav-link {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: baseline;
  gap: 6px;
  padding: 11px 8px 11px 14px;
  color: var(--mist);
  font-size: 15px;
  line-height: 1.35;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.nav-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 2px;
  height: 13px;
  transform: translateY(-50%);
  background: var(--line);
  transition: background-color 0.18s ease, height 0.18s ease;
}

.nav-link:hover {
  color: var(--white);
  background: rgba(200, 255, 61, 0.07);
  transform: translateX(2px);
}

.nav-link:hover::before {
  background: var(--teal);
  height: 22px;
}

.nav-link[aria-current="page"] {
  color: var(--lime);
  font-weight: 700;
  background: rgba(200, 255, 61, 0.1);
}

.nav-link[aria-current="page"]::before {
  width: 3px;
  height: 100%;
  background: var(--lime);
}

.nav-index {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  color: var(--line);
}

.nav-link:hover .nav-index { color: var(--teal); }

.nav-link[aria-current="page"] .nav-index { color: var(--amber); }

.nav-label { display: block; }

/* 轨道尾部 */
.rail-foot {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rail-pulse {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--lime);
}

.rail-pulse::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 3px rgba(200, 255, 61, 0.18);
}

.rail-utility {
  font-size: 12px;
  line-height: 1.55;
  color: var(--mist);
  max-width: none;
}

/* ---------- 6. 页脚：四层堆叠 ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(56px, 8vw, 112px);
  background: linear-gradient(180deg, #061A13 0%, #040F0B 100%);
  border-top: 1px solid var(--line);
  color: var(--mist);
  font-size: 14px;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  opacity: 0.55;
  background: repeating-linear-gradient(
    to right,
    var(--lime) 0 22px,
    transparent 22px 44px
  );
}

.footer-inner {
  max-width: 1180px;
  margin-inline: auto;
  padding: clamp(38px, 5.5vw, 70px) var(--gutter) 30px;
}

.footer-head {
  display: grid;
  grid-template-columns: minmax(200px, 290px) minmax(0, 1fr);
  gap: 26px 40px;
  align-items: start;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  text-decoration: none;
}

.footer-brand:hover { color: var(--white); }

.footer-brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.footer-brand-name {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.01em;
}

.footer-brand-note {
  font-size: 12px;
  line-height: 1.45;
  letter-spacing: 0.04em;
  color: var(--mist);
}

.footer-summary {
  font-size: 15.5px;
  line-height: 1.8;
  color: var(--white);
  max-width: 46ch;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26px 32px;
  padding: 32px 0 30px;
}

.footer-col:nth-child(2) { margin-top: 16px; }
.footer-col:nth-child(3) { margin-top: 32px; }
.footer-col--contact { margin-top: 0; }

.footer-col-title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  line-height: 1.2;
  color: var(--lime);
}

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

.footer-link {
  display: inline-block;
  color: var(--mist);
  font-size: 14.5px;
  line-height: 1.5;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.16s ease, border-color 0.16s ease;
}

.footer-link:hover {
  color: var(--white);
  border-bottom-color: var(--lime);
}

.footer-link[aria-current="page"] {
  color: var(--lime);
  font-weight: 700;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.contact-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--teal);
}

.contact-value {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.62;
  color: var(--white);
  overflow-wrap: anywhere;
}

.footer-note {
  margin: 0 0 26px;
  padding-left: 12px;
  border-left: 2px solid var(--line);
  font-size: 13px;
  line-height: 1.7;
  color: var(--mist);
  max-width: 62ch;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--mist);
}

.footer-copy,
.footer-icp { margin: 0; max-width: none; }

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-left: auto;
}

.footer-legal-link {
  color: var(--mist);
  font-size: 12px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.16s ease, border-color 0.16s ease;
}

.footer-legal-link:hover {
  color: var(--lime);
  border-bottom-color: var(--lime);
}

/* ---------- 7. 通用布局 ---------- */
.wrap {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(38px, 5.5vw, 76px);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--stack-gap, 16px);
}

.rule {
  height: 1px;
  border: 0;
  margin: clamp(24px, 3.6vw, 44px) 0;
  background: repeating-linear-gradient(
    to right,
    var(--line) 0 12px,
    transparent 12px 24px
  );
}

/* ---------- 8. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border: 1px solid var(--lime);
  border-radius: 4px;
  background: var(--lime);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease,
    border-color 0.18s ease, transform 0.18s ease;
}

.btn:hover {
  background: var(--lime-soft);
  border-color: var(--lime-soft);
  color: var(--ink);
  transform: translateY(-2px);
}

.btn:active { transform: translateY(0); }

.btn--ghost {
  background: transparent;
  color: var(--lime);
  border-color: var(--line);
}

.btn--ghost:hover {
  background: rgba(200, 255, 61, 0.12);
  border-color: var(--lime);
  color: var(--lime-soft);
}

/* ---------- 9. 面包屑 ---------- */
.breadcrumb { margin-bottom: 20px; }

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  color: var(--mist);
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  margin-right: 10px;
  color: var(--line);
}

.breadcrumb-item a {
  color: var(--mist);
  text-decoration: none;
}

.breadcrumb-item a:hover { color: var(--lime); }

.breadcrumb-item[aria-current="page"] { color: var(--white); }

/* ---------- 10. 标签 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid rgba(200, 255, 61, 0.32);
  border-radius: 2px;
  background: rgba(200, 255, 61, 0.14);
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  line-height: 1.5;
}

.tag--amber {
  background: rgba(255, 180, 58, 0.14);
  border-color: rgba(255, 180, 58, 0.36);
  color: var(--amber);
}

.tag--live {
  background: rgba(255, 107, 94, 0.16);
  border-color: rgba(255, 107, 94, 0.36);
  color: var(--coral);
}

/* ---------- 11. 面板 ---------- */
.panel {
  position: relative;
  padding: clamp(18px, 2.6vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  transition: border-color 0.18s ease, transform 0.18s ease,
    box-shadow 0.18s ease;
}

.panel--lift:hover {
  border-color: var(--lime);
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.36);
}

.panel--cut {
  border: 0;
  border-radius: 0;
  box-shadow: inset 0 0 0 1px var(--line);
  clip-path: polygon(
    0 0,
    calc(100% - 24px) 0,
    100% 24px,
    100% 100%,
    24px 100%,
    0 calc(100% - 24px)
  );
}

.panel--cut:hover {
  box-shadow: inset 0 0 0 1px var(--lime);
}

/* ---------- 12. 文本零件 ---------- */
.kicker {
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--lime);
  max-width: none;
}

.chapter-index {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(30px, 5vw, 58px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 0.9;
  color: transparent;
  -webkit-text-stroke: 1px var(--lime);
}

.score-figure {
  display: inline-block;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.84;
  color: var(--amber);
}

/* ---------- 13. 数据表 ---------- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  font-variant-numeric: tabular-nums;
}

.data-table caption {
  padding-bottom: 10px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  color: var(--mist);
}

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

.data-table thead th {
  background: rgba(15, 59, 51, 0.65);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--mist);
}

.data-table tbody tr {
  transition: background-color 0.16s ease, box-shadow 0.16s ease;
}

.data-table tbody tr:hover {
  background: rgba(200, 255, 61, 0.07);
}

.data-table tbody tr:hover td:first-child {
  box-shadow: inset 3px 0 0 var(--lime);
}

.data-table .is-up { color: var(--lime); }
.data-table .is-down { color: var(--coral); }

/* ---------- 14. 图片容器 ---------- */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--deep);
  aspect-ratio: 16 / 9;
}

.media-frame > img,
.media-frame > picture > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.06);
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.42;
  mix-blend-mode: overlay;
  background-image: radial-gradient(rgba(237, 247, 239, 0.5) 0.5px, transparent 0.5px);
  background-size: 3px 3px;
}

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

.media-caption {
  margin-top: 10px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--mist);
}

/* ---------- 15. 滚动进度 ---------- */
.scroll-meter {
  position: fixed;
  top: 0;
  left: var(--rail-w);
  right: 0;
  height: 3px;
  z-index: 200;
  pointer-events: none;
  background: rgba(30, 70, 54, 0.5);
}

.scroll-meter-fill {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--lime), var(--amber));
  transition: width 0.1s linear;
}

/* ---------- 16. 显现 ---------- */
html.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

html.js-reveal [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- 17. 响应式 ---------- */
@media (max-width: 1080px) {
  :root { --rail-w: 0px; }

  body { padding-left: 0; }

  .site-header {
    position: sticky;
    top: 0;
    left: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    padding: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: rgba(6, 26, 19, 0.96);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    overflow: visible;
  }

  .site-header::before { display: none; }

  .rail-brand {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 18px;
    border-bottom: 0;
  }

  .brand-note { display: none; }

  .nav-toggle { display: inline-flex; }

  .rail-panel {
    display: none;
    padding: 4px 18px 18px;
    border-top: 1px solid var(--line);
  }

  .site-header[data-open="true"] .rail-panel {
    display: flex;
    animation: panel-in 0.2s ease both;
  }

  .rail-hint { margin: 14px 0 10px; }

  .nav-link {
    grid-template-columns: 34px 1fr;
    padding: 13px 8px 13px 16px;
    font-size: 16px;
  }

  .nav-index { font-size: 12px; }

  .rail-foot {
    margin-top: 16px;
    padding-top: 14px;
  }

  #main-content { scroll-margin-top: 84px; }

  .scroll-meter { left: 0; }
}

@keyframes panel-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 900px) {
  .footer-head {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .footer-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-col:nth-child(2),
  .footer-col:nth-child(3),
  .footer-col--contact { margin-top: 0; }
}

@media (max-width: 560px) {
  body { font-size: 15.5px; }

  .brand-name { font-size: 21px; }

  .footer-columns {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 26px 0 24px;
  }

  .footer-legal {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .footer-legal-links {
    margin-left: 0;
    gap: 8px 16px;
  }

  .footer-summary { font-size: 15px; }
}

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

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

  .scroll-meter-fill { transition: none; }
}
