/*
 * Brand tokens — normative contract: DESIGN.md (repo root).
 * Change DESIGN.md first, then mirror values here.
 * Do not invent off-palette colors in components.
 */
/* Big Sky ROI — institutional desk system */
:root {
  --bg: #070b14;
  --bg-elev: #0a101c;
  --panel: #0d1424;
  --panel-2: #111a2e;
  --line: #1a2744;
  --line-hot: #2a3d66;
  --text: #e8edf5;
  --muted: #8b9bb4;
  --faint: #5c6b86;
  --gold: #e8b84a;
  --gold-dim: rgba(232, 184, 74, 0.14);
  --sky: #5ab0ff;
  --sky-dim: rgba(90, 176, 255, 0.12);
  --long: #1ecb8c;
  --long-dim: rgba(30, 203, 140, 0.12);
  --risk: #f04343;
  --risk-dim: rgba(240, 67, 67, 0.12);
  --amber: #f59f00;
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", "SF Mono", ui-monospace, monospace;
  --radius: 12px;
  --radius-sm: 8px;
  --max: 1180px;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Atmosphere */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(90, 176, 255, 0.14), transparent 55%),
    radial-gradient(ellipse 40% 30% at 90% 20%, rgba(232, 184, 74, 0.06), transparent 50%),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(30, 203, 140, 0.04), transparent 50%),
    var(--bg);
}

img { max-width: 100%; display: block; }
a { color: var(--sky); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: #8ec8ff; }
button { font-family: inherit; cursor: pointer; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

.container { width: min(100% - 2rem, var(--max)); margin-inline: auto; }
.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.75rem;
}
.section-title {
  font-family: var(--serif);
  font-size: clamp(1.85rem, 3.5vw, 2.65rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}
.section-lede {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 52ch;
  margin: 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(26, 39, 68, 0.85);
  background: rgba(7, 11, 20, 0.82);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.brand:hover { color: var(--text); }
.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: linear-gradient(145deg, var(--sky), #1a4d8c 55%, var(--gold));
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 4px 16px rgba(90,176,255,0.25);
  position: relative;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 7px 6px 8px 6px;
  border-top: 2px solid rgba(255,255,255,0.9);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  opacity: 0.85;
}
.brand-text { font-size: 0.95rem; }
.brand-text span { color: var(--gold); font-weight: 500; }

.nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}
.nav a {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
}
.nav a:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.nav a.active { color: var(--text); }

.nav-cta {
  margin-left: 0.5rem;
  padding: 0.45rem 0.9rem !important;
  background: var(--gold) !important;
  color: #14100a !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
}
.nav-cta:hover { filter: brightness(1.08); color: #14100a !important; }

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  font-size: 0.8rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.15rem;
  border-radius: 9px;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid transparent;
  transition: transform 0.12s ease, filter 0.12s ease, background 0.12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-gold {
  background: linear-gradient(180deg, #f0c862, var(--gold));
  color: #14100a;
  box-shadow: 0 1px 0 rgba(255,255,255,0.25) inset, 0 8px 24px rgba(232,184,74,0.2);
}
.btn-gold:hover { filter: brightness(1.06); color: #14100a; }
.btn-ghost {
  background: transparent;
  border-color: var(--line-hot);
  color: var(--text);
}
.btn-ghost:hover { background: rgba(255,255,255,0.04); color: var(--text); border-color: var(--muted); }
.btn-sky {
  background: var(--sky-dim);
  border-color: rgba(90,176,255,0.35);
  color: var(--sky);
}
.btn-sky:hover { background: rgba(90,176,255,0.2); color: #8ec8ff; }
.btn-lg { padding: 0.85rem 1.35rem; font-size: 0.95rem; }

/* Ticker */
.ticker {
  border-bottom: 1px solid var(--line);
  background: var(--bg-elev);
  overflow: hidden;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}
.ticker-track {
  display: flex;
  gap: 2rem;
  width: max-content;
  padding: 0.55rem 0;
  animation: ticker 48s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.tick {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  white-space: nowrap;
  color: var(--muted);
  padding: 0 0.25rem;
}
.tick .sym { color: var(--text); font-weight: 600; }
.tick .up { color: var(--long); }
.tick .dn { color: var(--risk); }
.tick .tag {
  font-size: 0.65rem;
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  background: var(--panel-2);
  color: var(--faint);
  border: 1px solid var(--line);
}

/* Hero */
.hero {
  padding: 3.5rem 0 2.5rem;
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: start;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 5.2vw, 3.75rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 1.15rem;
}
.hero h1 em {
  font-style: italic;
  color: var(--gold);
  font-weight: 400;
}
.hero-lede {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 42ch;
  margin: 0 0 1.75rem;
  line-height: 1.6;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}
.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.85rem 0.95rem;
}
.stat .label {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 0.35rem;
}
.stat .value {
  font-family: var(--mono);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
}
.stat .value.gold { color: var(--gold); }
.stat .value.long { color: var(--long); }
.stat .sub { font-size: 0.72rem; color: var(--faint); margin-top: 0.2rem; }

/* Terminal panel */
.desk-panel {
  background: linear-gradient(165deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.03) inset,
    0 24px 48px rgba(0,0,0,0.35);
}
.desk-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(0,0,0,0.2);
}
.desk-panel-head .title {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--long);
  box-shadow: 0 0 0 0 rgba(30, 203, 140, 0.5);
  animation: pulse 2s ease infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(30, 203, 140, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(30, 203, 140, 0); }
  100% { box-shadow: 0 0 0 0 rgba(30, 203, 140, 0); }
}
.desk-panel-head .asof {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--faint);
}
.desk-rows { padding: 0.35rem 0; }
.desk-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid rgba(26, 39, 68, 0.55);
  transition: background 0.12s ease;
}
.desk-row:last-child { border-bottom: 0; }
.desk-row:hover { background: rgba(90, 176, 255, 0.04); }
.desk-row .name {
  font-weight: 550;
  font-size: 0.9rem;
}
.desk-row .meta {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--faint);
  margin-top: 0.15rem;
}
.badge {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.45rem;
  border-radius: 4px;
  white-space: nowrap;
}
.badge-buy { background: var(--long-dim); color: var(--long); border: 1px solid rgba(30,203,140,0.3); }
.badge-hold { background: var(--gold-dim); color: var(--gold); border: 1px solid rgba(232,184,74,0.3); }
.badge-watch { background: var(--sky-dim); color: var(--sky); border: 1px solid rgba(90,176,255,0.3); }
.badge-avoid { background: var(--risk-dim); color: var(--risk); border: 1px solid rgba(240,67,67,0.3); }
.score {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.95rem;
  min-width: 2.5rem;
  text-align: right;
}
.score.high { color: var(--long); }
.score.mid { color: var(--gold); }
.score.low { color: var(--risk); }

/* Sections */
section { padding: 4rem 0; }
section.tight { padding: 2.5rem 0; }
.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 2rem;
}

/* Framework grid */
.framework-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.frame-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.3rem;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.frame-card:hover {
  border-color: var(--line-hot);
  transform: translateY(-2px);
}
.frame-card .num {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--gold);
  letter-spacing: 0.08em;
  margin-bottom: 0.6rem;
}
.frame-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
}
.frame-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
}

/* Conviction board table */
.board-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.board-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.board-table th {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  text-align: left;
  padding: 0.85rem 1rem;
  background: rgba(0,0,0,0.25);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.board-table td {
  padding: 0.95rem 1rem;
  border-bottom: 1px solid rgba(26, 39, 68, 0.6);
  vertical-align: middle;
}
.board-table tr:last-child td { border-bottom: 0; }
.board-table tbody tr {
  transition: background 0.12s ease;
  cursor: default;
}
.board-table tbody tr:hover { background: rgba(90, 176, 255, 0.04); }
.board-table .idea {
  font-weight: 600;
  color: var(--text);
}
.board-table .cat {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--faint);
}
.board-table .num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.board-table .right { text-align: right; }
.spark {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 18px;
}
.spark i {
  display: block;
  width: 3px;
  border-radius: 1px;
  background: var(--long);
  opacity: 0.85;
}
.spark.down i { background: var(--risk); }

/* Thesis cards */
.thesis-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.thesis {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.thesis-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 0.75rem;
}
.thesis h3 {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 500;
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.thesis .thesis-body {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0;
  flex: 1;
}
.thesis-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}
.thesis-metrics .m .l {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}
.thesis-metrics .m .v {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: 0.15rem;
}

/* Calculator */
.calc-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: start;
}
.calc-form, .calc-out {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
}
.calc-form h3, .calc-out h3 {
  font-size: 1rem;
  margin: 0 0 1.1rem;
  font-weight: 600;
}
.field {
  margin-bottom: 1rem;
}
.field label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.field label .hint {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--gold);
}
.field input[type="range"] {
  width: 100%;
  accent-color: var(--gold);
  height: 4px;
}
.field input[type="number"] {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.95rem;
  padding: 0.55rem 0.75rem;
}
.field input[type="number"]:focus {
  outline: none;
  border-color: var(--sky);
  box-shadow: 0 0 0 3px var(--sky-dim);
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.out-hero {
  text-align: center;
  padding: 1.25rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.1rem;
}
.out-hero .big {
  font-family: var(--mono);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 600;
  color: var(--long);
  letter-spacing: -0.02em;
}
.out-hero .big.neg { color: var(--risk); }
.out-hero .caption {
  font-size: 0.8rem;
  color: var(--faint);
  margin-top: 0.35rem;
  font-family: var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.out-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.out-cell {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.85rem;
}
.out-cell .l {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--faint);
}
.out-cell .v {
  font-family: var(--mono);
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 0.25rem;
}
.verdict {
  margin-top: 1.1rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  line-height: 1.5;
  border: 1px solid var(--line);
}
.verdict.pass { background: var(--long-dim); border-color: rgba(30,203,140,0.3); color: #b8f0d8; }
.verdict.warn { background: var(--gold-dim); border-color: rgba(232,184,74,0.3); color: #f5e0a8; }
.verdict.fail { background: var(--risk-dim); border-color: rgba(240,67,67,0.3); color: #f5b8b8; }

/* Process */
.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}
.process::before {
  content: "";
  position: absolute;
  top: 22px;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-hot), transparent);
  z-index: 0;
}
.step {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 1rem;
}
.step .dot {
  width: 44px;
  height: 44px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid var(--line-hot);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold);
  box-shadow: 0 0 0 6px var(--bg);
}
.step h3 {
  font-size: 0.95rem;
  margin: 0 0 0.4rem;
}
.step p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Desk note */
.note {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 1.5rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.note-aside {
  padding: 1.75rem;
  background: linear-gradient(160deg, rgba(90,176,255,0.08), transparent 60%), var(--panel-2);
  border-right: 1px solid var(--line);
}
.note-aside .date {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--gold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.note-aside h3 {
  font-family: var(--serif);
  font-size: 1.65rem;
  font-weight: 500;
  margin: 0 0 0.75rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.note-aside .author {
  font-size: 0.85rem;
  color: var(--muted);
}
.note-body {
  padding: 1.75rem 1.9rem;
  font-size: 0.95rem;
  color: var(--muted);
}
.note-body p { margin: 0 0 1rem; }
.note-body p:last-child { margin-bottom: 0; }
.note-body strong { color: var(--text); font-weight: 600; }

/* FAQ */
.faq-list { display: grid; gap: 0.65rem; }
.faq details {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0;
}
.faq summary {
  cursor: pointer;
  padding: 1rem 1.15rem;
  font-weight: 600;
  font-size: 0.95rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--mono);
  color: var(--gold);
  font-size: 1.1rem;
}
.faq details[open] summary::after { content: "−"; }
.faq details p {
  margin: 0;
  padding: 0 1.15rem 1.1rem;
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 70ch;
}

/* CTA band */
.cta-band {
  padding: 3.5rem 0;
}
.cta-inner {
  background:
    radial-gradient(ellipse 70% 80% at 100% 0%, rgba(232,184,74,0.12), transparent 50%),
    radial-gradient(ellipse 50% 60% at 0% 100%, rgba(90,176,255,0.1), transparent 50%),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: 2.5rem 2.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}
.cta-inner h2 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 500;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}
.cta-inner p {
  margin: 0;
  color: var(--muted);
  max-width: 48ch;
}
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

/* Disclaimer */
.disclaimer {
  font-size: 0.78rem;
  color: var(--faint);
  line-height: 1.55;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--line);
  margin-top: 2rem;
}
.disclaimer strong { color: var(--muted); font-weight: 600; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 3rem 0 2rem;
  background: var(--bg-elev);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}
.footer-grid .brand-text { font-size: 1rem; margin-bottom: 0.65rem; color: var(--text); font-weight: 600; }
.footer-grid p { color: var(--muted); font-size: 0.88rem; margin: 0; max-width: 32ch; }
.footer-grid h4 {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 0.85rem;
  font-weight: 500;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 0.45rem; }
.footer-grid a { color: var(--muted); font-size: 0.88rem; }
.footer-grid a:hover { color: var(--text); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--faint);
  font-family: var(--mono);
}

/* Page interior */
.page-hero {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0;
}
.page-hero h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.85rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  margin: 0 0 0.75rem;
  line-height: 1.12;
}
.page-hero p {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 55ch;
  margin: 0;
}
.prose {
  max-width: 72ch;
}
.prose h2 {
  font-family: var(--serif);
  font-size: 1.65rem;
  font-weight: 500;
  margin: 2.25rem 0 0.75rem;
  letter-spacing: -0.02em;
}
.prose h3 {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.5rem;
}
.prose p { color: var(--muted); margin: 0 0 1rem; }
.prose ul, .prose ol {
  color: var(--muted);
  padding-left: 1.25rem;
  margin: 0 0 1rem;
}
.prose li { margin-bottom: 0.4rem; }
.prose strong { color: var(--text); }
.prose code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--panel);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  border: 1px solid var(--line);
}

/* 404 */
.not-found {
  min-height: 60vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 4rem 1rem;
}
.not-found h1 {
  font-family: var(--serif);
  font-size: 3rem;
  margin: 0 0 0.5rem;
}
.not-found p { color: var(--muted); margin: 0 0 1.5rem; }

/* Responsive */
@media (max-width: 960px) {
  .hero-grid,
  .calc-layout,
  .note,
  .thesis-grid { grid-template-columns: 1fr; }
  .framework-grid { grid-template-columns: 1fr 1fr; }
  .process { grid-template-columns: 1fr 1fr; gap: 1.5rem 0; }
  .process::before { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .note-aside { border-right: 0; border-bottom: 1px solid var(--line); }
  .board-wrap { overflow-x: auto; }
  .board-table { min-width: 720px; }
}
@media (max-width: 720px) {
  .menu-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(7, 11, 20, 0.97);
    border-bottom: 1px solid var(--line);
    padding: 0.75rem 1rem 1rem;
    gap: 0.25rem;
  }
  .nav.open { display: flex; }
  .nav-cta { margin-left: 0; text-align: center; }
  .hero-stats { grid-template-columns: 1fr; }
  .framework-grid { grid-template-columns: 1fr; }
  .process { grid-template-columns: 1fr; }
  .field-row, .out-grid, .thesis-metrics { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 2.25rem; }
}
