/* Aurelia — the site wears the app's own default themes,
   from internal/theme/store.go: Aurelia Light and Aurelia Dark. */

@font-face {
  font-family: "Mona Sans";
  src: url("assets/fonts/mona-sans-latin.woff2") format("woff2");
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Aurelia Light */
:root {
  --bg: #ffffff;
  --sidebar: #f6f6f8;
  --bar: #fbfbfc;
  --surface: #f1f1f4;
  --hover: #e7e7ec;
  --border: #e4e4ea;
  --text: #17171c;
  --muted: #6b6b78;
  --accent: #0b7468;
  --accent-hover: #0a665b;
  --on-accent: #ffffff;
  --selection: #d4efe9;
  --shot-shadow: 0 1px 2px rgb(23 23 28 / 0.06), 0 10px 24px -14px rgb(23 23 28 / 0.28);
  --scheme: light;

  --sans: "Mona Sans", system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace;
  --radius: 8px;
  --side-w: 264px;
  --bar-h: 76px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --pad: clamp(16px, 4vw, 56px);
}

/* Aurelia Dark */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f0f12;
    --sidebar: #0a0a0c;
    --bar: #131317;
    --surface: #1b1b21;
    --hover: #25252d;
    --border: #24242b;
    --text: #ececf1;
    --muted: #9a9aa8;
    --accent: #7dd3c0;
    --accent-hover: #8fd9c9;
    --on-accent: #062019;
    --selection: #16302b;
    --shot-shadow: 0 1px 0 rgb(255 255 255 / 0.04) inset, 0 12px 24px -12px rgb(0 0 0 / 0.7);
    --scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f0f12;
  --sidebar: #0a0a0c;
  --bar: #131317;
  --surface: #1b1b21;
  --hover: #25252d;
  --border: #24242b;
  --text: #ececf1;
  --muted: #9a9aa8;
  --accent: #7dd3c0;
  --accent-hover: #8fd9c9;
  --on-accent: #062019;
  --selection: #16302b;
  --shot-shadow: 0 1px 0 rgb(255 255 255 / 0.04) inset, 0 12px 24px -12px rgb(0 0 0 / 0.7);
  --scheme: dark;
}
:root { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { color-scheme: dark; } }


/* Base */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
  scrollbar-color: var(--hover) var(--bg);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-variant-ligatures: no-common-ligatures;
}
::selection { background: var(--selection); color: var(--text); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p a, dd a, .dl-all a, .release-line a, .release-meta a, .foot-note a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
p a:hover, dd a:hover, .dl-all a:hover, .release-line a:hover, .release-meta a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { margin: 0; font-weight: 700; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
code { font-family: var(--mono); font-size: 0.86em; }
kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 0.05em 0.42em;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.8em;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 5px;
  white-space: nowrap;
}
.ic {
  width: 18px; height: 18px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.vh {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; left: 12px; top: 12px; z-index: 50;
  padding: 8px 12px; border-radius: var(--radius);
  background: var(--accent); color: var(--on-accent); font-weight: 600; text-decoration: none;
  transform: translateY(-150%);
}
.skip:focus { transform: none; }

/* Buttons, as the app draws them */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px;
  border: 1px solid transparent; border-radius: 999px;
  font: 600 15px/1 var(--sans);
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color 90ms linear, color 90ms linear, border-color 90ms linear;
}
.btn .ic { width: 16px; height: 16px; }
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-accent:hover { background: var(--accent-hover); }
.btn-quiet { background: var(--surface); color: var(--text); }
.btn-quiet:hover { background: var(--hover); }
.icon-btn {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px; padding: 0;
  border: 0; border-radius: 50%;
  background: transparent; color: var(--muted); cursor: pointer;
  transition: background-color 90ms linear, color 90ms linear;
}
.icon-btn:hover { background: var(--surface); color: var(--text); }

/* Brand */
.brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 15px; text-decoration: none; letter-spacing: -0.005em;
}
.logo { width: 22px; height: 22px; color: var(--accent); }

/* Shell: the app's window, sidebar and page */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); }
.topbar { display: none; }

.sidebar {
  position: sticky; top: 0;
  height: calc(100vh - var(--bar-h));
  height: calc(100dvh - var(--bar-h));
  display: flex; flex-direction: column;
  padding: 14px 10px 12px;
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  scrollbar-width: thin;
}
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 6px 16px; }
.side-close { display: none; }
.nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 11px;
  height: 36px; padding: 0 10px;
  border-radius: var(--radius);
  font-size: 15px; font-weight: 500; color: var(--text); text-decoration: none;
  transition: background-color 90ms linear, color 90ms linear;
}
.nav a .ic { color: var(--muted); transition: color 90ms linear; }
.nav a:hover { background: var(--surface); }
.nav a[aria-current="location"] { background: var(--surface); font-weight: 600; }
.nav a[aria-current="location"] .ic { color: var(--accent); }
.nav-group {
  margin: 20px 10px 6px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted);
}
.side-foot {
  margin-top: auto; padding-top: 12px;
  border-top: 1px solid var(--border);
  display: grid; gap: 8px;
}
.side-link {
  display: flex; align-items: center; gap: 11px; height: 36px; padding: 0 10px;
  border-radius: var(--radius); font-size: 15px; font-weight: 500; text-decoration: none;
}
.side-link .ic { color: var(--muted); }
.side-link:hover { background: var(--surface); }

.theme-switch {
  display: grid; grid-template-columns: repeat(3, 1fr);
  padding: 3px; margin: 0 4px;
  background: var(--surface); border-radius: 999px;
}
.theme-switch button {
  display: grid; place-items: center; height: 28px;
  border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer;
  transition: background-color 90ms linear, color 90ms linear;
}
.theme-switch button .ic { width: 16px; height: 16px; }
.theme-switch button:hover { color: var(--text); }
.theme-switch button[aria-checked="true"] { background: var(--bg); color: var(--text); box-shadow: 0 1px 2px rgb(0 0 0 / 0.18); }

.scrim { display: none; }

/* The page */
main { min-width: 0; padding-bottom: var(--bar-h); }
.screen {
  padding: clamp(56px, 8vw, 104px) var(--pad);
  border-top: 1px solid var(--border);
  display: grid; gap: 40px;
  align-content: start;
}
.screen h2 {
  font-size: clamp(32px, 3.4vw, 46px);
  line-height: 1.06;
  letter-spacing: -0.028em;
  font-stretch: 96%;
}
.screen h3 { font-size: 19px; letter-spacing: -0.01em; line-height: 1.25; }
.prose { display: grid; gap: 16px; max-width: 64ch; }
.prose h2 { margin-bottom: 4px; }
.prose p { color: var(--muted); font-size: 18px; }
.prose p:first-of-type { color: var(--text); }
.aside { color: var(--muted); font-size: 16px; max-width: 70ch; }

/* Hero */
.hero { border-top: 0; padding-top: clamp(28px, 4vw, 48px); gap: clamp(28px, 3.4vw, 44px); }
.hero-head {
  display: grid; grid-template-columns: auto minmax(0, 1fr);
  align-items: end; column-gap: clamp(28px, 4vw, 64px); row-gap: 20px;
}
.hero h1 {
  font-size: clamp(56px, 7.4vw, 104px);
  line-height: 0.86;
  letter-spacing: -0.04em;
  font-weight: 760;
  font-stretch: 92%;
  padding-bottom: 0.04em;
}
.hero-copy { display: grid; gap: 10px; max-width: 46rem; padding-bottom: 4px; }
.lede { font-size: clamp(20px, 1.7vw, 25px); line-height: 1.3; font-weight: 600; letter-spacing: -0.006em; }
.sub { color: var(--muted); font-size: 17px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }

/* Screenshots, framed as the window they are */
.shot { margin: 0; display: grid; gap: 12px; }
.shot-link { display: block; border-radius: 10px; cursor: zoom-in; }
.shot-link:hover img { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.shot img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  box-shadow: var(--shot-shadow);
  background: var(--surface);
}
.shot figcaption { font-size: 14px; color: var(--muted); padding-left: 2px; }

/* Split screens: text in a column beside the window */
.split { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.75fr); align-items: center; column-gap: clamp(32px, 4vw, 64px); }
.split-rev { grid-template-columns: minmax(0, 1.75fr) minmax(0, 0.8fr); }
.split-rev .prose { order: 2; }
.split-rev .shot { order: 1; }

/* Library gallery */
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
.gallery-lead { grid-column: 1 / -1; }

/* Facts: a quiet row of definitions, ruled like the app's settings */
.facts {
  margin: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--border);
}
.facts > div { padding: 16px 20px 0 0; }
.facts > div + div { padding-left: 20px; border-left: 1px solid var(--border); }
.facts dt { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.facts dd { margin: 0; font-size: 15px; color: var(--muted); line-height: 1.45; }

/* The memory meter: three bars on one 0–150 MB scale */
.meter {
  margin: 0; max-width: 980px;
  padding: 28px 28px 24px;
  background: var(--surface);
  border-radius: 12px;
  display: grid; gap: 18px;
}
.meter figcaption { font-size: 15px; font-weight: 600; }
.meter-rows { display: grid; gap: 12px; }
.meter-row {
  display: grid; grid-template-columns: 96px minmax(0, 1fr) 150px;
  align-items: center; gap: 16px;
}
.meter-label { font-size: 15px; color: var(--muted); }
.meter-value { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.meter-track { position: relative; height: 14px; border-radius: 999px; background: var(--hover); overflow: hidden; }
.meter-fill {
  position: absolute; top: 0; bottom: 0;
  left: calc(var(--from) / 150 * 100%);
  width: calc((var(--to) - var(--from)) / 150 * 100%);
  border-radius: 999px;
  background: var(--accent);
  transform-origin: left center;
}
.meter-range { background: color-mix(in srgb, var(--accent) 55%, var(--hover)); border-radius: 0 999px 999px 0; }
.meter-scale {
  display: flex; justify-content: space-between;
  margin-left: 112px; margin-right: 166px;
  font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums;
}
.meter-note { font-size: 14px; color: var(--muted); max-width: 70ch; }

/* Theme swatches, drawn like the previews in Settings ▸ Appearance */
.swatches {
  display: none;
  list-style: none; margin: 0; padding: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 14px;
  font-size: 13px; color: var(--muted);
}
.swatches li { display: grid; gap: 8px; }
.swatches li::before {
  content: "";
  aspect-ratio: 8 / 5;
  border-radius: 6px;
  border: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
  background:
    radial-gradient(circle at 50% 50%, var(--a) 0 3.2px, transparent 3.7px) 52% 86% / 12px 12px no-repeat,
    linear-gradient(var(--t), var(--t)) 6% 87% / 18% 2.5px no-repeat,
    linear-gradient(var(--r), var(--r)) 0 100% / 100% 24% no-repeat,
    linear-gradient(var(--m), var(--m)) 46% 52% / 36% 2.5px no-repeat,
    linear-gradient(var(--a), var(--a)) 46% 38% / 44% 2.5px no-repeat,
    linear-gradient(var(--m), var(--m)) 46% 24% / 40% 2.5px no-repeat,
    linear-gradient(var(--t), var(--t)) 40% 11% / 24% 3.5px no-repeat,
    linear-gradient(var(--m), var(--m)) 7% 36% / 14% 2.5px no-repeat,
    linear-gradient(var(--m), var(--m)) 7% 24% / 16% 2.5px no-repeat,
    linear-gradient(var(--t), var(--t)) 7% 11% / 18% 3.5px no-repeat,
    linear-gradient(var(--s), var(--s)) 0 0 / 30% 100% no-repeat,
    var(--b);
}

/* Keyboard */
.kb-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(32px, 4vw, 64px); align-items: start; }
.keys { width: 100%; border-collapse: collapse; font-size: 16px; }
.keys th, .keys td { padding: 11px 0; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.keys tr:first-child th, .keys tr:first-child td { border-top: 1px solid var(--border); }
.keys th { width: 42%; padding-right: 16px; font-weight: 400; }
.keys th kbd + kbd { margin-left: 3px; }
.keys td { color: var(--muted); }
.shot-small { max-width: 420px; justify-self: end; }
.desk-note { margin-top: -8px; }

/* Install */
.installer { display: grid; gap: 14px; max-width: 900px; }
.seg {
  display: inline-flex; justify-self: start; padding: 3px; gap: 2px;
  background: var(--surface); border-radius: 999px;
}
.seg button {
  height: 32px; padding: 0 14px;
  border: 0; border-radius: 999px; background: transparent;
  font: 600 14px/1 var(--sans); color: var(--muted); cursor: pointer;
  transition: background-color 90ms linear, color 90ms linear;
}
.seg button:hover { color: var(--text); }
.seg button[aria-selected="true"], .seg button[aria-pressed="true"] { background: var(--bg); color: var(--text); box-shadow: 0 1px 2px rgb(0 0 0 / 0.18); }
.cmd-panel { display: grid; gap: 10px; }
.cmd-panel[hidden] { display: none; }
.cmd-where { font-size: 14px; color: var(--muted); }
.cmd {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 8px 8px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.cmd code {
  flex: 1; min-width: 0;
  font-size: 15px; line-height: 1.5;
  overflow-x: auto; white-space: nowrap;
  scrollbar-width: none;
}
.cmd code::-webkit-scrollbar { display: none; }
.cmd .copy { flex: none; height: 36px; padding: 0 14px; }
.cmd-note { font-size: 15px; color: var(--muted); }
.cmd-note code { color: var(--text); }

.install-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 4vw, 64px); align-items: start; }
.caveats, .manual { display: grid; gap: 14px; align-content: start; }
.caveats > p, .release-line { color: var(--muted); font-size: 16px; }
.caveats dl { margin: 4px 0 0; display: grid; }
.caveats dl > div { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-top: 1px solid var(--border); }
.caveats dt { font-weight: 600; font-size: 15px; }
.caveats dd { margin: 0; font-size: 15px; color: var(--muted); }
.caveats dd code { color: var(--text); overflow-wrap: anywhere; }

.dl-groups { display: grid; }
.dl-group { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 16px; padding: 12px 0; border-top: 1px solid var(--border); }
.dl-group h4 { margin: 0; font-size: 15px; font-weight: 600; line-height: 36px; }
.dl-group ul { list-style: none; margin: 0; padding: 0; display: grid; }
.dl-group a {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  min-height: 36px; padding: 7px 10px; margin: 0 -10px;
  border-radius: var(--radius);
  font-size: 15px; text-decoration: none;
  transition: background-color 90ms linear;
}
.dl-group a:hover { background: var(--surface); }
.dl-group a:hover .dl-label { color: var(--accent); }
.dl-size { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dl-all { font-size: 15px; }

/* Release */
.tag { font-kerning: none; font-feature-settings: "kern" 0; letter-spacing: 0.01em; white-space: nowrap; }
.release-head { display: grid; gap: 10px; }
.release-meta { font-size: 18px; color: var(--muted); }
.release-meta strong { color: var(--text); font-weight: 600; }
.notes { margin: 0; padding: 0; list-style: none; display: grid; gap: 0; max-width: 72ch; }
.notes:empty { display: none; }
.notes li { position: relative; padding: 12px 0 12px 22px; border-top: 1px solid var(--border); color: var(--muted); font-size: 16px; }
.notes li::before {
  content: ""; position: absolute; left: 2px; top: 22px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}
.updates { display: grid; gap: 10px; max-width: 72ch; padding: 24px; background: var(--surface); border-radius: 12px; }
.updates p { color: var(--muted); font-size: 16px; }
.updates strong { color: var(--text); font-weight: 600; }
.updates code { color: var(--text); }

/* Footer */
.foot {
  padding: 40px var(--pad) 48px;
  border-top: 1px solid var(--border);
  display: grid; grid-template-columns: auto 1fr; gap: 16px 40px; align-items: center;
  font-size: 15px;
}
.foot-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.foot-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 24px; justify-self: end; }
.foot-links a { text-decoration: none; color: var(--text); }
.foot-links a:hover { color: var(--accent); }
.foot-note { grid-column: 1 / -1; color: var(--muted); font-size: 14px; max-width: 80ch; }

/* The player bar */
.playerbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  height: var(--bar-h);
  padding: 0 16px calc(env(safe-area-inset-bottom) * 0.5);
  display: grid; grid-template-columns: calc(var(--side-w) - 16px) minmax(0, 1fr) auto; align-items: center; gap: 24px;
  background: var(--bar);
  border-top: 1px solid var(--border);
}
.progress { position: absolute; left: 0; right: 0; top: -1px; height: 2px; }
.progress span {
  display: block; height: 100%; width: 100%;
  background: var(--accent);
  transform: scaleX(var(--p, 0)); transform-origin: left center;
}
.pb-now { display: flex; align-items: center; gap: 12px; min-width: 0; text-decoration: none; }
.pb-now img { width: 40px; height: 40px; border-radius: 9px; }
.pb-text { display: grid; min-width: 0; line-height: 1.25; }
.pb-title { font-weight: 600; font-size: 15px; }
.pb-sub { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-cmd { display: flex; align-items: center; gap: 12px; min-width: 0; justify-self: center; width: min(100%, 1000px); }
.seg-small button { height: 28px; padding: 0 11px; font-size: 13px; }
.cmd-bar { flex: 1; min-width: 0; padding: 4px 4px 4px 14px; border-radius: 999px; background: var(--bg); }
.cmd-bar code { font-size: 12.5px; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); padding-right: 24px; }
.cmd-bar code[hidden] { display: none; }
.cmd-bar .copy { height: 32px; padding: 0 12px; font-size: 14px; }
.pb-install { display: none; }
.pb-more { height: 36px; font-size: 14px; }

/* Copied */
.copy.is-done { background: var(--text); color: var(--bg); }

/* The app's page-in: a little way up, and in. Content is visible by default;
   the script only holds back screens below the fold until they arrive. */
@media (prefers-reduced-motion: no-preference) {
  .js .screen.is-waiting > * { opacity: 0.35; transform: translateY(8px); }
  .js .screen.is-in > * {
    opacity: 1; transform: none;
    transition: opacity 150ms var(--ease), transform 150ms var(--ease);
  }
  .js .screen.is-in > *:nth-child(2) { transition-delay: 40ms; }
  .js .screen.is-in > *:nth-child(3) { transition-delay: 80ms; }
  .js .screen.is-waiting .meter-fill { transform: scaleX(0); }
  .js .screen.is-in .meter-fill { transform: scaleX(1); transition: transform 600ms var(--ease) 120ms; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sidebar, .sidebar.is-open { transition: none !important; }
}

/* Narrower desktops */
@media (max-width: 1279px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .split-rev .prose { order: 0; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 20px; }
  .facts > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .pb-more span { display: none; }
  .pb-more { width: 36px; padding: 0; }
}

/* Phones and small tablets: the sidebar goes behind a button, as in the app */
@media (max-width: 1023px) {
  :root { --bar-h: 64px; }
  html { scroll-padding-top: 72px; }
  .shell { display: block; }
  .topbar {
    position: sticky; top: 0; z-index: 15;
    display: flex; align-items: center; gap: 8px;
    height: 56px; padding: 0 12px;
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    -webkit-backdrop-filter: saturate(140%) blur(12px);
    backdrop-filter: saturate(140%) blur(12px);
    border-bottom: 1px solid var(--border);
  }
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 40;
    width: min(300px, 84vw); height: auto;
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 170ms var(--ease), visibility 0s linear 170ms;
    box-shadow: 12px 0 40px -12px rgb(0 0 0 / 0.4);
  }
  .sidebar.is-open { transform: none; visibility: visible; transition: transform 170ms var(--ease), visibility 0s; }
  .side-close { display: inline-grid; }
  .scrim {
    position: fixed; inset: 0; z-index: 30;
    background: rgb(0 0 0 / 0.4);
  }
  .scrim:not([hidden]) { display: block; }
  .screen { gap: 28px; }
  .hero-head { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { font-size: clamp(56px, 16vw, 88px); }
  .gallery { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .swatches { display: grid; }
  .kb-layout { grid-template-columns: minmax(0, 1fr); }
  .shot-small { justify-self: start; }
  .install-grid { grid-template-columns: minmax(0, 1fr); }
  .meter { padding: 20px 18px; }
  .meter-row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
  .meter-track { grid-column: 1 / -1; grid-row: 2; }
  .meter-scale { margin: 0; }
  .playerbar { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding-left: 12px; padding-right: 12px; }
  .pb-cmd, .pb-more { display: none; }
  .pb-install { display: inline-flex; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .prose p { font-size: 17px; }
  .swatches { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 10px; font-size: 12px; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .facts > div, .facts > div + div { padding: 14px 0 0; border-left: 0; }
  .facts > div + div { border-top: 1px solid var(--border); }
  .facts { row-gap: 14px; }
  .cmd { flex-direction: column; align-items: stretch; padding: 14px; }
  .cmd code { white-space: pre-wrap; overflow-wrap: anywhere; }
  .cmd .copy { align-self: start; }
  .caveats dl > div, .dl-group { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .dl-group h4 { line-height: 1.4; }
  .keys th { width: auto; }
  .keys tr { display: grid; padding: 10px 0; border-bottom: 1px solid var(--border); }
  .keys tr:first-child { border-top: 1px solid var(--border); }
  .keys th, .keys td, .keys tr:first-child th, .keys tr:first-child td { padding: 2px 0; border: 0; }
  .foot { grid-template-columns: minmax(0, 1fr); }
  .foot-links { justify-self: start; }
}
