:root {
  --bg: #0b0f17;
  --bg-2: #111827;
  --panel: #141b2a;
  --line: #243049;
  --text: #e6e9ef;
  --muted: #98a2b8;
  --gold: #e3b341;
  --gold-soft: rgba(227, 179, 65, 0.12);
  --teal: #3cc4a8;
  --red: #ef6461;
  --blue: #6aa4ff;
  --radius: 12px;
  --max: 1180px;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --serif: "Fraunces", Georgia, serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; }
h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(2.1rem, 5vw, 3.4rem); letter-spacing: -0.01em; }
h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(11, 15, 23, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; letter-spacing: 0.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; }
.brand span b { color: var(--gold); font-weight: 700; }
.nav { display: flex; gap: 4px; }
.nav a { color: var(--muted); padding: 8px 12px; border-radius: 8px; font-size: 0.95rem; }
.nav a:hover { color: var(--text); background: var(--bg-2); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--text); background: var(--panel); }
@media (max-width: 640px) {
  .brand span { display: none; }
  .nav a { padding: 8px 8px; font-size: 0.88rem; }
}

/* Hero */
.hero { padding: 72px 0 48px; border-bottom: 1px solid var(--line); background:
  radial-gradient(900px 400px at 85% -10%, rgba(227,179,65,0.10), transparent 60%),
  radial-gradient(700px 400px at -10% 110%, rgba(60,196,168,0.07), transparent 60%); }
.eyebrow { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }
.pill { display: inline-flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--teal); border: 1px solid rgba(60,196,168,0.35); background: rgba(60,196,168,0.08); padding: 4px 12px; border-radius: 999px; margin-top: 8px; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }
.pill.warn { color: var(--gold); border-color: rgba(227,179,65,0.35); background: var(--gold-soft); }
.pill.warn::before { background: var(--gold); }

.section { padding: 56px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.section-head h2 { margin: 0; }

/* Cards */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card h3 { font-size: 1.25rem; }
.card .tag { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; }
.card.feature { display: flex; flex-direction: column; gap: 6px; transition: border-color 0.15s; }
.card.feature:hover { border-color: var(--gold); }
.card.feature .go { margin-top: auto; padding-top: 12px; font-weight: 600; }
.btn { display: inline-block; background: var(--gold); color: #1a1405; font-weight: 700; padding: 10px 18px; border-radius: 8px; }
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

.thumb { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--text); }
.thumb:hover { border-color: var(--gold); text-decoration: none; }
.thumb img { aspect-ratio: 16 / 9; object-fit: cover; object-position: right center; width: 100%; height: auto; background: #fff; }
.thumb .cap { padding: 10px 14px; display: flex; justify-content: space-between; gap: 8px; font-size: 0.9rem; }
.thumb .cap b { font-family: var(--mono); }

/* Channels page */
.week-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.week-bar label { color: var(--muted); font-size: 0.9rem; }
select { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font: inherit; }
.chart { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 28px; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 18px 22px 14px; }
.chart-head h3 { margin: 0; font-size: 1.2rem; }
.chart-head .sym { font-family: var(--mono); color: var(--gold); margin-right: 10px; }
.chart-head .last { font-family: var(--mono); color: var(--muted); font-size: 0.95rem; }
.chart figure { margin: 0; background: #fff; cursor: zoom-in; }
.chart figure img { width: 100%; height: auto; }
.chart .note { padding: 16px 22px 20px; color: #cfd5e1; border-top: 1px solid var(--line); }
.chart .note p:last-child { margin: 0; }
.summary { border-left: 3px solid var(--gold); padding: 4px 0 4px 18px; margin: 24px 0 32px; color: #cfd5e1; max-width: 80ch; }

dialog.lightbox { padding: 0; border: 0; background: transparent; max-width: 98vw; max-height: 96vh; }
dialog.lightbox::backdrop { background: rgba(0,0,0,0.85); }
dialog.lightbox img { max-width: 98vw; max-height: 96vh; object-fit: contain; }

/* Model page */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.steps .card { position: relative; padding-top: 44px; }
.steps .card::before { counter-increment: step; content: "0" counter(step); position: absolute; top: 16px; left: 24px; font-family: var(--mono); color: var(--gold); font-size: 0.85rem; letter-spacing: 0.1em; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; min-width: 720px; font-size: 0.95rem; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--bg-2); color: var(--muted); font-weight: 600; font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }
.verdict { font-family: var(--mono); font-size: 0.82rem; padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.empty { text-align: center; padding: 48px 24px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
.empty h3 { color: var(--text); }

/* Prose */
.prose { max-width: 74ch; }
.prose h2 { margin-top: 1.6em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.4em; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0; color: var(--muted); font-size: 0.85rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-footer p { margin: 0; max-width: 70ch; }
.site-footer a { color: var(--muted); text-decoration: underline; }

/* Newsletter */
.nav-cta { margin-left: 6px; background: var(--gold); color: #1a1405; border: 0; border-radius: 8px; padding: 8px 14px; font: 700 0.9rem var(--sans); cursor: pointer; }
.nav-cta:hover { filter: brightness(1.08); }
@media (max-width: 640px) { .nav-cta { padding: 8px 10px; font-size: 0.85rem; margin-left: 2px; } }

/* Macro Twin report cards */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.card.report { display: flex; flex-direction: column; gap: 10px; color: inherit; transition: border-color 0.15s; }
.card.report:hover { border-color: var(--gold); text-decoration: none; }
.card.report h3 { margin: 0; font-size: 1.3rem; }
.card.report p { margin: 0; }
.card.report .headline { font-family: var(--serif); font-size: 1.1rem; line-height: 1.35; color: var(--text); }
.card.report.featured h3 { font-size: 1.6rem; }
.card.report.featured .headline { font-size: 1.35rem; }
.report-foot { margin-top: auto; padding-top: 8px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.report-foot .go { font-weight: 600; color: var(--gold); }
.small { font-size: 0.85rem; }
.tally { display: grid; gap: 8px; }
.tally-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; gap: 2px; background: var(--bg); }
.tally-bar .seg { min-width: 4px; }
.tally-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.82rem; color: var(--muted); }
.tally-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; vertical-align: 0; }
.seg.agree, .tally-legend i.agree { background: var(--teal); }
.seg.half, .tally-legend i.half { background: var(--blue); }
.seg.disagree, .tally-legend i.disagree { background: var(--red); }
.seg.untestable, .tally-legend i.untestable { background: #5b6478; }
.verdict.agree { color: var(--teal); background: rgba(60,196,168,0.12); }
.verdict.half { color: var(--blue); background: rgba(106,164,255,0.12); }
.verdict.disagree { color: var(--red); background: rgba(239,100,97,0.12); }
.verdict.untestable { color: var(--muted); background: rgba(152,162,184,0.12); }
.points { margin: 0; padding-left: 1.1em; color: #cfd5e1; }
.points li { margin-bottom: 4px; }
.regime-read { display: flex; gap: 16px 40px; flex-wrap: wrap; }
.regime-read > div { display: grid; gap: 2px; }
.regime-read b { font-family: var(--serif); font-size: 1.9rem; font-weight: 600; color: var(--gold); line-height: 1.1; }
.regime-read b.second { color: var(--text); font-size: 1.4rem; }
