/* Baseline: the one shared stylesheet for the public text pages (#340).
   The design is temporary (Kenny, 24 Oct): every colour, font, size and space is a variable in the two :root blocks
   below, so a new look is a change to those blocks only. Two weights (400, 500), sentence case, no all caps.
   The shared base (colours, font families, type scale, spacing scale, borders, radii) lives in design/tokens.css (#370),
   loaded before this file as /assets/tokens.css. This file is the text-page layer: it maps its names onto the base and
   sets what is specific to these pages. No colour value belongs here (a test fails any). */

@font-face {
  font-family: "Haffer XH";
  src: url("../fonts/HafferXH-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Haffer XH";
  src: url("../fonts/HafferXH-Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Haffer XH Mono";
  src: url("../fonts/HafferXHMono-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Metric-matched fallbacks (#597): shown while the Haffer files load, so the swap moves nothing. size-adjust was measured
   in headless Chrome (the About lede's width, Haffer XH Regular against Liberation Sans, which has Arial's widths: 1.066 for the lede, 1.077 for body copy, 1.0655 over the whole page, so 1.07;
   the mono against Liberation Mono, which has Courier New's: 0.995). Chrome scales the overrides by size-adjust, so they
   are the Haffer metrics (ascent 0.95, descent 0.24, no line gap) divided by it. */
@font-face {
  font-family: "Haffer XH Fallback";
  src: local("Arial"), local("Helvetica"), local("Liberation Sans");
  size-adjust: 107%;
  ascent-override: 88.8%;
  descent-override: 22.4%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Haffer XH Mono Fallback";
  src: local("Menlo"), local("Courier New"), local("Liberation Mono");
  size-adjust: 99.5%;
  ascent-override: 95.5%;
  descent-override: 24.1%;
  line-gap-override: 0%;
}

:root {
  /* fonts */
  --font-mono: var(--font-mono-brand);   /* --font-sans, --weight-regular and --weight-strong come from the base */

  /* colours */
  --c-bg: var(--color-paper);
  --c-ink: var(--color-ink);         /* headings, active nav */
  --c-text: var(--color-text);        /* body */
  --c-lede: var(--color-lede);        /* intro paragraph */
  --c-muted: var(--color-muted);       /* nav, legal links */
  --c-status-label: var(--c-text);   /* status labels (About): body text, not the darker ink */
  --c-status-value: var(--c-muted);  /* status values (Live now, In the works, Later) */
  --c-wordmark: var(--color-ink);     /* the big footer wordmark (an SVG mask, so this colour reaches it) */
  --c-faint: var(--color-faint);       /* wordmark in the nav, code labels */
  --c-line: var(--color-line);
  --c-panel: var(--color-panel);       /* title bar of the terminal card */
  --c-card: var(--color-white);
  --c-accent: var(--color-accent);      /* links and the price chart line (signup not connected yet) */
  --c-accent-soft: var(--color-accent-soft); /* the answer box on the price pages (signup not connected yet) */
  --c-dot-1: var(--color-dot-1);
  --c-dot-2: var(--color-dot-2);
  --c-dot-3: var(--color-dot-3);
  --c-hl-about: var(--color-dot-peach);          /* Highlight hover (#580), one pastel per sidebar item */
  --c-hl-how-we-check: var(--color-dot-butter);
  --c-hl-how-we-visit-stores: var(--color-dot-lilac);
  --c-hl-bot: var(--color-dot-mint);
  --c-home-dot-ink: var(--color-ink);          /* the home page's nine dots (#593), in page order */
  --c-home-dot-peach: var(--color-dot-peach);
  --c-home-dot-purple: var(--color-dot-purple);
  --c-home-dot-red: var(--color-dot-1);
  --c-home-dot-butter: var(--color-dot-butter);
  --c-home-dot-green: var(--color-dot-3);
  --c-home-dot-blue: var(--color-dot-blue);
  --c-home-dot-yellow: var(--color-dot-2);
  --c-home-dot-orange: var(--color-dot-orange);
  --c-button-text: var(--color-white);

  /* type sizes and line heights (desktop) */
  --fs-display: clamp(2.875rem, 6.667vw, 6rem);   /* 46px on phones, 96px at 1440 */
  --lh-display: 1.08;
  --ls-display: -0.025em;
  --fs-lede: var(--text-xl);
  --lh-lede: 1.55;
  --fs-h2: var(--text-2xl);
  --lh-h2: 1.25;
  --ls-h2: -0.01em;
  --fs-body: var(--text-lg);
  --lh-body: 1.78;           /* unitless: scales with the size on phones, so the ratio holds */
  --lh-list: 1.6;            /* list and status rows */
  --fs-nav: 1.25rem;         /* sidebar links, 20px (Figma v4, #580); the phone block puts the top bar back to 16px */
  --lh-nav: 24px;
  --fs-logo: 1.5625rem;      /* "baseline" in the sidebar, 25px */
  --lh-logo: 39px;           /* the logo's box height; its text sits at the top in a normal line (#580, variant F) */
  --fs-legal: var(--text-md);   /* Privacy and Terms keep their own size, line and gap, apart from the nav (#580) */
  --lh-legal: 20px;
  --fs-menu-nav: 1.875rem;
  --fs-code: var(--text-sm);
  --fs-code-small: var(--text-xs);
  --fs-small: var(--text-sm);

  /* layout and space (desktop) */
  --gutter: var(--space-7);
  --sidebar-w: 318px;
  --col-gap: var(--space-5);
  --main-w: 1002px;
  --measure: 720px;
  --lede-w: 774px;
  --page-pt: 40px;
  --page-pb: 120px;
  --nav-gap: 18px;           /* 20px links on a 42px pitch */
  --logo-gap: 21px;          /* logo line box to the first link */
  --join-gap: 44px;          /* last link to "Join the list", so it reads as its own call to action */
  --legal-gap: 14px;
  --hero-top: 72px;
  /* Cap lines (#580): the columns line up on the tops of the capitals, not on the text boxes. A line's cap top sits
     (line height - (ascent + descent) x size) / 2 + (ascent - cap) x size below its line box top (font metrics in
     design/tokens.css). At 1440: H1 96px in a 103.68px line, cap 18.72px down; nav 20px in 24px, cap 5.1px down. */
  --cap-display: calc((var(--lh-display) - var(--font-sans-ascent) - var(--font-sans-descent)) * var(--fs-display) / 2
                      + (var(--font-sans-ascent) - var(--font-sans-cap)) * var(--fs-display));
  --cap-nav: calc((var(--lh-nav) - (var(--font-sans-ascent) + var(--font-sans-descent)) * var(--fs-nav)) / 2
                  + (var(--font-sans-ascent) - var(--font-sans-cap)) * var(--fs-nav));
  --cap-legal: calc((var(--lh-legal) - (var(--font-sans-ascent) + var(--font-sans-descent)) * var(--fs-legal)) / 2
                    + (var(--font-sans-ascent) - var(--font-sans-cap)) * var(--fs-legal));
  /* "About" shares the H1's cap line at every desktop width: 24.32px at 1440. The metric formula gives 25.62px; the
     -1.3px corrects the font's rendered cap top against the metric (measured Nov 1, headless Chrome at 1440: "About"
     sat 1.6px below the H1's "B"; the browser snaps the rest to whole pixels) */
  --sidebar-pt: calc(var(--hero-top) + var(--cap-display) - var(--lh-logo) - var(--logo-gap) - var(--cap-nav) - 1.3px);
  /* puts the subtitle's first cap line on the 4th nav row's (3 pitches below "About") at 1440, after the sidebar's
     -1.3px. Figma's 34px assumes a 100px H1 line; the live H1 line is 103.68px (variant D, Kenny Nov 1) */
  --lede-gap: 29.7px;
  --after-lede: 80px;           /* subheading to the first section or the terminal card (was 64px) */
  --section-pb: 80px;           /* space before each new section: the largest gap in the column (was 56px) */
  --head-gap: var(--space-4);         /* heading to its first paragraph (unchanged) */
  --para-gap: 22px;          /* between paragraphs in a section */
  --gap-before-list: 40px;   /* intro text to a list or table, total */
  --gap-after-list: 48px;    /* list or table to the next paragraph, total; always below --section-pb (was 72px) */
  --radius-card: var(--radius-lg);
  --footer-top: 28px;
  --footer-gap: var(--space-7);
  --topbar-pt: 58px;
  --topbar-pb: 16px;
  /* motion (#599, first-visit reveal): each piece fades in and rises, one step after the one before */
  --reveal-step: 70ms;
  --reveal-dur: 300ms;
  --reveal-dist: 8px;
}

@media (max-width: 960px) {
  :root {
    --ls-display: -0.02em;
    --fs-lede: 1.1875rem;
    --fs-h2: 1.5rem;
    --fs-body: 1.0625rem;
    --fs-legal: 0.9375rem;
    --fs-code: 0.78125rem;
    --fs-code-small: 0.6875rem;
    --fs-nav: var(--text-md);   /* the top bar and menu stay as they were (#580): mobile is unchanged */
    --lh-nav: 20px;
    --gutter: 20px;
    --page-pt: 28px;
    --page-pb: 72px;
    --hero-top: 0px;
    --lede-gap: 18px;
    --after-lede: 56px;
    --section-pb: 56px;
    --head-gap: 12px;
    --para-gap: 20px;
    --gap-before-list: 36px;
    --gap-after-list: 36px;
    --radius-card: 14px;
    --footer-top: 32px;
    --footer-gap: 28px;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; background: var(--c-bg); }   /* any overscroll shows the page colour, not a seam */
/* Mac font smoothing (Kenny, Nov 1): closer to Figma's rendering on Mac */
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
/* desktop: no rubber-band past the end of the page, so the cropped wordmark stops dead (#580). Phones keep their bounce. */
@media (min-width: 961px) {
  html, body { overscroll-behavior-y: none; }
}

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-sans);
  font-weight: var(--weight-regular);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-variant-numeric: tabular-nums;
}

a { color: inherit; }
code { font-family: var(--font-mono); font-size: 0.9em; }

/* ---- page frame ---- */
.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, var(--main-w));
  column-gap: var(--col-gap);
  max-width: calc(var(--sidebar-w) + var(--col-gap) + var(--main-w) + 2 * var(--gutter));
  margin: 0 auto;
  padding: var(--page-pt) var(--gutter) var(--page-pb);
}

/* sidebar (desktop) */
.sidebar { padding-top: var(--sidebar-pt); align-self: start; position: sticky; top: var(--page-pt); }
.nav { display: flex; flex-direction: column; gap: var(--nav-gap); font-size: var(--fs-nav); line-height: var(--lh-nav); }
.nav a { color: var(--c-muted); text-decoration: none; transition: color 150ms ease; }
.nav a:hover, .nav a:focus-visible { color: var(--c-ink); }
.nav a[aria-current="page"] { color: var(--c-ink); font-weight: var(--weight-strong); }
/* the logo sits at the top of a 39px box, as in Figma (node 337:5 "Logo text": 25px, line height normal, a fixed 39px
   box, text at the top); centring it in a 39px line put it (39 - 1.19 x 25) / 2 = 4.6px low (variant F, Kenny Nov 1).
   The box stays 39px, so the gap, "About" and everything below don't move. The sidebar shows on desktop only. */
.nav a.home { display: block; color: var(--c-faint); font-size: var(--fs-logo); line-height: normal; height: var(--lh-logo); margin-bottom: calc(var(--logo-gap) - var(--nav-gap)); }
.nav a.join { margin-top: calc(var(--join-gap) - var(--nav-gap)); font-size: var(--fs-nav); font-weight: var(--weight-strong); color: var(--c-accent); text-underline-offset: 3px; }
.nav a.join:hover, .nav a.join:focus-visible { color: var(--c-accent); text-decoration: underline; }
/* Sidebar hover, two versions to compare (#580). Quiet (above) is the default: Muted to Ink. Highlight turns on with the
   URL hash #highlight (base.html has an empty, hidden #highlight to target, so no script): a marker-pen band of the
   item's pastel fills in behind the lower 60% of the line, left to right; the text goes to Ink. */
.nav .item-about { --hl: var(--c-hl-about); }
.nav .item-how-we-check { --hl: var(--c-hl-how-we-check); }
.nav .item-how-we-visit-stores { --hl: var(--c-hl-how-we-visit-stores); }
.nav .item-bot { --hl: var(--c-hl-bot); }
body:has(#highlight:target) .nav a.item { position: relative; z-index: 0; align-self: flex-start; }
body:has(#highlight:target) .nav a.item::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -0.15em;
  right: -0.15em;
  bottom: 0;
  height: 60%;
  background: var(--hl);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 200ms ease-out;
}
body:has(#highlight:target) .nav a.item:hover::before,
body:has(#highlight:target) .nav a.item:focus-visible::before { transform: scaleX(1); }
@media (prefers-reduced-motion: reduce) {
  body:has(#highlight:target) .nav a.item::before { transform: none; opacity: 0; transition: opacity 200ms ease-out; }
  body:has(#highlight:target) .nav a.item:hover::before,
  body:has(#highlight:target) .nav a.item:focus-visible::before { opacity: 1; }
}

/* top bar and menu (phone) */
.topbar { display: none; }

/* ---- content ---- */
.main { min-width: 0; padding-top: var(--hero-top); }
.display {
  margin: 0;
  font-weight: var(--weight-regular);
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  letter-spacing: var(--ls-display);
  color: var(--c-ink);
  overflow-wrap: break-word;
  text-wrap: balance;
}
.lede {
  margin: var(--lede-gap) 0 0;
  max-width: var(--lede-w);
  font-size: var(--fs-lede);
  line-height: var(--lh-lede);
  color: var(--c-lede);
  text-wrap: pretty;
}
.main > .lede + * { margin-top: var(--after-lede); }

.section {
  max-width: var(--measure);
  padding-bottom: var(--section-pb);
}
.section > * { margin: 0; }
.section > * + * { margin-top: var(--para-gap); }
.section > h2 + * { margin-top: var(--head-gap); }
.section > p { text-wrap: pretty; }
.section > .steps, .section > table { margin-top: var(--gap-before-list); }
.section > .steps + *, .section > table + * { margin-top: var(--gap-after-list); }
.section h2 {
  font-weight: var(--weight-strong);
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  letter-spacing: var(--ls-h2);
  color: var(--c-ink);
}
.section a { text-underline-offset: 3px; }
.more { font-weight: var(--weight-strong); color: var(--c-ink); }
.more a { text-decoration: none; }
.more a:hover { text-decoration: underline; }
.links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.built { margin: 0; font-size: var(--fs-small); line-height: 20px; color: var(--c-muted); }

/* steps (About) */
.steps { list-style: none; margin: 0; padding: 0; border-bottom: var(--border-width) solid var(--c-line); }
.steps li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-top: var(--border-width) solid var(--c-line);
  line-height: var(--lh-list);
}
.steps li span:first-child { color: var(--c-status-label); }
.steps li span:last-child { color: var(--c-status-value); }

/* terminal card (BaselineBot) */
.terminal {
  max-width: var(--measure);
  margin-bottom: var(--after-lede);
  background: var(--c-card);
  border: var(--border-width) solid var(--c-line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: var(--fs-code);
  line-height: normal;
  color: var(--c-ink);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  background: var(--c-panel);
  border-bottom: var(--border-width) solid var(--c-line);
  font-size: var(--fs-code-small);
  color: var(--c-muted);
}
.dot { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.dot:nth-child(1) { background: var(--c-dot-1); }
.dot:nth-child(2) { background: var(--c-dot-2); }
.dot:nth-child(3) { background: var(--c-dot-3); }
.terminal-title { margin-left: 4px; }
.terminal-body { padding: 20px 24px 22px; display: flex; flex-direction: column; gap: 8px; }
.terminal-body p, .terminal-body dl, .terminal-body dd { margin: 0; }
.terminal-body .faint, .terminal-body dt { color: var(--c-faint); }
.terminal-body dl { margin: 6px 0; display: flex; flex-direction: column; gap: 8px; }
.terminal-body .row { display: flex; }
.terminal-body dt { width: 170px; flex: none; }
.terminal-body dd { overflow-wrap: anywhere; }
.cursor { display: inline-block; width: 8px; height: 16px; background: var(--c-ink); vertical-align: middle; margin-left: 6px; }

/* terminal animation (#591, slower in #612): a try-out, delete this block to throw it away. Text is in the HTML from the
   start; this only hides and reveals it. Plays once per load, about 2.8s: the command types from 200ms for 1200ms, the
   caret fades as it ends (1400ms), a 300ms pause, the rows from 1700ms 150ms apart, the last prompt at 2600ms. Only the
   intro pieces (.intro-row, .intro-prompt) animate: lines the commands script adds show at once. #634: when the
   first-visit reveal (#599) plays, the terminal waits for it: it holds its first frame (term-wait, paused) until
   reveal-go, then runs with --term-start 900ms added to every delay (term-late), so it opens after the reveal's last
   piece lands (about 790ms). With no reveal (repeat visit, reduced motion) --term-start stays 0ms: no extra delay. */
.terminal {
  --term-start: 0ms;
  --term-blink: 1.6s;
  --term-type-delay: 200ms;
  --term-type: 1200ms;
  --term-row-first: 1700ms;
  --term-row-step: 150ms;
  --term-row-fade: 150ms;
  --term-prompt: 2600ms;
  position: relative;
  animation: term-open 200ms ease-out var(--term-start) both;
}
.terminal.term-late { --term-start: 900ms; }
.terminal.term-closed .terminal-bar { border-bottom: 0; }
.terminal.term-closed .terminal-body { display: none; }
.terminal .typed {
  display: inline-block;
  width: 17ch;
  overflow: hidden;
  white-space: nowrap;
  vertical-align: bottom;
  border-right: 2px solid var(--c-ink);
  animation: term-type var(--term-type) steps(17) calc(var(--term-type-delay) + var(--term-start)) both,
             term-caret 100ms linear calc(var(--term-type-delay) + var(--term-type) + var(--term-start)) forwards;
}
.terminal .intro-row { animation: term-line var(--term-row-fade) linear var(--term-start) both; }
.terminal .intro-row:nth-child(1) { animation-delay: calc(var(--term-row-first) + var(--term-start)); }
.terminal .intro-row:nth-child(2) { animation-delay: calc(var(--term-row-first) + var(--term-row-step) + var(--term-start)); }
.terminal .intro-row:nth-child(3) { animation-delay: calc(var(--term-row-first) + 2 * var(--term-row-step) + var(--term-start)); }
.terminal .intro-row:nth-child(4) { animation-delay: calc(var(--term-row-first) + 3 * var(--term-row-step) + var(--term-start)); }
.terminal .intro-row:nth-child(5) { animation-delay: calc(var(--term-row-first) + 4 * var(--term-row-step) + var(--term-start)); }
.terminal .intro-prompt { animation: term-line var(--term-row-fade) linear calc(var(--term-start) + var(--term-prompt)) both; }
.terminal .cursor { animation: term-blink var(--term-blink) steps(1) calc(var(--term-start) + var(--term-prompt)) infinite; }
/* last on purpose: the animation shorthands above reset play-state, and this ties them on specificity */
.terminal.term-wait, .terminal.term-wait * { animation-play-state: paused; }
@keyframes term-open { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes term-type { from { width: 0; } to { width: 17ch; } }
@keyframes term-caret { to { border-right-color: transparent; } }
@keyframes term-line { from { opacity: 0; } to { opacity: 1; } }
@keyframes term-blink { 50% { opacity: 0; } }
@keyframes term-blink-on { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .terminal, .terminal .typed, .terminal .intro-row, .terminal .intro-prompt, .terminal .cursor { animation: none; }
  .terminal .typed { border-right-color: transparent; }
}

/* terminal commands (#612): the red dot folds the box; click the box and type. The input is invisible but on screen
   (16px so iOS doesn't zoom); what is typed is mirrored after the prompt. */
.dot-close { border: 0; padding: 0; margin: 0; appearance: none; cursor: pointer; }
.dot-close:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
/* #629 + #644: no outline around the box while typing. Focus shows as the cursor turning accent blue; it keeps blinking
   (a solid cursor read as stopped). The input is enabled only after --term-prompt; the switch to term-blink-on (same
   keyframes, new name) restarts the blink at that moment, so the first blink is unchanged (a delay change alone would
   jump mid-cycle). Reduced motion: no blink, the blue still shows focus. term-fresh (#644) is set by the red dot's
   reopen: the box starts over with only a prompt, so the intro pieces do not replay and the cursor blinks at once. */
.terminal:has(.term-input:focus) .cursor { background: var(--c-accent); }
.terminal:has(.term-input:not(:disabled)) .cursor { animation-delay: 0s; }
.terminal:has(.term-input:not(:disabled)) .cursor { animation-name: term-blink-on; }
.terminal.term-fresh .typed, .terminal.term-fresh .intro-row, .terminal.term-fresh .intro-prompt { animation: none; }
.terminal.term-fresh .cursor { animation-delay: 0s; }
@media (prefers-reduced-motion: reduce) {
  .terminal:has(.term-input:not(:disabled)) .cursor { animation: none; }
}
.term-input {
  position: absolute; top: 0; left: 0; width: 1px; height: 1px;
  padding: 0; border: 0; outline: none; opacity: 0; font-size: 16px; pointer-events: none;
}
.term-out { display: flex; flex-direction: column; gap: 8px; }
.term-out:empty { display: none; }
.term-out p, .term-typed { white-space: pre-wrap; overflow-wrap: anywhere; }
.term-row { display: flex; }
.term-row > .faint { width: 170px; flex: none; }
.terminal-body.term-cleared .intro-cmd, .terminal-body.term-cleared .intro-rows { display: none; }
.intro-prompt .cursor { margin-left: 0; }
/* #630: a faint hint after the cursor; gone without the script (input disabled), on focus and once text is typed. */
.term-hint { margin-left: 1ch; }
.terminal:has(.term-input:disabled) .term-hint, .terminal:has(.term-input:focus) .term-hint, .terminal:has(.term-input:not(:placeholder-shown)) .term-hint { display: none; }

/* first-visit reveal (#599): a try-out, delete this block (and _reveal.html) to throw it away. Content is visible by
   default: the head script adds html.reveal only when it should play, so everything here sits under html.reveal. */
html.reveal :is(.sidebar .nav .home, .sidebar .nav a.item, main.main > h1.display, main.main > .lede, main.main > .lede ~ :not(.terminal), .topbar .home, .topbar .menu summary) { opacity: 0; }
html.reveal.reveal-go :is(.sidebar .nav .home, .sidebar .nav a.item, main.main > h1.display, main.main > .lede, main.main > .lede ~ :not(.terminal), .topbar .home, .topbar .menu summary) {
  animation: reveal-rise var(--reveal-dur) ease-out both;
  animation-delay: calc(var(--reveal-step) * var(--reveal-i, 0));
}
.sidebar .nav .item-about { --reveal-i: 1; }
.sidebar .nav .item-how-we-check { --reveal-i: 2; }
.sidebar .nav .item-how-we-visit-stores { --reveal-i: 3; }
.sidebar .nav .item-bot { --reveal-i: 4; }
main.main > h1.display { --reveal-i: 5; }
main.main > .lede { --reveal-i: 6; }
main.main > .lede ~ :not(.terminal) { --reveal-i: 7; }
@media (max-width: 960px) {
  main.main > h1.display { --reveal-i: 1; }
  main.main > .lede { --reveal-i: 2; }
  main.main > .lede ~ :not(.terminal) { --reveal-i: 3; }
}
@keyframes reveal-rise { from { opacity: 0; transform: translateY(var(--reveal-dist)); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html.reveal :is(.sidebar .nav .home, .sidebar .nav a.item, main.main > h1.display, main.main > .lede, main.main > .lede ~ :not(.terminal), .topbar .home, .topbar .menu summary) { opacity: 1; animation: none; }
}

/* ---- price pages (model, index) ---- */
.price-page .muted { color: var(--c-muted); }
.price-page .small { font-size: var(--fs-small); line-height: var(--lh-list); }
.price-page a { color: var(--c-accent); }
.price-page .answer {
  font-weight: var(--weight-strong);
  font-size: var(--fs-lede);
  line-height: var(--lh-lede);
  color: var(--c-ink);
  background: var(--c-accent-soft);
  border: var(--border-width) solid var(--c-line);
  border-radius: var(--radius-card);
  padding: var(--space-4) var(--space-5);
}
.price-page .wrap { overflow-x: auto; }
.price-page table { border-collapse: collapse; width: 100%; font-size: var(--text-md); line-height: var(--lh-list); }
.price-page caption { text-align: left; color: var(--c-muted); font-size: var(--fs-small); padding-bottom: var(--space-2); }
.price-page th, .price-page td { text-align: left; vertical-align: top; padding: var(--space-3) var(--space-2); border-bottom: var(--border-width) solid var(--c-line); }
.price-page th { font-size: var(--fs-small); font-weight: var(--weight-strong); color: var(--c-muted); }
.price-page .n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.price-page table.also td { color: var(--c-muted); }
.price-page .price-list { list-style: none; margin: 0; padding: 0; border-bottom: var(--border-width) solid var(--c-line); }
.price-page .price-list li { padding: 14px 0; border-top: var(--border-width) solid var(--c-line); line-height: var(--lh-list); }
.price-page .price-list strong { font-weight: var(--weight-strong); color: var(--c-ink); font-variant-numeric: tabular-nums; }
.price-page figure.chart { margin: 0; min-width: 300px; }
.price-page figure.chart svg { display: block; width: 100%; max-width: 30rem; height: auto; }
.price-page figure.chart .grid { stroke: var(--c-line); stroke-width: 1; }
.price-page figure.chart .tick { fill: var(--c-muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.price-page figure.chart .line { fill: none; stroke: var(--c-accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.price-page figure.chart .dot { width: auto; height: auto; border-radius: 0; fill: var(--c-accent); background: none; }
.price-page figcaption { color: var(--c-muted); font-size: var(--fs-small); margin-top: var(--space-2); }
.price-page .price-foot { color: var(--c-muted); font-size: var(--fs-small); line-height: var(--lh-list); }
.price-page .price-foot p { margin: 0; }
.price-page .price-foot p + p { margin-top: var(--space-2); }
/* The comparison page (#434): the quick answer first, terms columns in the store table, fit facts as label and value */
.price-page.quick { padding-bottom: var(--space-7); }
/* The featured image (#934): a square made at build time, product on white, at the top of the product block */
.price-page .product-image { display: block; margin-bottom: var(--space-5); }
.price-page .product-image img { display: block; width: 100%; max-width: 20rem; height: auto; background: var(--color-white); border-radius: var(--radius-md); }
/* The gallery (#1614, --gallery): a row of thumbnails under the main photo; a thumbnail's link makes its large copy the
   :target, which takes the main photo's place. No script. Without :has the large copy shows under the main photo. */
.price-page .gallery-large { display: none; scroll-margin-top: var(--space-5); }
.price-page .gallery-large:target { display: block; }
.price-page:has(.gallery-large:target) > .product-image:not(.gallery-large) { display: none; }
.price-page .gallery-thumbs { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; margin: 0 0 var(--space-5); padding: 0; }
.price-page .gallery-thumbs li { margin: 0; padding: 0; }
.price-page .gallery-thumbs a { display: block; width: 4rem; height: 4rem; border: var(--border-width) solid var(--color-line); border-radius: var(--radius-sm); overflow: hidden; background: var(--color-white); }
.price-page .gallery-thumbs a:hover { border-color: var(--c-muted); }
.price-page .gallery-thumbs a:focus-visible { outline: 2px solid var(--c-accent); outline-offset: var(--space-1); }
.price-page .gallery-thumbs img { display: block; width: 100%; height: 100%; }
.price-page .why-here { color: var(--c-ink); }
.price-page .fit-line { color: var(--c-muted); }
.price-page.quick > .pick-mark + * { margin-top: var(--space-2); }
.main > .lede + .price-page.quick { margin-top: var(--space-6); }
.price-page.quick > h2 { font-size: var(--fs-small); color: var(--c-muted); }
.price-page.quick > h2 + .answer { margin-top: var(--space-2); }
.price-page h3 { font-weight: var(--weight-strong); font-size: var(--text-md); margin-top: var(--space-6); }
.price-page td.terms { min-width: 9rem; color: var(--c-muted); }
.price-page .fit-facts { margin-top: var(--head-gap); border-top: var(--border-width) solid var(--c-line); }
.price-page .fit-facts div { display: grid; grid-template-columns: 10rem 1fr; gap: var(--space-3); padding: var(--space-3) 0; border-bottom: var(--border-width) solid var(--c-line); }
.price-page .fit-facts dt { font-weight: var(--weight-strong); }
.price-page .fit-facts dd { margin: 0; }
.price-page .fit-help { display: block; margin-top: var(--space-1); }
@media (max-width: 600px) {
  .price-page .fit-facts div { grid-template-columns: 1fr; gap: var(--space-1); }
}

/* ---- footer ---- */
.footer {
  border-top: var(--border-width) solid var(--c-line);
  padding: var(--footer-top) var(--gutter) 0;
  overflow: hidden;
}
.footer-inner {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, var(--main-w));
  column-gap: var(--col-gap);
  align-items: end;
  max-width: calc(var(--sidebar-w) + var(--col-gap) + var(--main-w));
  margin: 0 auto;
  padding-top: var(--footer-gap);
}
/* the cap top of "Privacy" sits on the top edge of the wordmark (the tops of its "b" and "l", which are the mask's top,
   so the element's top), mirroring the header rule (#580): the line box starts --cap-legal (4.48px) above it */
.legal { display: flex; flex-direction: column; gap: var(--legal-gap); font-size: var(--fs-legal); line-height: var(--lh-legal); align-self: start; margin-top: calc(-1 * var(--cap-legal)); }
.legal a { color: var(--c-muted); text-decoration: none; }
.legal a:hover { color: var(--c-ink); }
.legal a[aria-current="page"] { color: var(--c-ink); font-weight: var(--weight-strong); }
/* the wordmark runs off the bottom edge, as in the design: show the top 85% of it. The SVG is a mask, so its colour is --c-wordmark */
.wordmark {
  display: block;
  width: 100%;
  aspect-ratio: 1002 / 157;
  background: var(--c-wordmark);
  -webkit-mask: url("../assets/baseline-wordmark.svg") no-repeat top / 100% auto;
  mask: url("../assets/baseline-wordmark.svg") no-repeat top / 100% auto;
}

/* ---- phone ---- */
@media (max-width: 960px) {
  .layout { display: block; }
  .sidebar { display: none; }

  .steps li { flex-direction: column; gap: 2px; padding: 12px 0; }

  .terminal-bar { padding: 11px 14px; gap: 7px; }
  .dot { width: 10px; height: 10px; }
  .terminal-body { padding: 16px 16px 18px; gap: 7px; }
  .terminal-body .row { flex-direction: column; gap: 1px; }
  .terminal-body dt { width: auto; font-size: 0.92em; }
  .term-row { flex-direction: column; gap: 1px; }
  .term-row > .faint { width: auto; font-size: 0.92em; }
  .cursor { width: 7px; height: 14px; }

  .topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 30;
    padding: var(--topbar-pt) var(--gutter) var(--topbar-pb);
    background: var(--c-bg);
    font-size: var(--fs-nav);
    line-height: var(--lh-nav);
  }
  .topbar .home { color: var(--c-faint); text-decoration: none; position: relative; z-index: 25; }
  .menu summary { list-style: none; cursor: pointer; position: relative; z-index: 25; color: var(--c-ink); font-weight: var(--weight-strong); }
  .menu summary::-webkit-details-marker { display: none; }
  .menu .when-open, .menu[open] .when-closed { display: none; }
  .menu[open] .when-open { display: inline; }
  .menu-panel {
    display: none;
    flex-direction: column;
    position: fixed;
    inset: 0;
    z-index: 20;
    overflow-y: auto;
    padding: calc(var(--topbar-pt) + var(--lh-nav) + 40px) var(--gutter) 24px;
    background: var(--c-bg);
  }
  .menu[open] .menu-panel { display: flex; }
  .menu-nav { display: flex; flex-direction: column; gap: 18px; font-size: var(--fs-menu-nav); line-height: normal; letter-spacing: -0.01em; }
  .menu-nav a { color: var(--c-muted); text-decoration: none; }
  .menu-nav a[aria-current="page"] { color: var(--c-ink); font-weight: var(--weight-strong); }
  .menu-legal { display: flex; gap: 20px; margin-top: 36px; font-size: var(--fs-nav); color: var(--c-muted); }
  .menu-legal a { color: inherit; text-decoration: none; }
  .menu-legal a[aria-current="page"] { color: var(--c-ink); font-weight: var(--weight-strong); }
  .menu-panel .wordmark { margin-top: auto; aspect-ratio: 1002 / 184; flex: none; }

  .footer-inner { display: block; padding-top: 0; }
  .legal { flex-direction: row; gap: 20px; margin-top: 0; padding-bottom: var(--footer-gap); }
  .wordmark { aspect-ratio: 350 / 52; }
}

/* The "Baseline pick" mark (#470): a curated recommendation, shown on the hub row and under the model name */
.pick-mark { display: inline-block; font-size: 0.8125rem; font-weight: var(--weight-strong); padding: 0 0.5em; border: 1px solid currentColor; border-radius: 0.25em; }
.pick-reasons { margin: 0.5em 0 0; }

/* ---- home page (#593): its own layout, the Figma "B · A1 Home" (desktop node 184:981 at 1440, mobile 184:1192 at 390).
   No sidebar and no big footer wordmark: base.html's body block is replaced. Every size is a token here. ---- */
:root {
  --home-w: 1168px;            /* top bar and footer run x 136 to 1304 at 1440 */
  --home-gutter: 24px;
  --home-top-pt: 32px;
  --home-fs-small: var(--text-sm);
  --home-lh-small: 20px;
  /* #619: the four vertical gaps shrink with the window height, one after another, so a laptop window shows the whole page
     (total = viewport height - 3px from 900 down to 684; at 900 and taller they are the frame's 146, 110, 56, 56).
     The mobile block below sets its own values. */
  --home-hero-pt: clamp(48px, calc(100svh - 754px), 146px);   /* the wordmark's top 198px down at 900: 32 + 20 + 146 */
  --home-hero-pb: clamp(40px, calc(100svh - 692px), 110px);   /* the note to the footer hairline (828 at 1440 x 900) */
  --home-hero-w: 900px;
  --home-wordmark-w: 380px;    /* 380 by 70, the 1002 by 184 artwork */
  --home-dots-gap: 22px;       /* wordmark to the dots, as measured on the frame (dots 290 to 302 at 1440; the brief said 12) */
  --home-dot: 12px;
  --home-dot-gap: 10px;        /* nine 12px dots in 188px */
  --home-title-gap: clamp(32px, calc(100svh - 676px), 56px);  /* dots to the H1 */
  --home-fs-title: 3.75rem;    /* 60px on a 66px line, two lines in 900 */
  --home-lh-title: 1.1;
  --home-ls-title: -0.02em;
  --home-lede-gap: 18px;
  --home-lede-w: 600px;
  --home-fs-lede: 1.25rem;     /* 20px on a 32px line */
  --home-lh-lede: 1.6;
  --home-button-gap: clamp(32px, calc(100svh - 652px), 56px);
  --home-button-h: 52px;
  --home-button-px: 30px;      /* 149 wide with "Join the list" */
  --home-fs-button: 1.0625rem; /* 17px */
  --home-note-gap: 14px;
  --home-footer-pt: 20px;
  --home-footer-pb: 32px;
  --home-links-gap: 28px;
  --home-fs-legal: var(--text-xs);
}
@media (max-width: 960px) {
  :root {
    --home-top-pt: 18px;
    --home-fs-small: 0.8125rem;  /* 13px, so the top bar stays on one line at 390 */
    --home-hero-pt: 154px;
    --home-hero-pb: 100px;
    --home-wordmark-w: 230px;
    --home-dots-gap: 18px;
    --home-dot: 10px;
    --home-dot-gap: 8px;
    --home-title-gap: 40px;
    --home-fs-title: 2.25rem;    /* 36px, three lines at 390 */
    --home-lh-title: 1.12;
    --home-ls-title: -0.01em;
    --home-lede-gap: 16px;
    --home-fs-lede: 1.125rem;
    --home-lh-lede: 1.55;
    --home-button-gap: 40px;
    --home-button-h: 48px;
    --home-footer-pt: 18px;
    --home-footer-pb: 28px;
    --home-links-gap: 20px;
  }
}
.home-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  max-width: calc(var(--home-w) + 2 * var(--home-gutter));
  margin: 0 auto;
  padding: 0 var(--home-gutter);
  font-size: var(--home-fs-small);
  line-height: var(--home-lh-small);
}
.home-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 var(--space-4); padding-top: var(--home-top-pt); color: var(--c-muted); }   /* one line from 360 up; wraps below rather than scroll */
.home-domain { color: var(--c-faint); }
.home-hero { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; padding: var(--home-hero-pt) 0 var(--home-hero-pb); }
/* the whole wordmark (not the footer's 85% crop, so not .wordmark); an SVG mask, so its colour is --c-wordmark */
.home-wordmark {
  display: block;
  width: var(--home-wordmark-w);
  max-width: 100%;
  aspect-ratio: 1002 / 184;
  background: var(--c-wordmark);
  -webkit-mask: url("../assets/baseline-wordmark.svg") no-repeat center / 100% 100%;
  mask: url("../assets/baseline-wordmark.svg") no-repeat center / 100% 100%;
}
.home-dots { display: flex; gap: var(--home-dot-gap); margin-top: var(--home-dots-gap); }
.home-dot { width: var(--home-dot); height: var(--home-dot); border-radius: 50%; flex: none; background: var(--hd); }
.home-dot-ink { --hd: var(--c-home-dot-ink); }
.home-dot-peach { --hd: var(--c-home-dot-peach); }
.home-dot-purple { --hd: var(--c-home-dot-purple); }
.home-dot-red { --hd: var(--c-home-dot-red); }
.home-dot-butter { --hd: var(--c-home-dot-butter); }
.home-dot-green { --hd: var(--c-home-dot-green); }
.home-dot-blue { --hd: var(--c-home-dot-blue); }
.home-dot-yellow { --hd: var(--c-home-dot-yellow); }
.home-dot-orange { --hd: var(--c-home-dot-orange); }
.home-title {
  max-width: var(--home-hero-w);
  margin: var(--home-title-gap) 0 0;
  font-weight: var(--weight-regular);
  font-size: var(--home-fs-title);
  line-height: var(--home-lh-title);
  letter-spacing: var(--home-ls-title);
  color: var(--c-ink);
  text-wrap: balance;   /* Haffer runs wider than the frame's font: balance keeps "you trust" from sitting alone */
}
.home-lede {
  max-width: var(--home-lede-w);
  margin: var(--home-lede-gap) 0 0;
  font-size: var(--home-fs-lede);
  line-height: var(--home-lh-lede);
  color: var(--c-text);
  text-wrap: balance;
}
.home-join { margin-top: var(--home-button-gap); display: flex; flex-direction: column; align-items: center; }
/* disabled until #436, but drawn as the design: no greying out, just no pointer */
.home-button {
  height: var(--home-button-h);
  padding: 0 var(--home-button-px);
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--c-accent);
  color: var(--c-button-text);
  font: inherit;
  font-size: var(--home-fs-button);
  font-weight: var(--weight-strong);
  line-height: 1;
  cursor: default;
}
.home-note { margin: var(--home-note-gap) 0 0; color: var(--c-faint); }
.home-footer {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-4);
  padding: var(--home-footer-pt) 0 var(--home-footer-pb);
  border-top: var(--border-width) solid var(--c-line);
}
.home-links { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--home-links-gap); }
.home-legal { display: flex; gap: var(--space-4); font-size: var(--home-fs-legal); }
.home-footer a { color: var(--c-muted); text-decoration: none; }
.home-footer a:hover, .home-footer a:focus-visible { color: var(--c-ink); }
@media (max-width: 960px) {
  .home-top { gap: 0 var(--space-2); }
  .home-footer { flex-direction: column; align-items: center; gap: var(--space-3); }
  .home-links { justify-content: center; }
}
