/* Snuug web app: the base layer. Short names for the brand tokens, the look's tokens, the type scale, spacing, motion
   and the reset.
   The brand's values live in brand/tokens/tokens.css (linked in index.html): this file maps them, so a theme set with
   data-theme="ink|sky|sprite|rose|walnut|night" on any element (the QR card, an email) restyles everything inside it.
   The mapping is declared on every [data-theme], because a custom property that reads another is computed where it
   is declared: on :root alone, a nested theme would not reach these names.
   The look (Qoves's, the only one since 19 Nov 2026; docs/web-app/redesign.md) then points the same names at the
   Mist field from styles/gradient.css (light for the dashboard and flows, deep on Night and the entry screens). */

:root, [data-theme] {
  --paper: var(--sn-paper); --surface: var(--sn-surface); --line: var(--sn-line); --fill: var(--sn-fill);
  --ink: var(--sn-ink); --muted: var(--sn-muted);
  --accent: var(--sn-accent); --on-accent: var(--sn-on-accent); --accent-text: var(--sn-accent-text);
  --d1: var(--sn-dither-1); --d2: var(--sn-dither-2); --d3: var(--sn-dither-3); --d4: var(--sn-dither-4); --d5: var(--sn-dither-5);
  --good: var(--sn-good); --potential: var(--sn-potential);
  /* BUG-922: the status colours as words. The brand's green and amber suit dots and rings (3:1 is enough there), but as small text
     on paper or a surface they reach only 3.2 to 4.3:1 in the light themes, under the 4.5:1 text needs. Mixed with the
     theme's ink they pass in every theme (4.9:1 or more); in Night the same mix lightens them. */
  --good-text: color-mix(in srgb, var(--good) 75%, var(--ink)); --potential-text: color-mix(in srgb, var(--potential) 70%, var(--ink));
  --amber: var(--sn-sun-amber); --yellow: var(--sn-sun-yellow); --pale: var(--sn-sun-pale); --on-sun: var(--sn-on-sun);
  --danger: #B3261E;
  /* Glass (the app's glass circle and tab bar): a translucent body, a bright rim, a soft shadow. */
  --glass: color-mix(in srgb, #fff 66%, transparent); --glass-rim: rgba(255, 255, 255, .92); --glass-edge: color-mix(in srgb, var(--ink) 9%, transparent);
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, .05), 0 6px 18px rgba(0, 0, 0, .08);
  --shadow-lift: 0 2px 6px rgba(0, 0, 0, .06), 0 18px 40px rgba(0, 0, 0, .12);
  --scrim: rgba(21, 21, 20, .32);
  /* Which logo file shows: the light one on light paper, the glowing one on Night. */
  --show-on-light: inline-block; --show-on-dark: none;
  color: var(--ink);
}
[data-theme="night"] {
  --glass: color-mix(in srgb, #2A2D33 70%, transparent); --glass-rim: rgba(255, 255, 255, .14); --glass-edge: rgba(255, 255, 255, .08);
  --shadow-soft: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .35);
  --shadow-lift: 0 2px 6px rgba(0, 0, 0, .3), 0 18px 40px rgba(0, 0, 0, .5);
  --scrim: rgba(0, 0, 0, .55);
  --danger: #F2867D;
  --show-on-light: none; --show-on-dark: inline-block;
}

/* ---------- The look: Qoves's, on the Mist field's tokens (styles/gradient.css). Measured from qoves.com and the
   founder's pictures on 19 Nov 2026 (private/web-redesign-2026-11-19/, 2x pictures of a 1728 px window):
     home      headline 56/64, weight 400, -0.02em (phone 32/36); body 16/24; buttons 48 high, 24 px sides, 16/24 weight 500
     dashboard sidebar 244 wide, items 44 high every 49, an icon box 34 square with an 8 radius, labels 15/20 weight 400;
               the current item on a 10 radius fill, its box filled dark; the report in a white card, 16 radius
     settings  a second column 244 wide, items 48 high every 56; the content 880 wide at most, its title 40/44 weight
               500, a 16/24 line under it, a hairline, sections 20/28, fields 48 high with an 8 radius, cards 12 radius
     upgrade   an even split; 48/56 two-tone title, 17/28 paragraph, bullets every 36, the price and one 44 button foot
     signing   a glass card 560 x 460, 16 radius, over large blurred colour; title 40, line 16
   The words were measured on the rendered pages (4.5:1 or more; docs/web-app/redesign.md, "Mist"). ---------- */
:root {
  /* The field */
  --theme-bg-base: var(--g-base);
  --theme-bg: var(--g-image);
  --theme-grain: var(--g-grain);
  /* The deep field, for one large picture or an entry screen (sign-in, the upgrade page's preview), and its words. */
  --theme-hero: var(--g-hero);
  --theme-on-deep: var(--g-on-dark); --theme-on-deep-2: var(--g-on-dark-2);
  /* Glass: a translucent white body, a bright hairline, a long soft shadow. Cards and panels are glass too (the
     founder, 19 Nov 2026: "make all the cards slightly glass and transparent ... but hyper-optimised"): translucent
     white with a fine light edge, so the field shows through. Over a smooth field a blur shows almost nothing, so a
     card has no backdrop-filter; only surfaces over detail (sheets, the sticky top bar, the phone's tab bar, chips over
     a photo or the 3D room) keep --theme-glass-blur. The words keep 4.5:1 on the cards over every field (measured,
     19 Nov 2026: docs/web-app/redesign.md, "The Backgrounds"). */
  --theme-glass: rgba(255, 255, 255, .46);
  --theme-glass-strong: rgba(255, 255, 255, .78);
  --theme-glass-line: rgba(255, 255, 255, .7);
  --theme-glass-blur: blur(24px) saturate(1.35);
  --theme-card: rgba(255, 255, 255, .64);
  --theme-card-line: rgba(21, 21, 20, .07);
  --theme-card-edge: inset 0 1px 0 rgba(255, 255, 255, .75), inset 0 0 0 1px rgba(255, 255, 255, .32), 0 0 0 1px rgba(21, 21, 20, .05);
  --theme-shadow: 0 1px 2px rgb(var(--g-deep) / .05), 0 12px 32px -12px rgb(var(--g-deep) / .2);
  --theme-shadow-lift: 0 2px 6px rgb(var(--g-deep) / .06), 0 24px 60px -18px rgb(var(--g-deep) / .32);
  /* Words and lines: the field's own. */
  --theme-ink: var(--g-ink);
  --theme-muted: var(--g-muted);
  --theme-line: var(--g-rule);
  --theme-fill: var(--g-tint);
  /* The chosen item's icon box (the sidebar, Settings' sections, the report's places): a soft, muted blue with a white
     glyph on a near-white row, after Qoves's chosen item (the founder, 20 Nov 2026: "a nicer, subtler blue and white").
     Qoves's own #9EADB4 gives the glyph 2.3 : 1, so one step deeper: 3.21 : 1 (white on #7A93A5). Was the dark accent
     (--g-dark-solid). The name stays, so the three rules that read it (shell.css, settings.css, analysis.css) are unchanged. */
  --theme-slate: #7A93A5;
  --theme-scrim: rgb(var(--g-deep) / .32);
  /* The light fills of the sidebar, Settings and small parts, as roles, so Dark can set its own (BUG-1410: as fixed
     white they washed out to light grey in the dark). The light values are the ones these parts always had. */
  --theme-item-hover: rgba(255, 255, 255, .45);   /* a sidebar item under the pointer */
  --theme-item-quiet: rgba(255, 255, 255, .22);   /* a Settings section under the pointer: quieter than the chosen one */
  --theme-item-on: rgba(255, 255, 255, .7);       /* the chosen item */
  --theme-item-box: rgba(255, 255, 255, .6);      /* an item's icon box */
  --theme-item-pick: #fff;                        /* the chosen page in an outline (the Room Analysis), on a lit group */
  --theme-review: rgba(255, 255, 255, .5); --theme-review-hover: rgba(255, 255, 255, .75);   /* "Leave a review" */
  --theme-panel-rim: rgba(255, 255, 255, .8);     /* the bright top edge of the sidebar and the Settings column */
  --theme-disc: #F7F7F5;                          /* the small lock disc on an item */
  --theme-tile-empty: rgba(255, 255, 255, .34);   /* an empty photo place */
  --theme-group: rgba(255, 255, 255, .32);        /* My photos' day groups */
  --theme-switch-on: var(--g-dark-solid);         /* a switch that is on */
  --theme-toast: var(--theme-glass);              /* a toast's body */
  --theme-tile-num: var(--theme-glass);           /* a photo place's number badge */
  --theme-promo-tag: rgba(255, 255, 255, .18);   /* the promo's "New" tag */
  --plan-room: rgba(255, 255, 255, .5); --plan-spot: #F3F3F1; --plan-gap: #EDEEEC;   /* the plan drawing's floor, empty spots, door and window gaps */
  --theme-seg: var(--theme-fill); --theme-seg-thumb: var(--theme-glass-strong);   /* the segmented control's track and thumb */
  --theme-on-white: #151514;   /* words on a white button over the deep field: the same in Light and Dark (BUG-1470) */
  --theme-ink-quiet: color-mix(in srgb, var(--theme-ink) 72%, #F7F7F5);   /* a quieter title: "Next room", a room still coming */
  /* The photo board and the set check (capture.css, photo-slots.css): an empty place, the drop zone over the 8, a place's
     small plan and an extra's box, and the photo detail's mat (photo-check.css). Dark sets its own (BUG-1470). */
  --theme-slot: rgba(255, 255, 255, .38); --theme-slot-hover: rgba(255, 255, 255, .62);
  --theme-slot-quiet: rgba(255, 255, 255, .22);   /* the 8 places under the drop zone */
  --theme-drop: rgba(255, 255, 255, .16); --theme-drop-hover: rgba(255, 255, 255, .34);
  --theme-plan-floor: rgba(255, 255, 255, .7);    /* a place's small plan: the room's floor */
  --theme-extra-box: rgba(255, 255, 255, .8);     /* an extra's box (a window, the door, anything special, add more) */
  --theme-plan-cut: rgba(255, 255, 255, .95);     /* an extra's window glass and the door's gap in the wall */
  --theme-photo-mat: color-mix(in srgb, var(--theme-ink) 92%, #F7F7F5);   /* round a photo that does not fill its frame */
  --theme-code: rgba(255, 255, 255, .7);          /* the pairing code's chip in a line of words (pair.css) */
  --theme-past-share: 30%;                        /* how much ink a day gone by keeps in the offer's calendar (offer.css) */
  /* The payment panel (pay.css): its body, opaque (no backdrop-filter over a full-height drawer), and the place of
     Stripe's form, white in both themes, because Stripe's frame draws its own white page (Stripe's branding settings).
     The trial's stand-in wallets (pay.css) show each maker's own artwork, so only two tones are ours: the ground of
     Apple's button (black on a light page, white on a dark one, as Apple's own two styles) and the hairline round
     Onelink's white one. Google's own two colours are typed in pay.css, as its guideline gives them. */
  --theme-pay-panel: #FBFCFC; --theme-pay-form: #FFFFFF;
  --theme-wallet-apple: #000000; --theme-wallet-edge: rgba(21, 21, 20, .18);

  /* Qoves's type and spacing */
  --q-display: 400 30px/34px var(--font);   --q-display-track: -0.02em;
  --q-title: 450 24px/28px var(--font);     --q-title-track: -0.015em;
  --q-page: 500 28px/32px var(--font);      --q-hero: 400 32px/36px var(--font);
  --q-heading: 500 20px/28px var(--font);   --q-heading-track: -0.01em;
  --q-lead: 400 16px/24px var(--font);
  --q-body: 400 16px/24px var(--font);
  --q-small: 400 14px/20px var(--font);
  --q-caption: 400 12px/16px var(--font);
  --q-mono: 400 12px/16px var(--font-mono); --q-mono-track: .06em;
  --q-btn-h: 54px; --q-btn-pad: 30px; --q-btn-font: 500 17px/24px var(--font);
  --q-btn-small-h: 40px; --q-btn-small-font: 400 14px/20px var(--font);
  --q-r-panel: 16px; --q-r-card: 12px; --q-r-field: 8px; --q-r-item: 10px; --q-r-box: 8px;
  --q-gutter: 16px;
  --q-side-w: 244px; --q-side-item: 44px; --q-side-gap: 5px; --q-side-box: 34px;
  --q-sub-w: 264px; --q-sub-item: 48px; --q-sub-gap: 8px;
  --q-content: 880px; --q-content-top: 40px;
  --q-field-h: 48px;
  --q-gap-1: 4px; --q-gap-2: 8px; --q-gap-3: 12px; --q-gap-4: 16px; --q-gap-5: 24px; --q-gap-6: 32px; --q-gap-7: 48px; --q-gap-8: 64px;

  /* Snuug's short names, pointed at the look */
  --paper: #F7F7F5; --surface: rgba(255, 255, 255, .6); --line: var(--theme-line); --fill: var(--theme-fill);
  --ink: var(--theme-ink); --muted: var(--theme-muted);
  --accent: var(--g-solid); --on-accent: var(--g-on-solid);
  --glass: var(--theme-glass); --glass-rim: var(--theme-glass-line); --glass-edge: rgba(21, 21, 20, .08);
  --shadow-soft: var(--theme-shadow); --shadow-lift: var(--theme-shadow-lift); --scrim: var(--theme-scrim);
}
/* Laptop. Qoves's 56 px headline is its marketing home's; inside the product the big words are 40 to 48 px. The
   flows take 44/48 (the upgrade page's scale, in a 600 px column), titles 32/36, a dashboard page's title 40/44. */
@media (min-width: 900px) { :root { --q-gutter: 32px;
  --q-display: 400 44px/48px var(--font); --q-display-track: -0.025em;
  --q-title: 450 32px/36px var(--font); --q-title-track: -0.02em;
  --q-page: 500 40px/44px var(--font); --q-hero: 400 56px/64px var(--font); } }
@media (min-width: 1200px) { :root { --q-gutter: 56px; } }
/* The Night screens (welcome, the taste test, style, You're in): the deep Mist (gradient.css's Night values).
   The glass stays at 8% white or less, so the muted words keep 4.5:1. */
:root[data-theme="night"] {
  --theme-glass: rgba(255, 255, 255, .06);
  --theme-glass-strong: rgba(36, 52, 63, .86);
  --theme-glass-line: rgba(255, 255, 255, .12);
  --theme-card: rgba(255, 255, 255, .06);
  --theme-card-line: rgba(255, 255, 255, .08);
  --theme-card-edge: inset 0 1px 0 rgba(255, 255, 255, .08), inset 0 0 0 1px rgba(255, 255, 255, .08);
  --theme-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -12px rgba(0, 0, 0, .5);
  --theme-shadow-lift: 0 2px 6px rgba(0, 0, 0, .3), 0 24px 60px -18px rgba(0, 0, 0, .6);
  --theme-slate: #6A879C; --theme-scrim: rgba(0, 0, 0, .55);   /* the chosen box: the same blue, lit for the deep field; white glyph 3.78 : 1 */
  --paper: #24343F; --surface: rgba(255, 255, 255, .06);
  --glass-edge: rgba(255, 255, 255, .08);
  /* BUG-1410: Dark's fills. White at a low share, so the field's deep blue stays the colour and the words stay light. */
  --theme-item-hover: rgba(255, 255, 255, .06); --theme-item-quiet: rgba(255, 255, 255, .04);
  --theme-item-on: rgba(255, 255, 255, .12); --theme-item-box: rgba(255, 255, 255, .09);
  --theme-item-pick: rgba(255, 255, 255, .16);   /* BUG-1470: white, it held light words at 1.1 : 1 */
  --theme-review: rgba(255, 255, 255, .07); --theme-review-hover: rgba(255, 255, 255, .12);
  --theme-panel-rim: rgba(255, 255, 255, .1); --theme-disc: #3A4F60;
  --theme-tile-empty: rgba(255, 255, 255, .05); --theme-group: rgba(255, 255, 255, .04);
  --theme-switch-on: #7E9BB1;                     /* 3 : 1 against the deep field, so "on" reads */
  --theme-toast: var(--theme-glass-strong);       /* 6% glass let a picture under a toast show through its words */
  --theme-tile-num: var(--theme-glass-strong);    /* light words on a light tile fell to 2.1 : 1 */
}
/* BUG-1410: Dark chosen in Settings (not a screen's own Night paper, which stays as drawn): the cards and panels a faint
   dark tint, not white. On the light right side of the deep field, 6% white lifted a card to about #5F7487 and its
   muted words fell to 3.3 : 1; a dark tint keeps them over 4.5 : 1 and still reads as a card by its light edge. */
:root[data-theme="night"]:not([data-paper]) {
  --theme-muted: #DCE4EA;                         /* a step lighter than the Night paper's #D0DAE2 */
  /* The field one step deeper than the Night paper's (its right end #3C566A, not #46657C), so muted words on the bare
     field keep 4.5 : 1 at the field's lightest, with the light's ebb over it (they measured 3.9 to 4.35 : 1). */
  --g-base: #31475A;
  --g-image: radial-gradient(60% 60% at 70% 36%, rgb(120 150 172 / 0.18), rgb(120 150 172 / 0) 72%),
    linear-gradient(rgb(16 24 31 / 0) 55%, rgb(16 24 31 / 0.35)), linear-gradient(100deg, #283C4B 0%, #324859 45%, #3C566A 100%);
  --theme-glass: rgb(var(--g-deep) / .14);
  --theme-card: rgb(var(--g-deep) / .2);
  --theme-card-line: rgba(255, 255, 255, .08);
  --theme-card-edge: inset 0 1px 0 rgba(255, 255, 255, .07), inset 0 0 0 1px rgba(255, 255, 255, .09);
  --surface: rgb(var(--g-deep) / .16);
  --theme-promo-tag: rgba(255, 255, 255, .12);
  --plan-room: rgba(255, 255, 255, .06); --plan-spot: #3A4F60; --plan-gap: #2F4455;
  --theme-seg: rgb(var(--g-deep) / .24); --theme-seg-thumb: rgba(255, 255, 255, .1);
  /* BUG-1470: the ink mixed with the dark paper fell to 2 to 4.5 : 1 on Rooms' cards; the muted words keep 4.5 : 1. */
  --theme-ink-quiet: var(--theme-muted);
  /* BUG-1470: the capture screens' places, boxes and mat. As white they were pale slabs with light lines on them, and the
     photo's mat (the ink mixed with the paper) turned near white. */
  --theme-slot: rgba(255, 255, 255, .06); --theme-slot-hover: rgba(255, 255, 255, .11);
  --theme-slot-quiet: rgba(255, 255, 255, .04);
  --theme-drop: rgba(255, 255, 255, .03); --theme-drop-hover: rgba(255, 255, 255, .07);
  --theme-plan-floor: rgba(255, 255, 255, .06);
  --theme-extra-box: rgba(255, 255, 255, .09);
  --theme-plan-cut: #3A4F60;                      /* opaque, as the light's: it hides the wall line under it */
  --theme-photo-mat: rgb(var(--g-deep) / .55);
  --theme-code: rgba(255, 255, 255, .12);         /* light words on a white chip fell to 1.3 : 1 */
  --theme-pay-panel: #26394A;                     /* the payment panel, a step lighter than the deep field */
  --theme-wallet-apple: #FFFFFF;   /* Apple's white button on a dark page */
  --theme-wallet-edge: rgba(255, 255, 255, .22);
  --theme-past-share: 60%;                        /* 30% read 2.5 : 1 on the dark card; 60% keeps 4.5 : 1 */
  /* BUG-1472: the 3D room's field in Dark (room.css, discover.css). The site's viewer draws the
     room on warm paper (apps/web/assets/css/rooms.css --field-day); in Dark that glared. The deep Mist's own tones, a
     little lighter at the room's middle, so the room's warm colours stand on it. */
  --theme-room-field: radial-gradient(120% 95% at 50% 36%, #4C657A 0%, #354B5C 58%, #283A48 100%);
}
/* Reduce transparency: the cards and panels near-opaque, so nothing shows through behind the words. BUG-949: the Mac
   the founder tests on has Reduce Transparency on, so the glass is on by default (.force-glass, src/ui/theme.js; ?glass=off follows the system, BUG-949). */
@media (prefers-reduced-transparency: reduce) {
  :root:not(.force-glass) { --theme-glass: rgba(255, 255, 255, .9); --theme-glass-strong: rgba(255, 255, 255, .96); --theme-card: rgba(255, 255, 255, .95); }
  :root[data-theme="night"]:not(.force-glass) { --theme-glass: rgba(33, 49, 60, .94); --theme-glass-strong: rgba(36, 52, 63, .97); --theme-card: rgba(40, 56, 68, .95); }
}

:root {
  /* Type: Inter for words, Pixel Operator for numbers you play with (16 or 32 px only), the site's mono for labels. */
  --font: var(--sn-font);
  --font-pixel: var(--sn-font-pixel);
  --font-mono: ui-monospace, "SF Mono", Menlo, monospace;
  /* Spacing on a 4 px grid. --gutter is the app's side margin. */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s7: 32px; --s8: 40px; --s9: 56px; --s10: 72px;
  --gutter: var(--q-gutter);
  --col: 560px;          /* the calm centred column of every flow on a laptop */
  --radius-card: var(--q-r-panel); --radius-tile: var(--q-r-card); --radius-photo: var(--q-r-card); --radius-pill: 999px;
  --tap: 44px;           /* the smallest target */
  /* Motion: the one language (apps/webapp/AGENTS.md, "Motion"). Transform and opacity only; every motion ends.
     --t-fast a press, a hover, a tick · --t-screen a change of screen (src/ui/motion.js) · --t-med a part that arrives
     or leaves (a toast, a sheet) · --t-slow a once-only reveal.
     --ease-out an arrival · --ease-in a leaving · --ease-spring a press, a pop · --ease-move one thing from place to place. */
  --ease-move: cubic-bezier(.65, 0, .35, 1);
  --ease-spring: cubic-bezier(.3, 1.4, .5, 1);
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-in: cubic-bezier(.4, 0, 1, 1);
  --t-fast: .18s; --t-screen: .24s; --t-med: .32s; --t-slow: .6s;
  --tabbar-h: 62px;
  --rail-w: 232px;
  --topbar-h: 64px;
}
@media (min-width: 900px) { :root { --col: 600px; } }
@media (prefers-reduced-motion: reduce) {
  :root { --t-fast: 0s; --t-screen: 0s; --t-med: 0s; --t-slow: 0s; }
  /* BUG-1652: imported components and screen-local durations must cut too, including delayed transitions. */
  *, *::before, *::after { transition: none !important; }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--g-base); }
/* The page: the field under everything, the grain on a layer of its own over it (BUG-934). */
body {
  margin: 0; min-height: 100dvh; color: var(--ink);
  background-color: var(--theme-bg-base); background-image: var(--theme-bg); background-attachment: fixed;
  font: 400 16px/1.375 var(--font); font-feature-settings: "cv11" 0; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
/* The field's light: one slow ease into place as the page opens, then a very slow ebb (BUG-1190). It drifted smoothly
   for ever until 20 Nov 2026, and that made the compositor draw the whole window at every refresh on every screen (360
   draws in 3 s at rest). The ebb moves the same layer in whole steps, one a second (steps()), so the compositor draws
   about once a second, not 120 times; one step moves the soft light 1 to 3 px: at most 1 colour level on most pixels, so no step shows.
   It moves `translate`, not `transform`: two animations on one property ran on the main thread (360 style
   recalculations in 3 s, measured 20 Nov 2026, docs/web-app/perf-log/look.md). It rests in a hidden tab (.g-paused,
   src/ui/theme.js) and under Reduce Motion. The grain sits over it. */
body::before { content: ""; position: fixed; inset: -12%; z-index: 0; pointer-events: none;   /* 12%, not gradient.css's 30%: a layer 1.5x the window, not 2.6x (scroll cost, measured 19 Nov 2026) */
  background: radial-gradient(36% 40% at 62% 44%, var(--g-light), transparent 70%), radial-gradient(30% 34% at 30% 70%, var(--g-light), transparent 70%);
  animation: page-arrive 1.6s var(--ease-out) both, page-ebb 120s steps(30) 1.6s infinite; }
@keyframes page-arrive { from { transform: translate(-3%, 2%) scale(1.03); } }
/* The path: a slow loop of four legs, 30 s each; at most 5.5% of the layer (about 7% of the window): inside its 12% margin. */
@keyframes page-ebb { 0%, 100% { translate: 0 0; } 25% { translate: 4% -2.5%; } 50% { translate: 5.5% 1.2%; } 75% { translate: 2% 3.2%; } }
.g-paused body::before { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { body::before { animation: none; } }
body::after { content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; background-image: var(--theme-grain); }
#app { position: relative; z-index: 1; }
img, svg, video, canvas { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3, h4, p, figure, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
::selection { background: color-mix(in srgb, var(--yellow) 60%, transparent); color: var(--on-sun); }
[hidden] { display: none !important; }

.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: var(--radius-pill); background: var(--accent); color: var(--on-accent); text-decoration: none; }
.skip:focus { top: 12px; }
.noscript { padding: 24px; }

/* ---------- Type scale: Qoves's sizes on Snuug's Inter (the --q-* tokens above; the laptop steps them up) ---------- */
.t-display { font: var(--q-display); letter-spacing: var(--q-display-track); text-wrap: balance; }
.t-title   { font: var(--q-title); letter-spacing: var(--q-title-track); text-wrap: balance; }
.t-heading { font: var(--q-heading); letter-spacing: var(--q-heading-track); }
.t-body    { font: var(--q-body); text-wrap: pretty; }
.t-label   { font: var(--q-small); }
.t-muted   { color: var(--muted); }
.t-num     { font-variant-numeric: tabular-nums; }
.t-pixel   { font-family: var(--font-pixel); font-size: 16px; line-height: 16px; font-weight: 400; letter-spacing: 0; -webkit-font-smoothing: none; }
.t-pixel.x2 { font-size: 32px; line-height: 32px; }
/* Night: light text on dark blooms a little, so the weights step down a touch (interfacecraft 30, "Dark Mode"). */
[data-theme="night"] .t-display, [data-theme="night"] .t-title { font-weight: 380; }

/* ---------- Layout helpers ---------- */
.col { width: 100%; max-width: var(--col); margin-inline: auto; padding-inline: var(--gutter); }
.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.gap-1 { gap: var(--s1); } .gap-2 { gap: var(--s2); } .gap-3 { gap: var(--s3); } .gap-4 { gap: var(--s4); } .gap-6 { gap: var(--s6); } .gap-8 { gap: var(--s8); }
.grow { flex: 1 1 auto; min-width: 0; }
.center { text-align: center; }
