/* Ohmni: shared dark studio tokens for the landing, workbench and learning tools. */
:root {
  color-scheme: dark;
  --canvas: #030810;
  --paper: #091424;
  --ink: #f4f6fc;
  --ink-soft: #bfcee2;
  --ink-faint: #a4b7d0;
  --accent: #55d9ff;
  --accent-deep: #a8b5ff;
  --lavender: #192346;
  --line: #263d58;
  --line-bright: #526d90;
  --panel: #091424;
  --panel-2: #101f34;
  --surface: #091424;
  --muted: #a4b7d0;
  --pass: #5ee3c0;
  --warn: #ffd184;
  --fail: #ff9dba;
  --danger: #ff9dba;
  --notyet: #b6bfd4;
  --pass-surface: #092d2b;
  --warn-surface: #302517;
  --fail-surface: #351a29;
  --copper: #64dcf4;
  --copper-soft: #b6a0ff;
  --board-line: #a9a0ff;
  --radius: 16px;
  --sans: "Segoe UI Variable Text", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --display: "Segoe UI Variable Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Code", Consolas, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { font-size: 112.5%; scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--canvas); font: 1rem/1.6 var(--sans); }
button, input { font: inherit; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
button, a { touch-action: manipulation; }
button svg, a svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
a { color: var(--accent); text-underline-offset: 3px; }
p { margin: 0 0 1em; max-width: 76ch; }
h1, h2, h3, h4 { color: var(--ink); font-weight: 650; line-height: 1.2; margin: 0; }
h1, h2 { font-family: var(--display); }
h3 { font-size: 1.05rem; }
h4 { font-size: 1rem; }
:focus-visible { outline: 3px solid #2159e8; outline-offset: 4px; }
::selection { background: var(--panel-2); color: var(--ink-soft); }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 100; background: var(--accent); color: white; padding: 12px 20px; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.app-layout { display: grid; grid-template-columns: 222px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; padding: 31px 17px 15px; background: var(--paper); border-right: 1px solid var(--line); z-index: 20; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 13px; color: var(--ink); text-decoration: none; font: 700 33px/1 var(--display); letter-spacing: -1.5px; }
.brand-mark { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 11px; background: var(--accent); color: #fff; font: 400 28px/1 Georgia, serif; letter-spacing: 0; padding-bottom: 2px; }
.brand-period { color: var(--accent); }
.sidebar-project { display: flex; align-items: center; gap: 10px; padding: 16px 11px; margin: 34px 0 25px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); }
.project-icon { display: grid; place-items: center; width: 34px; height: 36px; color: var(--accent); background: var(--lavender); border-radius: 8px; }
.project-icon svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.sidebar-project strong { display: block; font-size: 1rem; line-height: 1.4; font-weight: 650; }
.sidebar-project div > span { display: block; margin-top: 2px; font-size: 1rem; color: var(--ink-faint); }
.nav-label { color: var(--ink-faint); font-size: 1rem; margin: 0 13px 11px; }
.journey ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.journey button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 13px; background: none; border: 0; border-radius: 9px; color: var(--ink-soft); font-size: 1rem; font-weight: 550; text-align: left; }
.journey button svg { width: 18px; height: 18px; }
.journey button:hover:not(:disabled) { background: var(--panel-2); color: var(--accent); }
.journey .here button { background: var(--lavender); color: var(--accent); font-weight: 650; }
.journey button:disabled { opacity: .48; }
.nav-check { display: none; margin-left: auto; font-size: 1rem; color: var(--pass); }
.journey .done .nav-check { display: inline; }
.stage-list li.running .num { color: var(--accent); background: var(--lavender); box-shadow: 0 0 0 4px #eeedff70; }
.stage-list li.running .what { color: var(--accent); }
.system-head[aria-expanded] .system-name::after { content: "+"; margin-left: auto; color: var(--ink-faint); }
.system-head[aria-expanded="true"] .system-name::after { content: "−"; }
.sidebar-bottom { margin-top: auto; padding-top: 30px; }
.mentor-note { margin: 0 10px 24px; }
.mentor-symbol { font: 2.25rem/1 var(--sans); color: var(--ink-soft); }
.mentor-note p { margin: 8px 0 0; font-size: 1rem; color: var(--ink-faint); line-height: 1.8; }
.mentor-note strong { font-weight: 550; color: var(--ink-soft); }
.sidebar-help { padding: 11px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 1rem; }
.sidebar-help summary { cursor: pointer; list-style: none; }
.sidebar-help summary span { display: inline-grid; place-items: center; width: 17px; height: 17px; border: 1px solid var(--line-bright); border-radius: 50%; margin-right: 8px; font-size: 1rem; }
.sidebar-help p { margin: 10px 0 0; font-size: 1rem; }
.local-status { display: flex; align-items: center; gap: 6px; border-top: 1px solid var(--line); padding: 13px 6px 0; font-size: 1rem; color: var(--ink-faint); }
.status-dot { width: 5px; height: 5px; background: #829185; border-radius: 50%; flex: none; }
.version { margin-left: auto; background: var(--panel-2); padding: 1px 5px; border-radius: 3px; font-size: 1rem; }
.main-shell { min-width: 0; display: flex; flex-direction: column; }
.workspace-header { display: flex; align-items: center; justify-content: space-between; min-height: 75px; padding: 16px 38px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.6); gap: 20px; }
.workspace-crumb { display: flex; align-items: center; gap: 11px; font-size: 1rem; color: var(--ink-soft); }
.crumb-mark { color: var(--accent); font-size: 1.125rem; }
.header-actions { display: flex; align-items: center; gap: 22px; font-size: 1rem; }
.workspace-status { color: var(--ink-faint); }
.header-help { position: relative; color: var(--ink-soft); }
.header-help summary { cursor: pointer; list-style: none; }
.header-help summary span { margin-left: 6px; color: var(--accent); }
.header-help > div { position: absolute; top: 35px; right: 0; width: 305px; padding: 21px; background: var(--paper); border: 1px solid var(--line); box-shadow: 0 12px 40px #28244b17; border-radius: 14px; z-index: 50; font-size: 1rem; }
.header-help strong { color: var(--ink); }
.header-help p { margin: 9px 0 0; }
main { padding: 0 38px; flex: 1; width: 100%; max-width: 1620px; margin: 0 auto; outline: none; }
.stage { padding: 36px 0 44px; }
.welcome { padding-top: 38px; }
.welcome-grid { display: grid; grid-template-columns: minmax(315px, .85fr) minmax(400px, 1.1fr); gap: clamp(25px, 3.5vw, 62px); align-items: center; }
.welcome-copy { padding: 10px 0; }
.welcome-kicker { display: flex; align-items: center; gap: 9px; font-size: 1rem; font-weight: 550; color: var(--ink-soft); margin-bottom: 20px; }
.little-spark { color: var(--accent); font: 1.75rem/1 var(--sans); }
.welcome h1 { font-size: clamp(46px, 4.7vw, 72px); font-weight: 600; letter-spacing: -2.7px; line-height: 1.04; margin-bottom: 22px; }
.welcome-lede { font-size: 1rem; color: var(--ink-soft); line-height: 1.75; max-width: 42ch; margin-bottom: 26px; }
.project-starter { background: var(--paper); border: 1px solid var(--line); border-radius: 17px; padding: 20px; max-width: 430px; }
.starter-heading { display: flex; align-items: center; gap: 13px; margin-bottom: 12px; }
.climate-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: var(--panel-2); color: var(--ink-soft); flex: none; }
.climate-icon svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; }
.available-label { display: flex; align-items: center; gap: 5px; color: var(--pass); font-size: 1rem; margin-bottom: 4px; }
.available-label span { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.starter-heading h2 { font-size: 1.1875rem; font-weight: 600; letter-spacing: -.3px; }
.project-starter > p { font-size: 1rem; line-height: 1.7; color: var(--ink-soft); margin-bottom: 12px; }
.project-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.project-tags span { border-radius: 5px; padding: 3px 7px; background: var(--panel-2); color: var(--ink-soft); font-size: 1rem; }
.primary, .secondary, .ghost { display: inline-flex; justify-content: center; align-items: center; gap: 13px; padding: 12px 20px; border-radius: 9px; font-size: 1rem; font-weight: 600; border: 1px solid transparent; line-height: 1.5; min-height: 43px; text-decoration: none; transition: background .15s, border-color .15s; }
.primary { background: var(--accent); color: white; box-shadow: 0 3px 5px #403cc21a; }
.primary:hover:not(:disabled) { background: var(--accent-deep); }
.primary:disabled, .secondary:disabled { opacity: .48; }
.secondary { background: var(--paper); border-color: var(--line-bright); color: var(--ink); }
.secondary:hover:not(:disabled) { border-color: var(--line); background: var(--panel-2); }
.ghost { color: var(--ink-soft); background: transparent; }
.ghost:hover { background: var(--panel-2); }
.compact { min-height: 37px; padding: 8px 14px; font-size: 1rem; }
.compact svg { width: 16px; height: 16px; }
.start-button { width: 100%; justify-content: space-between; min-height: 46px; }
.project-starter .starter-footnote { margin: 10px 0 0; color: var(--ink-faint); font-size: 1rem; text-align: center; }
.scope-note { max-width: 58ch; color: var(--ink-faint); font-size: 1rem; line-height: 1.65; margin: 14px 2px 0; }
.reference-column { min-width: 0; }
.reference-stage { border-radius: 24px; border: 1px solid var(--line); background: var(--panel-2); overflow: hidden; position: relative; }
.reference-topline { display: flex; justify-content: space-between; gap: 10px; padding: 19px 22px 0; font-size: 1rem; color: var(--ink-soft); }
.reference-topline > span:first-child { color: var(--ink-soft); }
.reference-dot { display: inline-block; width: 6px; height: 6px; background: #7872d6; margin-right: 6px; border-radius: 50%; }
#reference-canvas { display: block; width: 100%; height: clamp(320px, 31vw, 505px); cursor: grab; touch-action: none; }
.reference-caption { color: var(--ink-faint); font-size: 1rem; text-align: center; padding: 0 18px 14px; }
.reference-controls { display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; padding: 0 13px 20px; }
.reference-controls button { display: flex; align-items: center; gap: 5px; padding: 7px 10px; color: var(--ink-soft); background: transparent; border: 1px solid transparent; border-radius: 20px; font-size: 1rem; }
.reference-controls button:hover { background: var(--panel-2); }
.reference-controls button.on, .reference-controls button[aria-pressed="true"] { color: var(--accent); background: var(--paper); border-color: var(--line); box-shadow: 0 2px 6px #3a32580a; }
.system-pin { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.system-pin.power { background: #d39846; } .system-pin.compute { background: #7770de; } .system-pin.sense { background: #58a38b; } .system-pin.io { background: #bc7dad; }
.reference-inspector { display: flex; gap: 13px; padding: 20px 9px 0; min-height: 110px; }
.inspector-spark { color: var(--ink-soft); font-size: 1.875rem; line-height: 1.2; }
.reference-inspector h3 { font-size: 1rem; font-weight: 600; margin-bottom: 6px; }
.reference-inspector p { color: var(--ink-soft); font-size: 1rem; line-height: 1.7; margin: 0; max-width: 55ch; }
.welcome-bottom { display: grid; grid-template-columns: 1.1fr 1fr 1fr 1fr; gap: 26px; border-top: 1px solid var(--line); padding-top: 29px; margin-top: 36px; }
.outcome-intro h2 { font-size: 1.4375rem; line-height: 1.23; letter-spacing: -.5px; margin-bottom: 10px; }
.outcome-intro p, .outcome p { font-size: 1rem; line-height: 1.7; color: var(--ink-faint); margin: 0; }
.outcome-icon { display: inline-grid; place-items: center; width: 28px; height: 28px; color: var(--accent); margin-bottom: 10px; }
.outcome-icon svg { width: 25px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.outcome h3 { font-size: 1rem; margin-bottom: 7px; font-weight: 600; }
.workspace-footer { display: flex; gap: 20px; justify-content: space-between; margin: 0 38px; padding: 20px 0; border-top: 1px solid var(--line); color: var(--ink-faint); font-size: 1rem; }
.workspace-footer > span:first-child { color: var(--ink-soft); }
.section-head { margin: 0 0 30px; max-width: 820px; }
.step-label { color: var(--accent); font-size: 1rem; font-weight: 600; margin-bottom: 13px; }
.section-head h1 { font-size: clamp(32px, 3.8vw, 52px); line-height: 1.1; letter-spacing: -1.6px; font-weight: 600; margin-bottom: 17px; }
.lede { font-size: 1rem; color: var(--ink-soft); line-height: 1.8; max-width: 65ch; margin: 0; }
.fineprint, .panel-note { color: var(--ink-soft); font-size: 1rem; line-height: 1.7; }
.panel-note { margin: 9px 0 0; }
.agree-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 30px; align-items: start; }
.brief { display: grid; gap: 19px; }
.brief-group { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 23px; }
.brief-group h3 { display: flex; align-items: center; gap: 8px; font-size: 1rem; margin-bottom: 7px; }
.brief-group h3 small { display: inline-grid; place-items: center; width: 21px; height: 21px; border-radius: 6px; background: var(--lavender); color: var(--accent); font-size: 1rem; font-weight: 500; }
.brief-group.assumed { border-left: 3px solid #d29a55; }
.brief-group.unclear { border-left: 3px solid #8c85e7; }
.brief-line { display: grid; grid-template-columns: minmax(120px,.9fr) 1.35fr; gap: 17px; align-items: baseline; padding: 12px 0; border-top: 1px solid var(--line); }
.brief-label { color: var(--ink-faint); font-size: 1rem; line-height: 1.5; }
.brief-value { font-size: 1rem; line-height: 1.6; color: var(--ink); }
.brief-empty { font-size: 1rem; color: var(--ink-faint); }
.agree-decide { position: sticky; top: 24px; padding: 26px; border-radius: 18px; background: var(--panel-2); }
.plan-symbol { font: 2.75rem/1 Georgia, serif; color: var(--accent); display: block; margin-bottom: 23px; }
.agree-decide h2 { font-size: 1.5rem; font-weight: 550; line-height: 1.2; letter-spacing: -.5px; margin-bottom: 17px; }
.agree-decide > p { font-size: 1rem; line-height: 1.8; color: var(--ink-soft); }
.brief-boundary { padding: 14px 0; margin: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 1rem; color: var(--ink-soft); }
.brief-boundary strong { color: var(--ink-soft); }
.brief-boundary p { margin: 5px 0 0; }
.agree-decide button { width: 100%; }
.activity-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 38px; align-items: start; }
.activity-main { padding: 26px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; }
.progress-heading { display: flex; justify-content: space-between; gap: 20px; align-items: baseline; font-size: 1rem; font-weight: 600; margin-bottom: 13px; }
#progress-percent { color: var(--accent); font-size: 1.125rem; font-variant-numeric: tabular-nums; }
.progress-track { height: 6px; background: var(--panel-2); border-radius: 10px; overflow: hidden; }
#progress-bar { width: 0; height: 100%; background: var(--accent); transition: width .5s; border-radius: 10px; }
.progress-detail { font-size: 1rem; color: var(--ink-faint); margin: 11px 0 25px; min-height: 3em; }
.stage-list { list-style: none; margin: 0; padding: 0; }
.stage-list li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 13px; align-items: start; border-top: 1px solid var(--line); padding: 17px 0; }
.stage-list li:last-child { padding-bottom: 0; }
.stage-list .num { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: var(--panel-2); border: 1px solid var(--line); color: var(--ink-faint); font-size: 1rem; }
.stage-list .what { font-size: 1rem; font-weight: 550; }
.stage-list .detail { margin-top: 4px; color: var(--ink-faint); font-size: 1rem; }
.stage-list li.pending { opacity: .5; }
.stage-list li.settled .num { color: var(--pass); background: var(--pass-surface); border-color: var(--line); }
.activity-aside { padding: 24px 5px; }
.activity-glyph { position: relative; display: grid; place-items: center; height: 160px; margin-bottom: 25px; }
.activity-glyph span { display: grid; place-items: center; width: 80px; height: 80px; font: 3.125rem/1 Georgia, serif; border-radius: 23px; color: var(--accent); background: var(--panel-2); transform: rotate(-8deg); }
.activity-glyph i { position: absolute; width: 142px; height: 142px; border: 1px solid var(--line); border-radius: 50%; }
.activity-glyph i:nth-of-type(2) { width: 188px; height: 188px; border-style: dashed; }
.activity-glyph i:nth-of-type(3) { width: 8px; height: 8px; top: 8px; right: 62px; border: 0; background: #c2914b; }
.activity-aside h2 { font-size: 1.5625rem; font-weight: 550; margin-bottom: 16px; letter-spacing: -.5px; }
.activity-aside p { color: var(--ink-soft); font-size: 1rem; line-height: 1.8; }
.activity-review { margin-top: 22px; width: 100%; }
.run-error { margin-top: 20px; padding: 18px; color: var(--fail); background: var(--fail-surface); border: 1px solid var(--line); border-radius: 10px; font-size: 1rem; }
.error-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.error-actions:has(button[hidden]):not(:has(button:not([hidden]))) { margin-top: 0; }
.connection-banner { margin: 18px 38px 0; padding: 15px 20px; background: var(--warn-surface); color: var(--warn); border: 1px solid var(--line); border-radius: 10px; font-size: 1rem; }
.connection-banner button { margin-left: 12px; padding: 6px 10px; background: var(--paper); border: 1px solid #ddc895; border-radius: 6px; color: var(--warn); font-size: 1rem; }
.result-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 28px; max-width: none; }
.result-head h1 { font-size: clamp(29px, 3.1vw, 44px); }
.result-head > div:first-child { min-width: 0; }
.release-badge { border: 1px solid var(--line); border-radius: 12px; background: var(--paper); padding: 14px 16px; flex: 0 1 295px; margin-top: 5px; min-width: 205px; }
.release-badge p { margin: 8px 0 0; font-size: 1rem; line-height: 1.6; color: var(--ink-faint); }
.badge { display: inline-block; border-radius: 5px; padding: 3px 6px; font-size: 1rem; font-weight: 600; line-height: 1.5; border: 1px solid transparent; overflow-wrap: anywhere; max-width: 100%; }
.badge.pass { color: var(--pass); background: var(--pass-surface); border-color: var(--line); }
.badge.warn { color: var(--warn); background: var(--warn-surface); border-color: var(--line); }
.badge.fail { color: var(--fail); background: var(--fail-surface); border-color: var(--line); }
.badge.notyet { color: var(--notyet); background: var(--panel-2); border-color: var(--line); }
.result-navigation { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding-bottom: 15px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.result-tabs { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.result-tabs button { padding: 9px 15px; border: 0; background: none; color: var(--ink-soft); border-radius: 7px; font-size: 1rem; }
.result-tabs button[aria-selected="true"] { background: var(--paper); color: var(--accent); box-shadow: 0 1px 4px #24234c0d; font-weight: 600; }
.board-shell { display: grid; grid-template-columns: minmax(0, 1fr) 285px; gap: 20px; align-items: start; }
.board-stage { border-radius: 18px; border: 1px solid var(--line); background: var(--panel-2); overflow: hidden; min-width: 0; }
.board-stage-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 16px 19px 0; font-size: 1rem; color: var(--ink-soft); }
#board-canvas { display: block; width: 100%; height: clamp(350px, 48vh, 630px); cursor: grab; touch-action: none; }
.board-stage-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 18px 14px; }
.board-hint { margin: 0; font-size: 1rem; color: var(--ink-faint); }
.thickness-note { padding: 0 18px 14px; }
.board-empty { padding: 40px; font-size: 1rem; color: var(--ink-soft); }
.tool-row { display: flex; gap: 4px; flex-wrap: wrap; }
.chip { background: var(--panel-2); color: var(--ink-soft); border: 1px solid var(--line); border-radius: 6px; padding: 5px 9px; font-size: 1rem; }
.chip:hover { border-color: var(--board-line); }
.chip.on, .chip[aria-selected="true"] { border-color: var(--line); background: var(--paper); color: var(--accent); }
.board-panel { display: grid; gap: 13px; }
.board-tools { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.slider { display: grid; gap: 10px; font-size: 1rem; font-weight: 600; }
.slider input { width: 100%; accent-color: var(--accent); }
.board-tools .fineprint { font-size: 1rem; margin: 9px 0 0; }
.systems { display: grid; gap: 8px; }
.system { border: 1px solid var(--line); border-radius: 10px; background: var(--paper); overflow: hidden; width: 100%; text-align: left; }
.system.on { border-color: var(--line); }
.system-head { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 12px 13px 9px; color: var(--ink); }
.system-head:hover { background: var(--panel-2); }
.system-name { display: flex; align-items: center; gap: 7px; font-size: 1rem; font-weight: 600; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; flex: none; }
.dot.power { background: #c9964c; } .dot.compute { background: #706add; } .dot.sense { background: #54a68c; } .dot.io { background: #b678a6; }
.system p { color: var(--ink-faint); font-size: 1rem; margin: 6px 0 0; }
.system .refs { color: var(--ink-faint); font-size: 1rem; }
.system-parts { list-style: none; margin: 0; padding: 0 8px 8px; }
.part-pick { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; width: 100%; text-align: left; border: 1px solid transparent; border-radius: 5px; background: none; padding: 4px 6px; font-size: 1rem; color: var(--ink-soft); }
.part-pick:hover { background: var(--panel-2); }
.part-pick.on { background: var(--lavender); color: var(--accent); border-color: var(--line); }
.ident { font: 1rem/1.5 var(--mono); color: var(--ink-faint); overflow-wrap: anywhere; }
.selection { padding: 16px; background: var(--lavender); border: 1px solid var(--line); border-radius: 12px; min-height: 110px; }
.selection h4 { font-size: 1rem; margin-bottom: 5px; }
.selection .part-id { font-size: 1rem; color: var(--accent); }
.selection p { color: var(--ink-soft); font-size: 1rem; margin: 8px 0 0; }
.selection dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; font-size: 1rem; margin: 13px 0 0; }
.selection dt { color: var(--ink-soft); }
.selection dd { margin: 0; overflow-wrap: anywhere; }
.explore { margin-top: 29px; padding-top: 27px; border-top: 1px solid var(--line); }
.explore-head { display: flex; align-items: flex-start; gap: 11px; }
.explore-head h2 { font-size: 1.5rem; letter-spacing: -.5px; }
.explore-head p { color: var(--ink-soft); font-size: 1rem; margin: 8px 0 0; }
.flow-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin: 21px 0 13px; }
.flow-tabs .chip { padding: 9px 13px; background: var(--paper); font-size: 1rem; }
.flow-tabs .chip.on { color: var(--accent); background: var(--lavender); border-color: var(--line); }
.flow-detail { border: 1px solid var(--line); background: var(--paper); border-radius: 13px; padding: 20px; min-height: 90px; }
.flow-summary { font-size: 1rem; margin: 0; color: var(--ink-soft); }
.flow-stages { list-style: none; padding: 0; margin: 17px 0 0; display: grid; gap: 2px; }
.flow-stages li { border-top: 1px solid var(--line); }
.stage-focus { display: grid; grid-template-columns: 25px 1fr; gap: 12px; width: 100%; text-align: left; background: none; color: var(--ink); border: 1px solid transparent; border-radius: 8px; padding: 12px; }
.stage-focus:hover { background: var(--panel-2); }
.stage-focus.on { background: var(--panel-2); border-color: var(--line); }
.flow-stages .step { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; background: var(--panel-2); color: var(--accent); font-size: 1rem; }
.flow-stages strong { display: block; font-size: 1rem; }
.flow-stages p { font-size: 1rem; color: var(--ink-soft); margin: 4px 0 0; }
.nets { font: 1rem/1.7 var(--mono); color: var(--copper); overflow-wrap: anywhere; }
.learning-heading { margin-bottom: 23px; }
.learning-heading h2 { font-size: 1.625rem; letter-spacing: -.5px; }
.learning-heading p { color: var(--ink-soft); font-size: 1rem; margin: 10px 0 0; }
.two-up { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 15px; padding: 24px; margin-top: 22px; min-width: 0; }
.two-up .panel, [data-result-panel] > .panel:first-child { margin-top: 0; }
.panel > h3 { font-size: 1.1875rem; font-family: var(--display); font-weight: 550; letter-spacing: -.3px; }
.panel > p { color: var(--ink-soft); font-size: 1rem; margin: 10px 0 0; }
.repair { border-top: 3px solid #dca060; }
.repair-steps { list-style: none; margin: 17px 0 0; padding: 0; display: grid; gap: 8px; }
.repair-steps li { padding: 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); opacity: .35; transition: opacity .25s; }
.repair-steps li.shown { opacity: 1; }
.repair-steps li.shown.key-problem { border-left: 3px solid #cd6a6d; background: var(--fail-surface); }
.repair-steps li.shown.key-fix { border-left: 3px solid #d6a061; background: var(--warn-surface); }
.repair-steps li.shown.key-recheck { border-left: 3px solid #6fa68c; background: var(--pass-surface); }
.repair-steps strong { display: block; font-size: 1rem; }
.repair-steps p { margin: 5px 0 0; color: var(--ink-soft); font-size: 1rem; }
.voltage-scale { margin: 21px 0; }
.scale-bar { position: relative; height: 23px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-2); overflow: hidden; }
.scale-ok { position: absolute; inset: 0 auto 0 0; background: var(--panel-2); border-right: 1px solid #70a88b; }
.scale-mark { position: absolute; top: 0; bottom: 0; width: 2px; }
.scale-mark.applied { background: var(--fail); width: 3px; }
.scale-mark.fixed { background: var(--pass); width: 3px; }
.scale-mark.absmax { background: #bb872f; }
.scale-keys { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 5px; }
.scale-keys .key { display: grid; grid-template-columns: 8px 1fr; gap: 7px; align-items: baseline; font-size: 1rem; color: var(--ink-soft); }
.scale-keys .key::before { content: ""; width: 7px; height: 7px; border-radius: 2px; }
.scale-keys .key.ok::before { background: #88b499; } .scale-keys .key.absmax::before { background: #bb872f; } .scale-keys .key.applied::before { background: var(--fail); } .scale-keys .key.fixed::before { background: var(--pass); }
.scale-legend { display: flex; justify-content: space-between; color: var(--ink-faint); font-size: 1rem; margin-top: 4px; }
.repair-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 17px; }
.repair-controls button { font-size: 1rem; padding: 9px 13px; }
.transform-stage { position: relative; height: 300px; overflow: hidden; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; margin: 20px 0; }
.tpart { position: absolute; display: grid; place-items: center; border-radius: 3px; transform: translate(-50%,-50%); font: 500 9px/1 var(--mono); }
.tpart .sym, .tpart .fp { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 3px; }
.tpart .sym { border: 1px solid #827acc; background: var(--panel-2); color: var(--ink-soft); }
.tpart .fp { background: #474462; color: white; }
.transform-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.transform-controls button { font-size: 1rem; padding: 9px 13px; }
.transform-controls input { flex: 1 1 120px; accent-color: var(--accent); min-width: 0; }
.transform-label { color: var(--ink-faint); font-size: 1rem; }
.schematic-holder { overflow: auto; margin-top: 17px; }
svg.schematic { width: 100%; height: auto; background: var(--panel-2); border-radius: 8px; min-width: 380px; }
svg.schematic .sym rect { fill: #eeebfc; stroke: #9389c8; }
svg.schematic .sym text { fill: #494366; font: 500 11px var(--mono); }
svg.schematic .sym-part { fill: #756e8c; font-size: 1rem; }
svg.schematic .pin circle { fill: var(--copper); }
svg.schematic .pin text { fill: var(--ink-soft); font: 400 7px var(--mono); }
svg.schematic .dim { opacity: .2; }
svg.schematic .sel rect { stroke: var(--accent); stroke-width: 2; }
.tour-body { display: grid; grid-template-columns: 220px minmax(0,1fr); gap: 28px; margin-top: 22px; }
.tour-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; align-content: start; }
.tour-steps button { width: 100%; padding: 9px 12px; border: 1px solid transparent; border-radius: 7px; background: none; text-align: left; color: var(--ink-faint); font-size: 1rem; }
.tour-steps button.on { background: var(--lavender); color: var(--accent); border-color: var(--line); }
.tour-narration { border-left: 2px solid var(--line); padding-left: 24px; }
.tour-narration h4 { font-size: 1.0625rem; margin-bottom: 12px; }
.tour-narration p { color: var(--ink-soft); font-size: 1rem; }
.tour-facts { list-style: none; padding: 0; margin: 18px 0 0; font-size: 1rem; color: var(--ink-faint); }
.tour-facts li { padding: 5px 0; border-top: 1px solid var(--line); }
.checks-intro { display: flex; align-items: center; justify-content: space-between; gap: 25px; }
.checks-intro h2 { font-size: 1.625rem; font-weight: 550; letter-spacing: -.5px; }
.check-symbol { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 15px; background: var(--pass-surface); color: var(--pass); font-size: 1.375rem; }
.checks { display: grid; gap: 9px; }
.check-family { margin-top: 25px; }
.check-family h4 { font-size: 1rem; margin-bottom: 6px; }
.check-family > p { font-size: 1rem; color: var(--ink-faint); }
.check { border: 1px solid var(--line); border-radius: 9px; background: var(--panel-2); margin-top: 7px; overflow: hidden; }
.check > summary { display: flex; align-items: center; gap: 12px; list-style: none; padding: 14px; cursor: pointer; }
.check > summary::-webkit-details-marker { display: none; }
.check > summary::after { content: "+"; margin-left: auto; font-size: 1.125rem; color: var(--ink-soft); }
.check[open] > summary::after { content: "−"; }
.check-label { font-size: 1rem; font-weight: 600; }
.check-q { color: var(--ink-faint); font-size: 1rem; }
.check-rules { display: grid; gap: 5px; padding: 0 14px 14px; }
.rule { display: grid; grid-template-columns: 90px minmax(0,1fr) auto; align-items: baseline; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 1rem; }
.rule code { color: var(--accent); font-size: 1rem; }
.rule .limits { grid-column: 2 / -1; font-size: 1rem; color: var(--ink-faint); }
.conf-cols { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; margin-top: 23px; }
.conf-cols h4 { font-size: 1rem; margin-bottom: 7px; }
.conf-cols > div > p { color: var(--ink-faint); font-size: 1rem; }
.conf-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.conf-list li { border: 1px solid var(--line); border-radius: 9px; padding: 14px; background: var(--panel-2); }
.conf-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 1rem; }
.conf-list p { margin: 7px 0 0; color: var(--ink-soft); font-size: 1rem; }
.build-reality { display: flex; gap: 16px; padding: 21px 24px; border: 1px solid var(--line); border-radius: 13px; background: var(--warn-surface); margin-bottom: 25px; }
.build-reality > span { font-size: 2rem; color: var(--ink-soft); line-height: 1.3; }
.build-reality strong { color: var(--warn); font-size: 1rem; }
.build-reality p { margin: 7px 0 0; color: var(--ink-soft); font-size: 1rem; line-height: 1.8; }
.parts-heading { margin: 35px 0 20px; }
.parts-heading h2 { font-size: 1.6875rem; letter-spacing: -.6px; font-weight: 550; }
.parts-heading p { color: var(--ink-soft); font-size: 1rem; margin: 9px 0 0; }
.parts { display: grid; grid-template-columns: repeat(auto-fill,minmax(245px,1fr)); gap: 12px; }
.part-card { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 19px; }
.part-card header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.part-card .ref { font-size: 1rem; font-weight: 600; }
.part-card .purpose { color: var(--ink-soft); font-size: 1rem; margin: 11px 0 0; }
.part-card .meta { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 13px; }
.tag { font-size: 1rem; color: var(--ink-faint); background: var(--panel-2); border: 1px solid var(--line); border-radius: 4px; padding: 2px 5px; }
.tag.hard { color: var(--warn); border-color: var(--line); background: var(--warn-surface); }
.file-list { list-style: none; padding: 0; margin: 20px 0 0; }
.file-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 1rem; }
.file-list .hash { font: 1rem/1.6 var(--mono); color: var(--ink-faint); overflow-wrap: anywhere; }
.file-list li > span { min-width: 0; overflow-wrap: anywhere; }
.download-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 19px; }
.download-row a { display: inline-flex; align-items: center; background: var(--accent); color: white; padding: 10px 16px; border-radius: 8px; text-decoration: none; font-size: 1rem; }
.download-row a:hover { background: var(--accent-deep); }
.download-row a[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.bringup-list { list-style: none; counter-reset: bringup; padding: 0; margin: 20px 0 0; }
.bringup-list li { display: grid; grid-template-columns: 28px minmax(0,1fr) auto; gap: 14px; align-items: baseline; border-top: 1px solid var(--line); padding: 17px 0; counter-increment: bringup; font-size: 1rem; }
.bringup-list li::before { content: counter(bringup); display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: var(--lavender); color: var(--accent); font-size: 1rem; }
.bringup-list .predicted { font-size: 1rem; color: var(--pass); text-align: right; }
.bringup-list .predicted.none { color: var(--ink-faint); font-style: normal; }
.bringup-list span .fineprint { display: block; margin: 6px 0 0; font-size: 1rem; }
.disclose { padding-top: 13px; margin-top: 17px; border-top: 1px solid var(--line); }
.disclose > summary { cursor: pointer; color: var(--accent); font-size: 1rem; font-weight: 500; }
.disclose p { font-size: 1rem; color: var(--ink-soft); margin: 12px 0 0; }
.disclose a { overflow-wrap: anywhere; }
@media (min-width: 1700px) {
  main { padding-left: 58px; padding-right: 58px; }
  .welcome { padding-top: 60px; }
  .welcome-grid { gap: 75px; }
}
@media (max-width: 1200px) {
  .app-layout { grid-template-columns: 190px minmax(0,1fr); }
  .sidebar { padding-left: 10px; padding-right: 10px; }
  .workspace-header { padding-left: 27px; padding-right: 27px; }
  main { padding: 0 27px; }
  .welcome-grid { grid-template-columns: minmax(280px,.9fr) minmax(330px,1fr); gap: 25px; }
  .welcome h1 { font-size: 3.1875rem; letter-spacing: -1.8px; }
  .welcome-bottom { gap: 20px; }
  .board-shell { grid-template-columns: minmax(0,1fr) 250px; }
  .agree-layout { grid-template-columns: minmax(0,1fr) 280px; gap: 22px; }
}
@media (max-width: 1000px) {
  .app-layout { grid-template-columns: 76px minmax(0,1fr); }
  .sidebar { padding: 24px 10px 15px; }
  .brand { padding: 0; justify-content: center; }
  .brand > span:last-child, .sidebar-project, .nav-label, .journey button > span, .mentor-note, .sidebar-help, .local-status { display: none; }
  .journey { margin-top: 39px; }
  .journey button { justify-content: center; padding: 14px 10px; }
  .journey button svg { width: 20px; height: 20px; }
  .workspace-status { display: none; }
  .welcome-grid { grid-template-columns: minmax(270px,.9fr) minmax(290px,1fr); gap: 23px; }
  .welcome-lede { font-size: 1rem; }
  .reference-topline { padding: 16px 15px 0; font-size: 1rem; }
  .reference-topline > span:last-child { display: none; }
  .agree-layout { grid-template-columns: minmax(0,1fr) 270px; }
  .activity-layout { grid-template-columns: minmax(0,1fr) 240px; gap: 22px; }
  .board-shell { grid-template-columns: 1fr; }
  .board-panel { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .systems { grid-column: 1 / -1; grid-row: 2; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .board-tools { grid-row: 1; }
  .selection { grid-row: 1; }
  .two-up { grid-template-columns: 1fr; }
  .result-head { gap: 18px; }
}
@media (max-width: 760px) {
  .app-layout { display: block; }
  .sidebar { position: static; height: auto; padding: 17px 20px 0; display: block; border-right: none; border-bottom: 1px solid var(--line); }
  .brand { justify-content: flex-start; font-size: 1.75rem; }
  .brand-mark { width: 30px; height: 30px; font-size: 1.5rem; border-radius: 9px; }
  .brand > span:last-child { display: inline; }
  .journey { margin-top: 18px; overflow-x: auto; }
  .journey ol { display: flex; gap: 4px; padding-bottom: 9px; }
  .journey li { flex: 1 0 auto; }
  .journey button { padding: 10px 12px; gap: 7px; font-size: 1rem; }
  .journey button > span:not(.nav-check) { display: inline; }
  .journey button svg { width: 15px; height: 15px; }
  .sidebar-bottom { display: none; }
  .workspace-header { padding: 14px 22px; min-height: 54px; }
  .workspace-crumb { font-size: 1rem; }
  main { padding: 0 22px; }
  .welcome { padding-top: 28px; }
  .welcome-grid { grid-template-columns: 1fr; gap: 28px; }
  .welcome-copy { padding: 0; }
  .welcome h1 { font-size: clamp(43px,9vw,65px); }
  .welcome-lede { max-width: 54ch; }
  .project-starter { max-width: none; padding: 20px; }
  .scope-note { max-width: none; }
  .reference-column { min-width: 0; }
  #reference-canvas { height: 370px; }
  .reference-topline > span:last-child { display: inline; }
  .reference-inspector { min-height: 0; }
  .welcome-bottom { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 19px; margin-top: 29px; }
  .outcome-intro { grid-column: 1 / -1; }
  .outcome-intro h2 br { display: none; }
  .outcome-intro h2 { font-size: 1.5625rem; }
  .workspace-footer { margin: 0 22px; flex-direction: column; gap: 5px; }
  .stage { padding: 29px 0; }
  .section-head h1 { font-size: 2.4375rem; }
  .agree-layout, .activity-layout { grid-template-columns: 1fr; gap: 23px; }
  .agree-decide { position: static; }
  .activity-aside { display: none; }
  .activity-main { padding: 19px; }
  .result-head { display: block; }
  .release-badge { margin-top: 20px; min-width: 0; max-width: 360px; }
  .result-head > button { margin-top: 20px; }
  .result-navigation { flex-wrap: wrap; }
  .result-tabs { width: 100%; }
  .result-tabs button { flex: 1; padding: 9px 8px; font-size: 1rem; }
  #open-build { margin-left: auto; }
  .board-panel { grid-template-columns: 1fr; }
  .selection { grid-row: auto; }
  .systems { grid-template-columns: 1fr 1fr; grid-row: auto; }
  .board-stage-heading { padding: 14px 12px 0; }
  .board-stage-footer { flex-wrap: wrap; padding: 0 12px 14px; }
  #board-canvas { height: 360px; }
  .conf-cols { grid-template-columns: 1fr; }
  .tour-body { grid-template-columns: 1fr; }
  .tour-steps { display: flex; overflow: auto; padding-bottom: 8px; }
  .tour-steps li { flex: 0 0 auto; max-width: 180px; }
  .tour-narration { padding-left: 16px; }
  .panel { padding: 20px; }
  .rule { grid-template-columns: 80px minmax(0,1fr); }
  .rule > .badge { grid-column: 2; justify-self: start; }
  .rule .limits { grid-column: 1 / -1; }
  .check > summary { flex-wrap: wrap; gap: 9px; }
  .check-q { display: block; }
  .bringup-list li { grid-template-columns: 25px minmax(0,1fr); }
  .bringup-list .predicted { grid-column: 2; text-align: left; }
  .file-list li { flex-wrap: wrap; gap: 4px; }
  .connection-banner { margin: 15px 22px 0; }
  .header-help > div { width: min(305px,calc(100vw - 44px)); }
}
@media (max-width: 420px) {
  main { padding: 0 17px; }
  .workspace-header { padding-left: 17px; padding-right: 17px; }
  .welcome h1 { font-size: 2.8125rem; }
  .welcome-kicker { font-size: 1rem; }
  .starter-heading h2 { font-size: 1.125rem; }
  #reference-canvas { height: 300px; }
  .reference-controls { gap: 2px; }
  .reference-controls button { padding: 7px; font-size: 1rem; }
  .welcome-bottom { grid-template-columns: 1fr; gap: 22px; }
  .outcome { display: grid; grid-template-columns: 29px 1fr; gap: 0 11px; }
  .outcome-icon { grid-row: 1 / 3; margin: 0; }
  .outcome p { grid-column: 2; }
  .brief-line { grid-template-columns: 1fr; gap: 5px; }
  .systems { grid-template-columns: 1fr; }
  .badge { font-size: 1rem; }
  .stage-list li { gap: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* The circuit lab pairs a cinematic stage with a calm, readable learning pane. */
.pcb-stage { position: relative; background: radial-gradient(ellipse at 48% 37%,#24344b 0%,#152338 51%,#0d1729 100%); color: #eaf1fb; border-color: #263b54; }
.pcb-stage .board-stage-heading, .pcb-stage .board-hint, .pcb-stage .reference-topline, .pcb-stage .reference-caption { color: #b8c7dc; }
.pcb-stage .chip, .pcb-stage .reference-controls button { background: transparent; border: 1px solid #3b4b66; color: #c4d0e3; }
.pcb-stage .chip.on, .pcb-stage .reference-controls button.on { background: #35445c; border-color: #687e9f; color: #fff; }
.pcb-stage .reference-controls { padding-left: 14px; padding-right: 14px; }
.reference-stage.pcb-stage { border-radius: 24px; box-shadow: 0 22px 65px #1e2c4e12; }
.reference-stage.pcb-stage .reference-topline { padding: 22px 22px 0; }
.reference-stage.pcb-stage #reference-canvas { height: 420px; }
.reference-dot { background: #77d7da; }
.open-lab-button { display: flex; align-items: center; justify-content: space-between; width: calc(100% - 36px); margin: 0 18px 18px; padding: 15px 17px; border: 1px solid #526684; border-radius: 12px; color: white; background: #283952; text-align: left; font-size: 1rem; font-weight: 600; transition: background .2s,transform .2s; }
.open-lab-button:hover:not(:disabled) { background: #354c6b; transform: translateY(-2px); }
.open-lab-button small { display: block; font-size: 1rem; color: #b3c4db; margin-bottom: 2px; font-weight: 400; }
.open-lab-button > span:last-child { font-size: 1.5rem; color: #b5e9e5; }
.open-lab-button:disabled { opacity: .5; }
.board-visual-controls { padding: 15px 18px; border-top: 1px solid #8bafd425; position: relative; z-index: 2; }
.visual-control-group { display: flex; gap: 7px; flex-wrap: wrap; }
.visual-control-group button { display: inline-flex; align-items: center; gap: 6px; padding: 8px 11px; border: 1px solid #42536c; border-radius: 7px; background: #17283e; color: #c9d5e5; font-size: 1rem; white-space: nowrap; }
.visual-control-group button:hover:not(:disabled) { border-color: #8ca6c8; color: white; }
.visual-control-group button[aria-pressed=true] { color: #a7f0e9; background: #22414c; border-color: #588a92; }
.visual-control-group button:disabled { opacity: .45; }
.visual-control-group button > span[aria-hidden] { font-size: 1rem; line-height: 1; }
.visual-control-group button[data-lab-assembly] { color: #d4f6eb; border-color: #507f7c; background: #20464c; }
.board-keyboard-help { font-size: 1rem; color: #adbed3; margin-top: 7px; }
.board-keyboard-help summary { cursor: pointer; width: fit-content; }
.board-keyboard-help p { max-width: 65ch; line-height: 1.7; margin: 8px 0 0; }
.visual-mode-note { display: block; color: #adbed3; font-size: 1rem; margin-top: 9px; min-height: 16px; }
.pcb-hover-label { position: absolute; left: 22px; top: 74px; padding: 9px 13px; border: 1px solid #647a97; color: #eef5ff; background: #102038e8; border-radius: 8px; font-size: 1rem; z-index: 4; pointer-events: none; box-shadow: 0 8px 25px #0003; }
.board-stage:fullscreen { display: flex; flex-direction: column; overflow: auto; padding: 25px; }
.board-stage:fullscreen #board-canvas { flex: 1; min-height: 250px; height: calc(100vh - 260px); }
.board-stage:fullscreen .board-stage-heading { font-size: 1.125rem; }
.board-stage:fullscreen .board-stage-footer, .board-stage:fullscreen .thickness-note { display: none; }
.lab-is-open { overflow: hidden; }
.circuit-lab { width: min(1450px,calc(100vw - 48px)); max-width: none; height: min(970px,calc(100dvh - 48px)); max-height: none; padding: 0; border: 1px solid #495268; border-radius: 22px; overflow: hidden; color: var(--ink); background: var(--panel-2); box-shadow: 0 30px 120px #06122680; }
.circuit-lab::backdrop { background: #07101fbb; backdrop-filter: blur(10px); }
.lab-header { display: flex; justify-content: space-between; align-items: center; height: 94px; padding: 20px 27px; border-bottom: 1px solid var(--line); background: var(--paper); gap: 15px; }
.lab-brand { display: flex; gap: 13px; align-items: center; }
.lab-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; color: #e5e1ff; background: #242a49; font: 2rem/1 Georgia,serif; }
.lab-eyebrow { font-size: 1rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 1.15px; font-weight: 600; }
.lab-header h2 { font-size: 1.6875rem; font-weight: 600; margin-top: 2px; letter-spacing: -.8px; }
.lab-header-actions { display: flex; align-items: center; gap: 20px; }
.reference-provenance { font-size: 1rem; color: var(--ink-soft); padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; }
#close-circuit-lab { background: var(--panel-2); color: var(--ink-soft); border: 1px solid var(--line); border-radius: 8px; padding: 8px 13px; font-size: 1rem; }
#close-circuit-lab > span { font-size: 1.375rem; line-height: 14px; margin-left: 10px; vertical-align: middle; }
.lab-body { display: grid; grid-template-columns: minmax(0,1fr) 350px; height: calc(100% - 94px); }
.lab-viewport { min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.lab-stage-top { display: flex; justify-content: space-between; gap: 15px; flex-wrap: wrap; padding: 22px 25px 0; font-size: 1rem; color: #b6c6db; }
.lab-stage-top i { display: inline-block; width: 5px; height: 5px; background: #a1dfe0; border-radius: 50%; margin: 0 7px 1px 0; }
.lab-stage-top > span:last-child { color: #98abc3; }
.lab-canvas-wrap { flex: 1; min-height: 240px; position: relative; }
#lab-canvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.lab-canvas-wrap .pcb-hover-label { top: 15px; }
.lab-board-specs { position: absolute; bottom: 5px; left: 0; right: 0; display: flex; justify-content: center; gap: 21px; color: #a7b9d1; font: 1rem/1.4 var(--mono); pointer-events: none; }
.lab-board-specs span + span::before { content: "/"; color: var(--ink-soft); margin-right: 21px; }
.lab-stage-bottom { display: flex; justify-content: space-between; gap: 25px; align-items: center; padding: 0 23px 22px; }
.lab-stage-bottom label { flex: 1; font-size: 1rem; color: #cbd6e5; max-width: 340px; }
.lab-stage-bottom input { display: block; width: 100%; accent-color: #9cbedd; margin: 10px 0 0; }
.lab-stage-bottom p { color: #97abc4; font-size: 1rem; line-height: 1.7; margin: 0; }
.circuit-lessons { padding: 25px; overflow: auto; min-width: 0; background: var(--panel-2); }
.lab-lesson-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 24px; }
.lab-lesson-top .lab-eyebrow { font-size: 1rem; letter-spacing: .7px; max-width: 120px; }
.discovery-count { flex: none; font-size: 1rem; padding: 4px 7px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel-2); color: var(--ink-soft); }
.circuit-lessons h3 { font-family: var(--display); font-size: 2rem; letter-spacing: -.7px; line-height: 1.13; font-weight: 550; margin-bottom: 16px; }
.lesson-description { font-size: 1rem; color: var(--ink-soft); line-height: 1.8; }
.lab-start-tour { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 14px 16px; margin-top: 25px; border: 0; border-radius: 9px; color: white; background: var(--accent); font-size: 1rem; font-weight: 550; }
.lab-start-tour span { font-size: 1.125rem; }
.lab-tour-note { font-size: 1rem; line-height: 1.7; color: var(--ink-soft); margin: 11px 0 20px; }
.lesson-stops { display: flex; gap: 8px; margin-bottom: 28px; }
.lesson-stops button { flex: 1; height: 34px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); color: var(--ink-soft); font: 1rem/1 var(--mono); }
.lesson-stops button[aria-pressed=true] { color: white; background: #373b60; border-color: #373b60; }
.lesson-position { font: 1rem/1.4 var(--mono); letter-spacing: 1px; color: var(--accent); margin-bottom: 12px; }
.discovery-prompt { display: flex; align-items: flex-start; gap: 10px; padding: 13px; margin: 20px 0 15px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 9px; color: var(--ink-soft); }
.discovery-prompt > span { font-size: 1.125rem; }
.discovery-prompt p { font-size: 1rem; line-height: 1.65; margin: 0; }
.discovery-prompt.found { color: var(--pass); background: var(--pass-surface); border-color: var(--line); }
.lesson-parts { display: grid; gap: 6px; }
.lesson-parts button { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); background: var(--panel-2); border-radius: 7px; text-align: left; color: var(--ink-soft); font-size: 1rem; line-height: 1.5; }
.lesson-parts button[aria-pressed=true] { border-color: #9591d0; background: var(--panel-2); color: var(--ink-soft); }
.lesson-parts code { font: 1rem/1 var(--mono); color: var(--ink-soft); }
.lesson-nav { display: flex; gap: 8px; margin-top: 20px; }
.lesson-nav button { padding: 10px 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink-soft); font-size: 1rem; }
.lesson-nav button:last-child { display: flex; justify-content: space-between; flex: 1; background: #303653; border-color: #303653; color: white; }
.lesson-nav button:disabled { opacity: .4; }
.lab-free-explore { border: 0; background: none; padding: 13px 0 0; color: var(--ink-soft); font-size: 1rem; text-decoration: underline; text-underline-offset: 3px; }
.lab-part-detail { margin-top: 26px; padding-top: 21px; border-top: 1px solid var(--line); }
.lab-part-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.lab-part-heading code { background: var(--panel-2); border-radius: 4px; padding: 4px 6px; font: 1rem/1 var(--mono); color: var(--ink-soft); }
.lab-part-detail h4 { font-size: 1.0625rem; font-weight: 550; margin-bottom: 9px; }
.lab-part-detail p { font-size: 1rem; color: var(--ink-soft); line-height: 1.75; }
.lab-part-detail details { font-size: 1rem; color: var(--ink-soft); margin-top: 14px; }
.lab-part-detail summary, .lab-visual-limits summary { cursor: pointer; }
.lab-part-detail details p { margin-top: 9px; }
.net-inspector { margin-top: 20px; }
.net-inspector h5 { margin: 0 0 5px; font-size: 1rem; }
.net-inspector > p { font-size: 1rem; }
.net-inspector > div { display: flex; flex-wrap: wrap; gap: 6px; }
.net-inspector button { padding: 7px 9px; color: var(--ink-soft); background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; font: 1rem/1 var(--mono); }
.net-inspector button[aria-pressed=true] { color: #fff; background: #38626c; border-color: #38626c; }
.connection-readout { min-height: 0; margin: 8px 0 0; }
.lab-visual-limits { font-size: 1rem; color: var(--ink-soft); padding-top: 19px; margin-top: 25px; border-top: 1px solid var(--line); line-height: 1.8; }
.lab-visual-limits p { margin: 9px 0; }
.lab-visual-limits code { font-size: 1rem; overflow-wrap: anywhere; }
.compact-lessons { border: 1px solid var(--line); border-radius: 13px; padding: 20px; overflow: visible; }
.compact-lessons h3 { font-size: 1.5625rem; }
.compact-lessons .lab-lesson-top { margin-bottom: 17px; }
.compact-lessons .lesson-stops { margin-bottom: 18px; }
@media (max-width: 1100px) {
  .lab-body { grid-template-columns: minmax(0,1fr) 310px; }
  .circuit-lessons { padding: 20px; }
  .lab-stage-top > span:last-child { display: none; }
  .lab-stage-bottom { flex-wrap: wrap; gap: 14px; }
  .lab-stage-bottom p { width: 100%; }
}
@media (max-width: 760px) {
  .circuit-lab { width: calc(100vw - 16px); height: calc(100dvh - 16px); border-radius: 15px; }
  .lab-header { height: 78px; padding: 15px; }
  .lab-header h2 { font-size: 1.375rem; }
  .lab-header-actions { gap: 8px; }
  .reference-provenance { display: none; }
  .lab-body { display: block; height: calc(100% - 78px); overflow: auto; }
  .lab-viewport { min-height: 500px; }
  .lab-stage-top { padding: 20px 18px 0; }
  .lab-canvas-wrap { height: 340px; flex: none; }
  .lab-board-specs { gap: 10px; font-size: 1rem; }
  .lab-board-specs span + span::before { margin-right: 10px; }
  .lab-stage-bottom { padding: 0 18px 17px; gap: 12px; flex-wrap: nowrap; }
  .lab-stage-bottom p { width: auto; font-size: 1rem; }
  .lab-stage-bottom label { min-width: 120px; }
  .board-visual-controls { padding: 12px; }
  .visual-control-group { gap: 5px; }
  .visual-control-group button { font-size: 1rem; padding: 8px; }
  .circuit-lessons { padding: 25px 22px; overflow: visible; }
  .reference-stage.pcb-stage #reference-canvas { height: 335px; }
  .reference-stage.pcb-stage { border-radius: 18px; }
}
@media (max-width: 420px) {
  .lab-header .lab-eyebrow { font-size: 1rem; letter-spacing: .7px; }
  .lab-mark { display: none; }
  .lab-viewport { min-height: 460px; }
  .lab-canvas-wrap { height: 300px; }
  .open-lab-button { width: calc(100% - 26px); margin: 0 13px 13px; }
  .reference-stage.pcb-stage #reference-canvas { height: 300px; }
}

/* The live board is the landing page's centrepiece. Type stays readable at
   every width; controls and explanations are part of the workbench, not chrome. */
.app-layout { grid-template-columns: 238px minmax(0, 1fr); }
.sidebar { padding: 28px 16px 18px; }
.sidebar-project { margin-top: 30px; background: var(--panel-2); }
.sidebar-project strong { font-size: 1rem; }
.journey button { min-height: 47px; font-size: 1rem; gap: 10px; }
.journey button:disabled { opacity: .65; }
.mentor-note p, .sidebar-help p { line-height: 1.6; }
.local-status { flex-wrap: wrap; row-gap: 7px; }
.version { font-size: 1rem; }
.workspace-header { min-height: 68px; padding: 15px 32px; background: var(--paper); }
.workspace-crumb, .header-actions { font-size: 1rem; }
.header-help > div { width: 350px; font-size: 1rem; }
main { max-width: 1800px; padding: 0 32px; }
.stage { padding: 30px 0 38px; }
.welcome { padding-top: 30px; }
.welcome-heading { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 36px; align-items: center; margin-bottom: 28px; }
.welcome h1 { font-size: clamp(38px, 3.5vw, 56px); line-height: 1.09; letter-spacing: -1.8px; font-weight: 650; margin: 0; }
.welcome-lede { max-width: 43ch; font-size: 1.125rem; line-height: 1.65; margin: 0; color: var(--ink-soft); }
.welcome-grid { grid-template-columns: minmax(0, 1.55fr) minmax(335px, 1fr); gap: 30px; align-items: start; }
.welcome-copy { padding: 0; min-width: 0; }
.project-starter { max-width: none; padding: 28px; border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: 14px; }
.starter-heading { align-items: flex-start; gap: 14px; margin-bottom: 20px; }
.climate-icon { width: 48px; height: 52px; border-radius: 10px; color: var(--ink-soft); background: var(--panel-2); }
.available-label { color: var(--ink-soft); font-size: 1rem; font-weight: 500; margin: 0 0 6px; }
.starter-heading h2 { font-size: 1.75rem; line-height: 1.16; letter-spacing: -.6px; }
.project-starter > p { font-size: 1.0625rem; line-height: 1.65; color: var(--ink-soft); }
.starter-specs { display: grid; margin: 23px 0; padding: 0; font-size: 1rem; }
.starter-specs > div { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.starter-specs > div:first-child { border-top: 1px solid var(--line); }
.starter-specs dt { color: var(--ink-soft); }
.starter-specs dd { margin: 0; color: var(--ink-soft); font-weight: 600; }
.primary, .secondary, .ghost { min-height: 47px; font-size: 1rem; }
.start-button { min-height: 52px; }
.project-starter .starter-footnote { font-size: 1rem; line-height: 1.65; text-align: left; margin-top: 15px; }
.prototype-note { border-left: 3px solid #bba579; padding-left: 18px; margin: 25px 4px 0; }
.prototype-note > strong { font-size: 1rem; font-weight: 600; color: var(--ink-soft); }
.scope-note { font-size: 1rem; line-height: 1.7; margin: 7px 0 0; max-width: 56ch; }
.pcb-stage { background: radial-gradient(ellipse at 49% 39%, #253249 0%, #141d2c 55%, #101724 100%); border-color: #334359; }
.reference-stage.pcb-stage { border-radius: 18px; border: 1px solid #173d48; box-shadow: 0 16px 32px #163b4612; }
.reference-stage.pcb-stage .reference-topline { padding: 19px 22px 0; align-items: center; gap: 14px; }
.reference-topline > span:first-child { color: #f0f8fa; font-size: 1.0625rem; font-weight: 550; }
.reference-topline .reference-provenance { color: #d1e4e8; border-color: #5d7f85; font-size: 1rem; padding: 4px 9px; white-space: nowrap; }
.reference-dot { width: 7px; height: 7px; margin-right: 8px; background: #9ce6d7; }
.open-lab-button { width: calc(100% - 44px); margin: 16px 22px 0; padding: 14px 19px; border: 1px solid #6d97ff; border-radius: 10px; background: #2159e8; color: white; font-size: 1.125rem; line-height: 1.4; min-height: 76px; transition: background .15s; }
.open-lab-button small { font-size: 1rem; color: #e3edff; margin: 4px 0 0; font-weight: 400; }
.open-lab-button > span:last-child { font-size: 1.8125rem; color: white; margin-left: 12px; }
.open-lab-button:hover:not(:disabled) { background: #1744ba; transform: none; }
.open-lab-button:disabled { opacity: .68; }
.reference-stage.pcb-stage #reference-canvas { height: clamp(420px, 34vw, 600px); }
.reference-stage.pcb-stage .reference-caption { font-size: 1rem; color: #bfd6dd; padding: 0 22px 16px; line-height: 1.5; }
.pcb-stage .reference-controls { gap: 7px; padding: 0 20px 22px; }
.pcb-stage .reference-controls button { font-size: 1rem; padding: 9px 13px; min-height: 41px; border-radius: 8px; color: #dbebee; border-color: #52717b; }
.pcb-stage .reference-controls button.on { color: var(--ink-soft); border-color: var(--line); background: var(--panel-2); box-shadow: none; }
.pcb-stage .reference-controls button:hover:not(.on) { color: white; border-color: #90b4ba; background: #294e56; }
.system-pin { width: 7px; height: 7px; }
.reference-inspector { padding: 20px 5px 0; gap: 13px; min-height: 104px; }
.inspector-spark { color: var(--ink-soft); font-size: 1.875rem; }
.reference-inspector h3 { font-size: 1.0625rem; margin-bottom: 5px; }
.reference-inspector p { font-size: 1rem; line-height: 1.65; max-width: 69ch; }
.welcome-bottom { display: block; margin-top: 28px; padding-top: 25px; }
.welcome-bottom > h2 { font-size: 1.625rem; letter-spacing: -.5px; margin-bottom: 20px; }
.welcome-path { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
.welcome-path li { display: flex; gap: 14px; align-items: flex-start; }
.welcome-path li > span { color: var(--accent); font: 600 22px/1.25 var(--display); min-width: 15px; padding-top: 1px; }
.welcome-path h3 { font-size: 1.0625rem; margin: 0 0 7px; }
.welcome-path p { font-size: 1rem; line-height: 1.65; color: var(--ink-soft); margin: 0; }
.workspace-footer { margin: 0 32px; font-size: 1rem; padding: 20px 0; }

/* Comfortable reading density across the brief, reports and learning tools. */
.lede, .panel-note, .brief-value, .agree-decide > p, .activity-aside p,
.panel > p, .flow-summary, .tour-narration p, .build-reality p,
.parts-heading p, .learning-heading p, .explore-head p { font-size: 1rem; }
.fineprint, .brief-label, .brief-empty, .progress-detail, .system p,
.selection p, .selection dl, .flow-stages p, .repair-steps p,
.check-q, .check-family > p, .conf-list p, .part-card .purpose { font-size: 1rem; line-height: 1.7; }
.brief-group h3, .stage-list .what, .system-name, .selection h4,
.flow-stages strong, .repair-steps strong, .check-label { font-size: 1rem; }
.chip, .result-tabs button, .part-pick, .flow-tabs .chip, .tour-steps button,
.download-row a, .repair-controls button, .transform-controls button { font-size: 1rem; min-height: 40px; }
.board-shell { grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; }
.board-stage-heading { font-size: 1rem; flex-wrap: wrap; }
.board-hint, .board-tools .fineprint, .board-keyboard-help, .visual-mode-note { font-size: 1rem; line-height: 1.6; }
.visual-control-group { gap: 8px; }
.visual-control-group button { font-size: 1rem; padding: 10px 12px; min-height: 43px; }
.visual-mode-note { margin-top: 12px; }
.board-keyboard-help { margin-top: 10px; }
.pcb-hover-label { font-size: 1rem; }
.circuit-lab { width: min(1560px, calc(100vw - 40px)); background: var(--paper); }
.lab-body { grid-template-columns: minmax(0, 1fr) 390px; }
.lab-header h2 { font-size: 1.875rem; }
.lab-eyebrow, .lab-lesson-top .lab-eyebrow { font-size: 1rem; text-transform: none; letter-spacing: 0; font-weight: 500; max-width: none; }
.lab-header .lab-eyebrow { font-size: 1rem; }
.lab-lesson-top { align-items: flex-start; gap: 18px; margin-bottom: 24px; }
.discovery-count { font-size: 1rem; }
.reference-provenance { font-size: 1rem; }
#close-circuit-lab { font-size: 1rem; min-height: 44px; }
.lab-stage-top { font-size: 1rem; line-height: 1.5; }
.lab-board-specs { font: 1rem/1.5 var(--sans); gap: 18px; color: #ccdee4; }
.lab-board-specs span + span::before { margin-right: 18px; }
.lab-stage-bottom label { font-size: 1rem; }
.lab-stage-bottom p { font-size: 1rem; color: #bbd0d8; }
.circuit-lessons { padding: 27px; background: var(--panel-2); }
.circuit-lessons h3 { font-size: 2.125rem; line-height: 1.14; }
.lesson-description { font-size: 1.0625rem; line-height: 1.65; color: var(--ink-soft); }
.lab-start-tour { font-size: 1rem; padding: 15px 16px; min-height: 50px; }
.lab-tour-note { font-size: 1rem; line-height: 1.65; }
.lesson-stops button { height: 43px; font-size: 1rem; }
.lesson-position { font-size: 1rem; letter-spacing: 0; }
.discovery-prompt p { font-size: 1rem; line-height: 1.65; }
.lesson-parts button { font-size: 1rem; padding: 11px 12px; min-height: 46px; }
.lesson-parts code { font-size: 1rem; }
.lesson-nav button { font-size: 1rem; min-height: 44px; }
.lab-free-explore { font-size: 1rem; min-height: 44px; padding: 12px 0; margin-right: 12px; color: var(--ink-soft); }
.lab-part-detail h4 { font-size: 1.3125rem; }
.lab-part-detail p { font-size: 1rem; line-height: 1.7; }
.lab-part-detail details, .lab-part-heading code { font-size: 1rem; }
.net-inspector h5 { font-size: 1.0625rem; }
.net-inspector > p, .lab-visual-limits { font-size: 1rem; }
.net-inspector button { font-size: 1rem; padding: 10px 12px; min-height: 40px; }
.lab-visual-limits code { font-size: 1rem; }
.compact-lessons { padding: 21px; }
.compact-lessons h3 { font-size: 1.8125rem; }

@media (max-width: 1300px) {
  .app-layout { grid-template-columns: 214px minmax(0, 1fr); }
  main { padding: 0 25px; }
  .workspace-header { padding-left: 25px; padding-right: 25px; }
  .sidebar { padding-left: 10px; padding-right: 10px; }
  .welcome-heading { grid-template-columns: 1fr; gap: 18px; }
  .welcome h1 { font-size: 2.875rem; }
  .welcome-lede { max-width: 67ch; }
  .welcome-grid { grid-template-columns: minmax(0, 1.35fr) minmax(300px, 1fr); gap: 23px; }
  .project-starter { padding: 23px; }
  .starter-heading { gap: 12px; }
  .starter-heading h2 { font-size: 1.5625rem; }
  .climate-icon { display: none; }
  .reference-topline > span:first-child { font-size: 1rem; }
  .reference-topline .reference-provenance { font-size: 1rem; }
  .reference-stage.pcb-stage .reference-topline { padding: 18px 18px 0; }
  .open-lab-button { margin: 16px 18px 0; width: calc(100% - 36px); font-size: 1.0625rem; }
  .reference-stage.pcb-stage #reference-canvas { height: 350px; }
  .pcb-stage .reference-controls button { font-size: 1rem; padding: 8px 10px; }
  .board-shell { grid-template-columns: minmax(0, 1fr) 310px; }
  .lab-body { grid-template-columns: minmax(0, 1fr) 360px; }
  .circuit-lessons { padding: 23px; }
}
@media (max-width: 1050px) {
  .app-layout { grid-template-columns: 76px minmax(0, 1fr); }
  .sidebar { padding-left: 10px; padding-right: 10px; }
  .brand { padding: 0; justify-content: center; }
  .brand > span:last-child, .sidebar-project, .nav-label, .journey button > span,
  .mentor-note, .sidebar-help, .local-status { display: none; }
  .journey { margin-top: 36px; }
  .journey button { justify-content: center; padding: 14px 10px; }
  .welcome-grid { grid-template-columns: minmax(0, 1.3fr) minmax(295px, 1fr); gap: 22px; }
  .board-shell { grid-template-columns: 1fr; }
  .board-panel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compact-lessons { grid-column: 1 / -1; }
  .reference-stage.pcb-stage #reference-canvas { height: 330px; }
}
@media (max-width: 760px) {
  .app-layout { display: block; }
  .sidebar { padding: 18px 20px 0; }
  .brand { justify-content: flex-start; }
  .brand > span:last-child { display: inline; }
  .journey { margin-top: 16px; }
  .journey button { padding: 10px 12px; min-height: 44px; gap: 8px; font-size: 1rem; }
  .journey button > span:not(.nav-check) { display: inline; }
  .workspace-header { padding: 13px 20px; gap: 16px; }
  .workspace-crumb { font-size: 1rem; }
  .header-actions { font-size: 1rem; }
  .header-help > div { width: min(350px, calc(100vw - 40px)); }
  main { padding: 0 20px; }
  .welcome { padding-top: 25px; }
  .welcome-heading { margin-bottom: 25px; gap: 16px; }
  .welcome h1 { font-size: clamp(36px, 7.3vw, 48px); line-height: 1.1; letter-spacing: -1.2px; }
  .welcome-lede { font-size: 1.0625rem; line-height: 1.65; }
  .welcome-grid { grid-template-columns: 1fr; gap: 28px; }
  .reference-stage.pcb-stage { border-radius: 14px; }
  .reference-stage.pcb-stage #reference-canvas { height: clamp(285px, 63vw, 430px); }
  .reference-stage.pcb-stage .reference-topline { padding: 16px 16px 0; flex-wrap: wrap; gap: 8px; }
  .reference-topline > span:last-child { display: inline; }
  .reference-topline .reference-provenance { font-size: 1rem; }
  .open-lab-button { margin: 14px 16px 0; width: calc(100% - 32px); padding: 13px 15px; font-size: 1.0625rem; }
  .open-lab-button small { font-size: 1rem; }
  .reference-stage.pcb-stage .reference-caption { padding: 0 17px 14px; }
  .pcb-stage .reference-controls { gap: 7px; padding: 0 14px 18px; }
  .pcb-stage .reference-controls button { font-size: 1rem; min-height: 42px; padding: 8px 10px; }
  .reference-inspector { padding-top: 18px; min-height: 0; }
  .reference-inspector p { font-size: 1rem; }
  .project-starter { padding: 24px; }
  .starter-heading h2 { font-size: 1.8125rem; }
  .climate-icon { display: grid; }
  .prototype-note { margin-top: 22px; }
  .welcome-bottom { margin-top: 32px; }
  .welcome-path { grid-template-columns: 1fr; gap: 22px; }
  .welcome-path p { font-size: 1rem; }
  .workspace-footer { margin: 0 20px; font-size: 1rem; }
  .board-panel { grid-template-columns: 1fr; }
  .board-stage-heading { font-size: 1rem; padding: 15px 14px 0; }
  .result-tabs button { font-size: 1rem; min-height: 43px; }
  .circuit-lab { width: calc(100vw - 16px); height: calc(100dvh - 16px); border-radius: 14px; }
  .lab-header { height: 88px; padding: 15px; }
  .lab-header h2 { font-size: 1.625rem; }
  .lab-header .lab-eyebrow { font-size: 1rem; }
  .lab-body { display: block; height: calc(100% - 88px); overflow: auto; }
  .lab-canvas-wrap { height: 340px; }
  .lab-board-specs { flex-wrap: wrap; gap: 7px 13px; font-size: 1rem; padding: 0 15px; }
  .lab-board-specs span + span::before { display: none; }
  .lab-stage-bottom { flex-wrap: wrap; gap: 12px; }
  .lab-stage-bottom label { min-width: 100%; max-width: none; font-size: 1rem; }
  .lab-stage-bottom p { font-size: 1rem; }
  .visual-control-group button { font-size: 1rem; padding: 9px 11px; }
  .circuit-lessons { padding: 25px 22px; overflow: visible; }
  .lab-lesson-top .lab-eyebrow { max-width: none; font-size: 1rem; }
}
@media (max-width: 420px) {
  .workspace-crumb { max-width: 185px; }
  .welcome h1 { font-size: 2.25rem; }
  .reference-topline > span:first-child { font-size: 1rem; }
  .starter-heading h2 { font-size: 1.625rem; }
  .lab-header .lab-eyebrow { font-size: 1rem; }
  .lab-header h2 { font-size: 1.5625rem; }
  .lab-stage-top { padding-left: 17px; padding-right: 17px; }
  .lab-canvas-wrap { height: 300px; }
  .discovery-count { font-size: 1rem; }
}

/* Personal projects: an editable bench sheet with a separate teaching circuit. */
.reference-demo-link { width: 100%; margin-top: 12px; font-size: 1rem; }
.starter-families { list-style: none; padding: 0; margin: 20px 0; }
.starter-families li { padding: 13px 0; border-bottom: 1px solid var(--line); }
.starter-families li:last-child { border: 0; }
.starter-families strong { display: block; font-size: 1.25rem; font-weight: 600; }
.starter-families span { display: block; font-size: 1rem; line-height: 1.6; color: var(--ink-soft); margin-top: 5px; }
.saved-project-shelf { margin-top: 42px; padding-top: 30px; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(220px, .85fr) minmax(0, 1.6fr); gap: 30px; }
.saved-project-shelf h2 { font-size: 1.6875rem; line-height: 1.25; letter-spacing: -.6px; margin-bottom: 10px; }
.saved-project-shelf p { color: var(--ink-soft); font-size: 1rem; margin: 0; max-width: 48ch; }
.saved-projects { display: grid; gap: 10px; }
.saved-project { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 17px 20px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; text-align: left; color: var(--ink); }
.saved-project strong, .saved-project small { display: block; }
.saved-project strong { font-size: 1.0625rem; overflow-wrap: anywhere; }
.saved-project small { font-size: 1rem; color: var(--ink-soft); margin-top: 3px; }
.saved-project:hover { border-color: var(--accent); }
.project-empty { padding: 16px 0; color: var(--ink-soft); font-size: 1rem; }
/* Configurable family workbench: quiet controls around the physical board. */
.family-workbench { min-width: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.project-editor-heading { display: flex; justify-content: space-between; align-items: start; flex-wrap: wrap; gap: 16px; margin-bottom: 25px; }
.project-editor-heading h2 { font-size: 2.125rem; line-height: 1.2; letter-spacing: -.7px; margin: 0 0 9px; }
.project-editor-heading p { font-size: 1.125rem; color: var(--ink-soft); margin: 0; }
.project-save-state { font-size: 1rem; color: var(--ink-soft); padding: 8px 0; }
.family-picker { border: 0; border-bottom: 1px solid var(--line); padding: 0 0 28px; margin: 0 0 32px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; min-width: 0; }
.family-option { display: grid; grid-template-columns: 18px 34px minmax(0,1fr); gap: 12px; align-items: center; padding: 23px 16px; cursor: pointer; border-bottom: 3px solid transparent; border-radius: 10px 10px 0 0; min-height: 106px; }
.family-option:has(input:checked) { background: var(--paper); border-bottom-color: var(--accent); }
.family-option input, .project-choice-options input, .exercise-option input { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; flex-shrink: 0; }
.family-option svg { width: 34px; height: 34px; fill: none; stroke: var(--copper); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.family-option strong { font: 600 24px/1.2 var(--display); letter-spacing: -.3px; display: block; }
.family-option small { display: block; font-size: 1rem; line-height: 1.5; color: var(--ink-soft); margin-top: 8px; }
.project-options-loading { margin: 20px 0; padding: 22px; border-left: 3px solid var(--accent); background: var(--paper); }
.project-edit-layout { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(310px,.85fr); gap: 44px; align-items: start; }
.project-editor { min-width: 0; padding: 30px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; }
.project-name-label { display: block; font-size: 1rem; font-weight: 600; margin-bottom: 10px; }
#project-name { width: 100%; background: var(--canvas); border: 1px solid var(--line-bright); border-radius: 8px; min-height: 54px; padding: 12px 14px; color: var(--ink); font-size: 1.125rem; }
.project-circuit-strip { display: flex; align-items: center; margin: 30px 0 15px; }
.project-circuit-strip > span { min-width: 0; flex: 1; font-weight: 600; font-size: 1.25rem; text-align: center; color: var(--accent-deep); }
.project-circuit-strip small { display: block; color: var(--ink-soft); font-size: 1rem; font-weight: 400; line-height: 1.45; margin-top: 5px; }
.project-circuit-strip i { width: 24px; height: 2px; background: var(--copper); flex-shrink: 0; }
.project-envelope { font-size: 1rem; line-height: 1.65; color: var(--ink-soft); margin: 0 0 30px; }
.project-choice { border: 0; border-top: 1px solid var(--line); padding: 26px 0 30px; margin: 0; min-width: 0; }
.project-choice legend { font: 600 25px/1.25 var(--display); padding: 0 12px 0 0; letter-spacing: -.4px; max-width: 100%; }
.project-choice > p { margin: -3px 0 18px; font-size: 1.125rem; line-height: 1.65; color: var(--ink-soft); }
.family-workbench select { display: block; min-width: 0; max-width: 100%; font: 1rem/1.5 var(--sans); color: var(--ink); background: var(--paper); border: 1px solid var(--line-bright); border-radius: 7px; padding: 12px 32px 12px 12px; min-height: 49px; }
.feature-count { display: flex; align-items: center; justify-content: space-between; gap: 18px; font-size: 1rem; font-weight: 600; margin: 12px 0 18px; }
.feature-count select { min-width: 100px; }
.sensor-slot, .memory-slot { padding: 19px 0 16px; border-top: 1px solid var(--line); }
.sensor-slot > label, .memory-slot > label { display: block; font-size: 1rem; font-weight: 600; margin-bottom: 9px; }
.sensor-slot > select, .memory-slot > select { width: 100%; }
.sensor-slot p, .memory-slot p { color: var(--ink-soft); font-size: 1rem; line-height: 1.65; margin: 12px 0 18px; }
.sensor-slot .sensor-address { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 1rem; font-weight: 400; color: var(--ink-soft); margin: 0; }
.sensor-address select { width: 140px; flex-shrink: 0; }
.project-choice .feature-help { font-size: 1rem; margin: 8px 0 0; }
.project-choice-options { display: grid; gap: 0; }
.project-choice-options label { display: flex; align-items: start; gap: 13px; padding: 16px 0; cursor: pointer; }
.project-choice-options input { margin-top: 4px; }
.project-choice-options strong { display: block; font-size: 1rem; line-height: 1.45; font-weight: 600; }
.project-choice-options small { display: block; font-size: 1rem; line-height: 1.55; color: var(--ink-soft); margin-top: 5px; }
.saved-details { border-top: 1px solid var(--line); padding-top: 18px; font-size: 1rem; }
.saved-details summary, .project-build-boundary summary { cursor: pointer; min-height: 36px; font-size: 1rem; font-weight: 600; }
.saved-details p { color: var(--ink-soft); font-size: 1rem; }
.saved-details label { display: block; font-size: 1rem; }
.saved-details textarea { display: block; width: 100%; resize: vertical; margin-top: 10px; font: 1rem/1.55 var(--sans); color: var(--ink); padding: 12px; border: 1px solid var(--line-bright); border-radius: 7px; }
.saved-details dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; }
.saved-details dt { color: var(--ink-soft); }
.saved-details dd { margin: 0; text-align: right; }
.project-confirmation { min-width: 0; padding: 8px 0; }
.confirmation-heading { display: flex; gap: 15px; align-items: start; }
.confirmation-heading > span { font-size: 2.1875rem; color: var(--copper); line-height: 1; }
.confirmation-heading h2 { font-size: 1.8125rem; line-height: 1.2; margin: 0 0 13px; letter-spacing: -.7px; }
.confirmation-heading p { color: var(--ink-soft); font-size: 1rem; line-height: 1.65; margin: 0; }
.unconfirmed-brief { margin: 28px 0; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.unconfirmed-brief p { font-size: 1.0625rem; line-height: 1.7; color: var(--ink-soft); margin: 0 0 12px; }
.unconfirmed-brief p:last-child { margin: 0; }
.confirmed-choices { margin: 24px 0 12px; }
.confirmed-choices > div { display: grid; grid-template-columns: minmax(110px,.85fr) minmax(0,1.2fr); gap: 18px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.confirmed-choices dt { font-size: 1rem; color: var(--ink-soft); }
.confirmed-choices dd { margin: 0; font-size: 1rem; overflow-wrap: anywhere; }
.project-confirmation .disclose { font-size: 1rem; margin: 18px 0 25px; }
.project-editor-actions { display: grid; gap: 12px; }
.project-editor-actions button { width: 100%; min-height: 53px; white-space: normal; font-size: 1.0625rem; }
.project-action-note { margin: 14px 0 0; color: var(--ink-soft); font-size: 1rem; line-height: 1.7; }
.project-build-boundary { margin: 30px 0 0; border-top: 1px solid var(--line); padding-top: 24px; }
.project-build-boundary strong { font-size: 1.125rem; }
.project-build-boundary p { color: var(--ink-soft); font-size: 1rem; line-height: 1.7; margin: 9px 0 20px; }
.project-build-boundary details p { font-size: 1rem; }
.project-secondary { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,.85fr); gap: 44px; border-top: 1px solid var(--line); margin-top: 44px; padding-top: 34px; }
.project-history h2 { font-size: 1.75rem; margin: 0 0 12px; }
.project-history > p { font-size: 1rem; color: var(--ink-soft); }
.project-history label { display: block; font-size: 1rem; margin: 22px 0 10px; }
.project-history select { width: 100%; font: 1rem/1.5 var(--sans); padding: 13px; color: var(--ink); background: var(--paper); border: 1px solid var(--line-bright); border-radius: 7px; min-height: 50px; }
.revision-changes { margin-top: 22px; font-size: 1rem; }
.revision-changes p { margin-bottom: 9px; color: var(--ink-soft); }
.revision-changes ul { margin: 0; padding-left: 20px; }
.revision-changes li { padding: 5px 0; }
.project-learning { min-width: 0; }
.project-learning-intro { display: flex; align-items: start; gap: 15px; margin: 0 0 23px; }
.project-learning-intro > span { color: var(--copper); font-size: 2.3125rem; line-height: 1; }
.project-learning-intro h2 { font-size: 1.75rem; line-height: 1.18; letter-spacing: -.7px; margin-bottom: 13px; }
.project-learning-intro p { font-size: 1rem; line-height: 1.65; color: var(--ink-soft); margin: 0; }
#sensor-exercise { background: var(--panel-2); padding: 25px; border-radius: 12px; }
#sensor-exercise > h3 { font-size: 1.5rem; line-height: 1.25; margin-bottom: 14px; }
#sensor-exercise p { font-size: 1rem; line-height: 1.7; color: var(--ink-soft); }
.exercise-reflection { font-size: 1rem; display: block; font-weight: 600; margin: 24px 0; line-height: 1.65; }
.exercise-reflection textarea { resize: vertical; display: block; width: 100%; min-height: 90px; padding: 12px; font: inherit; font-weight: 400; color: var(--ink); border: 1px solid var(--line-bright); background: var(--paper); border-radius: 7px; margin-top: 10px; }
.exercise-reflection > span { display: block; font-size: 1rem; font-weight: 400; color: var(--ink-soft); margin-top: 6px; }
#sensor-choice-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
#sensor-choice-form legend { font-size: 1.125rem; font-weight: 600; margin-bottom: 12px; }
.exercise-option { display: flex; align-items: start; gap: 11px; padding: 15px 0; border-top: 1px solid var(--line); cursor: pointer; font-size: 1rem; line-height: 1.6; }
.exercise-option input { margin-top: 4px; }
#sensor-choice-form button { margin-top: 15px; min-height: 48px; }
.exercise-limit { font-size: 1rem !important; margin-top: 17px; }
.exercise-feedback { border-top: 3px solid var(--copper); padding-top: 18px; margin-top: 24px; }
.exercise-feedback.exercise-resolved { border-color: var(--pass); }
.exercise-feedback h4 { font-size: 1.4375rem; line-height: 1.3; margin-bottom: 12px; }
.exercise-feedback details { font-size: 1rem; overflow-wrap: anywhere; }
.exercise-feedback summary { cursor: pointer; }
.exercise-checks { display: flex; gap: 25px; padding: 13px 0; }
.exercise-checks dt { font-size: 1rem; color: var(--ink-soft); }
.exercise-checks dd { font-size: 1.0625rem; font-weight: 600; margin: 3px 0 0; }
.family-workbench:focus-visible, .project-secondary :focus-visible, .saved-projects :focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.family-workbench button:disabled { opacity: .55; }
.download-row a:first-child { background: var(--accent); color: white; border-color: var(--accent); }
.choices-checked { margin-bottom: 24px; }
.choices-checked > p { color: var(--ink-soft); max-width: 70ch; font-size: 1.0625rem; }
.requirement-result { border-top: 1px solid var(--line); padding: 17px 0; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 7px 22px; }
.requirement-result h3 { font-size: 1.1875rem; margin: 0; }
.requirement-result p { grid-column: 1; font-size: 1rem; line-height: 1.65; color: var(--ink-soft); margin: 0; }
.requirement-result .badge { grid-column: 2; grid-row: 1; align-self: start; }
.requirement-result small { grid-column: 1; color: var(--ink-soft); font-size: 1rem; }
.requirement-assumptions { border-top: 1px solid var(--line); margin-top: 8px; }
.requirement-assumptions > summary { cursor: pointer; padding: 16px 0; font-size: 1.125rem; font-weight: 600; }
.requirement-assumptions > summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
@media (max-width: 1180px) {
  .family-option { grid-template-columns: 17px minmax(0,1fr); padding: 20px 10px; gap: 10px; }
  .family-option svg { display: none; }
  .family-option strong { font-size: 1.4375rem; }
  .project-edit-layout, .project-secondary { gap: 28px; }
  .project-editor { padding: 25px; }
}
@media (max-width: 900px) {
  .project-edit-layout, .project-secondary { grid-template-columns: minmax(0,1fr); }
  .project-confirmation { padding-top: 12px; }
  .family-option strong { font-size: 1.375rem; }
  .confirmed-choices > div { grid-template-columns: minmax(0,1fr) minmax(0,1.5fr); }
  .project-editor-actions { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .saved-project-shelf { grid-template-columns: 1fr; gap: 15px; }
  .project-editor-heading h2 { font-size: 1.875rem; }
  .family-picker { grid-template-columns: 1fr; gap: 4px; padding-bottom: 20px; }
  .family-option { grid-template-columns: 18px 34px minmax(0,1fr); min-height: 88px; padding: 16px 12px; }
  .family-option svg { display: block; }
  .family-option small { margin-top: 5px; }
  .project-editor { padding: 24px 18px; border-radius: 12px; }
  .project-choice legend { font-size: 1.5rem; }
  .project-editor-actions { grid-template-columns: 1fr; }
  .project-circuit-strip i { width: 14px; }
  .project-circuit-strip > span { font-size: 1.1875rem; }
  .project-circuit-strip small { font-size: 1rem; }
  .sensor-slot .sensor-address { display: block; }
  .sensor-address select { width: 100%; margin-top: 8px; }
  .confirmation-heading h2 { font-size: 1.6875rem; }
  .confirmed-choices > div { grid-template-columns: 1fr; gap: 4px; }
  .project-secondary { gap: 35px; }
  #sensor-exercise { padding: 23px 18px; }
}

/* Free-text request: offered only when the server has a model provider. */
.free-text-starter{margin-top:18px;padding-top:18px;border-top:1px solid var(--line,rgba(0,0,0,.12));display:flex;flex-direction:column;gap:10px}
.free-text-label{font-weight:600;font-size:1rem}
#free-text-request{width:100%;box-sizing:border-box;resize:vertical;min-height:76px;padding:10px 12px;border-radius:10px;border:1px solid var(--line,rgba(0,0,0,.18));font:inherit;line-height:1.45;background:var(--surface,var(--panel-2));color:inherit}
#free-text-request:focus-visible{outline:2px solid var(--accent,#2159e8);outline-offset:1px}
.free-text-actions{display:flex;flex-wrap:wrap;align-items:center;gap:12px}
.free-text-problem{color:var(--danger,var(--ink-soft));font-size:1rem}

/* Transient plot: an oscilloscope trace of the simulated power-on. */
.scope{margin:14px 0 6px}
.scope-svg{width:100%;height:auto;display:block}
.scope-face{fill:var(--surface-sunken,rgba(0,0,0,.03));stroke:var(--line,rgba(0,0,0,.12))}
.scope-grid{stroke:var(--line,rgba(0,0,0,.12));stroke-width:1;stroke-dasharray:2 4}
.scope-tick{fill:var(--muted,#5a5f6a);font-size: 1rem;font-family:inherit}
.scope-trace{stroke-width:2;stroke-linejoin:round;stroke-linecap:round}
.scope-legend{display:flex;flex-wrap:wrap;gap:12px;margin-top:8px;font-size:1rem}
.scope-key{display:inline-flex;align-items:center;gap:6px}
.scope-key i{width:12px;height:3px;border-radius:2px;display:inline-block}

/* The showcase is one inspectable object; its detail comes from the PCB. */
.reference-stats { margin: 9px 22px 0; color: #b5cfca; font: 1rem/1.6 var(--mono); }
.reference-evidence { margin: 0 22px 20px; color: #b5cfca; font-size: 1rem; }
.reference-evidence summary { cursor: pointer; }
.reference-evidence dl > div { display: flex; gap: 16px; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #38554f; }
.reference-evidence dd { text-align: right; margin: 0; }
.reference-evidence p { line-height: 1.65; margin: 12px 0; }
.customize-reference { margin: 5px 0 20px 32px; gap: 24px; }
.customize-reference span { margin-left: 18px; }
.part-facts { display: grid; gap: 9px; margin: 18px 0; font-size: 1rem; }
.part-facts > div { display: grid; grid-template-columns: 66px minmax(0, 1fr); gap: 10px; }
.part-facts dt { color: var(--ink-soft); }
.part-facts dd { margin: 0; overflow-wrap: anywhere; font-family: var(--mono); }
.net-inspector button small { display: block; margin-top: 6px; font: 1rem/1.3 var(--mono); opacity: .8; }
.connection-peers h6 { font: 1rem/1.5 var(--mono); margin: 16px 0 6px; }
.connection-peers button { display: block; text-align: left; width: 100%; line-height: 1.5; margin: 5px 0; }
.connection-peers button span { font-family: var(--sans, sans-serif); margin-left: 6px; }
.lab-component-index { margin-top: 22px; font-size: 1rem; line-height: 1.6; }
.lab-component-index summary { cursor: pointer; font-weight: 550; }
.lab-component-index .lesson-parts { margin-top: 12px; }
.board-dimensions { display: flex; flex-wrap: wrap; gap: 16px; }
.board-dimensions label { flex: 1 1 120px; }
.board-dimensions input { width: 100%; margin-top: 8px; padding: 10px; border: 1px solid #9db7bd; border-radius: 6px; font: inherit; }
@media (max-width: 600px) {
  .reference-stats { margin-left: 16px; margin-right: 16px; font-size: 1rem; }
  .customize-reference { margin-left: 0; width: 100%; }
}

/* Conversational entry keeps examples editable and usable on narrow screens. */
.prompt-examples { display: flex; flex-wrap: wrap; gap: .5rem; margin: .75rem 0; }
.prompt-examples button { min-height: 44px; white-space: normal; text-align: left; }
.project-starter > .free-text-starter { border-top: 0; padding-top: 0; margin-top: 0; margin-bottom: 1.5rem; }
#ai-entry-status { color: var(--muted, #a9bdce); margin-bottom: 1.5rem; }

#guided-entry > summary { cursor: pointer; min-height: 44px; padding: .65rem 0; font-weight: 600; }
#guided-entry[open] > summary { margin-bottom: 1rem; }

/* The review keeps the user's words adjacent to proposed choices. */
#conversation { max-width: 980px; margin: 0 auto; }
#conversation-plan section { padding: 1.25rem; margin: 1rem 0; border: 1px solid var(--line, #29465d); border-radius: 12px; background: #0b1928; }
.conversation-message { white-space: pre-wrap; overflow-wrap: anywhere; }
.plan-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem 2rem; }
.plan-choices dt { color: #9ab5c9; font-size: .9rem; }
.plan-choices dd { margin: .25rem 0; overflow-wrap: anywhere; }
#conversation-reply-form label { display: block; font-weight: 600; margin: 1rem 0 .5rem; }
#conversation-reply { width: 100%; padding: .8rem; font: inherit; color: inherit; background: #091523; border: 1px solid #45617a; border-radius: 8px; }
.conversation-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin: 1.5rem 0; }
#conversation-error { padding: 1rem; border: 1px solid #d79273; margin: 1rem 0; }
@media (max-width: 600px) { .plan-choices { grid-template-columns: 1fr; } }

.brief-stage:has(#conversation:not([hidden])) .workspace-art { display: none; }
#conversation-questions { margin-top: 1rem; }

.project-assistant { padding: 1.5rem; margin-bottom: 2rem; background: #0b1928; border: 1px solid #29465d; border-radius: 12px; }
.project-assistant h2 { margin-top: 0; font-size: clamp(1.25rem, 2vw, 1.65rem); }
.project-assistant p { max-width: 75ch; }
.project-assistant label { display: block; margin: 1rem 0 .5rem; font-weight: 600; }
#assistant-message { display: block; box-sizing: border-box; width: 100%; padding: .85rem; font: inherit; color: inherit; background: #091523; border: 1px solid #45617a; border-radius: 8px; }
.assistant-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: .8rem 0; }
.assistant-diff > div, .assistant-facts > div { padding: .8rem 0; border-bottom: 1px solid #29465d; overflow-wrap: anywhere; }
.assistant-diff dd, .assistant-facts dd { margin: .35rem 0; }
.assistant-diff span, .assistant-diff strong, .assistant-facts small { display: block; }
.assistant-diff span, .assistant-facts small { color: #9ab5c9; }
#assistant-error { color: #ffbfab; }
.project-assistant summary { cursor: pointer; padding: .65rem 0; }
#conversation details summary { cursor: pointer; padding: .5rem 0; }
