/* Tallbook, built with the emil-design-eng lens:
   good defaults, motion only where it explains or confirms,
   transform + opacity only, custom curves, exits faster than entries. */

:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --surface-2: #f3f3f1;
  --ink: #171717;
  --ink-2: #3a3a3c;
  --muted: #6b6b6f;
  --ring: rgba(23, 23, 23, 0.08);
  --ring-strong: rgba(23, 23, 23, 0.14);
  --accent: #2c5bd6;
  --mark: #fde68a;
  --btn-bg: #171717;
  --btn-ink: #fafaf9;
  --btn-bg-hover: #2c2c2e;
  --focus: #2c5bd6;
  --card-shadow: 0 0 0 1px var(--ring), 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px -8px rgba(0, 0, 0, 0.08);

  /* Curves from the skill. Never ease-in. */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);

  --gutter: 24px;
  --max: 1120px;
  --header-h: 64px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111112;
    --surface: #1a1a1c;
    --surface-2: #202023;
    --ink: #ededee;
    --ink-2: #c9c9cc;
    --muted: #9c9ca2;
    --ring: rgba(255, 255, 255, 0.08);
    --ring-strong: rgba(255, 255, 255, 0.16);
    --accent: #7ea2ff;
    --mark: rgba(250, 204, 21, 0.28);
    --btn-bg: #ededee;
    --btn-ink: #111112;
    --btn-bg-hover: #d6d6d9;
    --focus: #7ea2ff;
    --card-shadow: 0 0 0 1px var(--ring), 0 8px 24px -8px rgba(0, 0, 0, 0.5);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}

::selection { background: var(--mark); color: var(--ink); }

h1, h2, h3, p { margin: 0; }
h1, h2 { text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; }
button { font: inherit; color: inherit; }
svg { display: block; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: 16px;
  top: 12px;
  z-index: 100;
  padding: 8px 12px;
  background: var(--btn-bg);
  color: var(--btn-ink);
  border-radius: 8px;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 200ms var(--ease-out);
}
.skip:focus-visible { transform: translateY(0); }

/* ---------- Buttons: press feedback is the whole point ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  transition:
    transform 160ms var(--ease-out),
    background-color 150ms ease,
    box-shadow 150ms ease,
    color 150ms ease;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 16px; height: 16px; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; border-radius: 9px; }
.btn-lg { height: 52px; padding: 0 24px; font-size: 16px; border-radius: 12px; }

.btn-primary { background: var(--btn-bg); color: var(--btn-ink); }
.btn-secondary { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--ring-strong); }
.btn-ghost { background: transparent; color: var(--ink); padding: 0 12px; }
.btn-quiet { background: var(--surface-2); color: var(--ink); }

@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--btn-bg-hover); }
  .btn-secondary:hover { background: var(--surface-2); }
  .btn-ghost:hover { background: var(--surface-2); }
  .btn-quiet:hover { box-shadow: 0 0 0 1px var(--ring-strong); }
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 160ms var(--ease-out), background-color 150ms ease;
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:active { transform: scale(0.95); }
@media (hover: hover) and (pointer: fine) {
  .icon-btn:hover { background: var(--surface-2); }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
}
/* The hairline only appears once content scrolls beneath; fades, never jumps. */
.site-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--ring-strong);
  opacity: 0;
  transition: opacity 200ms ease;
}
.site-header[data-scrolled]::after { opacity: 1; }

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.brand-mark { width: 14px; height: 19px; }

.nav { display: flex; gap: 4px; margin-left: 12px; }
.nav a {
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  transition: color 150ms ease, background-color 150ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .nav a:hover { color: var(--ink); background: var(--surface-2); }
}

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.menu { position: relative; display: none; }
.menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  /* Origin-aware: grows out of the button it belongs to. */
  transform-origin: top right;
  opacity: 0;
  transform: scale(0.96) translateY(-4px);
  visibility: hidden;
  /* Exit: fast. */
  transition: opacity 120ms ease, transform 120ms var(--ease-out), visibility 0s linear 120ms;
}
.menu-panel[data-open] {
  opacity: 1;
  transform: none;
  visibility: visible;
  /* Enter: a touch slower than exit, still well under 300ms. */
  transition: opacity 180ms ease, transform 180ms var(--ease-out), visibility 0s;
}
.menu-panel a {
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 15px;
}
.menu-panel a:active { background: var(--surface-2); }
@media (hover: hover) and (pointer: fine) {
  .menu-panel a:hover { background: var(--surface-2); }
}

/* ---------- Hero ---------- */
.hero { padding: 96px 0 48px; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.5rem, 1.4rem + 3.6vw, 4.25rem);
  line-height: 1.02;
  font-weight: 600;
  letter-spacing: -0.04em;
  max-width: 12ch;
}
.lead {
  margin-top: 24px;
  max-width: 34rem;
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink-2);
}
.hero-actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.small-print { margin-top: 14px; font-size: 14px; color: var(--muted); }

/* Page-load entrance: one short staggered rise, plays once. */
@media (prefers-reduced-motion: no-preference) {
  .js .enter {
    animation: rise 600ms var(--ease-out) both;
    animation-delay: calc(var(--i) * 60ms + 60ms);
  }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Hero deck: Sonner-style stack ---------- */
.deck { width: 100%; max-width: 440px; justify-self: end; }
.deck-stack {
  position: relative;
  height: 212px;
  margin-top: 28px; /* room for the peeking cards behind */
}
.flash {
  position: absolute;
  inset: 0;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  transform-origin: top center;
  /* Restacking is movement on screen: ease-in-out-ish drawer curve. */
  transition:
    transform 400ms var(--ease-drawer),
    opacity 300ms ease;
  will-change: transform;
}
.flash[data-pos="0"] { transform: translateY(0) scale(1); z-index: 4; }
.flash[data-pos="1"] { transform: translateY(-14px) scale(0.95); z-index: 3; }
.flash[data-pos="2"] { transform: translateY(-28px) scale(0.9); z-index: 2; }
.flash[data-pos="3"] { transform: translateY(-28px) scale(0.9); z-index: 1; opacity: 0; }
/* Done card leaves quickly: exits are faster than entries. */
.flash[data-pos="out"] {
  transform: translateY(18px) scale(0.98);
  opacity: 0;
  z-index: 5;
  filter: blur(2px);
  transition: transform 200ms var(--ease-out), opacity 120ms ease, filter 120ms ease;
}
.flash[data-snap] { transition: none; }
/* Behind cards show only their frame: their text would just be noise. */
.js .flash:not([data-pos="0"]) > * { opacity: 0; transition: opacity 100ms ease; }
/* Incoming text waits until the old card has mostly gone, so two cards never read at once. */
.flash > * { transition: opacity 200ms ease 120ms; }

.flash-meta { display: flex; gap: 6px; font-size: 13px; color: var(--muted); }
.flash-q {
  margin-top: 14px;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: -0.02em;
}
/* Answer reveal: opacity + small rise + light blur, so it reads as one thing arriving. */
.flash .flash-a {
  margin-top: 10px;
  font-size: 16px;
  color: var(--ink-2);
  opacity: 0;
  transform: translateY(4px);
  filter: blur(3px);
  transition: opacity 200ms ease, transform 200ms var(--ease-out), filter 200ms ease;
}
.flash[data-revealed] .flash-a { opacity: 1; transform: none; filter: none; }
.flash-link {
  margin-top: auto;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px 4px 7px;
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 13px;
  color: var(--ink-2);
}
.flash-link svg { width: 14px; height: 14px; color: var(--accent); }

.deck-controls {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.deck-count { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.deck-buttons { display: flex; gap: 8px; }
.deck-buttons .btn svg { width: 14px; height: 14px; margin-right: -4px; }

/* No-JS: show the first card plainly with its answer. */
html:not(.js) .flash:not(:first-child) { display: none; }
html:not(.js) .flash .flash-a { opacity: 1; transform: none; filter: none; }
html:not(.js) .deck-controls { display: none; }

/* ---------- Sections ---------- */
.section { padding: 112px 0; }
.h2 {
  font-size: clamp(1.875rem, 1.3rem + 1.8vw, 2.75rem);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.035em;
  max-width: 22ch;
}

/* Scroll reveal: once, short, transform + opacity. */
@media (prefers-reduced-motion: no-preference) {
  .js [data-inview],
  .js [data-inview-group] > * {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out);
  }
  .js [data-inview-group] > *:nth-child(2) { transition-delay: 60ms; }
  .js [data-inview-group] > *:nth-child(3) { transition-delay: 120ms; }
  .js [data-inview-group] > *:nth-child(4) { transition-delay: 180ms; }
  .js [data-inview].is-in,
  .js [data-inview-group].is-in > * { opacity: 1; transform: none; }
}

/* How it works */
.steps {
  list-style: none;
  margin: 56px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
}
.step-n {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--ring-strong);
  font-size: 14px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.step h3, .feature h3 {
  margin-top: 18px;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.015em;
}
.step p, .feature p { margin-top: 6px; color: var(--ink-2); max-width: 34ch; }

/* ---------- Demo: a note becoming cards ---------- */
.app {
  margin: 56px 0 0;
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
}
.app-bar {
  display: flex;
  align-items: center;
  height: 48px;
  padding: 0 24px;
  background: var(--surface-2);
  font-size: 13px;
  color: var(--muted);
}
.app-crumb span { margin: 0 4px; opacity: 0.6; }
.app-body {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
}
.note { padding: 36px 40px 40px; }
.note-meta { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.note-h { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; margin-top: 22px; }
.note-meta + .note-h { margin-top: 0; }
.note-p { margin-top: 6px; color: var(--ink-2); font-size: 16px; }

/* Highlighter: a pseudo-element that wipes in with scaleX, origin left. */
.mark {
  position: relative;
  isolation: isolate;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.mark::before {
  content: "";
  position: absolute;
  inset: 0 -4px;
  z-index: -1;
  border-radius: 4px;
  background: var(--mark);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 220ms var(--ease-out);
}
[data-src].is-lit .mark::before { transform: scaleX(1); transition-duration: 320ms; }

.cards {
  list-style: none;
  margin: 0;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface-2);
}
.card-slot { perspective: 900px; }
.js .card-slot.is-waiting { opacity: 0; transform: translateY(8px); }
.card-slot {
  transition: opacity 360ms var(--ease-out), transform 360ms var(--ease-out);
}

.flip {
  display: block;
  width: 100%;
  height: 112px;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  border-radius: 14px;
  transition: transform 160ms var(--ease-out);
}
.flip:active { transform: scale(0.98); }
.flip-inner {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  /* A flip is movement on screen: strong ease-in-out. Explanatory, so allowed to be longer. */
  transition: transform 520ms var(--ease-in-out);
}
.flip[aria-pressed="true"] .flip-inner { transform: rotateY(180deg); }
.face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--card-shadow);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.face-back { transform: rotateY(180deg); }
.face-label { font-size: 12px; color: var(--muted); }
.face-text { font-size: 16px; line-height: 1.35; font-weight: 500; letter-spacing: -0.01em; }
.face-back .face-text { font-weight: 400; color: var(--ink-2); }
@media (hover: hover) and (pointer: fine) {
  .flip:hover .face { box-shadow: 0 0 0 1px var(--ring-strong), 0 1px 2px rgba(0,0,0,.04), 0 10px 28px -10px rgba(0,0,0,.12); }
}

.caption {
  padding: 18px 24px;
  font-size: 15px;
  color: var(--muted);
  text-align: center;
  background: var(--surface);
  box-shadow: 0 -1px 0 var(--ring);
}

/* ---------- Features ---------- */
.features {
  list-style: none;
  margin: 56px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.feature {
  padding: 28px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--ring);
}
.feature-icon { width: 24px; height: 24px; color: var(--accent); }
.feature p { max-width: 40ch; }

/* ---------- Pricing ---------- */
.plans {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 840px;
}
.plan {
  display: flex;
  flex-direction: column;
  padding: 32px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--ring);
}
.plan-student { box-shadow: 0 0 0 1.5px var(--ink); }
.plan-name { font-size: 16px; font-weight: 500; }
.plan-price { margin-top: 18px; display: flex; align-items: baseline; gap: 6px; }
.price {
  font-size: 48px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.per { font-size: 16px; color: var(--muted); }
.plan-desc { margin-top: 16px; margin-bottom: 28px; color: var(--ink-2); }
.plan .btn { margin-top: auto; align-self: stretch; }
.plans-note { margin-top: 24px; font-size: 15px; color: var(--muted); max-width: 52ch; }

/* ---------- FAQ ---------- */
.faq-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 48px; align-items: start; }
.faq { display: flex; flex-direction: column; }
.faq details { box-shadow: 0 1px 0 var(--ring-strong); }
.faq details:first-child { box-shadow: 0 -1px 0 var(--ring-strong), 0 1px 0 var(--ring-strong); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 4px;
  list-style: none;
  cursor: pointer;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  border-radius: 8px;
  touch-action: manipulation;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--muted);
  transition: transform 200ms var(--ease-out);
}
.faq details[open] summary svg { transform: rotate(180deg); }
@media (hover: hover) and (pointer: fine) {
  .faq summary:hover svg { color: var(--ink); }
}
.answer { padding: 0 4px 22px; color: var(--ink-2); max-width: 56ch; }
/* Enter via @starting-style: the answer settles in rather than popping. */
@media (prefers-reduced-motion: no-preference) {
  .faq details[open] .answer {
    transition: opacity 220ms ease, transform 220ms var(--ease-out);
    @starting-style { opacity: 0; transform: translateY(-4px); }
  }
}

/* ---------- Last call ---------- */
.last { padding: 136px 0 152px; }
.last-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 32px; }
.last-title { max-width: 18ch; margin: 0 auto; font-size: clamp(2.25rem, 1.4rem + 2.8vw, 3.5rem); }

/* ---------- Footer ---------- */
.site-footer { padding: 32px 0 40px; box-shadow: 0 -1px 0 var(--ring); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; font-size: 14px; color: var(--muted); }
.brand-foot { color: var(--ink); font-size: 15px; }
.footer-links { display: flex; gap: 4px; }
.link-btn {
  padding: 6px 8px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  transition: color 150ms ease, transform 160ms var(--ease-out);
}
.link-btn:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .link-btn:hover { color: var(--ink); }
}
.footer-line { margin-left: auto; }

/* ---------- Toast (Sonner-flavoured) ---------- */
.toaster {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 80;
  width: min(380px, calc(100vw - 32px));
  transform: translateX(-50%);
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 14px 14px 16px;
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 0 0 1px var(--ring-strong), 0 12px 32px -12px rgba(0, 0, 0, 0.25);
  font-size: 14px;
  line-height: 1.45;
  pointer-events: auto;
  touch-action: pan-x;
  /* Sonner's own feel: plain ease, a little slower, enters from where it lives. */
  transition: transform 400ms ease, opacity 400ms ease;
  @starting-style { transform: translateY(100%); opacity: 0; }
}
.toast[data-leaving] {
  transform: translateY(100%);
  opacity: 0;
  transition: transform 200ms var(--ease-out), opacity 200ms ease;
}
.toast[data-bump] { animation: bump 240ms var(--ease-out); }
@keyframes bump { 50% { transform: scale(0.98); } }
.toast p { flex: 1; padding-top: 2px; }
.toast .icon-btn { width: 28px; height: 28px; margin: -4px -4px 0 0; border-radius: 7px; color: var(--muted); }
.toast .icon-btn svg { width: 16px; height: 16px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav { display: none; }
  .menu { display: block; }
  .hero { padding: 56px 0 32px; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .deck { justify-self: start; max-width: 520px; }
  .steps { grid-template-columns: 1fr; gap: 32px; margin-top: 40px; }
  .step { display: grid; grid-template-columns: 28px 1fr; column-gap: 16px; }
  .step-n { grid-row: span 2; }
  .step h3 { margin-top: 2px; }
  .app-body { grid-template-columns: 1fr; }
  .faq-wrap { grid-template-columns: 1fr; gap: 24px; }
  .footer-line { margin-left: 0; flex-basis: 100%; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .section { padding: 80px 0; }
  .hero { padding: 40px 0 24px; }
  .lead { font-size: 17px; margin-top: 18px; }
  .hero-actions { margin-top: 28px; }
  .deck-stack { height: 212px; }
  .flash { padding: 20px; }
  .flash-q { font-size: 20px; }
  .features, .plans { grid-template-columns: 1fr; margin-top: 40px; }
  .feature, .plan { padding: 24px; }
  .app { margin-top: 40px; border-radius: 16px; }
  .app-bar { padding: 0 18px; }
  .note { padding: 24px 20px 28px; }
  .cards { padding: 18px; }
  .last { padding: 96px 0 112px; }
  .header-actions .btn-sm { padding: 0 12px; }
}

/* ---------- Reduced motion: keep fades that help, drop movement ---------- */
@media (prefers-reduced-motion: reduce) {
  .btn:active, .icon-btn:active, .flip:active, .link-btn:active { transform: none; }
  .flash { transition: opacity 200ms ease; }
  .flash[data-pos="1"], .flash[data-pos="2"], .flash[data-pos="3"] { transition: opacity 200ms ease; }
  .flash[data-pos="out"] { transform: translateY(0) scale(1); filter: none; transition: opacity 120ms ease; }
  .flash .flash-a { transform: none; filter: none; }
  .menu-panel, .menu-panel[data-open] { transform: none; }
  .card-slot, .js .card-slot.is-waiting { transform: none; }
  /* Flip becomes a crossfade between faces. */
  .flip-inner { transition: none; }
  .flip[aria-pressed="true"] .flip-inner { transform: none; }
  .face { transition: opacity 200ms ease; }
  .face-back { transform: none; opacity: 0; }
  .flip[aria-pressed="true"] .face-back { opacity: 1; }
  .flip[aria-pressed="true"] .face-front { opacity: 0; }
  .toast, .toast[data-leaving] { transform: none; transition: opacity 200ms ease; }
  .toast { @starting-style { transform: none; opacity: 0; } }
  .toast[data-bump] { animation: none; }
  .faq summary svg { transition: none; }
}
