/* Plan Ahead: the product's own Plan Ahead for an example child, and the email it sends her parent before a birthday
   (Michael's pick, 2026-11-05). An old school desk seen from above (the dashboard's plan-ahead.css and
   timeline/art/desk.ts at platform 24a19fbe8): a putty laminate top with a plywood rim and a pencil groove, the
   highlighter lying in it, the Zoom switch, and a compact timeline sheet with its ruler. Emma is 9; under the desk lies
   the email for the picked birthday, a pen line running from it up to that birthday's flag. Class names keep
   the product's where they can, prefixed pa- so no other section's rules reach them.
   - The CSP allows no inline styles: plan.js sets positions and colours through CSSOM, and its SVG carries attributes.
   - Nothing animates `filter`: the flags pulse by transform and opacity and an arrow steps aside by opacity. Shadows
     are static.
   - Everything that sets the section's height is here and in index.html, so plan.js can load as the section nears. */

/* the highlighter's printed name, as on the product's barrel (Apache 2.0: fonts/yellowtail-LICENSE.txt) */
@font-face { font-family: "Yellowtail"; font-weight: 400; font-display: swap; src: url("fonts/yellowtail-400-latin.woff2") format("woff2"); }

/* ---------- the section's head: the headline, then the lead and the picture, side by side on a wide screen ---------- */
.pa-intro { position: relative; z-index: 1; container-type: inline-size; }
.pa-grid { display: grid; gap: 28px; margin-top: 22px; }
.pa-grid > .pa-lead { max-width: 40ch; }
@media (min-width: 1024px) {
  .pa-grid { grid-template-columns: minmax(0, 30rem) minmax(0, 1fr); gap: clamp(36px, 4vw, 64px); align-items: start; margin-top: 30px; }
}
.pa-pic { position: relative; }
/* two balanced lines at every width, "Their devices should / grow with them.", sized down on a phone so the first
   line fits */
.pa-intro h2 { max-width: 9.4em; font-size: min(clamp(40px, 5.4vw, 78px), 10.9cqw); }

/* ---------- the desk ---------- */
/* Plan Ahead's blue for focus, and the notes' navy marker, Scroll Control's (sc.css --sc-hand) */
.pa-desk { --plan: #2f5fb8; --pa-hand: #1f3570;
  container: pa-desk / inline-size; position: relative; isolation: isolate; border-radius: var(--r-card); color: #2b2118;
  box-shadow: 0 34px 70px -26px rgba(40, 26, 12, .62), 0 12px 26px -10px rgba(40, 26, 12, .42); }
/* the laminate, inside the rim; the light from the upper left, a little shade low on the right (desk.ts drawSurface) */
/* (the house card corner, the Scroll Control card's; plan.js paints the rim to the same corner) */
.pa-desk::before { content: ""; position: absolute; z-index: -3; inset: 8.5px; border-radius: calc(var(--r-card) - 8.5px); pointer-events: none; background-color: #c9c2b1;
  background-image: radial-gradient(farthest-corner circle at 28% 0, rgba(255, 252, 240, .32), rgba(255, 252, 240, 0) 62%),
    radial-gradient(farthest-corner circle at 85% 112%, rgba(60, 44, 24, .13), rgba(60, 44, 24, 0) 52%); }
/* the wear on it, the shaded rim and groove, and the highlighter: drawn by plan.js */
/* the script sizes these canvases in pixels when it paints, a moment after the desk changes width; until then they
   stretch with the desk instead of sticking out of it */
.pa-wear { position: absolute; z-index: -2; left: 0; top: 0; width: 100% !important; height: 100% !important; pointer-events: none; }
.pa-rim { position: absolute; z-index: 6; pointer-events: none; }
.pa-rim--t { left: 0; top: 0; width: 100% !important; }
.pa-rim--b { left: 0; bottom: 0; width: 100% !important; height: 30px; }
.pa-rim--l, .pa-rim--r { width: 13px; }
.pa-rim--l { left: 0; }
.pa-rim--r { right: 0; }
.pa-pen { position: absolute; z-index: 7; left: 0; top: 0; width: 100%; overflow: visible; pointer-events: none; }
.pa-mul { mix-blend-mode: multiply; }

/* the header: what this is, whose, and the Zoom switch at its end; the pencil groove runs under it */
.pa-head { position: relative; z-index: 3; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 18px 26px 30px; }
.pa-head .pa-zoom { margin-left: auto; }
.pa-orb { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; flex: none;
  background: radial-gradient(at 32% 18%, rgba(255, 255, 255, .75), transparent 40%), linear-gradient(150deg, #d6ad66, #c48a24 55%, #765316);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .31), inset 0 -3px 5px rgba(0, 0, 0, .27), 0 2px 3px rgba(0, 0, 0, .27); }
.pa-orb svg { width: 60%; height: 60%; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .4)); }
.pa-titleline { display: inline-flex; align-items: baseline; gap: 12px; min-width: 0; margin: 0; }
.pa-title { font-family: var(--pc-voice); font-size: 1.375rem; font-weight: 800; line-height: 1.1; color: #3a2a17; white-space: nowrap; padding-top: 3px; }
.pa-kid { font-family: var(--pc-voice); font-size: 1.0625rem; font-weight: 800; color: #3a2a17; white-space: nowrap; }
/* the Zoom switch's inset track (plan-ahead.css .pa-slide) */
.pa-slide { position: relative; flex: none; display: inline-flex; align-items: center; padding: 3px; border-radius: 999px;
  background: linear-gradient(180deg, rgba(60, 42, 20, .17), rgba(60, 42, 20, .06));
  box-shadow: inset 0 2px 3px rgba(40, 26, 10, .34), inset 0 -1px 0 rgba(255, 255, 255, .45), 0 1px 0 rgba(255, 255, 255, .55); }

/* ---------- the timeline sheet on the desk, the ruler across its foot ---------- */
.pa-body { position: relative; z-index: 2; margin: 0 9px 9px; padding: 0 14px 30px; }
.pa-stagehost { --inset: 12px; position: relative; height: 204px; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.pa-paper { position: absolute; left: var(--inset); right: var(--inset); top: 6px; bottom: 4px; border-radius: 1.5px;
  background: radial-gradient(150% 120% at 50% 30%, #fffefa 0%, #fdf9f0 62%, #f8f1e2 100%);
  box-shadow: 0 1px 1.5px rgba(60, 40, 16, .34), 0 9px 16px -8px rgba(60, 40, 16, .45); }
.pa-rule { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
/* the marks move under a finger or the mouse; the paper and the ruler stay. The paper clips them and never scrolls:
   plan.js moves them (the track's transform), a finger up or down still scrolling the page */
.pa-scroll { position: absolute; top: 0; bottom: 0; left: var(--inset); right: var(--inset); overflow: hidden; overflow: clip; touch-action: pan-y; }
/* wider than the sheet, the marks fade at its edges rather than stopping hard: there's more of her plan to slide in */
.pa-scroll.is-wide { --fade: 24px; -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--fade), #000 calc(100% - var(--fade)), transparent);
  mask-image: linear-gradient(to right, transparent, #000 var(--fade), #000 calc(100% - var(--fade)), transparent); }
.pa-scroll.is-panning, .pa-scroll.is-panning .pa-flag { cursor: grabbing; }
/* its width and place are the view, set by plan.js and read back at once, so they never transition, not even for the
   page's Reduce Motion hundredth of a millisecond */
.pa-track { position: relative; height: 100%; transition-property: none !important; }
.pa-marks { position: absolute; left: 0; top: 0; height: 100%; overflow: visible; pointer-events: none; }
.pa-flags { position: absolute; inset: 0; }
.pa-flag { position: absolute; padding: 0; border: 0; border-radius: 6px; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.pa-flag:focus-visible { outline: 2px solid var(--plan); outline-offset: -2px; border-radius: 8px; }
/* the flag to look at pulses twice when it's drawn, then rests as reduced motion shows it (WCAG 2.2.2) */
.pa-pulse { opacity: .45; animation: pa-pulse 1.8s ease-in-out 2; transform-box: fill-box; transform-origin: center; }
@keyframes pa-pulse { 0%, 100% { opacity: 0; transform: scale(.9); } 50% { opacity: .6; transform: scale(1.12); } }


/* the Zoom switch's two answers (plan-ahead.css .pa-zoom) */
.pa-slide button { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px 5px; border: 0; border-radius: 999px; background: none; cursor: pointer;
  font-family: var(--pc-voice); font-size: .8125rem; font-weight: 700; line-height: 1.15; color: #5f4c36; white-space: nowrap; transition: color .2s; -webkit-tap-highlight-color: transparent; }
@media (hover: hover) { .pa-slide button:hover { color: #3a2a17; } }
.pa-slide button[aria-pressed="true"] { color: #2e2114; cursor: default; }
.pa-slide button:focus-visible { outline: 2px solid var(--plan); outline-offset: 0; }
.pa-knob { position: absolute; top: 3px; bottom: 3px; left: 3px; width: 72px; border-radius: 999px; background: linear-gradient(180deg, #fffdf8, #eee3d0);
  box-shadow: 0 1px 2px rgba(50, 30, 10, .34), 0 3px 6px -2px rgba(50, 30, 10, .3), inset 0 1px 0 #fff;
  transition: left .3s cubic-bezier(.3, .8, .3, 1), width .3s cubic-bezier(.3, .8, .3, 1); }
/* a fingertip's reach round each, without making the switch bigger than the header's */
.pa-slide button::after { content: ""; position: absolute; inset: -7px 0; }


/* ---------- the email's pen line, Scroll Control's arrow (sc.css .sc-arrow): one shallow arc in its navy marker ---------- */
.pa-arrows { position: absolute; z-index: 8; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.pa-arrow { transition: opacity .25s ease; }
.pa-arrow.is-away { opacity: 0; }
.pa-arrow path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.pa-arrow__under { stroke: rgba(255, 255, 255, .9); stroke-width: 5.5px; }
.pa-arrow__ink { stroke: var(--pa-hand); stroke-width: 2.1px; }


/* ---------- a phone: the header tighter, the timeline takes the body's margin ---------- */
@media (max-width: 720px) {
  .pa-head { padding: 12px 14px 28px; gap: 6px 8px; }
  .pa-orb { width: 30px; height: 30px; }
  .pa-titleline { gap: 8px; }
  .pa-title { font-size: 1.125rem; }
  .pa-kid { font-size: .9375rem; }
  .pa-body { margin: 0 4px 6px; padding: 0 8px 26px; }
  .pa-stagehost { margin: 0 -4px; }
}

/* a phone's header: the section's own name stands just above the desk, so the desk's header names only whose it is */
@media (max-width: 440px) {
  .pa-title { display: none; }
  .pa-kid { font-size: 1.125rem; }
}

/* a phone: the desk reaches nearly to the screen's edges, so the timeline has all the width there is */
@media (max-width: 560px) {
  .pa-desk { margin-inline: calc(6px - var(--gutter)); }
  .pa-scroll.is-wide { --fade: 14px; }
}

@media (max-width: 380px) {
  .pa-body { padding-left: 6px; padding-right: 6px; }
}

/* ---------- the email: the one the product sends before the picked birthday (worker plan-model/notices.ts: a heading
   naming the day, the changes in a few lines, one button), set in the page's faces, under the desk. Every email is
   in its slot at once, one over another, and only the picked one shows: the slot is as tall as the tallest, so a pick
   never moves the page below, and each card is as tall as its own words. Its icons are plain strokes (index.html
   .pa-sprite): the Bedtime mode's crescent from the dashboard (CustomIcons.tsx) and others drawn to match. ---------- */
.pa-mail { position: relative; display: grid; width: min(100%, 410px); margin: 34px 10px 0 auto; }
.pa-mail__card { grid-area: 1 / 1; align-self: start; padding: 16px 20px 20px; border-radius: 24px; background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 2px 4px rgba(26, 40, 68, .1), 0 18px 40px -12px rgba(26, 40, 68, .38), 0 40px 70px -30px rgba(26, 40, 68, .3); }
.pa-mail__card:not(.is-on) { visibility: hidden; }
.pa-mail__from { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding-bottom: 12px; border-bottom: 1.5px solid rgba(138, 150, 176, .2); }
.pa-mail__av { width: 38px; height: 38px; padding: 5px; border-radius: 50%; background: #f1f4f8; box-shadow: inset 0 0 0 1px rgba(156, 174, 204, .35); }
.pa-mail__from b { padding-top: 2px; font: 800 17px / 1 var(--pc-voice); color: var(--pc-ink); }
.pa-mail__env { width: 22px; height: 22px; margin-left: auto; fill: none; stroke: var(--pc-faint); stroke-width: 1.8; stroke-linejoin: round; }
.pa-mail__h { margin: 0; font: 800 clamp(22px, 2vw, 26px) / 1.12 var(--pc-voice); color: var(--pc-ink); letter-spacing: -.01em; text-wrap: balance; }
.pa-mail__lead { margin: 8px 0 0; font: 700 16px / 1.35 var(--read); color: var(--pc-mute); }
.pa-mail__list { display: grid; gap: 12px; margin: 14px 0 18px; padding: 0; list-style: none; }
.pa-mail__list li { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 12px; font: 700 17px / 1.28 var(--read); color: var(--pc-ink); text-wrap: pretty; }
.pa-ic { display: block; width: 28px; height: 28px; overflow: visible; fill: none; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
/* each in its mode's colour (home.css --mode-*): Bedtime's indigo for the night, School's blue for school days, After
   School's green for the talks; Plan Ahead's blue for apps and the web */
.pa-ic--bed { stroke: var(--mode-bed); }
.pa-ic--school { stroke: var(--mode-school-lo); }
.pa-ic--talk { stroke: var(--mode-after-lo); }
.pa-ic--apps, .pa-ic--web { stroke: #2f5fb8; }
.pa-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
/* a picture of the email's button: it looks like the page's glass and does nothing */
.pa-mail__go.gl { --h: 48px; width: 100%; pointer-events: none; }
@media (min-width: 1024px) { .pa-mail { margin: 34px auto 0 28px; } }
@media (max-width: 560px) {
  .pa-mail { width: auto; margin: 30px 4px 0; }
  .pa-mail__card { padding: 12px 16px 16px; border-radius: 22px; }
  .pa-mail__from { margin-bottom: 10px; padding-bottom: 9px; }
  .pa-mail__av { width: 32px; height: 32px; padding: 4px; }
  .pa-mail__h { font-size: 21px; }
  .pa-mail__lead { margin-top: 5px; font-size: 15px; }
  .pa-mail__list { gap: 10px; margin: 12px 0 14px; }
  .pa-mail__list li { font-size: 16px; }
  .pa-mail__go.gl { --h: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  .pa-pulse { animation: none; opacity: .45; }
  .pa-knob, .pa-slide button, .pa-arrow { transition: none; }
}
