/* StonePi install site — same tokens as the on-device chrome (apps/dashboard/app/static/css/app.css). */
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Sora"; font-weight: 600; font-display: swap; src: url("fonts/sora-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Sora"; font-weight: 700; font-display: swap; src: url("fonts/sora-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

/* Colours come from tokens.css (generated from the design system by
   packages/stonepi_brand/build_tokens.py, linked before this file). */
:root {
  --code-bg: var(--surface);
  --code-ink: var(--text);
  --gutter: 16px;
  --tap: 44px;
}
* { box-sizing: border-box; }
/*
 * iOS Safari rubber-bands the *root* scroller even with overscroll-behavior.
 * Lock html to the dynamic viewport and scroll on body instead (same idea as
 * the on-device dashboard chrome).
 */
html {
  -webkit-text-size-adjust: 100%;
  background: var(--paper);
  height: 100%;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.55 var(--chrome);
  height: 100%;
  max-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
}
body > main { flex: 1 0 auto; width: 100%; min-height: 0; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 var(--gutter); }

.top {
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 12px; }
/* Compact lockup: flat mark (dark / light variant) + wordmark, Pi in accent-text. */
.brand {
  display: inline-flex; align-items: center; gap: 8px;
  font: var(--type-wordmark); letter-spacing: var(--type-wordmark-tracking); color: var(--text); text-decoration: none;
}
.brand b { font-weight: inherit; color: var(--accent-text); }
.brand-mark { width: 28px; height: 28px; flex: none; }
.brand-mark.is-light { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .brand-mark.is-dark { display: none; }
  :root:not([data-theme="dark"]) .brand-mark.is-light { display: block; }
}
:root[data-theme="light"] .brand-mark.is-dark { display: none; }
:root[data-theme="light"] .brand-mark.is-light { display: block; }
.top nav { display: flex; gap: 18px; font-size: 15px; }
.top nav a { color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
/* Same card-and-glyph icons as each page's browser tab icon. */
.nav-icon {
  width: 17px; height: 17px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.top nav a[aria-current="page"], .top nav a:hover { color: var(--ink); }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0; }
code, kbd, pre { font-family: var(--font-mono); }
h1 { font-size: clamp(34px, 7vw, 54px); letter-spacing: -0.01em; }
h2 { font-size: 26px; }
h3 { font-size: 19px; font-family: var(--chrome); }
p { margin: 0 0 12px; }
.lede { font-size: 19px; color: var(--muted); max-width: 34em; margin-top: 16px; }
.muted { color: var(--muted); }
.small { font-size: 15px; }

.hero { padding: 72px 0 48px; }
.hero .eyebrow { font: 600 13px/1 var(--chrome); letter-spacing: 0.22em; color: var(--accent); margin-bottom: 18px; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--tap); padding: 0 22px; border-radius: 999px;
  font: 600 16px/1 var(--chrome); text-decoration: none;
  border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink);
}
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink); filter: none; }

.cards { display: grid; gap: 14px; grid-template-columns: 1fr; margin: 8px 0 56px; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px;
}
.card-icon {
  display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 12px;
  border-radius: 12px; background: var(--wash); color: var(--accent);
}
.card-icon svg {
  width: 22px; height: 22px;
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.card h3 { margin-bottom: 6px; }
.card:has(.card-icon) { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; align-content: start; }
.card:has(.card-icon) .card-icon, .card:has(.card-icon) h3 { margin: 0; }
.card:has(.card-icon) p { grid-column: 1 / -1; margin-top: 10px; }

@media (min-width: 1024px) {
  .hero-split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 48px; align-items: center; }
}
.card p { font-size: 15px; color: var(--muted); margin: 0; }

.section { padding: 8px 0 40px; }
.section > h2 { margin-bottom: 14px; }

/* Numbered install steps */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 36px 56px;
  border-left: 1px solid var(--line);
  margin-left: 18px;
}
@media (max-width: 519px) {
  .steps > li { padding-left: 34px; margin-left: 16px; }
  .steps > li::before { left: -16px; width: 32px; height: 32px; font-size: 14px; }
}
.steps > li:last-child { border-left-color: transparent; padding-bottom: 8px; }
.steps > li::before {
  content: counter(step);
  position: absolute; left: -19px; top: -4px;
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--paper); border: 1px solid var(--ink);
  font: 600 16px/1 var(--chrome);
}
.steps > li > h3 { font-family: var(--font-display); font-size: 23px; margin-bottom: 10px; }
.steps ul, .steps ol { padding-left: 20px; margin: 8px 0 12px; }
.steps li li { margin-bottom: 4px; }

.settings {
  display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 0;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  margin: 12px 0; font-size: 15px; overflow: hidden;
}
.settings > div { padding: 10px 14px; border-top: 1px solid var(--line); }
.settings > div:nth-child(-n+2) { border-top: 0; }
.settings > div:nth-child(odd) { color: var(--muted); }
.settings code { font-size: 14px; }

.who { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin: 12px 0 4px; }
.who label { font-size: 14px; color: var(--muted); display: grid; gap: 4px; }
.who input {
  min-height: var(--tap); padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  font: 16px var(--font-mono); width: 100%;
}

code { font-family: var(--font-mono); font-size: 0.92em; background: var(--wash); padding: 1px 6px; border-radius: 6px; overflow-wrap: anywhere; }

.cmd {
  position: relative; display: flex; align-items: stretch;
  background: var(--code-bg); color: var(--code-ink);
  border: 1px solid var(--border); border-radius: var(--radius-md); margin: 12px 0; overflow: hidden;
}
.cmd pre {
  margin: 0; padding: 14px 16px; flex: 1; min-width: 0;
  font: 14px/1.5 var(--font-mono); white-space: pre-wrap; overflow-wrap: anywhere;
}
.cmd button {
  flex: none; border: 0; border-left: 1px solid var(--border);
  background: transparent; color: inherit; font: 600 13px/1 var(--chrome);
  padding: 0 16px; min-width: 76px; cursor: pointer;
}
.cmd button:hover { background: var(--surface-hover); }


kbd {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85em;
  line-height: 1.35;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 1px 0 var(--line);
  color: var(--ink);
  white-space: nowrap;
}

/* OS-aware Imager download box */
.download-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin: 14px 0 16px;
}
.download-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}
.download-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  background: var(--wash);
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.download-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  display: inline-block;
}
.download-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin: 12px 0 14px;
}
.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font: 600 16px/1 var(--chrome);
  text-decoration: none;
  background: var(--accent);
  color: var(--accent-ink);
  border: 1px solid var(--accent);
}
.download-btn:hover {
  filter: brightness(1.08);
}
.download-btn svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.download-meta {
  font-size: 14px;
  color: var(--muted);
}
.download-alts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  font-size: 14px;
  color: var(--muted);
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.download-alts a {
  color: var(--ink);
  font-weight: 500;
}

/* OS Switcher for terminal / command prompt */
.os-tabs-wrap {
  margin: 14px 0 16px;
}
.os-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.os-tab {
  font: 500 14px/1 var(--chrome);
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
  cursor: pointer;
  max-width: 100%;
  text-align: left;
  line-height: 1.25;
}
/* Hover only where there's a real pointer: on iPhone a tap leaves :hover stuck on. */
@media (hover: hover) {
  .os-tab:hover {
    border-color: var(--ink);
    color: var(--ink);
  }
}
.os-tab:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.os-tab[aria-expanded="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
  font-weight: 600;
}
.os-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
}
.os-panel[hidden] {
  display: none;
}
.os-panel ol {
  margin: 8px 0;
  padding-left: 20px;
}
.os-panel li {
  margin-bottom: 6px;
}
.os-panel p {
  margin-bottom: 8px;
}
.os-panel p:last-child {
  margin-bottom: 0;
}

/* Guided helper boxes in step 6 */
.step-guide-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  margin: 14px 0;
}
.step-guide-box > h4 {
  font: 600 15px/1.3 var(--chrome);
  margin: 0 0 8px;
  color: var(--ink);
}
.terminal-sample {
  margin: 8px 0 10px;
  padding: 10px 14px;
  background: var(--code-bg);
  color: var(--code-ink);
  border-radius: 8px;
  font: 13px/1.5 var(--font-mono);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Coffee break card */

details { border-top: 1px solid var(--line); padding: 12px 0; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary {
  cursor: pointer; font-weight: 500; min-height: 28px;
  list-style: none; display: flex; align-items: center; gap: 12px;
}
summary::-webkit-details-marker { display: none; }
summary::before {
  content: ""; flex: none; width: 7px; height: 7px; margin: 0 2px;
  border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted);
  transform: rotate(-45deg); transition: transform 0.15s ease;
}
details[open] > summary::before { transform: rotate(45deg); }
summary:hover { color: var(--accent); }
details > *:not(summary) { margin-top: 10px; margin-left: 25px; }

.steps > li, #help { scroll-margin-top: 24px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* Small, quick feedback on things you can press. */
.btn, .toc a, .cmd button { transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease, filter 0.12s ease; }

/* Phones: less empty space around the hero. */
@media (max-width: 639px) {
  .hero { padding: 40px 0 28px; }
  .cards { margin-bottom: 32px; }
}

/* Install guide: step index beside the steps on wide screens. */
.guide { display: block; }
.toc { display: none; }
@media (min-width: 1024px) {
  .guide { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 48px; align-items: start; }
  .toc {
    display: block; position: sticky; top: 24px;
    font-size: 14px; border-left: 1px solid var(--line);
  }
  .toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
  .toc li { counter-increment: toc; }
  .toc li.toc-phase {
    counter-increment: none; padding: 16px 0 6px 14px;
    font: 600 11px/1.2 var(--chrome); letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  }
  .toc li.toc-phase:first-child { padding-top: 0; }
  .toc a {
    display: block; padding: 6px 0 6px 14px; margin-left: -1px;
    border-left: 2px solid transparent; color: var(--muted); text-decoration: none;
  }
  .toc a::before { content: counter(toc) ". "; }
  .toc a:hover { color: var(--ink); }
  .toc a[aria-current="step"] { color: var(--text); border-left-color: var(--border-control); font-weight: 600; }
  .toc .toc-extra { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
  .toc .toc-extra a::before { content: none; }
  /* "If something goes wrong" lines up with the step text, not the step circles. */
  .guide .section { margin-left: 74px; }
}

/* Laptop tier: use the width, and spend less height on padding. */
@media (min-width: 1024px) {
  .wrap { max-width: 1040px; }
  .lede { max-width: 38em; }
  .steps > li > p, .steps > li > ul, .steps > li > .sp-callout, .section > p { max-width: 44em; }
  .settings, .who { max-width: 640px; }
}
@media (min-width: 1024px) and (max-height: 920px) {
  .top .wrap { min-height: 56px; }
  .hero { padding: 24px 0 28px; }
  h1 { font-size: 44px; }
  .lede { margin-top: 12px; font-size: 18px; }
  .actions { margin-top: 20px; }
  .cards { margin-bottom: 28px; }
  .card { padding: 16px 18px; }
  .card-icon { width: 36px; height: 36px; }
  .hero-split { padding-bottom: 16px; }
  .cards { margin-bottom: 12px; }
  .foot { padding: 12px 0 14px; }
  .steps > li { padding-bottom: 28px; }
}

.foot { border-top: 1px solid var(--line); padding: 24px 0 calc(36px + env(safe-area-inset-bottom, 0px)); font-size: 14px; color: var(--muted); }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.foot a { color: var(--muted); }

@media (max-width: 639px) {
  .foot { padding: 20px 0 calc(32px + env(safe-area-inset-bottom, 16px)); }
  .foot .wrap { flex-direction: column; align-items: flex-start; gap: 8px; }
}


/* ── Home page: phone shots, app grid, showcase (design system tokens) ── */
.wrap.home { max-width: 1040px; }
.phone { margin: 0; display: grid; gap: 12px; justify-items: center; }
.phone img {
  display: block; width: 250px; max-width: 100%; height: auto;
  border-radius: 34px; border: 7px solid var(--surface-hover);
  box-shadow: 0 0 0 1px var(--border), var(--shadow-overlay);
  background: var(--canvas);
}
.phone figcaption { font: var(--type-small); color: var(--text-muted); text-align: center; max-width: 250px; }

.showcase { margin: 48px 0; }
.showcase > :last-child { margin-bottom: 0; }
.showcase h2 { font: var(--type-title-2); letter-spacing: var(--type-title-2-tracking); margin-bottom: 6px; }
.showcase > .muted { margin: 0 0 20px; max-width: 40rem; }
/* Home: "Built in" platform features, lighter than the app cards (no borders). */
.builtin { margin: 48px 0; }
.builtin h2 { font: var(--type-title-2); letter-spacing: var(--type-title-2-tracking); margin-bottom: 6px; }
.builtin > .muted { margin: 0 0 20px; max-width: 40rem; }
.feature-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px 28px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.feature-list li { display: flex; gap: 14px; align-items: flex-start; }
.feature-list .card-icon { flex: none; margin: 0; }
.feature-list h3 { font: var(--type-title-3); margin: 0 0 2px; }
.feature-list p { margin: 0; font: var(--type-small); color: var(--text-muted); }

/* Two Home shots side by side (light and dark) with one caption under both. */
.shots-pair { margin: 0; display: grid; gap: 16px; justify-items: center; }
.shots-pair + .shots-pair { margin-top: 48px; }
.shots { display: flex; justify-content: center; gap: 40px; }
.shots-pair figcaption { font: var(--type-small); color: var(--text-muted); text-align: center; }
/* App screens: always one row of three; on phones the row swipes sideways. */
.shots--three { width: 100%; justify-content: center; gap: 32px; }
@media (max-width: 759px) {
  .shots { gap: 12px; width: 100%; }
  .shots--three {
    justify-content: flex-start; overflow-x: auto; scroll-snap-type: x mandatory;
    margin: 0 calc(-1 * var(--gutter)); padding: 4px var(--gutter) 12px; width: auto;
  }
  .shots--three .phone { flex: 0 0 200px; scroll-snap-align: center; }
  .shots .phone { flex: 0 1 calc(50% - 6px); }
  .shots .phone img { width: 100%; max-width: 220px; border-width: 5px; border-radius: 26px; }
}

/* Homepage hero: a little air above the title
   (overrides the older one-screen compaction for short desktop windows). */
.home .hero { padding: 64px 0 0; }
@media (min-width: 1024px) and (max-height: 920px) { .home .hero { padding-top: 56px; } }
@media (max-width: 639px) { .home .hero { padding-top: 32px; } }

/* Callout (same as stonepi_brand components.css .sp-callout; this site loads tokens only). */
.sp-callout { display: flex; gap: var(--space-3); align-items: flex-start; margin: 14px 0; padding: var(--space-3) var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-raised); color: var(--text); font: var(--type-body); max-width: 44em; }
.sp-callout > svg { flex: none; width: 20px; height: 20px; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; color: var(--text-muted); }
.sp-callout--warning { background: var(--tint-ember-bg); border-color: transparent; }
.sp-callout--warning > svg { color: var(--warning-text); }
.sp-callout p { margin: 0; }
.sp-callout p + p { margin-top: var(--space-2); }
.sp-callout strong { font-weight: 600; }
.script-link { margin: -4px 0 14px; font: var(--type-small); color: var(--text-muted); }

/* Hero: the light Home screen to the right of the title (from 1024px, where the hero
   splits); the headline's top lines up with the top of the phone. */
.hero-phone { justify-self: center; }
/* Live date + greeting drawn over the Home screenshot (text blanked out of the image).
   Inset matches the img border; sizes are in cqw of the 500px-wide source, so they scale with it. */
.hero-screen { position: relative; }
.hero-greet { position: absolute; inset: 7px; container-type: inline-size; pointer-events: none; }
.hero-greet span { position: absolute; left: 4.1cqw; white-space: nowrap; line-height: 1; }
.hero-greet [data-hero-date] { top: 20.2cqw; font: 600 3.57cqw/1 var(--font-sans); letter-spacing: .012em; text-transform: uppercase; color: var(--text-muted); }
.hero-greet [data-hero-hello] { top: 25.36cqw; font: 600 6.97cqw/1 var(--font-display); letter-spacing: -.02em; color: var(--text); }
/* The ten app tiles in the screenshot are buttons: invisible over the image, with a ring on the
   picked one. Same inset and cqw scale as the greeting; tiles are 143×131 at x 23/179/335, y 281/425/569/713. */
.hero-tiles { position: absolute; inset: 7px; container-type: inline-size; }
.hero-tiles button {
  position: absolute; width: 28.6cqw; height: 26.2cqw; padding: 0; border: 0; border-radius: 4cqw;
  background: transparent; color: transparent; font-size: 0; cursor: pointer;
  transition: box-shadow 0.12s ease;
}
.hero-tiles button:nth-child(3n+1) { left: 4.6cqw; }
.hero-tiles button:nth-child(3n+2) { left: 35.8cqw; }
.hero-tiles button:nth-child(3n) { left: 67cqw; }
.hero-tiles button:nth-child(-n+3) { top: 56.2cqw; }
.hero-tiles button:nth-child(n+4):nth-child(-n+6) { top: 85cqw; }
.hero-tiles button:nth-child(n+7):nth-child(-n+9) { top: 113.8cqw; }
.hero-tiles button:nth-child(n+10) { top: 142.6cqw; }
.hero-tiles button:hover { box-shadow: 0 0 0 1.5px var(--border-control); }
.hero-tiles button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--accent); }
.hero-tiles button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* "Ten apps" beside the phone: every app's card is in the page, stacked in one grid cell so the
   stack is always as tall as the longest; only the picked one is visible. */
.hero-app-head, .hero-app-stack { max-width: 32rem; }
.hero-app-title { font: var(--type-title-2); letter-spacing: var(--type-title-2-tracking); margin: 0 0 4px; }
.hero-app-intro { margin: 0 0 14px; font: var(--type-body); color: var(--text-muted); }
.hero-app-stack { display: grid; }
.hero-app-card {
  grid-area: 1 / 1; visibility: hidden; display: flex; gap: 12px; align-items: flex-start;
  padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface-raised);
}
.hero-app-card.is-on { visibility: visible; }
.hero-app-card img { flex: none; width: 40px; height: 40px; border-radius: 22%; }
.hero-app-card h3 { font: var(--type-title-3); margin: 0 0 2px; }
.hero-app-card p { margin: 0; font: var(--type-small); line-height: 1.5; color: var(--text-muted); }
.hero-app-card .hero-app-note { margin-top: 8px; font: var(--type-label); color: var(--tint-sand-fg); }
/* Region pill beside an app name (apps that only work in one country for now). */
.hero-app-card .region { display: inline-block; vertical-align: 2px; margin-left: 6px; padding: 2px 7px; border-radius: var(--radius-pill);
  font: var(--type-label); letter-spacing: .02em; color: var(--tint-sand-fg); background: var(--tint-sand-bg); }
/* Caption under the phone; "Click" with a mouse, "Tap" on touch screens. */
.hero-app-hint { display: flex; align-items: center; justify-content: center; gap: 8px; max-width: none; }
.hero-app-hint .v-click { display: none; }
@media (hover: hover) and (pointer: fine) {
  .hero-app-hint .v-tap { display: none; }
  .hero-app-hint .v-click { display: inline; }
}
.hero-app-hint svg { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* The markup is in phone order (headline, "Ten apps", phone, card); from 1024px the phone moves
   to the right-hand column and the rest stacks on the left. */
@media (min-width: 1024px) {
  .hero-split { align-items: start; row-gap: 0; grid-template-rows: auto auto auto 1fr; }
  .hero-split > div:first-child { grid-column: 1; grid-row: 1; }
  .hero-app-head { grid-column: 1; grid-row: 2; margin-top: 40px; }
  .hero-app-stack { grid-column: 1; grid-row: 3; }
  .hero-split > .hero-phone { grid-column: 2; grid-row: 1 / span 4; }
}
/* Below that, one column: the tiles and the picked app's card fit on one phone screen
   (iPhone mini: ~375×630 inside Safari). */
@media (max-width: 1023px) {
  .hero-split { display: grid; gap: 0; }
  .hero-phone img { width: 220px; }
  .hero-split > div:first-child { margin-bottom: 28px; }
  .hero-app-intro { margin-bottom: 20px; }
  .hero-app-stack { justify-self: center; width: 100%; margin-top: 16px; }
}

/* Home: "AI, your way" panel (providers as text chips, no logos). */
.ai { margin: 48px 0; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface-raised);
  display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; }
.ai .card-icon { margin: 0; }
/* Icon and title share the first row; the text sits under the title, or full width on phones. */
.ai { row-gap: 6px; }
.ai h2 { font: var(--type-title-2); letter-spacing: var(--type-title-2-tracking); margin: 0; align-self: center; }
.ai > div { grid-column: 2; }
.ai p { margin: 0; color: var(--text-muted); max-width: 46rem; }
.ai-providers { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ai-providers li { font: var(--type-label); letter-spacing: .02em; padding: 5px 10px; border-radius: var(--radius-pill); border: 1px solid var(--border); color: var(--text); background: var(--surface); }
.ai-providers .soon { color: var(--tint-sand-fg); background: var(--tint-sand-bg); border-color: transparent; }
@media (max-width: 519px) { .ai { column-gap: 12px; row-gap: 12px; padding: 20px 16px; } .ai > div { grid-column: 1 / -1; } }

/* Home: closing call to action after the story. */
.closing { margin: 8px 0 64px; padding: 32px 24px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface-raised); text-align: center; }
.closing h2 { font: var(--type-title-2); letter-spacing: var(--type-title-2-tracking); margin: 0 0 6px; }
.closing > .muted { margin: 0 auto; max-width: 34rem; }
.closing .actions { justify-content: center; margin-top: 20px; }
.closing .small { margin: 18px auto 0; }

/* ── Home page: "Beyond the phone" device drawings (TRMNL, Car Thing; Pebble is a photo). Pure CSS; screens are
   800×480 and sized in cqw so each scales as one image. ── */
.devices { margin: 48px 0; }
.devices h2 { font: var(--type-title-2); letter-spacing: var(--type-title-2-tracking); margin-bottom: 6px; }
.devices > .muted { margin: 0 0 24px; max-width: 40rem; }
.device-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .device-grid { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; row-gap: 0; }
  .device { grid-row: span 2; grid-template-rows: subgrid; } }
.device {
  margin: 0; padding: 28px 24px 20px; border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface-raised); display: grid; gap: 18px; align-content: start;
}
.device h3 { font: var(--type-title-3); margin: 0 0 4px; }
.device p { margin: 0; font: var(--type-small); color: var(--text-muted); }
/* The Ripple family board's text (shown with its TRMNL screen): the app icon beside plain text. */
.device .device-extra { display: flex; gap: 10px; align-items: flex-start; }
.device .device-extra img { flex: none; border-radius: 7px; }
.device .device-extra strong { color: var(--text); font-weight: 600; }
.device .specs { margin-top: 10px; font: var(--type-label); letter-spacing: .02em; color: var(--text-faint); }
.device .tag { display: inline-block; margin-top: 12px; font: var(--type-label); letter-spacing: var(--type-label-tracking);
  text-transform: uppercase; color: var(--tint-sand-fg); background: var(--tint-sand-bg); padding: 3px 8px; border-radius: var(--radius-pill); }
.device .stage { display: grid; place-items: center; min-height: 250px; padding: 8px 0; }
/* Pebble: a photo of the round device; across both columns beside its text on wider screens. */
/* The shadow is a box-shadow on the round wrapper, not a filter on the image: Chrome could paint a
   filtered lazy image only partly until something made it repaint. */
.pebble { width: min(70%, 220px); aspect-ratio: 1; position: relative; container-type: inline-size; border-radius: 50%;
  box-shadow: 8px 14px 18px -2px rgba(0,0,0,.26); }
.pebble img { display: block; width: 100%; height: 100%; border-radius: 50%; }
/* The live time, where the photo's own clock was (painted out of the image). */
/* Tap-to-emote: the mascot (with its glow) is its own layer over the picture, so it can move. */
.pebble-mascot { position: absolute; left: 23.33%; top: 26.94%; width: 53.89%; aspect-ratio: 1; padding: 0; border: 0; border-radius: 50%;
  background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.pebble-mascot img { display: block; width: 100%; height: 100%; pointer-events: none; }
.pebble-mascot:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pebble-mascot.is-hop img { animation: peb-hop .7s cubic-bezier(.3,.7,.4,1); }
.pebble-mascot.is-wiggle img { animation: peb-wiggle .8s ease-in-out; }
.pebble-mascot.is-squish img { animation: peb-squish .6s ease-out; }
.pebble-mascot.is-spin img { animation: peb-spin .8s ease-in-out; }
@keyframes peb-hop { 0%, 100% { transform: none; } 20% { transform: scale(1.06, .92) translateY(3%); } 50% { transform: scale(.96, 1.06) translateY(-12%); } 75% { transform: scale(1.03, .97); } }
@keyframes peb-wiggle { 0%, 100% { transform: none; } 20% { transform: rotate(-9deg); } 40% { transform: rotate(8deg); } 60% { transform: rotate(-6deg); } 80% { transform: rotate(4deg); } }
@keyframes peb-squish { 0%, 100% { transform: none; } 30% { transform: scale(1.14, .86); } 60% { transform: scale(.94, 1.06); } }
@keyframes peb-spin { 0% { transform: none; } 100% { transform: rotate(360deg); } }
/* Reduce Motion: no hopping or spinning, just a soft glow so the nudge still answers. */
@keyframes peb-glow { 0%, 100% { filter: none; } 35% { filter: brightness(1.25) drop-shadow(0 0 1.2cqw rgba(255,236,190,.55)); } }
@media (prefers-reduced-motion: reduce) {
  .pebble-mascot[class*="is-"] img { animation: peb-glow .9s ease-in-out !important; }
}
.pebble-cap { position: absolute; left: 50%; top: 19.3cqw; transform: translate(-50%, -50%); padding: .7cqw 2cqw; border-radius: 99px;
  background: #0f1610; color: #dcded8; font: 500 2.9cqw/1.2 var(--font-sans); white-space: nowrap; pointer-events: none; transition: background .2s; }
.pebble-cap.is-emote { background: #3b3322; color: #f3e6c8; }
.device .tap-hint { margin: 12px 0 0; font: var(--type-small); color: var(--text-muted); text-align: left; }
.device--wide .tap-hint { white-space: nowrap; }
.pebble-time { position: absolute; left: 50%; top: 13.8cqw; transform: translate(-50%, -50%);
  font: 500 4.4cqw/1 var(--font-sans); letter-spacing: .02em; color: #ecebe6; pointer-events: none; }
@media (min-width: 760px) { .device--wide { grid-column: 1 / -1; grid-row: auto; grid-template-rows: none;
  grid-template-columns: minmax(0, 210px) 1fr; align-items: center; gap: 32px; margin-top: 20px; }
  .device--wide .stage { min-height: 0; } .device--wide .pebble { width: 100%; } }

/* Shared 800×480 screen: content is sized in cqw so it scales as one image. */
.dev-screen { aspect-ratio: 5 / 3; container-type: inline-size; overflow: hidden; position: relative; }

/* ── TRMNL OG: flat white frame 171×116 mm, even thin bezel, deeper chin with the name ── */
.trmnl {
  width: min(100%, 380px); aspect-ratio: 171 / 116; box-sizing: border-box;
  padding: 3.4% 3.4% 0; border-radius: 3.5%/5.2%;
  background: linear-gradient(180deg, #fbfbfa, #ecebe8);
  box-shadow: 0 0 0 1px rgba(0,0,0,.07), 0 1px 0 #fff inset, 0 -1px 0 rgba(0,0,0,.05) inset,
    10px 16px 26px -10px rgba(0,0,0,.28), 2px 4px 8px -3px rgba(0,0,0,.14);
  display: flex; flex-direction: column;
}
.trmnl .dev-screen { width: 100%; background: #ecebe7; color: #1a1a1a; font-family: var(--font-sans);
  box-shadow: 0 0 0 1px #d6d4cf, 0 1px 2px rgba(0,0,0,.06) inset; filter: grayscale(1); }
.trmnl .chin { flex: 1; display: grid; place-items: center; font: 600 7px/1 var(--font-display); letter-spacing: .32em; color: #8d8b86; padding-left: .32em; }
/* Ripple family board on the TRMNL (second page): Ripple's 1-bit display, photos pre-dithered. */
.trmnl .ct-pages { cursor: grab; }
.rb { display: flex; flex-direction: column; color: #000; font-family: var(--font-sans); }
.rb-head { height: 5.5cqw; flex: none; display: flex; align-items: center; justify-content: space-between; gap: 2cqw; padding: 0 2cqw; border-bottom: .375cqw solid #000; }
.rb-head b { font: 700 2.6cqw/1 var(--font-sans); }
.rb-head span { font: 400 2.1cqw/1 var(--font-sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.rb-main { flex: 1; display: flex; min-height: 0; }
/* Each photo takes exactly half the area (positioned, not grid rows: Safari let the first photo
   keep its own height there and pushed the second one out of view). */
.rb-photos { width: 47cqw; flex: none; position: relative; }
/* Shown well below panel size, so scale smoothly: pixel-exact scaling turns the dither into noise. */
.rb-photos img { position: absolute; left: 0; width: 100%; height: calc(50% - .25cqw); object-fit: cover; mix-blend-mode: multiply; } /* white takes the paper's tone */
.rb-photos img:first-child { top: 0; } .rb-photos img:last-child { bottom: 0; }
.rb-posts { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rb-post { padding: 1.25cqw 2cqw; border-bottom: .25cqw solid #000; display: flex; flex-direction: column; gap: .5cqw; min-height: 0; overflow: hidden; }
.rb-post:last-child { border-bottom: 0; flex: 1; }
.rb-meta { font: 400 2.1cqw/1.2 var(--font-sans); white-space: nowrap; }
.rb-meta b { font-weight: 700; }
.device .rb-post p { margin: 0; font: 400 2.5cqw/1.3 var(--font-sans); color: #000; }
.device .rb-post .rb-cap { font-style: italic; }
/* The TRMNL's page dots sit under the device. */
/* A Web page Display on the TRMNL: a Homepage dashboard captured and converted to e-ink greys. */
.tw { padding: 2.6cqw 3cqw 3.4cqw; box-sizing: border-box; color: #111; font-family: var(--font-sans); display: flex; flex-direction: column; justify-content: space-between; gap: 1.6cqw; }
.tw-res { display: flex; justify-content: space-between; gap: 2cqw; font: 400 1.9cqw/1.2 var(--font-sans); color: #444; }
.tw-res span { display: grid; grid-template-columns: auto 1fr; column-gap: 1cqw; align-items: center; }
.tw-res b { font-weight: 700; color: #111; }
.tw-res i { grid-row: span 2; width: 1.2cqw; height: 4cqw; border: .25cqw solid #111; border-radius: .4cqw; background: linear-gradient(to top, #111 var(--v), transparent var(--v)); }
.tw-search { border: .3cqw solid #111; border-radius: 1cqw; padding: 1.1cqw 1.6cqw; font: 400 1.9cqw/1 var(--font-sans); color: #666; }
.tw h5 { margin: .6cqw 0 0; font: 700 2.6cqw/1 var(--font-sans); }
.tw-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6cqw; }
.tw-card { border: .3cqw solid #111; border-radius: 1.2cqw; padding: 1.4cqw 1.6cqw; display: flex; flex-direction: column; gap: 1cqw; }
.tw-title { display: flex; align-items: center; gap: 1.2cqw; }
.tw-title > div { display: flex; flex-direction: column; gap: .3cqw; min-width: 0; }
.tw-title b { display: block; font: 700 2.2cqw/1.2 var(--font-sans); }
.tw-title small { font: 400 1.6cqw/1.2 var(--font-sans); color: #555; }
.tw-ic { width: 3.6cqw; height: 3.6cqw; border-radius: .8cqw; background: repeating-linear-gradient(45deg, #111 0 .4cqw, transparent .4cqw .8cqw); flex: none; }
.tw-card dl { margin: 0; display: grid; grid-template-columns: repeat(3, auto 1fr); gap: .4cqw 1cqw; font: 400 1.7cqw/1.2 var(--font-sans); color: #444; }
.tw-card dd { margin: 0; font-weight: 700; color: #111; }
.tw-svc { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2cqw; }
.tw-svc span { border: .25cqw solid #111; border-radius: 1cqw; padding: 1.1cqw 1.2cqw; display: flex; flex-direction: column; gap: .5cqw; font: 700 1.9cqw/1.15 var(--font-sans); }
.tw-svc i { width: 1.2cqw; height: 1.2cqw; border-radius: 50%; background: #111; }
.tw-svc em { font: 400 1.6cqw/1 var(--font-sans); font-style: normal; color: #555; }
.device p[data-trmnl-note][hidden] { display: none; }
/* The TRMNL's screens, as small tabs under the device. */
.stage > .trmnl-pager { position: static; transform: none; margin-top: 14px; gap: 4px; padding: 3px; border-radius: 99px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.stage > .trmnl-pager button { width: auto; height: auto; padding: 5px 12px; border-radius: 99px; background: none; color: var(--text-muted); font: 500 12px/1 var(--font-sans); }
.stage > .trmnl-pager button[aria-current="true"] { background: var(--surface-raised); color: var(--text); box-shadow: 0 0 0 1px var(--border); }
.device .device-extra[hidden], .device p[hidden] { display: none; }
/* TRMNL framework look: light paper, black labels, plugin title bar along the bottom.
   Widgets mirror stonepi_display's sys / wat / app / sto / evt snippets. */
.eink { display: grid; grid-template-columns: 1.25fr 1fr; grid-template-rows: auto 1fr auto; gap: 1.8cqw; padding: 2.4cqw 2.4cqw 1.6cqw; height: 100%; box-sizing: border-box; }
.eink .w { border: .3cqw solid #1a1a1a; border-radius: 1.2cqw; padding: 1.6cqw 2cqw; display: flex; flex-direction: column; gap: 1cqw; min-height: 0; }
.eink .hd { display: flex; justify-content: space-between; align-items: center; }
.eink .t { font: 700 2.4cqw/1 var(--font-sans); }
.eink .pill { font: 600 1.8cqw/1 var(--font-sans); padding: .6cqw 1.2cqw; border-radius: 99px; border: .25cqw solid #1a1a1a; }
.eink .pill.f { background: #1a1a1a; color: #ecebe7; }
.eink .stats { display: flex; justify-content: space-between; }
.eink .stats div { display: flex; flex-direction: column; gap: .5cqw; }
.eink .k { font: 600 1.7cqw/1 var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: #555; }
.eink .v { font: 400 6.4cqw/1 var(--font-sans); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.eink .v.s { font-size: 3.2cqw; font-weight: 500; letter-spacing: 0; }
.eink .sys { grid-column: 1 / -1; }
.eink .applist ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .9cqw 2.4cqw; }
.eink .applist li { display: flex; justify-content: space-between; align-items: center; font: 500 2.2cqw/1 var(--font-sans); border-bottom: .2cqw dotted #888; padding-bottom: .8cqw; }
.eink .applist li i { font: normal 600 1.6cqw/1 var(--font-sans); letter-spacing: .06em; text-transform: uppercase; color: #555; }
.eink .side { display: grid; grid-template-rows: 1fr auto; gap: 1.8cqw; min-height: 0; }
.eink .ev p { margin: 0; font: 500 2.4cqw/1.25 var(--font-sans); color: #1a1a1a; }
.eink .ev p span { display: block; font-weight: 400; color: #555; font-size: 2cqw; }
.eink .ev p + p { border-top: .2cqw dotted #888; padding-top: 1cqw; }
.eink .title { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; padding: 1cqw 1.6cqw;
  border-radius: .8cqw; font: 600 2.2cqw/1 var(--font-sans); color: #222;
  background: repeating-conic-gradient(#d9d8d3 0 25%, #e7e6e1 0 50%) 0 0 / .5cqw .5cqw; }
.eink .title span:last-child { font-weight: 400; color: #555; }

/* ── Car Thing (124 × 64 mm, from Spotify's outline drawing): 4" screen on the left; the dial
      sits over the screen's top-right corner and overhangs the right edge; back button below it;
      four presets plus Settings/Mute along the top edge; a small tab on the left side. ── */
.carthing { width: min(100%, 400px); position: relative; padding-top: 1.6%; }
.ct-top { position: absolute; top: 0.4%; left: 0; right: 0; height: 2%; }
.ct-top > * { position: absolute; top: 0; height: 100%; width: 8.7%; border-radius: 3px 3px 0 0; padding: 0; border: 0;
  background: linear-gradient(#34373b, #1d1f22); box-shadow: 0 0 0 1px rgba(0,0,0,.4); }
.ct-top > :nth-child(1) { left: 9.6%; } .ct-top > :nth-child(2) { left: 28.6%; } .ct-top > :nth-child(3) { left: 47.6%; } .ct-top > :nth-child(4) { left: 66.6%; }
.ct-top > :nth-child(5) { left: 87.4%; width: 8.2%; }
/* Top buttons that open a panel: a bigger invisible target, and a press. */
.ct-key { cursor: pointer; transition: transform .08s ease, background .12s ease; -webkit-touch-callout: none; user-select: none; touch-action: manipulation; }
.ct-key::before { content: ""; position: absolute; inset: -10px -6px -4px; }
.ct-key:hover { background: linear-gradient(#45494e, #26292d); }
.ct-key:active, .ct-key[aria-pressed="true"] { transform: translateY(1px); background: linear-gradient(#5a5248, #2b2824); }
.ct-key:focus-visible, .ct-back:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ct-body {
  position: relative; aspect-ratio: 124 / 64; border-radius: 4.2%/8.1%;
  background: linear-gradient(175deg, #2c2f33, #141518 65%);
  box-shadow: 0 0 0 1px rgba(0,0,0,.65), 0 1px 0 rgba(255,255,255,.12) inset,
    10px 18px 30px -12px rgba(0,0,0,.5), 2px 4px 9px -3px rgba(0,0,0,.28);
}
.ct-body::before { content: ""; position: absolute; left: -2.6%; top: 8%; width: 3%; height: 18%; border-radius: 3px 0 0 3px;
  background: linear-gradient(90deg, #2a2d31, #1a1c1f); box-shadow: 0 0 0 1px rgba(0,0,0,.45); }
.ct-body .dev-screen { position: absolute; left: 3.8%; top: 8.6%; height: 84%; border-radius: 1.2%/2%; background: #15181A; color: #E9E6DF; font-family: var(--font-sans);
  box-shadow: 0 0 0 1px #000; }
.ct-dial {
  position: absolute; width: 29.7%; aspect-ratio: 1; left: 73.75%; top: 6.9%; border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #4a4e53, #24272b 55%, #17181b);
  box-shadow: 0 0 0 1px rgba(0,0,0,.7), 0 1px 0 rgba(255,255,255,.14) inset, 6px 10px 16px -6px rgba(0,0,0,.6);
}
.ct-dial::after { content: ""; position: absolute; inset: 7%; border-radius: 50%; box-shadow: 0 0 0 1px rgba(255,255,255,.05); }
.ct-back { position: absolute; width: 9.9%; aspect-ratio: 1; left: 83.65%; top: 70.9%; border-radius: 50%; padding: 0; border: 0; cursor: pointer;
  background: #1c1e21; box-shadow: 0 0 0 1px rgba(255,255,255,.07), 0 0 0 2px #111; }
.ct-back:active { background: #26292d; }
/* Screensaver (hold button 5): Flying Through Space with the segment clock, over everything. */
.ct-saver { position: absolute; inset: 0; z-index: 4; background: #000; border-radius: inherit; overflow: hidden; cursor: pointer; }
.ct-saver[hidden] { display: none; }
.ct-saver canvas { display: block; width: 100%; height: 100%; }
.sv-clock { position: absolute; right: 5.5cqw; bottom: 3.6cqw; width: 19cqw; }
.sv-clock svg { display: block; width: 100%; height: auto; }
.sv-clock .on { fill: #F2F2F2; } .sv-clock .off { fill: #F2F2F2; opacity: .1; } .sv-clock .dot { fill: #F2F2F2; }
/* A panel a top button opens, over the pages. */
.ct-view { position: absolute; inset: 0; background: #121416; z-index: 2; box-sizing: border-box; }
.ct-view[hidden] { display: none; }
.ct-list { padding: 2.4cqw 6.2cqw 2.6cqw 2cqw; display: flex; flex-direction: column; gap: 1.4cqw; color: #E9E6DF; }
.view-head { display: flex; align-items: baseline; gap: 1.6cqw; padding: 0 .6cqw 1.2cqw; border-bottom: .2cqw solid #23272a; }
.view-head b { font: 700 3.4cqw/1 var(--font-sans); }
.view-head .count { font: 500 2.2cqw/1 var(--font-sans); color: #9EA4A9; }
.view-head .clock { margin-left: auto; font: 700 3.2cqw/1 var(--font-sans); }
.view-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1cqw; flex: 1; grid-auto-rows: 1fr; min-height: 0; }
.view-list li { background: #22262A; border-radius: 1.4cqw; padding: 0 2cqw; display: grid; grid-template-columns: 1fr auto; align-content: center; column-gap: 1.4cqw; min-height: 0; }
.view-list li.focus { box-shadow: inset 0 0 0 .4cqw #C7BBA8; }
.view-list b { font: 700 2.4cqw/1.25 var(--font-sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.view-list li > span { grid-row: 2; font: 500 1.8cqw/1.3 var(--font-sans); color: #9EA4A9; }
.view-list em { grid-column: 2; grid-row: 1 / span 2; font: 600 1.5cqw/1 var(--font-sans); font-style: normal; letter-spacing: .08em; text-transform: uppercase;
  color: #E9E6DF; border: .3cqw solid #C7BBA8; border-radius: 2cqw; padding: .5cqw 1cqw; white-space: nowrap; align-self: center; }
.view-list li:has(em) { grid-template-columns: 1fr auto auto; }
.view-list li:has(em) i { grid-column: 3; }
.ct-list .view-empty { margin: 0; padding: 1cqw .6cqw; font: 500 2.2cqw/1.3 var(--font-sans); color: #9EA4A9; }
.view-list i { grid-column: 2; grid-row: 1 / span 2; font-style: normal; font-size: 3cqw; color: #9EA4A9; }
/* Car Thing pages: a snap-scrolling strip (swipe on touch, drag with a mouse, or the dots). */
.ct-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ct-pages { display: flex; height: 100%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none;
  overscroll-behavior-x: contain; cursor: grab; outline: none; }
.ct-pages::-webkit-scrollbar { display: none; }
.ct-pages.is-dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.ct-pages:focus-visible { box-shadow: inset 0 0 0 .6cqw var(--accent); }
.ct-page { flex: 0 0 100%; height: 100%; scroll-snap-align: start; }
.ct-pager { position: absolute; left: 48.4%; bottom: 1.3cqw; transform: translateX(-50%); display: flex; gap: 1.4cqw; }
.ct-pager button { width: 1.6cqw; height: 1.6cqw; padding: 0; border: 0; border-radius: 50%; background: #3F4448; cursor: pointer; }
.ct-pager button[aria-current="true"] { background: #C7BBA8; }
/* Now Playing (Spotify on the Car Thing). The artwork is an abstract stand-in, not a real cover. */
.ct-np { padding: 4.4cqw 7.2cqw 4.6cqw 4cqw; box-sizing: border-box; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(120% 90% at 20% 30%, #2a2a2a, #0d0d0d 70%); color: #F2F0EC; }
.ct-np svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ct-np svg .fill { fill: currentColor; }
.np-top { display: flex; align-items: center; gap: 4cqw; }
.np-art { width: 26cqw; aspect-ratio: 1; flex: none; border-radius: 1.2cqw; background:
  radial-gradient(40% 30% at 62% 38%, #111 60%, transparent 62%), radial-gradient(25% 45% at 78% 70%, #222 55%, transparent 58%),
  linear-gradient(135deg, #f4f4f2 0 45%, #cfcfcb 45% 60%, #fafaf8 60%); box-shadow: 0 1cqw 3cqw rgba(0,0,0,.5); }
.np-meta { display: flex; flex-direction: column; gap: 1cqw; min-width: 0; }
.np-dev { display: flex; align-items: center; gap: .8cqw; font: 600 1.8cqw/1 var(--font-sans); color: #A9A9A6; }
.np-dev svg { width: 2.4cqw; height: 2.4cqw; }
.np-meta strong { font: 700 6cqw/1.05 var(--font-display); letter-spacing: -.02em; }
.np-artist { font: 500 3.2cqw/1.2 var(--font-sans); color: #DADAD6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-album { font: 500 2.2cqw/1 var(--font-sans); color: #8E8E8A; }
.np-seek { display: flex; align-items: center; gap: 2cqw; font: 500 1.8cqw/1 var(--font-sans); color: #CFCFCB; }
.np-bar { flex: 1; height: .6cqw; border-radius: 1cqw; background: #4a4a48; position: relative; }
.np-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 5.5%; border-radius: inherit; background: #ddd; }
.np-bar i::after { content: ""; position: absolute; right: -1cqw; top: 50%; width: 2cqw; height: 2cqw; border-radius: 50%; background: #eee; transform: translateY(-50%); }
.np-controls { display: flex; align-items: center; justify-content: space-between; }
.np-add { width: 4.4cqw; height: 4.4cqw; border-radius: 50%; background: #3a3a38; display: grid; place-items: center; font: 400 3cqw/1 var(--font-sans); color: #ddd; }
.np-more { font: 700 3cqw/1 var(--font-sans); letter-spacing: .1em; color: #ddd; }
.np-mid { display: flex; align-items: center; gap: 5cqw; }
.np-mid > svg { width: 3.4cqw; height: 3.4cqw; }
.np-play { width: 9.6cqw; height: 9.6cqw; border-radius: 50%; background: #F2F0EC; color: #111; display: grid; place-items: center; }
.np-play svg { width: 4cqw; height: 4cqw; stroke-width: 3; }
/* System: the Pi's vitals and every service. */
.ct-sys { padding: 2.6cqw 6.4cqw 2.6cqw 3cqw; box-sizing: border-box; display: flex; flex-direction: column; gap: 2.4cqw; color: #E9E6DF; }
.sys-head { display: flex; align-items: center; gap: 1.4cqw; padding: 1.6cqw 2cqw; border-radius: 1.6cqw; box-shadow: inset 0 0 0 .4cqw #C7BBA8;
  font: 600 1.9cqw/1 var(--font-sans); letter-spacing: .12em; text-transform: uppercase; color: #C9CDD0; }
.sys-head img { width: 3.6cqw; height: 3.6cqw; border-radius: .8cqw; background: #2C3135; padding: .4cqw; box-sizing: border-box; }
.sys-head span { margin-left: auto; font-size: 3cqw; color: #9EA4A9; letter-spacing: 0; }
.sys-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2.6cqw; }
.sys-stats div { display: flex; flex-direction: column; gap: .8cqw; }
.sys-stats span { font: 600 1.8cqw/1 var(--font-sans); letter-spacing: .1em; text-transform: uppercase; color: #9EA4A9; }
.sys-stats b { font: 600 7.4cqw/1 var(--font-display); letter-spacing: -.03em; }
.sys-stats small { font: 600 2.4cqw/1 var(--font-sans); letter-spacing: 0; color: #C9CDD0; margin-left: .3cqw; }
.sys-stats i { height: .9cqw; border-radius: 1cqw; background: linear-gradient(90deg, #6FC3A9 var(--v), #2C3135 var(--v)); }
.ct-sys .sys-line { margin: 0; display: flex; gap: 2.4cqw; font: 500 2.2cqw/1 var(--font-sans); color: #9EA4A9; }
.sys-line .ok { color: #6FC3A9; }
.sys-svc { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.3cqw 2.6cqw; }
.sys-svc li { display: flex; align-items: center; gap: 1cqw; font: 500 2.1cqw/1 var(--font-sans); }
.sys-svc i { width: 1.2cqw; height: 1.2cqw; border-radius: 50%; background: #6FC3A9; }
/* Apps: each app's latest at a glance, and what's on now. */
.ct-apps { padding: 2.6cqw 5.8cqw 2.6cqw 2.6cqw; box-sizing: border-box; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr; gap: 1.6cqw 1.8cqw; color: #E9E6DF; }
.ct-apps h3 { grid-column: 1 / -1; margin: 0; font: 700 3.4cqw/1 var(--font-sans); }
.apps-left { display: grid; grid-template-rows: repeat(3, 1fr); gap: 1.6cqw; min-height: 0; }
.ct-apps .ac { background: #23272A; border-radius: 1.8cqw; padding: 2cqw; display: flex; flex-direction: column; gap: 1.2cqw; min-height: 0; overflow: hidden; }
.ct-apps .ac.focus { box-shadow: inset 0 0 0 .4cqw #C7BBA8; }
.ct-apps h4 { margin: 0; display: flex; align-items: center; gap: 1.2cqw; font: 600 1.8cqw/1 var(--font-sans); letter-spacing: .1em; text-transform: uppercase; color: #C9CDD0; }
.ct-apps h4 img { width: 3.2cqw; height: 3.2cqw; border-radius: 22%; }
.ct-apps h4 > span { margin-left: auto; font-size: 3cqw; color: #9EA4A9; letter-spacing: 0; }
.ct-apps .ac > p { margin: 0; font: 600 2.6cqw/1.2 var(--font-sans); color: #E9E6DF; }
.ct-apps em { font: 600 1.5cqw/1 var(--font-sans); font-style: normal; letter-spacing: .08em; text-transform: uppercase;
  color: #E9E6DF; border: .3cqw solid #C7BBA8; border-radius: 2cqw; padding: .5cqw 1cqw; white-space: nowrap; }
.ct-apps .sport ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1cqw; }
.ct-apps .sport li { background: #15181A; border-radius: 1.2cqw; padding: 1.3cqw 1.6cqw; display: grid; grid-template-columns: 1fr auto; column-gap: 1cqw; align-items: center; }
.ct-apps .sport li b { font: 700 2.1cqw/1.25 var(--font-sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-apps .sport li span { grid-row: 2; font: 500 1.7cqw/1.3 var(--font-sans); color: #9EA4A9; }
.ct-apps .sport li em { grid-row: 1 / span 2; grid-column: 2; }
/* A web page on the panel: a Homepage-style home-server dashboard (sample data). */
.ct-web { padding: 3cqw 6.8cqw 3cqw 3.6cqw; box-sizing: border-box; background: #1E2638; color: #D7DCE6; display: flex; flex-direction: column; gap: 1.6cqw; overflow: hidden; }
.web-res { display: flex; flex-wrap: wrap; gap: 1.4cqw 3cqw; font: 500 1.8cqw/1 var(--font-sans); }
.web-res span { display: flex; align-items: center; gap: .8cqw; }
.web-res i { width: 2.4cqw; height: 2.4cqw; border: .3cqw solid #AEB6C6; border-radius: .5cqw; box-sizing: border-box; }
.web-res em { font-style: normal; color: #8D97AB; }
.ct-web .web-host { margin: 0; text-align: center; font: 500 1.6cqw/1 var(--font-sans); color: #8D97AB; }
.web-search { border: .25cqw solid #4A5570; border-radius: 1cqw; padding: 1.2cqw 1.6cqw; font: 500 1.8cqw/1 var(--font-sans); color: #8D97AB; background: #263048; }
.ct-web h5 { margin: 1cqw 0 0; padding-top: 2cqw; border-top: .2cqw solid #3A4560; font: 600 3cqw/1 var(--font-sans); color: #E6EAF2; }
.ct-web h5 + h5, .web-card + h5 { border-top: 0; padding-top: 0; }
.web-card { width: 52%; background: #28324A; border-radius: 1.2cqw; padding: 1.8cqw; display: grid; grid-template-columns: auto 1fr; gap: 1.4cqw; font: 500 1.7cqw/1.3 var(--font-sans); }
.web-card b { display: block; font: 600 2.1cqw/1.2 var(--font-sans); color: #fff; }
.web-card small { color: #AEB6C6; }
.web-logo { width: 4cqw; height: 4cqw; border-radius: .8cqw; background: linear-gradient(135deg, #E57000, #F59A3B); }
.web-card dl { grid-column: 1 / -1; margin: 0; display: grid; grid-template-columns: 1fr auto; gap: .4cqw 2cqw; color: #AEB6C6; }
.web-card dd { margin: 0; }
/* Clock & weather face: a big clock card beside the weather card (as on the device). */
.ct-face { display: grid; grid-template-columns: 1fr 1fr; gap: 1.8cqw; padding: 2.4cqw 5.6cqw 4.4cqw 2.4cqw; box-sizing: border-box; }
.ct-face .f { background: #222629; border-radius: 2.6cqw; min-width: 0; }
.ct-face svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ct-face .clockface { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2.4cqw; }
.ct-face .big { display: flex; align-items: baseline; font: 600 14cqw/1 var(--font-display); letter-spacing: -.05em; color: #ECE8E0; }
.ct-face .big i { font-style: normal; color: #C7BBA8; }
.ct-face .big b { font: 700 3.8cqw/1 var(--font-sans); letter-spacing: 0; margin-left: 1cqw; }
.ct-face .day { font: 600 3.1cqw/1 var(--font-sans); color: #E9E6DF; }
.ct-face .wx { box-shadow: inset 0 0 0 .45cqw #C7BBA8; padding: 3cqw 2.4cqw; display: flex; flex-direction: column; justify-content: center; gap: 2.4cqw; color: #E9E6DF; }
.ct-face .now { display: flex; align-items: center; gap: 1.6cqw; }
.ct-face .now svg { width: 8.4cqw; height: 8.4cqw; flex: none; }
.ct-face .temp { font: 600 9.6cqw/1 var(--font-display); letter-spacing: -.04em; }
.ct-face .temp small { font: 600 3.4cqw/1 var(--font-sans); letter-spacing: 0; }
.ct-face .sum { display: flex; flex-direction: column; gap: .5cqw; min-width: 0; }
.ct-face .sum strong { font: 600 2.7cqw/1.1 var(--font-sans); }
.ct-face .sum span { font: 600 1.9cqw/1.2 var(--font-sans); color: #B9BDC0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-face .hours, .ct-face .days { display: grid; grid-template-columns: repeat(5, 1fr); text-align: center; }
.ct-face .hours div, .ct-face .days div { display: flex; flex-direction: column; align-items: center; gap: .6cqw; }
.ct-face .days div:first-child { grid-column: 2; }
.ct-face .hours span, .ct-face .days span { font: 500 1.9cqw/1 var(--font-sans); color: #9EA4A9; }
.ct-face .hours svg, .ct-face .days svg { width: 3.2cqw; height: 3.2cqw; }
.ct-face .hours b, .ct-face .days b { font: 700 2.5cqw/1 var(--font-sans); }
.ct-face .days small { font: 500 1.7cqw/1 var(--font-sans); color: #9EA4A9; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .trmnl { background: linear-gradient(180deg, #2b2d30, #1d1f21); box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 1px 0 rgba(255,255,255,.07) inset, 10px 16px 26px -10px rgba(0,0,0,.7); }
  :root:not([data-theme="light"]) .trmnl .chin { color: #6e7175; }
  :root:not([data-theme="light"]) .ct-body { box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 1px 0 rgba(255,255,255,.12) inset, 10px 18px 30px -12px rgba(0,0,0,.8); }
}
:root[data-theme="dark"] .trmnl { background: linear-gradient(180deg, #2b2d30, #1d1f21); box-shadow: 0 0 0 1px rgba(0,0,0,.6), 0 1px 0 rgba(255,255,255,.07) inset, 10px 16px 26px -10px rgba(0,0,0,.7); }
:root[data-theme="dark"] .trmnl .chin { color: #6e7175; }
:root[data-theme="dark"] .ct-body { box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 1px 0 rgba(255,255,255,.12) inset, 10px 18px 30px -12px rgba(0,0,0,.8); }
@media (max-width: 519px) { .device { padding: 22px 16px 16px; } .device .stage { min-height: 0; } }
    

/* Hero: quiet way into the install guide under the tagline (the big button stays off). */
.hero-start { margin-top: 18px; font: 600 16px/1.4 var(--chrome); }
.hero-start a { text-decoration: none; }
.hero-start a:hover span { margin-left: 4px; }
.hero-start span { display: inline-block; transition: margin-left .15s; }

/* Install guide on phones and tablets: sticky "Step N of 7" bar that opens the step list.
   Hidden from 1024px, where the side index does the same job. */
.stepbar {
  position: sticky; top: 0; z-index: 5;
  margin: 0 calc(-1 * var(--gutter)) 24px; padding: 0 var(--gutter);
  background: var(--paper); border-bottom: 1px solid var(--line);
}
.stepbar summary {
  display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 0;
  cursor: pointer; list-style: none; font: 15px/1.3 var(--chrome);
}
/* Chevron comes from the site-wide summary::before, same as the help answers. */
.stepbar summary:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.stepbar-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stepbar-count { font-size: 12px; letter-spacing: .02em; color: var(--muted); }
.stepbar-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--text); }
/* The open list overlays the page (no layout shift when it opens or closes). */
.stepbar nav {
  position: absolute; left: 0; right: 0; top: 100%;
  margin: 0; padding: 4px var(--gutter) 10px calc(var(--gutter) + 25px);
  max-height: calc(100dvh - 120px); overflow-y: auto;
  background: var(--paper); border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 24px -12px rgba(0, 0, 0, .25);
}
.stepbar nav ol { list-style: none; margin: 0; padding: 0; counter-reset: sb; }
.stepbar nav li { counter-increment: sb; }
.stepbar nav li.toc-phase {
  counter-increment: none; padding: 12px 0 2px;
  font: 600 11px/1.2 var(--chrome); letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.stepbar nav li.toc-phase:first-child { padding-top: 6px; }
.stepbar nav a { display: block; padding: 8px 0; line-height: 1.45; color: var(--muted); text-decoration: none; font-size: 15px; }
.stepbar nav ol a::before { content: counter(sb) ". "; }
.stepbar nav a[aria-current="step"] { color: var(--text); font-weight: 600; }
.stepbar nav .toc-extra { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--line); }
@media (min-width: 1024px) { .stepbar { display: none; } }
@media (max-width: 1023px) { .steps > li, #help { scroll-margin-top: 64px; } }

/* Install guide: three phases over the seven steps. */
.phase { margin: 0; font-size: 30px; }
.phase-where { margin: 6px 0 26px; color: var(--muted); font-size: 15px; }
.steps + .phase { margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--line); }
.why { max-width: 44em; }
.terminal-sample .ph { font-style: italic; opacity: .7; }
.step-trouble { margin: 18px 0; max-width: 44em; }
.step-trouble > h4 { font: 600 15px/1.3 var(--chrome); margin: 0 0 4px; color: var(--ink); }
.help-pointer { color: var(--muted); margin: -4px 0 14px; }
.success-box .terminal-sample { word-break: normal; overflow-wrap: anywhere; }
#command-trouble { scroll-margin-top: 24px; }
@media (max-width: 1023px) { #command-trouble { scroll-margin-top: 72px; } }

/* Home hero: latest release pill above the title (filled in from GitHub by site.js). */
.release-pill { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; padding: 5px 12px 5px 10px;
  border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--surface-raised);
  font: var(--type-label); letter-spacing: .02em; color: var(--text-muted); text-decoration: none; }
.release-pill[hidden] { display: none; }
.release-pill b { font-family: var(--font-mono); font-weight: 500; color: var(--text); }
.release-pill:hover { border-color: var(--border-control); color: var(--text); }
.release-pill:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.release-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 22%, transparent); }
