/* spendrest.com (D143). Light paper, one bright green, and the app's deep green night for the pause.
   Colors come from the app (brand.css tokens and PauseNight.swift). Light only: the site has one look.
   Motion: transform and opacity only, running only while on screen (.on), and still with Reduce Motion. */

:root {
  color-scheme: light;
  --paper: #F6F8F7;
  --paper-2: #EEF2EF;
  --card: #FFFFFF;
  --ink: #14231B;
  --ink-2: #4F5D55;
  --line: #E1E6E2;
  --green: #0B7F53;          /* links, small accents (AA on paper) */
  --green-bright: #1FCB7A;   /* D135 bright fill: buttons, the mark's light (a touch brighter, Joey 2026-12-03) */
  --green-vivid: #0C9A5C;    /* icons on white and paper: 3.6:1, past the 3:1 AA line for graphics */
  --on-bright: #062615;
  --mint: #E8F7EE;
  --sys: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Helvetica Neue", Arial, sans-serif;
  --night-top: #0D3326;      /* PauseNight.swift */
  --night-bottom: #061A13;
  --night-glow: #9FE8C4;
  --night-ink: #EEF3EF;
  --night-ink-2: #B3BFB8;
  --scheduled: #3B55C9;
  --lockdown: #E2A93B;
  /* Type (D156, brand/BRAND_GUIDELINES.md "Typography"): Bricolage Grotesque for the whole site. --display is set a step
     heavier than --body; optical sizing does the rest (big headings get tighter, small text opens up). */
  --display: "Bricolage Grotesque", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --body: "Bricolage Grotesque", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --weight-display: 600;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);          /* entrances and settles */
  --ease-back: cubic-bezier(0.175, 0.885, 0.32, 1.275); /* a small overshoot for the lock */
  --wrap: 1160px;
  --gutter: 24px;
}
@media (max-width: 640px) { :root { --gutter: 20px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
a { color: var(--green); text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: var(--display); font-weight: var(--weight-display); letter-spacing: -0.025em; }
h3 { font: 600 1.1875rem/1.3 var(--body); letter-spacing: -0.01em; }
:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 3px; border-radius: 8px; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.lede { font-size: clamp(1.0625rem, 1.2vw + 0.6rem, 1.3125rem); line-height: 1.5; color: var(--ink-2); max-width: 34em; }
.fine { font-size: 0.875rem; color: var(--ink-2); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; }
.skip:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 26px; border-radius: 999px; border: 0; cursor: pointer;
  font: 600 1rem/1 var(--body); text-decoration: none; white-space: nowrap;
  transition: transform 150ms var(--ease), background-color 150ms, box-shadow 150ms;
}
.btn:active { transform: scale(0.97); }
.btn-go { position: relative; overflow: hidden; isolation: isolate; background: var(--green-bright); color: var(--on-bright); }
.btn-go:hover { background: #33D98A; }
/* A thin band of light crosses the button every few seconds (an idea from Magic UI's shiny button, in plain CSS). */
.btn-go::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.55) 50%, transparent 65%);
  transform: translateX(-120%); animation: shine 5.5s var(--ease) 1.2s infinite; }
@keyframes shine { 0% { transform: translateX(-120%); } 28%, 100% { transform: translateX(120%); } }
.btn-sm::after { animation: none; }
/* The secondary action is a plain link with an arrow that steps forward on hover. */
.btn-link { display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 6px; color: var(--ink); font: 600 1rem/1 var(--body); text-decoration: none; }
.btn-link .arr { display: inline-block; color: var(--green-vivid); transition: transform 200ms var(--ease); }
.btn-link:hover .arr { transform: translateX(4px); }
.btn-link:hover { text-decoration: underline; text-decoration-color: var(--green-vivid); text-decoration-thickness: 2px; }
@media (prefers-reduced-motion: reduce) { .btn-go::after { animation: none; display: none; } .btn-link .arr { transition: none; } }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 0.9375rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Header ---------- */
/* The header is a floating glass pill (Living Glass): 10px from the top + a 58px pill = the same 68px the hero tucks under. */
.site-header { position: sticky; top: 0; z-index: 20; padding-top: 10px; }
.bar {
  display: flex; align-items: center; gap: 24px; height: 58px; padding: 0 9px 0 14px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.78); border: 1px solid rgba(20, 35, 27, 0.08); /* solid enough to read over the art and the dark phone */
  -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px);
  box-shadow: 0 10px 30px -18px rgba(20, 35, 27, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: background-color 250ms, box-shadow 250ms;
}
.site-header.scrolled .bar { background: rgba(255, 255, 255, 0.93); box-shadow: 0 14px 34px -18px rgba(20, 35, 27, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.7); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .bar, .site-header.scrolled .bar { background: rgba(255, 255, 255, 0.94); } }
@media (prefers-reduced-transparency: reduce) { .bar, .site-header.scrolled .bar { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; } }
@media (max-width: 440px) { .bar { gap: 12px; padding: 0 5px 0 8px; } .bar-end { gap: 10px !important; } .bar-end .btn-sm { padding: 0 12px !important; font-size: 0.8125rem !important; letter-spacing: -0.01em; } } /* Spanish's longer button still fits the pill */
.cta-short { display: none; }
@media (max-width: 600px) { .bar .cta-long { display: none; } .bar .cta-short { display: inline; } } /* the header button says less on phones; the page's own buttons keep the full words */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 600 1.125rem/1 var(--body); letter-spacing: -0.02em; }
.brand img { flex-shrink: 0; width: 32px; height: 32px; border-radius: 8px; box-shadow: 0 2px 6px rgba(20, 35, 27, 0.18); }
.nav { display: flex; gap: 24px; margin-left: 12px; }
.nav a, .lang { color: var(--ink-2); text-decoration: none; font-size: 0.9375rem; }
.nav a:hover, .lang:hover { color: var(--ink); }
.bar-end { margin-left: auto; display: flex; align-items: center; gap: 16px; }
@media (max-width: 1080px) { .nav { display: none; } } /* Spanish labels need about 1,000px in the glass bar */
@media (max-width: 420px) { .bar-end { gap: 12px; } .brand { gap: 8px; font-size: 1rem; } } /* Bricolage runs wider: the name steps down so Spanish's button stays inside the bar */
@media (max-width: 370px) { .brand span { display: none; } }
@media (max-width: 400px) { html[lang^="es"] .bar .brand span { display: none; } } /* Spanish's button is longer: the mark alone carries the name */

/* ---------- The S mark (two arcs, a gap that breathes) ---------- */
.mark { display: block; overflow: visible; }
.mark path { fill: none; stroke: currentColor; stroke-width: 88; stroke-linecap: round; }
.mark .top, .mark .bottom { transform-box: view-box; }
.breathing .mark .top { animation: s-top 10s infinite; }
.breathing .mark .bottom { animation: s-bottom 10s infinite; }
/* 4 seconds in (the halves open), 6 seconds out (they close). */
@keyframes s-top { 0%, 100% { transform: translate(0, 0); animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1); } 40% { transform: translate(-14px, -30px); animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1); } }
@keyframes s-bottom { 0%, 100% { transform: translate(0, 0); animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1); } 40% { transform: translate(14px, 30px); animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1); } }

/* Animations wait until their section is on screen; site.js adds .js to <html> and .on to the section.
   Without the script nothing is paused, so the headline never stays hidden. */
.js .anim, .js .anim * { animation-play-state: paused !important; }
.anim.on, .anim.on * { animation-play-state: running !important; }

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; margin-top: -68px; padding: 108px 0 88px; overflow: hidden; } /* runs up under the transparent header */
.hero::before { /* Moi's green wave artwork, fading into the page at the bottom */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(246, 248, 247, 0) 70%, var(--paper) 100%),
              url("/img/hero/waves.jpg") center bottom / cover no-repeat;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: 48px; }
.hero-copy { display: grid; gap: 28px; }
.hero-copy .soon { justify-self: start; }
.soon { position: relative; display: inline-flex; padding: 1.5px; border-radius: 999px; overflow: hidden; isolation: isolate;
  box-shadow: 0 8px 24px -14px rgba(12, 154, 92, 0.45); }
.soon::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 50%; width: 140%; aspect-ratio: 1; translate: -50% -50%;
  background: conic-gradient(var(--green-vivid), #1FCB7A, #CFF5DF, #1FCB7A, var(--green-vivid)); /* a green sweep: the old rainbow read as a template */
  animation: ring-turn 7s linear infinite; }
.soon-in { display: inline-flex; align-items: center; gap: 10px; padding: 6px 16px 6px 6px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.92); font: 600 0.9375rem/1.2 var(--body); color: var(--ink); }
.soon-in img { width: 30px; height: 30px; border-radius: 8px; }
@keyframes ring-turn { to { rotate: 360deg; } }
.js .anim .soon::before { animation-play-state: paused; } /* pseudo-elements aren't matched by .anim *, so the ring pauses off screen here */
.anim.on .soon::before { animation-play-state: running; }
.hero h1 { font-size: clamp(2.75rem, 4.6vw, 4.5rem); line-height: 0.98; letter-spacing: -0.03em; }
@media (max-width: 720px) { .hero h1 { font-size: min(10.4vw, 3.25rem); } } /* each line of the headline stays on one line on a phone */
.hero h1 .line { display: block; overflow: hidden; padding-bottom: 0.08em; }
.hero h1 .line > span { display: inline-block; animation: rise 900ms var(--ease) both; }
.hero h1 .line:nth-child(2) > span { animation-delay: 90ms; }
@keyframes rise { from { transform: translateY(105%); } to { transform: none; } }
.store-slot img { height: 52px; width: auto; }

.hero-visual { position: relative; display: grid; place-items: center; min-height: 640px; padding-top: 32px; }
/* Real app icons orbit the phone. Each sits at a pixel offset from the phone's centre (--dx/--dy, --mx/--my on phones),
   so the ring keeps its shape at every width. "near" shows from 641px, "far" from 1280px, "m" is the phone set. */
.hero-visual .phone { z-index: 1; }
.apps { position: absolute; inset: 0; pointer-events: none; }
.app-i {
  --x: var(--dx); --y: var(--dy);
  position: absolute; left: calc(50% + var(--x) * 1px); top: calc(50% + 16px + var(--y) * 1px);
  --k: 0.86; /* one size knob: the icons stay where they are and the gaps between them grow */
  width: calc(var(--s) * var(--k) * 1px); height: calc(var(--s) * var(--k) * 1px); margin: calc(var(--s) * var(--k) * -0.5px) 0 0 calc(var(--s) * var(--k) * -0.5px);
  border-radius: 23%; box-shadow: 0 10px 24px -14px rgba(20, 35, 27, 0.3), 0 2px 6px -3px rgba(20, 35, 27, 0.12);
  animation: pop 900ms var(--ease) both, float 14s ease-in-out infinite;
  animation-delay: calc(240ms + var(--i) * 45ms), calc(var(--d) * -1s);
}
/* A faint glass rim, so the icons sit in the Living Glass light instead of on top of it. */
.app-i::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.35); pointer-events: none; }
.app-i img { display: block; width: 100%; height: 100%; border-radius: inherit; filter: saturate(0.88); }
.app-i.wide img { opacity: 0.85; }
.app-i.far { --k: 0.8; box-shadow: 0 8px 18px -12px rgba(20, 35, 27, 0.2); }
.app-i.far img { opacity: 0.5; filter: saturate(0.7); }
/* The ring turns: the near icons swing slowly around the phone and back, each kept upright.
   A swing, not a full orbit, so the icons beside the headline move up and down and never cross the text. */
@media (min-width: 1280px) { /* narrower layouts keep the float only: the ring sits too close to the text there */
  .app-i.near {
    transform-origin: calc((var(--s) * var(--k) * 0.5 - var(--x)) * 1px) calc((var(--s) * var(--k) * 0.5 - var(--y)) * 1px); /* the phone's centre */
    animation: pop 1100ms var(--ease) both, float 14s ease-in-out infinite, swing 36s ease-in-out infinite alternate;
    animation-delay: calc(240ms + var(--i) * 45ms), calc(var(--d) * -1s), -18s;
  }
  .app-i.near img { animation: swing-back 36s ease-in-out infinite alternate; animation-delay: -18s;
    filter: saturate(0.88) drop-shadow(0 8px 10px rgba(20, 35, 27, 0.2)); }
  .app-i.near { box-shadow: none; } /* the shadow and rim would tilt with the swing; the upright image carries the shadow instead */
  .app-i.near::after { display: none; }
}
@keyframes swing { from { rotate: -14deg; } to { rotate: 14deg; } }
@keyframes swing-back { from { rotate: 14deg; } to { rotate: -14deg; } }
.app-i.far, .app-i.wide { display: none; }
@media (min-width: 961px) { .app-i.wide { display: block; } }
@media (min-width: 1280px) { .app-i.far { display: block; } }
@media (max-width: 1399px) { .app-i.edge { display: none; } } /* the outer right icons need the wider margin */
@media (min-width: 641px) and (max-width: 1279px) { .app-i { --x: calc(var(--dx) * 0.82); } } /* a tighter ring, so no icon is cut off at the screen edge */
@keyframes pop { from { opacity: 0; scale: 0.6; } to { opacity: 1; scale: 1; } }
@keyframes float { 0%, 100% { transform: translate(0, 0) rotate(-1deg); } 50% { transform: translate(3px, -8px) rotate(1deg); } }

/* ---------- Phone ---------- */
.phone {
  position: relative; width: 300px; aspect-ratio: 9 / 19.2; border-radius: 48px; padding: 10px;
  background: linear-gradient(160deg, #26302B, #0C120F); box-shadow: 0 40px 80px -30px rgba(6, 26, 19, 0.55), inset 0 0 0 1.5px rgba(255, 255, 255, 0.12);
}
.phone::before { /* the island */
  content: ""; position: absolute; top: 20px; left: 50%; width: 88px; height: 26px; margin-left: -44px; border-radius: 20px; background: #050807; z-index: 3;
}
.screen {
  position: relative; height: 100%; border-radius: 39px; overflow: hidden; color: var(--night-ink);
  background: linear-gradient(var(--night-top), var(--night-bottom));
  display: flex; flex-direction: column; align-items: center; text-align: center; padding: 64px 22px 26px;
}
.screen::before, .screen::after { /* the app's aurora, drifting on slow loops */
  content: ""; position: absolute; border-radius: 50%; filter: blur(34px); pointer-events: none;
}
.screen::before { width: 120%; height: 30%; left: -30%; top: -12%; background: rgba(61, 214, 140, 0.22); animation: aurora-a 23s ease-in-out infinite; }
.screen::after { width: 110%; height: 26%; right: -40%; bottom: -10%; background: rgba(159, 232, 196, 0.14); animation: aurora-b 31s ease-in-out infinite; }
@keyframes aurora-a { 50% { transform: translateX(22%); } }
@keyframes aurora-b { 50% { transform: translateX(-24%); } }
.screen > * { position: relative; z-index: 1; }
/* The shield iOS draws (ShieldConfigurationExtension.swift): paper, the mode's badge, ink title, grey line,
   a filled green button and a text-only green one. No app icon and no dark background. */
/* The shield is drawn by iOS in the system font, so its replica uses it too. The pause screen's title is the app's
   Bricolage heading (srDisplay); everything else on it, the person's note included, is SF Pro. */
.screen.shield, .screen.pausev { font-family: var(--sys); }
.screen.shield { background: #F6F8F7; color: #14231B; padding-top: 128px; }
.screen.shield::before, .screen.shield::after { display: none; }
.shield .badge { width: 72px; height: 72px; display: block; }
.sh-title { margin-top: 18px; font: 600 1.25rem/1.25 var(--sys); letter-spacing: -0.01em; }
.sh-body { margin-top: 8px; font-size: 0.875rem; line-height: 1.45; color: #4F5D55; max-width: 15em; }
.shield .ph-actions { gap: 4px; }
.shield .ph-btn { font-family: var(--sys); }
.shield :focus-visible { outline-color: #0B7F53; } /* the bright green ring is too faint on paper */
.shield .ph-primary { background: #0B7F53; color: #fff; border-radius: 14px; display: grid; place-items: center; }
.shield .ph-primary:hover { background: #096B46; }
.shield .ph-secondary { background: none; color: #0B7F53; display: grid; place-items: center; }
.shield .ph-secondary:hover { background: rgba(11, 127, 83, 0.08); }
.shield.show > * { animation: swap 360ms var(--ease) both; }
/* The app's pause screen after Start reflection (PauseView): title, the note, breathing or a countdown, two buttons. */
.screen.pausev { padding-top: 58px; }
.pv-title { font: 700 1.5rem/1.15 var(--display); letter-spacing: -0.015em; }
.pv-sub { margin-top: 6px; font-size: 0.8125rem; color: var(--night-ink-2); }
.pv-kicker { margin-top: 14px; font: 600 0.625rem/1.2 var(--sys); letter-spacing: 0.08em; text-transform: uppercase; color: var(--night-ink-2); }
.pv-note { margin-top: 4px; font: italic 400 1.0625rem/1.3 var(--sys); }
.pv-stage { flex: 1; width: 100%; display: grid; place-items: center; align-content: center; gap: 4px; }
.pv-stage .breath { width: 120px; margin: 0 0 8px; }
.pv-stage .breath.go img { animation-duration: 12s; } /* one breath across the whole countdown */
.pv-count { font: 300 1.75rem/1 var(--sys); font-variant-numeric: tabular-nums; }
.pv-word { font-size: 0.8125rem; color: var(--night-ink-2); min-height: 1.3em; }
.pv-ring { position: relative; width: 124px; height: 124px; }
.pv-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.pv-ring circle { fill: none; stroke-width: 3; }
.pv-ring .bg { stroke: rgba(255, 255, 255, 0.14); }
.pv-ring .fg { stroke: #4BD18E; stroke-linecap: round; stroke-dasharray: 364.4; transition: stroke-dashoffset 1s linear; }
.pv-ring .n { position: absolute; inset: 0; display: grid; place-items: center; font: 300 2.5rem/1 var(--sys); font-variant-numeric: tabular-nums; }
.pv-ring .check { width: 40px; height: 40px; fill: none; stroke: #4BD18E; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; transform: none; }
.pv-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pv-btn { min-height: 48px; padding: 4px 8px; border-radius: 999px; border: 1.5px solid rgba(238, 243, 239, 0.6); background: rgba(255, 255, 255, 0.06); color: var(--night-ink); font: 600 0.8125rem/1.15 var(--sys); cursor: pointer; }
.pv-btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.12); }
.pv-btn:disabled { color: rgba(238, 243, 239, 0.45); border-color: rgba(238, 243, 239, 0.18); cursor: default; }
.pv-link { background: none; border: 0; padding: 6px; font: 600 0.875rem/1.2 var(--sys); color: #4BD18E; cursor: pointer; }
.pv-actions + .pv-link { margin-top: 8px; }
.pv-out { margin: auto 0; display: grid; gap: 8px; }
.pv-actions.one { grid-template-columns: 1fr; }
.ph-actions { margin-top: auto; width: 100%; display: grid; gap: 8px; }
.ph-btn { min-height: 46px; border-radius: 999px; border: 0; font: 600 0.9375rem/1 var(--body); cursor: pointer; transition: transform 150ms var(--ease), background-color 150ms; }
.ph-btn:active { transform: scale(0.97); }
.ph-primary { background: var(--night-ink); color: var(--night-bottom); }
.ph-primary:hover { background: #fff; }
.ph-secondary { background: rgba(255, 255, 255, 0.1); color: var(--night-ink); }
.ph-secondary:hover { background: rgba(255, 255, 255, 0.16); }

/* ---------- Read-along (the page's one pinned moment; scrolling stays native) ---------- */
.readalong { height: 182vh; position: relative; }
.readalong .pin { position: sticky; top: 22vh; height: 56vh; display: grid; align-content: center; gap: 28px; }
.readalong .text { font: 500 clamp(2rem, 4.4vw, 4rem)/1.14 var(--display); letter-spacing: -0.025em; max-width: 20em; }
.readalong .w { opacity: 0.16; transition: opacity 200ms linear; }
.readalong .w.lit { opacity: 1; }
.readalong .w.green { color: var(--green); }
.readalong .w.green.lit { color: var(--green); }

/* ---------- The pause: copy on the left, the live demo on a Living Glass stage ---------- */
.pause { padding: 128px 0 120px; }
.pause-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 72px; align-items: center; }
.pause-copy { display: grid; gap: 20px; align-content: center; }
.pause-copy p { color: var(--ink-2); max-width: 30em; }
.pause-copy p b { color: var(--ink); }
.pause h2, .closing h2 { font-size: clamp(2.75rem, 5vw, 4.5rem); line-height: 1; }
.note-switch { display: grid; gap: 6px; margin-top: 12px; }
.pause-stage { position: relative; display: grid; place-items: center; padding: 64px 24px; border-radius: 36px; overflow: hidden;
  background: url("/img/hero/waves.jpg") 50% 70% / cover no-repeat; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6); }
.toggle { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 600; }
.toggle input { appearance: none; width: 46px; height: 28px; border-radius: 999px; background: #8C9891; position: relative; cursor: pointer; transition: background-color 200ms; margin: 0; }
.toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(20, 35, 27, 0.25); transition: transform 250ms var(--ease); }
.toggle input:checked { background: var(--green); }
.toggle input:focus-visible { outline-color: var(--ink); }
.toggle input:checked::after { transform: translateX(18px); }
.demo-note { margin-top: 18px; text-align: center; }
/* Real app screens under the demo (approved captures; the app icon strip and status bar are cropped off). */
.app-shots { margin-top: 96px; }
.app-shots h3 { font: var(--weight-display) clamp(1.75rem, 2.6vw, 2.25rem)/1.1 var(--display); letter-spacing: -0.02em; }
.app-shots ul { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 300px)); justify-content: center; gap: 56px; }
@media (min-width: 761px) { .app-shots h3, .app-shots span { text-align: center; } } /* a centered row, so it no longer hangs off the left edge under the two-column demo */
.app-shots li { display: grid; gap: 16px; }
.app-shots img { width: 100%; height: auto; border-radius: 28px; box-shadow: 0 30px 50px -34px rgba(6, 26, 19, 0.7); }
.app-shots span { color: var(--ink-2); }
@media (max-width: 760px) { /* a swipeable strip on phones, inside its own box so the page never scrolls sideways */
  .app-shots { margin-top: 64px; }
  .app-shots ul { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
  .app-shots li { flex: 0 0 68%; scroll-snap-align: start; }
}

/* The breath on the demo phone: halo, tide and seed grow as the breath comes in (BreathArt in the app). */
.breath { position: relative; width: 210px; aspect-ratio: 15 / 11; margin: 30px auto 12px; }
.breath img { position: absolute; inset: 0; width: 100%; height: 100%; }
.breath.go .halo { animation: br-halo 10s 1 both; }
.breath.go .tide { animation: br-tide 10s 1 both; }
.breath.go .seed { animation: br-seed 10s 1 both; }
.breath .halo { transform: scale(0.8) rotate(-5deg); }
.breath .tide { transform: scale(0.8) rotate(4deg); }
.breath .seed { transform: scale(0.81); }
@keyframes br-halo { 0% { transform: scale(0.8) rotate(-5deg); animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1); } 40% { transform: scale(1) rotate(0); animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1); } 100% { transform: scale(0.8) rotate(-5deg); } }
@keyframes br-tide { 0% { transform: scale(0.8) rotate(4deg); animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1); } 40% { transform: scale(1) rotate(0); animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1); } 100% { transform: scale(0.8) rotate(4deg); } }
@keyframes br-seed { 0% { transform: scale(0.81); animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1); } 40% { transform: scale(1); animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1); } 100% { transform: scale(0.81); } }
.swap { animation: swap 400ms var(--ease) both; }
@keyframes swap { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Modes ---------- */
.modes { padding: 136px 0 120px; }
.modes-head { display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 28px; margin-bottom: 48px; }
.modes-head img { width: 168px; }
.modes h2, .privacy h2, .people h2 { font-size: clamp(2.5rem, 4.8vw, 4.25rem); line-height: 1.02; }
.mode-side { display: grid; gap: 36px; align-content: center; }
.seg { display: inline-flex; justify-self: start; gap: 4px; padding: 5px; border-radius: 999px; background: var(--paper-2); box-shadow: inset 0 0 0 1px var(--line); max-width: 100%; }
.seg button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 0; background: none; cursor: pointer; font-weight: 600; color: var(--ink-2); white-space: nowrap; transition: background-color 200ms, color 200ms, box-shadow 200ms; }
.seg button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 4px 12px -6px rgba(20, 35, 27, 0.3); }
.glyph { width: 20px; height: 20px; background: currentColor; -webkit-mask: var(--g) center / contain no-repeat; mask: var(--g) center / contain no-repeat; flex: none; }
.g-mindful { --g: url("/img/glyphs/mindful.png"); }
.g-scheduled { --g: url("/img/glyphs/scheduled.png"); }
.g-lockdown { --g: url("/img/glyphs/lockdown.png"); }
.g-note { --g: url("/img/glyphs/future-note.png"); }
.g-guardian { --g: url("/img/glyphs/guardian.png"); }
.g-unlock { --g: url("/img/glyphs/emergency-unlock.png"); }
.g-bank { --g: url("/img/glyphs/bank-link.png"); }
.g-shield { --g: url("/img/glyphs/protection-on.png"); }
.modes-grid { display: grid; grid-template-columns: auto 1fr; gap: 72px; align-items: center; }
.mode-copy { display: grid; gap: 18px; max-width: 30em; }
.mode-copy h3 { font: var(--weight-display) clamp(1.75rem, 2.6vw, 2.25rem)/1.1 var(--display); letter-spacing: -0.02em; }
.mode-copy .need { display: inline-flex; align-items: center; gap: 8px; font-size: 0.9375rem; font-weight: 600; color: var(--green); }
.seg button[data-mode="mindful"] .glyph { color: var(--green-vivid); }
.seg button[data-mode="scheduled"] .glyph { color: var(--scheduled); }
.seg button[data-mode="lockdown"] .glyph { color: #B57A12; }
.caveat { margin-top: 4px; color: var(--ink-2); font-size: 0.9375rem; line-height: 1.55; max-width: 32em; } /* plain fine print; the D93 honesty line stays, the yellow box went (Moi, 2026-12-03) */

/* ---------- A little help: Decide later, a guardian, the Safari pause ---------- */
.people { padding: 40px 0 128px; }
.people-head { display: grid; gap: 16px; margin-bottom: 48px; max-width: 40em; }
.people-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
.panel { border-radius: 32px; padding: 36px; display: grid; gap: 18px; align-content: start; position: relative; overflow: hidden; }
.panel { background: var(--card); box-shadow: 0 0 0 1px var(--line), 0 24px 48px -36px rgba(20, 35, 27, 0.35); }
.panel.later .art { animation-delay: -7s; }
/* Safari's checkout pause, drawn as a small page (copy from MESSAGING.md §9.1) */
.sf-mock { height: 147px; border-radius: 16px; background: #fff; box-shadow: 0 18px 36px -24px rgba(20, 35, 27, 0.45), 0 0 0 1px var(--line); overflow: hidden; display: grid; grid-template-rows: auto 1fr; }
.sf-bar { display: flex; align-items: center; gap: 5px; padding: 8px 12px; background: #F1F3F2; font-size: 0.6875rem; color: var(--ink-2); }
.sf-bar i { width: 7px; height: 7px; border-radius: 50%; background: #D3D8D5; }
.sf-bar span { margin-left: 8px; padding: 2px 10px; border-radius: 999px; background: #fff; }
.sf-pause { margin: 10px 12px 12px; padding: 12px 14px; border-radius: 12px; color: var(--night-ink); background: linear-gradient(var(--night-top), var(--night-bottom)); display: grid; gap: 4px; align-content: start; }
.sf-pause b { font: 600 1rem/1.2 var(--display); }
.sf-pause small { font-size: 0.6875rem; line-height: 1.35; color: var(--night-ink-2); }
.sf-btns { display: flex; gap: 6px; margin-top: 6px; }
.sf-btns em { font-style: normal; font-size: 0.625rem; font-weight: 600; padding: 4px 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); }
.sf-btns em:first-child { background: var(--night-ink); color: var(--night-bottom); }

.panel .art { width: 200px; height: 147px; object-fit: contain; object-position: left center; animation: float 10s ease-in-out infinite; }
.panel.guard .art { animation-delay: -4s; }
.panel p { color: var(--ink-2); }
.ticks-list { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 10px; }
.ticks-list li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink); font-size: 0.9375rem; }
.ticks-list .glyph { color: var(--green-vivid); margin-top: 2px; }

/* ---------- Privacy ---------- */
.privacy { padding: 136px 0 128px; background: #F6F3EA; } /* warm ivory, the brand's paper */
.trust-head { display: grid; gap: 28px; max-width: 920px; }
.privacy .trust-head h2 { font-size: clamp(3rem, 7vw, 6rem); line-height: 0.98; letter-spacing: -0.03em; }
.trust-head .lede { font-size: clamp(1.1875rem, 1.6vw, 1.375rem); line-height: 1.5; max-width: 34em; }
.trust-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 56px 80px; margin-top: 88px; max-width: 1040px; }
.trust-grid h3 { font: var(--weight-display) clamp(1.5rem, 2vw, 1.875rem)/1.15 var(--display); letter-spacing: -0.015em; }
.trust-grid p { margin-top: 12px; color: var(--ink-2); font-size: 1.0625rem; line-height: 1.6; max-width: 30em; }
.faq { margin-top: 88px; display: grid; grid-template-columns: 0.6fr 1.4fr; gap: 72px; }
.faq h3 { position: sticky; top: 110px; align-self: start; font: var(--weight-display) clamp(1.75rem, 2.6vw, 2.25rem)/1.1 var(--display); letter-spacing: -0.02em; }
.faq details { border-top: 1px solid rgba(20, 35, 27, 0.12); }
.faq details:last-child { border-bottom: 1px solid rgba(20, 35, 27, 0.12); }
.faq.folded details:nth-of-type(n+5) { display: none; } /* four questions first; site.js folds the rest behind "More questions" */
.faq-more { margin-top: 24px; min-height: 44px; padding: 0 22px; border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, 0.72); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); font: 600 0.9375rem/1 var(--body); }
.faq-more:hover { background: #fff; }
.faq-more::after { content: " +"; color: var(--green); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; padding: 20px 0; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 1.5rem/1 var(--body); color: var(--green); transition: transform 250ms var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 22px; color: var(--ink-2); max-width: 36em; }

/* ---------- Closing ---------- */
.closing { padding: 136px 0 104px; text-align: center; } /* on paper, like the rest of the page: the night is only for the pause */
.closing .wrap { display: grid; justify-items: center; gap: 24px; }
.closing .big-mark { width: 120px; color: var(--green-bright); margin-bottom: 12px; }
.closing .actions { justify-content: center; margin-top: 8px; }

/* ---------- Footer ---------- */
.site-footer { padding: 56px 0 0; background: var(--paper); }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.foot .tag { margin-top: 14px; font: 500 1.25rem/1.3 var(--display); max-width: 18em; }
.foot nav { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: flex-start; }
.foot nav a { color: var(--ink-2); text-decoration: none; font-size: 0.9375rem; }
.foot nav a:hover { color: var(--ink); }
.copy { margin-top: 40px; font-size: 0.8125rem; color: var(--ink-2); }
/* The footer's sign-off: Moi's valley image, full width, with SpendRest resting in its sky.
   The picture drifts slowly; the wordmark rises in when the footer is reached. Container units size the word. */
.valley { position: relative; margin-top: 56px; aspect-ratio: 16 / 7; overflow: hidden; container-type: inline-size;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 22%); mask-image: linear-gradient(to bottom, transparent, #000 22%); }
.valley img { position: absolute; inset: -3%; width: 106%; height: 106%; max-width: none; /* bleed, so the drift and the mouse parallax never show an edge */ object-fit: cover; object-position: 50% 62%;
  animation: valley-drift 40s ease-in-out infinite alternate; }
.valley .wordmark { position: absolute; inset: 14% 0 auto; text-align: center; }
.valley .wordmark span {
  display: inline-block; white-space: nowrap; padding-bottom: 0.12em;
  font: 500 19cqw/1 var(--body); letter-spacing: -0.065em;
  color: #2C7A55;
  background: linear-gradient(180deg, rgba(31, 107, 72, 0.82), rgba(58, 158, 104, 0.42) 92%); /* fades toward the hills, like a word in the morning air */
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: word-rise 1600ms var(--ease) both;
}
@keyframes word-rise { from { opacity: 0; transform: translateY(22%); } to { opacity: 1; transform: none; } }
@keyframes valley-drift { from { transform: scale(1.08) translate(-1.5%, 0); } to { transform: scale(1.04) translate(1.5%, -1%); } }
/* With a mouse: the photo and the word drift apart (depth) and a soft light follows the cursor over the letters.
   site.js sets --px/--py (-1..1), --mx/--my (cursor inside the word) and --glow (0..1). */
.valley { --px: 0; --py: 0; --mx: 50%; --my: 50%; --glow: 0; }
.valley img { translate: calc(var(--px) * -16px) calc(var(--py) * -10px); }
.valley .wordmark span {
  translate: calc(var(--px) * 12px) calc(var(--py) * 8px);
  background-image:
    radial-gradient(circle 0.75em at var(--mx) var(--my), rgb(232 246 214 / calc(var(--glow) * 0.95)), rgb(38 158 96 / calc(var(--glow) * 0.9)) 45%, transparent 100%),
    linear-gradient(180deg, rgba(31, 107, 72, 0.82), rgba(58, 158, 104, 0.42) 92%);
}
@media (max-width: 640px) {
  .valley { aspect-ratio: 4 / 5; }
  .valley img { object-position: 50% 80%; }
  .valley .wordmark { inset: 18% 0 auto; }
}
.copy.legal { margin-top: 6px; }

/* ---------- What we believe (home) ---------- */
.belief { padding: 120px 0; text-align: center; }
.belief .lede { margin: 24px auto 0; }
.belief h2 { max-width: 17em; margin: 0 auto; font-size: clamp(2.25rem, 4.6vw, 4rem); line-height: 1.06; }
.read-more { display: inline-flex; gap: 6px; margin-top: 36px; font-weight: 600; text-decoration: none; }
.read-more:hover { text-decoration: underline; }

/* ---------- Philosophy page: a calm essay ---------- */
.essay { padding: 112px 0 96px; }
.essay .wrap { max-width: 1040px; }
.essay-top { max-width: 760px; margin: 0 auto 112px; text-align: center; display: grid; gap: 28px; }
.essay h1 { font-size: clamp(4rem, 11vw, 8.5rem); line-height: 0.95; letter-spacing: -0.03em; }
.essay-art { margin: -32px 0 72px; }
.essay-art img { width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 32px; }
@media (max-width: 640px) { .essay-art { margin: -24px calc(var(--gutter) * -0.5) 40px; } .essay-art img { aspect-ratio: 4 / 3; object-position: 30% center; border-radius: 24px; } }
.essay-top .lede { font: 400 clamp(1.375rem, 2.2vw, 1.75rem)/1.4 var(--display); color: var(--ink-2); }
.part { display: grid; grid-template-columns: 5fr 7fr; gap: 24px 64px; padding: 56px 0; }
.part h2 { font-size: clamp(2rem, 3.2vw, 2.75rem); line-height: 1.08; align-self: start; position: sticky; top: 112px; }
.part-body { display: grid; gap: 18px; }
.part p { font: 400 1.3125rem/1.6 var(--display); color: var(--ink-2); }
.essay .sign { margin: 72px auto 0; max-width: 760px; text-align: center; display: grid; justify-items: center; gap: 36px; }
.essay .sign p { font: var(--weight-display) clamp(2.25rem, 5vw, 4rem)/1.08 var(--display); letter-spacing: -0.025em; }
.essay .sign .actions { justify-content: center; }
@media (max-width: 860px) {
  .part { grid-template-columns: 1fr; padding: 40px 0; }
  .part h2 { position: static; }
  .essay-top { margin-bottom: 64px; }
}

/* ---------- How it works: three steps, no cards ---------- */
.how { padding: 120px 0 112px; }
.how h2 { font-size: clamp(2.5rem, 4.8vw, 4.25rem); line-height: 1.02; }
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 56px; margin-top: 72px; }
.steps li { display: grid; align-content: start; gap: 14px; }
.steps .n { font: 600 clamp(4.5rem, 7vw, 6.5rem)/0.85 var(--display); color: var(--green-vivid); letter-spacing: -0.04em; }
.steps h3 { font: var(--weight-display) clamp(1.5rem, 2.2vw, 1.875rem)/1.15 var(--display); letter-spacing: -0.015em; margin-top: 10px; }
.step-art { display: flex; align-items: center; height: 44px; margin-top: 18px; }
.apps-row img { width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 0 0 2px var(--paper), 0 8px 18px -10px rgba(20, 35, 27, 0.45); }
.apps-row img + img { margin-left: -8px; } /* a small overlapping stack, like a picked list */
.glyph-row { gap: 8px; }
.glyph-row .gt { width: 40px; height: 40px; border-radius: 50%; background: var(--green-vivid); position: relative; }
.glyph-row .gt.scheduled { background: var(--scheduled); }
.glyph-row .gt.lockdown { background: var(--lockdown); }
.glyph-row .gt.lockdown::after { background: var(--ink); }
.glyph-row .gt::after { content: ""; position: absolute; inset: 10px; background: #fff;
  -webkit-mask: var(--g) center / contain no-repeat; mask: var(--g) center / contain no-repeat; } /* the black glyph PNGs, tinted brand green */
.gt.mindful { --g: url("/img/glyphs/mindful.png"); }
.gt.scheduled { --g: url("/img/glyphs/scheduled.png"); }
.gt.lockdown { --g: url("/img/glyphs/lockdown.png"); }
.plaid-row img { height: 26px; width: auto; opacity: 0.85; }
.steps p { color: var(--ink-2); font-size: 1.0625rem; line-height: 1.6; max-width: 24em; }
.how-today { margin: 96px 0 0; display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 2fr); gap: 56px; align-items: center; }
.how-today h3 { font: var(--weight-display) clamp(1.75rem, 2.6vw, 2.25rem)/1.1 var(--display); letter-spacing: -0.02em; }
.today-copy ul { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 16px; }
.today-copy li { color: var(--ink-2); font-size: 1.0625rem; line-height: 1.5; max-width: 22em; }
.today-copy li b { display: block; color: var(--ink); font-weight: 600; }
.how-today small { display: block; margin-top: 20px; color: var(--ink-2); font-size: 0.8125rem; }
/* Two equal columns: Today over the limit card on the left, the taller Spending screen on the right (heights nearly match). */
.today-shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.today-shots img { width: 100%; height: auto; border-radius: 24px; box-shadow: 0 30px 60px -36px rgba(6, 26, 19, 0.55), 0 0 0 1px var(--line); }
.today-shots .limit { grid-column: 1; }
.today-shots .spend { grid-column: 2; grid-row: 1 / span 2; }
@media (max-width: 1024px) { .how-today { grid-template-columns: 1fr; gap: 32px; } .today-copy ul { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .how-today { margin-top: 64px; }
  .today-copy ul { grid-template-columns: 1fr; }
  .today-shots { grid-template-columns: 1fr; max-width: 420px; }
  .today-shots .spend { grid-column: 1; grid-row: auto; }
}
/* the hero phone shows a real app screen instead of the HTML replica */
.screen.shot { padding: 0; background: #0A2219; }
.screen.shot::before, .screen.shot::after { display: none; }
.screen.shot img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid, .modes-grid, .people-grid, .pause-grid, .faq { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; max-width: 520px; }
  .hero-visual { min-height: 0; padding: 24px 0 8px; }
  .modes-grid { gap: 40px; }
  .modes-grid .phone { order: 2; justify-self: center; }
  .faq { gap: 40px; }
  .faq h3 { position: static; }
  .pause-grid { gap: 48px; }
  .trust-grid { margin-top: 56px; }
}
@media (max-width: 640px) {
  .hero { padding: 84px 0 56px; }
  .hero::before { background: linear-gradient(180deg, rgba(246, 248, 247, 0) 82%, var(--paper) 100%), url("/img/hero/waves-phone.jpg") center bottom / cover no-repeat; }
  .hero-copy { gap: 22px; }
  .hero .actions .btn { flex: 1 1 auto; }
  .phone { width: 272px; }
  .hero-visual { padding-top: 120px; } /* room for the icon rows above the phone */
  .app-i { display: none; }
  .app-i.m { display: block; --x: var(--mx); --y: var(--my); width: 38px; height: 38px; margin: -19px 0 0 -19px; }
  .readalong { height: 160vh; }
  .pause, .modes, .closing { padding: 88px 0 80px; }
  .people { padding: 16px 0 88px; }
  .privacy { padding: 88px 0; }
  .modes-head { grid-template-columns: 1fr; gap: 16px; }
  .modes-head img { width: 128px; }
  .mode-side { gap: 28px; }
  .seg { gap: 2px; }
  .seg button { padding: 0 12px; font-size: 0.9375rem; gap: 6px; }
  .panel { padding: 28px 24px; border-radius: 26px; }
  .panel .art { width: 160px; }
  .faq { margin-top: 64px; }
}

@media (max-width: 480px) {
  .seg { display: flex; width: 100%; }
  .seg .glyph { display: none; }
  .seg button { flex: 1 1 0; justify-content: center; padding: 0 6px; font-size: 0.875rem; }
}
.modes-grid > *, .mode-side > * { min-width: 0; }
@media (max-width: 640px) {
  .trust-grid { grid-template-columns: 1fr; gap: 36px; }
  .pause-stage { padding: 40px 12px; border-radius: 28px; background-image: url("/img/hero/waves-phone.jpg"); }
}
@media (max-width: 360px) { .pause-stage { padding-inline: 4px; } }

/* ---------- Reduce Motion: every moving thing has a still, complete version ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  .readalong { height: auto; padding: 112px 0; }
  .readalong .pin { position: static; height: auto; }
  .readalong .w { opacity: 1; }
}
.readalong em { font-style: normal; color: var(--green); }
@media (max-width: 340px) { .seg button { font-size: 0.8125rem; } }

/* ---------- Legal pages (privacy, terms): the site's type and colors, set for long reading ----------
   Generated by scripts/build-legal-pages.py from docs/legal/. One readable column; tables scroll inside their box. */
.legal { padding: 112px 0 96px; }
.legal .wrap { max-width: 760px; }
.legal-doc h1 { font-size: clamp(2.5rem, 6vw, 3.75rem); line-height: 1.02; margin-bottom: 20px; }
.legal-doc h2 { font-size: clamp(1.625rem, 3vw, 2rem); line-height: 1.15; margin: 56px 0 14px; scroll-margin-top: 104px; }
.legal-doc h3 { margin: 32px 0 10px; scroll-margin-top: 104px; }
.legal-doc p, .legal-doc ul, .legal-doc ol { margin: 0 0 16px; }
.legal-doc ul, .legal-doc ol { padding-left: 1.35em; }
.legal-doc li { margin: 6px 0; }
.legal-doc a { overflow-wrap: anywhere; }
.legal-doc strong { font-weight: 600; }
.legal-table { overflow-x: auto; margin: 20px 0 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.legal-table table { border-collapse: collapse; width: 100%; min-width: 34rem; font-size: 1rem; line-height: 1.45; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.legal-table th { font-weight: 600; background: var(--paper-2); }
.legal-table tr:last-child td { border-bottom: 0; }
.legal-toc { margin: 32px 0 8px; padding: 20px 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.legal-doc .legal-toc h2 { font: 600 1rem/1.3 var(--body); letter-spacing: 0; margin: 0 0 8px; }
.legal-toc ul { margin: 0; padding: 0; list-style: none; columns: 2; column-gap: 32px; font-size: 1rem; }
.legal-toc li { margin: 4px 0; break-inside: avoid; }
.legal-toc a { color: var(--ink-2); text-decoration: none; }
.legal-toc a:hover { color: var(--ink); text-decoration: underline; }
@media (max-width: 640px) {
  .legal { padding: 96px 0 64px; }
  .legal-toc ul { columns: 1; }
  /* On a phone each table row becomes a short block: the first cell is its heading, so nothing scrolls sideways. */
  .legal-table table { min-width: 0; }
  .legal-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .legal-table tr { display: block; padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .legal-table tr:last-child { border-bottom: 0; }
  .legal-table td { display: block; padding: 2px 0; border: 0; }
  .legal-table td:first-child { font-weight: 600; }
}
@media print { .site-header, .site-footer, .legal-toc, .skip { display: none; } .legal { padding: 0; } }
