/* ---- type (founder choice D "Vibes", 2026-11-26; docs/research/typography-system.md): the Stack Sans superfamily
   (Koto, OFL) in three voices. Notch = display, large headings only (>= --step-3: its notched strokes read as broken
   glyphs at UI sizes); Headline Light = leads (>= --step-1); Text = everything else. Geist Mono = receipts, the clock,
   bracket tags. Silkscreen = pixel UI only. Inside the phones the One UI screens keep Inter (css/screens.css). Latin
   woff2, swap; only the display face is preloaded (index.html). Each face has a metric-matched local fallback
   (size-adjust / ascent / descent from the woff2 against Liberation Sans = Arial metrics), so the swap barely moves
   text (modern-web-guidance: visually-stable-font-fallbacks). */
@font-face { font-family: "Tanker"; src: url("../fonts/Tanker-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Boxing"; src: url("../fonts/Boxing-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "General Sans"; src: url("../fonts/GeneralSans-Variable.woff2") format("woff2"); font-weight: 200 700; font-display: swap; }
@font-face { font-family: "Chubbo"; src: url("../fonts/Chubbo-Variable.woff2") format("woff2"); font-weight: 200 700; font-display: swap; }
@font-face { font-family: "Stack Sans Notch"; src: url("../fonts/stack-sans-notch-latin-normal.woff2") format("woff2"); font-weight: 200 700; font-display: swap; }
@font-face { font-family: "Stack Sans Headline"; src: url("../fonts/stack-sans-headline-latin-normal.woff2") format("woff2"); font-weight: 200 700; font-display: swap; }
@font-face { font-family: "Stack Sans Text"; src: url("../fonts/stack-sans-text-latin-normal.woff2") format("woff2"); font-weight: 200 700; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("../fonts/geist-mono-latin-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Stack Sans Notch Fallback"; src: local("Arial"), local("Liberation Sans"), local("Helvetica"); size-adjust: 104.8%; ascent-override: 95.4%; descent-override: 28.6%; line-gap-override: 0%; }
@font-face { font-family: "Stack Sans Headline Fallback"; src: local("Arial"), local("Liberation Sans"), local("Helvetica"); size-adjust: 102.6%; ascent-override: 97.5%; descent-override: 29.2%; line-gap-override: 0%; }
@font-face { font-family: "Stack Sans Text Fallback"; src: local("Arial"), local("Liberation Sans"), local("Helvetica"); size-adjust: 110.1%; ascent-override: 90.8%; descent-override: 27.2%; line-gap-override: 0%; }
@font-face { font-family: "Silkscreen"; src: url("../fonts/silkscreen-latin-400-normal.woff2") format("woff2"); font-display: swap; }

/* ---- tokens: black basalt and bone, glacier blue as the one accent (founder palette, docs/design-directions.md).
   OKLCH, alpha borders, nested radii. Light = bone (warm off-white, warm near-black ink); dark = basalt (deep, slightly
   warm volcanic black-grey). Raised surfaces get LIGHTER in both, never shadowed in dark. The page follows the visitor's
   system unless the bar's toggle pins one (js/theme.js writes <meta name="color-scheme">, mapped onto color-scheme
   below). Page surfaces and body ink stay warm; UI-chrome neutrals (borders, muted text) lean very slightly toward
   glacier (hue 230, chroma <= 0.01). Glacier is deeper on bone and lighter, softer (lower chroma) on basalt. */
:root {
  --paper: light-dark(oklch(0.952 0.013 85), oklch(0.18 0.006 55));
  --paper-2: light-dark(oklch(0.93 0.015 83), oklch(0.225 0.007 55));
  --card: light-dark(oklch(0.985 0.007 85), oklch(0.245 0.008 55));
  --track: light-dark(oklch(0.912 0.014 83), oklch(0.255 0.008 55));
  --raised: light-dark(oklch(0.972 0.01 85), oklch(0.215 0.007 55)); /* a card sitting on the page: a step lighter in both themes */
  --ink: light-dark(oklch(0.2 0.012 60), oklch(0.95 0.01 85));
  --ink-2: light-dark(oklch(0.38 0.012 60), oklch(0.8 0.011 80));
  --ink-3: light-dark(oklch(0.5 0.01 230), oklch(0.68 0.01 230));
  --glacier-h: 230; /* the one accent hue: every glacier token uses it (visual tip 12) */
  --accent: light-dark(oklch(0.5 0.095 var(--glacier-h)), oklch(0.8 0.065 var(--glacier-h)));
  --accent-hover: light-dark(oklch(0.45 0.095 var(--glacier-h)), oklch(0.85 0.055 var(--glacier-h)));
  --accent-ink: light-dark(oklch(0.98 0.012 var(--glacier-h)), oklch(0.2 0.025 var(--glacier-h)));  /* text on glacier: tinted, never pure */
  --accent-soft: light-dark(oklch(0.9 0.03 var(--glacier-h)), oklch(0.32 0.04 var(--glacier-h)));
  --line: light-dark(oklch(0.25 0.01 230 / 0.1), oklch(0.95 0.01 230 / 0.1));
  --line-2: light-dark(oklch(0.25 0.01 230 / 0.17), oklch(0.95 0.01 230 / 0.17));
  /* contact shadows under physical objects: soft on bone, near-invisible on basalt (depth there comes from lighter surfaces) */
  --contact: light-dark(oklch(0.2 0.012 60 / 0.2), oklch(0 0 0 / 0.28));
  /* raised UI (sheets, floating cards): a layered shadow tinted with the bone's own warm hue; on basalt it is gone and
     depth comes from the lighter surface (visual tip 7, founder rule 8) */
  --shadow-c: light-dark(oklch(0.35 0.02 60 / 0.07), transparent);
  --shadow-raised: 0 1px 1px var(--shadow-c), 0 2px 4px var(--shadow-c), 0 4px 8px var(--shadow-c), 0 8px 16px var(--shadow-c), 0 16px 32px var(--shadow-c);
  --ok: light-dark(oklch(0.56 0.12 150), oklch(0.76 0.09 150));
  --warn: light-dark(oklch(0.6 0.13 70), oklch(0.8 0.09 75));
  --risk-low: light-dark(oklch(0.65 0.14 160), oklch(0.74 0.09 160));
  --risk-medium: light-dark(oklch(0.72 0.15 75), oklch(0.8 0.1 75));
  --risk-high: light-dark(oklch(0.55 0.18 25), oklch(0.72 0.12 25));
  --receipt: oklch(0.985 0.012 88);
  --receipt-ink: oklch(0.26 0.02 60);
  --r-outer: 22px;
  --pad: 8px;
  --r-inner: calc(var(--r-outer) - var(--pad));
  --font: "General Sans", ui-sans-serif, system-ui, sans-serif;   /* founder 2026-11-27: Fontshare (ITF FFL), self-hosted */
  --font-display: "Tanker", "Stack Sans Notch", "Stack Sans Notch Fallback", Impact, sans-serif;
  --font-accent: "Boxing", "Chubbo", ui-serif, serif;
  --font-lead: "General Sans", ui-sans-serif, system-ui, sans-serif;
  --pixel: "Silkscreen", ui-monospace, monospace;
  --mono: "Geist Mono", ui-monospace, monospace;
  /* display role (Notch): weight 500, near-zero tracking (Notch is drawn tight), line-height about 1. Never
     font-stretch: Stack Sans has no width axis. --display-word is the wordmark (bar logo, footer, liquid metal: weight
     only, the liquid mask is canvas text and cannot carry variation settings). */
  --display-wght: 400; --display-track: 0.005em; --display-lh: 0.95; --head-track: 0.01em; --head-lh: 1;
  --display-word-wght: 600; --display-word-track: -0.04em;
  --font-word: "Stack Sans Notch", "Stack Sans Notch Fallback", ui-sans-serif, system-ui, sans-serif;   /* the vivi wordmark keeps its own face */
  /* lead role (Headline Light): only at --step-1 and up */
  --lead-wght: 400; --lead-track: -0.01em; --lead-lh: 1.35;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  /* entrances decelerate in (200 to 300 ms); exits accelerate out and are shorter (docs/research/animation-principles.md) */
  --ease-enter: cubic-bezier(0.05, 0.7, 0.1, 1);
  --ease-exit: cubic-bezier(0.3, 0, 0.8, 0.15);
  --press: 0.97;
  --target: 24px;
  color-scheme: light dark;
  interpolate-size: allow-keywords;
  accent-color: var(--accent);
  &:has(> head > meta[name="color-scheme"][content="dark"]) { color-scheme: dark; }
  &:has(> head > meta[name="color-scheme"][content="light"]) { color-scheme: light; }
}
/* ---- layout: one centred container with fluid gutters for every section and the bar, and one fluid type scale that
   tops out calm on big screens (display ~68 px, section heads ~56 px, body ~19 px at 1920). --inset is the padding a
   full-bleed element needs so its content lines up with the container. */
:root {
  --container: 80rem;          /* text-led sections, the bar */
  --container-wide: 90rem;     /* device stages */
  --gutter: clamp(1.25rem, 0.6rem + 3vw, 4rem);
  --inset: max(var(--gutter), (100% - var(--container)) / 2);
  --bar-h: 4rem;
  /* the fluid unit follows the screen's width AND height: 1vw on ordinary screens, less on short ones (a 1430 x 654
     laptop at 133% scaling, a zoomed browser), so headlines and stages shrink together instead of the copy overflowing */
  --fl: min(1vw, 1.75dvh);
  --step--1: 0.875rem;
  --step-0: clamp(1rem, 0.96rem + 0.15 * var(--fl), 1.0625rem);
  --step-1: clamp(1.05rem, 0.98rem + 0.25 * var(--fl), 1.2rem);
  --step-3: clamp(1.6rem, 1.15rem + 1.2 * var(--fl), 2.5rem);
  --step-4: clamp(2rem, 1.35rem + 1.9 * var(--fl), 3.5rem);
  --step-5: clamp(2.4rem, 1.5rem + 2.4 * var(--fl), 4.25rem);
  /* the hero and the footer wordmark (max <= 2.5 x min, rem + the fluid unit) */
  --step-6: clamp(2.6rem, 1.4rem + 4 * var(--fl), 5.2rem);
  --step-7: clamp(4.5rem, 1.5rem + 10 * var(--fl), 11rem);
}

/* short screens (or a zoomed browser): a slimmer bar leaves more of the height to the pinned stages */
@media (height < 560px) { :root { --bar-h: 3.25rem; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 6rem; }
body {
  margin: 0; color: var(--ink); background-color: var(--paper);
  font: 400 1.0625rem/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.04; text-wrap: balance; font-weight: 500; }
p { margin: 0; text-wrap: pretty; }
sup, sub { line-height: 0; }
/* acronyms stay plain capitals in the text's own weight and size: Stack Sans has no real small caps (no smcp/c2sc), and the
   browser's synthesised ones come out thin and misaligned (founder, 2026-11-26), so none are synthesised anywhere */
html { font-synthesis-small-caps: none; }
.acr { letter-spacing: 0.02em; }
/* body copy hyphenates (html lang="en"); headings and UI labels never do */
:is(.byo-words, .foot, .bill-note) p, .work-p { hyphens: auto; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-color: color-mix(in oklch, currentColor 40%, transparent); }
:focus-visible { outline: var(--ds-focus-w, 2px) solid var(--ds-focus-c, var(--accent)); outline-offset: var(--ds-focus-offset, 3px); border-radius: var(--ds-r-xs, 6px); }
/* the copy that changes with the calling mode crossfades with a little blur */
.mode-line, .intro-floats .vs-note, .hold-says, .day { transition: opacity 0.18s ease-out, filter 0.18s ease-out; }
[data-mode-swap="out"] :is(.mode-line, .intro-floats .vs-note, .hold-says, .day) { opacity: 0; filter: blur(4px); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 50; background: var(--card); padding: 0.5rem 0.8rem; border-radius: 10px; border: 1px solid var(--line-2); }
.skip:focus { top: 1rem; }
mark { background: none; color: var(--accent); }
hr { border: 0; height: 1px; width: 7rem; background: var(--ink-2); margin: 1.2rem 0; }
abbr { text-decoration: none; border-bottom: 1px dotted var(--line-2); }

/* ---- buttons: .btn / .btn-primary / .btn-ghost / .btn-sm are the design system's .ds-btn (css/ds.css) */
.linkish { min-height: max(var(--target), 2.25rem); background: none; border: 0; border-radius: 8px; padding: 0.4rem 0.6rem; color: var(--ink-3); font: 400 0.85rem var(--font); cursor: pointer;
  transition: color 150ms ease-out, scale 150ms ease-out; &:hover { color: var(--ink); } &:active { scale: var(--press); } }
/* touch screens: every control is at least 44 px (WCAG 2.5.5); 24 px anywhere else (2.5.8) */
@media (pointer: coarse) { :root { --target: 44px; } .btn { min-height: max(var(--h), var(--target)); } }
/* labels sit optically centred in their pill (cap height to baseline); without text-box the padding still centres the line box */
@supports (text-box: trim-both cap alphabetic) {
  :is(.btn, .chip, .linkish, .persona span, .wl-row button) { text-box: trim-both cap alphabetic; }
}
.chip {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.9rem; min-height: 2.5rem; white-space: nowrap;
  border-radius: 10px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink); font: 500 0.92rem/1.1 var(--font); cursor: pointer;
  transition: background-color 150ms ease-out, scale 150ms ease-out;
  &:hover { background: var(--paper-2); }
  &:active { scale: var(--press); }
  &[aria-pressed="true"] { border-color: var(--ink); }
}
.dot { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--risk-low); flex: none; }
.dot[data-risk="medium"] { background: var(--risk-medium); }
.dot[data-risk="high"] { background: var(--risk-high); }

/* ---- the bar: a logo, one way in, and the motion switch */
.bar {
  position: fixed; z-index: 40; inset: 0 0 auto 0; display: flex; align-items: baseline; flex-wrap: wrap; align-content: center; gap: clamp(0.75rem, 2vw, 1.5rem);
  min-height: var(--bar-h); padding: 0.4rem var(--inset); pointer-events: none;
  --bar-tint: var(--paper);
  > * { pointer-events: auto; }
  /* no band of its own (founder, 2026-11-26: no hard line): a light tint of the page colour plus a backdrop blur, both
     fading out toward the bottom edge, so the bar dissolves into whatever scrolls under it */
  &::before { content: ""; position: absolute; inset: 0 0 -1.25rem; z-index: -1; pointer-events: none;
    background: linear-gradient(in oklab to bottom, color-mix(in oklab, var(--bar-tint) 78%, transparent), transparent);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent); mask-image: linear-gradient(to bottom, #000 45%, transparent); }
}
.logo { display: inline-flex; align-items: baseline; gap: 0.45rem; font: var(--display-word-wght) 1.3rem/1 var(--font-word); letter-spacing: -0.02em; text-decoration: none; > .logo-mark { align-self: center; } }
/* the mark (js/liquid.js mountLogo): the glacier earbud in liquid metal at the top of the page, Vivi's orb once
   scrolled, flowing between them. The orb box (d = 1.4rem) sets the layout; the canvas is a 2d square centred on it,
   so the earbud (~1.5d tall) never moves the bar. .logo-bud is the glacier render's cut-out: the earbud before the
   liquid frames are ready and without WebGL2. Orb, cut-out and canvas swap with opacity only (instant crossfades
   under reduced motion). --lm-body is the glacier Nord Buds 4 render's own colour (median of the cut-out). */
.logo-mark {
  position: relative; display: inline-grid; place-items: center; flex: none; width: 1.4rem; height: 1.4rem;
  --lm-tint: light-dark(color-mix(in oklch, var(--accent) 55%, oklch(1 0 0)), var(--accent)); --lm-back: transparent;
  --lm-body: oklch(0.71 0.04 235); --lm-body-orb: oklch(0.93 0.006 255); /* the orb's pearl (css/vivi-orb.css) */
  > * { grid-area: 1 / 1; }
  > :is(.lm-canvas, .logo-bud) { position: absolute; left: -50%; top: -50%; width: 200%; height: 200%; opacity: 0; transition: opacity 0.12s linear; }
  &[data-morph="liquid"] > .lm-canvas { opacity: 1; }
  &:is([data-morph="liquid"], [data-morph="flat"]) > .logo-orb { opacity: 0; }
  &[data-morph="flat"] > .logo-bud { opacity: 1; }
}
.logo-orb { --orb-size: 1.4rem; transition: opacity 0.12s linear; }
.logo-bud { background: center / 80% 80% no-repeat image-set(url("../assets/earbud-hd/cutout/bud-34-96.webp") type("image/webp") 1x, url("../assets/earbud-hd/cutout/bud-34-192.webp") type("image/webp") 2x); }
/* hover hints that the mark is liquid: one small squash and settle */
@media (prefers-reduced-motion: no-preference) {
  :root:not([data-motion="off"]) .logo:is(:hover, :focus-visible) .logo-mark > :is(.logo-orb, .lm-canvas, .logo-bud) { animation: logo-wobble 0.6s var(--ease-out); }
}
@keyframes logo-wobble { 30% { scale: 1.08 0.93; } 60% { scale: 0.97 1.04; } }
/* the bar's one CTA: a filled glacier button (visual tips 14, 20); the row aligns on the text baseline (tip 10), the
   logo and the icon buttons centre on it. Narrow: a shorter label, and Pause/Hide fold into a small popover menu. */
.bar-invite { margin-left: auto; white-space: nowrap; }
.bar-invite-short { display: none; }
.bar-more, .theme-toggle { align-self: center; }
.bar-more {
  display: none; place-items: center; flex: none; width: max(var(--target), 2.25rem); height: max(var(--target), 2.25rem); padding: 0;
  border: 0; border-radius: 10px; background: transparent; color: var(--ink-3); cursor: pointer;
  transition: color 150ms ease-out, background-color 150ms ease-out, scale 150ms ease-out;
  &:hover, &:has(+ .bar-opts:popover-open) { color: var(--ink); background: color-mix(in oklch, var(--ink) 6%, transparent); }
  &:active { scale: var(--press); }
  svg { width: 1.125rem; height: 1.125rem; fill: currentColor; }
}
/* wide: the options are ordinary items of the bar (the popover is never opened there) */
.bar-opts { display: contents; }
@media (width < 700px) {
  @supports selector(:popover-open) {
    .bar-more { display: inline-grid; }
    .bar-opts:not(:popover-open) { display: none; }
    .bar-opts:popover-open {
      display: grid; position: fixed; inset: calc(var(--bar-h) - 0.25rem) var(--inset) auto auto; margin: 0; min-width: 11rem; padding: 0.35rem;
      border: 1px solid var(--line-2); border-radius: 14px; background: var(--card); color: var(--ink); box-shadow: var(--shadow-raised);
      overscroll-behavior: contain; transform-origin: top right;
      .linkish { justify-content: start; min-height: max(var(--target), 2.5rem); padding-inline: 0.75rem; text-align: start; color: var(--ink-2); font-size: 0.95rem; }
      .linkish:hover { background: var(--paper-2); color: var(--ink); }
    }
    @media (prefers-reduced-motion: no-preference) {
      :root:not([data-motion="off"]) .bar-opts:popover-open {
        transition: opacity 200ms var(--ease-enter), scale 200ms var(--ease-enter);
        @starting-style { opacity: 0; scale: 0.97; }
      }
    }
  }
}
@media (width < 440px) {
  .bar-invite { padding-inline: 0.85rem; }
  .bar-invite-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .bar-invite-short { display: inline; }
}

/* the light / dark toggle (js/theme.js; Magic UI AnimatedThemeToggler's button): as quiet as the bar's text buttons.
   It offers the other theme: a moon on light, a sun on dark. The swap is a crossfade with a little blur and scale. */
.theme-toggle {
  position: relative; flex: none; display: grid; place-items: center; width: max(var(--target), 2.25rem); height: max(var(--target), 2.25rem); padding: 0;
  border: 0; border-radius: 10px; background: transparent; color: var(--ink-3); cursor: pointer;
  transition: color 0.2s, background-color 0.2s, scale 150ms ease-out;
  &:hover { color: var(--ink); background: color-mix(in oklch, var(--ink) 6%, transparent); }
  &:active { scale: 0.97; }
}
.theme-i {
  grid-area: 1 / 1; width: 1.125rem; height: 1.125rem; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
  transition: opacity 0.3s var(--ease-out), scale 0.3s var(--ease-out), filter 0.3s var(--ease-out), rotate 0.3s var(--ease-out);
}
.theme-say { display: none; }
html:not([data-scheme="dark"]) { .theme-i--sun { opacity: 0; scale: 0.97; rotate: -45deg; filter: blur(4px); } .theme-say--dark { display: block; } }
html[data-scheme="dark"] { .theme-i--moon { opacity: 0; scale: 0.97; rotate: 45deg; filter: blur(4px); } .theme-say--light { display: block; } }
html:not([data-scheme]) .theme-toggle { display: none; }
/* basalt has a texture: an extremely faint grain on the dark page only (an 0.5 KB SVG noise tile, fixed so it never
   scrolls with content). Sections that paint var(--paper) themselves are left transparent so the grain shows through. */
html[data-scheme="dark"] body {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.95 0 0 0 0 0.93 0 0 0 0 0.9 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-attachment: fixed;
}
html[data-scheme="dark"] :is(.ways, .foot) { background-color: transparent; }

@media (width < 600px) { .bar { gap: 0.6rem; } .theme-toggle { margin-right: -0.35rem; } } /* no script, no toggle: the page follows the system */
@media (prefers-reduced-motion: reduce) { .theme-i { transition: opacity 0.15s linear; } }
html[data-motion="off"] .theme-i { transition: opacity 0.15s linear; }
/* founder rule: the theme switch itself is instant; nothing crossfades colour by colour (only the icon above) */
html[data-theme-switch] *:not(.theme-i), html[data-theme-switch] *::before, html[data-theme-switch] *::after { transition: none !important; }

/* ---- the opening: hook, the move in to the earbud, hold, the two ways to call */
.intro { height: 640dvh; position: relative; }
.intro-pin { position: sticky; top: 0; height: 100dvh; overflow: clip; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.cafe-canvas, .intro-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.cafe-canvas { filter: blur(var(--blur, 5px)) saturate(0.55); transform: scale(1.04); transition: opacity 0.3s linear; }
.intro-canvas { opacity: 0; transition: opacity 0.9s var(--ease-out); }
.intro.is-ready .intro-canvas { opacity: 1; }
.intro-copy {
  position: absolute; left: clamp(1.25rem, 6vw, 7rem); top: 50%; translate: 0 -50%; width: min(36rem, 44vw);
  display: grid; gap: 1.25rem; opacity: 0; filter: blur(8px); pointer-events: none;
  transition: opacity 0.5s var(--ease-out), filter 0.5s var(--ease-out);
  &[data-on] { opacity: 1; filter: none; pointer-events: auto; }
  h1 { font-size: var(--step-6); font-family: var(--font-display); font-weight: var(--display-wght); letter-spacing: var(--display-track); line-height: var(--display-lh); }
  h2 { font-size: clamp(2rem, 1.3rem + 2 * var(--fl), 3.4rem); font-family: var(--font-display); font-weight: var(--display-wght); letter-spacing: var(--head-track); line-height: var(--head-lh); }
  > p { color: var(--ink-2); font: var(--lead-wght) clamp(1.05rem, 0.95rem + 0.3 * var(--fl), 1.25rem)/var(--lead-lh) var(--font-lead); letter-spacing: var(--lead-track); max-width: 30rem; }
  .hook { font-size: clamp(1.5rem, 1.1rem + 1.2 * var(--fl), 2.3rem); color: var(--ink-2); font-family: var(--font-lead); font-weight: var(--lead-wght); letter-spacing: var(--lead-track); line-height: var(--lead-lh); max-width: 30rem; }
  .say { font-size: clamp(1.5rem, 1.1rem + 1.1 * var(--fl), 2.2rem); color: var(--ink); font-family: var(--font-lead); font-weight: var(--lead-wght); letter-spacing: var(--lead-track); line-height: var(--lead-lh); }
}
.intro-copy-r { left: auto; right: clamp(1.25rem, 6vw, 7rem); }
/* the hold button is React Bits HoldButton (css/ui.css); hands-free gets React Bits VoicePill instead, never a hold */
.hold-try { justify-self: start; font-family: var(--font); }
.hold-dot { display: block; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--accent); }
.ui-hold-button__fill .hold-dot, .ui-hold-button__crest .hold-dot { background: var(--accent-ink); }
.hold-voice {
  /* the mic sits at the right; its capsule (timer and bars) opens to the left over the label */
  justify-self: start; display: none; align-items: center; gap: 0.9rem; min-height: 44px;
  .hold-voice-label { font: 500 1rem/1.2 var(--font); color: var(--ink); transition: opacity 0.15s ease-out; }
  &:has(.ui-voice-pill[data-state="listening"]) .hold-voice-label { opacity: 0; }
}
[data-mode="handsfree"] .hold-try, [data-mode="handsfree"] .hold-ring { display: none; }
[data-mode="handsfree"] .hold-voice { display: inline-flex; }
.hold-says { min-height: 1.6em; color: var(--ink-2); > span { display: none; } }
[data-hold="short"] .hs-short, [data-hold="on"] .hs-on, [data-hold="heard"] .hs-heard { display: inline; }
.hold-ring {
  position: absolute; left: 0; top: 0; width: 7.5rem; height: 7.5rem; margin: -3.75rem 0 0 -3.75rem; border-radius: 50%; pointer-events: none;
  background: conic-gradient(var(--accent) calc(var(--fill, 0) * 360deg), color-mix(in oklch, var(--accent) 14%, transparent) 0);
  mask: radial-gradient(closest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  opacity: 0; transition: opacity 0.4s var(--ease-out);
  &[data-on] { opacity: 1; }
}
/* the mode picker is React Bits RubberSegment (css/ui.css) */
.mode-pick { justify-self: start; .ui-rubber-segment { font-family: var(--font); } .ui-rubber-segment__item { font-size: 1rem; padding-inline: 1.4rem; } }
.mode-line { font-size: clamp(1.05rem, 1.3vw, 1.2rem); color: var(--ink); max-width: 30rem; }
.intro-copy > .intro-fine { font-size: 0.9rem; color: var(--ink-3); }
/* choose: one request as real UI around the earbud (the One UI notification style from screens.css) */
.intro .intro-floats {
  --u: 1px; position: absolute; inset: 0; width: auto; margin: 0; pointer-events: none;
  opacity: 0; transition: opacity 0.5s var(--ease-out);
  &[data-on] { opacity: 1; }
  .float {
    position: absolute; width: 17rem; background: var(--vs-card); border: 1px solid var(--vs-line);
    backdrop-filter: none; font-family: var(--font);
  }
  /* a column at the right edge, clear of the earbud */
  .float--call { right: 2.5vw; top: 14dvh; }
  .float--ask { right: 4vw; top: calc(14dvh + 7.5rem); }
  .float--ok { right: 2.5vw; top: calc(14dvh + 15rem); }
  .float-you { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--paper-2); font-size: 0; }
  .float-you::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
  .float-quote { font-size: 16px !important; font-weight: 600; color: var(--vs-ink); }
  .float-meta, .float-wait { color: var(--vs-ink-2); font-size: 13px !important; }
  .float-wait { margin-top: 10px !important; padding-top: 10px; border-top: 1px solid var(--vs-line); color: var(--accent); font-weight: 500; }
}
[data-show-mode] { display: contents; }
[data-mode="gesture"] [data-show-mode="handsfree"], [data-mode="handsfree"] [data-show-mode="gesture"] { display: none; }
@media (width < 900px) {
  /* narrow: the copy has its own band at the top (the café is masked to clean paper there); the scene sits below */
  .intro { height: 560dvh; }
  .intro-copy {
    left: 1.25rem; right: 1.25rem; width: auto; top: 4.75rem; bottom: auto; translate: none; align-content: start; gap: 0.85rem;
    h1 { font-size: clamp(2.1rem, 9.6vw, 2.6rem); }
    h2 { font-size: clamp(1.7rem, 7.6vw, 2rem); }
    .hook, .say { font-size: 1.25rem; }
  }
  .intro-copy-r { left: 1.25rem; }
  .intro .intro-floats {
    inset: auto 0 0 0; height: 52dvh;
    .float { width: min(17rem, 70vw); padding: 10px 12px; border-radius: 18px; }
    .float h3 { font-size: 14px; } .float p { font-size: 12.5px; }
    .float--call { left: 0.75rem; right: auto; top: 0; }
    .float--ask { display: none; }
    .float--ok { right: 0.75rem; top: auto; bottom: 0.75rem; }
  }
}
@media (prefers-reduced-motion: no-preference) { [data-motion="on"] .intro-copy[data-on] { transition-duration: 0.7s; } }

/* ---- your devices (js/devices.js): the earbud and a small family of real devices on clean paper. The devices are
   #work's frames and screens at one scale (--s: one CSS px per 1/300 of #work's phone width); Magic UI Animated Beam
   carries the ask out and the reply back, Border Beam (css/ui.css) runs on the screen Vivi is working on. */
/* the section is a scroll track; the stage stays pinned while five beats play (js/devices.js) */
.devices { position: relative; height: 480dvh; --dev-beam-from: light-dark(#156c90, #479abd); --dev-beam-to: light-dark(#479abd, #7dc3de); }
.devices-stage {
  position: sticky; top: 0; height: 100dvh;
  max-width: calc(var(--container-wide) + 2 * var(--gutter)); margin-inline: auto;
  padding: calc(var(--bar-h) + clamp(0.5rem, 3dvh, 2.5rem)) var(--gutter) clamp(0.75rem, 3dvh, 2rem);
  display: grid; grid-template-columns: min(26rem, 32vw) minmax(0, 1fr); column-gap: clamp(1.5rem, 3.5vw, 4.5rem); align-items: center;
  /* the heading fits its column in two lines and never makes the pinned stage too tall */
  h2 { font-size: min(var(--step-4), min(26rem, 32vw) / 9.4, 6.2dvh); font-family: var(--font-display); font-weight: var(--display-wght); letter-spacing: var(--head-track); line-height: var(--head-lh); }
}
.devices-copy { display: grid; gap: clamp(0.9rem, 2.4dvh, 1.6rem); align-content: center; }
/* the five beats: the one playing in ink, the rest quiet */
.devices-copy { min-inline-size: 0; }
/* Vivi's run (js/devices.js), a compact ds-card: AgentStatus with the timer in its own right slot, one line per step
   (icon · label · device chip), the send row at the bottom */
.dev-run { gap: var(--ds-2); padding: var(--ds-3); min-inline-size: 0; }
.dev-run-head .aui-as {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: var(--ds-2); max-inline-size: 100%;
  padding: 0; border: 0; background: none;
  .aui-as-label { min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: var(--ds-title); }
  .aui-mono { justify-self: end; padding-inline-start: var(--ds-2); font-variant-numeric: tabular-nums; color: var(--ink-3); }
}
.dev-run-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.dev-run-steps > li {
  display: grid; grid-template-columns: 1rem minmax(0, 1fr) auto; align-items: center; column-gap: var(--ds-2);
  padding: 0.22rem 0.4rem; border-radius: var(--ds-r-sm); font: 400 0.88rem/1.3 var(--font); color: var(--ink-3);
  transition: background-color 0.3s var(--ease-out), color 0.3s var(--ease-out);
  .dev-run-t { min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ds-chip { justify-self: end; padding: 0.15rem 0.45rem; font-size: 0.75rem; }
}
.dev-run-steps > [data-status="done"] { color: var(--ink-2); .dev-run-i { color: var(--accent); } }
.dev-run-steps > [data-status="active"] { color: var(--ink); background: var(--ds-soft); .ds-chip { background: var(--accent-soft); color: var(--ink); } }
.dev-run-i { display: grid; place-items: center; inline-size: 1rem; block-size: 1rem;
  .aui-i { inline-size: 100%; block-size: 100%; }
  > i { inline-size: 0.5rem; block-size: 0.5rem; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-2); } }
@media (prefers-reduced-motion: no-preference) {
  html:not([data-motion="off"]) .dev-run-steps > [data-status="active"] .dev-run-i .aui-i { animation: dev-spin 0.9s linear infinite; }
}
@keyframes dev-spin { to { rotate: 1turn; } }
/* short screens: the device chips step aside (the head names the step playing; the devices are on the right) */
@media (height < 640px) and (width >= 900px) { .dev-run-steps .ds-chip { display: none; } }
.dev-run-say { display: none; }
/* the steps as Magic UI Animated List notifications (.ds-alist / .ds-notif, css/ds.css): room for the three it keeps, so
   the card never changes height while they arrive */
.dev-run-list { --row: calc(2rem + 2 * var(--ds-2) + 2px); }   /* the card fits what it shows (no reserved empty rows) */
@media (height < 640px) and (width >= 900px) { .dev-run-list { --row: calc(1.75rem + 2 * var(--ds-1) + 2px); gap: var(--ds-1); } .dev-run-list .ds-notif { padding-block: var(--ds-1); } .dev-run-list .ds-notif-i { inline-size: 1.75rem; block-size: 1.75rem; } }
.dev-send-chip { gap: 0.3rem; }
.dev-send-i { inline-size: 0.95rem; block-size: 0.95rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* the one honest line about device control, under the family */
.dev-fine { margin: 0.6rem 0 0; }
.dev-run-bud img { display: block; inline-size: 1rem; block-size: 1rem; object-fit: contain; }
/* the send row: its hint on a line of its own (proximity: it names the three pills under it), then three equal pills */
.dev-run-send { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: center; gap: var(--ds-2); border-top: 1px solid var(--ds-divider); padding-block-start: var(--ds-3);
  > .ds-hint { grid-column: 1 / -1; margin-block-end: calc(-1 * var(--ds-1)); }
  > .dev-send-chip { padding-inline: 0.6rem; } }
.devices-map {
  position: relative; display: grid; grid-template-rows: auto auto; align-content: center; min-height: 0;
}
.dev-label { font-size: 0.95rem; line-height: 1.35; color: var(--ink-2); text-wrap: balance;
  b { font-weight: 600; color: var(--ink); } }
/* the earbud: the rendered cut-out (or a quiet slot until it lands); the lit render crossfades in while it sends */
/* the earbud, its words to its left: the links leave the bud to the right and downwards, never across the words */
.dev--bud {
  --bud-w: clamp(72px, 11dvh, 112px);
  position: relative; z-index: 1; display: grid; grid-template-columns: auto auto; align-items: center; justify-self: center; column-gap: 1rem;   /* centred: the space above the phone stays free for the critter and his words */
  .dev-label { grid-column: 1; grid-row: 1; text-align: right; }
  .dev-label b { display: block; }
  .dev-bud-art { grid-column: 2; grid-row: 1 / span 2; }
  /* Vivi's words in his ear sit above the earbud's own words (out of the links' way; no layout shift) */
  /* Vivi's words in his ear: a small bubble anchored to the earbud, beside it on the right (over the links, never text) */
  .dev-say { position: absolute; left: calc(100% + 0.5rem); bottom: 55%; inline-size: max-content; max-inline-size: 15rem; }
}
/* what Vivi says in his ear at the end */
.dev-say { opacity: 0; translate: 0 4px; transition: opacity 0.35s var(--ease-out), translate 0.35s var(--ease-out); }
.dev-say:empty { visibility: hidden; }
#devices[data-saying] .dev-say { opacity: 1; translate: 0 0; }
/* each device is also a button: send the ask there */
.dev-send { grid-row: 1; grid-column: 1; align-self: end; position: relative; z-index: 2; height: var(--art-h, 100%); margin: 0 -4px; padding: 0;
  border: 0; border-radius: 14px; background: none; font-size: 0; color: transparent; cursor: pointer; }
.dev-send:focus-visible { outline: var(--ds-focus-w) solid var(--ds-focus-c); outline-offset: var(--ds-focus-offset); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .dev-art { transition: translate 0.35s var(--ease-out); }
  .dev:has(.dev-send:hover) .dev-art { translate: 0 -3px; }
}
.dev-bud-art {
  position: relative; display: block; width: var(--bud-w, 96px); aspect-ratio: 1;
  picture { position: absolute; inset: 0; transition: opacity 0.35s var(--ease-out); }
  img { display: block; width: 100%; height: 100%; object-fit: contain; }
  picture[data-view="lit"] { opacity: 0; }
  &[data-lit] picture[data-view="lit"] { opacity: 1; }
  &[data-lit][data-has-lit] picture[data-view="three"] { opacity: 0; }
  /* soft contact shadow under the object */
  &::after { content: ""; position: absolute; z-index: -1; left: 22%; right: 22%; bottom: 2%; height: 9%; border-radius: 50%;
    background: radial-gradient(closest-side, var(--contact), transparent); }
  /* until the cut-out lands: a quiet ring, like an empty stand for it (no drawn earbud) */
  &:not(:has(picture))::before { content: ""; position: absolute; inset: 22%; border-radius: 50%; background: radial-gradient(closest-side, var(--card), var(--paper-2));
    box-shadow: inset 0 0 0 1px var(--line-2); transition: box-shadow 0.35s var(--ease-out); }
  &[data-lit]:not(:has(picture))::before { box-shadow: inset 0 0 0 2px var(--accent); }
}
.dev-bud-port, .dev-port { position: absolute; width: 0; height: 0; pointer-events: none; }
.dev-bud-port { left: 50%; top: 50%; }
.dev-port { left: 50%; top: -3px; }

/* the family: one scale for all three, standing on one floor line, labels underneath */
.dev-list {
  --gap: clamp(14px, 3.2vw, 48px);
  --s: min(0.55px, calc((100cqi - 2 * var(--gap)) / 1640), calc((100dvh - var(--bar-h) - 21rem) / 630));   /* the phone (630 units tall) stays under half the screen height */
  container-type: inline-size; list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, auto); grid-template-rows: auto auto; justify-content: space-between;
  column-gap: var(--gap); row-gap: 0.75rem; padding-top: clamp(2.5rem, 7dvh, 4.5rem);
}
.dev-list > .dev { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: subgrid; grid-row: span 2; align-items: end; row-gap: 1rem; margin: 0; }
.dev-list .dev-label { align-self: start; grid-row: 2; }
.dev-list .dev-art { grid-row: 1; grid-column: 1; }
.dev-art { position: relative; }
.dev--phone { width: calc(300 * var(--s)); }
.dev--tablet { width: calc(560 * var(--s)); }
.dev--laptop { width: calc(780 * var(--s)); }
/* each device is drawn at its #work size (so its text and screens lay out exactly as there), then scaled by one
   factor (--k = --s / 1px, set by js/devices.js from the column width) */
#devices .dev .vs-demo { position: absolute; left: 0; top: 0; margin: 0; transform-origin: 0 0; scale: var(--k, 0.5); }
#devices .dev--phone .vs-demo { width: 300px; }
#devices .dev--tablet .vs-demo { width: 560px; }
#devices .dev--laptop .vs-demo { width: 780px; }
#devices .dev .ui-border-beam { border-width: calc(2px / var(--k, 1)); }

/* phone: the home screen, then the Vivi app over it (a crossfade with a little blur) */
#devices .dev-app { position: absolute; inset: 2.9cqi; z-index: 2; opacity: 0; transition: opacity 0.18s var(--ease-exit); }
#devices[data-phone="app"] .dev-app { opacity: 1; transition: opacity 0.3s var(--ease-enter); }
@media (prefers-reduced-motion: no-preference) {
  :root:not([data-motion="off"]) #devices .dev-app { scale: 0.97; filter: blur(6px); transition: opacity 0.18s var(--ease-exit), filter 0.18s var(--ease-exit), scale 0.18s var(--ease-exit); }
  :root:not([data-motion="off"]) #devices[data-phone="app"] .dev-app { scale: 1; filter: none; transition: opacity 0.3s var(--ease-enter), filter 0.3s var(--ease-enter), scale 0.3s var(--ease-enter); }
}
.dev-app-body { display: contents; }

/* tablet: the phone's frame language on a 16:10 landscape slate; its screen is laid out in dp of a 1280 x 800 dp screen (1 dp = var(--u)) */
#devices .dev-fig--tablet {
  &::after { display: none; }
  .vs-phone { padding: 2.1cqi; border-radius: 4.4cqi;
    box-shadow: inset 0 0 0 .16cqi oklch(.82 .02 255 / .55), inset 0 0 0 .6cqi oklch(.36 .035 258), inset 0 0 0 .78cqi oklch(.1 .005 260); }
  .vs-phone::before { top: 0.75cqi; width: 0.9cqi; box-shadow: none; }
  .vs-phone::after { display: none; }
  .vs-screen { --u: calc(100cqi / 1280); aspect-ratio: 16 / 10; border-radius: 2.4cqi; }
}
/* the tablet's lock screen (js/devices.js tabletLock), in dp of a 1280 x 800 dp landscape screen */
.tbl {
  position: absolute; inset: 0; overflow: hidden; color: #fff; font-family: var(--vs-ui); background: oklch(0.45 0 0);
  p { margin: 0; }
  .tbl-wall, .tbl-wall img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; }
  /* status bar: carrier and notification icons left, location / Wi-Fi / signal / battery right */
  .vs-status.tbl-status { --dp: var(--u); position: absolute; left: 0; right: 0; top: 0; height: calc(30 * var(--u)); padding: 0 calc(22 * var(--u)) 0 calc(22 * var(--u));
    gap: calc(5 * var(--u)); color: #fff; text-shadow: 0 0 calc(3 * var(--u)) oklch(0 0 0 / 0.35); }
  .tbl-carrier { margin-right: calc(2 * var(--u)) !important; font-size: calc(14 * var(--u)); font-weight: 500; }
  .tbl-ni { width: calc(12 * var(--u)); height: calc(12 * var(--u)); fill: currentColor; }
  .tbl-dot { width: calc(4 * var(--u)); height: calc(4 * var(--u)); border-radius: 50%; background: currentColor; margin-left: calc(2 * var(--u)); }
  .tbl-loc { width: calc(12 * var(--u)); height: calc(12 * var(--u)); margin-right: calc(5 * var(--u)); fill: currentColor; }
  .vs-sb-batt { background: oklch(0.78 0 0 / 0.75); color: oklch(0.2 0 0); }
  .vs-sb-batt::before { background: oklch(0.96 0 0); }
  /* the clock: big and thin, the date under it, in the clear band of panels left of the figure (One UI's left clock
     position, which keeps it off the figure on a landscape screen) */
  .tbl-lock { position: absolute; left: calc(60 * var(--u)); top: calc(78 * var(--u)); width: calc(22 * var(--u)); height: calc(22 * var(--u)); color: #fff; }
  .tbl-lock .f { fill: currentColor; }
  .tbl-time { position: absolute; left: calc(50 * var(--u)); top: calc(110 * var(--u)); font-size: calc(116 * var(--u)); font-weight: 300; line-height: 1;
    letter-spacing: -0.01em; font-variant-numeric: tabular-nums; text-shadow: 0 0 calc(12 * var(--u)) oklch(0 0 0 / 0.35); }
  .tbl-date { position: absolute; left: calc(58 * var(--u)); top: calc(236 * var(--u)); font-size: calc(21 * var(--u)); font-weight: 400;
    text-shadow: 0 0 calc(6 * var(--u)) oklch(0 0 0 / 0.5); }
  .tbl-charge { position: absolute; left: 0; right: 0; bottom: calc(70 * var(--u)); text-align: center; font-size: calc(16 * var(--u));
    text-shadow: 0 0 calc(5 * var(--u)) oklch(0 0 0 / 0.5); }
  /* shortcuts: white circles in the bottom corners */
  .tbl-sc { position: absolute; bottom: calc(26 * var(--u)); display: grid; place-items: center; width: calc(56 * var(--u)); height: calc(56 * var(--u)); border-radius: 50%; background: #fff; color: oklch(0.15 0 0); }
  .tbl-sc svg { width: calc(24 * var(--u)); height: calc(24 * var(--u)); }
  .tbl-sc .f { fill: currentColor; }
  .tbl-sc--phone { left: calc(30 * var(--u)); }
  .tbl-sc--camera { right: calc(30 * var(--u)); }
  /* Vivi's notification on the lock screen, under the clock (One UI lock-screen card) */
  .tbl-note { position: absolute; left: calc(46 * var(--u)); top: calc(290 * var(--u)); width: calc(430 * var(--u)); display: flex; gap: calc(14 * var(--u)); align-items: flex-start;
    padding: calc(16 * var(--u)) calc(18 * var(--u)); border-radius: calc(26 * var(--u)); background: oklch(0.97 0.003 270 / 0.94); color: oklch(0.2 0 0);
    opacity: 0; translate: 0 calc(-10 * var(--u)); transition: opacity 0.45s var(--ease-out), translate 0.45s var(--ease-out); }
  .tbl-note .vs-vivi { --s: calc(40 * var(--u)); flex: none; }
  .tbl-note p { margin: 0; }
  .tbl-note-meta { display: flex; gap: calc(6 * var(--u)); font-size: calc(14 * var(--u)); color: oklch(0.5 0.005 270); }
  .tbl-note-meta b { font-weight: 600; color: oklch(0.2 0 0); }
  .tbl-note-meta span::before { content: "· "; }
  .tbl-note-t { font-size: calc(18 * var(--u)); font-weight: 700; margin-top: calc(2 * var(--u)) !important; }
  .tbl-note-x { font-size: calc(16 * var(--u)); line-height: 1.35; }
}
#devices[data-tablet="note"] .tbl-note { opacity: 1; translate: 0 0; }

/* laptop: the Plasma laptop from #work with the real footage stills (start, then the finished invoice) */
#devices .dev--laptop {
  .vs-gn-video { object-position: 50% 50%; }
  picture { position: absolute; inset: 0; transition: opacity 0.6s var(--ease-out), filter 0.6s var(--ease-out); }
  .dev-lap-done { opacity: 0; filter: blur(6px); }
}
#devices[data-lap="done"] .dev--laptop .dev-lap-done { opacity: 1; filter: none; }

/* the connections: faint at rest; in the still (reduced motion, Pause motion) they stay clearly drawn */
/* the arcs are drawn by the pixel link (pixelfx arcane/vivi-link, js/devices.js); the Animated Beam SVGs only give
   the geometry. The canvas sits under the devices, so the light stops at their edges. */
#devices .ui-animated-beam { visibility: hidden; }
.dev-links { position: absolute; left: 0; top: 0; z-index: 0; pointer-events: none; image-rendering: pixelated; }

/* wide screens: the phone's label stays on one line, running into the gap after the phone */
@media (width >= 1280px) {
  .dev-list { --gap: clamp(48px, 7vw, 104px); }
}
/* labels on one line only where the family is wide enough for them; otherwise the name sits above its status */
@container (width >= 880px) { .dev-list .dev-label { white-space: nowrap; } }
@container (width < 880px) { .dev-list .dev-label b { display: block; } .dev-list .dev-sep { display: none; } }
@container (width >= 600px) and (width < 880px) { .dev-list .dev-label { white-space: nowrap; } }
@media (width < 900px) {
  /* one column: the heading and the beat playing now, then the earbud above its family */
  .devices-stage { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; align-items: start; row-gap: 1rem; }
  .devices-stage h2 { font-size: clamp(1.7rem, 7.6vw, 2.2rem); }
  /* no room beside the earbud: Vivi's words go into the run card instead of a bubble */
  #devices .dev--bud .dev-say { display: none; }
  .dev-run-say:not(:empty) { display: block; margin: 0; font: var(--ds-body); color: var(--ink); }
  .devices-map { align-content: start; }
  .dev-run { max-inline-size: none; gap: var(--ds-2); padding: var(--ds-3); }
  #devices .dev-run-steps, #devices .dev-run-list { display: none; }   /* the head already names the step playing; the list is for wide screens */
}
@media (width < 760px) {
  .dev--bud { justify-self: center; }
  .dev--bud { --bud-w: 72px; }
  .dev-list { --gap: 10px; padding-top: 2.75rem; --s: min(0.55px, calc((100cqi - 2 * var(--gap)) / 1640)); }
  .dev-label { font-size: 0.82rem; }
  .dev-list .dev-label b { display: block; }
  .dev-sep { display: none; }
}

/* devices named in running text: a tiny product shot right after the name (assets/phone/s21fe-*, gf63-*, the earbud
   cut-out once it exists, js/devices.js). Sized to the line so it never pushes the line box; name and shot never part. */
.inline-dev { white-space: nowrap; }
.inline-shot { display: inline-block; margin-left: 0.28em; vertical-align: -0.26em; line-height: 0; }
.inline-shot img { display: block; width: auto; filter: drop-shadow(0 0.04em 0.05em var(--contact)); }
.inline-shot--phone img { height: 1.3em; }
/* the test laptop: a still of the site's own laptop render (dev/make-inline-shots.mjs), a wide shot at the line height */
.inline-shot--laptop { vertical-align: -0.2em; }
.inline-shot--laptop img { height: 1.15em; }
/* the phone shot in the page theme (html[data-scheme], js/theme.js): light by default, the dark render in dark */
.inline-shot--dark { display: none; }
html[data-scheme="dark"] { .inline-shot--light { display: none; } .inline-shot--dark { display: inline-block; } }
.inline-shot--bud:empty { display: none; }
/* the earbuds' charging case (51 x 48 mm next to the 155.7 mm phone would be 0.43em; kept legible at 0.75em) */
.inline-shot--bud { vertical-align: -0.1em; }
.inline-shot--bud img { height: 0.75em; }

/* ---- two short beats before the invite: bring your own AI, and where things stand. Big type, nothing else. */
.said {
  display: grid; gap: clamp(1rem, 2vw, 1.5rem); justify-items: start;
  max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding: clamp(4.5rem, 10vw, 8rem) var(--gutter) 0;
  h2 { font-size: var(--step-5); font-family: var(--font-display); font-weight: var(--display-wght); letter-spacing: var(--head-track); line-height: var(--head-lh); max-width: 14ch; }
  p { font-size: var(--step-1); line-height: 1.5; color: var(--ink-2); max-width: 62ch; }
}
.persona {
  display: inline-flex; gap: 2px; margin: 0.5rem 0 0; padding: 3px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--card); align-items: center;
  legend { float: left; padding: 0 0.6rem; font-size: 0.85rem; color: var(--ink-3); }
  label { position: relative; cursor: pointer; }
  input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
  span { display: flex; align-items: center; min-height: max(var(--target), 2rem); padding: 0.35rem 0.9rem; border-radius: calc(12px - 3px); font: 500 0.9rem/1.1 var(--font); transition: background-color 150ms ease-out, scale 150ms ease-out; }
  label:active span { scale: var(--press); }
  input:checked + span { background: var(--ink); color: var(--paper); }
  input:focus-visible + span { outline: 2px solid var(--accent); }
}

/* wide: the two beats compose across the container, the headline on the left and its words (and the name switch) on the right */
@media (width >= 900px) {
  .said {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: clamp(2.5rem, 6vw, 7rem); align-items: start;
    h2 { grid-column: 1; grid-row: 1 / span 2; }
    > :not(h2) { grid-column: 2; }
    p { padding-top: 0.5em; }
  }
}

/* ---- invite: the previous paper slip, kept for ?bill=0 (the default is the guest check below) */
.invite { display: grid; justify-items: center; }
.slip {
  --edge: radial-gradient(circle at 7px 0, transparent 5px, #000 5.5px) top / 14px 10px repeat-x, radial-gradient(circle at 7px 10px, transparent 5px, #000 5.5px) bottom / 14px 10px repeat-x, linear-gradient(#000, #000) center / 100% calc(100% - 18px) no-repeat;
  width: min(30rem, 100%); padding: 2.4rem 2rem 2.2rem; display: grid; gap: 1rem; mask: var(--edge); container-type: inline-size;
  /* a physical slip of thermal paper: it stays paper in dark mode too, so its own tokens resolve light inside it */
  color-scheme: light;
  background: var(--receipt); color: var(--receipt-ink); font: 400 0.95rem/1.5 var(--mono);
  h2 { font: var(--display-wght) clamp(1.8rem, 1.4rem + 1.2 * var(--fl), 2.4rem)/var(--head-lh) var(--font-display); letter-spacing: var(--head-track); color: var(--ink); }
  > p { color: var(--receipt-ink); }
  .slip-foot { display: grid; gap: var(--ds-1); border-top: 1px dashed oklch(0.3 0.02 60 / 0.4); padding-top: 0.9rem; font-size: 0.8rem;
    > .ds-receipt-row { margin: 0; display: flex; justify-content: space-between; gap: var(--ds-4); color: var(--receipt-ink);
      > span:first-child { opacity: 0.7; } } }
  .waitlist { display: grid; gap: 0.5rem; }
  .wl-label { margin-bottom: 0.35rem; font: 500 0.85rem/1.3 var(--mono); color: var(--receipt-ink); }
  .wl-row {
    position: relative; --wl-edge: var(--accent);
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 0.75rem 1rem;
    input { min-width: 0; min-height: 3.25rem; padding: 0; border: 0; border-bottom: 1.5px solid var(--receipt-ink); border-radius: 0; background: transparent;
      color: var(--ink); font: 400 max(1rem, 1.05rem) var(--mono); caret-color: var(--accent); transition: border-color 150ms ease-out;
      &::placeholder { color: oklch(0.26 0.02 60 / 0.45); }
      &:focus { border-bottom-color: var(--accent); }
      &:focus-visible { outline: 2px solid transparent; outline-offset: 2px; border-radius: 0; border-bottom-color: var(--wl-edge); border-bottom-width: 2px; box-shadow: 0 2px 0 var(--wl-edge); }
      &:is(:autofill, :-webkit-autofill) { box-shadow: inset 0 0 0 100vmax var(--receipt), 0 1.5px 0 var(--receipt-ink); -webkit-text-fill-color: var(--ink);
        transition: border-color 150ms ease-out, background-color 0s 600000s; } }
  }
  .waitlist:is(:has(input:user-invalid:not(:placeholder-shown)), .tried:has(input:invalid)) .wl-row { --wl-edge: var(--risk-high);
    input { border-bottom-color: var(--risk-high); border-bottom-width: 2px; } }
  .wl-hint { font-size: 0.8rem; opacity: 0.7; }
  .wl-err { font-size: 0.85rem; color: var(--risk-high); }
  .wl-status { font-size: 0.9rem; color: var(--receipt-ink); }
  .wl-status[data-tone="ok"] { color: var(--ok); }
  .wl-status[data-tone="warn"] { color: var(--warn); }
  .waitlist[data-done] .wl-row { display: none; }
  .invite-ticket { margin-block: 0.5rem 0.25rem; }
}
/* a narrow slip: the button takes its own full-width row under the field */
@container (width < 24rem) { .slip .wl-row { grid-template-columns: minmax(0, 1fr); } .slip .wl-row button { width: 100%; } }
.invite-ticket:focus { outline: none; }
.tix { display: grid; align-content: center; gap: 6px; height: 100%; padding: 0 22px; font: 400 13px/1.4 var(--mono); color: var(--receipt-ink); }
.tix-k { font-size: 12px; opacity: 0.7; }
.tix-big { font: 600 24px/1.1 var(--font); letter-spacing: -0.02em; color: var(--ink); }
.tix-to { overflow-wrap: anywhere; }
.tix-stub { display: grid; place-content: center; justify-items: center; gap: 2px; height: 100%; font: 400 12px/1.2 var(--mono); color: var(--receipt-ink);
  span { font-size: 12px; opacity: 0.7; } b { font: 600 28px/1 var(--font); color: var(--accent); } small { margin-top: 8px; font-size: 11px; opacity: 0.6; } }

/* ---- invite: an old guest check (founder: "a hyper realistic render of an old restaurant bill, the input box is like
   the tip section people fill"). The paper is a Blender render (blender/bill/, assets/invite/); the form is live HTML
   written onto it. .bill is exactly the paper: its zones are in millimetres of paper (assets/invite/bill.json), so
   --mm (= the paper's width / 89) places and sizes everything, and the whole bill (render + live layer) leans together. */
.invite { padding: clamp(5rem, 10vw, 8rem) var(--gutter); }
.invite-in { display: grid; gap: var(--ds-8) clamp(3rem, 7vw, 7rem); max-width: 62rem; margin-inline: auto; justify-items: center;
  @media (width >= 860px) { grid-template-columns: minmax(0, 1fr) var(--bill-w); align-items: center; justify-items: start; } }
/* the whole bill fits in the view under the bar with 24 px clear above and below: its width follows the height left */
.invite { --bill-w: min(25rem, calc((100dvh - var(--bar-h) - 3.5rem) * 89 / 190)); scroll-margin-top: var(--bar-h); }
/* side by side, the section is one view tall under the bar, so jumping to #invite shows the whole bill, centred */
@media (width >= 860px) { .invite:has(.bill) { min-height: calc(100dvh - var(--bar-h)); padding-block: 1.75rem; display: grid; align-content: center; } }
.invite-copy { display: grid; gap: var(--ds-4); max-width: 26rem;
  h2 { margin: 0; font: var(--display-wght) clamp(1.8rem, 1.4rem + 1.2 * var(--fl), 2.4rem)/var(--head-lh) var(--font-display); letter-spacing: var(--head-track); color: var(--ink); text-wrap: balance; }
  p { margin: 0; font: 400 var(--step-0, 1.05rem)/1.45 var(--font); color: var(--ink-2); text-wrap: pretty; } }
@font-face { font-family: "Caveat"; src: url("../fonts/caveat-latin-wght-normal.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../fonts/barlow-condensed-latin-regular-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../fonts/barlow-condensed-latin-semibold-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
.bill {
  --mm: calc(100cqi / 89);
  /* inks on the paper, matched to the render under each theme's light (bone: daylight; basalt: a low warm lamp) */
  --bill-print: light-dark(oklch(0.42 0.065 168), oklch(0.3 0.05 155));    /* the pad's printed green */
  --bill-pen: light-dark(oklch(0.3 0.09 262), oklch(0.22 0.07 262));     /* a blue-black ballpoint */
  --bill-red: light-dark(oklch(0.48 0.17 27), oklch(0.34 0.13 28));          /* the waiter's red pen */
  --bill-stamp: light-dark(oklch(0.4 0.11 238), oklch(0.27 0.09 240));   /* glacier stamp ink: the one action */
  --bill-fibre: light-dark(oklch(0.94 0.02 90), oklch(0.7 0.05 75));      /* torn paper fibres */
  --bill-hint: light-dark(oklch(0.45 0.01 260 / 0.42), oklch(0.36 0.01 260 / 0.5)); /* pencil-grey guidance */
  --bill-faint: light-dark(oklch(0.47 0.065 168 / 0.5), oklch(0.4 0.05 150 / 0.55));
  position: relative; width: min(var(--bill-w, 25rem), 100%); aspect-ratio: 89 / 190; container-type: inline-size;
  rotate: -1.4deg; /* lying on the page, not squared to it */
  > picture { position: absolute; inset: calc(-9 / 190 * 100%) calc(-9 / 89 * 100%); pointer-events: none;
    > img { display: block; width: 100%; height: 100%; } }
  > .bill-paper img { user-select: none; -webkit-user-drag: none; }
  > .bill-shadow { transition: mask-position 0.6s var(--ease-out, ease-out); }
  /* renders never sit on a hard edge (founder rule): the foot of the stub and its shadow fade into the page, and the
     shadow thins out before the image ends on every side */
  > .bill-paper { mask: linear-gradient(to bottom, #000 90%, transparent 99%); }
  > .bill-shadow { mask: linear-gradient(to bottom, transparent, #000 3%, #000 88%, transparent 99%), linear-gradient(to right, transparent, #000 4%, #000 96%, transparent); mask-composite: intersect; }
}
.bill-shadow--dark, .bill-paper--dark { display: none; }
.bill > picture[data-missing] { display: none !important; }
html[data-scheme="dark"] .bill { .bill-shadow--light, .bill-paper--light { display: none; } .bill-shadow--dark, .bill-paper--dark { display: block; } }
/* everything written on the paper sits in its zone (mm of paper) and soaks into it like ink (multiply) */
.bill-form { position: absolute; inset: 0; margin: 0; z-index: 2; pointer-events: none; /* above the torn-off ticket; only its controls take the pointer */
  > * { position: absolute; margin: 0; pointer-events: auto; }
  :is(.bill-label, .bill-note, input, .bill-stamp-ink) { mix-blend-mode: multiply; } }
/* "Your email" is printed after the pad's own "Tip", on its baseline (117.6 mm): Barlow Condensed's ascent is 1em */
.bill-label { --lab: max(12px, calc(3.3 * var(--mm))); left: calc(12.8 * var(--mm)); top: calc(117.6 * var(--mm) - var(--lab)); font: 400 var(--lab)/1.2 "Barlow Condensed", var(--font); color: var(--bill-print); letter-spacing: 0.01em; }
/* the tip line: its bottom edge is the printed rule (129 mm); the handwriting sits on it, descenders just touching */
.bill-tip {
  --tip-h: max(44px, calc(10.6 * var(--mm))); --pen: calc(7.4 * var(--mm));
  left: calc(6 * var(--mm)); width: calc(80 * var(--mm)); top: calc(129 * var(--mm) - var(--tip-h)); height: var(--tip-h);
  --wl-edge: var(--bill-stamp);
  --risk-high: var(--bill-red); --accent: var(--bill-stamp); /* Vivi's light on the line (field-fx) takes the inks on the paper */
  input { display: block; width: 100%; height: 100%; min-width: 0; margin: 0; border: 0; border-radius: 0; background: transparent;
    /* Caveat: ascent 0.96, descent 0.30 → the baseline sits 1.9 mm above the box's bottom */
    padding: calc(var(--tip-h) - 2 * (1.9 * var(--mm) + 0.33 * var(--pen))) calc(1 * var(--mm)) 0 calc(1 * var(--mm) + 6px); /* room for the cue caret */
    font: 500 var(--pen)/normal "Caveat", cursive; color: var(--bill-pen); caret-color: var(--bill-stamp);
    /* the placeholder is faint pencil-grey printed guidance, gone as soon as the pen is on the line */
    &::placeholder { font: 400 max(13px, calc(4.2 * var(--mm))) "Barlow Condensed", var(--font); color: var(--bill-hint); letter-spacing: 0.02em; opacity: 1; }
    &:focus::placeholder { color: transparent; } }
}
/* focus: glacier ink traces the printed rule (no layout shift); Vivi's pixel light (field-fx) only lights it. The
   transparent outline shows in forced colours. Invalid: the red pen underlines it. */
.bill .bill-tip input:focus-visible { outline: 2px solid transparent; outline-offset: 2px; box-shadow: inset 0 -2px 0 var(--wl-edge); }
.waitlist:is(:has(input:user-invalid:not(:placeholder-shown)), .tried:has(input:invalid)) .bill-tip { --wl-edge: var(--bill-red); }
.waitlist:is(:has(input:user-invalid:not(:placeholder-shown)), .tried:has(input:invalid)) .bill-tip input { box-shadow: inset 0 -2px 0 var(--bill-red); }
.bill-tip input:is(:autofill, :-webkit-autofill) { -webkit-text-fill-color: var(--bill-pen); box-shadow: inset 0 -2px 0 var(--bill-print); transition: background-color 0s 600000s; }
.field-fx { position: absolute; z-index: 1; pointer-events: none; image-rendering: pixelated; margin: 0; }
/* the bill's pixel light (js/ui/tip-fx.js, pixelfx ui/vivi-tipline): the attention cue on the tip line, the stamp's impact */
.tip-fx { position: absolute; z-index: 1; pointer-events: none; image-rendering: pixelated; margin: 0; }
/* until the field is focused (touch: it never is by itself), a ballpoint caret blinks at the start of the tip line */
.bill-tip[data-cue]:not(:focus-within):has(input:placeholder-shown)::after {
  content: ""; position: absolute; left: calc(1 * var(--mm)); bottom: calc(1.6 * var(--mm)); width: 2px; height: calc(var(--pen) * 0.78);
  border-radius: 1px; background: var(--bill-stamp); pointer-events: none; animation: bill-caret 1.1s steps(1, end) infinite; }
@keyframes bill-caret { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0; } }
:root[data-motion="off"] .bill-tip[data-cue]::after { animation: none; }
@media (prefers-reduced-motion: reduce) { .bill-tip[data-cue]::after { animation: none; } }
/* the send: a rubber stamp in glacier ink, pressed a little crooked into the blank box beside the total */
.bill-stamp {
  left: calc(44 * var(--mm)); top: calc(131 * var(--mm)); width: calc(42 * var(--mm)); height: calc(15 * var(--mm)); min-height: 44px;
  display: grid; place-items: center; padding: 0; border: 0; background: none; cursor: pointer; color: var(--bill-stamp);
  -webkit-tap-highlight-color: transparent; transition: scale var(--ds-t-press, 150ms) ease-out;
  &:active { scale: var(--press, 0.97); }
  &:disabled { cursor: progress; opacity: 0.6; }
  &:focus-visible { outline: var(--ds-focus-w, 2px) solid var(--ds-focus-c, var(--bill-stamp)); outline-offset: 2px; border-radius: calc(1.4 * var(--mm)); }
}
.bill-stamp-ink {
  display: block; padding: calc(1.6 * var(--mm)) calc(3.4 * var(--mm)); rotate: -5deg;
  border: calc(0.55 * var(--mm)) solid currentColor; border-radius: calc(1.2 * var(--mm)); box-shadow: inset 0 0 0 calc(0.5 * var(--mm)) transparent, inset 0 0 0 calc(0.85 * var(--mm)) currentColor;
  outline: calc(0.3 * var(--mm)) solid currentColor; outline-offset: calc(0.6 * var(--mm));
  font: 600 calc(4.6 * var(--mm))/1 "Barlow Condensed", var(--font); letter-spacing: 0.02em; white-space: nowrap; text-box: trim-both cap alphabetic;
  /* a rubber stamp never inks evenly: speckled gaps from a noise mask */
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='80'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1.8 2.05'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E") 0 0 / 160px 80px;
  transition: rotate var(--ds-t-hover, 150ms) ease-out;
}
.bill-stamp:hover .bill-stamp-ink { rotate: -4deg; } /* the stamp lifts a touch under the pointer */
:root[data-motion="off"] .bill-stamp { transition: none; }
@media (prefers-reduced-motion: reduce) { .bill-stamp, .bill > .bill-shadow { transition: none; } }
/* hint, error and status: printed small under the total; one at a time besides the hint */
.bill-note { left: calc(6 * var(--mm)); top: calc(147.6 * var(--mm)); width: calc(78 * var(--mm)); display: grid; gap: calc(0.8 * var(--mm));
  font: 400 max(12px, calc(3 * var(--mm)))/1.25 "Barlow Condensed", var(--font); color: var(--bill-print); letter-spacing: 0.01em;
  > p { margin: 0; } }
/* one line at a time under the total: an error or a status takes the hint's place (the field still references it) */
.bill .waitlist:is(:has(.wl-status:not(:empty)), :has(input:user-invalid:not(:placeholder-shown)), .tried:has(input:invalid)) .wl-hint { display: none; }
.bill-note .wl-err { font: 500 max(15px, calc(4.4 * var(--mm)))/1.05 "Caveat", cursive; color: var(--bill-red); }
/* a failed submit shakes the field like a head saying no: quick, decaying, horizontal only (micro-interactions rule 3) */
@media (prefers-reduced-motion: no-preference) {
  :root:not([data-motion="off"]) .wl-row.is-shaking { animation: wl-shake 360ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both; }
}
@keyframes wl-shake { 15% { translate: -8px 0; } 30% { translate: 7px 0; } 45% { translate: -5px 0; } 60% { translate: 3px 0; } 78% { translate: -1px 0; } 100% { translate: 0 0; } }
.wl-err { display: none; }
.waitlist:is(:has(input:user-invalid:not(:placeholder-shown)), .tried:has(input:invalid)) .wl-err { display: block; }
.wl-status:empty { display: none; }
.bill .wl-status[data-tone="ok"] { color: var(--bill-print); }
.bill .wl-status[data-tone="warn"] { color: var(--bill-red); }
.waitlist[data-done] .bill-stamp { pointer-events: none; &:disabled { opacity: 1; cursor: default; } } /* the stamp stays where it landed, fully inked */

/* ---- footer */
.foot { padding: clamp(4rem, 8vw, 6rem) var(--inset) clamp(2rem, 4vw, 3rem); color: var(--ink-2); background: var(--paper); }
/* a real site footer: the liquid lockup with its line and chips, the page's sections, more (moves, credits), then a
   base row with the status and the legal line. Two columns of links sit beside the lockup on wide screens and under
   it on phones */
.foot-in { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; column-gap: clamp(2.5rem, 7vw, 7rem); row-gap: var(--ds-8); align-items: start; }
.foot-brand { display: grid; gap: var(--ds-3); justify-items: start; min-width: 0;
  > .foot-big { margin: 0 0 var(--ds-1); } }
.foot-line { margin: 0; font: var(--lead-wght) var(--step-1)/var(--lead-lh) var(--font-lead); letter-spacing: var(--lead-track); color: var(--ink-2); text-wrap: balance; }
.foot-nav, .foot-more { display: grid; gap: var(--ds-2); align-content: start; padding-top: var(--ds-3);
  > ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; justify-items: start; } }
.foot-h { margin: 0 0 var(--ds-1); font: var(--ds-label); color: var(--ink); }
:is(.foot-nav a, .foot-more .vivi-moves-link) {
  display: inline-flex; align-items: center; min-height: max(2rem, var(--target)); padding: 0; border: 0; background: none;
  font: 400 0.95rem/1.3 var(--font); color: var(--ink-2); text-decoration: none; cursor: pointer;
  transition: color var(--ds-t-hover) ease-out;
  &:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 0.2em; }
  &:focus-visible { outline: var(--ds-focus-w) solid var(--ds-focus-c); outline-offset: var(--ds-focus-offset); border-radius: var(--ds-r-xs); }
}
.foot-more .foot-credits { margin-top: var(--ds-2); &:focus-visible { outline: var(--ds-focus-w) solid var(--ds-focus-c); outline-offset: var(--ds-focus-offset); } }
.foot-base { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--ds-3) var(--ds-6);
  padding-top: var(--ds-5); }   /* no divider line (founder 2026-11-27): spacing alone separates the base */
.foot-status { text-decoration: none; transition: background-color var(--ds-t-hover) ease-out;
  &:hover { background: color-mix(in oklch, var(--accent-soft) 80%, var(--accent)); }
  &:focus-visible { outline: var(--ds-focus-w) solid var(--ds-focus-c); outline-offset: var(--ds-focus-offset); } }
@media (width < 900px) {
  .foot-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--ds-6); row-gap: var(--ds-6); }
  .foot-brand { grid-column: 1 / -1; }
  .foot-nav, .foot-more { padding-top: 0; }
  .foot-base { flex-direction: column; align-items: flex-start; }
}
.foot-big { display: inline-flex; align-items: center; gap: 0.16em; font: var(--display-word-wght) var(--step-7)/1 var(--font-word); letter-spacing: var(--display-word-track); color: var(--ink); }
/* liquid metal on the footer lockup (js/liquid.js, Paper Shaders' LiquidMetal): the big version of the bar's logo, a
   glacier earbud and the wordmark. Fallback (no WebGL2, or until the first liquid frame): the real text and a flat
   glacier earbud. The wordmark stays text; it only turns transparent once the canvas on top of it has drawn. */
.liquid { position: relative; }
.lm-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; opacity: 0; transition: opacity 0.6s var(--ease-out); }
.lm-probe { display: none; }
.liquid[data-liquid="on"] > .lm-canvas { opacity: 1; }
.foot-bud {
  /* the glacier Nord Buds 4 cut-out (a square with 4% padding; the bud fills ~62% of its width) */
  width: 0.82em; aspect-ratio: 1; margin-inline: -0.12em -0.08em; translate: 0 0.02em;
  background: center / contain no-repeat image-set(url("../assets/earbud-hd/cutout/bud-34-192.webp") type("image/webp") 1x, url("../assets/earbud-hd/cutout/bud-34-384.webp") type("image/webp") 2x);
  --lm-body: oklch(0.71 0.04 235); /* the render's own glacier */
  /* colour burn deepens a dark tint a lot: on bone the earbud takes a lifted glacier so it stays icy, not cyan */
  --lm-tint: light-dark(color-mix(in oklch, var(--accent) 55%, oklch(1 0 0)), var(--accent)); --lm-back: transparent;
  &[data-liquid="on"] { background: none; }
}
.foot-word {
  transition: color 0.6s var(--ease-out);
  --lm-tint: color-mix(in oklch, var(--accent) 45%, oklch(1 0 0)); --lm-back: transparent;
  &[data-liquid="on"] { color: transparent; }
  > .lm-canvas { inset: -0.08em auto auto -0.08em; width: calc(100% + 0.16em); height: calc(100% + 0.16em); } /* a canvas is a replaced element: insets alone don't size it */
}

::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.35s; }
@media (prefers-reduced-motion: reduce) { ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; } }
.no-webgl .intro-canvas, .no-webgl .cafe-canvas { display: none; }
.intro.no-webgl { height: auto; .intro-pin { position: relative; height: auto; } .intro-copy { position: relative; inset: auto; translate: none; opacity: 1; filter: none; width: auto; padding: 6rem 1.25rem 2rem; } }

/* ---- invite: after a saved signup the bill's guest receipt tears off along its perforation (React Bits TearTicket,
   css/ui.css). The ticket is laid exactly over the paper from 146 mm down and shows the same render, so the paper looks
   unchanged until the stub is pulled; the render under it is cut away there, and the stub's shadow goes with it. */
.bill > .bill-tear { position: absolute; left: 0; right: 0; top: calc(146 * var(--mm)); width: auto; z-index: 1; } /* beats css/ui.css (loaded later) */
.bill-tear:focus { outline: none; } /* focus only parks here (tabindex -1) after the stub leaves */
.bill .bill-tear[data-used] .ui-tear-ticket__content { opacity: 1; } /* css/ui.css loads later and fades a used ticket */
.bill-tear .ui-tear-ticket__stub:focus-visible, .bill-tear .ui-tear-ticket__piece--stub:focus-visible { outline: 2px solid var(--bill-stamp); outline-offset: -4px; }
.bill-cut { width: 100%; height: 100%; background: var(--bill-img) calc(-9 * 10px) var(--bill-y) / 1070px 2080px no-repeat; }
.bill { --bill-img: url("../assets/invite/bill-light-paper.webp"); }
html[data-scheme="dark"] .bill { --bill-img: url("../assets/invite/bill-dark-paper.webp"); }
.bill[data-tear] > .bill-paper { clip-path: inset(0 0 calc((208 - 156) / 208 * 100%) 0); }
.bill[data-torn] > .bill-shadow { mask: linear-gradient(#000 calc(100% - (208 - 172) / 208 * 100%), transparent calc(100% - (208 - 181) / 208 * 100%)), linear-gradient(to right, transparent, #000 4%, #000 96%, transparent); mask-composite: intersect; }

/* the café only lives on the figure's side: it dissolves into clean paper where the copy sits */
.cafe-canvas {
  mask-image: linear-gradient(in oklch to right, transparent 0%, transparent 34%, #000 62%);
}
@media (width < 900px) {
  /* on phones the copy sits at the top: the room fades in below it */
  .cafe-canvas { mask-image: linear-gradient(in oklch to bottom, transparent 0%, transparent 38%, #000 62%); }
}

/* the intro hands over to the next section through colour, not an edge (art direction: one world) */
.intro-pin::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 22dvh; pointer-events: none; z-index: 1;
  background: linear-gradient(in oklch to bottom, transparent, var(--paper));
  opacity: var(--handover, 0); transition: opacity 0.3s linear;
}

/* the page never scrolls sideways: anything that briefly pokes past the edge (critter flights, tooltips, beams) is clipped, not scrollable */
html, body { overflow-x: clip; }

/* ---- invite, wide: the guest check laid out landscape (founder: "too vertical, make it wider"), 190 x 108 mm: the
   waiter's items on the left half, the long tip line, the total and the stamp on the right, the guest receipt as a
   strip behind a vertical perforation at 165 mm. Same live layer; only the zones (mm of paper) move. */
.invite:has(.bill--wide) { --bill-w: min(44rem, calc((100dvh - var(--bar-h) - 3.5rem) * 190 / 108)); }
.invite:has(.bill--wide) .invite-in { max-width: 76rem; }
@media (width >= 860px) { .invite:has(.bill--wide) .invite-in { grid-template-columns: minmax(14rem, 1fr) var(--bill-w); } }
.bill.bill--wide {
  --mm: calc(100cqi / 190); aspect-ratio: 190 / 108; rotate: -1deg;
  > picture { inset: calc(-9 / 108 * 100%) calc(-9 / 190 * 100%); }
  > .bill-paper { mask: linear-gradient(to right, #000 93%, transparent 99.5%); }
  > .bill-shadow { mask: linear-gradient(to right, transparent, #000 3%, #000 92%, transparent 99.5%), linear-gradient(to bottom, transparent, #000 5%, #000 95%, transparent); mask-composite: intersect; }
  .bill-label { --lab: max(12px, calc(3.6 * var(--mm))); left: calc(95.5 * var(--mm)); top: calc(42 * var(--mm) - var(--lab)); }
  .bill-tip { --tip-h: max(44px, calc(11.5 * var(--mm))); --pen: max(18px, calc(8.4 * var(--mm)));
    left: calc(88 * var(--mm)); width: calc(71 * var(--mm)); top: calc(56 * var(--mm) - var(--tip-h));
    input { padding-top: calc(var(--tip-h) - 2 * (1.6 * var(--mm) + 0.33 * var(--pen))); }
    input::placeholder { font-size: max(13px, calc(4.4 * var(--mm))); } }
  .bill-stamp { left: calc(122 * var(--mm)); top: calc(60 * var(--mm)); width: calc(37 * var(--mm)); height: calc(17 * var(--mm)); }
  .bill-stamp-ink { font-size: max(14px, calc(4.8 * var(--mm))); }
  .bill-note { left: calc(88 * var(--mm)); top: calc(83.6 * var(--mm)); width: calc(71 * var(--mm)); font-size: max(12px, calc(3.8 * var(--mm))); }
  --bill-img: url("../assets/invite/bill-wide-light-paper.webp");
}
html[data-scheme="dark"] .bill.bill--wide { --bill-img: url("../assets/invite/bill-wide-dark-paper.webp"); }
/* contrast on the rendered paper (≥ 4.5:1 measured on the pixels, both themes): the hint is printed semibold, not
   hairline; the stamp is inked densely (fewer speckle gaps) and a step deeper under basalt's lamp */
.bill .bill-note .wl-hint { font-weight: 600; letter-spacing: 0.015em; color: light-dark(oklch(0.34 0.06 168), oklch(0.17 0.04 155)); }
html[data-scheme="dark"] .bill { --bill-stamp: oklch(0.22 0.085 240); --bill-print: oklch(0.25 0.05 155); }
.bill.bill--wide > .bill-tear { top: 0; bottom: 0; left: calc(150 * var(--mm)); right: 0; }
.bill--wide .bill-cut { background: var(--bill-img) var(--bill-x) calc(-9 * 10px) / 2080px 1260px no-repeat; }
.bill.bill--wide[data-tear] > .bill-paper { clip-path: inset(0 calc((208 - 160) / 208 * 100%) 0 0); } /* 1 mm under the ticket: no hairline gap */
.bill.bill--wide[data-torn] > .bill-shadow { mask: linear-gradient(to right, transparent, #000 3%, #000 calc(174 / 208 * 100%), transparent calc(183 / 208 * 100%)), linear-gradient(to bottom, transparent, #000 5%, #000 95%, transparent); mask-composite: intersect; }

/* ---- sponsors and supporters (founder 2026-11-27): one Magic Card, Vivi says why, then the ask and two links */
.support { padding: clamp(3rem, 8dvh, 6rem) var(--inset, 5vw); display: grid; justify-items: center; }
.support-card {
  inline-size: min(100%, 60rem); padding: clamp(1.25rem, 3vw, 2.25rem);
  grid-template-columns: minmax(0, 18rem) minmax(0, 1fr); gap: clamp(1.25rem, 3vw, 2.5rem); align-items: start;
}
.support-says { display: flex; align-items: flex-start; gap: var(--ds-3); }
.support-orb { --orb-size: 40px; margin-top: 2px; }
.support-body { display: grid; gap: var(--ds-3); justify-items: start; }
.support-body h2 { margin: 0; font: var(--ds-title, 600 2rem/1.05 var(--font-display)); font-family: var(--font-display); font-weight: var(--display-wght, 500);
  font-size: clamp(1.8rem, 1.2rem + 1.6vw, 2.6rem); letter-spacing: var(--display-track, -0.02em); line-height: 1.02; text-wrap: balance; }
.support-body .ds-lead { max-inline-size: 52ch; }
.support-funds { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--ds-2); }
.support-actions { display: flex; flex-wrap: wrap; gap: var(--ds-3); margin-top: var(--ds-2); }
@media (width < 760px) { .support-card { grid-template-columns: minmax(0, 1fr); } }
.support-actions { align-items: center; }
.support-soon { color: var(--ink-3); }

/* the bar's Sponsor link (founder 2026-11-27): sits just before the invite pill, scrolls to the support card */
.bar-sponsor { margin-left: auto; display: inline-flex; align-items: center; text-decoration: none; white-space: nowrap; color: var(--ink-2); font: 500 0.85rem var(--font); min-height: max(var(--target), 2.25rem); padding: 0.4rem 0.6rem; border-radius: 8px; }
.bar-sponsor:hover { color: var(--ink); }
.bar-sponsor:focus-visible { outline: var(--ds-focus-w, 2px) solid var(--ds-focus-c, var(--accent)); outline-offset: 2px; }
.bar-sponsor + .bar-invite { margin-left: var(--ds-2, 8px); }

/* support card v2 (founder: "too text heavy"): one column, centred, few words; facts as chips, one action */
.support-card { inline-size: min(100%, 34rem); grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center;
  gap: var(--ds-4); padding: clamp(1.75rem, 4vw, 2.75rem) clamp(1.25rem, 4vw, 2.5rem); }
.support-says { margin: 0; display: inline-flex; align-items: center; gap: var(--ds-2); }
.support-says .ds-bubble { text-align: start; }
.support-orb { --orb-size: 32px; margin: 0; }
.support-card h2 { margin: 0; font-family: var(--font-display); font-weight: var(--display-wght, 500);
  font-size: clamp(2rem, 1.3rem + 2vw, 3rem); letter-spacing: var(--display-track, -0.02em); line-height: 1; }
.support-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--ds-2); }
.support-actions { margin-top: var(--ds-2); justify-content: center; }
.support-fine { margin: 0; font-size: 0.8rem; color: var(--ink-3); }
/* GitHub's official mark (Simple Icons drawing of github.com/logos, one colour, in the text colour) wherever GitHub is named */
.gh-mark { inline-size: 1.1em; block-size: 1.1em; flex: none; vertical-align: -0.15em; }
.support-soon { display: inline-flex; align-items: center; gap: 0.4em; }

/* the Sponsor popover (founder 2026-11-27): opens under the bar's button, grows out of it (origin top right) */
.bar-sponsor { border: 0; background: none; cursor: pointer; }
.sponsor-pop {
  position: fixed; inset: auto; top: calc(var(--bar-h) + 6px); right: var(--inset, 5vw); margin: 0;
  inline-size: min(26rem, calc(100vw - 2rem)); padding: 0; border: 0; background: none; color: inherit; overflow: visible;
  transform-origin: top right;
  opacity: 0; scale: 0.96; translate: 0 -6px;
  transition: opacity 180ms ease-out, scale 220ms cubic-bezier(.2,.8,.2,1), translate 220ms cubic-bezier(.2,.8,.2,1), display 220ms allow-discrete, overlay 220ms allow-discrete;
}
.sponsor-pop:popover-open { opacity: 1; scale: 1; translate: 0 0; }
@starting-style { .sponsor-pop:popover-open { opacity: 0; scale: 0.96; translate: 0 -6px; } }
@supports (position-anchor: --a) {
  .bar-sponsor { anchor-name: --sponsor; }
  .sponsor-pop { position-anchor: --sponsor; top: calc(anchor(bottom) + 8px); right: anchor(right); left: auto;
    position-try-fallbacks: flip-inline; }
}
.sponsor-pop .support-card { inline-size: 100%; background: var(--ds-surface-float); border: 1px solid var(--ds-border);
  box-shadow: 0 18px 50px oklch(0 0 0 / 0.35); padding: clamp(1.25rem, 3vw, 1.75rem); gap: var(--ds-3); }
.sponsor-pop .support-card h2 { font-size: clamp(1.6rem, 1.2rem + 1vw, 2rem); }
@media (prefers-reduced-motion: reduce) { .sponsor-pop { transition: none; } }
html[data-motion="off"] .sponsor-pop { transition: none; }
.bar-sponsor ~ .bar-invite { margin-left: var(--ds-2, 8px); }
.support-why { margin: 0; max-inline-size: 34ch; color: var(--ink-2); text-wrap: balance; }
