/* Jumplet site styles (piece 2: the look).
   Hand-written, no framework. Palette roles are locked in docs/brand-ref/brand-principles.md.
   Periwinkle is a fill only: never text, never under white text. Deep is never text on dark. */

/* ---------- Fonts ---------- */

@font-face {
  font-family: "General Sans";
  src: url("fonts/GeneralSans-Variable-latin.woff2") format("woff2");
  font-weight: 200 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-Variable-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Metric-matched fallbacks so the swap to the web fonts barely shifts layout. */
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial"), local("Helvetica"), local("Liberation Sans");
  size-adjust: 107.1%;
  ascent-override: 90.4%;
  descent-override: 22.5%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "General Sans Fallback";
  src: local("Arial"), local("Helvetica"), local("Liberation Sans");
  size-adjust: 100%;
  ascent-override: 95%;
  descent-override: 23%;
  line-gap-override: 0%;
}

/* ---------- Tokens ---------- */

:root {
  /* Brand palette (locked) */
  --periwinkle: #8E9FF2;
  --deep: #323C9C;
  --light: #CCD3FF;
  --mist: #EEF0FF;
  --paper: #F9F9FD;
  --ink: #191B2E;
  --butter: #FFD470;
  --peach: #FFAF99;
  --deep-on-dark: #9AA9F5;
  --white: #FFFFFF;

  /* Roles: light theme */
  --bg: var(--paper);
  --panel: var(--mist);
  --panel-edge: var(--light);
  --text: var(--ink);
  --muted: #4A4E6B;          /* 7.7:1 on Paper, 7.1:1 on Mist */
  --heading: var(--deep);
  --eyebrow: var(--deep);
  --link: var(--deep);
  --link-hover: var(--ink);
  --focus: var(--deep);       /* 8.8:1 on Paper, 8.2:1 on Mist; dark: #9AA9F5 is 7.6:1 on Ink */
  --btn-bg: var(--deep);
  --btn-text: var(--white);
  --btn-bg-hover: #262E80;
  --selection-bg: var(--light);
  --selection-text: var(--ink);
  --rule: #DADDF2;

  --font-head: "General Sans", "General Sans Fallback", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", "Inter Fallback", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --max: 1080px;
  --prose: 65ch;
  --gutter: clamp(20px, 5vw, 40px);
  --radius: 16px;
  --radius-sm: 10px;
  --section-space: clamp(56px, 8vw, 96px);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--ink);
    --panel: #232640;
    --panel-edge: #343858;
    --text: var(--paper);
    --muted: #C3C7E0;         /* 10.1:1 on Ink, 8.8:1 on #232640 */
    --heading: var(--paper);
    --eyebrow: var(--deep-on-dark);
    --link: var(--deep-on-dark);
    --link-hover: var(--paper);
    --focus: var(--deep-on-dark);
    --btn-bg: var(--deep-on-dark);
    --btn-text: var(--ink);
    --btn-bg-hover: var(--light);
    --selection-bg: var(--light);
    --selection-text: var(--ink);
    --rule: #2E3250;
  }
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem; /* 17px */
  line-height: 1.6;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
}

@media (min-width: 900px) {
  body {
    font-size: 1.125rem; /* 18px */
  }
}

::selection {
  background: var(--selection-bg);
  color: var(--selection-text);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  font-family: var(--font-head);
  color: var(--heading);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.5rem, 1.6rem + 4.2vw, 4rem); /* 40px to 64px */
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

h2 {
  font-size: clamp(1.875rem, 1.4rem + 2vw, 2.625rem); /* 30px to 42px */
  font-weight: 600;
}

h3 {
  font-size: clamp(1.1875rem, 1.1rem + 0.4vw, 1.375rem); /* 19px to 22px */
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
}

p {
  margin: 0 0 1em;
  max-width: var(--prose);
  text-wrap: pretty;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 120ms ease, background-color 120ms ease, border-color 120ms ease;
}

a:hover {
  color: var(--link-hover);
}

code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--panel-edge);
  border-radius: 6px;
  padding: 0.08em 0.4em;
  overflow-wrap: anywhere;
}

/* Visible keyboard focus on every interactive element (2px+, offset, 3:1 on both themes). */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
.demo-pair:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Skip link ---------- */

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: 8px;
  z-index: 20;
  padding: 10px 16px;
  background: var(--btn-bg);
  color: var(--btn-text);
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: none;
  color: var(--btn-text);
}

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: 999px;
  border: 0;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.button-primary {
  background: var(--btn-bg);
  color: var(--btn-text);
}

.button-primary:hover {
  background: var(--btn-bg-hover);
  color: var(--btn-text);
}

/* Larger CTAs outside the header */
.hero-cta .button,
.pricing-cta .button,
.final-cta .button {
  min-height: 52px;
  padding: 14px 30px;
  font-size: 1.0625rem;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}

.site-header nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px var(--gutter);
  display: flex;
  align-items: center;
  gap: 24px;
}

.wordmark {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.375rem;
  letter-spacing: -0.01em;
  color: var(--heading);
  text-decoration: none;
  margin-right: auto;
  padding: 6px 0;
}

.wordmark:hover {
  color: var(--link);
}

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 8px;
}

.nav-links a:hover {
  color: var(--link);
  background: var(--panel);
}

@media (max-width: 639.98px) {
  .nav-links {
    display: none;
  }

  .site-header nav {
    gap: 12px;
  }
}

/* ---------- Sections and layout ---------- */

main > section {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--section-space) var(--gutter) 0;
}

main > section > h2 {
  text-align: center;
  margin-bottom: 0.6em;
}

main > section > .lead,
main > section > h2 + p {
  font-size: 1.1875rem;
  color: var(--muted);
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Hero ---------- */

.hero {
  text-align: center;
}

main > .hero {
  padding-top: clamp(8px, 1vw, 12px);
}

/* Still Hop icon. Clear space: at least 1/8 of the width on every side (9px at 72, 8px at 64); no shadow, glow or crop added. */
.hero-icon {
  width: 72px;
  height: 72px;
  margin: 10px auto 10px;
}

@media (max-width: 639.98px) {
  .hero-icon {
    width: 64px;
    height: 64px;
    margin: 8px auto 8px;
  }
}

/* Quiet eyebrow above the h1. Deep on Paper is 8.8:1; #9AA9F5 on Ink is 7.6:1. */
.eyebrow {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.9375rem;
  line-height: 1.4;
  letter-spacing: 0.04em;
  color: var(--eyebrow);
  margin: 0 auto 0.35rem;
}

.hero h1 {
  margin-top: 0;
  margin-bottom: 0.2em;
}

.subhead {
  font-size: clamp(1.1875rem, 1rem + 0.8vw, 1.5rem);
  color: var(--text);
  margin: 0 auto 0.7em;
}

.hero-cta {
  margin: 0 auto 0.5em;
}

/* The offer line under the hero CTA: body text colour (Ink on Paper, Paper on Ink), not muted. */
.hero .secondary {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 0;
}

.secondary {
  font-size: 0.9375rem;
  color: var(--muted);
  margin-left: auto;
  margin-right: auto;
}

/* The quiet requirements line under a download CTA. Muted: 7.7:1 on Paper, 7.1:1 on Mist; 10.1:1 on Ink, 8.8:1 on #232640. */
.requirements {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: 0.5em;
}

/* ---------- Demo slot (placeholder for the real screen recording) ---------- */

/* Staged as a Mac window so the recording can drop straight in later (16:10 only once it holds a <video>).
   Inside: the fn + s keycap head, then step 1 -> step 2. The placeholder note is a small chip in the title bar. */
.demo {
  margin: clamp(18px, 1.6vw, 24px) auto 0;
  max-width: 960px;
  text-align: left;
}

.demo-frame {
  --bar-bg: var(--paper);
  --frame-shadow: 0 1px 2px rgba(25, 27, 46, 0.06), 0 18px 40px -18px rgba(50, 60, 156, 0.28);
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--frame-shadow);
}

@media (prefers-color-scheme: dark) {
  .demo-frame {
    --bar-bg: #2A2D4A;
    --frame-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.6);
  }
}

@media (min-width: 720px) {
  .demo-frame:has(video) {
    aspect-ratio: 16 / 10;
  }
}

/* Title bar: three decorative dots (fills only) and the placeholder chip on the right. */
.frame-bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 34px;
  padding: 5px 8px 5px 14px;
  background: var(--bar-bg);
  border-bottom: 1px solid var(--panel-edge);
}

.frame-dots {
  flex: none;
  display: flex;
  gap: 8px;
}

.frame-dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--peach);
}

.frame-dots span + span { background: var(--butter); }
.frame-dots span:last-child { background: var(--light); }

.frame-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 20px;
  padding: 20px clamp(16px, 3.4vw, 40px) 24px;
}

/* Placeholder chip: muted text on the panel colour. #4A4E6B on Mist 7.2:1; #C3C7E0 on #232640 8.8:1. */
.demo-note {
  margin: 0 0 0 auto;
  max-width: none;
  padding: 2px 10px;
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: 999px;
  text-align: right;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--muted);
}

/* Keycap head: fn + s, the whole shortcut at a glance. Decorative (aria-hidden); does nothing on click. */
.demo-keys {
  --cap: 60px;
  --cap-face: var(--mist);
  --cap-edge: var(--light);
  --cap-lip: #B9C1F0;
  --cap-text: var(--ink);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 14px;
}

@media (prefers-color-scheme: dark) {
  .demo-keys {
    --cap-face: #2C3052;
    --cap-edge: #4A5080;
    --cap-lip: #3B4066;
    --cap-text: var(--paper);
  }
}

.bigkey {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.bigkey-cap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--cap);
  height: var(--cap);
  background: var(--cap-face);
  color: var(--cap-text);
  border: 1px solid var(--cap-edge);
  border-bottom: 4px solid var(--cap-lip);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 2px 6px -2px rgba(25, 27, 46, 0.18);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: calc(var(--cap) * 0.38);
  line-height: 1;
}

.bigkey-label {
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--muted);
}

/* A plus drawn in CSS, centred on the caps. */
.bigkey-plus {
  position: relative;
  width: 12px;
  height: 12px;
  margin-top: calc(var(--cap) / 2 - 6px);
}

.bigkey-plus::before,
.bigkey-plus::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 0;
  width: 2px;
  height: 12px;
  border-radius: 1px;
  background: var(--muted);
}

.bigkey-plus::after {
  rotate: 90deg;
}

.demo-pair {
  display: grid;
  grid-template-columns: minmax(0, .85fr) 40px minmax(0, 1.15fr);
  gap: 12px;
  align-items: start;
  border-radius: var(--radius-sm);
}

.demo-state {
  margin: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.demo-state figcaption {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 3em;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.5;
}

.step-badge {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--butter);
  color: var(--ink);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.8125rem;
  line-height: 1;
}

/* CSS arrow from step 1 to step 2 (a shape, not text). Points right when wide, down when stacked. */
.demo-arrow {
  position: relative;
  align-self: center;
  justify-self: center;
  width: 28px;
  height: 2px;
  margin-top: 3em;
  background: var(--link);
  border-radius: 1px;
}

.demo-arrow::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 10px;
  height: 10px;
  border-top: 2px solid var(--link);
  border-right: 2px solid var(--link);
  transform: translateY(-50%) rotate(45deg);
}

@media (min-width: 720px) {
  .frame-body {
    gap: 22px;
  }

  .demo-state figcaption {
    font-size: 1.0625rem;
  }
}

@media (max-width: 719.98px) {
  .demo-keys {
    --cap: 44px;
    gap: 10px;
  }

  .bigkey-cap {
    border-radius: 10px;
    border-bottom-width: 3px;
  }

  .frame-bar {
    min-height: 28px;
    padding: 4px 6px 4px 10px;
    gap: 8px;
  }

  /* Narrow: the chip may wrap to two lines, so a soft rectangle instead of a pill. */
  .demo-note {
    font-size: 0.6875rem;
    padding: 2px 8px;
    border-radius: 8px;
    text-wrap: balance;
  }

  .frame-dots {
    gap: 6px;
  }

  .frame-dots span {
    width: 9px;
    height: 9px;
  }

  /* Bleed a little into the page gutter so full window titles fit. */
  .demo-frame {
    margin-inline: -8px;
  }

  .frame-body {
    gap: 16px;
    padding: 16px 10px 16px;
  }

  /* Stacked: step 1 above step 2, arrow pointing down, no sideways scrolling. */
  .demo-pair {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  .demo-state figcaption {
    min-height: 0;
  }

  .demo-arrow {
    flex: none;
    width: 18px;
    margin: 12px 0;
    transform: rotate(90deg);
  }

  .demo-arrow::after {
    width: 8px;
    height: 8px;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Illustrated switcher panel (decorative, aria-hidden; the description is in .visually-hidden).
   Selection pill: Light with Ink text. Selection dot: Periwinkle fill only, in the gutter, never under text. */
.switcher {
  --sw-bg: var(--white);
  --sw-edge: var(--light);
  --sw-field: var(--mist);
  --sw-text: var(--ink);
  --key-bg: var(--white);
  --key-edge: #B9C1F0;
  --sw-muted: #4A4E6B;       /* 8:1 on white, 5.6:1 on Light */
  --sw-app: #5A5E7D;         /* app prefix, a step quieter: 6.3:1 on white */
  --sel-bg: var(--light);
  --sel-text: var(--ink);
  --sel-app: #4A4E6B;        /* 5.5:1 on Light */
  --sel-ring: var(--deep);
  --sw-shadow: 0 1px 2px rgba(25, 27, 46, 0.05);
  --sw-lift: 0 14px 28px -12px rgba(25, 27, 46, 0.3);
  --row-h: 38px;
  --row-gap: 4px;
  --pitch: calc(var(--row-h) + var(--row-gap));
  --gutter-w: 22px;
  background: var(--sw-bg);
  border: 1px solid var(--sw-edge);
  border-radius: 20px;
  padding: 10px 12px 10px 4px;
  color: var(--sw-text);
  font-size: 0.9375rem;
  line-height: 1.2;
  flex: none;
  box-shadow: var(--sw-shadow);
}

@media (min-width: 720px) {
  .switcher {
    --row-h: 46px;
  }
}

@media (prefers-color-scheme: dark) {
  .switcher {
    --sw-bg: #2C3052;
    --sw-edge: #3B4066;
    --sw-field: var(--ink);
    --sw-text: var(--paper);
    --sw-muted: #C3C7E0;     /* 8.6:1 on #2C3052 */
    --sw-app: #A6ABCB;       /* 5.6:1 on #2C3052 */
    /* Selected row: a dark Deep tint, not a Light slab. Paper on #3B4380 8.7:1; #C3C7E0 on it 5.5:1. */
    --sel-bg: #3B4380;
    --sel-text: var(--paper);
    --sel-app: #C3C7E0;
    --sel-ring: var(--light);
    --key-bg: #232640;
    --key-edge: #4A5080;
    --sw-lift: 0 14px 28px -12px rgba(0, 0, 0, 0.65);
  }
}

/* Step 2 is the payoff: a 2px Butter ring and a little lift. */
[data-state="remembered"] .switcher {
  box-shadow: 0 0 0 2px var(--butter), var(--sw-lift);
}

.switcher-search {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px var(--gutter-w);
  padding: 8px 12px;
  background: var(--sw-field);
  border-radius: 12px;
  min-height: 44px;
}

.keycap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 28px;
  padding: 0 8px;
  background: var(--key-bg);
  color: var(--sw-text);
  border: 1px solid var(--key-edge);
  border-bottom-width: 2px;
  border-radius: 7px;
  font-size: 0.8125rem;
  font-weight: 600;
  /* Held down: pressed in a little. */
  box-shadow: inset 0 1px 2px rgba(25, 27, 46, 0.12);
}

.query {
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--sw-text);
}

/* Static text caret (never blinks). */
.caret {
  width: 2px;
  height: 20px;
  margin-left: -8px;
  background: var(--periwinkle);
  border-radius: 1px;
}

.switcher-rows {
  position: relative;
}

.switcher-list {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--row-h);
  margin-left: var(--gutter-w);
  padding: 0 12px;
  border-radius: 12px;
  color: var(--sw-text);
  white-space: nowrap;
  min-width: 0;
}

.row + .row {
  margin-top: var(--row-gap);
}

.row.is-selected {
  background: var(--sel-bg);
  color: var(--sel-text);
  font-weight: 500;
}

.row-tile {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 7px;
}

.t-light { background: var(--light); }
.t-peach { background: var(--peach); }
.t-butter { background: var(--butter); }
.t-peri { background: var(--periwinkle); }
.t-mist { background: var(--mist); box-shadow: inset 0 0 0 1px var(--light); }

/* Step 2: the remembered window is first, ringed (Deep on Light; Light on the dark tint) so it reads as the payoff. */
[data-state="remembered"] .row.is-selected {
  box-shadow: inset 0 0 0 2px var(--sel-ring);
  font-weight: 600;
}

.row.is-selected .t-light {
  box-shadow: inset 0 0 0 1px var(--periwinkle);
}

.row-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-app {
  color: var(--sw-app);
  font-weight: 400;
}

.row.is-selected .row-app {
  color: var(--sel-app);
}

/* The typed letter, marked in each matching title so the mock reads as search. Ink on Butter, about 12:1. */
.row mark {
  background: var(--butter);
  color: var(--ink);
  font-weight: 600;
  border-radius: 4px;
  padding: 0 1px;
}

/* Step 2: the other matches step back. Only the colour tiles fade; the text stays AA in the muted colour,
   and the matched letter keeps the same Butter fill as every other row. */
.row.is-dim {
  color: var(--sw-muted);
}

.row.is-dim .row-tile {
  opacity: 0.45;
}

.remembered-tag {
  flex: none;
  padding: 3px 10px;
  background: var(--butter);
  color: var(--ink);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.35;
}

/* Selection layer: the highlight pill, shown only while the slide plays (the row itself holds the settled highlight). */
.sel {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: var(--row-h);
  transform: translateY(calc(var(--sel, 0) * var(--pitch)));
  pointer-events: none;
}

.sel-pill {
  position: absolute;
  inset: 0 0 0 var(--gutter-w);
  background: var(--sel-bg);
  border-radius: 12px;
  opacity: 0;
}

/* Very narrow: drop the "Sample window —" prefix (the switcher is aria-hidden) and tighten the rows. */
@media (max-width: 419.98px) {
  .row-app {
    display: none;
  }
}

@media (max-width: 420px) {
  .switcher {
    --row-h: 34px;
    --gutter-w: 16px;
    font-size: 0.875rem;
    padding-right: 8px;
  }

  .row {
    gap: 6px;
    padding: 0 8px;
  }

  .row-tile {
    width: 20px;
    height: 20px;
    border-radius: 6px;
  }

  .remembered-tag {
    padding: 2px 8px;
  }
}

/* One sliding highlight, as in the app's panel (no hop, no bounce, no squash, no scale): the pill slides once
   to the target row with a non-overshooting ease-out, 2 rows = 220 ms, played once by demo.js.
   Only when motion is allowed; nothing moves on load and nothing repeats. */
@media (prefers-reduced-motion: no-preference) {
  .switcher.is-sliding .row.is-selected {
    background: transparent;
  }

  .switcher.is-sliding .sel-pill {
    opacity: 1;
  }

  .switcher.is-sliding .sel {
    transition: transform calc(140ms + 40ms * var(--rows, 2)) cubic-bezier(.25, .8, .3, 1);
  }
}

/* Reduce Motion: no travel. The new selection fades in over 120 ms, once. */
@media (prefers-reduced-motion: reduce) {
  .switcher.is-fading .row.is-selected {
    animation: demo-xfade 120ms ease-out 1 both;
  }
}

@keyframes demo-xfade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------- How it works ---------- */

.steps {
  list-style: none;
  counter-reset: step;
  margin: 40px 0 48px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 820px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
}

/* Open steps (no panel fill): panels are kept for the demo, the callout and pricing. */
/* Small Butter number inline with the h3; the text hangs under the heading. */
.steps li {
  counter-increment: step;
  padding: 4px 8px 0;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  column-gap: 12px;
  align-items: start;
  align-content: start;
}

.steps li::before {
  content: counter(step);
  grid-row: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-top: 0.1em;
  border-radius: 50%;
  background: var(--butter);
  color: var(--ink);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.8125rem;
  line-height: 1;
}

.steps h3 {
  grid-column: 2;
  margin-bottom: 0.4em;
}

.steps p {
  grid-column: 2;
  margin: 0;
  color: var(--muted);
}

#how-it-works > p:not(.lead) {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* "That's Fast Search..." as a left-aligned callout: Mist panel with a straight Butter rule on the left. */
#how-it-works > p.callout {
  max-width: 760px;
  margin-bottom: 32px;
  padding: 24px clamp(20px, 4vw, 32px);
  background: var(--panel);
  border-left: 4px solid var(--butter);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--font-head);
  font-size: clamp(1.1875rem, 1.1rem + 0.4vw, 1.3125rem);
  font-weight: 500;
  line-height: 1.45;
  color: var(--heading);
  text-align: left;
}

/* ---------- Features ---------- */

.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 40px 0 40px;
}

@media (min-width: 720px) {
  .features {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
}

.feature {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 48px 28px 24px;
  position: relative;
}

/* Short straight Periwinkle accent, inset inside the card (a fill, never under text). */
.feature::before {
  content: "";
  position: absolute;
  top: 28px;
  left: 28px;
  width: 32px;
  height: 4px;
  background: var(--periwinkle);
}

.feature p {
  margin: 0;
  color: var(--muted);
}

.alongside {
  text-align: center;
  color: var(--muted);
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Pricing ---------- */

/* One centred panel on Mist. Three detail tiles: stacked on narrow screens, one even row when wide. */
.pricing-panel {
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(36px, 6vw, 56px) clamp(20px, 5vw, 48px);
  background: var(--panel);
  border-radius: calc(var(--radius) + 8px);
  text-align: center;
}

/* The section name is a small eyebrow so the price is the only big headline. */
.pricing-panel > h2 {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.04em;
  color: var(--eyebrow);
  margin-bottom: 0.6em;
}

.pricing-panel > p {
  margin-left: auto;
  margin-right: auto;
}

.price {
  font-family: var(--font-head);
  font-weight: 650;
  font-size: clamp(2rem, 1.5rem + 2.4vw, 3rem);
  line-height: 1.15;
  color: var(--heading);
  letter-spacing: -0.015em;
  margin-bottom: 1em;
}

.pricing-details {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 0;
  margin-bottom: 32px;
  text-align: left;
}

@media (min-width: 760px) {
  .pricing-details {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
}

.pricing-details > div {
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}

.pricing-details dt {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
  color: var(--heading);
  margin-bottom: 4px;
}

.pricing-details dd {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--muted);
}

.pricing-cta {
  margin-bottom: 0;
}

/* ---------- FAQ ---------- */

#faq > h2 {
  margin-bottom: 1em;
}

#faq details {
  max-width: 760px;
  margin: 0 auto;
  border-bottom: 1px solid var(--rule);
}

#faq details:first-of-type {
  border-top: 1px solid var(--rule);
}

#faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  padding: 18px 4px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.4;
  color: var(--heading);
  transition: color 120ms ease;
}

#faq summary::-webkit-details-marker {
  display: none;
}

#faq summary:hover {
  color: var(--link);
}

/* Chevron drawn in CSS; it flips (no animation) when open. */
#faq summary::after {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-3px) rotate(45deg);
}

#faq details[open] > summary::after {
  transform: translateY(3px) rotate(-135deg);
}

#faq details > p {
  margin: 0 4px 22px;
  max-width: var(--prose);
  color: var(--muted);
}

/* ---------- Final CTA band ---------- */

main > .final-cta {
  max-width: none;
  margin-top: var(--section-space);
  padding: clamp(56px, 9vw, 96px) var(--gutter);
  background: var(--panel);
  text-align: center;
}

.final-line {
  font-family: var(--font-head);
  font-weight: 650;
  font-size: clamp(1.875rem, 1.4rem + 2vw, 2.625rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--heading);
  margin: 0 auto 0.8em;
  text-wrap: balance;
}

.final-cta p {
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Footer ---------- */

.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 40px var(--gutter) 48px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  font-size: 0.875rem;
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

.footer-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Secondary button: outlined, Deep on light (#9AA9F5 on dark), never a second filled CTA. */
.button-secondary {
  min-height: 44px;
  padding: 9px 20px;
  background: transparent;
  color: var(--link);
  border: 1.5px solid var(--link);
  font-size: 0.9375rem;
}

.button-secondary:hover {
  background: var(--panel);
  color: var(--link-hover);
}

/* Terms, Privacy, Refunds: small and low-key, in the muted footer colour (7.7:1 on Paper, 10.1:1 on Ink). */
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0 16px;
}

.footer-legal a {
  display: inline-block;
  padding: 2px 0;
  color: var(--muted);
}

.footer-legal a:hover {
  color: var(--link);
}

@media (max-width: 639.98px) {
  .site-footer {
    flex-direction: column-reverse;
    gap: 20px;
    text-align: center;
  }

  .footer-legal {
    justify-content: center;
  }
}

/* ---------- Legal pages (generated from legal/*.md) ---------- */

.legal {
  max-width: calc(68ch + 2 * var(--gutter));
  margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) var(--gutter) 0;
}

.legal h1 {
  font-size: clamp(2rem, 1.5rem + 2vw, 2.75rem);
}

.legal h2 {
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  margin-top: 2em;
}

.legal ul,
.legal ol {
  margin: 0 0 1em;
  padding-left: 1.4em;
}

.legal li + li {
  margin-top: 0.4em;
}

.table-scroll {
  overflow-x: auto;
  margin: 0 0 1.5em;
}

.legal table {
  min-width: 36rem;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.legal th,
.legal td {
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

.legal th {
  color: var(--heading);
  font-weight: 600;
}

/* ---------- 404 page (generated by scripts/build.mjs) ---------- */

.not-found {
  padding-bottom: clamp(40px, 6vw, 72px);
}

.not-found .button {
  margin-top: 8px;
}

/* ---------- Pricing page (generated by scripts/build.mjs) ---------- */

.pricing-page {
  padding-bottom: clamp(40px, 6vw, 72px);
}

.pricing-page .price {
  margin-bottom: 0.25em;
}

.price-unit {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text);
}

.price-note {
  font-size: 0.9375rem;
  margin-bottom: 1.5em;
}

.pricing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0;
}

.pricing-mor {
  font-size: 0.9375rem;
}

/* Pricing page only: keep room for the scrollbar, so an overlay that locks page scrolling doesn't shift the page. */
html:has(.pricing-page) {
  scrollbar-gutter: stable;
}

/* Checkout messages (src/checkout.js). Empty until Buy is clicked or a checkout completes, so the CTA row never moves. */
.checkout-status:empty {
  display: block;
  margin: 0;
}

.checkout-status:not(:empty) {
  margin: -8px 0 28px;
  padding: 14px 18px;
  max-width: var(--prose);
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius-sm);
}

.checkout-status p {
  margin: 0;
}

.checkout-status p + p {
  margin-top: 0.4em;
}

.checkout-status strong {
  color: var(--heading);
}

/* Focus moves here (by script only) after a purchase. Same outline as the site's keyboard focus. */
.checkout-status:focus {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

/* Shown only without JS: same panel as the checkout messages. */
.checkout-noscript {
  margin: -8px 0 28px;
  padding: 14px 18px;
  max-width: var(--prose);
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius-sm);
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
