/* DAP Neo CE site. The look follows the Stageshow kit (site/src/kit, from
   github.com/benjitaylor/skills): its warm neutral surfaces, three text inks,
   one accent, its radius and shadow scales, light and dark. The stages in
   docs/stage/ use the same tokens, so pictures and page read as one.
   Element rules skip anything inside a stage (:where(.ss-stage *)). */

:root {
  color-scheme: light dark;
  --ce-accent: #0a6de6;
  --ce-accent-soft: rgba(10, 109, 230, 0.1);
  --ce-accent-ink: #0a5cc2;
  --ce-canvas: #f6f5f4;
  --ce-well: #efeeec;
  --ce-surface: #fff;
  --ce-sunken: #f7f7f6;
  --ce-line: rgba(0, 0, 0, 0.08);
  --ce-line-strong: rgba(0, 0, 0, 0.14);
  --ce-text-strong: #262628;
  --ce-text: #5f5f63;
  --ce-text-faint: #8a8a8e;
  --ce-success-soft: rgba(34, 197, 94, 0.12);
  --ce-success-text: #15803d;
  --ce-danger-soft: rgba(239, 68, 68, 0.1);
  --ce-danger-text: #b91c1c;
  --ce-warning-soft: rgba(245, 158, 11, 0.14);
  --ce-warning-text: #92400e;
  --ce-radius-sm: 6px;
  --ce-radius-md: 8px;
  --ce-radius-lg: 10px;
  --ce-radius-card: 16px;
  --ce-shadow-card: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --ce-shadow-ground: 0 0 0 1px rgba(50, 50, 93, 0.06), 0 24px 48px -24px rgba(50, 50, 93, 0.18);
  --ce-font: system-ui, -apple-system, "Segoe UI", sans-serif;
  --ce-mono: "SF Mono", "SFMono-Regular", ui-monospace, Consolas, monospace;
  --ce-gutter: clamp(16px, 4vw, 48px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ce-accent: #3b8ef5;
    --ce-accent-soft: rgba(59, 142, 245, 0.18);
    --ce-accent-ink: #7db4ff;
    --ce-canvas: #111113;
    --ce-well: #0a0a0b;
    --ce-surface: #1a1a1d;
    --ce-sunken: #151517;
    --ce-line: rgba(255, 255, 255, 0.08);
    --ce-line-strong: rgba(255, 255, 255, 0.16);
    --ce-text-strong: #ececee;
    --ce-text: #a6a6aa;
    --ce-text-faint: #76767a;
    --ce-success-soft: rgba(34, 197, 94, 0.16);
    --ce-success-text: #4ade80;
    --ce-danger-soft: rgba(239, 68, 68, 0.16);
    --ce-danger-text: #f87171;
    --ce-warning-soft: rgba(245, 158, 11, 0.16);
    --ce-warning-text: #fbbf24;
    --ce-shadow-card: 0 0 0 1px rgba(255, 255, 255, 0.07);
    --ce-shadow-ground: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 24px 48px -24px rgba(0, 0, 0, 0.6);
  }
}

[hidden] { display: none !important; }
* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ce-canvas);
  color: var(--ce-text);
  font: 15px/1.5 var(--ce-font);
  -webkit-font-smoothing: antialiased;
}

:where(h1, h2, h3):not(:where(.ss-stage *)) { color: var(--ce-text-strong); margin: 0; line-height: 1.25; }
:where(h1):not(:where(.ss-stage *)) { font-size: clamp(2rem, 4.2vw, 3.1rem); letter-spacing: -0.02em; font-weight: 700; }
:where(h2):not(:where(.ss-stage *)) { font-size: 1.15rem; font-weight: 650; margin-bottom: 14px; }
:where(h3):not(:where(.ss-stage *)) { font-size: 0.95rem; font-weight: 600; margin-bottom: 10px; }
:where(p):not(:where(.ss-stage *)) { margin: 0.45rem 0 0.9rem; }
:where(a):not(:where(.ss-stage *)) { color: var(--ce-accent-ink); }
:where(code):not(:where(.ss-stage *)) { font-family: var(--ce-mono); font-size: 0.88em; }
:where(button, input, select, textarea):not(:where(.ss-stage *)) { font: inherit; color: inherit; }
:where(button):not(:where(.ss-stage *)) { cursor: pointer; }
:where(button, input, select, textarea, summary, a):not(:where(.ss-stage *)):focus-visible {
  outline: 2px solid var(--ce-accent);
  outline-offset: 2px;
}
small, .muted { color: var(--ce-text-faint); }
pre { white-space: pre-wrap; word-break: break-word; font-size: 0.78rem; }

/* ---- Hero: copy beside the install demo (corner bleed, Stageshow framing) ---- */

header.top {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(24px, 3.5vw, 48px);
  align-items: center;
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(28px, 6vw, 72px) var(--ce-gutter) clamp(24px, 4vw, 40px);
}
.eyebrow {
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ce-accent-ink);
  font-weight: 700;
  margin-bottom: 10px;
}
.lede { font-size: 1.06rem; color: var(--ce-text); max-width: 40em; }
.hero-actions { margin-top: 18px; }
/* The kit re-fits a stage only while it is on screen: clip the slot so a
   resize while scrolled away never widens the page. */
.hero-stage { min-width: 0; overflow: hidden; border-radius: 14px; }
.hero-stage:empty { aspect-ratio: 720 / 400; }
@media (max-width: 860px) {
  header.top { grid-template-columns: 1fr; }
}

/* ---- Layout ---- */

.site {
  display: grid;
  gap: 20px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 var(--ce-gutter) 80px;
}
.card {
  background: var(--ce-surface);
  border-radius: var(--ce-radius-card);
  box-shadow: var(--ce-shadow-card);
  padding: 20px;
  min-width: 0;
}
.card > h2 { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.note { font-size: 0.86rem; color: var(--ce-text); }
.note.warn {
  border-radius: var(--ce-radius-lg);
  padding: 12px 14px;
  background: var(--ce-warning-soft);
  color: var(--ce-warning-text);
}
.note.warn strong { color: inherit; }
.hint { border-top: 1px solid var(--ce-line); margin-top: 18px; padding-top: 16px; }
.seg {
  margin: 10px 0 14px;
  padding: 10px 14px;
  border-radius: var(--ce-radius-lg);
  background: var(--ce-sunken);
  box-shadow: inset 0 0 0 1px var(--ce-line);
}
.seg summary, details.more > summary { cursor: pointer; font-size: 0.86rem; color: var(--ce-text-strong); font-weight: 500; }
details.more { margin: 6px 0 2px; }
details.more > summary { color: var(--ce-accent-ink); font-weight: 500; font-size: 0.82rem; }
.plain { margin: 6px 0 10px; padding-left: 20px; display: grid; gap: 6px; font-size: 0.9rem; }
footer {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 var(--ce-gutter) 32px;
  color: var(--ce-text-faint);
  font-size: 0.82rem;
}

/* ---- Controls ---- */

.control { margin: 12px 0; }
.control label, .control > strong { display: block; font-size: 0.84rem; color: var(--ce-text-strong); margin-bottom: 6px; }
input[type=file], input[type=text], select, textarea {
  width: 100%;
  min-width: 0;
  background: var(--ce-surface);
  color: var(--ce-text-strong);
  border: 0;
  box-shadow: inset 0 0 0 1px var(--ce-line-strong);
  border-radius: var(--ce-radius-md);
  padding: 8px 10px;
  min-height: 36px;
}
input[type=file] { font-size: 0.82rem; }
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--ce-radius-md);
  background: var(--ce-surface);
  color: var(--ce-text-strong);
  box-shadow: inset 0 0 0 1px var(--ce-line-strong), 0 1px 2px rgba(0, 0, 0, 0.05);
  font-weight: 560;
  font-size: 0.88rem;
  text-decoration: none;
  text-align: center;
  max-width: 100%;
  padding-block: 6px;
  transition: background-color 0.15s ease;
}
.button:hover { background: var(--ce-sunken); }
.button.main { background: var(--ce-accent); color: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }
.button.main:hover { background: color-mix(in srgb, var(--ce-accent) 88%, #000); }
.button.ghost { background: transparent; box-shadow: inset 0 0 0 1px var(--ce-line-strong); }
.button.danger { color: var(--ce-danger-text); }
.button:disabled { opacity: 0.45; cursor: not-allowed; }
.button-row { display: flex; gap: 8px; flex-wrap: wrap; }
.status {
  font-size: 0.82rem;
  border-radius: var(--ce-radius-md);
  background: var(--ce-sunken);
  box-shadow: inset 0 0 0 1px var(--ce-line);
  padding: 9px 12px;
  margin-top: 10px;
  color: var(--ce-text);
  overflow-wrap: anywhere;
}
.status.good { background: var(--ce-success-soft); box-shadow: none; color: var(--ce-success-text); }
.status.bad { background: var(--ce-danger-soft); box-shadow: none; color: var(--ce-danger-text); }
.count { font-weight: 700; color: var(--ce-text-strong); }
.checkbox { display: flex; align-items: flex-start; gap: 9px; font-size: 0.86rem; color: var(--ce-text-strong); margin: 8px 0; }
.checkbox input { margin-top: 3px; accent-color: var(--ce-accent); }
.badge {
  font-size: 0.7rem;
  font-weight: 560;
  border-radius: 999px;
  padding: 2px 8px;
  color: var(--ce-text);
  background: var(--ce-sunken);
  box-shadow: inset 0 0 0 1px var(--ce-line);
  white-space: nowrap;
}
.badge.accent { color: var(--ce-accent-ink); background: var(--ce-accent-soft); box-shadow: none; }

/* ---- Install ---- */

.install { max-width: 980px; width: 100%; justify-self: center; padding: 24px; }
.install > h2 { font-size: 1.35rem; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.step { border-top: 1px solid var(--ce-line); padding: 16px 0 6px; }
.step h3 { display: flex; align-items: center; gap: 10px; font-size: 1rem; margin-bottom: 12px; }
.step-num {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ce-text-strong);
  color: var(--ce-surface);
  font-size: 0.78rem;
  flex: 0 0 24px;
}
.image-choices, .base-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.base-choices { margin-bottom: 12px; }
.image-choice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border-radius: 12px;
  padding: 14px;
  background: var(--ce-surface);
  box-shadow: inset 0 0 0 1px var(--ce-line-strong);
  cursor: pointer;
  min-width: 0;
  transition: box-shadow 0.15s ease, background-color 0.15s ease;
}
.image-choice:hover { background: var(--ce-sunken); }
.image-choice:has(input:checked) { box-shadow: inset 0 0 0 2px var(--ce-accent); background: var(--ce-accent-soft); }
.image-choice input { margin-top: 4px; accent-color: var(--ce-accent); flex: 0 0 auto; }
.image-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.image-body .note { margin: 0; }
.image-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; color: var(--ce-text-strong); }
.image-meta { font-size: 0.7rem; color: var(--ce-text-faint); overflow-wrap: anywhere; }
.install .button-row { margin: 4px 0 8px; }
.install progress { width: 100%; height: 6px; margin-top: 8px; accent-color: var(--ce-accent); }

/* ---- What CE changes: a bento (Stageshow references/bento.md) ---- */

.features { padding-top: 12px; }
.features > h2 { font-size: 1.35rem; margin-bottom: 16px; }
.bento {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--ce-radius-card);
  background: var(--ce-surface);
  box-shadow: var(--ce-shadow-card);
  overflow: hidden;
  min-width: 0;
}
.tile--hero { grid-column: span 2; }
.tile-copy {
  margin: 0;
  padding: 22px 24px 0;
  font-size: 1.12rem;
  line-height: 1.35;
  color: var(--ce-text);
  max-width: 34em;
}
.tile-copy b { color: var(--ce-text-strong); font-weight: 650; }
.tile-picture { margin-top: auto; position: relative; display: flex; align-items: flex-end; }
.tile-picture > * { width: 100%; }
.tile--stat { background: #18181b; box-shadow: none; }
.stat {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  gap: 4px;
}
.stat-lead { font-size: 1.05rem; color: #a6a6aa; }
.ft-stat-number {
  font-size: clamp(3.4rem, 6vw, 4.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #f5f5f7;
  line-height: 1.05;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.ft-stat-unit { font-size: 0.5em; letter-spacing: 0; color: #a6a6aa; margin-left: 0.15em; }
.stat-label { font-size: 0.95rem; color: #a6a6aa; max-width: 22em; margin-top: 6px; }
@media (prefers-color-scheme: dark) {
  /* On a dark page the dark stat tile steps up a surface to stay the one contrasting tile */
  .tile--stat { background: #26262a; }
}
@media (max-width: 980px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile--hero { grid-column: span 2; }
}
@media (max-width: 620px) {
  .bento { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .tile--hero { grid-column: auto; }
}

/* ---- Advanced: the theme studio, simulator and builder ---- */

.advanced {
  border-radius: var(--ce-radius-card);
  background: var(--ce-surface);
  box-shadow: var(--ce-shadow-card);
}
.advanced > summary { cursor: pointer; padding: 18px 20px; list-style-position: inside; color: var(--ce-text-strong); }
.advanced > summary > span { display: inline-block; vertical-align: top; max-width: calc(100% - 24px); }
.advanced > summary .note { display: inline-block; margin: 4px 0 0; }
.advanced[open] > summary { border-bottom: 1px solid var(--ce-line); }
.advanced > .page {
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(300px, 0.92fr) minmax(300px, 1fr) minmax(285px, 1.02fr);
  gap: 16px;
  align-items: start;
  background: var(--ce-canvas);
  border-radius: 0 0 var(--ce-radius-card) var(--ce-radius-card);
}
.advanced > .page > .card { box-shadow: var(--ce-shadow-card); }
.preview-card { grid-column: span 2; }
@media (max-width: 1180px) {
  .advanced > .page { grid-template-columns: 1fr 1fr; }
  .editor-column, .preview-card { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .advanced > .page { grid-template-columns: 1fr; padding: 10px; }
  .editor-column, .preview-card { grid-column: auto; }
}

/* Palette (section 1) */
.palette { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.color-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  border-radius: var(--ce-radius-md);
  padding: 7px 8px;
  background: var(--ce-sunken);
  box-shadow: inset 0 0 0 1px var(--ce-line);
  font-size: 0.8rem;
  color: var(--ce-text-strong);
}
.color-field input[type=color] { border: 0; background: none; padding: 0; width: 38px; height: 26px; cursor: pointer; }
.color-field output { color: var(--ce-text-faint); font: 11px var(--ce-mono); }

/* Simulator (section 2): real 240x320 framebuffers in a device frame */
.simulator { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.sim-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 4px 14px; align-items: start; margin-bottom: 12px; }
.sim-controls .checkbox { grid-column: 1 / -1; margin: 4px 0; }
.tabbar { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; padding: 3px; border-radius: 10px; background: var(--ce-sunken); box-shadow: inset 0 0 0 1px var(--ce-line); }
.tabbar button { min-height: 30px; padding: 0 12px; font-size: 0.82rem; box-shadow: none; background: transparent; }
.tabbar button[aria-pressed=true] { background: var(--ce-surface); box-shadow: var(--ce-shadow-card); }
.device-comparison { width: 100%; display: flex; justify-content: center; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.device-column { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.device-column h3 { margin: 0; }
.device {
  width: 284px;
  max-width: 100%;
  padding: 18px 22px 20px;
  border-radius: 26px;
  background: linear-gradient(160deg, #3a3c42, #17181b);
  box-shadow: var(--ce-shadow-ground), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.screen { position: relative; width: 240px; height: 320px; max-width: 100%; overflow: hidden; background: #000; box-shadow: 0 0 0 2px #050607; }
.screen canvas { display: block; width: 240px; height: 320px; max-width: 100%; image-rendering: pixelated; background: #000; }
.asset-overlay { position: absolute; inset: 0; z-index: 5; pointer-events: none; display: none; overflow: hidden; }
.asset-overlay canvas { position: absolute; image-rendering: pixelated; width: auto; height: auto; }
.asset-overlay.active { display: block; }
.device-buttons { display: flex; justify-content: center; gap: 18px; }
.device-buttons button {
  width: 42px;
  height: 28px;
  border-radius: 14px;
  border: 0;
  background: var(--ce-surface);
  color: var(--ce-text-strong);
  box-shadow: inset 0 0 0 1px var(--ce-line-strong);
  font-weight: 700;
}
#sim-status, #theater-status { width: 100%; }

/* Resource editor (section 3) */
.gallery {
  max-height: 385px;
  overflow: auto;
  border-radius: var(--ce-radius-lg);
  background: var(--ce-sunken);
  box-shadow: inset 0 0 0 1px var(--ce-line);
  padding: 5px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}
.asset-entry {
  border: 0;
  border-radius: var(--ce-radius-md);
  background: var(--ce-surface);
  box-shadow: inset 0 0 0 1px var(--ce-line);
  color: var(--ce-text);
  padding: 8px 4px;
  min-height: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.asset-entry small { font-size: 0.68rem; text-align: center; }
.asset-entry.selected { box-shadow: inset 0 0 0 2px var(--ce-accent); }
.compare { display: flex; gap: 9px; align-items: flex-start; margin: 12px 0; }
.compare figure { margin: 0; width: 50%; min-width: 0; }
.compare figcaption { font-size: 0.78rem; color: var(--ce-text-faint); margin-bottom: 5px; }
.compare canvas {
  display: block;
  width: 100%;
  max-height: 190px;
  object-fit: contain;
  image-rendering: pixelated;
  background: repeating-conic-gradient(#d9d9dc 0% 25%, #f1f1f2 0% 50%) 50% / 12px 12px;
  border-radius: var(--ce-radius-sm);
  box-shadow: inset 0 0 0 1px var(--ce-line);
}
.swatch { display: flex; align-items: center; gap: 7px; }
.rules { max-height: 180px; overflow: auto; margin: 9px 0; font-size: 0.8rem; }
.rule { display: flex; justify-content: space-between; gap: 6px; align-items: center; border-top: 1px solid var(--ce-line); padding: 6px 0; }
.rule button { min-height: 28px; padding: 0 8px; font-size: 0.74rem; }
.rule code { font-size: 0.74rem; }
.gated-list { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: 0.86rem; }
.gated-list strong { color: var(--ce-text-strong); }

/* Builder (section 4) */
.feature-groups { display: grid; gap: 12px; }
.feature-group { border: 0; border-radius: 12px; padding: 8px 14px 10px; margin: 0; min-width: 0; background: var(--ce-sunken); box-shadow: inset 0 0 0 1px var(--ce-line); }
.feature-group legend { padding: 0 6px; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ce-text-faint); font-weight: 700; }
.feature { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-top: 1px solid var(--ce-line); font-size: 0.86rem; cursor: pointer; }
.feature:first-of-type { border-top: 0; }
.feature input { margin-top: 3px; accent-color: var(--ce-accent); flex: 0 0 auto; }
.feature > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.feature-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; color: var(--ce-text-strong); }
.feature-source { margin-left: auto; font-size: 0.76rem; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.feature .note { margin: 0; font-size: 0.8rem; }
.feature .why { color: var(--ce-warning-text); }
.feature:has(input:disabled) { cursor: default; opacity: 0.7; }
.feature.only-all { opacity: 0.6; }
#eq-slots label { display: block; font-size: 0.82rem; color: var(--ce-text-strong); margin: 10px 0 4px; }
#eq-slots textarea { font: 12px var(--ce-mono); }
.build-row { border-top: 1px solid var(--ce-line); margin-top: 18px; padding-top: 16px; }

@media (max-width: 480px) {
  .palette { grid-template-columns: 1fr; }
  code { overflow-wrap: anywhere; }
}

/* The equipment manual: locally served type, ruled sections and a warm ground. */
@font-face {
  font-family: Barlow;
  src: url('./fonts/Barlow-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Barlow;
  src: url('./fonts/Barlow-SemiBold.ttf') format('truetype');
  font-weight: 500 900;
  font-display: swap;
}
@font-face {
  font-family: 'Barlow Condensed';
  src: url('./fonts/BarlowCondensed-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-display: swap;
}
:root {
  --ce-font: Barlow, sans-serif;
  --ce-display: 'Barlow Condensed', Barlow, sans-serif;
  --ce-canvas: #eeece5;
  --ce-surface: #f8f7f2;
  --ce-sunken: #e7e5dc;
  --ce-text-strong: #252a25;
  --ce-text: #53594f;
  --ce-text-faint: #686d63;
  --ce-line: #252a2522;
  --ce-line-strong: #252a2540;
  --ce-accent: #b74720;
  --ce-accent-ink: #a63a16;
  --ce-accent-soft: #b7472010;
  /* Accent for links on the always-dark stat tile, in either scheme */
  --ce-on-dark-accent: #f6a47a;
  --ce-radius-card: 3px;
  --ce-radius-md: 3px;
  --ce-radius-lg: 3px;
  --ce-shadow-card: none;
}
body { font-size: 16px; }
.masthead {
  max-width: 1320px;
  margin: 0 auto;
  padding: 22px var(--ce-gutter);
  display: flex;
  gap: 30px;
  align-items: center;
  border-bottom: 1px solid var(--ce-line-strong);
}
.wordmark { font: 600 27px/1 var(--ce-display); letter-spacing: -.02em; text-decoration: none; color: var(--ce-text-strong); white-space: nowrap; }
.wordmark span { color: var(--ce-accent-ink); }
.masthead-note { font-size: 12px; }
.masthead-links { display: flex; gap: 24px; margin-left: auto; }
.masthead-links a { font-size: 13px; color: var(--ce-text-strong); text-decoration: none; }
.masthead-links a:hover { color: var(--ce-accent-ink); }
header.top {
  grid-template-columns: 1.1fr 1fr;
  gap: 0 24px;
  padding-top: 56px;
  padding-bottom: 0;
  align-items: center;
}
.eyebrow { font-size: 12px; letter-spacing: .13em; margin-bottom: 18px; }
.hero-copy h1 { font: 600 clamp(76px, 9.5vw, 132px)/.86 var(--ce-display); letter-spacing: -.035em; }
.hero-firmware { display: block; margin-top: 24px; font: 600 17px/1.3 var(--ce-font); letter-spacing: 0; }
.lede { max-width: 440px; margin-top: 15px; font-size: 17px; line-height: 1.55; }
.hero-actions { margin-top: 26px; }
.button { border-radius: 3px; min-height: 42px; padding-inline: 18px; box-shadow: inset 0 0 0 1px var(--ce-line-strong); font-weight: 600; }
.hero-stage { border-radius: 0; }
.hero-foot { grid-column: 1/-1; display: flex; justify-content: space-between; gap: 20px; padding: 22px 0; border-top: 1px solid var(--ce-line-strong); margin-top: 42px; font-size: 12px; }
.site { gap: 0; }
.section-index { display: block; font: 600 12px/1.4 var(--ce-font); letter-spacing: .12em; text-transform: uppercase; color: var(--ce-accent-ink); margin-bottom: 20px; }
.install {
  max-width: none;
  padding: 50px 0;
  display: grid;
  grid-template-columns: minmax(0, .68fr) minmax(0, 1.32fr);
  column-gap: 64px;
  align-items: start;
  border-top: 1px solid var(--ce-line-strong);
  background: transparent;
}
.install > h2 { grid-column: 1; grid-row: 1; display: block; font: 600 clamp(42px, 5vw, 64px)/1 var(--ce-display); letter-spacing: -.02em; }
.install > .warn { grid-column: 1; grid-row: 2; margin-top: 20px; border-left: 3px solid var(--ce-accent); background: var(--ce-surface); padding: 18px; line-height: 1.6; }
.install > .steps { grid-column: 2; grid-row: 1/4; }
.install > #going-back { grid-column: 1; grid-row: 3; }
.step { padding-top: 22px; padding-bottom: 18px; }
.step:first-child { border-top: 0; padding-top: 0; }
.step h3 { font-size: 20px; }
.step-num { border-radius: 2px; background: var(--ce-accent); color: #fff; width: 28px; height: 28px; flex-basis: 28px; }
.image-choice { border-radius: 3px; }
.features { border-top: 1px solid var(--ce-line-strong); padding: 48px 0; display: grid; grid-template-columns: minmax(0,.42fr) minmax(0,1fr); gap: 40px; align-items: start; }
.features > h2 { font: 600 clamp(38px, 4.3vw, 58px)/.98 var(--ce-display); letter-spacing: -.02em; }
.bento { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.tile { border: 1px solid var(--ce-line); }
.tile--hero { grid-column: 1/-1; }
.tile--stat { grid-column: 1/-1; min-height: 180px; }
.stat { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; padding: 26px; }
.stat-lead { grid-column: 1; align-self: end; }
.stat > [data-stat] { grid-column: 1; }
.stat-label { grid-column: 2; grid-row: 1/3; align-self: center; }
.bento > .tile:last-child { grid-column: 1/-1; }
.tile-copy { font-size: 17px; padding: 22px 22px 0; }
.advanced { border-top: 1px solid var(--ce-line-strong); border-bottom: 1px solid var(--ce-line-strong); background: transparent; border-radius: 0; margin-bottom: 48px; }
.advanced > summary { padding: 34px 0; }
.advanced > summary strong { font: 600 clamp(28px,4vw,44px)/1.1 var(--ce-display); }
.advanced > summary .note { max-width: 760px; margin-top: 14px; line-height: 1.6; }
.advanced > .page { padding: 24px 0; gap: 24px; }
.advanced .card { border: 1px solid var(--ce-line); }
footer { line-height: 1.7; max-width: 1000px; }
footer p { margin: 0 0 0.6em; }
@media (prefers-color-scheme: dark) {
  :root { --ce-canvas: #1c211e; --ce-surface: #252c27; --ce-sunken: #171c19; --ce-text-strong: #f1eee5; --ce-text: #b9c1b6; --ce-text-faint: #99a493; --ce-line: #e4eddb22; --ce-line-strong: #e4eddb45; --ce-accent: #b74720; --ce-accent-ink: #f6a47a; --ce-accent-soft: #f6a47a14; --ce-on-dark-accent: var(--ce-accent-ink); }
}
@media (max-width: 980px) {
  .masthead-note { display: none; }
  header.top { grid-template-columns: 1fr 1fr; }
  .hero-copy h1 { font-size: 90px; }
  .install { column-gap: 28px; grid-template-columns: minmax(0,.7fr) minmax(0,1.3fr); }
  .features { grid-template-columns: 1fr; gap: 20px; }
  .features > h2 br { display: none; }
}
@media (max-width: 700px) {
  .masthead { padding-block: 18px; gap: 16px; flex-wrap: wrap; }
  .masthead-links { gap: 16px; }
  .masthead-links a { font-size: 12px; }
  header.top { grid-template-columns: 1fr; padding-top: 34px; }
  .hero-copy h1 { font-size: clamp(76px,19vw,110px); }
  .hero-stage { margin-top: 18px; }
  .hero-foot { margin-top: 12px; font-size: 11px; }
  .hero-foot span { max-width: 48%; }
  .install { display: flex; flex-direction: column; gap: 20px; padding-block: 32px; }
  .install > .warn { margin: 0; }
  .install > .steps, .install > #going-back { width: 100%; }
  .install > h2 { margin: 0; }
  .features { padding-block: 32px; }
  .bento { grid-template-columns: minmax(0,1fr); }
  .tile--hero,.tile--stat,.bento > .tile:last-child { grid-column: auto; }
  .section-index { margin-bottom: 14px; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
.install-intro { min-width: 0; }
.install-intro > h2 { display: block; font: 600 clamp(42px, 5vw, 64px)/1 var(--ce-display); letter-spacing: -.02em; }
.install-intro > .warn { margin-top: 24px; border-left: 3px solid var(--ce-accent); background: var(--ce-surface); padding: 18px; line-height: 1.6; }
.install > .steps { grid-row: auto; }
@media (max-width: 700px) { .install-intro { width: 100%; } }

/* The optional configuration workbench now follows installation. */
.features { display:block; }
.features > h2 { margin-bottom:30px; }
.features .bento { grid-template-columns:repeat(3,minmax(0,1fr)); }
.features .tile--hero { grid-column:span 2; }
.features .tile--stat,.features .tile:last-child { grid-column:1/-1; }
.tile-copy h3 { margin:0 0 8px; font-size:20px; line-height:1.2; }
.tile-copy p { margin:0; font-size:15px; line-height:1.55; }
.tile-copy { max-width:none; }
.advanced { margin-bottom:0; }
@media(max-width:1050px) { .features .bento { grid-template-columns:repeat(2,minmax(0,1fr)); } .features .tile--hero { grid-column:span 2; } }
@media(max-width:620px) { .features .bento { grid-template-columns:minmax(0,1fr); } .features .tile--hero { grid-column:auto; } }
@media (min-width:1051px) { .features .tile:has([data-picture="system"]) { grid-column:span 3; } }
@media (min-width:621px) and (max-width:1050px) { .features .tile:has([data-picture="system"]) { grid-column:span 2; } }
.features-intro { max-width:780px; margin:-12px 0 28px; font-size:15px; line-height:1.6; }
@media (min-width:1051px) {
  .features .tile:has([data-picture="system"]) { grid-column:span 2; }
  .features .tile--stat:last-child { grid-column:span 1; }
  .features .tile--stat .stat { display:flex; align-items:flex-start; gap:14px; }
}

/* Product studies lead the section; supporting features use varied illustrations. */
.features .bento { grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
.features .tile--hero { grid-column:1/-1; }
.features .tile:has([data-picture="system"]) { grid-column:auto; }
.features .tile--stat:last-child { grid-column:auto; }
.features .tile--stat .stat { display:flex; align-items:flex-start; gap:14px; }
.features .tile-copy { padding:26px 28px 0; }
.features .tile-copy h3 { font-size:24px; }
.features .tile-copy p { max-width:47em; }
@media(max-width:700px) {
  .features .bento { grid-template-columns:minmax(0,1fr); gap:20px; }
  .features .tile--hero { grid-column:auto; }
  .features .tile-copy { padding:22px 22px 0; }
  .features .tile-copy h3 { font-size:22px; }
}
@media(min-width:901px) {
  .features .tile--hero { display:grid; grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr); align-items:center; }
  .features .tile--hero .tile-copy { padding:40px; }
  .features .tile--hero .tile-copy h3 { font-size:32px; }
  .features .tile--hero .tile-picture { margin-top:0; }
}

/* Source links stay with the feature they document. */
.patch-links { display:flex; flex-wrap:wrap; gap:8px 18px; margin-top:16px; font-size:13px; line-height:1.5; }
.patch-links a { text-decoration:underline; text-underline-offset:3px; }
.patch-links a:hover { text-decoration-thickness:2px; }
.tile--stat .patch-links a { color: var(--ce-on-dark-accent); }
@media(max-width:700px) {
  .masthead-links { width:100%; margin-left:0; justify-content:space-between; gap:12px; }
}

/* The Vorbis stat closes the grid on a full row (eight tiles pair up above
   it), read top to bottom as one statement: lead, figure, label, link. */
.features .tile--stat:last-child { grid-column: 1 / -1; }
.features .tile--stat .stat { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.features .tile--stat .stat-label { max-width: 46em; margin-top: 4px; }
.features .tile--stat .stat > * { align-self: flex-start; grid-column: auto; grid-row: auto; }
