/* SPDX-License-Identifier: LicenseRef-PolyForm-Strict-1.0.0 */
/* sosumusic.app: the app's Material 3 Expressive language on the web. */

@font-face {
  font-family: 'Sosu Flex';
  src: url('sosu-flex.woff2') format('woff2');
  font-weight: 1 1000;
  font-stretch: 100% 112%;
  font-display: swap;
}

/* Every section of the site has its own vivid seed; the page is tinted with
   it and it fills every selected control, as each sample of
   m3e.c5inco.dev has its own. The rest of the palette is mixed from the seed
   in OKLCH (same hue, so nothing drifts), with neutral greys so each page
   keeps its colour. All text pairs pass WCAG AA in both themes. */
:root {
  color-scheme: light;
  --c-home: #8E4DFF; --on-c-home: #FFFFFF;
  --c-download: #B6F03C; --on-c-download: #162200;
  --c-support: #FF3D8B; --on-c-support: #33001A;
  --c-terms: #1DC4F2; --on-c-terms: #00212D;
  --c-lost: #FFB01F; --on-c-lost: #2C1B00;
  --seed: var(--c-home); --on-seed: var(--on-c-home);

  --bg: color-mix(in oklch, var(--seed) 15%, #FFFFFF);
  --container: color-mix(in oklch, var(--seed) 26%, #FFFFFF);
  --container-high: color-mix(in oklch, var(--seed) 36%, #FFFFFF);
  --frame: color-mix(in oklch, var(--seed) 20%, #FFFFFF);
  --screen: color-mix(in oklch, var(--seed) 6%, #FFFFFF);
  --deco: var(--seed);
  --primary: color-mix(in oklch, var(--seed) 58%, #000000); --on-primary: #FFFFFF;
  --primary-container: color-mix(in oklch, var(--seed) 32%, #FFFFFF);
  --on-primary-container: color-mix(in oklch, var(--seed) 45%, #000000);
  --secondary-container: #E9DEF8; --on-secondary-container: #4B4358;
  --tertiary-container: #FFD9E1; --on-tertiary-container: #643B46;
  --surface-lowest: #FFFFFF;
  --on-surface: color-mix(in oklch, var(--seed) 8%, #1C1C1C);
  --on-surface-variant: color-mix(in oklch, var(--seed) 14%, #484848);
  --outline-variant: color-mix(in oklch, var(--seed) 25%, #CACACA);
  --shadow: color-mix(in oklch, var(--seed) 30%, #0000004D);

  /* Motion: the app's Material 3 Expressive springs (mass 1), sampled as
     linear() curves. Each one is tuned for its duration:
     --bounce  750ms  damping .5, stiffness 380: shapes and icons, a real wobble.
     --spring  600ms  damping .68, stiffness 420: sizes, corners, layout.
     --fast    400ms  damping .6, stiffness 900: presses and small controls.
     --emph: effects (colour, opacity), which never overshoot. */
  --bounce: linear(0, 0.089, 0.295, 0.542, 0.773, 0.957, 1.081, 1.146, 1.163, 1.147, 1.113, 1.072, 1.035, 1.005, 0.986,
    0.976, 0.973, 0.976, 0.982, 0.989, 0.995, 0.999, 1.002, 1.004, 1.004, 1.004, 1 81%, 1);
  --spring: linear(0, 0.062, 0.205, 0.38, 0.555, 0.708, 0.833, 0.926, 0.989, 1.028, 1.048, 1.054, 1.052, 1.044, 1.035,
    1.026, 1.017, 1.01, 1.005, 1 59%, 1);
  --fast: linear(0, 0.06, 0.204, 0.384, 0.568, 0.734, 0.87, 0.97, 1.038, 1.077, 1.093, 1.093, 1.083, 1.067, 1.049, 1.032,
    1.018, 1.007, 0.999, 0.994, 0.992, 0.991, 0.992, 0.993, 0.995, 0.996, 1 81%, 1);
  --emph: cubic-bezier(.2, 0, 0, 1);
  --gutter: clamp(16px, 3vw, 32px);
  --max: 1180px;
}
.p-download { --seed: var(--c-download); --on-seed: var(--on-c-download); }
.p-support { --seed: var(--c-support); --on-seed: var(--on-c-support); }
.p-terms { --seed: var(--c-terms); --on-seed: var(--on-c-terms); }
.p-lost { --seed: var(--c-lost); --on-seed: var(--on-c-lost); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: color-mix(in oklch, var(--seed) 12%, #0F0F0F);
    --container: color-mix(in oklch, var(--seed) 22%, #161616);
    --container-high: color-mix(in oklch, var(--seed) 31%, #1A1A1A);
    --frame: color-mix(in oklch, var(--seed) 16%, #121212);
    --screen: color-mix(in oklch, var(--seed) 8%, #0F0F0F);
    --primary: color-mix(in oklch, var(--seed) 62%, #FFFFFF); --on-primary: #141414;
    --primary-container: color-mix(in oklch, var(--seed) 38%, #161616);
    --on-primary-container: color-mix(in oklch, var(--seed) 30%, #FFFFFF);
    --secondary-container: #4B4358; --on-secondary-container: #E9DEF8;
    --tertiary-container: #643B46; --on-tertiary-container: #FFD9E1;
    --surface-lowest: #0C0C0C;
    --on-surface: color-mix(in oklch, var(--seed) 6%, #EDEDED);
    --on-surface-variant: color-mix(in oklch, var(--seed) 12%, #C9C9C9);
    --outline-variant: color-mix(in oklch, var(--seed) 25%, #444444);
    --shadow: #00000080;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: color-mix(in oklch, var(--seed) 12%, #0F0F0F);
  --container: color-mix(in oklch, var(--seed) 22%, #161616);
  --container-high: color-mix(in oklch, var(--seed) 31%, #1A1A1A);
  --frame: color-mix(in oklch, var(--seed) 16%, #121212);
  --screen: color-mix(in oklch, var(--seed) 8%, #0F0F0F);
  --primary: color-mix(in oklch, var(--seed) 62%, #FFFFFF); --on-primary: #141414;
  --primary-container: color-mix(in oklch, var(--seed) 38%, #161616);
  --on-primary-container: color-mix(in oklch, var(--seed) 30%, #FFFFFF);
  --secondary-container: #4B4358; --on-secondary-container: #E9DEF8;
  --tertiary-container: #643B46; --on-tertiary-container: #FFD9E1;
  --surface-lowest: #0C0C0C;
  --on-surface: color-mix(in oklch, var(--seed) 6%, #EDEDED);
  --on-surface-variant: color-mix(in oklch, var(--seed) 12%, #C9C9C9);
  --outline-variant: color-mix(in oklch, var(--seed) 25%, #444444);
  --shadow: #00000080;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 110px; interpolate-size: allow-keywords;
  accent-color: var(--seed); caret-color: var(--seed); scrollbar-color: var(--outline-variant) var(--bg); }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--on-surface);
  font: 400 16px/1.6 'Sosu Flex', system-ui, -apple-system, 'Segoe UI', sans-serif;
  overflow-x: hidden; padding-bottom: 112px;
  transition: background-color 250ms var(--emph), color 250ms var(--emph);
}
::selection { background: var(--seed); color: var(--on-seed); }
img, svg { display: block; max-width: 100%; }
a { color: var(--primary); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 14px;
}
h1, h2, h3 { margin: 0; line-height: 1.1; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
.shell { width: 100%; max-width: var(--max); margin: 0 auto; padding: 20px var(--gutter) 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 30; padding: 10px 18px; border-radius: 99px;
  background: var(--seed); color: var(--on-seed); font-weight: 800; text-decoration: none; }
.skip:focus { top: 12px; }
.ic { width: 1em; height: 1em; flex: none; fill: currentColor; }
.nw { white-space: nowrap; }

/* Shapes from lib/ui/design/sosu_shapes.dart (shapes.css). */
.s-cookie { clip-path: var(--cookie9); }
.s-cookie12 { clip-path: var(--cookie12); }
.s-sunny { clip-path: var(--sunny); }
.s-flower { clip-path: var(--flower); }
.s-clover { clip-path: var(--clover4); }
.s-burst { clip-path: var(--soft-burst); }

/* ---------- Intro card: the site's header ---------- */
.intro-card { position: relative; overflow: hidden; isolation: isolate; border-radius: 32px; background: var(--container);
  padding: clamp(24px, 4vw, 36px) clamp(22px, 4vw, 40px) clamp(26px, 4vw, 40px); display: grid; gap: 14px; }
.mark { display: inline-flex; align-items: center; gap: 12px; color: var(--on-surface); text-decoration: none; justify-self: start; }
.mark img { width: 44px; height: 44px; transition: rotate 750ms var(--bounce), scale 750ms var(--bounce); }
.mark:hover img { rotate: -14deg; scale: 1.08; }
.mark:active img { scale: .9; transition-duration: 400ms; transition-timing-function: var(--fast); }
.wordmark { display: block; width: 96px; aspect-ratio: 365 / 174; background: currentColor;
  -webkit-mask: url('wordmark.svg') center / contain no-repeat; mask: url('wordmark.svg') center / contain no-repeat; }
.intro { font-size: clamp(17px, 1.7vw, 20px); color: var(--on-surface); max-width: 40em; }
.intro-deco { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.intro-deco i { position: absolute; display: block; aspect-ratio: 1; background: var(--deco);
  rotate: var(--turn, 0deg); transition: rotate 1.1s var(--bounce);
  animation: deco-spin 60s linear infinite, deco-bob 9s ease-in-out infinite; }
.intro-deco .d1 { width: 420px; right: -60px; top: -150px; opacity: .14; clip-path: var(--cookie9); }
.intro-deco .d2 { width: 180px; right: 300px; bottom: -90px; opacity: .1; clip-path: var(--flower); animation-duration: 80s, 11s;
  rotate: calc(var(--turn, 0deg) * -1); }
.intro-deco .d3 { width: 104px; right: 200px; top: 18px; opacity: .2; clip-path: var(--sunny); animation-direction: reverse, normal; animation-delay: 0s, -4s; }
@keyframes deco-spin { to { transform: rotate(360deg); } }
@keyframes deco-bob { 50% { translate: 0 10px; } }
@media (max-width: 640px) { .intro-deco .d2, .intro-deco .d3 { display: none; } .intro-deco .d1 { width: 260px; right: -110px; top: -110px; } }

/* ---------- Switcher: the floating, sticky navigation ---------- */
.switcher { position: sticky; top: 0; z-index: 20; display: flex; justify-content: center; padding: 12px 0 24px; margin-top: 12px; }
/* At rest the chips sit straight on the page; the glass track only shows up
   once it sticks to the top over scrolled content, and settles smaller. */
.switcher-track { display: flex; gap: 8px; padding: 8px; border-radius: 40px;
  background: color-mix(in srgb, var(--container) 0%, transparent);
  backdrop-filter: blur(0) saturate(1); -webkit-backdrop-filter: blur(0) saturate(1);
  box-shadow: 0 6px 24px transparent; max-width: 100%; transform-origin: 50% 0;
  transition: scale 600ms var(--spring), background-color 250ms var(--emph), box-shadow 250ms var(--emph),
    backdrop-filter 250ms var(--emph), -webkit-backdrop-filter 250ms var(--emph); }
.stuck .switcher-track { scale: .9; background: color-mix(in srgb, var(--container) 80%, transparent);
  backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: 0 10px 30px var(--shadow); }
.chip { display: inline-flex; align-items: center; gap: 10px; height: 60px; padding: 0 4px; border-radius: 32px;
  color: var(--on-surface); text-decoration: none; font-weight: 800; font-size: 16px; white-space: nowrap;
  transition: background-color 200ms var(--emph), padding 600ms var(--spring); }
.chip .icon { width: 52px; height: 52px; display: grid; place-items: center; font-size: 24px; background: var(--container-high);
  transition: background-color 200ms var(--emph), rotate 750ms var(--bounce), scale 400ms var(--fast); }
/* Over scrolled content the track's glass sits behind them: a step more seed
   keeps the icon shapes standing out from it. */
.stuck .chip:not([aria-current="page"]) .icon { background: color-mix(in oklch, var(--container-high), var(--seed) 22%); }
.chip:hover .icon { rotate: 40deg; }
.chip:hover .icon .ic { rotate: -40deg; }
.chip:active .icon { scale: .84; }
.chip .icon .ic { transition: rotate 750ms var(--bounce); }
.chip[aria-current="page"] { background: var(--seed); color: var(--on-seed); padding-right: 20px; }
.chip[aria-current="page"] .icon { background: color-mix(in srgb, #000 16%, transparent); }
.chip:not([aria-current="page"]) .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.chip:focus-visible { border-radius: 32px; }
/* Five chips on narrower screens: smaller steps so the track never overflows. */
@media (max-width: 560px) {
  .chip { height: 50px; font-size: 15px; }
  .chip .icon { width: 42px; height: 42px; font-size: 20px; }
}
@media (max-width: 440px) {
  .switcher-track { gap: 4px; padding: 6px; }
  .chip { height: 44px; gap: 6px; }
  .chip .icon { width: 36px; height: 36px; font-size: 18px; }
  .chip[aria-current="page"] { padding-right: 12px; }
}

/* ---------- Page title ---------- */
.page-title { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 22px; align-items: center; margin-bottom: clamp(28px, 5vw, 48px); }
.title-mark { width: 76px; height: 76px; display: grid; place-items: center; font-size: 34px; background: var(--seed); color: var(--on-seed);
  animation: pop-in 750ms var(--bounce) both, deco-spin 40s linear infinite; }
.title-mark .ic { animation: icon-in 750ms var(--bounce) 120ms both, deco-spin 40s linear infinite reverse; }
.page-title h1 { font-size: clamp(40px, 6.4vw, 64px); font-weight: 760; letter-spacing: -.035em; line-height: 1;
  font-stretch: 104%; font-variation-settings: 'opsz' 144; animation: stretch 750ms var(--bounce) 60ms both; }
.page-title > p, .page-title > .actions { animation: rise-x 600ms var(--spring) both; }
.page-title > p { animation-delay: 140ms; }
.page-title > .actions { animation-delay: 220ms; }
.page-title p { grid-column: 2; font-size: clamp(16px, 1.5vw, 18px); color: var(--on-surface-variant); max-width: 44em; }
.page-title p b { color: var(--on-surface); }
.page-title .actions { grid-column: 2; }
@media (max-width: 560px) {
  .page-title { grid-template-columns: 1fr; }
  .page-title p, .page-title .actions { grid-column: 1; }
  .title-mark { width: 64px; height: 64px; font-size: 28px; margin-bottom: 10px; }
}

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 22px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 48px; padding: 0 22px;
  border: 0; border-radius: 24px; font: inherit; font-weight: 800; font-size: 15px; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: border-radius 400ms var(--fast), scale 400ms var(--fast), background-color 200ms var(--emph); }
.btn:hover { border-radius: 16px; }
.btn:active { border-radius: 10px; scale: .95; }
.btn .ic { font-size: 20px; transition: translate 750ms var(--bounce), rotate 750ms var(--bounce); }
.btn:hover .ic { translate: 0 3px; }
.btn-lg { height: 56px; padding: 0 26px; font-size: 16px; border-radius: 28px; }
.btn-lg:hover { border-radius: 18px; }
.btn-lg:active { border-radius: 12px; }
.btn-accent { background: var(--seed); color: var(--on-seed); }
.btn-tonal { background: var(--container-high); color: var(--on-surface); }
.meta { font-size: 14px; font-weight: 700; color: var(--on-surface-variant); }

/* ---------- Sections ---------- */
.section { margin-top: clamp(40px, 6vw, 72px); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 4px 24px; margin-bottom: 18px; }
.section-head h2 { font-size: 24px; font-weight: 650; letter-spacing: -.01em; }
.section-head p { font-size: 14px; color: var(--on-surface-variant); }

/* ---------- Samples: the app's own screens, in miniature ---------- */
/* Each screen is drawn like the app draws it (lib/ui): the player tinted by
   its cover, the stats panel, a Sosumen slide and the Spot panel. They are
   sized in em on a 24em-wide screen, so the whole screen scales with its
   column like a screenshot would. */
.frames { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 16px 14px; }
.frames figure { margin: 0; }
.frame { border-radius: 32px; background: var(--frame); padding: 10px; transition: border-radius 600ms var(--spring), background-color 300ms var(--emph); }
.frame:hover { border-radius: 48px; background: var(--container-high); }
/* Every screen has the same phone-like proportion, so the row lines up. */
.screen { position: relative; border-radius: 24px; aspect-ratio: 5 / 8; overflow: hidden; container-type: inline-size;
  background: #14141C; box-shadow: 0 18px 36px -24px var(--shadow); transition: border-radius 600ms var(--spring); }
.frame:hover .screen { border-radius: 40px; }
.frames figcaption { margin: 12px 6px 0; font-size: 15.5px; line-height: 1.45; color: var(--on-surface-variant); }
.frames figcaption b { color: var(--on-surface); font-weight: 800; }

.app { position: absolute; inset: 0; display: flex; flex-direction: column; overflow: hidden;
  font-size: 10.5px; font-size: calc(100cqi / 24); line-height: 1.3; color: var(--a-fg);
  font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; -webkit-user-select: none; user-select: none; }
.app .ic { width: 1em; height: 1em; }
.app b { font-weight: 800; }
.app img { display: block; object-fit: cover; }
/* Off screen, everything holds still (site.js marks the visible ones). */
.js .app:not(.live), .js .app:not(.live) *, .js .app:not(.live) *::before, .js .app:not(.live) *::after { animation-play-state: paused !important; }

/* Now playing: colours taken from the cover, as the app's dynamic theme does. */
.app-player { --a-fg: #F6EFFF; --a-fg2: #F6EFFFA3; --a-primary: #FFB98E; --a-on-primary: #3D1A04; --a-tonal: #FFFFFF17;
  padding: 1.3em 1.5em 1.5em;
  background: radial-gradient(140% 62% at 50% 22%, #4C2D60 0%, #221C4B 52%, #100F29 100%); }
.np-top { display: flex; align-items: center; justify-content: space-between; font-size: .8em; font-weight: 800; color: var(--a-fg2); }
.np-top .ic { width: 1.4em; height: 1.4em; }
.np-cover { width: 100%; aspect-ratio: 1; height: auto; margin-top: 1em; border-radius: 1.5em;
  box-shadow: 0 1.2em 2.4em -1em #000A, 0 0 0 1px #FFFFFF0F; }
.np-meta { display: flex; align-items: center; justify-content: space-between; gap: .8em; margin-top: 1.2em; }
.np-meta b { display: block; font-size: 1.65em; font-weight: 850; line-height: 1.1; letter-spacing: -.02em; }
.np-meta span { display: block; margin-top: .15em; font-size: .95em; font-weight: 650; color: var(--a-fg2); }
.np-like { width: 1.5em !important; height: 1.5em !important; color: var(--a-primary); flex: none; }
/* The app's wavy seek bar: the played part waves, the rest is a flat track. */
.np-seek { position: relative; height: 1.1em; margin-top: 1em; }
.app-player, .app-spot { --p: .326; }
.np-seek i { position: absolute; display: block; }
.np-wave { left: 0; top: 0; bottom: 0; width: calc(var(--p) * 100% - .5em); background: var(--a-primary);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='16' viewBox='0 0 24 16' preserveAspectRatio='none'%3E%3Cpath d='M-12 8q6-6 12 0t12 0 12 0 12 0' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round'/%3E%3C/svg%3E") 0 50% / 1.5em 100% repeat-x;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='16' viewBox='0 0 24 16' preserveAspectRatio='none'%3E%3Cpath d='M-12 8q6-6 12 0t12 0 12 0 12 0' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round'/%3E%3C/svg%3E") 0 50% / 1.5em 100% repeat-x;
  animation: np-wave 1.3s linear infinite; transition: width 1s linear; }
@keyframes np-wave { to { -webkit-mask-position: -1.5em 50%; mask-position: -1.5em 50%; } }
.np-thumb { left: calc(var(--p) * 100% - .15em); top: 0; bottom: 0; width: .3em; border-radius: .15em; background: var(--a-primary); transition: left 1s linear; }
.np-rest { left: calc(var(--p) * 100% + .5em); right: 0; top: 50%; height: .3em; margin-top: -.15em; border-radius: .15em; background: #FFFFFF2E; transition: left 1s linear; }
.np-times { display: flex; align-items: center; justify-content: space-between; margin-top: .45em; font-size: .76em; font-weight: 700; color: var(--a-fg2); }
.np-format { display: inline-flex; align-items: center; gap: .4em; padding: .3em .75em; border-radius: 99em;
  background: #FFB98E26; color: var(--a-primary); font-size: .92em; font-weight: 800; }
.np-controls { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.np-controls > span { display: grid; place-items: center; width: 3.1em; height: 3.1em; color: var(--a-fg); }
.np-controls .ic { width: 1.5em; height: 1.5em; }
.np-sq { border-radius: .95em; background: var(--a-tonal); }
.np-sq .ic { width: 1.2em; height: 1.2em; }
.np-controls .np-play { position: relative; width: 4.6em; height: 4.6em; color: var(--a-on-primary); }
.np-play::before { content: ''; position: absolute; inset: 0; background: var(--a-primary); clip-path: var(--cookie9);
  animation: deco-spin 16s linear infinite; transition: scale 750ms var(--bounce); }
.frame:hover .np-play::before { scale: 1.08; }
.np-controls .np-play .ic { position: relative; width: 1.75em; height: 1.75em; }

/* Listening clock: the stats panel, drawn as _ClockPainter draws it. */
.app-stats { --a-fg: #E9EEDF; --a-fg2: #E9EEDF9C; --a-primary: #C4EE7E; --a-tonal: #FFFFFF0D;
  padding: 1.5em 1.4em 1.4em; background: linear-gradient(#272E22, #1C2118); }
.st-head { display: flex; align-items: center; gap: .8em; }
.st-icon { flex: none; display: grid; place-items: center; width: 2.5em; height: 2.5em; border-radius: .8em; background: #C4EE7E1F; color: var(--a-primary); }
.st-icon .ic { width: 1.25em; height: 1.25em; }
.st-head b { display: block; font-size: 1.12em; line-height: 1.15; }
.st-head span { display: block; margin-top: .1em; font-size: .78em; font-weight: 600; color: var(--a-fg2); }
.dial { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; margin: .3em -.4em .5em; }
.dial-svg { width: auto; height: 100%; max-width: 100%; aspect-ratio: 1; overflow: visible; }
.dial-ring { fill: none; stroke: #FFFFFF12; stroke-width: .8; }
.dial-core { fill: #FFFFFF0D; }
.spoke { stroke: var(--a-primary); stroke-linecap: round; stroke-dasharray: 1 2; }
.spoke.off { stroke: #FFFFFF1C; }
.spoke.peak { filter: drop-shadow(0 0 2.5px #C4EE7EAA); }
.dial-hours text { fill: var(--a-fg2); font-size: 10px; font-weight: 800; text-anchor: middle; dominant-baseline: central; }
.dial-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.dial-center b { font-size: 1.85em; font-weight: 900; line-height: 1; letter-spacing: -.02em; }
.dial-center span { margin-top: .3em; font-size: .64em; font-weight: 650; color: var(--a-fg2); }
/* The spokes grow around the dial once it comes into view. */
.js .app-stats.go .spoke { animation: spoke 900ms var(--spring) calc(var(--i, 0) * 30ms + 100ms) both; }
/* Drawn from the centre out (stroke-dashoffset: Chrome can leave an SVG line
   unpainted after a scale animation ends). */
@keyframes spoke { from { stroke-dashoffset: 1; } }
.st-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: .6em; }
.st-tile { display: grid; gap: .1em; padding: .85em .9em .8em; border-radius: 1.1em; background: var(--a-tonal); }
.st-tile span { display: flex; align-items: center; gap: .4em; font-size: .72em; font-weight: 800; color: var(--a-fg2); }
.st-tile span .ic { width: 1.2em; height: 1.2em; color: var(--a-primary); }
.st-tile b { margin-top: .25em; font-size: 1.28em; font-weight: 900; letter-spacing: -.02em; white-space: nowrap; }
.st-tile small { font-size: .68em; font-weight: 600; color: var(--a-fg2); }
.st-hot { background: #1F5A31; }
.st-hot b { color: var(--a-primary); }

/* Sosumen: the "artist of the month" slide of lib/ui/stats/sosumen_slides.dart,
   with its palette, drifting shapes and vignette, playing like a story. */
.app-story { --s-from: #0A2E2F; --s-to: #138A7E; --s-accent: #C7F9CC; --a-fg: #FFFFFF; --a-fg2: #FFFFFFB8;
  isolation: isolate; padding: 1.1em 1.5em 1.5em; background: linear-gradient(155deg, var(--s-from) 10%, var(--s-to)); }
.app-story::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(110% 75% at 50% 40%, transparent 45%, #00000059); }
.story-bg { position: absolute; inset: 0; z-index: -1; }
.story-bg i { position: absolute; display: block; aspect-ratio: 1; background: #FFFFFF0F;
  animation: deco-spin 90s linear infinite, story-float 11s ease-in-out infinite alternate; }
.story-bg i:nth-child(1) { width: 83cqi; left: 45.5%; top: calc(13.5% - 41.5cqi); clip-path: var(--sunny); }
.story-bg i:nth-child(2) { width: 57cqi; left: -17.5%; top: calc(81% - 28.5cqi); clip-path: var(--cookie12); background: #C7F9CC1A;
  animation-direction: reverse, alternate; animation-duration: 120s, 13s; }
.story-bg i:nth-child(3) { width: 39cqi; left: 71.5%; top: calc(88.5% - 19.5cqi); clip-path: var(--cookie9); animation-delay: 0s, -5s; }
@keyframes story-float { to { translate: 3cqi -4cqi; } }
.story-bars { display: flex; gap: .3em; }
.story-bars i { position: relative; flex: 1; height: .22em; border-radius: 1em; overflow: hidden; background: #FFFFFF4D; }
.story-bars .done { background: #FFFFFF; }
.story-bars .now::after { content: ''; position: absolute; inset: 0; background: #FFFFFF; transform-origin: left; scale: .5 1; }
.js .app-story.go .story-bars .now::after { animation: story-bar 7s linear both; }
@keyframes story-bar { from { scale: 0 1; } to { scale: 1 1; } }
.story { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; margin-top: 1.5em; transition: opacity 250ms var(--emph); }
.app-story.out .story { opacity: 0; }
.story-kicker { align-self: flex-start; font-size: .6em; font-weight: 900; letter-spacing: .22em; text-transform: uppercase; color: var(--a-fg2); }
.story-title { align-self: flex-start; margin-top: .3em; font-size: 1.45em; font-weight: 900 !important; letter-spacing: -.01em; }
.story-photo { width: 11em; height: 11em; margin-top: 1.1em; border-radius: 50%; box-shadow: 0 1em 2em -.6em #0009; }
.story-name { margin-top: .5em; font-size: 2.05em; font-weight: 950 !important; line-height: 1; letter-spacing: -.03em; font-stretch: 108%; }
.story-sub { margin-top: .35em; font-size: .88em; font-weight: 700; color: var(--a-fg2); }
.story-pill { margin-top: .75em; padding: .5em 1.1em; border-radius: 99em; background: var(--s-accent); color: var(--s-from); font-size: .76em; font-weight: 900; }
.story-list { list-style: none; width: 100%; margin: auto 0 0; padding: 0; display: grid; gap: .55em; text-align: left; }
.story-list li { display: flex; align-items: center; gap: .7em; }
.story-list .rk { width: 1em; text-align: center; font-size: 1.05em; font-weight: 900; color: var(--s-accent); }
.story-list img { width: 2.3em; height: 2.3em; border-radius: 50%; box-shadow: 0 .3em .8em -.3em #0009; }
.story-list b { display: block; font-size: .86em; line-height: 1.2; }
.story-list small { display: block; font-size: .68em; font-weight: 600; color: var(--a-fg2); }
/* Like the viewer: each element comes in a beat after the one before. */
.js .app-story.go .story > *, .js .app-story.go .story-list li { animation: story-in 700ms var(--spring) both; }
.js .app-story.go .story-photo { animation: story-pop 750ms var(--bounce) 160ms both; }
.js .app-story.go .story > :nth-child(2) { animation-delay: 70ms; }
.js .app-story.go .story > :nth-child(4) { animation-delay: 260ms; }
.js .app-story.go .story > :nth-child(5) { animation-delay: 320ms; }
.js .app-story.go .story > :nth-child(6) { animation-delay: 390ms; }
.js .app-story.go .story > :nth-child(7) { animation: none; }
.js .app-story.go .story-list li:nth-child(1) { animation-delay: 470ms; }
.js .app-story.go .story-list li:nth-child(2) { animation-delay: 540ms; }
.js .app-story.go .story-list li:nth-child(3) { animation-delay: 610ms; }
@keyframes story-in { from { opacity: 0; translate: 0 1.6em; } }
@keyframes story-pop { from { opacity: 0; scale: .6; } }

/* Spot: the panel the app shows while you host one. */
.app-spot { --a-fg: #EEF2FA; --a-fg2: #EEF2FA9E; --a-primary: #ADC8FF; --a-on-primary: #0B2A5C; --a-tonal: #FFFFFF12;
  padding: 1.3em 1.4em 1.4em; background: linear-gradient(172deg, #3A5075 0%, #243150 48%, #151B2B 100%); }
.sp-pill { align-self: center; display: inline-flex; align-items: center; gap: .5em; padding: .4em .75em .4em .7em; border-radius: 99em;
  background: #0A0F1A99; font-size: .74em; font-weight: 800; }
.sp-pill .ic { width: 1.1em; height: 1.1em; color: var(--a-fg2); }
.sp-live { width: .5em; height: .5em; border-radius: 50%; background: #FF5D62; animation: live 1.6s var(--bounce) infinite; }
.sp-stack { display: flex; }
.sp-stack .av { width: 1.9em; height: 1.9em; font-size: .62em; box-shadow: 0 0 0 .2em #182033; }
.sp-stack .av + .av { margin-left: -.5em; }
.sp-head { margin-top: 1.15em; }
.sp-head b { display: block; font-size: 1.35em; }
.sp-head span { display: block; font-size: .78em; font-weight: 600; color: var(--a-fg2); }
.sp-invite { margin-top: .85em; padding: .95em; border-radius: 1.1em; background: #0A0F1A6B; }
.sp-invite > b { display: block; font-size: .92em; }
.sp-invite > span { display: block; margin-top: .2em; font-size: .68em; line-height: 1.35; color: var(--a-fg2); }
.sp-link { display: flex; align-items: center; justify-content: space-between; gap: .4em; margin-top: .75em; padding: .3em .3em .3em .8em;
  border-radius: 99em; background: #00000059; font-size: .7em; font-weight: 800; white-space: nowrap; }
.sp-link > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--a-fg2); }
.sp-link > span:first-child b { color: var(--a-fg); }
.sp-copy { display: grid; flex: none; }
.sp-copy > span { grid-area: 1 / 1; display: inline-flex; align-items: center; justify-content: center; gap: .35em; padding: .5em .85em;
  border-radius: 99em; background: var(--a-primary); color: var(--a-on-primary);
  transition: opacity 200ms var(--emph), scale 400ms var(--fast); }
.sp-copy .ic { width: 1.15em; height: 1.15em; }
.sp-copy-b { opacity: 0; scale: .8; }
.frame:hover .sp-copy-a { opacity: 0; scale: .8; }
.frame:hover .sp-copy-b { opacity: 1; scale: 1; }
.sp-people { list-style: none; margin: .95em 0 1em; padding: 0 .1em; display: grid; gap: .75em; }
.sp-people li { display: flex; align-items: center; gap: .75em; }
.sp-people li > span:nth-child(2) { flex: 1; min-width: 0; }
.sp-people b { display: block; font-size: .86em; line-height: 1.2; }
.sp-people small { display: block; font-size: .7em; font-weight: 600; color: var(--a-fg2); }
.app .av { position: relative; flex: none; display: grid; place-items: center; width: 2.4em; height: 2.4em; border-radius: 50%;
  font-size: .95em; font-weight: 900; font-style: normal; }
.av1 { background: linear-gradient(140deg, #FFC27A, #F06A5A); color: #3A0E00; }
.av2 { background: linear-gradient(140deg, #8DE8CB, #2E9C8F); color: #00261F; }
.av3 { background: linear-gradient(140deg, #D4B6FF, #7B5CF0); color: #1B0A4A; }
.sp-crown { position: absolute; right: -.25em; bottom: -.2em; display: grid; place-items: center; width: 1.25em; height: 1.25em; border-radius: 50%;
  background: var(--a-primary); color: var(--a-on-primary); box-shadow: 0 0 0 .16em #1E2943; }
.sp-crown .ic { width: .72em !important; height: .72em !important; }
.sp-free .av { border: .12em dashed #FFFFFF52; color: var(--a-fg2); }
.sp-free .av .ic { width: 1.1em; height: 1.1em; }
.sp-free small { font-size: .78em !important; }
/* Everyone's bars move together: the same song at the same moment. */
.sp-eq { display: flex; align-items: flex-end; gap: .16em; height: 1.05em; }
.sp-eq i { width: .22em; height: 100%; border-radius: .11em; background: var(--a-primary); transform-origin: bottom;
  animation: sp-eq 1.2s ease-in-out infinite; }
.sp-eq i:nth-child(2) { animation-delay: -.45s; animation-duration: .9s; }
.sp-eq i:nth-child(3) { animation-delay: -.8s; animation-duration: 1.05s; }
.sp-now { position: relative; display: flex; align-items: center; gap: .75em; margin-top: auto; padding: .7em .8em .9em .7em;
  border-radius: 1.1em; background: #0A0F1A6B; overflow: hidden; }
.sp-now img { width: 2.8em; height: 2.8em; border-radius: .7em; }
.sp-now > span:nth-child(2) { flex: 1; min-width: 0; }
.sp-now b { display: block; font-size: .86em; line-height: 1.2; }
.sp-now small { display: block; font-size: .7em; font-weight: 600; color: var(--a-fg2); }
.sp-now .sp-sync { display: inline-flex; align-items: center; gap: .3em; padding: .3em .65em; border-radius: 99em; background: #ADC8FF26;
  color: var(--a-primary); font-size: .66em; font-weight: 800; white-space: nowrap; }
.sp-now .sp-sync .ic { width: 1.1em; height: 1.1em; }
.sp-now > i { position: absolute; left: .8em; right: .8em; bottom: .35em; height: .18em; border-radius: 1em; background: #FFFFFF1F; }
.sp-now > i::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: var(--a-primary);
  transform-origin: left; scale: var(--p) 1; transition: scale 1s linear; }
@keyframes sp-eq { 0%, 100% { scale: 1 .3; } 50% { scale: 1 1; } }
@keyframes live { 0%, 60%, 100% { scale: 1; } 30% { scale: 1.5; } }

/* ---------- Feature list and specifications ---------- */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 0 32px; margin: 0; }
.features div { padding: 18px 0 20px; border-top: 1px solid var(--outline-variant); }
.features dt { font-size: 17px; font-weight: 800; margin-bottom: 4px; }
.features dd { margin: 0; color: var(--on-surface-variant); }

.specs { margin: 0; border-radius: 32px; background: var(--container); padding: 10px; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 4px; }
.specs div { padding: 16px 18px; border-radius: 22px; background: var(--frame);
  transition: border-radius 600ms var(--spring), background-color 300ms var(--emph); }
.specs div:hover { border-radius: 34px; background: var(--container-high); }
.specs dt { font-size: 13px; font-weight: 800; color: var(--on-surface-variant); margin-bottom: 4px; }
.specs dd { margin: 0; font-weight: 700; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.swatch { width: 22px; height: 22px; clip-path: var(--cookie9); background: var(--seed); flex: none; transition: rotate 750ms var(--bounce), scale 750ms var(--bounce); }
.specs div:hover .swatch { rotate: 120deg; scale: 1.3; }

/* ---------- Download ---------- */
.dl { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 14px; }
@media (max-width: 820px) { .dl { grid-template-columns: 1fr; } }
.dl-main { border-radius: 32px; padding: clamp(24px, 4vw, 40px); background: var(--container); transition: border-radius 600ms var(--spring); }
.dl-main:hover { border-radius: 44px; }
.dl-main .os { display: flex; align-items: center; gap: 16px; }
.dl-main .os .shape { width: 68px; height: 68px; font-size: 32px; display: grid; place-items: center; background: var(--container-high); color: var(--on-surface);
  transition: rotate 750ms var(--bounce), scale 750ms var(--bounce); }
.dl-main .os .shape .ic { transition: rotate 750ms var(--bounce); }
.dl-main:hover .os .shape { rotate: 60deg; scale: 1.06; }
.dl-main:hover .os .shape .ic { rotate: -60deg; }
.dl-main h2 { font-size: 28px; font-weight: 760; letter-spacing: -.02em; font-stretch: 104%; }
.dl-main .ver { font-size: 14px; font-weight: 700; color: var(--on-surface-variant); }
.soon { display: none; margin-top: 20px; padding: 16px 18px; border-radius: 22px; background: var(--tertiary-container); color: var(--on-tertiary-container); font-weight: 600; }
.soon a { color: inherit; }
.soon b { display: block; font-weight: 800; }
#pronto:target { display: block; animation: rise 750ms var(--bounce) both; }
.req { border-radius: 32px; padding: 10px; background: var(--container); display: grid; gap: 4px; align-content: start; }
.req h3 { font-size: 17px; font-weight: 800; padding: 12px 14px 6px; }
.req dl { margin: 0; display: grid; gap: 4px; }
.req dl div { padding: 12px 16px; border-radius: 20px; background: var(--frame); transition: border-radius 600ms var(--spring); }
.req dl div:hover { border-radius: 30px; }
.req dt { font-size: 12.5px; font-weight: 800; color: var(--on-surface-variant); }
.req dd { margin: 0; font-weight: 700; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 14px; }
.steps li { counter-increment: s; padding: 22px; border-radius: 32px; background: var(--container);
  transition: border-radius 600ms var(--spring), background-color 300ms var(--emph); }
.steps li:hover { border-radius: 48px; background: var(--container-high); }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 14px;
  clip-path: var(--cookie9); background: var(--seed); color: var(--on-seed); font-size: 20px; font-weight: 900;
  transition: scale 750ms var(--bounce), rotate 750ms var(--bounce); }
.steps li:hover::before { scale: 1.18; rotate: 20deg; }
.steps b { display: block; font-size: 18px; margin-bottom: 4px; }
.steps span { color: var(--on-surface-variant); }

/* ---------- Support ---------- */
.channels { list-style: none; margin: 0; padding: 10px; border-radius: 32px; background: var(--container); display: grid; gap: 4px; }
.channels a { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 32px; padding: 18px 22px; border-radius: 22px; background: var(--frame);
  color: var(--on-surface); text-decoration: none;
  transition: background-color 200ms var(--emph), border-radius 600ms var(--spring), scale 400ms var(--fast); }
.channels a:hover { background: var(--container-high); border-radius: 34px; }
.channels a:active { scale: .98; }
.ch-what { display: grid; gap: 2px; flex: 1 1 260px; }
.ch-what b { font-size: 17px; }
.ch-what span { color: var(--on-surface-variant); }
.ch-addr { display: inline-flex; align-items: center; gap: 10px; color: var(--primary); font-weight: 800; overflow-wrap: anywhere; }
.ch-addr .ic { font-size: 18px; transition: translate 750ms var(--bounce); }
.channels a:hover .ch-addr .ic { translate: 6px 0; }
.faq { display: grid; gap: 6px; max-width: 880px; }
.faq details { border-radius: 24px; background: var(--container); transition: border-radius 600ms var(--spring), background-color 300ms var(--emph); }
.faq details:not([open]):hover { border-radius: 32px; }
/* The answer opens and closes on a spring (where ::details-content exists). */
.faq details::details-content { block-size: 0; overflow: hidden;
  transition: block-size 600ms var(--spring), content-visibility 600ms allow-discrete; }
.faq details[open]::details-content { block-size: auto; }
.faq details[open] { border-radius: 32px; background: var(--container-high); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 16px; padding: 18px 22px; font-size: 17px; font-weight: 800; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; margin-left: auto; flex: none; width: 32px; height: 32px; border-radius: 50%;
  background-color: var(--frame); background-position: center; background-repeat: no-repeat;
  background-image: linear-gradient(var(--on-surface), var(--on-surface)), linear-gradient(var(--on-surface), var(--on-surface));
  background-size: 14px 2.5px, 2.5px 14px;
  transition: rotate 750ms var(--bounce), border-radius 600ms var(--spring), background-color 200ms var(--emph), scale 400ms var(--fast); }
.faq summary:active::after { scale: .85; }
.faq details[open] summary::after { rotate: 135deg; border-radius: 10px; background-color: var(--seed);
  background-image: linear-gradient(var(--on-seed), var(--on-seed)), linear-gradient(var(--on-seed), var(--on-seed)); }
.faq .a { padding: 0 22px 20px; color: var(--on-surface-variant); }
.faq .a p + p { margin-top: 10px; }

/* ---------- Legal ---------- */
.legal { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
@media (max-width: 880px) { .legal { grid-template-columns: 1fr; } }
.toc { position: sticky; top: 110px; padding: 10px; border-radius: 28px; background: var(--container); }
.toc b { display: block; font-size: 14px; font-weight: 800; color: var(--on-surface-variant); margin: 8px 12px 6px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.toc a { display: block; padding: 7px 12px; border-radius: 8px; color: var(--on-surface); text-decoration: none; font-size: 14.5px; font-weight: 600;
  transition: border-radius 400ms var(--fast), background-color 200ms var(--emph), translate 750ms var(--bounce); }
.toc a:hover { background: var(--frame); border-radius: 18px; translate: 4px 0; }
@media (max-width: 880px) { .toc { position: static; } }
.prose { max-width: 68ch; }
.prose section { padding-bottom: 12px; }
.prose h2 { font-size: 24px; font-weight: 650; letter-spacing: -.01em; margin: 34px 0 12px; display: flex; gap: 12px; align-items: baseline; }
.prose h2 .n { color: var(--primary); font-variant-numeric: tabular-nums; }
.prose section:first-child h2 { margin-top: 0; }
.prose p, .prose li { color: var(--on-surface-variant); }
.prose p + p { margin-top: 12px; }
.prose ul { padding-left: 22px; margin: 12px 0 0; display: grid; gap: 6px; }
.prose strong { color: var(--on-surface); }
.note { margin-bottom: 28px; padding: 18px 20px; border-radius: 24px; background: var(--container); color: var(--on-surface); }
.note p { color: inherit; }

/* ---------- Footer ---------- */
.foot { margin-top: clamp(48px, 8vw, 88px); border-radius: 32px; background: var(--container); padding: clamp(24px, 4vw, 36px) clamp(22px, 4vw, 40px); }
.foot-top { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 28px; }
@media (max-width: 760px) { .foot-top { grid-template-columns: 1fr 1fr; } .foot-top > :first-child { grid-column: 1 / -1; } }
.foot p { color: var(--on-surface-variant); margin-top: 10px; max-width: 26em; font-size: 15px; }
.foot h2 { font-size: 14px; font-weight: 800; color: var(--on-surface-variant); margin-bottom: 10px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.foot ul a { color: var(--on-surface); text-decoration: none; font-weight: 600; overflow-wrap: anywhere; }
.foot ul a { display: inline-block; transition: translate 750ms var(--bounce), color 200ms var(--emph); }
.foot ul a:hover { color: var(--primary); text-decoration: underline; translate: 3px 0; }
.foot-bottom { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--outline-variant); display: flex; flex-wrap: wrap;
  justify-content: space-between; gap: 8px 24px; font-size: 13.5px; color: var(--on-surface-variant); }

/* ---------- Bottom toolbar ---------- */
.toolbar { position: fixed; left: 50%; bottom: 20px; translate: -50% 0; z-index: 25; display: flex; align-items: center; gap: 10px; padding: 8px;
  border-radius: 99px; background: color-mix(in srgb, var(--container) 80%, transparent);
  backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); box-shadow: 0 6px 24px var(--shadow);
  max-width: calc(100% - 24px); }
.toolbar .group { display: flex; gap: 2px; }
.toolbar .group button:not([aria-pressed="true"]):hover { border-radius: 18px; }
.toolbar button { display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 18px; border: 0; border-radius: 24px; cursor: pointer;
  background: var(--container-high); color: var(--on-surface); font: inherit; font-weight: 700; font-size: 15px;
  transition: background-color 200ms var(--emph), color 200ms var(--emph), border-radius 400ms var(--fast), scale 400ms var(--fast); }
.toolbar button:active { scale: .92; }
.toolbar button .ic { transition: rotate 750ms var(--bounce); }
.toolbar button[aria-pressed="true"] .ic { rotate: 45deg; }
.toolbar button[data-set-theme="dark"][aria-pressed="true"] .ic { rotate: -25deg; }
.toolbar .group button:first-child { border-radius: 24px 8px 8px 24px; }
.toolbar .group button:last-child { border-radius: 8px 24px 24px 8px; }
.toolbar button[aria-pressed="true"] { background: var(--seed); color: var(--on-seed); border-radius: 24px; }
.toolbar button .ic { font-size: 19px; }
@media (max-width: 420px) {
  .toolbar .t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .toolbar button { padding: 0 15px; }
}

/* ---------- 404 ---------- */
.lost { text-align: center; padding: clamp(24px, 6vw, 72px) 0; }
.lost .title-mark { margin: 0 auto 26px; width: 112px; height: 112px; font-size: 50px; }
.lost h1 { font-size: clamp(34px, 5vw, 54px); font-weight: 760; letter-spacing: -.03em; font-stretch: 104%; }
.lost p { margin: 12px auto 0; color: var(--on-surface-variant); font-size: 18px; max-width: 30em; }
.lost .actions { justify-content: center; }

/* ---------- Entrances ---------- */
@keyframes pop-in { from { scale: .3; opacity: 0; } }
@keyframes icon-in { from { scale: .4; opacity: 0; } }
@keyframes stretch { from { font-weight: 420; font-stretch: 100%; letter-spacing: -.01em; } }
@keyframes rise { from { opacity: 0; translate: 0 18px; } }
@keyframes rise-x { from { opacity: 0; translate: -22px 0; } }
@keyframes spring-in { from { opacity: 0; translate: 0 28px; scale: .94; } }
@keyframes spring-in-x { from { opacity: 0; translate: -36px 0; scale: .94; } }
@keyframes toolbar-in { from { translate: -50% 160%; } }
@keyframes deco-in { from { scale: 0; } }

/* Blocks spring in as they scroll into view (site.js adds .in, staggered by --d). */
@media screen and (prefers-reduced-motion: no-preference) {
  .js :is(.section-head, .frames figure, .features > div, .specs > div, .dl > *, .steps li, .channels li, .faq details,
    .note, .prose section, .lost):not(.in) { opacity: 0; }
}
.js .in { animation: spring-in 750ms var(--bounce) var(--d, 0ms) both; }
.js .in:is(.section-head, .prose section, .note) { animation-name: rise; animation-duration: 600ms; animation-timing-function: var(--spring); }
.js .in.no-anim { animation: none; }

/* Arriving from another site: the header, the switcher and the toolbar make an entrance. */
.fresh .intro-card { animation: spring-in 750ms var(--bounce) both; }
.fresh .intro-deco i { animation: deco-spin 60s linear infinite, deco-bob 9s ease-in-out infinite, deco-in 1.1s var(--bounce) 200ms both; }
.fresh .intro-deco .d2 { animation-duration: 80s, 11s, 1.1s; animation-delay: 0s, 0s, 320ms; }
.fresh .intro-deco .d3 { animation-direction: reverse, normal, normal; animation-delay: 0s, -4s, 440ms; }
.fresh .switcher-track { animation: spring-in-x 750ms var(--bounce) 120ms both; }
.fresh .toolbar { animation: toolbar-in 750ms var(--bounce) 350ms both; }

/* ---------- Between pages ---------- */
/* The header, switcher, chips, page mark and toolbar carry over and morph on
   a spring; the rest cross-fades. */
@view-transition { navigation: auto; }
.intro-card { view-transition-name: intro; }
.switcher-track { view-transition-name: switcher; }
.chip:nth-child(1) { view-transition-name: chip-1; }
.chip:nth-child(2) { view-transition-name: chip-2; }
.chip:nth-child(3) { view-transition-name: chip-3; }
.chip:nth-child(4) { view-transition-name: chip-4; }
.chip:nth-child(5) { view-transition-name: chip-5; }
.chip { view-transition-class: chip; }
.title-mark { view-transition-name: title-mark; }
.toolbar { view-transition-name: toolbar; }
::view-transition-group(*) { animation-duration: 600ms; animation-timing-function: var(--spring); }
::view-transition-group(title-mark) { animation-duration: 750ms; animation-timing-function: var(--bounce); }
::view-transition-old(*), ::view-transition-new(*) { animation-duration: 220ms; animation-timing-function: var(--emph); }
/* Chrome's default plus-lighter blend lets the old and new root cross-fade
   add light together, which glows and smears under the switcher's blurred
   glass. Normal blending keeps it a clean cut between pages. */
::view-transition-old(root), ::view-transition-new(root) { mix-blend-mode: normal; }
::view-transition-group(switcher), ::view-transition-group(toolbar) { z-index: 2; }
::view-transition-group(*.chip) { z-index: 3; }
/* The chip that becomes current widens to carry its label, and the one that
   stops being current narrows. By default each snapshot keeps its aspect
   ratio pinned to the top edge, so a widening chip also grew downwards and
   seemed to drop in from above. At natural size, pinned left and clipped to
   the pill, the colour slides out sideways like the chip itself. */
::view-transition-image-pair(*.chip) { overflow: clip; border-radius: 32px; }
::view-transition-old(*.chip), ::view-transition-new(*.chip) { height: 100%; object-fit: none; object-position: left center; }
/* The track's width follows the current label; stretch, don't scale down. */
::view-transition-old(switcher), ::view-transition-new(switcher) { height: 100%; }
/* A theme change is one circle spreading over the whole page (site.js). */
.theming, .theming * { view-transition-name: none !important; }
.theming::view-transition-old(root), .theming::view-transition-new(root) { animation: none; }
.theming::view-transition-group(root) { animation: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  @view-transition { navigation: none; }
}
