* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg-image), var(--bg);
  min-height: 100vh;
  display: flex; flex-direction: column;
}
a { color: inherit; }
.wrap { max-width: 960px; width: 100%; margin: 0 auto; padding: 32px 24px 72px; flex: 1; }
/* data pages (tables, canvases, matrices) take the viewport; reading pages keep
   the 960px column and .lesson-body its 68ch measure (#234) */
body.wide .wrap, body.wide .header-inner, body.wide .site-footer { max-width: none; }

/* Header / footer */
.header-inner, .site-footer {
  max-width: 960px; margin: 0 auto; width: 100%;
  padding: 18px 24px; display: flex; align-items: center; justify-content: space-between;
}
/* full-bleed sticky bar; the 960px row lives in .header-inner */
.site-header {
  position: sticky; top: 0; z-index: 50; width: 100%;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(10px);
}
@supports not (backdrop-filter: blur(10px)) {
  .site-header { background: var(--bg); }
}
.brand { font-weight: 700; font-size: 18px; text-decoration: none; letter-spacing: -.01em; }
.brand span { color: var(--brand); }
.env-tag { font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; margin-left: 8px; }
.site-header nav a { font-size: 14px; color: var(--muted); text-decoration: none; }
.site-header nav a:hover { color: var(--brand); }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; margin-top: auto; }
.site-footer .mono { font-family: var(--font-mono); font-size: 12px; }

/* Hero */
header.hero { margin-bottom: 24px; }
.eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); }
h1 { font-size: 34px; line-height: 1.05; margin: 6px 0 8px; letter-spacing: -.02em; }
.sub { color: var(--muted); max-width: 62ch; margin: 0; }
.lab-note { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-top: 10px; }

/* Lesson cards (index) */
.lessons { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 22px 0 8px; }
.lesson { background: var(--bg-panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.lesson .n { font-family: var(--font-mono); font-size: 12px; color: var(--brand); }
.lesson h3 { margin: 0; font-size: 18px; }
.lesson p { margin: 0; color: var(--muted); font-size: 14px; flex: 1; }
.lesson .task { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }

/* Lesson list (curriculum) */
.lesson-list { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-direction: column; gap: 10px; }
.lesson-list a { display: grid; grid-template-columns: auto 1fr auto; gap: 6px 14px; align-items: baseline;
  background: var(--bg-panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; text-decoration: none; }
.lesson-list a:hover { border-color: var(--brand); }
.lesson-list .n { font-family: var(--font-mono); font-size: 12px; color: var(--brand); }
.lesson-list .title { font-weight: 600; }
.lesson-list .blurb { grid-column: 2; color: var(--muted); font-size: 14px; }
.lesson-list .task { grid-column: 3; grid-row: 1 / span 2; font-family: var(--font-mono); font-size: 11px; color: var(--muted); align-self: center; }

/* Buttons */
button.start { appearance: none; border: 0; cursor: pointer; background: var(--brand); color: var(--on-brand);
  font-family: var(--font-sans); font-weight: 600; font-size: 14px; padding: 10px 14px; border-radius: 10px;
  transition: transform .06s ease, filter .15s ease; }
button.start:hover { filter: brightness(1.08); }
button.start:active { transform: translateY(1px); }
.htmx-request button.start { opacity: .6; pointer-events: none; }

/* Session panel */
#session { margin-top: 22px; }
.panel { background: var(--bg-panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px; box-shadow: 0 1px 0 var(--panel-hi) inset; }
.panel-head { display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
/* lab pages: the lab name + Read/Play/Code stay visible while scrolling,
   parked just under the sticky site header */
.lab > .panel-head { position: sticky; top: 57px; z-index: 40;
  padding: 12px 0; margin: 0 0 14px;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(10px); }
@supports not (backdrop-filter: blur(10px)) {
  .lab > .panel-head { background: var(--bg); }
}
.panel-head h2 { margin: 0; font-size: 20px; }
.panel-head .task { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

[hidden] { display: none !important; }  /* any display:flex/grid on the element must not defeat `hidden` */

.badge { font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; padding: 5px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; }
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.badge[data-status="queued"] { color: var(--warn); }
.badge[data-status="queued"]::before { background: var(--warn); }
.badge[data-status="assigning gpu"] { color: var(--brand); }
.badge[data-status="assigning gpu"]::before { background: var(--brand); animation: pulse 1s infinite; }
.badge[data-status="running"] { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }
.badge[data-status="running"]::before { background: var(--brand); animation: pulse .8s infinite; }
.badge[data-status="booting"], .badge[data-status="launching"], .badge[data-status="recording"] { color: var(--brand); border-color: var(--brand); }
.badge[data-status="booting"]::before, .badge[data-status="launching"]::before, .badge[data-status="recording"]::before { background: var(--brand); animation: pulse 1.2s infinite; }
.badge[data-status="complete"] { color: var(--ok); border-color: var(--ok-line); background: var(--ok-soft); }
.badge[data-status="complete"]::before { background: var(--ok); animation: none; }
button.badge { cursor: default; }
button.badge[data-status=""], button.badge[data-status="error"] { cursor: pointer; }
/* the tap-to-load state must be discoverable: pulse a ring until tapped */
button.badge[data-status=""] { color: var(--brand); border-color: var(--brand); animation: tap-nudge 1.6s ease-out infinite; }
@keyframes tap-nudge { from { box-shadow: 0 0 0 0 var(--brand-soft), 0 0 0 0 var(--brand); } to { box-shadow: 0 0 0 12px transparent, 0 0 0 5px transparent; } }
.badge[data-status="loading"] { color: var(--brand); }
.badge[data-status="loading"]::before { background: var(--brand); animation: pulse .8s infinite; }
.badge[data-status="error"] { color: var(--err); border-color: var(--err); }
.badge[data-status="error"]::before { background: var(--err); animation: none; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

/* Session panel: the curve and the log tail each get their own row. Side-by-side
   squeezed the terminal to ~40% of a 960px column, so real trainer lines (long
   docker exec commands, rsl_rl tables) wrapped into mush — the LOG stays full
   width; the CHART gets a width cap instead (a 900px-wide 220px-tall reward
   ribbon reads as noise). */
.grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 16px; }
.grid > div { min-width: 0; }  /* a canvas or <pre> must never stretch its slot */
.card-title { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.chartbox { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; max-width: 560px; }
canvas#reward { width: 100%; height: 220px; display: block; }

pre#log { background: #14140f; color: #d6d6c8; border-radius: 12px; margin: 0; font-family: var(--font-mono);
  font-size: 11.5px; line-height: 1.5; padding: 12px; height: 320px; overflow: auto;
  white-space: pre; }  /* pre, not pre-wrap: don't mangle the trainer's own columns */
pre#log .brand { color: #a99bff; }


/* Lesson photos. `.missing` must read as UNFINISHED at a glance — never let a
   stub pass for a design decision. */
.shot { margin: 18px 0; }
.shot img { width: 100%; max-width: 640px; border-radius: 12px; display: block;
  border: 1px solid var(--line); }
.shot figcaption { color: var(--muted); font-size: 13px; margin-top: 7px; max-width: 62ch; }
.shot.missing { border: 2px dashed var(--warn); border-radius: 12px; padding: 16px;
  background: var(--surface); max-width: 640px; }
.shot.missing .shot-tag { font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--warn); }
.shot.missing .shot-name { font-family: var(--font-mono); font-size: 12.5px;
  color: var(--ink); margin-top: 4px; word-break: break-all; }
.shot.missing figcaption { margin-top: 8px; }

/* Accounts / nav */
.site-header nav { display: flex; align-items: center; gap: 16px; }
.navform { display: inline-flex; align-items: center; gap: 10px; margin: 0; }
.whoami { font-size: 13px; color: var(--muted); }
button.linkish { appearance: none; background: none; border: 0; padding: 0; cursor: pointer;
  font-family: var(--font-sans); font-size: 14px; color: var(--muted); }
button.linkish:hover { color: var(--brand); }
/* Auth pages: the form IS the page, so centre it rather than leaving it stranded
   in the corner of a 960px column. The column centres; labels stay left-aligned,
   because centred form labels are hard to scan. */
.auth-page { max-width: 420px; margin: 0 auto; padding-top: 24px; }
.auth-page .hero { text-align: center; margin-bottom: 20px; }
.auth-page .hero .sub { margin-left: auto; margin-right: auto; }
.authform { max-width: 420px; display: flex; flex-direction: column; gap: 14px; }
.authform label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); }
.authform input, .rowform input, .rowform select {
  font-family: var(--font-sans); font-size: 14px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; }
.authform input:focus, .rowform input:focus, .rowform select:focus, .editor:focus {
  outline: 2px solid var(--brand-soft); border-color: var(--brand); }
/* browser autofill paints its own colors from the UA color scheme; pin ours so
   a filled field reads the same as a typed one in every theme state */
.authform input:-webkit-autofill, .rowform input:-webkit-autofill, .settings-form input:-webkit-autofill {
  -webkit-text-fill-color: var(--ink); -webkit-box-shadow: 0 0 0 1000px var(--surface) inset;
  caret-color: var(--ink); }
.authform label .opt { font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); border: 1px solid var(--line); border-radius: 999px;
  padding: 1px 6px; margin-left: 6px; }
.formerror { color: var(--err); font-size: 14px; margin: 0; }
.rowform { display: flex; gap: 10px; flex-wrap: wrap; }
.rowform input { flex: 1 1 180px; }

/* Tables (admin, team) */
.table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 10px; }
.table th { text-align: left; font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); padding: 6px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 7px 10px; border-bottom: 1px solid var(--line); }
.table .mono, .codechip { font-family: var(--font-mono); font-size: 12px; }
.codechip { background: var(--brand-soft); color: var(--brand); border-radius: 6px; padding: 2px 8px;
  font-weight: 400; vertical-align: middle; }
.cell { text-align: center; color: var(--muted); }
.cell.done { color: var(--ok); font-weight: 700; }

/* Curriculum map states */
.lesson-list li.done a { border-color: var(--ok-line); }
.lesson-list li.done .task { color: var(--ok); }
.lesson-list li.locked a { opacity: .55; }
.lesson.teaser { opacity: .65; border-style: dashed; }
a.start { display: inline-block; text-decoration: none; text-align: center; background: var(--brand);
  color: var(--on-brand); font-weight: 600; font-size: 14px; padding: 10px 14px; border-radius: 10px; }
a.start:hover { filter: brightness(1.08); }

/* Lesson body */
.lesson-body { max-width: 68ch; }
.lesson-body h2, .runbox h2, .checkpoint h2 { font-size: 20px; margin: 28px 0 8px; }
.lesson-body pre { background: #14140f; color: #d6d6c8; border-radius: 12px; padding: 12px;
  font-family: var(--font-mono); font-size: 12px; line-height: 1.55; overflow-x: auto; }
.lesson-body code { font-family: var(--font-mono); font-size: .92em; background: var(--brand-soft);
  border-radius: 4px; padding: 1px 4px; }
.lesson-body pre code { background: none; padding: 0; }
.lesson-body ol li, .lesson-body ul li { margin: 6px 0; }
.lesson-body details { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px;
  background: var(--bg-panel); margin: 14px 0; }
.lesson-body summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.callout { border-left: 3px solid var(--brand); background: var(--bg-panel); border-radius: 0 10px 10px 0;
  padding: 10px 14px; font-size: 14px; margin: 14px 0; }
.callout.warn { border-color: var(--warn); }

/* Checkpoint */
.checkpoint form { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.exercise { width: 100%; }
.editor { width: 100%; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.6;
  background: #14140f; color: #e8e8dc; border: 1px solid var(--line); border-radius: 12px;
  padding: 14px; resize: vertical; tab-size: 4; }
/* Overlay: highlighted pre behind the textarea; font metrics must match .editor exactly */
.editor-wrap { position: relative; width: 100%; }
/* CodeMirror replaces the textarea with .cm-host, which otherwise inherits the
   page's 16px — match the .editor metrics it stands in for */
.editor-wrap .cm-host { font-size: 12.5px; line-height: 1.6; border-radius: 10px;
  border: 1px solid var(--line); }
/* height-capped editors must scroll, not clip — "some of the code isn't available" bug */
.editor-wrap .cm-host .cm-scroller { overflow: auto; border-radius: 10px; }
.editor-wrap pre { position: absolute; inset: 0; margin: 0; overflow: hidden; pointer-events: none;
  background: #14140f; border: 1px solid transparent; border-radius: 12px; padding: 14px;
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.6; tab-size: 4;
  white-space: pre-wrap; overflow-wrap: break-word; }
.editor-wrap pre code { font: inherit; white-space: inherit; }
.editor-wrap .editor { position: relative; z-index: 1; display: block;
  background: transparent; color: transparent; caret-color: #e8e8dc; }
/* beat the hljs theme's `pre code.hljs { padding: 1em }` or the caret drifts off the text */
pre code.hljs, .editor-wrap pre code.hljs { background: transparent; padding: 0; }
.editor-wrap .blank { color: var(--warn); font-weight: 700; }
/* wrong-at-the-source marks, set by markWrong() after a failed checkpoint */
fieldset.quiz.wrong { border-color: var(--err); }
fieldset.quiz.wrong legend::after { content: " ✗ not quite"; color: var(--err); font-weight: 400; }
.editor-wrap.wrong .editor { border-color: var(--err); }
button.start.ghost { background: transparent; color: var(--brand); border: 1px solid var(--brand);
  margin-top: 10px; }
.hint { font-size: 14px; margin: 10px 0 0; padding-left: 20px; }
.hint.ok { color: var(--ok); padding-left: 0; }
.reveal { margin-top: 12px; }
.reveal summary { cursor: pointer; font-size: 14px; color: var(--muted); }
.reveal pre { background: #14140f; color: #d6d6c8; border-radius: 12px; padding: 12px;
  font-family: var(--font-mono); font-size: 12px; line-height: 1.55; overflow-x: auto; }
fieldset.quiz { border: 1px solid var(--line); border-radius: 12px; background: var(--bg-panel);
  padding: 12px 16px 14px; width: 100%; }
/* float pulls the legend inside the box instead of straddling the top border */
fieldset.quiz legend { float: left; width: 100%; font-weight: 600; font-size: 14px;
  padding: 0; margin: 0 0 10px; }
fieldset.quiz label { display: block; clear: both; font-size: 14px; margin: 7px 0; cursor: pointer; }
label.attest { font-size: 14px; background: var(--bg-panel); border: 1px dashed var(--line);
  border-radius: 10px; padding: 10px 14px; cursor: pointer; }
#verdict { margin-top: 16px; width: 100%; }
.panel.pass { border-color: var(--ok-line); background: var(--ok-soft); }
.panel.fail { border-color: var(--warn); }
.panel.fail ul { margin: 8px 0; padding-left: 20px; font-size: 14px; }
.locked-panel h2 { margin-top: 0; }
.runbox { margin-top: 8px; }

.videobox { margin-top: 16px; }
.video-ph .rollout { width: 100%; max-width: 640px; border-radius: 10px;
  background: #000; display: block; }
.video-ph { border: 1px dashed var(--line); border-radius: 12px; background: var(--surface); padding: 16px; display: flex; align-items: center; gap: 16px; }
.video-ph.hidden { display: none; }
.dl.hidden { display: none; } /* no artifact -> no link; a dead "#" is worse than nothing */
.video-ph .cap { font-size: 13px; color: var(--muted); }
.video-ph .cap b { color: var(--ink); }
.video-ph .dl { font-family: var(--font-mono); font-size: 12px; color: var(--brand); text-decoration: none; }
.video-ph .dl:hover { text-decoration: underline; }
.track { flex: 0 0 auto; }
/* boot / recording stage card inside the placeholder (#206) */
.video-ph .stage { flex: 1 1 auto; min-width: 0; display: grid; gap: 8px; }
.stage-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.stage-title { font-size: 14px; color: var(--ink); }
.stage-time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.stage-bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.stage-bar i { display: block; height: 100%; width: 35%; border-radius: 3px; background: var(--brand); animation: stage-slide 1.4s ease-in-out infinite; }
@keyframes stage-slide { from { transform: translateX(-110%); } to { transform: translateX(300%); } }
@media (prefers-reduced-motion: reduce) { .stage-bar i { animation: none; width: 100%; opacity: .5; } }
.stage-hint { font-size: 12px; color: var(--muted); }
.car { fill: var(--brand); }

/* ── Lesson graph — EP-faithful: boxed nodes, overlapping badge pills ────── */
.graph-track { margin-top: 28px; position: relative; }
.graph-level { border: none; border-radius: 14px; background: var(--bg-panel);
  padding: 30px 18px 42px; margin: 48px 0; position: relative; }
.graph-level + .graph-level::before { content: ""; position: absolute; left: 50%;
  top: -49px; height: 48px; border-left: 2px dashed var(--line); }
.graph-level.finished + .graph-level::before { border-left-color: var(--brand); opacity: .55; }
.level-tag { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); letter-spacing: 0.1em; }
.level-tag .ok { color: var(--ok); margin-left: 8px; }
.level-nodes { display: flex; flex-wrap: wrap; gap: 56px 48px; margin-top: 38px;
  justify-content: center; align-items: flex-start; }
.gnode { position: relative; display: flex; align-items: center; justify-content: center;
  width: 280px; height: 88px; padding: 14px 22px;
  border-radius: 6px; background: var(--surface); border: 1px solid var(--line);
  text-decoration: none; color: inherit; text-align: center;
  box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.gnode .nnum { position: absolute; top: 8px; left: 12px; font-size: 10.5px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); }
.gnode.done .nnum { color: var(--on-brand); opacity: .8; }
.gnode .ntitle { font-family: var(--font-mono); font-size: 14.5px; font-weight: 500;
  color: var(--ink); }
.gnode .nbadge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  white-space: nowrap; background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 3px 12px; font-family: var(--font-mono);
  font-size: 11px; color: var(--muted); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.gnode.done .nbadge { color: var(--ok); border-color: var(--ok-line); }
/* metaphor: filled purple = DONE (matches the progress ring); outline = open */
.gnode.done { background: var(--brand); border-color: var(--brand); }
.gnode.done .ntitle { color: var(--on-brand); }
.gnode.open { border: 1.5px solid var(--brand); }
.gnode.open .ntitle { color: var(--ink); }
.gnode.open .nbadge { color: var(--brand); border-color: var(--brand); }
.gnode.open:hover { background: var(--brand-soft); }
.gnode.locked { cursor: default; }
.gnode.locked .ntitle { color: var(--muted); }
.gnode.locked .nbadge { display: none; }
.band-goal { margin: 8px 0 0; font-size: 13.5px; color: var(--muted); }

.f710 { margin: 14px 0; }
.f710 svg { display: block; width: 100%; max-width: 760px; height: auto; }
.readshot { margin: 14px 0; }
.readshot img { display: block; max-width: 100%; border: 1px solid var(--line);
  border-radius: 12px; }
.readshot-row { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.readshot-row .readshot, .readshot-row > div { flex: 1 1 280px; margin: 8px 0; }

/* working replica of the tab bar in the welcome card — clicks switch tabs
   like the real one top right */
.demo-tabs { display: inline-flex; margin: 2px 0 12px; background: var(--bg); }

/* EP-style stepped read sections: each section is a card, and Continue
   travels visible distance into the next one */
.read .rsec { background: var(--bg-panel); border-radius: 14px;
  padding: 28px 30px 30px; margin: 0 0 40px; scroll-margin-top: 132px; }
.read .rsec > h3:first-child { margin-top: 0; }
.read .rnext { display: block; margin: 20px 0 2px; }
.pinhole { display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  font-size: 13px; }
.pinhole .val { color: var(--brand); font-weight: 600; }

/* prev / next lab links — bottom of every lab page, no chrome */
.labnav { display: flex; gap: 16px; margin: 30px 0 6px; }
.labnav .navcard { flex: 1 1 0; display: flex; flex-direction: column; gap: 5px;
  padding: 13px 4px; text-decoration: none; }
.labnav .navcard.next { align-items: flex-end; text-align: right; }
.labnav .navcard .dir { font-size: 11.5px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); }
.labnav .navcard .name { font-size: 15px; font-weight: 600; color: var(--ink); }
.labnav a.navcard:hover .name { color: var(--brand); }

/* Hello Racer sim teleop */
.simcar canvas { display: block; max-width: 100%; height: auto; margin: 14px 0 0;
  border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.sim-hud { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 10px;
  font-size: 13px; color: var(--muted); }
.sim-hud b { color: var(--ink); }

/* labs index: not-built / car-only — dashed + badge, but the stub page is
   there to read, so they stay clickable */
.gnode.soon { border-style: dashed; }
.gnode.soon .ntitle { color: var(--muted); }
.gnode.soon:hover { background: var(--brand-soft); }
.gnode.soon:hover .ntitle { color: var(--ink); }

/* stub reads: a screenshot/photo that still needs to be shot */
.shot { border: 1.5px dashed var(--line); border-radius: 10px; padding: 18px 16px;
  margin: 14px 0; font-family: var(--font-mono); font-size: 12.5px; color: var(--muted);
  display: flex; align-items: center; gap: 10px; }
.shot i { color: var(--brand); }

/* ── Stepped lesson player ──────────────────────────────────────────────── */
.player { display: flex; flex-direction: column; gap: 18px; margin-top: 18px; }
.segment { display: flex; flex-direction: column; gap: 12px; }
.segment.prose p { margin: 0 0 8px; }
.continue { align-self: flex-start; }
.example-widget { border: 1px solid var(--line); border-radius: 16px; padding: 18px;
  background: var(--bg-panel); display: flex; flex-direction: column; gap: 10px; }
.example-widget.done { border-style: dashed; }
.example-widget .prompt { font-weight: 600; margin: 0; }
.example-widget label { display: block; padding: 4px 0; }
.predict-row { display: flex; align-items: center; gap: 10px; }
.predict-row input { flex: 1; max-width: 360px; font-family: var(--font-mono);
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: inherit; }
.result-label { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
/* every slider wears the brand in both themes - no UA-default blue/gray */
input[type="range"] { accent-color: var(--brand); }
/* #160: faders stand up ONLY inside console strips (labs, sim examples,
   deployment knobs) - a bare range input everywhere else stays horizontal */
.slider-row input[type="range"], .knob-row input[type="range"] {
  writing-mode: vertical-lr; direction: rtl; width: auto; height: 110px; }
.slider-row { display: flex; flex-direction: column-reverse; align-items: center; gap: 6px;
  text-align: center; }
.slider-row label { font-family: var(--font-mono); font-size: 13px; max-width: 140px; }
.slider-row .val { color: var(--brand); }
#sliders { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-end; }
#sliders > p, #sliders .knob-glossary { flex-basis: 100%; }
.fader-bank { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-end; margin: 8px 0; }
label:has(> input[type="range"]) { display: inline-flex; flex-direction: column-reverse;
  align-items: center; gap: 6px; }
.knob-glossary { margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; }
.knob-glossary summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.knob-glossary dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 10px 0 4px; }
.knob-glossary dt { font-family: var(--font-mono); font-size: 12px; color: var(--brand); }
.knob-glossary dd { margin: 0; font-size: 13px; color: var(--muted); }
.example-widget.shake { animation: shake 0.3s; border-color: #c43a2d; }
.example-widget.shake input[type="text"] { border-color: #c43a2d; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* ── Header: nav + user menu ────────────────────────────────────────────── */
.header-right { display: flex; align-items: center; gap: 20px; }
.runner-badge, .runner-badge-inner { display: inline-flex; align-items: center; gap: 6px; }
.auth-links .cta { border: 1px solid var(--brand); color: var(--brand); padding: 6px 12px; border-radius: 10px; }
.auth-links .cta:hover { background: var(--brand-soft); }
.user-menu { position: relative; }
.user-menu summary { list-style: none; cursor: pointer; font-size: 14px; color: var(--muted); }
.user-menu summary .godbolt { color: var(--brand); }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover, .user-menu[open] summary { color: var(--brand); }
.user-menu .caret { font-size: 10px; margin-left: 5px; }
.menu-panel { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; z-index: 10;
  background: var(--bg-panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,.25); display: flex; flex-direction: column; gap: 10px; }
.menu-id { font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.menu-id .mono { font-family: var(--font-mono); font-size: 11px; margin-top: 2px; }
.header-right nav, .auth-links { display: flex; align-items: center; gap: 16px; white-space: nowrap; }
.user-menu summary::marker { content: ""; display: none; }
/* Labs dropdown in the main nav — user-menu chrome, but it opens under its
   own trigger (left-aligned) and its items read like nav links */
.nav-menu .menu-panel { left: 0; right: auto; min-width: 160px; gap: 8px; }
.nav-menu .menu-panel a { font-size: 14px; color: var(--muted); }
.nav-menu .menu-panel a:hover, .nav-menu .menu-panel a.active,
.nav-menu summary.active { color: var(--brand); }

/* ── API reference box + CodeMirror host ────────────────────────────────── */
.api-ref { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 10px 0;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; }
.api-ref dt code { font-family: var(--font-mono); font-size: 12.5px; color: var(--brand); }
.api-ref dd { margin: 0; color: var(--muted); }
.cm-host .cm-editor { border: 1px solid var(--line); border-radius: 10px; font-size: 13.5px; }
.cm-host .cm-editor.cm-focused { outline: none; border-color: var(--brand); }
.cm-host .cm-content, .cm-host .cm-gutters { font-family: var(--font-mono); }
.editor-wrap.wrong .cm-editor { border-color: #c43a2d; }

/* ── Drawn DAG edges ────────────────────────────────────────────────────── */
.graph-wrap { position: relative; }
.graph-wrap svg.edges { position: absolute; inset: 0; pointer-events: none; z-index: 2;
  overflow: visible; }
.graph-wrap .graph-level { position: relative; }
.graph-wrap .gnode { position: relative; z-index: 3; }
svg.edges .edge { fill: none; stroke-dasharray: 6 6; stroke-width: 2; }
svg.edges .edge.live { stroke: var(--brand); opacity: .55; }
svg.edges .edge.future { stroke: var(--line); }
.level-nodes { justify-content: center; }

/* sticky progress panel (EP's ring) */
.cta-row { display: flex; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
/* the outlined twin of a.start: without this the link took the filled style and
   .ghost:hover painted its text brand-on-brand (the blank Create an account, 2026-09-12) */
a.start.ghost { background: transparent; color: var(--brand); border: 1px solid var(--brand); }
a.start.ghost:hover { background: var(--brand-soft); color: var(--brand); }
/* home showcase: the car, then train / prove / race; one column on a phone */
.showcase { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px;
  align-items: stretch; margin: 28px 0 8px; }
.showcase figure { margin: 0; background: var(--bg-panel); border: 1px solid var(--line);
  border-radius: 16px; overflow: hidden; box-shadow: 0 1px 0 var(--panel-hi) inset; }
.showcase img { display: block; width: 100%; height: auto; }
.showcase figcaption { padding: 12px 14px 14px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.showcase figcaption .eyebrow { display: block; margin-bottom: 4px; }
.show-hero { display: flex; flex-direction: column; }
.show-hero img { flex: 1 1 auto; min-height: 0; aspect-ratio: 16 / 10; object-fit: cover; background: var(--studio); }
@media (min-width: 861px) { .show-hero img { aspect-ratio: auto; } }  /* fill the card beside the taller grid */
.show-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.show-grid .show-card:last-child { grid-column: 1 / -1; }
.show-card img { aspect-ratio: 16 / 9; object-fit: cover; object-position: top; }
@media (max-width: 860px) {
  .showcase { grid-template-columns: 1fr; }
  .show-grid .show-card:last-child { grid-column: auto; }
}
@media (max-width: 520px) { .show-grid { grid-template-columns: 1fr; } }
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px; margin-top: 34px; }
.pillars h3 { margin: 0 0 6px; font-size: 16px; }
.pillars p { margin: 0; color: var(--muted); font-size: 14px; }

/* the one next lesson: Up-next tag + a pronounced glow */
.gnode.open.next { animation: breathe 2.2s ease-in-out infinite; }
@keyframes breathe {
  0%, 100% { box-shadow: 0 0 0 2px var(--brand-soft); }
  50% { box-shadow: 0 0 2px 10px rgba(139, 124, 248, 0.33); }
}
@media (prefers-reduced-motion: reduce) {
  .gnode.open.next { animation: none; box-shadow: 0 0 0 4px rgba(139, 124, 248, 0.4); }
}

/* ---- car profile: the racer dashboard ---------------------------------- */
.racer-hero { background: var(--bg-panel); border-radius: 18px;
  padding: 40px 36px 32px; margin-top: 26px; }
.racer-name { font-size: 44px; margin: 6px 0 8px; letter-spacing: -0.5px; }
.racer-tag { color: var(--muted); font-size: 17px; max-width: 46ch; margin: 0; }
.racer-status { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.chip { font-family: var(--font-mono); font-size: 12px; padding: 5px 11px;
  border-radius: 999px; display: inline-flex; align-items: center; gap: 7px; }
.chip.ok { background: var(--ok-soft); color: var(--ok); border: 1px solid var(--ok-line); }
.chip.soon { background: var(--surface); color: var(--muted); border: 1px dashed var(--line); }
.chip.err { background: var(--err-soft, var(--surface)); color: var(--err);
  border: 1px dashed var(--err); opacity: 0.85; }
.desktop-dl { display: flex; align-items: center; gap: 12px; margin-top: 12px;
  font-size: 13px; color: var(--muted); }
.dl-bar { flex: 1; max-width: 280px; height: 6px; border-radius: 999px;
  background: var(--line); overflow: hidden; }
.dl-bar-fill { height: 100%; border-radius: 999px; background: var(--brand);
  transition: width 0.6s ease; }
.dl-gb { font-size: 12px; }
.dl-bar-pulse { width: 40%; animation: dl-pulse 1.4s ease-in-out infinite alternate; }
@keyframes dl-pulse { from { margin-left: 0; } to { margin-left: 60%; } }
.racer-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px; margin-top: 18px; }
.racer-card { background: var(--bg-panel); border-radius: 18px; padding: 24px 24px 20px; }
.racer-card .card-title { font-weight: 700; font-size: 17px; display: flex;
  align-items: center; gap: 9px; margin-bottom: 8px; }
.racer-card .card-title i { color: var(--brand); }
.racer-card p { color: var(--muted); font-size: 14.5px; line-height: 1.55; margin: 0 0 14px; }
.racer-card p strong { color: var(--ink); }
.hintline { font-size: 12.5px !important; margin-top: 10px !important; }
.ghost { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px;
  border: 1px solid var(--line); border-radius: 10px; color: var(--ink);
  text-decoration: none; font-weight: 600; font-size: 14px; background: var(--surface); }
.ghost:hover { border-color: var(--brand); color: var(--brand); }
.racer-settings { max-width: 560px; margin-top: 26px; }
.racer-settings.policy, .racer-settings.system, .racer-settings.sensors { max-width: none; }  /* tables want the page width */
.settings-form { background: var(--bg-panel); border-radius: 18px; padding: 26px;
  margin-top: 18px; display: flex; flex-direction: column; gap: 18px; }
.settings-form label { display: flex; flex-direction: column; gap: 6px; }
.settings-form label > span { font-weight: 600; font-size: 14px; }
.settings-form input { background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; font-size: 15px; color: var(--ink);
  font-family: var(--font-sans); }
.settings-form input.mono { font-family: var(--font-mono); width: 90px; }
.settings-form input:focus { outline: 2px solid var(--brand); border-color: var(--brand); }
.settings-form small { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.settings-form .advanced summary { cursor: pointer; font-weight: 600; font-size: 14px;
  color: var(--muted); }
.settings-form .advanced[open] summary { margin-bottom: 10px; }
.callout.ok { background: var(--ok-soft); border: 1px solid var(--ok-line);
  color: var(--ok); border-radius: 12px; padding: 12px 16px; margin-top: 14px;
  font-size: 14px; display: flex; gap: 9px; align-items: center; }

/* ---- racer dashboard v2: next lesson, telemetry, strategies ------------ */
.racer-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
@media (max-width: 860px) { .racer-row { grid-template-columns: 1fr; } }
.next-lesson .lesson-meta { font-size: 11px; color: var(--muted); letter-spacing: 0.06em; }
.next-lesson .lesson-title { font-size: 21px; font-weight: 700; margin: 4px 0 6px; }
.stat-label { font-size: 12.5px; color: var(--muted); }
.stat-row { display: flex; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.stat-tile { display: flex; flex-direction: column; gap: 2px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px; min-width: 120px; }
.stat-tile .stat-num { font-size: 20px; color: var(--ink); }
.racer-strategies { margin-top: 26px; }
.section-head h2 { margin: 0 0 2px; font-size: 22px; }
.section-head p { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.strategy-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.strategy-card { background: var(--bg-panel); border-radius: 16px; padding: 20px 20px 16px;
  display: flex; flex-direction: column; }
.strategy-card p { color: var(--muted); font-size: 13.5px; line-height: 1.5; margin: 6px 0 14px; flex: 1; }
.strategy-card .card-title { font-size: 16px; }
.strategy-card.pending { opacity: 0.75; }
.strategy-foot { margin-top: auto; }
.run-btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.racer-cards.single { grid-template-columns: 1fr; }
.header-right nav a.active { color: var(--brand); font-weight: 700;
  text-decoration: underline; text-underline-offset: 6px;
  text-decoration-thickness: 2px; }
.strategy-card.running { outline: 2px solid var(--brand); outline-offset: -2px; }
.chip.run { background: var(--ok-soft); color: var(--ok); border: 1px solid var(--ok-line); }
.chip.run .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok);
  display: inline-block; animation: runpulse 1.6s ease-in-out infinite; }
@keyframes runpulse { 50% { opacity: 0.35; } }
.color-pick { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.color-pick > span { font-weight: 600; font-size: 14px; }
.swatches { display: flex; gap: 10px; }
.swatch input { position: absolute; opacity: 0; }
.swatch-dot { display: block; width: 30px; height: 30px; border-radius: 50%;
  cursor: pointer; border: 2px solid transparent; }
.swatch input:checked + .swatch-dot { outline: 3px solid var(--ink); outline-offset: 2px; }
.racer-team { font-size: 12.5px; color: var(--brand); letter-spacing: 0.04em; margin: -2px 0 6px; }

/* Lab runner (car/simcar): Play/Code tabs + views + run bar */
.lab-tabs { display: inline-flex; gap: 4px; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.lab-tabs .tab { border: 0; background: none; font: inherit; font-size: 14px; padding: 6px 16px;
  border-radius: 999px; cursor: pointer; color: var(--muted); }
.lab-tabs .tab.active { background: var(--brand); color: #fff; }
/* the lab fills the column — no panel outline, tight verticals, more lesson on screen */
.wrap:has(.lab) { padding-top: 14px; padding-bottom: 24px; }
#pane-play, #pane-code { margin-top: 10px; }
.lab pre#log { height: 200px; }
.scene-row { display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin-bottom: 10px; flex-wrap: wrap; }
.scene-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.scene-pills .pill { font-family: var(--font-mono); font-size: 13px; cursor: pointer;
  padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--muted); display: inline-flex;
  align-items: center; gap: 7px; }
.scene-pills .pill:hover { border-color: var(--brand); color: var(--brand); }
.scene-pills .pill.active { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.scene-pills .mark.pass { color: var(--ok); }
.scene-pills .mark.miss { color: var(--err); }
.scene-pills .pill.active .mark { color: var(--on-brand); }
.slider-row label i { color: var(--muted); width: 16px; text-align: center; margin-right: 2px; }
.lab-views { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 10px; }
.lab-views figure { margin: 0; }
.lab-views .imgwrap { position: relative; cursor: crosshair; user-select: none; touch-action: none; }
.view-toggle .tab { font-size: 12px; padding: 3px 12px; font-family: var(--font-mono); }
.viewbar { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.viewbar figcaption { margin-top: 0 !important; }
#roibox { position: absolute; border: 2px dashed var(--brand); border-radius: 3px;
  pointer-events: none; box-shadow: 0 0 0 1px rgba(255,255,255,.5); }
.lab-views img { width: 100%; display: block; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); aspect-ratio: 4 / 3; object-fit: cover; }  /* frames are 640x480 - reserve the box before load / on a dropped frame */
.lab-views img.pending { opacity: .35; }  /* aux slot: dim until the first mask arrives */
.lab-views figcaption { font-family: var(--font-mono); font-size: 11px; color: var(--muted); margin-top: 6px; }
.lab .slider-row { margin: 3px 0; }
.roi-hint { font-size: 12px; color: var(--muted); margin: 6px 0; }
.param-actions { display: flex; gap: 8px; margin: 4px 0 10px; }
.param-actions button { font-family: var(--font-mono); font-size: 12px; cursor: pointer;
  padding: 4px 10px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--muted); }
.param-actions button:hover { border-color: var(--brand); color: var(--brand); }
.run-row { display: flex; justify-content: space-between; align-items: center; gap: 16px;
  margin: 12px 0; flex-wrap: wrap; }
#runbar { display: flex; gap: 10px; align-items: center; }
.run-row .param-actions { margin: 0; }
#runbar button.start { min-width: 74px; margin: 0; }
#runbar button.start.ghost { padding: 9px 13px; }  /* 1px border: same box height as Run */
#runbar button.start:disabled { opacity: .4; pointer-events: none; }
.lab .editor-wrap .cm-host { max-height: 540px; }
@media (max-width: 700px) { .lab-views { grid-template-columns: 1fr; } }
.scene-pills .live-pill { border-style: dashed; }
.scene-pills .live-pill.active { border-style: solid; }
.camera-cfg { margin-top: 8px; font-size: 12px; color: var(--muted); }
.camera-cfg summary { cursor: pointer; list-style: none; display: inline-flex; gap: 6px; align-items: center;
  padding: 3px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.camera-cfg summary::-webkit-details-marker { display: none; }
.camera-cfg[open] summary, .camera-cfg summary:hover { border-color: var(--brand); color: var(--brand); }
.camera-cfg > form { display: flex; margin-top: 8px; }
.camera-claim { margin-top: 8px; display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--muted); }
.camera-preset { margin-top: 8px; display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--muted); }
.camera-preset select { font-family: var(--font-mono); font-size: 12px; padding: 3px 8px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); }
.camera-preset label { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.camera-preset button { font-family: var(--font-mono); font-size: 12px; cursor: pointer;
  padding: 3px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--muted); }
.camera-preset button:hover { border-color: var(--brand); color: var(--brand); }
.camera-warn { margin-top: 8px; display: flex; align-items: center; gap: 10px;
  font-size: 12px; color: var(--err); max-width: 640px; }
.camera-warn button { font-family: var(--font-mono); font-size: 12px; cursor: pointer;
  padding: 3px 12px; border-radius: 999px; border: 1px solid var(--err);
  background: var(--surface); color: var(--err); flex: none; }
.camera-warn button:hover { background: var(--err); color: var(--surface); }

/* ── System card — btop-style mono meters ────────────────────────────────── */
.sys-rows { display: flex; flex-direction: column; gap: 8px; }
.sys-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.sys-label { width: 12ch; color: var(--muted); flex: none; }
.sys-value { width: 5ch; text-align: right; flex: none; }
.sys-value.wide { width: auto; color: var(--muted); }
.meter { flex: 1; height: 12px; border: 1px solid var(--line); border-radius: 3px;
  background: var(--surface); overflow: hidden; }
.meter-fill { height: 100%; transition: width 0.6s ease; }
.meter-fill.ok { background: var(--ok); }
.meter-fill.warn { background: var(--warn); }
.meter-fill.hot { background: var(--err); }
.chip.domain { border-style: solid; }
.sys-domain { font-weight: 700; }

/* ── System console — collapsed by default, never in the way ─────────────── */
.racer-console { margin-top: 26px; }
.racer-console summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.racer-console summary:hover { color: var(--brand); }
.console-log { margin-top: 10px; max-height: 320px; overflow: auto; font-size: 12px;
  line-height: 1.5; background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; padding: 12px 14px; white-space: pre-wrap; }
.console-empty { margin-top: 10px; font-size: 12px; color: var(--muted); }

/* strategy card outlines: pink only on the RUNNING one, white when clickable */
.strategy-card.ready { outline: 2px solid var(--card-ready-line); outline-offset: -2px; }

/* deployment knobs: label | slider | number box per row */
.knob-form { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line);
  width: 100%; display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.knob-form .knob-hint { flex-basis: 100%; text-align: left; }
.knob-row { display: flex; flex-direction: column-reverse; align-items: center; gap: 6px; }
.knob-row label { font-size: 12.5px; color: var(--muted); }
.knob-box { width: 64px; font-family: inherit; font-size: 13px; padding: 4px 6px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--bg-panel);
  color: var(--ink); text-align: right; }
.knob-hint { font-size: 10.5px; color: var(--muted); text-align: right; margin-top: 2px;
  letter-spacing: 0.04em; }
.lib-block { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.lib-summary { font-size: 12px; color: var(--muted); cursor: pointer; }
.lib-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px;
  align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.lib-name { font-size: 12.5px; }
.lib-note { grid-column: 1 / -1; font-size: 10.5px; color: var(--muted); }
.lib-use { padding: 4px 10px; font-size: 12px; }
.lib-upload { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.lib-field { font: inherit; padding: 6px 8px; border: 1px solid var(--line);
  background: transparent; color: inherit; }
.power-row { margin-top: 10px; }

/* foot layout: breathing room between the state chip and its button */
.strategy-foot-inner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.strategy-foot-inner .knob-form { flex-basis: 100%; }
.manage-link { font-size: 12px; }

/* password reveal (wifi settings) */
.pw-wrap { display: flex; align-items: center; gap: 6px; }
.pw-wrap input { flex: 1; }
.pw-eye { background: none; border: 1px solid var(--line); border-radius: 8px;
  padding: 6px 10px; cursor: pointer; color: var(--muted); }
.pw-eye:hover { color: var(--ink); }
.meter-blank { visibility: hidden; }
.power-row { display: flex; gap: 10px; margin-top: 12px; justify-content: center; }

/* ---- SIL Lab (/sil) + debug captures (/debug) ---- */
.sil-form { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 14px; }
.sil-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.sil-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 10px 0; }
.sil-meta { color: var(--muted); font-size: 13px; }
.sil-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 10px; margin: 12px 0; }
.sil-table { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin: 10px 0; }
.sil-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; font-size: 13px; padding: 2px 0; }
.sil-row-head { color: var(--muted); border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.sil-verdict { display: flex; gap: 12px; align-items: center; margin: 10px 0; }
.cap-charts { display: flex; flex-direction: column; gap: 14px; }
.cap-canvas { width: 100%; height: 180px; border: 1px solid var(--line); border-radius: 10px; }
.sil-screen { margin: 12px 0; }
.sil-live { width: 100%; max-width: 960px; border: 1px solid var(--line); border-radius: 12px; display: block; }
/* SIL panel: nothing may grow under the user's scroll — reserve the screen box,
   pin the telemetry height (newest row is on top), knobs live outside the poll */
.sil-screen { margin: 12px 0; aspect-ratio: 16 / 9; max-width: 960px; }
.sil-table { max-height: 168px; overflow-y: auto; }
.train-knobs { margin-top: 10px; }
.train-knobs label { font-size: 13px; color: var(--muted); }
.train-knobs output { min-width: 3ch; font-size: 13px; }
.train-knobs .start { margin-top: 10px; }
/* launch controls: plain rows (label | control | readout) - this is lesson
   prose territory, not a mixer console */
.launch-grid { display: grid; grid-template-columns: max-content minmax(160px, 340px) max-content;
  gap: 12px 14px; align-items: center; margin: 12px 0; }
.launch-grid label { font-family: var(--font-mono); font-size: 12.5px; }
.launch-grid .lib-field, .launch-grid .knob-box { justify-self: start; }
.launch-grid output { color: var(--brand); font-variant-numeric: tabular-nums; }
/* preset row: select + apply + upload live as ONE pill row */
.viewbar .camera-preset, .camera-preset { display: inline-flex; align-items: center; gap: 8px; }
.upload-pill { cursor: pointer; border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 12px; font-size: 12px; color: var(--muted); background: var(--surface); }
.upload-pill:hover { color: var(--brand); border-color: var(--brand); }
.reward-knobs, .reward-code { margin: 12px 0; }
.reward-knobs summary, .reward-code summary { cursor: pointer; font-size: 12.5px; color: var(--brand); }
/* Code tab file tabs (#255) */
.code-files { margin-top: 20px; }
.code-files .file-tabs { flex-wrap: wrap; margin: 8px 0; }
.code-files pre.code { max-height: 560px; overflow: auto; font-size: 12.5px; line-height: 1.55; }
.code-files .file-pane > .lab-note { margin: 4px 0 6px; }
pre.code { background: #14140f; color: #d6d6c8; border-radius: 12px; padding: 12px;
  font-size: 12px; line-height: 1.5; overflow-x: auto; }

/* --- lidar view (racer dashboard) --- */
.lidar-card { grid-column: 1 / -1; }
.lidar-card canvas { width: 100%; max-width: 640px; height: auto; display: block;
  margin: 0 auto; background: var(--bg-panel); border: 1px solid var(--line);
  border-radius: 12px; }
.lidar-status { font-size: 11.5px; color: var(--muted); text-align: center;
  margin-top: 8px; }
.lidar-status.stale { color: #c0392b; }
.chip.new { background: var(--brand); color: var(--on-brand); font-weight: 700; }
/* --- train lab send --- */
.send-form { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.send-run { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
/* the pipeline tail has long avocado lines: wrap, never push the panel wider */
.send-log { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 100%; box-sizing: border-box; }
.send-log { background: #14140f; color: #d6d6c8; border-radius: 10px; padding: 10px;
  font-size: 11.5px; line-height: 1.45; max-height: 220px; overflow-y: auto; }

/* in-page confirm (replaces window.confirm for hx-confirm) */
dialog.confirm { border: 1px solid var(--line); border-radius: 10px; background: var(--bg-panel);
  color: var(--ink); padding: 1.2rem 1.4rem; max-width: 26rem; }
dialog.confirm::backdrop { background: rgb(0 0 0 / 0.35); }
dialog.confirm p { margin: 0 0 1rem; }
dialog.confirm form { display: flex; gap: 0.6rem; justify-content: flex-end; }
dialog.confirm button:not(.start) { appearance: none; cursor: pointer; border: 1px solid var(--line);
  border-radius: 8px; background: transparent; color: var(--ink); padding: 0.4rem 0.9rem; }
/* text knobs read left-to-right; the right-aligned default is for numbers */
input[type="text"].knob-box { text-align: left; width: 140px; }
.knob-box.wide { width: 240px; }
/* the send note is a sentence, not a knob: it takes the row */
input[type="text"].knob-box.note { width: 100%; max-width: 640px; flex: 1 1 320px; }
.knob-row.note { width: 100%; max-width: 640px; flex: 1 1 100%; align-items: stretch; }
.knob-why { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.knob-why dt { color: var(--brand); }
.knob-why dd { margin: 0; max-width: 72ch; }
.policy-memo { margin-bottom: 18px; }
.policy-compare { margin: 0 0 14px; }
.compare-table td, .compare-table th { padding: 4px 10px; font-size: 13px; vertical-align: top; }
.table-wrap { overflow-x: auto; }
/* the Gym: an opened row, the compare card, the two-curve overlay */
.run-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; padding: 8px 0 12px; }
.run-card .run-clip { width: 100%; max-width: 560px; border-radius: 10px; background: var(--studio); display: block; }
.run-card .run-facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0; font-size: 13px; }
.run-card .run-facts dt { color: var(--muted); }
.run-card .run-facts dd { margin: 0; }
.run-card svg { grid-column: 1 / -1; }
.run-card > p { grid-column: 1 / -1; margin: 0; }
.run-card-row td { background: var(--bg-panel); }
.runs-table .run-open { color: var(--brand); text-decoration: underline; }
.run-compare .chartbox { margin-top: 12px; }
.run-compare canvas { width: 100%; display: block; }
.curve-a { color: var(--brand); font-weight: 600; } .curve-b { color: var(--ok); font-weight: 600; }
@media (max-width: 760px) { .run-card { grid-template-columns: 1fr; } }  /* the Train Lab compare table scrolls, the page never does */
.compare-table tr.differs td { background: var(--brand-soft); }
.compare-bar { margin: 8px 0; }
.policy-memo h2 { font-size: 16px; margin: 0 0 8px; }
.policy-memo p { margin: 6px 0; font-size: 13.5px; max-width: 72ch; }
.policy-memo dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 10px 0 0; font-size: 13.5px; }
.policy-memo dt { font-family: var(--font-mono); font-size: 12.5px; color: var(--brand); padding-top: 1px; }
.policy-memo dd { margin: 0; max-width: 72ch; }
#send-status { margin-top: 12px; }
#send-status .send-log { margin-top: 8px; }

/* hints ladder + end-of-lab rating (partials/labfeed.html) */
.hints { margin: 30px 0 0; padding: 12px 16px; background: var(--bg-panel); border-radius: 14px; }
.hints > summary { cursor: pointer; font-weight: 600; }
.hints details { margin: 10px 0 0 12px; }
.hints details summary { cursor: pointer; font-family: var(--font-mono); font-size: 12.5px; color: var(--brand); }
.hints details p { margin: 6px 0 0 14px; font-size: 14.5px; }
.labfeed { margin-top: 16px; }
.labfeed .rate-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 12px; }
.labfeed .rate-row .pill { cursor: pointer; font-family: var(--font-mono); font-size: 13px;
  padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; }
.labfeed .rate-row .pill:hover { border-color: var(--brand); color: var(--brand); }
.labfeed .rate-row .pill:has(input:checked) { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.labfeed .rate-row input { position: absolute; opacity: 0; width: 0; height: 0; }
.labfeed textarea { width: 100%; font: inherit; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--bg); color: var(--ink); resize: vertical; }

/* stop a training run (session panel) */
button.stop { appearance: none; cursor: pointer; background: transparent; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 999px; padding: 8px 16px; font: inherit; font-size: 14px; }
button.stop:hover { border-color: var(--brand); color: var(--brand); }
.readshot.hero-shot { margin: 8px 0 16px; }
.readshot.hero-shot img { width: 100%; max-height: 420px; object-fit: cover; }

/* Follow the White Rabbit: terminal type + trailing dots, glyph before it */
.read h3.rabbit { font-family: var(--font-mono); }
.read h3.rabbit::after { content: "..."; }
.rabbit-hole summary { cursor: pointer; list-style: none; }
.rabbit-hole summary::-webkit-details-marker { display: none; }
.rabbit-hole summary h3 { display: inline-block; margin: 0; }
.rabbit-hole summary:hover h3 { color: var(--brand); }
.rabbit-hole[open] summary { margin-bottom: 6px; }
.read h3.rabbit::before { content: ""; display: inline-block; width: 1.05em; height: 1.05em;
  margin-right: .45em; vertical-align: -0.15em; background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 48'><path d='M12 30a18 11 0 1 0 36 0a18 11 0 1 0-36 0zM41 23a8 8 0 1 0 16 0a8 8 0 1 0-16 0zM50 18 33 6l-2 4 15 12zM56 16 44 1l-3 3 11 15zM7.5 26a4.5 4.5 0 1 0 9 0a4.5 4.5 0 1 0-9 0zM22 38 5 43l1 3 17-3zM42 36l10 9 2-3-9-9zM56 22l7 3-7 3z'/></svg>") center/contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 48'><path d='M12 30a18 11 0 1 0 36 0a18 11 0 1 0-36 0zM41 23a8 8 0 1 0 16 0a8 8 0 1 0-16 0zM50 18 33 6l-2 4 15 12zM56 16 44 1l-3 3 11 15zM7.5 26a4.5 4.5 0 1 0 9 0a4.5 4.5 0 1 0-9 0zM22 38 5 43l1 3 17-3zM42 36l10 9 2-3-9-9zM56 22l7 3-7 3z'/></svg>") center/contain no-repeat; }

/* danger callout: things that burn, break, or bite */
.read .danger { display: flex; gap: 12px; align-items: flex-start; margin: 14px 0; padding: 12px 14px;
  border: 1.5px solid var(--err); border-radius: 10px; color: var(--ink); }
.read .danger i { color: var(--err); font-size: 18px; margin-top: 2px; }

/* sim HUD controls: boxes, lidar, assist */
.sim-controls { flex-wrap: wrap; gap: 10px 14px; }
.sim-controls button { appearance: none; cursor: pointer; font: inherit; font-size: 12.5px;
  padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink); }
.sim-controls button:hover { border-color: var(--brand); color: var(--brand); }
.sim-controls label { cursor: pointer; }
.hello-code pre.err { color: var(--err); }
.labfeed .rate-note { margin-top: 10px; }
.labfeed .rate-note > summary { cursor: pointer; font-family: var(--font-mono); font-size: 12.5px; color: var(--brand); }
.labfeed .rate-note textarea { margin-top: 8px; }
.labfeed .rate-row .lab-note { align-self: center; margin: 0 0 0 6px; }
.readshot.cam-shot img { max-width: 560px; margin: 0 auto; }

/* --- sensor view (#135) --- */
.sensor-headline { font-size: 13px; color: var(--ink); margin-top: 6px; }
.sensor-headline.stale, .sensor-status.stale { color: #c0392b; }
.sensor-view { margin-top: 18px; }
.sensor-view canvas { width: 100%; height: auto; max-height: 78vh; object-fit: contain; display: block; margin: 0 auto; }
.sensor-trace { border: 1px solid var(--line); border-radius: 6px; margin-top: 12px; }
.sensor-status { font-size: 11.5px; color: var(--muted); text-align: center; margin-top: 8px; }
.sensor-row { display: flex; justify-content: space-between; gap: 16px; font-size: 12.5px; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.sensor-row span:first-child { color: var(--muted); }
.sensor-rows { margin-bottom: 12px; }
.camera-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.camera-pair figure { margin: 0; }
.camera-pair img { width: 100%; display: block; background: var(--surface); border-radius: 6px; min-height: 120px; }
.camera-pair.stack { grid-template-columns: 1fr; }  /* the camera's own page: each frame full width (#253) */
.camera-pair figcaption { font-size: 11px; color: var(--muted); text-align: center; margin-top: 4px; }
.racer-status a.chip { text-decoration: none; }
.chip-link { text-decoration: none; }
.credits-chip { white-space: nowrap; }
.mono.low { color: var(--err); font-weight: 700; }
.chip-link:hover .chip { outline: 2px solid var(--brand); }
@media (max-width: 640px) { .camera-pair { grid-template-columns: 1fr; } }
.sensor-all { display: grid; grid-template-columns: 1fr; gap: 22px; margin-top: 18px; }  /* one view per row, full width (#250) */
.sensor-all h2 { font-size: 16px; margin: 0 0 6px; }
.sensor-all h2 .muted { font-size: 12.5px; font-weight: 400; margin-left: 8px; }
.sensor-all h2 a { color: inherit; text-decoration: none; }
.sensor-all .sensor-view { margin-top: 0; }

/* inline Sensor View on the dashboard (pill click) */
#sensor-panel .sensor-view { margin: 16px auto 0; max-width: 720px; text-align: left; }
#sensor-panel .sensor-close { float: right; }

/* ── Mixer pass: channel strips, LED readouts, VU vitals, sensor LEDs ──── */
.slider-row, .knob-row { border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); padding: 10px 6px 8px; width: 100px; box-sizing: border-box;
  position: relative; }
.slider-row label, .knob-row label { font-size: 11px; color: var(--muted);
  max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.strip-led, .knob-row .knob-box, .knob-row output {
  background: var(--led-bg); color: var(--led); border: none; border-radius: 6px;
  padding: 2px 4px; font-family: var(--font-mono); font-size: 12px;
  align-self: stretch; width: auto; box-sizing: border-box; overflow: hidden;
  text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
.slider-row .val { color: var(--led); }
#sliders, .fader-bank, .knob-form { gap: 10px; }
/* mute/solo-style console buttons: action + a state LED that lights on hover */
.console-btn { appearance: none; display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase;
  letter-spacing: .06em; cursor: pointer; padding: 5px 9px; margin: 1px 2px;
  border: 1px solid var(--line); border-radius: 6px;
  background: var(--bg-panel); color: var(--muted); box-shadow: 0 1px 0 var(--line); }
.console-btn::before { content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--line); flex: none; }
.console-btn:hover { color: var(--ink); border-color: var(--muted); }
.console-btn:active { transform: translateY(1px); box-shadow: none; }
.console-btn--ok:hover::before { background: var(--ok); }
.console-btn--warn:hover::before { background: var(--warn); }
.console-btn--err:hover::before { background: var(--err); }
/* #232: the /system verb buttons sat flush against each other */
.system .console-btn { margin: 2px 8px 2px 0; }
/* master bus: the RL deployment knobs read as the master section */
.strategy-foot-inner .knob-form { border-top: 2px solid var(--brand); }
.strategy-foot-inner .knob-form .knob-row { width: 110px; border-color: var(--brand); }
/* fader tick marks behind the track */
.slider-row input[type="range"], .knob-row input[type="range"] { width: 30px;
  background-image: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px calc(25% - 0.25px));
  background-size: 12px calc(100% - 16px); background-position: center;
  background-repeat: no-repeat; }

/* fine-tune steppers: - / + under the readout; hover-reveal only where hover exists */
.step-row { position: absolute; right: 3px; top: 34px; display: flex;
  flex-direction: column; gap: 6px; }
.step-btn { width: 24px; height: 22px; border-radius: 6px; border: 1px solid var(--line);
  background: var(--bg-panel); color: var(--muted); font-family: var(--font-mono);
  font-size: 13px; line-height: 1; cursor: pointer; padding: 0; }
.step-btn:hover { color: var(--brand); border-color: var(--brand); }
@media (hover: hover) {
  .slider-row .step-row, .knob-row .step-row { opacity: 0; transition: opacity .15s; }
  .slider-row:hover .step-row, .knob-row:hover .step-row,
  .slider-row:focus-within .step-row, .knob-row:focus-within .step-row { opacity: 1; }
}
/* Play-tab takeaways: what the knobs proved, then off to Read or Code */
.takeaways { margin-top: 18px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg-panel); padding: 14px 16px; max-width: 720px; }
.takeaways ul { margin: 8px 0 14px; padding-left: 20px; }
/* the end-of-lab assessment (Rob 2026-09-04): what the student can do now */
.check-yourself { margin: 6px 0 14px; padding: 8px 14px; border-left: 3px solid var(--brand); }
.check-yourself ol { margin: 6px 0 0; padding-left: 20px; }
.check-yourself li { font-size: 13.5px; margin: 4px 0; }
.takeaways li { margin: 4px 0; font-size: 14px; }
.takeaway-nav { display: flex; gap: 10px; }
/* the way out of Play / Code (partials/pane_foot.html) */
.pane-foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 22px;
  padding-top: 14px; border-top: 1px solid var(--line); }
.pane-foot .gate-hint { flex-basis: 100%; margin: 0; }
.readshot.tag-sample { max-width: 180px; margin: 0 0 12px; }
.diagram-legend { margin: 0 0 12px; padding-left: 18px; }
.diagram-legend li { margin: 2px 0; }
.readshot.tag-sample img { image-rendering: pixelated; }
/* sensor views: readouts as LEDs */
.sensor-row span:last-child { background: var(--led-bg); color: var(--led);
  border-radius: 6px; padding: 1px 8px; font-size: 12px; }
.sensor-headline { display: inline-block; background: var(--led-bg); color: var(--led);
  border-radius: 6px; padding: 2px 8px; font-size: 12px; }
.sensor-headline.stale { color: var(--err); }

/* send-to-car card under a SIL PASS (#159) */
.send-card { margin: 14px 0; display: grid; gap: 6px; }
.send-card > b { display: block; }
.send-card .stage-hint { display: block; }

/* ---- /policy: one page for the RL policy runner (#190) ---- */
.policy-hero { display: grid; grid-template-columns: minmax(220px, 1fr) 2fr; gap: 20px; align-items: start;
  padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-panel); margin-bottom: 18px; }
.policy-state-inner { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.policy-active { font-size: 18px; font-weight: 600; word-break: break-all; }
.policy-facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0; font-size: 12.5px; }
.policy-facts dt { color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-size: 10.5px; padding-top: 2px; }
.policy-facts dd { margin: 0; }
.policy-grid { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.7fr); gap: 18px; margin-bottom: 18px; }
.policy-top { display: grid; grid-template-columns: minmax(360px, 1.7fr) minmax(260px, 1fr); gap: 18px; margin-bottom: 18px; align-items: start; }
.policy-library .table-scroll { max-height: 340px; overflow: auto; margin-top: 6px; }
.policy-library .lib-table th { position: sticky; top: 0; background: var(--bg-panel); z-index: 1; }
.policy-library .compare-bar { margin: 6px 0 0; }
.policy-library .lib-table td:last-child { white-space: nowrap; }
.policy-library .lib-table td:last-child form { display: inline-block; margin-right: 4px; }
.lib-upload-wrap { margin-top: 12px; }
.lib-upload-wrap summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.lib-upload-wrap summary::-webkit-details-marker { display: none; }
.lib-upload-wrap[open] summary { opacity: .7; }
.policy-stage .policy-state-inner { margin-bottom: 12px; }
.policy-docs summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; }
.policy-docs summary::-webkit-details-marker { display: none; }
.policy-docs summary h2 { display: inline; font-size: 16px; }
.policy-docs summary::before { content: "\25B8"; color: var(--muted); }
.policy-docs[open] summary::before { content: "\25BE"; }
@media (max-width: 860px) { .policy-grid, .policy-hero, .policy-top { grid-template-columns: 1fr; } }
.policy-card { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-panel); min-width: 0; }
.policy-card .card-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.knob-group { text-transform: uppercase; letter-spacing: .08em; font-size: 10.5px; color: var(--muted); margin-top: 8px; }
.knob-slider--signed { accent-color: var(--brand); }
.live-block { margin-top: 12px; }
.live-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.live-label .muted { text-transform: none; letter-spacing: 0; }
.policy-live canvas { width: 100%; height: auto; display: block; background: var(--surface); border-radius: 8px; }
.chain { font-size: 12px; padding: 4px 0; white-space: pre-wrap; word-break: break-word; }
.live-legend { font-size: 11px; margin-top: 4px; }
.table-scroll { overflow-x: auto; }
.lib-table .lib-active td { background: var(--ok-soft); }
.lib-table .knob-cells { font-size: 12px; white-space: nowrap; }
.lib-table .note-cell { font-size: 12px; max-width: 220px; }
.policy-switch { font-size: 12px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg-panel); color: var(--ink); max-width: 100%; }
.sil-knobs-stage { margin-top: 12px; }
/* /policy knob bank: two groups of three faders, group label on its own line */
.policy-knobs { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; border-top: 0; padding-top: 0; }
.policy-knobs .knob-group { flex-basis: 100%; margin-top: 4px; }
.policy-knobs .knob-row { flex: 0 0 auto; width: 74px; }
.policy-knobs .knob-row--wide { width: auto; min-width: 150px; }
.knob-check { width: 20px; height: 20px; accent-color: var(--brand); }
.runner-facts { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.sil-knobs-inner .knob-group { flex-basis: 100%; }

/* the desktop in the shell (#184): the frame takes the viewport below the bar */
.desktop-shell { display: flex; flex-direction: column; gap: 8px; height: calc(100vh - 150px); min-height: 480px; }
.desktop-bar { display: flex; align-items: center; gap: 16px; }
.desktop-bar-status { flex: 1; }
.desktop-frame { flex: 1; width: 100%; border: 1px solid var(--line); border-radius: 12px; }
.car-key-show { font-size: 22px; letter-spacing: 0.08em; user-select: all; }
.settings-form input.car-key-input { font-family: var(--font-mono); letter-spacing: 0.06em; }

/* /admin/users (#317) */
.users-table td.actions form { display: inline-block; margin-right: 8px; }
.users-table td.actions .knob-box { width: 5em; }
.users-table tr.disabled td { opacity: 0.55; }

/* the keep-it-warm prompt (idle pod closing soon) */
dialog.gpu-keep { position: fixed; top: 64px; right: 16px; left: auto; margin: 0; z-index: 50;
  max-width: 22em; padding: 14px 16px; border: 1px solid var(--err); border-radius: 10px;
  background: var(--surface); color: var(--ink); box-shadow: 0 8px 24px rgba(0,0,0,.18); }
dialog.gpu-keep p { margin: 0 0 10px; }
dialog.gpu-keep .dialog-actions { display: flex; gap: 8px; }

/* the onboarding banner (#329) */
.verify-banner { background: var(--ok-soft); color: var(--ink); border-bottom: 1px solid var(--ok-line);
  padding: 8px 16px; font-size: 14px; text-align: center; }
