/* Rooted, the website (LW, j 2026-11-08): the landing page and the Support page. One stylesheet; one script (/reel.js, the hero's video).
   The content security policy (site/firebase.json) allows styles only from this file: no inline style, no <style>.
   The look is the app's comic system (app/src/styles/theme.css, global.css): ink-outlined panels with hard offset
   shadows, Bangers for the name and headings, Nunito for every word people read. The tokens below repeat the app's
   (the website has no build step); app/src/__tests__/site.test.ts checks they still match. */

@font-face { font-family: 'Bangers'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/bangers-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/nunito-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 800; font-display: swap; src: url('/fonts/nunito-latin-800-normal.woff2') format('woff2'); }

:root {
  --ink: #221a2e;
  --ink-soft: #5b5168;
  --line: #221a2e;
  --drop: #221a2e;
  --page: #eaf6ff;
  --paper: #fffaee;
  --wash: #f6eedb;
  --on-bright: #221a2e;
  --btn: #ffd23f;
  --accent: #ff4f6d;
  --accent-text: #c21f47;
  /* the sky: tools/art/make_icons.py's 'pale' sky (the icon's and the link preview's) */
  --sky-top: #c4e4ff;
  --sky-bottom: #f1f9ff;
  --cloud: rgba(255, 255, 255, 0.85);
  --radius: 18px;
  --radius-sm: 12px;
  --bw-lg: 3px;
  --pop: 3px 3px 0 var(--drop);
  --pop-lg: 6px 6px 0 var(--drop);
  /* N2 (j, 2026-11-26): in dark, only the top piece keeps the gold edge (Gold Is The Top); cards and rows rest on ink */
  --drop-card: var(--drop);
  --display: 'Bangers', 'Impact', 'Arial Black', sans-serif;
  --sans: 'Nunito', ui-rounded, 'Trebuchet MS', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f7efe0;
    --ink-soft: #cfc4dc;
    --line: #0b0710;
    --drop: #ffd23f;
    --page: #1a1324;
    --paper: #2b2139;
    --wash: #342944;
    --accent-text: #ff8aa0;
    --drop-card: #0b0710;
    /* make_icons.py's 'night' sky: the app's dark page into a moonlit blue */
    --sky-top: #140f22;
    --sky-bottom: #2e2f72; /* LP-A: make_icons.py's dusk top (was the night's #3a3a8a): the links hold AA over it (5.3:1) */
    --cloud: rgba(205, 210, 255, 0.10);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  font: 700 1.05rem/1.55 var(--sans); color: var(--ink);
  background: var(--sky-bottom) linear-gradient(to bottom, var(--sky-top), var(--sky-bottom)) fixed;
}
a { color: var(--accent-text); font-weight: 800; text-underline-offset: 3px; }
a:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 3px; border-radius: 4px; }
h1, h2 { font-family: var(--display); font-weight: 400; letter-spacing: 1px; line-height: 1.05; margin: 0; }
p { margin: 0; }

/* the sky's soft clouds (dark: faint, with a few stars). Behind everything; drift slowly; still under reduced motion */
.sky { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.cloud {
  position: absolute; border-radius: 50%;
  background: radial-gradient(closest-side, var(--cloud), transparent);
  animation: drift 90s ease-in-out infinite alternate;
}
.cloud-1 { width: 52vmax; height: 16vmax; top: 6%; left: -14%; }
.cloud-2 { width: 40vmax; height: 12vmax; top: 34%; right: -16%; animation-duration: 120s; animation-direction: alternate-reverse; }
.cloud-3 { width: 46vmax; height: 14vmax; bottom: 4%; left: 18%; animation-duration: 105s; }
@keyframes drift { from { transform: translateX(-4vw); } to { transform: translateX(4vw); } }
@media (prefers-color-scheme: dark) {
  .sky::before {
    content: ''; position: absolute; inset: 0; opacity: 0.7;
    background:
      radial-gradient(1.5px 1.5px at 12% 18%, #fff, transparent), radial-gradient(1px 1px at 27% 42%, #fff, transparent),
      radial-gradient(1.5px 1.5px at 44% 12%, #fff, transparent), radial-gradient(1px 1px at 63% 30%, #fff, transparent),
      radial-gradient(1.5px 1.5px at 78% 9%, #fff, transparent), radial-gradient(1px 1px at 88% 46%, #fff, transparent),
      radial-gradient(1px 1px at 8% 64%, #fff, transparent), radial-gradient(1.5px 1.5px at 52% 58%, #fff, transparent),
      radial-gradient(1px 1px at 70% 72%, #fff, transparent), radial-gradient(1px 1px at 33% 84%, #fff, transparent);
  }
}

/* ---------- the landing page ---------- */
/* LP2 (j, 2026-11-11: his copy and arrangement): a bar with the name and the sections; the hero is still the island's
   reel, full screen (LW11-A), now with his headline and words over it (D1-A); then the sections in his order. The name
   and the short labels keep the opening's lettering (Bangers); his sentence headings are set in Nunito (D6-A: Bangers has
   capitals only). Nothing here needs a script: the sections are in-page links, the questions are <details>. */
:root { --top-h: 56px; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--top-h) + env(safe-area-inset-top) + 12px); }

.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 16px;
  height: calc(var(--top-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
  background: rgba(26, 19, 36, 0.94); /* (critique 2026-11-28: no blur, DESIGN.md's No Blur Rule; nearly solid instead) */
  border-bottom: 2.5px solid #221a2e;
}
.brand {
  display: inline-flex; align-items: center; min-height: 44px; /* (a 44 px target) */
  font-family: var(--display); font-size: 2.1rem; letter-spacing: 2px; line-height: 1; text-decoration: none;
  color: #fff7d6; -webkit-text-stroke: 4px #221a2e; paint-order: stroke fill;
  text-shadow: 3px 3px 0 #221a2e;
  animation: title-in 1.3s cubic-bezier(0.2, 0.7, 0.2, 1) 0.2s both;
}
.top a:focus-visible { outline-color: #ffd23f; }
/* LP-A (the critique's P1): Support in the bar at every width, as in the app (help one tap away); the app's coral */
.help-pill {
  margin-left: auto; display: inline-grid; place-items: center; min-height: 44px; padding: 6px 16px; white-space: nowrap; /* (44 px, as the app's) */
  font: 800 0.95rem/1.2 var(--sans); color: #221a2e; text-decoration: none; background: var(--accent);
  border: 2.5px solid #221a2e; border-radius: 999px; box-shadow: 2px 2px 0 #221a2e;
}
.help-pill:hover { background: #ff6d86; }
@keyframes title-in { from { opacity: 0; transform: translateY(8px) scale(0.94); } }

/* LP-A: a section's name is its heading (Bangers, Two Capitals); its line sits under it in Nunito (no labels over headings) */
.hero h1, .crisis h2, .support h2 { font-family: var(--sans); font-weight: 800; letter-spacing: 0; line-height: 1.18; text-wrap: balance; }
.lead { font-size: clamp(1.2rem, 1.2vw + 0.95rem, 1.5rem); font-weight: 800; line-height: 1.38; text-wrap: balance; max-width: 30ch; }
p { text-wrap: pretty; }

.hero {
  position: relative; isolation: isolate; overflow: hidden;
  margin-top: calc(-1 * (var(--top-h) + env(safe-area-inset-top)));
  min-height: 100vh; min-height: 100svh;
  display: grid; grid-template-rows: auto 1fr auto; justify-items: center; text-align: center;
  padding: calc(var(--top-h) + env(safe-area-inset-top) + 22px) max(20px, env(safe-area-inset-right)) max(28px, calc(env(safe-area-inset-bottom) + 20px)) max(20px, env(safe-area-inset-left));
  background: #1a1324; color: #fff;
}
.reel { position: absolute; inset: 0; z-index: -1; }
.reel img, .reel video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* LW20-A: the video shows only once it is playing (/reel.js marks it): until then, and wherever autoplay is refused, the
   still; when the screen turns it fades back to the still and in again with the other shape */
.reel video { opacity: 0; transition: opacity 0.8s ease; }
.reel video.is-playing { opacity: 1; }
/* a shade behind the words (upright: top and foot; sideways: the left side), so they read over any moment */
.reel::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(24, 17, 46, 0.5) 0%, rgba(24, 17, 46, 0.26) 16%, rgba(24, 17, 46, 0) 28%, rgba(24, 17, 46, 0) 60%, rgba(24, 17, 46, 0.42) 74%, rgba(24, 17, 46, 0.66) 100%); /* (critique 2026-11-28: lighter, held to the words' bands) */
}
/* iPhone Low Power Mode refuses to autoplay: no play button over the still (it is a picture, not a player) */
.reel video::-webkit-media-controls-start-playback-button { display: none !important; -webkit-appearance: none; }
.reel video::-webkit-media-controls { display: none !important; }
.hero-words, .hero-more { display: grid; justify-items: center; gap: 10px; max-width: 36rem; }
.hero-more { grid-row: 3; }
.hero h1 {
  font-size: clamp(1.9rem, 4.2vw + 1rem, 3.5rem);
  text-shadow: 0 2px 0 #221a2e, 0 0 14px rgba(34, 26, 46, 0.95), 0 0 30px rgba(34, 26, 46, 0.7);
}
.hero-lead, .hero-note { text-shadow: 0 1px 0 #221a2e, 0 0 10px rgba(34, 26, 46, 0.95), 0 0 4px rgba(34, 26, 46, 0.95); }
.hero-lead { font-size: 1.02rem; line-height: 1.45; }
.hero-lead strong { font-weight: 800; color: #fff7d6; }
.hero-note { font-size: 0.9rem; }
/* at launch the one button (Download) takes this place; before it, "Coming Soon" is a quiet label, not a button (LW5-A, LP-A) */
.cta {
  display: inline-block; padding: 13px 22px; min-height: 48px; margin-top: 4px;
  font: 800 1.1rem/1.2 var(--sans); text-decoration: none; text-align: center;
  color: #221a2e; background: #ffd23f;
  border: 2.5px solid #221a2e; border-radius: var(--radius-sm); box-shadow: 3px 3px 0 #221a2e;
}
.cta.is-soon, .soon-label {
  display: inline-block; min-height: 0; padding: 4px 14px; box-shadow: none;
  font: 800 0.9rem/1.3 var(--sans); letter-spacing: 0.02em; color: #fff7d6; background: rgba(24, 17, 46, 0.55);
  border: 2px solid rgba(255, 247, 214, 0.7); border-radius: 999px;
}

/* sideways and wide: the words down the left, the island beside them */
@media (orientation: landscape) and (min-width: 700px) {
  .hero { grid-template-rows: none; align-content: center; justify-items: start; text-align: left; gap: 14px;
    padding-left: max(5vw, env(safe-area-inset-left) + 20px); }
  .hero-words, .hero-more { justify-items: start; max-width: min(34rem, 46vw); }
  .hero-more { grid-row: auto; }
  .reel::after { background: linear-gradient(to right, rgba(24, 17, 46, 0.72) 0%, rgba(24, 17, 46, 0.52) 32%, rgba(24, 17, 46, 0) 56%); }
}
/* a phone on its side (short): smaller words */
@media (orientation: landscape) and (max-height: 500px) {
  .hero { gap: 8px; padding-bottom: max(14px, env(safe-area-inset-bottom)); }
  .hero h1 { font-size: 1.55rem; }
  .hero-lead { font-size: 0.9rem; line-height: 1.35; }
  .hero-more { gap: 6px; }
  .cta:not(.is-soon) { padding: 9px 16px; min-height: 44px; font-size: 1rem; }
}

.panel {
  background: var(--paper); color: var(--ink);
  border: var(--bw-lg) solid var(--line); border-radius: var(--radius); box-shadow: var(--pop-lg);
  padding: 20px 22px 22px; display: grid; align-content: start; gap: 10px;
}
.panel h2 { font-size: 1.8rem; }
/* the island on three days, an arrow between */
.days { list-style: none; margin: 8px 0 0; padding: 0; width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 4vw, 34px); }
.days li { position: relative; display: grid; gap: 8px; justify-items: center; font-weight: 800; }
.days img { display: block; width: 100%; height: auto; border: 2.5px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--pop); }
.days li + li::before {
  content: ''; position: absolute; top: 40%; left: calc(clamp(18px, 4vw, 34px) / -2 - 6px); width: 9px; height: 9px;
  border-top: 3px solid var(--ink); border-right: 3px solid var(--ink); transform: rotate(45deg);
}

/* Private by Design: one panel, its four points side by side when there is room */
.private { width: 100%; justify-items: center; padding: 28px 24px 30px; gap: 12px; }
.points {
  list-style: none; margin: 14px 0 0; padding: 0; width: 100%; text-align: left;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px;
}
@media (min-width: 600px) { .points { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .points { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.points li { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; row-gap: 2px; align-content: start; }
.point-icon { grid-row: 1 / span 2; color: var(--accent-text); }
.points h3 { margin: 0; font: 800 1.05rem/1.3 var(--sans); }
.points p { grid-column: 2; color: var(--ink-soft); font-size: 0.98rem; }

/* the questions: each opens in place (no script) */
.faq { width: 100%; max-width: 46rem; display: grid; gap: 12px; text-align: left; margin-top: 8px; }
.faq-item { background: var(--paper); border: 2.5px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--pop); }
.faq-item summary {
  position: relative; padding: 14px 48px 14px 16px; min-height: 48px; font-weight: 800; cursor: pointer; list-style: none;
  border-radius: var(--radius-sm);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ''; position: absolute; right: 20px; top: 50%; width: 9px; height: 9px; margin-top: -8px;
  border-right: 3px solid var(--ink); border-bottom: 3px solid var(--ink); transform: rotate(45deg);
}
.faq-item[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq-item summary:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 2px; }
.faq-item p { padding: 0 16px 12px; }
.faq-item p:last-child { padding-bottom: 16px; }

.soon-label { margin-top: 10px; color: var(--ink); background: var(--paper); border-color: var(--line); }

/* the support lines, in the footer beside the links when there is room: a calm panel (no stripe, no alarm) */
.crisis {
  max-width: 34rem; padding: 16px 20px; display: grid; gap: 6px; text-align: left; font-size: 0.95rem;
  color: var(--ink); background: var(--paper); border: 2.5px solid var(--line); border-radius: var(--radius-sm);
}
.crisis h2 { font-size: 1.1rem; }

/* ---------- the Support page ---------- */
.page-head { padding: max(18px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left)); text-align: center; }
.brand-link { font-family: var(--display); font-size: 2.6rem; letter-spacing: 2px; color: var(--accent-text); text-shadow: 2px 2px 0 var(--line); text-decoration: none; }
.support { max-width: 34rem; margin: 0 auto; padding: 20px max(20px, env(safe-area-inset-right)) 40px max(20px, env(safe-area-inset-left)); display: grid; gap: 22px; }
.support h2 { font-size: 1.3rem; }
.support h1 { font-family: var(--sans); font-weight: 800; letter-spacing: 0; font-size: 1.75rem; line-height: 1.25; text-align: center; }
.resources { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.resources a {
  display: grid; gap: 2px; padding: 12px 16px; min-height: 48px; text-decoration: none;
  color: var(--ink); background: var(--page);
  border: 2.5px solid var(--line); border-radius: var(--radius-sm); box-shadow: 3px 3px 0 var(--line);
}
.resources a span { font-weight: 700; color: var(--ink-soft); }
.crisis-abroad { margin: 2px 0 0; font-size: 0.95rem; color: var(--ink-soft); text-wrap: pretty; } /* B5 */
.back { text-align: center; }
.back a { display: inline-block; padding: 10px 4px; }

/* ---------- both ---------- */
.site-foot {
  display: grid; justify-items: center; gap: 22px; margin-top: 28px;
  padding: 28px max(20px, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  border-top: 2.5px solid var(--line);
}
.foot { display: grid; justify-items: center; gap: 12px; text-align: center; color: var(--ink-soft); font-size: 0.95rem; }
.foot nav { display: flex; gap: 8px 14px; flex-wrap: wrap; justify-content: center; }
.foot nav a { display: inline-block; padding: 6px 0; }
.foot-brand { display: grid; justify-items: center; gap: 2px; font-style: italic; }
.foot-brand .brand-link { font-style: normal; font-size: 2.2rem; }
@media (min-width: 900px) {
  .site-foot:has(.crisis) { grid-template-columns: minmax(0, 1fr) minmax(0, 30rem); align-items: center; max-width: 1040px; margin-left: auto; margin-right: auto; }
}

/* ---------- 404 ---------- */
.lost { max-width: 34rem; margin: 0 auto; padding: 24px 20px 48px; display: grid; justify-items: center; gap: 18px; text-align: center; }
.lost img { width: auto; height: min(30vh, 240px); }
.lost h1 { font-family: var(--sans); font-weight: 800; letter-spacing: 0; font-size: 1.6rem; line-height: 1.25; }

/* N2: in dark only the top piece (the privacy panel, Support's panel) keeps the gold edge; cards and rows rest on ink */
.days img, .faq-item, .resources a { box-shadow: 3px 3px 0 var(--drop-card); }

/* ---------- the legal pages (R5 / L6; built from docs/legal by tools/legal/build-legal-pages.py) ---------- */
.legal { max-width: 46rem; margin: 0 auto; padding: 20px max(20px, env(safe-area-inset-right)) 40px max(20px, env(safe-area-inset-left)); display: grid; gap: 22px; }
.legal-text { padding: 26px 26px 30px; gap: 12px; text-align: left; font-weight: 700; box-shadow: 6px 6px 0 var(--drop-card); overflow-wrap: anywhere; } /* (the email address breaks at 320 wide) */
.legal-text h1 { margin: 0 0 4px; font: 800 1.75rem/1.25 var(--sans); letter-spacing: 0; text-wrap: balance; }
.legal-text h2 { margin: 18px 0 0; font: 800 1.2rem/1.3 var(--sans); letter-spacing: 0; }
.legal-text h3 { margin: 10px 0 0; font: 800 1.05rem/1.3 var(--sans); }
.legal-text p, .legal-text li { max-width: 68ch; text-wrap: pretty; }
.legal-text h2, .legal-text h3 { text-wrap: balance; }
.legal-text ul, .legal-text ol { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; }
.legal-text hr { width: 100%; border: 0; border-top: 2.5px dashed var(--line); margin: 6px 0; }
.legal-nav { display: flex; gap: 4px 16px; flex-wrap: wrap; justify-content: center; font-size: 0.88rem; }
.legal-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; }

@media (prefers-reduced-motion: reduce) {
  .brand, .cloud { animation: none; }
  html { scroll-behavior: auto; }
}
