/* QuantFlex landing page.
   Palette and type stacks are the locked UI-SPEC design tokens from the main
   repo (apps/web/src/theme/tokens.ts) so this page and the app read as one
   product. Font stacks name the webfonts first and fall back to system faces,
   so nothing is fetched over the network. */

:root {
  --bg-app: #0d1117;
  --bg-surface: #161b22;
  --border: #30363d;
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  --accent: #2f81f7;
  --accent-text: #58a6ff;
  --positive: #3fb950;
  --negative: #f85149;
  --warn: #d29922;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --font-ui: 'Inter Variable', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --radius: 8px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg-app);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: min(1080px, 100% - 2.5rem); margin-inline: auto; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

a { color: var(--accent-text); }
a:hover { text-decoration-thickness: 2px; }

/* Anchored sections must clear the sticky header. Smooth scrolling is opt-in
   by the visitor's motion preference. */
section[id], .hero[id] { scroll-margin-top: 4.5rem; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100%;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  border-radius: 0 0 var(--radius) var(--radius);
  text-decoration: none;
}
.skip-link:focus { top: 0; outline: 2px solid #fff; outline-offset: -4px; }

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(13, 17, 23, 0.88);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.7rem;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 0.6rem; color: inherit; text-decoration: none; border-radius: 6px; }
.brand:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 4px; }
.brand-mark {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--bg-app);
  background: var(--accent);
  padding: 0.25rem 0.45rem;
  border-radius: 5px;
}
.brand-name { font-weight: 600; letter-spacing: -0.01em; }

.badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid currentColor;
  white-space: nowrap;
}
.badge-warn { color: var(--warn); }

/* ---------- navigation ---------- */

.site-nav { display: flex; align-items: center; gap: 1.25rem; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.25rem; flex-wrap: wrap; }
.nav-list a {
  display: inline-block;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}
.nav-list a:hover { color: var(--text-primary); background: var(--bg-surface); }
.nav-list a:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
  min-height: 44px;
}
.nav-toggle:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.nav-toggle-bars {
  width: 18px; height: 2px;
  background: currentColor;
  position: relative;
  border-radius: 1px;
}
.nav-toggle-bars::before, .nav-toggle-bars::after {
  content: ''; position: absolute; left: 0; width: 18px; height: 2px; background: currentColor; border-radius: 1px;
}
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded='true'] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded='true'] .nav-toggle-bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded='true'] .nav-toggle-bars::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 0.5rem 0 0.75rem;
    border-top: 1px solid var(--border);
    margin-top: 0.5rem;
  }
  .site-nav.is-open { display: flex; }
  .nav-list { flex-direction: column; gap: 0.1rem; }
  .nav-list a { display: block; padding: 0.7rem 0.6rem; font-size: 1rem; }
  .nav-cta { align-self: flex-start; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.1rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.25;
  padding: 0.65rem 1.1rem;
  min-height: 44px;
  border-radius: var(--radius);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, transform 120ms ease;
}
.btn:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: #3b8bfa; }
.btn-secondary { background: var(--bg-surface); color: var(--text-primary); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--text-muted); background: #1c2129; }
.btn-large { padding: 0.85rem 1.35rem; font-size: 1.05rem; min-width: 220px; }
.btn-small { padding: 0.4rem 0.85rem; font-size: 0.85rem; min-height: 36px; }
.btn-sub { font-weight: 400; font-size: 0.8rem; opacity: 0.85; }
.text-link { font-size: 0.9rem; color: var(--accent-text); }

/* ---------- hero ---------- */

.hero { padding-block: clamp(2.5rem, 7vw, 4.75rem) 1.5rem; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } }
.hero-copy { max-width: 72ch; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin: 0 0 1rem;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0 0 1.25rem;
}
.hero h1 em { color: var(--accent-text); font-style: normal; }
.lede { color: var(--text-secondary); font-size: 1.05rem; margin: 0 0 1rem; max-width: 68ch; }

.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.cta-note { color: var(--text-muted); font-size: 0.86rem; max-width: 70ch; margin: 1rem 0 0; line-height: 1.55; }

/* hero snapshot card */
.hero-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(47, 129, 247, 0.16), transparent 60%),
    var(--bg-surface);
  padding: 1.25rem 1.35rem 1.1rem;
  display: grid;
  gap: 0.7rem;
  box-shadow: 0 20px 50px -30px rgba(47, 129, 247, 0.5);
}
.hero-card-head { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.snap-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--warn);
  border: 1px solid var(--warn);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
}
.hero-card-stamp { font-size: 0.75rem; color: var(--text-muted); }
.hero-card-title { font-size: 1.15rem; letter-spacing: -0.01em; margin: 0; line-height: 1.25; }
.hero-card-params { margin: -0.3rem 0 0; font-size: 0.78rem; color: var(--text-muted); }
.hero-card-rows { margin: 0.25rem 0 0; display: grid; gap: 0.5rem; }
.hero-card-rows > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.25rem 1rem;
  align-items: baseline;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(13, 17, 23, 0.55);
}
.hero-card-rows dt { font-size: 0.86rem; color: var(--text-secondary); font-weight: 600; }
.hero-card-rows dd { margin: 0; font-size: 1.15rem; color: var(--text-primary); text-align: right; }
.hero-card-rows .row-sub { grid-column: 1 / -1; font-size: 0.76rem; color: var(--text-muted); font-family: var(--font-mono); }
.hero-card-greeks {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.hero-card-greeks.ok { color: var(--positive); }
.hero-card-greeks.fail { color: var(--negative); }
.hero-card-greeks .greek-letters { font-family: var(--font-mono); color: var(--text-secondary); font-weight: 400; }
.hero-card-foot { margin: 0; font-size: 0.8rem; color: var(--text-muted); border-top: 1px solid var(--border); padding-top: 0.7rem; }

.fact-strip {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.6rem;
}
.fact-strip li {
  border: 1px solid var(--border);
  background: var(--bg-surface);
  border-radius: var(--radius);
  padding: 0.65rem 0.85rem;
  font-size: 0.86rem;
  color: var(--text-secondary);
  display: grid;
  gap: 0.2rem;
}
.fact-k {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
}

/* ---------- learn / research paths ---------- */

.paths {
  display: grid;
  grid-template-columns: 3fr 2fr;   /* ~60/40 newcomer/expert emphasis */
  gap: 1.25rem;
  align-items: stretch;
}
@media (max-width: 860px) { .paths { grid-template-columns: 1fr; } }

.path {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-surface);
  padding: 1.5rem;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 1.1rem;
  position: relative;
}
.path-learn {
  border-color: rgba(47, 129, 247, 0.55);
  background: linear-gradient(180deg, rgba(47, 129, 247, 0.09), rgba(22, 27, 34, 0) 60%), var(--bg-surface);
}
.path-head h3 { font-size: clamp(1.25rem, 2.4vw, 1.55rem); letter-spacing: -0.02em; margin: 0.5rem 0 0.5rem; line-height: 1.2; }
.path-lede { color: var(--text-secondary); margin: 0; font-size: 0.95rem; }
.path-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent-text);
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
}
.path-tag-research { color: var(--positive); }

.steps { margin: 0; padding: 0 0 0 1.75rem; display: grid; gap: 0.7rem; color: var(--text-secondary); font-size: 0.93rem; }
.steps li::marker { color: var(--accent-text); font-family: var(--font-mono); font-weight: 700; }
.steps strong { color: var(--text-primary); display: block; }

.feature-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.65rem; color: var(--text-secondary); font-size: 0.92rem; }
.feature-list li { padding-left: 1.2rem; position: relative; }
.feature-list li::before { content: '›'; position: absolute; left: 0.1rem; top: -0.05rem; color: var(--positive); font-weight: 700; }
.feature-list strong { color: var(--text-primary); }

.path-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.1rem; padding-top: 0.25rem; }

/* ---------- plain-language explainer ---------- */

.explain {
  margin-top: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-surface);
}
.explain summary { cursor: pointer; padding: 0.75rem 1rem; font-weight: 600; font-size: 0.92rem; color: var(--text-primary); }
.explain[open] summary { border-bottom: 1px solid var(--border); }
.explain-body { padding: 1rem; }
.glossary { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 0.5rem 1rem; margin: 0 0 1rem; font-size: 0.9rem; }
.glossary dt { color: var(--text-primary); font-weight: 600; }
.glossary dd { margin: 0; color: var(--text-secondary); }
@media (max-width: 520px) { .glossary { grid-template-columns: 1fr; gap: 0.15rem 0; } .glossary dd { margin-bottom: 0.6rem; } }

/* ---------- sample labelling ---------- */

.sample-label {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.6rem;
  margin: 0 0 1.25rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--warn);
  border-left-width: 4px;
  border-radius: var(--radius);
  background: rgba(210, 153, 34, 0.06);
  font-size: 0.86rem;
}
.sample-label div { display: grid; gap: 0.15rem; }
.sample-label dt { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--warn); font-weight: 700; }
.sample-label dd { margin: 0; color: var(--text-secondary); word-break: break-word; }

.agree-summary {
  margin: 0 0 0.9rem;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-surface);
}
.agree-summary.ok { color: var(--positive); border-color: rgba(63, 185, 80, 0.5); }
.agree-summary.fail { color: var(--negative); border-color: var(--negative); }
.agree-summary:empty { display: none; }
.note-inline { margin-top: 0.9rem; font-size: 0.86rem; }
tbody tr.row-fail td { background: rgba(248, 81, 73, 0.08); }

/* ---------- capability status ---------- */

.status-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 860px) { .status-grid { grid-template-columns: 1fr; } }
.status-col {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-surface);
  padding: 1.25rem 1.35rem;
}
.status-col-soon { border-style: dashed; background: transparent; }
.status-col-h { display: flex; align-items: center; gap: 0.55rem; font-size: 1.05rem; margin: 0 0 1rem; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.dot-live { background: var(--positive); box-shadow: 0 0 0 4px rgba(63, 185, 80, 0.18); }
.dot-soon { background: transparent; border: 2px solid var(--text-muted); }

.status-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.8rem; font-size: 0.9rem; color: var(--text-secondary); }
.status-list li { padding-left: 1.35rem; position: relative; line-height: 1.5; }
.status-list strong { color: var(--text-primary); }
.status-col:not(.status-col-soon) .status-list li::before {
  content: '✓'; position: absolute; left: 0; top: 0; color: var(--positive); font-family: var(--font-mono); font-weight: 700;
}
.status-list a { white-space: nowrap; }

.soon-list li { padding-left: 0; color: var(--text-muted); }
.soon-list strong { color: var(--text-secondary); }
.soon-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--warn);
  border: 1px dashed var(--warn);
  border-radius: 4px;
  padding: 0.05rem 0.45rem;
  margin-right: 0.45rem;
  vertical-align: 0.1em;
  user-select: none;
}
.soon-note { margin: 1.1rem 0 0; font-size: 0.83rem; color: var(--text-muted); border-top: 1px dashed var(--border); padding-top: 0.8rem; }

/* ---------- sections ---------- */

section { padding-block: clamp(2rem, 5vw, 3.25rem); }
section + section { border-top: 1px solid var(--border); }
.section-head { margin-bottom: 1.75rem; }
.section-head h2 {
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  letter-spacing: -0.02em;
  margin: 0 0 0.4rem;
}
.section-sub { color: var(--text-secondary); margin: 0; max-width: 64ch; font-size: 0.95rem; }
.sub {
  font-size: 1.02rem;
  margin: 2.25rem 0 0.5rem;
  color: var(--text-primary);
}
.prose { color: var(--text-secondary); max-width: 68ch; margin: 0 0 1.1rem; font-size: 0.93rem; }

.status {
  padding: 1rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.9rem;
}
.status.is-error { color: var(--negative); border-color: var(--negative); border-style: solid; }

/* ---------- tables ---------- */

.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 0.89rem; min-width: 540px; }
thead th {
  text-align: left;
  font-weight: 600;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: var(--bg-surface);
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody td { padding: 0.7rem 0.85rem; border-bottom: 1px solid var(--border); vertical-align: top; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(47, 129, 247, 0.05); }
.num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
th.num { text-align: right; }
.cell-label { font-weight: 600; }
.cell-blurb { color: var(--text-muted); font-size: 0.82rem; margin-top: 0.2rem; max-width: 42ch; }
.dim { color: var(--text-muted); }

.pass { color: var(--positive); font-weight: 600; }
.fail { color: var(--negative); font-weight: 600; }

.notes { margin-top: 0.9rem; font-size: 0.85rem; color: var(--text-muted); }
.notes p { margin: 0.35rem 0; }

/* ---------- chart ---------- */

.chart {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-surface);
  padding: 1rem 0.5rem 0.5rem;
  margin-bottom: 1rem;
  overflow-x: auto;
}
.chart svg { display: block; width: 100%; height: auto; min-width: 460px; }

/* ---------- stat row ---------- */

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0.75rem; }
.stat {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-surface);
  padding: 0.85rem 1rem;
}
.stat-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}
.stat-value { font-family: var(--font-mono); font-size: 1.05rem; font-variant-numeric: tabular-nums; }

/* ---------- interactive calculator ---------- */

.calc {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
@media (max-width: 720px) { .calc { grid-template-columns: 1fr; } }

.calc-inputs,
.calc-output {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-surface);
  padding: 1rem;
}
.calc-inputs { display: grid; gap: 0.85rem; align-content: start; }

.field { display: grid; gap: 0.35rem; }
.field label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}
.field output { color: var(--text-primary); font-size: 0.9rem; text-transform: none; letter-spacing: 0; }

input[type='range'] {
  width: 100%;
  accent-color: var(--accent);
  height: 1.2rem;
  cursor: pointer;
}
input[type='range']:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }

.toggle { display: flex; gap: 0; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.toggle-btn {
  font: inherit;
  font-size: 0.85rem;
  flex: 1;
  padding: 0.35rem 0.5rem;
  background: transparent;
  color: var(--text-secondary);
  border: none;
  cursor: pointer;
}
.toggle-btn:hover { color: var(--text-primary); }
.toggle-btn.is-active { background: var(--accent); color: #fff; font-weight: 600; }
.toggle-btn:focus-visible { outline: 2px solid var(--accent-text); outline-offset: -2px; }

.calc-output { display: grid; gap: 1rem; align-content: start; }
.price-hero { border-bottom: 1px solid var(--border); padding-bottom: 0.85rem; }
.price-value {
  font-size: clamp(2rem, 6vw, 2.9rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--accent-text);
}
.greek-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 0.6rem; }
.stat-unit { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.15rem; }

.check-badge {
  font-size: 0.83rem;
  color: var(--text-secondary);
  border-left: 3px solid var(--border);
  padding: 0.6rem 0.9rem;
  margin: 0;
  background: var(--bg-surface);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.check-badge.ok { border-left-color: var(--positive); }
.check-badge.warn { border-left-color: var(--warn); }

/* ---------- feed ---------- */

.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.25rem; }
.chip {
  font: inherit;
  font-size: 0.83rem;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  cursor: pointer;
}
.chip:hover { color: var(--text-primary); border-color: var(--text-muted); }
.chip.is-active { color: var(--bg-app); background: var(--accent-text); border-color: var(--accent-text); font-weight: 600; }
.chip:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }

.feed-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.feed-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-surface);
  padding: 0.85rem 1rem;
}
.feed-item a { color: var(--text-primary); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.feed-item a:hover { color: var(--accent-text); text-decoration: underline; }
.feed-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.cat {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  border: 1px solid currentColor;
}
.cat-stocks { color: var(--accent-text); }
.cat-crypto { color: var(--warn); }
.cat-gold { color: var(--positive); }
.feed-summary { margin: 0.45rem 0 0; font-size: 0.85rem; color: var(--text-secondary); }

/* ---------- provenance ---------- */

.provenance {
  margin-top: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-surface);
}
.provenance summary {
  cursor: pointer;
  padding: 0.7rem 1rem;
  font-size: 0.87rem;
  color: var(--text-secondary);
  font-weight: 600;
}
.provenance[open] summary { border-bottom: 1px solid var(--border); }
.provenance > div { padding: 0.85rem 1rem; }
.kv { display: grid; grid-template-columns: minmax(120px, auto) 1fr; gap: 0.35rem 1rem; font-size: 0.83rem; }
.kv dt { color: var(--text-muted); }
.kv dd { margin: 0; font-family: var(--font-mono); word-break: break-all; }

/* ---------- roadmap ---------- */

.roadmap { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.roadmap li {
  position: relative;
  padding: 0.6rem 1rem 0.6rem 2.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-surface);
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.roadmap li strong { color: var(--text-primary); font-weight: 600; }
.roadmap li::before {
  position: absolute;
  left: 0.85rem;
  top: 0.6rem;
  font-family: var(--font-mono);
  font-weight: 700;
}
.roadmap .done::before { content: '✓'; color: var(--positive); }
.roadmap .wip::before { content: '◐'; color: var(--warn); }
.roadmap .next::before { content: '○'; color: var(--text-muted); }

/* ---------- footer ---------- */

.site-footer { border-top: 1px solid var(--border); margin-top: 2rem; padding-block: 1.75rem 2.5rem; }
.disclaimer { color: var(--text-secondary); font-size: 0.84rem; max-width: 76ch; margin: 0 0 0.75rem; }
.disclaimer strong { color: var(--text-primary); }
.colophon { color: var(--text-muted); font-size: 0.8rem; margin: 0; }
.colophon a { color: var(--text-secondary); }

/* ---------- small screens ---------- */

@media (max-width: 480px) {
  .wrap { width: min(1080px, 100% - 1.75rem); }
  .btn-large { width: 100%; min-width: 0; }
  .cta-row { flex-direction: column; }
  .path { padding: 1.15rem; }
  .status-col { padding: 1rem; }
  .status-list a { white-space: normal; }
  .hero-card { padding: 1rem; }
  .hero-card-rows dd { font-size: 1.05rem; }
  /* Comfortable touch targets for the small controls. */
  .chip, .toggle-btn { min-height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
