:root {
  --bg: #f4f2ee;
  --surface: #ffffff;
  --ink: #17171a;
  --muted: #5d5c63;
  --line: #dcd8d0;
  --accent: #a80838;   /* the pin's crimson, from the logo */
  --accent-ink: #ffffff;
  --code-bg: #ebe7df;
  /* the drawn Push 2 is always dark, like the hardware */
  --hw-body: #1c1c1f;
  --hw-edge: #2c2c31;
  --hw-btn: #2a2a2f;
  --hw-btn-dim: #4a4a52;
  --hw-label: #9a9aa3;
  --hw-screen: #050506;
  --hw-focus: #ffb347;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111113; --surface: #19191c; --ink: #ecebe8; --muted: #a3a2a8; --line: #2e2e33;
    --accent: #a80838; --accent-ink: #ffffff; --code-bg: #232327; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111113; --surface: #19191c; --ink: #ecebe8; --muted: #a3a2a8; --line: #2e2e33;
  --accent: #a80838; --accent-ink: #ffffff; --code-bg: #232327; color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--sans); }
a { color: var(--accent); text-underline-offset: 2px; }
code, kbd, pre { font-family: var(--mono); font-size: 0.88em; }
code { background: var(--code-bg); padding: 0.1em 0.35em; border-radius: 4px; overflow-wrap: anywhere; }
kbd { display: inline-block; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 0 0.4em;
  background: var(--surface); font-size: 0.8em; line-height: 1.6; white-space: nowrap; text-transform: uppercase; letter-spacing: 0.03em; }
pre { background: var(--code-bg); padding: 14px 16px; border-radius: 8px; overflow-x: auto; }
pre code { background: none; padding: 0; overflow-wrap: normal; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; z-index: 10; background: var(--surface); padding: 8px 12px; }

.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px max(16px, calc((100vw - 1320px) / 2)); background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; letter-spacing: 0.02em; }
.brand picture, .brand img { display: block; }
.brand img { height: 36px; width: auto; }
.top nav { display: flex; gap: 18px; flex-wrap: wrap; }
.top nav a { color: var(--muted); text-decoration: none; font-size: 0.95em; }
.top nav a:hover { color: var(--ink); }

main { max-width: 1320px; margin: 0 auto; padding: 0 16px; }
section { padding: 56px 0 8px; scroll-margin-top: 60px; }
h1 { font-size: clamp(2.2rem, 6vw, 4rem); line-height: 1.05; margin: 0 0 16px; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); margin: 0 0 12px; letter-spacing: -0.01em; }
h3 { margin: 32px 0 6px; font-size: 1.15rem; }
/* The hero: everything centred, the video under the buttons, the features 3 by 2 */
.hero { text-align: center; }
.lede { font-size: 1.2em; max-width: 46em; color: var(--muted); margin-left: auto; margin-right: auto; }
.cta { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 24px 0; }
.button { display: inline-block; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink);
  text-decoration: none; font-weight: 600; background: var(--surface); }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 0; list-style: none;
  max-width: 1080px; margin: 28px auto 0; text-align: left; }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }
.features li { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; color: var(--muted); }
.features strong { color: var(--ink); }

.video { position: relative; aspect-ratio: 16 / 9; max-width: 820px; margin: 20px auto; border-radius: 12px; overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.prose { max-width: 820px; }
.prose table { border-collapse: collapse; width: 100%; font-size: 0.95em; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.prose th { color: var(--muted); font-weight: 600; }
.steps li { margin-bottom: 8px; }
.aside { color: var(--muted); }

/* ---- The interactive manual ----
   The heading and the mode bars run along the top; under them the Push takes the
   height that's left of the window (a 13" laptop shows the whole section at once),
   and the description fills the column beside it, scrolling inside when long. */
.manual-section { padding-top: 16px; }
.manual-section #manual { display: flex; flex-direction: column; height: max(560px, calc(100svh - 84px)); }
.manual-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; flex: none; }
.manual-title { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 18px; row-gap: 2px; }
.manual-title h2 { margin: 0; font-size: clamp(1.5rem, 2.6vw, 1.9rem); }
.side-intro { margin: 0; color: var(--muted); }
.side-intro .aside { font-size: 0.9em; margin-left: 6px; }
.mode-bars { display: flex; flex-wrap: wrap; align-items: center; column-gap: 18px; row-gap: 6px; }
.manual-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, max-content) minmax(300px, 1fr);
  grid-template-rows: minmax(0, 1fr); gap: 20px; align-items: stretch; }
/* the Push is as tall as the room under the heading, however many lines that took */
.panel { min-width: 0; min-height: 0; height: 100%; }
.panel svg { display: block; aspect-ratio: 800 / 643; height: 100%; width: auto; max-width: 100%; max-height: 860px; }
.chips[hidden] { display: none; }
/* the layer bar keeps its room when hidden, so switching mode doesn't move the help */
.chips.sub[hidden] { display: flex; visibility: hidden; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { font: 600 0.85rem var(--sans); padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); cursor: pointer; }
.chips button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chips.sub button { font-weight: 500; font-size: 0.8rem; }
.chips.sub::before { content: "Layer"; align-self: center; color: var(--muted); font-size: 0.8rem; margin-right: 4px; }

/* The description is as tall as the Push beside it; its text scrolls inside */
.info { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; min-height: 200px; }
.info-inner { position: absolute; inset: 0; overflow-y: auto; padding: 16px 18px; }
.info-mode { margin: 0; font: 700 0.8rem var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); }
.info-summary { margin: 4px 0 0; color: var(--muted); font-size: 0.92em; }
.info h3 { margin: 14px 0 4px; font-size: 1.1rem; }
#info-text { margin: 0; }
#info-text p { margin: 0; }
.step-held { color: var(--accent); font-weight: 600; margin-bottom: 6px !important; }
.step-title { font: 700 0.95rem var(--sans); }
.step-lines { margin: 4px 0 0; padding-left: 18px; font-size: 0.92em; }
.step-lines li { margin: 2px 0; }
.step-foot { margin-top: 10px !important; color: var(--muted); font-size: 0.8em; }
#info-text.unused { color: var(--muted); font-style: italic; }
.info-foot { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.8em; }

/* Narrow screens: heading and mode bars, then the Push, with the help pinned below */
@media (max-width: 960px) {
  .manual-section #manual { height: auto; display: block; }
  .manual-grid { grid-template-columns: 1fr; grid-template-rows: none; gap: 12px; }
  .manual-grid .panel { height: auto; }
  .manual-grid .panel svg { width: 100%; height: auto; }
  .mode-bars .chips.sub[hidden] { display: none; }
  /* keep the explanation in view under the panel while you tap around it */
  .info { position: sticky; bottom: 0; min-height: 0; max-height: 40vh; overflow: auto; z-index: 2;
    box-shadow: 0 -8px 24px rgb(0 0 0 / 0.25); }
  .info-inner { position: static; }
  .info-foot { display: none; }
}


footer { max-width: 1320px; margin: 64px auto 0; padding: 24px 16px 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.92em; }
footer .small { font-size: 0.82em; }
