/* file: css/tokens.css */
/* BuckBallot design tokens: Premium Green 4. Import once at app root. */
:root {
  --bb-green: #2F4D36; --bb-green-deep: #17281D; --bb-gold: #B8955A; --bb-gold-light: #D9C08E;
  --bb-ink: #1C2620; --bb-muted: #6E6A5E; --bb-paper: #FBF8F1; --bb-paper-edge: #EEE6D4; --bb-card: #FFFFFF;
  --bb-rule: #E2D8C3; --bb-nay: #7A2E22; --bb-on-green: #F6F1E6;
  --bb-font-display: "Fraunces", "Fraunces Fallback", Georgia, "Times New Roman", serif;   /* "… Fallback": css/fonts.css, no text jump while the font loads (v29 L3a) */
  --bb-font-body: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
  /* The type scale (Chris, Nov 15): ten sizes, the iOS text styles at the default size. Every font size in css/*.css
     is one of these; nothing else. Text size in Settings scales them (Large: the root grows; Small: the set below). */
  --bb-fs-large-title: 2.125rem; /* 34 */ --bb-fs-title1: 1.75rem; /* 28 */ --bb-fs-title2: 1.375rem; /* 22 */
  --bb-fs-title3: 1.25rem; /* 20 */ --bb-fs-headline: 1.0625rem; /* 17, semibold */ --bb-fs-body: 1.0625rem; /* 17 */
  --bb-fs-callout: 1rem; /* 16 */ --bb-fs-subhead: .9375rem; /* 15 */ --bb-fs-footnote: .8125rem; /* 13 */ --bb-fs-caption: .75rem; /* 12 */
  --bb-text-body: var(--bb-fs-body); --bb-text-label: var(--bb-fs-footnote);
  --bb-radius-card: 14px; --bb-radius-button: 12px; --bb-space: 8px;
  --bb-shadow-card: 0 1px 2px rgba(28,38,32,.06), 0 8px 24px rgba(28,38,32,.06);
}
/* Text size Small: the whole scale steps down one notch (the iOS "Small" sizes); captions keep their 12px floor */
:root[data-text="s"] {
  --bb-fs-large-title: 2.0625rem; --bb-fs-title1: 1.6875rem; --bb-fs-title2: 1.3125rem; --bb-fs-title3: 1.1875rem;
  --bb-fs-headline: 1rem; --bb-fs-body: 1rem; --bb-fs-callout: .9375rem; --bb-fs-subhead: .875rem; --bb-fs-footnote: .75rem; --bb-fs-caption: .75rem;
}
:root[data-theme="dark"], .bb-dark {
  --bb-green: #D9C08E; --bb-ink: #F2EFE8; --bb-muted: #A9B1A4; --bb-paper: #0F1712; --bb-paper-edge: #0A110D;
  --bb-card: #16211A; --bb-rule: #26352B; --bb-on-green: #17281D; --bb-nay: #E08A7A;
  --bb-shadow-card: 0 1px 2px rgba(0,0,0,.4);
}
.bb-eyebrow { font: 600 var(--bb-text-label)/1.3 var(--bb-font-body); letter-spacing: .06em; text-transform: uppercase; color: var(--bb-gold); }
.bb-headline { font-family: var(--bb-font-display); font-weight: 600; letter-spacing: -0.01em; line-height: 1.1; color: var(--bb-ink); }
/* BB-378 (Chris, Nov 15): no notes on screen. Older demo build tools add a "Pretend demo, nothing saved" bar (#demo-note);
   it never shows, whichever tool built the page. */
#demo-note{display:none !important}

/* file: css/tokens-ext.css */
/* BuckBallot token extension: on top of css/tokens.css (a verbatim copy of brand/reference/brand/tokens.css; never edit that file).
   Owner-approved deviation (Nov 13 2026), for the 4.5:1 rule: the pack's gold #B8955A is 2.81:1 as text on white (2.65:1 on paper), so gold
   TEXT (eyebrows, small caps labels) uses --bb-gold-text. --bb-gold stays for hairlines, rings and frames.
     light #7D5F2E: 5.92:1 on --bb-card #FFFFFF, 5.58:1 on --bb-paper #FBF8F1
     dark  #B8955A: 5.91:1 on --bb-card #16211A, 6.47:1 on --bb-paper #0F1712
   --bb-gold-text-on-cream: gold text on the fills that stay LIGHT at night (Buck's speech bubble, art labels, chart labels: they use the
   cream --bb-ink as their background in dark mode), so it keeps the light-mode value in both themes: 5.15:1 on #F2EFE8, 5.92:1 on white. */
:root{ --bb-gold-text:#7D5F2E; --bb-gold-text-on-cream:#7D5F2E; }
:root[data-theme="dark"], .bb-dark{ --bb-gold-text:#B8955A; }
/* the pack's eyebrow helper, with the readable gold */
.bb-eyebrow{ color:var(--bb-gold-text); }
/* App feel D, item 20 (Chris, Nov 15): three corner radii and two shadows, app-wide. Every border-radius in css/ is one of these
   three tokens: 16px for cards and sheets, 12px for controls (buttons, inputs, chips, small bars), and a full pill (circles too).
   Every raised surface uses one of two shadows: --bb-shadow-card (cards, chips that lift) or --bb-shadow-sheet (bottom sheets,
   popovers, the result sheet). Rings drawn with box-shadow (focus rings, selected outlines, medallion frames) are outlines, not
   shadows, and stay as they are. */
:root{ --bb-radius-card:16px; --bb-radius-button:12px; --bb-radius-pill:999px;
  --bb-shadow-sheet:0 -1px 2px rgba(28,38,32,.06), 0 12px 32px rgba(28,38,32,.16); }
:root[data-theme="dark"], .bb-dark{ --bb-shadow-sheet:0 0 0 1px var(--bb-rule), 0 12px 32px rgba(0,0,0,.5); }
/* Rough pass R2 (Chris, lead transcript line 4437, 2026-11-16: "The demo is looking really rough from a UI perspective."): shared pieces, one look each.
   Eyebrow tracking: about .06em (was .3em, read as wide-spaced letters). Casing is the sentence-case lane's (L5). */
:root{ --bb-track-eyebrow:.06em; }
/* ONE certainty tag (.bb-tag). Caption size, weight 600, muted ink, no box and no dashed border: the same shape for every level,
   with a leading 8px dot: filled = Close, hollow ring = Estimate. An official figure (Actual, Audited) gets NO tag, as How our
   numbers work says, so those never show. At most one per hero number, none on list rows (row certainty is in the source sheet);
   it sits after the number on the source / meta line. The older tag classes (.bkp-badge, .atb-tag, .ftb-tag, .ftb-q, .mstamp__tag, and the line page's .bl-tag--close/--estimate/--actual)
   take the same look until their lanes swap to .bb-tag. Tokens only; light and dark come from them. */
.bb-tag,html body :is(.bkp-badge,.atb-tag,.ftb-tag,.ftb-q,.mstamp__tag,.bl-tag--close,.bl-tag--estimate,.bl-tag--actual,.bl-tag--audited){display:inline-flex;align-items:center;gap:5px;margin:0;padding:0;border:0;border-radius:0;
  background:none;box-shadow:none;color:var(--bb-muted);font:600 var(--bb-fs-caption)/1.3 var(--bb-font-body);letter-spacing:0;text-transform:none;
  white-space:nowrap;vertical-align:baseline;cursor:inherit;user-select:none;-webkit-user-select:none}
.bb-tag::before,html body :is(.bkp-badge,.atb-tag,.ftb-tag,.ftb-q,.mstamp__tag,.bl-tag--close,.bl-tag--estimate,.bl-tag--actual,.bl-tag--audited)::before{content:"";flex:none;width:8px;height:8px;box-sizing:border-box;
  border:1.5px solid currentColor;border-radius:var(--bb-radius-pill);background:currentColor}
.bb-tag--estimate::before,html body :is(.bkp-badge--estimate,.atb-tag--estimate,.ftb-tag--estimate,.ftb-q--estimate,.bl-tag--estimate)::before{background:transparent}
.bb-tag--actual,.bb-tag--audited,html body :is(.bkp-badge--actual,.bkp-badge--audited,.atb-tag--actual,.atb-tag--audited,.ftb-tag--actual,.ftb-q--actual,.bl-tag--actual,.bl-tag--audited){display:none}
/* How our numbers work defines the words: there "Actual" is a plain term with no dot (it is the "no tag" level) */
html body dt > .bkp-badge--actual{display:inline;color:var(--bb-ink)}
html body dt > .bkp-badge--actual::before{content:none}
@media (forced-colors: active){ .bb-tag::before,html body :is(.bkp-badge,.atb-tag,.ftb-tag,.ftb-q,.mstamp__tag,.bl-tag--close,.bl-tag--estimate,.bl-tag--actual,.bl-tag--audited)::before{border-color:CanvasText} }
/* the line page's tag (.bl-tag--*, css/books-lines.css) also drops its pill height */
html body :is(.bl-tag--close,.bl-tag--estimate,.bl-tag--actual,.bl-tag--audited){min-height:0;font-weight:600}
/* v38 part 10 (BB-411; Chris's prompt v35 Part 7, items 1-4 and 11, docs/CLAUDE_CODE_PROMPTS_v35.md on the handoff branch): chart colour tokens. Every chart colour is one of these; the build's
   palette check (scripts/palette-check.mjs) fails when one that must show is under 3:1 on Light paper #FBF8F1 or Night paper #1A1714
   (and the app's own page colours). The values are Chris's (item 1 and item 3); the edge, hatch-line and vote-nay values are Claude's
   suggestion, not approved, each chosen to pass 3:1.
   Light: brick #A8503A for Borrowed and Interest (lighter than hunter green #2F4D36; #7A2E22 stays for text only). Ochre text and lines
   #7D5F2E; brass #B8955A only for labelled fills. Fills keep their pale engraved look; each band gets a 1 px darker edge (>= 3:1).
   Night: green #8DB096, rose / brick #D08A72, ochre #D4B27A, ink #E8E0CC. Hatching: engraved diagonal lines >= 3:1 against their fill. */
:root{
  --chart-green:#2F4D36; --chart-brick:#A8503A; --chart-ochre:#7D5F2E; --chart-brass:#B8955A; --chart-ink:#1C2620;
  --chart-sage:#5B8466; --chart-olive:#8C7A55; --chart-sand:#CFC5AE; --chart-mint:#82A38A; --chart-pale:#AFC6B4;
  /* one darker edge per band (>= 3:1 on the paper) */
  --chart-edge-green:#2F4D36; --chart-edge-brick:#8E4430; --chart-edge-brass:#8A6A32; --chart-edge-sage:#4E7358; --chart-edge-olive:#6E5F3F;
  --chart-edge-sand:#6B7569;
  /* the engraved hatch: lines in the paper colour across the brick fill; a hatched stream keeps this much of its fill */
  --chart-hatch-fill:var(--chart-brick); --chart-hatch-line:#FBF8F1; --chart-hatch-o:.8; --chart-hatch-line-pale:#1C2620;   /* lines across a pale fill */
  --chart-block-line:#FBF8F1;   /* Every block: lines across an Estimate block's colour stripe */
  --chart-block-line-sage:#FBF8F1;   /* … across the sage stripe of what it owns */
  --chart-block-line-brick:#FBF8F1; --chart-block-line-green:#FBF8F1;   /* … across Money it borrowed and Loans (dark lines in Night, where those stripes are light) */
  /* Yea / Nay and side-by-side comparisons: neutral green and ochre, never red or blue (No / Nay left, Aye / Yea right, D-17) */
  --chart-yea:#2F4D36; --chart-nay:#7D5F2E;
  /* item 4: a label over a chart sits on a solid cream pad, never on hatching */
  --chart-pad:#FBF8F1; --chart-pad-ink:#1C2620;
}
:root[data-theme="dark"], .bb-dark{
  --chart-green:#8DB096; --chart-brick:#D08A72; --chart-ochre:#D4B27A; --chart-brass:#D4B27A; --chart-ink:#E8E0CC;
  --chart-sage:#4F7A5C; --chart-olive:#A08D63; --chart-sand:#8E866F; --chart-mint:#8DB596; --chart-pale:#B4CDB9;
  --chart-edge-green:#8DB096; --chart-edge-brick:#D08A72; --chart-edge-brass:#D4B27A; --chart-edge-sage:#7FA488; --chart-edge-olive:#B8A57A;
  --chart-edge-sand:#A39A82;
  --chart-hatch-fill:var(--chart-brick); --chart-hatch-line:#1A1714; --chart-hatch-o:.8; --chart-hatch-line-pale:#1A1714; --chart-block-line:#E8E0CC; --chart-block-line-sage:#1A1714; --chart-block-line-brick:#1A1714; --chart-block-line-green:#1A1714;
  --chart-yea:#8DB096; --chart-nay:#D4B27A;
  --chart-pad:#E8E0CC; --chart-pad-ink:#17281D;
}
/* item 8: every number column and every number that animates uses even-width lining figures, so columns line up and a changing
   number doesn't jiggle. Fraunces (the serif) is kept for headline numbers and titles only: its files have no even-width figures (checked
   Nov 17: "1111" and "0000" differ in width with tabular-nums on), so a column of numbers is never set in it. */
html body :is(.ftb-rlbl b,.ftb-hlbl b,.ftb-hlbl span,.ftb-block__v,.ftb-poollbl,.ftb-learn__rows dd,.ftb-tie__rows dd,.ftb-layer__t b,.ftb-owelbl b,.ftb-ownlbl b,
.bkv-line__v,.bkv-card__v,.sp-val,.sd-val,.sd-bucks,.bb-row__val,[data-fig],.d1-guess__num,.rc-total,.rc-amt,.quiz-score,.d60-timer__v,.bd-row__v){font-variant-numeric:tabular-nums lining-nums}

/* file: css/motion.css */
/* BuckBallot motion tokens. Durations and easing follow Material 3's scale. */
:root {
  --m-press: 150ms;      /* tap feedback */
  --m-settle: 250ms;     /* in-place changes: toggles, bars, chips */
  --m-enter: 350ms;      /* cards and sections arriving */
  --m-route-in: 400ms;   /* a screen or sheet arriving */
  --m-route-out: 200ms;  /* a screen or sheet leaving */
  --m-stamp: 180ms;      /* YEA / NAY stamp landing */
  --m-celebrate: 700ms;  /* badge glint, once */
  --e-standard: cubic-bezier(0.2, 0, 0, 1);       /* moves within the screen */
  --e-enter: cubic-bezier(0.05, 0.7, 0.1, 1);     /* arriving (emphasized decelerate) */
  --e-exit: cubic-bezier(0.3, 0, 0.8, 0.15);      /* leaving (emphasized accelerate) */
  --stagger: 60ms;
}
@media (prefers-reduced-motion: reduce) {
  :root { --m-settle: 0ms; --m-enter: 150ms; --m-route-in: 150ms; --m-route-out: 150ms; --m-stamp: 150ms; --m-celebrate: 0ms; --stagger: 0ms; }
}

/* file: css/motion-ext.css */
/* ==========================================================================
   BuckBallot motion: derived tokens (Asset Pack v4 + v6: all 28 motions of brand/reference/brand/motion/MOTION_SPEC.md (v1-v4)).
   css/motion.css is a verbatim copy of the pack's motion.css (the base tokens). Every timing in the spec that is not a single
   base token is built here from base tokens with calc(), so screens and js/motion.js only ever use NAMED tokens.
   JS reads them with PKMotion.dur('--m-…'); no literal milliseconds anywhere else (checked by scripts/motion-audit.mjs).

   Reduced motion: the pack's @media block shrinks the base tokens (settle/celebrate/stagger → 0, enter/route/stamp → 150ms).
   --m-press does NOT shrink, so every token derived from it is overridden below to match the spec's "Reduced motion" column.
   html.still (the ?still address flag) gets the same values.
   ========================================================================== */
:root{
  /* 1. App open (~1.2s): ring draws 600, hat springs in 550, wordmark rises 350 */
  --m-ring: calc(var(--m-press) * 4);                       /* 600ms, --e-standard */
  --m-hat: calc(var(--m-enter) + var(--m-route-out));        /* 550ms, spring keyframes */
  --m-hat-delay: calc(var(--m-press) * 2);                   /* 300ms: hat starts while the ring is half drawn */
  --m-wordmark: var(--m-enter);                              /* 350ms, --e-enter */
  --m-wordmark-delay: calc(var(--m-press) * 4);              /* 600ms: rises as the ring closes */
  --m-open-total: calc(var(--m-press) * 8);                  /* 1200ms: whole launch, overlay fades out after */
  --m-open-hold: 0ms;                                        /* reduced: static logo hold (below) */
  --m-open-fade: var(--m-route-out);                         /* 200ms overlay fade-out (reduced: 150ms crossfade) */
  /* 2. Tab switch: out 200 / in 300, 100 overlap; indicator 250 */
  --m-tab-out: var(--m-route-out);                           /* 200ms, --e-exit */
  --m-tab-in: calc(var(--m-press) * 2);                      /* 300ms, --e-enter */
  --m-tab-overlap: calc(var(--m-route-out) / 2);             /* 100ms: in starts 100ms before out ends */
  --m-tab-in-delay: calc(var(--m-tab-out) - var(--m-tab-overlap));   /* 100ms */
  --m-indicator: var(--m-settle);                            /* 250ms, --e-standard */
  /* 3. Feed entrance (first Feed view each day) */
  --m-card-in: var(--m-enter);                               /* 350ms per card, --stagger 60ms */
  --m-art-reveal: calc(var(--m-press) * 3);                  /* 450ms clip-path, --e-standard */
  --m-bubble: calc(var(--m-press) * 2);                      /* 300ms spring */
  --m-feed-fade: 0ms;                                        /* reduced: 150ms fade, all at once */
  /* 4. Swipe vote */
  --m-stamp-land: var(--m-stamp);                            /* 180ms spring */
  --m-nudge: calc(var(--m-press) * 0.8);                     /* 120ms */
  --m-flyout: var(--m-route-out);                            /* 200ms, --e-exit */
  --m-next-card: calc(var(--m-press) * 2);                   /* 300ms, --e-enter */
  --m-stamp-down: calc(var(--m-press) * 0.8);                /* 120ms: PASSED/FAILED/VERIFIED/AUDITED stamp-down, scale 1.3 → 1 */
  /* 5. Split 100 bucks */
  --m-bars: var(--m-settle);                                 /* 250ms with a small overshoot */
  --m-roll: var(--m-settle);                                 /* 250ms number roll */
  --m-pulse: calc(var(--m-press) * 2);                       /* 300ms total pulse at 100 */
  /* 6. Books count-up (first Books view per session) */
  --m-count: calc(var(--m-press) * 6);                       /* 900ms, --e-enter */
  --m-bars-fill: calc(var(--m-press) * 4);                   /* 600ms */
  --m-bars-delay: var(--m-press);                            /* after 150ms */
  /* 7. My two bucks sheet */
  --m-sheet-press: var(--m-press);                           /* 150ms + button press */
  --m-sheet-up: var(--m-route-in);                           /* 400ms, --e-enter */
  --m-scrim: var(--m-settle);                                /* 250ms */
  --m-sheet-close: var(--m-route-out);                       /* 200ms, --e-exit */
  /* 8. Badge unlock (once per badge) */
  --m-flip: calc(var(--m-route-out) * 2.5);                  /* 500ms spring */
  --m-glint: var(--m-celebrate);                             /* 700ms */
  --m-dots: calc(var(--m-press) * 4);                        /* 600ms, 10 gold dots, --e-exit */
  --m-badge-fade: 0ms;                                       /* reduced: 150ms fade only */
  /* ---- v2 of the spec (pack v6): eight more motions ---- */
  /* 9. Your receipt print-out (~1.6s): paper feeds 900, lines 120 apart, button last */
  --m-receipt-feed: calc(var(--m-press) * 6);                /* 900ms, --e-standard */
  --m-receipt-line: var(--m-settle);                         /* 250ms per line fade/rise, --e-enter */
  --m-receipt-gap: calc(var(--m-press) * 0.8);               /* 120ms between lines (use as a stagger: n * gap) */
  --m-receipt-button: calc(var(--m-press) * 8 / 3);          /* 400ms */
  --m-receipt-button-delay: calc(var(--m-press) * 8);        /* 1200ms: button lands last, total 1.6s */
  --m-receipt-fade: 0ms;                                     /* reduced: whole receipt fades in 150ms */
  /* 10. Card to bill detail (shared element) */
  --m-detail-grow: var(--m-route-in);                        /* 400ms, --e-enter */
  --m-detail-content: var(--m-route-out);                    /* 200ms content fade, --e-enter */
  --m-detail-content-delay: calc(var(--m-route-in) - var(--m-route-out));   /* 200ms: content lands with the container */
  --m-detail-back: calc(var(--m-press) * 2);                 /* 300ms, --e-exit */
  --m-theme: var(--m-celebrate);                             /* 700ms: Night edition palette crossfade (spec v10 TM10); reduced: instant */
  --m-detail-back-half: calc(var(--m-detail-back) / 2);     /* 150ms: on the way back the detail's content leaves, then the card's arrives */
  /* 11. Docket complete */
  --m-done-ring: calc(var(--m-press) * 4);                   /* 600ms, --e-standard */
  --m-done-check: var(--m-settle);                           /* 250ms spring */
  --m-done-text: var(--m-enter);                             /* 350ms, --e-enter */
  --m-done-fade: 0ms;                                        /* reduced: final state with a 150ms fade */
  /* 12. Pull to refresh (follows the finger; threshold 72px is a distance, not a token) */
  --m-refresh-sweep: calc(var(--m-press) * 6);               /* 900ms magnifier sweep, loops ONLY while loading */
  --m-refresh-snap: var(--m-settle);                         /* 250ms snap back, --e-standard */
  /* 13. Loading to content */
  --m-shimmer: calc(var(--m-press) * 8);                     /* 1200ms shimmer, linear, loops ONLY while waiting */
  --m-skeleton-wait: calc(var(--m-press) * 2);               /* 300ms: a load shorter than this shows no skeleton (a wait, not a motion) */
  --m-skeleton-swap: var(--m-route-out);                     /* 200ms crossfade to content, --e-standard */
  /* 14. Vote saved toast (with Undo) */
  --m-toast-in: var(--m-settle);                             /* 250ms, --e-enter */
  --m-toast-stay: calc(var(--m-press) * 80 / 3);             /* 4000ms on screen (a reading time, not a motion; pauses on hover/focus) */
  --m-toast-stay-long: calc(var(--m-toast-stay) * 2);        /* 8000ms: an informational toast with a longer message (not votes) */
  --m-toast-out: var(--m-route-out);                         /* 200ms, --e-exit */
  /* 15. Call It result */
  --m-callit-flip: calc(var(--m-press) * 3);                 /* 450ms, --e-standard */
  --m-callit-count: var(--m-route-in);                       /* 400ms points count-up, --e-enter */
  /* 16. Form error */
  --m-shake: calc(var(--m-press) * 2);                       /* 300ms, 3 small cycles, linear */
  --m-error-msg: var(--m-route-out);                         /* 200ms message in, --e-enter */

  /* ---- v3 of the spec (pack v7/v8): six more motions ---- */
  /* 17. Same split / Different take reaction */
  --m-react-press: var(--m-press);                           /* 150ms press, --e-standard */
  --m-react-fill: var(--m-settle);                           /* 250ms fill, --e-standard */
  --m-react-float: calc(var(--m-press) * 8 / 3);             /* 400ms "+1" floats up and fades, --e-exit */
  --m-react-line: var(--m-settle);                           /* 250ms agreement line update, --e-enter */
  /* 18. Follow button */
  --m-follow-morph: var(--m-settle);                         /* 250ms Follow → Following, --e-standard */
  --m-follow-check: var(--m-route-out);                      /* 200ms check draws (clip-path), --e-enter */
  /* 19. Onboarding steps (direction follows Continue / Back) */
  --m-onboard-out: var(--m-route-out);                       /* 200ms, --e-exit */
  --m-onboard-in: calc(var(--m-press) * 2);                  /* 300ms, --e-enter */
  --m-onboard-pill: var(--m-settle);                         /* 250ms progress pill, --e-standard */
  /* 20. Search open */
  --m-search-expand: calc(var(--m-press) * 2);               /* 300ms field expands, --e-enter */
  --m-search-chip: var(--m-route-out);                       /* 200ms per filter chip, --e-enter */
  --m-search-stagger: calc(var(--stagger) * 2 / 3);          /* 40ms between chips */
  /* 21. Official verified (once, to the official) */
  --m-verify-seal: calc(var(--m-press) * 8 / 3);             /* 400ms seal lands, spring */
  --m-verify-check: var(--m-settle);                         /* 250ms check, --e-enter */
  --m-verify-label: calc(var(--m-press) * 2);                /* 300ms label, --e-enter */
  /* 22. Settings toggle */
  --m-toggle: var(--m-route-out);                            /* 200ms knob (slight overshoot keyframe) and track fill opacity, --e-standard */
  /* ---- v4 of the spec (pack v9/v10): six more motions ---- */
  /* 23. Compare reveal */
  --m-reveal-flip: calc(var(--m-press) * 2);                 /* 300ms per friend bar, --e-standard */
  --m-reveal-stagger: var(--stagger);                        /* 60ms */
  --m-reveal-head: var(--m-enter);                           /* 350ms headline, --e-enter */
  /* 24. Send to a friend */
  --m-send-shrink: var(--m-enter);                           /* 350ms card shrinks, --e-exit */
  --m-send-bubble: var(--m-settle);                          /* 250ms message bubble lands, --e-enter; then the system share sheet */
  /* 25. Group results */
  --m-group-avatar: var(--m-settle);                         /* 250ms avatars spring in */
  --m-group-stagger: calc(var(--stagger) * 4 / 3);           /* 80ms */
  --m-group-bars: calc(var(--m-press) * 2);                  /* 300ms */
  --m-group-head: var(--m-enter);                            /* 350ms headline, --e-enter */
  /* 26. Swipe sheet down (follows the finger) */
  --m-dismiss-close: var(--m-route-out);                     /* 200ms close, --e-exit */
  --m-dismiss-snap: var(--m-settle);                         /* 250ms snap back if released early, --e-standard */
  --m-dismiss-flick: var(--m-route-out);                     /* 200ms: a downward flick inside this window closes (a time window, not a motion) */
  --m-press-tint: calc(var(--m-press) * 2 / 3);              /* 100ms: the pressed tint on rows and tabs comes and goes (kept in reduced motion) */
  /* 27. Long-press preview */
  --m-peek-hold: calc(var(--m-press) * 8 / 3);               /* 400ms hold before the preview (a press time, not a motion; never shrinks) */
  --m-peek-lift: var(--m-route-out);                         /* 200ms card lifts, --e-standard */
  --m-peek-blur: var(--m-route-out);                         /* 200ms background blur (an overlay's opacity), --e-standard */
  --m-peek-menu: var(--m-route-out);                         /* 200ms quick-action menu, --e-enter */
  /* 28. Live night reactions */
  --m-live-pop: var(--m-press);                              /* 150ms tap pop, spring keyframes */
  --m-live-batch: calc(var(--m-press) * 40 / 3);             /* 2000ms between count batches (a polling interval, not a motion) */
  --m-live-roll: var(--m-settle);                            /* 250ms count roll, --e-standard */
  /* Town map (MOTION_SPEC "Town map motions" TM1-TM5; behind the townMap flag, js/townmap.js; ported from feature/town-map for item 6 of the November 16 prompt). Reduced motion: js/townmap.js
     swaps every one of these for the 150ms crossfade (--m-fade); no lift, ripple, zoom or drop. */
  --m-tm-switch: var(--m-settle);                            /* 250ms Tiles · Map knob slide, --e-standard */
  --m-tm-tiles-out: var(--m-route-out);                      /* TM1: 200ms tiles fade back to .98, --e-exit */
  --m-tm-map-in: var(--m-enter);                             /* TM1: 350ms map plate .96 → 1 and fade in, --e-enter */
  --m-tm-map-fade: var(--m-settle);                          /* TM1: 250ms map view fade, --e-standard */
  --m-tm-label: var(--m-settle);                             /* TM1/TM5: 250ms each label drops 8px, pin pops, line fades, --e-enter */
  --m-tm-label-gap: var(--stagger);                          /* TM1: 60ms between labels */
  --m-tm-label-gap-back: calc(var(--stagger) / 2);           /* TM5: 30ms between labels */
  --m-tm-labels-out: var(--m-press);                         /* TM2/TM4: 150ms labels, pins and lines fade, --e-exit */
  --m-tm-map-out: var(--m-route-out);                        /* TM2: 200ms map fades out, --e-exit */
  --m-tm-tiles-in: var(--m-settle);                          /* TM2: 250ms tiles rise 10px, --e-enter */
  --m-tm-tiles-gap: calc(var(--stagger) * 2 / 3);            /* TM2: 40ms between tiles */
  --m-tm-press: var(--m-press);                              /* TM3: 150ms label lifts 2px, pin dips to .8 */
  --m-tm-ripple: calc(var(--m-press) * 7 / 3);               /* TM3: 350ms cream ripple, scale 1 → 5 */
  --m-tm-zoom: var(--m-route-in);                            /* TM4: 400ms camera zooms 2.4x toward the building, --e-enter */
  --m-tm-door: var(--m-route-in);                            /* TM4: 400ms place opens out of the building (clip-path circle), --e-enter */
  --m-tm-door-delay: calc(var(--m-press) * 22 / 15);         /* TM4: the door starts 220ms into the zoom */
  --m-tm-hit-delay: calc(var(--m-press) * 4 / 5);            /* TM4: the tapped label fades 120ms after the others */
  --m-tm-door-close: calc(var(--m-press) * 2);               /* TM5: 300ms place closes into the building, --e-exit */
  --m-tm-zoom-out: var(--m-route-in);                        /* TM5: 400ms camera pulls back to 1x, --e-standard */
  /* shared */
  --m-flash: calc(var(--m-press) * 8 / 3);                   /* 400ms: the "you just changed this row" tint fades (reduced: none); not over 400 so no skip needed */
  --m-flash-hold: calc(var(--m-press) * 34 / 3);             /* 1700ms: how long a changed row keeps its highlight class (the reduced-motion outline stays this long); a hold, not a motion */
  --m-fade: var(--m-press);                                  /* the 150ms reduced-motion fade */
  --m-title-swap: var(--m-route-out);                        /* 200ms: v29 native nav, the large title gives way to the small centred one, --e-standard (reduced: instant) */
  --m-skip-threshold: calc(var(--m-press) * 8 / 3);          /* 400ms: motions longer than this are tap-skippable (built on --m-press so it does not shrink) */

  /* older names (js/shell.js, css/shell.css and screen CSS still use them), re-pointed to the pack scale */
  --m-fast: var(--m-press); --m-base: var(--m-settle); --m-slow: var(--m-route-in); --m-grow: var(--m-bars-fill); --m-stagger: var(--stagger);
  --ease-out: var(--e-standard); --ease-in: var(--e-exit); --ease-spring: var(--e-standard);
}
@media (prefers-reduced-motion: reduce){
  :root{
    --m-ring: 0ms; --m-hat: 0ms; --m-hat-delay: 0ms; --m-wordmark: 0ms; --m-wordmark-delay: 0ms;
    --m-open-hold: calc(var(--m-press) * 8 / 3);             /* static logo 400ms */
    --m-open-total: calc(var(--m-press) * 8 / 3);
    --m-open-fade: var(--m-press);                           /* then a 150ms crossfade */
    --m-tab-in: var(--m-press); --m-tab-overlap: var(--m-press); --m-tab-in-delay: 0ms;   /* one 150ms crossfade; indicator jumps (--m-settle = 0) */
    --m-art-reveal: 0ms; --m-bubble: 0ms; --m-feed-fade: var(--m-press);
    --m-nudge: 0ms; --m-next-card: var(--m-press); --m-stamp-down: 0ms;
    --m-pulse: 0ms;
    --m-count: 0ms; --m-bars-fill: 0ms; --m-bars-delay: 0ms;
    --m-sheet-press: 0ms; --m-scrim: var(--m-press);
    --m-flip: 0ms; --m-dots: 0ms; --m-badge-fade: var(--m-press);
    /* v6 motions */
    --m-receipt-feed: 0ms; --m-receipt-line: 0ms; --m-receipt-gap: 0ms; --m-receipt-button: 0ms; --m-receipt-button-delay: 0ms; --m-receipt-fade: var(--m-press);
    --m-detail-grow: 0ms; --m-detail-content: var(--m-press); --m-detail-content-delay: 0ms; --m-detail-back: var(--m-press);
    --m-done-ring: 0ms; --m-done-check: 0ms; --m-done-text: 0ms; --m-done-fade: var(--m-press);
    --m-refresh-sweep: 0ms; --m-refresh-snap: 0ms;
    --m-shimmer: 0ms; --m-skeleton-swap: 0ms;
    --m-toast-in: var(--m-press); --m-toast-out: var(--m-press);
    --m-callit-flip: 0ms; --m-callit-count: 0ms;
    --m-shake: 0ms; --m-error-msg: var(--m-press);
    --m-flash: 0ms;
    /* v7-v10 motions */
    --m-react-press: 0ms; --m-react-fill: 0ms; --m-react-float: 0ms; --m-react-line: 0ms;
    --m-follow-morph: 0ms; --m-follow-check: 0ms;
    --m-onboard-out: var(--m-press); --m-onboard-in: var(--m-press); --m-onboard-pill: 0ms;
    --m-search-expand: var(--m-press); --m-search-chip: var(--m-press); --m-search-stagger: 0ms;
    --m-verify-seal: 0ms; --m-verify-check: 0ms; --m-verify-label: var(--m-press);
    --m-toggle: 0ms;
    --m-reveal-flip: 0ms; --m-reveal-stagger: 0ms; --m-reveal-head: var(--m-press);
    --m-send-shrink: 0ms; --m-send-bubble: 0ms;
    --m-group-avatar: 0ms; --m-group-stagger: 0ms; --m-group-bars: 0ms; --m-group-head: var(--m-press);
    --m-dismiss-close: var(--m-press); --m-dismiss-snap: 0ms;
    --m-peek-lift: 0ms; --m-peek-blur: 0ms; --m-peek-menu: var(--m-press);
    --m-live-pop: 0ms; --m-live-roll: 0ms;
    --m-title-swap: 0ms;
  }
}
html.still{
  --m-settle: 0ms; --m-enter: var(--m-press); --m-route-in: var(--m-press); --m-route-out: var(--m-press); --m-stamp: var(--m-press); --m-celebrate: 0ms; --stagger: 0ms;
  --m-ring: 0ms; --m-hat: 0ms; --m-hat-delay: 0ms; --m-wordmark: 0ms; --m-wordmark-delay: 0ms;
  --m-open-hold: calc(var(--m-press) * 8 / 3); --m-open-total: calc(var(--m-press) * 8 / 3); --m-open-fade: var(--m-press);
  --m-tab-in: var(--m-press); --m-tab-overlap: var(--m-press); --m-tab-in-delay: 0ms;
  --m-art-reveal: 0ms; --m-bubble: 0ms; --m-feed-fade: var(--m-press);
  --m-nudge: 0ms; --m-next-card: var(--m-press); --m-stamp-down: 0ms; --m-pulse: 0ms;
  --m-count: 0ms; --m-bars-fill: 0ms; --m-bars-delay: 0ms;
  --m-sheet-press: 0ms; --m-scrim: var(--m-press);
  --m-flip: 0ms; --m-dots: 0ms; --m-badge-fade: var(--m-press);
  /* v6 motions */
  --m-receipt-feed: 0ms; --m-receipt-line: 0ms; --m-receipt-gap: 0ms; --m-receipt-button: 0ms; --m-receipt-button-delay: 0ms; --m-receipt-fade: var(--m-press);
  --m-detail-grow: 0ms; --m-detail-content: var(--m-press); --m-detail-content-delay: 0ms; --m-detail-back: var(--m-press);
  --m-done-ring: 0ms; --m-done-check: 0ms; --m-done-text: 0ms; --m-done-fade: var(--m-press);
  --m-refresh-sweep: 0ms; --m-refresh-snap: 0ms;
  --m-shimmer: 0ms; --m-skeleton-swap: 0ms;
  --m-toast-in: var(--m-press); --m-toast-out: var(--m-press);
  --m-callit-flip: 0ms; --m-callit-count: 0ms;
  --m-shake: 0ms; --m-error-msg: var(--m-press);
  --m-flash: 0ms;
  /* v7-v10 motions */
  --m-react-press: 0ms; --m-react-fill: 0ms; --m-react-float: 0ms; --m-react-line: 0ms;
  --m-follow-morph: 0ms; --m-follow-check: 0ms;
  --m-onboard-out: var(--m-press); --m-onboard-in: var(--m-press); --m-onboard-pill: 0ms;
  --m-search-expand: var(--m-press); --m-search-chip: var(--m-press); --m-search-stagger: 0ms;
  --m-verify-seal: 0ms; --m-verify-check: 0ms; --m-verify-label: var(--m-press);
  --m-toggle: 0ms;
  --m-reveal-flip: 0ms; --m-reveal-stagger: 0ms; --m-reveal-head: var(--m-press);
  --m-send-shrink: 0ms; --m-send-bubble: 0ms;
  --m-group-avatar: 0ms; --m-group-stagger: 0ms; --m-group-bars: 0ms; --m-group-head: var(--m-press);
  --m-dismiss-close: var(--m-press); --m-dismiss-snap: 0ms;
  --m-peek-lift: 0ms; --m-peek-blur: 0ms; --m-peek-menu: var(--m-press);
  --m-live-pop: 0ms; --m-live-roll: 0ms;
  --m-title-swap: 0ms;
}

/* The spring (spec): scale 0.6 → 1.06 at 55% → 0.98 at 80% → 1.0; one visible overshoot. Use with a token duration and linear. */
@keyframes pk-spring{ 0%{transform:scale(.6);opacity:0} 55%{transform:scale(1.06);opacity:1} 80%{transform:scale(.98)} 100%{transform:scale(1);opacity:1} }
@keyframes pk-fade-in{ from{opacity:0} to{opacity:1} }
@keyframes pk-fade-out{ from{opacity:1} to{opacity:0} }
@keyframes pk-flash-out{ from{opacity:1} to{opacity:0} }
/* the results stamp-down (PASSED / FAILED / VERIFIED / AUDITED): scale 1.3 → 1 */
@keyframes pk-stamp-down{ from{transform:scale(1.3);opacity:0} to{transform:scale(1);opacity:1} }
.pk-stamp-down{ animation:pk-stamp-down var(--m-stamp-down) var(--e-standard) both }
@media (prefers-reduced-motion: reduce){ .pk-stamp-down{ animation:pk-fade-in var(--m-fade) linear both } }
html.still .pk-stamp-down{ animation:pk-fade-in var(--m-fade) linear both }

/* file: css/fonts.css */
/* Fonts served from this site, not Google Fonts, so school web filters and privacy reviews have nothing outside to block
   (classroom check fix 1, docs/CLASSROOM_CHECK.md). Same faces and weights the Google Fonts link loaded:
   Fraunces 600, 700 and 400 italic; Inter 400, 500, 600 and 800 (a 700 in the CSS still shows the 800, as before).
   Latin subset, from the npm packages @fontsource/fraunces and @fontsource/inter 5.3.0. Both are SIL Open Font License:
   fonts/LICENSE-fraunces.txt, fonts/LICENSE-inter.txt. Stacks with fallbacks: --bb-font-display / --bb-font-body in css/tokens.css. */
@font-face{font-family:"Fraunces";font-style:normal;font-display:swap;font-weight:600;src:url(../fonts/fraunces-latin-600-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Fraunces";font-style:normal;font-display:swap;font-weight:700;src:url(../fonts/fraunces-latin-700-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Fraunces";font-style:italic;font-display:swap;font-weight:400;src:url(../fonts/fraunces-latin-400-italic.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Inter";font-style:normal;font-display:swap;font-weight:400;src:url(../fonts/inter-latin-400-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Inter";font-style:normal;font-display:swap;font-weight:500;src:url(../fonts/inter-latin-500-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Inter";font-style:normal;font-display:swap;font-weight:600;src:url(../fonts/inter-latin-600-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Inter";font-style:normal;font-display:swap;font-weight:800;src:url(../fonts/inter-latin-800-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
/* Courier Prime 400 and 700: the receipt paper only (#receipt), the one named exception to the two-font rule (Chris, Nov 15, 2026:
   restore the original receipt, "receipt-style monospace type for the itemized lines"; docs/BRAND.md). Restored from the receipt
   as it was at f0f614f (Nov 13, 2026), the same files the live site serves. SIL Open Font License: fonts/LICENSE-courier-prime.txt. */
@font-face{font-family:"Courier Prime";font-style:normal;font-display:swap;font-weight:400;src:url(../fonts/courier-prime-latin-400-normal.woff2) format("woff2")}
@font-face{font-family:"Courier Prime";font-style:normal;font-display:swap;font-weight:700;src:url(../fonts/courier-prime-latin-700-normal.woff2) format("woff2")}
/* Fallback faces (v29 item 9, lane L3a): while Inter and Fraunces download, the page shows a system font. These faces
   resize that system font to take the same room as the real one (size-adjust, ascent/descent from the font files:
   Inter 400 against Arial, Fraunces 600/700 against Times New Roman Bold), so text does not jump when the real font
   arrives. Once the real font has loaded nothing here is used; the look does not change. Each covers only the characters the real
   font covers (same unicode-range), so a character the real font lacks (→) still falls through to the system font, as before.
   Named in the stacks in css/tokens.css. */
@font-face{font-family:"Inter Fallback";src:local("Arial"),local("ArialMT"),local("Helvetica"),local("Liberation Sans");size-adjust:107.48%;ascent-override:90.14%;descent-override:22.44%;line-gap-override:0%;unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Fraunces Fallback";font-weight:700;src:local("Times New Roman Bold"),local("TimesNewRomanPS-BoldMT"),local("Liberation Serif Bold");size-adjust:116.58%;ascent-override:83.89%;descent-override:21.87%;line-gap-override:0%;unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Fraunces Fallback";font-weight:400 600;src:local("Times New Roman Bold"),local("TimesNewRomanPS-BoldMT"),local("Liberation Serif Bold");size-adjust:113.01%;ascent-override:86.54%;descent-override:22.56%;line-gap-override:0%;unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
