:root {
  --bg: #0b1016;
  --bg-2: #121922;
  --bg-3: #18212c;
  --line: rgba(214, 186, 120, 0.28);
  --line-soft: rgba(232, 237, 244, 0.08);
  --gold: #d6ba78;
  --gold-2: #f0d9a0;
  --ink: #e8edf4;
  --muted: #93a0b0;
  --up: #3ecf8e;
  --down: #ef6b6b;
  --paper: #f4efe4;
  --paper-ink: #1b1710;
  --paper-muted: #5c5648;
  --max: 1120px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --sans: "Segoe UI", "Helvetica Neue", system-ui, sans-serif;
  --mono: ui-monospace, Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.55;
  min-height: 100vh;
}
img { max-width: 100%; }
a { color: var(--gold-2); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #fff; }
.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: 12px;
  top: 12px;
  background: var(--gold);
  color: #111;
  padding: 8px 12px;
  z-index: 20;
}

.ticker {
  background: #070b10;
  border-bottom: 1px solid var(--line-soft);
  overflow: hidden;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.ticker-track {
  display: flex;
  gap: 28px;
  width: max-content;
  animation: marquee 42s linear infinite;
  padding: 8px 0;
}
.ticker b { color: var(--ink); font-weight: 600; }
.up { color: var(--up); }
.down { color: var(--down); }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.masthead {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #101820 0%, var(--bg) 100%);
}
.masthead-inner, .wrap {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}
.masthead-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px 0 10px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}
.brand svg { display: block; }
.brand-name {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: 0.04em;
  font-weight: 700;
}
.brand-name span { color: var(--gold); }
.tagline {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  justify-content: center;
}
.nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 13.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.nav a:hover, .nav a.active { color: var(--gold); }
.tools {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lang {
  border: 1px solid var(--line);
  color: var(--gold-2);
  text-decoration: none;
  font-size: 12px;
  padding: 5px 8px;
  letter-spacing: 0.06em;
}
.menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 6px 10px;
  font: inherit;
}

.hero {
  padding: 42px 0 20px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
  align-items: end;
}
.kicker {
  color: var(--gold);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 11px;
  margin: 0 0 10px;
}
h1, h2, h3, .serif { font-family: var(--serif); font-weight: 650; letter-spacing: -0.02em; }
h1 { font-size: clamp(32px, 4.6vw, 52px); line-height: 1.12; margin: 0 0 16px; }
.lede { font-size: 18px; color: #c5ced8; max-width: 46rem; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.btn {
  display: inline-block;
  padding: 10px 16px;
  border: 1px solid var(--gold);
  color: #111;
  background: var(--gold);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.btn.ghost {
  background: transparent;
  color: var(--gold-2);
}
.btn:hover { filter: brightness(1.08); color: #111; }
.btn.ghost:hover { color: #fff; }

.board {
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  padding: 16px 18px 12px;
}
.board-top {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  margin-bottom: 8px;
}
.big-num {
  font-family: var(--mono);
  font-size: 56px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.tone {
  display: inline-block;
  margin-top: 8px;
  border: 1px solid var(--line);
  color: var(--gold-2);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 8px;
}

.grid-3, .grid-2, .index-grid, .sector-grid {
  display: grid;
  gap: 14px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.index-grid { grid-template-columns: repeat(3, minmax(220px, 1fr)); margin: 28px 0; }
.sector-grid { grid-template-columns: repeat(4, 1fr); }
.card, .index-card {
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  padding: 16px;
}
.index-card h3, .card h3 { margin: 0 0 6px; font-size: 15px; font-family: var(--sans); letter-spacing: 0; font-weight: 600; }
.val {
  font-family: var(--mono);
  font-size: 26px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.why { padding: 12px 0 40px; }
.why p { color: #c5ced8; max-width: 50rem; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin: 12px 0 16px;
}
.section-head h2 { margin: 0; font-size: 26px; }

.article-list { display: grid; gap: 0; }
.article-row {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line-soft);
  color: inherit;
  text-decoration: none;
}
.article-row:hover h3 { color: var(--gold-2); }
.article-row time, .meta { color: var(--muted); font-size: 13px; font-family: var(--mono); }
.article-row p { margin: 6px 0 0; color: #b7c2ce; }

.page { padding: 28px 0 64px; }
.page h1 { margin-bottom: 8px; }
.sub { color: var(--muted); margin-top: 0; }

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 14px;
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--gold-2); }
.prose-wrap {
  display: grid;
  grid-template-columns: minmax(0, 720px) 240px;
  gap: 36px;
  align-items: start;
}
.prose {
  background: var(--paper);
  color: var(--paper-ink);
  padding: 36px 40px 48px;
}
.prose h1, .prose h2, .prose h3 { font-family: var(--serif); color: var(--paper-ink); }
.prose h1 { font-size: 36px; }
.prose h2 { font-size: 24px; margin-top: 1.6em; }
.prose p, .prose li { font-size: 17.5px; line-height: 1.7; color: #2a251c; }
.prose .meta { color: var(--paper-muted); }
.rail { position: sticky; top: 16px; }
.rail .card { margin-bottom: 12px; }
.ad-slot {
  border: 1px dashed rgba(214, 186, 120, 0.35);
  min-height: 90px;
  padding: 10px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.02);
}
.ad-slot .ad-label { margin-bottom: 8px; }
.legal .prose { background: var(--bg-2); color: var(--ink); }
.legal .prose p, .legal .prose li { color: #c5ced8; }

table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
th, td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
}
th { color: var(--muted); font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; font-size: 11px; }
.price-grid .card ul { padding-left: 18px; color: #c5ced8; }
.price { font-family: var(--mono); font-size: 32px; margin: 8px 0; }
.price span { font-size: 14px; color: var(--muted); }

form { display: grid; gap: 10px; max-width: 560px; }
label { font-size: 13px; color: var(--muted); }
input, textarea, select {
  width: 100%;
  background: #0e141c;
  color: var(--ink);
  border: 1px solid var(--line-soft);
  padding: 10px 12px;
  font: inherit;
}
.note { color: var(--muted); font-size: 14px; }
.alert { border: 1px solid var(--gold); padding: 10px 12px; }

.tool {
  background: var(--bg-2);
  padding: 20px;
  border: 1px solid var(--line-soft);
  max-width: 640px;
}
.tool .out {
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 42px;
}
.range-row { display: grid; grid-template-columns: 1fr 40px; gap: 8px; align-items: center; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 13.5px;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 24px;
}
.foot-grid a { color: var(--muted); text-decoration: none; display: block; padding: 3px 0; }
.foot-grid a:hover { color: var(--gold-2); }
.disclaimer { margin-top: 22px; max-width: 50rem; }

.cookie {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 30;
  background: #171308;
  border: 1px solid var(--gold);
  padding: 14px 16px;
  display: none;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
}
.cookie.open { display: flex; }
.cookie p { margin: 0; color: var(--paper); max-width: 50rem; font-size: 14px; }
.cookie-actions { display: flex; gap: 8px; flex-shrink: 0; }

.spark { display: block; margin-top: 8px; }
.axis-chart { display: block; margin-top: 10px; overflow: visible; }
.axis-mini { margin-top: 8px; }
.period-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 6px;
}
.period-tabs a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--line-soft);
  padding: 5px 10px;
}
.period-tabs a:hover { color: var(--ink); border-color: var(--line); }
.period-tabs a.is-on {
  color: var(--paper-ink);
  background: var(--gold);
  border-color: var(--gold);
}

.macro-stack { display: grid; gap: 10px; margin: 8px 0 12px; }
.macro-line {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: baseline;
  font-family: var(--mono);
  font-size: 18px;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 8px;
}
.macro-line span:first-child { color: var(--muted); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.vr-tape { margin: 8px 0 36px; }
.vr-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 14px; }
.vr-card { background: var(--bg-2); border: 1px solid var(--line-soft); padding: 16px; }
.vr-card-link { display: block; color: inherit; text-decoration: none; margin: -16px; padding: 16px; }
.vr-card-link:hover { background: rgba(255,255,255,0.02); }
.vr-more { margin: 10px 0 0; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold-2); }
.vr-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.vr-card-top h3 { margin: 0; font-size: 15px; font-family: var(--sans); letter-spacing: 0; font-weight: 600; }
.stance-pill {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  padding: 2px 8px;
  color: var(--gold-2);
}
.stance-long .stance-pill { color: var(--up); border-color: rgba(62, 207, 142, 0.45); }
.stance-short .stance-pill { color: var(--down); border-color: rgba(239, 107, 107, 0.45); }
.perf-mini { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 4px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.perf-mini li { display: grid; grid-template-columns: 2.2em 4.2em 1fr 1fr; gap: 6px; align-items: baseline; }
.perf-mini b { font-weight: 600; }
.perf-mini em { font-style: normal; }
.perf-wide { max-width: 640px; }
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 8px 0 22px;
}
.stat-grid div { background: var(--bg-2); border: 1px solid var(--line-soft); padding: 14px 16px; }
.stat-grid span { display: block; color: var(--muted); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 6px; }
.stat-grid b { font-family: var(--mono); font-size: 22px; }
.stat-grid em { display: block; font-style: normal; color: var(--muted); font-size: 12px; margin-top: 4px; }
.equity-wrap { margin: 8px 0 22px; background: var(--bg-2); border: 1px solid var(--line-soft); padding: 12px 14px 8px; }
.equity { display: block; }
.turns { list-style: none; margin: 12px 0 28px; padding: 0; font-family: var(--mono); font-size: 13px; }
.turns li { display: grid; grid-template-columns: 1fr auto 6em; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.turn-long b { color: var(--up); }
.turn-short b { color: var(--down); }
.chain { list-style: none; padding: 0; margin: 28px 0; display: grid; gap: 18px; }
.chain li { background: var(--bg-2); border: 1px solid var(--line-soft); padding: 18px 20px; }
.chain h3 { margin: 0 0 8px; }
.chain p { margin: 0; color: #c5ced8; }

dl { display: grid; gap: 8px; }
dt { font-family: var(--serif); font-size: 20px; }
dd { margin: 0 0 18px; color: #c5ced8; }

@media (max-width: 900px) {
  .masthead-inner { grid-template-columns: 1fr auto; }
  .nav {
    display: none;
    grid-column: 1 / -1;
    flex-direction: column;
    padding-bottom: 10px;
  }
  .nav.open { display: flex; }
  .menu-btn { display: inline-block; }
  .hero, .index-grid, .grid-3, .grid-2, .sector-grid, .prose-wrap, .foot-grid, .article-row, .vr-grid, .stat-grid {
    grid-template-columns: 1fr;
  }
  .ticker-track { animation-duration: 28s; }
  .prose { padding: 22px 18px 32px; }
  .cookie { flex-direction: column; align-items: stretch; }
  .tagline { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
}
