/* ===========================================================
   Shared styles for personal project detail pages
   Design system: Syne + JetBrains Mono · cyan #38bdf8 · black
   =========================================================== */

:root {
  --bg: #000000;
  --surface: #0a0e14;
  --surface-2: #0e131a;
  --border: #11161e;
  --border-strong: #1a2230;
  --text: #ffffff;
  --text-body: #d1d5db;
  --text-muted: #6b7280;
  --text-faint: #4b5563;
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.08);
  --accent-line: rgba(56, 189, 248, 0.18);
  --warn: #f59e0b;
  --warn-soft: rgba(245, 158, 11, 0.08);
  --ok: #65a30d;

  --font-display: 'Syne', -apple-system, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --font-body: 'JetBrains Mono', ui-monospace, monospace;

  --container: 1240px;
  --gutter: clamp(20px, 5vw, 64px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

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

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image:
    linear-gradient(var(--accent-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--accent-line) 1px, transparent 1px);
  background-size: 120px 120px;
  opacity: 0.12;
}

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
  z-index: 2;
}

/* ============ NAV ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
}
.nav-back {
  color: var(--text-muted);
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.nav-back:hover { color: var(--text); }
.nav-meta { color: var(--text-faint); text-transform: uppercase; }

/* ============ HERO ============ */
.hero {
  padding: clamp(72px, 12vw, 140px) 0 clamp(56px, 9vw, 110px);
  border-bottom: 1px solid var(--border);
  position: relative;
}
.hero-flagship {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.hero-flagship::before, .hero-flagship::after {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--accent);
  opacity: 0.6;
}
.hero-kicker {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 36px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.hero-kicker::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(56px, 11vw, 140px);
  line-height: 0.94;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 40px;
  max-width: 18ch;
}
.hero-title em {
  font-style: italic;
  color: var(--accent);
  font-weight: 800;
}
.hero-sub {
  font-family: var(--font-mono);
  font-size: clamp(15px, 1.35vw, 17px);
  line-height: 1.75;
  color: var(--text-body);
  max-width: 78ch;
  margin-bottom: 56px;
  font-weight: 400;
}
.hero-sub strong { color: var(--text); font-weight: 500; }
.hero-sub em { color: var(--accent); font-style: normal; }
.hero-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 32px;
  border-top: 1px solid var(--border);
  padding-top: 36px;
  max-width: 1000px;
}
.hero-meta-item .label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: block;
}
.hero-meta-item .value {
  font-family: var(--font-display);
  font-size: 17px;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.005em;
}
.hero-meta-item .value.mono { font-family: var(--font-mono); font-size: 14px; font-weight: 500; }
.hero-meta-item .value.accent { color: var(--accent); }
.hero-cta { margin-top: 48px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-body);
  letter-spacing: 0.04em;
  transition: all 0.2s;
}
.hero-pill:hover { background: var(--surface-2); border-color: var(--accent); color: var(--text); }
.hero-pill .dot {
  width: 8px; height: 8px;
  background: var(--ok);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }

/* ============ SECTION ============ */
.section {
  padding: clamp(56px, 9vw, 110px) 0;
  border-bottom: 1px solid var(--border);
}
.section-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 24px;
  display: block;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(34px, 5.2vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 48px;
  max-width: 22ch;
}
.section-title em { font-style: italic; color: var(--accent); }

.prose {
  max-width: 76ch;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-body);
}
.prose p { margin-bottom: 1.4em; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--text); font-weight: 500; }
.prose em { color: var(--accent); font-style: normal; }
.prose .highlight { color: var(--accent); font-style: normal; }
.prose code {
  font-family: var(--font-mono);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  padding: 2px 8px;
  color: var(--accent);
  font-size: 0.92em;
}

/* ============ TWO-COLUMN ============ */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}
@media (max-width: 880px) { .two-col { grid-template-columns: 1fr; } }
.column-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.column-label::before { content: ''; width: 6px; height: 6px; background: var(--accent); border-radius: 50%; }

/* ============ DIAGRAM WRAPPERS ============ */
.diagram-wrap, .arch-wrap, .lp-wrap, .sources-wrap {
  margin-top: 32px;
  padding: 48px 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  overflow-x: auto;
}
.diagram-wrap svg, .arch-wrap svg, .lp-wrap svg, .sources-wrap svg {
  display: block; margin: 0 auto; max-width: 100%; height: auto;
}
.diagram-caption, .arch-caption, .lp-caption, .sources-caption {
  margin-top: 32px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  text-align: center;
  letter-spacing: 0.06em;
  max-width: 70ch;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}
.diagram-caption strong, .arch-caption strong, .lp-caption strong, .sources-caption strong { color: var(--accent); }

/* ============ STAGES ============ */
.stages {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-top: 32px;
}
@media (max-width: 880px) { .stages { grid-template-columns: 1fr; } }
.stage { background: var(--bg); padding: 44px 32px; transition: background 0.3s ease; }
.stage:hover { background: var(--surface); }
.stage-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.stage-when { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); margin-bottom: 24px; display: block; }
.stage-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 18px;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.stage-title em { color: var(--accent); font-style: italic; }
.stage-model {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 24px;
  padding: 8px 12px;
  background: var(--accent-soft);
  border: 1px solid var(--border-strong);
  display: inline-block;
}
.stage-body { font-family: var(--font-mono); font-size: 13px; color: var(--text-body); line-height: 1.7; margin-bottom: 24px; }
.stage-body code { font-family: var(--font-mono); background: var(--surface); border: 1px solid var(--border-strong); padding: 1px 6px; color: var(--accent); font-size: 0.92em; }
.stage-headline { padding-top: 24px; border-top: 1px solid var(--border-strong); }
.stage-headline-label { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 10px; }
.stage-headline-value {
  font-family: var(--font-display);
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.02em;
}
.stage-headline-value.accent { color: var(--accent); }
.stage-headline-value em { font-style: italic; color: var(--accent); }

/* ============ FLOW STEPS ============ */
.flow { margin-top: 24px; display: grid; gap: 0; }
.flow-step {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 28px;
  padding: 30px 0;
  border-top: 1px solid var(--border);
  transition: background 0.3s ease;
}
.flow-step:last-child { border-bottom: 1px solid var(--border); }
.flow-step:hover { background: linear-gradient(to right, var(--surface), transparent 50%); }
.flow-step-num { font-family: var(--font-mono); font-size: 13px; color: var(--accent); letter-spacing: 0.1em; padding-top: 6px; }
.flow-step-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.flow-step-body { font-family: var(--font-mono); color: var(--text-body); font-size: 14px; line-height: 1.7; max-width: 64ch; }
.flow-step-body code { font-family: var(--font-mono); background: var(--surface); border: 1px solid var(--border-strong); padding: 1px 6px; color: var(--accent); font-size: 0.92em; }
.flow-step-tech { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.tech-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  padding: 5px 10px;
  border-radius: 2px;
  letter-spacing: 0.04em;
}

/* ============ RESULTS GRID ============ */
.results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-top: 24px;
}
.result-cell { background: var(--bg); padding: 36px 28px; transition: background 0.3s ease; }
.result-cell:hover { background: var(--surface); }
.result-label { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 18px; }
.result-number {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 56px);
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}
.result-number.accent { color: var(--accent); }
.result-number.cream { color: var(--accent); font-style: italic; font-weight: 700; }
.result-number.warn { color: var(--warn); }
.result-caption { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); line-height: 1.5; max-width: 28ch; }

/* ============ DECISIONS ============ */
.decisions { display: grid; gap: 0; margin-top: 24px; }
.decision {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 48px;
  padding: 36px 0;
  border-top: 1px solid var(--border);
  align-items: start;
}
.decision:last-child { border-bottom: 1px solid var(--border); }
.decision-q {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.5;
  padding-top: 4px;
}
.decision-a { font-family: var(--font-mono); font-size: 14px; color: var(--text-body); line-height: 1.75; max-width: 64ch; }
.decision-a strong { color: var(--text); font-weight: 500; }
.decision-a em { color: var(--accent); font-style: normal; }
.decision-a code { font-family: var(--font-mono); background: var(--surface); border: 1px solid var(--border-strong); padding: 1px 6px; color: var(--accent); font-size: 0.92em; }
@media (max-width: 768px) { .decision { grid-template-columns: 1fr; gap: 14px; } }

/* ============ PHASE / FEATURE / SQUAD TABLES ============ */
.phase-table, .feature-table, .squad-wrap { margin-top: 32px; border: 1px solid var(--border); background: var(--surface); }
.phase-table-head, .squad-header { padding: 24px 28px; border-bottom: 1px solid var(--border-strong); }
.squad-header { display: flex; flex-wrap: wrap; gap: 24px; align-items: baseline; justify-content: space-between; }
.phase-table-title, .squad-title { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 8px; letter-spacing: -0.01em; }
.phase-table-sub { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); letter-spacing: 0.05em; }
.squad-stats { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); letter-spacing: 0.04em; }
.squad-stats .total { color: var(--accent); }
.squad-stats .budget { color: var(--warn); }
.phase-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.5fr; font-family: var(--font-mono); font-size: 13px; }
.squad-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr auto; font-family: var(--font-mono); font-size: 13px; }
@media (max-width: 640px) { .squad-grid { grid-template-columns: 1.5fr 1fr; } .squad-cell.hide-mobile { display: none; } }
.phase-cell, .squad-cell { padding: 16px 28px; border-top: 1px solid var(--border); color: var(--text-body); }
.squad-cell { padding: 13px 28px; }
.phase-cell.head, .squad-cell.head { background: var(--surface-2); font-size: 11px; color: var(--text-faint); letter-spacing: 0.1em; text-transform: uppercase; border-top: none; }
.phase-cell.range { color: var(--text); }
.phase-cell.metric { color: var(--accent); font-weight: 600; }
.phase-cell.metric.peak { color: var(--accent); font-size: 15px; font-weight: 700; }
.phase-cell.note { color: var(--text-muted); font-family: var(--font-mono); font-size: 12px; }
.squad-cell.name { color: var(--text); font-weight: 500; }
.squad-cell.cost { color: var(--accent); text-align: right; }
.feature-row { display: grid; grid-template-columns: 220px 1fr; gap: 32px; padding: 22px 28px; border-top: 1px solid var(--border); }
.feature-row:first-child { border-top: none; background: var(--surface-2); }
.feature-row-cat { font-family: var(--font-mono); font-size: 12px; color: var(--accent); letter-spacing: 0.08em; text-transform: uppercase; padding-top: 4px; }
.feature-row:first-child .feature-row-cat { color: var(--text-faint); font-size: 11px; }
.feature-row-features { font-family: var(--font-mono); font-size: 13px; color: var(--text-body); line-height: 1.7; }
.feature-row-features code { color: var(--accent); }
.feature-row:first-child .feature-row-features { font-size: 11px; color: var(--text-faint); letter-spacing: 0.1em; text-transform: uppercase; }
@media (max-width: 768px) { .feature-row { grid-template-columns: 1fr; gap: 10px; padding: 18px 22px; } }

/* ============ FORMULA ============ */
.formula {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  padding: 28px 24px;
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 2;
  color: var(--text-body);
  overflow-x: auto;
}
.formula-label { font-family: var(--font-mono); font-size: 11px; color: var(--accent); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 16px; font-weight: 600; }
.formula-line { white-space: nowrap; }
.formula .weight { color: var(--accent); font-weight: 600; }
.formula .var { color: var(--text); }
.formula .op { color: var(--text-faint); }
.formula .out { color: var(--accent); font-weight: 700; }
.formula .cond { color: var(--warn); }

/* ============ BOARDS (leaderboards) ============ */
.boards { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 32px; }
@media (max-width: 880px) { .boards { grid-template-columns: 1fr; } }
.board { background: var(--surface); border: 1px solid var(--border); padding: 28px 24px; }
.board-label { font-family: var(--font-mono); font-size: 11px; color: var(--accent); letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 24px; display: flex; align-items: center; gap: 10px; }
.board-label::before { content: ''; width: 6px; height: 6px; background: var(--accent); border-radius: 50%; }
.board-row { display: grid; grid-template-columns: 32px 1fr auto; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); align-items: baseline; }
.board-row:first-of-type { border-top: 1px solid var(--border-strong); }
.board-row-rank { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); }
.board-row-name { font-family: var(--font-display); font-size: 15px; color: var(--text); font-weight: 500; letter-spacing: -0.005em; }
.board-row-score { font-family: var(--font-mono); font-size: 13px; color: var(--accent); }
.board-row:nth-child(2) .board-row-score { color: var(--accent); font-weight: 700; }

/* ============ HONESTY / WARN BLOCK ============ */
.honesty, .leakage, .preamble {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  padding: clamp(28px, 4.5vw, 48px);
  margin-top: 24px;
  position: relative;
  overflow: hidden;
}
.preamble { padding: clamp(26px, 3.5vw, 40px); }
.honesty::before, .leakage::before, .preamble::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--warn);
}
.honesty-label, .leakage-label, .preamble-label {
  font-family: var(--font-mono); font-size: 11px; color: var(--warn);
  letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 20px;
}
.preamble-label { margin-bottom: 18px; }
.honesty-title, .leakage-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.8vw, 30px);
  color: var(--text);
  margin-bottom: 22px;
  font-weight: 700;
  line-height: 1.2;
  max-width: 28ch;
  letter-spacing: -0.01em;
}
.honesty-title em, .leakage-title em { color: var(--accent); font-style: italic; }
.honesty-body, .leakage-body, .preamble-text {
  font-family: var(--font-mono); color: var(--text-body); font-size: 14px;
  line-height: 1.75; max-width: 72ch; margin-bottom: 28px;
}
.preamble-text { margin-bottom: 0; }
.honesty-body strong, .leakage-body strong, .preamble-text strong { color: var(--text); font-weight: 500; }
.honesty-body em, .leakage-body em, .preamble-text em { color: var(--accent); font-style: normal; }
.honesty-body code, .leakage-body code, .preamble-text code {
  font-family: var(--font-mono); background: var(--bg); border: 1px solid var(--border-strong);
  padding: 1px 6px; color: var(--accent); font-size: 0.92em;
}
.honesty-body p, .preamble-text p { margin-bottom: 1.2em; }
.honesty-body p:last-child, .preamble-text p:last-child { margin-bottom: 0; }
.honesty-stat { display: flex; align-items: baseline; gap: 28px; padding: 28px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.honesty-stat:first-of-type { border-top: 1px solid var(--border-strong); }
.honesty-stat-num {
  font-family: var(--font-display);
  font-size: clamp(38px, 5vw, 52px);
  color: var(--warn);
  font-weight: 800;
  line-height: 1;
  font-style: italic;
  letter-spacing: -0.02em;
}
.honesty-stat-text { flex: 1; min-width: 240px; font-family: var(--font-mono); font-size: 14px; color: var(--text-body); line-height: 1.7; }
.honesty-table { display: grid; gap: 0; margin-top: 28px; font-family: var(--font-mono); font-size: 13px; }
.honesty-row { display: grid; grid-template-columns: minmax(180px, 1fr) 80px 2fr; gap: 20px; padding: 18px 0; border-top: 1px solid var(--border); align-items: start; }
.honesty-row:last-child { border-bottom: 1px solid var(--border); }
.honesty-row-name { color: var(--text); }
.honesty-row-num { color: var(--warn); font-weight: 700; }
.honesty-row-truth { color: var(--text-muted); font-family: var(--font-mono); font-size: 13px; line-height: 1.6; }
.honesty-row-truth code { font-family: var(--font-mono); color: var(--accent); }
@media (max-width: 768px) { .honesty-row { grid-template-columns: 1fr; gap: 6px; } }

.leakage-case { padding: 28px 0; border-top: 1px solid var(--border-strong); }
.leakage-case-tag { font-family: var(--font-mono); font-size: 11px; color: var(--warn); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 14px; }
.leakage-case-title { font-family: var(--font-display); font-size: 20px; color: var(--text); margin-bottom: 16px; font-weight: 700; letter-spacing: -0.01em; }
.leakage-case-metric { display: inline-block; font-family: var(--font-mono); font-size: 12px; color: var(--warn); background: var(--warn-soft); padding: 4px 10px; margin-bottom: 16px; border-radius: 2px; letter-spacing: 0.04em; }
.leakage-case-body { font-family: var(--font-mono); color: var(--text-body); font-size: 13px; line-height: 1.7; max-width: 70ch; }
.leakage-case-body strong { color: var(--text); font-weight: 500; }
.leakage-case-body code { font-family: var(--font-mono); color: var(--accent); }
.leakage-case-formula { margin-top: 14px; padding: 14px 18px; background: var(--bg); border: 1px solid var(--border-strong); font-family: var(--font-mono); font-size: 12px; line-height: 1.7; color: var(--text-body); overflow-x: auto; }
.leakage-case-formula .feat { color: var(--warn); }
.leakage-case-formula .targ { color: var(--accent); }

.leakage-lesson { margin-top: 32px; padding: 24px; background: var(--bg); border: 1px solid var(--border-strong); }
.leakage-lesson-tag { font-family: var(--font-mono); font-size: 11px; color: var(--ok); letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 14px; }
.leakage-lesson-text { font-family: var(--font-display); color: var(--text); font-size: 17px; line-height: 1.55; font-style: italic; font-weight: 500; max-width: 60ch; letter-spacing: -0.005em; }

/* ============ COMPONENTS (3-up) ============ */
.components { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1px; background: var(--border); border: 1px solid var(--border); margin-top: 32px; }
@media (max-width: 880px) { .components { grid-template-columns: 1fr; } }
.component { background: var(--bg); padding: 36px 28px; transition: background 0.3s ease; }
.component:hover { background: var(--surface); }
.component-tag { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 22px; display: flex; align-items: center; gap: 10px; }
.component-tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; }
.component-tag.ok { color: var(--ok); }
.component-tag.ok::before { background: var(--ok); }
.component-tag.broken { color: var(--warn); }
.component-tag.broken::before { background: var(--warn); }
.component-title { font-family: var(--font-display); font-size: clamp(20px, 2.4vw, 26px); font-weight: 700; color: var(--text); margin-bottom: 16px; line-height: 1.2; letter-spacing: -0.01em; }
.component-desc { font-family: var(--font-mono); font-size: 13px; color: var(--text-body); line-height: 1.7; }
.component-desc code { font-family: var(--font-mono); color: var(--accent); }
.component-desc em { color: var(--accent); font-style: normal; }

/* ============ PAGES GRID (venue) ============ */
.pages-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); border: 1px solid var(--border); margin-top: 32px; }
@media (max-width: 880px) { .pages-grid { grid-template-columns: 1fr; } }
.page-card { background: var(--bg); padding: 40px 32px; transition: background 0.3s ease; display: flex; flex-direction: column; }
.page-card:hover { background: var(--surface); }
.page-card-tag { font-family: var(--font-mono); font-size: 11px; color: var(--accent); letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 18px; }
.page-card-title { font-family: var(--font-display); font-size: clamp(20px, 2.5vw, 28px); font-weight: 700; color: var(--text); margin-bottom: 16px; line-height: 1.15; letter-spacing: -0.01em; }
.page-card-title em { color: var(--accent); font-style: italic; }
.page-card-body { font-family: var(--font-mono); font-size: 13px; color: var(--text-body); line-height: 1.7; margin-bottom: 24px; flex: 1; }
.page-card-list { list-style: none; padding-top: 20px; border-top: 1px solid var(--border-strong); }
.page-card-list li { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); padding: 6px 0; display: flex; gap: 10px; }
.page-card-list li::before { content: '·'; color: var(--accent); font-weight: 700; }

/* ============ FRAMING (cyan accent bar) ============ */
.framing { background: var(--surface); border: 1px solid var(--border-strong); padding: clamp(28px, 4.5vw, 48px); margin-top: 24px; position: relative; overflow: hidden; }
.framing::before { content: ''; position: absolute; top: 0; left: 0; width: 3px; height: 100%; background: var(--accent); }
.framing-label { font-family: var(--font-mono); font-size: 11px; color: var(--accent); letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 20px; }
.framing-title { font-family: var(--font-display); font-size: clamp(22px, 2.8vw, 32px); color: var(--text); margin-bottom: 22px; font-weight: 700; line-height: 1.2; max-width: 26ch; letter-spacing: -0.01em; }
.framing-title em { color: var(--accent); font-style: italic; }
.framing-body { font-family: var(--font-mono); color: var(--text-body); font-size: 14px; line-height: 1.75; max-width: 72ch; margin-bottom: 28px; }
.framing-body strong { color: var(--text); font-weight: 500; }
.framing-body em { color: var(--accent); font-style: normal; }
.framing-body code { font-family: var(--font-mono); background: var(--bg); border: 1px solid var(--border-strong); padding: 1px 6px; color: var(--accent); font-size: 0.92em; }
.framing-body p { margin-bottom: 1.2em; }
.framing-body p:last-child { margin-bottom: 0; }

/* ============ LIMITS ============ */
.limits { display: grid; gap: 0; margin-top: 24px; }
.limit-item { display: grid; grid-template-columns: 28px 1fr; gap: 18px; padding: 22px 0; border-top: 1px solid var(--border); }
.limit-item:last-child { border-bottom: 1px solid var(--border); }
.limit-num { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); padding-top: 4px; letter-spacing: 0.04em; }
.limit-text { font-family: var(--font-mono); color: var(--text-body); font-size: 14px; line-height: 1.7; }
.limit-text strong { color: var(--text); font-weight: 500; }
.limit-text code { font-family: var(--font-mono); background: var(--surface); border: 1px solid var(--border-strong); padding: 1px 6px; color: var(--accent); font-size: 0.92em; }

/* V2 block */
.v2-block { background: var(--surface); border: 1px solid var(--border-strong); padding: 36px; margin-top: 48px; }
.v2-label { font-family: var(--font-mono); font-size: 11px; color: var(--accent); letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 18px; }
.v2-title { font-family: var(--font-display); font-size: 22px; color: var(--text); margin-bottom: 22px; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
.v2-list { list-style: none; }
.v2-list li { font-family: var(--font-mono); padding: 12px 0; border-top: 1px solid var(--border); color: var(--text-body); font-size: 13px; display: grid; grid-template-columns: 32px 1fr; gap: 12px; line-height: 1.7; }
.v2-list li:first-child { border-top: none; }
.v2-list li code { font-family: var(--font-mono); color: var(--accent); }
.v2-list .v2-tag { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); padding-top: 3px; }

/* ============ ROLE CARDS ============ */
.roles-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 32px; }
.role-card { background: var(--surface); border: 1px solid var(--border); padding: 28px 24px; transition: all 0.3s ease; position: relative; overflow: hidden; }
.role-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 0.4s ease; }
.role-card:hover { border-color: var(--accent); }
.role-card:hover::before { transform: scaleX(1); }
.role-card-tag { font-family: var(--font-mono); font-size: 11px; color: var(--accent); letter-spacing: 0.12em; margin-bottom: 16px; }
.role-card-name { font-family: var(--font-display); font-size: 20px; color: var(--text); margin-bottom: 14px; font-weight: 700; line-height: 1.2; letter-spacing: -0.005em; }
.role-card-players { font-family: var(--font-mono); font-size: 13px; color: var(--text-muted); line-height: 1.8; }

/* ============ CTA ============ */
.cta {
  padding: clamp(80px, 12vw, 140px) 0;
  text-align: left;
  border-bottom: 1px solid var(--border);
  background: radial-gradient(ellipse at top, var(--surface) 0%, var(--bg) 70%);
  position: relative;
}
.cta-eyebrow { font-family: var(--font-mono); font-size: 12px; color: var(--accent); letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 24px; }
.cta-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5.5vw, 64px);
  line-height: 1.0;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 24px;
  max-width: 22ch;
  font-weight: 800;
}
.cta-title em { font-style: italic; color: var(--accent); }
.cta-sub { font-family: var(--font-mono); font-size: 15px; color: var(--text-muted); margin-bottom: 44px; max-width: 56ch; line-height: 1.7; }
.cta-buttons { display: flex; flex-wrap: wrap; gap: 14px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 28px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text);
  transition: all 0.25s ease;
  cursor: pointer;
}
.btn:hover { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #000; }
.btn-primary:hover { background: #7dd3fc; border-color: #7dd3fc; color: #000; }
.btn svg { width: 14px; height: 14px; }
.btn .live-dot { width: 8px; height: 8px; background: currentColor; border-radius: 50%; animation: pulse 2s ease-in-out infinite; }

/* ============ FOOTER ============ */
.footer { padding: 48px 0 64px; font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); letter-spacing: 0.04em; border-top: 1px solid var(--border); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; }
.footer a { color: var(--text-muted); transition: color 0.2s; }
.footer a:hover { color: var(--text); }

/* ============ ANIMATIONS ============ */
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.hero-flagship { animation: fadeUp 0.5s ease-out 0s both; }
.hero-kicker { animation: fadeUp 0.6s ease-out 0.05s both; }
.hero-title { animation: fadeUp 0.8s ease-out 0.15s both; }
.hero-sub { animation: fadeUp 0.8s ease-out 0.3s both; }
.hero-meta { animation: fadeUp 0.8s ease-out 0.5s both; }
.hero-cta { animation: fadeUp 0.8s ease-out 0.7s both; }
@keyframes dash { to { stroke-dashoffset: 0; } }
.diagram-edge { stroke-dasharray: 200; stroke-dashoffset: 200; animation: dash 1.5s ease-out 0.5s forwards; }
.diagram-edge:nth-child(2) { animation-delay: 0.7s; }
.diagram-edge:nth-child(3) { animation-delay: 0.9s; }

@media (max-width: 640px) {
  .flow-step { grid-template-columns: 60px 1fr; gap: 16px; }
  .nav-meta { display: none; }
  body { font-size: 13px; }
}
