/* Tallbook, built with the apple-design approach.
   System font, size-specific tracking, translucent chrome, springs in app.js. */

:root {
  color-scheme: light dark;
  interpolate-size: allow-keywords;

  --bg: #f6f6f4;
  --bg-elev: #ffffff;
  --bg-grouped: #ffffff;
  --fill: rgba(24, 24, 28, 0.05);
  --fill-strong: rgba(24, 24, 28, 0.09);
  --ink: #1a1a1d;
  --ink-2: #4f5057;
  --ink-3: #7c7d84;
  --sep: rgba(24, 24, 28, 0.1);
  --accent: #2a64d8;
  --accent-press: #2254b8;
  --accent-ink: #ffffff;
  --accent-soft: rgba(42, 100, 216, 0.11);
  --accent-text: #2058c4;
  --lit: rgba(42, 100, 216, 0.12);

  /* Materials: thin for floating chrome, thick for structural regions */
  --mat-thin: rgba(246, 246, 244, 0.72);
  --mat-thick: rgba(236, 236, 233, 0.86);
  --mat-edge: rgba(255, 255, 255, 0.6);
  --scrim: rgba(18, 18, 22, 0.32);

  /* Shadows grow with surface size */
  --shadow-chip: 0 1px 2px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.05), 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-window: 0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 32px rgba(0, 0, 0, 0.08), 0 40px 80px rgba(0, 0, 0, 0.08);
  --shadow-pop: 0 2px 6px rgba(0, 0, 0, 0.08), 0 16px 40px rgba(0, 0, 0, 0.16);

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --max: 68rem;
  --section: clamp(5.5rem, 11vw, 10rem);
  --radius-l: 1.375rem;
  --radius-m: 1rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101012;
    --bg-elev: #1c1c1f;
    --bg-grouped: #1c1c1f;
    --fill: rgba(255, 255, 255, 0.07);
    --fill-strong: rgba(255, 255, 255, 0.12);
    --ink: #f3f3f4;
    --ink-2: #b4b5bb;
    --ink-3: #8b8c93;
    --sep: rgba(255, 255, 255, 0.1);
    --accent: #4f86f0;
    --accent-press: #3f74dc;
    --accent-soft: rgba(79, 134, 240, 0.16);
    --accent-text: #7ea6f5;
    --lit: rgba(79, 134, 240, 0.18);
    --mat-thin: rgba(16, 16, 18, 0.7);
    --mat-thick: rgba(30, 30, 34, 0.86);
    --mat-edge: rgba(255, 255, 255, 0.08);
    --scrim: rgba(0, 0, 0, 0.5);
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-window: 0 1px 2px rgba(0, 0, 0, 0.3), 0 20px 60px rgba(0, 0, 0, 0.45);
    --shadow-pop: 0 2px 6px rgba(0, 0, 0, 0.3), 0 16px 40px rgba(0, 0, 0, 0.5);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 4.5rem;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
html.sheet-open { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.5 var(--font);
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
svg { display: block; }
button { font: inherit; color: inherit; }

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

.skip {
  position: fixed; left: 1rem; top: 0.75rem; z-index: 100;
  padding: 0.6rem 1rem; border-radius: 999px;
  background: var(--ink); color: var(--bg);
  text-decoration: none; font-weight: 600;
  transform: translateY(-200%);
}
.skip:focus-visible { transform: none; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 0.5rem;
}

.wrap {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap-narrow { max-width: calc(46rem + var(--gutter) * 2); }

/* ---------- Type: tracking and leading change with size ---------- */
.t-hero {
  font-size: clamp(2.625rem, 1.2rem + 5.6vw, 5.25rem);
  line-height: 1.04;
  letter-spacing: -0.034em;
  font-weight: 700;
  text-wrap: balance;
}
.t-h2 {
  font-size: clamp(2rem, 1.25rem + 2.9vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.026em;
  font-weight: 700;
  text-wrap: balance;
}
.t-h3 {
  font-size: 1.1875rem;
  line-height: 1.3;
  letter-spacing: -0.012em;
  font-weight: 600;
}
.t-lead {
  font-size: clamp(1.1875rem, 1rem + 0.7vw, 1.4375rem);
  line-height: 1.42;
  letter-spacing: -0.009em;
  color: var(--ink-2);
  text-wrap: pretty;
}
.t-small {
  font-size: 0.875rem;
  line-height: 1.45;
  letter-spacing: 0.006em;
  color: var(--ink-3);
}

/* ---------- Buttons: feedback lives on the press ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  min-height: 3rem;
  padding: 0 1.4rem;
  border: 0; border-radius: 999px;
  font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.008em;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform 100ms ease-out, background-color 150ms ease-out;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-press); }
.btn-primary:active { background: var(--accent-press); }
.btn-tinted { background: var(--accent-soft); color: var(--accent-text); }
.btn-tinted:hover { background: color-mix(in srgb, var(--accent) 17%, transparent); }
.btn-small { min-height: 2.25rem; padding: 0 1rem; font-size: 0.9375rem; }
.btn-large { min-height: 3.5rem; padding: 0 2rem; font-size: 1.1875rem; }
.btn-block { width: 100%; }

.btn-link {
  display: inline-flex; align-items: center; gap: 0.15rem;
  min-height: 3rem; padding: 0 0.5rem;
  color: var(--accent-text);
  font-size: 1.0625rem; font-weight: 500;
  text-decoration: none;
  border-radius: 999px;
  transition: opacity 100ms ease-out, transform 100ms ease-out;
}
.btn-link svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform 200ms ease-out; }
.btn-link:hover svg { transform: translateX(2px); }
.btn-link:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.btn-link:active { opacity: 0.6; }

/* ---------- Navigation: translucent layer, content scrolls under ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
}
.nav::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--mat-thin);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  opacity: 0;
  transition: opacity 240ms ease-out;
}
/* Scroll edge effect: a soft fade where content meets the bar, no 1px rule */
.nav::after {
  content: "";
  position: absolute; left: 0; right: 0; top: 100%;
  height: 1.25rem;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 55%, transparent), transparent);
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms ease-out;
}
.nav.is-scrolled::before, .nav.is-scrolled::after { opacity: 1; }
html:not(.js) .nav::before { opacity: 1; }

.nav-inner {
  position: relative;
  display: flex; align-items: center; gap: 1.5rem;
  height: 3.5rem;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.brand {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-weight: 700; font-size: 1.125rem; letter-spacing: -0.02em;
  text-decoration: none;
  margin-right: auto;
  min-height: 2.75rem;
}
.brand-mark { width: 1.6rem; height: 1.6rem; }
.brand-mark rect { fill: var(--accent); }
.brand-mark path { stroke: #fff; stroke-width: 2; stroke-linecap: round; fill: none; }

.nav-links { display: flex; gap: 0.25rem; }
.nav-links a {
  display: inline-flex; align-items: center;
  min-height: 2.5rem; padding: 0 0.75rem;
  border-radius: 999px;
  font-size: 0.9375rem; font-weight: 500; letter-spacing: -0.004em;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 150ms ease-out, background-color 150ms ease-out;
}
.nav-links a:hover { color: var(--ink); background: var(--fill); }
.nav-links a:active { background: var(--fill-strong); }

.menu-btn {
  display: none;
  width: 2.75rem; height: 2.75rem;
  margin-right: -0.5rem;
  border: 0; border-radius: 999px;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 100ms ease-out, transform 100ms ease-out;
}
.menu-btn:active { background: var(--fill-strong); transform: scale(0.94); }
.menu-btn svg { width: 1.4rem; height: 1.4rem; margin: auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

@media (max-width: 52rem) {
  .nav-links { display: none; }
  .menu-btn { display: inline-flex; }
  .nav-inner { gap: 0.5rem; }
}

/* ---------- Sheet (phone menu): dim to focus, drag to dismiss ---------- */
.sheet-dialog {
  position: fixed; inset: 0;
  width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: transparent;
  color: var(--ink);
  overflow: hidden;
}
.sheet-dialog::backdrop { background: transparent; }
.sheet-scrim {
  position: absolute; inset: 0;
  background: var(--scrim);
  opacity: var(--scrim-o, 1);
}
.sheet {
  position: absolute; left: 0.5rem; right: 0.5rem; bottom: 0.5rem;
  padding: 0.5rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom));
  border-radius: 1.75rem;
  background: var(--mat-thick);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  backdrop-filter: blur(30px) saturate(180%);
  box-shadow: var(--shadow-pop), inset 0 1px 0 var(--mat-edge);
  touch-action: none;
  will-change: transform;
}
.sheet-grabber {
  width: 2.25rem; height: 0.3rem;
  margin: 0.25rem auto 0.75rem;
  border-radius: 999px;
  background: var(--fill-strong);
}
.sheet-list { margin-bottom: 1rem; }
.sheet-list a {
  display: flex; align-items: center;
  min-height: 3.25rem; padding: 0 0.25rem;
  font-size: 1.375rem; font-weight: 600; letter-spacing: -0.018em;
  text-decoration: none;
  border-radius: 0.75rem;
}
.sheet-list a:active { background: var(--fill); }
.sheet-close {
  position: absolute; top: 0.75rem; right: 0.75rem;
  width: 2.25rem; height: 2.25rem;
  border: 0; border-radius: 999px;
  background: var(--fill);
  cursor: pointer;
}
.sheet-close:active { background: var(--fill-strong); }
.sheet-close svg { width: 1rem; height: 1rem; margin: auto; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(3.5rem, 9vw, 7.5rem); }
.hero-copy { text-align: center; }
.hero .t-hero { max-width: 12ch; margin-inline: auto; }
.hero-lead { max-width: 34rem; margin: 1.5rem auto 0; }
.hero-actions {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 0.75rem 1rem;
  margin-top: 2.25rem;
}
.hero-fine { margin-top: 1rem; }

/* The app window: a large surface, so it reads as the thickest object on the page */
.window {
  position: relative;
  max-width: 58rem;
  margin-inline: auto;
  margin-top: clamp(3.5rem, 7vw, 5.5rem);
  border-radius: var(--radius-l);
  background: var(--bg-elev);
  box-shadow: var(--shadow-window);
  overflow: hidden;
  transform-origin: 50% 0;
}
.window-bar {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  height: 2.75rem;
  background: var(--mat-thick);
  font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.004em;
  color: var(--ink-2);
}
.window-bar-icon { position: absolute; left: 1rem; color: var(--ink-3); }
.window-bar-icon svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 1.7; }
.window-body { display: grid; grid-template-columns: 12.5rem 1fr; min-height: 19rem; }
.window-side {
  padding: 1.25rem 0.75rem;
  background: var(--mat-thick);
  font-size: 0.875rem; letter-spacing: 0.004em;
}
.side-group {
  padding: 0 0.6rem;
  margin: 0 0 0.35rem;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.01em;
  color: var(--ink-3);
}
.side-group + ul + .side-group { margin-top: 1.25rem; }
.window-side li {
  padding: 0.35rem 0.6rem;
  border-radius: 0.5rem;
  color: var(--ink-2);
}
.window-side li.is-current { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }

.window-note, .demo-note {
  font-size: 1.0625rem; line-height: 1.55;
}
.window-note { padding: clamp(1.5rem, 4vw, 2.75rem) clamp(1.25rem, 5vw, 3.5rem) 2.75rem; }
.note-title {
  font-size: 1.625rem; line-height: 1.2; letter-spacing: -0.022em; font-weight: 700;
  margin-bottom: 1.25rem;
}
.note-h {
  font-size: 1.1875rem; line-height: 1.3; letter-spacing: -0.012em; font-weight: 650;
  margin-top: 1.1rem; margin-bottom: 0.2rem;
}
.note-title + .note-h, .note-title + .note-head-row .note-h { margin-top: 0; }
.window-note p:not(.note-title):not(.note-h), .demo-note p:not(.note-title):not(.note-h) { color: var(--ink-2); }

.note-head-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.2rem; }
.note-head-row .note-h { margin: 0; }
.link-chip-wrap { position: relative; }
.link-chip {
  display: inline-flex; align-items: center; gap: 0.3rem;
  min-height: 2rem; padding: 0 0.75rem 0 0.6rem;
  border: 0; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-text);
  font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.004em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 100ms ease-out, background-color 150ms ease-out;
}
.link-chip:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.link-chip:active { transform: scale(0.95); }
.link-chip svg { width: 0.95rem; height: 0.95rem; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }

/* Popover grows out of the chip that opened it */
.popover {
  position: absolute; left: 0; top: calc(100% + 0.5rem); z-index: 2;
  width: max-content; max-width: 16rem;
  padding: 0.75rem 1rem;
  border-radius: 0.875rem;
  background: var(--bg-elev);
  box-shadow: var(--shadow-pop);
  transform-origin: 1.25rem 0;
}
.popover-title { font-size: 0.9375rem; font-weight: 600; letter-spacing: -0.006em; }
.popover-line { font-size: 0.875rem; color: var(--ink-2); letter-spacing: 0.004em; }
.popover[hidden] { display: none; }
@media (min-width: 40rem) {
  /* Wide screens: sit beside the chip so the note stays readable */
  .popover {
    left: calc(100% + 0.5rem); top: 0;
    display: flex; align-items: center; gap: 0.6rem;
    height: 2rem; max-width: none;
    padding: 0 0.85rem;
    border-radius: 999px;
    box-shadow: var(--shadow-chip);
    white-space: nowrap;
    transform-origin: 0 50%;
  }
  .popover[hidden] { display: none; }
  .popover-title { font-size: 0.8125rem; }
  .popover-line { font-size: 0.8125rem; }
}

@media (max-width: 40rem) {
  .window-body { grid-template-columns: 1fr; min-height: 0; }
  .window-side { display: none; }
  .window { border-radius: var(--radius-m); }
}

/* ---------- Sections ---------- */
.section { padding-top: var(--section); }
.section-title { max-width: 20ch; }
.demo .section-title, #features .section-title, #pricing .section-title, #questions .section-title { margin-inline: auto; text-align: center; }
#how .section-title { max-width: 18ch; margin-inline: auto; text-align: center; }

.steps {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  counter-reset: step;
}
.step-num {
  display: grid; place-items: center;
  width: 2.25rem; height: 2.25rem;
  margin-bottom: 1.25rem;
  border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-text);
  font-weight: 700; font-size: 1rem; font-variant-numeric: tabular-nums;
}
.step p { margin-top: 0.5rem; color: var(--ink-2); }
@media (max-width: 52rem) {
  .steps { grid-template-columns: 1fr; gap: 2.25rem; }
  .step { display: grid; grid-template-columns: 2.25rem 1fr; column-gap: 1rem; }
  .step-num { grid-row: span 2; margin: 0; }
}

/* ---------- Demo: note becomes cards ---------- */
.demo-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
}
.demo-note {
  padding: 2rem clamp(1.25rem, 3vw, 2.25rem) 2.25rem;
  border-radius: var(--radius-l);
  background: var(--bg-elev);
  box-shadow: var(--shadow-card);
}
.demo-note [data-src] {
  position: relative;
  border-radius: 0.4rem;
  margin-inline: -0.5rem; padding: 0.1rem 0.5rem;
}
.demo-note .note-h[data-src] { margin-bottom: 0; }
.demo-note [data-src]::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: var(--lit);
  opacity: 0;
  transition: opacity 260ms ease-out;
  z-index: -1;
}
.demo-note [data-src].is-lit::before { opacity: 1; }
.demo-note { position: relative; z-index: 0; }

.demo-cards { display: flex; flex-direction: column; align-items: center; }

/* No-JS: the cards sit in a plain list, both sides showing */
.deck { display: grid; gap: 1rem; width: 100%; max-width: 24rem; }
.card { border-radius: var(--radius-l); }
.card-face {
  padding: 1.5rem;
  border-radius: var(--radius-l);
  background: var(--bg-elev);
  box-shadow: var(--shadow-card);
}
.card-back { margin-top: 0.5rem; background: var(--accent-soft); box-shadow: none; }
.deck-controls { display: none; }

.js .deck {
  position: relative; display: block;
  height: 16rem;
  perspective: 1400px;
}
.js .card {
  position: absolute; left: 0; right: 0; top: 0;
  height: 14rem;
  cursor: grab;
  touch-action: pan-y;
  user-select: none; -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  will-change: transform;
}
.js .card.is-dragging { cursor: grabbing; }
.js .card:not(.is-top) { cursor: default; }
.js .card-inner {
  position: relative; height: 100%;
  transform-style: preserve-3d;
}
.js .card-face {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 1.75rem;
  text-align: center;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  margin: 0;
}
.js .card-front p {
  font-size: 1.5rem; line-height: 1.22; letter-spacing: -0.02em; font-weight: 650;
  text-wrap: balance;
}
.js .card-back {
  transform: rotateY(180deg);
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: var(--shadow-card);
}
.js .card-back p {
  font-size: 1.1875rem; line-height: 1.38; letter-spacing: -0.01em; font-weight: 550;
  text-wrap: balance;
}
.card:focus-visible { outline-offset: 4px; border-radius: var(--radius-l); }

.js .deck-controls {
  display: flex; align-items: center; justify-content: center; gap: 1.25rem;
  margin-top: 1.5rem;
}
.round-btn {
  display: grid; place-items: center;
  width: 3rem; height: 3rem;
  border: 0; border-radius: 999px;
  background: var(--fill); color: var(--ink);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform 100ms ease-out, background-color 150ms ease-out;
}
.round-btn:hover { background: var(--fill-strong); }
.round-btn:active { transform: scale(0.92); background: var(--fill-strong); }
.round-btn svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.deck-count {
  min-width: 3.5rem; text-align: center;
  font-size: 0.9375rem; font-weight: 600; letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
}

.demo-caption {
  margin: clamp(2.5rem, 5vw, 3.5rem) auto 0;
  max-width: 30rem;
  text-align: center;
  font-size: 1.1875rem; line-height: 1.42; letter-spacing: -0.009em;
  color: var(--ink-2);
}

@media (max-width: 52rem) {
  .demo-grid { grid-template-columns: 1fr; }
  .js .deck { height: 15rem; }
  .js .card { height: 13rem; }
}

/* ---------- Features ---------- */
.features {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
}
.feature {
  padding: clamp(1.75rem, 3.5vw, 2.5rem);
  border-radius: var(--radius-l);
  background: var(--bg-elev);
}
.feature-icon {
  width: 2rem; height: 2rem;
  margin-bottom: 1.5rem;
  fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.feature-icon .fill { fill: var(--accent); stroke: none; }
.feature p { margin-top: 0.5rem; color: var(--ink-2); max-width: 30rem; }
@media (max-width: 44rem) { .features { grid-template-columns: 1fr; } }

/* ---------- Pricing ---------- */
.plans {
  display: grid; grid-template-columns: repeat(2, minmax(0, 22rem));
  justify-content: center;
  gap: 1rem;
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
}
.plan {
  display: flex; flex-direction: column;
  padding: 2rem;
  border-radius: var(--radius-l);
  background: var(--bg-elev);
}
.plan-featured { box-shadow: var(--shadow-card), inset 0 0 0 2px var(--accent); }
.plan-name { font-size: 1.1875rem; font-weight: 600; letter-spacing: -0.012em; }
.plan-price {
  margin-top: 0.75rem;
  font-size: 3.25rem; line-height: 1; letter-spacing: -0.035em; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.plan-price span { font-size: 1.0625rem; letter-spacing: 0; font-weight: 500; color: var(--ink-2); }
.plan-desc { margin: 1rem 0 2rem; color: var(--ink-2); flex: 1; }
.plans-note { margin: 1.75rem auto 0; max-width: 40rem; text-align: center; text-wrap: balance; font-size: 0.9375rem; color: var(--ink-3); letter-spacing: 0.004em; }
@media (max-width: 44rem) { .plans { grid-template-columns: 1fr; } }

/* ---------- Questions: an inset grouped list ---------- */
.faq {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  border-radius: var(--radius-l);
  background: var(--bg-grouped);
  overflow: hidden;
}
.faq details { position: relative; }
.faq details + details::before {
  content: ""; position: absolute; top: 0; left: 1.5rem; right: 0;
  height: 1px; background: var(--sep);
}
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 4rem;
  padding: 1rem 1.5rem;
  font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.008em;
  cursor: pointer;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 100ms ease-out;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:active { background: var(--fill); }
.faq summary:focus-visible { outline-offset: -3px; border-radius: 0; }
.faq summary svg {
  flex: none; width: 1.15rem; height: 1.15rem;
  fill: none; stroke: var(--ink-3); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
  transition: transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.faq details[open] summary svg { transform: rotate(180deg); }
.faq details p { padding: 0 1.5rem 1.35rem; color: var(--ink-2); max-width: 40rem; }
.faq details::details-content {
  block-size: 0;
  overflow: clip;
  transition: block-size 320ms cubic-bezier(0.2, 0.8, 0.2, 1), content-visibility 320ms allow-discrete;
}
.faq details[open]::details-content { block-size: auto; }

/* ---------- Last call + footer ---------- */
.last { text-align: center; padding-bottom: var(--section); }
.last .t-h2 { max-width: 16ch; margin: 0 auto 2.25rem; }

.footer { padding-block: 2.5rem 3rem; background: var(--mat-thick); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 2rem; }
.footer-brand { font-weight: 700; letter-spacing: -0.02em; font-size: 1.0625rem; }
.footer-links { display: flex; gap: 0.25rem; }
.footer-links a {
  display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 0.6rem;
  font-size: 0.9375rem; color: var(--ink-2); text-decoration: none; border-radius: 999px;
}
.footer-links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 0.2em; }
.footer-line { width: 100%; font-size: 0.875rem; color: var(--ink-3); letter-spacing: 0.006em; }

/* ---------- Accessibility signals ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
  .demo-note [data-src]::before { transition: opacity 200ms ease !important; }
  .sheet-dialog[open] { animation: fade-in 200ms ease; }
  /* Flip becomes a cross-fade, not a rotation */
  .js .card-back { transform: none; }
  .js .card-face { backface-visibility: visible; -webkit-backface-visibility: visible; transition: opacity 200ms ease !important; }
  .js .card .card-back { opacity: 0; }
  .js .card.is-flipped .card-back { opacity: 1; }
  .js .card.is-flipped .card-front { opacity: 0; }
}
@keyframes fade-in { from { opacity: 0; } }

@media (prefers-reduced-transparency: reduce) {
  :root { --mat-thin: var(--bg); --mat-thick: var(--bg-elev); }
  .nav::before, .sheet { -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  :root { --ink-2: var(--ink); --ink-3: var(--ink); --sep: currentColor; }
  .nav.is-scrolled::before { background: var(--bg); box-shadow: 0 1px 0 var(--ink); }
  .feature, .plan, .faq, .demo-note, .window, .card-face, .sheet { outline: 1px solid var(--ink); outline-offset: -1px; }
}
