/* Site styles. System fonts only, no external requests. */
:root {
  --bg: #f7f7f4;
  --surface: #ffffff;
  --surface-2: #efeee9;
  --text: #17191c;
  --muted: #565b63;          /* 6.9:1 on --bg */
  --line: #dcdad3;
  --accent: #1d4ed8;         /* 6.7:1 on white */
  --accent-ink: #ffffff;
  --accent-soft: #e3e9fb;
  --warm: #b45309;           /* amber 700, AA on white */
  --code-bg: #15171a;
  --code-text: #e6e6e3;
  --code-key: #9ec1ff;
  --code-str: #f6c177;
  --code-com: #9aa0a6;
  --paper-shadow: 0 1px 2px rgba(20, 20, 20, .08), 0 8px 24px rgba(20, 20, 20, .10);
  --radius: 10px;
  --maxw: 1160px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111315; --surface: #181b1e; --surface-2: #1f2327; --text: #ecebe7; --muted: #a8adb4;
    --line: #2e3338; --accent: #8fb0ff; --accent-ink: #0d1424; --accent-soft: #1c2740; --warm: #f5b459;
    --code-bg: #0b0c0e; --paper-shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111315; --surface: #181b1e; --surface-2: #1f2327; --text: #ecebe7; --muted: #a8adb4;
  --line: #2e3338; --accent: #8fb0ff; --accent-ink: #0d1424; --accent-soft: #1c2740; --warm: #f5b459;
  --code-bg: #0b0c0e; --paper-shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.45);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
code, pre, kbd { font-family: var(--mono); font-size: .9em; }
:not(pre) > code { background: var(--surface-2); padding: .1em .35em; border-radius: 4px; overflow-wrap: anywhere; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.eyebrow { font: 600 .78rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--warm); margin-bottom: .8em; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 12px 20px; min-height: 60px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 8px; font: 700 1.1rem/1 var(--mono); color: var(--text); text-decoration: none; }
.brand-logo { height: 26px; width: auto; display: block; flex: none; }
.site-nav a.nav-cta { background: var(--accent); color: var(--accent-ink); padding: 6px 12px; border-radius: 8px; font-weight: 600; }
.site-nav a.nav-cta:hover { color: var(--accent-ink); filter: brightness(1.1); }
.site-nav { display: flex; gap: 4px 18px; align-items: center; margin-left: auto; flex-wrap: wrap; }
.site-nav a { color: var(--text); text-decoration: none; font-size: .95rem; padding: 6px 0; }
.site-nav a:hover { color: var(--accent); }
.site-nav a[aria-current="page"] { color: var(--accent); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }
.theme-toggle { background: none; border: 1px solid var(--line); color: var(--text); border-radius: 8px; width: 36px; height: 36px; display: inline-grid; place-items: center; cursor: pointer; }
.theme-toggle svg { width: 18px; height: 18px; }
@media (max-width: 640px) {
  .site-header .wrap { padding-top: 8px; padding-bottom: 8px; }
  .site-nav { order: 3; width: 100%; margin-left: 0; gap: 2px 16px; }
  .theme-toggle { margin-left: auto; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 8px; font-weight: 600; text-decoration: none; border: 1px solid transparent; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary { border-color: var(--line); color: var(--text); background: var(--surface); }
.btn-secondary:hover { border-color: var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 0; }

/* Sections */
section { padding: 72px 0; }
section + section { border-top: 1px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: 36px; }
.section-head p { color: var(--muted); font-size: 1.08rem; }

/* Hero */
.hero { padding: 64px 0 72px; overflow: hidden; }
.hero-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 980px) { .hero-grid { grid-template-columns: 1fr 1.1fr; } }
.hero .lede { font-size: 1.2rem; color: var(--muted); max-width: 36em; }
.cmd { display: flex; align-items: center; gap: 10px; margin-top: 28px; background: var(--code-bg); color: var(--code-text); border-radius: var(--radius); padding: 12px 16px; font: .88rem/1.5 var(--mono); overflow-x: auto; }
.cmd::before { content: "$"; color: var(--code-com); }
.cmd code { white-space: nowrap; background: none; padding: 0; }
.hero-fig { margin: 0; }
.hero-fig figcaption { margin-top: 14px; text-align: right; }
.paper-stack { position: relative; aspect-ratio: 1.22 / 1; }
.paper { background: #fff; border-radius: 4px; box-shadow: var(--paper-shadow); overflow: hidden; }
.paper-stack .paper { position: absolute; width: 88%; }
.paper-stack .p1 { right: 0; top: 0; transform: rotate(1.2deg); }
.paper-stack .p2 { left: 0; bottom: 0; transform: rotate(-1.6deg); }
.tag { display: inline-block; font: 600 .75rem/1 var(--mono); background: var(--surface); border: 1px solid var(--line); color: var(--muted); padding: 6px 8px; border-radius: 6px; }

/* Numbers */
.stats { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 32px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.stat .num { font: 700 2rem/1.1 var(--mono); letter-spacing: -0.03em; color: var(--text); }
.stat .lbl { color: var(--muted); font-size: .92rem; margin-top: 8px; }

/* Tables */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
caption { text-align: left; padding: 14px 16px; color: var(--muted); font-size: .9rem; caption-side: bottom; border-top: 1px solid var(--line); }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--surface-2); font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); white-space: nowrap; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-family: var(--mono); white-space: nowrap; }
tbody th { font-weight: 600; }
.cmp td:nth-child(2) { background: color-mix(in srgb, var(--accent-soft) 55%, transparent); }
.yes { color: var(--text); }
.no { color: var(--muted); }
sup a { text-decoration: none; font-family: var(--mono); font-size: .8em; }

/* Why-not cards */
.cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card h3 { margin-top: 0; }
.card ul { margin: 0; padding-left: 1.1em; }
.card li { margin-bottom: .5em; }
.card.is-us { border-color: var(--accent); box-shadow: inset 0 3px 0 var(--accent); }

/* Features */
.feature { display: grid; gap: 32px; align-items: center; padding: 40px 0; }
.feature + .feature { border-top: 1px dashed var(--line); }
@media (min-width: 900px) {
  .feature { grid-template-columns: 1fr 1.25fr; gap: 56px; }
  .feature.flip > :first-child { order: 2; }
}
.feature h3 { font-size: 1.5rem; }
.feature ul { padding-left: 1.1em; margin: 0 0 1em; }
.feature li { margin-bottom: .4em; }
.shot { margin: 0; }
.shot .paper, .shot .ui { width: 100%; }
.shot .ui { border-radius: 8px; border: 1px solid var(--line); box-shadow: var(--paper-shadow); overflow: hidden; background: #fff; }
.shot figcaption { color: var(--muted); font-size: .85rem; margin-top: 10px; }
.mini-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 8px; }
.mini { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.mini h3 { margin-top: 0; }
.mini p:last-child { margin-bottom: 0; }

/* Code */
pre { background: var(--code-bg); color: var(--code-text); border-radius: var(--radius); padding: 18px 20px; overflow-x: auto; line-height: 1.55; margin: 0 0 1em; font-size: .84rem; }
pre .k { color: var(--code-key); }
pre .s { color: var(--code-str); }
pre .c { color: var(--code-com); }
.code-label { font: 600 .78rem/1 var(--mono); color: var(--muted); margin: 0 0 8px; }
.fmt { display: grid; gap: 4px 16px; grid-template-columns: auto 1fr; font: .9rem/1.6 var(--mono); }
.fmt dt { color: var(--muted); }
.fmt dd { margin: 0; }

/* Steps */
.steps { counter-reset: step; display: grid; gap: 56px; }
.step { display: grid; gap: 28px; }
@media (min-width: 960px) { .step { grid-template-columns: 0.8fr 1.2fr; } }
.step h2::before { counter-increment: step; content: counter(step); display: inline-grid; place-items: center; width: 1.6em; height: 1.6em; margin-right: .5em; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font: 700 .7em/1 var(--mono); vertical-align: .2em; }
.crop { aspect-ratio: 900 / 300; overflow: hidden; }
.crop img { width: 100%; }
.pipeline { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); list-style: none; padding: 0; margin: 0; }
.pipeline li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; position: relative; }
.pipeline strong { display: block; font-family: var(--mono); font-size: .9rem; margin-bottom: 4px; }
.pipeline span { color: var(--muted); font-size: .9rem; }

/* Pricing */
.notice { border: 1px dashed var(--warm); color: var(--text); background: color-mix(in srgb, var(--warm) 10%, transparent); padding: 14px 18px; border-radius: var(--radius); margin-bottom: 28px; }
.tiers { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.tier { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; }
.tier-name { font-size: 1.15rem; }
.tier-price { font: 700 1.8rem/1.2 var(--mono); }
.tier-features { padding-left: 1.1em; flex: 1; }
.tiers { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.tier-name { margin-bottom: .2em; }
.tier-who { color: var(--muted); font-size: .9rem; min-height: 2.8em; margin-bottom: .6em; }
.tier-price { margin-bottom: .4em; }
.tier-period { font: 500 .95rem var(--font); color: var(--muted); }
.tier-blurb { font-size: .92rem; }
.tier-features { font-size: .92rem; }
.tier-features li { margin-bottom: .45em; }
.tier-features li.planned { color: var(--muted); }
.tier-later { border-style: dashed; background: transparent; }
.pill { display: inline-block; font: 600 .7rem/1 var(--mono); text-transform: uppercase; letter-spacing: .05em; padding: 3px 6px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); vertical-align: .1em; white-space: nowrap; }
.pill-lg { font-size: .85rem; padding: 6px 10px; color: var(--warm); border-color: var(--warm); }
.todo { color: var(--warm); }
.btn.todo { border-style: dashed; color: var(--warm); }

/* CTA + footer */
.cta { background: var(--surface); }
.cta-grid { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .cta-grid { grid-template-columns: 1fr 1.1fr; } }
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 40px; font-size: .92rem; color: var(--muted); }
.foot-grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.site-footer h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text); margin-bottom: 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }
.sources { font-size: .85rem; color: var(--muted); }
.sources li { margin-bottom: .4em; overflow-wrap: anywhere; }

@media (prefers-reduced-motion: no-preference) {
  .btn, .site-nav a { transition: color .15s, border-color .15s, filter .15s; }
}

/* Grid children must be allowed to shrink below their content (code blocks, tables). */
.hero-grid > *, .feature > *, .step > *, .cta-grid > *, .cards > *, .mini-grid > * { min-width: 0; }
.mini-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.cards, .tiers, .stats { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
table.cmp { min-width: 760px; }
.scroll-hint { display: none; }
@media (max-width: 800px) { .scroll-hint { display: block; } }
pre { tab-size: 2; }
td code { white-space: nowrap; }
