/* Tapit site. Direction C, "Bold Utility": white paper, near-black ink, 1.5px outlines, hard offset
   shadows, cobalt accent. Colour values are the app's own (Sources/Tapit/Theme.swift). */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap;
  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: "Archivo";
  src: url("../fonts/archivo-latin-ext.woff2") format("woff2");
  font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Colour ---------- */
:root {
  --ink: #0E0E10; --paper: #FFFFFF; --body: #3D404A; --muted: #5C6070; --quiet: #B9BDC7;
  --accent: #1F3ED6; --on-accent: #FFFFFF; --strip: #EAEEFE; --strip-text: #1A2A8A;
  --call: #FF6B1A; --on-call: #0E0E10; --locked: #F1F2F5;
  --track-on: #0E0E10; --track-off: #C9CCD4; --knob: #FFFFFF;
  --warn-fill: #FFEFE3; --warn-text: #8A3A00; --shadow: #0E0E10; --backdrop: #D9DCE2;
  --rule: 1.5px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #E7E9EE; --paper: #1C212C; --body: #B4BBCB; --muted: #8C94A6; --quiet: #4A5263;
    --accent: #6B8CFF; --on-accent: #0B1026; --strip: #1A2447; --strip-text: #D3DCFF;
    --call: #F2A93B; --on-call: #1C212C; --locked: #252B38;
    --track-on: #6B8CFF; --track-off: #3A4150;
    --warn-fill: #3A2A14; --warn-text: #F2C078; --shadow: #6B8CFF; --backdrop: #0C0F16;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #E7E9EE; --paper: #1C212C; --body: #B4BBCB; --muted: #8C94A6; --quiet: #4A5263;
  --accent: #6B8CFF; --on-accent: #0B1026; --strip: #1A2447; --strip-text: #D3DCFF;
  --call: #F2A93B; --on-call: #1C212C; --locked: #252B38;
  --track-on: #6B8CFF; --track-off: #3A4150;
  --warn-fill: #3A2A14; --warn-text: #F2C078; --shadow: #6B8CFF; --backdrop: #0C0F16;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: "Archivo", "Helvetica Neue", system-ui, sans-serif; font-weight: 500; font-size: 17px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
img { display: block; max-width: 100%; height: auto; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: 1180px; margin-inline: auto; padding-inline: 28px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 10; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 10px; font-weight: 700; }
.skip-link:focus { top: 12px; color: var(--paper); }

/* Expanded heavy type: headlines, numbers and small caps labels. */
h1, h2, .price, .latency-number, .try-number, .step-count, .pop-number, .pop-band-title, .feature-lead h3 {
  font-weight: 800; font-stretch: 125%; letter-spacing: -0.02em; line-height: 0.95;
}
h2 { font-size: clamp(30px, 4.4vw, 54px); text-wrap: balance; }
.label {
  font-weight: 800; font-stretch: 125%; font-size: 12px; letter-spacing: 0.08em; line-height: 1.3;
  text-transform: uppercase; color: var(--muted);
}
.label.accent { color: var(--accent); }
.fineprint { font-size: 14px; line-height: 1.45; color: var(--muted); max-width: 56ch; }
.pro-tag {
  display: inline-block; vertical-align: 0.12em; margin-left: 4px; padding: 2px 5px; border-radius: 4px;
  background: var(--ink); color: var(--paper);
  font-weight: 800; font-stretch: 125%; font-size: 9px; letter-spacing: 0.06em; line-height: 1.2;
}

/* ---------- Buttons, switches, slider (the app's controls) ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px;
  border: var(--rule) solid var(--ink); border-radius: 10px; background: var(--paper); color: var(--ink);
  font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer;
  transition: transform 80ms ease, box-shadow 80ms ease;
}
.button:hover { color: var(--ink); }
.button.primary { background: var(--ink); color: var(--paper); font-weight: 700; box-shadow: 3px 3px 0 var(--accent); }
.button.primary:hover { color: var(--paper); transform: translate(1px, 1px); box-shadow: 2px 2px 0 var(--accent); }
.button.primary:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--accent); }
.button:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; transform: none; }
.button.small { min-height: 44px; padding: 0 14px; font-size: 13px; }
.button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.segmented { display: inline-flex; border: var(--rule) solid var(--ink); border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.segmented button { height: 34px; padding: 0 11px; border: 0; background: var(--paper); font-size: 12px; font-weight: 600; cursor: pointer; }
.segmented button + button { border-left: var(--rule) solid var(--ink); }
.segmented button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.segmented button:focus-visible { outline-offset: -4px; }

.switch, .switch-glyph {
  display: inline-flex; align-items: center; width: 38px; height: 22px; padding: 1.5px; flex-shrink: 0;
  border: var(--rule) solid var(--ink); border-radius: 11px; background: var(--track-off);
}
.switch { width: 46px; height: 28px; border-radius: 14px; padding: 2.5px; cursor: pointer; }
.switch span, .switch-glyph::after { content: ""; display: block; width: 16px; height: 16px; border-radius: 50%; background: var(--knob); }
.switch span { width: 20px; height: 20px; transition: transform 90ms ease; }
.switch[aria-checked="true"], .switch-glyph.on { background: var(--track-on); }
.switch[aria-checked="true"] span { transform: translateX(18px); }
.switch-glyph.on { justify-content: flex-end; }
.switch-glyph.dim { opacity: 0.45; }

.bold-slider { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; margin: 0; background: transparent; cursor: pointer; }
.bold-slider::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--accent) var(--fill, 70%), var(--track-off) var(--fill, 70%)); }
.bold-slider::-moz-range-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--accent) var(--fill, 70%), var(--track-off) var(--fill, 70%)); }
.bold-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 50%; background: var(--knob); border: var(--rule) solid var(--ink); }
.bold-slider::-moz-range-thumb { width: 19px; height: 19px; border-radius: 50%; background: var(--knob); border: var(--rule) solid var(--ink); }

.status-strip { display: flex; align-items: flex-start; gap: 9px; padding: 10px 12px; border-radius: 8px; font-size: 14px; font-weight: 600; line-height: 1.4; }
.status-strip.warn { background: var(--warn-fill); color: var(--warn-text); }
.status-strip svg { width: 16px; height: 16px; margin-top: 2px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }

/* ---------- Mascot: four drawings stacked, one shown per state ---------- */
.cap { display: inline-block; position: relative; width: 120px; aspect-ratio: 1; flex-shrink: 0; }
.cap svg { position: absolute; inset: 0; width: 100%; height: 100%; visibility: hidden; overflow: visible; }
.cap[data-state="idle"] [data-for="idle"], .cap[data-state="down"] [data-for="down"],
.cap[data-state="muted"] [data-for="muted"], .cap[data-state="call"] [data-for="call"] { visibility: visible; }

/* ---------- Top bar ---------- */
.topbar { border-bottom: var(--rule) solid var(--ink); }
.topbar-row { display: flex; align-items: center; gap: 22px; min-height: 62px; }
.wordmark { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 800; font-stretch: 125%; font-size: 15px; letter-spacing: 0.08em; }
.wordmark:hover { color: var(--ink); }
.wordmark svg { width: 28px; height: 28px; }
.topnav { display: flex; gap: 22px; margin-left: auto; font-size: 14px; font-weight: 600; }
.topnav a { text-decoration: none; padding: 12px 0; }

/* ---------- Hero ---------- */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.hero-copy { padding: 68px 44px 68px 0; display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
h1 { font-size: clamp(40px, 4.7vw, 60px); letter-spacing: -0.03em; line-height: 0.92; }
h1 span { display: block; white-space: nowrap; }
h1 span + span { color: var(--accent); }
.lead { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.45; color: var(--body); max-width: 33em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-copy .status-strip { max-width: 34em; }

.hero-stage { border-left: var(--rule) solid var(--ink); padding: 44px 5px 44px 36px; display: grid; grid-template-columns: 140px 345px; gap: 26px; align-items: stretch; }
.stage-side { display: flex; flex-direction: column; gap: 18px; }
.stage-step { display: flex; flex-direction: column; gap: 10px; min-height: 104px; }
.step-count { font-size: 68px; letter-spacing: -0.04em; line-height: 0.85; font-variant-numeric: tabular-nums; }
.step-total { color: var(--quiet); }
.stage-cap { width: 132px; margin-left: -6px; }
.stage-controls { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.stage-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.menubar { display: flex; align-items: center; justify-content: flex-end; gap: 10px; height: 30px; width: 340px; max-width: calc(100% - 5px); padding: 0 6px 0 10px; border: var(--rule) solid var(--ink); border-radius: 8px; background: var(--locked); }
.menubar-call { margin-right: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; visibility: hidden; }
.menubar-call::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--call); border: 1px solid var(--ink); }
.menubar-icon { display: inline-flex; width: 30px; height: 22px; align-items: center; justify-content: center; border-radius: 5px; background: var(--quiet); }
.menubar-icon svg { width: 19px; height: 19px; }

/* What changes when the demo's call is active. */
.hero-stage .when-call { display: none; }
.hero-stage[data-call="true"] .when-call { display: revert; }
.hero-stage[data-call="true"] .when-free { display: none; }
.hero-stage[data-call="true"] .menubar-call { visibility: visible; }
.hero-stage[data-call="true"] .pop-number { color: var(--quiet); }
.hero-stage[data-call="true"] .pop-band.when-call, .hero-stage[data-call="false"] .pop-strip.when-free { display: flex; }

/* The popover, rebuilt from PopoverView.swift at its real size. */
.pop { width: 340px; max-width: calc(100% - 5px); border: var(--rule) solid var(--ink); border-radius: 14px; background: var(--paper); box-shadow: 5px 5px 0 var(--shadow); overflow: hidden; font-size: 13px; line-height: 1.35; }
.pop-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 0; }
.pop-name { font-weight: 800; font-stretch: 125%; font-size: 13px; letter-spacing: 0.08em; }
.pop-power { display: inline-flex; align-items: center; justify-content: center; min-width: 64px; height: 32px; border-radius: 16px; background: var(--ink); color: var(--paper); font-weight: 800; font-stretch: 125%; font-size: 13px; letter-spacing: 0.06em; }
.pop-volume { display: flex; flex-direction: column; gap: 6px; padding: 6px 16px 14px; }
.pop-number { font-size: 84px; line-height: 0.9; font-variant-numeric: tabular-nums; }
.pop-number span { font-size: 28px; font-stretch: 100%; margin-left: 2px; letter-spacing: 0; }
.pop-caption { font-size: 12px; color: var(--muted); }
.pop-slider { position: relative; height: 22px; }
.pop-slider::before { content: ""; position: absolute; left: 0; right: 0; top: 8px; height: 6px; border-radius: 3px; background: var(--track-off); }
.pop-slider-fill { position: absolute; left: 0; top: 8px; width: 70%; height: 6px; border-radius: 3px; background: var(--accent); }
.pop-slider-knob { position: absolute; left: calc(70% - 9px); top: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--knob); border: var(--rule) solid var(--ink); }
.pop-status { border-top: var(--rule) solid var(--ink); border-bottom: var(--rule) solid var(--ink); }
.pop-strip { gap: 10px; align-items: center; min-height: 66px; padding: 10px 16px; background: var(--strip); color: var(--strip-text); font-size: 12px; }
.pop-strip svg { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; }
.pop-band { flex-direction: column; justify-content: center; gap: 3px; min-height: 66px; padding: 10px 16px; background: var(--call); color: var(--on-call); font-size: 12px; font-weight: 600; }
.pop-band-title { font-size: 26px; line-height: 1; letter-spacing: 0; }
.pop-packs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 14px 16px; }
.pop-tile { display: flex; flex-direction: column; gap: 3px; min-height: 74px; padding: 9px 10px; border: var(--rule) solid var(--ink); border-radius: 10px; }
.pop-tile.selected { background: var(--ink); color: var(--paper); }
.pop-dot { width: 11px; height: 11px; border-radius: 50%; border: var(--rule) solid var(--ink); margin-bottom: auto; }
.pop-tile.selected .pop-dot { border-color: var(--paper); }
.pop-tile-name { font-size: 14px; font-weight: 700; line-height: 1.1; }
.pop-tile-type { font-size: 11px; opacity: 0.7; }
.pop-toggles { display: flex; flex-direction: column; gap: 10px; padding: 0 16px 14px; }
.pop-toggle { display: flex; align-items: center; justify-content: space-between; font-weight: 600; }
.pop-foot { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: var(--rule) solid var(--ink); font-size: 12px; font-weight: 600; text-align: center; }
.pop-foot span { height: 40px; line-height: 40px; }
.pop-foot span + span { border-left: var(--rule) solid var(--ink); }
.pop-foot-pro { background: var(--accent); color: var(--on-accent); font-weight: 700; }

.meter { display: flex; align-items: center; gap: 12px; width: 340px; max-width: calc(100% - 5px); }
.meter .label { flex-shrink: 0; }
.meter-bars { flex-grow: 1; height: 34px; display: flex; align-items: flex-end; gap: 3px; border-bottom: var(--rule) solid var(--ink); }
.meter-bars span { flex: 1 1 0; min-width: 2px; border-radius: 2px 2px 0 0; background: var(--accent); }
.meter-bars span.silent { background: var(--quiet); }

/* ---------- Bands ---------- */
section { border-top: var(--rule) solid var(--ink); }
.hero { border-top: 0; }
.band-ink { background: var(--ink); color: var(--paper); }
.band-ink .label { color: inherit; opacity: 0.72; }
.band-call { background: var(--call); color: var(--on-call); border-top: var(--rule) solid var(--ink); border-bottom: var(--rule) solid var(--ink); }
.band-strip { background: var(--strip); }

.latency { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 320px); align-items: center; }
.latency-number { font-size: clamp(54px, 13.6vw, 196px); letter-spacing: -0.045em; line-height: 0.8; padding: 46px 0 50px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.latency-number span { font-size: 0.26em; letter-spacing: 0; margin-left: 0.18em; }
.latency-copy { align-self: stretch; display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 28px 0 28px 30px; border-left: var(--rule) solid var(--paper); font-size: 16px; }

/* ---------- Try it ---------- */
.try-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; }
.try-typing { padding: 60px 44px 60px 0; display: flex; flex-direction: column; gap: 18px; }
.try-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.try-heading h2 { margin-top: 10px; }
.try-cap { width: 108px; margin: -14px 0 -10px; }
.try-box {
  width: 100%; min-height: 168px; resize: vertical; padding: 16px 18px;
  border: var(--rule) solid var(--ink); border-radius: 10px; background: var(--locked);
  font-size: 19px; font-weight: 500; line-height: 1.5;
}
.try-box::placeholder { color: var(--muted); opacity: 1; }
.try-box:focus-visible { outline-offset: 2px; border-radius: 10px; }
.readouts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: var(--rule) solid var(--ink); border-radius: 10px; overflow: hidden; }
.readouts div { padding: 10px 14px 12px; }
.readouts div + div { border-left: var(--rule) solid var(--ink); }
.readouts dd { margin-top: 4px; font-weight: 800; font-stretch: 125%; font-size: 26px; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.readouts small { font-size: 12px; font-weight: 600; font-stretch: 100%; color: var(--muted); }
.try-controls { border-left: var(--rule) solid var(--ink); padding: 60px 0 60px 36px; display: flex; flex-direction: column; gap: 14px; }
.try-number { font-size: 112px; letter-spacing: -0.03em; line-height: 0.86; font-variant-numeric: tabular-nums; }
.try-number .percent { font-size: 0.34em; font-stretch: 100%; letter-spacing: 0; margin-left: 3px; }
.pop-caption-like { font-size: 14px; color: var(--muted); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; border-top: var(--rule) solid var(--ink); font-size: 15px; font-weight: 600; }
.switch-row small { display: block; margin-top: 2px; font-size: 13px; font-weight: 500; color: var(--muted); }
.try-controls .fineprint { padding-top: 14px; border-top: var(--rule) solid var(--ink); }

/* ---------- What it does ---------- */
.section-head { padding-top: 60px; padding-bottom: 34px; display: flex; flex-direction: column; gap: 10px; }
.feature-lead { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 30px; align-items: center; padding-top: 30px; padding-bottom: 32px; }
.feature-lead h3 { font-size: clamp(40px, 7.6vw, 104px); letter-spacing: -0.035em; line-height: 0.86; text-transform: uppercase; }
.feature-lead p { font-size: clamp(17px, 1.6vw, 21px); font-weight: 600; line-height: 1.4; max-width: 30em; }
.spec { padding-bottom: 26px; }
.spec div { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 30px; padding: 20px 0; border-bottom: var(--rule) solid var(--ink); align-items: baseline; }
.spec div:last-child { border-bottom: 0; }
.spec dt { font-weight: 800; font-stretch: 125%; font-size: clamp(17px, 1.9vw, 23px); letter-spacing: -0.01em; line-height: 1.1; }
.spec dd { color: var(--body); max-width: 34em; }

/* ---------- Privacy ---------- */
.privacy-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
.privacy-grid > div { padding: 60px 0; display: flex; flex-direction: column; gap: 16px; }
.privacy-grid > div:first-child { padding-right: 44px; }
.privacy-grid h2 { color: var(--strip-text); }
.promises { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; color: var(--strip-text); font-size: 18px; font-weight: 600; }
.promises li, .ticks li { position: relative; padding-left: 28px; }
.promises li::before, .ticks li::before { content: ""; position: absolute; left: 3px; top: 0.34em; width: 12px; height: 6.5px; border-left: 2.6px solid var(--accent); border-bottom: 2.6px solid var(--accent); transform: rotate(-45deg); }
.privacy-notes { border-left: var(--rule) solid var(--ink); padding-left: 36px !important; color: var(--body); font-size: 16px; }
.privacy-notes h3 { font-size: 16px; font-weight: 800; color: var(--ink); margin-bottom: -10px; }

/* ---------- Pricing ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.plan { padding: 34px 0 60px; display: flex; flex-direction: column; align-items: flex-start; gap: 18px; border-top: var(--rule) solid var(--ink); }
.plan + .plan { border-left: var(--rule) solid var(--ink); padding-left: 36px; }
.plan:first-child { padding-right: 36px; }
.price { font-size: clamp(64px, 10.5vw, 148px); letter-spacing: -0.04em; line-height: 0.84; white-space: nowrap; }
.price span { font-size: 0.2em; letter-spacing: 0; margin-left: 0.4em; color: var(--muted); }
.ticks { display: flex; flex-direction: column; gap: 9px; color: var(--body); flex-grow: 1; }

/* ---------- What it looks like ---------- */
.look-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 22px; align-items: start; }
.shot { display: flex; flex-direction: column; gap: 10px; }
.shot img { width: 100%; border: var(--rule) solid var(--ink); border-radius: 14px; background: #D9DCE2; }
.shot.dark img { background: #0C0F16; }
.shot.tall { grid-column: span 4; grid-row: 1 / span 2; }
.shot.wide:nth-of-type(3) { grid-row: 1; grid-column: 9 / span 4; }
.shot.wide:nth-of-type(4) { grid-row: 2; grid-column: 9 / span 4; }
.shot figcaption { font-weight: 800; font-stretch: 125%; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.look-note { padding-top: 22px; padding-bottom: 60px; }
.look-note .fineprint { max-width: none; }

/* ---------- Questions ---------- */
.questions-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
.questions .section-head { padding-right: 40px; }
.faq { border-left: var(--rule) solid var(--ink); padding: 40px 0 56px 36px; }
.faq details { border-bottom: var(--rule) solid var(--ink); }
.faq details:last-child { border-bottom: 0; }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; cursor: pointer; list-style: none; font-size: 19px; font-weight: 700; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 800; font-stretch: 125%; font-size: 24px; line-height: 1; color: var(--accent); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 0 20px; color: var(--body); max-width: 36em; }

/* ---------- Footer ---------- */
.footer { border-top: var(--rule) solid var(--ink); font-size: 15px; color: var(--body); }
.footer-grid { display: grid; grid-template-columns: 1.1fr 0.6fr 1.3fr; gap: 36px; padding-top: 44px; padding-bottom: 36px; }
.footer-grid > * { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.footer .wordmark { color: var(--ink); margin-bottom: 6px; }
.footer nav a { padding: 3px 0; }
.footer-base { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; padding-top: 16px; padding-bottom: 28px; font-size: 13px; color: var(--muted); }
.footer-base::before { content: ""; position: absolute; top: 0; left: 28px; right: 28px; border-top: var(--rule) solid var(--ink); }

/* ---------- Legal pages ---------- */
.doc-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); }
.doc-head { padding: 60px 40px 60px 0; display: flex; flex-direction: column; gap: 14px; }
.doc-head h1 { font-size: clamp(40px, 5.4vw, 72px); }
.doc-body { border-left: var(--rule) solid var(--ink); padding: 60px 0 72px 36px; color: var(--body); }
.doc-body > * { max-width: 40em; }
.doc-body h2 { font-size: 22px; font-stretch: 110%; letter-spacing: -0.01em; line-height: 1.15; color: var(--ink); margin: 34px 0 10px; }
.doc-body h2:first-child { margin-top: 0; }
.doc-body p + p, .doc-body ul + p, .doc-body p + ul { margin-top: 12px; }
.doc-body ul { list-style: disc; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.doc-body .status-strip { margin-bottom: 30px; }
.doc-body strong { color: var(--ink); font-weight: 700; }

/* ---------- Page load: the headline lands, then the popover is stamped down ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise 420ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  .hero-copy > :nth-child(2) { animation-delay: 60ms; }
  .hero-copy > :nth-child(3) { animation-delay: 120ms; }
  .hero-copy > :nth-child(4) { animation-delay: 180ms; }
  .hero-copy > :nth-child(5) { animation-delay: 240ms; }
  .hero-copy > :nth-child(6) { animation-delay: 300ms; }
  .pop { animation: stamp 360ms cubic-bezier(0.2, 0.8, 0.2, 1) 260ms both; }
  @keyframes rise { from { transform: translateY(14px); } to { transform: none; } }
  @keyframes stamp { from { transform: translate(-5px, -5px); box-shadow: 0 0 0 var(--shadow); } to { transform: none; box-shadow: 5px 5px 0 var(--shadow); } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button, .switch span { transition: none; }
}

/* ---------- Narrower screens ---------- */
@media (max-width: 1080px) {
  .hero-grid, .try-grid, .questions-grid, .doc-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { padding: 48px 0 40px; }
  .hero-stage { border-left: 0; border-top: var(--rule) solid var(--ink); padding: 36px 0 44px; grid-template-columns: 140px minmax(0, 345px); justify-content: start; }
  .try-typing { padding: 48px 0 36px; }
  .try-controls { border-left: 0; border-top: var(--rule) solid var(--ink); padding: 32px 0 48px; }
  .questions .section-head { padding-right: 0; padding-bottom: 8px; }
  .faq { border-left: 0; padding: 0 0 44px; }
  .doc-head { padding: 44px 0 28px; }
  .doc-body { border-left: 0; border-top: var(--rule) solid var(--ink); padding: 32px 0 56px; }
}
@media (max-width: 760px) {
  .wrap { padding-inline: 16px; }
  body { font-size: 16px; }
  .topnav { display: none; }
  .topbar-row { justify-content: space-between; }
  .hero-stage { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .stage-side { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 14px 18px; }
  .stage-step { min-height: 0; flex: 1 1 130px; }
  .stage-cap { width: 104px; margin: -8px 0; }
  .stage-controls { flex-direction: row; flex: 1 1 100%; margin-top: 0; }
  .stage-controls .button { flex: 1 1 0; }
  .latency { grid-template-columns: minmax(0, 1fr); }
  .latency-number { padding: 34px 0 24px; }
  .latency-copy { border-left: 0; border-top: var(--rule) solid var(--paper); padding: 18px 0 30px; }
  .try-number { font-size: 92px; }
  .try-cap { width: 88px; }
  .section-head { padding-top: 44px; padding-bottom: 26px; }
  .feature-lead, .spec div { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .privacy-grid, .pricing-grid { grid-template-columns: minmax(0, 1fr); }
  .privacy-grid > div { padding: 44px 0 28px; }
  .privacy-grid > div:first-child { padding-right: 0; }
  .privacy-notes { border-left: 0; border-top: var(--rule) solid var(--ink); padding: 28px 0 44px !important; }
  .plan { padding: 28px 0 40px; }
  .plan:first-child { padding-right: 0; }
  .plan + .plan { border-left: 0; padding-left: 0; }
  .look-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .shot.tall { grid-column: auto; grid-row: auto; }
  .shot.wide:nth-of-type(3), .shot.wide:nth-of-type(4) { grid-column: 1 / -1; grid-row: auto; }
  .faq summary { font-size: 17px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .footer-base::before { left: 16px; right: 16px; }
}
