:root {
  color-scheme: light dark;
  --bg: #efe8fb; --surface: #ffffff; --ink: #241b3d; --muted: #5c5480; --accent: #6d5bb8; --accent-hover: #5d4a9c; --border: #e4e0f0; --code-bg: #f3eefb; --champagne-text: #7d6318;
  --champagne: #d9c08a; --champagne-ink: #2a2208;
}
/* data-theme (stamped pre-paint from the APP's saved choice) wins over the OS
   preference in BOTH directions, exactly like the app's token system. */
:root[data-theme="dark"] {
  --bg: #100d18; --surface: #17131f; --ink: #f0edf8; --muted: #9d96b8; --accent: #b6a8e8; --accent-hover: #c4b5fd; --border: #35304a; --code-bg: #201a2e; --champagne-text: #d9c08a;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #100d18; --surface: #17131f; --ink: #f0edf8; --muted: #9d96b8; --accent: #b6a8e8; --accent-hover: #c4b5fd; --border: #35304a; --code-bg: #201a2e; --champagne-text: #d9c08a;
  }
}
@font-face { font-family: 'DM Sans'; src: url('/fonts/DMSans-Variable.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('/fonts/GeistMono-Variable.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: 'DM Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; font-size: 16px; line-height: 1.7; }
header.site { border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; top: 0; z-index: 10; }
header.site .in { max-width: 680px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
header.site a.brand { color: var(--ink); font-weight: 900; text-decoration: none; font-size: 18px; letter-spacing: -0.02em; white-space: nowrap; }
header.site a.brand span { color: var(--accent); }
header.site nav { display: flex; align-items: center; gap: 8px; }
header.site nav a { color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; white-space: nowrap; }
header.site nav a:hover, header.site nav a[aria-current] { color: var(--ink); }
header.site nav a.sec { display: none; }
header.site nav a.app { background: var(--champagne); color: var(--champagne-ink); padding: 8px 14px; border-radius: 999px; font-weight: 800; text-transform: none; letter-spacing: 0; font-size: 14px; }
header.site nav a.app .long { display: none; }
header.site details.menu > summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 40px; height: 40px; margin-right: -8px; border-radius: 10px; color: var(--ink); }
header.site details.menu > summary::-webkit-details-marker { display: none; }
header.site details.menu > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
header.site details.menu:not([open]) .panel { display: none; }
header.site details.menu .panel { position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 6px 0; }
header.site details.menu .panel a { display: block; padding: 14px 20px; color: var(--ink); text-transform: none; letter-spacing: 0; font-size: 16px; }
@media (min-width: 640px) {
  header.site .in { padding: 14px 20px; }
  header.site nav { gap: 16px; }
  header.site nav a.sec { display: inline; }
  header.site nav a.app { padding: 8px 16px; text-transform: uppercase; letter-spacing: 0.08em; font-size: 13px; }
  header.site nav a.app .short { display: none; }
  header.site nav a.app .long { display: inline; }
  header.site details.menu { display: none; }
}
main { max-width: 680px; margin: 0 auto; padding: 8px 20px 48px; }
h1 { font-size: 30px; line-height: 1.2; letter-spacing: -0.02em; font-weight: 800; margin: 30px 0 8px; }
h2 { font-size: 20px; line-height: 1.3; letter-spacing: -0.01em; font-weight: 800; color: var(--accent); margin: 36px 0 8px; }
h3 { font-size: 17px; font-weight: 700; margin: 28px 0 6px; }
p { margin: 14px 0; }
article > p:first-of-type strong { color: var(--muted); font-weight: 500; font-size: 18px; line-height: 1.6; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
strong { color: var(--ink); font-weight: 700; }
code { font-family: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85em; background: var(--code-bg); border-radius: 4px; padding: 1px 5px; color: var(--accent); }
blockquote { margin: 22px 0; padding: 4px 20px; border-left: 3px solid var(--accent); background: var(--surface); color: var(--muted); }
ul, ol { padding-left: 26px; margin: 14px 0; }
li { margin: 8px 0; }
img { max-width: 100%; height: auto; }
.related { margin-top: 44px; border-top: 1px solid var(--border); padding-top: 8px; }
.capture { margin:1.5rem 0; } .capture label { display:block; font-weight:600; margin-bottom:.5rem; } .capture-row { display:flex; gap:.5rem; flex-wrap:wrap; } .capture input { flex:1 1 14rem; padding:.7rem .9rem; border:1px solid currentColor; border-radius:999px; font:inherit; background:transparent; color:inherit; } .capture button { padding:.7rem 1.1rem; border:0; border-radius:999px; font:inherit; font-weight:700; cursor:pointer; } .capture-fine, .capture-done { font-size:.85rem; opacity:.75; margin:.5rem 0 0; }
.cta { margin-top: 36px; text-align: center; }
.cta a { display: inline-block; background: var(--champagne); color: var(--champagne-ink); text-decoration: none; font-weight: 800; padding: 14px 28px; border-radius: 999px; }
.cta a:hover { filter: brightness(1.05); }
.post-footer { margin-top: 44px; border-top: 1px solid var(--border); padding-top: 8px; }
.post-footer .cta-fine { text-align: center; color: var(--muted); font-size: 14px; margin-top: 8px; }
footer.site { border-top: 1px solid var(--border); background: var(--surface); margin-top: 24px; }
footer.site .in { max-width: 680px; margin: 0 auto; padding: 20px; color: var(--muted); font-size: 13px; }
footer.site a { color: var(--muted); }
.index-list { list-style: none; padding: 0; }
.index-list li { margin: 20px 0; }
.index-list .t { font-size: 19px; font-weight: 700; }
.index-list .d { color: var(--muted); font-size: 14px; margin: 4px 0 0; }
/* Article hero: the piece's own picture, sized by its width and height
   attributes so nothing shifts. The div form is the no-picture fallback. */
picture.art-hero { display: block; margin: 10px 0 26px; }
picture.art-hero img { display: block; width: 100%; height: auto; border-radius: 20px; background: var(--code-bg); }
div.art-hero { height: 116px; border-radius: 20px; margin: 10px 0 26px; position: relative; overflow: hidden; background: radial-gradient(80% 120% at 85% -20%, rgba(201,165,78,.32), transparent 60%), radial-gradient(70% 120% at 8% 130%, rgba(124,107,208,.55), transparent 62%), linear-gradient(150deg, #2a2158, #6a5ac0); }
div.art-hero::after { content:""; position:absolute; top:24px; right:32px; width:46px; height:46px; border-radius:50%; background: radial-gradient(58% 52% at 34% 30%, rgba(255,255,255,.92), transparent 60%), radial-gradient(82% 82% at 72% 78%, #c9a54e, transparent 72%), linear-gradient(150deg,#6a5ac0,#3a2d73); box-shadow: 0 10px 24px -8px rgba(58,45,115,.75); }
.lead-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--champagne-text); margin: 24px 0 0; }
.lead-h1 { font-size: 34px; line-height: 1.08; letter-spacing: -0.03em; font-weight: 800; margin: 10px 0 14px; max-width: 16ch; }
.lead-dek { font-size: 18px; color: var(--muted); max-width: 52ch; line-height: 1.5; margin: 0; }
/* Accent on its own 12% tint measured 3.95:1 in light. The hover step is the deeper ink in light and the brighter one in dark: 5.2:1 and 8.6:1 (#287). */
.moat { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; font-size: 13px; color: var(--accent-hover); background: color-mix(in srgb, var(--accent) 12%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); border-radius: 999px; padding: 7px 14px; font-weight: 600; }
.hubsec { font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--champagne-text); margin: 40px 0 16px; display: flex; align-items: center; gap: 9px; }
.hubsec .rule { flex: 1; height: 1px; background: var(--border); }
.feature { display: block; border-radius: 22px; padding: 26px; border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border)); background: var(--surface); text-decoration: none; color: inherit; }
.feature:hover { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.feature .tag { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--champagne-text); font-weight: 600; }
.feature .ft { font-weight: 800; font-size: 24px; line-height: 1.14; letter-spacing: -0.02em; margin: 12px 0 10px; color: var(--ink); }
.feature .fx { color: var(--muted); font-size: 15px; line-height: 1.55; }
.feature .fmeta { margin-top: 16px; font-size: 13px; color: var(--muted); }
.hubgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.acard { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 20px; text-decoration: none; color: inherit; transition: border-color 0.2s, transform 0.15s; }
.acard:hover { border-color: color-mix(in srgb, var(--accent) 40%, transparent); transform: translateY(-2px); }
.acard .num { font-size: 20px; }
.acard .at { font-weight: 700; font-size: 18px; line-height: 1.15; margin: 10px 0 8px; color: var(--ink); }
.acard .ax { font-size: 14px; color: var(--muted); line-height: 1.5; }
.acard .atag { margin-top: 14px; display: inline-block; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); border: 1px solid var(--border); border-radius: 999px; padding: 4px 10px; }
.feature, .acard { overflow: hidden; }
.card-art { display: block; margin: -20px -20px 14px; }
.feature .card-art { margin: -26px -26px 18px; }
.card-art img { display: block; width: 100%; height: auto; }
.hubnote { font-size: 14px; color: var(--muted); line-height: 1.6; margin-top: 40px; border-top: 1px solid var(--border); padding-top: 14px; }
@media (max-width: 520px) { .hubgrid { grid-template-columns: 1fr; } .lead-h1 { font-size: 28px; } }

.crumbs { font-size: 13px; color: var(--muted); margin: 18px 0 0; }
.crumbs a { color: var(--muted); }
.facts { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 15px; }
.facts th, .facts td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--border); vertical-align: top; }
.facts th { color: var(--muted); font-weight: 600; width: 38%; }
.eyebrow { font-family: 'Geist Mono', ui-monospace, monospace; font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); margin: 26px 0 0; }
.line { font-size: 19px; line-height: 1.5; border-left: 3px solid var(--champagne); padding-left: 14px; }
.source { color: var(--muted); font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.chips li { margin: 0; }
.chips a { display: inline-block; border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; text-decoration: none; font-size: 14px; background: var(--surface); }
dl.glossary dt { font-weight: 800; margin-top: 22px; }
dl.glossary dd { margin: 4px 0 0; }
.cta-fine { text-align: center; color: var(--muted); font-size: 14px; margin-top: 8px; }
.share { background: none; border: 1px solid currentColor; border-radius: 999px; padding: 6px 14px; font: inherit; color: inherit; cursor: pointer; margin-left: 6px; }


.tool-form { margin: 22px 0 8px; padding: 20px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); }
.tool-form label { display: block; font-weight: 700; margin-bottom: 8px; }
.tool-row { display: flex; gap: 10px; flex-wrap: wrap; }
.tool-row input { flex: 1 1 12rem; min-height: 48px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 12px; font: inherit; color: inherit; background: var(--bg); }
.tool-form button, .qz-next, .vs-form button { min-height: 48px; padding: 10px 20px; border: 0; border-radius: 999px; background: var(--champagne); color: var(--champagne-ink); font: inherit; font-weight: 800; cursor: pointer; }
.tool-form button:focus-visible, .tool-row input:focus-visible, .qz-opt:focus-within, .vs-form input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tool-fine { color: var(--muted); font-size: 14px; margin: 10px 0 0; }
.tool-out { margin: 18px 0 0; padding: 24px 20px; border-radius: 22px; border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border)); background: var(--surface); }
.tool-out h2 { margin-top: 6px; }
.tool-out, .vs-out, .vs { scroll-margin-top: 84px; }
.vs-out { margin-top: 20px; }
.lp-kicker { margin: 0; color: var(--muted); font-size: 15px; }
.lp-num { margin: 0; font-size: clamp(88px, 26vw, 144px); line-height: 0.95; font-weight: 800; letter-spacing: -0.05em; color: var(--accent); font-variant-numeric: tabular-nums; }
.lp-working { font-family: 'Geist Mono', ui-monospace, monospace; font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.tool-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 18px 0 0; }
.tool-actions .go { display: inline-block; background: var(--champagne); color: var(--champagne-ink); text-decoration: none; font-weight: 800; padding: 13px 24px; border-radius: 999px; }
.tool-out .capture { border-top: 1px solid var(--border); padding-top: 16px; margin-top: 22px; }
.capture .consent { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; font-size: 14px; color: var(--muted); margin-top: 10px; }
.capture .consent input { flex: none; margin-top: 5px; }
.capture button { background: var(--champagne); color: var(--champagne-ink); }
.capture input[type="email"] { min-height: 48px; }
.qz { border: 0; padding: 0; margin: 26px 0 0; }
.qz legend { font-size: 21px; line-height: 1.3; font-weight: 800; letter-spacing: -0.01em; padding: 0; margin-bottom: 12px; }
.qz-opt { display: flex; gap: 12px; align-items: center; min-height: 54px; padding: 12px 16px; margin: 0 0 10px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); cursor: pointer; }
.qz-opt:hover, .qz-opt:has(input:checked) { border-color: var(--accent); }
.qz-opt input { flex: none; accent-color: var(--accent); width: 18px; height: 18px; }
.qz-progress { font-family: 'Geist Mono', ui-monospace, monospace; font-size: 13px; color: var(--muted); margin: 22px 0 0; }
.qz-bar { height: 4px; border-radius: 4px; background: var(--border); overflow: hidden; margin: 8px 0 0; }
.qz-bar i { display: block; height: 100%; background: var(--accent); transition: width .3s ease; }
.qz-card { display: block; width: min(100%, 360px); height: auto; margin: 14px auto 6px; border-radius: 18px; }
.vs { margin: 40px 0 8px; padding: 22px 20px; border-radius: 22px; border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border)); background: var(--surface); }
.vs h2 { margin-top: 0; }
.vs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0; }
.vs-grid label { display: grid; gap: 6px; font-size: 14px; font-weight: 700; }
.vs-grid label.wide { grid-column: 1 / -1; }
.vs-form input { min-height: 46px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 12px; font: inherit; font-weight: 400; color: inherit; background: var(--bg); width: 100%; }
.vs-score { display: flex; align-items: baseline; gap: 12px; margin: 4px 0 0; }
.vs-score b { font-size: 56px; line-height: 1; letter-spacing: -0.04em; color: var(--accent); font-variant-numeric: tabular-nums; }
.vs-score span { font-size: 20px; font-weight: 800; }
.vs-upsell { margin: 18px 0 0; padding: 14px 16px; border-radius: 14px; background: color-mix(in srgb, var(--champagne) 22%, transparent); }
.vs-upsell a { font-weight: 800; }
.tool-err { color: var(--ink); background: color-mix(in srgb, var(--accent) 12%, transparent); padding: 10px 14px; border-radius: 12px; }
@media (max-width: 480px) { .vs-grid { grid-template-columns: 1fr; } .tool-form { padding: 16px; } }
@media (prefers-reduced-motion: reduce) { .qz-bar i { transition: none; } }

@media (max-width: 480px) { h1 { font-size: 26px; } h2 { font-size: 18px; } }
