/* GenHTTP Lambda, community edition: project page.
   Tokens first (light, then dark: by system unless data-theme says otherwise),
   then the layout from the top of the page to the bottom. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/bricolage.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}

@font-face {
  font-family: "Martian Mono";
  src: url("fonts/martian-mono.woff2") format("woff2");
  font-weight: 100 800;
  font-stretch: 75% 112.5%;
  font-display: swap;
}

:root {
  --bg: #f6f5f9;
  --surface: #ffffff;
  --sunken: #eeecf4;
  --ink: #1c1828;
  --muted: #5d5770;
  --line: #e2dfea;
  --accent: #6a2bd9;          /* links, focus, the one accent */
  --accent-soft: #efe7fe;
  --accent-ink: #ffffff;      /* text on --accent */
  --bar: #7c3aed;             /* chart marks, validated against --surface */
  --online: #17845a;
  --warn: #a8570a;
  --term: #1c1828;            /* the terminal stays dark in both themes */
  --term-ink: #e9e6f2;
  --term-muted: #9a93ae;
  --term-accent: #c9a8ff;
  --shadow: 0 1px 2px rgb(28 24 40 / 6%), 0 12px 32px -12px rgb(28 24 40 / 18%);
  --radius-l: 14px;
  --radius-m: 10px;
  --radius-s: 6px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14121b;
    --surface: #1d1a27;
    --sunken: #191622;
    --ink: #ecebf2;
    --muted: #a39db5;
    --line: #2e2a3b;
    --accent: #c4a3ff;
    --accent-soft: #2a2140;
    --accent-ink: #14121b;
    --bar: #9466f5;
    --online: #4cc995;
    --warn: #f0a85a;
    --term: #0f0d15;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 16px 40px -16px rgb(0 0 0 / 60%);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #14121b;
  --surface: #1d1a27;
  --sunken: #191622;
  --ink: #ecebf2;
  --muted: #a39db5;
  --line: #2e2a3b;
  --accent: #c4a3ff;
  --accent-soft: #2a2140;
  --accent-ink: #14121b;
  --bar: #9466f5;
  --online: #4cc995;
  --warn: #f0a85a;
  --term: #0f0d15;
  --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 16px 40px -16px rgb(0 0 0 / 60%);
  color-scheme: dark;
}

/* in dark, the terminal-coloured blocks need an edge to stand off the page */
:root[data-theme="dark"] .cmd, :root[data-theme="dark"] .term { box-shadow: 0 0 0 1px rgb(255 255 255 / 8%), var(--shadow); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cmd, :root:not([data-theme="light"]) .term { box-shadow: 0 0 0 1px rgb(255 255 255 / 8%), var(--shadow); }
}

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; line-height: 1.1; font-weight: 700; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
code, pre, .tool { font-family: "Martian Mono", ui-monospace, monospace; font-stretch: 87.5%; }
code { font-size: 0.84em; }
:not(pre) > code {
  background: var(--sunken);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.05em 0.35em;
  white-space: nowrap;
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(1160px, 100% - 48px); margin-inline: auto; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: var(--radius-s);
}
.skip:focus { top: 12px; }

/* ---------- header ---------- */

.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.top.scrolled { border-bottom-color: var(--line); }
.top-inner { display: flex; align-items: center; gap: 28px; height: 64px; }

.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.mark { width: 28px; height: 28px; flex: none; }
.brand-name { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em; }
.brand-edition {
  font-size: 0.8rem; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px;
}

.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.nav a:hover { color: var(--ink); }

.top-actions { display: flex; align-items: center; gap: 6px; }
.icon-link, .theme {
  display: grid; place-items: center; width: 38px; height: 38px;
  border-radius: 999px; border: 1px solid transparent; background: none; color: var(--ink); cursor: pointer;
}
.icon-link:hover, .theme:hover { border-color: var(--line); background: var(--surface); }
.icon-link svg { width: 20px; height: 20px; fill: currentColor; }
.theme svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.theme .moon { display: none; }
.dark-active .theme .sun { display: none; }
.dark-active .theme .moon { display: block; }

/* ---------- hero ---------- */

.hero { padding: 72px 0 96px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 64px; align-items: center; }

h1 {
  font-size: clamp(2.6rem, 5.4vw, 4.4rem);
  font-weight: 720;
  font-stretch: 86%;
  letter-spacing: -0.02em;
  line-height: 0.98;
}
.lead { margin-top: 24px; font-size: 1.2rem; line-height: 1.55; color: var(--muted); max-width: 34em; }

.cmd {
  position: relative; margin-top: 32px;
  background: var(--term); color: var(--term-ink);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow);
}
.cmd pre { margin: 0; padding: 18px 84px 18px 20px; overflow-x: auto; font-size: 0.8rem; line-height: 1.7; scrollbar-width: thin; }
.cmd code { font-size: inherit; }
.cmd .sh { color: var(--term-muted); user-select: none; }
.cmd [data-origin] { color: var(--term-accent); }
.copy {
  position: absolute; top: 10px; right: 10px;
  font: inherit; font-size: 0.82rem; font-weight: 600;
  color: var(--term-ink); background: rgb(255 255 255 / 8%);
  border: 1px solid rgb(255 255 255 / 14%); border-radius: var(--radius-s);
  padding: 5px 12px; cursor: pointer;
}
.copy:hover { background: rgb(255 255 255 / 16%); }
.copy.done { color: #8fe3bd; border-color: rgb(143 227 189 / 40%); }

.after-cmd { margin-top: 12px; color: var(--muted); font-size: 0.95rem; }
.after-cmd code { background: none; border: 0; padding: 0; color: var(--ink); }

.facts { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 28px 0 0; }
.facts li { font-size: 0.88rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; }

/* the stage: a terminal session, and the app it put online */

.stage { position: relative; display: grid; }

.term {
  position: relative; z-index: 1;
  background: var(--term); color: var(--term-ink);
  border-radius: var(--radius-l); box-shadow: var(--shadow);
  width: 92%;
}
.term-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid rgb(255 255 255 / 7%); }
.lights { display: flex; gap: 6px; }
.lights i { width: 10px; height: 10px; border-radius: 50%; background: rgb(255 255 255 / 16%); }
.term-title { font-size: 0.82rem; color: var(--term-muted); }
.term-body { padding: 18px 20px 56px; font-size: 0.92rem; }

.prompt { display: flex; gap: 10px; }
.caret { color: var(--term-accent); font-weight: 700; }
.typed { min-height: 1.6em; }

.calls { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 6px; }
.calls li { display: grid; grid-template-columns: 18px auto 1fr; gap: 10px; align-items: center; font-size: 0.82rem; }
.tool { color: var(--term-ink); font-size: 0.78rem; }
.arg { color: var(--term-muted); }
.tick { width: 14px; height: 14px; border-radius: 50%; background: #4cc995; position: relative; }
.tick::after {
  content: ""; position: absolute; left: 4.5px; top: 2.5px; width: 3.5px; height: 6.5px;
  border: solid var(--term); border-width: 0 1.8px 1.8px 0; transform: rotate(45deg);
}
.reply { margin-top: 16px; color: var(--term-ink); line-height: 1.55; }
.reply b { font-weight: 650; }
.reply .u { color: var(--term-accent); }

.browser {
  position: relative; z-index: 2; justify-self: end; margin: -40px 0 0;
  width: 64%;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-l); box-shadow: var(--shadow);
  overflow: hidden;
}
.b-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--sunken); border-bottom: 1px solid var(--line); }
.lock { width: 13px; height: 13px; fill: none; stroke: var(--muted); stroke-width: 1.4; flex: none; }
.url { font-size: 0.8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.url b { color: var(--ink); font-weight: 600; }

.tasks { padding: 16px 18px 18px; }
.t-head { font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; }
.t-add { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 6px 6px 6px 10px; font-size: 0.85rem; color: var(--muted); }
.t-btn { background: var(--accent); color: var(--accent-ink); border-radius: 4px; padding: 2px 10px; font-weight: 600; font-size: 0.8rem; }
.t-list { list-style: none; padding: 0; margin: 10px 0 0; font-size: 0.88rem; }
.t-list li { display: grid; grid-template-columns: 16px 1fr auto; gap: 10px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); }
.t-list li:first-child { border-top: 0; }
.box { width: 14px; height: 14px; border: 1.5px solid var(--muted); border-radius: 4px; }
.done .box { background: var(--online); border-color: var(--online); }
.done .t-name { color: var(--muted); text-decoration: line-through; }
.due { font-size: 0.75rem; color: var(--muted); background: var(--sunken); border-radius: 999px; padding: 1px 8px; }
.t-list li:first-child .due { color: var(--warn); }

.replay {
  position: absolute; left: 0; bottom: 0;
  font: inherit; font-size: 0.88rem; color: var(--muted);
  background: none; border: 1px solid var(--line); border-radius: 999px; padding: 4px 14px; cursor: pointer;
}
.replay:hover { color: var(--ink); background: var(--surface); }

/* the hero's one moment: the session plays, then the app appears */
.stage.playing .calls li,
.stage.playing .reply,
.stage.playing .browser { opacity: 0; }
.stage.playing .calls li { transform: translateX(-4px); }
.stage.playing .browser { transform: translateY(24px); }
.stage .calls li, .stage .reply, .stage .browser { transition: opacity .45s ease, transform .6s cubic-bezier(.2, .8, .2, 1); }
.stage.playing .calls li.shown, .stage.playing .reply.shown, .stage.playing .browser.shown { opacity: 1; transform: none; }
.stage.playing .calls li.pending .tick { background: transparent; border: 1.6px solid var(--term-muted); border-top-color: transparent; animation: spin .7s linear infinite; }
.stage.playing .calls li.pending .tick::after { display: none; }
.typed.typing::after { content: ""; display: inline-block; width: 0.5em; height: 1.05em; margin-left: 2px; vertical-align: -0.15em; background: var(--term-accent); animation: blink 1s steps(1) infinite; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- sections ---------- */

.section { padding: 104px 0; border-top: 1px solid var(--line); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); font-weight: 700; font-stretch: 88%; letter-spacing: -0.02em; max-width: 22em; }
.section-lead { margin-top: 16px; color: var(--muted); font-size: 1.12rem; max-width: 40em; }
h3 { font-size: 1.2rem; font-weight: 650; letter-spacing: -0.01em; }

/* why */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 48px; }
.compare-col { border-radius: var(--radius-l); padding: 28px 30px; }
.compare-col ul { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.compare-col li { position: relative; padding-left: 28px; }
.compare-col li::before { content: ""; position: absolute; left: 0; top: 0.52em; width: 14px; height: 14px; border-radius: 50%; }
.before { background: var(--sunken); color: var(--muted); }
.before h3 { color: var(--ink); }
.before li::before { border: 1.5px solid var(--muted); width: 12px; height: 12px; top: 0.55em; border-radius: 3px; }
.after { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.after li::before { background: var(--accent); }
.after li::after {
  content: ""; position: absolute; left: 5px; top: calc(0.52em + 3px); width: 3.5px; height: 6.5px;
  border: solid var(--surface); border-width: 0 1.8px 1.8px 0; transform: rotate(45deg);
}
.proof { margin-top: 28px; color: var(--muted); max-width: 46em; }

/* how */
.steps { list-style: none; padding: 0; margin: 56px 0 0; display: grid; gap: 64px; counter-reset: step; }
.step { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 56px; align-items: start; }
.step-text p { margin-top: 12px; color: var(--muted); }
.step h3 { display: flex; align-items: center; gap: 14px; font-size: 1.45rem; }
.n {
  display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent); font-size: 1rem; font-weight: 700;
}
.step .cmd { margin-top: 0; }

.origin { display: grid; gap: 6px; margin-top: 22px; font-size: 0.9rem; color: var(--muted); max-width: 22rem; }
.origin input {
  font: inherit; font-family: "Martian Mono", ui-monospace, monospace; font-stretch: 87.5%; font-size: 0.85rem;
  color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 9px 12px;
}
.origin input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.agents { min-width: 0; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--sunken); border-radius: var(--radius-m); width: fit-content; max-width: 100%; }
.tabs button {
  font: inherit; font-size: 0.9rem; color: var(--muted); background: none; border: 0; border-radius: var(--radius-s);
  padding: 6px 12px; cursor: pointer;
}
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgb(0 0 0 / 10%); }
.pane { margin-top: 16px; }
.pane > p { color: var(--muted); font-size: 0.97rem; max-width: 38em; }
.pane .cmd { margin-top: 14px; }

.ask { margin: 0; }
.ask blockquote {
  margin: 0; font-size: clamp(1.35rem, 2.4vw, 1.75rem); line-height: 1.3; font-weight: 600; font-stretch: 90%; letter-spacing: -0.01em;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 26px 30px;
  box-shadow: var(--shadow);
}
.ask blockquote::before { content: "“"; color: var(--accent); }
.ask blockquote::after { content: "”"; color: var(--accent); }
.ask figcaption { margin-top: 14px; color: var(--muted); padding-left: 4px; }

/* ideas */
.idea-groups { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: 48px; border-top: 1px solid var(--line); }
.idea-group { padding: 24px 24px 8px 0; }
.idea-group + .idea-group { padding-left: 24px; border-left: 1px solid var(--line); }
.idea-group h3 { font-size: 1rem; color: var(--muted); font-weight: 600; }
.idea-group ul { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 14px; }
.idea-group li { font-size: 1.05rem; line-height: 1.4; }
.demos-note { margin-top: 36px; color: var(--muted); max-width: 46em; }

/* features: spotlights */
.spot { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 64px; align-items: center; padding: 64px 0; }
.spot + .spot { border-top: 1px dashed var(--line); }
.features .section-lead + .spot { margin-top: 16px; }
.spot h3 { font-size: 1.65rem; font-stretch: 90%; }
.spot-text p { margin-top: 14px; color: var(--muted); }
.spot-text .also { color: var(--ink); }

.vignette {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l);
  box-shadow: var(--shadow); padding: 22px 24px; font-size: 0.92rem; min-width: 0;
}
.v-title { font-weight: 650; }
.v-title.second { margin-top: 22px; }
.v-sub { color: var(--muted); font-size: 0.88rem; }
.v-foot { margin-top: 16px; color: var(--muted); font-size: 0.85rem; }

.tools dl { margin: 14px 0 0; display: grid; gap: 12px; }
.tools dl > div { display: grid; grid-template-columns: 7.5rem 1fr; gap: 12px; align-items: baseline; }
.tools dt { color: var(--muted); font-size: 0.85rem; }
.tools dd { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tools dd code {
  font-size: 0.74rem; background: var(--accent-soft); color: var(--accent); border: 0; border-radius: 4px; padding: 3px 7px;
}

.draft { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 16px; border: 1px solid var(--accent); border-left-width: 3px; border-radius: var(--radius-m); background: color-mix(in srgb, var(--accent-soft) 50%, var(--surface)); }
.draft-actions { display: flex; gap: 8px; }
.btn-ghost, .btn-solid { font-size: 0.82rem; font-weight: 600; border-radius: var(--radius-s); padding: 5px 12px; white-space: nowrap; }
.btn-ghost { color: var(--accent); border: 1px solid var(--line); background: var(--surface); }
.btn-solid { color: var(--accent-ink); background: var(--accent); }
.btn-solid.small { padding: 2px 9px; font-size: 0.75rem; }
.vlist { list-style: none; padding: 0; margin: 14px 0 0; }
.vlist li { display: grid; grid-template-columns: 24px 1fr auto; gap: 12px; align-items: center; padding: 11px 4px; border-top: 1px solid var(--line); }
.vlist li:first-child { border-top: 0; }
.vn { color: var(--muted); font-size: 0.85rem; }
.state { font-size: 0.8rem; white-space: nowrap; }
.state.on { color: var(--online); }
.state.on::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 6px; vertical-align: 1px; }
.state.link { color: var(--accent); }

.data table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 0.85rem; }
.data th { text-align: left; font-weight: 600; color: var(--muted); font-family: "Martian Mono", ui-monospace, monospace; font-stretch: 87.5%; font-size: 0.72rem; padding: 6px 8px; border-bottom: 1px solid var(--line); background: var(--sunken); }
.data td { padding: 7px 8px; border-bottom: 1px solid var(--line); }
.data td:not(:first-child), .data th:not(:first-child) { white-space: nowrap; }
.secrets { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.secrets li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.secrets code { font-size: 0.74rem; }
.sealed { color: var(--online); font-size: 0.82rem; }
.missing { color: var(--warn); font-size: 0.82rem; margin-right: auto; }

.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.tiles div { border: 1px solid var(--line); border-radius: var(--radius-m); padding: 10px 14px; display: grid; }
.tiles .k { color: var(--muted); font-size: 0.82rem; }
.tiles .v { font-size: 1.7rem; font-weight: 700; font-stretch: 85%; line-height: 1.1; font-variant-numeric: tabular-nums; }

.chart { margin-top: 12px; }
.bars {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; align-items: end; height: 120px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(to top, transparent calc(50% - 1px), var(--line) 50%, transparent calc(50% + 1px));
}
.bars span {
  position: relative; height: calc(var(--v) * 1%); max-width: 26px; justify-self: center; width: 100%;
  background: var(--bar); border-radius: 4px 4px 0 0;
}
.bars span:hover { filter: brightness(1.15); }
.bars span:hover::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: var(--ink); color: var(--bg); font-size: 0.75rem; padding: 3px 8px; border-radius: 4px; white-space: nowrap; z-index: 1;
}
.axis { display: flex; justify-content: space-between; margin-top: 6px; color: var(--muted); font-size: 0.75rem; }

.refs { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.refs li { position: relative; display: flex; justify-content: space-between; gap: 12px; padding: 5px 10px; font-size: 0.85rem; isolation: isolate; }
.refs li::before { content: ""; position: absolute; inset: 0; width: calc(var(--w) * 1%); background: var(--accent-soft); border-radius: 4px; z-index: -1; }
.refs li span:last-child { font-variant-numeric: tabular-nums; color: var(--muted); }

/* features: the rest */
.more-title { margin-top: 40px; font-size: 1.45rem; }
.more { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; margin: 8px 0 0; }
.more > div { padding: 18px 0; border-bottom: 1px solid var(--line); }
.more dt { font-weight: 650; }
.more dd { margin: 4px 0 0; color: var(--muted); }

.builder {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 48px; align-items: center;
  margin-top: 64px; padding: 36px 40px; border-radius: var(--radius-l);
  background: var(--accent-soft);
}
.builder p { margin-top: 12px; color: var(--muted); }
.build-box { background: var(--surface); border-radius: var(--radius-m); padding: 16px; box-shadow: var(--shadow); display: grid; gap: 14px; }
.bb-q { font-size: 0.98rem; line-height: 1.45; min-height: 4.4em; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 12px; }
.build-box .btn-solid { justify-self: end; }

/* run */
.run-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 64px; margin-top: 48px; align-items: start; }
.file-name { font-family: "Martian Mono", ui-monospace, monospace; font-stretch: 87.5%; font-size: 0.78rem; color: var(--muted); }
.run-compose .cmd { margin-top: 8px; }
.settings { width: 100%; border-collapse: collapse; margin-top: 28px; font-size: 0.95rem; }
.settings caption { text-align: left; font-weight: 650; margin-bottom: 8px; }
.settings th, .settings td { text-align: left; vertical-align: top; padding: 12px 0; border-top: 1px solid var(--line); }
.settings th { padding-right: 20px; font-weight: 400; white-space: nowrap; }
.settings td { color: var(--muted); }
.more-settings { margin-top: 14px; color: var(--muted); font-size: 0.95rem; }
.ops { margin: 0; display: grid; gap: 28px; }
.ops dt { font-weight: 650; font-size: 1.15rem; }
.ops dd { margin: 6px 0 0; color: var(--muted); }

/* good to know */
.know-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; margin-top: 40px; }
.know-grid > div { border-top: 2px solid var(--ink); padding-top: 18px; }
.know-grid p { margin-top: 10px; color: var(--muted); }

/* faq */
.faq-wrap { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); gap: 64px; align-items: start; }
.faq-list { border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); }
summary {
  list-style: none; cursor: pointer; padding: 18px 40px 18px 0; position: relative; font-weight: 600; font-size: 1.1rem;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: ""; position: absolute; right: 8px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border: solid var(--muted); border-width: 0 1.8px 1.8px 0; transform: rotate(45deg); transition: transform .2s;
}
details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
summary:hover { color: var(--accent); }
details p { padding: 0 0 20px; color: var(--muted); max-width: 40em; }

/* closing */
.closing { padding: 112px 0 96px; background: var(--term); color: var(--term-ink); }
.closing-inner { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: start; }
.closing h2 { color: #fff; font-size: clamp(2rem, 4.6vw, 3.4rem); font-stretch: 82%; }
.closing .cmd { margin-top: 36px; background: rgb(255 255 255 / 6%); box-shadow: none; border: 1px solid rgb(255 255 255 / 12%); max-width: 100%; }
.links { display: flex; flex-wrap: wrap; gap: 10px 28px; list-style: none; padding: 0; margin: 36px 0 0; }
.links a { color: var(--term-accent); }

/* footer */
.foot { padding: 28px 0 36px; background: var(--term); color: var(--term-muted); font-size: 0.9rem; border-top: 1px solid rgb(255 255 255 / 8%); }
.foot-inner { display: flex; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; }
.foot a { color: var(--term-ink); }

/* ---------- smaller screens ---------- */

@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 56px; }
  .stage { max-width: 640px; }
  .step, .spot, .run-grid, .faq-wrap, .builder { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .idea-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .idea-group:nth-child(3) { padding-left: 0; border-left: 0; }
  .idea-group:nth-child(n+3) { border-top: 1px solid var(--line); }
  .know-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}

@media (max-width: 760px) {
  .nav { display: none; }
  .top-actions { margin-left: auto; }
  .brand-edition { display: none; }
  .hero { padding: 40px 0 72px; }
  .section { padding: 72px 0; }
  .compare, .more { grid-template-columns: minmax(0, 1fr); }
  .idea-groups { grid-template-columns: minmax(0, 1fr); }
  .idea-group, .idea-group + .idea-group { padding: 20px 0 8px; border-left: 0; border-top: 1px solid var(--line); }
  .idea-group:first-child { border-top: 0; }
  .term { width: 100%; }
  .browser { width: 88%; margin-top: -28px; }
  .replay { position: static; margin-top: 16px; justify-self: start; }
  .tools dl > div { grid-template-columns: 1fr; gap: 6px; }
  .builder { padding: 28px 24px; }
  .settings th { white-space: normal; }
  .settings th, .settings td { display: block; padding: 4px 0; border: 0; }
  .settings tr { display: block; border-top: 1px solid var(--line); padding: 10px 0; }
  .cmd pre { padding-right: 20px; padding-top: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media (forced-colors: active) {
  .bars span { background: CanvasText; }
  .tick, .after li::before { background: CanvasText; }
}

/* ---------- 404 ---------- */

.lost { padding: 96px 0 128px; min-height: 70vh; }
.lost-code { font-family: "Martian Mono", ui-monospace, monospace; font-stretch: 87.5%; color: var(--accent); font-size: 0.95rem; }
.lost h1 { margin-top: 12px; max-width: 14em; }
.lost-links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 36px; }
.lost-home { background: var(--accent); color: var(--accent-ink); text-decoration: none; font-weight: 600; padding: 10px 18px; border-radius: var(--radius-m); }
