/* ============================================================
   VOLTERRA — Monochrome Terminal · predator–prey monitor
   Black / white / grey. No neon, no color cues.
   Two series are distinguished by LINE STYLE, never by hue.
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* palette drawn from the lion-hunt painting: dark green-black,
     sage/mint text, sea-green phosphor accent */
  --bg:        #0a130d;
  --fg:        #cfe3d0;
  --fg-bold:   #edf8ed;
  --fg-soft:   #82a78b;
  --fg-faded:  #41624c;
  --fg-dim:    #1c2b22;
  --glow:      #5cc78a;
  --font-mono: 'IBM Plex Mono', 'Noto Sans Mono', 'Courier New', monospace;
  --font-cn:   'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-num:  'VT323', monospace;
}

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}
html { scroll-behavior: smooth; }

/* CRT scanlines + vignette */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 2px,
    rgba(120, 220, 160, 0.03) 2px,
    rgba(120, 220, 160, 0.03) 3px
  );
  pointer-events: none;
  z-index: 2;
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 52%, rgba(0,0,0,0.5) 100%);
  pointer-events: none;
  z-index: 1;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 40px;
  position: relative;
  z-index: 3;
}

::selection { background: var(--fg-bold); color: var(--bg); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--fg-faded); }
::-webkit-scrollbar-thumb:hover { background: var(--fg-soft); }

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

@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
@keyframes blink { 0%,50% { opacity: 1; } 51%,100% { opacity: 0; } }

/* ============ STATUS BAR ============ */
.status-bar {
  margin: 24px 0 26px;
  border: 1px solid var(--fg-faded);
  padding: 8px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--fg-soft);
  flex-wrap: wrap;
  gap: 8px;
}
.status-bar .name { color: var(--fg-bold); font-weight: 700; letter-spacing: 1px; }
.status-bar .name.status-live { color: var(--fg-soft); font-weight: 500; letter-spacing: 1.5px; text-transform: uppercase; font-size: 11px; }
.status-bar .name .live-dot {
  display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%;
  background: var(--glow); box-shadow: 0 0 7px var(--glow); animation: pulse 1.8s infinite ease-in-out;
}
.status-bar-right { display: flex; align-items: center; gap: 10px; }
.status-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 84px; height: 26px; padding: 0 12px;
  background: var(--fg); color: var(--bg);
  border: 1px solid var(--fg);
  font-family: var(--font-mono); font-size: 10px; font-weight: 700;
  letter-spacing: 1.8px; line-height: 1; text-transform: uppercase;
  cursor: pointer; transition: all 0.15s; appearance: none; -webkit-appearance: none;
}
.status-btn:hover { background: var(--fg-bold); color: var(--bg); border-color: var(--fg-bold); }
.status-btn.ghost { background: transparent; color: var(--fg-soft); border-color: var(--fg-faded); }
.status-btn.ghost:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* ============ HEADER / LION BANNER ============ */
.header { padding-bottom: 4px; }
.banner-wrap {
  position: relative; overflow: hidden;
  border: 1px solid var(--fg-faded);
  background: #000;
}
.banner-img {
  display: block; width: 100%; height: auto;
  max-height: 240px; object-fit: cover; object-position: center 35%;
}
/* bottom scrim so the wordmark stays legible over the painting */
.banner-wrap::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 70%;
  background: linear-gradient(to top, rgba(0,0,0,0.85), rgba(0,0,0,0) 100%);
  pointer-events: none;
}
.banner-word {
  position: absolute; left: 24px; bottom: 14px; z-index: 1;
  font-family: 'Martian Mono', var(--font-mono); font-weight: 700;
  font-size: clamp(34px, 7.4vw, 78px); line-height: 0.95;
  letter-spacing: -1px; color: var(--fg-bold);
  text-shadow: 0 0 16px rgba(92,199,138,0.5), 0 2px 14px rgba(0,0,0,0.88);
}
.logo-tag {
  font-family: var(--font-mono); font-size: 11px; color: var(--fg-soft);
  letter-spacing: 4px; text-transform: uppercase; margin-top: 14px;
}
@media (max-width: 540px) { .banner-img { max-height: 160px; } .banner-word { left: 14px; bottom: 8px; } }

/* ============ TICKER ============ */
.ticker-bar {
  border: 1px solid var(--fg-faded);
  overflow: hidden; margin: 22px 0 40px;
  background: var(--bg); position: relative; z-index: 3;
}
.ticker-bar::before, .ticker-bar::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 60px; z-index: 2; pointer-events: none;
}
.ticker-bar::before { left: 0;  background: linear-gradient(to right, var(--bg), transparent); }
.ticker-bar::after  { right: 0; background: linear-gradient(to left,  var(--bg), transparent); }
.ticker-track { display: flex; width: max-content; animation: ticker-scroll 55s linear infinite; padding: 11px 0; }
.ticker-bar:hover .ticker-track { animation-play-state: paused; }
@keyframes ticker-scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.ticker-cell {
  display: inline-flex; align-items: center; gap: 8px; padding: 0 24px;
  border-right: 1px dashed var(--fg-faded); font-size: 12px; white-space: nowrap; flex-shrink: 0;
}
.ticker-cell .label { color: var(--fg-soft); letter-spacing: 1px; }
.ticker-cell .value { color: var(--fg-bold); font-weight: 700; }
.ticker-cell .delta { color: var(--fg-soft); font-size: 11px; }
.ticker-cell .delta.up::before  { content: '▲ '; }
.ticker-cell .delta.down::before { content: '▼ '; }
.ticker-cell .delta.up { color: var(--fg-bold); }

/* ============ HERO ============ */
.hero {
  margin-bottom: 60px;
  display: grid; grid-template-columns: 1fr 380px; gap: 44px; align-items: start;
}
.hero-kicker {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 4px;
  color: var(--fg-soft); text-transform: uppercase; margin-bottom: 16px;
}
.hero-kicker::before { content: '■ '; color: var(--fg-bold); font-size: 10px; }
.hero-headline {
  font-family: var(--font-mono); font-size: 27px; font-weight: 600;
  line-height: 1.32; color: var(--fg-bold); margin-bottom: 22px; letter-spacing: -0.2px;
}
.hero-headline .invert { background: var(--fg); color: var(--bg); padding: 0 7px; }
.codename {
  font-family: var(--font-mono); font-size: 13px; line-height: 2;
  margin-bottom: 22px;
}
.codename .cn-k { color: var(--fg-soft); }
.codename .cn-v { color: var(--glow); }
.codename .cn-cur {
  display: inline-block; width: 7px; height: 13px; margin-left: 3px; vertical-align: -1px;
  background: var(--glow); animation: blink 1.1s step-end infinite;
}
.hero-copy {
  font-family: var(--font-cn); font-size: 13px; font-weight: 400;
  color: var(--fg-soft); line-height: 1.75; max-width: 560px; margin-bottom: 16px;
}
.hero-copy:last-child { margin-bottom: 0; }
.hero-sub {
  font-family: var(--font-cn); font-size: 14px; color: var(--fg-soft);
  line-height: 1.9; max-width: 560px; margin-bottom: 18px;
}
.hero-sub b { color: var(--fg); font-weight: 600; }
.hero-cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.cta {
  background: transparent; color: var(--fg-bold); border: 1px solid var(--fg);
  padding: 11px 20px; font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 2px; cursor: pointer; transition: all 0.15s; font-weight: 600;
  display: inline-block; text-transform: uppercase;
}
.cta:hover { background: var(--fg); color: var(--bg); }
.cta.primary { background: var(--fg); color: var(--bg); }
.cta.primary:hover { background: var(--fg-bold); }

/* ============ LIVE CARD (right of hero) ============ */
.live-card {
  border: 1px solid var(--fg); padding: 20px 20px 16px; position: relative; background: var(--bg);
}
.live-card::before {
  content: '■ PREDATOR / PREY · LIVE';
  position: absolute; top: -10px; left: 14px; background: var(--bg); padding: 0 8px;
  font-size: 10px; color: var(--fg-bold); letter-spacing: 2px; font-family: var(--font-mono);
}
.role-readout { margin-bottom: 14px; }
.role-line {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 3px 0;
}
.role-line .who { font-family: var(--font-mono); font-size: 13px; letter-spacing: 1px; color: var(--fg-soft); }
.role-line .who b { color: var(--fg-bold); font-weight: 700; }
.role-line .tag {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
  padding: 2px 8px; border: 1px solid var(--fg-faded); color: var(--fg-soft);
}
.role-line .tag.predator { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.role-line .tag.predator::before { content: '▲ '; }
.role-line .tag.prey::before { content: '▽ '; }

.pressure-wrap { margin: 4px 0 12px; }
.pressure-head {
  display: flex; justify-content: space-between; font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 1.5px; color: var(--fg-soft); text-transform: uppercase; margin-bottom: 5px;
}
.pressure-head .pct { color: var(--fg-bold); font-weight: 700; }
.pressure-track { height: 8px; border: 1px solid var(--fg-faded); position: relative; overflow: hidden; }
.pressure-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0%;
  background-image: repeating-linear-gradient(90deg, var(--glow) 0 3px, transparent 3px 6px);
  transition: width 0.6s ease;
}

.pop-chart-host { padding: 4px 0 2px; }
#pop-chart { display: block; width: 100%; }
.legend {
  display: flex; gap: 18px; justify-content: center; margin-top: 10px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 1px; color: var(--fg-soft);
}
.legend .item { display: inline-flex; align-items: center; gap: 7px; }
.legend .swatch { width: 22px; height: 0; border-top: 2px solid var(--fg-bold); }
.legend .swatch.dashed { border-top-style: dashed; border-color: var(--fg-soft); }
.legend-note {
  margin: 7px auto 0; text-align: center;
  font-family: var(--font-mono); font-size: 9.5px; line-height: 1.5;
  letter-spacing: 0.6px; color: var(--fg-soft); text-transform: lowercase;
}
.card-foot {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 2px; color: var(--fg-soft);
  margin-top: 12px; text-transform: uppercase; text-align: center;
}
.card-foot::before { content: '●'; color: var(--glow); margin-right: 6px; animation: pulse 1.6s infinite; }

/* ============ SECTION HEADERS ============ */
.section { margin-bottom: 56px; }
.section-label {
  display: flex; align-items: center; gap: 14px; margin-bottom: 24px;
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 5px; color: var(--fg); font-weight: 600;
  text-transform: uppercase;
}
.section-label::before { content: '■'; color: var(--fg-bold); font-size: 10px; letter-spacing: 0; }
.section-label .en {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 3px; color: var(--fg-faded);
  text-transform: none; font-weight: 400; flex-shrink: 0;
}
.section-label::after { content: ''; flex: 1; height: 0; border-top: 1px dashed var(--fg-faded); }
.section-lead {
  font-family: var(--font-cn); font-size: 14px; color: var(--fg-soft);
  line-height: 1.9; max-width: 780px; margin-bottom: 30px;
}
.section-lead b { color: var(--fg); font-weight: 600; }

/* open-source call-out */
.opensrc {
  display: flex; align-items: center; justify-content: space-between; gap: 26px; flex-wrap: wrap;
  border: 1px solid var(--fg-faded); padding: 18px 22px; margin-bottom: 30px;
  background:
    radial-gradient(420px 120px at 12% 0%, rgba(92,199,138,0.06), transparent 70%),
    var(--bg);
}
.opensrc-text { min-width: 0; flex: 1 1 360px; }
.opensrc-tag {
  display: inline-block; font-family: var(--font-mono); font-size: 10px; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--glow); margin-bottom: 8px;
}
.opensrc-text p {
  font-family: var(--font-cn); font-size: 13.5px; line-height: 1.7; color: var(--fg-soft); margin: 0; max-width: 540px;
}
.opensrc-btn {
  display: inline-block; margin-top: 16px;
  background: transparent; color: var(--fg-bold); border: 1px solid var(--fg);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
  padding: 11px 20px; cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.opensrc-btn:hover { background: var(--fg); color: var(--bg); }
.opensrc-stats {
  flex: 0 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-content: center;
}
.osr-box {
  border: 1px solid var(--fg-faded); padding: 11px 14px; min-width: 124px;
  display: flex; flex-direction: column; gap: 5px;
}
.osr-k { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--fg-soft); }
.osr-v { font-family: var(--font-mono); font-size: 15px; font-weight: 600; color: var(--fg-bold); letter-spacing: 0.3px; }
@media (max-width: 760px) { .opensrc-stats { width: 100%; } }

/* builder's note (first-person) */
.devnote-body p {
  font-family: var(--font-cn); font-size: 15px; line-height: 1.85; color: var(--fg-soft); margin: 0 0 18px;
}
.devnote-body p b { color: var(--fg); font-weight: 600; }
.devnote .sign {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--fg-faded); margin-top: 10px;
}

/* ============ WORKFLOW DIAGRAM (svg graph) ============ */
.wf-scroll { overflow-x: auto; }
.wf-svg { display: block; width: 100%; min-width: 880px; height: auto; }

.flow { display: flex; flex-direction: column; align-items: stretch; }
.flow-lane {
  border: 1px solid var(--fg-faded); background: var(--bg);
  display: grid; grid-template-columns: 180px 1fr; align-items: stretch;
}
.lane-tag {
  border-right: 1px solid var(--fg-faded); padding: 18px 18px;
  font-family: var(--font-mono); font-size: 13px; font-weight: 700; letter-spacing: 1.5px;
  color: var(--fg-bold); text-transform: uppercase; display: flex; flex-direction: column; gap: 4px; justify-content: center;
  background: rgba(92,199,138,0.04);
}
.lane-n { font-size: 10px; color: var(--glow); letter-spacing: 2px; }
.lane-sub { font-size: 10px; font-weight: 400; letter-spacing: 1px; color: var(--fg-soft); text-transform: none; }
.lane-row { display: flex; align-items: stretch; gap: 12px; padding: 16px 18px; flex-wrap: nowrap; }
.lane-row.wrap { flex-wrap: wrap; align-items: center; }
.fbox {
  flex: 1; min-width: 0; border: 1px solid var(--fg-faded); padding: 12px 14px;
  display: flex; flex-direction: column; gap: 3px; font-family: var(--font-mono);
}
.fbox b { font-size: 12.5px; color: var(--fg-bold); font-weight: 700; letter-spacing: 0.5px; }
.fbox span { font-size: 10.5px; color: var(--fg-soft); line-height: 1.5; }
.fx { display: flex; align-items: center; color: var(--glow); font-size: 14px; flex-shrink: 0; }
.fchip {
  border: 1px solid var(--fg-faded); padding: 9px 14px; font-family: var(--font-mono);
  font-size: 11.5px; letter-spacing: 0.5px; color: var(--fg); white-space: nowrap;
}
.flow-down {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0;
  color: var(--glow); font-size: 16px;
}
.flow-down span { font-family: var(--font-mono); font-size: 10px; letter-spacing: 1px; color: var(--fg-faded); text-transform: uppercase; }
.flow-cap { font-family: var(--font-mono); font-size: 11px; color: var(--fg-faded); letter-spacing: 0.4px; margin-top: 16px; line-height: 1.6; }
.flow-guide { margin-top: 26px; max-width: 840px; display: grid; gap: 11px; }
.fg-intro { font-family: var(--font-cn); font-size: 14.5px; color: var(--fg); margin-bottom: 4px; }
.fg-row { display: grid; grid-template-columns: 160px 1fr; gap: 18px; align-items: baseline; }
.fg-k { font-family: var(--font-mono); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--glow); }
.fg-row > span:last-child { font-family: var(--font-cn); font-size: 13.5px; line-height: 1.7; color: var(--fg-soft); }
@media (max-width: 640px) { .fg-row { grid-template-columns: 1fr; gap: 3px; } }
@media (max-width: 720px) {
  .flow-lane { grid-template-columns: 1fr; }
  .lane-tag { border-right: none; border-bottom: 1px solid var(--fg-faded); flex-direction: row; align-items: baseline; gap: 8px; padding: 12px 16px; }
  .lane-row { flex-wrap: wrap; }
  .fx { transform: rotate(90deg); }
}

/* academic estimator pipeline */
.pipe-label {
  display: flex; align-items: center; gap: 14px; margin: 44px 0 18px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 3px; text-transform: uppercase; color: var(--fg);
}
.pipe-label::before { content: '■'; color: var(--fg-bold); font-size: 10px; }
.pipe-label .en { font-family: var(--font-mono); font-size: 10px; letter-spacing: 2px; color: var(--fg-faded); text-transform: none; }
.pipe-label::after { content: ''; flex: 1; height: 0; border-top: 1px dashed var(--fg-faded); }
.pipeline {
  display: flex; align-items: stretch; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  font-family: var(--font-mono);
}
.pipe-stage {
  flex: 1; min-width: 150px; border: 1px solid var(--fg-faded); padding: 14px 14px 16px;
  display: flex; flex-direction: column; gap: 3px; background: var(--bg);
}
.pipe-n { font-size: 10px; letter-spacing: 2px; color: var(--fg-faded); }
.pipe-t { font-size: 12px; font-weight: 700; letter-spacing: 1.5px; color: var(--fg-bold); }
.pipe-d { font-size: 10.5px; line-height: 1.55; color: var(--fg-soft); margin-top: 5px; }
.pipe-arrow { display: flex; align-items: center; color: var(--glow); font-size: 14px; flex-shrink: 0; }
.pipe-cap { font-family: var(--font-mono); font-size: 11px; color: var(--fg-faded); letter-spacing: 0.4px; margin-top: 16px; line-height: 1.6; }
@media (max-width: 760px) {
  .pipeline { flex-direction: column; }
  .pipe-arrow { transform: rotate(90deg); align-self: center; }
  .pipe-stage { min-width: 0; }
}

/* ============ MODEL FLOWCHART ============ */
.cycle-chart {
  border: 1px solid var(--fg-faded); background: var(--bg); padding: 26px 20px;
  margin-bottom: 34px; display: flex; align-items: center; justify-content: space-between;
  gap: 10px; font-family: var(--font-mono); flex-wrap: wrap;
}
.cycle-box {
  flex: 1; min-width: 120px; border: 1px solid var(--fg); padding: 14px 10px; text-align: center;
  display: flex; flex-direction: column; gap: 4px; background: var(--bg);
}
.cycle-box .ph { font-size: 9px; letter-spacing: 2px; color: var(--fg-soft); }
.cycle-box .ttl { font-size: 12px; font-weight: 700; color: var(--fg-bold); letter-spacing: 1px; text-transform: uppercase; }
.cycle-box .sub { font-size: 9px; color: var(--fg-soft); line-height: 1.4; margin-top: 2px; }
.cycle-arrow { color: var(--fg-bold); font-size: 15px; flex-shrink: 0; }
.cycle-loop {
  text-align: center; font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 2px; color: var(--fg-faded); margin-top: -22px; margin-bottom: 34px;
}

.model-details { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 28px; }
.model-detail { border-left: 2px solid var(--fg-faded); padding: 4px 0 4px 16px; }
.model-detail-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.model-detail-num { font-family: var(--font-mono); font-size: 11px; color: var(--fg-faded); font-weight: 700; }
.model-detail-tag {
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 2px; color: var(--fg-soft); text-transform: uppercase;
}
.model-detail h3 {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 1.2px; color: var(--fg-bold);
  margin: 0 0 8px; text-transform: uppercase; font-weight: 700;
}
.model-detail p { font-family: var(--font-cn); font-size: 13px; color: var(--fg-soft); line-height: 1.75; }
.model-detail p .mono { font-family: var(--font-mono); color: var(--fg); }

/* ============ STATS ============ */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--fg-faded); }
.stat { padding: 20px 18px; border-right: 1px dashed var(--fg-faded); min-width: 0; }
.stat:nth-child(4n) { border-right: none; }
.stat:nth-child(n+5) { border-top: 1px dashed var(--fg-faded); }
.stat-label {
  font-family: var(--font-mono); font-size: 11px; color: var(--fg-soft);
  letter-spacing: 2px; margin-bottom: 10px; text-transform: uppercase;
}
.stat-value {
  font-family: var(--font-num); font-size: 36px; color: var(--fg-bold); line-height: 1;
  text-shadow: 0 0 6px rgba(92,199,138,0.25); word-break: break-all;
}
.stat-value.sm { font-size: 26px; }
.stat-delta { font-size: 10px; color: var(--fg-soft); margin-top: 6px; font-family: var(--font-mono); letter-spacing: 1px; }

/* ============ CHARTS SECTION ============ */
.chart-toolbar {
  display: flex; align-items: center; gap: 6px; margin-bottom: 12px;
  font-family: var(--font-mono); font-size: 12px; flex-wrap: wrap;
}
.tab {
  cursor: pointer; color: var(--fg-soft); padding: 4px 12px; border: 1px solid var(--fg-faded);
  transition: all 0.1s; font-family: var(--font-mono); user-select: none; background: transparent;
  text-transform: uppercase; letter-spacing: 1px; font-size: 11px;
}
.tab:hover { color: var(--fg-bold); border-color: var(--fg); }
.tab.active { color: var(--bg); background: var(--fg); border-color: var(--fg); }
.toolbar-spacer { flex: 1; }
.toolbar-info { color: var(--fg-soft); font-family: var(--font-mono); font-size: 11px; }
.toolbar-info .c-bold { color: var(--fg-bold); }
.chart-box {
  border: 1px solid var(--fg-faded); height: 400px; background: var(--bg); padding: 12px; position: relative;
}
.chart-box canvas { width: 100%; height: 100%; display: block; }
.chart-note {
  font-family: var(--font-mono); font-size: 11px; color: var(--fg-faded);
  letter-spacing: 0.5px; margin-top: 10px; line-height: 1.6;
}

/* ============ ARTICLE CARDS ============ */
.articles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.acard {
  border: 1px solid var(--fg-faded); background: var(--bg); padding: 22px 20px;
  display: flex; flex-direction: column; gap: 10px;
}
.acard-n { font-family: var(--font-mono); font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--glow); }
.acard h3 { font-family: var(--font-cn); font-size: 15.5px; font-weight: 700; color: var(--fg-bold); line-height: 1.35; margin: 2px 0; white-space: nowrap; }
.acard p { font-family: var(--font-cn); font-size: 13px; line-height: 1.7; color: var(--fg-soft); flex: 1; margin: 0; }
.acard-btn {
  align-self: flex-start; margin-top: 6px; background: transparent; color: var(--fg-bold);
  border: 1px solid var(--fg); font-family: var(--font-mono); font-size: 11px; letter-spacing: 2px;
  text-transform: uppercase; padding: 9px 18px; cursor: pointer; transition: all 0.15s;
}
.acard-btn:hover { background: var(--fg); color: var(--bg); }
@media (max-width: 720px) { .articles { grid-template-columns: 1fr; } }

/* ============ ARTICLE MODAL ============ */
.amodal { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 24px; opacity: 1; transition: opacity 0.2s; }
.amodal[aria-hidden="true"] { opacity: 0; pointer-events: none; }
.amodal-bg { position: absolute; inset: 0; background: rgba(0,0,0,0.82); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.amodal-box {
  position: relative; background: var(--bg); border: 1px solid var(--fg-faded);
  width: 100%; max-width: 680px; max-height: 84vh; display: flex; flex-direction: column;
  box-shadow: 0 14px 44px rgba(0,0,0,0.85);
}
.amodal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 22px; border-bottom: 1px solid var(--fg-dim); }
.amodal-k { font-family: var(--font-mono); font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--glow); }
.amodal-close { background: transparent; border: 1px solid var(--fg-faded); color: var(--fg-soft); width: 26px; height: 26px; font-size: 18px; line-height: 1; cursor: pointer; font-family: var(--font-mono); transition: all 0.15s; }
.amodal-close:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.amodal-body { overflow-y: auto; padding: 26px 30px 32px; font-family: var(--font-cn); }
.amodal-body h2 { font-family: var(--font-cn); font-size: 24px; font-weight: 700; color: var(--fg-bold); line-height: 1.3; margin-bottom: 20px; }
.amodal-body p { font-family: var(--font-cn); font-size: 15px; line-height: 1.85; color: var(--fg-soft); margin-bottom: 18px; }
.amodal-body p:last-child { margin-bottom: 0; }
.amodal-body p i { color: var(--fg); font-style: normal; font-weight: 600; }

/* ============ FAQ ============ */
.faq details { border: 1px solid var(--fg-faded); margin-bottom: 10px; background: var(--bg); }
.faq summary {
  list-style: none; cursor: pointer; padding: 16px 18px; gap: 14px;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-cn); font-size: 15px; font-weight: 600; color: var(--fg-bold);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '▸'; color: var(--glow); font-size: 12px; flex-shrink: 0; transition: transform 0.15s; }
.faq details[open] summary::after { content: '▾'; }
.faq summary:hover { color: var(--glow); }
.faq p {
  font-family: var(--font-cn); font-size: 14px; line-height: 1.8; color: var(--fg-soft);
  padding: 0 18px 18px; margin: 0;
}

/* ============ DISCLAIMER ============ */
.disclaimer {
  border: 1px solid var(--fg-faded); padding: 18px 24px;
  font-family: var(--font-cn); font-size: 12px; line-height: 2; color: var(--fg-soft);
}
.disclaimer .item { display: flex; gap: 10px; align-items: flex-start; }
.disclaimer .marker { color: var(--fg-bold); font-family: var(--font-mono); font-weight: 700; flex-shrink: 0; }

/* ============ FOOTER ============ */
.site-footer {
  border-top: 1px solid var(--fg-faded); padding: 22px 0; margin-top: 60px;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: 11px; color: var(--fg-soft); letter-spacing: 0.6px;
  flex-wrap: wrap; gap: 12px;
}
.site-footer a { color: var(--fg-soft); border-bottom: 1px dotted var(--fg-faded); padding-bottom: 1px; transition: all 0.15s; }
.site-footer a:hover { color: var(--fg-bold); border-bottom-color: var(--fg-bold); }

/* ============ FLOATING MARK + CA POPUP ============ */
.mark-fab {
  position: fixed; right: 22px; bottom: 22px; width: 54px; height: 54px;
  border: 2px solid var(--fg-faded); background: #141414; color: var(--fg-bold);
  font-family: var(--font-mono); font-size: 22px; line-height: 1; cursor: pointer;
  z-index: 9000; transition: transform 0.2s, border-color 0.2s; filter: drop-shadow(0 4px 12px rgba(0,0,0,0.7));
  display: flex; align-items: center; justify-content: center;
}
.mark-fab:hover { border-color: var(--fg-bold); transform: translateY(-3px); }
.mark-fab::after {
  content: ''; position: absolute; inset: -1px; pointer-events: none;
  box-shadow: 0 0 0 0 rgba(255,255,255,0.28); animation: fab-glow 2.6s ease-out infinite;
}
@keyframes fab-glow {
  0% { box-shadow: 0 0 0 0 rgba(255,255,255,0.28); }
  70% { box-shadow: 0 0 0 14px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}
.ca-popup {
  position: fixed; right: 22px; bottom: 92px; width: 350px; max-width: calc(100vw - 44px);
  background: var(--bg); border: 1px solid var(--fg-faded); z-index: 9001; padding: 14px 16px 16px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.75); transform-origin: bottom right;
  transition: transform 0.25s, opacity 0.2s;
}
.ca-popup[aria-hidden="true"] { opacity: 0; pointer-events: none; transform: scale(0.9) translateY(12px); }
.ca-popup-chart {
  position: relative; width: calc(100% + 32px); height: 110px;
  margin: -14px -16px 12px; border-bottom: 1px solid var(--fg-faded);
  background: var(--screen); overflow: hidden;
}
.ca-popup-banner { display: block; width: 100%; height: 100%; object-fit: cover; }
.ca-chart-tag {
  position: absolute; top: 7px; left: 8px; font-family: var(--font-mono);
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.8px; color: var(--fg-bold);
  background: rgba(0,0,0,0.5); padding: 3px 8px;
}
.ca-popup-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.ca-popup-title { font-family: var(--font-mono); font-size: 10px; letter-spacing: 2.5px; color: var(--fg-soft); text-transform: uppercase; }
.ca-popup-close {
  background: transparent; border: 1px solid var(--fg-faded); color: var(--fg-soft);
  font-size: 16px; line-height: 1; width: 22px; height: 22px; cursor: pointer; font-family: var(--font-mono); transition: all 0.15s;
}
.ca-popup-close:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.addr-row { padding: 10px 0; }
.addr-row + .addr-row { border-top: 1px dotted var(--fg-dim); }
.addr-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; gap: 8px; }
.addr-label { color: var(--fg-soft); letter-spacing: 2px; font-size: 10px; text-transform: uppercase; font-family: var(--font-mono); }
.addr-actions { display: flex; gap: 4px; }
.addr-btn {
  background: transparent; border: 1px solid var(--fg-faded); color: var(--fg-soft);
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 1px; padding: 3px 8px;
  cursor: pointer; text-transform: uppercase; transition: all 0.15s;
}
.addr-btn:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.addr-value { color: var(--fg-bold); font-family: var(--font-mono); font-size: 11px; word-break: break-all; line-height: 1.4; }

/* ============ CODE MODAL ============ */
.code-modal { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; opacity: 1; transition: opacity 0.2s; }
.code-modal[aria-hidden="true"] { opacity: 0; pointer-events: none; }
.code-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.82); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.code-modal-box {
  position: relative; background: var(--bg); border: 1px solid var(--fg-faded);
  width: 92%; max-width: 780px; max-height: 84vh; display: flex; flex-direction: column;
  box-shadow: 0 14px 44px rgba(0,0,0,0.85);
}
.code-modal-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--fg-faded); }
.code-modal-title { font-family: var(--font-mono); font-size: 11px; letter-spacing: 2px; color: var(--fg-soft); text-transform: uppercase; }
.code-modal-close {
  background: transparent; border: 1px solid var(--fg-faded); color: var(--fg-soft);
  width: 26px; height: 26px; font-size: 18px; line-height: 1; cursor: pointer; font-family: var(--font-mono);
  display: flex; align-items: center; justify-content: center; transition: all 0.15s;
}
.code-modal-close:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.code-modal-body {
  flex: 1; overflow: auto; padding: 20px 24px; font-family: var(--font-mono);
  font-size: 12px; line-height: 1.7; color: var(--fg); white-space: pre; margin: 0;
  scrollbar-width: thin; scrollbar-color: var(--fg-faded) transparent;
}
.code-modal-body::-webkit-scrollbar { width: 6px; }
.code-modal-body::-webkit-scrollbar-thumb { background: var(--fg-faded); }
.code-comment { color: var(--fg-faded); font-style: italic; }
.code-kw  { color: var(--fg-bold); font-weight: 600; }
.code-str { color: var(--fg-bold); }
.code-num { color: var(--fg-bold); }
.code-modal-foot { padding: 10px 18px; border-top: 1px solid var(--fg-faded); display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 11px; color: var(--fg-soft); }
.code-modal-foot-tag { padding: 2px 8px; border: 1px solid var(--fg-faded); color: var(--fg-bold); font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase; }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .container { padding: 0 20px; }
  .hero { grid-template-columns: 1fr; gap: 28px; }
  .hero-headline { font-size: 23px; }
  .model-details { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2n) { border-right: none; }
  .stat:nth-child(n+3) { border-top: 1px dashed var(--fg-faded); }
  .cycle-box { min-width: 90px; }
  .cycle-arrow { transform: rotate(90deg); }
}
@media (max-width: 540px) {
  .stats { grid-template-columns: 1fr; }
  .stat { border-right: none; }
  .hero-headline { font-size: 20px; }
  .cycle-chart { flex-direction: column; }
}
