/* ─── theme tokens ─────────────────────────────────────────────── */
:root {
  --paper: #f6f8fb;
  --surface: #ffffff;
  --surface-2: #eef2f7;
  --line: #e1e7ef;
  --line-2: #cbd4e0;
  --ink: #1b2340;
  --ink-2: #4f5a75;
  --ink-3: #7f8aa3;
  --brand: #0f8a99;
  --brand-ink: #ffffff;
  --brand-soft: #dff3f6;
  --accent: #e8781c;
  --series-a: #0f8a99;
  --series-b: #e8781c;
  --good: #1f7a4d;
  --good-soft: #e3f2e9;
  --warn: #a8731c;
  --warn-soft: #f8efd9;
  --bad: #b83a3a;
  --bad-soft: #f8e3e3;
  --shadow: 0 1px 2px rgba(27,35,64,.05), 0 8px 24px -12px rgba(27,35,64,.14);
  --shadow-lg: 0 2px 4px rgba(27,35,64,.05), 0 24px 48px -20px rgba(27,35,64,.28);
  --glow: 0 10px 30px -10px rgba(15,138,153,.55);
  --brand-grad: linear-gradient(135deg, #0f8a99 0%, #22b3c2 100%);
  --radius: 20px;
  --serif: "Manrope", "Inter", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --display: "Manrope", "Inter", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --condensed: "Barlow Condensed", "Arial Narrow", Impact, sans-serif;
  --sans: "Inter", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "DM Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --paper:#0b1017; --surface:#121820; --surface-2:#1a2230; --line:#273040; --line-2:#36425a; --ink:#e9edf5; --ink-2:#a9b3c7; --ink-3:#73809a; --brand:#2bb5c4; --brand-ink:#0b1a1e; --brand-soft:#133238; --accent:#f29a3c; --series-a:#2bb5c4; --series-b:#f29a3c; --good:#4fb27f; --good-soft:#1b3328; --warn:#d4a24a; --warn-soft:#3a2f18; --bad:#e06a6a; --bad-soft:#3d2222; --shadow:0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6); --shadow-lg:0 2px 4px rgba(0,0,0,.4), 0 28px 56px -24px rgba(0,0,0,.8); --glow:0 10px 30px -8px rgba(43,181,196,.5); --brand-grad:linear-gradient(135deg,#1aa3b3 0%,#3fd0df 100%); color-scheme: dark; } }
:root[data-theme="dark"] { --paper:#0b1017; --surface:#121820; --surface-2:#1a2230; --line:#273040; --line-2:#36425a; --ink:#e9edf5; --ink-2:#a9b3c7; --ink-3:#73809a; --brand:#2bb5c4; --brand-ink:#0b1a1e; --brand-soft:#133238; --accent:#f29a3c; --series-a:#2bb5c4; --series-b:#f29a3c; --good:#4fb27f; --good-soft:#1b3328; --warn:#d4a24a; --warn-soft:#3a2f18; --bad:#e06a6a; --bad-soft:#3d2222; --shadow:0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6); --shadow-lg:0 2px 4px rgba(0,0,0,.4), 0 28px 56px -24px rgba(0,0,0,.8); --glow:0 10px 30px -8px rgba(43,181,196,.5); --brand-grad:linear-gradient(135deg,#1aa3b3 0%,#3fd0df 100%); color-scheme: dark; }

/* ─── base ─────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; position: relative; overflow-x: hidden; }
b, strong { font-weight: 600; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -.022em; margin: 0; line-height: 1.08; }
.num, .mono, td.num, .bignum .v, .stat .v, .gauge-labels, .pill { font-family: var(--mono); font-variant-numeric: tabular-nums; }
button { font: inherit; cursor: pointer; }

/* ─── nav ──────────────────────────────────────────────────────── */
.nav { position: sticky; top: 0; z-index: 30; margin: 0; padding: 12px max(20px, calc((100% - 1040px) / 2)); display: flex; justify-content: space-between; align-items: center; background: color-mix(in srgb, var(--paper) 78%, transparent); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid transparent; transition: border-color .25s; }
.nav.scrolled { border-bottom-color: var(--line); }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo-mark { width: 60px; height: 33px; object-fit: contain; display: block; }
.logo-word { font-family: var(--condensed); font-weight: 700; font-size: 23px; letter-spacing: .02em; line-height: 1; }
.logo-word b { font-weight: 700; color: inherit; }
.nav-right { display: flex; align-items: center; gap: 8px; }
.nav-right .btn-ghost, .nav-right .btn-primary { white-space: nowrap; }
#provider-badge { white-space: nowrap; }
@media (max-width: 1100px) { #provider-badge { display: none; } }
.nav-link { color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 500; padding: 7px 10px; border-radius: 8px; transition: color .15s, background .15s; }
.nav-link:hover, .nav-link.active { color: var(--ink); background: var(--surface-2); }
@media (max-width: 720px) { .nav-link { display: none; } }
.mobile-nav { display: none; }
.pill { font-size: 12px; color: var(--ink-3); border: 1px solid var(--line); padding: 4px 10px; border-radius: 999px; background: var(--surface); }
.icon-btn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); display: grid; place-items: center; }
.icon-btn:hover { border-color: var(--line-2); color: var(--ink); }
.icon-btn svg { width: 16px; height: 16px; }

/* ─── page ─────────────────────────────────────────────────────── */
.page { max-width: 1040px; margin: 0 auto; padding: 0 20px 72px; }
.aurora { position: absolute; inset: 0 0 auto 0; height: 760px; pointer-events: none; z-index: -1; overflow: hidden; }
.aurora::before, .aurora::after { content: ""; position: absolute; width: 640px; height: 640px; border-radius: 50%; filter: blur(90px); opacity: .32; animation: drift 18s ease-in-out infinite alternate; }
.aurora::before { left: -160px; top: -200px; background: radial-gradient(circle at 40% 40%, #2bb5c4, transparent 62%); }
.aurora::after { right: -200px; top: -120px; background: radial-gradient(circle at 60% 40%, #f29a3c, transparent 62%); animation-delay: -9s; animation-direction: alternate-reverse; }
.aurora span { position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 56px 56px; opacity: .28; -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 20%, transparent 70%); mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 20%, transparent 70%); }
:root[data-theme="dark"] .aurora::before, :root[data-theme="dark"] .aurora::after { opacity: .22; }
@keyframes drift { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(90px, 60px, 0) scale(1.15); } }
.hero { text-align: center; padding: 76px 0 34px; }
.hero h1 { font-size: clamp(42px, 6.4vw, 72px); line-height: 1.02; letter-spacing: -.035em; }
.hero h1 em { font-style: normal; background: linear-gradient(92deg, var(--brand) 0%, #2bb5c4 45%, var(--accent) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); background: var(--brand-soft); border-radius: 999px; padding: 6px 14px; margin-bottom: 22px; }
.hero-kicker i { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 0 var(--brand); animation: ping 2.2s ease-out infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 60%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }
.lede { max-width: 660px; margin: 20px auto 0; color: var(--ink-2); font-size: 18px; line-height: 1.6; }
.hero.compact { padding: 26px 0 12px; } .hero.compact h1 { font-size: 26px; letter-spacing: -.02em; } .hero.compact .lede, .hero.compact .hero-kicker { display: none; }
.hero > * { animation: fadeUp .7s cubic-bezier(.2,.7,.2,1) both; } .hero > :nth-child(2) { animation-delay: .08s; } .hero > :nth-child(3) { animation-delay: .16s; }
.search { animation: fadeUp .7s cubic-bezier(.2,.7,.2,1) .22s both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ─── search ───────────────────────────────────────────────────── */
.search { margin-bottom: 30px; }
.search-bar { display: grid; grid-template-columns: 1fr auto 1fr auto auto; gap: 10px; align-items: end; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow-lg); transition: box-shadow .25s, border-color .25s, transform .25s; }
.search-bar:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft), var(--shadow-lg); }
.field { display: flex; flex-direction: column; gap: 3px; }
.field span { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding-left: 10px; }
.field input, .field select { border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 24px; font-family: var(--mono); font-weight: 500; padding: 5px 10px; width: 100%; outline: none; text-transform: uppercase; border-radius: 10px; transition: background .15s; }
.field select { font-family: var(--sans); font-size: 16px; text-transform: none; padding: 9px 6px 9px 10px; min-width: 110px; }
.field input:focus { background: var(--surface-2); }
.field input::placeholder { color: var(--ink-3); text-transform: none; font-weight: 400; }
.vs { color: var(--ink-3); font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; padding-bottom: 14px; }
.btn-primary { background: var(--brand-grad); color: var(--brand-ink); border: 0; border-radius: 12px; padding: 0 26px; height: 48px; font-weight: 700; font-size: 16px; letter-spacing: .005em; box-shadow: var(--glow); transition: transform .18s cubic-bezier(.2,.7,.2,1), box-shadow .25s, filter .2s; }
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 14px 34px -10px rgba(15,138,153,.65); }
.btn-primary:active { transform: translateY(0) scale(.985); }
.btn-primary:disabled { opacity: .7; cursor: progress; transform: none; }
.examples { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 12px 4px 0; color: var(--ink-3); font-size: 14px; }
.examples span:first-child { margin-right: 4px; }
.chip { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 13px; color: var(--ink-2); transition: border-color .15s, color .15s, transform .15s, box-shadow .15s; }
.chip:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); box-shadow: var(--shadow); }
.chip b { font-family: var(--mono); font-weight: 500; }
.hint { color: var(--ink-3); font-size: 13px; margin: 8px 4px 0; }
.hint code { font-family: var(--mono); background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }

.advanced { margin-top: 10px; border: 1px solid transparent; border-radius: 12px; }
.advanced[open] { border-color: var(--line); background: var(--surface); }
.advanced summary { cursor: pointer; padding: 8px 12px; color: var(--ink-2); font-size: 14px; font-weight: 500; list-style: none; display: flex; gap: 10px; align-items: center; }
.advanced summary::before { content: "▸"; font-size: 11px; color: var(--ink-3); } .advanced[open] summary::before { content: "▾"; }
.summary-sub { color: var(--ink-3); font-weight: 400; }
.adv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; padding: 4px 14px 16px; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
fieldset label { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--ink-2); margin-bottom: 8px; }
fieldset label em { font-style: normal; color: var(--ink-3); font-size: 12.5px; }
fieldset input[type=number], fieldset select { border: 1px solid var(--line-2); border-radius: 7px; background: var(--paper); color: var(--ink); font-family: var(--mono); font-size: 14px; padding: 5px 8px; width: 88px; }
fieldset select { font-family: var(--sans); width: auto; }
fieldset label.check { gap: 8px; } fieldset input[type=checkbox] { accent-color: var(--brand); }

/* ─── states ───────────────────────────────────────────────────── */
.btn-primary.busy { display: inline-flex; align-items: center; gap: 10px; opacity: .85; cursor: progress; }
.btn-primary.busy .spinner { border-color: rgba(255,255,255,.35); border-top-color: var(--brand-ink); width: 16px; height: 16px; }
.loading { display: flex; align-items: center; gap: 12px; justify-content: center; color: var(--ink-2); padding: 36px 0; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--line-2); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error { background: var(--bad-soft); color: var(--bad); border-radius: 10px; padding: 14px 16px; margin-bottom: 20px; font-size: 15px; }

/* ─── cards ────────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 30px; margin-bottom: 18px; box-shadow: var(--shadow); }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .65s cubic-bezier(.2,.7,.2,1), transform .65s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.card-title { font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px; }
.card-title.mt { margin-top: 22px; }
.card-title-row { display: flex; justify-content: space-between; align-items: baseline; }
.link { background: none; border: 0; color: var(--brand); font-weight: 600; font-size: 14px; padding: 0; }
.link:hover { text-decoration: underline; }
.eyebrow { font-family: var(--mono); font-size: 12.5px; color: var(--ink-3); margin-bottom: 6px; }
.fineprint { color: var(--ink-3); font-size: 13px; margin: 10px 0 0; }

/* verdict */
.verdict-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 18px; }
.verdict-text { min-width: 0; flex: 1; }
.verdict-head h2 { font-size: clamp(28px, 3.8vw, 40px); line-height: 1.06; }
.sub { color: var(--ink-2); margin: 8px 0 0; max-width: 640px; }
.verdict-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.plan-cta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.plan-cta .plan-note { width: 100%; }
.score { flex: none; width: 80px; height: 80px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-size: 32px; font-weight: 800; letter-spacing: -.03em; border: 2px solid; animation: pop .6s cubic-bezier(.2,.9,.3,1.3) both; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.score.good { color: var(--good); background: var(--good-soft); } .score.warn { color: var(--warn); background: var(--warn-soft); } .score.bad { color: var(--bad); background: var(--bad-soft); }
.score small { font-family: var(--sans); font-size: 11px; font-weight: 500; display: block; text-align: center; line-height: 1; margin-top: -2px; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.checks li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; background: var(--surface-2); border: 1px solid transparent; border-radius: 14px; padding: 14px 16px; animation: fadeUp .55s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i, 0) * 80ms + 120ms); transition: border-color .2s; }
.checks li:hover { border-color: var(--line-2); }
.checks .ic { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.ic.good { background: var(--good-soft); color: var(--good); } .ic.warn { background: var(--warn-soft); color: var(--warn); } .ic.bad { background: var(--bad-soft); color: var(--bad); }
.checks .q { font-weight: 600; font-size: 15px; }
.checks .a { color: var(--ink-2); font-size: 14px; margin-top: 2px; }
.checks .d { color: var(--ink-3); font-family: var(--mono); font-size: 12px; margin-top: 4px; }

/* gauge */
.gauge { position: relative; height: 24px; border-radius: 999px; overflow: hidden; display: flex; margin-top: 6px; }
.gauge-zone { flex: 1; } .gauge-zone.buy, .gauge-zone.sell { background: var(--brand-soft); } .gauge-zone.wait { background: var(--surface-2); flex: 2; }
.gauge-tick { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line-2); }
.gauge-tick.entry-l { left: 25%; } .gauge-tick.entry-r { left: 75%; } .gauge-tick.zero { left: 50%; background: var(--ink-3); }
.gauge-marker { position: absolute; top: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--ink); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--ink); transform: translateX(-50%); transition: left .9s cubic-bezier(.2,.8,.2,1); }
.gauge-marker::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--ink); opacity: 0; animation: ring 2.4s ease-out .9s infinite; }
@keyframes ring { 0% { transform: scale(1); opacity: .5; } 100% { transform: scale(2.4); opacity: 0; } }
.gauge-labels { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; font-size: 12px; color: var(--ink-3); margin-top: 8px; }
.gauge-labels span:last-child { text-align: right; }
.gauge-labels .gl-mid { text-align: center; }
.now-text { font-size: 17px; margin: 14px 0 0; }
.now-text b { font-family: var(--mono); font-weight: 500; }

/* backtest */
.rules-text { color: var(--ink-2); margin: -4px 0 16px; font-size: 15px; }
.rules-text b { font-family: var(--mono); font-weight: 500; color: var(--ink); }
.bignums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.bignum { background: var(--surface-2); border-radius: 14px; padding: 14px 16px; }
.bignum .l { font-size: 12.5px; color: var(--ink-3); font-weight: 500; }
.bignum .v { font-size: 28px; font-weight: 500; line-height: 1.2; margin-top: 4px; letter-spacing: -.01em; }
.bignum .s { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.bignum.good .v { color: var(--good); } .bignum.bad .v { color: var(--bad); }

.chart { width: 100%; height: 260px; }

/* segments & honesty */
.seg-tabs { display: inline-flex; background: var(--surface-2); border-radius: 8px; padding: 3px; margin-bottom: 8px; }
.seg-tabs button { background: none; border: 0; padding: 6px 12px; border-radius: 6px; color: var(--ink-2); font-size: 13px; font-weight: 500; }
.seg-tabs button { transition: color .15s, background .15s; }
.seg-tabs button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.seg-note { color: var(--ink-3); font-size: 13px; margin: 0 0 12px; }
.honesty { background: var(--surface-2); border-radius: 12px; padding: 12px 16px; margin-top: 12px; }
.honesty-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.honesty-row > div { display: flex; flex-direction: column; }
.honesty .l { font-size: 12px; color: var(--ink-3); }
.honesty b { font-family: var(--mono); font-weight: 500; font-size: 18px; }
.honesty .q { color: var(--ink-3); cursor: help; font-size: 11px; margin-left: 2px; border: 1px solid var(--line-2); border-radius: 50%; display: inline-grid; place-items: center; width: 14px; height: 14px; line-height: 1; vertical-align: 1px; }
.notshown { margin-top: 12px; }
.notshown summary { cursor: pointer; font-weight: 600; color: var(--ink-2); font-size: 14px; }
.notshown ul { margin: 8px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 14px; }
.notshown li { margin-bottom: 4px; }
#weakening-badge { color: var(--warn); border-color: var(--warn); }
#chart-diag { height: 340px; }

/* chat */
#chat-model { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-setup p { color: var(--ink-2); margin: 0 0 10px; font-size: 15px; }
.chat-setup a { color: var(--brand); }
.chat-setup pre { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-family: var(--mono); font-size: 13px; overflow: auto; margin: 0; }
.suggest { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.messages { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.msg { max-width: 85%; padding: 10px 14px; border-radius: 14px; font-size: 15px; line-height: 1.5; white-space: pre-wrap; }
.msg.user { align-self: flex-end; background: var(--brand); color: var(--brand-ink); border-bottom-right-radius: 4px; }
.msg.assistant { align-self: flex-start; background: var(--surface-2); color: var(--ink); border-bottom-left-radius: 4px; }
.msg.assistant.pending::after { content: "▍"; animation: blink 1s steps(2) infinite; color: var(--ink-3); }
@keyframes blink { to { opacity: 0; } }
.msg.error { background: var(--bad-soft); color: var(--bad); }
.chat-input { display: flex; gap: 8px; }
.chat-input input { flex: 1; border: 1px solid var(--line-2); border-radius: 10px; background: var(--paper); color: var(--ink); font: inherit; font-size: 15px; padding: 10px 14px; outline: none; }
.chat-input input:focus { border-color: var(--brand); }
.btn-primary.small { height: 42px; padding: 0 18px; font-size: 15px; }

/* details */
.details-card { padding: 0; }
.details-card summary { cursor: pointer; padding: 18px 26px; font-weight: 600; list-style: none; }
.details-card summary::before { content: "▸ "; color: var(--ink-3); font-size: 12px; } .details-card[open] summary::before { content: "▾ "; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px 28px; padding: 0 26px 18px; }
.stat { border-bottom: 1px solid var(--line); padding: 7px 0; display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.stat .l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .v { white-space: nowrap; }
.stat .l { color: var(--ink-2); } .stat .v { font-size: 14px; }
.table-head { display: flex; justify-content: space-between; padding: 8px 26px; color: var(--ink-2); font-size: 14px; border-top: 1px solid var(--line); }
.table-wrap { overflow: auto; max-height: 60vh; }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th, td { padding: 8px 12px; border-top: 1px solid var(--line); white-space: nowrap; text-align: left; }
th { position: sticky; top: 0; background: var(--surface-2); color: var(--ink-3); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; }
th:first-child, td:first-child { padding-left: 26px; }
th.num, td.num { text-align: right; }
td.pos { color: var(--good); } td.neg { color: var(--bad); }
.side { font-size: 11.5px; font-weight: 600; padding: 2px 7px; border-radius: 999px; }
.side.long { background: var(--good-soft); color: var(--good); } .side.short { background: var(--bad-soft); color: var(--bad); }

/* how it works */
.how { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 56px 0 0; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px 24px; box-shadow: var(--shadow); transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s, border-color .25s; }
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--line-2); }
.step .n { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--brand-grad); color: #fff; font-family: var(--display); font-weight: 800; font-size: 15px; margin-bottom: 16px; box-shadow: var(--glow); }
.step h3 { font-size: 20px; margin-bottom: 8px; letter-spacing: -.015em; }
.step p { color: var(--ink-2); margin: 0; font-size: 15px; line-height: 1.55; }
.foot-domain { font-family: var(--mono); color: var(--ink-2); font-size: 12.5px; }
.foot { color: var(--ink-3); font-size: 13px; text-align: center; margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--line); max-width: 680px; margin-left: auto; margin-right: auto; line-height: 1.6; }

@media (max-width: 720px) {
  .nav { padding: 10px 16px; flex-wrap: wrap; row-gap: 8px; }
  .logo-mark { width: 50px; height: 28px; } .logo-word { font-size: 19px; }
  #provider-badge { display: none; }
  .nav-cta { height: 32px; padding: 0 12px; font-size: 13px; }
  .mobile-nav { display: flex; gap: 6px; overflow-x: auto; padding: 10px 16px 0; scrollbar-width: none; }
  .mobile-nav::-webkit-scrollbar { display: none; }
  .mobile-nav a { flex: none; font-size: 13px; font-weight: 500; color: var(--ink-2); text-decoration: none; padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
  .mobile-nav a.active { color: var(--brand); border-color: var(--brand); }
  .hero { padding: 36px 0 22px; }
  .hero h1 { font-size: 38px; }
  .hero-kicker { margin-bottom: 14px; }
  .lede { font-size: 15.5px; margin-top: 12px; }
  .aurora { height: 520px; }
  .step { padding: 20px 18px; }
  .hero.compact { padding: 18px 0 8px; } .hero.compact h1 { font-size: 24px; }
  .search-bar { grid-template-columns: 1fr 1fr; padding: 8px; }
  .field input { font-size: 20px; }
  .examples { font-size: 13px; }
  .chip { font-size: 12px; padding: 3px 9px; }
  .eyebrow { font-size: 11.5px; white-space: normal; line-height: 1.5; }
  .verdict-head { flex-direction: column-reverse; gap: 12px; }
  .verdict-head h2 { font-size: 28px; }
  .verdict-actions { width: 100%; justify-content: space-between; flex-direction: row-reverse; }
  .score { width: 52px; height: 52px; font-size: 20px; }
  .score small { font-size: 9px; }
  .checks { grid-template-columns: 1fr; }
  .gauge-labels { font-size: 11px; gap: 8px; }
  #chat-model { display: none; }
  .honesty-row { gap: 10px; }
  .checks li { padding: 10px 12px; }
  .bignums { grid-template-columns: 1fr 1fr; gap: 10px; }
  .bignum .v { font-size: 22px; }
  .honesty-row { grid-template-columns: 1fr 1fr; }
  .chart { height: 220px; }
  .seg-tabs button { padding: 6px 9px; font-size: 12.5px; }
  .card-title.mt { margin-top: 16px; }
  .msg { max-width: 92%; }
  .plans { grid-template-columns: 1fr; }
  .plan-price { font-size: 28px; }
  .hero.compact-h { padding: 24px 0 12px; } .hero.compact-h h1 { font-size: 28px; }
  .prose article h1 { font-size: 28px; margin-top: 24px; }
  .guide-grid { grid-template-columns: 1fr; }
  .screen-controls { gap: 10px; }
  .vs { display: none; }
  .field.tf, .btn-primary { grid-column: span 1; }
  .btn-primary { height: 44px; }
  .card { padding: 20px 16px; }
  .stats-grid, .details-card summary, .table-head { padding-left: 16px; padding-right: 16px; }
}

/* ─── static pages ─────────────────────────────────────────────── */
.nav-cta { text-decoration: none; display: inline-flex; align-items: center; height: 36px; padding: 0 14px; font-size: 14px; }
.hero.compact-h { padding: 52px 0 24px; text-align: left; }
.hero.compact-h h1 { font-size: clamp(34px, 4.6vw, 50px); }
.hero.compact-h .lede { margin-left: 0; }
.prose article { max-width: 720px; }
.prose h2 { font-size: 24px; margin: 28px 0 8px; }
.prose p, .prose li { color: var(--ink-2); font-size: 16px; }
.prose p.lede { color: var(--ink-2); }
.prose a { color: var(--brand); }
.prose code { font-family: var(--mono); background: var(--surface-2); padding: 1px 5px; border-radius: 4px; font-size: 14px; }
.prose article h1 { font-size: clamp(32px, 4.4vw, 46px); margin: 40px 0 12px; }
.btn-primary.small { height: 40px; padding: 0 16px; font-size: 14px; text-decoration: none; display: inline-flex; align-items: center; }
.btn-ghost { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 9px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; background: transparent; }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 8px 0 16px; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s; }
.plan:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.plan.featured { border-color: var(--brand); position: relative; }
.plan-tag { position: absolute; top: -12px; left: 20px; background: var(--brand-grad); color: var(--brand-ink); font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.plan-name { font-family: var(--display); font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.plan-price { font-family: var(--mono); font-size: 32px; margin-top: 6px; }
.plan-price s { color: var(--ink-3); font-size: 20px; margin-right: 6px; }
.plan-sub { color: var(--ink-3); font-size: 13px; }
.plan ul { padding-left: 18px; margin: 14px 0 18px; color: var(--ink-2); font-size: 14.5px; flex: 1; }
.plan li { margin-bottom: 5px; }
.plan-note { color: var(--ink-3); font-size: 13px; margin: 8px 0 0; }
.plan-note.center { text-align: center; margin-bottom: 36px; }
.plan-note.ok { color: var(--good); }
.wl { display: flex; gap: 8px; }
.wl input { flex: 1; border: 1px solid var(--line-2); border-radius: 9px; background: var(--paper); color: var(--ink); font: inherit; font-size: 14px; padding: 0 12px; min-width: 0; }
.faq { max-width: 720px; margin: 24px 0; }
.faq h2 { font-size: 22px; margin-bottom: 10px; }
.faq details { border-top: 1px solid var(--line); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { color: var(--ink-2); margin: 8px 0 0; }
.guide-card { display: block; text-decoration: none; color: inherit; transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s, border-color .25s; }
.guide-card:hover { border-color: var(--brand); transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.screen-meta { color: var(--ink-2); font-size: 14px; margin: 0 0 12px; }
.screen-controls { display: flex; gap: 20px; align-items: center; margin-bottom: 12px; font-size: 14px; color: var(--ink-2); flex-wrap: wrap; }
.screen-controls select { border: 1px solid var(--line-2); border-radius: 7px; background: var(--paper); color: var(--ink); font: inherit; font-size: 14px; padding: 5px 8px; margin-left: 6px; }
#screen td a { color: var(--ink); text-decoration: none; }
#screen td a:hover { color: var(--brand); }
.side:not(.long):not(.short) { background: var(--surface-2); color: var(--ink-3); }

/* ─── accounts ─────────────────────────────────────────────────── */
.btn-ghost.small { height: 34px; padding: 0 12px; font-size: 13.5px; }
.user-menu { position: relative; }
.user-btn { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px 3px 3px; cursor: pointer; }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.plan-pill { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.plan-pill.lab, .plan-pill.pro { color: var(--brand); }
.menu { position: absolute; right: 0; top: 40px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); min-width: 240px; padding: 8px 0; z-index: 20; }
.menu a { display: block; padding: 8px 14px; color: var(--ink); text-decoration: none; font-size: 14px; }
.menu a:hover { background: var(--surface-2); }
.menu-email { padding: 6px 14px; font-size: 12.5px; color: var(--ink-3); font-family: var(--mono); border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu-usage { padding: 4px 14px 8px; font-size: 12.5px; color: var(--ink-2); }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal-card { background: var(--surface); border-radius: 16px; padding: 26px; width: 100%; max-width: 420px; position: relative; box-shadow: var(--shadow); }
.modal-card h3 { font-family: var(--display); font-size: 24px; margin: 0 0 6px; }
.modal-msg { color: var(--ink-2); margin: 0 0 14px; font-size: 15px; }
.modal-x { position: absolute; top: 10px; right: 12px; background: none; border: 0; font-size: 22px; color: var(--ink-3); cursor: pointer; }
#signin-form { display: flex; gap: 8px; }
#signin-form input { flex: 1; border: 1px solid var(--line-2); border-radius: 9px; background: var(--paper); color: var(--ink); font: inherit; font-size: 15px; padding: 0 12px; min-width: 0; }
.saved { margin: 0 0 20px; }
.saved-list { display: flex; flex-wrap: wrap; gap: 8px; }
.saved-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 5px 6px 5px 12px; font-family: var(--mono); font-size: 13px; }
.saved-chip button { background: none; border: 0; color: var(--ink-3); cursor: pointer; font-size: 15px; line-height: 1; padding: 2px 6px; border-radius: 50%; }
.saved-chip button:hover { color: var(--bad); background: var(--bad-soft); }
.saved-chip a { color: var(--ink); text-decoration: none; }
.upgrade-note { background: var(--warn-soft); color: var(--warn); border-radius: 10px; padding: 12px 14px; font-size: 14.5px; margin-bottom: 16px; }
.upgrade-note a { color: inherit; font-weight: 600; }

/* ─── briefs ───────────────────────────────────────────────────── */
.briefs { margin-bottom: 24px; }
.briefs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.brief { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; text-decoration: none; color: inherit; box-shadow: var(--shadow); }
.brief { transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s, border-color .25s; }
.brief:hover { border-color: var(--brand); transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.brief-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.brief-head b { font-family: var(--mono); font-weight: 500; font-size: 15px; }
.brief-head span { font-size: 12px; color: var(--ink-3); }
.brief p { margin: 0 0 10px; color: var(--ink-2); font-size: 14.5px; line-height: 1.5; }
.brief-foot { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }

/* guide alignment */
.preset-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.hint-inline { font-size: 12px; color: var(--ink-3); font-family: var(--mono); }
.checks-line { font-family: var(--mono); font-size: 12px; color: var(--ink-3); margin: 10px 0 0; }
.ebook-card { display: grid; grid-template-columns: 120px 1fr; gap: 20px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px 24px; margin: 0 0 28px; box-shadow: var(--shadow); }
.ebook-cover { aspect-ratio: 3/4; border-radius: 8px; background: linear-gradient(160deg, #1b2340, #0f8a99); color: #fff; display: flex; flex-direction: column; justify-content: space-between; padding: 12px; font-family: var(--condensed); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 13px; line-height: 1.1; }
.ebook-cover small { font-family: var(--sans); font-weight: 500; text-transform: none; letter-spacing: 0; font-size: 11px; opacity: .85; }
.ebook-card h3 { font-size: 24px; margin-bottom: 4px; }
.ebook-card p { margin: 0 0 8px; color: var(--ink-2); }
@media (max-width: 720px) { .ebook-card { grid-template-columns: 1fr; } .ebook-cover { max-width: 140px; } }

/* ─── explore: categories first, then ranked candidates ─────────── */
.explore { margin: 6px 0 40px; animation: fadeUp .7s cubic-bezier(.2,.7,.2,1) .22s both; }
.explore-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0 0 12px; flex-wrap: wrap; }
.explore-head.mt { margin-top: 26px; }
.own-head { margin-top: 8px; }
.step-label { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: 20px; letter-spacing: -.015em; }
.step-label > span:first-child { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: var(--brand-grad); color: #fff; font-size: 14px; box-shadow: var(--glow); }
.screen-meta-inline { font-size: 13px; color: var(--ink-3); font-family: var(--mono); }
.cat-tabs { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.cat-tab { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 8px 14px; background: color-mix(in srgb, var(--surface) 92%, transparent); border: 1px solid var(--line); border-radius: 16px; color: var(--ink-2); font-weight: 600; font-size: 14px; box-shadow: var(--shadow); transition: border-color .2s, color .2s, transform .2s cubic-bezier(.2,.7,.2,1), box-shadow .2s, background .2s; }
.cat-tab svg { width: 24px; height: 24px; }
.cat-tab:hover { border-color: var(--line-2); color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.cat-tab[aria-selected="true"] { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent), var(--shadow); }
.cross-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 12px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; font-size: 14px; color: var(--ink-2); }
.cross-pick select { border: 1px solid var(--line-2); border-radius: 8px; background: var(--paper); color: var(--ink); font: inherit; font-weight: 600; padding: 6px 10px; margin-left: 6px; }
.vs-mini { font-family: var(--display); font-weight: 800; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.cross-examples { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; width: 100%; color: var(--ink-3); font-size: 13px; }
.cross-examples > span { margin-right: 2px; }
.cands { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.cand-row { display: grid; grid-template-columns: minmax(180px, 1.6fr) 100px 84px 112px 84px minmax(160px, 2fr) 118px; gap: 12px; align-items: center; padding: 14px 18px; border-top: 1px solid var(--line); animation: fadeUp .45s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i, 0) * 35ms); transition: background .15s; }
.cand-row:first-child { border-top: 0; }
.cand-row:not(.cand-headrow):hover { background: var(--surface-2); }
.cand-headrow { animation: none; background: var(--surface-2); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); padding-top: 10px; padding-bottom: 10px; }
.cand-headrow .r, .c-num { text-align: right; }
.c-pair { display: flex; gap: 12px; align-items: center; min-width: 0; }
.c-pair b { font-family: var(--mono); font-weight: 500; font-size: 15.5px; }
.c-slash { color: var(--ink-3); margin: 0 4px; }
.c-pair small { display: block; color: var(--ink-3); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-pair > div { min-width: 0; }
.c-rank { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-2); color: var(--ink-3); display: grid; place-items: center; font-size: 12px; font-weight: 700; font-family: var(--mono); }
.c-cats { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.mk { font-size: 11.5px; font-weight: 600; color: var(--ink-2); background: var(--surface-2); border-radius: 6px; padding: 2px 7px; white-space: nowrap; }
.c-score small { display: block; color: var(--ink-3); font-size: 11.5px; margin-top: 3px; white-space: nowrap; }
.score-pill { display: inline-flex; align-items: baseline; gap: 1px; font-family: var(--mono); font-size: 13px; color: var(--ink-3); padding: 3px 9px; border-radius: 999px; background: var(--surface-2); }
.score-pill b { font-size: 17px; font-weight: 500; color: var(--ink); }
.score-pill.exceptional, .score-pill.strong { background: var(--good-soft); } .score-pill.exceptional b, .score-pill.strong b { color: var(--good); }
.score-pill.promising { background: var(--brand-soft); } .score-pill.promising b { color: var(--brand); }
.score-pill.mixed { background: var(--warn-soft); } .score-pill.mixed b { color: var(--warn); }
.score-pill.weak { background: var(--bad-soft); } .score-pill.weak b { color: var(--bad); }
.c-num { font-family: var(--mono); font-size: 14.5px; }
.c-num.hot { color: var(--accent); font-weight: 500; }
.tone { font-size: 12.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.tone.good { background: var(--good-soft); color: var(--good); } .tone.warn { background: var(--warn-soft); color: var(--warn); } .tone.bad { background: var(--bad-soft); color: var(--bad); }
.c-verdict { font-size: 13.5px; color: var(--ink-2); line-height: 1.4; }
.flags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.flag { font-size: 11px; font-weight: 600; color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); border-radius: 6px; padding: 1px 6px; }
.c-act { text-align: right; }
.c-act .btn-ghost { white-space: nowrap; }
.cand-loading, .cand-empty { padding: 26px 20px; color: var(--ink-2); display: flex; gap: 10px; align-items: center; justify-content: center; text-align: center; font-size: 14.5px; }
.cand-locked { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; justify-content: space-between; padding: 18px; border-top: 1px dashed var(--line-2); background: linear-gradient(180deg, transparent, var(--brand-soft)); color: var(--ink-2); font-size: 14.5px; }
.cand-locked > div:first-child { color: var(--ink); }

/* score badge, assessments, key stats */
.score-badge { flex: none; display: grid; grid-template-columns: auto auto; align-items: baseline; justify-content: center; column-gap: 2px; min-width: 112px; padding: 12px 16px 10px; border-radius: 18px; border: 2px solid; animation: pop .6s cubic-bezier(.2,.9,.3,1.3) both; }
.score-badge b { font-family: var(--display); font-size: 40px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.score-badge span { font-family: var(--mono); font-size: 15px; }
.score-badge small { grid-column: 1 / -1; text-align: center; font-size: 12px; font-weight: 600; margin-top: 4px; }
.score-badge.exceptional, .score-badge.strong { color: var(--good); background: var(--good-soft); }
.score-badge.promising { color: var(--brand); background: var(--brand-soft); }
.score-badge.mixed { color: var(--warn); background: var(--warn-soft); }
.score-badge.weak { color: var(--bad); background: var(--bad-soft); }
.assess { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.assess li { background: var(--surface-2); border-radius: 14px; padding: 14px 16px; border-left: 4px solid var(--line-2); animation: fadeUp .55s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i, 0) * 80ms + 120ms); }
.assess li.good { border-left-color: var(--good); } .assess li.warn { border-left-color: var(--warn); } .assess li.bad { border-left-color: var(--bad); }
.as-t { font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.as-l { font-family: var(--display); font-weight: 800; font-size: 18px; letter-spacing: -.01em; margin-top: 4px; line-height: 1.2; }
.assess li.good .as-l { color: var(--good); } .assess li.warn .as-l { color: var(--warn); } .assess li.bad .as-l { color: var(--bad); }
.as-d { color: var(--ink-2); font-size: 13.5px; margin-top: 4px; line-height: 1.45; }
.keystats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.keystats div { border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; }
.keystats span { display: block; font-size: 11.5px; color: var(--ink-3); }
.keystats b { font-family: var(--mono); font-weight: 500; font-size: 15px; }
.caps-line { font-size: 13px; color: var(--warn); margin: 12px 0 0; }
.muted { color: var(--ink-3); font-size: 14px; }

/* data status */
.data-status { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; margin-bottom: 12px; box-shadow: var(--shadow); }
.ds-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; font-size: 13px; }
.ds-badge { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .06em; padding: 4px 10px; border-radius: 999px; }
.ds-badge.real { background: var(--good-soft); color: var(--good); }
.ds-badge.demo { background: var(--warn-soft); color: var(--warn); }
.ds-item { color: var(--ink); font-family: var(--mono); font-size: 12.5px; }
.ds-item span { font-family: var(--sans); color: var(--ink-3); margin-right: 6px; }
.ds-toggle { margin-left: auto; font-size: 13px; }
.ds-legs { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.ds-leg { font-size: 13px; color: var(--ink-2); }
.ds-leg > b { font-family: var(--mono); font-weight: 500; color: var(--ink); }
.ds-kv { margin-top: 3px; } .ds-kv span { color: var(--ink-3); display: inline-block; min-width: 64px; }
.ds-note { font-size: 12.5px; color: var(--ink-3); margin: 6px 0 0; line-height: 1.45; grid-column: 1 / -1; }
.ds-leg .ds-note { grid-column: auto; }

/* backtest heading, history, gate */
.bt-title { font-size: 22px; letter-spacing: -.015em; }
.coverage-line { font-size: 13px; color: var(--ink-3); margin: 6px 0 12px; font-family: var(--mono); }
.coverage-line b { color: var(--warn); font-weight: 500; }
.history-warn { background: var(--warn-soft); color: var(--warn); border-radius: 10px; padding: 10px 14px; font-size: 14px; margin-bottom: 14px; }
.chart-label { font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); margin: 6px 0 2px; }
.chart-sm { height: 150px; }
.preview-chart { height: 220px; }
.bignum.warnv .v { color: var(--warn); }
.gate { position: relative; text-align: center; margin-top: -40px; padding: 56px 24px 26px; background: linear-gradient(180deg, transparent 0, var(--surface) 46px); border-radius: 0 0 var(--radius) var(--radius); }
.gate-lock { width: 46px; height: 46px; border-radius: 14px; margin: 0 auto 12px; display: grid; place-items: center; background: var(--brand-grad); color: #fff; box-shadow: var(--glow); }
.gate-lock svg { width: 22px; height: 22px; }
.gate h3 { font-size: clamp(22px, 3vw, 28px); }
.gate > p { color: var(--ink-2); max-width: 520px; margin: 8px auto 14px; }
.gate-list { list-style: none; padding: 0; margin: 0 auto 18px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; max-width: 560px; text-align: left; font-size: 14px; color: var(--ink-2); }
.gate-list li::before { content: "✓"; color: var(--brand); font-weight: 700; margin-right: 8px; }
.gate .fineprint { margin-top: 12px; }
.lock-tag { font-size: 11px; font-weight: 600; color: var(--brand); background: var(--brand-soft); border-radius: 999px; padding: 2px 8px; }

@media (max-width: 1000px) {
  .cat-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cand-headrow { display: none; }
  .cand-row { grid-template-columns: 1fr auto; gap: 8px 12px; grid-template-areas: "pair score" "corr corr" "coint coint" "z z" "verdict verdict" "act act"; }
  .c-pair { grid-area: pair; } .c-score { grid-area: score; text-align: right; }
  .cand-row > .c-num, .cand-row > .c-coint { display: inline-flex; gap: 6px; align-items: center; text-align: left; }
  .cand-row > .c-num::before, .cand-row > .c-coint::before { content: attr(data-l); font-family: var(--sans); font-size: 12px; color: var(--ink-3); }
  .cand-row > .c-num:nth-of-type(3) { grid-area: corr; }
  .c-coint { grid-area: coint; }
  .cand-row > .c-num:nth-of-type(5) { grid-area: z; }
  .c-verdict { grid-area: verdict; } .c-act { grid-area: act; text-align: left; }
  .keystats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .cat-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .cat-tab { padding: 10px 4px; font-size: 12.5px; gap: 5px; border-radius: 12px; }
  .cat-tab svg { width: 20px; height: 20px; }
  .step-label { font-size: 17px; }
  .cand-row { padding: 14px; }
  .assess { grid-template-columns: 1fr; }
  .keystats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .score-badge { min-width: 92px; padding: 8px 12px; } .score-badge b { font-size: 30px; }
  .gate-list { grid-template-columns: 1fr; }
  .gate { padding: 48px 6px 18px; }
  .ds-toggle { margin-left: 0; }
  .bt-title { font-size: 19px; }
}

/* ─── motion safety ────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
  .reveal { opacity: 1; transform: none; }
}
::selection { background: var(--brand-soft); color: var(--ink); }
