/* Frankie website. The page is a school day: the sky behind it moves
   through five stages (morning, noon, afternoon, evening, night) as you
   scroll, and each section is a moment in that day. Palette: "Fresh +
   Vibrant / Day-to-Night" (Ink, Cream, Apricot, Coral, Cobalt, Sage).
   Type comes from the app (frankie-app src/theme). */

:root {
  /* Ink and paper, from the app */
  --ink: #0F172A;
  --ink-muted: rgba(15, 23, 42, 0.72);
  --ink-faint: rgba(15, 23, 42, 0.66);
  --paper: #FFF7EC;
  --moon: #FFF7EC;
  --moon-muted: rgba(255, 247, 236, 0.76);
  /* The palette */
  --cream: #FFF7EC;      /* background */
  --apricot: #FDBA8C;    /* support: warm highlights */
  --coral: #FF6B6B;      /* accent: decoration, playful moments */
  --cobalt: #2563EB;     /* action: buttons, links */
  --sage: #A7C4A0;       /* secondary: tags, success */
  /* Text-safe shades: coral and sage are too light for small text on
     cream (2.6:1), so words use these (4.6:1 and up). */
  --coral-ink: #A82E2E;  /* deep enough for small text over the sky's glows */
  --sage-ink: #3B6136;
  --cobalt-ink: #1D4FD0; /* links in running text */
  --amber: var(--coral-ink);
  --amber-night: var(--apricot);
  /* The school's colour: the near-black of the app's school cards */
  --school: #0F172A;
  --school-text: #FFF7EC;
  --school-muted: rgba(255, 247, 236, 0.66);
  /* Glass */
  --glass: rgba(255, 255, 255, 0.5);
  --glass-line: rgba(255, 255, 255, 0.75);
  --glass-night: rgba(255, 255, 255, 0.07);
  --glass-night-line: rgba(255, 255, 255, 0.16);
  /* The sky, set by assets/sky.js as you scroll */
  --sky-base: #FFF7EC;
  --sky-g1: rgba(255, 214, 128, 0.8);
  --sky-g2: rgba(170, 212, 240, 0.65);
  --sky-g3: rgba(255, 205, 160, 0.4);
  /* Text on the sky: day values here, night values when body.is-night */
  --fg: #0F172A;
  --fg-muted: rgba(15, 23, 42, 0.72);
  --display: 'Manrope', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
  --body: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
  --radius: 22px;
  --gutter: clamp(18px, 4vw, 40px);
  color-scheme: light;
}

/* Self-hosted (OFL), latin subset, preloaded from the page's head. Both
   are variable fonts, so one file covers every weight used here. */
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 700 800; font-display: swap; src: url(fonts/manrope-latin.woff2) format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(fonts/plus-jakarta-sans-latin.woff2) format('woff2'); }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--sky-base);
  color: var(--fg);
  font-family: var(--body);
  font-size: 17px;
  transition: color 0.35s;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; letter-spacing: -0.025em; }
h1 { font-size: clamp(40px, 6.4vw, 76px); font-weight: 800; line-height: 1.02; }
h2 { font-size: clamp(32px, 4.4vw, 54px); font-weight: 800; line-height: 1.06; }
h3 { font-size: 21px; font-weight: 800; line-height: 1.25; letter-spacing: -0.015em; }
:focus-visible { outline: 2.5px solid var(--cobalt); outline-offset: 3px; border-radius: 6px; }
body.is-night :focus-visible { outline-color: var(--apricot); }

/* ---- The sky --------------------------------------------------------- */

.sky {
  position: fixed; inset: 0; z-index: -2; pointer-events: none; will-change: background;
  background:
    radial-gradient(110% 55% at 10% 10%, var(--sky-g1), transparent 64%),
    radial-gradient(85% 45% at 100% 36%, var(--sky-g2), transparent 70%),
    radial-gradient(90% 45% at 0% 88%, var(--sky-g3), transparent 65%),
    var(--sky-base);
}
.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- Navigation ------------------------------------------------------ */

.nav {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10;
  display: flex; align-items: center; gap: 18px;
  padding-inline: var(--gutter); padding-block: 14px;
  transition: color 0.4s;
}
.nav::before {
  content: ''; position: absolute; inset: 8px calc(var(--gutter) - 12px); z-index: -1;
  border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2);
  transition: background 0.4s, border-color 0.4s;
}
.wordmark { font-family: var(--display); font-weight: 800; font-size: 26px; letter-spacing: -0.04em; text-decoration: none; padding-left: 10px; }
.wordmark i { font-style: normal; color: var(--coral); transition: color 0.4s; }
.clock {
  display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600;
  font-variant-numeric: tabular-nums; color: var(--ink-muted); white-space: nowrap;
}
.clock svg { width: 15px; height: 15px; }
.nav-links { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.nav-links a { text-decoration: none; font-weight: 600; font-size: 14.5px; padding: 8px 12px; border-radius: 999px; }
.nav-links a:hover { background: rgba(255, 255, 255, 0.45); }
.nav-links .btn { margin-left: 6px; }
.nav-links .nav-demo { margin-left: 2px; }
.nav-links .nav-demo svg { width: 15px; height: 15px; }
.nav-links .nav-demo:hover { background: rgba(255, 255, 255, 0.85); }
body.is-night .nav .nav-demo { background: rgba(255, 255, 255, 0.1); color: var(--moon); border-color: var(--glass-night-line); }
body.is-night { --fg: #FFF7EC; --fg-muted: rgba(255, 247, 236, 0.78); }
body.is-night .nav { color: var(--moon); }
body.is-night .nav::before { background: rgba(15, 23, 42, 0.45); border-color: var(--glass-night-line); }
body.is-night .wordmark i { color: var(--coral); }
body.is-night .clock { color: var(--moon-muted); }
body.is-night .nav-links a:hover { background: rgba(255, 255, 255, 0.1); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 20px; border-radius: 999px; border: 0;
  font-family: var(--body); font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer;
  background: var(--cobalt); color: #FFFFFF;
  transition: transform 0.15s, background 0.4s, color 0.4s;
}
.btn:hover { background: #1D4FD0; }
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 17px; height: 17px; }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; }
.btn-glass { background: var(--glass); color: var(--ink); border: 1px solid var(--glass-line); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
body.is-night .nav .btn { background: var(--cobalt); color: #FFFFFF; }

/* ---- Sections -------------------------------------------------------- */

main { display: block; }
.moment {
  position: relative;
  padding-inline: var(--gutter);
  padding-block: clamp(80px, 12vw, 150px);
}
.inner { max-width: 1160px; margin: 0 auto; }
.time {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 22px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--amber);
}
.time b { font-variant-numeric: tabular-nums; font-weight: 800; letter-spacing: 0.04em; }
.time::before { content: ''; width: 28px; height: 1.5px; background: currentColor; opacity: 0.6; }
body.is-night .time { color: var(--amber-night); }
.lede { font-size: clamp(18px, 1.7vw, 21px); line-height: 1.55; color: var(--fg-muted); max-width: 58ch; transition: color 0.35s; }
.split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.stack { display: flex; flex-direction: column; gap: 22px; }

.glass {
  background: var(--glass); border: 1px solid var(--glass-line); border-radius: var(--radius);
  -webkit-backdrop-filter: blur(20px) saturate(1.15); backdrop-filter: blur(20px) saturate(1.15);
  box-shadow: 0 18px 50px -24px rgba(15, 23, 42, 0.35);
}
body.is-night .moment .glass { background: var(--glass-night); border-color: var(--glass-night-line); box-shadow: none; }

/* ---- Hero: before the bell ------------------------------------------- */

.hero {
  /* The first screen, filled: content centred, a cue to scroll at the foot */
  /* (the navigation bar above takes ~70px of the first screen) */
  min-height: calc(100vh - 70px); min-height: calc(100svh - 70px); display: flex; align-items: center;
  padding-top: 24px; padding-bottom: 84px;
}
.hero > .inner { width: 100%; }
.hero h1 { font-size: clamp(40px, 4.7vw, 66px); }
.hero h1 .line { display: block; white-space: nowrap; }
@media (min-width: 961px) {
  .hero .split { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
}
/* Not enough room beside the phone for the cards at these widths: the
   phone on its own (Ava's invitation and PlayProfile appear further down). */
@media (min-width: 961px) and (max-width: 1239px) {
  .hero .float { display: none; }
}
.scroll-cue {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  display: inline-flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--ink-muted); text-decoration: none;
}
.scroll-cue svg { width: 18px; height: 18px; animation: nudge 2.4s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
.hero .eyebrow, .flood .eyebrow { font-size: 13.5px; font-weight: 600; color: var(--ink-muted); margin-bottom: 18px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hero .eyebrow span, .flood .eyebrow span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-line); white-space: nowrap; }
.hero .eyebrow svg, .flood .eyebrow svg { width: 16px; height: 16px; }
.hero h1 .soft { color: var(--coral-ink); }
.hero .lede { margin-top: 24px; }
.ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 34px; }

/* The app, drawn: a class chat, an invitation and a PlayProfile */
.scene { position: relative; display: flex; justify-content: flex-end; --ph: min(640px, calc(100svh - 200px)); --pw: calc(var(--ph) * 0.485); }
/* The hero's iPhone: the same device as drop-off, showing a class chat */
.hero-phone { position: relative; height: var(--ph); width: var(--pw); margin-right: clamp(0px, 3vw, 40px); --open: 1; }
.hero-phone .device { box-shadow: 0 50px 90px -40px rgba(15, 23, 42, 0.55), inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
.lock.app-screen {
  background: radial-gradient(90% 45% at 0% 0%, rgba(253, 186, 140, 0.45), transparent 70%), radial-gradient(70% 40% at 100% 85%, rgba(167, 196, 160, 0.35), transparent 70%), #FFF7EC;
}
.chat { position: absolute; inset: 0; padding: 16% 4.5% 8%; display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; overflow: hidden; }
.chat .chat-head { padding: 0 2px 2px; }
.chat .chat-head b { font-size: 16px; }
.chat .chat-icon { width: 36px; height: 36px; }
.chat .pinned { margin-bottom: 4px; }
.chat .pinned > div { min-width: 0; }
.chat .pinned span { max-width: none; }
.chat .bubble { font-size: 12.5px; padding: 7px 12px; }
.chat .who { margin: 2px 0 -3px 6px; }
.chat .notice { padding: 11px 12px; gap: 4px; }
.chat .notice p { font-size: 12.5px; }
.chat .typing { margin-top: auto; }
.typing { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; padding: 8px 12px; border-radius: 16px; border-bottom-left-radius: 6px; background: rgba(255, 255, 255, 0.72); border: 1px solid var(--glass-line); font-size: 11.5px; color: var(--ink-muted); }
.typing span { margin-right: 4px; }
.typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--ink-muted); animation: dot 1.2s ease-in-out infinite; }
.typing i:nth-of-type(2) { animation-delay: 0.15s; }
.typing i:nth-of-type(3) { animation-delay: 0.3s; }
@keyframes dot { 0%, 60%, 100% { opacity: 0.3; transform: none; } 30% { opacity: 1; transform: translateY(-2px); } }
.phone {
  position: relative; width: min(370px, 100%); margin-left: auto; margin-right: 0;
  padding: 18px 16px 20px; border-radius: 40px;
  display: flex; flex-direction: column; gap: 10px;
}
.chat-head { display: flex; align-items: center; gap: 12px; padding: 2px 4px 6px; }
.chat-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--school); color: var(--school-text); display: grid; place-items: center; flex: none; }
.chat-icon svg { width: 19px; height: 19px; }
.chat-head b { display: block; font-family: var(--display); font-size: 17px; line-height: 1.2; }
.chat-head span { font-size: 12.5px; color: var(--ink-muted); }
.pinned { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 16px; background: var(--school); color: var(--school-text); }
.pinned svg { width: 15px; height: 15px; flex: none; }
.pinned small { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--school-muted); }
.pinned span { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 250px; }
.who { font-size: 11px; font-weight: 700; color: var(--ink-muted); margin: 6px 0 -4px 6px; }
.bubble { align-self: flex-start; max-width: 82%; padding: 9px 14px; border-radius: 18px; border-bottom-left-radius: 6px; font-size: 14px; line-height: 1.45; background: rgba(255, 255, 255, 0.72); border: 1px solid var(--glass-line); }
.bubble.mine { align-self: flex-end; background: var(--school); color: var(--school-text); border-color: transparent; border-radius: 18px; border-bottom-right-radius: 6px; }
.notice { padding: 13px 14px; border-radius: 18px; background: var(--school); color: var(--school-text); display: flex; flex-direction: column; gap: 6px; }
.notice small { display: flex; align-items: center; gap: 7px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--school-muted); }
.notice small svg { width: 13px; height: 13px; }
.notice b { font-family: var(--display); font-size: 14px; }
.notice p { font-size: 13.5px; line-height: 1.45; }
.notice .ask { align-self: flex-start; margin-top: 2px; font-size: 12px; font-weight: 700; padding: 6px 11px; border-radius: 12px; background: var(--paper); color: var(--ink); }
.react { align-self: flex-start; color: var(--ink); margin: -4px 0 0 8px; font-size: 12px; padding: 2px 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.85); border: 1px solid var(--glass-line); }

.float { position: absolute; padding: 14px 16px; border-radius: 20px; z-index: 2; }
/* The cards sit beside the phone, touching only its frame, and drift */
.card-a { right: calc(var(--pw) + clamp(0px, 3vw, 40px) - 14px); top: 12%; animation: drift 7s ease-in-out infinite; }
.card-b { right: calc(var(--pw) + clamp(0px, 3vw, 40px) - 14px); bottom: 10%; animation: drift 8s ease-in-out -3s infinite; }
@keyframes drift { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
.invite { width: 220px; display: flex; flex-direction: column; gap: 4px; }
.invite small { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber); }
.invite b { font-family: var(--display); font-size: 17px; }
.invite > span:not(.going) { font-size: 13px; color: var(--ink-muted); }
.going { align-self: flex-start; margin-top: 6px; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; padding: 5px 11px; border-radius: 999px; background: var(--sage); color: var(--ink); }
.going svg { width: 13px; height: 13px; }
.profile-chip { width: 236px; display: flex; flex-direction: column; gap: 8px; }
.profile-chip .who-line { display: flex; align-items: center; gap: 10px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 14px; background: #FDBA8C; color: var(--ink); flex: none; }
.profile-chip b { font-family: var(--display); font-size: 15px; display: block; }
.profile-chip .who-line span:not(.avatar) { font-size: 12px; color: var(--ink-muted); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: rgba(167, 196, 160, 0.28); border: 1px solid rgba(167, 196, 160, 0.6); }

/* ---- 8:40am drop-off: the lock screen floods ------------------------- */

/* The scene is pinned: the section is tall, its stage sticks to the screen,
   and scrolling through the section drives it (assets/sky.js). */
.gather-track { padding-block: 0; height: 300vh; }
.gather-stage { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; padding-top: 96px; padding-bottom: 28px; }
.gather-stage .inner { width: 100%; }

.flood { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); gap: clamp(32px, 6vw, 90px); align-items: center; height: 100%; --suck: 0; --icon: 0; --open: 0; --calm: 0; --glide: 0; --calm-in: 0; }

/* The drop-off words and the calm words share a place: one fades out as the
   other fades in (--calm, set by assets/sky.js). */
.flood-words { display: grid; align-items: center; }
.flood-words > * { grid-area: 1 / 1; }
.flood-copy { opacity: clamp(0, calc(1 - var(--calm) * 3.4), 1); transform: translateY(calc(var(--calm) * -28px)); }
/* At the calm, the phone glides across to the left (--glide, --shift) and
   the calm words appear on the right, in the space it left. */
.calm-copy {
  position: absolute; top: 50%; right: 0;
  left: calc(var(--phone-w, 380px) + clamp(40px, 6vw, 96px));
  display: flex; flex-direction: column; gap: 18px;
  opacity: var(--calm-in);
  transform: translateY(calc(-50% + (1 - var(--calm-in)) * 28px));
  pointer-events: none;
}
.calm-copy h2 { font-size: clamp(40px, 5.6vw, 72px); }
.calm-copy .time, .flood.is-calm .calm-copy .time { color: var(--sage-ink); margin-bottom: 0; }
.calm-copy .lede { max-width: 46ch; }
.flood-copy { display: flex; flex-direction: column; gap: 18px; }
.flood-copy .time { margin-bottom: 0; }
.flood-copy .lede { max-width: 40ch; }
.tally { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tally > span { display: inline-flex; align-items: baseline; gap: 8px; padding: 8px 14px; border-radius: 14px; background: var(--glass); border: 1px solid var(--glass-line); font-size: 14px; font-weight: 600; color: var(--fg-muted); }
.tally b { font-family: var(--display); font-size: 24px; font-weight: 800; color: var(--fg); font-variant-numeric: tabular-nums; }
.tally > span { transition: background 0.4s, border-color 0.4s; }
.tally .from, .tally .to { display: inline-flex; align-items: baseline; gap: 6px; transition: opacity 0.35s, font-size 0.35s; }
.tally .to { display: none; color: var(--ink); }
.tally.is-done > span { background: rgba(167, 196, 160, 0.38); border-color: rgba(167, 196, 160, 0.8); }
.tally.is-done .from { opacity: 0.5; font-size: 12px; text-decoration: line-through; }
.tally.is-done .from b { font-size: 14px; color: inherit; }
.tally.is-done .to { display: inline-flex; animation: tally-in 0.4s ease both; }
@keyframes tally-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.flood-line { font-family: var(--display); font-weight: 800; font-size: clamp(20px, 2vw, 26px); letter-spacing: -0.015em; color: var(--coral-ink); min-height: 1.3em; }

/* The phone: a lock screen with a wallpaper in the palette. Its wrapper
   holds the vibration, which has to sit outside the phone's rounded edge. */
.lock-wrap { position: relative; height: min(780px, 100%); aspect-ratio: 71.6 / 147.6; width: auto; max-width: 100%; justify-self: end; --rush: 0; isolation: isolate; transform: translateX(calc(var(--glide, 0) * var(--shift, 0px))); }

/* An iPhone 15/16: a slim titanium frame around a thin black bezel, the
   Action button and volume on the left, power on the right. */
.device {
  position: absolute; inset: 0; border-radius: 17% / 8.2%; padding: 3px;
  background: linear-gradient(140deg, #5A6172, #262B38 30%, #151925 55%, #474E5F 85%, #2B303D);
  box-shadow: 0 40px 80px -40px rgba(15, 23, 42, 0.65), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.btn-side { position: absolute; width: 4px; border-radius: 2px; background: linear-gradient(90deg, #3B4150, #1C202B); }
.btn-side.action { left: -3px; top: 17%; height: 4.2%; }
.btn-side.vol-up { left: -3px; top: 24%; height: 7.6%; }
.btn-side.vol-down { left: -3px; top: 33.5%; height: 7.6%; }
.btn-side.power { right: -3px; top: 26%; height: 11.5%; }
.lock {
  position: relative; height: 100%; width: 100%; container-type: inline-size;
  border-radius: 15.5% / 7.6%; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(90% 55% at 15% 10%, rgba(253, 186, 140, 0.9), transparent 70%),
    radial-gradient(80% 50% at 100% 60%, rgba(255, 107, 107, 0.55), transparent 70%),
    radial-gradient(90% 60% at 10% 100%, rgba(37, 99, 235, 0.55), transparent 70%),
    #0F172A;
  border: 7px solid #05070C;
}
/* Dynamic Island, status bar and home bar: white over the lock screen,
   dark once the Frankie screen has opened (--open). */
.island { position: absolute; top: 2.1%; left: 50%; width: 31%; height: 4.1%; transform: translateX(-50%); border-radius: 999px; background: #000; z-index: 3; }
.statusbar {
  position: absolute; top: 2.3%; left: 0; right: 0; height: 3.8%; z-index: 3; padding: 0 9%;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 4.2cqw; font-weight: 700; font-variant-numeric: tabular-nums;
  color: color-mix(in srgb, #0F172A calc(var(--open) * 100%), #FFF7EC);
}
.statusbar > span:first-child { opacity: var(--open); padding-left: 3%; }
.sb-icons { display: flex; align-items: center; gap: 1.4cqw; }
.sig { display: flex; align-items: flex-end; gap: 0.6cqw; height: 3cqw; }
.sig b { width: 0.9cqw; border-radius: 0.3cqw; background: currentColor; }
.sig b:nth-child(1) { height: 35%; } .sig b:nth-child(2) { height: 55%; } .sig b:nth-child(3) { height: 77%; } .sig b:nth-child(4) { height: 100%; }
.wifi { width: 4.4cqw; height: 3.3cqw; }
.batt { position: relative; width: 6.6cqw; height: 3.2cqw; border: 1.5px solid currentColor; border-radius: 1cqw; padding: 1px; opacity: 0.95; }
.batt::after { content: ''; position: absolute; right: -0.9cqw; top: 30%; width: 0.5cqw; height: 40%; border-radius: 0 1px 1px 0; background: currentColor; }
.batt b { display: block; width: 78%; height: 100%; border-radius: 0.5cqw; background: currentColor; }
.homebar { position: absolute; bottom: 1.3%; left: 50%; width: 36%; height: 5px; transform: translateX(-50%); border-radius: 999px; z-index: 3; background: color-mix(in srgb, #0F172A calc(var(--open) * 100%), #FFF7EC); opacity: 0.9; }
.lock-time { position: absolute; top: 9.5%; left: 0; right: 0; text-align: center; color: #FFF7EC; display: flex; flex-direction: column; align-items: center; transform: translateY(calc(var(--suck) * -30px)); opacity: calc(1 - var(--suck) * 1.6); }
.lock-time span { font-family: var(--display); font-weight: 700; font-size: 21cqw; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.lock-time small { font-size: 4.6cqw; font-weight: 600; opacity: 0.85; margin-top: 1cqw; order: -1; margin-bottom: 1cqw; }

.notes {
  list-style: none; margin: 0; padding: 0 10px;
  position: absolute; top: 27%; left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent);
  mask-image: linear-gradient(to bottom, #000 78%, transparent);
  /* Drawn into the app icon in the middle of the phone */
  transform: translateY(calc(var(--suck) * 120px)) scale(calc(1 - var(--suck) * 0.9));
  opacity: calc(1 - var(--suck) * var(--suck) * 1.15);
  transform-origin: 50% 32%;
}
.note {
  display: flex; gap: 10px; align-items: flex-start; flex-shrink: 0;
  max-height: 0; margin-top: 0; opacity: 0; overflow: hidden;
  padding: 0 12px; border-radius: 20px;
  background: rgba(255, 247, 236, 0.86);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  font-size: 13px; line-height: 1.35; color: var(--ink);
  transform: translateY(-14px) scale(0.96);
  transition: max-height 0.45s ease, margin-top 0.45s ease, padding 0.45s ease, opacity 0.3s ease, transform 0.45s ease;
}
.note.is-in { max-height: 96px; margin-top: 8px; padding: 10px 12px; opacity: 1; transform: none; }
.note b { font-weight: 700; }
.app { flex: none; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-family: var(--display); font-weight: 800; font-size: 16px; }
.app svg { width: 18px; height: 18px; }
.app.wa { background: #1FAF55; }
.app.ms { background: linear-gradient(135deg, #3E7BFA, #A23CF5 60%, #F2507F); }
.app.fb { background: #1877F2; font-size: 20px; }
.app.em { background: #2E7CF6; }
.app.tx { background: #2FB24C; }
.app.sch { background: var(--ink); }
.note-text { min-width: 0; }
.note-head { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; font-weight: 700; color: rgba(15, 23, 42, 0.62); margin-bottom: 1px; }
.note-head span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note-head time { flex: none; font-weight: 600; }

/* One place: the Frankie screen that replaces the flood */
.frankie-screen {
  position: absolute; inset: 0; padding: 15% 14px 7%; display: flex; flex-direction: column; gap: 10px;
  background: radial-gradient(90% 50% at 0% 0%, rgba(253, 186, 140, 0.55), transparent 70%), radial-gradient(70% 40% at 100% 70%, rgba(167, 196, 160, 0.4), transparent 70%), #FFF7EC;
  /* Opens out of the app icon, the way an app opens on a phone */
  clip-path: inset(calc((1 - var(--open)) * 43%) calc((1 - var(--open)) * 36%) round 40px);
  opacity: clamp(0, calc(var(--open) * 8), 1);
  pointer-events: none;
}
.lock-icon {
  position: absolute; left: 50%; top: 50%; width: 92px; height: 92px; margin: -46px 0 0 -46px; z-index: 1;
  border-radius: 24px; background: #FFF7EC; display: grid; place-items: center;
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.55);
  transform: scale(calc(var(--icon) * var(--pulse, 1)));
  opacity: calc(var(--icon) * (1 - var(--open) * 1.6));
}
.lock-icon span { font-family: var(--display); font-weight: 800; font-size: 58px; line-height: 1; color: #0F172A; margin-top: -6px; letter-spacing: -0.04em; }
.lock-icon i { position: absolute; right: 21px; bottom: 23px; width: 12px; height: 12px; border-radius: 50%; background: var(--coral); }

/* After the flood, calm: a sage glow breathes behind the phone and slow
   sage ripples drift out from it, the quiet echo of the coral shockwave.
   Fades in with the Frankie screen (--open); only animates while it's the
   moment on screen (.is-calm, set by assets/sky.js). */
.calm { position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: var(--open); }
.calm::before {
  content: ''; position: absolute; inset: -26% -70%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(167, 196, 160, 0.95), rgba(167, 196, 160, 0.55) 45%, rgba(167, 196, 160, 0.18) 75%, transparent);
  animation: breathe 6s ease-in-out infinite paused;
}
.calm i {
  position: absolute; inset: 0; border-radius: 17% / 8.2%; border: 2px solid rgba(74, 116, 68, 0.45); opacity: 0;
  animation: calm-wave 6s cubic-bezier(0.25, 0.6, 0.35, 1) infinite paused;
}
.calm i:nth-child(2) { animation-delay: 2s; }
.calm i:nth-child(3) { animation-delay: 4s; }
.flood.is-calm .calm::before, .flood.is-calm .calm i { animation-play-state: running; }
@keyframes breathe { 0%, 100% { transform: scale(0.92); opacity: 0.8; } 50% { transform: scale(1.06); opacity: 1; } }
@keyframes calm-wave { 0% { transform: scale(1); opacity: 0; } 12% { opacity: 0.8; } 100% { transform: scale(1.32); opacity: 0; } }
.flood-line { transition: color 0.6s; }
.flood.is-calm .flood-line { color: var(--sage-ink); }

/* Each notification lands with a buzz: the phone shakes and two rings
   ripple out from its outline, a shockwave that grows with the flood
   (--rush, 0 to 1, set by assets/sky.js). */
.lock-wrap.buzz .device { animation: buzz 0.32s ease; }
.ripple {
  position: absolute; inset: 0; border-radius: 17% / 8.2%; pointer-events: none;
  border: 2.5px solid var(--coral); opacity: 0;
}
.lock-wrap.buzz .ripple { animation: ripple 0.7s cubic-bezier(0.2, 0.7, 0.3, 1); }
.lock-wrap.buzz .ripple-2 { animation-delay: 0.12s; animation-fill-mode: backwards; }
@keyframes ripple {
  0% { opacity: calc(0.45 + var(--rush) * 0.45); transform: scale(1); }
  100% { opacity: 0; transform: scale(calc(1.04 + var(--rush) * 0.07)); }
}

@keyframes buzz {
  0%, 100% { transform: none; }
  20% { transform: translateX(-3px) rotate(-0.6deg); }
  45% { transform: translateX(3px) rotate(0.6deg); }
  70% { transform: translateX(-2px) rotate(-0.3deg); }
}
.fs-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 6px; }
.fs-head .wordmark { padding: 0; font-size: 24px; }
.fs-head > span:last-child { font-family: var(--display); font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.fs-row { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 18px; background: rgba(255, 255, 255, 0.7); border: 1px solid rgba(255, 255, 255, 0.9); font-size: 13px; }
.fs-row > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fs-row b { font-family: var(--display); font-size: 14.5px; }
.fs-row small { color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fs-row em { font-style: normal; font-size: 12px; font-weight: 800; min-width: 22px; height: 22px; border-radius: 999px; display: grid; place-items: center; background: var(--cobalt); color: #fff; }
.fs-ic { flex: none; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--ink); color: var(--cream); }
.fs-ic svg { width: 17px; height: 17px; }
.fs-ic.cake { background: rgba(253, 186, 140, 0.45); font-size: 17px; }
.fs-pin { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; background: var(--ink); color: var(--cream); font-size: 13px; }
.fs-pin svg { width: 15px; height: 15px; flex: none; }
.fs-pin small { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--school-muted); }
.fs-going { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: var(--sage); color: var(--ink); }
.fs-going svg { width: 12px; height: 12px; }
.fs-bar { display: block; height: 5px; margin-top: 5px; border-radius: 999px; background: rgba(15, 23, 42, 0.1); overflow: hidden; }
.fs-bar i { display: block; width: 69%; height: 100%; background: var(--sage-ink); }
.fs-tabs { margin-top: auto; display: flex; justify-content: space-around; padding: 10px 6px; border-radius: 22px; background: rgba(255, 255, 255, 0.75); border: 1px solid rgba(255, 255, 255, 0.9); }
.fs-tabs span { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 9.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); }
.fs-tabs span:first-child { color: var(--coral-ink); }
.fs-tabs svg { width: 18px; height: 18px; }

/* ---- 9:15am the class list ------------------------------------------- */

.sheet { border-radius: 14px; overflow: hidden; background: #FFFFFF; border: 1px solid rgba(15, 23, 42, 0.12); box-shadow: 0 24px 50px -30px rgba(15, 23, 42, 0.5); font-size: 14px; }
.sheet-title { padding: 10px 14px; background: #F3F4F1; border-bottom: 1px solid rgba(15, 23, 42, 0.1); font-weight: 700; font-size: 13px; display: flex; gap: 8px; align-items: center; color: #1F6E43; }
.sheet-title svg { width: 15px; height: 15px; }
.sheet-scroll { overflow-x: auto; }
.sheet table { border-collapse: collapse; width: 100%; min-width: 440px; font-variant-numeric: tabular-nums; }
.sheet th, .sheet td { text-align: left; padding: 9px 14px; border-bottom: 1px solid rgba(15, 23, 42, 0.08); border-right: 1px solid rgba(15, 23, 42, 0.06); white-space: nowrap; }
.sheet th { font-size: 11.5px; letter-spacing: 0.08em; color: rgba(15, 23, 42, 0.72); background: #FAFAF8; }
.sheet td { color: rgba(15, 23, 42, 0.8); }
.sheet-note { margin-top: 14px; font-family: var(--display); font-weight: 800; font-size: 20px; letter-spacing: -0.01em; }
.arrow-down { display: grid; place-items: center; margin: 18px 0; color: var(--amber); }
.arrow-down svg { width: 28px; height: 28px; }
.playprofile { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.pp-head { display: flex; align-items: center; gap: 14px; }
.pp-head .avatar { width: 54px; height: 54px; font-size: 20px; }
.pp-head small { font-size: 11.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--amber); }
.pp-head b { font-family: var(--display); font-size: 24px; display: block; line-height: 1.15; }
.pp-quote { padding: 14px 16px; border-radius: 16px; background: rgba(255, 255, 255, 0.6); font-size: 15px; line-height: 1.55; }
.pp-quote small { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 4px; }
.pp-private { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink-muted); }
.pp-private svg { width: 16px; height: 16px; flex: none; color: var(--sage-ink); }

/* ---- 11:00am recess: what's in it ------------------------------------ */


/* ---- 1:30pm safety --------------------------------------------------- */

.quote-big { font-family: var(--display); font-weight: 800; font-size: clamp(28px, 3.6vw, 44px); line-height: 1.15; letter-spacing: -0.02em; max-width: 22ch; }
.quote-big span { color: var(--amber); }
.promises { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.promise { padding: 16px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; font-weight: 600; line-height: 1.4; }
.promise svg { width: 20px; height: 20px; color: var(--sage-ink); }

/* ---- 3:15pm pick-up: schools and P&Cs --------------------------------- */

.relay { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 44px; }
.relay-col { padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.relay-col > small { font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); }
.node { padding: 12px 14px; border-radius: 14px; font-weight: 700; font-size: 15px; display: flex; flex-direction: column; gap: 2px; }
.node span { font-weight: 500; font-size: 13px; opacity: 0.75; }
.node.old { background: rgba(255, 107, 107, 0.14); border: 1px solid rgba(255, 107, 107, 0.35); }
.node.new { background: var(--school); color: var(--school-text); }
.link { height: 26px; margin-left: 24px; border-left: 2px solid rgba(15, 23, 42, 0.35); }
.link.broken { border-left-style: dashed; border-color: #FF6B6B; position: relative; }
.link.broken::after { content: 'forwarded by hand, if at all'; position: absolute; left: 12px; top: 3px; font-size: 12px; font-weight: 600; color: #CC3B3B; white-space: nowrap; }
.readcount { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.65); border: 1px solid var(--glass-line); font-size: 13.5px; font-weight: 600; }
.bar { height: 7px; border-radius: 999px; background: rgba(15, 23, 42, 0.1); overflow: hidden; }
.bar i { display: block; height: 100%; width: 65%; border-radius: inherit; background: var(--sage-ink); }
.aside-note { max-width: 72ch; margin-top: 28px; padding: 14px 18px; border-radius: 16px; font-size: 14.5px; color: var(--fg-muted); background: rgba(255, 255, 255, 0.4); border: 1px dashed rgba(15, 23, 42, 0.25); }

/* ---- 7:30pm bedtime -------------------------------------------------- */


/* Its own night sky, so the footer reads the same whatever the page is doing. */
footer { padding-inline: var(--gutter); padding-block: 40px 56px; color: var(--moon-muted); font-size: 14px; background: #0F172A; }
footer .inner { display: flex; flex-wrap: wrap; gap: 20px 40px; justify-content: space-between; border-top: 1px solid var(--glass-night-line); padding-top: 32px; }
footer .wordmark { color: var(--moon); padding: 0; font-size: 24px; }
footer .wordmark i { color: var(--amber-night); }
footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
footer a { text-decoration: none; }
footer a:hover { color: var(--moon); }
footer .legal { flex-basis: 100%; font-size: 12.5px; }

/* ---- Small screens --------------------------------------------------- */

@media (max-width: 960px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .flood { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); gap: 16px; align-items: stretch; }
  .lock-wrap { justify-self: center; height: 100%; transform: none; }
  /* Stacked: no glide; the calm words take the drop-off words' place */
  .flood-copy { opacity: clamp(0, calc(1 - var(--calm) * 2.2), 1); }
  .calm-copy { position: static; left: auto; right: auto; gap: 10px; opacity: clamp(0, calc((var(--calm) - 0.55) * 2.6), 1); transform: translateY(calc((1 - var(--calm)) * 28px)); }
  .calm-copy h2 { font-size: 34px; }
  .calm-copy .lede { font-size: 15.5px; }
  .promises { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero { min-height: 0; padding-bottom: 80px; }
  .scene { justify-content: center; margin-top: 12px; --ph: 600px; }
  .hero-phone { margin-right: 0; }
  .card-a { right: auto; left: calc(50% - var(--pw) / 2 - 190px); }
  .card-b { right: auto; left: calc(50% + var(--pw) / 2 - 40px); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav-links a:not(.btn) { display: none; }
  .clock { display: none; }
  .promises { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gather-stage { padding-top: 78px; padding-bottom: 16px; }
  .flood-copy { gap: 8px; }
  .flood-copy .lede { display: none; }
  .tally > span { padding: 5px 10px; font-size: 12.5px; }
  .tally b { font-size: 18px; }
  .flood-line { font-size: 17px; }

  .note { font-size: 12px; }
  /* After the flip, just the new numbers, so the phone keeps its height */
  .tally.is-done .from { display: none; }
  .tally .to { font-size: 12.5px; }
  .frankie-screen { gap: 7px; padding-top: 17%; }
  .fs-head .wordmark { font-size: 19px; }
  .fs-head > span:last-child { font-size: 16px; }
  .fs-row { padding: 7px 9px; gap: 9px; font-size: 11.5px; border-radius: 14px; }
  .fs-row b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .fs-ic { width: 30px; height: 30px; border-radius: 9px; }
  .fs-going { font-size: 10.5px; padding: 3px 7px; }
  .fs-pin { padding: 8px 10px; font-size: 11.5px; }
  .fs-tabs span { font-size: 8px; }
  .frankie-screen { padding: 20px 12px 12px; gap: 8px; }
  .fs-row { padding: 9px 10px; }
  .group { font-size: 12.5px; padding: 7px 11px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn:hover { transform: none; }
  /* No pinning or flooding: show where the story ends, one calm screen. */
  .gather-track { height: auto; padding-block: clamp(80px, 12vw, 150px); }
  .gather-stage { position: static; height: auto; padding: 0; }
  .flood { --suck: 1 !important; --icon: 0 !important; --open: 1 !important; --calm: 1 !important; --glide: 1 !important; --calm-in: 1 !important; }
  .lock-wrap.buzz .device { animation: none; }
  .lock-wrap { height: 640px; justify-self: center; }
  .note { transition: none; }
  .ripple { display: none; }
  .calm::before, .calm i { animation: none; }
}
body.is-night .aside-note { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.22); }
body.is-night .relay-col > small { color: var(--fg-muted); }

/* Phones: lighter frosting. Every frosted card re-blurs whatever is behind
   it whenever the sky changes, which is on every scroll. */
@media (max-width: 640px) {
  .glass, .nav::before { -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
}

/* Links in running text: Cobalt, the action colour */
.lede a, .aside-note a { color: var(--cobalt); text-underline-offset: 3px; }
body.is-night .lede a { color: var(--apricot); }

@media (max-width: 760px) {
  /* No room beside the phone on a phone: just the phone. */
  .float { display: none; }
  .scene { --ph: min(560px, calc(100svh - 150px)); }
  .hero h1 .line { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  .card-a, .card-b, .typing i, .scroll-cue svg { animation: none; }
}

/* ---- Reading pages (security.html) ------------------------------------
   A page of answers rather than a scroll through the day: the morning sky
   throughout, no clock, and a column narrow enough to read. */

.nav-links a[aria-current="page"] { background: rgba(255, 255, 255, 0.6); }
.doc-head { padding-block: clamp(48px, 7vw, 88px) clamp(28px, 4vw, 44px); }
.doc-head h1 { font-size: clamp(34px, 4.4vw, 58px); max-width: 20ch; }
.doc-head .lede { margin-top: 22px; max-width: 62ch; }
.doc-glance { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 36px; max-width: 880px; }
.doc-body { padding-block: clamp(20px, 3vw, 36px) clamp(72px, 10vw, 120px); }
.doc-grid { display: grid; grid-template-columns: 210px minmax(0, 760px); gap: clamp(28px, 5vw, 72px); align-items: start; }

.doc-index { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 2px; font-size: 14.5px; }
.doc-index p { font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--amber); margin-bottom: 8px; padding-left: 12px; }
.doc-index a { text-decoration: none; font-weight: 600; color: var(--fg-muted); padding: 7px 12px; border-radius: 12px; }
.doc-index a:hover { background: rgba(255, 255, 255, 0.5); color: var(--fg); }

.doc-groups { display: flex; flex-direction: column; gap: clamp(40px, 5vw, 60px); }
.faq-group { display: flex; flex-direction: column; gap: 10px; scroll-margin-top: 96px; }
.faq-group h2 { font-size: clamp(24px, 2.6vw, 30px); letter-spacing: -0.02em; margin-bottom: 8px; }

.faq { scroll-margin-top: 96px; border-radius: 18px; box-shadow: 0 10px 30px -22px rgba(15, 23, 42, 0.35); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 20px; min-height: 56px; cursor: pointer; list-style: none; border-radius: 18px;
  font-family: var(--display); font-weight: 800; font-size: 17.5px; line-height: 1.3; letter-spacing: -0.012em;
}
.faq summary::-webkit-details-marker { display: none; }
/* A plus that becomes a minus: two bars, one of which turns flat. */
.faq summary::after {
  content: ''; flex: 0 0 auto; width: 14px; height: 14px; color: var(--cobalt);
  background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat, linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat;
  transition: transform 0.2s;
}
.faq[open] summary::after { background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat; transform: rotate(180deg); }
.faq summary:hover { background: rgba(255, 255, 255, 0.35); }
.faq-a { padding: 0 20px 20px; display: flex; flex-direction: column; gap: 12px; color: var(--fg-muted); font-size: 16px; line-height: 1.6; max-width: 66ch; }
.faq-a ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.faq-a b { color: var(--fg); font-weight: 700; }
.faq-a a, .doc-updated a { color: var(--cobalt); text-underline-offset: 3px; }
.doc-updated { font-size: 14.5px; color: var(--fg-muted); }

@media (max-width: 960px) {
  .doc-grid { grid-template-columns: 1fr; }
  .doc-index { position: static; flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .doc-index p { flex-basis: 100%; padding-left: 0; margin-bottom: 2px; }
  .doc-index a { background: var(--glass); border: 1px solid var(--glass-line); border-radius: 999px; padding: 7px 13px; font-size: 14px; }
  .doc-glance { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .faq summary { font-size: 16.5px; padding: 14px 16px; }
  .faq-a { padding: 0 16px 16px; font-size: 15.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .faq summary::after { transition: none; }
}

/* Long-form reading (privacy.html): the same column as the FAQ, as prose. */
.doc-meta { margin-top: 18px; font-size: 14px; color: var(--fg-muted); }
.prose { gap: clamp(32px, 4vw, 44px); max-width: 68ch; }
.prose section { display: flex; flex-direction: column; gap: 12px; scroll-margin-top: 96px; }
.prose h2 { font-size: clamp(24px, 2.6vw, 30px); letter-spacing: -0.02em; }
.prose h3 { font-size: 17.5px; margin-top: 6px; }
.prose p, .prose li { color: var(--fg-muted); font-size: 16.5px; line-height: 1.65; }
.prose b { color: var(--fg); font-weight: 700; }
.prose ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.prose a { color: var(--cobalt); text-underline-offset: 3px; }
@media (max-width: 640px) { .prose p, .prose li { font-size: 15.5px; } }
body.is-night .nav-links a[aria-current="page"] { background: rgba(255, 255, 255, 0.14); }
body.is-night .aside-note a { color: var(--apricot); }

/* ---- Pilot badge, two paths, register (home) --------------------------- */

.hero .eyebrow .pilot, .flood .eyebrow .pilot { background: var(--school); color: var(--school-text); border-color: var(--school); font-weight: 700; }
.hero .eyebrow .pilot i, .flood .eyebrow .pilot i { width: 7px; height: 7px; border-radius: 50%; background: var(--sage); box-shadow: 0 0 0 3px rgba(167, 196, 160, 0.35); }

.register h2 { font-size: clamp(30px, 3.6vw, 46px); }
.register-steps { margin: 4px 0 0; padding: 0; list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: 12px; }
.register-steps li { counter-increment: step; position: relative; padding-left: 44px; min-height: 30px; padding-top: 3px; color: var(--fg-muted); font-size: 16px; }
.register-steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; background: rgba(255, 255, 255, 0.12); border: 1px solid var(--glass-night-line); color: var(--fg); }
.register-steps b { color: var(--fg); }

/* The card stays light at any time of day: a lit window at night. */
.register-card {
  background: var(--paper); color: var(--ink); border-radius: var(--radius); padding: clamp(22px, 3vw, 32px);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.6);
  --fg: var(--ink); --fg-muted: var(--ink-muted);
}
.register-card form, .register-card .tell { display: flex; flex-direction: column; gap: 14px; }
.register-card h3 { font-size: 22px; }
.register-card p { color: var(--ink-muted); font-size: 15px; }
.register-card a:not(.btn) { color: var(--cobalt); text-underline-offset: 3px; }
.register-card .btn { width: 100%; }
.register-card .ctas { margin-top: 0; flex-wrap: nowrap; }
.register-card .btn-glass { background: rgba(15, 23, 42, 0.06); color: var(--ink); border-color: rgba(15, 23, 42, 0.14); }

.role-pick { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.role-pick legend { font-size: 13px; font-weight: 700; color: var(--ink-muted); margin-bottom: 6px; padding: 0; }
.role-pick label { position: relative; display: grid; place-items: center; text-align: center; min-height: 44px; padding: 8px 6px; border-radius: 12px; border: 1px solid rgba(15, 23, 42, 0.16); font-size: 13.5px; font-weight: 700; line-height: 1.2; cursor: pointer; }
.role-pick input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.role-pick label:has(input:checked) { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.role-pick label:has(input:focus-visible) { outline: 2.5px solid var(--cobalt); outline-offset: 2px; }

.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--ink-muted); }
.field i { font-style: normal; font-weight: 500; }
.field input, .field textarea {
  font: inherit; font-size: 16px; font-weight: 500; color: var(--ink); background: #FFFFFF;
  border: 1px solid rgba(15, 23, 42, 0.18); border-radius: 12px; padding: 12px 14px; min-height: 48px; width: 100%;
}
.field textarea { font-size: 14.5px; line-height: 1.5; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible { outline: 2.5px solid var(--cobalt); outline-offset: 1px; border-color: transparent; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-error { color: var(--coral-ink) !important; font-weight: 700; }
.fineprint { font-size: 13px !important; }
.tell:focus { outline: none; }

/* Phones scroll a shorter drop-off, unless motion is reduced (then it
   isn't pinned at all and needs no extra height). */
@media (max-width: 640px) and (prefers-reduced-motion: no-preference) {
  .gather-track { height: 240vh; }
}
@media (max-width: 640px) {
  .hero .ctas.paths .btn { flex: 1 1 auto; }
  .register-card .ctas { flex-wrap: wrap; }
}
#safety.promises { margin-top: 40px; scroll-margin-top: 96px; }
/* The calm rings around the phone spread wider than a phone screen: clip
   them sideways (clip, not hidden, so the sticky stage still sticks). */
.gather-track { overflow-x: clip; }

/* ---- Polish (Impeccable pass, Oct 2026) ---------------------------------- */

/* Promises are words, not objects: they sit on the sky with no card (The
   Earned Glass Rule, DESIGN.md). A hairline above each keeps them grouped. */
.promise { padding: 14px 4px 0; border-top: 1.5px solid rgba(15, 23, 42, 0.14); }
body.is-night .promise { border-top-color: var(--glass-night-line); }

/* The browser's own surfaces, from the palette. */
::selection { background: var(--apricot); color: var(--ink); }
body.is-night ::selection { background: var(--cobalt); color: #FFFFFF; }
input, textarea { caret-color: var(--cobalt); accent-color: var(--cobalt); }
a { text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
html { scrollbar-color: rgba(15, 23, 42, 0.35) transparent; }

/* Tap targets: at least 44px on phones. */
@media (max-width: 640px) {
  .btn-sm { height: 44px; }
  .doc-index a { min-height: 44px; display: inline-flex; align-items: center; }
}
@media (max-width: 640px) { .nav .wordmark { min-height: 44px; display: inline-flex; align-items: center; } }

/* Critique fixes (Oct 2026) */
.lede a, .aside-note a, .prose a, .faq-a a, .doc-updated a, .register-card a:not(.btn) { color: var(--cobalt-ink); }
#register, #tell-school, #pc { scroll-margin-top: 92px; }
body.is-night .readcount { background: rgba(255, 255, 255, 0.1); border-color: var(--glass-night-line); }
@media (max-width: 640px) {
  footer nav { gap: 4px 18px; }
  footer nav a { min-height: 44px; display: inline-flex; align-items: center; }
}

/* 11:00am: one plan, drawn as it looks in Frankie */
.plan-card { padding: 18px; display: flex; flex-direction: column; gap: 12px; max-width: 440px; justify-self: end; width: 100%; color: var(--ink); }
.pc-head { display: flex; gap: 12px; align-items: center; }
.pc-ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: #FFFFFF; font-size: 22px; flex: none; }
.pc-head b { display: block; font-family: var(--display); font-weight: 800; font-size: 19px; letter-spacing: -0.01em; }
.pc-head span { font-size: 14px; color: var(--ink-muted); }
.pc-rsvp { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--ink-muted); }
.pc-rsvp > span:not(.faces) { padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.7); }
.pc-rsvp .on { background: rgba(167, 196, 160, 0.4) !important; color: var(--sage-ink); font-weight: 700; }
.pc-rsvp b { font-weight: 800; color: var(--ink); }
.pc-rsvp .faces { display: inline-flex; margin-left: auto; }
.pc-rsvp .faces i { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 10.5px; font-weight: 800; background: var(--apricot); color: var(--ink); border: 2px solid #FFF7EC; margin-left: -8px; }
.pc-rsvp .faces i:last-child { background: var(--ink); color: var(--cream); }
.pc-chat { display: flex; flex-direction: column; gap: 6px; }
.pc-chat p { align-self: flex-start; max-width: 85%; padding: 8px 12px; border-radius: 16px 16px 16px 6px; background: #FFFFFF; font-size: 14px; line-height: 1.4; }
.pc-chat p b { display: block; font-size: 12px; color: var(--ink-muted); }
.pc-chat p.mine { align-self: flex-end; background: var(--cobalt); color: #FFFFFF; border-radius: 16px 16px 6px 16px; }
.pc-care { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; background: rgba(15, 23, 42, 0.06); font-size: 13.5px; line-height: 1.4; color: var(--ink-muted); }
.pc-care svg { width: 18px; height: 18px; flex: none; color: var(--sage-ink); margin-top: 1px; }
.pc-care b { color: var(--ink); }
.pc-gift { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--ink-muted); }
.pc-gift i { height: 6px; border-radius: 999px; background: rgba(15, 23, 42, 0.08); overflow: hidden; }
.pc-gift i b { display: block; width: 79%; height: 100%; background: var(--sage-ink); }
@media (max-width: 960px) { .plan-card { justify-self: stretch; max-width: none; } }
#safety.promises { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 880px; }
@media (max-width: 640px) { #safety.promises { grid-template-columns: 1fr; } }
.field-error { color: var(--coral-ink); font-size: 13px; font-weight: 700; }
.field input[aria-invalid="true"] { border-color: var(--coral-ink); box-shadow: 0 0 0 1px var(--coral-ink); }
.register-card .tell h3 { font-size: clamp(26px, 3vw, 32px); line-height: 1.1; letter-spacing: -0.02em; }
.register-steps li.is-done { color: var(--fg-muted); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.register-steps li.is-done::before { content: '✓'; background: var(--sage); color: var(--ink); border-color: var(--sage); }
.register-steps li.is-now { color: var(--fg); }
.register-steps li.is-now::before { background: var(--apricot); color: var(--ink); border-color: var(--apricot); }

/* Schools page: plain list, and the P&C site drawn */
.plain-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 18px; }
.plain-list li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; color: var(--fg-muted); font-size: 16.5px; line-height: 1.55; }
.plain-list li svg { width: 20px; height: 20px; color: var(--sage-ink); margin-top: 3px; }
.plain-list b { color: var(--fg); }
.pc-panel { padding: 16px; display: flex; flex-direction: column; gap: 12px; color: var(--ink); }
.pp-bar { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border-radius: 12px; background: var(--ink); color: var(--cream); font-size: 13px; font-weight: 700; }
.pp-bar .wordmark { font-size: 18px; padding: 0; color: var(--cream); }
.pp-notice { padding: 14px; border-radius: 16px; background: #FFFFFF; display: flex; flex-direction: column; gap: 8px; }
.pp-notice small { font-size: 12px; font-weight: 700; color: var(--coral-ink); }
.pp-notice p { font-size: 15px; font-weight: 600; line-height: 1.4; }
.pp-reads { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-muted); }
.pp-reads .total b { color: var(--ink); }
.pp-reads .row { display: grid; grid-template-columns: 64px 1fr 44px; align-items: center; gap: 8px; }
.pp-reads em { font-style: normal; font-weight: 700; color: var(--ink); }
.pp-reads i { height: 6px; border-radius: 999px; background: rgba(15, 23, 42, 0.08); overflow: hidden; }
.pp-reads i b { display: block; height: 100%; background: var(--sage-ink); }
.pp-reads .row > span { text-align: right; font-variant-numeric: tabular-nums; }
.pp-shift { padding: 12px 14px; border-radius: 16px; background: rgba(255, 255, 255, 0.75); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.pp-shift b { display: block; font-size: 14.5px; }
.pp-shift span { font-size: 13px; color: var(--ink-muted); }
.pp-shift .who { display: flex; gap: 4px; flex-wrap: wrap; }
.pp-shift .who i { font-style: normal; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: rgba(167, 196, 160, 0.4); color: var(--ink); }
.pp-shift .who i.open { background: transparent; border: 1px dashed rgba(15, 23, 42, 0.3); color: var(--ink-muted); }
.pp-q { font-size: 13px; font-weight: 600; color: var(--ink-muted); padding: 0 4px; }

/* Re-critique fixes (16 Oct 2026) */
/* The One Cobalt Rule: while another cobalt button is on screen, the menu's
   button steps back to glass (sky.js sets body.cobalt-in-view). */
.nav .btn { transition: background-color 0.2s ease, color 0.2s ease; }
body.cobalt-in-view .nav .btn { background: rgba(255, 255, 255, 0.6); color: var(--ink); box-shadow: inset 0 0 0 1.5px rgba(15, 23, 42, 0.22); }
body.is-night.cobalt-in-view .nav .btn { background: rgba(255, 255, 255, 0.1); color: var(--cream); box-shadow: inset 0 0 0 1.5px rgba(255, 247, 236, 0.4); }
/* Glass buttons at night: faint white, cream text (the register card keeps its own). */
body.is-night .moment .btn-glass { background: rgba(255, 255, 255, 0.1); color: var(--cream); border-color: var(--glass-night-line); }
body.is-night .register-card .btn-glass { background: rgba(15, 23, 42, 0.06); color: var(--ink); border-color: rgba(15, 23, 42, 0.14); }
/* Plain text sits on the page, not in a box (The Earned Glass Rule). */
.aside-note, body.is-night .aside-note { padding: 0; background: none; border: 0; border-radius: 0; font-size: 15.5px; }
.quiet-note { max-width: 72ch; font-size: 15.5px; color: var(--fg-muted); }
.quiet-note a { color: var(--cobalt-ink); }
body.is-night .quiet-note a { color: var(--apricot); }
.narrow { max-width: 760px; }
/* Schools: what the P&C gets, as short paragraphs */
.pc-gets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 44px; max-width: 920px; }
.pc-gets p { color: var(--fg-muted); font-size: 17px; line-height: 1.6; }
@media (max-width: 640px) { .pc-gets { grid-template-columns: 1fr; } }
.list-head { font-weight: 700; }
.list-foot { color: var(--fg-muted); font-size: 16px; }
.doc-head .pc-panel { justify-self: end; }
/* Register: the done step keeps normal text (a tick says it), no struck line. */
.register-steps li.is-done { text-decoration: none; }
/* Long jumps to #register go straight there: a smooth scroll through the
   pinned drop-off showed blank sky for a second. */
html { scroll-behavior: auto; }
/* Tablets are touch devices too: 44px targets up to 960px wide. */
@media (max-width: 960px) {
  .btn-sm { height: 44px; }
  .doc-index a, footer nav a, .nav .wordmark { min-height: 44px; display: inline-flex; align-items: center; }
  footer .wordmark { min-height: 44px; display: inline-flex; align-items: center; }
}
@media (max-width: 640px) { .prose p, .prose li { font-size: 16px; } }
@media (max-width: 960px) { .nav-links a { min-height: 44px; display: inline-flex; align-items: center; } }

/* Skip link: hidden until a keyboard user tabs to it. */
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--cream); font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }
#main { scroll-margin-top: 92px; }

/* Long names and school names wrap inside the card instead of widening the page. */
.register-card, .register-card h3, .register-card input, .register-card textarea { overflow-wrap: anywhere; min-width: 0; }
/* "forwarded by hand, if at all": wraps in a narrow column instead of being cut off. */
.link.broken::after { color: var(--coral-ink); }
@media (max-width: 640px) {
  .link.broken { height: 58px; }
  .link.broken::after { white-space: normal; right: 0; line-height: 1.3; }
}
/* Glass buttons stay glass on hover (they were turning cobalt under dark
   text): a little more frosting instead. */
.btn-glass:hover { background: rgba(255, 255, 255, 0.85); color: var(--ink); }
body.is-night .moment .btn-glass:hover { background: rgba(255, 255, 255, 0.2); color: var(--cream); }
.register-card .btn-glass:hover, body.is-night .register-card .btn-glass:hover { background: rgba(15, 23, 42, 0.11); color: var(--ink); }
body.cobalt-in-view .nav .btn:hover { background: rgba(255, 255, 255, 0.9); color: var(--ink); }
body.is-night.cobalt-in-view .nav .btn:hover { background: rgba(255, 255, 255, 0.2); color: var(--cream); }

/* The flood opens the page: badges, the headline, the two paths. */
.flood-copy .eyebrow { margin-bottom: 0; }
.flood-copy h1 { font-size: clamp(38px, 4.4vw, 62px); line-height: 1.04; letter-spacing: -0.025em; max-width: 14ch; text-wrap: balance; }
.flood-copy .ctas { margin-top: 2px; }
.calm-copy h2 .soft { color: var(--coral-ink); }
.calm-copy .ctas { margin-top: 6px; }
@media (max-width: 640px) {
  .flood-copy .eyebrow { display: none; }
  .flood-copy h1 { font-size: 30px; }
  .flood-copy .ctas .btn { height: 44px; font-size: 15px; }
  .calm-copy .ctas { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  /* No swap without motion: the opening words, then the calm words below. */
  .flood-words > * { grid-area: auto; }
  .flood-words { gap: 40px; }
  .flood-copy { opacity: 1 !important; transform: none !important; }
  .calm-copy { position: static; opacity: 1 !important; transform: none !important; pointer-events: auto; }
}
@media (max-width: 640px) {
  /* On phones the opening keeps the answer (what Frankie is) over the counts. */
  .flood-copy .lede { display: block; font-size: 15.5px; line-height: 1.45; }
  .flood-copy .tally { display: none; }
}
/* The opening flood sits up under the menu bar, so it's already pinned in
   place when the page loads (its stage leaves room for the bar). */
.gather-track.opening { margin-top: calc(-1 * var(--nav-h, 70px)); }
@media (prefers-reduced-motion: reduce) { .gather-track.opening { margin-top: 0; } }
@media (max-width: 640px) { .gather-track.opening .gather-stage { padding-top: 96px; } }
