/* Generated by apps/landing/scripts/build-home.mjs from apps/landing/src/home; do not edit. */
/* ===== fonts.css ===== */
/* CatchyBox home: fonts and type roles (ART-DIRECTION.md section 5).
   Files load exactly as shipped from /fonts/ (never copied, converted or subset; licenses in
   /fonts/LICENSES.md). Pairing (D-049): Rafory for display, Moven for text. The role variables
   below are the names the home's CSS reads; every value comes from tokens.css. */

@font-face {
  font-family: "Rafory";
  src: url("/fonts/Rafory.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Moven";
  src: url("/fonts/ZTMoven-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Moven";
  src: url("/fonts/ZTMoven-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Moven";
  src: url("/fonts/ZTMoven-DemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ===== Type roles ===== */
:root {
  --font-display: var(--face-display);
  --font-text: var(--face-text);

  --hero-size: var(--type-hero-size);
  --hero-weight: var(--type-hero-weight);
  --hero-lh: var(--type-hero-line-height);
  --hero-tracking: var(--type-hero-tracking);
  --hero-word-spacing: var(--type-hero-word-spacing);

  --h2-size: var(--type-h-2-size);
  --h2-weight: var(--type-h-2-weight);
  --h2-lh: var(--type-h-2-line-height);
  --h2-tracking: var(--type-h-2-tracking);
  --h2-word-spacing: var(--type-h-2-word-spacing);

  --h3-size: var(--type-h-3-size);
  --title-weight: var(--type-h-3-weight);
  --h3-lh: var(--type-h-3-line-height);

  --card-title-size: var(--type-card-title-size);
  --card-title-lh: var(--type-card-title-line-height);

  --lead-size: var(--type-lead-size);
  --lead-weight: var(--type-lead-weight);
  --lead-lh: var(--type-lead-line-height);

  --body-size: var(--type-body-size);
  --body-weight: var(--type-body-weight);
  --body-lh: var(--type-body-line-height);

  --button-size: var(--type-button-size);
  --button-weight: var(--type-button-weight);

  --label-size: var(--type-label-size);
  --label-weight: var(--type-label-weight);
  --label-lh: var(--type-label-line-height);
  --label-tracking: var(--type-label-tracking);

  --meta-size: var(--type-meta-size);
  --meta-size-small: var(--type-meta-compact-size);
  --meta-weight: var(--type-meta-weight);
  --meta-lh: var(--type-meta-line-height);

  --num-weight: var(--type-number-weight);
  /* Prices and counters only. */
  --num-features: "tnum";
  /* Digits roll per column: Moven has tabular figures. */
  --num-roll: column;
}

/* ===== base.css ===== */
/* CatchyBox home: reset, type roles, layout primitives and shared components.
   Reads tokens.css and fonts.css; holds no color and no font file. Contract: COMPONENTS.md. */

/* ===== Reset ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--space-4));
}
:root[data-still] {
  scroll-behavior: auto;
}
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--body-size);
  font-weight: var(--body-weight);
  line-height: var(--body-lh);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
h1, h2, h3, h4, p, ul, ol, figure, blockquote, dl, dd {
  margin: 0;
}
ul[role="list"],
ol[role="list"],
.list-plain {
  list-style: none;
  padding: 0;
}
img,
svg,
video {
  display: block;
  max-width: 100%;
}
img {
  height: auto;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
/* .btn.skip-link, not .skip-link: .btn (position: relative) comes later in this file and kept the link in
   the flow, a 44 px white strip above the hero of every page. */
.btn.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -200px;
  z-index: 100;
}
.skip-link:focus-visible {
  top: var(--space-4);
}

/* ===== Icons (lucide sprite; stroke 1.75) ===== */
.icon {
  width: var(--icon-button);
  height: var(--icon-button);
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: var(--icon-stroke);
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--16 {
  width: var(--icon-chip);
  height: var(--icon-chip);
}

/* ===== Type roles ===== */
.t-hero {
  font-family: var(--font-display);
  font-size: calc(var(--hero-size) * var(--hero-fit, 1));
  font-weight: var(--hero-weight);
  line-height: var(--hero-lh);
  letter-spacing: var(--hero-tracking);
  word-spacing: var(--hero-word-spacing);
  color: var(--ink);
  text-wrap: balance;
}
.t-h2 {
  font-family: var(--font-display);
  font-size: var(--h2-size);
  font-weight: var(--h2-weight);
  line-height: var(--h2-lh);
  letter-spacing: var(--h2-tracking);
  word-spacing: var(--h2-word-spacing);
  color: var(--ink);
  text-wrap: balance;
}
.t-h3 {
  font-family: var(--font-text);
  font-size: var(--h3-size);
  font-weight: var(--title-weight);
  line-height: var(--h3-lh);
  color: var(--ink);
}
.t-card-title {
  font-family: var(--font-text);
  font-size: var(--card-title-size);
  font-weight: var(--title-weight);
  line-height: var(--card-title-lh);
  color: var(--ink);
}
.t-lead {
  font-size: var(--lead-size);
  font-weight: var(--lead-weight);
  line-height: var(--lead-lh);
  color: var(--ink-2);
}
.t-body {
  font-size: var(--body-size);
  line-height: var(--body-lh);
  color: var(--ink-2);
}
.t-label {
  font-size: var(--label-size);
  font-weight: var(--label-weight);
  line-height: var(--label-lh);
  letter-spacing: var(--label-tracking);
  color: var(--ink-3);
}
.t-meta {
  font-size: var(--meta-size);
  font-weight: var(--meta-weight);
  line-height: var(--meta-lh);
  color: var(--ink-2);
}
.t-meta-sm {
  font-size: var(--meta-size-small);
  font-weight: var(--meta-weight);
  line-height: var(--meta-lh);
  color: var(--ink-3);
}
.t-num {
  font-weight: var(--num-weight);
  line-height: 1;
  font-feature-settings: var(--num-features);
}

/* ===== Layout: full-width sections, one outer width, 12 columns ===== */
.section {
  position: relative;
  padding: var(--section-pad) var(--gutter);
  background: var(--page);
}
.section--mist {
  background: var(--mist);
}
.section--sky {
  background: var(--sky);
}
.section--sky-reversed {
  background: var(--sky-reversed);
}
/* Band contrast: two neighbouring bands never share a tone (the owner's rule; white next to mist read
   as one block). The home alternates white with the sky color and the ink band.
   Sky band: the solid top of the sky; the faintest text tones step up to ink-2 to keep AA on it.
   Ink band: the section head sits on ink in the on-ink tones; cards on it keep their own colors. */
.section--sky-solid {
  --ink-3: var(--ink-2);
  --ink-mute: var(--ink-2);
  background: var(--sky-top);
}
.section--ink {
  background: var(--ink);
}
.section--ink .section-head .t-h2 {
  color: var(--on-ink);
}
.section--ink .section-head .t-lead {
  color: var(--on-ink-2);
}
.section--under-header {
  padding-top: calc(var(--header-h) + var(--space-8));
}
.wrap {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
}
.grid {
  display: grid;
  grid-template-columns: repeat(var(--grid-cols), minmax(0, 1fr));
  gap: var(--grid-gap);
}
.span-1 { grid-column: span 1; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-9 { grid-column: span 9; }
.span-10 { grid-column: span 10; }
.span-11 { grid-column: span 11; }
.span-12 { grid-column: span 12; }
.section-head {
  display: grid;
  grid-template-columns: 4fr 6fr;
  gap: var(--grid-gap);
  align-items: last baseline;
  margin-bottom: var(--space-7);
}
.stack {
  display: flex;
  flex-direction: column;
  gap: var(--stack-gap, var(--space-5));
}
@media (max-width: 900px) {
  .grid > * {
    grid-column: 1 / -1;
  }
  .section-head {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-4);
    margin-bottom: var(--space-7);
  }
}

/* ===== Buttons: primary, secondary, tertiary; icon always, 44 px minimum, never wraps ===== */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--tap);
  padding: 0 var(--space-5);
  border: 1px solid var(--clear);
  /* Rounded rectangle, never a pill: the owner rejects pill buttons. Same token as the web app. */
  border-radius: var(--r-button);
  background: var(--clear);
  font-family: var(--font-text);
  font-size: var(--button-size);
  font-weight: var(--button-weight);
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  transition: transform var(--dur-hover) var(--ease-out);
}
.btn:hover {
  transform: translateY(-2px);
}
.btn:active {
  transform: translateY(0) scale(0.98);
}
.btn--primary {
  background: var(--button);
  color: var(--on-button);
}
.btn--secondary {
  border-color: var(--ink-3);
  color: var(--ink);
}
.btn--tertiary {
  padding: 0 var(--space-2);
  color: var(--ink);
}
.btn--tertiary:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.btn--lg {
  min-height: 56px;
  padding: 0 28px;
}
.btn--full {
  width: 100%;
}
.btn--icon {
  width: var(--tap);
  padding: 0;
}
.btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}
@media (max-width: 720px) {
  /* Phones: the primary goes alone at full width; at most two buttons share a row. */
  .btn-row > .btn--primary {
    flex: 1 1 100%;
  }
  .btn-row > .btn--secondary {
    flex: 1 1 calc(50% - var(--space-3));
  }
  .btn--lg {
    min-height: 48px;
  }
}

/* Pause button for loops: 36 px round tertiary, 44 px hit area. */
.pause-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow-resting);
}
.pause-btn::before {
  content: "";
  position: absolute;
  inset: -4px;
}
.pause-btn .icon {
  width: var(--icon-chip);
  height: var(--icon-chip);
}
.pause-btn .icon-play,
.pause-btn[aria-pressed="true"] .icon-pause {
  display: none;
}
.pause-btn[aria-pressed="true"] .icon-play {
  display: block;
}
:root[data-still] .pause-btn {
  display: none;
}

/* ===== Chips ===== */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  background: var(--wash);
  color: var(--ink-2);
  font-size: var(--meta-size);
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}
.chip .icon {
  width: var(--icon-chip);
  height: var(--icon-chip);
}
.chip--card {
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow-lifted);
}
.chip--ember {
  background: var(--ember);
  color: var(--page);
  font-weight: 600;
}
.chip--app {
  height: 28px;
  padding: 0 10px;
  border-radius: var(--r-10);
  font-size: var(--meta-size-small);
}
.dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: var(--r-pill);
  background: var(--ember);
}
.dot--success {
  background: var(--success);
}

/* ===== Cards ===== */
.card {
  position: relative;
  background: var(--card);
  border-radius: var(--r-24);
  box-shadow: var(--shadow-resting);
}
.card--small {
  border-radius: var(--r-16);
}
.card--line {
  border: 1px solid var(--hairline);
}
.card--flat {
  box-shadow: none;
}
.card--wash {
  background: var(--wash);
}
/* Hover: lift 2 px and crossfade to the next shadow step (shadows never animate directly). */
.lift {
  transition: transform var(--dur-hover) var(--ease-out);
}
.lift::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: var(--shadow-lifted);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-hover) var(--ease-out);
}
.lift:hover {
  transform: translateY(-2px);
}
.lift:hover::after {
  opacity: 1;
}

/* Library card (ART-DIRECTION 7): media at its own proportion, a title, one metadata line. */
.lib-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: var(--r-12);
  color: var(--ink);
  text-decoration: none;
}
.lib-card__media {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-12);
  background: var(--wash);
  aspect-ratio: var(--r, 1);
}
.lib-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.lib-card__band {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: 10px 2px 12px;
}
.lib-card__title-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
}
.lib-card__title {
  flex: 1;
  min-width: 0;
  font-size: var(--card-title-size);
  font-weight: var(--title-weight);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lib-card__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: var(--meta-size-small);
  line-height: var(--meta-lh);
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lib-card__meta .icon {
  width: var(--icon-chip);
  height: var(--icon-chip);
}

/* Typographic card: notes, lists, links and articles without an image (4:5). */
.type-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  aspect-ratio: 4 / 5;
  padding: 20px;
  overflow: hidden;
  border-radius: var(--r-12);
  background: var(--wash);
  color: var(--ink);
}
.type-card--mist {
  background: var(--mist);
}
.type-card .icon {
  color: var(--ink-3);
}
.type-card__title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: var(--h2-weight);
  line-height: 1.15;
  word-spacing: var(--h2-word-spacing);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.type-card__body {
  max-height: calc(4 * 1.5em);
  overflow: hidden;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-2);
}

/* Status dot (8 px). Always paired with an aria-label or visible text. */
.status-dot {
  width: 8px;
  height: 8px;
  flex: none;
  margin-top: 0.45em;
  border-radius: var(--r-pill);
}
.status-dot--todo {
  box-shadow: inset 0 0 0 1.5px var(--status-ring);
}
.status-dot--done {
  background: var(--success);
}
.status-dot--review {
  background: var(--ember);
}
.status-dot--reading {
  background: var(--accent);
}

/* Justified rows (target height per row, last row not stretched); masonry on phones.
   Each child sets --r (width / height of its media), for example style="--r: {{ratio:find-cafe}}". */
.jrows {
  --row-h: 280px;
  display: flex;
  flex-wrap: wrap;
  gap: var(--jrows-gap, 16px);
}
.jrows > * {
  flex-grow: var(--r, 1);
  flex-basis: calc(var(--r, 1) * var(--row-h));
  min-width: 150px;
}
.jrows::after {
  content: "";
  flex-grow: 999;
}
@media (max-width: 640px) {
  .jrows {
    display: block;
    columns: 2;
    column-gap: 10px;
  }
  .jrows > * {
    break-inside: avoid;
    margin-bottom: 10px;
    min-width: 0;
  }
}

/* Toast */
.toast {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--r-16);
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow-lifted);
  font-size: var(--meta-size);
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
}
.toast .icon {
  width: var(--icon-chip);
  height: var(--icon-chip);
  color: var(--ink-2);
}

/* Segmented control (pricing toggles, the 1-2-3 control, view switchers). CB.segmented() wires it. */
.seg {
  position: relative;
  display: inline-flex;
  padding: 4px;
  min-height: var(--tap);
  border-radius: var(--r-12);
  background: var(--wash);
}
.seg__thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  border-radius: var(--r-10);
  background: var(--card);
  box-shadow: var(--shadow-lifted);
  pointer-events: none;
}
.seg__btn {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1 1 0;
  min-height: 36px;
  padding: 0 var(--space-4);
  border: 0;
  border-radius: var(--r-10);
  background: var(--clear);
  color: var(--ink-2);
  font-size: var(--meta-size);
  font-weight: 600;
  white-space: nowrap;
}
.seg__btn[aria-pressed="true"] {
  color: var(--ink);
}

/* Rolling digits (CB.roll). */
.roll {
  display: inline-flex;
  font-feature-settings: var(--num-features);
}
.roll__col {
  display: inline-block;
  height: 1lh;
  overflow: hidden;
}
.roll__strip {
  display: flex;
  flex-direction: column;
}
.roll__strip > span {
  display: block;
  height: 1lh;
}

/* ===== Phone: silver band, notch in ink, status bar at 9:41 ===== */
.phone {
  position: relative;
  flex: none;
  width: var(--phone-w);
  height: var(--phone-h);
  padding: var(--phone-band);
  border-radius: var(--phone-r-out);
  background: var(--hairline);
  box-shadow: var(--shadow-floating);
}
.phone__screen {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: var(--phone-r-in);
  background: var(--page);
  color: var(--ink);
}
.phone__notch {
  position: absolute;
  top: 10px;
  left: 50%;
  z-index: 3;
  width: var(--notch-w);
  height: var(--notch-h);
  border-radius: var(--r-pill);
  background: var(--ink);
  transform: translateX(-50%);
}
.phone__status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
  height: 46px;
  padding: 0 22px 0 28px;
  font-size: 15px;
  font-weight: 600;
  font-feature-settings: "tnum";
}
.phone__status-icons {
  display: flex;
  gap: 4px;
}
.phone__status-icons .icon {
  width: var(--icon-chip);
  height: var(--icon-chip);
}
.phone__body {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: var(--space-2) var(--space-4);
}

/* ===== App window: radius 24, no browser chrome ===== */
.app-window {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-24);
  background: var(--card);
  box-shadow: var(--shadow-floating);
  color: var(--ink);
}
.app-topbar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
}
.app-topbar .app-search {
  flex: 1;
}

/* ===== In-app pieces ===== */
.app-search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 var(--space-2) 0 var(--space-4);
  border: 1px solid var(--ink-3);
  border-radius: var(--r-pill);
  background: var(--card);
  color: var(--ink);
}
.app-search .icon {
  color: var(--ink-3);
}
.app-search__input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: var(--clear);
  font-size: 16px;
}
.app-search__input::placeholder {
  color: var(--ink-3);
}
.app-search:focus-within {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.kbd {
  display: inline-grid;
  place-items: center;
  min-width: 36px;
  height: 28px;
  padding: 0 8px;
  border-radius: var(--r-10);
  background: var(--mist);
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
}
.avatar {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: var(--r-10);
  background: var(--wash);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}
.app-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-3);
  min-height: 56px;
  padding: var(--space-2) 0;
}
.app-row__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-10);
  background: var(--wash);
  color: var(--ink-2);
}
.app-row__text {
  min-width: 0;
}
.app-row__title {
  display: block;
  overflow: hidden;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.app-row__meta {
  display: block;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink-3);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.app-row .status-dot {
  margin-top: 0;
}
.tabbar {
  display: grid;
  /* Columns take their label's width and share the rest, so "Library" never clips in a 300 px phone. */
  grid-template-columns: repeat(5, auto);
  justify-content: space-between;
  align-items: end;
  flex: none;
  padding: var(--space-2) var(--space-2) var(--space-3);
  background: var(--card);
  box-shadow: 0 -1px 0 var(--hairline);
}
.tabbar__item {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 2px;
  color: var(--ink-3);
  font-size: 14px;
  line-height: 1.2;
}
.tabbar__item[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}
.tabbar__badge {
  position: absolute;
  top: -4px;
  left: calc(50% + 6px);
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--r-pill);
  background: var(--ember);
  color: var(--page);
  font-size: 14px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
}
.catch-disc {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-top: -20px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--button);
  color: var(--on-button);
  box-shadow: var(--shadow-lifted);
}

/* ===== Brand: the brand's mark file next to its wordmark file, no tile ===== */
/* The mark's drawing sits inside a 64-unit box with 12 units of air on each side, so the
   negative margin pulls it to the edge and the wordmark sits at the mark's own spacing. */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: var(--tap);
  color: var(--ink);
  text-decoration: none;
}
.brand-mark {
  display: block;
  flex: none;
  width: 40px;
  height: 40px;
  margin-left: -7px;
}
.brand-wordmark {
  display: block;
  flex: none;
  width: auto;
  height: 22px;
}
.brand-mark--lg {
  width: 64px;
  height: 64px;
  margin: 0;
}

/* ===== Still state: no transitions, no CSS animations; interactions become instant swaps ===== */
:root[data-still] *,
:root[data-still] *::before,
:root[data-still] *::after {
  transition: none !important;
  animation: none !important;
}

/* ===== The box (hero and closing): lid, back wall, slot for catches, front face ===== */
.cbox {
  --s: 1;
  position: relative;
  width: calc(496px * var(--s));
  height: calc(228px * var(--s));
}
.cbox__body {
  position: absolute;
  inset: 0;
  perspective: 1400px;
  transform-origin: 50% 100%;
}
.cbox__lid {
  position: absolute;
  left: 0;
  top: calc(-176px * var(--s));
  width: calc(496px * var(--s));
  height: calc(176px * var(--s));
  border: 1px solid var(--hairline);
  border-radius: calc(16px * var(--s));
  background: var(--card);
  transform-origin: 50% 100%;
  transform: rotateX(56deg);
}
.cbox.is-open .cbox__lid {
  transform: rotateX(8deg);
}
.cbox__back {
  position: absolute;
  left: calc(16px * var(--s));
  top: 0;
  width: calc(464px * var(--s));
  height: calc(120px * var(--s));
  border-radius: calc(16px * var(--s));
  background: var(--wash);
}
/* Catches that must sink behind the face live here (between the back wall and the face). */
.cbox__slot {
  position: absolute;
  inset: 0;
}
.cbox__front {
  position: absolute;
  left: calc(8px * var(--s));
  top: calc(60px * var(--s));
  display: grid;
  place-items: center;
  width: calc(480px * var(--s));
  height: calc(168px * var(--s));
  border: 1px solid var(--hairline);
  border-radius: calc(10px * var(--s)) calc(10px * var(--s)) calc(20px * var(--s)) calc(20px * var(--s));
  background: var(--card);
  box-shadow: var(--shadow-floating);
}
.cbox__front::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: calc(4px * var(--s));
  border-radius: calc(10px * var(--s)) calc(10px * var(--s)) 0 0;
  background: var(--mist);
}
.cbox__front .brand-mark--lg {
  width: calc(64px * var(--s));
  height: calc(64px * var(--s));
}

/* ===== Header ===== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  padding: 0 var(--gutter);
  pointer-events: none;
}
.header-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-5);
  height: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  pointer-events: auto;
}
.site-header.is-pinned {
  height: calc(var(--header-h) + var(--header-pill-inset-y));
  padding: var(--header-pill-inset-y) var(--header-pill-inset-x) 0;
}
.site-header.is-pinned .header-bar {
  height: calc(var(--header-h) - var(--header-pill-inset-y));
  padding: 0 var(--space-3) 0 var(--space-5);
  border: 1px solid var(--hairline);
  border-radius: var(--r-pill);
  background: var(--card);
  box-shadow: var(--shadow-floating);
}
.header-bar > .brand {
  justify-self: start;
}
.header-nav {
  display: flex;
  gap: var(--space-6);
}
.header-nav a {
  font-size: 16px;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  white-space: nowrap;
  padding: 12px 0;
}
.header-nav a:hover {
  color: var(--ink);
}
.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
}
.header-menu {
  display: none;
}
@media (max-width: 1180px) {
  .header-bar {
    grid-template-columns: 1fr auto;
  }
  .header-nav {
    display: none;
  }
  .header-menu {
    display: inline-flex;
  }
}
.lang-short {
  display: none;
}
@media (max-width: 720px) {
  .header-signin,
  .header-create,
  .lang-long {
    display: none;
  }
  .lang-short {
    display: inline;
  }
  .header-bar {
    gap: var(--space-2);
  }
  .header-actions .btn {
    padding: 0 var(--space-3);
  }
}

/* Phone menu sheet */
.menu-scrim {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--scrim);
}
.menu-sheet {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 61;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4) var(--gutter) calc(var(--space-5) + env(safe-area-inset-bottom));
  border-radius: var(--r-24) var(--r-24) 0 0;
  background: var(--card);
  box-shadow: var(--shadow-floating);
}
.menu-sheet[hidden],
.menu-scrim[hidden] {
  display: none;
}
.menu-sheet__top {
  display: flex;
  justify-content: flex-end;
}
.menu-sheet__nav {
  display: flex;
  flex-direction: column;
  margin-bottom: var(--space-3);
}
.menu-sheet__nav a {
  display: flex;
  align-items: center;
  min-height: 48px;
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}
.menu-sheet > .btn {
  width: 100%;
}

/* ===== Footer ===== */
.site-footer {
  padding: var(--space-8) var(--gutter) var(--space-7);
  background: var(--mist);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(4, minmax(0, 1fr));
  gap: var(--grid-gap);
}
.footer-col h2 {
  margin-bottom: var(--space-3);
  font-size: var(--label-size);
  font-weight: var(--label-weight);
  line-height: var(--label-lh);
  letter-spacing: var(--label-tracking);
  color: var(--ink);
}
.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.footer-col a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  font-size: var(--meta-size);
  color: var(--ink-2);
  text-decoration: none;
}
.footer-col a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.footer-col a .icon {
  width: var(--icon-chip);
  height: var(--icon-chip);
}
.footer-tagline {
  max-width: 32ch;
  margin-top: var(--space-3);
  color: var(--ink-2);
}
.footer-legal {
  margin-top: var(--space-8);
  font-size: var(--meta-size-small);
  color: var(--ink-3);
}
@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}

/* ===== lang-bar.css ===== */
/* Spanish suggestion bar (English page only). Fixed to the bottom, so showing it after the first
   paint never shifts the page (the CSP forbids an inline head script). */
.lang-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 55;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-2) var(--space-4);
  padding: var(--space-2) var(--gutter) calc(var(--space-2) + env(safe-area-inset-bottom));
  background: var(--mist);
  color: var(--ink);
  box-shadow: var(--shadow-floating);
}
.lang-bar[hidden] {
  display: none;
}
.lang-bar__text {
  margin: 0;
  font-size: var(--body-size);
  font-weight: var(--title-weight);
}
.lang-bar .icon {
  width: var(--icon-button);
  height: var(--icon-button);
}

/* ===== 01-hero ===== */
/* ===== 01 Hero, Catch =====
   The stage is drawn at a design size (800 x 640 from 721 px up, 358 x 320 on phones) and scaled to
   its column with --k (CSS default per width, refined by 01.js). Every pose of the posts is a pair of
   custom properties in design px, relative to the box, so the still state is pure CSS and the loop
   reads the same numbers. Still pose: lid open, the recipe post straight and 55 % inside the mouth,
   the next three posts in the fan, counter at 4, three rows in the phone, the chip beside the pill. */

/* ----- Porcelain box: shared by the hero and the closing (09 reuses this class) ----- */
/* The lid shows its inside: a white rim around a mist panel. */
.cbox--porcelain .cbox__lid {
  box-shadow: var(--shadow-resting);
}
.cbox--porcelain .cbox__lid::before {
  content: "";
  position: absolute;
  inset: calc(8px * var(--s));
  border-radius: calc(10px * var(--s));
  background: var(--wash);
}
/* The hinge: a mist strip along the lid's back edge, where it meets the back wall. */
.cbox--porcelain .cbox__lid::after {
  content: "";
  position: absolute;
  left: calc(10px * var(--s));
  right: calc(10px * var(--s));
  bottom: calc(6px * var(--s));
  height: calc(8px * var(--s));
  border-radius: var(--r-pill);
  background: var(--mist);
}
/* The back rim: a white lip on top of the wash interior, so the wall reads as having thickness. */
.cbox--porcelain .cbox__back::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: calc(6px * var(--s));
  border-radius: calc(16px * var(--s)) calc(16px * var(--s)) 0 0;
  background: var(--card);
}
.cbox--porcelain .cbox__back {
  transform-origin: 50% 190%;
  background: var(--hairline);
  box-shadow: inset var(--shadow-lifted);
}
.cbox--porcelain .cbox__slot {
  z-index: 1;
}
.cbox--porcelain .cbox__front {
  z-index: 2;
  transform-origin: 50% 100%;
  box-shadow: var(--shadow-resting), var(--shadow-floating);
}

/* ----- Layout ----- */
.hero {
  padding-bottom: var(--space-7);
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 54fr) minmax(0, 46fr);
  gap: var(--space-7);
  align-items: center;
  min-height: min(calc(100svh - var(--header-h) - 2 * var(--space-8)), 600px);
}
.hero__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.hero__promise {
  margin-top: var(--space-5);
  color: var(--ink-2);
}
.hero__ctas {
  margin-top: var(--space-6);
}
.hero__free {
  margin-top: var(--space-4);
  color: var(--ink-2);
}
.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  margin: var(--space-4) 0 0;
  padding: 0;
  list-style: none;
  font-size: var(--meta-size);
  line-height: var(--meta-lh);
  color: var(--ink-2);
}
.hero__facts li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.hero__facts .icon {
  width: var(--icon-chip);
  height: var(--icon-chip);
  color: var(--ink-2);
}

/* ----- Stage: design size, scale, coordinates ----- */
.hero-stage-col {
  position: relative;
}
.hero-stage {
  --stage-w: 800px;
  --stage-h: 640px;
  --k: 0.87;
  /* Box (element 496 x 228 at --s 1; face 480 x 168) */
  --box-s: 1;
  --box-l: 12px;
  --box-t: 392px;
  /* Phone */
  --ph-l: 500px;
  --ph-t: 0px;
  /* Posts: size and fan poses, relative to the box's top left corner */
  --pw: 220px;
  --ph: 300px;
  --band: 56px;
  --p0x: -28px;
  --p0y: -392px;
  --p1x: 8px;
  --p1y: -364px;
  --p2x: 44px;
  --p2y: -336px;
  /* Catch path: arc end above the mouth, half inside (still), tucked */
  --arc-x: 138px;
  --arc-y: -153px;
  --in-y: -80px;
  --tuck-y: -3px;
  --bump: 90px;
  /* Counter pill and chip, anchored from the stage's bottom right */
  --pill-r: 276px;
  --pill-b: 232px;
  --chip-r: 292px;
  --chip-b: 288px;
  position: relative;
  width: 100%;
  height: calc(var(--stage-h) * var(--k));
}
@media (max-width: 1400px) {
  .hero-stage {
    --k: 0.74;
  }
}
@media (max-width: 1180px) {
  .hero-stage {
    --k: 0.62;
  }
}
@media (max-width: 900px) {
  .hero-stage {
    --k: 0.9;
  }
}
.hero-stage__inner {
  position: absolute;
  top: 0;
  left: 50%;
  width: var(--stage-w);
  height: var(--stage-h);
  transform: translateX(-50%) scale(var(--k));
  transform-origin: 50% 0;
}

/* Phone with Library */
.hero-phone {
  position: absolute;
  left: var(--ph-l);
  top: var(--ph-t);
  z-index: 1;
}
.hero-phone__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding-top: var(--space-3);
}
.hero-phone__title {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
}
.hero-phone__chips {
  display: flex;
  gap: 6px;
}
.hero-phone__chips .chip--app {
  font-size: 14px;
}
.hero-phone__chip--on {
  background: var(--button);
  color: var(--on-button);
}
.hero-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.hero-list .app-row {
  transform-origin: 50% 0;
}
.hero-list .app-row__title,
.hero-list .app-row__meta {
  display: block;
}
.hero-phone .tabbar {
  padding-inline: 2px;
}

/* Box */
.hero-box {
  position: absolute;
  left: var(--box-l);
  top: var(--box-t);
  z-index: 2;
  --s: var(--box-s);
}

/* Posts: outer = position and flight, y = arc bump, tilt = rotation and scale, card = lift */
.hero-post {
  --x: var(--p0x);
  --y: var(--p0y);
  --rot: -7deg;
  --sc: 1;
  position: absolute;
  left: 0;
  top: 0;
  width: var(--pw);
  height: var(--ph);
  transform: translate(var(--x), var(--y));
}
.hero-post[data-pos="h"] {
  z-index: 0;
}
.hero-post[data-pos="0"] {
  z-index: 1;
}
.hero-post[data-pos="1"] {
  --x: var(--p1x);
  --y: var(--p1y);
  --rot: -2deg;
  z-index: 2;
}
.hero-post[data-pos="2"] {
  --x: var(--p2x);
  --y: var(--p2y);
  --rot: 4deg;
  z-index: 3;
}
.hero-post__y,
.hero-post__tilt,
.hero-post__card {
  width: 100%;
  height: 100%;
}
.hero-post__tilt {
  transform: rotate(var(--rot)) scale(var(--sc));
}
.hero-post__card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--r-16);
  background: var(--card);
  box-shadow: var(--shadow-lifted);
}
/* Floating shadow, crossfaded in when the post lifts. */
.hero-post__glow {
  position: absolute;
  inset: 0;
  border-radius: var(--r-16);
  box-shadow: var(--shadow-floating);
  opacity: 0;
  pointer-events: none;
}
.hero-post__img {
  display: block;
  width: 100%;
  height: calc(var(--ph) - var(--band));
  object-fit: cover;
  border-radius: var(--r-14) var(--r-14) 0 0;
}
.hero-post__band {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  height: var(--band);
  margin: 0;
  padding: 0 var(--space-3);
  font-size: 15px;
  line-height: 1.2;
  color: var(--ink-2);
}
.hero-post__band > span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
/* Only the front post shows its caption; the fan offsets would expose the back ones' first letters. */
.hero-post:not([data-pos="2"]) .hero-post__band > span {
  visibility: hidden;
}
.hero-post__band .icon {
  flex: none;
  width: var(--icon-chip);
  height: var(--icon-chip);
  color: var(--ink-3);
}

/* Counter pill and type chip */
.hero-counter {
  position: absolute;
  right: var(--pill-r);
  bottom: var(--pill-b);
  z-index: 3;
  border-radius: var(--r-pill);
}
.hero-counter .icon {
  color: var(--ember);
}
.hero-counter .t-num {
  font-feature-settings: "tnum";
}
.hero-chip {
  position: absolute;
  right: var(--chip-r);
  bottom: var(--chip-b);
  z-index: 4;
}
.hero-chip__icon {
  display: none;
}
.hero-chip[data-type="recipe"] .hero-chip__icon[data-type="recipe"],
.hero-chip[data-type="place"] .hero-chip__icon[data-type="place"],
.hero-chip[data-type="book"] .hero-chip__icon[data-type="book"],
.hero-chip[data-type="song"] .hero-chip__icon[data-type="song"] {
  display: inline-flex;
}
.hero-chip .dot {
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--ember);
}

.hero-pause {
  position: absolute;
  right: 0;
  bottom: -12px;
  z-index: 5;
}

/* ----- Still state ----- */
:root[data-still] .hero-box .cbox__lid {
  transform: rotateX(8deg);
}
:root[data-still] .hero-post--recipe {
  --x: var(--arc-x);
  --y: var(--in-y);
  --rot: 0deg;
  --sc: 0.62;
  z-index: 3;
}
:root[data-still] .hero-post--place {
  --x: var(--p2x);
  --y: var(--p2y);
  --rot: 4deg;
  z-index: 2;
}
/* In the still pose the place post is the front of the fan, so its caption shows. */
:root[data-still] .hero-post--place .hero-post__band > span {
  visibility: visible;
}
:root[data-still] .hero-post--book {
  --x: var(--p1x);
  --y: var(--p1y);
  --rot: -2deg;
  z-index: 1;
}
:root[data-still] .hero-post--song {
  --x: var(--p0x);
  --y: var(--p0y);
  --rot: -7deg;
  z-index: 0;
}

/* ----- Tablet and phone ----- */
@media (max-width: 900px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-6);
    min-height: 0;
  }
}
@media (max-width: 720px) {
  .hero.section--under-header {
    padding-top: calc(var(--header-h) + var(--space-4));
  }
  .hero__grid {
    gap: var(--space-5);
  }
  .hero__promise {
    margin-top: var(--space-4);
  }
  .hero__ctas {
    margin-top: 20px;
    width: 100%;
  }
  .hero__facts {
    gap: var(--space-2) var(--space-4);
  }
  .hero-stage {
    --stage-w: 358px;
    --stage-h: 320px;
    --k: 0.98;
    --box-s: 0.625;
    --box-l: 24px;
    --box-t: 165px;
    --pw: 120px;
    --ph: 164px;
    --band: 30px;
    --p0x: -18px;
    --p0y: -165px;
    --p1x: 2px;
    --p1y: -150px;
    --p2x: 22px;
    --p2y: -135px;
    --arc-x: 95px;
    --arc-y: -76px;
    --in-y: -40px;
    --tuck-y: 17px;
    --bump: 50px;
    --pill-r: 12px;
    --pill-b: 141px;
    --chip-r: 12px;
    --chip-b: 190px;
  }
  .hero-phone {
    display: none;
  }
  .hero-post__card,
  .hero-post__glow {
    border-radius: var(--r-10);
  }
  .hero-post__img {
    border-radius: var(--r-10) var(--r-10) 0 0;
  }
  .hero-post__band {
    justify-content: flex-end;
    gap: 6px;
    padding: 0 var(--space-2);
  }
  .hero-post__band > span {
    display: none;
  }
  .hero-stage-col {
    padding-bottom: var(--space-2);
  }
}

/* ===== 02-how ===== */
/* ===== 02 How it works =====
   Every element's CSS pose is the last frame of its step (the still state); 02.js animates from the
   start pose with fill "both", so nothing waits at opacity 0 when JS or motion is off.
   --how-z is the phone zoom that fits the stage (02.js measures it; CSS carries a sane default).
   The whole section fits one screen at 1728 x 1000: the steps sit together next to a panel whose height
   follows the viewport (no sticky scroll track, no tall step blocks). */

.how {
  --how-z: 1;
  --how-photo-w: calc(300px * var(--how-z));
  --how-stage-h: clamp(500px, calc(100svh - 400px), 640px);
  display: grid;
  grid-template-columns: minmax(0, 42fr) minmax(0, 58fr);
  gap: var(--grid-gap);
  align-items: center;
}

/* ----- Steps (left): three cards together; the active one is lifted onto a card ----- */
.how-steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding-bottom: 0;
}
.how-step {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: var(--space-4);
  align-items: start;
  padding: var(--space-5);
  border: 1px solid var(--clear);
  border-radius: var(--r-24);
  cursor: pointer;
  transition: background-color var(--dur-hover) var(--ease-out), border-color var(--dur-hover) var(--ease-out);
}
.how-step:hover {
  border-color: var(--hairline);
}
.how-step.is-active {
  border-color: var(--hairline);
  background: var(--card);
  box-shadow: var(--shadow-resting);
}
.how-step__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
}
/* The title is the step's button; its ::after stretches the hit area over the whole card, so a tap or a
   click anywhere on the step selects it and Tab reaches each step once. */
.how-step__btn {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-align: start;
  cursor: pointer;
}
.how-step__btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.how-step__btn:focus-visible {
  outline: none;
}
.how-step:has(.how-step__btn:focus-visible) {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
/* One icon per step instead of 01/02/03 labels (the owner rejects numbered labels); the list stays an
   ordered list for screen readers. */
.how-step__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-16);
  background: var(--card);
  color: var(--ember);
}
.how-step.is-active .how-step__icon {
  background: var(--wash);
}

/* ----- Stage (right): wash panel, phone ----- */
.how-panel {
  position: relative;
  height: var(--how-stage-h);
  border-radius: var(--r-40);
  background: var(--wash);
  /* clip, not hidden: the photo that slides in at step 3 never widens the page (1024 and 1280 overflowed),
     and position: sticky on phones keeps working because clip creates no scroll container. */
  overflow: clip;
}
.how-sticky {
  position: relative;
  height: 100%;
}
.how-scene {
  position: absolute;
  inset: var(--space-6);
  display: grid;
  place-items: center;
}
.how-device {
  position: relative;
  transition: transform var(--dur-flip) var(--ease-settle);
}
.how[data-step="3"] .how-device {
  transform: translateX(calc((var(--how-photo-w) - 24px) / -2));
}
.how-zoom {
  position: relative;
  z-index: 1;
  zoom: var(--how-z);
}
.how-photo {
  position: absolute;
  top: 26%;
  left: calc(100% - 24px);
  z-index: 0;
  width: var(--how-photo-w);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--r-24);
  box-shadow: var(--shadow-floating);
  visibility: hidden;
}
.how[data-step="3"] .how-photo {
  visibility: visible;
}
.how-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.how-controls {
  position: absolute;
  right: var(--space-5);
  bottom: var(--space-5);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.how-seg {
  display: none;
}

/* ----- Phone screens: three stacked, one shown per step ----- */
.how-body {
  padding: 0;
}
.how-screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-4) var(--space-4);
  overflow: hidden;
  visibility: hidden;
}
.how[data-step="1"] .how-screen--1,
.how[data-step="2"] .how-screen--2,
.how[data-step="3"] .how-screen--3 {
  visibility: visible;
}
.how-screen img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Screen 1: picker */
.how-bar {
  display: grid;
  grid-template-columns: 24px 1fr 24px;
  align-items: center;
  height: 32px;
  color: var(--ink-2);
}
.how-bar .icon {
  width: 20px;
  height: 20px;
}
.how-bar__title {
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
  text-align: center;
}
.how-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-1);
}
.how-tile {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: var(--r-10);
}
.how-tile__img {
  border-radius: var(--r-10);
}
.how-tile.is-on .how-tile__img {
  transform: scale(0.88);
}
.how-check {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--page);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-resting);
}
.how-check__fill {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  font-feature-settings: "tnum";
}
.how-drop {
  position: relative;
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 0;
  padding-bottom: var(--space-2);
}
.how-box .cbox__lid {
  transform: rotateX(8deg);
}
.how-box .cbox__front {
  box-shadow: var(--shadow-lifted);
}
.how-box__slot {
  overflow: visible;
}
.how-fly {
  position: absolute;
  top: -12px;
  left: calc(50% - 22px);
  width: 44px;
  height: 58px;
  overflow: hidden;
  border-radius: var(--r-10);
  box-shadow: var(--shadow-resting);
}
.how-fly--1 {
  transform: translateX(-40px) rotate(-10deg);
}
.how-fly--2 {
  transform: translateY(-6px);
}
.how-fly--3 {
  transform: translateX(40px) rotate(10deg);
}
.how-cta {
  position: relative;
  display: grid;
  height: 48px;
  flex: none;
}
.how-cta__base,
.how-cta__fill {
  grid-area: 1 / 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  /* The app's buttons in the mock take the same button shape as everywhere else. */
  border-radius: var(--r-button);
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
}
.how-cta__base {
  border: 1px solid var(--ink-3);
  color: var(--ink-3);
}
.how-cta__fill {
  background: var(--button);
  color: var(--on-button);
}
.how-cta .icon {
  width: 20px;
  height: 20px;
}

/* Screen 2: the catch, sorted */
.how-thumb {
  position: relative;
  flex: none;
  height: 256px;
  border-radius: var(--r-16);
}
.how-thumb img {
  border-radius: var(--r-16);
}
.how-stamp {
  position: absolute;
  right: -6px;
  bottom: -14px;
  height: 34px;
  padding: 0 14px;
  font-size: 15px;
  box-shadow: var(--shadow-lifted);
  transform: rotate(-6deg);
}
.how-fields {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
  padding-top: var(--space-2);
}
.how-fields .chip--app .icon {
  width: 16px;
  height: 16px;
}
.how-title {
  color: var(--ink);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
}
.how-kv {
  display: grid;
  gap: 2px;
  width: 100%;
}
.how-kv__k {
  color: var(--ink-3);
  font-size: 14px;
  line-height: 1.3;
}
.how-kv__v {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.4;
}
.how-kv__status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.how-kv__status .status-dot {
  margin-top: 0;
}
.how-shot {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  border-radius: var(--r-16);
  transform-origin: 0 0;
  visibility: hidden;
}
.how-scan {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  transform: translateY(-30px);
}
.how-scan__line {
  height: 2px;
  background: var(--ember);
}
.how-scan__band {
  height: 24px;
  background: var(--wash);
}

/* Screen 3: search, the card returns, mark as done */
.how-search {
  flex: none;
}
.how-search__input {
  pointer-events: none;
}
.how-result {
  overflow: hidden;
  flex: none;
  border-radius: var(--r-16);
  background: var(--card);
  box-shadow: var(--shadow-lifted);
}
.how-result__media {
  height: 200px;
}
.how-result__band {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3);
}
.how-result__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}
.how-result__title {
  color: var(--ink);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}
.how-result__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-3);
  font-size: 14px;
}
.how-result__meta .icon {
  width: 16px;
  height: 16px;
}
.how-status {
  position: relative;
  display: grid;
  width: 10px;
  height: 10px;
}
.how-status .status-dot {
  grid-area: 1 / 1;
  width: 10px;
  height: 10px;
  margin: 0;
}
.how-done {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: 44px;
  margin-top: var(--space-1);
  border: 1px solid var(--ink-3);
  border-radius: var(--r-button);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}
.how-done__tick {
  position: relative;
  display: grid;
  width: 22px;
  height: 22px;
  border: 1px solid var(--ink-3);
  border-radius: var(--r-pill);
}
.how-done__fill {
  position: absolute;
  inset: -1px;
  border-radius: var(--r-pill);
  background: var(--success);
}
.how-done__wipe {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.how-done__icon {
  display: grid;
  place-items: center;
  color: var(--page);
}
.how-done__icon .icon {
  width: 14px;
  height: 14px;
}
.how-tabbar {
  margin: auto calc(var(--space-4) * -1) calc(var(--space-4) * -1);
}
.how-tabbar .catch-disc {
  width: 44px;
  height: 44px;
  margin-top: -12px;
}

/* ===== Phones: the panel sits on top, sticky under the header, with the 1-2-3 control ===== */
@media (max-width: 900px) {
  .how {

    /* Real size on phones: the panel crops the phone instead of shrinking it (nothing under 14 px). */
    --how-z: 1;
    --how-photo-w: 120px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .how-stage-col {
    order: -1;
    position: sticky;
    top: var(--header-h);
    z-index: 2;
    margin-inline: calc(var(--gutter) * -1);
    padding: var(--space-2) var(--gutter) var(--space-3);
    /* The band's own tone (opaque, the steps scroll under it), never a white strip across the sky band. */
    background: var(--sky-top);
  }
  .how-panel {
    height: 480px;
    overflow: hidden;
  }
  .how-sticky {
    position: relative;
    top: auto;
    height: 100%;
    min-height: 0;
  }
  .how-scene {
    inset: var(--space-4) var(--space-4) auto;
    place-items: start center;
  }
  /* The box sits below the crop, so the button comes right under the picker. */
  .how-cta {
    order: 1;
  }
  .how-drop {
    order: 2;
  }
  .how-thumb {
    height: 150px;
  }
  .how-result__media {
    height: 140px;
  }
  .how-photo {
    top: 34%;
    border-radius: var(--r-16);
  }
  .how-controls {
    left: var(--space-4);
    right: var(--space-4);
    bottom: var(--space-4);
    justify-content: center;
  }
  .how-seg {
    display: inline-flex;
    background: var(--card);
    box-shadow: var(--shadow-lifted);
  }
  .how-pause {
    box-shadow: var(--shadow-lifted);
  }
  .how-seg .seg__btn {
    padding: 0 var(--space-3);
  }
  /* Steps at their own height right under the panel: no tall blocks, no gaps between them. */
  .how-steps {
    gap: var(--space-2);
    padding-top: var(--space-2);
  }
  .how-step {
    gap: var(--space-3);
    padding: var(--space-4);
  }
}

/* ===== 03-find ===== */
/* 03 Find It by What's Inside. The library window rises across the bottom edge of the section and
   hangs over the top of 04-types (which adds the same overhang to its top padding).
   Still pose: the "lemon" result first, with its focus ring and its chip (the fragment's default). */
.find {
  --find-overhang: clamp(96px, 12vw, 260px);
  padding-bottom: 0;
  z-index: 1;
}
.find-window {
  display: flex;
  margin-bottom: calc(-1 * var(--find-overhang));
  border: 1px solid var(--hairline);
}
@supports (animation-timeline: view()) {
  .find-window {
    animation: find-rise linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 40%;
  }
}
@keyframes find-rise {
  from {
    transform: translateY(48px);
  }
  to {
    transform: none;
  }
}

/* The library's icon rail (labels for screen readers); hidden on phones. */
.find-side {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  width: 72px;
  padding: var(--space-5) 0;
  background: var(--mist);
}
.find-side__item {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-12);
  color: var(--ink-2);
}
.find-side__item[aria-current="page"] {
  background: var(--wash);
  color: var(--ink);
}
.find-side__item .icon {
  width: var(--icon-button);
  height: var(--icon-button);
}
@media (max-width: 899px) {
  .find-side {
    display: none;
  }
}

.find-main {
  position: relative;
  flex: 1;
  min-width: 0;
  padding: 0 var(--space-5) var(--space-5);
}
.find-topbar {
  padding: var(--space-5) 0;
}
.find-pause {
  flex: none;
}
/* The search shrinks first, so Catch and the pause button always fit inside the window at 390. */
.find-search {
  flex: 1 1 auto;
  min-width: 0;
}
.find-search .app-search__input {
  min-width: 0;
  font-weight: 500;
}

/* The grid: justified rows by 03.js (target 280); base .jrows is the no-JS fallback. */
.find-grid.is-justified > * {
  flex: 0 0 var(--jw);
  min-width: 0;
}
.find-grid.is-justified::after {
  display: none;
}
.find-grid[hidden] {
  display: none;
}
.find-card[hidden] {
  display: none;
}
.find-card {
  transform-origin: 0 0;
}
.find-card .lib-card__media {
  outline: 2px solid var(--clear);
  outline-offset: 3px;
}
.find-card.is-match .lib-card__media {
  outline-color: var(--focus);
}
.find-chip {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 1;
  transform-origin: 0 50%;
}

/* Typographic link card: the 4:5 slot of the library, title in the display face. */
.find-typo.type-card {
  height: auto;
  aspect-ratio: var(--r);
}

/* Empty result: the open box drawn from the catch mark with a dotted outline. */
.find-empty {
  display: grid;
  justify-items: center;
  gap: var(--space-4);
  padding: var(--space-8) var(--space-4);
  text-align: center;
}
.find-empty[hidden] {
  display: none;
}
.find-empty__figure {
  position: relative;
  display: grid;
  place-items: end center;
  width: 168px;
  height: 120px;
  padding-bottom: var(--space-3);
  border: 1px dashed var(--hairline);
  border-radius: var(--r-16);
}
.find-empty__lid {
  position: absolute;
  left: 8px;
  right: 8px;
  top: -26px;
  height: 16px;
  border: 1px dashed var(--hairline);
  border-radius: var(--r-10);
  transform: rotate(-8deg);
}
.find-empty__title {
  color: var(--ink);
}

@media (max-width: 640px) {
  .find-main {
    padding: 0 var(--space-3) var(--space-3);
  }
  .find-topbar {
    gap: var(--space-2);
    padding: var(--space-3) 0;
  }
  .find-search .kbd {
    display: none;
  }
  .find-catch {
    padding: 0 var(--space-4);
  }
  /* Four cards on phones; the reorder brings the match into them. */
  .find-grid > :nth-child(n + 5 of :not([hidden])) {
    display: none;
  }
  .find-chip {
    left: 8px;
    top: 8px;
  }
}

/* Very wide screens: the intro is one short line, so the head splits evenly and the line reaches
   past the middle of the row instead of leaving the right half empty. */
@media (min-width: 2200px) {
  .find .section-head {
    grid-template-columns: 1fr 1fr;
  }
}

/* ===== 04-types ===== */
/* 04 27 Types. The top padding adds the overhang of the library window from 03-find.
   Still pose: the ribbons wrap as static rows, cards at rest, flips swap instantly. */
.types {
  padding-top: calc(var(--section-pad) + clamp(96px, 12vw, 260px));
}

/* ===== Ribbons: 24 px per second, opposite directions, masked edges ===== */
.types-ribbons {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: var(--space-4);
  row-gap: var(--space-3);
  margin-bottom: var(--space-8);
  overflow: hidden;
}
.ribbon {
  grid-column: 1;
  min-width: 0;
  overflow: hidden;
  contain: paint;
  -webkit-mask-image: linear-gradient(90deg, var(--clear), var(--ink) 6%, var(--ink) 94%, var(--clear));
  mask-image: linear-gradient(90deg, var(--clear), var(--ink) 6%, var(--ink) 94%, var(--clear));
}
.ribbon__track {
  display: flex;
  gap: var(--space-3);
  width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
}
.types-pause {
  grid-column: 2;
  grid-row: 1 / span 2;
}
/* Reduced motion: the two rows wrap as static rows (no swipe, no mask). */
:root[data-still] .ribbon {
  -webkit-mask-image: none;
  mask-image: none;
}
:root[data-still] .ribbon__track {
  flex-wrap: wrap;
  width: auto;
}
:root[data-still] .ribbon__track [data-dup] {
  display: none;
}

/* ===== Flip cards: front = the library card, back = what it found ===== */
.tcard {
  position: relative;
  border-radius: var(--r-12);
  perspective: 1400px;
}
.tcard__inner {
  position: relative;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform var(--dur-flip) var(--ease-in-out);
}
.tcard.is-flipped .tcard__inner {
  transform: rotateY(180deg);
}
.tcard__face {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.tcard__open {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--r-12);
  background: var(--clear);
  -webkit-tap-highlight-color: var(--clear);
}
.tcard__back {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-4);
  overflow: hidden;
  border-radius: var(--r-12);
  background: var(--wash);
  color: var(--ink);
  transform: rotateY(180deg);
  cursor: pointer;
}
.tcard__label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-3);
}
.tcard__label .icon,
.tcard__facts .icon,
.tcard__source .icon {
  flex: none;
  width: var(--icon-chip);
  height: var(--icon-chip);
}
.tcard__facts {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}
.tcard__facts li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: var(--meta-size);
  font-weight: 500;
  line-height: 1.3;
}
.tcard__facts .icon {
  margin-top: 1px;
  color: var(--ink-2);
}
.tcard__source {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--meta-size-small);
  color: var(--ink-2);
}
.tcard__close {
  align-self: flex-start;
  margin-top: auto;
  margin-left: calc(-1 * var(--space-2));
}

/* Justified rows by 04.js (target 250, two rows at 1728); base .jrows is the no-JS fallback. */
.types-grid.is-justified > * {
  flex: 0 0 var(--jw);
  min-width: 0;
}
.types-grid.is-justified::after {
  display: none;
}

/* Typographic habit card (no image by design). */
.types-typo.type-card {
  height: auto;
  aspect-ratio: var(--r);
}

@media (max-width: 640px) {
  .types-ribbons {
    margin-bottom: var(--space-7);
  }
  .tcard .lib-card__media {
    min-height: 168px;
  }
  .tcard__back {
    gap: 6px;
    padding: 12px;
  }
  .tcard__facts li {
    font-size: var(--meta-size);
  }
}
/* Typographic cards in narrow justified slots: a 20 px title and a body clamped to whole lines,
   so title plus body fit the 4:5 card from 160 px wide. */
.types-typo.type-card,
.find-typo.type-card {
  padding: 16px;
}
/* The title lives in the band under the card, like every photo card, so the note shows its body only. */
.types-typo .type-card__title,
.find-typo .type-card__title {
  display: none;
}
.types-typo .type-card__body,
.find-typo .type-card__body {
  display: -webkit-box;
  max-height: none;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
}
@media (min-width: 641px) {
  .find-typo .type-card__body {
    -webkit-line-clamp: 6;
  }
}

/* ===== 05-boxes ===== */
/* 05 One Box for the Two of You.
   Layout: panel left (58 %), text and photo right (42 %). At 390: text, panel, photo.
   CSS default = still pose: churros on both phones, toast on Diego's, birria done on both,
   dot resting at Diego's end of the arc. The loop starts each cycle from the "before" pose. */

.boxes-grid {
  display: grid;
  grid-template-columns: minmax(0, 58fr) minmax(0, 42fr);
  grid-template-areas:
    "panel text"
    "panel photo";
  grid-template-rows: auto 1fr;
  column-gap: var(--grid-gap);
  row-gap: var(--space-6);
}
.boxes-text {
  grid-area: text;
}
.boxes-panel {
  grid-area: panel;
}
.boxes-photo {
  grid-area: photo;
  align-self: end;
}

/* ----- Limits list ----- */
.boxes-limits {
  display: grid;
  gap: var(--space-3);
}
.boxes-limits li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--body-size);
  line-height: var(--body-lh);
  color: var(--ink-2);
}
.boxes-limits .icon {
  color: var(--ink-3);
}
.boxes-limits b {
  font-weight: var(--title-weight);
  color: var(--ink);
}

/* ----- Couple photo: 3:2 like the original, framed on the couple and their phone ----- */
.boxes-photo {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  border-radius: var(--r-24);
  background: var(--wash);
}
/* Crop window in the 2400 x 1600 cafe original: x 800 to 2240, y 187 to 1147 (both faces, the phone
   between their hands, the table edge), so the two people and the phone lead and the cafe stays a backdrop. */
.boxes-photo img {
  position: absolute;
  left: -55.56%;
  top: -19.48%;
  width: 166.67%;
  max-width: none;
  height: auto;
}

/* ----- Stage panel ----- */
.boxes-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--space-6);
  border-radius: var(--r-40);
  background: var(--wash);
}
.boxes-panel__top {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.boxes-stage {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: var(--space-9);
}
.boxes-device {
  position: relative;
  display: grid;
  justify-items: center;
  gap: var(--space-4);
}
.boxes-device--carla {
  z-index: 1;
}
.boxes-device--diego {
  z-index: 2;
  margin-left: -12px;
  margin-top: var(--space-8);
}
.boxes-device__label {
  white-space: nowrap;
}

/* Arc and travelling dot (geometry set by 05.js from the anchors) */
.boxes-arc {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.boxes-arc__path {
  fill: none;
  stroke: var(--ink-3);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 1 7;
}
.boxes-dot {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  width: 14px;
  height: 14px;
  border-radius: var(--r-pill);
  background: var(--ember);
  box-shadow: 0 0 0 3px var(--page);
  pointer-events: none;
}
/* Decorative; drawn only once 05.js has measured the arc (it would sit at the stage corner otherwise). */
.boxes-stage:not(.is-measured) .boxes-dot,
.boxes-stage:not(.is-measured) .boxes-arc {
  visibility: hidden;
}

/* ----- Phone and in-app UI ----- */
.boxes-phone {
  --phone-w: 260px;
  --phone-h: 530px;
}
.boxes-screen {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-4) var(--space-4);
}
.boxes-name {
  font-size: var(--card-title-size);
  font-weight: var(--title-weight);
  line-height: var(--card-title-lh);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.boxes-people {
  display: flex;
  align-self: flex-start;
  margin-top: calc(var(--space-2) * -1);
}
.boxes-av {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: var(--r-pill);
  background: var(--wash);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 0 0 2px var(--page);
}
.boxes-av + .boxes-av {
  margin-left: -6px;
  background: var(--mist);
}
.boxes-card {
  overflow: hidden;
  border-radius: var(--r-16);
  background: var(--card);
  box-shadow: var(--shadow-resting);
}
.boxes-card__media {
  aspect-ratio: 5 / 4;
  overflow: hidden;
  background: var(--wash);
}
.boxes-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.boxes-card__band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 10px var(--space-3);
}
.boxes-card__band > :first-child {
  min-width: 0;
}
.boxes-card__title {
  overflow: hidden;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.boxes-card--land .boxes-card__band {
  display: grid;
  gap: 2px;
}
.boxes-card__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  line-height: 1.3;
  color: var(--ink-3);
}
.boxes-card__meta .icon,
.boxes-row__icon .icon,
.boxes-status .icon,
.boxes-done .icon,
.boxes-toast .icon {
  width: var(--icon-chip);
  height: var(--icon-chip);
}

/* Diego's Done pill: outlined before the tap, filled after (stacked, crossfaded by the loop) */
.boxes-done {
  position: relative;
  display: grid;
  flex: none;
}
.boxes-done > span {
  grid-area: 1 / 1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.boxes-done__todo {
  box-shadow: inset 0 0 0 1px var(--ink-3);
  color: var(--ink);
  opacity: 0;
}
.boxes-done__done {
  background: var(--success);
  color: var(--page);
}

/* Library row (the other person's catch): the two-line row of the hero's list (32 px icon, title, one
   meta line that carries the status word, the status dot at the right). Both states overlay in one cell. */
.boxes-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 8px;
  padding: var(--space-2) 8px;
  border-radius: var(--r-14);
  background: var(--mist);
}
.boxes-row__icon {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--r-10);
  background: var(--card);
  color: var(--ink-2);
}
.boxes-row__title {
  min-width: 0;
  overflow: hidden;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.boxes-status {
  position: relative;
  display: grid;
  min-width: 0;
}
.boxes-status > span {
  grid-area: 1 / 1;
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.boxes-row__meta {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink-3);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.boxes-status .status-dot {
  margin-top: 0;
}
/* Carla's birria row: the done state is the still pose, the to-do state shows only inside the loop */
.boxes-device--carla .boxes-status__todo {
  opacity: 0;
}

.boxes-toast {
  position: absolute;
  bottom: var(--space-4);
  left: var(--space-3);
  right: 72px;
  z-index: 2;
  justify-content: flex-start;
  padding: 10px 12px;
  font-size: 14px;
}
.boxes-catch {
  position: absolute;
  right: var(--space-4);
  bottom: var(--space-4);
  width: 48px;
  height: 48px;
  margin: 0;
}

.boxes-pause {
  flex: none;
}

/* ----- Responsive ----- */
@media (max-width: 1279px) and (min-width: 901px) {
  .boxes-phone {
    --phone-w: 210px;
    --phone-h: 428px;
  }
  .boxes-catch {
    display: none;
  }
  .boxes-toast {
    right: var(--space-3);
  }
}
@media (max-width: 900px) {
  .boxes-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "text"
      "panel"
      "photo";
    grid-template-rows: auto;
  }
}
@media (max-width: 640px) {
  .boxes-panel {
    padding: var(--space-4);
    border-radius: var(--r-24);
  }
  .boxes-stage {
    padding-top: var(--space-8);
  }
  .boxes-device--diego {
    margin-top: var(--space-6);
  }
  .boxes-phone {
    --phone-w: 160px;
    --phone-h: 326px;
    --phone-band: 6px;
    --phone-r-out: 30px;
    --phone-r-in: 24px;
    --notch-w: 52px;
    --notch-h: 16px;
  }
  .boxes-phone .phone__notch {
    top: 7px;
  }
  .boxes-phone .phone__status {
    height: 32px;
    padding: 0 10px;
    font-size: 14px;
  }
  .boxes-phone .phone__status-icons {
    display: none;
  }
  .boxes-screen {
    gap: var(--space-2);
    padding: var(--space-1) var(--space-2) var(--space-2);
  }
  .boxes-name {
    font-size: 14px;
  }
  .boxes-people {
    margin-top: 0;
  }
  .boxes-av {
    width: 22px;
    height: 22px;
  }
  .boxes-catch,
  .boxes-card__meta,
  .boxes-done span span,
  .boxes-card--land .boxes-card__band {
    display: none;
  }
  .boxes-card__band {
    padding: 6px 8px;
  }
  .boxes-card__media {
    aspect-ratio: 16 / 10;
  }
  .boxes-card__title,
  .boxes-row__title {
    font-size: 14px;
  }
  .boxes-done > span {
    height: 26px;
    padding: 0 6px;
  }
  .boxes-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
    padding: 6px 8px;
  }
  .boxes-row__icon,
  .boxes-row__type {
    display: none;
  }
  .boxes-toast {
    left: var(--space-1);
    right: var(--space-1);
    bottom: var(--space-2);
    gap: 6px;
    padding: 8px;
    white-space: normal;
  }
  .boxes-device__label {
    white-space: normal;
    text-align: center;
  }
}

/* ===== 06-ways ===== */
/* 06 Two More Ways In. The H2 and lead in a .section-head row; under it one column per way in
   (56/44 at 1101 px and up, halves from 901), each with its point on top and its card under it, both
   cards 600 px tall. Stacked at 900 and under: point, chat, point, card.
   CSS default = still pose: the full chat (no typing dots) and the card in the page's language. */

.ways-grid {
  display: grid;
  grid-template-columns: minmax(0, 56fr) minmax(0, 44fr);
  grid-template-areas:
    "bot langs"
    "chat catch";
  column-gap: var(--grid-gap);
  row-gap: var(--space-5);
  align-items: start;
}
.ways-point--bot {
  grid-area: bot;
}
.ways-point--langs {
  grid-area: langs;
}
.ways-chat {
  grid-area: chat;
}
.ways-catch {
  grid-area: catch;
}
.ways-point {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: var(--space-4);
  align-items: start;
  min-height: 96px;
}
.ways-point__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-16);
  background: var(--wash);
  color: var(--ink);
}
.ways-point b {
  font-weight: var(--title-weight);
  color: var(--ink);
}
/* The section is an ink band (base.css): the two points sit on it, so they take the on-ink tones. */
.section--ink .ways-point .t-body {
  color: var(--on-ink-2);
}
.section--ink .ways-point b {
  color: var(--on-ink);
}

/* ----- Chat card ----- */
.ways-chat {
  display: flex;
  flex-direction: column;
  height: 600px;
  box-shadow: var(--shadow-lifted);
}
.ways-chat__head {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
}
.ways-chat__logo {
  width: 40px;
  height: 40px;
}
/* Bubbles stack from the bottom like a real chat; the card's height is fixed, so a message arriving
   never moves anything below, and an overflowing first message is cut at the top edge. */
.ways-chat__log {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: var(--space-3);
  mask-image: linear-gradient(transparent, black var(--space-6));
  padding: var(--space-5);
  border-radius: 0 0 var(--r-24) var(--r-24);
  background: var(--mist);
}
.ways-msg {
  display: flex;
  flex: none;
}
/* Messages not yet arrived in the loop (and the typing rows outside it) leave the flow. */
.ways-msg[data-off] {
  display: none;
}
.ways-msg--me {
  justify-content: flex-end;
}
/* Day separator between the earlier exchange (history, always there) and today's loop. */
.ways-msg--day {
  justify-content: center;
}
.ways-day {
  padding: 4px 12px;
  border-radius: var(--r-pill);
  background: var(--card);
  font-size: var(--meta-size);
  line-height: var(--meta-lh);
  color: var(--ink-2);
}
.ways-bubble {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  max-width: 88%;
  padding: 10px 14px;
  border-radius: var(--r-16);
  font-size: 15px;
  line-height: 1.4;
}
.ways-bubble .icon {
  width: var(--icon-chip);
  height: var(--icon-chip);
}
.ways-bubble--me {
  border-bottom-right-radius: 6px;
  background: var(--button);
  color: var(--on-button);
}
.ways-bubble--bot {
  flex-direction: column;
  align-items: flex-start;
  border-bottom-left-radius: 6px;
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow-resting);
}
.ways-bubble__text {
  font-weight: 600;
}
.ways-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ways-chips .chip--app {
  gap: 6px;
  height: 32px;
  font-size: var(--meta-size);
}
.ways-album {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  width: min(88%, 300px);
  padding: 4px;
}
.ways-album img {
  width: 100%;
  aspect-ratio: 1;
  height: auto;
  object-fit: cover;
  border-radius: var(--r-12);
}

/* Typing dots: their own bot row, shown only inside the loop */
.ways-typing {
  display: inline-flex;
  gap: 5px;
  padding: 14px 16px;
  border-radius: var(--r-16);
  border-bottom-left-radius: 6px;
  background: var(--card);
  box-shadow: var(--shadow-resting);
}
.ways-typing span {
  width: 8px;
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--ink-3);
}

/* ----- Bilingual catch card ----- */
/* Same 600 px as the chat at desktop: the photo fills what the band leaves (about 4:3 at 1728). */
.ways-catch {
  display: flex;
  flex-direction: column;
  height: 600px;
  overflow: hidden;
}
.ways-catch__media {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: var(--wash);
}
.ways-catch__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ways-card-pause {
  position: absolute;
  right: var(--space-3);
  bottom: var(--space-3);
}
.ways-flip {
  perspective: 900px;
}
.ways-flip__inner {
  display: grid;
  transform-style: preserve-3d;
}
.ways-face {
  grid-area: 1 / 1;
  display: grid;
  gap: var(--space-1);
  padding: var(--space-4) var(--space-5) var(--space-5);
  background: var(--card);
  backface-visibility: hidden;
}
.ways-face--back {
  transform: rotateX(180deg);
}
.ways-face__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}
.ways-lang-chip {
  flex: none;
  font-weight: 600;
}
.ways-face__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--meta-size);
  line-height: var(--meta-lh);
  color: var(--ink-3);
}
.ways-face__meta .icon {
  width: var(--icon-chip);
  height: var(--icon-chip);
}

/* ----- Responsive ----- */
@media (max-width: 1100px) and (min-width: 901px) {
  .ways-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}
@media (max-width: 900px) {
  .ways-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "bot" "chat" "langs" "catch";
  }
  .ways-point {
    min-height: 0;
  }
  .ways-point--langs {
    margin-top: var(--space-5);
  }
  .ways-chat__log,
  .ways-chat__head {
    padding-inline: var(--space-4);
  }
  .ways-catch {
    height: auto;
  }
  .ways-catch__media {
    flex: none;
    aspect-ratio: 4 / 3;
  }
}

/* ===== 07-pricing ===== */
/* 07 Pricing. H2 left, intro and the two toggles right; three equal cards whose rows line up
   (subgrid), Pro on wash; three promises in one row. Still pose = the static markup. */

.pricing-head__side {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4) var(--space-6);
}
.pricing-head__side .t-lead {
  flex: 1 1 320px;
}
.pricing-controls {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.pricing-seg {
  min-height: 44px;
}

/* ----- Cards ----- */
.pricing-plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(5, auto);
  column-gap: var(--grid-gap);
}
.plan {
  display: grid;
  grid-row: span 5;
  grid-template-rows: subgrid;
  row-gap: var(--space-4);
  padding: clamp(24px, 2.2vw, 40px);
}
.plan--featured {
  box-shadow: var(--shadow-lifted);
}
.plan__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 36px;
}
.plan__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2) var(--space-3);
  margin: 0;
}
.plan__amount {
  font-size: clamp(36px, 2.6vw, 48px);
  line-height: 1;
  color: var(--ink);
}
/* Free shows "$0": the zero is not a price of pricing.ts, so the symbol is drawn here and the
   drift test (every "$ + digit" in the pricing block must carry data-price) stays strict. */
.plan__amount--zero::before {
  content: "$";
}
.plan__unit,
.plan__meta {
  margin: 0;
  color: var(--ink-2);
}
.plan__lines {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin: var(--space-2) 0 0;
  padding: 0;
  list-style: none;
}
.plan__lines li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: var(--space-3);
  align-items: start;
  font-size: var(--body-size);
  line-height: var(--body-lh);
  color: var(--ink);
}
.plan__lines .icon {
  width: 20px;
  height: 20px;
  margin-top: 0.2em;
  color: var(--accent);
}
.plan__cta {
  align-self: end;
  padding-top: var(--space-3);
}

/* ----- Promises ----- */
.pricing-promises {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--grid-gap);
  margin: var(--space-7) 0 0;
  padding: 0;
  list-style: none;
}
.pricing-promises li {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  font-size: var(--body-size);
  font-weight: 600;
  color: var(--ink);
}
.pricing-promises .icon {
  flex: none;
  width: 20px;
  height: 20px;
  color: var(--ink-2);
}

@media (max-width: 900px) {
  .pricing-controls {
    width: 100%;
  }
  .pricing-seg {
    flex: 1 1 100%;
    display: flex;
  }
  .pricing-plans {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    row-gap: var(--space-5);
  }
  .plan {
    display: flex;
    flex-direction: column;
    grid-row: auto;
  }
  .plan__cta {
    align-self: stretch;
  }
  .pricing-promises {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-4);
  }
  .pricing-promises li {
    justify-content: flex-start;
  }
}

/* ===== 08-faq ===== */
/* 08 FAQ. Two independent columns at desktop (opening one item never stretches its neighbour),
   one column under 900 px. White cards on mist, no hairlines. Height animates through
   grid-template-rows (the one layout animation allowed); the chevron turns 180 degrees. */

.faq {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4) var(--grid-gap);
  align-items: start;
}
.faq__col {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.faq-item__q {
  margin: 0;
}
.faq-item__q button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  width: 100%;
  min-height: 64px;
  padding: var(--space-4) var(--space-5);
  border: 0;
  border-radius: var(--r-16);
  background: var(--clear);
  color: var(--ink);
  font: inherit;
  font-size: var(--card-title-size);
  font-weight: 600;
  line-height: var(--card-title-lh);
  text-align: start;
  cursor: pointer;
}
.faq-chev {
  flex: none;
  width: 20px;
  height: 20px;
  color: var(--ink-2);
  transition: transform var(--dur-chip) var(--ease-out);
}
.faq-item__a {
  display: grid;
  grid-template-rows: 1fr;
}
.faq-item__inner {
  min-height: 0;
  overflow: hidden;
}
.faq-item__inner .t-body {
  margin: 0;
  padding: 0 var(--space-5) var(--space-5);
}

/* Collapse only once JS is wired, so the answers never hide without a way to open them. */
.faq.is-ready .faq-item__a {
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur-chip) var(--ease-out);
}
.faq.is-ready .faq-item.is-open .faq-item__a {
  grid-template-rows: 1fr;
}
.faq.is-ready .faq-item:not(.is-open) .faq-chev {
  transform: none;
}
.faq-item.is-open .faq-chev,
.faq:not(.is-ready) .faq-chev {
  transform: rotate(180deg);
}

@media (max-width: 900px) {
  .faq {
    grid-template-columns: minmax(0, 1fr);
  }
  .faq-item__q button {
    padding: var(--space-4);
  }
  .faq-item__inner .t-body {
    padding: 0 var(--space-4) var(--space-4);
  }
}

/* ===== 09-closing ===== */
/* ===== 09 Closing =====
   Reversed sky. Photo left (44 %), H2, lead, buttons and the box right (56 %). The box is the hero's
   porcelain box (.cbox--porcelain lives in 01.css) at 0.75; it catches the lake post once when the
   stage is 60 % visible. Still pose: lid open, the post straight and half inside the mouth, the chip
   beside the box. Stage poses are design px relative to the box, as in the hero. */
.closing__grid {
  display: grid;
  grid-template-columns: minmax(0, 44fr) minmax(0, 56fr);
  gap: var(--space-8);
  align-items: center;
}
.closing__media {
  order: -1;
}
.closing__photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--r-24);
  box-shadow: var(--shadow-resting);
}
.closing__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.closing__lead {
  margin-top: var(--space-4);
  color: var(--ink-2);
}
.closing__ctas {
  margin-top: var(--space-6);
}

/* ----- Stage ----- */
.close-stage {
  /* Box at 0.9 (the hero's 1.2x of 0.75); every pose relative to the box scales by the same 1.2.
     Design width is symmetric around the box (236 + 446 + 236), so the box itself sits centered in
     the column; the post starts 8 px from the left edge and the chip ends inside the right margin. */
  --stage-w: 918px;
  --stage-h: 372px;
  --k: 1;
  --box-s: 0.9;
  --box-l: 236px;
  --box-t: 160px;
  --pw: 216px;
  --ph: 216px;
  --band: 46px;
  --px: -228px;
  --py: -134px;
  --rot: -6deg;
  --arc-x: 115px;
  --arc-y: -97px;
  --in-y: -47px;
  --bump: 84px;
  --chip-l: 572px;
  --chip-t: 105px;
  position: relative;
  width: 100%;
  height: calc(var(--stage-h) * var(--k));
  margin-top: var(--space-6);
}
/* Centered in the column: at k < 1 the scaled stage fills it, at k = 1 it sits in the middle. */
.close-stage__inner {
  position: absolute;
  top: 0;
  left: calc((100% - var(--stage-w) * var(--k)) / 2);
  width: var(--stage-w);
  height: var(--stage-h);
  transform: scale(var(--k));
  transform-origin: 0 0;
}
.close-box {
  position: absolute;
  left: var(--box-l);
  top: var(--box-t);
  --s: var(--box-s);
}
.close-post {
  --x: var(--px);
  --y: var(--py);
  --r: var(--rot);
  --sc: 1;
  position: absolute;
  left: 0;
  top: 0;
  width: var(--pw);
  height: var(--ph);
  transform: translate(var(--x), var(--y));
}
.close-post__y,
.close-post__tilt,
.close-post__card {
  width: 100%;
  height: 100%;
}
.close-post__tilt {
  transform: rotate(var(--r)) scale(var(--sc));
}
.close-post__card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--r-16);
  background: var(--card);
  box-shadow: var(--shadow-lifted);
}
.close-post__glow {
  position: absolute;
  inset: 0;
  border-radius: var(--r-16);
  box-shadow: var(--shadow-floating);
  opacity: 0;
  pointer-events: none;
}
.close-post__img {
  display: block;
  width: 100%;
  height: calc(var(--ph) - var(--band));
  object-fit: cover;
  border-radius: var(--r-14) var(--r-14) 0 0;
}
.close-post__band {
  display: flex;
  align-items: center;
  gap: 6px;
  height: var(--band);
  margin: 0;
  padding: 0 var(--space-3);
  font-size: 14px;
  line-height: 1.2;
  color: var(--ink-2);
}
.close-post__band > span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.close-post__band .icon {
  flex: none;
  width: var(--icon-chip);
  height: var(--icon-chip);
  color: var(--ink-3);
}
.close-chip {
  position: absolute;
  left: var(--chip-l);
  top: var(--chip-t);
  z-index: 3;
}
.close-chip .dot {
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--ember);
}
/* Armed by 09.js only when motion runs: the chip waits for its pop. Without JS it simply shows. */
.close-stage.is-armed .close-chip {
  opacity: 0;
}

/* ----- Still state (and the pose the catch ends on) ----- */
:root[data-still] .close-box .cbox__lid {
  transform: rotateX(8deg);
}
:root[data-still] .close-post {
  --x: var(--arc-x);
  --y: var(--in-y);
  --r: 0deg;
  --sc: 0.62;
}

/* ----- Tablet and phone: H2, buttons, box, photo ----- */
@media (max-width: 900px) {
  .closing__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-7);
  }
  .closing__media {
    order: 0;
  }
}
@media (max-width: 720px) {
  .closing__ctas {
    width: 100%;
  }
  .close-stage {
    --stage-w: 358px;
    --stage-h: 280px;
    --box-s: 0.625;
    --box-l: 40px;
    --box-t: 129px;
    --pw: 140px;
    --ph: 140px;
    --band: 36px;
    --px: -40px;
    --py: -122px;
    --arc-x: 85px;
    --arc-y: -57px;
    --in-y: -28px;
    --bump: 45px;
    --chip-l: 250px;
    --chip-t: 92px;
  }
  .close-post__band {
    justify-content: flex-end;
    padding: 0 var(--space-2);
  }
  .close-post__band > span {
    display: none;
  }
  .close-post__card,
  .close-post__glow {
    border-radius: var(--r-10);
  }
  .close-post__img {
    border-radius: var(--r-10) var(--r-10) 0 0;
  }
}

/* ===== legal.css ===== */
/* Legal pages (privacy, terms) and the 404. Every rule is scoped to .legal-* or .not-found, so the
   home does not change. Tokens and components only from tokens.css and base.css. */

/* ===== Legal: first screen (title, effective date, note, first paragraph) ===== */
.legal-hero {
  padding-bottom: var(--space-7);
}
.legal-hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  text-align: center;
}
.legal-hero h1 {
  font-family: var(--font-display);
  font-size: var(--h2-size);
  font-weight: var(--h2-weight);
  line-height: var(--h2-lh);
  letter-spacing: var(--h2-tracking);
  word-spacing: var(--h2-word-spacing);
  color: var(--ink);
  text-wrap: balance;
}
.legal-hero .doc-meta {
  font-size: var(--meta-size);
  font-weight: var(--label-weight);
  line-height: var(--meta-lh);
  color: var(--ink);
}
.legal-hero .doc-note {
  max-width: 80ch;
  font-size: var(--meta-size);
  line-height: var(--meta-lh);
  color: var(--ink-2);
}
.legal-hero .doc-note a {
  color: var(--accent);
  text-underline-offset: 3px;
}
.legal-hero .lede {
  max-width: 72ch;
  margin-top: var(--space-2);
  font-size: var(--lead-size);
  font-weight: var(--lead-weight);
  line-height: var(--lead-lh);
  color: var(--ink-2);
  text-wrap: pretty;
}
.legal-hero .lede a {
  color: var(--accent);
  text-underline-offset: 3px;
}

/* ===== Legal: section list, text and rail in one full-width row ===== */
.legal-main {
  padding-top: var(--space-7);
}
/* The side columns carry no card surface: they are sticky, so beside every part of the text the
   reader always has the section list and the rail in view. */
.legal-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(0, 76ch) minmax(220px, 1fr);
  grid-template-areas: "toc doc rail";
  gap: var(--space-8);
  align-items: start;
}
.legal-toc {
  grid-area: toc;
}
.legal-doc {
  grid-area: doc;
}
.legal-rail {
  grid-area: rail;
}
.legal-toc,
.legal-rail {
  position: sticky;
  top: calc(var(--header-h) + var(--space-5));
}
.legal-toc {
  max-height: calc(100svh - var(--header-h) - var(--space-7));
  overflow-y: auto;
}
.legal-toc__summary {
  display: none;
}
.legal-toc__summary::-webkit-details-marker {
  display: none;
}
.legal-toc__title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  padding: 0 var(--space-3);
  font-size: var(--label-size);
  font-weight: var(--label-weight);
  line-height: var(--label-lh);
  letter-spacing: var(--label-tracking);
  color: var(--ink);
}
.legal-toc__nav ol {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.legal-toc__nav a {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 6px var(--space-3);
  border-radius: var(--r-12);
  font-size: var(--meta-size);
  line-height: var(--meta-lh);
  color: var(--ink-2);
  text-decoration: none;
}
.legal-toc__nav a:hover {
  background: var(--card);
  color: var(--ink);
}
.legal-toc__nav a[aria-current="true"] {
  background: var(--card);
  color: var(--ink);
  font-weight: var(--label-weight);
  box-shadow: var(--shadow-resting);
}

/* The document text */
.legal-doc {
  min-width: 0;
  font-size: var(--body-size);
  line-height: var(--body-lh);
  color: var(--ink-2);
}
.legal-doc > * + * {
  margin-top: var(--space-4);
}
.legal-doc h2 {
  margin-top: var(--space-8);
  font-family: var(--font-text);
  font-size: var(--h3-size);
  font-weight: var(--title-weight);
  line-height: var(--h3-lh);
  color: var(--ink);
}
.legal-doc > h2 + * {
  margin-top: var(--space-3);
}
.legal-doc strong {
  font-weight: var(--title-weight);
  color: var(--ink);
}
.legal-doc a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.legal-doc ul {
  padding-left: var(--space-5);
}
.legal-doc li + li {
  margin-top: var(--space-2);
}
.legal-doc .essentials h2 {
  margin-top: 0;
}
.legal-doc .essentials ul {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-4);
  padding: 0;
  list-style: none;
}
.legal-doc .essentials li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin: 0;
  color: var(--ink);
}
.legal-doc .essentials .icon {
  margin-top: 3px;
  color: var(--success);
}
.legal-doc .table-wrap {
  overflow-x: auto;
}
.legal-doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--meta-size-small);
  line-height: var(--meta-lh);
}
.legal-doc th,
.legal-doc td {
  padding: var(--space-3) var(--space-4) var(--space-3) 0;
  border-bottom: 1px solid var(--hairline);
  text-align: left;
  vertical-align: top;
}
.legal-doc th {
  font-weight: var(--label-weight);
  color: var(--ink);
}
.legal-doc tbody tr:last-child td {
  border-bottom: 0;
}

/* The rail: effective date, the other document, the other language, the contact address */
.legal-rail__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin: 0;
}
.legal-rail__list dt {
  margin-bottom: var(--space-1);
}
.legal-rail__list dd {
  margin: 0;
}
.legal-rail__link.btn {
  min-height: var(--tap);
  padding: 0;
  justify-content: flex-start;
  line-height: 1.3;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* 1024 to 1279 px: the section list stays a sticky column; the rail goes under the text. */
@media (max-width: 1279px) {
  .legal-grid {
    grid-template-columns: minmax(200px, 1fr) minmax(0, 3fr);
    grid-template-areas: "toc doc" "toc rail";
    gap: var(--space-6) var(--space-7);
  }
  .legal-rail {
    position: static;
  }
}

/* Under 1024 px: one column; the section list becomes a disclosure at the top, the rail goes below. */
@media (max-width: 1023px) {
  .legal-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "toc" "doc" "rail";
    gap: var(--space-6);
  }
  .legal-toc,
  .legal-rail {
    position: static;
  }
  .legal-toc {
    max-height: none;
    overflow: visible;
    padding: 0;
    background: none;
  }
  .legal-toc__summary {
    display: flex;
    list-style: none;
  }
  .legal-toc__summary > span {
    flex: 1;
    text-align: left;
  }
  .legal-toc__chevron {
    transition: transform var(--dur-hover) var(--ease-out);
  }
  .legal-toc[open] .legal-toc__chevron {
    transform: rotate(180deg);
  }
  .legal-toc__title {
    display: none;
  }
  .legal-toc__nav {
    margin-top: var(--space-3);
    padding: var(--space-3);
    border-radius: var(--r-24);
    background: var(--mist);
  }
}

/* ===== 404: fills the first screen like the home's hero: the words beside the home's box ===== */
.not-found {
  display: flex;
  align-items: center;
  min-height: 100svh;
  padding-top: calc(var(--header-h) + var(--space-5));
  padding-bottom: var(--space-7);
}
/* On the 404 the skip link waits fixed above the viewport (not absolute at the top of a page that is
   one screen tall), so it shows in view whenever it gets focus. */
:root:has(.not-found) .skip-link {
  position: fixed;
}
.not-found__inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: stretch;
  gap: var(--space-8);
}
.not-found__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: var(--space-5);
}
.not-found__actions {
  margin-top: var(--space-3);
}
/* The stage is a home card holding the home's box (base.css), open and empty. The box's lid stands
   above the box, hence its top margin. */
.not-found__stage {
  display: grid;
  place-items: center;
  min-height: calc(100svh - var(--header-h) - var(--space-5) - var(--space-7));
  padding: var(--space-6);
  /* The wash of the home's "how" panel: a white box on a white card read as an empty white block. */
  background: var(--wash);
}
/* The box's back wall is wash too: on the wash stage it takes the hairline tone so the box reads whole. */
.not-found__stage .cbox__back {
  background: var(--hairline);
}
.not-found__box {
  --s: 0.9;
  margin-top: calc(176px * var(--s));
}
@media (min-width: 2200px) {
  .not-found__box {
    --s: 1.3;
  }
}
@media (max-width: 1279px) {
  .not-found__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-6);
    text-align: center;
  }
  .not-found__copy {
    align-items: center;
  }
  .not-found__actions {
    justify-content: center;
  }
  .not-found__stage {
    min-height: 0;
  }
  .not-found__box {
    --s: 0.7;
  }
}
@media (max-width: 720px) {
  .not-found__stage {
    padding: var(--space-5);
  }
  .not-found__box {
    --s: 0.55;
  }
}
