/* Magic Wand. Two surfaces: a dark room lit only by the wand's live light, and Puck-white paper
   for reading. The light colours come from wand.json and always mean a mode; nothing else on the
   page is saturated. Atkinson Hyperlegible Next carries the headlines; Big Shoulders is kept for
   short engraved hardware labels, such as the button names. */

@font-face {
  font-family: "Big Shoulders Display";
  src: url("fonts/big-shoulders-display.woff2?v=203dd8ba4a") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("fonts/atkinson-hyperlegible-next.woff2?v=1e4cea71d7") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Mono";
  src: url("fonts/atkinson-hyperlegible-mono.woff2?v=f0230cab68") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --room: #121019;      /* the dark room around the demo */
  --carbon: #1e1b26;    /* raised dark surfaces: grip, screen bezel */
  --puck: #eeedf3;      /* page paper, the Puck's white case */
  --card: #f8f7fb;
  --ink: #19171f;
  --slate: #5d5969;
  --rule: #d9d6e2;
  --chalk: #f3f1f8;
  --haze: #aca7c0;
  --led-lit: #4a4268;   /* set live by app.mjs from the demo's light */
  --led-strength: 0;
  --engraved: "Big Shoulders Display", "Arial Narrow", sans-serif-condensed, sans-serif;
  --display: var(--engraved);
  --body: "Atkinson Hyperlegible Next", system-ui, -apple-system, sans-serif;
  --mono: "Atkinson Hyperlegible Mono", ui-monospace, "SF Mono", monospace;
  --radius: 20px;
  --gutter: clamp(18px, 4vw, 56px);
  --measure: 1220px;
  --focus: var(--ink);
  color-scheme: light;
}

/* wand:lights */
[data-light="update"] { --swatch: #ff8a20; }
[data-light="disconnected"] { --swatch: #ff8a20; }
[data-light="calibration"] { --swatch: #ff8a20; }
[data-light="sleep"] { --swatch: #4a4268; }
[data-light="scroll"] { --swatch: #19e3f0; }
[data-light="app"] { --swatch: #22e871; }
[data-light="hud"] { --swatch: #22c55e; }
[data-light="recording"] { --swatch: #ff2e3a; }
[data-light="mouse"] { --swatch: #4469ff; }
[data-light="idle"] { --swatch: #4a4268; }
/* /wand:lights */

* { box-sizing: border-box; }
html { background: var(--puck); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--puck);
  font: 400 1.0625rem/1.6 var(--body);
}
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
kbd {
  font: 600 0.78em/1 var(--mono);
  padding: 0.2em 0.45em;
  border: 1px solid color-mix(in srgb, currentColor 30%, transparent);
  border-bottom-width: 2px;
  border-radius: 6px;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fine { color: var(--slate); font-size: 0.875rem; }

.skip-link { position: absolute; left: 12px; top: -60px; padding: 10px 14px; background: var(--chalk); color: var(--room); border-radius: 10px; z-index: 10; }
.skip-link:focus { top: 12px; }

/* ---------------------------------------------------------------- the room */
/* Dark, and lit only by the wand: the glow is the demo's current light, and idle is unlit. */
.room {
  --focus: var(--chalk);
  position: relative;
  color: var(--chalk);
  color-scheme: dark;
  background:
    radial-gradient(64rem 40rem at 74% 80%, color-mix(in srgb, var(--led-lit) calc(var(--led-strength) * 20%), transparent), transparent 72%),
    var(--room);
}
.room .fine { color: var(--haze); }

.topbar {
  --focus: var(--chalk);
  position: absolute;
  inset: 0 0 auto;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px var(--gutter);
  color: var(--chalk);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font: 700 1.08rem/1 var(--engraved);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
}
.topnav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px clamp(14px, 2.2vw, 30px); font-size: 0.93rem; }
.topnav a { color: var(--haze); text-decoration: none; }
.topnav a:hover, .topnav a.external, .topnav a[aria-current="page"] { color: var(--chalk); }

/* ---------------------------------------------------------------- hero */
.hero { padding: 108px var(--gutter) 34px; }
.hero-head {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(17rem, 1fr);
  align-items: end;
  gap: 18px 56px;
  max-width: 1440px;
  margin: 0 auto 30px;
}
.hero-title {
  margin: 0;
  font: 700 clamp(2.5rem, 5.2vw, 4.9rem)/0.98 var(--body);
  letter-spacing: -0.032em;
  text-wrap: balance;
}
.hero-copy { padding-bottom: 0.35em; }
.tagline { margin: 0; font: 650 clamp(1.1rem, 1.55vw, 1.3rem)/1.4 var(--body); text-wrap: pretty; }
.lounge { margin: 10px 0 0; color: var(--haze); text-wrap: pretty; }
.hero-links { margin: 22px 0 0; }

/* ---------------------------------------------------------------- demo */
.demo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 12rem;
  grid-template-areas: "stage grip" "readout readout" "boundary boundary";
  gap: 14px 16px;
  max-width: 1440px;
  margin: 0 auto;
}
.stage {
  grid-area: stage;
  position: relative;
  height: clamp(420px, calc(100svh - 330px), 720px);
  min-height: 0;
  border-radius: 24px;
  overflow: hidden;
  container-type: size;
  cursor: crosshair;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  background:
    radial-gradient(circle at var(--tip-x, 62%) var(--tip-y, 72%), color-mix(in srgb, var(--led-lit) calc(var(--led-strength) * 30%), transparent), transparent 44%),
    linear-gradient(180deg, #18151f, #0c0a10);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}
.stage:focus-visible { outline-offset: 4px; border-radius: 24px; }
.mac {
  position: absolute;
  top: 4%;
  left: 50%;
  /* Always the simulated display's 1728 × 1117 shape, as large as the stage allows. */
  width: 70%;
  width: min(92cqw, calc(70cqh * 1728 / 1117));
  aspect-ratio: 1728 / 1117;
  container-type: inline-size;
  transform: translateX(-50%);
  border-radius: 12px;
  overflow: hidden;
  background: #0e0d13;
  box-shadow: 0 0 0 6px #08070b, 0 0 0 7px rgba(255, 255, 255, 0.09), 0 30px 70px rgba(0, 0, 0, 0.55);
}
.menubar {
  position: absolute;
  inset: 0 0 auto;
  height: 6.2%;
  min-height: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.2%;
  font: 500 clamp(9px, 1.7cqw, 13px)/1 var(--mono);
  color: var(--haze);
  background: rgba(255, 255, 255, 0.05);
  z-index: 2;
}
.menubar-app { color: var(--chalk); font-weight: 650; }
.menubar-recording { display: inline-flex; align-items: center; gap: 6px; color: var(--chalk); }
.menubar-recording[hidden] { display: none; }
.rec-dot { width: 8px; height: 8px; border-radius: 50%; background: #ff2e3a; box-shadow: 0 0 8px #ff2e3a; }
.board { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.hud {
  position: absolute;
  left: 50%;
  top: 54%;
  width: 70%;
  transform: translate(-50%, -50%);
  padding: 2.2% 2.4% 2.6%;
  border-radius: 18px;
  background: rgba(14, 12, 20, 0.92);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 20px 50px rgba(0, 0, 0, 0.5);
  z-index: 3;
}
.hud[hidden] { display: none; }
.hud-title { margin: 0 0 2.2%; font: 600 clamp(9px, 1.9cqw, 14px)/1 var(--mono); color: var(--haze); text-align: center; }
.hud-grid { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.6cqw; }
.hud-card {
  display: flex;
  align-items: flex-end;
  min-height: 9.5cqw;
  padding: 6% 7%;
  border-radius: 10px;
  background: color-mix(in srgb, var(--card) 86%, #000);
  border: 2px solid color-mix(in srgb, var(--card-border) 70%, transparent);
  color: var(--card-text, #fff);
  font: 650 clamp(7px, 1.65cqw, 13px)/1.12 var(--body);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  opacity: 0.9;
}
.hud-card.selected { opacity: 1; }
.hud-outline {
  position: absolute;
  left: 0;
  top: 0;
  border: 3.75px solid #fff;
  border-radius: 13px;
  pointer-events: none;
  transition: transform 90ms ease-out, width 90ms ease-out, height 90ms ease-out;
}
.hud-outline.pressed { border-style: dashed; }
.hud-outline.adjusting { border-color: var(--adjust, #fff); border-style: dashed; border-width: 3px; }
.hud-action {
  position: absolute;
  left: 50%;
  bottom: -2.6em;
  transform: translateX(-50%);
  margin: 0;
  padding: 0.35em 0.9em;
  border-radius: 999px;
  font: 650 clamp(9px, 1.8cqw, 13px)/1.2 var(--body);
  background: var(--chalk);
  color: var(--room);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s;
}
.hud-action.visible { opacity: 1; }

.wand-canvas, .tip-glow, .wand-fallback { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.wand-canvas { z-index: 4; }
.tip-glow {
  z-index: 3;
  mix-blend-mode: screen;
  opacity: var(--led-strength);
  background: radial-gradient(circle at var(--tip-x, 62%) var(--tip-y, 72%), color-mix(in srgb, var(--led-lit) 55%, transparent) 0, transparent 12%);
  transition: opacity 0.2s;
}
.wand-fallback { z-index: 4; }
.wand-fallback[hidden] { display: none; }
.fallback-wand {
  position: absolute;
  left: var(--fallback-x, 92%);
  top: var(--fallback-y, 118%);
  width: var(--fallback-length, 52%);
  height: 12px;
  transform-origin: 0 50%;
  transform: rotate(var(--fallback-angle, -150deg));
  border-radius: 6px;
  background: linear-gradient(90deg, #121018 0 24%, transparent 24%), repeating-linear-gradient(135deg, #3b3846 0 5px, #24222c 5px 10px);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.12);
}
.fallback-tip {
  position: absolute;
  right: -22px;
  top: 50%;
  width: 42px;
  height: 22px;
  transform: translateY(-50%);
  border-radius: 12px;
  background: radial-gradient(circle at 50% 40%, var(--led-lit) 0 18%, #ece8f5 34%);
  box-shadow: 0 0 calc(var(--led-strength) * 30px) var(--led-lit);
}

.stage-message {
  position: absolute;
  left: 50%;
  top: 44%;
  transform: translate(-50%, -50%);
  z-index: 6;
  margin: 0;
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(12, 10, 16, 0.88);
  color: var(--chalk);
  font-weight: 600;
  text-align: center;
  max-width: 80%;
}
.demo[data-state="ready"] .stage-message:not(.error) { display: none; }

/* ---------------------------------------------------------------- grip */
/* A carbon grip with three switch caps, in the real order: the speech button sits nearest the shaft. */
.grip {
  grid-area: grip;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 24px;
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0 6px, transparent 6px 12px), var(--carbon);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}
.key {
  --travel: 5px;
  position: relative;
  flex: 1 1 0;
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  align-content: center;
  column-gap: 12px;
  min-height: 76px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  color: var(--chalk);
  text-align: left;
  font: inherit;
  background: linear-gradient(180deg, #2a2633, #1f1c27);
  box-shadow: 0 var(--travel) 0 #09080d, inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: translateY(0);
  transition: transform 60ms, box-shadow 60ms, background 60ms;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.key::before {
  content: "";
  grid-column: 1;
  grid-row: 1 / span 3;
  align-self: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 36%, #4b4657, #25222d 72%);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--swatch, var(--haze)) 55%, transparent), 0 2px 0 rgba(0, 0, 0, 0.5);
  transition: background 60ms, box-shadow 60ms;
}
.key > span { grid-column: 2; }
.key:hover { background: linear-gradient(180deg, #312c3c, #24202d); }
.key[aria-pressed="true"] {
  transform: translateY(calc(var(--travel) - 1px));
  box-shadow: 0 1px 0 #09080d, inset 0 2px 6px rgba(0, 0, 0, 0.45);
}
.key[aria-pressed="true"]::before {
  background: radial-gradient(circle at 50% 40%, #fff 0 10%, var(--swatch) 48%);
  box-shadow: inset 0 0 0 2px var(--swatch), 0 0 18px var(--swatch);
}
.key-name { font: 700 1.08rem/1 var(--engraved); letter-spacing: 0.16em; text-transform: uppercase; }
.key-chord .key-name { font-size: 0.9rem; }
.key-role { margin-top: 3px; font-size: 0.8rem; color: var(--haze); line-height: 1.25; }
.key-meta { display: flex; align-items: center; gap: 6px; margin-top: 5px; font: 500 0.72rem/1 var(--mono); color: var(--haze); }
.pin { font: 500 0.78rem/1 var(--mono); color: var(--slate); }
.room .pin { color: var(--haze); }

/* ---------------------------------------------------------------- readout */
.readout {
  grid-area: readout;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
}
.mode {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 14rem;
  margin: 0;
  padding: 8px 16px 8px 12px;
  border-radius: 999px;
  background: var(--carbon);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
  font-weight: 650;
}
.mode-led {
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--led-lit);
  box-shadow: 0 0 calc(var(--led-strength) * 14px) var(--led-lit);
}
.mode-detail { color: var(--haze); font-weight: 400; }
.mode-detail:not(:empty)::before { content: "· "; }
.help { margin: 0; color: var(--haze); font-size: 0.92rem; }
.touch-help { display: none; }
@media (hover: none) and (pointer: coarse) {
  .pointer-help { display: none; }
  .touch-help { display: inline; }
}
.reset {
  padding: 9px 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: transparent;
  color: var(--chalk);
  font: 600 0.9rem/1 var(--body);
  cursor: pointer;
}
.reset:hover { background: var(--carbon); }
.boundary { grid-area: boundary; margin: 0; color: var(--haze); font-size: 0.85rem; }

/* ---------------------------------------------------------------- paper sections */
.section { max-width: var(--measure); margin: 0 auto; padding: clamp(72px, 9vw, 120px) var(--gutter) 0; }
h2 { margin: 0; font: 700 clamp(2rem, 3.8vw, 3.1rem)/1.02 var(--body); letter-spacing: -0.028em; }
h3 { margin: 0; font: 700 1.25rem/1.2 var(--body); letter-spacing: -0.01em; }
.section > h2 { margin-bottom: 34px; }
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  align-items: end;
  gap: 12px 56px;
  margin-bottom: 40px;
}
.section-lead { margin: 0; max-width: 40rem; color: var(--slate); font-size: 1.12rem; line-height: 1.55; text-wrap: pretty; }
.section-link { margin: 28px 0 0; }

.button-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--puck);
  font-weight: 700;
  text-decoration: none;
}
.button-link:hover { background: #000; }
.room .button-link { background: var(--chalk); color: var(--room); }
.room .button-link:hover { background: #fff; }

.swatch {
  flex: none;
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--swatch) 20%, transparent);
}

/* Disclosures keep every published detail, one click away. */
.more { margin-top: 14px; }
.more > summary {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 0;
  font-weight: 650;
  font-size: 0.93rem;
  list-style: none;
  cursor: pointer;
}
.more > summary::-webkit-details-marker { display: none; }
.more > summary::before {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateX(-1px) rotate(-45deg);
  transition: transform 0.15s;
}
.more[open] > summary::before { transform: translateY(-2px) rotate(45deg); }
.more-body { margin-top: 10px; }

/* ---------------------------------------------------------------- controls */
.control-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 22px; align-items: start; }
/* The grip from the side: a cap above each control, then the shaft and the Puck, lit live. */
.grip-bar {
  grid-column: 1 / -1;
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 22px;
  height: 14px;
  margin: 6px 0 30px;
}
.grip-bar::before {
  content: "";
  position: absolute;
  inset: 0 9% 0 0;
  border-radius: 7px;
  background: repeating-linear-gradient(135deg, #322e3b 0 5px, #1e1b26 5px 10px);
}
.grip-cap {
  position: relative;
  justify-self: center;
  width: 26px;
  height: 26px;
  margin-top: -6px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, #fff 0 10%, var(--swatch) 52%);
  box-shadow: 0 0 0 3px var(--puck), 0 4px 14px color-mix(in srgb, var(--swatch) 45%, transparent);
}
.grip-shaft {
  position: absolute;
  left: 91%;
  right: 16px;
  top: 4px;
  height: 6px;
  border-radius: 3px;
  background: repeating-linear-gradient(135deg, #3b3746 0 4px, #2a2733 4px 8px);
}
.grip-puck {
  position: absolute;
  right: 0;
  top: -4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, var(--led-lit) 0 18%, #fff 22%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.14), 0 0 calc(2px + var(--led-strength) * 20px) color-mix(in srgb, var(--led-lit) calc(var(--led-strength) * 90%), transparent);
}

.control { padding: 22px 22px 16px; border-radius: var(--radius); background: var(--card); box-shadow: inset 0 0 0 1px var(--rule); }
.control-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.control-head h3 { font: 700 1.55rem/1 var(--engraved); letter-spacing: 0.15em; text-transform: uppercase; }
.control-meta { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--slate); }
.control-role { display: flex; align-items: center; gap: 10px; margin: 10px 0 16px; font-weight: 650; }
.gestures { margin: 0; }
.gestures > div + div { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--rule); }
.gestures dt { font-weight: 700; font-size: 0.95rem; }
.gestures dd { margin: 2px 0 0; color: var(--slate); font-size: 0.95rem; line-height: 1.5; }
.notes { margin: 6px 0 0; padding-left: 1.1em; color: var(--slate); font-size: 0.9rem; line-height: 1.5; }
.notes li + li { margin-top: 7px; }

.lights-title { margin: 64px 0 4px; }
.lights-title + .fine { margin: 0 0 16px; }
.lights { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; }
.lights li {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 2px 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--rule);
  transition: box-shadow 0.25s, background-color 0.25s;
}
.lights .swatch { grid-row: span 2; align-self: center; }
.lights span:last-child { grid-column: 2; color: var(--slate); font-size: 0.86rem; line-height: 1.4; }
/* The light the demo is showing right now. */
.lights li.lit { background: #fff; box-shadow: inset 0 0 0 2px var(--swatch), 0 8px 26px color-mix(in srgb, var(--swatch) 28%, transparent); }
.lights li.lit .swatch { box-shadow: 0 0 0 3px color-mix(in srgb, var(--swatch) 25%, transparent), 0 0 12px var(--swatch); }

/* ---------------------------------------------------------------- how-to links */
.howto-links { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 28px; margin: 0; padding: 0; }
.howto-links a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: baseline; gap: 12px; padding: 10px 0; text-decoration: none; }
.howto-links .swatch { align-self: center; }
.howto-links a:hover .howto-q { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.howto-q { font-weight: 650; }
.howto-len { color: var(--slate); font: 500 0.82rem/1 var(--mono); }
.howto-home .fine { margin: 16px 0 0; }

/* ---------------------------------------------------------------- how it works */
/* The signal path really is a sequence: Puck, Bluetooth, receiver, Mac apps. */
.flow { position: relative; list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; margin: 0; padding: 0; }
.flow::before {
  content: "";
  position: absolute;
  left: 7px;
  right: 7px;
  top: 6px;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--slate) 0 6px, transparent 6px 12px);
  opacity: 0.45;
}
.flow li { position: relative; padding-top: 34px; }
.flow li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--puck);
  box-shadow: inset 0 0 0 3px var(--ink);
}
.flow h3 { margin-bottom: 8px; }
.flow p { margin: 0; color: var(--slate); font-size: 0.97rem; }
.inside-notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 40px; margin-top: 40px; color: var(--slate); font-size: 0.95rem; }
.inside-notes p { margin: 0; }
.needs-title { margin: 64px 0 10px; }
.needs { list-style: none; margin: 0; padding: 0; }
.needs li { display: grid; grid-template-columns: 11rem minmax(0, 1fr) minmax(0, 1.2fr); align-items: baseline; gap: 4px 24px; padding: 14px 0; }
.needs li + li { border-top: 1px solid var(--rule); }
.needs a { font-weight: 700; }
.need-status { color: var(--slate); font-size: 0.92rem; }
.inside > .more { margin-top: 28px; }
.grip-notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 40px; color: var(--slate); font-size: 0.95rem; }
.grip-notes p { margin: 0; }

/* ---------------------------------------------------------------- hardware */
.schematic-figure { margin: 0; padding: clamp(18px, 3vw, 36px); border-radius: 22px; background: var(--card); box-shadow: inset 0 0 0 1px var(--rule); }
.schematic { display: block; width: 100%; height: auto; overflow: visible; }
.schematic .grip-body { fill: var(--carbon); }
.schematic .cap rect { fill: var(--swatch); stroke: color-mix(in srgb, var(--swatch) 70%, #000); stroke-width: 1; }
.schematic .label { fill: var(--ink); font: 700 16px var(--engraved); letter-spacing: 0.06em; }
.schematic .pin-label { fill: var(--slate); font: 500 12px var(--mono); }
.schematic .shaft-body { stroke: rgba(0, 0, 0, 0.15); }
.schematic .twill-a { fill: #2c2a34; }
.schematic .twill-b { fill: #3a3744; }
.schematic .wire { fill: none; stroke: var(--slate); stroke-width: 1; stroke-dasharray: 3 4; opacity: 0.6; }
.schematic .puck { fill: #fff; stroke: rgba(0, 0, 0, 0.28); }
.schematic .puck-led { fill: var(--led-lit); }
.schematic .tip-stop-inner { stop-color: var(--led-lit); stop-opacity: calc(var(--led-strength) * 0.45); }
.schematic .tip-stop-outer { stop-color: var(--led-lit); stop-opacity: 0; }
.schematic .dimension { stroke: var(--slate); stroke-width: 1; fill: none; opacity: 0.7; }
.schematic-figure figcaption { margin-top: 12px; color: var(--slate); font-size: 0.86rem; }
.hardware-notes { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; gap: 12px 48px; margin-top: 30px; }
.hardware-notes p { margin: 0; color: var(--slate); }
.parts { grid-row: span 2; margin: 0; }
.parts > div { display: grid; grid-template-columns: 5.5rem 1fr; gap: 14px; padding: 11px 0; }
.parts > div + div { border-top: 1px solid var(--rule); }
.parts dt { font: 700 1rem/1.5 var(--engraved); letter-spacing: 0.15em; text-transform: uppercase; }
.parts dd { margin: 0; }
.tuning { margin-top: 36px; }
.spec { width: 100%; margin-top: 6px; border-collapse: collapse; font-size: 0.93rem; }
.spec th, .spec td { padding: 9px 12px 9px 0; text-align: left; vertical-align: top; }
.spec tr + tr > * { border-top: 1px solid var(--rule); }
.spec th { width: 22%; font-weight: 650; }
.spec td:nth-child(2) { width: 32%; font-family: var(--mono); }
.spec td:last-child { color: var(--slate); }

/* ---------------------------------------------------------------- build */
.build-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 40px 64px; }
.build-copy > p:first-child { margin-top: 0; font-size: 1.12rem; }
.status { padding: 24px; border-radius: var(--radius); background: var(--card); box-shadow: inset 0 0 0 1px var(--rule); }
.status h3 { margin-bottom: 10px; }
.versions { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 4px; font: 500 0.85rem/1.4 var(--mono); color: var(--slate); }
.status .fine { margin: 0; }
.status-list { margin: 8px 0 0; padding-left: 1.1em; color: var(--slate); font-size: 0.92rem; }
.status-list li + li { margin-top: 7px; }

/* ---------------------------------------------------------------- footer */
.footer { max-width: var(--measure); margin: 0 auto; padding: 112px var(--gutter) 48px; color: var(--slate); font-size: 0.9rem; }
.footer p { margin: 6px 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 1rem; }
.footer-links a { color: var(--ink); }
.disclaimer { font-size: 0.85rem; }

/* ---------------------------------------------------------------- 404 */
.missing { max-width: 720px; margin: 0 auto; padding: 18vh var(--gutter); }
.missing h1 { margin: 0 0 16px; font: 700 clamp(2.6rem, 7vw, 4.4rem)/1 var(--body); letter-spacing: -0.03em; }

/* ---------------------------------------------------------------- narrower screens */
@media (max-width: 1100px) {
  .lights { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .howto-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 36px; }
  .flow::before { content: none; }
}
@media (max-width: 960px) {
  .hero-head, .section-head { grid-template-columns: 1fr; }
  .control-grid { grid-template-columns: 1fr; gap: 16px; }
  .grip-bar { display: none; }
  .needs li { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .demo { grid-template-columns: 1fr; grid-template-areas: "stage" "grip" "readout" "boundary"; }
  .stage { height: auto; aspect-ratio: 1 / 0.9; }
  .mac { top: 5%; }
  .grip { flex-direction: row; padding: 10px; }
  .key { grid-template-columns: minmax(0, 1fr); align-content: start; min-height: 0; padding: 12px 10px 12px; }
  .key::before { grid-row: auto; width: 1.7rem; height: 1.7rem; margin-bottom: 8px; }
  .key > span { grid-column: 1; }
  .readout { grid-template-columns: 1fr auto; }
  .help { grid-column: 1 / -1; grid-row: 2; }
  .inside-notes, .hardware-notes, .build-columns, .grip-notes { grid-template-columns: 1fr; }
  .parts { grid-row: auto; }
  .spec th, .spec td:nth-child(2) { width: auto; }
}
@media (max-width: 560px) {
  .topnav a:not(.external):not(.keep) { display: none; }
  .hero { padding-top: 92px; }
  .hero-title { font-size: clamp(2.15rem, 10vw, 2.9rem); }
  .key-role { display: none; }
  .key-meta .pin { display: none; }
  .mode { min-width: 0; }
  .stage { aspect-ratio: 1 / 1.05; }
  .lights, .howto-links, .flow { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
