/* Dormo marketing site — single stylesheet, no build step. */

/* Self-hosted fonts (variable WOFF2, latin subset; SIL Open Font License 1.1, see assets/fonts/LICENSE.txt).
   No requests to Google Fonts: nothing about visitors leaves our origin. */
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url("fonts/instrument-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/jetbrains-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #f5f5f1;
  --bg-alt: #ecece6;
  --surface: #ffffff;
  --text: #15171a;
  --muted: #565b63;
  --line: #dcdcd4;
  --line-strong: #c3c3b9;
  --accent: #0a7246;          /* "running" green, AA on --bg and --surface */
  --accent-strong: #075a37;
  --accent-soft: #d8efe3;
  --accent-ink: #ffffff;
  --paused: #c9c9bf;
  --warn: #8a4b06;
  --warn-soft: #fbedd6;
  --code-bg: #111316;
  --code-text: #e6e8ea;
  --code-muted: #8b929b;
  --code-key: #7ee2b0;
  --code-str: #f3c37a;
  --code-fn: #9cc7ff;
  --focus: #1a5fd6;
  --radius: 10px;
  --radius-sm: 6px;
  --maxw: 1120px;
  --font-sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0e10;
    --bg-alt: #121417;
    --surface: #16181c;
    --text: #e9eaec;
    --muted: #a0a6ae;
    --line: #262a30;
    --line-strong: #363b43;
    --accent: #3fd897;
    --accent-strong: #6be6b0;
    --accent-soft: #10291e;
    --accent-ink: #06150e;
    --paused: #2c3036;
    --warn: #f2b45a;
    --warn-soft: #2b2010;
    --code-bg: #0a0b0d;
    --focus: #7fb0ff;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; }
img { height: auto; }
figure { margin: 0; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-strong); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }

h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; font-weight: 650; }
h1 { font-size: clamp(2.1rem, 5.4vw, 3.9rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.15rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
code, kbd, pre { font-family: var(--font-mono); font-size: .88em; }
:not(pre) > code { overflow-wrap: anywhere; background: var(--bg-alt); border: 1px solid var(--line); padding: .08em .35em; border-radius: 4px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 3rem 0; }
small, .small { font-size: .85rem; }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 1rem; top: -3rem; z-index: 100;
  background: var(--text); color: var(--bg); padding: .5rem .9rem; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 1rem; color: var(--bg); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .container { padding: 0 28px; } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 1rem; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: -0.02em; font-size: 1.08rem; }
.brand:hover { color: var(--text); }
.brand svg { width: 26px; height: 26px; flex: none; }
.nav-links { display: flex; align-items: center; gap: .15rem; margin: 0 0 0 1.25rem; padding: 0; list-style: none; }
.nav-links a { color: var(--muted); text-decoration: none; padding: .4rem .65rem; border-radius: var(--radius-sm); font-size: .94rem; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); background: var(--bg-alt); }
.nav-links .nav-mobile-only { display: none; }
.nav-actions { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.nav-login { color: var(--text); text-decoration: none; font-size: .94rem; font-weight: 500; padding: .4rem .7rem; border-radius: var(--radius-sm); }
.nav-login:hover { color: var(--text); background: var(--bg-alt); }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line-strong);
  color: var(--text); border-radius: var(--radius-sm); padding: .35rem .6rem; font: inherit; font-size: .9rem; cursor: pointer;
}
@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .nav-login { display: none; }
  .nav-links {
    display: none; position: absolute; left: 0; right: 0; top: 60px; flex-direction: column; align-items: stretch; margin: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: .5rem 16px 1rem; gap: 0;
    box-shadow: 0 12px 24px -12px rgb(0 0 0 / .25);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .7rem .5rem; font-size: 1rem; }
  .nav-links .nav-mobile-only { display: block; border-top: 1px solid var(--line); margin-top: .4rem; padding-top: .4rem; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem; font: inherit; font-weight: 600; font-size: .95rem;
  padding: .62rem 1.05rem; border-radius: var(--radius-sm); border: 1px solid transparent; cursor: pointer;
  text-decoration: none; line-height: 1.2; transition: background .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-strong); color: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--text); color: var(--text); }
.btn-sm { padding: .42rem .8rem; font-size: .88rem; }
.btn-lg { padding: .8rem 1.3rem; font-size: 1rem; }
.btn .arrow { transition: transform .15s; }
.btn:hover .arrow { transform: translateX(2px); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

/* ---------- Sections ---------- */
section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem; font-family: var(--font-mono); font-size: .78rem;
  text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); }
.lede { font-size: clamp(1.08rem, 1.8vw, 1.25rem); color: var(--muted); max-width: 46rem; }
.section-head { max-width: 46rem; margin-bottom: 2.5rem; }
.section-head p { color: var(--muted); }

.status-pill {
  display: inline-flex; align-items: center; gap: .5rem; font-family: var(--font-mono); font-size: .78rem;
  border: 1px solid var(--line-strong); border-radius: 999px; padding: .25rem .7rem; color: var(--muted); background: var(--surface);
  text-decoration: none; margin-bottom: 1.4rem;
}
.status-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); }
a.status-pill:hover { color: var(--text); border-color: var(--text); }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(3rem, 8vw, 5.5rem); }
.hero h1 { max-width: 15ch; }
.hero h1 .accent { color: var(--accent); }
.hero .lede { margin-bottom: 1.8rem; }
.hero-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: 1.5rem; font-family: var(--font-mono); font-size: .82rem; color: var(--muted); padding: 0; list-style: none; }
.hero-meta li::before { content: "→ "; color: var(--accent); }

/* Billing timeline: the visual signature. Lit blocks = billed, grey = paused ($0). */
.timeline {
  margin-top: 3rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.1rem 1rem;
}
.timeline-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; font-family: var(--font-mono); font-size: .8rem; color: var(--muted); margin-bottom: .8rem; }
.timeline-head strong { color: var(--text); font-weight: 600; }
.timeline-bar { display: grid; grid-template-columns: repeat(96, 1fr); gap: 2px; height: 38px; }
.timeline-bar span { background: var(--paused); border-radius: 2px; }
.timeline-bar span.on { background: var(--accent); }
.timeline-axis { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: .72rem; color: var(--muted); margin-top: .45rem; }
.timeline-legend { display: flex; flex-wrap: wrap; gap: 1.2rem; margin-top: .8rem; font-size: .85rem; color: var(--muted); }
.timeline-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: .4rem; vertical-align: -1px; background: var(--paused); }
.timeline-legend i.on { background: var(--accent); }
@media (max-width: 520px) { .timeline-bar { grid-template-columns: repeat(48, 1fr); } .timeline-bar span:nth-child(n+49) { display: none; } }

/* ---------- Code block with tabs ---------- */
.code-wrap { display: grid; gap: 2.5rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 980px) { .code-wrap { grid-template-columns: 5fr 7fr; } }
.code-card { background: var(--code-bg); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); min-width: 0; }
.code-head { display: flex; align-items: center; gap: .5rem; padding: .5rem .6rem 0; border-bottom: 1px solid #23262b; }
.tabs { display: flex; align-items: center; gap: .25rem; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.code-head .tabs { padding: 0; border: 0; }
.tab {
  background: none; border: 0; color: var(--code-muted); font: 500 .85rem var(--font-mono); padding: .55rem .8rem;
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tab[aria-selected="true"] { color: var(--code-text); border-bottom-color: var(--code-key); }
.tab:hover { color: var(--code-text); }
.tab:focus-visible { outline-color: var(--code-key); }
.copy-btn {
  margin-left: auto; flex: none; background: #1c1f24; color: var(--code-text); border: 1px solid #2c3036; font: 500 .75rem var(--font-mono);
  padding: .3rem .6rem; border-radius: 5px; cursor: pointer; margin-bottom: .4rem;
}
.copy-btn:hover { border-color: var(--code-muted); }
.code-card pre { margin: 0; padding: 1.1rem 1.2rem 1.3rem; overflow-x: auto; color: var(--code-text); font-size: .84rem; line-height: 1.65; tab-size: 2; }
.code-card pre:focus-visible { outline-offset: -3px; }
.tok-k { color: var(--code-key); }
.tok-s { color: var(--code-str); }
.tok-f { color: var(--code-fn); }
.tok-c { color: var(--code-muted); font-style: italic; }
.tok-n { color: var(--code-str); }
.install { display: flex; flex-direction: column; gap: .5rem; margin: 1.2rem 0; }
.install code { display: block; padding: .55rem .8rem; background: var(--surface); }
.steps { list-style: none; padding: 0; margin: 1.5rem 0 0; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding-left: 2.2rem; margin-bottom: .9rem; color: var(--muted); }
.steps li strong { color: var(--text); }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: .1rem; width: 1.5rem; height: 1.5rem; border-radius: 4px;
  display: grid; place-items: center; font: 600 .75rem var(--font-mono); background: var(--accent-soft); color: var(--accent-strong);
}

/* ---------- Grids & cards ---------- */
.grid { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.grid-3 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: 1fr; }
@media (min-width: 680px) { .grid-3, .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.cell { background: var(--surface); padding: 1.5rem; }
.cell h3 { display: flex; align-items: center; gap: .6rem; }
.cell p { color: var(--muted); margin: 0; font-size: .96rem; }
.cell .figure { font: 600 .8rem var(--font-mono); color: var(--accent); display: block; margin-bottom: .7rem; letter-spacing: .02em; }
.icon { width: 22px; height: 22px; color: var(--accent); flex: none; }

.cards { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 820px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; display: flex; flex-direction: column; }
.card p { color: var(--muted); font-size: .96rem; }
.card ul { margin: 0 0 1rem; padding-left: 1.1rem; color: var(--muted); font-size: .94rem; }
.card ul li { margin-bottom: .3rem; }
.card .tag { font: 600 .72rem var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin-bottom: .6rem; }

/* ---------- Pause explainer ---------- */
.flow { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: 1fr; counter-reset: f; }
@media (min-width: 820px) { .flow { grid-template-columns: repeat(4, 1fr); } }
.flow-step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; position: relative; }
.flow-step .k { font: 600 .75rem var(--font-mono); color: var(--muted); display: block; margin-bottom: .5rem; }
.flow-step h3 { margin-bottom: .35rem; }
.flow-step p { color: var(--muted); font-size: .94rem; margin: 0; }
.flow-step .state { display: inline-block; margin-top: .9rem; font: 600 .75rem var(--font-mono); padding: .15rem .5rem; border-radius: 4px; }
.state.run { background: var(--accent-soft); color: var(--accent-strong); }
.state.pause { background: var(--bg-alt); color: var(--muted); border: 1px solid var(--line); }

/* ---------- Tables ---------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.table-scroll:focus-visible { outline-offset: 2px; }
table { width: 100%; border-collapse: collapse; font-size: .94rem; }
th, td { text-align: left; padding: .75rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font: 600 .78rem var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--bg-alt); white-space: nowrap; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody th { font-weight: 600; }
td.num, th.num { text-align: right; font-family: var(--font-mono); white-space: nowrap; }
tr.us td, tr.us th { background: var(--accent-soft); }
.compare-table th:first-child { position: sticky; left: 0; background: var(--surface); z-index: 1; min-width: 11rem; }
.compare-table thead th:first-child { background: var(--bg-alt); }
.compare-table td { min-width: 9.5rem; }
.compare-table .col-us { background: color-mix(in srgb, var(--accent-soft) 70%, transparent); }
.yes { color: var(--accent); font-weight: 600; }
.no { color: var(--muted); }
.part { color: var(--warn); font-weight: 600; }
.source-note { font-size: .85rem; color: var(--muted); margin-top: .8rem; }

/* ---------- Pricing ---------- */
.plans { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .plans { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1060px) { .plans { grid-template-columns: repeat(4, 1fr); } }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; display: flex; flex-direction: column; }
.plan.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.plan h3 { font-size: 1.05rem; margin-bottom: .2rem; }
.plan .price { font: 650 2.1rem var(--font-sans); letter-spacing: -0.03em; margin: .6rem 0 .1rem; }
.plan .price small { font-size: .9rem; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.plan .for { color: var(--muted); font-size: .9rem; min-height: 2.8em; }
.plan ul { list-style: none; padding: 0; margin: 1rem 0 1.4rem; font-size: .93rem; flex: 1; }
.plan li { padding: .35rem 0 .35rem 1.4rem; position: relative; border-top: 1px dashed var(--line); }
.plan li::before { content: ""; position: absolute; left: 0; top: .85rem; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); }
.plan li.warn::before { background: var(--warn); }
.plan .btn { justify-content: center; }
.callout {
  border: 1px solid var(--line); border-left: 4px solid var(--warn); background: var(--warn-soft); color: var(--text);
  padding: 1rem 1.2rem; border-radius: var(--radius-sm); margin: 1.5rem 0; font-size: .95rem;
}
.callout.info { border-left-color: var(--accent); background: var(--accent-soft); }
.callout p:last-child { margin: 0; }

/* Calculator */
.calc { display: grid; gap: 1.5rem; grid-template-columns: 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.1rem, 3vw, 2rem); }
@media (min-width: 900px) { .calc { grid-template-columns: 2fr 3fr; gap: 2.5rem; } }
.calc > *, .waitlist > *, .split > * { min-width: 0; }
select { max-width: 100%; text-overflow: ellipsis; }
.field { margin-bottom: 1.3rem; }
.field label, .field legend { display: block; font-weight: 600; font-size: .95rem; margin-bottom: .4rem; }
.field .hint { font-size: .82rem; color: var(--muted); margin-top: .3rem; }
.field-row { display: flex; gap: .75rem; align-items: center; }
.field-row input[type="range"] { flex: 1; min-width: 0; }
input[type="number"], input[type="email"], input[type="text"], select, textarea {
  font: inherit; font-size: .95rem; color: var(--text); background: var(--bg); border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); padding: .55rem .7rem; width: 100%;
}
.field-row input[type="number"] { width: 6.5rem; flex: none; font-family: var(--font-mono); }
input[type="range"] { accent-color: var(--accent); height: 28px; }
input[type="checkbox"] { accent-color: var(--accent); width: 18px; height: 18px; }
fieldset { border: 0; padding: 0; margin: 0; }
.seg { display: flex; flex-wrap: wrap; gap: .4rem; }
.seg label { margin: 0; font-weight: 500; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span {
  display: inline-block; padding: .45rem .75rem; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  font: 500 .85rem var(--font-mono); cursor: pointer; background: var(--bg);
}
.seg input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.seg input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 500 !important; }
.results { list-style: none; padding: 0; margin: 0; }
.results li { display: grid; grid-template-columns: 7.5rem 1fr auto; gap: .75rem; align-items: center; padding: .55rem 0; border-bottom: 1px solid var(--line); font-size: .93rem; }
.results li:last-child { border-bottom: 0; }
.results .bar { height: 12px; background: var(--bg-alt); border-radius: 3px; overflow: hidden; }
.results .bar i { display: block; height: 100%; background: var(--line-strong); border-radius: 3px; min-width: 2px; transition: width .25s; }
.results li.us .bar i { background: var(--accent); }
.results li.us { font-weight: 650; }
.results .amt { font-family: var(--font-mono); text-align: right; min-width: 6.5rem; }
.results .basis { grid-column: 1 / -1; font-size: .78rem; color: var(--muted); margin-top: -.35rem; }
@media (max-width: 480px) { .results li { grid-template-columns: 1fr auto; } .results .bar { grid-column: 1 / -1; grid-row: 2; } .results .basis { grid-row: 3; } }
.calc-summary { font-size: 1.05rem; margin: 0 0 1rem; }
.calc-summary strong { color: var(--accent); font-family: var(--font-mono); }

/* ---------- FAQ ---------- */
.faq { max-width: 52rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 1.1rem 2rem 1.1rem 0; font-weight: 600; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .25rem; top: 1rem; font: 500 1.3rem var(--font-mono); color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 0 1.2rem; color: var(--muted); }
.faq details > div p:last-child { margin: 0; }

/* ---------- Waitlist ---------- */
.waitlist { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 2.75rem); display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .waitlist { grid-template-columns: 1fr 1fr; align-items: start; } }
.form-grid { display: grid; gap: 1rem; }
.form-grid label { font-weight: 600; font-size: .92rem; display: block; margin-bottom: .3rem; }
.form-note { font-size: .82rem; color: var(--muted); margin: 0; }
.form-thanks { border: 1px solid var(--accent); background: var(--accent-soft); border-radius: var(--radius-sm); padding: 1.1rem 1.2rem; }
.form-thanks h3 { margin-bottom: .3rem; }
.form-error { color: var(--warn); font-size: .88rem; margin: 0; min-height: 1.2em; }
textarea { resize: vertical; min-height: 4.5rem; }
.form-grid .consent { display: flex; gap: .6rem; align-items: flex-start; font-size: .85rem; color: var(--muted); line-height: 1.5; margin: 0; }
.form-grid .consent input { flex: none; margin-top: .15rem; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Prose (blog, long text) ---------- */
.prose { max-width: 44rem; }
.prose h2 { font-size: 1.6rem; margin-top: 2.4rem; }
.prose h3 { margin-top: 1.8rem; }
.prose p, .prose li { color: var(--text); }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .4rem; }
.prose pre { background: var(--code-bg); color: var(--code-text); padding: 1rem 1.2rem; border-radius: var(--radius-sm); overflow-x: auto; font-size: .84rem; }
.prose figure { margin: 2rem 0; }
.prose figcaption { font-size: .85rem; color: var(--muted); margin-top: .6rem; }
.post-meta { font-family: var(--font-mono); font-size: .82rem; color: var(--muted); margin-bottom: 2rem; }

.page-head { padding-bottom: 2rem; }
.page-head h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); max-width: 20ch; }

.split { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; } }

.roadmap { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 820px) { .roadmap { grid-template-columns: repeat(3, 1fr); } }
.roadmap .card h3 { display: flex; justify-content: space-between; align-items: baseline; }
.roadmap .card h3 span { font: 600 .72rem var(--font-mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }

.diagram { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.diagram svg { display: block; width: 100%; height: auto; }
.diagram text { font-family: var(--font-mono); font-size: 12px; fill: var(--text); }
.diagram .sub { fill: var(--muted); font-size: 11px; }
.diagram .box { fill: var(--bg); stroke: var(--line-strong); }
.diagram .box-accent { fill: var(--accent-soft); stroke: var(--accent); }
.diagram .wire { stroke: var(--muted); fill: none; stroke-width: 1.4; }
.diagram .wire-accent { stroke: var(--accent); fill: none; stroke-width: 1.6; }

.desk-mock { background: var(--code-bg); border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; }
.desk-mock .bar { display: flex; gap: .4rem; align-items: center; padding: .55rem .8rem; border-bottom: 1px solid #23262b; font: .75rem var(--font-mono); color: var(--code-muted); }
.desk-mock .bar i { width: 9px; height: 9px; border-radius: 50%; background: #2c3036; }
.desk-mock .bar span { margin-left: .6rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 3rem 0 2.5rem; font-size: .92rem; color: var(--muted); }
.footer-grid { display: grid; gap: 2rem 1.5rem; grid-template-columns: 1fr 1fr; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1000px) { .footer-grid { grid-template-columns: 2fr repeat(4, 1fr); } }
.footer-grid h2 { font: 600 .75rem var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--text); margin-bottom: .8rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: .45rem; }
.footer-grid a { color: var(--muted); text-decoration: none; }
.footer-grid a:hover { color: var(--text); text-decoration: underline; }
.footer-brand { grid-column: 1 / -1; }
@media (min-width: 1000px) { .footer-brand { grid-column: auto; } }
.footer-bottom { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; font-size: .82rem; }

/* ---------- Legal pages, key-value lists, changelog ---------- */
.ph { background: var(--warn-soft); color: var(--warn); border-radius: 3px; padding: 0 .2em; font-weight: 500; overflow-wrap: anywhere; }
.toc { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-sm); padding: .8rem 1.2rem; margin-bottom: 2rem; font-size: .93rem; }
.toc ol { margin: 0; padding-left: 1.2rem; columns: 2 14rem; }
.legal .table-scroll { margin: 1rem 0 1.5rem; }
.legal tbody th { min-width: 9rem; }
.kv { display: grid; grid-template-columns: minmax(8rem, 14rem) 1fr; gap: .6rem 1.5rem; margin: 0 0 2rem; }
.kv dt { font-weight: 600; }
.kv dd { margin: 0; color: var(--muted); overflow-wrap: anywhere; }
@media (max-width: 520px) { .kv { grid-template-columns: 1fr; gap: .15rem; } .kv dd { margin-bottom: .7rem; } }
.kv-tight { font-size: .88rem; gap: .3rem 1rem; margin-top: 1.2rem; grid-template-columns: minmax(7rem, 10rem) 1fr; }
@media (max-width: 520px) { .kv-tight { grid-template-columns: 1fr; } }
.mt-small { margin-top: .6rem; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.file-btn:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.bill-calc textarea { font-size: .8rem; line-height: 1.5; white-space: pre; overflow-x: auto; }
.bill-calc .field-row .hint { flex: 1; min-width: 0; }
.bill-calc .check { margin-bottom: .5rem; }
.source-note h3 { font-size: 1rem; margin-top: 1.5rem; color: var(--text); }
.source-note ul { padding-left: 1.2rem; }
.changelog { max-width: 46rem; }
.change { border-left: 3px solid var(--accent); padding: .2rem 0 .2rem 1.2rem; margin-bottom: 2rem; }
.change header { font: 500 .8rem var(--font-mono); color: var(--muted); margin-bottom: .4rem; }
.chip { display: inline-block; font: 600 .7rem var(--font-mono); text-transform: uppercase; letter-spacing: .06em; padding: .1rem .4rem; border-radius: 3px; background: var(--accent-soft); color: var(--accent-strong); }
.chip-warn { background: var(--warn-soft); color: var(--warn); }
.empty-state { border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 2rem 1.5rem; background: var(--surface); }

.center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mt-1 { margin-top: 1rem; }
.pt-3 { padding-top: 3rem !important; }
/* Utilities that replace inline style="" attributes (CSP: style-src 'self', no 'unsafe-inline'). */
.pt-0 { padding-top: 0 !important; }
.m-0 { margin: 0 !important; }
.cta-lede { margin: 0 auto 1.5rem !important; }
.justify-center { justify-content: center !important; }
.list-plain { list-style: none !important; }

/* =====================================================================
   Landing v2 (2026-11): hero, agent lifecycle, how it works, console teaser,
   product page. Tokens only; no inline styles (CSP style-src 'self').
   ===================================================================== */
:root { --shadow-lg: 0 1px 0 rgb(255 255 255 / .6) inset, 0 24px 48px -24px rgb(16 24 20 / .28), 0 2px 6px -2px rgb(16 24 20 / .08); --grid-line: rgb(21 23 26 / .05); }
@media (prefers-color-scheme: dark) {
  :root { --shadow-lg: 0 1px 0 rgb(255 255 255 / .04) inset, 0 24px 60px -24px rgb(0 0 0 / .7); --grid-line: rgb(255 255 255 / .035); }
}

.section-tight { padding: clamp(2.5rem, 6vw, 4rem) 0; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .lede { margin-left: auto; margin-right: auto; }
.link-arrow { font-weight: 600; text-decoration: none; }
.link-arrow:hover { text-decoration: underline; }

/* ---------- Hero v2 ---------- */
.hero-v2 { position: relative; overflow: hidden; padding-top: clamp(2.5rem, 6vw, 4.5rem); padding-bottom: clamp(3rem, 7vw, 5rem); }
.hero-v2::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000 40%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000 40%, transparent 100%);
}
.hero-v2::after {
  content: ""; position: absolute; width: 60rem; height: 36rem; right: -20rem; top: -16rem; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 16%, transparent), transparent);
}
.hero-v2 .container { position: relative; z-index: 1; }
.hero-grid { display: grid; gap: clamp(2.5rem, 5vw, 3.5rem); grid-template-columns: 1fr; align-items: center; }
.hero-grid > * { min-width: 0; }
@media (min-width: 1080px) { .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 31rem); } }
.hero-v2 h1 { font-size: clamp(2.3rem, 5vw, 3.7rem); max-width: 16ch; margin-bottom: .45em; }
.hero-v2 h1 .accent { color: var(--accent); }
.hero-v2 .lede { margin-bottom: 1.8rem; max-width: 36rem; }
.hero-note { margin: 1rem 0 0; font-size: .88rem; color: var(--muted); }
.hero-note strong { color: var(--text); font-weight: 600; }
.hero-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 2.2rem 0 0; padding: 0; list-style: none;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--line); overflow: hidden; max-width: 36rem; }
@media (min-width: 640px) { .hero-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.hero-stats li { background: var(--surface); padding: .75rem .9rem; }
.hero-stats b { display: block; font: 600 1.05rem var(--font-mono); letter-spacing: -.02em; color: var(--text); }
.hero-stats span { display: block; font-size: .78rem; color: var(--muted); line-height: 1.35; margin-top: .15rem; }

/* ---------- Agent lifecycle visual ---------- */
.lc { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden; }
.lc-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .7rem .9rem; border-bottom: 1px solid var(--line); background: var(--bg-alt); }
.lc-id { font: 500 .76rem var(--font-mono); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.lc-id b { color: var(--text); font-weight: 600; }
.lc-badge { flex: none; display: inline-flex; align-items: center; gap: .4rem; font: 600 .74rem var(--font-mono); padding: .2rem .55rem; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-strong); transition: background .3s, color .3s; }
.lc-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.lc[data-mode="paused"] .lc-badge { background: var(--bg); color: var(--muted); box-shadow: 0 0 0 1px var(--line-strong) inset; }
.lc[data-mode="idle"] .lc-badge { background: var(--warn-soft); color: var(--warn); }
.lc[data-mode="running"] .lc-badge::before { animation: lc-pulse 1.4s ease-in-out infinite; }
@keyframes lc-pulse { 50% { opacity: .35; } }

.lc-term { background: var(--code-bg); color: var(--code-text); font: .8rem/1.7 var(--font-mono); padding: .9rem 1rem; min-height: 7.4rem; }
.lc-log { list-style: none; margin: 0; padding: 0; }
.lc-term li { white-space: pre-wrap; overflow-wrap: anywhere; }
.lc-term .p { color: var(--code-key); }
.lc-term .m { color: var(--code-muted); }
.lc-term .o { color: var(--code-str); }
.lc-log[hidden] { display: none; }
.lc-log:not([hidden]) li { animation: lc-in .35s ease both; }
.lc-log:not([hidden]) li + li { animation-delay: .25s; }
@keyframes lc-in { from { opacity: 0; transform: translateY(3px); } }

.lc-meters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; border-bottom: 1px solid var(--line); }
.lc-meters > div { padding: .7rem .9rem; border-right: 1px solid var(--line); min-width: 0; }
.lc-meters > div:last-child { border-right: 0; }
.lc-meters dt { font: 600 .66rem var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.lc-meters dd { margin: .15rem 0 0; font: 600 .95rem var(--font-mono); letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-meters .bar { display: block; height: 4px; border-radius: 2px; background: var(--bg-alt); margin-top: .45rem; overflow: hidden; }
.lc-meters .bar i { display: block; height: 100%; width: 100%; background: var(--accent); border-radius: 2px; transition: width .5s ease, background .3s; }
.lc[data-mode="paused"] .lc-bill .bar i { width: 0; }
.lc[data-mode="idle"] .lc-bill .bar i { background: var(--warn); }
.lc[data-mode="paused"] .lc-bill dd { color: var(--accent); }

.lc-fleet { display: grid; grid-template-columns: repeat(25, minmax(0, 1fr)); gap: 3px; padding: .8rem .9rem .3rem; }
.lc-fleet i { aspect-ratio: 1; border-radius: 2px; background: var(--bg-alt); box-shadow: 0 0 0 1px var(--line) inset; transition: background .25s, box-shadow .25s; }
.lc-fleet i:first-child { background: var(--accent); box-shadow: none; }
.lc[data-mode="paused"] .lc-fleet i:first-child { background: var(--paused); }
.lc[data-fork="on"] .lc-fleet i { background: var(--accent); box-shadow: none; }
.lc-fleet-cap { margin: 0; padding: 0 .9rem .7rem; font: .7rem var(--font-mono); color: var(--muted); }

.lc-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 0; padding: 0; list-style: none; background: var(--line); border-top: 1px solid var(--line); }
@media (min-width: 560px) { .lc-steps { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.lc-steps button {
  width: 100%; height: 100%; display: block; text-align: left; background: var(--surface); border: 0; padding: .55rem .6rem .6rem; cursor: pointer;
  font: 500 .74rem var(--font-sans); color: var(--muted); position: relative; line-height: 1.25;
}
.lc-steps button b { display: block; font: 600 .66rem var(--font-mono); color: var(--muted); margin-bottom: .1rem; }
.lc-steps button::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: transparent; transition: background .2s; }
.lc-steps button:hover { color: var(--text); }
.lc-steps button[aria-pressed="true"] { color: var(--text); background: color-mix(in srgb, var(--accent-soft) 55%, var(--surface)); }
.lc-steps button[aria-pressed="true"]::after { background: var(--accent); }
.lc-steps button:focus-visible { outline-offset: -3px; }
.lc-foot { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .45rem .9rem; border-top: 1px solid var(--line); font-size: .74rem; color: var(--muted); }
.lc-toggle { background: none; border: 1px solid var(--line-strong); color: var(--muted); font: 500 .72rem var(--font-mono); padding: .2rem .5rem; border-radius: 4px; cursor: pointer; flex: none; }
.lc-toggle:hover { color: var(--text); border-color: var(--text); }
.lc-toggle[hidden] { display: none; }

/* ---------- Code section v2 ---------- */
.code-v2 { display: grid; gap: 2.5rem; grid-template-columns: 1fr; align-items: start; }
.code-v2 > * { min-width: 0; }
@media (min-width: 980px) { .code-v2 { grid-template-columns: 4fr 7fr; } }
.code-card { box-shadow: var(--shadow-lg); }
.code-card .code-note { margin: 0; padding: .6rem 1.2rem .8rem; font: .74rem var(--font-mono); color: var(--code-muted); border-top: 1px solid #23262b; }
.check-list { list-style: none; padding: 0; margin: 1.2rem 0 1.5rem; }
.check-list li { position: relative; padding-left: 1.6rem; margin-bottom: .55rem; color: var(--muted); }
.check-list li strong { color: var(--text); }
.check-list li::before { content: ""; position: absolute; left: .1rem; top: .5rem; width: .65rem; height: .35rem; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }

/* ---------- How it works ---------- */
.how { display: grid; gap: 1rem; grid-template-columns: 1fr; list-style: none; padding: 0; margin: 0; }
@media (min-width: 700px) { .how { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .how { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.how li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; display: flex; flex-direction: column; min-width: 0; }
.how .k { font: 600 .72rem var(--font-mono); color: var(--accent); letter-spacing: .06em; margin-bottom: .6rem; }
.how h3 { margin-bottom: .4rem; }
.how p { color: var(--muted); font-size: .94rem; margin: 0 0 1rem; }
.how code.snip { display: block; margin-top: auto; padding: .5rem .65rem; font-size: .76rem; background: var(--code-bg); color: var(--code-text); border: 0; border-radius: var(--radius-sm); white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- Cost teaser ---------- */
.cost-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; align-items: start; }
.cost-grid > * { min-width: 0; }
@media (min-width: 980px) { .cost-grid { grid-template-columns: 5fr 6fr; gap: 3rem; } }
.bills { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.bills li { display: grid; grid-template-columns: minmax(6rem, 8rem) minmax(0, 1fr) auto; gap: .8rem; align-items: center; font-size: .92rem; }
.bills .b { height: 10px; border-radius: 3px; background: var(--line-strong); display: block; }
.bills .us .b { background: var(--accent); }
.bills .us { font-weight: 650; }
.bills .amt { font-family: var(--font-mono); text-align: right; white-space: nowrap; }
.bills .w-8 { width: 8%; } .bills .w-92 { width: 92%; } .bills .w-100 { width: 100%; } .bills .w-44 { width: 44%; }
.timeline.compact { margin-top: 0; }

/* ---------- Console teaser ---------- */
.console-frame { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow-lg); }
.console-frame .chrome { display: flex; align-items: center; gap: .4rem; padding: .55rem .8rem; border-bottom: 1px solid var(--line); background: var(--bg-alt); font: .74rem var(--font-mono); color: var(--muted); }
.console-frame .chrome i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); flex: none; }
.console-frame .chrome span { margin-left: .6rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.console-frame img { display: block; width: 100%; height: auto; }
.console-shot { margin: 0; }
.placeholder-note { font-size: .8rem; color: var(--muted); margin: .7rem 0 0; }
.soon { display: inline-block; font: 600 .66rem var(--font-mono); text-transform: uppercase; letter-spacing: .06em; padding: .1rem .4rem; border-radius: 3px; background: var(--warn-soft); color: var(--warn); vertical-align: .15em; margin-left: .35rem; }

/* ---------- Final CTA ---------- */
.final-cta { text-align: center; padding: clamp(2.5rem, 6vw, 4rem) clamp(1.2rem, 4vw, 3rem); border: 1px solid var(--line); border-radius: 16px; background:
  radial-gradient(ellipse 70% 90% at 50% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent), var(--surface); }
.final-cta h2 { max-width: 20ch; margin: 0 auto .5em; }
.final-cta .lede { margin: 0 auto 1.6rem; }
.final-cta .btn-row { justify-content: center; }

/* ---------- Product page ---------- */
.feature-nav { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.feature-nav a { display: inline-block; font: 500 .8rem var(--font-mono); padding: .3rem .6rem; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--muted); text-decoration: none; background: var(--surface); }
.feature-nav a:hover { color: var(--text); border-color: var(--text); }
.feature { display: grid; gap: 1.5rem 3rem; grid-template-columns: 1fr; padding: clamp(2.5rem, 5vw, 3.5rem) 0; border-top: 1px solid var(--line); scroll-margin-top: 72px; }
.feature > * { min-width: 0; }
@media (min-width: 940px) { .feature { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; } }
.feature h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.feature .figure { font: 600 .74rem var(--font-mono); color: var(--accent); letter-spacing: .04em; display: block; margin-bottom: .7rem; text-transform: uppercase; }
.feature p { color: var(--muted); }
.feature pre { margin: 0; background: var(--code-bg); color: var(--code-text); border-radius: var(--radius); border: 1px solid var(--line); padding: 1rem 1.15rem; overflow-x: auto; font-size: .8rem; line-height: 1.65; }
.feature .kv { margin: 0; }
.mini-table { font-size: .9rem; }
.code-note a { color: var(--code-key); }
.code-note a:hover { color: var(--code-text); }
@media (max-width: 560px) {
  .tab { padding: .55rem .55rem; font-size: .8rem; }
  .lc-meters dd { font-size: .82rem; }
  .lc-meters > div { padding: .6rem .7rem; }
  .hero-stats b { font-size: .98rem; }
}
