/* Stoxa landing — values copied from brand/tokens.css (keep in sync). */
:root {
  --sx-bg: #f5f7fb;
  --sx-panel: #ffffff;
  --sx-panel-2: #f0f3f9;
  --sx-border: #e3e8f0;
  --sx-border-strong: #c9d2e0;
  --sx-text: #0f1b2d;
  --sx-muted: #5b6b82;
  --sx-faint: #8e9bb0;
  --sx-accent: #2563eb;
  --sx-accent-strong: #1d4ed8;
  --sx-accent-soft: #e8efff;
  --sx-accent-ink: #1e3a8a;
  --sx-green: #16a34a;
  --sx-green-soft: #e7f6ec;
  --sx-red: #dc2626;
  --sx-red-soft: #fdecec;
  --sx-amber: #b45309;
  --sx-amber-soft: #fef3c7;
  --sx-series-1: #2563eb;
  --sx-series-2: #ea580c;
  --sx-series-3: #0f9f6e;
  --sx-series-4: #a16207;
  --sx-shadow-sm: 0 1px 2px rgba(15, 27, 45, 0.06), 0 1px 3px rgba(15, 27, 45, 0.04);
  --sx-shadow-md: 0 6px 20px rgba(15, 27, 45, 0.08);
  --sx-radius: 10px;
  --sx-radius-lg: 16px;
  --sx-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --sx-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  /* landing-only derived values */
  --green-ink: #15803d;   /* green text on white/soft green, >= 4.5:1 */
  --red-ink: #b91c1c;
  --muted-ok: #52627a;    /* muted text with margin on panel-2 */
  --sx-cta: #15803d;      /* primary buttons: white text 5.0:1 */
  --sx-cta-hover: #166534;
  --sx-body: #334155;     /* body copy on white and --sx-bg */
  --sx-zebra: #f8fafc;
  --sx-radius-card: 12px;
  --wrap: 1180px;
  --gutter: 24px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--sx-panel);
  color: var(--sx-text);
  font-family: var(--sx-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--sx-accent-strong); }
h1, h2, h3 { color: var(--sx-text); line-height: 1.15; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
code, pre { font-family: var(--sx-mono); }

:focus-visible { outline: 3px solid var(--sx-accent); outline-offset: 2px; border-radius: 6px; }
.skip {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--sx-text); color: #fff; padding: 8px 14px; border-radius: 8px; text-decoration: none;
}
.skip:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: 72px 0; }
.section.alt { background: var(--sx-bg); border-top: 1px solid var(--sx-border); border-bottom: 1px solid var(--sx-border); }
.eyebrow {
  display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--green-ink); margin-bottom: 10px;
}
.section-head { max-width: 760px; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(26px, 2.8vw, 32px); font-weight: 700; }
.section-head p { margin-top: 12px; color: var(--sx-body); font-size: 17px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 15px/1 var(--sx-sans); text-decoration: none; white-space: nowrap;
  padding: 14px 22px; border-radius: 10px; border: 1px solid transparent; cursor: pointer;
  transition: background-color .15s, border-color .15s, box-shadow .15s, color .15s;
}
.btn-primary { background: var(--sx-cta); color: #fff; box-shadow: 0 1px 2px rgba(21, 128, 61, .3); }
.btn-primary:hover { background: var(--sx-cta-hover); }
.btn-ghost { background: var(--sx-panel); color: var(--sx-text); border-color: var(--sx-text); }
.btn-ghost:hover { background: var(--sx-bg); }
.btn-lg { padding: 16px 26px; font-size: 16px; }
.btn-sm { padding: 10px 16px; font-size: 14px; }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .88); backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--sx-border);
}
.nav-inner { display: flex; align-items: center; gap: 32px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--sx-text); }
.brand img { width: 30px; height: 30px; }
.wordmark { font-weight: 700; font-size: 23px; letter-spacing: -0.045em; line-height: 1; }
.wordmark .x { color: var(--sx-accent); }
.nav-links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--sx-muted); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav-links a:hover { color: var(--sx-text); }
.nav-cta { margin-left: auto; display: flex; gap: 10px; }
.nav-toggle {
  display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 10px;
  border: 1px solid var(--sx-border-strong); background: var(--sx-panel); color: var(--sx-text); cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .i-close { display: none; }
.nav[data-open="true"] .nav-toggle .i-open { display: none; }
.nav[data-open="true"] .nav-toggle .i-close { display: block; }

/* hero */
.hero {
  position: relative; overflow: hidden; padding: 56px 0 64px;
  background:
    radial-gradient(900px 480px at 85% -10%, rgba(37, 99, 235, .07), transparent 70%),
    linear-gradient(180deg, var(--sx-bg) 0%, #ffffff 100%);
  border-bottom: 1px solid var(--sx-border);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 600px); gap: 36px; align-items: center; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500;
  color: var(--sx-accent-ink); background: var(--sx-accent-soft); border: 1px solid #d3e0ff;
  padding: 6px 12px 6px 8px; border-radius: 999px; margin-bottom: 18px;
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sx-accent); box-shadow: 0 0 0 4px rgba(37, 99, 235, .15); }
.hero h1 { font-size: clamp(34px, 4.6vw, 48px); font-weight: 800; letter-spacing: -0.04em; line-height: 1.05; }
.hero h1 .hl { color: var(--sx-text); }
.hero h1 .rotator { display: grid; justify-items: start; overflow: hidden; padding: .06em 0 .16em; margin-bottom: -.1em; }
.hero h1 .rot-item { grid-area: 1 / 1; white-space: nowrap; padding: 0 .12em; margin-left: -.12em;
  background: linear-gradient(transparent 58%, #c7d8ff 58%, #c7d8ff 92%, transparent 92%); opacity: 0; transform: translateY(70%); transition: transform .5s cubic-bezier(.2, .7, .2, 1), opacity .5s ease; }
.hero h1 .rot-item.is-on { opacity: 1; transform: none; }
.hero h1 .rot-item.is-off { opacity: 0; transform: translateY(-70%); }
.hero .lede { margin-top: 18px; font-size: 18px; color: var(--sx-body); max-width: 580px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 22px; padding: 0; list-style: none; font-size: 13px; color: var(--sx-body); }
.hero-meta li { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta svg { width: 16px; height: 16px; color: var(--green-ink); flex: none; }

/* mock cards */
.mock {
  background: var(--sx-panel); border: 1px solid var(--sx-border); border-radius: var(--sx-radius-card);
  box-shadow: 0 12px 32px -16px rgba(15, 27, 45, .18), var(--sx-shadow-sm); overflow: hidden;
  font-size: 14px;
}
.mock-bar { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--sx-border); }
.ticker { font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.ticker-name { color: var(--sx-muted); font-size: 13px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; line-height: 1;
  padding: 6px 9px; border-radius: 999px; background: var(--sx-accent-soft); color: var(--sx-accent-ink); white-space: nowrap;
}
.chip svg { width: 12px; height: 12px; }
.mock-bar .chip { margin-left: auto; }
.mock-body { padding: 18px; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile { border: 1px solid var(--sx-border); border-radius: 10px; padding: 12px 14px; background: var(--sx-panel); }
.tile .k { font-size: 12px; color: var(--sx-muted); font-weight: 500; }
.tile .v { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.tile .v.up { color: var(--green-ink); }
.tile .s { font-size: 12px; color: var(--sx-muted); }
.chart-card { margin-top: 12px; border: 1px solid var(--sx-border); border-radius: 10px; padding: 12px 14px 8px; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 12px; color: var(--sx-muted); }
.chart-head strong { color: var(--sx-text); font-weight: 600; font-size: 13px; }
.legend { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 10px; border-radius: 2px; background: #e6eaf1; display: inline-block; }
.chart-card svg { width: 100%; height: auto; margin-top: 6px; }
.wacc-row {
  margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center;
  background: var(--sx-panel-2); border-radius: 10px; padding: 10px 14px; font-size: 13px; color: var(--muted-ok);
}
.wacc-row b { color: var(--sx-text); font-weight: 600; font-variant-numeric: tabular-nums; }
.wacc-row .total { margin-left: auto; color: var(--sx-accent-ink); }
.wacc-row .total b { color: var(--sx-accent-ink); }
.mock-src { margin-top: 10px; font-size: 12px; color: var(--sx-muted); display: flex; gap: 6px; align-items: center; }
.mock-src svg { width: 13px; height: 13px; flex: none; margin-top: 2px; }
.mock-src { align-items: flex-start; }
.case-row > *, .hero-grid > *, .split > *, .macro-copy > *, .pit-grid > *, .feat-grid > *, .aud-grid > *, .pulse > *, .tiles > * { min-width: 0; }
/* hero live-output card */
.badge-ok {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; line-height: 1;
  padding: 6px 10px; border-radius: 999px; background: var(--sx-green-soft); color: var(--green-ink); white-space: nowrap;
}
.badge-ok svg { width: 12px; height: 12px; }
.hero-metric { border: 1px solid var(--sx-border); border-radius: 10px; padding: 16px 18px; background: var(--sx-panel-2); }
.hero-metric .k { font-size: 13px; font-weight: 600; color: var(--muted-ok); }
.hero-metric .v { margin-top: 4px; font-size: 40px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.1; color: var(--red-ink); font-variant-numeric: tabular-nums; }
.hero-metric .v span { font-size: 18px; font-weight: 600; letter-spacing: 0; }
.hero-metric .s { margin-top: 4px; font-size: 13px; color: var(--muted-ok); }
.hero-metric-note { margin-top: 12px; font-size: 13px; color: var(--sx-muted); }
.case-row { margin-top: 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile .v .down { font-size: 14px; font-weight: 600; color: var(--red-ink); letter-spacing: 0; }

.caption { margin-top: 12px; font-size: 13px; color: var(--sx-muted); text-align: center; }

/* PIT explainer */
.pit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--sx-panel); border: 1px solid var(--sx-border); border-radius: var(--sx-radius-card);
  box-shadow: var(--sx-shadow-sm); padding: 24px;
}
.card h3 { font-size: 18px; font-weight: 700; }
.card p { margin-top: 8px; color: var(--sx-body); font-size: 15px; }
.step-n {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; margin-bottom: 18px;
  background: var(--sx-accent-soft); color: var(--sx-accent-ink); font-weight: 700; font-size: 15px;
}
.timeline-card { margin-top: 24px; padding: 28px 32px 22px; }
.timeline-card svg { width: 100%; height: auto; }
.timeline-note { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; margin-top: 10px; font-size: 14px; color: var(--sx-muted); }
.tl-mobile { display: none; list-style: none; margin: 0; padding: 0; }

/* features */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feat { transition: box-shadow .2s, transform .2s, border-color .2s; }
.feat:hover { box-shadow: var(--sx-shadow-md); border-color: var(--sx-border-strong); transform: translateY(-2px); }
.icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 20px;
  background: var(--sx-accent-soft); color: var(--sx-accent-strong);
}
.icon svg { width: 24px; height: 24px; }
.feat ul { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 14px; color: var(--sx-body); }
.feat li { display: flex; gap: 8px; align-items: flex-start; }
.feat li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--sx-accent); margin-top: 9px; flex: none; }

/* split sections */
.split { display: grid; grid-template-columns: 1fr 1.08fr; gap: 48px; align-items: center; }
.split.reverse { grid-template-columns: 1.08fr 1fr; }
.split h2 { font-size: clamp(26px, 2.8vw, 32px); font-weight: 700; }
.split .lead { margin-top: 14px; color: var(--sx-body); font-size: 17px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; padding: 0; list-style: none; }
.chips li {
  font-size: 14px; font-weight: 500; padding: 8px 14px; border-radius: 999px;
  background: var(--sx-panel); border: 1px solid var(--sx-border-strong); color: var(--sx-text);
}
.checks { margin: 20px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.checks li { display: flex; gap: 12px; color: var(--sx-body); font-size: 15px; }
.checks svg { width: 20px; height: 20px; flex: none; color: var(--green-ink); margin-top: 2px; }
.checks b { color: var(--sx-text); font-weight: 600; }

/* assumptions mock */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--sx-border); }
.tbl tbody tr:nth-child(even) > * { background-color: var(--sx-zebra); }
.tbl th { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-ok); background: var(--sx-panel-2); }
.tbl td.num, .tbl th.num { text-align: right; }
.tbl tr:last-child > td, .tbl tbody tr:last-child > th { border-bottom: 0; }
.tag { font-size: 11px; font-weight: 600; padding: 3px 7px; border-radius: 6px; background: var(--sx-panel-2); color: var(--muted-ok); white-space: nowrap; }
.tag.edit { background: var(--sx-amber-soft); color: #92400e; }
.tbl-wrap { border: 1px solid var(--sx-border); border-radius: var(--sx-radius-card); overflow: hidden; }
.sens { margin-top: 16px; }
.sens-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 12px; color: var(--sx-muted); margin-bottom: 8px; }
.sens-head strong { color: var(--sx-text); font-size: 13px; font-weight: 600; }
.grid-s { display: grid; grid-template-columns: 56px repeat(5, 1fr); gap: 4px; font-size: 12px; font-variant-numeric: tabular-nums; }
.grid-s div { padding: 8px 4px; text-align: center; border-radius: 6px; font-weight: 600; }
.grid-s .h { background: none; color: var(--sx-muted); font-weight: 500; }
.grid-s .g2 { background: #cdeed8; color: #14532d; }
.grid-s .g1 { background: var(--sx-green-soft); color: #166534; }
.grid-s .n { background: var(--sx-panel-2); color: var(--sx-text); }
.grid-s .r1 { background: var(--sx-red-soft); color: #991b1b; }
.grid-s .r2 { background: #f9d4d4; color: #7f1d1d; }
.grid-s .base { outline: 2px solid var(--sx-accent); outline-offset: -2px; }

/* macro pulse */
.pulse { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.pulse .tile { padding: 16px; box-shadow: var(--sx-shadow-sm); }
.pulse .v { font-size: 24px; }
.pulse.pulse-3 { grid-template-columns: repeat(3, 1fr); }
.delta { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; font-size: 12px; font-weight: 600; padding: 4px 8px; border-radius: 999px; }
.delta svg { width: 12px; height: 12px; }
.delta.up { background: var(--sx-green-soft); color: var(--green-ink); }   /* direction only, not good/bad */
.delta.down { background: var(--sx-red-soft); color: var(--red-ink); }
.delta.flat { background: var(--sx-panel-2); color: var(--muted-ok); }
.pulse-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 14px;
  font-size: 14px; color: var(--sx-muted);
}
.pulse-bar .title { font-weight: 700; color: var(--sx-text); font-size: 16px; }
.regime { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.regime .chip.warn { background: var(--sx-amber-soft); color: #92400e; }
.regime .chip.ok { background: var(--sx-green-soft); color: #166534; }
.macro-copy { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; margin-bottom: 36px; }
.macro-copy h2 { font-size: clamp(26px, 2.8vw, 32px); font-weight: 700; }
.macro-copy p + p { margin-top: 14px; }
.macro-copy .lead { color: var(--sx-body); font-size: 17px; }
.callout {
  margin-top: 20px; border-left: 3px solid var(--sx-accent); background: var(--sx-accent-soft);
  padding: 14px 18px; border-radius: 0 10px 10px 0; color: var(--sx-accent-ink); font-size: 15px;
}
.callout-box { max-width: 860px; margin-top: 24px; padding: 18px 22px; }
.callout-box h3 { font-size: 17px; font-weight: 700; color: var(--sx-accent-ink); letter-spacing: -0.01em; }
.callout-box p { margin-top: 6px; }
.sources { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding: 0; list-style: none; }
.sources li { font-size: 13px; font-weight: 500; color: var(--muted-ok); background: var(--sx-panel-2); border: 1px solid var(--sx-border); padding: 5px 10px; border-radius: 8px; }

/* code */
.code {
  background: #0f1b2d; color: #dbe4f3; border-radius: var(--sx-radius-card); overflow: hidden;
  box-shadow: 0 24px 60px -24px rgba(15, 27, 45, .45);
}
.code-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid rgba(255, 255, 255, .08); font-size: 13px; color: #9fb0c8; }
.code-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2a3a55; display: inline-block; }
.code-bar span { margin-left: 8px; font-family: var(--sx-mono); }
.code pre { margin: 0; padding: 20px 22px 22px; overflow-x: auto; font-size: 14px; line-height: 1.7; tab-size: 4; }
.code .kw { color: #93b4ff; }
.code .st { color: #a7e3b8; }
.code .cm { color: #8a9bb5; }
.code .fn { color: #ffd59a; }
.code .nm { color: #f5b4a3; }

/* audience */
.aud-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.aud h3 { font-size: 18px; }
.aud p { font-size: 15px; }
.aud-grid.aud-3 { grid-template-columns: repeat(3, 1fr); }

/* comparison table */
.cmp-wrap { overflow-x: auto; background: var(--sx-panel); box-shadow: var(--sx-shadow-sm); }
.cmp { min-width: 760px; font-size: 14px; }
.cmp th, .cmp td { padding: 9px 14px; }
.cmp tbody tr:nth-child(even) > .us { background: #dfe8fd; }
.cmp thead th { white-space: nowrap; }
.cmp tbody th { font-weight: 500; color: var(--sx-text); font-size: 14px; text-transform: none; letter-spacing: 0; background: none; }
.cmp td { color: var(--sx-body); }
.cmp .us { background: var(--sx-accent-soft); color: var(--sx-accent-ink); font-weight: 600; }
.cmp thead th.us { color: var(--sx-accent-ink); }
.cmp td.yes { color: var(--green-ink); font-weight: 600; }

/* CTA band */
.cta-band {
  border-radius: var(--sx-radius-lg); padding: 48px 40px; text-align: center; color: #fff;
  background: radial-gradient(600px 300px at 80% 0%, rgba(37, 99, 235, .35), transparent 70%), linear-gradient(135deg, #0f1b2d 0%, #13264a 100%);
  box-shadow: 0 20px 48px -24px rgba(15, 27, 45, .5);
}
.cta-band h2 { color: #fff; font-size: clamp(28px, 3.4vw, 40px); font-weight: 700; }
.cta-band p { margin: 12px auto 0; max-width: 600px; color: #dbe6ff; font-size: 17px; }
.cta-band .cta-row { justify-content: center; }
.btn-white { background: #fff; color: var(--sx-accent-ink); }
.btn-white:hover { background: var(--sx-accent-soft); }
.btn-outline-white { color: #fff; border-color: rgba(255, 255, 255, .55); background: transparent; }
.btn-outline-white:hover { background: rgba(255, 255, 255, .1); border-color: #fff; }

/* footer */
.footer { border-top: 1px solid var(--sx-border); padding: 44px 0 36px; background: var(--sx-bg); font-size: 14px; color: var(--muted-ok); }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; align-items: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; list-style: none; margin: 0; padding: 0; }
.footer-links a { color: var(--muted-ok); text-decoration: none; }
.footer-links a:hover { color: var(--sx-text); text-decoration: underline; }
.disclaimer { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--sx-border); font-size: 13px; line-height: 1.6; max-width: 900px; }
.copy { margin-top: 12px; font-size: 13px; }

/* pricing (static cards, refreshed at runtime from /api/billing/plans; see docs/landing.md) */
.pricing [hidden] { display: none !important; }
.price-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
.price-card { flex: 0 1 360px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.price-card[hidden] { display: none; }
.price-card.featured {
  border-color: var(--sx-accent); box-shadow: 0 0 0 1px var(--sx-accent), var(--sx-shadow-md);
  background: linear-gradient(180deg, var(--sx-accent-soft) 0%, var(--sx-panel) 55%);
}
.price-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 26px; }
.price-product { font-size: 14px; font-weight: 600; color: var(--sx-muted); }
.price-badge {
  font-size: 12px; font-weight: 600; line-height: 1; padding: 6px 10px; border-radius: 999px;
  background: var(--sx-green-soft); color: var(--green-ink); white-space: nowrap;
}
.price-plan { font-size: 20px; font-weight: 700; color: var(--sx-text); letter-spacing: -0.02em; }
.card .price-amount { margin-top: 6px; display: flex; align-items: baseline; gap: 6px; min-height: 52px; color: var(--sx-text); }
.price-amount [data-slot="amount"] { font-size: 44px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.price-interval { font-size: 16px; color: var(--sx-muted); }
.card .price-note { margin: 0 0 18px; min-height: 24px; font-size: 14px; color: var(--sx-accent-ink); }
.price-cta { margin-top: auto; width: 100%; }

/* loading: skeleton bars in the empty slots, inert buttons */
.pricing[data-state="loading"] [data-slot="product"]:empty,
.pricing[data-state="loading"] [data-slot="amount"]:empty {
  display: inline-block; height: 14px; width: 96px; border-radius: 6px; background: var(--sx-panel-2);
}
.pricing[data-state="loading"] [data-slot="amount"]:empty { height: 40px; width: 140px; }
/* unavailable: the static $29 / $290 cards shipped in the HTML stay as they are */

.pricing-includes { max-width: 760px; margin: 40px auto 0; }
.pricing-includes h3 { font-size: 18px; text-align: center; }
.pricing-includes .checks { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 32px; margin-top: 20px; }
.pricing-includes .checks a { color: var(--sx-accent-strong); }

/* responsive */
@media (max-width: 1080px) {
  .hero-grid, .split, .split.reverse, .macro-copy { grid-template-columns: 1fr; gap: 48px; }
  .hero-mock { max-width: 620px; }
  .split.reverse .split-mock { order: 2; }
  .feat-grid { grid-template-columns: repeat(2, 1fr); }
  .aud-grid { grid-template-columns: repeat(2, 1fr); }
  .aud-grid.aud-3 { grid-template-columns: 1fr; }
  .pulse { grid-template-columns: repeat(3, 1fr); }
  .macro-copy { gap: 20px; }
}
@media (max-width: 880px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-inner { flex-wrap: wrap; height: auto; min-height: 64px; gap: 0; padding-top: 10px; padding-bottom: 10px; }
  .nav[data-open="true"] .nav-links,
  .nav[data-open="true"] .nav-cta { display: flex; flex-basis: 100%; }
  .nav[data-open="true"] .nav-links { flex-direction: column; gap: 0; margin-top: 12px; border-top: 1px solid var(--sx-border); }
  .nav[data-open="true"] .nav-links a { display: block; padding: 14px 2px; font-size: 16px; border-bottom: 1px solid var(--sx-border); }
  .nav[data-open="true"] .nav-cta { flex-direction: column; margin: 16px 0 8px; }
  .nav[data-open="true"] .nav-cta .btn { width: 100%; padding: 14px; font-size: 15px; }
  .pit-grid { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .hero { padding: 40px 0 52px; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .feat-grid, .aud-grid { grid-template-columns: 1fr; }
  .hero-metric .v { font-size: 32px; }
  .case-row { gap: 8px; }
  .price-card { flex-basis: 100%; }
  .pricing-includes .checks { grid-template-columns: 1fr; }
  .price-amount [data-slot="amount"] { font-size: 38px; }
  .pulse { grid-template-columns: repeat(2, 1fr); }
  .pulse.pulse-3 { grid-template-columns: repeat(2, 1fr); }
  .pulse .tile:last-child { grid-column: span 2; }
  .section { padding: 44px 0; }
  .section-head { margin-bottom: 26px; }
  .hero .lede { font-size: 16px; }
  .cta-row .btn { flex: 1 1 100%; }
  .card { padding: 20px; }
  .mock-body { padding: 14px; }
  .tiles { gap: 8px; }
  .tile { padding: 10px; }
  .tile .v { font-size: 18px; }
  .wacc-row .total { margin-left: 0; }
  .timeline-card { padding: 22px; }
  .timeline-card svg, .timeline-note { display: none; }
  .tl-mobile { display: grid; gap: 14px; }
  .cta-band { padding: 36px 20px; border-radius: 14px; }
  .code pre { font-size: 12.5px; padding: 16px; }
  .grid-s { grid-template-columns: 44px repeat(5, 1fr); gap: 3px; font-size: 11px; }
  .grid-s div { padding: 7px 2px; }
  .tbl th, .tbl td { padding: 8px 7px; }
  .hide-sm { display: none; }
}
.tl-mobile li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--sx-muted); }
.tl-mobile b { color: var(--sx-text); display: block; }
.tl-mobile .d { width: 12px; height: 12px; border-radius: 50%; margin-top: 6px; flex: none; }

/* specialist pages: breadcrumb and text-only hero */
.crumb { margin: 0 0 16px; font-size: 14px; }
.crumb a { color: var(--sx-muted); text-decoration: none; font-weight: 500; }
.crumb a:hover { color: var(--sx-text); text-decoration: underline; }
.hero-sub .hero-copy { max-width: 780px; }
.hero-sub .lede { max-width: 680px; }

/* "What's inside": compact one-line items */
.inside-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; list-style: none; margin: 0; padding: 0; }
.inside-grid li { background: var(--sx-panel); border: 1px solid var(--sx-border); border-radius: var(--sx-radius); padding: 20px 22px; box-shadow: var(--sx-shadow-sm); }
.inside-grid h3 { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.inside-grid p { margin-top: 4px; color: var(--sx-muted); font-size: 15px; }

/* "Going deeper": whole-card links */
a.card.deeper { display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: box-shadow .2s, border-color .2s; }
a.card.deeper:hover { box-shadow: var(--sx-shadow-md); border-color: var(--sx-accent); }
.deeper .more { margin-top: auto; padding-top: 18px; font-size: 15px; font-weight: 600; color: var(--sx-accent-strong); }

/* plain prose blocks on specialist pages */
.prose { max-width: 760px; }
.prose p { color: var(--sx-body); font-size: 16px; }
.prose p + p { margin-top: 14px; }
.prose b { color: var(--sx-text); font-weight: 600; }
.api-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 32px; max-width: 920px; }

@media (max-width: 1080px) {
  .inside-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .inside-grid, .api-list { grid-template-columns: 1fr; }
}

/* ---------- 2026-10-31 restyle: dense, data-forward components ---------- */

/* hero ticker search */
.search { margin-top: 22px; max-width: 580px; }
.search-row { display: flex; gap: 8px; }
.search input {
  flex: 1 1 auto; min-width: 0; font: 500 16px/1.2 var(--sx-sans); color: var(--sx-text);
  padding: 13px 14px; border: 1px solid var(--sx-border-strong); border-radius: 10px; background: var(--sx-panel);
}
.search input::placeholder { color: var(--sx-muted); }
.search input:focus-visible { outline: 3px solid var(--sx-accent); outline-offset: 1px; border-color: var(--sx-accent); }
.search .btn { flex: none; }
.search-msg { margin-top: 6px; font-size: 13px; color: var(--red-ink); min-height: 0; }
.search-msg:empty { display: none; }
.popular { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; font-size: 13px; color: var(--sx-body); }
.popular .lbl { font-weight: 600; margin-right: 2px; }
.popular a {
  display: inline-block; font-size: 12px; font-weight: 600; line-height: 1; padding: 7px 10px; border-radius: 999px;
  background: var(--sx-accent-soft); color: var(--sx-accent-ink); text-decoration: none; border: 1px solid #d3e0ff;
}
.popular a:hover { background: #dbe6ff; }

/* hero spotlight table */
.spot { margin: 0; min-width: 0; }
.spot-wrap { overflow-x: auto; background: var(--sx-panel); box-shadow: 0 12px 32px -16px rgba(15, 27, 45, .18), var(--sx-shadow-sm); }
.spot-tbl { min-width: 580px; font-size: 13px; }
.spot-tbl th, .spot-tbl td { padding: 8px 8px; vertical-align: top; }
.spot-tbl th:first-child, .spot-tbl td:first-child { padding-left: 12px; }
.spot-tbl th:last-child, .spot-tbl td:last-child { padding-right: 12px; }
.spot-tbl thead th { white-space: normal; vertical-align: bottom; font-size: 10.5px; letter-spacing: .04em; line-height: 1.3; }
.spot-tbl .th-sub { display: block; text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 11px; }
.spot-tbl tbody th { text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--sx-text); background-color: transparent; }
.spot-tbl tbody tr:nth-child(even) > th { background-color: var(--sx-zebra); }
.spot-tbl td { color: var(--sx-text); white-space: nowrap; }
.spot-tbl .tk { font-weight: 700; color: var(--sx-accent-strong); text-decoration: none; }
.spot-tbl .tk:hover { text-decoration: underline; }
.spot-tbl .sub { display: block; font-size: 11.5px; font-weight: 500; color: var(--muted-ok); white-space: nowrap; }
.spot-tbl th .sub { max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
.spot-tbl .sub.down { color: var(--red-ink); }
.spot-tbl .sub.up { color: var(--green-ink); }
.spot-tbl .strong { font-weight: 700; }
.spot-tbl .muted { color: var(--muted-ok); }
.spot-cap { text-align: left; }
.qpill { display: inline-block; font-size: 11.5px; font-weight: 600; line-height: 1; padding: 5px 8px; border-radius: 999px; white-space: nowrap; }
.qpill.ok { background: var(--sx-green-soft); color: #166534; }
.qpill.warn { background: var(--sx-amber-soft); color: #92400e; }
.qpill.fail { background: var(--sx-red-soft); color: #991b1b; }
.qpill.none { background: var(--sx-panel-2); color: var(--muted-ok); }

/* stat strip */
.stats { background: var(--sx-panel); border-bottom: 1px solid var(--sx-border); padding: 18px 0; }
.stats[hidden] { display: none; }
.stat-list { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 28px; list-style: none; margin: 0; padding: 0; }
.stat-list li { font-size: 14px; color: var(--sx-body); }
.stat-list strong { font-size: 22px; font-weight: 800; color: var(--sx-text); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin-right: 4px; }

/* use-case rows */
.uc-list { display: grid; gap: 56px; }
.uc-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; align-items: center; }
.uc-row:nth-child(even) .uc-copy { order: 2; }
.uc-copy h3 { font-size: clamp(21px, 2.2vw, 25px); font-weight: 700; }
.uc-copy p { margin-top: 10px; color: var(--sx-body); font-size: 16px; }
.uc-link { display: inline-block; margin-top: 14px; font-weight: 600; font-size: 15px; color: var(--sx-accent-strong); text-decoration: none; }
.uc-link:hover { text-decoration: underline; }
.uc-link { margin-right: 18px; }
.uc-link:last-child { margin-right: 0; }
.uc-visual { min-width: 0; }
.uc-visual .caption { text-align: left; }
.uc-visual .sens { margin-top: 14px; }

/* data-check banner mock */
.qbanner { display: flex; gap: 10px; align-items: flex-start; background: var(--sx-amber-soft); border: 1px solid #f5d27a; border-radius: 10px; padding: 12px 14px; color: #78350f; font-size: 13px; }
.qbanner svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: #92400e; }
.qbanner b { display: block; color: #78350f; font-size: 14px; }
.qlist { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 13px; color: var(--sx-body); }
.qlist li { display: flex; gap: 8px; align-items: center; border: 1px solid var(--sx-border); border-radius: 8px; padding: 8px 10px; }
.qlist li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--sx-accent); flex: none; }

/* screener mock */
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.filters li { font-size: 12px; font-weight: 600; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--sx-border-strong); color: var(--sx-text); background: var(--sx-panel); }
.wl { margin-top: 12px; }
.wl .tbl td:first-child { font-weight: 700; }

/* compact trust band */
.trust-grid .card h3 { font-size: 17px; }

/* footer link columns */
.footer-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 40px; padding-bottom: 28px; margin-bottom: 28px; border-bottom: 1px solid var(--sx-border); }
.footer-cols h2 { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--sx-text); }
.footer-cols ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.footer-cols a { color: var(--muted-ok); text-decoration: none; }
.footer-cols a:hover { color: var(--sx-text); text-decoration: underline; }

@media (max-width: 1180px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 1080px) {
  .uc-row { grid-template-columns: 1fr; gap: 20px; }
  .uc-row:nth-child(even) .uc-copy { order: 0; }
  .uc-visual { max-width: 620px; }
  .spot { max-width: none; }
}
@media (max-width: 640px) {
  .search-row { flex-direction: column; }
  .search .btn { width: 100%; }
  .stat-list { justify-content: flex-start; }
  .stat-list li { flex: 1 1 100%; }
  .stat-list strong { font-size: 20px; }
  .uc-list { gap: 40px; }
  .footer-cols { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .feat:hover { transform: none; }
  a.card.deeper:hover { transform: none; }
}

/* ---------- Learn (/learn, generated by frontend/scripts/build-learn.ts) ---------- */
.nav-links a[aria-current="page"] { color: var(--sx-text); }
.learn-hero { padding: 40px 0 44px; }
.learn-crumb ol { display: flex; flex-wrap: wrap; gap: 4px 0; list-style: none; margin: 0; padding: 0; }
.learn-crumb li { color: var(--sx-muted); font-weight: 500; }
.learn-crumb li + li::before { content: "›"; margin: 0 8px; color: var(--sx-faint); }
.learn-hero .eyebrow { display: block; }
.learn-section-wrap { padding-top: 44px; }

.learn-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; align-items: start; }
.learn-toc {
  position: sticky; top: 88px; max-height: calc(100vh - 104px); overflow-y: auto;
  padding: 16px 18px; background: var(--sx-bg); border: 1px solid var(--sx-border); border-radius: var(--sx-radius);
  font-size: 14px; line-height: 1.4;
}
.learn-toc-title { margin: 0 0 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.learn-toc-title a { color: var(--sx-muted); text-decoration: none; }
.learn-toc ol { margin: 0; padding-left: 20px; color: var(--sx-faint); }
.learn-toc li { margin: 6px 0; }
.learn-toc a { color: var(--sx-body); text-decoration: none; }
.learn-toc a:hover { color: var(--sx-accent-strong); text-decoration: underline; }
.learn-toc a[aria-current="page"] { color: var(--sx-text); font-weight: 600; }
.learn-toc-books { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--sx-border); }

.learn-article { min-width: 0; max-width: 72ch; font-size: 17px; line-height: 1.7; color: var(--sx-body); }
.learn-body p { margin: 14px 0; }
.learn-body ul, .learn-body ol, .learn-body dl { margin: 14px 0; padding-left: 22px; }
.learn-body li { margin: 6px 0; }
.learn-body strong, .learn-body b { color: var(--sx-text); font-weight: 600; }
.learn-article h2 { scroll-margin-top: 88px; }
.learn-body .learn-h { margin: 32px 0 6px; font-size: 21px; font-weight: 700; letter-spacing: -0.015em; }
.formula-block { margin: 16px 0; padding: 4px 0; overflow-x: auto; overflow-y: hidden; font-size: 17px; -webkit-overflow-scrolling: touch; }
.formula-inline .katex { font-size: 1.02em; }
.katex-display { margin: 0.4em 0; text-align: left; }
.katex-display > .katex { text-align: left; }
.learn-callout, .learn-example {
  margin: 20px 0; padding: 14px 18px; border-left: 3px solid var(--sx-accent); background: var(--sx-accent-soft);
  border-radius: 0 var(--sx-radius) var(--sx-radius) 0; font-size: 16px;
}
.learn-example { border-left-color: var(--sx-green); background: var(--sx-green-soft); }
.learn-callout p:first-of-type, .learn-example p:first-of-type { margin-top: 0; }
.learn-callout p:last-child, .learn-example p:last-child { margin-bottom: 0; }
.learn-callout-label { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-ok); }
.learn-warnings { padding-left: 0 !important; }
.learn-warnings dt { margin-top: 14px; font-family: var(--sx-mono); font-size: 14px; color: var(--sx-amber); overflow-wrap: anywhere; }
.learn-warnings dd { margin: 4px 0 0; }

.learn-further { margin: 40px 0 10px; padding-top: 24px; border-top: 1px solid var(--sx-border); font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sx-muted); }
.learn-resources { list-style: none; margin: 0; padding: 0; font-size: 15px; line-height: 1.5; }
.learn-resources li { margin: 10px 0; }
.learn-resources .muted, .learn-books .muted { color: var(--sx-muted); }
.learn-kind {
  display: inline-block; min-width: 54px; margin-right: 10px; padding: 1px 6px; border-radius: 4px;
  font-family: var(--sx-mono); font-size: 11px; text-align: center; text-transform: uppercase; vertical-align: 1px;
  background: var(--sx-panel-2); color: var(--muted-ok); border: 1px solid var(--sx-border);
}
.learn-kind.kind-paper { color: var(--sx-accent-strong); }
.learn-kind.kind-data { color: var(--green-ink); }
.learn-books { margin: 0; padding-left: 24px; }
.learn-books li { margin: 0 0 18px; }
.learn-books a { font-weight: 600; }
.learn-why { color: var(--sx-body); font-size: 16px; }

.learn-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 40px; }
.learn-pager a {
  display: block; padding: 14px 18px; border: 1px solid var(--sx-border); border-radius: var(--sx-radius);
  text-decoration: none; color: var(--sx-text); font-weight: 600; font-size: 16px; line-height: 1.35;
}
.learn-pager a:hover { border-color: var(--sx-accent); box-shadow: var(--sx-shadow-sm); }
.learn-pager span { display: block; margin-bottom: 2px; font-size: 13px; font-weight: 500; color: var(--sx-muted); }
.learn-pager .learn-next { text-align: right; }
.learn-cta { margin-top: 40px; }
.learn-cta h2 { font-size: 22px; font-weight: 700; }
.learn-cta .cta-row { margin-top: 18px; }

.learn-hub { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.learn-hub-item { display: flex; gap: 16px; align-items: flex-start; height: 100%; padding: 18px 20px; text-decoration: none; color: inherit; transition: box-shadow .2s, border-color .2s; }
.learn-hub-item:hover { box-shadow: var(--sx-shadow-md); border-color: var(--sx-accent); }
.learn-hub-n {
  flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  background: var(--sx-accent-soft); color: var(--sx-accent-ink); font-weight: 700; font-size: 15px;
}
.learn-hub-title { display: block; font-size: 17px; font-weight: 700; color: var(--sx-text); line-height: 1.3; }
.learn-hub-summary { display: block; margin-top: 4px; font-size: 15px; color: var(--sx-body); line-height: 1.5; }
.learn-hub-books { margin-top: 24px; font-size: 16px; font-weight: 600; }
.learn-hub-cta { max-width: 760px; }

/* Learn guides (/learn/how-to-*): numbered steps with app screenshots */
.learn-toc-group { margin: 12px 0 4px; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--sx-faint); }
.learn-toc-guides { list-style: none; margin: 0; padding: 0; }
.learn-shot-note { margin: 0 0 8px; font-size: 14px; color: var(--sx-muted); }
.learn-steps { counter-reset: learn-step; }
.learn-step { counter-increment: learn-step; }
.learn-body .learn-step-h { display: flex; gap: 12px; align-items: baseline; margin-top: 40px; scroll-margin-top: 88px; }
.learn-body .learn-step-h::before {
  content: counter(learn-step); flex: none; display: inline-grid; place-items: center; width: 30px; height: 30px;
  border-radius: 8px; background: var(--sx-accent-soft); color: var(--sx-accent-ink); font-size: 15px; font-weight: 700;
  transform: translateY(-2px);
}
.learn-shot { margin: 18px 0 22px; }
.learn-shot img {
  display: block; max-width: 100%; height: auto; border: 1px solid var(--sx-border); border-radius: var(--sx-radius);
  box-shadow: 0 8px 24px -14px rgba(15, 27, 45, 0.22), var(--sx-shadow-sm); background: #fff;
}
.learn-shot figcaption { margin-top: 8px; font-size: 14px; line-height: 1.5; color: var(--sx-muted); }
.learn-hub-group { margin: 0 0 14px; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sx-muted); }
.learn-hub + .learn-hub-group, .learn-hub-guides + .learn-hub-group { margin-top: 40px; }
.learn-hub-guides { list-style: none; }
.learn-hub-guide { flex-direction: column; gap: 14px; }
.learn-hub-thumb {
  display: block; width: 100%; height: 150px; object-fit: cover; object-position: top left;
  border: 1px solid var(--sx-border); border-radius: 8px; background: #fff;
}

@media (max-width: 900px) {
  .learn-layout { grid-template-columns: 1fr; gap: 28px; }
  .learn-toc { position: static; max-height: none; order: 2; }
  .learn-hub { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .learn-article { font-size: 16px; }
  .learn-pager { grid-template-columns: 1fr; }
  .learn-pager .learn-next { text-align: left; }
  .formula-block { font-size: 15px; }
}

/* legal pages (/privacy, /terms) */
.legal { max-width: 720px; }
.legal h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; margin-top: 36px; }
.legal h2 + p, .legal h2 + ul { margin-top: 10px; }
.legal ul { margin: 12px 0 0 22px; padding: 0; color: var(--sx-body); font-size: 16px; }
.legal li + li { margin-top: 8px; }
.legal ul + p { margin-top: 14px; }
.legal .legal-meta { color: var(--sx-muted); font-size: 14px; }

/* docs page (/docs): reference layout on the learn grid */
.docs-article { max-width: 80ch; }
.docs-body h2 { margin: 40px 0 8px; font-size: 24px; font-weight: 800; letter-spacing: -0.02em; scroll-margin-top: 88px; }
.docs-body h2:first-child { margin-top: 0; }
.docs-body h3 { margin: 26px 0 6px; font-size: 18px; font-weight: 700; scroll-margin-top: 88px; }
.docs-body p, .docs-body li { font-size: 16px; line-height: 1.65; }
.docs-body pre { margin: 12px 0 16px; padding: 14px 16px; overflow-x: auto; font-size: 13.5px; line-height: 1.6; background: var(--sx-panel); border: 1px solid var(--sx-border); border-radius: 10px; color: var(--sx-text); }
.docs-body code { font-size: 0.92em; background: var(--sx-panel-2, #f0f3f9); padding: 1px 5px; border-radius: 5px; color: var(--sx-text); }
.docs-body pre code { background: none; padding: 0; font-size: inherit; }
.docs-table { width: 100%; border-collapse: collapse; margin: 10px 0 18px; font-size: 14px; }
.docs-table th, .docs-table td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--sx-border); }
.docs-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--sx-muted); font-weight: 600; }
.docs-table td code { white-space: nowrap; }
.docs-table td:first-child { white-space: nowrap; }
.docs-table td.sig, .docs-table td.sig code { white-space: normal; overflow-wrap: anywhere; }
.docs-table td.sig { min-width: 16ch; max-width: 34ch; }
.docs-note { margin: 14px 0; padding: 12px 14px; border-left: 3px solid var(--sx-accent); background: var(--sx-accent-soft); border-radius: 6px; font-size: 15px; }
.docs-table td + td code { white-space: normal; }
@media (max-width: 720px) {
  .docs-table td:first-child, .docs-table td code { white-space: normal; }
  .docs-table { display: block; overflow-x: auto; }
  .docs-table td, .docs-table td code { overflow-wrap: anywhere; }
}

/* /backtesting: strategies table and simulator limits */
.strat { max-width: 980px; }
.strat-tbl { min-width: 0; }
.strat-tbl tbody th { white-space: normal; min-width: 150px; }

.feat-grid.limits-grid { grid-template-columns: repeat(2, 1fr); }
.limits-not li::before { background: var(--sx-border-strong); }
@media (max-width: 640px) {
  .feat-grid.limits-grid { grid-template-columns: 1fr; }
  .strat-tbl tbody th { min-width: 0; }
}

/* ---------- Research (/research, generated by frontend/scripts/build-learn.ts) ---------- */
.rs-hero-copy { max-width: 860px; }
.rs-hero .lede { font-size: 19px; }
.rs-meta { display: flex; flex-wrap: wrap; gap: 6px 0; margin-top: 16px; font-size: 14px; color: var(--sx-muted); }
.rs-meta span + span::before { content: "·"; margin: 0 10px; color: var(--sx-faint); }
.rs-verdict {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 32px; align-items: center;
  margin-top: 24px; padding: 20px 24px; background: var(--sx-panel); border: 1px solid var(--sx-border); border-radius: var(--sx-radius-card); box-shadow: var(--sx-shadow-sm);
}
.rs-verdict-label { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--sx-amber-soft); color: var(--sx-amber); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.rs-verdict-line { margin-top: 10px; font-size: 16px; line-height: 1.5; color: var(--sx-text); font-weight: 500; }
.rs-verdict-nums { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 0; }
.rs-verdict-nums div { min-width: 0; }
.rs-verdict-nums dt { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--sx-muted); white-space: nowrap; }
.rs-verdict-nums dd { margin: 4px 0 0; font-size: 22px; font-weight: 700; color: var(--sx-text); letter-spacing: -0.01em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rs-delta { font-size: 14px; font-weight: 600; margin-left: 4px; }
.rs-delta.down { color: var(--red-ink); }
.rs-delta.up { color: var(--green-ink); }

.rs-layout { grid-template-columns: 240px minmax(0, 1fr); }
.rs-article { max-width: 760px; }
.rs-toc-list { margin: 0; padding-left: 20px; color: var(--sx-faint); }
.rs-toc-list li { margin: 6px 0; }
.rs-toc .rs-subscribe-card { margin-top: 20px; }
.rs-toc { min-width: 0; }
.rs-section { scroll-margin-top: 88px; }
.rs-body h2 { margin: 44px 0 10px; font-size: 24px; font-weight: 700; letter-spacing: -0.015em; }
.rs-section:first-child h2 { margin-top: 0; }
.rs-body h2 + p { margin-top: 10px; }
.rs-body p { margin: 14px 0; }
.rs-body .rs-shot { margin: 22px 0 26px; }
.rs-body .rs-shot img { border: 1px solid var(--sx-border); border-radius: 8px; box-shadow: var(--sx-shadow-sm); height: auto; }
.rs-callout.rs-key { border-left-color: var(--sx-accent); background: var(--sx-accent-soft); }
.rs-callout.rs-key .learn-callout-label { color: var(--sx-accent-ink); }
.rs-callout ul { margin: 6px 0 0; padding-left: 20px; }
.rs-callout li { margin: 6px 0; }
.rs-disclosure { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--sx-border); font-size: 14px; color: var(--sx-muted); }
.rs-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 32px 0 8px; }
.rs-tags span { padding: 4px 10px; border-radius: 999px; background: var(--sx-panel-2); color: var(--sx-muted); font-size: 13px; font-weight: 600; }
.rs-code { margin: 14px 0; padding: 14px 16px; overflow-x: auto; background: var(--sx-text); color: #e5edf7; border-radius: 10px; font-size: 13.5px; line-height: 1.55; }

/* KPI row (stat tiles) */
.rs-kpis { list-style: none; margin: 22px 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rs-kpis li { padding: 12px 14px; background: var(--sx-panel-2); border-radius: 10px; min-width: 0; }
.rs-kpi-label { display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--sx-muted); line-height: 1.3; }
.rs-kpi-value { display: block; margin-top: 4px; font-size: 22px; font-weight: 700; color: var(--sx-text); letter-spacing: -0.01em; line-height: 1.2; }
.rs-kpi-value.down { color: var(--red-ink); }
.rs-kpi-value.up { color: var(--green-ink); }
.rs-kpi-note { display: block; margin-top: 2px; font-size: 13px; color: var(--sx-muted); line-height: 1.35; }

/* tables */
.rs-table-wrap { margin: 18px 0 24px; overflow-x: auto; }
.rs-table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.45; }
.rs-table caption { caption-side: bottom; padding-top: 8px; text-align: left; font-size: 13px; color: var(--sx-muted); }
.rs-table th, .rs-table td { padding: 8px 10px; border-bottom: 1px solid var(--sx-border); text-align: left; vertical-align: top; }
.rs-table thead th { font-size: 12px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--sx-muted); background: var(--sx-panel-2); }
.rs-table th.num, .rs-table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rs-table td:first-child { font-weight: 500; color: var(--sx-text); }

/* charts */
.rs-chart { margin: 24px 0 28px; padding: 16px 16px 12px; background: var(--sx-panel); border: 1px solid var(--sx-border); border-radius: var(--sx-radius-card); box-shadow: var(--sx-shadow-sm); }
.rs-chart-head { display: block; margin-bottom: 10px; }
.rs-chart-title { display: block; font-size: 16px; font-weight: 700; color: var(--sx-text); line-height: 1.3; }
.rs-chart-sub { display: block; margin-top: 3px; font-size: 13.5px; color: var(--sx-muted); line-height: 1.45; }
.rs-svg { width: 100%; height: auto; overflow: visible; font-family: var(--sx-sans); }
.rs-legend { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--sx-body); }
.rs-legend li { display: inline-flex; align-items: center; gap: 7px; }
.rs-swatch { display: inline-block; width: 18px; height: 3px; border-radius: 2px; background: var(--c); }
.rs-swatch.box { width: 12px; height: 12px; border-radius: 3px; }
.rs-swatch.dash { background: repeating-linear-gradient(90deg, var(--c) 0 5px, transparent 5px 9px); }
.rs-source { margin: 8px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--sx-muted); }
.rs-data { margin-top: 8px; font-size: 13px; }
.rs-data summary { cursor: pointer; color: var(--sx-accent-strong); font-weight: 600; }
.rs-data table { width: 100%; margin-top: 8px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.rs-data th, .rs-data td { padding: 4px 8px; border-bottom: 1px solid var(--sx-border); text-align: right; }
.rs-data th:first-child, .rs-data td:first-child { text-align: left; }
.rs-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.rs-two .rs-chart { margin: 20px 0 8px; }

/* heatmap: one hue, light to dark with magnitude (data-step 100..700) */
.rs-heatmap-wrap { overflow-x: auto; }
.rs-heatmap { border-collapse: separate; border-spacing: 2px; width: 100%; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.rs-heatmap th { padding: 6px 8px; font-size: 12px; font-weight: 600; color: var(--sx-muted); text-align: right; white-space: nowrap; }
.rs-heatmap thead th:first-child { text-align: left; }
.rs-heatmap tbody th { text-align: right; }
.rs-heatmap td { padding: 8px 6px; text-align: right; border-radius: 4px; color: var(--sx-text); background: var(--cell, #e8efff); }
.rs-heatmap td[data-step] { --cell: #e8efff; }
.rs-heatmap td[data-step^="1"] { --cell: #eef3fc; }
.rs-heatmap td[data-step^="2"] { --cell: #dbe6fb; }
.rs-heatmap td[data-step^="3"] { --cell: #c4d6f8; }
.rs-heatmap td[data-step^="4"] { --cell: #a9c3f3; }
.rs-heatmap td[data-step^="5"] { --cell: #8aadee; color: var(--sx-text); }
.rs-heatmap td[data-step^="6"] { --cell: #6a95e6; color: #fff; }
.rs-heatmap td[data-step^="7"] { --cell: #4a7cdc; color: #fff; }
.rs-heatmap td.above { box-shadow: inset 0 0 0 2px var(--sx-green); font-weight: 700; }
.rs-heatmap td.base { outline: 2px solid var(--sx-text); outline-offset: -1px; font-weight: 700; }

/* newsletter sign-up */
.rs-subscribe { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-width: 0; }
.rs-subscribe-card { padding: 18px; background: var(--sx-accent-soft); border: 1px solid #d6e2ff; border-radius: var(--sx-radius-card); }
.rs-subscribe-card .rs-subscribe-row { flex-direction: column; }
.rs-subscribe-card .rs-subscribe-row .btn { width: 100%; }
.rs-subscribe-inline { margin: 36px 0 8px; padding: 22px 24px; background: var(--sx-bg); border: 1px solid var(--sx-border); border-radius: var(--sx-radius-card); grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); align-items: center; gap: 10px 24px; }
.rs-subscribe-inline .rs-subscribe-msg { grid-column: 1 / -1; }
.rs-subscribe-title { display: block; font-size: 16px; font-weight: 700; color: var(--sx-text); }
.rs-subscribe-sub { display: block; margin-top: 3px; font-size: 13.5px; line-height: 1.45; color: var(--sx-body); }
.rs-subscribe-row { display: flex; gap: 8px; min-width: 0; }
.rs-subscribe-row input {
  flex: 1 1 auto; width: 100%; min-width: 0; padding: 10px 12px; font: inherit; font-size: 15px; color: var(--sx-text);
  background: var(--sx-panel); border: 1px solid var(--sx-border-strong); border-radius: 8px;
}
.rs-subscribe-row input:focus { border-color: var(--sx-accent); outline: none; box-shadow: 0 0 0 3px var(--sx-accent-soft); }
.rs-subscribe-row .btn { flex: none; }
.rs-subscribe-msg { margin: 0; min-height: 1.2em; font-size: 13.5px; color: var(--sx-muted); }
.rs-subscribe-msg.ok { color: var(--green-ink); }
.rs-subscribe-msg.err { color: var(--red-ink); }

/* "just landed" bar under the header on the home page (newest research article) */
.rs-bar { background: var(--sx-accent-soft); border-bottom: 1px solid #d6e2ff; }
.rs-bar a { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 7px 0; color: var(--sx-accent-ink); text-decoration: none; font-size: 14.5px; line-height: 1.35; }
.rs-bar a:hover .rs-bar-title { text-decoration: underline; }
.rs-bar-tag { flex: none; padding: 2px 8px; border-radius: 999px; background: var(--sx-accent); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.rs-bar-text { min-width: 0; }
.rs-bar-title { font-weight: 600; color: var(--sx-text); }
.rs-bar-arrow { flex: none; margin-left: auto; font-weight: 600; white-space: nowrap; }
@media (max-width: 640px) { .rs-bar-arrow { display: none; } }

/* home-page band */
.rs-band { padding: 40px 0; background: var(--sx-bg); border-top: 1px solid var(--sx-border); }
.rs-band .rs-subscribe-inline { margin: 0; background: var(--sx-panel); }

/* hub */
.rs-hub-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
.rs-hub-list { grid-template-columns: minmax(0, 1fr); }
.rs-card { max-width: 760px; }
.rs-card-eyebrow { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--sx-muted); }
.rs-card .learn-hub-title { font-size: 20px; }
.rs-card-verdict { display: block; margin-top: 10px; font-size: 14.5px; color: var(--sx-body); }
.rs-card-verdict b { color: var(--sx-text); }
.rs-hub-note { margin-top: 20px; font-size: 14px; color: var(--sx-muted); max-width: 760px; }
.rs-hub-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; position: sticky; top: 84px; min-width: 0; }
.rs-howmade { padding: 18px; }
.rs-howmade h2 { font-size: 16px; font-weight: 700; }
.rs-howmade p { margin-top: 8px; font-size: 14px; line-height: 1.55; color: var(--sx-body); }

@media (max-width: 900px) {
  .rs-layout { grid-template-columns: 1fr; }
  .rs-toc { position: static; }
  .rs-toc .rs-subscribe-card { display: none; }
  .rs-hub-grid { grid-template-columns: 1fr; }
  .rs-hub-side { position: static; }
  .rs-two { grid-template-columns: 1fr; }
  .rs-verdict { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .rs-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rs-verdict-nums { grid-template-columns: 1fr 1fr; }
  .rs-subscribe-inline { grid-template-columns: 1fr; }
  .rs-subscribe-row { flex-direction: column; }
  .rs-chart { padding: 12px 10px 10px; }
}
