/* =========================================================
   Helix Showcase — bespoke styles on top of Kernel tokens
   Aesthetic: warm dark, mono-heavy, generous whitespace,
   Apple-like restraint applied to a developer tool.
   ========================================================= */

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-1);
  color: var(--fg-1);
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "ss02", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  min-height: 100vh;
  overflow-x: hidden;
}
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* ─── Top nav ───────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  background: color-mix(in oklab, var(--bg-1) 85%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: var(--hair);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--fg-1);
}
.nav-brand .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 8px var(--signal);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.85); }
}
.nav-meta {
  display: flex;
  gap: 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--fg-3);
}
.nav-meta b { color: var(--fg-1); font-weight: 500; letter-spacing: 0; }

/* ─── Hero ──────────────────────────────────────────────── */
.hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 120px 40px 80px;
  text-align: left;
}
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-eyebrow .cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--signal);
  animation: blink 1.05s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.hero-headline {
  font-family: var(--font-sans);
  font-size: clamp(48px, 6.4vw, 96px);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: var(--ls-tight);
  color: var(--fg-1);
  margin: 0 0 32px;
  text-wrap: balance;
  max-width: 18ch;
}
.hero-headline em {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--signal);
  font-weight: 400;
}
.hero-sub {
  font-size: 22px;
  line-height: 1.45;
  color: var(--fg-2);
  max-width: 60ch;
  margin: 0 0 56px;
  font-weight: 400;
  text-wrap: pretty;
}

/* Headline number row */
.headline-numbers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: var(--hair);
  border-bottom: var(--hair);
  margin-top: 64px;
}
.hn-cell {
  padding: 32px 32px 32px 0;
  border-right: var(--hair);
}
.hn-cell:last-child { border-right: none; padding-right: 0; }
.hn-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 12px;
}
.hn-value {
  font-family: var(--font-sans);
  font-size: 56px;
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1;
  color: var(--fg-1);
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.hn-value .unit {
  font-size: 22px;
  color: var(--fg-3);
  font-family: var(--font-mono);
  letter-spacing: 0;
}
.hn-value .delta {
  font-size: 20px;
  color: var(--accent);
  font-family: var(--font-mono);
  letter-spacing: 0;
  margin-left: 4px;
}
.hn-caption {
  font-size: 14px;
  color: var(--fg-3);
  margin-top: 10px;
  line-height: 1.45;
}

/* ─── Section frame ─────────────────────────────────────── */
.section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 80px 40px;
}
.section-stage {
  max-width: 1640px;
  margin: 0 auto;
  padding: 40px 40px 80px;
}
.section-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-label::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--fg-3);
}
.section-title {
  font-size: 44px;
  font-weight: 400;
  letter-spacing: var(--ls-snug);
  line-height: 1.08;
  margin: 0 0 16px;
  max-width: 24ch;
}
.section-sub {
  font-size: 19px;
  color: var(--fg-2);
  line-height: 1.5;
  max-width: 60ch;
  margin: 0 0 40px;
}

/* ─── Case Picker ───────────────────────────────────────── */
.case-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-bottom: 48px;
}
.case-card {
  position: relative;
  background: var(--bg-2);
  border: var(--hair);
  border-radius: var(--r-3);
  padding: 20px 22px;
  text-align: left;
  transition: all 200ms cubic-bezier(0.22, 1, 0.36, 1);
  color: inherit;
}
.case-card:hover {
  border-color: rgba(246, 243, 236, 0.18);
  background: var(--bg-3);
}
.case-card[data-active="true"] {
  border: var(--hair-signal);
  background: color-mix(in oklab, var(--signal) 6%, var(--bg-2));
  box-shadow: 0 0 0 3px rgba(229, 179, 23, 0.08);
}
.case-card-id {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--fg-3);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.case-card-name {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1.25;
  margin-bottom: 14px;
  color: var(--fg-1);
}
.case-card-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-3);
  display: flex;
  gap: 8px;
  align-items: center;
}
.case-card-meta .sep { color: var(--fg-4); }
.case-card-star {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--signal);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
}

/* ─── Selected case detail ──────────────────────────────── */
.case-detail {
  background: var(--bg-2);
  border: var(--hair);
  border-radius: var(--r-3);
  padding: 32px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: end;
}
.case-detail-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 12px;
}
.case-detail-query {
  font-size: 26px;
  line-height: 1.32;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
  color: var(--fg-1);
  text-wrap: pretty;
}
.case-detail-meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-3);
}
.case-detail-meta .pill {
  padding: 4px 10px;
  border-radius: var(--r-pill);
  border: var(--hair);
  background: var(--bg-3);
  color: var(--fg-2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 10.5px;
}
.case-detail-meta .pill.evidence {
  border-color: rgba(122, 162, 255, 0.3);
  color: var(--info);
  background: rgba(122, 162, 255, 0.06);
}
.case-detail-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
  min-width: 220px;
}

/* ─── Run button (signal CTA) ───────────────────────────── */
.btn {
  appearance: none;
  border: none;
  background: var(--signal);
  color: var(--bg-0);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 14px 22px;
  border-radius: var(--r-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 120ms ease;
}
.btn:hover { background: var(--signal-600); }
.btn:active { background: var(--signal-700); }
.btn:disabled { background: var(--fg-4); color: var(--fg-3); cursor: not-allowed; }

.btn-ghost {
  background: transparent;
  color: var(--fg-1);
  border: 1px solid rgba(246, 243, 236, 0.18);
}
.btn-ghost:hover { background: rgba(246,243,236,0.05); border-color: rgba(246,243,236,0.3); }
.btn-ghost:active { background: rgba(246,243,236,0.1); }

.btn .lucide { width: 16px; height: 16px; stroke-width: 2; }

/* ─── Run stage: dual model panes ───────────────────────── */
.stage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 16px;
}
.pane {
  background: var(--bg-2);
  border: var(--hair);
  border-radius: var(--r-3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 600px;
  position: relative;
}
.pane[data-winner="true"] {
  border: var(--hair-signal);
  box-shadow: 0 0 0 3px rgba(229, 179, 23, 0.08), 0 4px 32px rgba(229, 179, 23, 0.05);
}
.pane-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: var(--hair);
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
}
.pane-title {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pane-title h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--fg-1);
}
.pane-title .badge {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--fg-3);
  padding: 3px 8px;
  border-radius: var(--r-pill);
  border: var(--hair);
}
.pane-title .badge.fine-tune {
  border-color: rgba(229, 179, 23, 0.3);
  color: var(--signal);
  background: rgba(229, 179, 23, 0.06);
}
.pane-title .badge.baseline {
  border-color: rgba(122, 162, 255, 0.3);
  color: var(--info);
  background: rgba(122, 162, 255, 0.06);
}
.pane-status {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--fg-3);
  display: flex;
  align-items: center;
  gap: 8px;
}
.pane-status .blinker {
  display: inline-block;
  width: 7px;
  height: 11px;
  background: var(--signal);
  animation: blink 1s steps(2) infinite;
  vertical-align: middle;
}
.pane-status .check {
  width: 14px; height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg-0);
}
.pane-status .cross {
  width: 14px; height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--danger);
  color: var(--bg-0);
}

.pane-body {
  padding: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ─── Step blocks within pane ───────────────────────────── */
.step {
  border-bottom: var(--hair);
  transition: opacity 320ms cubic-bezier(0.22, 1, 0.36, 1), transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}
.step[data-state="pending"] { opacity: 0.55; }
.step[data-state="idle"]    { opacity: 1; }
.step[data-state="hidden"]  { opacity: 0; transform: translateY(8px); pointer-events: none; max-height: 0; overflow: hidden; border: none; }
.step:last-child { border-bottom: none; }

.step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  cursor: pointer;
  user-select: none;
  gap: 12px;
}
.step-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--fg-4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-3);
  flex-shrink: 0;
}
.step[data-state="active"] .step-num,
.step[data-state="done"]   .step-num,
.step[data-state="idle"]   .step-num {
  border-color: rgba(246,243,236,0.18);
  color: var(--fg-2);
}
.step[data-state="active"] .step-num {
  border-color: var(--signal);
  color: var(--signal);
}
.step[data-state="done"]   .step-num {
  background: var(--signal);
  color: var(--bg-0);
  border-color: var(--signal);
}
.step-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-1);
  display: flex;
  align-items: center;
  gap: 8px;
}
.step-title .meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-3);
  font-weight: 400;
}
.step-toggle {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-3);
  display: flex;
  align-items: center;
  gap: 6px;
}
.step-toggle .lucide { width: 14px; height: 14px; transition: transform 200ms ease; }
.step[data-open="true"] .step-toggle .lucide { transform: rotate(180deg); }

.step-body {
  padding: 0 22px 18px 56px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--fg-2);
  opacity: 1;
}
.step-body.fade-in {
  animation: fade-up 320ms cubic-bezier(0.22, 1, 0.36, 1);
}
.step-body.tight { padding-left: 22px; }

/* think text */
.think-text {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--fg-2);
  white-space: pre-wrap;
  background: var(--bg-1);
  border: var(--hair);
  border-radius: var(--r-2);
  padding: 16px 18px;
  max-height: 280px;
  overflow-y: auto;
}
.think-text strong { color: var(--fg-1); font-weight: 600; }
.think-text em { color: var(--signal); font-style: normal; }

/* code block */
.code-block {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.55;
  background: var(--bg-1);
  border: var(--hair);
  border-radius: var(--r-2);
  padding: 14px 18px;
  overflow-x: auto;
  white-space: pre;
  color: var(--fg-2);
  max-height: 360px;
  overflow-y: auto;
}
.code-block .kw   { color: var(--syn-keyword); }
.code-block .str  { color: var(--syn-string); }
.code-block .num  { color: var(--syn-number); }
.code-block .com  { color: var(--syn-comment); font-style: italic; }
.code-block .fn   { color: var(--syn-fn); }

/* ─── DAG visualization ─────────────────────────────────── */
.dag-canvas {
  position: relative;
  width: 100%;
  height: auto;
  background: var(--bg-1);
  border: var(--hair);
  border-radius: var(--r-2);
  overflow-x: auto;
  padding: 28px 24px;
}
.dag-svg { display: block; width: 100%; height: auto; min-width: 600px; }
.dag-node {
  fill: var(--bg-2);
  stroke: rgba(246,243,236,0.16);
  stroke-width: 1;
  transition: all 320ms cubic-bezier(0.22, 1, 0.36, 1);
}
.dag-node.source    { stroke: var(--info); }
.dag-node.filter    { stroke: var(--chart-6); }
.dag-node.join      { stroke: var(--signal); }
.dag-node.aggregate { stroke: var(--accent); }
.dag-node.sort      { stroke: var(--fg-3); }
.dag-node.limit     { stroke: var(--fg-3); }
.dag-node.project   { stroke: var(--chart-4); }
.dag-node.select    { stroke: var(--chart-4); }

.dag-node-active {
  fill: color-mix(in oklab, var(--signal) 12%, var(--bg-2));
  stroke: var(--signal) !important;
  stroke-width: 1.5;
}
.dag-node-label {
  font-family: var(--font-mono);
  font-size: 11px;
  fill: var(--fg-1);
  pointer-events: none;
}
.dag-node-type {
  font-family: var(--font-mono);
  font-size: 9px;
  fill: var(--fg-3);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  pointer-events: none;
}
.dag-edge {
  fill: none;
  stroke: rgba(246,243,236,0.22);
  stroke-width: 1.25;
  marker-end: url(#dag-arrow);
}
.dag-edge.flow {
  stroke: var(--signal);
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
  animation: flow-dash 800ms linear infinite;
}
@keyframes flow-dash {
  to { stroke-dashoffset: -16; }
}

/* ─── Result table ──────────────────────────────────────── */
.result-block {
  padding: 0 22px 18px;
}
.result-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--bg-1);
  border: var(--hair);
  border-radius: var(--r-2);
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
}
.result-summary.match {
  border-color: rgba(74, 219, 160, 0.4);
  background: rgba(74, 219, 160, 0.06);
}
.result-summary.miss {
  border-color: rgba(255, 106, 91, 0.4);
  background: rgba(255, 106, 91, 0.05);
}
.verdict {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.verdict.match { color: var(--accent); }
.verdict.miss  { color: var(--danger); }
.verdict .lucide { width: 14px; height: 14px; stroke-width: 2.5; }

.result-table-wrap {
  border: var(--hair);
  border-radius: var(--r-2);
  overflow: auto;
  max-height: 240px;
  background: var(--bg-1);
}
.result-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 11.5px;
}
.result-table thead th {
  background: var(--bg-2);
  color: var(--fg-3);
  font-weight: 500;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  font-size: 10px;
  text-align: left;
  padding: 10px 14px;
  border-bottom: var(--hair);
  position: sticky;
  top: 0;
}
.result-table tbody td {
  padding: 8px 14px;
  border-bottom: 1px solid rgba(246,243,236,0.04);
  color: var(--fg-1);
  white-space: nowrap;
}
.result-table tbody tr:last-child td { border-bottom: none; }
.result-table tbody tr:hover td { background: var(--bg-2); }

.result-more {
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-3);
  text-align: center;
  border-top: var(--hair);
  background: var(--bg-2);
}

/* ─── Verdict card after run ────────────────────────────── */
.verdict-card {
  margin-top: 32px;
  padding: 32px 36px;
  background: var(--bg-2);
  border: var(--hair);
  border-radius: var(--r-3);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
  align-items: center;
}
.verdict-card .vc-summary {
  font-size: 22px;
  line-height: 1.32;
  letter-spacing: -0.01em;
  color: var(--fg-1);
  font-weight: 400;
}
.verdict-card .vc-summary em {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--signal);
  font-weight: 400;
}
.verdict-card .vc-stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 8px;
}
.verdict-card .vc-stat-value {
  font-size: 36px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--fg-1);
  line-height: 1;
}
.verdict-card .vc-stat-value.helix { color: var(--signal); }
.verdict-card .vc-stat-value.sonnet { color: var(--info); }
.verdict-card .vc-stat-meta {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-3);
}

/* ─── Gold reference ────────────────────────────────────── */
.gold {
  margin-top: 36px;
  padding: 24px 28px;
  background: var(--bg-2);
  border: var(--hair);
  border-radius: var(--r-3);
}
.gold-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--fg-3);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.gold-title .lucide { width: 14px; height: 14px; color: var(--signal); }
.gold-sql {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.5;
  color: var(--fg-2);
  white-space: pre-wrap;
  margin: 0;
}

/* ─── Schema preview ────────────────────────────────────── */
.schema-block {
  margin-top: 28px;
  background: var(--bg-2);
  border: var(--hair);
  border-radius: var(--r-3);
  overflow: hidden;
}
.schema-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  cursor: pointer;
  user-select: none;
}
.schema-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--fg-3);
}
.schema-header-left .lucide { width: 14px; height: 14px; }
.schema-tables {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-3);
}
.schema-tables b { color: var(--fg-1); font-weight: 500; }
.schema-body {
  padding: 18px 22px;
  border-top: var(--hair);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.55;
  color: var(--fg-2);
  white-space: pre;
  overflow-x: auto;
  max-height: 360px;
  overflow-y: auto;
}

/* ─── Trail / intro narrative ───────────────────────────── */
.story {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 32px;
}
.story-step .step-num-large {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 36px;
  color: var(--signal);
  line-height: 1;
  margin-bottom: 16px;
}
.story-step h4 {
  font-size: 20px;
  font-weight: 500;
  margin: 0 0 10px;
  color: var(--fg-1);
  letter-spacing: -0.01em;
}
.story-step p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--fg-2);
  margin: 0;
}

/* ─── Footer ────────────────────────────────────────────── */
.footer {
  border-top: var(--hair);
  padding: 32px 40px;
  margin-top: 80px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--fg-3);
}
.footer a { color: var(--fg-2); text-decoration: none; }
.footer a:hover { color: var(--fg-1); }

/* ─── Small/responsive ──────────────────────────────────── */
@media (max-width: 1100px) {
  .stage { grid-template-columns: 1fr; }
  .verdict-card { grid-template-columns: 1fr; }
  .case-detail { grid-template-columns: 1fr; }
  .headline-numbers { grid-template-columns: 1fr; }
  .hn-cell { border-right: none; border-bottom: var(--hair); padding: 24px 0; }
  .hn-cell:last-child { border-bottom: none; }
  .story { grid-template-columns: 1fr; }
}

/* scrollbar prettify */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(246,243,236,0.1); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(246,243,236,0.2); }

/* ─── Run prompt (idle placeholder before pane appear) ─── */
.run-prompt {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 32px 36px;
  background: var(--bg-2);
  border: var(--hair);
  border-radius: var(--r-3);
  color: var(--fg-2);
}
.run-prompt .lucide,
.run-prompt .icon-slot { color: var(--signal); flex-shrink: 0; margin-top: 4px; }
.run-prompt-title {
  font-size: 19px;
  color: var(--fg-1);
  font-weight: 400;
  letter-spacing: -0.005em;
  margin-bottom: 6px;
}
.run-prompt-title b { color: var(--signal); font-weight: 500; font-family: var(--font-mono); font-size: 15px; padding: 1px 6px; border-radius: 4px; background: rgba(229, 179, 23, 0.1); }
.run-prompt-sub {
  font-size: 14px;
  line-height: 1.5;
  color: var(--fg-3);
  max-width: 70ch;
}

/* fade-in helper */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in {
  animation: fade-up 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* ─── Light theme override ─────────────────────────────────────
   Activated by html[data-theme="light"]. Flips surfaces and
   hairlines; signal/accent stay the same so identity carries.
   ============================================================ */
html[data-theme="light"] {
  --bg-0: #ece7da;
  --bg-1: #f6f3ec;
  --bg-2: #ffffff;
  --bg-3: #f0ece1;

  --fg-1: #121113;
  --fg-2: #4a4740;
  --fg-3: #7a7569;
  --fg-4: #b9b3a7;

  --hair:        1px solid rgba(18, 17, 19, 0.10);
  --hair-strong: 1px solid rgba(18, 17, 19, 0.18);
  --hair-signal: 1px solid rgba(199, 148, 8, 0.5);

  --syn-keyword: #b07a00;
  --syn-string:  #19a673;
  --syn-number:  #c4521e;
  --syn-comment: #7a7569;
  --syn-fn:      #2c5fd0;
}
html[data-theme="light"] body { background: var(--bg-1); color: var(--fg-1); }
html[data-theme="light"] .nav { background: color-mix(in oklab, var(--bg-1) 80%, transparent); }
html[data-theme="light"] .pane-header { background: linear-gradient(180deg, rgba(0,0,0,0.025), transparent); }
html[data-theme="light"] .case-card[data-active="true"] {
  background: color-mix(in oklab, var(--signal) 10%, var(--bg-2));
  box-shadow: 0 0 0 3px rgba(229, 179, 23, 0.14);
}
html[data-theme="light"] .case-card:hover {
  border-color: rgba(18, 17, 19, 0.18);
  background: color-mix(in oklab, var(--signal) 4%, var(--bg-2));
}
html[data-theme="light"] .btn-ghost {
  color: var(--fg-1);
  border: 1px solid rgba(18, 17, 19, 0.15);
}
html[data-theme="light"] .btn-ghost:hover {
  background: rgba(18, 17, 19, 0.04);
  border-color: rgba(18, 17, 19, 0.25);
}
html[data-theme="light"] .dag-edge { stroke: rgba(18, 17, 19, 0.32); }
html[data-theme="light"] .result-table tbody td { border-bottom: 1px solid rgba(18, 17, 19, 0.05); }
html[data-theme="light"] ::-webkit-scrollbar-thumb { background: rgba(18, 17, 19, 0.18); }
html[data-theme="light"] ::-webkit-scrollbar-thumb:hover { background: rgba(18, 17, 19, 0.32); }
html[data-theme="light"] .result-summary.match { background: rgba(74, 219, 160, 0.14); }
html[data-theme="light"] .result-summary.miss { background: rgba(255, 106, 91, 0.12); }
html[data-theme="light"] .pane-title .badge.fine-tune { background: rgba(229, 179, 23, 0.14); }
html[data-theme="light"] .pane-title .badge.baseline { background: rgba(122, 162, 255, 0.14); }
