/* ============================================================
   乐竞看台 · 共享样式 /assets/site.css
   夜场灯光底色 + 电光青强调 + 等宽索引体系
   ============================================================ */

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

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--ink-900);
  background-image:
    radial-gradient(900px 520px at 82% -8%, rgba(53, 240, 200, .13), transparent 62%),
    radial-gradient(760px 460px at -8% 6%, rgba(23, 168, 138, .12), transparent 58%),
    radial-gradient(820px 700px at 50% 118%, rgba(255, 90, 43, .07), transparent 60%),
    linear-gradient(180deg, #071815 0%, #050f0d 46%, #040b0a 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .45;
  background: repeating-linear-gradient(180deg, rgba(53, 240, 200, .05) 0 1px, transparent 1px 4px);
}

img,
svg,
video { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

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

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

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

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

[hidden] { display: none !important; }

/* ---------- 2. Tokens ---------- */
:root {
  --ink-900: #050f0d;
  --ink-850: #081815;
  --ink-800: #0b241f;
  --ink-700: #123b33;
  --line: #24443d;
  --line-soft: rgba(36, 68, 61, .62);

  --cyan: #35f0c8;
  --cyan-dim: #17a88a;
  --cyan-glow: rgba(53, 240, 200, .28);
  --flame: #ff5a2b;
  --amber: #ffb347;

  --text: #edf6f3;
  --muted: #8fa8a2;

  --shell: 1200px;
  --shell-pad: clamp(18px, 4vw, 40px);

  --r-xl: 28px;
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 12px;
  --r-pill: 999px;

  --ease: cubic-bezier(.22, .9, .24, 1);
  --t-fast: 150ms;
  --t-mid: 220ms;

  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Arial Narrow", "Helvetica Neue Condensed", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --header-h: 64px;
}

/* ---------- 3. Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1.18;
}

h1 { font-size: clamp(30px, 4.6vw, 52px); }
h2 { font-size: clamp(24px, 3vw, 36px); }
h3 { font-size: clamp(19px, 2.2vw, 24px); font-weight: 800; }
h4 { font-size: 17px; letter-spacing: -.01em; }

@media (min-width: 768px) {
  body { font-size: 17px; }
}

p { line-height: 1.78; }

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

.annotation {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .02em;
  color: var(--muted);
}

.measure { max-width: 68ch; }

.lede {
  font-size: clamp(16px, 1.7vw, 19px);
  line-height: 1.75;
  color: rgba(237, 246, 243, .88);
  max-width: 62ch;
}

/* ---------- 4. Focus ---------- */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 8px;
}

/* ---------- 5. Layout ---------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--shell-pad);
}

.shell--wide { max-width: 1360px; }

.section {
  position: relative;
  z-index: 1;
  padding-block: clamp(44px, 7vw, 88px);
}

.grid {
  display: grid;
  gap: clamp(16px, 2.2vw, 28px);
}

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

.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-9 { grid-column: span 9; }
.col-12 { grid-column: span 12; }

.grid--cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(14px, 1.8vw, 22px);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 60px);
  align-items: center;
}

.split-body { display: flex; flex-direction: column; gap: 18px; }

.split-visual {
  position: relative;
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(18, 59, 51, .78), rgba(5, 15, 13, .9));
  overflow: hidden;
  min-height: 280px;
}

.rule {
  height: 1px;
  border: 0;
  margin: 0;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

/* ---------- 6. Section head ---------- */
.sec-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: clamp(20px, 3vw, 34px);
}

.sec-index {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .18em;
  color: var(--cyan);
  text-transform: uppercase;
}

.sec-index::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--cyan-dim);
}

.sec-title { font-size: clamp(24px, 3vw, 34px); }

.sec-note {
  font-size: 14px;
  color: var(--muted);
  max-width: 62ch;
  line-height: 1.7;
}

/* ---------- 7. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: rgba(18, 59, 51, .55);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .03em;
  transition: transform var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease),
    background var(--t-fast) var(--ease), box-shadow var(--t-mid) var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
  border-color: var(--cyan-dim);
  background: rgba(23, 168, 138, .2);
}

.btn--primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--cyan), var(--cyan-dim));
  color: #03110e;
  font-weight: 800;
  box-shadow: 0 12px 30px rgba(23, 168, 138, .26);
}

.btn--primary:hover { box-shadow: 0 16px 38px rgba(53, 240, 200, .32); }

.btn--ghost {
  background: transparent;
  border-color: var(--cyan-dim);
  color: var(--cyan);
}

.btn--ghost:hover { background: rgba(53, 240, 200, .12); }

.btn--quiet {
  background: transparent;
  border-color: var(--line-soft);
  color: var(--muted);
  font-weight: 500;
}

.btn--quiet:hover { color: var(--text); background: rgba(18, 59, 51, .4); }

/* ---------- 8. Pills & tags ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: rgba(18, 59, 51, .5);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--muted);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  border: 1px solid var(--line);
  background: rgba(18, 59, 51, .55);
  color: var(--text);
}

.tag--cyan {
  border-color: rgba(53, 240, 200, .5);
  background: rgba(53, 240, 200, .14);
  color: var(--cyan);
}

.tag--flame {
  border-color: rgba(255, 90, 43, .5);
  background: rgba(255, 90, 43, .16);
  color: var(--flame);
}

.tag--amber {
  border-color: rgba(255, 179, 71, .45);
  background: rgba(255, 179, 71, .14);
  color: var(--amber);
}

/* ---------- 9. Cards & stats ---------- */
.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(18px, 2.2vw, 26px);
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(18, 59, 51, .62), rgba(8, 24, 21, .72));
  box-shadow: inset 0 1px 0 rgba(53, 240, 200, .07);
  transition: border-color var(--t-mid) var(--ease), transform var(--t-mid) var(--ease);
}

.card:hover {
  border-color: rgba(53, 240, 200, .42);
  transform: translateY(-2px);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.card-title { font-size: 18px; font-weight: 800; letter-spacing: -.01em; }

.card-note { font-size: 13px; color: var(--muted); line-height: 1.7; }

.card-body { font-size: 15px; line-height: 1.75; color: rgba(237, 246, 243, .86); }

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: rgba(18, 59, 51, .42);
}

.stat-value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--cyan);
  text-shadow: 0 0 22px rgba(53, 240, 200, .32);
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--muted);
}

.stat-delta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--flame);
}

/* ---------- 10. Board (专题研究板三级层次) ---------- */
.board {
  display: grid;
  gap: clamp(16px, 2vw, 24px);
  padding: clamp(20px, 3vw, 32px);
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(18, 59, 51, .72), rgba(8, 24, 21, .74));
  box-shadow: inset 0 1px 0 rgba(53, 240, 200, .08);
}

.board-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.board-summary {
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.66;
  color: var(--text);
  max-width: 62ch;
}

.board-evidence {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}

.board-extend {
  padding-top: 14px;
  border-top: 1px dashed var(--line-soft);
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}

.board-item { display: flex; flex-direction: column; gap: 6px; }

.board-item-key {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--cyan-dim);
}

/* ---------- 11. Index list (页面目录) ---------- */
.index-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 10px;
}

.index-item { min-width: 0; }

.index-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: baseline;
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  background: rgba(18, 59, 51, .35);
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease);
}

.index-link:hover,
.index-link:focus-visible {
  border-color: rgba(53, 240, 200, .45);
  background: rgba(23, 168, 138, .16);
  transform: translateY(-2px);
}

.index-code {
  grid-row: 1 / span 2;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--cyan);
}

.index-name { font-size: 15px; font-weight: 600; color: var(--text); }

.index-desc { font-size: 12px; color: var(--muted); letter-spacing: .02em; }

.index-empty { font-size: 13px; color: var(--amber); letter-spacing: .02em; }

/* ---------- 12. Breadcrumbs ---------- */
.crumbs {
  position: relative;
  z-index: 1;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 16px var(--shell-pad) 0;
}

.crumbs-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--muted);
}

.crumbs-item { display: inline-flex; align-items: center; gap: 8px; }

.crumbs-link {
  color: var(--muted);
  border-bottom: 1px solid transparent;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}

.crumbs-link:hover { color: var(--cyan); border-bottom-color: var(--cyan); }

.crumbs-sep { color: var(--cyan-dim); opacity: .6; }

.crumbs-current { color: var(--text); }

/* ---------- 13. Track & well (轮次轨道 / 时间井) ---------- */
.track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 6px 4px 18px;
  scroll-snap-type: x proximity;
  scrollbar-color: var(--cyan-dim) transparent;
}

.track > * {
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.well {
  position: relative;
  padding-left: 26px;
  border-left: 1px solid var(--line);
}

.well::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--cyan-dim), transparent);
}

.well-item { position: relative; padding-bottom: clamp(20px, 3vw, 34px); }

.well-item::before {
  content: "";
  position: absolute;
  left: -31px;
  top: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ink-900);
  border: 2px solid var(--cyan-dim);
}

/* ---------- 14. Media frame ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background-color: var(--ink-800);
  background-image:
    linear-gradient(150deg, rgba(18, 59, 51, .9), rgba(5, 15, 13, .95)),
    repeating-linear-gradient(45deg, rgba(53, 240, 200, .06) 0 1px, transparent 1px 12px);
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(5, 15, 13, 0) 52%, rgba(5, 15, 13, .74));
}

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

/* ---------- 15. Skip link ---------- */
.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  background: var(--cyan);
  color: #03110e;
  font-size: 14px;
  font-weight: 800;
  transition: top var(--t-mid) var(--ease);
}

.skip-link:focus { top: 12px; }

/* ---------- 16. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(5, 15, 13, .9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  transition: background var(--t-mid) var(--ease);
}

.site-header.is-tight { background: rgba(5, 15, 13, .97); }

.header-shell {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 26px);
  max-width: var(--shell);
  min-height: var(--header-h);
  margin-inline: auto;
  padding-inline: var(--shell-pad);
  transition: min-height var(--t-mid) var(--ease);
}

.site-header.is-tight .header-shell { min-height: 54px; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding: 6px 8px;
  border-radius: var(--r-md);
  transition: background var(--t-fast) var(--ease);
}

.brand:hover { background: rgba(53, 240, 200, .08); }

.brand-glyph {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  width: 24px;
  height: 22px;
}

.brand-glyph i {
  display: block;
  flex: 1 1 0;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--cyan), var(--cyan-dim));
  box-shadow: 0 0 10px rgba(53, 240, 200, .25);
}

.brand-glyph i:nth-child(1) { height: 38%; }
.brand-glyph i:nth-child(2) { height: 66%; }
.brand-glyph i:nth-child(3) { height: 100%; }

.brand-text { display: flex; flex-direction: column; line-height: 1.25; }

.brand-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: .01em;
  color: var(--text);
}

.brand-line {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .1em;
  color: var(--muted);
}

.nav {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}

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

.nav-item { position: relative; }

.nav-link {
  position: relative;
  display: block;
  padding: 9px 11px;
  border-radius: var(--r-pill);
  font-size: 13.5px;
  letter-spacing: .05em;
  color: var(--muted);
  white-space: nowrap;
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}

.nav-link::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--t-mid) var(--ease);
}

.nav-link::after {
  content: attr(data-hint);
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  transform: translateX(-50%) translateY(-4px);
  padding: 5px 11px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: rgba(11, 36, 31, .98);
  color: var(--text);
  font-size: 12px;
  letter-spacing: .04em;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease),
    visibility var(--t-fast);
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--text);
  background: rgba(18, 59, 51, .55);
}

.nav-link:hover::before,
.nav-link:focus-visible::before { transform: scaleX(1); opacity: .55; }

.nav-link:hover::after,
.nav-link:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-link[aria-current="page"] { color: var(--cyan); background: rgba(53, 240, 200, .08); }

.nav-link[aria-current="page"]::before {
  transform: scaleX(1);
  opacity: 1;
  box-shadow: 0 0 12px var(--cyan-glow);
}

.nav-foot { display: none; }

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

.nav-note { display: none; }

.header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex: 0 0 auto;
}

.index-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: rgba(18, 59, 51, .55);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease),
    background var(--t-fast) var(--ease);
}

.index-trigger:hover,
.index-trigger[aria-expanded="true"] {
  color: var(--text);
  border-color: var(--cyan-dim);
  background: rgba(23, 168, 138, .2);
}

.index-trigger-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  border-radius: 6px;
  background: rgba(53, 240, 200, .16);
  color: var(--cyan);
  font-size: 11px;
}

.cta-subscribe {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border-radius: var(--r-pill);
  background: linear-gradient(135deg, var(--cyan), var(--cyan-dim));
  color: #03110e;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .04em;
  white-space: nowrap;
  box-shadow: 0 0 0 1px rgba(53, 240, 200, .4), 0 10px 26px rgba(23, 168, 138, .26);
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-mid) var(--ease);
}

.cta-subscribe:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px var(--cyan), 0 14px 34px rgba(53, 240, 200, .32);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: rgba(18, 59, 51, .6);
  color: var(--text);
  font-size: 13px;
  letter-spacing: .06em;
}

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

.nav-toggle-bars i {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--cyan);
  transition: transform var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease);
}

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

/* --- 索引面板 --- */
.index-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 70;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(8, 24, 21, .99), rgba(5, 15, 13, .99));
  box-shadow: 0 34px 70px rgba(0, 0, 0, .52);
}

.index-shell {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 22px var(--shell-pad) 30px;
}

.index-head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
}

.index-head-key {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .18em;
  color: var(--cyan);
}

.index-head-text { font-size: 13px; letter-spacing: .02em; color: var(--muted); }

.index-field {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: rgba(18, 59, 51, .4);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}

.index-field:focus-within {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(53, 240, 200, .14);
}

.index-field-label {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--muted);
}

.index-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  outline: none;
}

.index-input::placeholder { color: rgba(143, 168, 162, .72); }

/* ---------- 17. Footer ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: clamp(48px, 7vw, 96px);
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(8, 24, 21, .55), rgba(4, 11, 10, .96));
}

.footer-shell {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.3fr 1fr;
  gap: clamp(20px, 3vw, 38px);
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(36px, 5vw, 60px) var(--shell-pad) 30px;
}

.footer-brand { display: flex; flex-direction: column; gap: 8px; }

.footer-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: .01em;
  color: var(--text);
}

.footer-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--muted);
  line-height: 1.7;
}

.footer-sign {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 30px;
  margin-top: 10px;
}

.footer-sign span {
  display: block;
  width: 6px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--cyan), var(--cyan-dim));
  opacity: .85;
}

.footer-sign span:nth-child(1) { height: 38%; opacity: .35; }
.footer-sign span:nth-child(2) { height: 56%; opacity: .5; }
.footer-sign span:nth-child(3) { height: 74%; opacity: .65; }
.footer-sign span:nth-child(4) { height: 92%; opacity: .8; }
.footer-sign span:nth-child(5) { height: 100%; background: linear-gradient(180deg, var(--amber), var(--flame)); }

.footer-col { display: flex; flex-direction: column; gap: 12px; }

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--cyan);
}

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

.footer-link {
  font-size: 14px;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  align-self: flex-start;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}

.footer-link:hover { color: var(--text); border-bottom-color: var(--cyan-dim); }

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

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

.footer-meta-key {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--muted);
}

.footer-meta-val {
  font-size: 13px;
  color: rgba(237, 246, 243, .86);
  word-break: break-all;
}

.footer-base {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 20px var(--shell-pad) 34px;
  border-top: 1px dashed var(--line-soft);
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
}

.footer-note { color: rgba(143, 168, 162, .9); }

.footer-contact { color: rgba(237, 246, 243, .78); }

.footer-legal-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  letter-spacing: .06em;
}

.footer-icp { color: rgba(237, 246, 243, .7); }

.footer-dot { color: var(--line); }

.footer-year { color: var(--muted); }

/* ---------- 18. To top ---------- */
.to-top {
  position: fixed;
  right: clamp(14px, 3vw, 32px);
  bottom: clamp(14px, 3vw, 32px);
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  border: 1px solid var(--cyan-dim);
  background: rgba(11, 36, 31, .94);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .1em;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--t-mid) var(--ease), transform var(--t-mid) var(--ease),
    visibility var(--t-mid), background var(--t-fast) var(--ease);
}

.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }

.to-top:hover { background: rgba(23, 168, 138, .28); }

.to-top-arrow {
  display: block;
  width: 8px;
  height: 8px;
  border-left: 2px solid var(--cyan);
  border-top: 2px solid var(--cyan);
  transform: rotate(45deg);
}

/* ---------- 19. Reveal ---------- */
.js-ready [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
}

.js-ready [data-reveal].is-inview {
  opacity: 1;
  transform: none;
  transition: opacity 260ms var(--ease), transform 260ms var(--ease);
}

/* ---------- 20. Section spy ---------- */
[data-section-link].is-current {
  color: var(--cyan);
  border-color: var(--cyan-dim);
}

/* ---------- 21. Responsive ---------- */
@media (max-width: 1080px) {
  .footer-shell { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: span 2; }
}

@media (max-width: 1024px) {
  .col-3, .col-4, .col-5 { grid-column: span 6; }
  .col-7, .col-8, .col-9 { grid-column: span 12; }
}

@media (max-width: 980px) {
  .nav {
    position: absolute;
    top: calc(100% + 8px);
    left: var(--shell-pad);
    right: var(--shell-pad);
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: linear-gradient(180deg, rgba(11, 36, 31, .99), rgba(8, 24, 21, .99));
    box-shadow: 0 30px 70px rgba(0, 0, 0, .55);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity var(--t-mid) var(--ease), transform var(--t-mid) var(--ease),
      visibility var(--t-mid);
  }

  .nav[data-open] {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    width: 100%;
  }

  .nav-link {
    padding: 12px 14px 12px 18px;
    font-size: 15px;
    color: var(--text);
    background: rgba(18, 59, 51, .35);
    border-radius: 14px;
  }

  .nav-link::after { display: none; }

  .nav-link::before {
    left: 8px;
    right: auto;
    top: 12px;
    bottom: 12px;
    width: 3px;
    height: auto;
    transform: scaleY(0);
    transform-origin: top center;
  }

  .nav-link:hover::before,
  .nav-link:focus-visible::before { transform: scaleY(1); opacity: 1; }

  .nav-link[aria-current="page"] {
    color: var(--cyan);
    background: rgba(53, 240, 200, .1);
  }

  .nav-link[aria-current="page"]::before { transform: scaleY(1); }

  .nav-foot {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--line-soft);
  }

  .nav-cta-mini {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border-radius: var(--r-pill);
    background: linear-gradient(135deg, var(--cyan), var(--cyan-dim));
    color: #03110e;
    font-weight: 800;
    letter-spacing: .04em;
  }

  .nav-note {
    display: block;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: .04em;
    color: var(--muted);
  }

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

  .index-trigger-label { display: none; }

  .split { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-12 {
    grid-column: span 12;
  }

  .index-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .footer-shell { grid-template-columns: 1fr; }
  .footer-brand { grid-column: span 1; }
  .brand-line { display: none; }
  .nav-toggle-text { display: none; }
  .to-top-text { display: none; }
  .to-top { padding: 12px; }
}

@media (max-width: 420px) {
  .cta-subscribe { padding: 9px 13px; font-size: 13px; }
}

/* ---------- 22. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

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

  .track { scroll-behavior: auto; }
}
