/* Shnaaap website. This file is the site's design system: tokens first, then elements, then components.
   Colours are OKLCH and come from Apps/Shnaaap/Theme.swift (cream neutrals at hue 85, azure accent)
   plus the navy and ember of the app icon. No colour, radius or shadow is written outside the tokens.
   Type is the system font: on a Mac that is San Francisco, the same face the app itself uses. */


:root {
  color-scheme: light;

  /* Surfaces */
  --cream: oklch(96.4% 0.018 85);
  --paper: oklch(99.4% 0.006 85);
  --sunk: oklch(93.6% 0.022 85);
  --sunk-2: oklch(90.5% 0.024 85);

  /* Text */
  --ink: oklch(22% 0.014 70);
  --ink-2: oklch(41% 0.016 70);
  --ink-3: oklch(49% 0.016 70);

  /* Accent: paprika, with the ember and plum of the app icon around it. Nothing on this site is blue
     except the colours people can draw with. */
  --accent: oklch(55% 0.19 38);
  --accent-hover: oklch(50% 0.19 38);
  --accent-press: oklch(45% 0.18 38);
  --accent-soft: oklch(93% 0.05 58);
  --accent-text: oklch(46% 0.17 38);
  --on-accent: oklch(99% 0.012 85);

  /* From the app icon */
  --night: oklch(19% 0.035 22);
  --night-2: oklch(25% 0.055 15);
  --night-3: oklch(36% 0.1 5);
  --plum: oklch(40% 0.11 355);
  --ember: oklch(76% 0.16 62);
  --ember-deep: oklch(62% 0.19 42);
  --sun: oklch(88% 0.15 90);
  --on-night: oklch(96% 0.015 85);
  --on-night-2: oklch(82% 0.03 75);

  /* What people draw with (Theme.swift, DSAnnotationPalette) */
  --ann-red: oklch(60% 0.23 27);
  --ann-orange: oklch(72% 0.18 55);
  --ann-yellow: oklch(88% 0.17 95);
  --ann-green: oklch(68% 0.19 148);
  --ann-blue: oklch(60% 0.18 255);
  --ann-violet: oklch(58% 0.2 300);
  --ann-ink: oklch(20% 0.01 258);

  /* Pastel tiles, as in the app's sidebar */
  --tile-red: oklch(92% 0.045 25);
  --tile-apricot: oklch(92% 0.055 58);
  --tile-green: oklch(93% 0.05 150);
  --tile-amber: oklch(93.5% 0.06 85);
  --tile-violet: oklch(92.5% 0.04 300);
  --ok: oklch(48% 0.13 150);

  /* Backdrops (a sample of the app's 20) */
  --bd-peach: linear-gradient(135deg, oklch(91% 0.05 75), oklch(82% 0.1 45));
  --bd-coral: linear-gradient(135deg, oklch(86% 0.08 35), oklch(71% 0.16 25));
  --bd-ember: linear-gradient(135deg, oklch(80% 0.15 70), oklch(66% 0.19 42));
  --bd-sun: linear-gradient(135deg, oklch(93% 0.11 98), oklch(82% 0.16 75));
  --bd-rose: linear-gradient(135deg, oklch(87% 0.07 5), oklch(63% 0.17 350));
  --bd-mint: linear-gradient(135deg, oklch(93% 0.07 160), oklch(80% 0.11 182));
  --bd-sky: linear-gradient(135deg, oklch(86% 0.07 235), oklch(60% 0.17 256));
  --bd-lilac: linear-gradient(135deg, oklch(89% 0.06 300), oklch(70% 0.13 293));
  --bd-night: linear-gradient(135deg, oklch(36% 0.08 8), oklch(19% 0.035 22));
  --bd-plum: linear-gradient(135deg, oklch(62% 0.16 15), oklch(36% 0.12 355));

  /* Window chrome on the demo desktop */
  --dot-close: oklch(66% 0.2 25);
  --dot-min: oklch(82% 0.16 85);
  --dot-zoom: oklch(72% 0.19 145);
  --scrim: oklch(14% 0.03 25 / 0.5);
  --sel-line: oklch(99% 0.004 258);
  --flash: oklch(99% 0.01 85);

  /* Type */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  --step-3: clamp(2.125rem, 1.4rem + 3.2vw, 3.5rem);
  --step-4: clamp(2.5rem, 1.3rem + 5.2vw, 4.75rem);

  /* Space: 4pt grid */
  --s1: 0.25rem; --s2: 0.5rem; --s3: 0.75rem; --s4: 1rem; --s6: 1.5rem;
  --s8: 2rem; --s12: 3rem; --s16: 4rem; --s24: 6rem; --s32: 8rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --measure: 34rem;
  --page: 76rem;

  /* Shape */
  --r-xs: 0.375rem; --r-sm: 0.625rem; --r-md: 1rem; --r-lg: 1.5rem; --r-xl: 2rem; --r-full: 999px;

  /* Elevation: one soft, warm shadow family */
  --shadow-1: 0 1px 2px oklch(38% 0.05 70 / 0.08), 0 4px 14px oklch(38% 0.05 70 / 0.07);
  --shadow-2: 0 2px 4px oklch(35% 0.05 70 / 0.08), 0 18px 44px oklch(35% 0.05 70 / 0.14);
  --shadow-win: 0 2px 6px oklch(12% 0.04 20 / 0.35), 0 28px 70px oklch(12% 0.04 20 / 0.5);
  --shadow-shot: 0 2px 5px oklch(18% 0.05 25 / 0.25), 0 18px 46px oklch(18% 0.05 25 / 0.38);

  /* Motion */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --fast: 140ms;
  --base: 220ms;
}

/* ── Elements ─────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 var(--step-0)/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: var(--r-xs); }
::selection { background: var(--accent-soft); }

h1, h2, h3 { font-weight: 700; letter-spacing: -0.028em; line-height: 1.04; text-wrap: balance; }
h1 { font-size: var(--step-4); line-height: 1; letter-spacing: -0.035em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); letter-spacing: -0.02em; line-height: 1.12; }
p { text-wrap: pretty; }

.skip {
  position: absolute; left: var(--s4); top: var(--s4); z-index: 100;
  padding: var(--s3) var(--s4); border-radius: var(--r-sm);
  background: var(--ink); color: var(--paper);
  transform: translateY(-200%);
}
.skip:focus { transform: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.wrap { width: min(100% - 2 * var(--gutter), var(--page)); margin-inline: auto; }
.lede { font-size: var(--step-1); line-height: 1.45; color: var(--ink-2); max-width: var(--measure); }
.note { font-size: var(--step--1); color: var(--ink-3); }

/* ── Buttons ──────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 2.75rem; padding: 0 var(--s4);
  border-radius: var(--r-full);
  background: var(--accent); color: var(--on-accent);
  font-weight: 600; font-size: 1rem; text-decoration: none; white-space: nowrap;
  transition: background-color var(--fast) ease, transform var(--fast) var(--ease-out);
}
.btn:active { transform: scale(0.97); background: var(--accent-press); }
.btn--quiet { background: var(--sunk); color: var(--ink); }
.btn--quiet:active { background: var(--sunk-2); }
.btn--small { min-height: 2.25rem; padding: 0 var(--s3); font-size: var(--step--1); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--accent-hover); }
  .btn--quiet:hover { background: var(--sunk-2); }
}

.badge { display: inline-block; border-radius: var(--r-sm); transition: transform var(--fast) var(--ease-out); }
.badge img { height: 3.25rem; width: auto; }
.badge:active { transform: scale(0.97); }

.textlink {
  font-weight: 600; color: var(--accent-text);
  text-decoration: underline; text-decoration-thickness: 0.09em; text-underline-offset: 0.2em;
}
@media (hover: hover) and (pointer: fine) { .textlink:hover { text-decoration-thickness: 0.16em; } }

kbd {
  display: inline-grid; place-items: center;
  min-width: 2.25rem; height: 2.25rem; padding: 0 var(--s2);
  border-radius: var(--r-sm);
  background: var(--paper); color: var(--ink);
  box-shadow: 0 1px 0 var(--sunk-2), 0 3px 0 var(--sunk-2), var(--shadow-1);
  font: 600 1rem/1 var(--font);
  transition: transform var(--fast) var(--ease-out), box-shadow var(--fast) var(--ease-out), background-color var(--fast) ease;
}

/* ── Header ───────────────────────────────────────────────────────────────── */

.top {
  position: sticky; top: 0; z-index: 50;
  background: var(--cream);
  transition: box-shadow var(--base) ease;
}
.top.is-stuck { box-shadow: 0 1px 0 var(--sunk-2), 0 8px 24px oklch(38% 0.05 70 / 0.06); }
.top-in { display: flex; align-items: center; gap: var(--s6); min-height: 4rem; }
.brand {
  display: inline-flex; align-items: center; gap: var(--s2);
  font-weight: 700; font-size: 1.375rem; letter-spacing: -0.03em;
  text-decoration: none; min-height: 2.75rem;
}
.brand img { width: 2rem; height: 2rem; border-radius: 0.5rem; }
.top-nav { display: none; margin-left: auto; gap: var(--s1); }
.top-nav a {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 var(--s3);
  border-radius: var(--r-full); text-decoration: none; font-weight: 500; color: var(--ink-2);
  transition: background-color var(--fast) ease, color var(--fast) ease;
}
@media (hover: hover) and (pointer: fine) { .top-nav a:hover { background: var(--sunk); color: var(--ink); } }
.top .btn { margin-left: auto; }
@media (min-width: 52rem) {
  .top-nav { display: flex; }
  .top .btn { margin-left: 0; }
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */

.hero { padding: clamp(0.5rem, 2vw, 1.5rem) 0 0; overflow-x: clip; }
.hero h1 { font-size: var(--step-3); max-width: 15ch; }
.hero .lede { margin-top: var(--s6); }
.hero-cta { margin-top: var(--s8); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4) var(--s6); }
.hero-cta .note { max-width: 16rem; }
.hero-copy { margin-top: clamp(2.75rem, 5vw, 3.5rem); }
@media (min-width: 60rem) {
  .hero-copy { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: var(--s12); align-items: start; }
  .hero h1 { grid-row: span 2; }
  .hero .lede { margin-top: var(--s1); }
  .hero-cta { margin-top: var(--s6); }
}

/* The opening: a heap of windows, the name stretched across the page, and a hand to snap them into one picture.
   Sizes inside the heap are in em, so the whole thing scales from one font-size. */
.snap { position: relative; height: clamp(19rem, 40vw, 31rem); }
.snap-word {
  position: absolute; inset: 0; display: flex; align-items: center;
  font-size: clamp(5rem, 23.2vw, 18.4rem); font-weight: 800; letter-spacing: -0.055em; line-height: 0.8;
  color: var(--accent); white-space: nowrap; user-select: none; -webkit-user-select: none;
}
.snap-word span { display: inline-block; transform-origin: 0 50%; will-change: transform; }
.pile { position: absolute; inset: 0; perspective: 70em; font-size: clamp(0.44rem, 1.06vw, 0.95rem); pointer-events: none; }
.pile-in { position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform; }
.pw {
  position: absolute; left: var(--x); top: var(--y);
  transform: translate3d(-50%, -50%, var(--z)) rotateX(var(--rx)) rotateY(var(--ry)) rotateZ(var(--rz));
  transform-style: preserve-3d;
}
.pw-in {
  overflow: hidden; border-radius: 0.9em; background: var(--paper); color: var(--ink);
  box-shadow: 0 0.2em 0.5em oklch(25% 0.06 30 / 0.16), 0 1.6em 3.4em oklch(25% 0.06 30 / 0.26);
  font-size: 1em; line-height: 1.35;
}
.pw-bar { display: flex; align-items: center; gap: 0.45em; height: 2.5em; padding: 0 0.9em; background: var(--cream); font-size: 0.85em; font-weight: 600; color: var(--ink-2); }
.pw-bar i { width: 0.75em; height: 0.75em; border-radius: 50%; background: var(--dot-close); }
.pw-bar i:nth-child(2) { background: var(--dot-min); }
.pw-bar i:nth-child(3) { background: var(--dot-zoom); margin-right: 0.5em; }

.pw--chart .pw-in { width: 23em; }
.mc { display: flex; flex-direction: column; margin: 1em; padding: 1.1em; border-radius: 0.9em; background: var(--cream); }
.mc-label { font-size: 0.85em; font-weight: 600; color: var(--ink-2); }
.mc-num { display: flex; align-items: center; gap: 0.25em; font-size: 2.9em; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.mc-num span { padding: 0.25em 0.6em; border-radius: var(--r-full); background: var(--tile-green); color: var(--ok); font-size: 0.29em; letter-spacing: 0; }
.mc svg { width: 100%; height: 8.5em; margin-top: 0.6em; }

.pw--term .pw-in { width: 18em; background: var(--night); color: var(--on-night); }
.pw--term .pw-bar { background: var(--night-2); color: var(--on-night-2); }
.term { margin: 0; padding: 0.9em 1em 1.1em; font: 0.8em/1.55 ui-monospace, "SF Mono", Menlo, monospace; white-space: pre; }
.term b { color: var(--ann-green); font-weight: 400; }
.term em { color: var(--ember); font-style: normal; }

.pw--chat .pw-in { width: 15em; }
.chatlet { display: flex; flex-direction: column; gap: 0.4em; padding: 0.9em; }
.chatlet p { max-width: 88%; padding: 0.5em 0.8em; border-radius: 1.1em; background: var(--sunk); font-size: 0.85em; font-weight: 500; }
.chatlet .me { align-self: flex-end; background: var(--accent); color: var(--on-accent); }

.pw--music .pw-in { width: 14.5em; padding: 0.9em; }
.music { display: flex; align-items: center; gap: 0.8em; }
.music-art { flex: none; width: 3em; height: 3em; border-radius: 0.6em; background: var(--bd-rose); }
.music p { font-size: 0.8em; color: var(--ink-2); }
.music b { display: block; font-size: 1.1em; color: var(--ink); }
.music-bar { display: block; height: 0.3em; margin-top: 0.9em; border-radius: var(--r-full); background: linear-gradient(to right, var(--ink) 38%, var(--sunk-2) 38%); }

.pw--note .pw-in { width: 9em; padding: 1em; border-radius: 0.3em; background: var(--sun); font-size: 0.95em; font-weight: 600; line-height: 1.3; }
.pw--note u { text-decoration-color: var(--accent); text-decoration-thickness: 0.14em; text-underline-offset: 0.15em; }

.pw--cal .pw-in { width: 12.5em; padding: 0.9em; display: grid; gap: 0.5em; }
.cal-day { font-size: 0.8em; font-weight: 700; color: var(--accent-text); }
.cal-ev { padding: 0.5em 0.7em; border-radius: 0.6em; background: var(--tile-amber); font-size: 0.75em; color: var(--ink-2); }
.cal-ev b { display: block; font-size: 1.1em; color: var(--ink); }
.cal-ev--b { background: var(--tile-red); }

.pw--photo .pw-in { width: 13em; padding: 0.5em 0.5em 0.6em; }
.photo { position: relative; height: 8.5em; border-radius: 0.5em; overflow: hidden; background: linear-gradient(to bottom, var(--plum), var(--ember-deep) 55%, var(--ember) 78%, var(--sun)); }
.photo i { position: absolute; left: 50%; bottom: -1.4em; width: 5em; height: 5em; margin-left: -2.5em; border-radius: 50%; background: var(--sun); }
.photo::after { content: ""; position: absolute; inset: auto -10% -2.4em -10%; height: 4.6em; border-radius: 50% 50% 0 0; background: var(--night-2); }
.pw--photo p { margin-top: 0.5em; padding: 0 0.3em; font-size: 0.72em; font-weight: 500; color: var(--ink-3); }

.pw--pal .pw-in { width: 11.5em; padding: 0.8em; }
.pal { display: grid; grid-template-columns: repeat(5, 1fr); height: 4.2em; border-radius: 0.5em; overflow: hidden; }
.pal i:nth-child(1) { background: var(--plum); }
.pal i:nth-child(2) { background: var(--accent); }
.pal i:nth-child(3) { background: var(--ember-deep); }
.pal i:nth-child(4) { background: var(--ember); }
.pal i:nth-child(5) { background: var(--sun); }
.pw--pal p { margin-top: 0.6em; font-size: 0.72em; font-weight: 500; color: var(--ink-3); }

.pw--err .pw-in { width: 15em; padding: 1.1em; }
.err-title { font-weight: 700; }
.err-body { margin-top: 0.3em; font-size: 0.8em; color: var(--ink-2); }
.err-btns { display: flex; justify-content: flex-end; gap: 0.5em; margin-top: 0.9em; font-size: 0.8em; font-weight: 600; }
.err-btns span { padding: 0.35em 0.9em; border-radius: 0.6em; background: var(--sunk); }
.err-btns .go { background: var(--accent); color: var(--on-accent); }

/* What the snap leaves behind: the one picture, on a backdrop, with the point marked. */
.shot {
  position: absolute; left: 50%; top: 50%; width: 34em; padding: 3.2em 3.6em;
  border-radius: 1.2em; background: var(--bd-ember);
  box-shadow: 0 0.3em 0.8em oklch(25% 0.06 30 / 0.2), 0 2.4em 5em oklch(25% 0.06 30 / 0.34);
  transform: translate3d(-50%, -50%, 120px) scale(0.6); opacity: 0;
}
.shot-win { position: relative; overflow: hidden; border-radius: 0.9em; background: var(--paper); box-shadow: var(--shadow-shot); }
.shot-ink { position: absolute; inset: 0; width: 100%; height: 100%; }
.shot-ink polygon, .shot-ink rect { fill: var(--ann-red); }
.shot-ink text { fill: var(--paper); font: 700 13px var(--font); }
.burst { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform: translateZ(160px); }
.burst svg { position: absolute; left: 0; top: 0; width: 2.4em; height: 2.4em; margin: -1.2em 0 0 -1.2em; color: var(--sun); opacity: 0; }
.burst svg:nth-child(3n) { color: var(--ember); }
.burst svg:nth-child(4n) { color: var(--paper); }
.snap-flash { position: fixed; inset: 0; z-index: 60; background: var(--flash); opacity: 0; pointer-events: none; }

.snap-btn {
  position: absolute; left: 50%; bottom: 0; z-index: 3;
  display: inline-flex; align-items: center; gap: var(--s3);
  min-height: 3.5rem; padding: var(--s2) var(--s6) var(--s2) var(--s2);
  border-radius: var(--r-full); background: var(--ink); color: var(--paper);
  font-weight: 650; font-size: 1.0625rem; white-space: nowrap;
  box-shadow: var(--shadow-2);
  transform: translate(-50%, 35%);
  transition: transform var(--fast) var(--ease-out), background-color var(--fast) ease;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.snap-btn img { width: 2.5rem; height: 2.5rem; border-radius: 50%; object-fit: cover; }
.snap-btn:active, .snap-btn.is-held { transform: translate(-50%, 35%) scale(0.95); }
.snap-btn:focus-visible { outline-offset: 4px; border-radius: var(--r-full); }
@media (hover: hover) and (pointer: fine) { .snap-btn:hover { background: var(--night-2); } }
@media (max-width: 40rem) { .pw--pal, .pw--cal, .pw--music { display: none; } .snap { height: 21rem; } }

@media (prefers-reduced-motion: no-preference) {
  .pw-in { animation: bob 7s ease-in-out calc(var(--i) * -0.9s) infinite alternate; }
  .pw:nth-child(odd) .pw-in { animation-duration: 9s; }
  @keyframes bob { from { transform: translate3d(0, -0.5em, 0) rotate(-0.8deg); } to { transform: translate3d(0, 0.5em, 0) rotate(0.8deg); } }
}

.stage { margin-top: clamp(2rem, 5vw, 3.5rem); }
.stage-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s4); margin-top: var(--s4); }
.stage-bar .note { margin-right: auto; }
.keys { display: inline-flex; align-items: center; gap: var(--s1); }

/* The demo desktop. Everything inside is sized in --u, one design pixel of a 1200-wide screen
   (640 on small screens), so the scene scales with its container and can be cloned at any size. */
.desk {
  --w: 640;
  position: relative; overflow: hidden;
  aspect-ratio: 640 / 668;
  border-radius: var(--r-lg);
  container-type: inline-size;
  background: var(--night);
  box-shadow: var(--shadow-2);
  user-select: none; -webkit-user-select: none;
  isolation: isolate;
}
.desk.is-armed { cursor: crosshair; touch-action: none; }
@media (min-width: 48rem) { .desk { --w: 1200; aspect-ratio: 1200 / 680; } }
@media (hover: hover) and (pointer: fine) { .desk { cursor: crosshair; } }

.scene {
  --u: calc(100cqw / var(--w));
  position: absolute; inset: 0;
  font-size: calc(var(--u) * 13); line-height: 1.35;
  color: var(--ink);
  background:
    radial-gradient(115% 95% at 0% 100%, var(--ember) 0%, var(--ember-deep) 22%, oklch(48% 0.16 25 / 0.6) 44%, transparent 68%),
    radial-gradient(90% 85% at 100% 0%, var(--plum) 0%, transparent 68%),
    var(--night-2);
}
.mbar {
  position: absolute; inset: 0 0 auto 0; height: calc(var(--u) * 28);
  display: flex; align-items: center; gap: calc(var(--u) * 18);
  padding: 0 calc(var(--u) * 16);
  background: oklch(16% 0.04 20 / 0.6); color: var(--on-night);
  font-size: calc(var(--u) * 13); font-weight: 500;
}
.mbar b { font-weight: 700; }
.mbar-right { margin-left: auto; display: flex; align-items: center; gap: calc(var(--u) * 14); }
.mbar-right svg { width: calc(var(--u) * 12); height: calc(var(--u) * 17); }
.mbar-hide { display: none; }

.win {
  position: absolute; display: flex; flex-direction: column; overflow: hidden;
  border-radius: calc(var(--u) * 12);
  background: var(--paper);
  box-shadow: var(--shadow-win);
}
.win-bar {
  display: flex; align-items: center; gap: calc(var(--u) * 7); flex: none;
  height: calc(var(--u) * 38); padding: 0 calc(var(--u) * 14);
  background: var(--cream);
  font-weight: 600; color: var(--ink-2);
}
.win-bar i { width: calc(var(--u) * 11); height: calc(var(--u) * 11); border-radius: 50%; background: var(--dot-close); }
.win-bar i:nth-child(2) { background: var(--dot-min); }
.win-bar i:nth-child(3) { background: var(--dot-zoom); margin-right: calc(var(--u) * 10); }

.win--report { left: calc(var(--u) * 20); top: calc(var(--u) * 48); width: calc(var(--u) * 600); height: calc(var(--u) * 420); }
.win--chat { display: none; }
@media (min-width: 48rem) {
  .mbar-hide { display: inline; }
  .win--report { left: calc(var(--u) * 236); top: calc(var(--u) * 66); width: calc(var(--u) * 664); height: calc(var(--u) * 520); }
  .win--chat { display: flex; left: calc(var(--u) * 924); top: calc(var(--u) * 196); width: calc(var(--u) * 246); height: calc(var(--u) * 216); }
}

.report { flex: 1; display: grid; grid-template-columns: 1fr; gap: calc(var(--u) * 16); padding: calc(var(--u) * 18); background: var(--paper); }
.report-card { display: flex; flex-direction: column; padding: calc(var(--u) * 18); border-radius: calc(var(--u) * 14); background: var(--cream); }
.report-label { font-weight: 600; color: var(--ink-2); }
.report-num { display: flex; align-items: center; gap: calc(var(--u) * 10); font-size: calc(var(--u) * 46); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.report-chip { padding: calc(var(--u) * 4) calc(var(--u) * 9); border-radius: var(--r-full); background: var(--tile-green); color: var(--ok); font-size: calc(var(--u) * 13); font-weight: 700; letter-spacing: 0; }
.report-chart { flex: 1; min-height: 0; margin-top: calc(var(--u) * 12); }
.report-chart svg { width: 100%; height: 100%; }
.bar { fill: var(--plum); }
.bar--peak { fill: var(--ember-deep); }
.report-days { display: grid; grid-template-columns: repeat(7, 1fr); margin-top: calc(var(--u) * 6); text-align: center; font-size: calc(var(--u) * 11); color: var(--ink-3); }
.report-side { display: none; }
@media (min-width: 48rem) {
  .report { grid-template-columns: minmax(0, 1fr) calc(var(--u) * 190); }
  .report-side { display: flex; flex-direction: column; gap: calc(var(--u) * 12); padding-top: calc(var(--u) * 6); }
  .report-side h4 { margin: 0; font-size: calc(var(--u) * 13); font-weight: 600; color: var(--ink-2); }
  .src { display: grid; gap: calc(var(--u) * 5); font-weight: 500; }
  .src span { display: flex; justify-content: space-between; }
  .src i { display: block; height: calc(var(--u) * 6); border-radius: var(--r-full); background: var(--sunk); overflow: hidden; }
  .src i::after { content: ""; display: block; height: 100%; width: var(--v); border-radius: inherit; background: var(--plum); }
  .report-owner { margin-top: auto; font-size: calc(var(--u) * 11.5); color: var(--ink-3); }
  .report-owner b { display: block; font-size: calc(var(--u) * 13); font-weight: 600; color: var(--ink); }
}

.chat { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: calc(var(--u) * 6); padding: calc(var(--u) * 14); background: var(--paper); }
.bubble { max-width: 88%; padding: calc(var(--u) * 8) calc(var(--u) * 12); border-radius: calc(var(--u) * 16); background: var(--sunk); font-weight: 500; }
.bubble--me { align-self: flex-end; background: var(--accent); color: var(--on-accent); }

.desk-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.flash { position: absolute; left: 0; top: 0; width: 1px; height: 1px; transform-origin: 0 0; background: var(--flash); opacity: 0; pointer-events: none; z-index: 3; }
.loupe {
  position: absolute; left: 0; top: 0; z-index: 4; pointer-events: none;
  width: 7rem; height: 7rem; border-radius: 50%; overflow: hidden;
  box-shadow: 0 0 0 2px var(--sel-line), 0 0 0 3px var(--scrim), var(--shadow-shot);
  opacity: 0; transition: opacity var(--fast) ease;
}
.loupe.is-on { opacity: 1; }
.loupe::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(var(--sel-line), var(--sel-line)) 50% 50% / 1px 100% no-repeat,
    linear-gradient(var(--sel-line), var(--sel-line)) 50% 50% / 100% 1px no-repeat;
  opacity: 0.7;
}
.loupe-in, .crop-in { position: absolute; left: 0; top: 0; transform-origin: 0 0; container-type: inline-size; pointer-events: none; }
.ghost {
  position: absolute; left: 0; top: 0; z-index: 5; pointer-events: none;
  width: 1.5rem; height: 1.5rem; margin: -0.75rem 0 0 -0.75rem;
  opacity: 0; transition: opacity var(--base) ease;
  background:
    linear-gradient(var(--sel-line), var(--sel-line)) 50% 50% / 2px 100% no-repeat,
    linear-gradient(var(--sel-line), var(--sel-line)) 50% 50% / 100% 2px no-repeat;
  filter: drop-shadow(0 0 1px var(--night));
}
.ghost.is-on { opacity: 1; }

/* Quick Access: the thumbnail that appears after a capture */
.qa { position: absolute; left: 3%; bottom: 4.5%; z-index: 6; }
.qa-card {
  position: relative; display: block; transform-origin: 0 0; text-decoration: none;
  padding: 0.25rem; border-radius: var(--r-sm);
  background: var(--paper); box-shadow: var(--shadow-shot);
  cursor: default;
}
.crop { position: relative; overflow: hidden; border-radius: var(--r-xs); background: var(--night); }
.crop-scale { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.qa-tag {
  position: absolute; left: 0.25rem; bottom: calc(100% + 0.375rem);
  display: inline-flex; align-items: center; gap: 0.375rem;
  padding: 0.25rem 0.625rem; border-radius: var(--r-full);
  background: oklch(21% 0.035 22 / 0.92); color: var(--on-night);
  font-size: 0.8125rem; font-weight: 600; white-space: nowrap;
  opacity: 0; transform: translateY(4px);
  transition: opacity var(--base) ease, transform var(--base) var(--ease-out);
}
.qa-tag.is-on { opacity: 1; transform: none; }
.qa-tag svg { width: 0.875rem; height: 0.875rem; }

/* ── Sections ─────────────────────────────────────────────────────────────── */

.band { padding: clamp(4.5rem, 10vw, 8rem) 0 0; }
.band-head { display: grid; gap: var(--s6); margin-bottom: clamp(2rem, 4vw, 3rem); }
.band-head h2 { max-width: 16ch; }
@media (min-width: 60rem) {
  .band-head { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: var(--s12); align-items: end; }
}

/* The editor you can use */
.ed { border-radius: var(--r-lg); background: var(--paper); box-shadow: var(--shadow-2); overflow: hidden; }
.ed-bar {
  display: flex; align-items: center; gap: var(--s2);
  padding: var(--s2) var(--s3); overflow-x: auto; scrollbar-width: none;
  background: var(--paper); box-shadow: 0 1px 0 var(--sunk);
  position: relative; z-index: 1;
}
.ed-bar::-webkit-scrollbar { display: none; }
.ed-group { display: flex; align-items: center; gap: var(--s1); flex: none; }
.ed-sep { flex: none; width: 1px; height: 1.5rem; background: var(--sunk-2); margin: 0 var(--s1); }
.tool {
  display: inline-flex; align-items: center; gap: var(--s2); flex: none;
  min-width: 2.75rem; min-height: 2.75rem; padding: 0 var(--s3); justify-content: center;
  border-radius: var(--r-sm); color: var(--ink-2); font-weight: 600; font-size: var(--step--1);
  transition: background-color var(--fast) ease, color var(--fast) ease, transform var(--fast) var(--ease-out);
}
.tool svg { width: 1.25rem; height: 1.25rem; flex: none; }
.tool:active { transform: scale(0.96); }
.tool[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-text); }
.tool[disabled] { opacity: 0.4; cursor: default; }
.tool span { display: none; }
@media (min-width: 64rem) { .tool span { display: inline; } }
@media (hover: hover) and (pointer: fine) { .tool:not([aria-pressed="true"]):not([disabled]):hover { background: var(--sunk); color: var(--ink); } }
.ed-spacer { flex: 1; }

.swatch {
  position: relative; flex: none; width: 2.75rem; height: 2.75rem; border-radius: 50%;
  display: grid; place-items: center;
}
.swatch::before {
  content: ""; width: 1.375rem; height: 1.375rem; border-radius: 50%; background: var(--c);
  transition: transform var(--fast) var(--ease-out), box-shadow var(--fast) ease;
}
.swatch[aria-pressed="true"]::before { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--c); }
.swatch:active::before { transform: scale(0.9); }

.ed-body { display: grid; }
.ed-side { display: grid; gap: var(--s6); align-content: start; padding: var(--s6) var(--s4); order: 2; }
.ed-canvas {
  position: relative; display: grid; place-items: center; overflow: hidden;
  min-height: 19rem; height: min(62vh, 30rem); padding: var(--s4) var(--s4) var(--s16);
  background: var(--sunk);
}
@media (min-width: 60rem) {
  .ed-body { grid-template-columns: 17.5rem minmax(0, 1fr); }
  .ed-side { order: 0; padding: var(--s6); }
  .ed-canvas { height: 34rem; padding: var(--s8) var(--s8) var(--s16); }
}
.field { display: grid; gap: var(--s2); border: 0; padding: 0; margin: 0; min-width: 0; }
.field > legend, .field > label, .field-label { padding: 0; font-size: var(--step--1); font-weight: 600; color: var(--ink-2); display: flex; justify-content: space-between; }
.field output { color: var(--ink-3); font-weight: 500; font-variant-numeric: tabular-nums; }
.bds { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s2); }
.bd {
  height: 2.75rem; border-radius: var(--r-sm); background: var(--g);
  transition: transform var(--fast) var(--ease-out), box-shadow var(--fast) ease;
}
.bd[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--accent); }
.bd:active { transform: scale(0.94); }

input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 2.75rem; margin: 0; background: transparent; cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track { height: 0.375rem; border-radius: var(--r-full); background: linear-gradient(to right, var(--accent) var(--fill, 50%), var(--sunk-2) var(--fill, 50%)); }
input[type="range"]::-moz-range-track { height: 0.375rem; border-radius: var(--r-full); background: var(--sunk-2); }
input[type="range"]::-moz-range-progress { height: 0.375rem; border-radius: var(--r-full); background: var(--accent); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 1.375rem; height: 1.375rem; margin-top: -0.5rem; border-radius: 50%;
  background: var(--paper); box-shadow: var(--shadow-1), 0 0 0 1px var(--sunk-2);
  transition: transform var(--fast) var(--ease-out);
}
input[type="range"]::-moz-range-thumb { width: 1.375rem; height: 1.375rem; border: 0; border-radius: 50%; background: var(--paper); box-shadow: var(--shadow-1), 0 0 0 1px var(--sunk-2); }
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.12); }

.art { position: relative; display: grid; place-items: center; border-radius: var(--r-xs); background: var(--g, var(--bd-sun)); }
.art-shot {
  position: relative; overflow: hidden; background: var(--paper); touch-action: none; cursor: crosshair;
  border-radius: var(--rad, 0.75rem);
  box-shadow: 0 calc(var(--sh, 0.6) * 0.9rem) calc(var(--sh, 0.6) * 2.75rem) oklch(18% 0.05 25 / calc(var(--sh, 0.6) * 0.55));
}
.ink { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.ink text { font: 700 1px var(--font); }
.blur-box { position: absolute; backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px); background: oklch(99% 0.006 85 / 0.2); border-radius: 3px; pointer-events: none; }
.ed-hint {
  position: absolute; left: 50%; bottom: var(--s4); transform: translateX(-50%);
  padding: var(--s2) var(--s4); border-radius: var(--r-full);
  background: oklch(21% 0.035 22 / 0.9); color: var(--on-night);
  font-size: var(--step--1); font-weight: 600; white-space: nowrap; pointer-events: none;
  transition: opacity var(--base) ease;
}
.ed-hint.is-off { opacity: 0; }

/* The real app, in tabs */
.real { margin-top: clamp(3rem, 6vw, 5rem); }
.real-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--s4) var(--s8); margin-bottom: var(--s6); }
.real-head h3 { max-width: 18ch; }
.tabs { display: inline-flex; padding: var(--s1); border-radius: var(--r-full); background: var(--sunk); }
.tab {
  min-height: 2.75rem; padding: 0 var(--s4); border-radius: var(--r-full);
  font-weight: 600; color: var(--ink-2);
  transition: background-color var(--fast) ease, color var(--fast) ease, transform var(--fast) var(--ease-out);
}
.tab[aria-selected="true"] { background: var(--paper); color: var(--ink); box-shadow: var(--shadow-1); }
.tab:active { transform: scale(0.97); }
.real-frame { display: grid; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-2); background: var(--paper); }
.real-frame figure { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity var(--base) ease, visibility 0s linear var(--base); }
.real-frame figure.is-on { opacity: 1; visibility: visible; transition: opacity var(--base) ease; }
.real-frame img { width: 100%; }
.real-cap { margin-top: var(--s4); min-height: 3.2em; color: var(--ink-2); max-width: var(--measure); }

/* Feature layout: four unequal cells */
.feats { display: grid; gap: var(--s4); }
.feat { position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: var(--r-lg); background: var(--paper); box-shadow: var(--shadow-1); }
.feat-copy { padding: var(--s6); display: grid; gap: var(--s2); }
.feat-copy p { color: var(--ink-2); max-width: 30rem; }
.feat-art { position: relative; flex: 1; min-height: 14rem; overflow: hidden; }
@media (min-width: 60rem) {
  .feats { grid-template-columns: repeat(12, 1fr); gap: var(--s6); }
  .feat--scroll { grid-column: span 5; grid-row: span 2; }
  .feat--text { grid-column: span 7; }
  .feat--pin { grid-column: span 4; }
  .feat--keys { grid-column: span 3; }
  .feat-copy { padding: var(--s8); }
}

/* Scrolling capture */
.feat--scroll .feat-art { min-height: 22rem; background: var(--tile-apricot); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s6); padding: var(--s8) var(--s6) 0; align-items: stretch; }
.sc-view { position: relative; min-height: 16rem; container-type: size; border-radius: var(--r-md) var(--r-md) 0 0; overflow: hidden; background: var(--paper); box-shadow: var(--shadow-1); }
.sc-page { display: grid; gap: var(--s3); padding: var(--s4); animation: sc-page 9s var(--ease-in-out) infinite; }
.sc-strip { position: relative; align-self: end; width: 5.5rem; height: 15.5rem; border-radius: var(--r-sm) var(--r-sm) 0 0; overflow: hidden; background: var(--paper); box-shadow: var(--shadow-1); }
.sc-strip .sc-page { width: 22rem; transform-origin: 0 0; transform: scale(0.25); padding: var(--s4); animation: none; }
.sc-strip::after { content: ""; position: absolute; inset: 0; background: var(--paper); transform-origin: 50% 100%; animation: sc-reveal 9s var(--ease-in-out) infinite; }
.sc-line { height: 0.75rem; border-radius: var(--r-full); background: var(--sunk); }
.sc-line--h { height: 1.25rem; width: 60%; background: var(--ink); }
.sc-line--s { width: 72%; }
.sc-block { height: 5rem; border-radius: var(--r-sm); background: var(--tile-amber); }
.sc-block--b { background: var(--tile-green); }
.sc-block--c { background: var(--tile-violet); }
.sc-frame { position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 3px var(--accent); pointer-events: none; }
@keyframes sc-page { 0%, 12% { transform: translateY(0); } 70%, 100% { transform: translateY(calc(-100% + 100cqh)); } }
@keyframes sc-reveal { 0%, 12% { transform: scaleY(0.7); } 70%, 100% { transform: scaleY(0); } }

/* Capture text */
.feat--text .feat-art { min-height: 12rem; background: var(--tile-amber); display: grid; place-items: center; padding: var(--s6); }
.ocr { position: relative; padding: var(--s4) var(--s6); border-radius: var(--r-md); background: var(--paper); box-shadow: var(--shadow-1); font-size: var(--step-1); font-weight: 600; }
.ocr-pick { position: relative; white-space: nowrap; }
.ocr-pick::before { content: ""; position: absolute; inset: -0.15em -0.3em; border-radius: var(--r-xs); background: var(--accent-soft); transform-origin: 0 50%; animation: ocr-sweep 5s var(--ease-in-out) infinite; }
.ocr-pick span { position: relative; }
.ocr-chip {
  position: absolute; right: var(--s4); top: calc(100% - 0.5rem);
  display: inline-flex; align-items: center; gap: var(--s2);
  padding: var(--s1) var(--s3); border-radius: var(--r-full);
  background: var(--ink); color: var(--paper); font-size: var(--step--1); font-weight: 600;
  animation: ocr-chip 5s var(--ease-out) infinite;
}
.ocr-chip svg { width: 0.875rem; height: 0.875rem; }
@keyframes ocr-sweep { 0%, 10% { transform: scaleX(0); } 38%, 88% { transform: scaleX(1); opacity: 1; } 100% { transform: scaleX(1); opacity: 0; } }
@keyframes ocr-chip { 0%, 40% { opacity: 0; transform: translateY(-6px); } 48%, 88% { opacity: 1; transform: none; } 100% { opacity: 0; transform: none; } }

/* Pin */
.feat--pin .feat-art { min-height: 15rem; background: var(--tile-green); touch-action: none; }
.pin-lines { position: absolute; inset: var(--s6); display: grid; gap: var(--s3); align-content: start; }
.pin-lines i { height: 0.75rem; border-radius: var(--r-full); background: oklch(99% 0.006 85 / 0.6); }
.pin-shot {
  position: absolute; left: 22%; top: 18%; width: 9.5rem; padding: 0.25rem;
  border-radius: var(--r-sm); background: var(--paper); box-shadow: var(--shadow-shot);
  cursor: grab; touch-action: none;
  transition: box-shadow var(--base) ease;
}
.pin-shot:active { cursor: grabbing; }
.pin-shot .crop { aspect-ratio: 4 / 3; background: var(--cream); }
.pin-shot > svg { position: absolute; right: -0.5rem; top: -0.5rem; width: 1.75rem; height: 1.75rem; padding: 0.3rem; border-radius: 50%; background: var(--ink); color: var(--paper); }

/* Shortcuts */
.feat--keys .feat-art { min-height: 0; padding: 0 var(--s6) var(--s6); }
.shortcuts { display: grid; gap: var(--s3); }
.shortcuts li { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); font-weight: 500; color: var(--ink-2); }
.shortcuts kbd { min-width: 1.875rem; height: 1.875rem; font-size: 0.875rem; }
.shortcuts li.is-hit kbd { transform: translateY(2px); background: var(--accent); color: var(--on-accent); box-shadow: 0 1px 0 var(--accent-press); }
@media (min-width: 60rem) { .feat--keys .feat-art { padding: 0 var(--s8) var(--s8); } }

.also { margin-top: clamp(3rem, 6vw, 4.5rem); display: grid; gap: var(--s6) var(--s12); }
.also div { display: grid; gap: var(--s1); align-content: start; }
.also dt { font-weight: 700; font-size: var(--step-1); letter-spacing: -0.01em; }
.also dd { color: var(--ink-2); }
.also code { font: inherit; font-weight: 600; color: var(--ink); }
@media (min-width: 40rem) { .also { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 60rem) { .also { grid-template-columns: repeat(3, 1fr); } }

/* Privacy: the one dark band, in the icon's navy */
.private { margin-top: clamp(4.5rem, 10vw, 8rem); padding: clamp(4rem, 9vw, 7rem) 0; background: var(--night); color: var(--on-night); }
.private h2 { max-width: 12ch; }
.private-in { display: grid; gap: var(--s8); }
.private p { color: var(--on-night-2); font-size: var(--step-1); line-height: 1.45; max-width: var(--measure); }
.private ul { display: grid; gap: var(--s3); margin-top: var(--s6); }
.private li { display: flex; gap: var(--s3); align-items: baseline; font-weight: 600; font-size: var(--step-1); }
.private li svg { flex: none; width: 1.125rem; height: 1.125rem; color: var(--ember); transform: translateY(0.15em); }
.private :focus-visible { outline-color: var(--ember); }
@media (min-width: 60rem) { .private-in { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); column-gap: var(--s12); align-items: start; } }

/* Pricing */
.plans { display: grid; gap: var(--s4); }
.plan { display: grid; gap: var(--s2); align-content: start; padding: var(--s8); border-radius: var(--r-lg); background: var(--paper); box-shadow: var(--shadow-1); }
.plan--main { background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-2); }
.plan-name { font-weight: 600; }
.plan-price { font-size: var(--step-3); font-weight: 700; letter-spacing: -0.03em; line-height: 1; }
.plan-price small { font-size: var(--step-0); font-weight: 500; letter-spacing: 0; }
.plan p:last-child { margin-top: var(--s2); color: var(--ink-2); }
.plan--main p:last-child { color: var(--on-accent); }
.plans-foot { margin-top: var(--s8); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4) var(--s8); }
.plans-foot .note { max-width: 34rem; }
@media (min-width: 44rem) { .plans { grid-template-columns: repeat(2, 1fr); gap: var(--s6); } }

/* Questions */
.faq { display: grid; gap: var(--s2); }
.faq details { border-radius: var(--r-md); background: var(--paper); box-shadow: var(--shadow-1); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
  min-height: 3.5rem; padding: var(--s3) var(--s6);
  cursor: pointer; list-style: none; font-weight: 600; font-size: var(--step-1); letter-spacing: -0.01em;
  border-radius: var(--r-md);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { flex: none; width: 1.25rem; height: 1.25rem; color: var(--ink-3); transition: transform var(--base) var(--ease-out); }
.faq details[open] summary svg { transform: rotate(45deg); }
.faq details p { padding: 0 var(--s6) var(--s6); color: var(--ink-2); max-width: 44rem; }
@media (min-width: 60rem) { .faq-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: var(--s12); align-items: start; } .faq-grid .band-head { display: block; position: sticky; top: 6rem; } }

/* Closing call and footer */
.close { padding: clamp(4.5rem, 10vw, 8rem) 0; }
.close-in { display: grid; gap: var(--s8); justify-items: start; }
.close img.close-icon { width: clamp(6rem, 14vw, 9rem); height: auto; border-radius: 22.5%; box-shadow: var(--shadow-2); }
.close h2 { max-width: 14ch; }
@media (min-width: 60rem) { .close-in { grid-template-columns: auto minmax(0, 1fr); column-gap: var(--s12); align-items: center; } .close-in > div { display: grid; gap: var(--s8); justify-items: start; } }

.foot { padding: var(--s8) 0 calc(var(--s8) + env(safe-area-inset-bottom)); background: var(--sunk); color: var(--ink-2); font-size: var(--step--1); }
.foot-in { display: grid; gap: var(--s4); }
.foot nav { display: flex; flex-wrap: wrap; gap: 0 var(--s6); }
.foot a { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 600; color: var(--ink); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .foot a:hover { text-decoration: underline; text-underline-offset: 0.2em; } }
@media (min-width: 60rem) { .foot-in { grid-template-columns: 1fr auto; align-items: center; } }

/* 404 */
.lost { min-height: 70vh; display: grid; align-content: center; gap: var(--s6); justify-items: start; padding-block: var(--s16); }

/* The one entrance: the hero settles, then the desktop rises */
@media (prefers-reduced-motion: no-preference) {
  .pw { animation: drift 900ms var(--ease-out) calc(var(--i) * 45ms) both; }
  .snap-word { animation: rise 800ms var(--ease-out) both; }
  @keyframes drift { from { opacity: 0; transform: translate3d(-50%, -42%, calc(var(--z) - 260px)) rotateX(var(--rx)) rotateY(var(--ry)) rotateZ(var(--rz)); } }
  @keyframes rise { from { opacity: 0; transform: translateY(18px); } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 1ms !important; }
  .sc-strip::after { transform: scaleY(0); }
  .ocr-pick::before, .ocr-chip { opacity: 1; transform: none; }
}

/* ── Guides ───────────────────────────────────────────────────────────────── */

.guide { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(4rem, 8vw, 6rem); }
.guide-head { display: grid; gap: var(--s6); max-width: 46rem; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.guide-head h1 { font-size: var(--step-3); line-height: 1.04; letter-spacing: -0.03em; }
.crumbs a { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 600; color: var(--accent-text); text-decoration: none; }
.crumbs a::before { content: "←"; margin-right: var(--s2); }
@media (hover: hover) and (pointer: fine) { .crumbs a:hover { text-decoration: underline; text-underline-offset: 0.2em; } }

.prose { max-width: 42rem; font-size: 1.125rem; line-height: 1.65; }
.prose > * + * { margin-top: var(--s6); }
.prose h2 { font-size: var(--step-2); letter-spacing: -0.02em; line-height: 1.15; margin-top: var(--s12); }
.prose h3 { font-size: var(--step-1); letter-spacing: -0.01em; line-height: 1.25; margin-top: var(--s8); }
.prose h2 + *, .prose h3 + * { margin-top: var(--s3); }
.prose ul, .prose ol { padding-left: 1.4em; display: grid; gap: var(--s2); }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li::marker { color: var(--ink-3); }
.prose a { color: var(--accent-text); font-weight: 600; text-decoration: underline; text-decoration-thickness: 0.08em; text-underline-offset: 0.2em; }
.prose strong { font-weight: 650; }
.prose kbd { min-width: 1.6em; height: 1.6em; padding: 0 0.35em; border-radius: 0.375rem; font-size: 0.9em; vertical-align: 0.05em; box-shadow: 0 1px 0 var(--sunk-2), 0 2px 0 var(--sunk-2); }
.prose code { padding: 0.15em 0.4em; border-radius: var(--r-xs); background: var(--sunk); font: 0.9em/1.4 ui-monospace, "SF Mono", Menlo, monospace; overflow-wrap: anywhere; }
.prose pre { padding: var(--s4); border-radius: var(--r-md); background: var(--night); color: var(--on-night); overflow-x: auto; }
.prose pre code { padding: 0; background: none; color: inherit; overflow-wrap: normal; }
.prose table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.prose th, .prose td { padding: var(--s3) var(--s4) var(--s3) 0; text-align: left; vertical-align: top; box-shadow: 0 1px 0 var(--sunk-2); }
.prose th { font-weight: 650; color: var(--ink-2); }
.prose .aside { padding: var(--s4) var(--s6); border-radius: var(--r-md); background: var(--tile-amber); }
.table-scroll { overflow-x: auto; }

.pitch {
  display: grid; gap: var(--s4) var(--s6); align-items: center; justify-items: start;
  max-width: 46rem; margin-top: var(--s16); padding: var(--s6);
  border-radius: var(--r-lg); background: var(--paper); box-shadow: var(--shadow-1);
}
.pitch > img { width: 3.5rem; height: 3.5rem; border-radius: 22.5%; }
.pitch h2 { font-size: var(--step-1); letter-spacing: -0.01em; line-height: 1.2; }
.pitch p { color: var(--ink-2); margin-top: var(--s1); }
@media (min-width: 44rem) { .pitch { grid-template-columns: auto minmax(0, 1fr) auto; } }

.more { max-width: 46rem; margin-top: var(--s16); }
.more h2 { font-size: var(--step-2); margin-bottom: var(--s4); }
.guide-list { display: grid; gap: var(--s2); }
.guide-list a {
  display: grid; gap: var(--s1); padding: var(--s4) var(--s6);
  border-radius: var(--r-md); background: var(--paper); box-shadow: var(--shadow-1);
  text-decoration: none;
  transition: transform var(--fast) var(--ease-out), box-shadow var(--base) ease;
}
.guide-list a:active { transform: scale(0.99); }
.guide-list b { font-weight: 650; font-size: var(--step-1); letter-spacing: -0.01em; line-height: 1.25; }
.guide-list span { color: var(--ink-2); }
.guide-list--main { max-width: 52rem; gap: var(--s3); }
@media (hover: hover) and (pointer: fine) { .guide-list a:hover { box-shadow: var(--shadow-2); } }
