/* Plateflow site. Tokens follow the brief and v1: grouped background, inset cards, system font,
   one warm accent. Concept: the Plateflow mark is a plate with a wave in it; the page fills it.
   See DESIGN.md. No inline styles anywhere (CSP): per-element values come from classes or from
   custom properties set by app.js through the CSSOM. */

:root {
  color-scheme: light dark;

  --bg: #F2F2F7;
  --card: #FFFFFF;
  --text: #000000;
  --text-secondary: #3C3C43C7; /* token is #3C3C4399 (3.3:1); alpha raised to reach 4.5:1 */
  --separator: #3C3C434A;
  --fill: #78788029;
  --accent: #D63B22;
  --btn: #D63B22;              /* button and poster fill, white label (4.7:1) in both themes */
  --link: #C8341C;             /* accent, darkened for 4.5:1 as text */
  --on-accent: #FFFFFF;
  --nav-bg: #F2F2F7;           /* solid fallback; glass applied below where supported */
  --mark: #111214;             /* logo ink */

  --font: -apple-system, "SF Pro Text", "SF Pro Display", system-ui, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --r-tile: 1rem;
  --r-card: 1.25rem;
  --r-poster: 1.75rem;

  --gutter: 1rem;
  --section: 4rem;
  --nav-h: 4rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --card: #1C1C1E;
    --text: #FFFFFF;
    --text-secondary: #EBEBF599;
    --separator: #54545899;
    --fill: #7878805C;
    --accent: #E5432A;
    --link: #EE5A41;
    --nav-bg: #000000;
    --mark: #F5F5F3;
  }
}

/* Manual choice from the nav toggle (theme.js); same dark values as above */
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --card: #1C1C1E;
  --text: #FFFFFF;
  --text-secondary: #EBEBF599;
  --separator: #54545899;
  --fill: #7878805C;
  --accent: #E5432A;
  --link: #EE5A41;
  --nav-bg: #000000;
  --mark: #F5F5F3;
}

@media (min-width: 37.5em) { :root { --gutter: 1.5rem; } }
@media (min-width: 48em) { :root { --section: 7rem; } }

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 1rem);
  interpolate-size: allow-keywords;
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.47;
  -webkit-font-smoothing: antialiased;
}

::selection { background: color-mix(in srgb, var(--accent) 30%, transparent); }

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

h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

h1, h2, h3 { font-weight: 700; text-wrap: balance; }

h1 {
  font-size: clamp(2.6rem, 11vw, 5.5rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}
h2 {
  font-size: clamp(2.1rem, 5.4vw, 3.75rem);
  line-height: 1.03;
  letter-spacing: -0.03em;
}
h3 {
  font-size: 1.375rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  font-weight: 600;
}
p { text-wrap: pretty; }

.small { font-size: 0.8125rem; line-height: 1.4; color: var(--text-secondary); }
.muted { color: var(--text-secondary); }

a { color: var(--link); text-underline-offset: 0.2em; text-decoration-thickness: 1px; transition: text-decoration-thickness 0.2s var(--ease); }
a:hover { text-decoration-thickness: 2px; }

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

.wrap { width: min(calc(100% - 2 * var(--gutter)), 75rem); margin-inline: auto; }

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

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip {
  position: absolute; left: var(--gutter); top: 0.5rem; z-index: 30;
  padding: 1rem; border-radius: var(--r-tile);
  background: var(--card); color: var(--text); font-weight: 600;
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

section { padding-block: calc(var(--section) / 2); }

/* ---------- Rise: the one hover, focus and press treatment for primary targets ----------
   A tint rises from the bottom edge, the way the level rises in the plate. */
.rise {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transition: transform 0.35s var(--ease), color 0.35s var(--ease);
}
.rise::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--rise-bg, var(--fill));
  translate: 0 101%;
  transition: translate 0.5s var(--ease);
}
.rise:hover::before, .rise:focus-visible::before { translate: 0 0; }
.rise:active { transform: scale(0.97); }

/* ---------- Plate: the Plateflow mark with a live wave (waves are driven by app.js) ---------- */
.plate { display: block; height: auto; overflow: hidden; }
.p-bar { fill: var(--mark); }
.p-ring { fill: none; stroke: var(--mark); stroke-width: 12; }
.p-wave { fill: var(--wave, var(--accent)); }
.p-wave-b { opacity: 0.4; }
.on-accent { --mark: #FFFFFF; --wave: #FFFFFF; }
.on-accent .p-wave-a { fill-opacity: 0.32; }
.on-accent .p-wave-b { opacity: 1; fill-opacity: 0.2; }

.plate-xs { width: auto; height: 1.5rem; flex: none; }
.plate-s { width: 5.25rem; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--separator);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .nav {
    background: color-mix(in srgb, var(--bg) 72%, transparent);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
  }
}
.nav-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: var(--nav-h); }

.brand { display: inline-flex; align-items: center; min-height: 3rem; color: var(--mark); }
.brand-svg { height: 2rem; width: auto; display: block; }
.brand-word { fill: currentColor; }

.nav-links { display: none; }
.nav-links ul { display: flex; gap: 0; }
.nav-links a {
  display: inline-flex; align-items: center; min-height: 3rem; padding-inline: 0.75rem;
  border-radius: var(--r-tile);
  color: var(--text-secondary); font-size: 0.9375rem; text-decoration: none;
}
.nav-links a:hover, .nav-links a[aria-current="true"] { color: var(--text); }
.nav-links a[aria-current="true"]::after {
  content: ""; position: absolute; left: 0.75rem; right: 0.75rem; bottom: 0.45rem;
  height: 2px; border-radius: 1px; background: var(--accent);
}

.nav-tools { display: flex; align-items: center; gap: 0.25rem; }

.theme-toggle, .menu-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.25rem;
  min-height: 3rem; padding: 0; border: 0; border-radius: var(--r-tile);
  background: transparent; color: var(--text-secondary); cursor: pointer;
  font: inherit; font-size: 0.9375rem;
}
.theme-toggle { width: 3rem; }
.menu-btn { padding-inline: 0.75rem 0.5rem; }
.theme-toggle:hover, .menu-btn:hover { color: var(--text); }
.theme-toggle[hidden] { display: none; }
.theme-toggle svg, .menu-btn svg {
  width: 1.25rem; height: 1.25rem;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.menu-btn .chev { transition: rotate 0.4s var(--ease); }
.menu-btn[aria-expanded="true"] .chev { rotate: 180deg; }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }

.nav-cta {
  display: none; align-items: center; min-height: 3rem; padding-inline: 0.5rem;
  color: var(--text-secondary); font-weight: 600; white-space: nowrap;
}

.menu { border-top: 1px solid var(--separator); }
.menu ul { padding-block: 0.5rem; }
.menu li + li { border-top: 1px solid var(--separator); }
.menu a {
  display: flex; align-items: center; min-height: 3.25rem;
  color: var(--text); font-size: 1.125rem; font-weight: 600; text-decoration: none;
}
.menu-note { padding-bottom: 1rem; }

@media (min-width: 30em) { .nav-cta { display: inline-flex; } }
@media (min-width: 64em) {
  .nav-links { display: block; margin-left: auto; }
  .menu-btn, .menu { display: none; }
  .nav-links a { position: relative; }
}

/* ---------- Heads ---------- */
.head { max-width: 46rem; margin: 0 auto 3rem; text-align: center; }
.head p { margin-top: 1rem; color: var(--text-secondary); }
.head-split { max-width: none; margin-bottom: 3rem; text-align: left; display: grid; gap: 1rem; }
.head-split p { margin-top: 0; font-size: 1.375rem; line-height: 1.35; max-width: 34rem; }
@media (min-width: 60em) {
  .head-split { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: end; gap: 3rem; }
  .head-split p { font-size: 1.1875rem; }
}

/* ---------- Coming soon (inert) ---------- */
.soon {
  display: inline-flex; align-items: center; gap: 0.75rem;
  min-height: 3.25rem; padding: 0.5rem 1.25rem 0.5rem 1rem;
  border-radius: 999px; border: 1px solid var(--separator); background: var(--card);
  font-size: 1.125rem; font-weight: 600; color: var(--text);
}
.soon-lg { min-height: 3.75rem; padding-inline: 1.25rem 1.75rem; font-size: 1.375rem; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: clip; padding-block: clamp(1.5rem, 4vw, 3rem) 0; }
.hero-grid { display: grid; gap: 2rem; }
.hero-copy { container-type: inline-size; position: relative; z-index: 2; }
.hero h1 { font-size: clamp(2.6rem, 13.4cqi, 5.5rem); }
.hero h1 span { display: block; }
.hero .lead {
  max-width: 30rem; margin-top: 1.5rem;
  font-size: 1.375rem; line-height: 1.35; color: var(--text-secondary);
}
.hero .soon { margin-top: 2rem; }
.hero-note { margin-top: 0.75rem; }

.hero-stage { position: relative; height: clamp(30rem, 118vw, 36rem); }
.plate-xl { position: absolute; left: 50%; top: 0.5rem; width: 108%; translate: -50% 0; }
.hero-phone { position: absolute; left: 50%; top: 46%; width: min(58%, 15rem); translate: -50% 0; }
.hero-phone figcaption {
  position: absolute; left: 50%; bottom: 1rem; translate: -50% 0; z-index: 1;
  width: max-content; max-width: 90vw; padding: 0.35rem 0.75rem; border-radius: 999px;
  background: var(--card); color: var(--text-secondary);
}

@media (min-width: 60em) {
  .hero { padding-top: 2rem; }
  .hero-grid { grid-template-columns: minmax(0, 5.4fr) minmax(0, 6.6fr); align-items: center; gap: 1rem; }
  .hero-stage { height: min(46rem, calc(100svh - var(--nav-h) - 2rem)); min-height: 38rem; }
  .plate-xl { top: -2.5rem; width: 124%; }
  .hero-phone { top: 31%; width: min(52%, 21.5rem); }
}

/* ---------- Screens: the sticky stage ---------- */
.stage { padding-bottom: 0; }
.chapters { display: grid; gap: 0.25rem; align-content: start; max-width: 36rem; }
.chapter { position: relative; display: grid; grid-template-rows: auto 1fr; }
.chapter-btn {
  display: flex; align-items: center; gap: 1rem; width: 100%; min-height: 3.5rem;
  padding: 0.5rem 0.75rem; border: 0; border-radius: var(--r-tile);
  background: transparent; color: var(--text); text-align: left;
  font: 700 clamp(1.375rem, 2.6vw, 2rem)/1.1 var(--font); letter-spacing: -0.025em;
}
button.chapter-btn { cursor: pointer; }
.chapter-n {
  flex: none; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 999px;
  background: var(--btn); color: var(--on-accent);
  font-size: 0.9375rem; font-weight: 600; letter-spacing: 0;
}
.chapter { padding-bottom: 1rem; }
.chapter-p { padding: 0 0.75rem 0 3.75rem; color: var(--text-secondary); max-width: 30rem; min-height: 0; }

.pair-box { min-width: 0; }
.pair { display: grid; gap: 2rem; }
.phone { min-width: 0; }
.phone-screens {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(60vw, 14rem); gap: 1rem;
  overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 0.5rem;
}
.scr { scroll-snap-align: center; }
.scr img { width: 100%; height: auto; }
@media (min-width: 60em) {
  .stage-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 3rem; }
  .phone-screens { grid-auto-flow: row; grid-template-columns: repeat(5, minmax(0, 1fr)); overflow: visible; }
}

/* Enhanced stage: pinned, driven by scroll (app.js adds html.motion) */
html.motion .stage-track { height: calc(100svh + 4 * 85svh); }
html.motion .stage-pin { position: sticky; top: var(--nav-h); height: calc(100svh - var(--nav-h)); }
html.motion .stage-grid {
  display: grid; height: 100%; gap: 0.5rem;
  grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr);
}
html.motion .chapters { display: grid; align-self: start; padding-top: 0.5rem; max-width: none; }
html.motion .chapter { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity 0.4s var(--ease), visibility 0.4s; }
html.motion .chapter.is-active { opacity: 1; visibility: visible; }
html.motion .chapter-p { overflow: visible; }
html.motion .chapter::before { content: none; }

html.motion .pair-box { container-type: size; min-height: 0; align-self: stretch; display: grid; place-items: center; }
html.motion .pair { display: flex; justify-content: center; }
html.motion .phone-screens {
  --h: min(calc(100cqh - 2.5rem), calc((100cqw + 3.5rem) / 0.98));
  display: block; position: relative; overflow: hidden; padding: 0;
  height: var(--h); aspect-ratio: 780 / 1592;
}
html.motion .scr { position: absolute; inset: 0; }

@media (min-width: 60em) {
  html.motion .stage-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-rows: minmax(0, 1fr);
    align-items: center; gap: 3rem;
  }
  html.motion .phone-screens { --h: min(calc(100cqh - 2.5rem), calc((100cqw - 1.5rem) / 0.98)); }
  html.motion .chapters { align-self: center; padding-top: 0; max-width: 34rem; }
  html.motion .chapter { grid-area: auto; opacity: 1; visibility: visible; grid-template-rows: auto 0fr; padding-bottom: 0; transition: grid-template-rows 0.6s var(--ease), padding-bottom 0.6s var(--ease); }
  html.motion .chapter.is-active { grid-template-rows: auto 1fr; padding-bottom: 1.25rem; }
  html.motion .chapter-p { overflow: hidden; }
  html.motion .chapter-btn { color: var(--text-secondary); transition: color 0.4s var(--ease), transform 0.35s var(--ease); }
  html.motion .chapter.is-active .chapter-btn { color: var(--text); }
  html.motion .chapter:not(.is-active) .chapter-n { background: var(--fill); color: var(--text-secondary); }
  html.motion .chapter::before {
    content: ""; position: absolute; left: 0; top: 0.6rem; bottom: 0.6rem; width: 2px; border-radius: 1px;
    background: var(--separator);
  }
  html.motion .chapter::after {
    content: ""; position: absolute; left: 0; top: 0.6rem; bottom: 0.6rem; width: 2px; border-radius: 1px;
    background: var(--accent); transform-origin: top; scale: 1 var(--p, 0);
  }
}

/* ---------- How it works ---------- */
.how .head { margin-bottom: 2rem; }
.card { background: var(--card); border-radius: var(--r-card); }
.steps { counter-reset: step; overflow: hidden; }
.steps li {
  counter-increment: step;
  display: grid; grid-template-columns: auto 1fr; column-gap: 1.5rem; align-items: start;
  padding: 1.5rem;
}
.steps li + li { border-top: 1px solid var(--separator); }
.steps .plate { grid-row: 1 / span 3; }
.steps li::before {
  content: "Step " counter(step) / "";
  font-size: 0.8125rem; font-weight: 600; color: var(--text-secondary);
  grid-column: 2;
}
.steps h3 { grid-column: 2; margin-top: 0.25rem; }
.steps p { grid-column: 2; margin-top: 0.5rem; color: var(--text-secondary); }
@media (min-width: 48em) {
  .steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .steps li { display: block; padding: 2.5rem 2rem; }
  .steps li + li { border-top: 0; border-left: 1px solid var(--separator); }
  .steps .plate { width: 6.5rem; margin-bottom: 2rem; }
  .steps li::before { display: block; }
  .steps h3 { margin-top: 0.25rem; font-size: 1.625rem; }
}

/* ---------- Cost poster ---------- */
.poster {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; gap: 1.5rem;
  min-height: 38rem; padding: clamp(1.5rem, 5vw, 4rem) clamp(1.5rem, 5vw, 4rem) 0;
  border-radius: var(--r-poster);
  background: var(--btn); color: var(--on-accent);
}
.poster .poster-art { position: relative; height: 22rem; margin: 1rem calc(-1 * clamp(1.5rem, 5vw, 4rem)) 0; }
.poster .plate-poster { position: absolute; z-index: 0; left: 50%; top: -1rem; width: 25rem; translate: -50% 0; }
.poster .p-bar { display: none; }
.poster-copy p { margin-top: 1rem; font-size: 1.1875rem; line-height: 1.4; max-width: 30rem; }
.poster h2 { max-width: 12ch; }
.fig { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 1rem; }
.fig-n {
  font-size: clamp(4.5rem, 20vw, 9.5rem); font-weight: 700; line-height: 0.9; letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}
.fig-u { font-size: 1.375rem; font-weight: 600; }
.fig-meta { margin-top: 0.75rem; font-weight: 600; }
.macros { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.macros li { padding: 0.3rem 0.8rem; border-radius: 999px; background: rgb(0 0 0 / 0.22); font-size: 0.9375rem; }
.macros b { font-weight: 700; font-variant-numeric: tabular-nums; }
.caveat { max-width: 30rem; font-size: 0.8125rem; line-height: 1.4; }
.poster-phone { position: absolute; z-index: 1; left: 50%; top: 5.5rem; width: 13rem; translate: -50% 0; }
.poster-phone img { width: 100%; }

@media (min-width: 60em) {
  .poster { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-rows: auto auto 1fr; column-gap: 3rem; row-gap: 2rem; align-items: start; padding-bottom: 3rem; min-height: 40rem; }
  .poster-copy, .poster-fig { grid-column: 1; }
  .caveat { grid-column: 1; align-self: end; }
  .poster .poster-art { position: absolute; z-index: 0; top: 0; right: 0; bottom: 0; width: 42%; height: auto; margin: 0; }
  .poster .plate-poster { top: 4rem; width: 31rem; }
  .poster-phone { top: 15rem; width: 20rem; }
}

/* ---------- iPhone Duo ---------- */
.duo-rail { display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 1rem; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
.duo-row { display: contents; }
.duo-fig { flex: 0 0 88%; scroll-snap-align: center; }
.duo-fig.duo-portrait { flex-basis: 64%; }
.duo-fig img { width: 100%; height: auto; }
.duo-fig figcaption { margin-top: 0.75rem; text-align: center; }
@media (min-width: 48em) {
  .duo-rail { display: grid; gap: 3rem 2rem; overflow: visible; margin-inline: 0; padding: 0; scroll-snap-type: none; }
  .duo-row { display: grid; gap: 2rem; align-items: start; }
  .duo-row-1 { grid-template-columns: 1.376fr 0.727fr; }
  .duo-row-2 { grid-template-columns: 1fr 1fr; }
}

/* ---------- Features: bento ---------- */
.features .head { margin-bottom: 2rem; }
.bento { display: grid; gap: 1rem; }
.tile {
  display: flex; flex-direction: column; gap: 0.5rem;
  padding: 1.5rem; border-radius: var(--r-card); background: var(--card);
}
.tile p { color: var(--text-secondary); }
.tile .tag {
  align-self: flex-start; margin-top: auto; padding: 0.2rem 0.65rem; border-radius: 999px;
  background: var(--fill); color: var(--text); font-size: 0.8125rem; font-weight: 600;
}
.tile h3 + p + .tag { margin-top: 0.75rem; }
.tile.has-shot { padding-bottom: 0; overflow: hidden; }
.shot { height: 12rem; margin-top: 1.25rem; display: flex; justify-content: center; align-items: flex-start; overflow: hidden; }
.shot img { width: 12.5rem; max-width: none; height: auto; }
.stack { margin-top: auto; padding-top: 2rem; }
.stack li {
  padding-block: 0.4rem; border-top: 1px solid var(--separator);
  font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; line-height: 1.05; letter-spacing: -0.035em;
}
.stack li:last-child { color: var(--accent); }
.nest {
  margin-top: auto; padding: 1rem 1rem 1.25rem; border: 1.5px solid var(--separator); border-radius: var(--r-card);
  font-weight: 600;
}
.nest > span { display: block; margin-bottom: 0.75rem; font-size: 0.8125rem; color: var(--text-secondary); font-weight: 400; }
.nest-in {
  display: grid; gap: 0.15rem; padding: 0.9rem 1rem; border-radius: var(--r-tile);
  background: color-mix(in srgb, var(--accent) 12%, var(--card)); box-shadow: inset 0 0 0 1.5px var(--accent);
}
.nest-in span { font-size: 1.125rem; color: var(--text); }
.nest-in small { font-size: 0.8125rem; font-weight: 400; color: var(--text-secondary); }
@media (min-width: 40em) { .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); } .t-macros, .t-nest { grid-column: 1 / -1; } }
@media (min-width: 64em) {
  .stack li { font-size: clamp(3rem, 5.4vw, 4.5rem); }
  .bento { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .tile { padding: 2rem; min-height: 12rem; }
  .tile h3 { font-size: 1.5rem; }
  .t-macros { grid-column: 1 / 6; grid-row: 1 / 3; }
  .t-nest { grid-column: 6 / 13; }
  .t-list { grid-column: 6 / 9; }
  .t-lib { grid-column: 9 / 13; }
  .t-price { grid-column: 1 / 7; }
  .t-cat { grid-column: 7 / 13; }
  .t-share { grid-column: 1 / 5; }
  .t-sync { grid-column: 5 / 9; }
  .t-native { grid-column: 9 / 13; }
}

/* ---------- Privacy: a Settings list ---------- */
.privacy-grid { display: grid; gap: 2rem; align-items: start; }
.privacy-head p { margin-top: 1rem; color: var(--text-secondary); font-size: 1.1875rem; }
.settings { background: var(--card); border-radius: var(--r-card); overflow: hidden; }
.settings li { display: flex; align-items: center; gap: 1rem; min-height: 4.75rem; padding: 1rem 1.25rem; position: relative; }
.settings li + li::before { content: ""; position: absolute; top: 0; left: 4.5rem; right: 0; height: 1px; background: var(--separator); }
.glyph { flex: none; display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 0.65rem; background: var(--btn); }
.glyph svg { width: 1.5rem; height: 1.5rem; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (min-width: 60em) {
  .privacy-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 4rem; align-items: center; }
  .settings li { min-height: 5.5rem; padding-inline: 1.75rem; }
  .settings li + li::before { left: 5.25rem; }
  .settings p { font-size: 1.1875rem; }
}

/* ---------- Pricing ---------- */
.pricing .head { margin-bottom: 2rem; }
.plans { display: grid; gap: 1rem; align-items: stretch; }
.plan { padding: 1.75rem; }
.plan h3 { font-size: 1.75rem; letter-spacing: -0.02em; }
.plan-premium {
  background: color-mix(in srgb, var(--accent) 8%, var(--card));
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 65%, transparent);
}
.trial {
  display: inline-block; margin-top: 0.75rem; padding: 0.3rem 0.85rem; border-radius: 999px;
  background: var(--btn); color: var(--on-accent); font-weight: 600; font-size: 0.9375rem;
}
.price { margin-top: 0.75rem; color: var(--text-secondary); }
.lead-in { margin-top: 1.5rem; font-weight: 600; }
.ticks { margin-top: 1.25rem; }
.lead-in + .ticks { margin-top: 0.5rem; }
.ticks li { display: flex; align-items: baseline; gap: 0.75rem; flex-wrap: wrap; padding-block: 0.65rem; border-top: 1px solid var(--separator); }
.ticks li::before {
  content: ""; flex: none; width: 0.85rem; height: 0.45rem;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  rotate: -45deg; translate: 0 -0.15rem;
}
.pill {
  padding: 0.1rem 0.55rem; border-radius: 999px; background: var(--fill);
  color: var(--text-secondary); font-size: 0.75rem; font-weight: 600; white-space: nowrap;
}
.price-note { margin-top: 1.5rem; text-align: center; max-width: 40rem; margin-inline: auto; }
@media (min-width: 48em) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } .plan { padding: 2.25rem; } }

/* ---------- FAQ ---------- */
.faq-grid { display: grid; gap: 1.5rem; align-items: start; }
.faq details { border-top: 1px solid var(--separator); }
.faq details:last-child { border-bottom: 1px solid var(--separator); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 3.75rem; padding: 0.5rem 0.75rem;
  font-weight: 600; font-size: 1.125rem; cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 0.5rem; height: 0.5rem;
  border-right: 2px solid var(--text-secondary); border-bottom: 2px solid var(--text-secondary);
  rotate: 45deg; translate: 0 -0.1rem; transition: rotate 0.4s var(--ease);
}
.faq details[open] summary::after { rotate: -135deg; translate: 0 0.1rem; }
.faq details p { padding: 0 0.75rem 1.5rem; color: var(--text-secondary); max-width: 42rem; }
@media (prefers-reduced-motion: no-preference) {
  .faq details::details-content { block-size: 0; overflow: clip; transition: block-size 0.45s var(--ease), content-visibility 0.45s allow-discrete; }
  .faq details[open]::details-content { block-size: auto; }
}
@media (min-width: 60em) {
  .faq-grid { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 4rem; }
  .faq-head { position: sticky; top: calc(var(--nav-h) + 2rem); }
}

/* ---------- Closing call to action ---------- */
.cta { text-align: center; padding-block: calc(var(--section) / 4) calc(var(--section) / 2); }
.plate-cta { width: min(17rem, 56vw); margin: 0 auto 2rem; }
.cta .soon { margin-top: 2rem; }

/* ---------- Footer ---------- */
.foot { margin-top: calc(var(--section) / 2); padding-block: 3rem; border-top: 1px solid var(--separator); }
.foot-links { display: flex; flex-wrap: wrap; gap: 0 1.5rem; margin-top: 1rem; }
.foot-links a {
  display: inline-flex; align-items: center; min-height: 3rem;
  color: var(--text-secondary); text-decoration: none;
}
.foot-links a:hover { color: var(--text); text-decoration: underline; }
.foot .small { margin-top: 0.5rem; }
.foot .small:first-of-type { margin-top: 1.5rem; }

/* ---------- Legal pages and 404 ---------- */
.legal-page { padding-block: calc(var(--section) / 2 + 1rem) calc(var(--section) / 2); }
.legal-page .wrap { width: min(calc(100% - 2 * var(--gutter)), 40rem); }
.legal h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.1; letter-spacing: -0.03em; }
.legal .effective { margin-top: 1rem; }
.legal-body { margin-top: 3rem; }
.legal-body h2 { margin: 3rem 0 1rem; font-size: 1.375rem; line-height: 1.25; letter-spacing: -0.01em; font-weight: 600; }
.legal-body p, .legal-body ul { margin: 0 0 1rem; }
.legal-body ul { padding-left: 1.5rem; list-style: disc; }
.legal-body li { margin-bottom: 0.5rem; }
.foot-links a[aria-current="page"] { color: var(--text); font-weight: 600; }

.notfound { overflow: clip; padding-block: clamp(2rem, 6vw, 5rem) 2rem; }
.notfound-grid { display: grid; gap: 2rem; align-items: center; }
.notfound-copy .lead { margin-top: 1rem; font-size: 1.375rem; color: var(--text-secondary); }
.notfound-copy p:last-child { margin-top: 2rem; }
.notfound-art { height: 20rem; position: relative; }
.notfound-art .plate-xl { top: 0; width: 20rem; }
.btn {
  --rise-bg: rgb(0 0 0 / 0.22);
  display: inline-flex; align-items: center; min-height: 3.25rem; padding-inline: 1.5rem;
  border-radius: 999px; background: var(--btn); color: var(--on-accent);
  font-weight: 600; text-decoration: none;
}
.btn:hover { text-decoration: none; }
@media (min-width: 48em) {
  .notfound-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 28rem; }
  .notfound-art { height: 30rem; }
  .notfound-art .plate-xl { width: 24rem; }
}

/* ---------- Motion: reveals and the Duo hinge (only when app.js turns them on) ---------- */
html.reveal-on [data-reveal] {
  opacity: 0; translate: 0 0.875rem;
  transition: opacity 0.7s var(--ease), translate 0.9s var(--ease);
  transition-delay: var(--d, 0s);
}
html.reveal-on [data-reveal].in { opacity: 1; translate: 0 0; }

html.reveal-on [data-unfold] picture { clip-path: inset(0 50% 0 50%); transition: clip-path 1.2s var(--ease); }
html.reveal-on [data-unfold="y"] picture { clip-path: inset(50% 0 50% 0); }
html.reveal-on [data-unfold].in picture { clip-path: inset(0 0 0 0); }

/* ---------- Page navigation: the next page fills up from the bottom ---------- */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  .nav { view-transition-name: nav; }
  ::view-transition-old(root) { animation: vt-out 0.6s var(--ease) both; }
  ::view-transition-new(root) { animation: vt-fill 0.9s var(--ease) both; }
  ::view-transition-group(nav) { animation-duration: 0s; }
  @keyframes vt-out { to { opacity: 0.5; } }
  @keyframes vt-fill {
    from { clip-path: polygon(0% 112%, 10% 112%, 20% 112%, 30% 112%, 40% 112%, 50% 112%, 60% 112%, 70% 112%, 80% 112%, 90% 112%, 100% 112%, 100% 130%, 0% 130%); }
    55% { clip-path: polygon(0% 58%, 10% 52%, 20% 46%, 30% 50%, 40% 57%, 50% 60%, 60% 55%, 70% 48%, 80% 47%, 90% 53%, 100% 58%, 100% 130%, 0% 130%); }
    to { clip-path: polygon(0% -12%, 10% -12%, 20% -12%, 30% -12%, 40% -12%, 50% -12%, 60% -12%, 70% -12%, 80% -12%, 90% -12%, 100% -12%, 100% 130%, 0% 130%); }
  }
}
