/* ==========================================================================
   Haven V5 — "Light Left On"
   One fictional family Tuesday, from morning paper light to a lit window.
   Static CSS, no dependencies. Display face: Fraunces 600 (self-hosted, OFL).
   ========================================================================== */

@font-face {
  font-family: "Fraunces";
  src: url("assets/fonts/fraunces-latin-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces Fallback";
  src: local("Georgia");
  size-adjust: 104%;
  ascent-override: 94%;
  descent-override: 24%;
  line-gap-override: 0%;
}

@property --p {
  syntax: "<number>";
  inherits: true;
  initial-value: 1;
}

:root {
  /* Daylight neutrals (shared with the Haven app palette) */
  --paper: #FBF7F1;
  --surface: #FFFFFF;
  --surface-2: #F3ECE3;
  --surface-3: #EBE1D4;
  --ink: #1E1713;
  --ink-2: #5E534A;
  --ink-3: #6B6158;
  --accent-ink: #8A5A2B;
  --accent: #C2692A;
  --focus: #1D5FA6;

  /* Light through the day (backgrounds only) */
  --morning: #F3EADD;
  --window-light: #FFF8EE;
  --sun-wash: #FBE6C8;
  --sun: #E9A23B;
  --afternoon: #F7F4EE;
  --golden: #F4E4CE;
  --golden-deep: #E9D2B4;
  --ink-2-golden: #54483F;

  /* Evening and night */
  --evening: #16110E;
  --evening-surface: #1F1814;
  --evening-surface-2: #29201B;
  --night: #0F0C0A;
  --ink-e: #F5E7D3;
  --ink-e2: #B9A99B;
  --ink-e3: #9C8E81;
  --lamp: #F0A35A;
  --focus-e: #8FC3F0;
  --lit-card: #FBF3E6;

  /* Semantic (product UI) */
  --attention-ink: #7A4E12;
  --attention-bg: #FBEBD0;
  --trust-ink: #2F6B3F;
  --trust-bg: #E6F2E8;

  /* Type */
  --font-display: "Fraunces", "Fraunces Fallback", Georgia, "Times New Roman", serif;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  /* Motion */
  --dur-micro: 120ms;
  --dur-exit: 200ms;
  --dur-enter: 240ms;
  --dur-reveal: 640ms;
  --dur-settle: 1100ms;
  --ease-enter: cubic-bezier(.2, 0, 0, 1);
  --ease-exit: cubic-bezier(.4, 0, 1, 1);
  --ease-settle: cubic-bezier(.16, 1, .3, 1);
  --ease-light: cubic-bezier(.33, 0, .15, 1);

  /* Layout */
  --header-h: 64px;
  --gutter: 32px;
  --maxw: 1200px;
}

/* Section tones -------------------------------------------------------- */
.tone-morning, .tone-afternoon, .tone-golden {
  --fg: var(--ink);
  --fg-2: var(--ink-2);
  --fg-3: var(--ink-3);
  --line: rgba(30, 23, 19, .12);
  --line-strong: rgba(30, 23, 19, .2);
  --link: var(--accent-ink);
  --focus-ring: var(--focus);
  --btn-bg: var(--ink);
  --btn-fg: var(--paper);
  --btn-line: rgba(30, 23, 19, .22);
  --dot: var(--sun);
  color: var(--fg);
}
.tone-golden { --fg-2: var(--ink-2-golden); --fg-3: var(--ink-2-golden); --link: var(--ink); }
.tone-evening, .tone-night {
  --fg: var(--ink-e);
  --fg-2: var(--ink-e2);
  --fg-3: var(--ink-e3);
  --line: rgba(255, 255, 255, .1);
  --line-strong: rgba(255, 255, 255, .18);
  --link: var(--lamp);
  --focus-ring: var(--focus-e);
  --btn-bg: var(--lamp);
  --btn-fg: var(--ink);
  --btn-line: rgba(245, 231, 211, .26);
  --dot: var(--lamp);
  color: var(--fg);
}

/* Base ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--morning);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, video, iframe { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
p, h1, h2, h3, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
::selection { background: #F6D9B8; color: var(--ink); }

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

.container {
  width: min(var(--maxw), 100% - 2 * var(--gutter));
  margin-inline: auto;
}
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 1.15em;
  height: 1.15em;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 300;
  transform: translateY(-180%);
  border-radius: 999px;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }

/* Type ------------------------------------------------------------------ */
h1, h2, .display {
  font-family: var(--font-display);
  font-weight: 600;
  font-synthesis: none;
  color: var(--fg, var(--ink));
}
h2 {
  max-width: 17ch;
  font-size: clamp(2.15rem, 1.3rem + 3.1vw, 3.9rem);
  line-height: 1.04;
  letter-spacing: -.018em;
  text-wrap: balance;
}
h3 {
  text-wrap: balance;
  font-size: clamp(1.15rem, 1.02rem + .5vw, 1.45rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.011em;
}
.lead {
  max-width: 40ch;
  color: var(--fg-2);
  font-size: clamp(1.1rem, 1rem + .45vw, 1.35rem);
  line-height: 1.52;
  text-wrap: pretty;
}
.body {
  max-width: 58ch;
  color: var(--fg-2);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-wrap: pretty;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  color: var(--fg-2);
  font-family: var(--font-mono);
  font-size: .8125rem;
  line-height: 1.4;
  letter-spacing: .01em;
  font-variant-numeric: tabular-nums;
}
.caption {
  color: var(--fg-3);
  font-family: var(--font-mono);
  font-size: .75rem;
  line-height: 1.5;
  letter-spacing: .005em;
}
.dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--dot, var(--sun));
}
.dot-sun { background: var(--sun); box-shadow: 0 0 0 4px rgba(233, 162, 59, .16); }
.dot-lamp { background: var(--lamp); box-shadow: 0 0 0 4px rgba(240, 163, 90, .16); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  padding: 6px 0;
  background: none;
  color: var(--link, var(--accent-ink));
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.text-link:hover { text-decoration-thickness: 2px; }

/* Buttons --------------------------------------------------------------- */
.button {
  position: relative;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 22px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
  transition: transform var(--dur-micro) var(--ease-enter), background-color var(--dur-enter) ease, border-color var(--dur-enter) ease, color var(--dur-enter) ease;
}
.button-primary { background: var(--btn-bg, var(--ink)); color: var(--btn-fg, var(--paper)); }
.button-secondary { border-color: var(--btn-line, rgba(30, 23, 19, .22)); background: transparent; color: var(--fg, var(--ink)); }
.button-small { min-height: 40px; padding: 0 16px; font-size: .925rem; }
.button-block { width: 100%; }
.button .icon { width: 1.05em; height: 1.05em; transition: transform var(--dur-enter) var(--ease-enter); }
@media (hover: hover) and (pointer: fine) {
  .button:hover { transform: translateY(-1px); }
  .button-primary:hover { box-shadow: 0 10px 22px -12px rgba(30, 23, 19, .55); }
  .button-secondary:hover { border-color: var(--fg, var(--ink)); }
  .button:hover .icon { transform: translateX(2px); }
}
.button:active { transform: translateY(0) scale(.98); }
.button:disabled { opacity: .42; cursor: not-allowed; transform: none; }

/* Brand mark ------------------------------------------------------------ */
.brand {
  justify-self: start;
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: .38em;
  color: inherit;
  font-size: 1.42rem; /* the lockup scales as one unit */
  text-decoration: none;
}
.brand-word {
  font-family: var(--font-display);
  font-size: 1em;
  font-weight: 600;
  letter-spacing: -.012em;
  line-height: 1;
}
/* HeyABRI lockup (logo notes): mark height ≈ cap height ÷ 0.62, its flat base on the word's baseline. */
.brand > .mark { width: 1.13em; height: 1.13em; transform: translateY(-.22em); }
.mark {
  position: relative;
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}
.mark::before {
  position: absolute;
  inset: -40%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 62%, rgba(240, 163, 90, .5), rgba(240, 163, 90, 0) 58%);
  content: "";
  opacity: 0;
  transform: scale(.6);
  transition: opacity 600ms var(--ease-settle), transform 900ms var(--ease-settle);
}
.mark svg { position: relative; width: 100%; height: 100%; overflow: visible; }
/* The HeyABRI symbol (house, sun, hills, road) is one <symbol id="abri-mark"> coloured per ground through
   custom properties, following the logo notes: full colour with a forest roof on light grounds, a cream
   roof on dark grounds, and one fill with the road knocked out at small sizes (app screens, the memory
   card) and in forced colours. The lamp glow behind the mark still lights at dusk. */
.mark, .app-mark, .mark-mini { --mk-roof: #1E2F29; --mk-sun: #E5B76C; --mk-hill-l: #89A790; --mk-hill-r: #6E8597; --mk-road: #E5B76C; }
.tone-evening .mark, .tone-night .mark,
.site-header[data-tone="dusk"] .mark, .site-header[data-tone="evening"] .mark, .site-header[data-tone="night"] .mark { --mk-roof: #FAF7F0; }
.waitlist-card .mark { --mk-roof: #1E2F29; } /* the lit card is cream */
.app-mark, .mark-mini { --mk-roof: currentColor; --mk-sun: currentColor; --mk-hill-l: currentColor; --mk-hill-r: currentColor; --mk-road: transparent; }
.mark-lit::before, html.is-lit .site-header .mark::before { opacity: 1; transform: scale(1); }

/* Header ---------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  color: var(--ink);
  background: rgba(243, 234, 221, .94);
  transition: background-color 360ms ease, color 360ms ease, transform var(--dur-exit) var(--ease-exit);
  --focus-ring: var(--focus);
  --btn-bg: var(--ink);
  --btn-fg: var(--paper);
}
.site-header[data-tone="afternoon"] { background: rgba(247, 244, 238, .94); }
.site-header[data-tone="golden"] { background: rgba(244, 228, 206, .95); }
.site-header[data-tone="dusk"],
.site-header[data-tone="evening"] { background: rgba(22, 17, 14, .94); color: var(--ink-e); --focus-ring: var(--focus-e); --btn-bg: var(--lamp); --btn-fg: var(--ink); }
.site-header[data-tone="night"] { background: rgba(15, 12, 10, .95); color: var(--ink-e); --focus-ring: var(--focus-e); --btn-bg: var(--lamp); --btn-fg: var(--ink); }
.nav-shell {
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
.desktop-nav { display: flex; align-items: center; gap: 30px; }
.desktop-nav a {
  position: relative;
  padding: 8px 0;
  color: inherit;
  font-size: .95rem;
  font-weight: 500;
  text-decoration: none;
  opacity: .72;
  transition: opacity var(--dur-enter) ease;
}
.desktop-nav a::after {
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-enter) var(--ease-enter);
}
.desktop-nav a:hover, .desktop-nav a.is-active { opacity: 1; }
.desktop-nav a.is-active::after, .desktop-nav a:hover::after { transform: scaleX(1); }
.nav-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.menu-button {
  width: 44px;
  height: 44px;
  display: none;
  place-items: center;
  border: 1px solid currentColor;
  border-color: color-mix(in srgb, currentColor 22%, transparent);
  border-radius: 50%;
  background: transparent;
}
.menu-button .icon { width: 20px; height: 20px; }

.day-rail {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  pointer-events: none;
}
.day-rail-track {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, currentColor 0 1px, transparent 1px 12.5%) 0 0 / 100% 100%,
    currentColor;
  opacity: .14;
}
.day-rail-dot {
  position: absolute;
  top: -3px;
  left: 0;
  width: 7px;
  height: 7px;
  transform: translateX(var(--rail-x, 0px));
  will-change: transform;
}
.day-rail-dot i {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  transition: opacity 600ms ease;
}
.day-rail-dot .sun { background: var(--sun); box-shadow: 0 0 0 3px rgba(233, 162, 59, .2); }
.day-rail-dot .lamp { background: var(--lamp); box-shadow: 0 0 10px 2px rgba(240, 163, 90, .5); opacity: 0; }
html.is-lit .day-rail-dot .sun { opacity: 0; }
html.is-lit .day-rail-dot .lamp { opacity: 1; }

/* Mobile menu sheet ----------------------------------------------------- */
.menu-sheet {
  width: min(560px, 100% - 24px);
  max-height: calc(100svh - 24px);
  margin: auto auto 12px;
  border: 1px solid rgba(30, 23, 19, .1);
  border-radius: 28px;
  padding: 18px 20px 20px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 30px 80px -20px rgba(30, 23, 19, .45);
  --focus-ring: var(--focus);
  --btn-bg: var(--ink);
  --btn-fg: var(--paper);
  --fg-2: var(--ink-2);
}
.menu-sheet::backdrop { background: rgba(22, 17, 14, .42); }
.menu-sheet[open] { animation: sheetIn var(--dur-enter) var(--ease-enter); }
@keyframes sheetIn { from { opacity: 0; transform: translateY(24px); } }
.menu-sheet-head { display: flex; align-items: center; justify-content: space-between; }
.menu-sheet-head .eyebrow { margin: 0; }
.menu-close {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--surface-2);
}
.menu-list { margin: 10px 0 18px; }
.menu-list a {
  min-height: 56px;
  display: grid;
  grid-template-columns: 76px 1fr;
  align-items: center;
  border-bottom: 1px solid rgba(30, 23, 19, .1);
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration: none;
}
.menu-list .time { color: var(--ink-3); font-family: var(--font-mono); font-size: .8rem; font-weight: 400; }

/* Device (HTML/CSS iPhone) --------------------------------------------- */
.device {
  --device-w: 340px;
  position: relative;
  width: var(--device-w);
  max-width: 100%;
  container-type: inline-size;
}
.device[data-theme="day"] {
  --app-bg: #FBF7F1;
  --app-surface: #FFFFFF;
  --app-surface-2: #F3ECE3;
  --app-ink: #1E1713;
  --app-ink-2: #5E534A;
  --app-ink-3: #6B6158;
  --app-line: rgba(30, 23, 19, .1);
  --app-strong: #1E1713;
  --app-strong-fg: #FBF7F1;
}
.device[data-theme="evening"] {
  --app-bg: #120F0D;
  --app-surface: #1A1411;
  --app-surface-2: #211B17;
  --app-ink: #F5E7D3;
  --app-ink-2: #B9A99B;
  --app-ink-3: #8F8780;
  --app-line: rgba(255, 255, 255, .1);
  --app-strong: #F0A35A;
  --app-strong-fg: #1E1713;
}
.device-frame {
  position: relative;
  aspect-ratio: 390 / 844;
  border-radius: 15.5cqi;
  padding: 3cqi;
  background: linear-gradient(150deg, #3a322c 0%, #15110f 22%, #0b0908 60%, #241e1a 100%);
  box-shadow:
    inset 0 0 0 1.2px rgba(255, 255, 255, .14),
    inset 0 0 0 .9cqi #050403,
    0 2px 3px rgba(30, 23, 19, .2),
    var(--device-shadow, 22px 40px 60px -26px rgba(52, 34, 18, .46));
}
.device-frame::after {
  position: absolute;
  inset: 3cqi;
  z-index: 20;
  border-radius: 12.6cqi;
  background: linear-gradient(118deg, rgba(255, 255, 255, .09) 0%, rgba(255, 255, 255, 0) 34%);
  content: "";
  pointer-events: none;
}
.device-screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 12.6cqi;
  background: var(--app-bg);
  color: var(--app-ink);
  font-family: var(--font-sans);
  font-size: 13px;
  font-size: 3.9cqi;
  line-height: 1.35;
  letter-spacing: -.003em;
}
.device-screen .icon { width: 1.25em; height: 1.25em; stroke-width: 2; }
.island {
  position: absolute;
  top: 2.6%;
  left: 50%;
  z-index: 12;
  width: 31%;
  height: 3.55%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .3em;
  border-radius: 999px;
  padding: 0 .75em;
  background: #000;
  transform: translateX(-50%);
  transition: width var(--dur-enter) var(--ease-enter);
}
.island-dot {
  width: .55em;
  height: .55em;
  border-radius: 50%;
  background: var(--lamp);
  opacity: 0;
  transition: opacity var(--dur-enter) ease;
}
.island-wave { display: none; align-items: center; gap: .14em; height: 1em; }
.island-wave i {
  width: .16em;
  height: 100%;
  border-radius: 1em;
  background: var(--lamp);
  transform: scaleY(.3);
}
.status-bar {
  position: absolute;
  top: 2.6%;
  right: 0;
  left: 0;
  z-index: 11;
  height: 3.55%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 7.5% 0 10.5%;
  font-size: 1.02em;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.status-icons { width: 5em; height: .9em; color: currentColor; }
.screen {
  position: absolute;
  top: 8.4%;
  right: 0;
  bottom: 9.6%;
  left: 0;
  display: flex;
  flex-direction: column;
  gap: .62em;
  padding: 0 5.6%;
  overflow: hidden;
}
.tabbar {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 8;
  height: 9.6%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: .55em 2% 0;
  border-top: 1px solid var(--app-line);
  background: var(--app-bg);
}
.tabbar span {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: .2em;
  color: var(--app-ink-3);
  font-size: .7em;
  font-weight: 600;
  transition: color var(--dur-enter) ease;
}
.tabbar .icon { width: 1.9em; height: 1.9em; stroke-width: 1.8; }
.tabbar .is-on { color: var(--app-ink); }
.device[data-theme="evening"] .tabbar .is-on { color: var(--lamp); }
.home-indicator {
  position: absolute;
  bottom: 1.1%;
  left: 50%;
  z-index: 9;
  width: 35%;
  height: .38em;
  border-radius: 999px;
  background: var(--app-ink);
  transform: translateX(-50%);
}

/* App UI primitives (inside devices) ------------------------------------ */
.app-top { display: flex; align-items: center; justify-content: space-between; padding-top: .35em; }
.app-title { display: inline-flex; align-items: center; gap: .45em; font-size: 1.42em; font-weight: 700; letter-spacing: -.015em; }
.app-mark { width: 1.2em; height: 1.17em; flex: 0 0 auto; display: inline-block; overflow: visible; }
.app-meta { color: var(--app-ink-3); font-family: var(--font-mono); font-size: .8em; }
.app-greeting { margin-top: -.25em; font-size: 1.62em; font-weight: 700; letter-spacing: -.022em; line-height: 1.15; }
.app-summary { color: var(--app-ink-2); font-size: .95em; line-height: 1.4; }
.app-card {
  border-radius: 1.15em;
  padding: .55em .85em .3em;
  background: var(--app-surface);
  box-shadow: 0 0 0 1px var(--app-line), 0 .5em 1.2em -.9em rgba(30, 23, 19, .35);
}
.app-card-title { padding: .15em 0 .2em; color: var(--app-ink-2); font-size: .8em; font-weight: 600; }
.app-card-attention { background: var(--attention-bg); box-shadow: 0 0 0 1px rgba(122, 78, 18, .22); color: #1E1713; }
.app-card-attention .app-card-title { color: var(--attention-ink); }
.app-card-attention .row-main small { color: var(--attention-ink); }
.app-card-quiet { background: var(--app-surface-2); box-shadow: none; }
.app-row {
  display: flex;
  align-items: center;
  gap: .6em;
  border-top: 1px solid var(--app-line);
  padding: .5em 0;
}
.app-card-title + .app-row, .app-card > .app-row:first-child { border-top: 0; }
.app-card-attention .app-row { border-top: 0; }
.row-main { flex: 1; min-width: 0; font-size: .95em; font-weight: 600; line-height: 1.25; }
.row-main small { display: block; margin-top: .12em; color: var(--app-ink-3); font-size: .8em; font-weight: 500; }
.row-main .state { margin-left: .3em; vertical-align: .08em; }
.row-time { color: var(--app-ink-2); font-family: var(--font-mono); font-size: .78em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.app-row.dim { opacity: .8; border-top: 0; padding: .3em .2em; }
.app-pill {
  border-radius: 999px;
  padding: .38em .85em;
  background: #1E1713;
  color: #FBF7F1;
  font-size: .78em;
  font-weight: 700;
}
.app-ask {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  margin-bottom: .55em;
  border-radius: 999px;
  padding: .72em 1em;
  background: var(--app-surface);
  box-shadow: 0 0 0 1px var(--app-line);
  color: var(--app-ink-3);
  font-size: .92em;
}
.app-chip {
  align-self: flex-start;
  border: 1px solid var(--app-line);
  border-radius: 999px;
  padding: .42em .85em;
  background: var(--app-surface);
  font-size: .8em;
  font-weight: 600;
}
.app-btn {
  display: grid;
  place-items: center;
  border-radius: .85em;
  padding: .62em .6em;
  background: var(--app-surface-2);
  font-size: .86em;
  font-weight: 700;
}
.app-btn-primary { background: var(--app-strong); color: var(--app-strong-fg); }
.app-btn-block { width: 100%; }
.app-closing { margin-top: auto; margin-bottom: .6em; color: var(--app-ink-2); font-size: .95em; font-weight: 600; text-align: center; }

.avatar {
  --fill: #EEE2CE;
  --edge: #7E6A57;
  width: 2.05em;
  height: 2.05em;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--fill);
  box-shadow: inset 0 0 0 1.5px var(--edge);
  color: #1E1713;
  font-size: .82em;
  font-weight: 700;
  line-height: 1;
}
.avatar.sm { width: 2.1em; height: 2.1em; font-size: .78em; }
.avatar.xs { width: 1.8em; height: 1.8em; font-size: .68em; }
.avatar .icon { width: 1.1em; height: 1.1em; stroke-width: 2; }
.m-maya { --fill: #E6DCF7; --edge: #8662C9; }
.m-daniel { --fill: #F3D6EC; --edge: #B24A9E; }
.m-emma { --fill: #F8DCC4; --edge: #C8661F; }
.m-noah { --fill: #CDEBE8; --edge: #16827D; }
.m-house { --fill: #EEE2CE; --edge: #7E6A57; }

/* Memory states (line style = trust state) */
.state {
  display: inline-flex;
  align-items: center;
  gap: .3em;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: .22em .62em;
  font-size: .74em;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}
.state .icon { width: 1.05em; height: 1.05em; stroke-width: 2.4; }
.state-approved { border-color: rgba(47, 107, 63, .4); background: var(--trust-bg); color: var(--trust-ink); }
.state-waiting { border: 1px dotted var(--attention-ink); background: var(--attention-bg); color: var(--attention-ink); }
.state-suggested { border: 1px dashed currentColor; background: transparent; color: var(--ink-2); }
.state-uncertain { border: 1px solid currentColor; background: transparent; color: var(--ink-2); }
.state-uncertain::before { content: "?"; font-weight: 800; }

.bubble {
  max-width: 88%;
  border-radius: 1.15em;
  padding: .62em .85em;
  font-size: .92em;
  line-height: 1.38;
}
.bubble-user { align-self: flex-end; border-bottom-right-radius: .35em; background: var(--app-strong); color: var(--app-strong-fg); }
.bubble-haven { align-self: flex-start; border-bottom-left-radius: .35em; background: var(--app-surface); box-shadow: 0 0 0 1px var(--app-line); }
.bubble-who { display: block; margin-bottom: .15em; font-family: var(--font-mono); font-size: .76em; opacity: .7; }
.bubble-answer { font-weight: 600; }

.mem-card {
  position: relative;
  border-radius: 1.05em;
  padding: .72em .85em .8em;
  background: var(--app-surface);
}
.mem-card::before, .mem-card::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  content: "";
  pointer-events: none;
  transition: opacity var(--dur-enter) ease;
}
.mem-card::before { border: 1.5px dashed var(--app-ink-3); }
.mem-card::after { border: 1.5px solid var(--trust-ink); opacity: 0; }
.mem-card.is-approved::before { opacity: 0; }
.mem-card.is-approved::after { opacity: 1; }
.mem-kicker { color: var(--app-ink-3); font-family: var(--font-mono); font-size: .74em; }
.mem-kicker.attention { color: var(--attention-ink); font-weight: 600; }
.mem-title { margin: .2em 0 .5em; font-size: 1em; font-weight: 700; line-height: 1.25; }
.mem-rows { display: grid; gap: .32em; }
.mem-rows > div { display: grid; grid-template-columns: 4.9em 1fr; align-items: center; gap: .4em; }
.mem-rows dt { color: var(--app-ink-3); font-family: var(--font-mono); font-size: .72em; }
.mem-rows dd { display: flex; flex-wrap: wrap; align-items: center; gap: .3em; font-size: .82em; font-weight: 500; }

.decision-stack { display: grid; margin-top: .75em; }
.decision-stack > * { grid-area: 1 / 1; transition: opacity var(--dur-enter) ease, transform var(--dur-enter) var(--ease-enter); }
.decision-actions { display: grid; grid-template-columns: 1.4fr 1fr; gap: .45em; }
.decision-later { display: flex; justify-content: space-between; margin-top: 1.1em; color: var(--app-ink-2); font-size: .8em; font-weight: 600; }
.decision-pending { display: block; }
.decision-done { display: grid; align-content: start; gap: .35em; opacity: 0; transform: translateY(.4em); }
.decision-done p { color: var(--app-ink-2); font-size: .82em; }
.decision-done .state { justify-self: start; font-size: .8em; }
.mem-card.is-approved .decision-pending { opacity: 0; transform: translateY(-.3em); }
.mem-card.is-approved .decision-done { opacity: 1; transform: none; }
.approve-btn { transition: transform var(--dur-micro) var(--ease-enter); }
.approve-btn.is-pressed { transform: scale(.96); }

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-radius: 999px;
  padding: .22em;
  background: var(--app-surface-2);
  font-size: .78em;
  font-weight: 600;
  text-align: center;
}
.segmented span { border-radius: 999px; padding: .42em 0; color: var(--app-ink-2); }
.segmented .is-on { background: var(--app-surface); color: var(--app-ink); box-shadow: 0 1px 3px rgba(30, 23, 19, .15); }

.receipt-mini {
  border-radius: 1.05em;
  padding: .65em .85em .7em;
  background: var(--app-surface);
  box-shadow: 0 0 0 1.5px var(--trust-ink) inset;
}
.receipt-head { display: flex; align-items: center; gap: .35em; margin-bottom: .45em; color: var(--trust-ink); font-family: var(--font-mono); font-size: .76em; font-weight: 600; }
.receipt-mini dl { display: grid; gap: .3em; }
.receipt-mini dl > div { display: grid; grid-template-columns: 5.2em 1fr; gap: .4em; }
.receipt-mini dt { color: var(--app-ink-3); font-family: var(--font-mono); font-size: .7em; padding-top: .12em; }
.receipt-mini dd { font-size: .8em; font-weight: 500; line-height: 1.3; }
.receipt-mini .not-used { border-top: 1px dashed var(--app-line); padding-top: .3em; color: var(--app-ink-3); }

.talk { display: grid; justify-items: center; gap: .4em; margin-top: auto; margin-bottom: .4em; }
.talk-button {
  position: relative;
  z-index: 1;
  width: 3.6em;
  height: 3.6em;
  display: grid;
  place-items: center;
  grid-area: 1 / 1;
  border-radius: 50%;
  background: var(--accent);
  color: #FFF;
  box-shadow: 0 .4em 1em -.4em rgba(194, 105, 42, .7);
}
.talk-button .icon { width: 1.5em; height: 1.5em; }
.talk-ring { grid-area: 1 / 1; width: 3.6em; height: 3.6em; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; }
.talk-label { color: var(--app-ink-3); font-size: .74em; font-weight: 600; }

.sheet {
  border-radius: 1.3em;
  padding: .55em .95em 1em;
  background: var(--app-surface);
  box-shadow: 0 0 0 1px var(--app-line), 0 1em 2em -1.4em rgba(30, 23, 19, .45);
}
.sheet-grabber { display: block; width: 2.6em; height: .3em; margin: 0 auto .6em; border-radius: 999px; background: var(--app-line); background: color-mix(in srgb, var(--app-ink) 18%, transparent); }
.sheet-title { color: var(--app-ink-3); font-family: var(--font-mono); font-size: .74em; }
.sheet-name { display: flex; align-items: center; gap: .45em; margin: .3em 0 .65em; font-size: 1.08em; font-weight: 700; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; margin: .8em 0; border-top: 1px solid var(--app-line); padding-top: .7em; font-size: .86em; font-weight: 600; }
.toggle { position: relative; width: 2.7em; height: 1.6em; border-radius: 999px; background: var(--app-surface-2); box-shadow: inset 0 0 0 1px var(--app-line); transition: background-color var(--dur-enter) ease; }
.toggle i { position: absolute; top: .15em; left: .15em; width: 1.3em; height: 1.3em; border-radius: 50%; background: #FFF; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform var(--dur-enter) var(--ease-enter); }
.toggle.is-on { background: var(--trust-ink); }
.toggle.is-on i { transform: translateX(1.1em); }
.add-btn { transition: transform var(--dur-micro) var(--ease-enter); }
.add-btn.is-pressed { transform: scale(.97); }
.toast {
  position: absolute;
  top: .2em;
  right: 5.6%;
  left: 5.6%;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: .5em;
  border-radius: .95em;
  padding: .7em .85em;
  background: #1E1713;
  color: #FBF7F1;
  font-size: .82em;
  font-weight: 600;
  opacity: 0;
  transform: translateY(-.6em);
  transition: opacity var(--dur-enter) ease, transform var(--dur-enter) var(--ease-enter);
}
.toast .icon { color: #BCE0C1; }
.toast.is-shown { opacity: 1; transform: none; }

.notification {
  position: absolute;
  top: 7.4%;
  right: 3.6%;
  left: 3.6%;
  z-index: 6;
  display: flex;
  align-items: flex-start;
  gap: .65em;
  border-radius: 1.2em;
  padding: .75em .8em;
  background: rgba(41, 32, 27, .96);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 1em 2em -1em rgba(0, 0, 0, .7);
  color: var(--ink-e);
  font-size: .86em;
}
.notif-icon { width: 2.4em; height: 2.4em; display: grid; place-items: center; flex: 0 0 auto; border-radius: .6em; background: var(--paper); color: var(--ink); }
.notif-icon .app-mark { font-size: 1.3em; }
.notif-body { display: grid; gap: .1em; line-height: 1.3; }
.notif-body b { color: var(--ink-e2); font-size: .82em; font-weight: 600; }
.notif-body small { color: var(--lamp); font-size: .8em; }
.screen-tonight { top: 21%; }
.check-draw {
  width: 2.1em;
  height: 2.1em;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #18291D;
  box-shadow: inset 0 0 0 1.5px #BCE0C1;
}
.check-draw svg { width: 1.2em; height: 1.2em; fill: none; stroke: #BCE0C1; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 0; }
html.js .tonight-device:not(.is-played) .check-draw svg { stroke-dashoffset: 24; }
.tonight-device.is-played .check-draw svg { transition: stroke-dashoffset 560ms var(--ease-settle) 700ms; }
.app-row.done .row-main { color: var(--app-ink); }
.device[data-theme="evening"] .state-approved { border-color: rgba(188, 224, 193, .4); background: #18291D; color: #BCE0C1; }
.device[data-theme="evening"] .app-card { box-shadow: 0 0 0 1px var(--app-line); }

/* ==========================================================================
   HERO · 6:58 AM
   ========================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(40px, 6vh, 84px) 0 clamp(64px, 9vh, 112px);
  background: var(--morning);
}
.sun-wash {
  position: absolute;
  inset: -20% 30% 30% -20%;
  z-index: -2;
  background: radial-gradient(closest-side, rgba(251, 230, 200, .9), rgba(251, 230, 200, .62) 38%, rgba(251, 230, 200, .26) 68%, rgba(251, 230, 200, .07) 88%, rgba(251, 230, 200, 0));
  /* The box starts 20% above the hero (22% of its own height): fade in from there so no edge is clipped. */
  -webkit-mask-image: linear-gradient(180deg, transparent 22%, rgba(0, 0, 0, .55) 34%, #000 48%);
  mask-image: linear-gradient(180deg, transparent 22%, rgba(0, 0, 0, .55) 34%, #000 48%);
  pointer-events: none;
}
.window-light {
  position: absolute;
  top: -12%;
  left: -4%;
  z-index: -1;
  width: 70%;
  height: 132%;
  transform: translate3d(var(--lx, 0px), 0, 0) skewX(var(--lskew, -14deg)) scaleY(var(--lsy, 1));
  transform-origin: top left;
  pointer-events: none;
  will-change: transform;
}
.pane {
  position: absolute;
  top: 0;
  height: 100%;
  width: 34%;
  background: linear-gradient(90deg, rgba(255, 249, 240, 0) 0%, rgba(255, 249, 240, .05) 12%, rgba(255, 249, 240, .17) 24%, rgba(255, 250, 242, .36) 37%, rgba(255, 250, 243, .5) 50%, rgba(255, 250, 242, .36) 63%, rgba(255, 249, 240, .17) 76%, rgba(255, 249, 240, .05) 88%, rgba(255, 249, 240, 0) 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 10%, rgba(0, 0, 0, .5) 20%, #000 31%, #000 44%, rgba(0, 0, 0, .5) 56%, transparent 68%);
  mask-image: linear-gradient(180deg, transparent 10%, rgba(0, 0, 0, .5) 20%, #000 31%, #000 44%, rgba(0, 0, 0, .5) 56%, transparent 68%);
  animation: firstLight 1800ms var(--ease-light) 150ms both;
}
.pane-a { left: 12%; }
.pane-b { left: 36%; filter: opacity(.75); animation-delay: 230ms; } /* filter, because firstLight animates opacity */
@keyframes firstLight {
  from { opacity: 0; transform: translateX(-26vw); }
  to { opacity: 1; transform: none; }
}
.hero-grid {
  min-height: min(calc(100svh - var(--header-h) - 120px), 820px);
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  align-items: center;
  gap: 48px;
}
.hero-chip { margin-bottom: 26px; }
.hero-title {
  max-width: 12.5ch;
  font-size: clamp(2.8rem, 1.2rem + 5.4vw, 5.6rem);
  line-height: .99;
  letter-spacing: -.024em;
}
.hero-title .line { display: block; }
.hero-title .line > span { display: inline-block; animation: lineRise 900ms var(--ease-settle) both; }
.hero-title .line:nth-child(1) > span { animation-delay: 80ms; }
.hero-title .line:nth-child(2) > span { animation-delay: 170ms; }
.hero-title .line:nth-child(3) > span { animation-delay: 260ms; }
@keyframes lineRise { from { transform: translateY(.32em); } }
.hero-lead { margin-top: 28px; }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-follow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 40px;
  color: var(--fg-2);
  font-size: .95rem;
  text-decoration: none;
}
.hero-follow:hover span:last-child { text-decoration: underline; text-underline-offset: 4px; }
.follow-line {
  position: relative;
  width: 1px;
  height: 34px;
  overflow: hidden;
  background: var(--line-strong);
}
.follow-line::after {
  position: absolute;
  inset: 0;
  background: var(--fg);
  content: "";
  transform-origin: top;
  animation: followGrow 1200ms var(--ease-settle) 900ms both;
}
@keyframes followGrow { from { transform: scaleY(0); } }
.hero-meta { margin-top: 14px; }
@media (max-width: 640px) { .hero-meta .meta-sep { display: none; } .hero-meta .meta-place { display: block; } } /* two deliberate lines on phones */
.load-in { animation: rise var(--dur-reveal) var(--ease-settle) both; animation-delay: var(--d, 0ms); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

.hero-device {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 18px;
}
.hero-device .device { --device-w: clamp(280px, 25vw, 340px); }
.load-device { animation: deviceIn var(--dur-settle) var(--ease-settle) 200ms both; }
@keyframes deviceIn { from { opacity: 0; transform: translateY(40px) rotate(-2.5deg) scale(.98); } }
html.js .hero-waiting { animation: waitingRise var(--dur-enter) var(--ease-enter) 1500ms both; }
@keyframes waitingRise { from { opacity: 0; transform: translateY(12px); } }
.annotation {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}
.annotation .leader { width: 56px; height: 1px; background: var(--ink-2); transform-origin: left; }
.annotation .note {
  max-width: 15ch;
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: .75rem;
  line-height: 1.45;
}
.device-wrap { position: relative; }
.hero-annotation { top: 50.4%; left: calc(100% - 14px); width: max-content; }
.hero-annotation .note { max-width: 19ch; }
.routine-card { padding-bottom: .65em; }
.routine-count { margin-left: .35em; color: var(--app-ink-3); font-family: var(--font-mono); font-size: .92em; font-weight: 400; }
.routine-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: .35em; margin-top: .35em; }
.routine-steps li {
  display: grid;
  gap: .1em;
  border-top: 2px solid var(--app-surface-2);
  padding-top: .45em;
  color: var(--app-ink-2);
  font-size: .74em;
  font-weight: 600;
  line-height: 1.2;
}
.routine-steps li:first-child { border-top-color: var(--lamp); color: var(--app-ink); }
.routine-steps b { color: var(--app-ink-3); font-family: var(--font-mono); font-size: .92em; font-weight: 400; }
html.js .hero-annotation .leader { animation: leaderDraw 400ms var(--ease-enter) 1650ms both; }
html.js .hero-annotation .note { animation: rise 500ms var(--ease-settle) 1850ms both; }
@keyframes leaderDraw { from { transform: scaleX(0); } }
.device-label { color: var(--fg-2); text-align: center; }

/* ==========================================================================
   WHY · 7:40 AM
   ========================================================================== */
.why {
  position: relative;
  background: linear-gradient(180deg, var(--morning) 0%, #F6EFE5 60%, var(--afternoon) 100%);
}
.why-runway { position: relative; }
.why-stage { padding: clamp(80px, 12vh, 140px) 0 clamp(72px, 10vh, 120px); }
.why-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 64px;
}
.why-copy .body + .body { margin-top: 18px; }
.why-copy h2 { margin-bottom: 26px; }
.why-fine { margin-top: 28px; text-align: right; }

.table {
  --p: 1;
  position: relative;
  height: 470px;
}
.frag {
  position: absolute;
  top: var(--y);
  left: var(--x);
  z-index: 2;
  width: 46%;
  border-radius: 14px;
  padding: 14px 16px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(30, 23, 19, .08), 14px 22px 34px -22px rgba(52, 34, 18, .38);
  font-size: .9rem;
  transform:
    translate(calc(var(--dx, 0px) * var(--p)), calc(var(--dy, 0px) * var(--p)))
    rotate(calc(var(--r) * (1 - var(--p))))
    scale(calc(1 - .18 * var(--p)));
  opacity: calc(1 - clamp(0, (var(--p) - .5) * 3, 1));
}
.why.is-scrub .frag, .table.is-anim .frag { will-change: transform, opacity; }
.frag-email {
  z-index: 3;
  transform:
    translate(calc(var(--tx) * var(--p)), calc(var(--ty) * var(--p)))
    rotate(calc(var(--r) + (var(--tr) - var(--r)) * var(--p)));
  opacity: 1;
}
.frag-kicker { display: flex; align-items: center; gap: 7px; color: var(--ink-3); font-family: var(--font-mono); font-size: .72rem; }
.frag-kicker .icon { width: 15px; height: 15px; }
.unread { width: 8px; height: 8px; margin-left: auto; border-radius: 50%; background: var(--focus); }
.frag-title { margin: 6px 0 3px; font-weight: 700; line-height: 1.3; }
.frag-body { color: var(--ink-2); line-height: 1.45; }
.frag-body b { display: block; margin-bottom: 2px; color: var(--ink); font-size: .78rem; }
.frag-meta { margin-top: 4px; color: var(--ink-3); font-family: var(--font-mono); font-size: .7rem; text-align: right; }
.frag-text { width: 40%; border-radius: 18px 18px 18px 6px; background: #ECE4D8; }
.frag-sticky {
  width: 36%;
  border-radius: 3px;
  padding: 22px 18px;
  background: #FBE3A8;
  box-shadow: 0 1px 1px rgba(30, 23, 19, .08), 10px 18px 26px -18px rgba(52, 34, 18, .45);
  font-family: var(--font-display);
  font-size: 1.15rem;
  line-height: 1.25;
}
.frag-flyer { width: 40%; border: 1px solid rgba(30, 23, 19, .1); background: #FFFDF9; }
.frag-circle {
  position: absolute;
  right: -8px;
  bottom: 2px;
  width: 112px;
  height: 46px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.2;
  stroke-linecap: round;
}
.frag-scrawl {
  position: absolute;
  right: 18px;
  bottom: 12px;
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-size: 1.05rem;
  transform: rotate(-6deg);
}
.memory-card {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: min(400px, 92%);
  border-radius: 22px;
  padding: 18px 20px 14px;
  background: var(--surface);
  box-shadow: 0 0 0 1px rgba(30, 23, 19, .08), 18px 30px 50px -30px rgba(52, 34, 18, .45);
  font-size: .95rem;
  opacity: clamp(0, (var(--p) - .42) * 2.4, 1);
  transform: translate(-50%, calc(-50% + (1 - var(--p)) * 18px));
}
.memory-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; color: var(--ink-3); font-family: var(--font-mono); font-size: .72rem; }
.mark-mini { width: 16px; height: 15.5px; flex: 0 0 auto; color: var(--ink); }
.memory-row {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 12px 0;
}
.memory-row:first-of-type { border-top: 0; }
.memory-row .avatar { font-size: .95rem; }
.memory-row .row-main { font-size: 1rem; }
.memory-row .row-main small { color: var(--ink-3); font-size: .8rem; }
.memory-row .state { font-size: .74rem; }
.memory-card-foot { border-top: 1px solid var(--line); padding-top: 10px; color: var(--ink-3); font-family: var(--font-mono); font-size: .72rem; }
.frag-note {
  position: absolute;
  top: calc(-2% + 6px);
  right: -2%;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 230px;
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: .74rem;
  line-height: 1.45;
  opacity: clamp(0, (var(--p) - .65) * 4, 1);
}
.frag-note .leader { width: 28px; height: 1px; flex: 0 0 auto; background: var(--ink-2); }
.table.is-anim { transition: --p 1100ms var(--ease-settle); }
.why.is-scrub .why-runway { height: 190svh; }
.why.is-scrub .why-stage {
  position: sticky;
  top: var(--header-h);
  min-height: calc(100svh - var(--header-h));
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px 0;
}

/* ==========================================================================
   HOW · 3:20 PM
   ========================================================================== */
.how {
  position: relative;
  padding: clamp(96px, 13vh, 150px) 0 clamp(64px, 8vh, 96px);
  background: var(--afternoon);
  --device-shadow: 0 18px 30px -12px rgba(40, 36, 30, .3);
}
.how-intro { margin-bottom: clamp(32px, 6vh, 64px); }
.how-intro h2 { max-width: 19ch; margin-bottom: 24px; }
.how-layout {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  gap: 56px;
}
.how-steps { position: relative; padding: 4vh 0 24vh; }
.how-steps::before {
  position: absolute;
  top: 4vh;
  bottom: 24vh;
  left: 0;
  width: 1px;
  background: var(--line);
  content: "";
}
.how-step {
  position: relative;
  min-height: 64svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 0 24px 32px;
}
.how-step h3, .how-step p { transition: color 360ms ease; }
.how-step:not(.is-active) h3, .how-step:not(.is-active) p { color: var(--ink-3); }
.how-step::before {
  position: absolute;
  top: 50%;
  left: -4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--afternoon);
  box-shadow: inset 0 0 0 1.5px var(--ink-3);
  content: "";
  transform: translateY(-50%);
  transition: background-color var(--dur-enter) ease, box-shadow var(--dur-enter) ease;
}
.how-step.is-active::before { background: var(--accent); box-shadow: 0 0 0 4px rgba(194, 105, 42, .16); }
.step-time { margin-bottom: 14px; color: var(--ink-2); font-family: var(--font-mono); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.how-step h3 {
  margin-bottom: 14px;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 1.3rem + 1.8vw, 2.7rem);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -.015em;
}
.how-step p:last-child { max-width: 42ch; color: var(--ink-2); font-size: 1.0625rem; line-height: 1.62; }
.how-stage {
  position: sticky;
  top: calc(var(--header-h) + max(16px, (100svh - var(--header-h) - 760px) / 2));
  height: max-content;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: end;
  gap: 40px;
}
.how-figure { display: grid; justify-items: center; gap: 14px; }
.how-figure figcaption { display: flex; align-items: center; gap: 10px; }
.how-stage .device { --device-w: min(330px, calc((100svh - var(--header-h) - 56px) * .462)); }
.how-stage .device-screen { font-size: 4.05cqi; }
.history { position: relative; display: grid; gap: 14px; padding: 0 0 72px 20px; }
.history::before { position: absolute; top: 8px; bottom: 80px; left: 3px; width: 1px; background: var(--line); content: ""; }
.history li {
  position: relative;
  display: grid;
  gap: 2px;
  color: var(--ink);
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink-3);
  transform: translateX(-4px);
  transition: opacity var(--dur-enter) ease, transform var(--dur-enter) var(--ease-enter);
}
.history li::before {
  position: absolute;
  top: 5px;
  left: -20px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--afternoon);
  box-shadow: inset 0 0 0 1.5px var(--ink-3);
  content: "";
}
.history li.is-on { color: var(--ink); transform: none; }
.history li.is-on::before { background: var(--trust-ink); box-shadow: none; }
.h-time { color: var(--ink-3); font-family: var(--font-mono); font-size: .72rem; font-weight: 400; }
.how-skip { margin-top: 8px; }

/* Device screens stack inside the How phone */
.screen { opacity: 0; visibility: hidden; transition: opacity var(--dur-exit) var(--ease-exit), visibility 0s linear var(--dur-exit); }
.screen.is-active, .device[data-active="capture"] .screen-capture, .device[data-active="review"] .screen-review, .device[data-active="recall"] .screen-recall, .device[data-active="act"] .screen-act {
  opacity: 1;
  visibility: visible;
  transition: opacity var(--dur-enter) var(--ease-enter) 60ms, visibility 0s;
}
.device[data-active="capture"] .screen-capture > *,
.device[data-active="review"] .screen-review > *,
.device[data-active="recall"] .screen-recall > *,
.device[data-active="act"] .screen-act > * { animation: screenRise var(--dur-enter) var(--ease-enter) both; }
@keyframes screenRise { from { opacity: 0; transform: translateY(8px); } }
.device[data-active="capture"] .tabbar [data-tab="ask"],
.device[data-active="recall"] .tabbar [data-tab="ask"],
.device[data-active="review"] .tabbar [data-tab="family"],
.device[data-active="act"] .tabbar [data-tab="plan"] { color: var(--app-ink); }
.device.is-listening .island { width: 38%; }
.device.is-listening .island-dot { opacity: 1; }
.device.is-listening .island-wave { display: flex; }
.device.is-listening .island-wave i { animation: wave 600ms ease-in-out 3 alternate; }
.device.is-listening .island-wave i:nth-child(2) { animation-delay: 90ms; }
.device.is-listening .island-wave i:nth-child(3) { animation-delay: 180ms; }
.device.is-listening .island-wave i:nth-child(4) { animation-delay: 60ms; }
.device.is-listening .island-wave i:nth-child(5) { animation-delay: 150ms; }
@keyframes wave { to { transform: scaleY(1); } }
.device.is-listening .talk-ring { animation: ring 1000ms var(--ease-enter) 2; }
@keyframes ring { from { opacity: .6; transform: scale(1); } to { opacity: 0; transform: scale(1.5); } }
.screen-recall .receipt-mini { transition: transform var(--dur-enter) var(--ease-enter), opacity var(--dur-enter) ease; }
.screen-act .sheet { margin-top: .3em; }
.earlier { display: grid; gap: .5em; opacity: .8; }
.earlier .bubble { font-size: .86em; }
.earlier-label { color: var(--app-ink-3); font-family: var(--font-mono); font-size: .72em; text-align: center; }
.screen-recall .app-ask { margin-bottom: .3em; }
.tonight-list .new-item { opacity: 0; transform: translateY(-.4em); transition: opacity var(--dur-enter) ease, transform var(--dur-enter) var(--ease-enter); }
.screen-act.is-added .new-item { opacity: 1; transform: none; }
.new-item .row-main small { color: var(--trust-ink); }

/* ==========================================================================
   TRUST · 5:45 PM
   ========================================================================== */
.trust {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(96px, 13vh, 150px) 0 clamp(96px, 12vh, 140px);
  background: linear-gradient(180deg, var(--afternoon) 0%, #F7F2E9 5.5%, #F6ECDE 11%, #F5E7D3 16.5%, var(--golden) 22%, var(--golden) 60%, var(--golden-deep) 100%);
}
/* The shafts extend past the section and were cut off by its edge (a hard line behind the heading): fade them in and out. */
.shafts {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, .45) 9%, #000 20%, #000 78%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, .45) 9%, #000 20%, #000 78%, transparent 100%);
}
.shafts span {
  position: absolute;
  top: -20%;
  width: 16%;
  height: 150%;
  background: linear-gradient(90deg, rgba(255, 206, 150, 0), rgba(255, 220, 178, .5) 50%, rgba(255, 206, 150, 0));
  transform: translate3d(0, var(--shaft-y, 0px), 0) skewX(32deg);
  will-change: transform;
}
.shafts span:nth-child(1) { right: 6%; }
.shafts span:nth-child(2) { right: 24%; width: 9%; opacity: .7; }
.shafts span:nth-child(3) { right: 40%; width: 5%; opacity: .5; }
.trust-head { margin-bottom: clamp(40px, 7vh, 72px); }
.trust-head h2 { margin-bottom: 24px; }

.your-call {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 6vw, 88px);
}
.call-kicker { margin-bottom: 12px; color: var(--accent-ink); font-family: var(--font-mono); font-size: .8125rem; font-weight: 600; }
.call-intro h3 {
  max-width: 18ch;
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 1.25rem + 1.4vw, 2.35rem);
  line-height: 1.08;
  letter-spacing: -.014em;
}
.call-intro > p { max-width: 40ch; color: var(--fg-2); font-size: 1.0625rem; }
.call-card {
  margin-top: 28px;
  border-radius: 22px;
  padding: 20px 22px;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 0 0 1px rgba(30, 23, 19, .08), 0 18px 40px -26px rgba(84, 56, 26, .5);
  font-size: 1rem;
}
.call-card .mem-kicker { color: var(--ink-2-golden); font-size: .75rem; }
.call-memory { margin: 6px 0 12px; font-size: 1.15rem; font-weight: 700; line-height: 1.3; }
.call-state { min-height: 30px; }
.call-state .state { font-size: .82rem; }
.call-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
.call-actions .button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--golden), 0 0 0 4px var(--ink); }
.call-reset { margin-left: auto; color: var(--ink); font-size: .9rem; }
.your-call[data-decision="pending"] .call-reset { visibility: hidden; }

.receipt {
  position: relative;
  border-radius: 6px 6px 18px 18px;
  padding: 26px 28px 22px;
  background: #FFFDF9;
  box-shadow: 0 1px 2px rgba(30, 23, 19, .1), -26px 34px 50px -30px rgba(84, 56, 26, .55);
  transform: rotate(-1deg);
  --fg: var(--ink);
}
.receipt::before {
  position: absolute;
  top: -8px;
  right: 0;
  left: 0;
  height: 9px;
  background: radial-gradient(circle at 7px 0, transparent 6px, #FFFDF9 6.5px) 0 0 / 14px 9px repeat-x;
  content: "";
}
.receipt-label { color: var(--ink-3); font-family: var(--font-mono); font-size: .75rem; }
.receipt-q { margin: 6px 0 14px; color: var(--ink-2); font-size: 1.05rem; }
.receipt-answer { display: grid; }
.answer {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.5rem + 1.6vw, 2.75rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -.02em;
}
.answer-sub { margin-top: 8px; color: var(--ink-2); font-size: 1rem; line-height: 1.5; }
.perforation { height: 1px; margin: 20px -28px 16px; background: repeating-linear-gradient(90deg, rgba(30, 23, 19, .28) 0 6px, transparent 6px 12px); }
.receipt-rows { display: grid; gap: 9px; }
.receipt-rows > div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: baseline; }
.receipt-rows dt { color: var(--ink-3); font-family: var(--font-mono); font-size: .75rem; }
.receipt-rows dd { font-size: .95rem; line-height: 1.4; }
.receipt-rows .r-muted dd { color: var(--ink-3); }
.receipt-foot { margin-top: 18px; color: var(--ink-3); font-family: var(--font-mono); font-size: .7rem; text-align: center; }

/* Decision states (scoped so they outrank the generic row layout) */
.your-call .answer-approved, .your-call .answer-pending, .your-call .answer-later,
.your-call .receipt-rows .r-approved, .your-call .receipt-rows .r-pending,
.your-call .r-approved-inline, .your-call .r-pending-inline { display: none; }
.your-call[data-decision="approved"] .answer-approved { display: block; animation: rise 420ms var(--ease-settle) both; }
.your-call[data-decision="approved"] .receipt-rows .r-approved { display: grid; animation: rise 420ms var(--ease-settle) both; }
.your-call[data-decision="approved"] .r-approved-inline { display: inline; }
.your-call:not([data-decision="approved"]) .answer.answer-pending { display: block; animation: rise 420ms var(--ease-settle) both; }
.your-call[data-decision="pending"] .answer-sub.answer-pending { display: block; }
.your-call[data-decision="later"] .answer-later { display: block; animation: rise 420ms var(--ease-settle) both; }
.your-call:not([data-decision="approved"]) .receipt-rows .r-pending { display: grid; }
.your-call:not([data-decision="approved"]) .r-pending-inline { display: inline; }
.r-approved:nth-child(2) { animation-delay: 70ms; }
.r-approved:nth-child(5) { animation-delay: 140ms; }

.states-block { margin-top: clamp(72px, 11vh, 120px); }
.states-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-bottom: 22px; }
.states-head h3 { font-family: var(--font-display); font-size: clamp(1.55rem, 1.2rem + 1.1vw, 2.1rem); line-height: 1.1; letter-spacing: -.012em; }
.states { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.state-card {
  position: relative;
  border-radius: 20px;
  padding: 20px 20px 22px;
  background: rgba(255, 253, 249, .62);
}
.state-card::before { position: absolute; inset: 0; border-radius: inherit; content: ""; pointer-events: none; }
.sc-approved::before { border: 1.5px solid rgba(47, 107, 63, .55); }
.sc-suggested::before { border: 1.5px dashed rgba(84, 72, 63, .55); }
.sc-waiting::before { border: 1.5px dotted rgba(122, 78, 18, .8); }
.sc-uncertain::before { border: 3px double rgba(84, 72, 63, .4); }
.state-card .state { font-size: .8rem; }
.state-card .state-suggested, .state-card .state-uncertain { color: var(--ink-2-golden); }
.verdict { margin: 18px 0 6px; font-family: var(--font-display); font-size: 1.55rem; font-weight: 600; line-height: 1.1; letter-spacing: -.012em; }
.state-card p:last-child { color: var(--ink-2-golden); font-size: .95rem; line-height: 1.5; }
.states-foot { margin-top: 16px; color: var(--ink-2-golden); }

.principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: clamp(64px, 10vh, 110px);
  border-top: 1px solid var(--line-strong);
}
.principle { padding: 26px 32px 6px 0; }
.principle + .principle { border-left: 1px solid var(--line-strong); padding-left: 32px; }
.principle h3 { margin: 16px 0 10px; }
.principle p { color: var(--ink-2-golden); font-size: 1rem; line-height: 1.6; }

/* Build-status tags (square, mono) — distinct from rounded memory states */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  border: 1px solid currentColor;
  border-radius: 4px;
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}
.tag::before { width: 6px; height: 6px; border-radius: 1px; background: currentColor; content: ""; }
/* A longer status (e.g. a prerequisite) may wrap instead of overflowing narrow columns. */
.tag.tag-wrap { max-width: 100%; white-space: normal; align-items: flex-start; }
.tag.tag-wrap::before { flex: none; margin-top: .42em; }
@media (min-width: 360px) { .tag.tag-wrap .tag-part { white-space: nowrap; } } /* break after the "·" where it fits */
.tag-prototype { color: var(--trust-ink); }
.tag-building { color: var(--accent-ink); }
.tone-golden .tag-building { color: #6E4520; }
.tag-planned { color: var(--ink-2); border-style: dashed; }
.tag-planned::before { background: transparent; box-shadow: inset 0 0 0 1px currentColor; }
.tag-exploring { color: var(--ink-3); border-style: dotted; }
.tag-exploring::before { border-radius: 50%; background: transparent; box-shadow: inset 0 0 0 1px currentColor; }
.tone-evening .tag-prototype, .tone-night .tag-prototype { color: #BCE0C1; }
.tone-evening .tag-building, .tone-night .tag-building { color: var(--lamp); }
.tone-evening .tag-planned, .tone-night .tag-planned { color: var(--ink-e2); }
.tone-evening .tag-exploring, .tone-night .tag-exploring { color: var(--ink-e3); }

/* ==========================================================================
   DUSK · 7:45 PM
   ========================================================================== */
.dusk {
  position: relative;
  min-height: 72svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  padding: 0 0 clamp(64px, 10vh, 110px);
  background: linear-gradient(180deg, var(--golden-deep) 0%, #B98D6C 22%, #6E4A3A 46%, #2A1F1B 72%, var(--evening) 100%);
  color: var(--ink-e);
}
.lamp-bloom {
  position: absolute;
  top: 4%;
  right: -12%;
  bottom: 4%;
  width: min(62vw, 980px);
  background: radial-gradient(closest-side, rgba(240, 163, 90, .26), rgba(240, 163, 90, 0));
  opacity: 0;
  transform: scale(.85);
  transition: opacity 1400ms var(--ease-settle), transform 1600ms var(--ease-settle);
}
html.is-lit .lamp-bloom, html:not(.js) .lamp-bloom { opacity: 1; transform: none; }
.dusk-inner { position: relative; text-align: center; }
.dusk-time { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px; color: var(--ink-e); font-family: var(--font-mono); font-size: .8125rem; }
.dusk-line {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.2rem + 3vw, 3.6rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.016em;
}

/* ==========================================================================
   DEMO · 8:00 PM
   ========================================================================== */
.demo {
  position: relative;
  padding: clamp(80px, 11vh, 120px) 0 clamp(80px, 10vh, 110px);
  background:
    radial-gradient(42% 30% at 90% 36%, rgba(240, 163, 90, .08), rgba(240, 163, 90, 0)),
    var(--evening);
}
.demo-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .85fr);
  align-items: end;
  gap: 24px 72px;
  margin-bottom: 48px;
}
.demo-heading .lead { font-size: 1.1rem; }
.demo-shell {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  overflow: hidden;
  border-radius: 28px;
  background: var(--evening-surface);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 50px 120px -40px rgba(0, 0, 0, .7);
}
.demo-household { border-right: 1px solid var(--line); padding: 30px 28px; background: #1A1411; }
.demo-label { color: var(--ink-e3); font-family: var(--font-mono); font-size: .75rem; }
.demo-household h3 { margin: 6px 0 22px; font-family: var(--font-display); font-size: 1.6rem; line-height: 1.1; letter-spacing: -.012em; }
.family-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 10px; }
.family-list li { display: flex; align-items: center; gap: 10px; }
.family-list .avatar { font-size: 1rem; width: 2.25em; height: 2.25em; }
.family-list strong { display: block; font-size: .95rem; line-height: 1.2; }
.family-list small { display: block; color: var(--ink-e3); font-size: .8rem; }
.knows { margin-top: 26px; border-top: 1px solid var(--line); padding-top: 14px; }
.knows summary {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-size: .95rem;
  font-weight: 600;
  list-style: none;
}
.knows summary::-webkit-details-marker { display: none; }
.knows summary::after { width: 8px; height: 8px; margin-left: 10px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; content: ""; transform: rotate(45deg) translateY(-3px); transition: transform var(--dur-enter) ease; }
.knows[open] summary::after { transform: rotate(-135deg) translateY(-1px); }
.knows-count { margin-left: auto; color: var(--ink-e3); font-family: var(--font-mono); font-size: .72rem; font-weight: 400; }
.knows-list { display: grid; gap: 6px; margin-top: 8px; }
.knows-list li {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 4px 10px;
  border-radius: 12px;
  padding: 9px 10px;
  font-size: .88rem;
  line-height: 1.3;
}
.knows-list li::before {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(188, 224, 193, .32);
  border-radius: inherit;
  content: "";
}
.knows-list li.is-waiting::before { border: 1px dotted rgba(241, 201, 143, .7); }
.knows-list li::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: rgba(240, 163, 90, .16);
  content: "";
  opacity: 0;
  transition: opacity var(--dur-enter) ease;
}
.knows-list li { isolation: isolate; }
.knows-list .avatar { font-size: .9rem; }
.k-main small { display: block; color: var(--ink-e3); font-size: .78rem; }
.knows-list li.is-waiting .k-main small { color: #F1C98F; }
.k-used { grid-column: 2; display: none; color: var(--lamp); font-family: var(--font-mono); font-size: .7rem; }
.knows-list li.is-used::after { opacity: 1; }
.knows-list li.is-used .k-used { display: block; }
.knows-list li.is-used .k-main small { color: var(--ink-e2); }
.demo-privacy-note { margin-top: 22px; border-radius: 14px; padding: 14px 16px; background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px var(--line); }
.demo-privacy-note strong { font-size: .88rem; }
.demo-privacy-note p { margin-top: 4px; color: var(--ink-e2); font-size: .82rem; line-height: 1.5; }

.demo-chat { min-height: 640px; display: grid; grid-template-rows: auto auto 1fr auto auto auto; }
.demo-chat-header {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 0 28px;
}
.demo-chat-title { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; }
.demo-chat-title .mark { width: 24px; height: 24px; }
.mode-pill {
  border: 1px solid rgba(240, 163, 90, .35);
  border-radius: 999px;
  padding: 4px 11px;
  color: var(--lamp);
  font-family: var(--font-mono);
  font-size: .72rem;
  white-space: nowrap;
}
.prompt-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 18px 28px 4px; }
.prompt-chips button {
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0 15px;
  background: rgba(255, 255, 255, .03);
  color: var(--ink-e);
  font-size: .88rem;
  transition: background-color var(--dur-enter) ease, border-color var(--dur-enter) ease;
}
.prompt-chips button:hover:not(:disabled) { border-color: rgba(240, 163, 90, .55); background: rgba(240, 163, 90, .08); }
.prompt-chips button:disabled { opacity: .4; cursor: not-allowed; }
.chat-log { max-height: 440px; overflow-y: auto; overscroll-behavior: contain; padding: 22px 28px 8px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .18) transparent; }
.chat-message { display: flex; gap: 12px; margin-bottom: 18px; animation: rise var(--dur-enter) var(--ease-enter) both; }
.chat-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 11px;
  background: var(--evening-surface-2);
  color: var(--ink-e);
}
.chat-avatar .mark { width: 24px; height: 24px; } /* the logo notes' 24 px minimum for the full-colour mark */
.chat-message > div:last-child { min-width: 0; max-width: 680px; }
.chat-message p {
  border-radius: 18px 18px 18px 6px;
  padding: 13px 16px;
  background: var(--evening-surface-2);
  color: var(--ink-e);
  line-height: 1.58;
  overflow-wrap: anywhere;
}
.user-message { justify-content: flex-end; }
.user-message .chat-avatar { display: none; }
.user-message p { border-radius: 18px 18px 6px 18px; background: var(--ink-e); color: var(--ink); }
.answer-receipt {
  margin-top: 8px;
  border-radius: 14px;
  padding: 11px 14px 12px;
  background: rgba(24, 41, 29, .55);
  box-shadow: inset 0 0 0 1px rgba(188, 224, 193, .22);
  color: var(--ink-e2);
  font-size: .8rem;
  line-height: 1.5;
}
.answer-receipt strong { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; color: #BCE0C1; font-family: var(--font-mono); font-size: .72rem; font-weight: 600; }
.answer-receipt strong .icon { width: 14px; height: 14px; }
.receipt-lines { display: grid; gap: 2px; }
.receipt-lines span { position: relative; padding-left: 14px; }
.receipt-lines span::before { position: absolute; top: .78em; left: 0; width: 7px; height: 1px; background: rgba(188, 224, 193, .6); content: ""; }
.typing-dots { display: inline-flex; gap: 5px; border-radius: 18px 18px 18px 6px; padding: 16px; background: var(--evening-surface-2); }
.typing-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-e2); animation: typing 900ms ease-in-out infinite; }
.typing-dots span:nth-child(2) { animation-delay: .12s; }
.typing-dots span:nth-child(3) { animation-delay: .24s; }
@keyframes typing { 0%, 70%, 100% { opacity: .35; transform: translateY(0); } 35% { opacity: 1; transform: translateY(-4px); } }
.demo-complete {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
  margin: 4px 28px 14px;
  border-radius: 16px;
  padding: 16px 18px;
  background: rgba(240, 163, 90, .1);
  box-shadow: inset 0 0 0 1px rgba(240, 163, 90, .3);
  font-size: .95rem;
}
.demo-complete[hidden] { display: none; }
.demo-complete p { flex: 1 1 280px; color: var(--ink-e2); }
.demo-complete strong { color: var(--ink-e); }
.demo-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; border-top: 1px solid var(--line); padding: 16px 28px; }
.demo-form input {
  min-width: 0;
  min-height: 48px;
  border: 1px solid #7A6E64;
  border-radius: 999px;
  padding: 0 18px;
  background: rgba(255, 255, 255, .04);
  color: var(--ink-e);
  font-size: 1rem;
}
.demo-form input::placeholder { color: var(--ink-e3); }
.demo-form input:disabled { opacity: .5; cursor: not-allowed; }
.demo-form input:focus-visible { border-color: transparent; }
.demo-footer-line { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 18px; padding: 0 28px 20px; color: var(--ink-e3); font-size: .78rem; }
.counter-wrap { display: inline-flex; align-items: center; gap: 10px; }
.counter-dots { display: inline-flex; gap: 4px; }
.counter-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--lamp); transition: opacity var(--dur-enter) ease; }
.counter-dots i.is-spent { opacity: .2; }

/* ==========================================================================
   TONIGHT · 8:15 PM
   ========================================================================== */
.tonight {
  position: relative;
  padding: clamp(40px, 6vh, 80px) 0 clamp(96px, 12vh, 140px);
  background:
    radial-gradient(50% 40% at 18% 18%, rgba(240, 163, 90, .12), rgba(240, 163, 90, 0)),
    linear-gradient(180deg, var(--evening) 0%, #130F0C 100%);
}
.tonight-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 72px;
}
.tonight-device { display: grid; justify-items: center; gap: 16px; --device-shadow: -24px 34px 60px -26px rgba(0, 0, 0, .8); }
.tonight-device .device { --device-w: clamp(270px, 24vw, 320px); }
.tonight-device .device-frame { box-shadow: inset 0 0 0 1.2px rgba(255, 255, 255, .14), inset 0 0 0 .9cqi #050403, 0 0 0 1px rgba(255, 255, 255, .04), -24px 34px 60px -26px rgba(0, 0, 0, .8), 0 0 80px -10px rgba(240, 163, 90, .16); }
html.js .tonight-device:not(.is-played) .notification { opacity: 0; transform: translateY(-1em); }
.tonight-device .notification { transition: opacity var(--dur-enter) ease 300ms, transform var(--dur-enter) var(--ease-enter) 300ms; }
.tonight-copy h2 { max-width: 14ch; margin-bottom: 24px; }

.status-block { margin-top: clamp(80px, 12vh, 130px); }
.status-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 22px; }
.status-head h3 { font-family: var(--font-display); font-size: clamp(1.6rem, 1.2rem + 1.1vw, 2.15rem); line-height: 1.1; letter-spacing: -.012em; }
.status-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.status-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-radius: 20px;
  padding: 20px 20px 22px;
  background: var(--evening-surface);
  box-shadow: inset 0 0 0 1px var(--line);
}
.status-card p { color: var(--ink-e2); font-size: .95rem; line-height: 1.55; }
.status-tabs { display: flex; gap: 8px; margin-top: auto; }
.status-tabs span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--evening-surface-2); color: var(--ink-e); }
.status-tabs .icon { width: 17px; height: 17px; }
.horizon { display: flex; align-items: flex-end; gap: 10px; margin-top: auto; }
.horizon span { display: block; border: 1.5px dashed var(--ink-e3); }
.h-phone { width: 18px; height: 34px; border-radius: 5px; border-style: solid !important; border-color: var(--ink-e2) !important; }
.h-tablet { width: 50px; height: 36px; border-radius: 6px; }
.h-watch { width: 20px; height: 24px; border-radius: 7px; }
.status-foot { max-width: 92ch; margin-top: 18px; }

.conviction { margin-top: clamp(96px, 14vh, 160px); text-align: center; }
.conviction .eyebrow { justify-content: center; }
.conviction blockquote p {
  max-width: 26ch;
  margin: 0 auto;
  color: var(--ink-e);
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 1.1rem + 2.7vw, 3.35rem);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -.016em;
  text-wrap: balance;
}
.conviction-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 30px; }
.conviction-meta li { border-radius: 999px; padding: 7px 13px; box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--ink-e2); font-size: .82rem; }

/* ==========================================================================
   WAITLIST · 9:40 PM
   ========================================================================== */
.waitlist {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(96px, 13vh, 150px) 0;
  background: var(--night);
}
.hearth-glow {
  position: absolute;
  top: 50%;
  right: 4%;
  z-index: -1;
  width: min(1100px, 110vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(224, 120, 47, .3), rgba(224, 120, 47, .08) 55%, rgba(224, 120, 47, 0));
  opacity: 0;
  transform: translate(10%, -50%) scale(.92);
  transition: opacity 1600ms var(--ease-settle), transform 1600ms var(--ease-settle);
}
.waitlist.is-kindled .hearth-glow, html:not(.js) .hearth-glow { opacity: 1; transform: translate(10%, -50%) scale(1); }
.waitlist-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(40px, 7vw, 100px);
}
.waitlist-copy h2 { max-width: 14ch; margin-bottom: 24px; }
.waitlist-note { margin-top: 22px; color: var(--ink-e3); font-size: .85rem; }
.waitlist-card {
  justify-self: end;
  width: min(100%, 560px);
  border-radius: 50% 50% 26px 26px / 190px 190px 26px 26px;
  padding: 58px 32px 22px;
  background: var(--lit-card);
  box-shadow: 0 0 0 1px rgba(255, 220, 180, .3), 0 40px 120px -30px rgba(224, 120, 47, .45), 0 30px 60px -30px rgba(0, 0, 0, .8);
  color: var(--ink);
  --focus-ring: var(--focus);
}
.arch-crown { display: grid; justify-items: center; gap: 10px; margin-bottom: 18px; text-align: center; }
.arch-crown .mark { width: 34px; height: 34px; color: var(--ink); }
.arch-title { font-family: var(--font-display); font-size: 1.55rem; font-weight: 600; line-height: 1.15; letter-spacing: -.012em; text-wrap: balance; }
.arch-sub { max-width: 30ch; color: var(--ink-2); font-size: .95rem; line-height: 1.45; text-wrap: balance; }

/* Native waitlist form ----------------------------------------------------- */
.waitlist-card {
  --wl-line: #8C7B6B;
  --wl-field: #FFFDF9;
  --danger-ink: #9B2F2A;
  --danger-bg: #FBE3E1;
  transition: box-shadow 900ms var(--ease-settle);
}
.waitlist-card [hidden] { display: none !important; }
/* Informational-only card (2026-10-21): coming-soon message and two ways to explore; no form. */
.cs-body { display: grid; gap: 20px; color: var(--ink-2); font-size: .98rem; line-height: 1.55; text-align: center; text-wrap: pretty; }
.cs-actions { display: grid; gap: 8px; justify-items: center; }
/* Two-column layout: the coming-soon card is shorter than the form card it replaced. Restore the arch's height so the
   Memory Routes meeting point above its shoulder keeps its clearance (routes.js anchorsWaitlist: copy.t - Ry >= 60). */
@media (min-width: 960px) { .waitlist-card { padding-top: 112px; padding-bottom: 44px; } }
.cs-actions .text-link { color: var(--accent-ink); }
.wl-form { display: grid; gap: 18px; }
.wl-field { display: grid; gap: 8px; }
.wl-label { color: var(--ink); font-size: .95rem; font-weight: 600; }
.wl-input {
  width: 100%;
  min-height: 54px;
  border: 1.5px solid var(--wl-line);
  border-radius: 14px;
  padding: 0 16px;
  background: var(--wl-field);
  color: var(--ink);
  font-size: 1.0625rem;
  line-height: 1.2;
  transition: border-color var(--dur-enter) ease, box-shadow var(--dur-enter) ease;
}
.wl-input::placeholder { color: var(--ink-3); opacity: 1; }
.wl-input:hover { border-color: var(--ink-2); }
.wl-input:focus { border-color: var(--ink); }
.wl-input[aria-invalid="true"] { border-color: var(--danger-ink); box-shadow: 0 0 0 1px var(--danger-ink); }
.wl-input[readonly] { color: var(--ink-2); }
.wl-hint { color: var(--ink-2); font-size: .85rem; line-height: 1.4; }
.wl-error {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--danger-ink);
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.4;
}
.wl-error::before {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin-top: 1px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Ccircle cx='9' cy='9' r='9' fill='%239B2F2A'/%3E%3Cpath d='M9 4.6v5.6' stroke='%23fff' stroke-width='2.2' stroke-linecap='round'/%3E%3Ccircle cx='9' cy='13.2' r='1.3' fill='%23fff'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
  content: "";
}
.wl-suggest {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px 12px;
  background: #F3E5D2;
  color: var(--ink);
  font-size: .92rem;
  line-height: 1.4;
  animation: rise var(--dur-enter) var(--ease-enter) both;
}
.wl-suggest b { overflow-wrap: anywhere; }
.wl-suggest-text:focus { outline: none; }
.wl-suggest-text:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.wl-suggest-actions { display: inline-flex; align-items: center; gap: 6px; }
.wl-suggest-use, .wl-suggest-keep {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0 14px;
  font-size: .88rem;
  font-weight: 600;
}
.wl-suggest-use { background: var(--ink); color: var(--paper); }
.wl-suggest-keep { background: transparent; color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; }
.wl-consent { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 6px 12px; align-items: start; }
.wl-check {
  width: 24px;
  height: 24px;
  margin: 1px 0 0;
  border: 1.5px solid var(--wl-line);
  border-radius: 7px;
  background: var(--wl-field) center / 16px 16px no-repeat;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: background-color var(--dur-micro) ease, border-color var(--dur-micro) ease;
}
.wl-check:checked {
  border-color: var(--ink);
  background-color: var(--ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FBF7F1' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
.wl-check[aria-invalid="true"] { border-color: var(--danger-ink); box-shadow: 0 0 0 1px var(--danger-ink); }
.wl-consent label { color: var(--ink); font-size: .95rem; line-height: 1.45; cursor: pointer; }
.wl-consent-detail, .wl-consent .wl-error { grid-column: 2; }
.wl-consent-detail { color: var(--ink-2); font-size: .82rem; line-height: 1.45; }
.wl-consent-detail a, .wl-nojs a { color: var(--accent-ink); font-weight: 600; text-underline-offset: 3px; }
.wl-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.wl-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid rgba(155, 47, 42, .35);
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--danger-bg);
  color: var(--danger-ink);
  font-size: .92rem;
  font-weight: 600;
  line-height: 1.45;
  animation: rise var(--dur-enter) var(--ease-enter) both;
}
.wl-alert .icon { width: 18px; height: 18px; margin-top: 2px; stroke-width: 2.4; }
.wl-submit { min-height: 54px; margin-top: 2px; }
.wl-submit[aria-disabled="true"] { cursor: progress; }
.wl-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
}
.waitlist-card[data-state="submitting"] .wl-spinner { display: inline-block; animation: wlSpin 800ms linear infinite; }
@keyframes wlSpin { to { transform: rotate(360deg); } }
.wl-done { display: grid; justify-items: center; gap: 12px; padding: 6px 4px 4px; text-align: center; animation: rise 520ms var(--ease-settle) both; }
.wl-done-check {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--trust-bg);
  box-shadow: inset 0 0 0 1.5px var(--trust-ink);
}
.wl-done-check svg { width: 28px; height: 28px; fill: none; stroke: var(--trust-ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; animation: wlDraw 600ms var(--ease-settle) 200ms both; }
@keyframes wlDraw { from { stroke-dashoffset: 24; } to { stroke-dashoffset: 0; } }
.wl-done-title { margin: 0; font-family: var(--font-display); font-size: 1.75rem; font-weight: 600; line-height: 1.1; letter-spacing: -.014em; }
.waitlist-card[data-state="done"] .arch-sub { display: none; }
/* Focus is moved here by script only (the heading is not interactive), so no ring is drawn. */
.wl-done-title:focus, .wl-done-title:focus-visible { outline: none; }
.wl-done-body { max-width: 36ch; color: var(--ink-2); font-size: 1rem; line-height: 1.55; }
.wl-done-body strong { color: var(--ink); overflow-wrap: anywhere; }
.wl-done-note { max-width: 36ch; color: var(--ink-2); font-size: .85rem; line-height: 1.45; }
.wl-reset { color: var(--accent-ink); }
.waitlist .waitlist-card .tag-building { color: var(--accent-ink); }
.wl-preview { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 8px; margin-top: 18px; color: var(--ink-2); font-size: .8rem; line-height: 1.45; text-align: center; }
.wl-nojs { display: none; color: var(--ink-2); font-size: .95rem; line-height: 1.5; text-align: center; }
/* The form only appears once waitlist.js is running, so it can never submit natively. */
html.no-js .wl-nojs, html.js .waitlist-card:not(.is-ready) .wl-nojs { display: block; }
html.no-js .wl-form, html.js .waitlist-card:not(.is-ready) .wl-form { display: none; }
.waitlist.is-joined .hearth-glow { opacity: 1; transform: translate(10%, -50%) scale(1.1); }
.waitlist.is-joined .waitlist-card { box-shadow: 0 0 0 1px rgba(255, 220, 180, .45), 0 50px 150px -24px rgba(224, 120, 47, .62), 0 30px 60px -30px rgba(0, 0, 0, .8); }
.waitlist.is-joined .arch-crown .mark::before { opacity: 1; transform: scale(1.45); }

/* ==========================================================================
   FOOTER · 10:00 PM
   ========================================================================== */
.site-footer {
  padding: 72px 0 calc(32px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--night);
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 56px; }
.footer-grid > div { display: grid; align-content: start; gap: 8px; }
.footer-grid p { color: var(--ink-e2); font-size: .95rem; }
.footer-grid strong { margin-bottom: 4px; font-size: .95rem; }
.footer-grid a { width: fit-content; color: var(--ink-e2); font-size: .95rem; text-decoration: none; }
.footer-grid a:hover { color: var(--ink-e); text-decoration: underline; text-underline-offset: 4px; }
.footer-grid p a { color: var(--ink-e); text-decoration: underline; text-underline-offset: 3px; }
.footer-brand { margin-bottom: 6px; color: var(--ink-e) !important; }
.legal-line {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 32px;
  margin-top: 52px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
  color: #8F8780;
  font-size: .8rem;
}
.legal-line p:nth-child(3) { grid-column: 2; }

/* ==========================================================================
   Reveal system
   ========================================================================== */
html.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--dur-reveal) ease var(--rd, 0ms), transform var(--dur-reveal) var(--ease-settle) var(--rd, 0ms);
}
html.js .reveal.is-visible { opacity: 1; transform: none; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1120px) {
  .desktop-nav { gap: 22px; }
  .states { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .status-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .how-stage { grid-template-columns: auto; justify-items: center; }
  .history { display: none; }
}

@media (max-width: 959px) {
  :root { --gutter: 24px; }
  .desktop-nav { display: none; }
  .nav-shell { grid-template-columns: 1fr auto; }
  .menu-button { display: grid; }

  .hero-grid { grid-template-columns: 1fr; min-height: 0; gap: 56px; }
  .hero-title { max-width: 13ch; }
  .hero-device .device { --device-w: min(320px, 86vw); }
  .hero-annotation { position: static; justify-content: center; margin-top: 14px; }
  .hero-annotation .leader { width: 20px; }
  .hero-annotation .note { max-width: none; }

  .why-grid { grid-template-columns: 1fr; gap: 48px; }
  .why-fine { text-align: left; }
  .table { max-width: 620px; width: 100%; margin-inline: auto; }

  .how-layout { display: flex; flex-direction: column; gap: 0; }
  .how-stage {
    position: sticky;
    top: var(--header-h);
    z-index: 3;
    order: -1;
    display: block;
    margin-inline: calc(var(--gutter) * -1);
    padding: 16px var(--gutter) 0;
    background: linear-gradient(180deg, var(--afternoon) 86%, rgba(247, 244, 238, 0));
  }
  .how-figure { position: relative; height: var(--stage-h, min(56svh, 470px)); overflow: hidden; align-content: start; }
  .how-figure::after { position: absolute; right: 0; bottom: 0; left: 0; height: 64px; background: linear-gradient(180deg, rgba(247, 244, 238, 0), var(--afternoon)); content: ""; pointer-events: none; }
  .how-figure figcaption { position: absolute; bottom: 14px; z-index: 2; }
  .how-stage .device { --device-w: min(340px, 84vw); }
  .how-stage .device-screen { font-size: 4.05cqi; }
  .how-stage .earlier { display: none; }
  .how-steps { padding: 0 0 12svh; }
  .how-steps::before { top: 0; bottom: 12svh; }
  .how-step { min-height: calc(100svh - var(--header-h) - var(--stage-h, min(56svh, 470px)) - 16px); padding-left: 26px; }
  .how-step h3 { font-size: clamp(1.6rem, 1.2rem + 2vw, 2.2rem); }

  .your-call { grid-template-columns: 1fr; }
  .receipt { transform: none; }
  .principles { grid-template-columns: 1fr; }
  .principle, .principle + .principle { border-left: 0; padding: 24px 0 18px; }
  .principle + .principle { border-top: 1px solid var(--line-strong); }

  .demo-heading { grid-template-columns: 1fr; }
  .demo-shell { grid-template-columns: 1fr; }
  .demo-household { border-right: 0; border-bottom: 1px solid var(--line); }
  .family-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }

  .tonight-grid { grid-template-columns: 1fr; gap: 48px; }
  .tonight-copy { order: -1; }
  .waitlist-grid { grid-template-columns: 1fr; }
  .waitlist-card { justify-self: center; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
}

@media (max-width: 640px) {
  :root { --header-h: 58px; --gutter: 20px; }
  .brand { font-size: 1.3rem; }
  .nav-cta { display: none; }

  .hero { padding-top: 32px; }
  .hero-title { font-size: clamp(2.6rem, 10.8vw, 3.4rem); letter-spacing: -.026em; }
  .hero-lead { margin-top: 22px; font-size: 1.0625rem; }
  .button-row { margin-top: 28px; }
  .button-row .button-primary { flex: 1 1 100%; }
  .button-row .button-secondary { flex: 1 1 100%; }
  .hero-follow { margin-top: 30px; }
  .window-light { width: 120%; left: -30%; }
  .pane-b { display: none; }
  .pane-a { width: 34%; left: 30%; }
  .hero-device { gap: 14px; }

  h2 { font-size: clamp(2rem, 8.6vw, 2.6rem); }

  .site-header { background: rgba(243, 234, 221, .98); }
  .site-header[data-tone="afternoon"] { background: rgba(247, 244, 238, .98); }
  .site-header[data-tone="golden"] { background: rgba(244, 228, 206, .98); }
  .site-header[data-tone="dusk"], .site-header[data-tone="evening"] { background: rgba(22, 17, 14, .98); }
  .site-header[data-tone="night"] { background: rgba(15, 12, 10, .98); }
  .why-stage { padding: 72px 0 64px; }
  .table { height: 640px; }
  .table .memory-card { top: 63%; }
  .frag { width: 60%; font-size: .85rem; }
  .frag-text { width: 56%; }
  .frag-sticky { width: 50%; font-size: 1.05rem; }
  .frag-flyer { width: 54%; }
  .memory-card { width: 100%; }
  .frag-note { top: auto; bottom: -6px; right: 0; left: 0; max-width: none; }

  .how-step p:last-child { font-size: 1rem; }

  .call-actions .button { flex: 1 1 auto; }
  .call-reset { margin-left: 0; }
  .receipt { padding: 22px 20px 18px; }
  .perforation { margin-inline: -20px; }
  .receipt-rows > div { grid-template-columns: 84px 1fr; gap: 10px; }
  .states {
    display: flex;
    gap: 12px;
    margin-inline: calc(var(--gutter) * -1);
    padding: 2px var(--gutter) 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
  }
  .states::-webkit-scrollbar { display: none; }
  .state-card { flex: 0 0 78%; scroll-snap-align: start; }

  .dusk { min-height: 52svh; }

  .demo-shell { width: calc(100% - 2 * var(--gutter) + 16px); max-width: none; margin-inline: auto; border-radius: 22px; }
  .demo-household { padding: 20px 16px 18px; }
  .demo-household h3 { margin-bottom: 16px; font-size: 1.4rem; }
  .family-list { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .family-list li { flex-direction: column; gap: 6px; text-align: center; }
  .family-list strong { font-size: .88rem; }
  .family-list small { font-size: .74rem; }
  .knows { margin-top: 18px; }
  .demo-privacy-note { margin-top: 14px; padding: 12px 14px; }
  .demo-chat { min-height: 0; }
  .demo-chat-header, .prompt-chips, .chat-log, .demo-form, .demo-footer-line { padding-left: 16px; padding-right: 16px; }
  .demo-complete { margin-inline: 16px; }
  .prompt-chips { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 8px; scrollbar-width: none; }
  .prompt-chips::-webkit-scrollbar { display: none; }
  .prompt-chips button { flex: 0 0 auto; scroll-snap-align: start; }
  .chat-log { max-height: 56svh; }
  .demo-form { grid-template-columns: 1fr; }
  .demo-form .button { width: 100%; }
  .demo-footer-line { flex-direction: column; }

  .status-list { grid-template-columns: 1fr; }
  .waitlist-card { border-radius: 50% 50% 22px 22px / 130px 130px 22px 22px; padding: 46px 18px 18px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .footer-grid a { min-height: 32px; display: inline-flex; align-items: center; }
  .legal-line { grid-template-columns: 1fr; }
  .legal-line p:nth-child(3) { grid-column: auto; }
}

@media (max-width: 640px) and (max-height: 700px) {
  .how-stage .device { --device-w: min(300px, 80vw); }
}

/* Hover-capable refinements */
@media (hover: hover) and (pointer: fine) {
  .state-card { transition: transform var(--dur-enter) var(--ease-enter); }
  .state-card:hover { transform: translateY(-3px); }
}

/* ==========================================================================
   Validation fixes (V5 audit, 2026-10-15)
   ========================================================================== */
/* Scattered "Why" fragments must never widen the mobile layout viewport. */
.why { overflow-x: clip; }
.answer, .dusk-line, .verdict { text-wrap: balance; }
.receipt-rows dd, .form-fallback, .caption { text-wrap: pretty; }
.frag-flyer .frag-body { padding-right: 4.6em; }

/* Hero annotation sits beside the phone only where there is room for it. */
@media (max-width: 1479px) {
  .hero-annotation { position: static; width: auto; justify-content: center; margin-top: 14px; }
  .hero-annotation .leader { width: 20px; }
  .hero-annotation .note { max-width: none; }
}
@media (min-width: 960px) and (max-width: 1099px) {
  .why .frag-email { --ty: -24% !important; }
}

/* Mobile/tablet How stage: crop the device, keep the caption on a solid strip below it. */
@media (max-width: 959px) {
  .how { --crop-h: min(52svh, 440px); }
  .how-stage { padding-bottom: 4px; background: var(--afternoon); box-shadow: 0 12px 14px -14px rgba(30, 23, 19, .28); }
  .how-figure { height: auto; overflow: visible; }
  .how-figure::after { display: none; }
  .how-stage .device { height: var(--crop-h); overflow: hidden; }
  .how-stage .device::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 30;
    height: 56px;
    background: linear-gradient(180deg, rgba(247, 244, 238, 0), var(--afternoon));
    content: "";
    pointer-events: none;
  }
  .how-figure figcaption { position: static; padding: 6px 0 4px; }
  .how-step { min-height: calc(100svh - var(--header-h) - var(--crop-h) - 72px); padding-top: 18px; padding-bottom: 18px; }
  .how-stage .screen-capture .bubble-haven, .how-stage .talk-label { display: none; }
  .how-stage .screen-capture .talk { margin-top: .2em; }
  .how-stage .screen-act .tonight-list .app-row:not(.new-item),
  .how-stage .screen-act .sheet .mem-rows > div:last-child { display: none; }
}
@media (max-width: 959px) and (max-height: 760px) {
  .how { --crop-h: min(46svh, 360px); }
  .how-step h3 { margin-bottom: 10px; font-size: 1.5rem; }
  .how-step p:last-child { font-size: .98rem; line-height: 1.55; }
  .step-time { margin-bottom: 8px; }
}
/* Landscape phones and high zoom: no sticky stage, the steps read as plain content. */
@media (max-width: 959px) and (max-height: 600px) {
  .how-stage { position: static; box-shadow: none; }
  .how-step { min-height: 0; }
}

@media (max-width: 640px) {
  .frag-text { left: 42%; }
  .frag-flyer { left: 44%; }
  .frag-email { left: 1%; }
  .prompt-chips { flex-wrap: wrap; overflow-x: visible; scroll-snap-type: none; }
  .prompt-chips button { flex: 0 1 auto; scroll-snap-align: none; }
  .states { display: grid; grid-template-columns: 1fr; margin-inline: 0; padding: 0; overflow: visible; }
  .state-card { flex: none; }
  .hero-annotation .note { color: var(--ink); }
}
@media (max-width: 380px) {
  .memory-row { flex-wrap: wrap; }
  .memory-row .state { margin-left: calc(2.1em + 12px); }
}
@media (max-width: 360px) {
  .demo-chat-header { flex-wrap: wrap; padding-block: 12px; }
  .knows-count { white-space: nowrap; }
}

/* No-JS: show the How walkthrough as plain content */
html.no-js .how-step { opacity: 1; }
html.no-js .table { --p: 1; }
html.no-js .demo-form { display: none; } /* the demo needs JavaScript; never submit natively */

/* Footer signature: the brand line. */
.footer-grid .footer-tagline { margin-top: 2px; color: var(--ink-e); font-family: var(--font-display); font-size: 1rem; font-weight: 600; letter-spacing: -.005em; }

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 120ms !important;
    transition-delay: 0ms !important;
  }
  html.js .reveal { opacity: 1; transform: none; }
  .window-light { transform: skewX(-14deg) !important; }
  .shafts span { transform: skewX(32deg) !important; }
  .frag, .memory-card { transition: none !important; }
  .device.is-listening .island-wave i, .device.is-listening .talk-ring { animation: none !important; }
  .typing-dots span { animation: none !important; opacity: .7; }
}

@media (forced-colors: active) {
  /* !important: these must beat the tone / card variants, so the mark is one system colour everywhere. */
  .mark, .app-mark, .mark-mini { --mk-roof: CanvasText !important; --mk-sun: CanvasText !important; --mk-hill-l: CanvasText !important; --mk-hill-r: CanvasText !important; --mk-road: transparent !important; }
  .state, .tag, .app-card, .mem-card, .receipt, .state-card, .status-card { border: 1px solid CanvasText; }
  .window-light, .sun-wash, .shafts, .hearth-glow, .lamp-bloom { display: none; }
}

@media (forced-colors: active) {
  .call-actions .button[aria-pressed="true"] { outline: 2px solid CanvasText; outline-offset: 3px; }
  .desktop-nav a.is-active::after { background: LinkText; forced-color-adjust: none; }
}
@media (prefers-reduced-motion: reduce) {
  .window-light, .shafts span, .day-rail-dot, .frag { will-change: auto !important; }
}

@media (prefers-reduced-motion: reduce) {
  .waitlist-card[data-state="submitting"] .wl-spinner { animation: none !important; border-right-color: currentColor; opacity: .6; }
  .wl-done-check svg { animation: none !important; }
}

@media (forced-colors: active) {
  /* Let the system draw the checkbox so its ticked state is visible in every contrast theme. */
  .wl-check { width: 20px; height: 20px; appearance: auto; -webkit-appearance: checkbox; background-image: none !important; }
  .wl-error::before { forced-color-adjust: none; }
}

/* 404 page (launch readiness, 2026-10-21). */
.nf-main { min-height: calc(100vh - var(--header-h)); display: grid; align-items: center; padding: clamp(56px, 10vh, 120px) 0; background: var(--morning); }
.nf-inner { max-width: 640px; }
.nf-title { margin-bottom: 18px; font-size: clamp(2.4rem, 1.4rem + 3.4vw, 4rem); line-height: 1.02; letter-spacing: -.024em; }
.nf-links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 30px; }
