/* The app's tokens (docs/DESIGN.md), one set per theme. Light is the default;
   dark follows the system unless the visitor chose light, or is chosen outright. */
:root {
  --bd-top: #fcfaff; --bd-bot: #eee6fa;
  --glow: rgba(195, 150, 231, .5);
  /* The strip's unchosen thumbnails: dimmed on the dark page, left alone on the pale one, where dimming greys them. */
  --thumb-rest: 1;
  --surface: #ffffff; --border: #e8e0f4;
  --shadow: rgba(74, 40, 110, .12);
  --inset: #f8f5fc; --inset-hover: #f0eaf9;
  --ink: #1f182b; --muted: #605770;
  --brand: #7b4fb0; --brand-hover: #6a429e; --brand-fg: #ffffff;
  --win-shadow: rgba(74, 40, 110, .34); --win-edge: rgba(74, 40, 110, .18);
  --info: #0e7490; --info-bg: rgba(6, 182, 212, .09); --info-line: rgba(8, 145, 178, .4);
  --sans: system-ui, -apple-system, "Segoe UI", Ubuntu, Cantarell, "Noto Sans", sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
/* The two dark blocks hold the same tokens: keep them in step. Both are for screens only, so the
   page prints in its light colours whatever the theme. */
@media screen and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bd-top: #0e0b16; --bd-bot: #1d1633;
    --glow: rgba(195, 150, 231, .3); --thumb-rest: .75;
    --surface: #1a1526; --border: #2c2440;
    --shadow: rgba(0, 0, 0, .43);
    --inset: #120e1b; --inset-hover: #221b31;
    --ink: #f4f0fa; --muted: #a89fbb;
    --brand: #c396e7; --brand-hover: #d2adf0; --brand-fg: #1d1230;
    --win-shadow: rgba(0, 0, 0, .7); --win-edge: rgba(195, 150, 231, .16);
    --info: #22d3ee; --info-bg: rgba(6, 182, 212, .1); --info-line: rgba(34, 211, 238, .4);
    color-scheme: dark;
  }
}
@media screen {
  :root[data-theme="dark"] {
    --bd-top: #0e0b16; --bd-bot: #1d1633;
    --glow: rgba(195, 150, 231, .3); --thumb-rest: .75;
    --surface: #1a1526; --border: #2c2440;
    --shadow: rgba(0, 0, 0, .43);
    --inset: #120e1b; --inset-hover: #221b31;
    --ink: #f4f0fa; --muted: #a89fbb;
    --brand: #c396e7; --brand-hover: #d2adf0; --brand-fg: #1d1230;
    --win-shadow: rgba(0, 0, 0, .7); --win-edge: rgba(195, 150, 231, .16);
    --info: #22d3ee; --info-bg: rgba(6, 182, 212, .1); --info-line: rgba(34, 211, 238, .4);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink);
  background: linear-gradient(var(--bd-top), var(--bd-bot)) var(--bd-top);
  font: 16px/1.55 var(--sans);
}
main { overflow-x: clip; }
img { max-width: 100%; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-hover); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
code, kbd { font-family: var(--mono); font-size: .86em; }
code { background: var(--inset); border: 1px solid var(--border); border-radius: 6px; padding: 0 5px; overflow-wrap: anywhere; }
.wrap { width: min(1360px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--brand); color: var(--brand-fg); padding: 8px 14px; border-radius: 12px; z-index: 10; }
.skip:focus { top: 12px; }

/* ---------- Top bar: frameless, on the backdrop, like the app's ---------- */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 16px; }
.brandmark { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 20px; }
.brandmark img { width: 36px; height: 36px; }
.bar-end { display: flex; align-items: center; gap: 12px; }
.bar nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.bar nav a { display: block; padding: 8px 12px; border-radius: 12px; color: var(--muted); text-decoration: none; font-size: 15px; }
.bar nav a:hover { background: var(--inset-hover); color: var(--ink); }
.theme-switch { display: none; gap: 2px; padding: 3px; background: var(--inset); border: 1px solid var(--border); border-radius: 12px; }
.js .theme-switch { display: inline-flex; }
.theme-switch button { display: grid; place-items: center; width: 32px; height: 30px; padding: 0; border: 0; border-radius: 9px; background: none; color: var(--muted); cursor: pointer; }
.theme-switch button:hover { color: var(--ink); }
.theme-switch button[aria-pressed="true"] { background: var(--surface); color: var(--brand); box-shadow: 0 2px 8px -3px var(--shadow); }
.theme-switch svg { width: 17px; height: 17px; }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 24px 88px; align-items: center; padding: 52px 0 40px; }
.kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 3px 12px 3px 8px; border-radius: 999px; background: var(--inset); border: 1px solid var(--border); color: var(--muted); font-size: 14px; }
.kicker .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
h1 { font-size: clamp(2.1rem, 1.3rem + 2.2vw, 3.2rem); line-height: 1.08; letter-spacing: -.02em; margin: 0 0 18px; font-weight: 700; }
.lead { font-size: 18px; color: var(--muted); margin: 0 0 28px; max-width: 34em; }
.lead strong { color: var(--ink); font-weight: 600; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.btn-brand {
  /* Unseen here, drawn in forced colours, where the fill is taken away. */
  border: 1px solid transparent;
  display: inline-flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 24px;
  background: var(--brand); color: var(--brand-fg); border-radius: 12px; text-decoration: none;
  font-weight: 600; font-size: 17px; box-shadow: 0 8px 24px -8px var(--brand);
}
.btn-brand:hover { background: var(--brand-hover); color: var(--brand-fg); }
.btn-brand svg { width: 20px; height: 20px; flex: none; }
.subtle { color: var(--muted); font-size: 14px; }
.subtle a { color: var(--muted); }
.subtle a:hover { color: var(--ink); }
#main-note { margin: 10px 0 0; min-height: 1.5em; }
.systems { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 0; padding: 0; list-style: none; }
.systems li { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px 5px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: 14px; box-shadow: 0 2px 8px -4px var(--shadow); }
.systems svg { width: 16px; height: 16px; color: var(--brand); }
.needs { margin: 12px 0 0; font-size: 14px; color: var(--muted); }

/* The stage: the window in the mascot's glow. */
.stage { position: relative; isolation: isolate; --m: 160px; }
.stage::before {
  content: ""; position: absolute; z-index: -1; inset: -16% -10% -10% -18%; pointer-events: none;
  background:
    radial-gradient(closest-side at 14% 12%, var(--glow), transparent 70%),
    radial-gradient(closest-side at 50% 55%, var(--glow), transparent 100%);
  transition: opacity .6s ease;
}
.stage.lights-down::before { opacity: .25; }
.window {
  position: relative; border-radius: 14px; overflow: hidden; background: #0e0b16;
  border: 1px solid var(--win-edge);
  box-shadow: 0 40px 90px -30px var(--win-shadow), 0 12px 30px -12px var(--win-shadow);
}
.titlebar {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 34px; padding: 0 6px 0 14px;
  background: #1a1526; border-bottom: 1px solid #2c2440; color: #a89fbb; font-size: 13px;
}
.titlebar .title { grid-column: 2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.titlebar .title b { color: #f4f0fa; font-weight: 500; }
.winctl { grid-column: 3; justify-self: end; display: flex; }
.winctl i { width: 34px; height: 26px; display: grid; place-items: center; }
.winctl i::before { content: ""; width: 10px; height: 10px; border: 1.4px solid #a89fbb; }
.winctl i:nth-child(1)::before { height: 0; border-width: 1.4px 0 0; }
/* The close button's cross is two borders, not a gradient, so forced colours still draw it. */
.winctl i:nth-child(3)::before, .winctl i:nth-child(3)::after {
  content: ""; grid-area: 1 / 1; width: 13px; height: 0; border: 0; border-top: 1.4px solid #a89fbb; transform: rotate(45deg);
}
.winctl i:nth-child(3)::after { transform: rotate(-45deg); }
.screens { position: relative; aspect-ratio: 1280 / 800; background: #120e1b; }
.screen { margin: 0; position: absolute; inset: 0; }
.screen img { display: block; width: 100%; height: 100%; object-fit: cover; }
.screen[hidden] { display: none; }

.mascot {
  position: absolute; z-index: 2; left: calc(var(--m) * -.58); top: calc(var(--m) * -.65); width: var(--m); aspect-ratio: 1;
  padding: 0; border: 0; background: none; cursor: pointer; border-radius: 50%;
  filter: drop-shadow(0 10px 18px rgba(60, 20, 90, .35));
}
.mascot svg, .mascot img { display: block; width: 100%; height: 100%; }
.mascot:focus-visible { outline-offset: -6px; border-radius: 50%; }

.strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 14px 0 0; padding: 6px; list-style: none; background: var(--inset); border: 1px solid var(--border); border-radius: 16px; }
.strip a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px 6px 7px; border-radius: 11px; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; }
.strip a img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 6px; opacity: var(--thumb-rest); }
.strip a:hover { background: var(--inset-hover); color: var(--ink); }
.strip a:hover img { opacity: 1; }
.strip a[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 4px 14px -6px var(--shadow); }
.strip a[aria-selected="true"] img { opacity: 1; outline: 2px solid var(--brand); outline-offset: 1px; }
.strip a:focus-visible { outline-offset: -2px; }
.stage-caption { margin: 10px 4px 0; font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; }
.stage-caption a { color: var(--muted); }
.hint { display: none; }
.js .hint { display: inline; }

/* ---------- Sections ---------- */
section { scroll-margin-top: 16px; }
.section-head { max-width: 720px; margin: 0 auto 40px; text-align: center; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.2rem); line-height: 1.15; letter-spacing: -.01em; margin: 0 0 12px; }
h3 { font-size: 20px; margin: 0 0 8px; line-height: 1.3; }
.section-head p { margin: 0; color: var(--muted); font-size: 18px; }
.tour { padding: 72px 0 24px; }
.stop { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px 64px; align-items: start; padding: 40px 0; }
.stop .shot { position: sticky; top: 24px; }
.stop:nth-of-type(even) { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.stop:nth-of-type(even) .shot { order: -1; }
.eyebrow { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.stop h3 { font-size: clamp(1.4rem, 1.1rem + .8vw, 1.8rem); line-height: 1.2; margin-bottom: 12px; }
.stop > div > p { color: var(--muted); margin: 0 0 18px; font-size: 17px; }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 28px; }
.ticks li::before {
  content: ""; position: absolute; left: 2px; top: .5em; width: 14px; height: 9px;
  border: solid var(--brand); border-width: 0 0 2.5px 2.5px; transform: translateY(-30%) rotate(-45deg); border-radius: 1px;
}
.ticks small { display: block; color: var(--muted); font-size: 14px; }
.shot { margin: 0; }
.shot .window { border-radius: 12px; }
.shot .titlebar { height: 28px; font-size: 12px; }
.shot .winctl i { width: 28px; height: 22px; }
.shot figcaption { margin: 10px 4px 0; font-size: 14px; color: var(--muted); }
.pic { position: relative; overflow: hidden; }
.pic-in { position: relative; }
.pic img { display: block; width: 100%; height: auto; aspect-ratio: 1280 / 800; }
.spot {
  position: absolute; border: 2px solid #c396e7; border-radius: 10px;
  box-shadow: 0 0 0 4px rgba(195, 150, 231, .28), 0 0 24px rgba(195, 150, 231, .35); pointer-events: none;
}
/* The spotlight's label is quiet: the app's dark surface with a brand ring, never a brand fill. */
.spot-label {
  position: absolute; left: -2px; bottom: calc(100% + 6px); white-space: nowrap;
  background: #1a1526; color: #f4f0fa; border: 1.5px solid #c396e7; font-size: 12px; font-weight: 600; line-height: 1; padding: 5px 10px; border-radius: 999px;
}
.spot.end .spot-label { left: auto; right: -2px; }
.spot.below .spot-label { bottom: auto; top: calc(100% + 6px); }
#tour-home .spot { left: 1.3%; top: 34%; width: 51.5%; height: 33.5%; }
#tour-library .spot { left: 1.4%; top: 10.6%; width: 97.2%; height: 6.6%; }
#tour-item .spot { left: 63.4%; top: 30.8%; width: 35.2%; height: 6.8%; }
#tour-player .spot { left: .6%; top: 87.2%; width: 98.8%; height: 10.4%; }
#tour-settings .spot { left: 29.8%; top: 21%; width: 60%; height: 25%; }

.keys { margin-top: 24px; }
.keys h4 { margin: 0 0 14px; font-size: 18px; }
.keys-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px; align-items: start; }
.keytable { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--inset); border: 1px solid var(--border); border-radius: 12px; font-size: 14px; }
.keytable th, .keytable td { padding: 7px 12px; text-align: left; vertical-align: baseline; border-top: 1px solid var(--border); }
.keytable tr:first-child th, .keytable tr:first-child td { border-top: 0; }
.keytable th { white-space: nowrap; font-weight: 400; width: 1%; }
.keytable td { color: var(--muted); }
kbd { display: inline-block; min-width: 1.9em; text-align: center; padding: 1px 6px; border-radius: 6px; background: var(--surface); border: 1px solid var(--border); border-bottom-width: 2px; color: var(--ink); }

.surface { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 28px; box-shadow: 0 12px 40px -12px var(--shadow); }
.surface p { margin: 0 0 10px; color: var(--muted); }
.surface p:last-child { margin-bottom: 0; }
.flow { margin: 24px 0 0; }
.flow > p { max-width: 62em; }
.dg { display: block; width: 100%; height: auto; overflow: visible; }
.dg-narrow-set { display: none; }
.dg .bx { fill: var(--inset); stroke: var(--border); stroke-width: 1.5; }
.dg .bx.gpu { fill: var(--surface); stroke: var(--brand); stroke-width: 2; }
.dg .bx.cpu { fill: var(--inset); stroke: var(--muted); stroke-dasharray: 5 4; }
.dg .t { fill: var(--ink); font: 600 14.5px var(--sans); }
.dg .s { fill: var(--muted); font: 13px var(--sans); }
.dg .tg { font-size: 11.5px; font-family: var(--mono); }
.dg .h { fill: var(--muted); font: 600 11.5px var(--mono); letter-spacing: .04em; text-transform: uppercase; }
.dg .br { fill: none; stroke: var(--muted); stroke-width: 1.2; }
.dg .ln { fill: var(--ink); font: 700 16px var(--sans); }
.dg .lt { fill: var(--muted); font: 13px var(--sans); }
.dg .lane.gpu .lt { fill: var(--brand); font-weight: 600; }
.dg .ar { stroke: var(--muted); stroke-width: 2; fill: none; }
.dg .ah { fill: var(--muted); }
.dg .ar.gpu { stroke: var(--brand); stroke-width: 2.5; }
.dg .ah.gpu { fill: var(--brand); }
.dg .ar.cpu { stroke-dasharray: 5 4; }
.dg .cp { fill: var(--muted); font: 12px var(--mono); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 26px; margin: 16px 0 0; padding: 0; list-style: none; font-size: 14.5px; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend svg { width: 34px; height: 10px; flex: none; }
.lane-title { font-weight: 700; margin: 22px 0 8px; color: var(--ink); }
.lane-m:first-child .lane-title { margin-top: 0; }

.jelly-spot { position: relative; isolation: isolate; flex: none; width: 150px; }
.jelly-spot::before { content: ""; position: absolute; z-index: -1; inset: -22%; background: radial-gradient(closest-side, var(--glow), transparent); }
.jelly-spot img { display: block; width: 100%; height: auto; }
.beside { display: flex; align-items: center; gap: 28px; }
.beside > div:last-child { min-width: 0; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; padding: 20px 0 0; }
.icon-circle { width: 48px; height: 48px; border-radius: 50%; background: var(--inset-hover); display: grid; place-items: center; margin-bottom: 14px; color: var(--brand); }
.icon-circle svg { width: 26px; height: 26px; }
.signin { margin-top: 40px; }

/* ---------- Download ---------- */
.download { padding: 96px 0 40px; }
.oses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
/* Linux has twice the packages and notes, so it gets a column to itself and the other two share
   one: three columns left a hole under the short cards. The visitor's own system leads. */
@media (min-width: 1081px) {
  #download-windows { grid-column: 1; grid-row: 1; }
  #download-macos { grid-column: 1; grid-row: 2; }
  #download-linux { grid-column: 2; grid-row: 1 / span 2; }
  .oses:has(#download-macos.yours) #download-macos { grid-row: 1; }
  .oses:has(#download-macos.yours) #download-windows { grid-row: 2; }
  .oses:has(#download-linux.yours) #download-linux { grid-column: 1; }
  .oses:has(#download-linux.yours) :is(#download-windows, #download-macos) { grid-column: 2; }
}
.os.yours { order: -1; border-color: var(--brand); box-shadow: 0 12px 40px -12px var(--shadow), 0 0 0 1px var(--brand); }
.os header { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; flex-wrap: wrap; }
.os header svg { width: 26px; height: 26px; color: var(--brand); flex: none; }
.os header h3 { margin: 0; }
.yours-tag { display: none; font-size: 12px; padding: 2px 10px; border-radius: 999px; background: var(--inset); border: 1px solid var(--border); color: var(--muted); }
.os.yours .yours-tag { display: inline-block; }
.os > p { font-size: 14px; }
.pkgs { list-style: none; margin: 16px 0 18px; padding: 0; display: grid; gap: 8px; }
.pkg {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 12px;
  padding: 10px 12px 10px 14px; border-radius: 12px; background: var(--inset); color: var(--ink); text-decoration: none;
}
.pkg:hover { background: var(--inset-hover); color: var(--ink); }
.pkg b { font-weight: 600; font-size: 15px; }
.pkg .file { grid-column: 1; font-size: 12px; color: var(--muted); font-family: var(--mono); overflow-wrap: anywhere; }
.pkg .get {
  grid-row: 1 / span 2; grid-column: 2; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border); font-size: 13px; color: var(--ink);
}
.pkg .get svg { width: 18px; height: 18px; color: var(--brand); }
.pkg:hover .get { border-color: var(--brand); }
.notes { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; font-size: 14px; color: var(--muted); }
.notes li { padding-left: 14px; border-left: 2px solid var(--border); }
.notes strong { color: var(--ink); font-weight: 600; }
.notice { display: flex; gap: 10px; margin: 16px 0 0; padding: 10px 12px; border-radius: 12px; font-size: 14px; color: var(--ink); background: var(--info-bg); border: 1px solid var(--info-line); }
.surface p.notice { color: var(--ink); margin: 16px 0 0; }
.notice svg { width: 20px; height: 20px; flex: none; color: var(--info); margin-top: 1px; }
.firstrun { margin-top: 20px; }
.firstrun .notices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.firstrun .notice, .surface .firstrun .notice { margin: 0; }
.after { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
pre { margin: 10px 0; padding: 12px 14px; background: var(--inset); border: 1px solid var(--border); border-radius: 12px; overflow-x: auto; font-size: 14px; }
pre code { background: none; border: 0; padding: 0; }
.early { display: flex; gap: 20px; align-items: flex-start; }
.early img { width: 72px; height: 72px; flex: none; }

footer { padding: 48px 0; margin-top: 64px; border-top: 1px solid var(--border); color: var(--muted); font-size: 14px; }
footer .cols { display: flex; align-items: center; gap: 16px 32px; }
footer .jelly-spot { width: 110px; }
footer .links { display: flex; flex: 1; flex-wrap: wrap; justify-content: space-between; gap: 16px 40px; }
footer .links > div { max-width: 46ch; }
footer p { margin: 0 0 8px; }
footer a { color: var(--muted); }
footer a:hover { color: var(--ink); }

/* ---------- Narrow ---------- */
@media (max-width: 1080px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 128px; }
  .hero-text { max-width: 640px; }
  .stage { --m: 112px; }
  .mascot { left: 8px; top: calc(var(--m) * -1 + 6px); }
  .stop, .stop:nth-of-type(even) { grid-template-columns: minmax(0, 1fr); }
  .stop:nth-of-type(even) .shot { order: 0; }
  .stop .shot { position: static; }
  .oses { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1000px) {
  .dg-wide { display: none; }
  .dg-narrow-set { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
  .dg-narrow { max-width: 420px; }
  .lane-title, .lane-m:first-child .lane-title { margin: 0 0 8px; }
}
@media (max-width: 720px) {
  .pair, .after, .firstrun .notices, .keys-grid { grid-template-columns: minmax(0, 1fr); }
  .bar nav .wide { display: none; }
  .surface { padding: 22px 18px; }
  .beside { flex-direction: column; align-items: flex-start; gap: 14px; }
  .jelly-spot { width: 110px; }
  /* The tour's screenshots: only the part each stop talks about, so the text in them stays readable. */
  .pic { aspect-ratio: var(--ar); }
  .pic-in { position: absolute; width: calc(100% / var(--w)); left: calc(var(--x0) / var(--w) * -100%); top: calc(var(--y0) / var(--h) * -100%); }
  #tour-home .pic { --x0: 0; --y0: .27; --w: .58; --h: .45; --ar: 2.06; }
  #tour-library .pic { --x0: 0; --y0: .08; --w: .62; --h: .5; --ar: 1.98; }
  #tour-item .pic { --x0: .45; --y0: .2; --w: .55; --h: .22; --ar: 4; }
  #tour-player .pic { --x0: 0; --y0: .7; --w: .6; --h: .3; --ar: 3.2; }
  /* The crop ends before the seek bar does, so its ring closes inside the crop. */
  #tour-player .spot { width: 58.6%; }
  #tour-settings .pic { --x0: .27; --y0: .135; --w: .65; --h: .465; --ar: 2.24; }
  .spot-label { font-size: 11px; padding: 4px 8px; }
  footer .cols { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) {
  body { font-size: 15px; }
  .bar { padding-block: 10px; }
  .brandmark { font-size: 18px; }
  .brandmark img { width: 32px; height: 32px; }
  .bar nav { display: none; }
  .hero { padding-top: 6px; gap: 104px; }
  .stage { --m: 88px; }
  .kicker { margin-bottom: 14px; }
  h1 { margin-bottom: 12px; }
  .lead { font-size: 16px; margin-bottom: 20px; }
  .systems { margin-top: 18px; }
  .titlebar { height: 26px; font-size: 11px; padding-left: 8px; }
  .winctl i { width: 22px; height: 20px; }
  .strip { gap: 2px; padding: 4px; border-radius: 14px; }
  .strip a { font-size: 12px; padding: 4px 2px 5px; gap: 4px; }
  .tour { padding-top: 48px; }
  .stop { padding: 28px 0; gap: 20px; }
  .early { flex-direction: column; gap: 12px; }
  .keytable th, .keytable td { padding: 7px 9px; }
}

/* A phone on its side: the first screen is short, so the hero's text closes up to keep the button in it. */
@media (max-height: 480px) and (min-width: 561px) {
  .hero { padding-top: 14px; }
  .kicker { margin-bottom: 10px; }
  h1 { margin-bottom: 10px; }
  .lead { margin-bottom: 16px; }
}
/* Forced colours take gradients away and leave their boxes: the glows go. */
@media (forced-colors: active) {
  .stage::before, .jelly-spot::before { display: none; }
}
@media print {
  .theme-switch, .skip { display: none; }
  .surface, .stop, .window { break-inside: avoid; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .screen:not([hidden]) img { animation: fade-in .35s ease; }
  @keyframes fade-in { from { opacity: .3; } to { opacity: 1; } }
}
@media (prefers-reduced-motion: reduce) {
  .stage::before { transition: none; }
}
