/* ─────────────────────────────────────────────────
   BLACKBOX AI — Developer Field Guide
   Terminal dark theme · JetBrains Mono + Space Grotesk
   Primary: #00ff9d  Secondary: #00d4ff  Accent: #ff6b35
───────────────────────────────────────────────── */

:root {
  --bg:      #080e0f;
  --bg-2:    #0e1618;
  --bg-3:    #141e21;
  --bg-card: rgba(255,255,255,.03);
  --green:   #00ff9d;
  --cyan:    #00d4ff;
  --amber:   #ffd666;
  --orange:  #ff6b35;
  --red:     #ff4757;
  --text:    #c9d1d9;
  --text-2:  rgba(201,209,217,.55);
  --text-3:  rgba(201,209,217,.28);
  --border:  rgba(0,255,157,.1);
  --border-2:rgba(0,255,157,.05);
  --glow:    0 0 24px rgba(0,255,157,.18);
  --glow-s:  0 0 12px rgba(0,255,157,.12);
  --mono: 'JetBrains Mono', monospace;
  --body: 'Space Grotesk', system-ui, sans-serif;
  --ease: cubic-bezier(.22,.68,0,1.2);
}

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

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 4px; background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--green); border-radius: 4px; }

/* ── SELECTION ── */
::selection { background: rgba(0,255,157,.18); color: var(--green); }

/* ════════════════════ PROGRESS ════════════════════ */
#progress-track {
  position: fixed; top: 0; left: 0; width: 100%;
  height: 2px; background: rgba(0,255,157,.08); z-index: 9999;
}
#progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--green), var(--cyan));
  transition: width .1s linear;
  box-shadow: 0 0 8px rgba(0,255,157,.4);
}

/* ════════════════════ NAV ════════════════════ */
#main-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem; height: 56px;
  background: rgba(8,14,15,.88);
  backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid var(--border-2);
}
.nav-left {
  display: flex; align-items: center; gap: .5rem;
  font-family: var(--mono); font-size: .78rem;
}
.nav-home { color: var(--text-2); text-decoration: none; transition: color .2s; }
.nav-home:hover { color: var(--green); }
.nav-sep { color: var(--text-3); }
.nav-mono { color: var(--text-2); }
.nav-dim { color: var(--text-3); transition: color .3s; }
.nav-status {
  display: flex; align-items: center; gap: .5rem;
  font-family: var(--mono); font-size: .72rem; color: var(--text-3);
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: dot-pulse 2s infinite;
}
@keyframes dot-pulse {
  0%,100% { opacity: 1; }
  50% { opacity: .3; }
}
.nav-cta {
  font-family: var(--mono); font-size: .78rem; font-weight: 500;
  color: var(--bg); background: var(--green);
  padding: .35rem .9rem; border-radius: 4px;
  text-decoration: none; transition: box-shadow .2s, opacity .2s;
}
.nav-cta span { margin-right: .3rem; opacity: .7; }
.nav-cta:hover { box-shadow: var(--glow); opacity: .92; }

/* ════════════════════ SECTIONS ════════════════════ */
.section {
  position: relative; width: 100%; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 7rem 0 4rem;
}
.section.s-dark { background: var(--bg-2); }
.section.s-finale { background: #040808; overflow: hidden; }
.section-inner {
  width: 100%; max-width: 1140px; padding: 0 2rem;
}
.section-cmd {
  font-family: var(--mono); font-size: .75rem;
  color: var(--green); opacity: .6; margin-bottom: 1.25rem;
  letter-spacing: .04em;
}
.section-cmd::before { content: '$ '; opacity: .5; }
.section-h {
  font-family: var(--mono); font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 700; line-height: 1.1; color: #fff; margin-bottom: 1.25rem;
}
.sh-cmd { color: var(--green); }
.section-sub {
  font-size: 1.08rem; color: var(--text-2); max-width: 540px;
  line-height: 1.75; margin-bottom: 3.5rem;
}

/* ════════════════════ REVEAL ════════════════════ */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity .65s var(--ease), transform .65s var(--ease);
}
.reveal.visible {
  opacity: 1; transform: none;
}

/* ════════════════════ HERO ════════════════════ */
#matrix-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: .22; pointer-events: none;
}
.hero-wrap {
  position: relative; z-index: 1;
  width: 100%; max-width: 1140px; margin: 0 auto;
  padding: 0 2rem;
  display: flex; flex-direction: column; gap: 2rem;
}

/* Terminal boot */
.terminal-boot {
  background: #0a1215; border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden;
  max-width: 560px; box-shadow: var(--glow), 0 16px 64px rgba(0,0,0,.5);
  animation: fade-down .5s .1s both;
}
@keyframes fade-down { from{opacity:0;transform:translateY(-16px)} to{opacity:1;transform:none} }
.tb-bar {
  display: flex; align-items: center; gap: .5rem;
  background: #0e1618; padding: .55rem .9rem;
  border-bottom: 1px solid var(--border-2);
}
.tb-dot { width: 10px; height: 10px; border-radius: 50%; }
.tb-dot.r { background: #ff5f57; }
.tb-dot.y { background: #febc2e; }
.tb-dot.g { background: #28c840; }
.tb-title { font-family: var(--mono); font-size: .72rem; color: var(--text-3); margin-left: .5rem; }
.tb-body {
  padding: 1rem 1.2rem; min-height: 120px;
  font-family: var(--mono); font-size: .82rem; line-height: 1.9;
}
.tb-line { color: var(--text-2); }
.tb-line.green { color: var(--green); }
.tb-line.dim { color: var(--text-3); }
.tb-line.amber { color: var(--amber); }
.cursor { display: inline-block; width: 8px; height: .9em; background: var(--green); animation: blink .8s infinite; vertical-align: -1px; }
@keyframes blink { 0%,50%{opacity:1} 51%,100%{opacity:0} }

/* Hero content */
.hero-content { animation: fade-up .7s .7s both; }
@keyframes fade-up { from{opacity:0;transform:translateY(24px)} to{opacity:1;transform:none} }
.hero-tag {
  font-family: var(--mono); font-size: .72rem; color: var(--green);
  letter-spacing: .08em; margin-bottom: 1.2rem; opacity: .8;
}
.tag-caret { margin-right: .5rem; opacity: .5; }
.hero-h {
  font-family: var(--mono); font-size: clamp(3.2rem, 8vw, 6.5rem);
  font-weight: 700; line-height: .95; letter-spacing: -.02em;
  color: #fff; margin-bottom: 1.25rem;
}
.h-dim { color: var(--text-3); }
.h-green { color: var(--green); }
.hero-sub {
  font-size: 1.15rem; color: var(--text-2); max-width: 520px;
  line-height: 1.75; margin-bottom: 2rem;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.btn-primary, .btn-ghost {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--mono); font-size: .88rem; font-weight: 500;
  padding: .72rem 1.4rem; border-radius: 6px;
  text-decoration: none; transition: all .2s;
}
.btn-primary {
  background: var(--green); color: #080e0f;
}
.btn-primary:hover { box-shadow: var(--glow); opacity: .9; }
.btn-ghost {
  background: var(--bg-card); color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: rgba(0,255,157,.3); color: var(--green); }
.btn-caret { opacity: .6; }

/* Hero stats */
.hero-stats {
  display: flex; align-items: center; flex-wrap: wrap; gap: 1.5rem;
}
.hs-item { text-align: left; }
.hs-n {
  font-family: var(--mono); font-size: 1.9rem; font-weight: 700;
  color: var(--green); line-height: 1;
}
.hs-l { font-size: .75rem; color: var(--text-3); margin-top: .2rem; text-transform: uppercase; letter-spacing: .06em; }
.hs-sep { color: var(--border); font-size: 1.4rem; }

/* ════════════════════ SURFACES ════════════════════ */
.surface-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}
.surface-card {
  background: var(--bg-card); border: 1px solid var(--border-2);
  border-radius: 10px; padding: 1.5rem;
  transition: border-color .25s, box-shadow .25s, transform .25s;
}
.surface-card:hover {
  border-color: rgba(0,255,157,.22);
  box-shadow: var(--glow-s);
  transform: translateY(-3px);
}
.sc-header {
  display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem;
}
.sc-idx { font-family: var(--mono); font-size: .68rem; color: var(--text-3); }
.sc-icon {
  width: 32px; height: 32px; border-radius: 7px;
  background: rgba(0,255,157,.08); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--green);
}
.sc-name {
  font-family: var(--mono); font-size: .85rem; font-weight: 700;
  color: var(--green); letter-spacing: .08em;
}
.sc-desc { font-size: .9rem; color: var(--text-2); margin-bottom: 1rem; line-height: 1.65; }
.sc-features {
  display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.2rem;
}
.sc-features span {
  font-family: var(--mono); font-size: .7rem;
  color: var(--text-3); background: rgba(255,255,255,.04);
  border: 1px solid var(--border-2); padding: .25rem .55rem; border-radius: 3px;
}
.sc-demo {
  background: #050a0b; border: 1px solid var(--border-2);
  border-radius: 6px; padding: .8rem 1rem;
  font-family: var(--mono); font-size: .76rem; line-height: 2;
}
.scd-prompt { color: var(--cyan); }
.scd-line { color: var(--text-3); }
.scd-line.green { color: var(--green); }
.scd-line.amber { color: var(--amber); }
.scd-line.faint { color: rgba(201,209,217,.18); }
.scd-accept {
  font-family: var(--mono); font-size: .68rem;
  background: rgba(0,212,255,.12); color: var(--cyan);
  padding: .1rem .35rem; border-radius: 3px; margin-left: .5rem;
}

/* ════════════════════ RACE / EXECUTE ════════════════════ */
.race-arena {
  background: #0a1215; border: 1px solid var(--border);
  border-radius: 12px; padding: 2rem;
  margin-bottom: 3rem; box-shadow: 0 8px 40px rgba(0,0,0,.4);
}
.ra-task {
  font-family: var(--mono); font-size: .85rem;
  color: var(--amber); padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-2); margin-bottom: 1.5rem;
}
.ra-label { color: var(--text-3); margin-right: .75rem; }
.ra-agents { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.25rem; margin-bottom: 1.5rem; }

.ra-agent {
  background: rgba(255,255,255,.03); border: 1px solid var(--border-2);
  border-radius: 8px; padding: 1.1rem;
  transition: border-color .3s, box-shadow .3s;
}
.ra-agent.winner {
  border-color: rgba(0,255,157,.4); box-shadow: var(--glow-s);
}
.ra-agent.loser { opacity: .5; }
.raa-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: .75rem;
}
.raa-name { font-family: var(--mono); font-size: .78rem; font-weight: 700; color: var(--text); letter-spacing: .05em; }
.raa-badge {
  font-family: var(--mono); font-size: .65rem;
  padding: .15rem .45rem; border-radius: 3px;
  background: rgba(0,255,157,.15); color: var(--green);
  display: none;
}
.raa-badge.visible { display: block; }
.raa-badge.winner { background: rgba(0,255,157,.2); color: var(--green); }
.raa-badge.loser  { background: rgba(255,71,87,.1);  color: var(--red); }
.raa-output {
  font-family: var(--mono); font-size: .73rem; color: var(--text-3);
  min-height: 2.4em; margin-bottom: .75rem;
}
.raa-thinking { animation: thinking 1s infinite; }
@keyframes thinking { 0%,100%{opacity:.3} 50%{opacity:1} }
.raa-score-wrap { display: flex; align-items: center; gap: .75rem; }
.raa-score-bar { flex: 1; height: 5px; background: var(--border-2); border-radius: 3px; overflow: hidden; }
.raa-fill {
  height: 100%; width: 0%; border-radius: 3px;
  background: linear-gradient(90deg, var(--green), var(--cyan));
  transition: width 1.4s cubic-bezier(.22,.68,.58,1);
}
.raa-fill.loser { background: linear-gradient(90deg, #555, #777); }
.raa-score { font-family: var(--mono); font-size: .8rem; color: var(--green); min-width: 2.2rem; text-align: right; }

/* Chairman */
.ra-chairman {
  background: rgba(0,255,157,.04); border: 1px solid rgba(0,255,157,.12);
  border-radius: 8px; padding: 1.25rem;
  opacity: 0; transition: opacity .5s;
}
.ra-chairman.visible { opacity: 1; }
.rc-label {
  font-family: var(--mono); font-size: .72rem; color: var(--green);
  letter-spacing: .08em; margin-bottom: 1rem; opacity: .7;
}
.rc-criteria { display: grid; grid-template-columns: repeat(4,1fr); gap: .75rem; margin-bottom: 1.25rem; }
.rc-c { }
.rc-c span { font-family: var(--mono); font-size: .65rem; color: var(--text-3); display: block; margin-bottom: .3rem; }
.rc-bar { height: 4px; background: var(--border-2); border-radius: 3px; overflow: hidden; }
.rc-bf { height: 100%; width: 0%; border-radius: 3px; background: var(--cyan); transition: width 1s ease .3s; }
.ra-chairman.visible .rc-bf { width: var(--tw); }
.rc-winner {
  display: flex; align-items: center; gap: 1rem; margin-bottom: .75rem;
  padding-bottom: .75rem; border-bottom: 1px solid var(--border-2);
  opacity: 0; transition: opacity .4s .6s;
}
.ra-chairman.visible .rc-winner { opacity: 1; }
.rcw-label { font-family: var(--mono); font-size: .68rem; color: var(--text-3); }
.rcw-name  { font-family: var(--mono); font-size: 1.05rem; font-weight: 700; color: var(--green); }
.rcw-conf  { font-family: var(--mono); font-size: .72rem; color: var(--text-3); }
.rc-pr { display: flex; flex-wrap: wrap; gap: 1rem; opacity: 0; transition: opacity .4s .9s; }
.ra-chairman.visible .rc-pr { opacity: 1; }
.rcp-prefix { font-family: var(--mono); font-size: .78rem; color: var(--cyan); }
.rcp-files  { font-family: var(--mono); font-size: .78rem; color: var(--text-3); }
.rcp-tests  { font-family: var(--mono); font-size: .78rem; color: var(--green); }

.race-info { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; }
.ri-item { }
.ri-n { font-family: var(--mono); font-size: .82rem; font-weight: 700; color: var(--green); margin-bottom: .5rem; }
.ri-item p { font-size: .9rem; color: var(--text-2); line-height: 1.65; }

/* ════════════════════ MODELS ════════════════════ */
.models-layout { display: grid; grid-template-columns: 240px 1fr; gap: 2rem; align-items: start; }
.model-categories { display: flex; flex-direction: column; gap: .4rem; }
.mc-item {
  display: flex; flex-direction: column; gap: .15rem;
  padding: .75rem 1rem; border-radius: 7px;
  border: 1px solid transparent; cursor: pointer;
  transition: background .2s, border-color .2s;
  font-family: var(--mono); font-size: .8rem; color: var(--text-2);
}
.mc-item:hover { background: var(--bg-card); border-color: var(--border-2); }
.mc-item.active  { background: rgba(0,255,157,.06); border-color: rgba(0,255,157,.2); color: var(--green); }
.mc-item .mci-dot {
  width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-right: .4rem;
}
.mci-dot.frontier { background: var(--green); }
.mci-dot.code { background: var(--cyan); }
.mci-dot.fast { background: var(--amber); }
.mci-dot.voice { background: #b57bee; }
.mci-dot.vision { background: var(--orange); }
.mci-count { font-size: .68rem; color: var(--text-3); padding-left: 1.1rem; }

.model-display { }
.md-window {
  background: #050a0b; border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,.4);
}
.mdw-bar {
  display: flex; align-items: center; gap: .4rem;
  background: #0a1215; padding: .55rem .9rem;
  border-bottom: 1px solid var(--border-2);
}
.mdw-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--border-2); }
.mdw-title { font-family: var(--mono); font-size: .72rem; color: var(--text-3); margin-left: .4rem; }
.mdw-body { padding: 1.5rem; min-height: 280px; }
.mdw-row { display: none; }
.mdw-row.active { display: block; animation: fadeIn .3s ease; }
@keyframes fadeIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:none} }
.mr-label {
  font-family: var(--mono); font-size: .7rem; font-weight: 700;
  letter-spacing: .1em; padding: .25rem .6rem; border-radius: 3px;
  display: inline-block; margin-bottom: 1.25rem;
}
.mr-label.frontier { background: rgba(0,255,157,.1); color: var(--green); }
.mr-label.code     { background: rgba(0,212,255,.1); color: var(--cyan); }
.mr-label.fast     { background: rgba(255,214,102,.1); color: var(--amber); }
.mr-label.voice    { background: rgba(181,123,238,.1); color: #b57bee; }
.mr-label.vision   { background: rgba(255,107,53,.1); color: var(--orange); }
.mr-models { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.25rem; }
.mr-m {
  font-family: var(--mono); font-size: .8rem;
  background: rgba(255,255,255,.05); border: 1px solid var(--border-2);
  padding: .3rem .65rem; border-radius: 4px; color: var(--text);
}
.mr-m.dim { color: var(--text-3); background: transparent; border-color: transparent; }
.mr-stat { font-size: .85rem; color: var(--text-3); line-height: 1.6; }

/* ════════════════════ IDE MOCKUP ════════════════════ */
.ide-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.ide-mockup { }
.ide-window {
  background: #0c1a1e; border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden;
  box-shadow: 0 16px 64px rgba(0,0,0,.5);
}
.ide-titlebar {
  display: flex; align-items: center; gap: 0;
  background: #0a1215; padding: .5rem 0;
  border-bottom: 1px solid var(--border-2);
}
.ide-dots { display: flex; gap: .4rem; padding: 0 .75rem; align-items: center; }
.ide-dots span { width: 10px; height: 10px; border-radius: 50%; }
.ide-dots span.r { background: #ff5f57; }
.ide-dots span.y { background: #febc2e; }
.ide-dots span.g { background: #28c840; }
.ide-file-tab {
  font-family: var(--mono); font-size: .73rem; color: var(--text-3);
  padding: .5rem .9rem; border-right: 1px solid var(--border-2); cursor: pointer;
}
.ide-file-tab.active { color: var(--text); background: rgba(255,255,255,.04); }
.ide-content { display: flex; }
.ide-gutter {
  display: flex; flex-direction: column;
  padding: .75rem .4rem .75rem .7rem;
  font-family: var(--mono); font-size: .73rem; line-height: 1.95;
  color: var(--text-3); background: rgba(255,255,255,.02);
  border-right: 1px solid var(--border-2);
  min-width: 36px; text-align: right; user-select: none;
}
.ide-code {
  padding: .75rem 1rem; font-family: var(--mono); font-size: .73rem;
  line-height: 1.95; overflow-x: auto; flex: 1;
}
.ic-line { color: var(--text); white-space: pre; }
.ic-line.dim { color: var(--text-3); }
.ic-line .keyword { color: #c792ea; }
.ic-line .type    { color: #82aaff; }
.ic-line .fn      { color: var(--green); }
.ic-line .dim     { color: var(--text-3); }
.ic-line.ide-suggestion { background: rgba(0,255,157,.04); border-left: 2px solid var(--green); padding-left: 4px; }
.ic-line .ghost { color: rgba(0,255,157,.35); }
.ic-line .tab-hint {
  font-size: .65rem; background: rgba(0,255,157,.12); color: var(--green);
  padding: .1rem .35rem; border-radius: 2px; margin-left: .5rem;
}
.ide-chat-panel {
  border-top: 1px solid var(--border-2); padding: .9rem 1rem;
  background: #0a1215;
}
.icp-header {
  display: flex; align-items: center; gap: .75rem; margin-bottom: .65rem;
}
.icp-brand { font-family: var(--mono); font-size: .72rem; color: var(--green); font-weight: 700; }
.icp-cmd { font-family: var(--mono); font-size: .68rem; color: var(--cyan); background: rgba(0,212,255,.08); padding: .15rem .4rem; border-radius: 3px; }
.icp-msg { font-family: var(--mono); font-size: .75rem; margin-bottom: .45rem; }
.icp-msg.user { color: var(--text-2); }
.icp-msg.user::before { content: '> '; color: var(--text-3); }
.icp-msg.ai { color: var(--green); min-height: 1.4em; }
.ai-typing-indicator { display: inline-flex; gap: 3px; align-items: center; }
.ai-typing-indicator span {
  width: 5px; height: 5px; background: var(--green); border-radius: 50%;
  animation: typing-dot .7s infinite;
}
.ai-typing-indicator span:nth-child(2) { animation-delay: .15s; }
.ai-typing-indicator span:nth-child(3) { animation-delay: .3s; }
@keyframes typing-dot { 0%,80%,100%{opacity:.2;transform:scale(.8)} 40%{opacity:1;transform:scale(1)} }

.ide-features { display: flex; flex-direction: column; gap: 2.25rem; padding-top: .5rem; }
.ide-feat { display: flex; gap: 1rem; }
.if-num { font-family: var(--mono); font-size: .72rem; color: var(--green); opacity: .5; flex-shrink: 0; padding-top: .2rem; }
.ide-feat h3 { font-family: var(--mono); font-size: .9rem; font-weight: 700; color: var(--text); margin-bottom: .4rem; }
.ide-feat p { font-size: .88rem; color: var(--text-2); line-height: 1.65; }

/* ════════════════════ BUILDER ════════════════════ */
.builder-demo {
  background: #0a1215; border: 1px solid var(--border);
  border-radius: 12px; padding: 2rem;
  margin-bottom: 3rem; box-shadow: 0 8px 40px rgba(0,0,0,.4);
}
.bd-label { font-family: var(--mono); font-size: .72rem; color: var(--text-3); margin-bottom: .5rem; }
.bd-prompt {
  font-family: var(--mono); font-size: .9rem; color: var(--amber);
  border-left: 2px solid var(--amber); padding-left: .75rem;
  margin-bottom: 2rem; line-height: 1.6;
}
.bd-pipeline { display: flex; flex-direction: column; gap: 0; }
.bp-step {
  display: flex; gap: 1rem; align-items: flex-start;
  background: rgba(255,255,255,.03); border: 1px solid var(--border-2);
  border-radius: 8px; padding: 1.1rem 1.25rem;
  transition: border-color .3s, box-shadow .3s;
}
.bp-step.running { border-color: rgba(0,255,157,.25); box-shadow: var(--glow-s); }
.bp-step.done    { border-color: rgba(0,255,157,.15); }
.bp-step.done .bps-status { color: var(--green); }
.bps-idx { font-family: var(--mono); font-size: .72rem; color: var(--text-3); flex-shrink: 0; padding-top: .15rem; }
.bps-body { flex: 1; }
.bps-title { font-family: var(--mono); font-size: .8rem; font-weight: 700; color: var(--text); margin-bottom: .3rem; }
.bps-detail { font-size: .83rem; color: var(--text-2); margin-bottom: .5rem; line-height: 1.55; }
.bps-status { font-family: var(--mono); font-size: .7rem; color: var(--text-3); }
.bps-status.running { color: var(--amber); animation: thinking 1s infinite; }
.bps-status.done { color: var(--green); }
.bp-connector { width: 1px; height: 16px; background: var(--border-2); margin-left: 2.4rem; }
.bd-replay { margin-top: 1.5rem; text-align: center; }
.replay-btn {
  font-family: var(--mono); font-size: .78rem; color: var(--text-3);
  background: none; border: 1px solid var(--border-2); padding: .45rem 1.1rem;
  border-radius: 5px; cursor: pointer; transition: all .2s;
}
.replay-btn:hover { color: var(--green); border-color: rgba(0,255,157,.3); }
.build-feats { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; }
.bf-card {
  background: var(--bg-card); border: 1px solid var(--border-2);
  border-radius: 10px; padding: 1.5rem;
  transition: border-color .25s, box-shadow .25s;
}
.bf-card:hover { border-color: rgba(0,255,157,.2); box-shadow: var(--glow-s); }
.bfc-icon { font-size: 1.5rem; display: block; margin-bottom: .75rem; }
.bf-card h3 { font-family: var(--mono); font-size: .88rem; font-weight: 700; color: var(--text); margin-bottom: .5rem; }
.bf-card p { font-size: .875rem; color: var(--text-2); line-height: 1.65; }

/* ════════════════════ PRICING ════════════════════ */
.billing-toggle {
  display: inline-flex; gap: 0; margin-bottom: 2.5rem;
  background: var(--bg-card); border: 1px solid var(--border-2);
  border-radius: 6px; overflow: hidden;
}
.bt-opt {
  font-family: var(--mono); font-size: .75rem; font-weight: 600;
  padding: .55rem 1.2rem; background: none; border: none;
  color: var(--text-3); cursor: pointer; transition: all .2s;
}
.bt-opt.active { background: rgba(0,255,157,.1); color: var(--green); }
.bt-save { font-size: .65rem; color: var(--green); margin-left: .3rem; }
.price-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.25rem; margin-bottom: 1.5rem; }
.pc {
  background: var(--bg-card); border: 1px solid var(--border-2);
  border-radius: 12px; padding: 1.75rem;
  display: flex; flex-direction: column; position: relative;
  transition: border-color .25s, box-shadow .25s;
}
.pc:hover { border-color: rgba(0,255,157,.2); box-shadow: var(--glow-s); }
.pc.popular { border-color: rgba(0,255,157,.3); box-shadow: var(--glow); }
.pc-badge {
  position: absolute; top: -1px; left: 50%; transform: translateX(-50%);
  font-family: var(--mono); font-size: .65rem; font-weight: 700;
  background: var(--green); color: #080e0f;
  padding: .2rem .9rem; border-radius: 0 0 6px 6px;
}
.pc-tier { font-family: var(--mono); font-size: .75rem; font-weight: 700; color: var(--text-3); letter-spacing: .1em; margin-bottom: .75rem; }
.pc-price { display: flex; align-items: flex-end; gap: .15rem; margin-bottom: .5rem; }
.pp-dollar { font-family: var(--mono); font-size: 1.1rem; color: var(--text-2); align-self: flex-start; margin-top: .35rem; }
.pp-n { font-family: var(--mono); font-size: 2.8rem; font-weight: 700; color: #fff; line-height: 1; }
.pp-mo { font-family: var(--mono); font-size: .75rem; color: var(--text-3); margin-bottom: .4rem; }
.pc-first-month { font-family: var(--mono); font-size: .72rem; color: var(--amber); margin-bottom: .4rem; }
.pfm-tag { background: rgba(255,214,102,.1); padding: .1rem .35rem; border-radius: 3px; margin-right: .3rem; }
.pc-credits { font-size: .82rem; color: var(--text-3); margin-bottom: 1rem; line-height: 1.5; }
.pc-div { height: 1px; background: var(--border-2); margin-bottom: 1.25rem; }
.pc-feats { list-style: none; display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1.75rem; flex: 1; }
.pc-feats li { font-size: .83rem; display: flex; align-items: center; gap: .6rem; }
.pc-feats li::before { content: ''; width: 14px; height: 14px; flex-shrink: 0; border-radius: 50%; }
.pc-feats li.y { color: var(--text); }
.pc-feats li.y::before { background: rgba(0,255,157,.2); outline: 1px solid rgba(0,255,157,.4); position: relative; }
.pc-feats li.y::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3 7l3 3 5-5' stroke='%2300ff9d' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: center; }
.pc-feats li.n { color: var(--text-3); }
.pc-feats li.n::before { background: var(--border-2); }
.pc-btn {
  display: block; text-align: center;
  font-family: var(--mono); font-size: .83rem; font-weight: 600;
  padding: .7rem; border-radius: 6px;
  text-decoration: none; transition: all .2s;
  border: 1px solid var(--border);
  color: var(--text); background: rgba(255,255,255,.04);
}
.pc-btn:hover { border-color: rgba(0,255,157,.3); color: var(--green); }
.pc-btn.primary { background: var(--green); color: #080e0f; border-color: transparent; }
.pc-btn.primary:hover { box-shadow: var(--glow); }
.enterprise-strip {
  background: rgba(0,255,157,.04); border: 1px solid rgba(0,255,157,.15);
  border-radius: 10px; padding: 1.4rem 1.75rem;
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
}
.es-label { font-family: var(--mono); font-size: .8rem; font-weight: 700; color: var(--green); margin-bottom: .35rem; }
.es-body p { font-size: .875rem; color: var(--text-2); line-height: 1.6; }
.es-cta {
  font-family: var(--mono); font-size: .82rem; color: var(--green);
  white-space: nowrap; text-decoration: none; flex-shrink: 0;
  transition: opacity .2s;
}
.es-cta:hover { opacity: .7; }

/* ════════════════════ PROOF ════════════════════ */
.fortune-grid {
  display: grid; grid-template-columns: repeat(8,1fr); gap: .75rem;
  margin-bottom: 3rem;
}
.fortune-grid span {
  font-family: var(--mono); font-size: .72rem; color: var(--text-3);
  text-align: center; padding: .7rem; border: 1px solid var(--border-2);
  border-radius: 6px; background: var(--bg-card);
  letter-spacing: .04em; transition: color .2s, border-color .2s;
}
.fortune-grid span:hover { color: var(--green); border-color: rgba(0,255,157,.2); }
.proof-quotes { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.25rem; }
.pq-card {
  background: var(--bg-card); border: 1px solid var(--border-2);
  border-radius: 10px; padding: 1.5rem;
  transition: border-color .25s;
}
.pq-card:hover { border-color: rgba(0,255,157,.2); }
.pq-stars { color: var(--amber); font-size: .85rem; margin-bottom: .75rem; }
.pq-text { font-size: .875rem; color: var(--text-2); line-height: 1.7; margin-bottom: 1.25rem; }
.pq-author { display: flex; align-items: center; gap: .75rem; }
.pqa-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(0,255,157,.1); border: 1px solid rgba(0,255,157,.2);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: .8rem; color: var(--green); flex-shrink: 0;
}
.pqa-name { font-family: var(--mono); font-size: .78rem; color: var(--text); }
.pqa-role { font-size: .73rem; color: var(--text-3); }

/* ════════════════════ FINALE ════════════════════ */
#finale-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; opacity: .4;
}
.finale-inner { position: relative; z-index: 1; padding-top: 2rem; }
.section-cmd.light { color: rgba(0,255,157,.5); }
.finale-h {
  font-family: var(--mono); font-size: clamp(2.2rem, 6vw, 5rem);
  font-weight: 700; line-height: 1.05; margin-bottom: 1.25rem;
}
.fh-big { color: var(--green); }
.fh-sub { color: var(--text-2); font-size: clamp(1.2rem, 2.5vw, 1.8rem); }
.finale-p { font-size: 1.05rem; color: var(--text-2); max-width: 540px; line-height: 1.75; margin-bottom: 2.5rem; }
.finale-actions { margin-bottom: 2rem; }
.btn-finale {
  display: inline-flex; align-items: center; gap: .75rem;
  font-family: var(--mono); font-size: 1rem; font-weight: 700;
  background: var(--green); color: #080e0f;
  padding: 1rem 2.2rem; border-radius: 8px;
  text-decoration: none; transition: all .25s;
  box-shadow: 0 0 0 rgba(0,255,157,0);
}
.btn-finale:hover { box-shadow: 0 0 40px rgba(0,255,157,.35); transform: translateY(-2px); }
.bfc-caret { opacity: .6; }
.finale-trust {
  display: flex; flex-wrap: wrap; gap: 1.5rem;
  font-family: var(--mono); font-size: .78rem; color: var(--text-3);
  margin-bottom: 3rem;
}
.finale-trust span { }

/* Finale terminal */
.finale-terminal {
  background: #0a1215; border: 1px solid var(--border);
  border-radius: 10px; max-width: 540px; overflow: hidden;
  box-shadow: var(--glow), 0 16px 64px rgba(0,0,0,.5);
  margin-bottom: 3rem;
}
.ft-bar {
  display: flex; align-items: center; gap: .5rem;
  background: #0e1618; padding: .5rem .9rem;
  border-bottom: 1px solid var(--border-2);
}
.ft-dot { width: 10px; height: 10px; border-radius: 50%; }
.ft-dot.r { background: #ff5f57; }
.ft-dot.y { background: #febc2e; }
.ft-dot.g { background: #28c840; }
.ft-title { font-family: var(--mono); font-size: .72rem; color: var(--text-3); margin-left: .5rem; }
.ft-body { padding: 1rem 1.2rem; font-family: var(--mono); font-size: .82rem; line-height: 2; min-height: 100px; }

.finale-footer {
  font-family: var(--mono); font-size: .78rem; color: var(--text-3);
  display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
}
.ff-back { color: var(--text-3); text-decoration: none; transition: color .2s; }
.ff-back:hover { color: var(--green); }
.finale-footer a { color: var(--green); text-decoration: none; }
.ff-sep { opacity: .3; }

/* ════════════════════ RESPONSIVE ════════════════════ */
@media (max-width: 1080px) {
  .race-arena .ra-agents { grid-template-columns: repeat(3,1fr); }
  .rc-criteria { grid-template-columns: repeat(2,1fr); }
  .fortune-grid { grid-template-columns: repeat(4,1fr); }
}

@media (max-width: 900px) {
  .models-layout { grid-template-columns: 1fr; }
  .ide-layout { grid-template-columns: 1fr; }
  .race-arena .ra-agents { grid-template-columns: 1fr; }
  .price-grid { grid-template-columns: 1fr; max-width: 400px; margin-left: auto; margin-right: auto; }
  .enterprise-strip { flex-direction: column; align-items: flex-start; }
  .proof-quotes { grid-template-columns: 1fr; }
  .race-info { grid-template-columns: 1fr; }
  .build-feats { grid-template-columns: 1fr; }
  .surface-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  #main-nav { padding: 0 1rem; }
  .nav-status { display: none; }
  .section-inner, .hero-wrap { padding: 0 1.25rem; }
  .hero-h { font-size: 3rem; }
  .hero-stats { gap: 1rem; }
  .hs-sep { display: none; }
  .fortune-grid { grid-template-columns: repeat(2,1fr); }
  .rc-criteria { grid-template-columns: 1fr; }
}
