/* $ Focus: off-white editorial layout (giant grotesk + mono labels), light / dark via tokens.
   Theme: follows prefers-color-scheme; <html data-theme="light|dark"> (set before paint from localStorage "theme") overrides it. */
:root {
  --bg: #F4F4F2;
  --surface: #EAEAE6;
  --ink: #0A0A0A;
  --dim: #6B6B6B;
  --hair: #DADAD6;
  --hair2: #BDBDB8;
  --err: #B3412F;
  color-scheme: light;

  /* aliases used by page-level styles (confirmed, 404) and older rules */
  --fg: var(--ink);
  --muted: var(--dim);
  --faint: var(--dim);
  --line: var(--hair);
  --line-strong: var(--hair2);
  --panel: var(--surface);

  --mono: "Geist Mono", "Geist Mono Menlo", "Geist Mono Consolas", "Geist Mono Courier", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --grot: "Inter Tight", "Inter Tight Fallback", "Helvetica Neue", Arial, sans-serif;
  --gut: clamp(16px, 3vw, 40px);
  --max: 1440px;

  /* motion tokens */
  --duration-micro: 80ms;
  --duration-quick: 150ms;
  --duration-fast: 250ms;
  --duration-medium: 350ms;
  --duration-slow: 400ms;
  --ease-smooth-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: ease-in-out;
  --ease-out: ease-out;
  --scale-medium: 0.97;
  --scale-tiny: 0.99;
  --blur-small: 2px;
  --blur-medium: 3px;
  --distance-micro: 4px;
  --distance-base: 8px;
  interpolate-size: allow-keywords; /* lets <details> animate to height: auto */
}
/* metric-matched local fallbacks (measured against the web fonts) so the font swap barely moves the layout,
   the giant "$ FOCUS" hero especially. One face per local font because each needs its own numbers. */
@font-face { font-family: "Inter Tight Fallback"; font-weight: 600 900; src: local("Arial Bold"), local("Arial-BoldMT"); size-adjust: 96.9%; ascent-override: 100.1%; descent-override: 24.8%; line-gap-override: 0%; }
@font-face { font-family: "Geist Mono Menlo"; font-weight: 100 900; src: local("Menlo"), local("Menlo-Regular"); size-adjust: 99.6%; ascent-override: 101.4%; descent-override: 30.1%; line-gap-override: 0%; }
@font-face { font-family: "Geist Mono Consolas"; font-weight: 100 900; src: local("Consolas"); size-adjust: 109.1%; ascent-override: 92.6%; descent-override: 27.5%; line-gap-override: 0%; }
@font-face { font-family: "Geist Mono Courier"; font-weight: 100 900; src: local("Courier New"), local("CourierNewPSMT"); size-adjust: 100%; ascent-override: 101%; descent-override: 30%; line-gap-override: 0%; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121211; --surface: #1B1B1A; --ink: #F5F5F2; --dim: #8C8C89; --hair: #33332F; --hair2: #4A4A45; --err: #E0786A;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121211; --surface: #1B1B1A; --ink: #F5F5F2; --dim: #8C8C89; --hair: #33332F; --hair2: #4A4A45; --err: #E0786A;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); scroll-padding-top: 88px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 14.5px/1.7 var(--mono); -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
::selection { background: var(--ink); color: var(--bg); }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--hair2); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }
code { font: 0.92em var(--mono); background: var(--surface); border-radius: 6px; padding: 1px 6px; overflow-wrap: anywhere; }
strong { font-weight: 600; }
button { font: inherit; color: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 var(--gut); }
.page { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); }
.label { font: 500 12px/1.5 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); margin: 0; }
html.i18n-wait [data-i18n] { visibility: hidden; } /* i18n.js: VI text not swapped in yet */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- skip link, progress, back to top ---------- */
.skip {
  position: fixed; left: 12px; top: 12px; z-index: 60; padding: 10px 16px; border-radius: 999px;
  background: var(--ink); color: var(--bg); font: 500 12px var(--mono); text-transform: uppercase; text-decoration: none;
  transform: translateY(-160%);
}
.skip:focus { transform: none; }
.progress {
  position: fixed; left: 0; top: 0; z-index: 50; width: 100%; height: 2px; background: var(--ink);
  transform-origin: 0 50%; transform: scaleX(var(--p, 0)); pointer-events: none;
}
.totop {
  position: fixed; right: 16px; bottom: 16px; z-index: 40; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: var(--ink); color: var(--bg); font: 600 16px var(--mono); cursor: pointer;
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity var(--duration-fast) var(--ease-smooth-out), transform var(--duration-fast) var(--ease-smooth-out);
}
.totop.show { opacity: 1; transform: none; pointer-events: auto; }

/* ---------- sticky pill header ---------- */
header.site { position: sticky; top: 0; z-index: 30; padding: 12px var(--gut); pointer-events: none; }
.bar { max-width: var(--max); margin: 0 auto; display: flex; align-items: center; gap: 6px; }
.bar > * { pointer-events: auto; }
.bar .grow { flex: 1; pointer-events: none; }
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px;
  border: 0; border-radius: 999px; background: var(--surface); color: var(--ink); cursor: pointer;
  font: 500 12px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
  transition: background-color var(--duration-quick) var(--ease-smooth-out), color var(--duration-quick) var(--ease-smooth-out);
}
.pill.solid { background: var(--ink); color: var(--bg); }
.pill.logo { padding: 0 14px; font-weight: 600; }
.pill.logo img { width: 18px; height: 18px; border-radius: 4px; }
.pill.icon { width: 40px; padding: 0; font-size: 18px; }
.burger { display: inline-flex; flex-direction: column; gap: 3px; }
.burger i { display: block; width: 14px; height: 1.5px; background: currentColor; transition: transform var(--duration-fast) var(--ease-smooth-out); }
[aria-expanded="true"] .burger i:first-child { transform: translateY(2.25px) rotate(45deg); }
[aria-expanded="true"] .burger i:last-child { transform: translateY(-2.25px) rotate(-45deg); }
.lang { gap: 2px; padding: 0 6px; cursor: default; }
.lang i { font-style: normal; color: var(--dim); }
.lang button { border: 0; background: none; padding: 6px 7px; border-radius: 999px; cursor: pointer; font: inherit; letter-spacing: inherit; color: var(--dim); }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.menu-wrap { position: relative; }
.menu {
  position: absolute; left: 0; top: calc(100% + 6px); min-width: 220px; padding: 8px; border-radius: 20px;
  background: var(--surface); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  display: flex; flex-direction: column;
  transform-origin: 20px 0;
  /* closed: exit is quicker than the entrance; visibility flips after the fade so links leave the tab order */
  opacity: 0; transform: translateY(calc(-1 * var(--distance-micro))) scale(var(--scale-medium)); visibility: hidden; pointer-events: none;
  transition: opacity var(--duration-quick) var(--ease-smooth-out), transform var(--duration-quick) var(--ease-smooth-out), visibility 0s linear var(--duration-quick);
}
.menu.open { opacity: 1; transform: none; visibility: visible; pointer-events: auto; transition: opacity var(--duration-fast) var(--ease-smooth-out), transform var(--duration-fast) var(--ease-smooth-out), visibility 0s; }
.menu[hidden] { display: none; }
.menu a { padding: 10px 12px; border-radius: 12px; font: 500 12px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; transition: background-color var(--duration-quick) var(--ease-smooth-out); }
.menu a[aria-current="page"]::before { content: "> "; color: var(--dim); }
.menu .ext::after { content: " \2197"; }
.menu .only-sm { display: none; }

/* ---------- giant type ---------- */
.giant {
  margin: 0; font: 800 clamp(60px, 20.6vw, 312px)/0.86 var(--grot); letter-spacing: -0.055em;
  text-transform: uppercase; white-space: nowrap; color: var(--ink);
}
/* fills its container edge to edge: the "$ FOCUS" line is ~3.81em wide */
.hero, footer.site .page { container-type: inline-size; }
@supports (font-size: 1cqw) { .giant { font-size: 25.8cqw; } }

/* ---------- label / value rows ---------- */
.row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 12px 32px; padding: 22px 0; border-top: 1px solid var(--hair); }
.row > .label { padding-top: 3px; }
.row p { margin: 0 0 12px; }
.row p:last-child { margin-bottom: 0; }
.lede { font: 500 clamp(15px, 1.5vw, 20px)/1.45 var(--mono); text-transform: uppercase; letter-spacing: 0.01em; margin: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px;
  border: 1px solid var(--hair2); border-radius: 999px; background: transparent; cursor: pointer; color: var(--ink);
  font: 500 12px/1.2 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
  transition: background-color var(--duration-quick) var(--ease-smooth-out), color var(--duration-quick) var(--ease-smooth-out), border-color var(--duration-quick) var(--ease-smooth-out);
}
.btn.solid { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn[disabled] { opacity: 0.3; pointer-events: none; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.copy {
  margin-left: 6px; padding: 3px 10px; border: 1px solid var(--hair2); border-radius: 999px; background: none; cursor: pointer;
  font: 500 10.5px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; vertical-align: 1px; white-space: nowrap;
  transition: background-color var(--duration-quick) var(--ease-smooth-out), color var(--duration-quick) var(--ease-smooth-out), border-color var(--duration-quick) var(--ease-smooth-out);
}
.copy.ok { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.source { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.source code { font-size: 12px; }
.source .copy { margin: 0; }

/* ---------- home ---------- */
main.home { padding: 0 0 40px; }
.hero { padding: clamp(24px, 6vw, 72px) 0 0; }
.hero .giant { margin-bottom: clamp(24px, 4vw, 56px); }
.sec { padding-top: clamp(56px, 8vw, 120px); }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin: 0 0 20px; }
.sec-title { margin: 0; font: 800 clamp(40px, 7vw, 104px)/0.95 var(--grot); letter-spacing: -0.04em; }

/* showcase card: the live phone + timer + player */
.showcase { margin: 32px 0 0; }
.show {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 64px); align-items: center;
  padding: clamp(20px, 4vw, 56px); border-radius: 28px; background: var(--surface);
}
.cap { display: flex; justify-content: space-between; gap: 12px; padding: 12px 2px 0; font: 500 12px/1.5 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; }
.cap h3, .cap b { margin: 0; font: inherit; color: var(--ink); }
.cap span { color: var(--dim); white-space: nowrap; }
.demo { min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.mode { font: 500 12px var(--mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim); margin: 0; }
.mode b { color: var(--ink); font-weight: 600; }
.time {
  margin: 0; font: 800 clamp(72px, 11vw, 168px)/0.9 var(--grot); letter-spacing: -0.04em; font-variant-numeric: tabular-nums;
  cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; width: max-content; max-width: 100%;
}
.cursor { display: inline-block; width: 0.4em; height: 0.06em; margin-left: 0.06em; background: var(--ink); animation: blink 1.1s steps(1) infinite; }
.paused .cursor { animation: none; opacity: 0.35; }
.hint { font: 500 11px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); margin: 0; }
.caret { display: inline-block; width: 0.6em; height: 1.1em; background: var(--ink); vertical-align: -0.2em; margin-left: 2px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.term { border: 1px solid var(--hair); border-radius: 16px; background: var(--bg); text-align: left; font-size: 13px; overflow: hidden; }
.term-bar { display: flex; justify-content: space-between; gap: 12px; padding: 9px 16px; border-bottom: 1px solid var(--hair); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
.term-body { padding: 16px 18px 18px; }
.term-body p { margin: 0; line-height: 2; }
.term-body .k { color: var(--dim); }
.ctrls { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px 16px; }
.mini, .chip {
  padding: 6px 12px; border: 1px solid var(--hair2); border-radius: 999px; background: none; cursor: pointer;
  font: 500 10.5px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); white-space: nowrap;
  transition: background-color var(--duration-quick) var(--ease-smooth-out), color var(--duration-quick) var(--ease-smooth-out), border-color var(--duration-quick) var(--ease-smooth-out);
}
.chip[aria-checked="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* timer bars */
.meter { display: grid; grid-template-columns: 54px 1fr 50px; align-items: center; gap: 14px; }
.meter + .meter { margin-top: 12px; }
.meter .lbl { font-size: 10.5px; letter-spacing: 0.12em; color: var(--dim); }
.meter.on .lbl { color: var(--ink); }
.meter .track { height: 10px; border: 1px solid var(--hair2); border-radius: 999px; padding: 1px; overflow: hidden; }
.meter .fill { height: 100%; border-radius: 999px; background: var(--ink); clip-path: inset(0 100% 0 0); transition: clip-path var(--duration-slow) var(--ease-smooth-out); }
.meter.brk .fill { background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 5px); }
.meter .num { font-variant-numeric: tabular-nums; text-align: right; }
:lang(vi) .meter { grid-template-columns: 78px 1fr 50px; }

/* music player (player.js) */
.np-title, .np-artist, .np-up { transition: opacity var(--duration-quick) var(--ease-in-out), transform var(--duration-quick) var(--ease-in-out), filter var(--duration-quick) var(--ease-in-out); }
.np-title { font-size: 16px; }
.np-up { font-size: 11.5px; }
.mq { overflow: hidden; white-space: nowrap; }
.mq > span { display: block; overflow: hidden; text-overflow: ellipsis; }
.mq.run > span { display: inline-block; overflow: visible; text-overflow: clip; animation: mq var(--mq-t, 8s) var(--ease-in-out) infinite; }
/* hold, glide to the end, hold, glide back: each glide eases in and out, no snap */
@keyframes mq { 0%, 20% { transform: none; } 50%, 70% { transform: translateX(var(--mq-x, 0)); } 100% { transform: none; } }
.swap { opacity: 0; transform: translateY(var(--distance-micro)); filter: blur(var(--blur-small)); }
.np-bar { display: flex; align-items: center; gap: 10px; margin: 14px 0 12px; font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; }
.np-bar .track { flex: 1; height: 2px; background: var(--hair2); position: relative; }
.np-bar .track i { position: absolute; inset: 0; background: var(--ink); transform-origin: 0 50%; transform: scaleX(0); }
.np-ctl { display: flex; justify-content: center; gap: 18px; }
.np-ctl button { width: 46px; height: 38px; border: 1px solid transparent; border-radius: 999px; background: none; cursor: pointer; font-size: 15px; color: var(--dim); transition: color var(--duration-quick) var(--ease-smooth-out), border-color var(--duration-quick) var(--ease-smooth-out); }
.np-ctl .pp { color: var(--ink); border-color: var(--hair2); }
.eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 11px; }
.eq i { width: 2px; height: 100%; background: var(--ink); transform: scaleY(0.3); transform-origin: 50% 100%; transition: transform var(--duration-fast) var(--ease-smooth-out); }
.playing .eq i { transform: scaleY(0.7); transition: none; } /* static "on" level; player.js drives it inline while animating */
.np-opts { border-top: 1px solid var(--hair); padding: 14px 18px 16px; display: flex; flex-direction: column; gap: 12px; }
.np-row { display: flex; flex-wrap: wrap; gap: 8px; }
.np-slider { display: grid; grid-template-columns: 62px 1fr 64px; align-items: center; gap: 12px; font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
:lang(vi) .np-slider { grid-template-columns: 76px 1fr 64px; }
.np-slider em { font-style: normal; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.np-slider input { -webkit-appearance: none; appearance: none; width: 100%; height: 18px; background: transparent; cursor: pointer; }
.np-slider input::-webkit-slider-runnable-track { height: 2px; background: var(--hair2); }
.np-slider input::-moz-range-track { height: 2px; background: var(--hair2); }
.np-slider input::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: -5px; border-radius: 50%; background: var(--ink); border: 0; }
.np-slider input::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--ink); border: 0; }
#np-track { cursor: pointer; height: 2px; }
#np-track::after { content: ""; position: absolute; inset: -8px 0; }

/* ---------- iPhone frame + live island ---------- */
.phone { position: relative; width: min(300px, 72vw); aspect-ratio: 744 / 1530; margin: 0 auto; container-type: inline-size; }
.phone .frame { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.phone .screen { position: absolute; left: 4.052%; top: 1.66%; width: 91.705%; height: 96.68%; border-radius: 12.9% / 5.95%; overflow: hidden; background: #000; }
.shot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* the island is hardware: always black with light text, whatever the page theme.
   The box is always the expanded size; the pill is a clip-path window onto it, so open / close morphs
   only clip-path, transform and opacity (no layout). clip-path also clips hit-testing, so hover and taps
   only land on the visible shape. Geometry in cqw of .phone: screen = 91.705cqw wide, closed pill
   = 52.82 x 8.55cqw starting 16.69cqw in from the open box's left edge (14.86cqw from its right). */
.island-layer { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.island-layer:has(.island:focus-visible) { filter: drop-shadow(1.5px 0 0 #F5F5F2) drop-shadow(-1.5px 0 0 #F5F5F2) drop-shadow(0 1.5px 0 #F5F5F2) drop-shadow(0 -1.5px 0 #F5F5F2); }
.island {
  --ink: #F5F5F2; --hair2: rgba(245, 245, 242, 0.32); --dim: rgba(245, 245, 242, 0.6);
  --dur: var(--duration-fast); /* close */
  position: absolute; left: 4%; top: 1.3%; width: 92%; height: 11.5%; pointer-events: auto;
  background: #000; color: var(--ink); font: 2.9cqw var(--mono); letter-spacing: 0.08em; cursor: pointer;
  user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; outline: none;
  clip-path: inset(0 14.86cqw calc(100% - 8.55cqw) 16.69cqw round 4.27cqw);
  transform-origin: 50% 4.27cqw;
  transition: clip-path var(--dur) var(--ease-smooth-out), transform var(--duration-quick) var(--ease-smooth-out);
}
.island.open { --dur: var(--duration-medium); clip-path: inset(0 0 0 0 round 9cqw); }
.island:not(.open):active { transform: scale(var(--scale-tiny)); }
.island .l, .island .r {
  position: absolute; top: 6.5cqw; translate: 0 -50%; white-space: nowrap;
  transition: transform var(--dur) var(--ease-smooth-out);
}
.island .l { left: 5cqw; display: flex; align-items: center; gap: 1.6cqw; text-transform: uppercase; font-weight: 700; transform: translate(16.19cqw, -2.23cqw); }
.island .r { right: 5cqw; font-variant-numeric: tabular-nums; letter-spacing: 0.04em; font-size: 3.3cqw; transform: translate(-14.36cqw, -2.23cqw); }
.island.open .l, .island.open .r { transform: none; }
.island .l::before { content: ""; width: 1.6cqw; height: 1.6cqw; border-radius: 50%; background: var(--ink); animation: blink 1.6s steps(1) infinite; }
.island.paused .l::before { animation: none; opacity: 0.35; }
/* second row: controls while running, "paused" while paused; both cross-fade in place */
.island .ctl, .island .note {
  position: absolute; left: 5cqw; right: 5cqw; bottom: 4.2cqw;
  opacity: 0; transform: scale(var(--scale-medium)); filter: blur(var(--blur-small)); visibility: hidden;
  transition: opacity var(--duration-quick) var(--ease-smooth-out), transform var(--duration-quick) var(--ease-smooth-out), filter var(--duration-quick) var(--ease-smooth-out), visibility 0s linear var(--duration-quick);
}
.island .ctl { display: flex; gap: 2.5cqw; }
.island .note { text-align: center; font-size: 2.4cqw; letter-spacing: 0.14em; color: var(--dim); line-height: 6.5cqw; }
.island.open:not(.paused) .ctl, .island.open.paused .note {
  opacity: 1; transform: none; filter: none; visibility: visible;
  transition: opacity var(--duration-fast) var(--ease-smooth-out) var(--duration-micro), transform var(--duration-fast) var(--ease-smooth-out) var(--duration-micro), filter var(--duration-fast) var(--ease-smooth-out) var(--duration-micro), visibility 0s;
}
.island .ctl button { flex: 1; border: 1px solid var(--hair2); border-radius: 999px; padding: 1.6cqw 0; background: none; cursor: pointer; font-size: 2.5cqw; letter-spacing: 0.12em; color: var(--dim); text-transform: uppercase; white-space: nowrap; transition: background-color var(--duration-quick) var(--ease-smooth-out), color var(--duration-quick) var(--ease-smooth-out); }

/* ---------- ticker (style names) ---------- */
.ticker { position: relative; margin: clamp(56px, 8vw, 120px) 0 0; padding: 18px 0; border-block: 1px solid var(--hair); overflow: hidden; }
.ticker-track { display: flex; width: max-content; animation: ticker 32s linear infinite; }
/* site.js eases the speed down on hover and holds it at 0 when paused; this is the no-JS fallback */
html:not(.js) .ticker:hover .ticker-track, .ticker.stopped .ticker-track { animation-play-state: paused; }
.tk-btn {
  position: absolute; right: var(--gut); top: 50%; translate: 0 -50%; width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: var(--surface); color: var(--ink); cursor: pointer; font: 600 11px/1 var(--mono);
  opacity: 0.85; transition: opacity var(--duration-quick) var(--ease-smooth-out), background-color var(--duration-quick) var(--ease-smooth-out);
}
.tk-btn::before { content: "½A½A"; letter-spacing: -0.1em; }
.tk-btn[aria-pressed="true"]::before { content: "B6"; letter-spacing: 0; }
.ticker span { padding: 0 0.5em; font: 800 clamp(32px, 5.5vw, 80px)/1 var(--grot); letter-spacing: -0.03em; text-transform: uppercase; white-space: nowrap; }
.ticker .sep { color: var(--dim); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- feature cards ---------- */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 3vw, 44px) clamp(16px, 2vw, 28px); }
.card { margin: 0; min-width: 0; }
.media {
  position: relative; aspect-ratio: 4 / 3; border-radius: 24px; background: var(--surface); overflow: hidden;
  display: flex; justify-content: center; align-items: flex-start; padding-top: 7%;
}
.media img {
  width: 44%; height: auto; border-radius: 9% / 4.2%; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
  transition: transform var(--duration-fast) var(--ease-smooth-out), opacity var(--duration-slow) var(--ease-in-out);
}
/* now-playing sits low in the Spotify shot: show the bottom of the phone instead of the top */
.media.bottom { align-items: flex-end; padding: 0 0 7%; }
/* island shot is cropped to just the island (wide, transparent corners): centred, no phone frame */
.media.wide { align-items: center; padding: 0; }
.media.wide img { width: 80%; border-radius: 0; box-shadow: none; filter: drop-shadow(0 18px 36px rgba(0, 0, 0, 0.22)); }
/* screenshots fade in once loaded (the "in" class comes from a load listener in <head>); no-JS shows them as is */
html.js .media img:not(.in), html.js .phone .shot:not(.in) { opacity: 0; }
.phone .shot { transition: opacity var(--duration-slow) var(--ease-in-out); }
.card .desc { margin: 6px 2px 0; color: var(--dim); font-size: 13.5px; }
.badge { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 10px; }
/* placeholder frame for screenshots that aren't in yet: a dark phone screen with a prompt */
.ph {
  width: 44%; aspect-ratio: 600 / 1301; border-radius: 9% / 4.2%; background: #0B0B0B; color: rgba(245, 245, 242, 0.55);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
  display: flex; flex-direction: column; gap: 6px; padding: 16% 9% 0; font: 500 11px/1.5 var(--mono); letter-spacing: 0.04em;
}
.ph span { text-transform: uppercase; font-size: 10px; letter-spacing: 0.1em; }
.ph b { color: #F5F5F2; font-weight: 600; overflow-wrap: anywhere; }
.ph b::after { content: ""; display: inline-block; width: 0.55em; height: 1.05em; margin-left: 3px; vertical-align: -0.2em; background: #F5F5F2; animation: blink 1.1s steps(1) infinite; }
.ph i { font-style: normal; }

/* ---------- install steps / FAQ ---------- */
.steps-mini { list-style: none; margin: 0 0 18px; padding: 0; counter-reset: s; }
.steps-mini li { counter-increment: s; display: flex; gap: 14px; padding: 10px 0; border-top: 1px solid var(--hair); }
.steps-mini li:first-child { border-top: 0; padding-top: 0; }
.steps-mini li::before { content: counter(s, decimal-leading-zero); color: var(--dim); }
.faq details { border-top: 1px solid var(--hair); }
.faq details:last-child { border-bottom: 1px solid var(--hair); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0;
  font: 600 clamp(17px, 1.8vw, 22px)/1.3 var(--grot); letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font: 400 22px/1 var(--mono); color: var(--dim); transition: transform var(--duration-fast) var(--ease-smooth-out); }
/* accordion: height to auto where ::details-content + interpolate-size exist; elsewhere it just opens */
details::details-content {
  block-size: 0; overflow: hidden; opacity: 0;
  transition: block-size var(--duration-fast) var(--ease-smooth-out), opacity var(--duration-fast) var(--ease-smooth-out), content-visibility var(--duration-fast) allow-discrete;
}
details[open]::details-content { block-size: auto; opacity: 1; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .body { padding: 0 0 20px; color: var(--dim); max-width: 760px; }
.faq .body p { margin: 0; }
.fine { color: var(--dim); font-size: 13px; }
.contact { list-style: none; padding: 0; margin: 0; }
.contact li::before { content: none; }

/* ---------- document pages ---------- */
main.doc { padding: clamp(28px, 6vw, 72px) 0 80px; }
main.doc h1, .confirm h1 { font: 800 clamp(40px, 7vw, 88px)/1.05 var(--grot); letter-spacing: -0.035em; margin: 0 0 16px; }
main.doc h2 { font: 500 12px/1.5 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; margin: 52px 0 14px; padding-top: 18px; border-top: 1px solid var(--hair); }
main.doc h3 { font-size: 14.5px; font-weight: 600; margin: 26px 0 6px; }
main.doc p, main.doc ul, main.doc ol { margin: 0 0 14px; }
main.doc ol { padding-left: 22px; }
main.doc ul { list-style: none; padding-left: 18px; }
main.doc ul > li { position: relative; }
main.doc ul > li::before { content: "-"; position: absolute; left: -16px; color: var(--dim); }
main.doc li { margin: 5px 0; }
.meta { color: var(--dim); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 32px; }
.lead { font-size: 15px; color: var(--dim); }
.caps { text-transform: uppercase; font-size: 13px; }
.summary { border-radius: 20px; background: var(--surface); padding: 20px 24px; margin: 28px 0; }
main.doc .summary h2 { margin: 0 0 10px; padding: 0; border: 0; color: var(--dim); }
.summary ul { margin: 0; }
.toc { border-left: 1px solid var(--hair2); padding: 2px 0 2px 18px; margin: 28px 0 0; }
.toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.toc li { counter-increment: toc; margin: 3px 0; }
.toc li::before { content: counter(toc, decimal-leading-zero) "  "; color: var(--dim); white-space: pre; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* install guide */
.paths { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0 8px; }
.path-btn {
  display: flex; flex-direction: column; gap: 6px; padding: 18px; text-align: left; text-decoration: none;
  border: 1px solid var(--hair2); border-radius: 20px; background: transparent; cursor: pointer;
  transition: border-color var(--duration-quick) var(--ease-smooth-out), background-color var(--duration-quick) var(--ease-smooth-out), color var(--duration-quick) var(--ease-smooth-out);
}
.path-btn .k { font-size: 10.5px; letter-spacing: 0.12em; color: var(--dim); text-transform: uppercase; }
.path-btn b { font-size: 14px; font-weight: 600; }
.path-btn span { font-size: 12px; color: var(--dim); line-height: 1.55; }
.path-btn[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.path-btn[aria-selected="true"] .k, .path-btn[aria-selected="true"] span { color: var(--bg); opacity: 0.7; }
.guide { margin: 40px 0 0; }
.guide-head { border-top: 1px solid var(--hair); padding-top: 18px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 16px; }
main.doc .guide-head h2 { margin: 0; padding: 0; border: 0; }
.guide-head .count { font-size: 11px; letter-spacing: 0.1em; color: var(--dim); text-transform: uppercase; font-variant-numeric: tabular-nums; }
.dots { display: none; gap: 4px; margin: 16px 0 0; }
.dots button { flex: 1; height: 4px; padding: 0; border: 0; border-radius: 999px; background: var(--hair2); cursor: pointer; transition: background-color var(--duration-fast) var(--ease-smooth-out); }
.dots button.on { background: var(--ink); }
main.doc .steps { list-style: none; margin: 18px 0 0; padding: 0; }
main.doc .steps > li::before { content: none; }
.step { border-radius: 20px; padding: 22px 24px 24px; margin: 0 0 12px; background: var(--surface); }
.step .where { font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); margin: 0 0 10px; display: flex; justify-content: space-between; gap: 12px; }
.step h3 { font: 700 22px/1.2 var(--grot); letter-spacing: -0.01em; margin: 0 0 10px; }
.step p:last-child, .step ul:last-child { margin-bottom: 0; }
.step.done-step { background: var(--ink); color: var(--bg); }
.step.done-step a, .step.done-step .where { color: var(--bg); }
.step-nav { display: none; justify-content: space-between; align-items: center; gap: 12px; margin-top: 4px; }
.step-nav .btn { min-width: 120px; }
.all-toggle { background: none; border: 0; color: var(--dim); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; text-decoration: underline; text-decoration-color: var(--hair2); text-underline-offset: 3px; }
.all-toggle { transition: color var(--duration-quick) var(--ease-smooth-out); }
html.js .guide[hidden] { display: none; }
html.js .guide.stepper .dots, html.js .guide.stepper .step-nav { display: flex; }
html.js .guide.stepper .step { display: none; }
html.js .guide.stepper .step.cur { display: block; animation: stepIn var(--duration-fast) var(--ease-smooth-out); }
html.js .guide.stepper .step.cur.back { animation-name: stepBack; }
/* page slide: next comes in from the right, back from the left */
@keyframes stepIn { from { opacity: 0; transform: translateX(var(--distance-base)); filter: blur(var(--blur-medium)); } }
@keyframes stepBack { from { opacity: 0; transform: translateX(calc(-1 * var(--distance-base))); filter: blur(var(--blur-medium)); } }
.guide .show-all-nav { display: none; }
html.js .guide:not(.stepper) .show-all-nav { display: flex; justify-content: flex-end; }
details.fold { border-radius: 16px; margin: 0 0 10px; background: var(--surface); }
details.fold summary { cursor: pointer; list-style: none; padding: 14px 18px; display: flex; justify-content: space-between; gap: 12px; font-weight: 600; }
details.fold summary::-webkit-details-marker { display: none; }
details.fold summary::after { content: "+"; color: var(--dim); }
details.fold[open] summary::after { content: "\2212"; }
details.fold .body { padding: 0 18px 16px; color: var(--dim); }

/* ---------- footer ---------- */
footer.site { margin-top: clamp(64px, 10vw, 140px); border-top: 1px solid var(--hair); }
.foot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 32px; padding: 28px 0 0; }
.foot-grid ul { list-style: none; margin: 8px 0 0; padding: 0; }
.foot-grid li { margin: 4px 0; }
.foot-grid a { text-decoration: none; }
.foot-grid a:hover { text-decoration: underline; }
footer.site .giant { margin: clamp(40px, 6vw, 80px) 0 0; line-height: 0.95; }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 18px 0 32px; border-top: 1px solid var(--hair); margin-top: 16px; color: var(--dim); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.foot-base a { color: var(--dim); }

/* ---------- hover (pointer devices only, so taps don't leave things stuck "hovered") ---------- */
@media (hover: hover) {
  .pill:hover { background: var(--hair); }
  .pill.solid:hover { background: var(--dim); }
  .lang:hover { background: var(--surface); }
  .lang button:hover { color: var(--ink); }
  .menu a:hover { background: var(--hair); }
  .btn:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
  .btn.solid:hover { background: transparent; color: var(--ink); }
  .copy:hover, .mini:hover, .chip:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
  .np-ctl button:hover { color: var(--ink); border-color: var(--hair2); }
  .island .ctl button:hover { background: var(--ink); color: #000; }
  .path-btn:hover { border-color: var(--ink); }
  .all-toggle:hover { color: var(--ink); }
  .tk-btn:hover { opacity: 1; background: var(--hair); }
  /* card lift: quick in, softer out */
  .card:hover .media img { transform: translateY(calc(-1 * var(--distance-base))); transition-duration: var(--duration-quick), var(--duration-slow); }
}

/* theme switch: everything changes colour in the same frame (site.js adds this for one frame) */
.theme-switching, .theme-switching *, .theme-switching *::before, .theme-switching *::after { transition: none !important; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: var(--duration-fast); animation-timing-function: var(--ease-in-out); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .show { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .row { grid-template-columns: 1fr; padding: 18px 0; }
  .cards { grid-template-columns: 1fr; }
  .paths { grid-template-columns: 1fr; }
  .bar .dl { display: none; }
  .menu .only-sm { display: block; }
}
@media (max-width: 560px) {
  body { font-size: 14px; }
  .pill { height: 38px; padding: 0 12px; }
  .pill.icon { width: 38px; }
  .media img, .ph { width: 52%; }
  .step { padding: 18px 18px 20px; }
  .step h3 { font-size: 19px; }
  .foot-grid { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .pill.logo .txt { display: none; }
}

/* ---------- reduced motion ---------- */
/* nothing moves: transitions and animations finish instantly (state changes still apply), autoplaying motion stops */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after, ::details-content { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  .ticker-track, .cursor, .caret, .ph b::after, .island .l::before { animation: none; }
  .tk-btn { display: none; }
  .mq.run > span { display: block; overflow: hidden; text-overflow: ellipsis; animation: none; }
  .card:hover .media img, .island:not(.open):active, .swap, .menu, .island .ctl, .island .note { transform: none; }
  .swap, .island .ctl, .island .note { filter: none; }
}

/* ---------- print ---------- */
@media print {
  :root, :root[data-theme="dark"] { --bg: #fff; --surface: #fff; --ink: #000; --dim: #444; --hair: #ccc; --hair2: #999; color-scheme: light; }
  header.site, .progress, .totop, .skip, .ticker, .showcase, .copy, .step-nav, .dots, .paths, footer.site .giant { display: none !important; }
  body { font-size: 11pt; }
  .cards { grid-template-columns: 1fr 1fr; }
  .media { break-inside: avoid; }
  .card, .faq details, .step { break-inside: avoid; }
  html.js .guide[hidden], html.js .guide.stepper .step { display: block !important; }
  main a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; color: #444; overflow-wrap: anywhere; }
}

/* What's new: version tabs + one swipeable row per version, so every release fits in one screen height */
.wn-tabs { display: flex; gap: 6px; }
.wn-tabs button { font: 500 12px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px; cursor: pointer; transition: color var(--duration-quick) var(--ease-smooth-out), background-color var(--duration-quick) var(--ease-smooth-out), border-color var(--duration-quick) var(--ease-smooth-out); white-space: nowrap; }
.wn-tabs button[aria-selected="true"] { color: var(--bg); background: var(--ink); border-color: var(--ink); }
@media (hover: hover) { .wn-tabs button:not([aria-selected="true"]):hover { color: var(--ink); border-color: var(--ink); } }
.wn-sub { margin: 0 0 14px; }
.wn-panel:not([hidden]) { animation: wn-in var(--duration-fast) var(--ease-smooth-out); }
@keyframes wn-in { from { opacity: 0; transform: translateY(6px); } }
.wn-row { list-style: none; margin: 0; padding: 0 0 14px; display: grid; grid-auto-flow: column; grid-auto-columns: clamp(220px, 23%, 300px); gap: clamp(14px, 1.6vw, 22px); overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: thin; }
.wn-row:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 12px; }
.wn-card { scroll-snap-align: start; min-width: 0; }
.wn-media { aspect-ratio: 3 / 4; border-radius: 20px; background: var(--surface); overflow: hidden; display: flex; justify-content: center; padding-top: 8%; }
.wn-media img { width: 72%; height: auto; align-self: flex-start; border-radius: 18px; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18); }
.wn-card .desc { font-size: 13px; }
.wn-list { list-style: none; margin: 0 0 16px; padding: 0; border-top: 1px solid var(--line); }
.wn-list a { display: grid; grid-template-columns: 72px 1fr auto; gap: 16px; align-items: baseline; padding: 14px 2px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.wn-list b { font: 600 13px/1.4 var(--mono); }
.wn-list span { color: var(--dim); font-size: 14px; }
.wn-list i { font-style: normal; color: var(--dim); }
@media (hover: hover) { .wn-list a:hover span { color: var(--ink); } }
@media (max-width: 720px) {
  .sec-head:has(.wn-tabs) { flex-wrap: wrap; }
  .wn-row { grid-auto-columns: 68%; }
  .wn-list a { grid-template-columns: 58px 1fr auto; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) { .wn-panel:not([hidden]) { animation: none; } }
