/* Rev 08 advanced tabs. Builds on the workbench tokens (base.css / style.css); dark single-theme like the workbench.
   Layout: rail | stage | datasheet, a timeline strip under the stage; collapses to one scrolling column under 960px. */
:root {
  --holo: #6be1ed;
  --holo-hot: #e8fdff;
  --amber-hot: #f3c98a;
  --panel-glass: #07121bd9;
  --s1: #2ea3b5; --s2: #c08635; --s3: #8a63d6; --s4: #3f9a58;   /* validated chart series (dark surface) */
  --good: #5fbf7a; --warn: #e3b04b; --crit: #e0675a;
  color-scheme: dark;
}
.adv-panel { height: 100%; overflow: hidden; }
.adv-panel .eyebrow { font: var(--text-xs) var(--font-mono); letter-spacing: 1.5px; color: var(--accent); }
.adv-viewport { position: relative; flex: 1; min-height: 0; overflow: hidden; background: radial-gradient(ellipse at 50% 60%, #0d2632 0%, #07121b 70%); outline: none; touch-action: none; }
.adv-viewport canvas { display: block; width: 100% !important; height: 100% !important; }
.adv-loading { position: absolute; inset: 0; display: grid; place-items: center; font: var(--text-xs) var(--font-mono); letter-spacing: 2px; color: var(--accent); z-index: 4; pointer-events: none; }
.adv-hint { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); font: 11px var(--font-mono); color: var(--muted); letter-spacing: 1px; pointer-events: none; white-space: nowrap; z-index: 3; }
.seg { display: inline-flex; border: 1px solid var(--line); }
.seg button { background: #091923; padding: 6px 10px; font: var(--text-xs) var(--font-mono); color: var(--muted); min-height: 32px; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.active { color: var(--accent); background: #163541; }
.tl-btn { min-height: 32px; padding: 6px 12px; font: var(--text-xs) var(--font-mono); background: #6be1ed07; border: 1px solid var(--line); color: var(--muted); }
.tl-btn:hover { color: var(--accent); border-color: #6be1ed60; }
.tl-btn.primary { color: var(--accent); border-color: #6be1ed70; background: #6be1ed14; }
.tl-sel, .tl-chk { display: inline-flex; align-items: center; gap: 8px; font: var(--text-xs) var(--font-mono); color: var(--muted); }
.tl-sel select { background: #091923; color: var(--text); border: 1px solid var(--line); padding: 4px; }
input[type=range] { accent-color: var(--accent); }
.tl-chk input { accent-color: var(--accent); }

/* ---------- 05 sequence */
.seq-layout { height: 100%; display: grid; grid-template-columns: 300px minmax(0, 1fr); }
.seq-rail { background: var(--surface); border-right: 1px solid var(--line); padding: var(--space-6) var(--space-5); overflow-y: auto; display: flex; flex-direction: column; gap: var(--space-4); scrollbar-width: thin; }
.seq-rail h2 { font-size: var(--text-lg); font-weight: 500; line-height: 1.25; text-wrap: balance; }
.seq-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.seq-steps button { width: 100%; text-align: left; display: grid; grid-template-columns: 54px 1fr; gap: 8px; align-items: baseline; padding: 7px 8px; background: none; border-left: 2px solid transparent; color: var(--muted); }
.seq-steps button span { font: 11px var(--font-mono); letter-spacing: 1px; }
.seq-steps button strong { font-weight: 500; font-size: var(--text-sm); }
.seq-steps button small { grid-column: 2; font-size: var(--text-xs); line-height: 1.45; color: var(--muted); display: none; }
.seq-steps button.done { color: #9fc5cf; }
.seq-steps button.active { color: var(--text); border-left-color: var(--accent); background: #6be1ed0c; }
.seq-steps button.active span { color: var(--accent); }
.seq-steps button.active small { display: block; }
.seq-telemetry { margin-top: auto; border-top: 1px solid var(--line); padding-top: var(--space-4); display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; font-variant-numeric: tabular-nums; }
.seq-telemetry div { display: flex; flex-direction: column; gap: 2px; }
.seq-telemetry small { font: 10px var(--font-mono); letter-spacing: 1px; color: var(--muted); }
.seq-telemetry b { font: 500 var(--text-sm) var(--font-mono); color: var(--accent); }
.seq-telemetry b.hot { color: var(--amber); }
.seq-stage { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.seq-timeline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 10px var(--space-5); border-top: 1px solid var(--line); background: #081821; }
#seq-scrub { flex: 1; min-width: 160px; }
.tl-time { font: var(--text-xs) var(--font-mono); color: var(--accent); font-variant-numeric: tabular-nums; min-width: 104px; }
.holo .hud-corner { position: absolute; width: 26px; height: 26px; border: 1px solid var(--holo); opacity: .55; z-index: 3; pointer-events: none; }
.hud-corner.tl { top: 14px; left: 14px; border-right: 0; border-bottom: 0; }
.hud-corner.tr { top: 14px; right: 14px; border-left: 0; border-bottom: 0; }
.hud-corner.bl { bottom: 14px; left: 14px; border-right: 0; border-top: 0; }
.hud-corner.br { bottom: 14px; right: 14px; border-left: 0; border-top: 0; }
.hud-top { position: absolute; top: 22px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 3px; z-index: 3; pointer-events: none; text-align: center; }
.hud-top span { font: 11px var(--font-mono); letter-spacing: 2px; color: var(--accent); }
.hud-top strong { font: 500 var(--text-lg) var(--font-body); letter-spacing: 3px; text-transform: uppercase; color: var(--holo-hot); text-shadow: 0 0 18px #6be1ed90; }
.hud-top #seq-step-sub { color: var(--muted); letter-spacing: 1px; }
.hud-scan { position: absolute; inset: 0; pointer-events: none; z-index: 2; background: repeating-linear-gradient(0deg, transparent 0 3px, #6be1ed06 3px 4px); }
.hud-leaders { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; }
.hud-leaders line { stroke: var(--holo); stroke-width: 1; opacity: .7; }
.hud-leaders circle { fill: var(--holo); }
.hud-callouts { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.callout-tag { position: absolute; transform: translate(-50%, -100%); padding: 5px 8px; background: var(--panel-glass); border: 1px solid #6be1ed55; border-left: 2px solid var(--holo); font: 11px/1.35 var(--font-mono); color: var(--holo-hot); white-space: nowrap; transition: opacity .3s; }
.callout-tag small { display: block; color: var(--muted); font-size: 10px; }
.callout-tag.amber { border-left-color: var(--amber); }
.adv-viewport:not(.holo) .hud-scan { display: none; }

/* ---------- 06 advanced */
.adv-layout { height: 100%; display: grid; grid-template-columns: 290px minmax(0, 1fr) 360px; }
#adv-count { white-space: nowrap; }
.adv-tree-rail .section-title { gap: 8px; margin-bottom: 0; }
.adv-tree-rail { background: var(--surface); border-right: 1px solid var(--line); padding: var(--space-5) var(--space-4); display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.adv-tree-rail input, .adv-tree-rail select { width: 100%; background: #091923; border: 1px solid var(--line); color: var(--text); padding: 8px; font-size: var(--text-sm); }
.adv-tree { flex: 1; overflow-y: auto; scrollbar-width: thin; font-size: var(--text-sm); }
.adv-tree details { border-bottom: 1px solid var(--line); }
.adv-tree summary { cursor: pointer; padding: 7px 4px; display: grid; grid-template-columns: 12px minmax(0, 1fr) auto auto; align-items: center; gap: 6px; font: 500 var(--text-xs) var(--font-mono); letter-spacing: .5px; color: var(--text); list-style: none; }
.adv-tree summary::-webkit-details-marker { display: none; }
.adv-tree summary::before { content: '▸'; color: var(--accent-dim); }
.adv-tree details[open] > summary::before { content: '▾'; }
.adv-tree summary .nm { min-width: 0; }
.adv-tree summary em { font-style: normal; color: var(--muted); white-space: nowrap; }
.adv-tree details details summary { padding-left: 14px; grid-template-columns: 12px minmax(0, 1fr) auto; color: #a8c6cf; font-weight: 400; }
.adv-tree .p { display: grid; grid-template-columns: 1fr auto; gap: 6px; width: 100%; text-align: left; background: none; padding: 5px 4px 5px 30px; color: var(--muted); font-size: var(--text-xs); line-height: 1.35; }
.adv-tree .p b { font: 10px var(--font-mono); color: var(--accent-dim); display: block; font-weight: 400; }
.adv-tree .p:hover, .adv-tree .p.sel { color: var(--text); background: #6be1ed10; }
.adv-tree .p.sel b { color: var(--accent); }
.adv-tree .p i { font: 10px var(--font-mono); color: var(--muted); font-style: normal; align-self: center; }
.adv-tree .sysvis { accent-color: var(--accent); margin: 0; flex: none; }
.adv-center { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.adv-toolbar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; padding: 10px var(--space-4); border-bottom: 1px solid var(--line); background: #081821; }
#adv-config-label { color: var(--accent); min-width: 62px; }
.adv-doc { flex: 1; overflow: auto; padding: var(--space-5); scrollbar-width: thin; }
.bom-table { border-collapse: collapse; width: 100%; font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
.bom-table th { position: sticky; top: 0; background: #0b1c26; text-align: left; font: 500 10px var(--font-mono); letter-spacing: 1px; color: var(--muted); padding: 8px 6px; cursor: pointer; border-bottom: 1px solid var(--line); white-space: nowrap; }
.bom-table th.sorted { color: var(--accent); }
.bom-table td { padding: 6px; border-bottom: 1px solid #b0e4ed12; color: #b9d3da; vertical-align: top; }
.bom-table td.num { text-align: right; }
.bom-table td.pn { font-family: var(--font-mono); color: var(--accent); white-space: nowrap; }
.bom-table tr:hover td { background: #6be1ed0b; cursor: pointer; }
.bom-summary { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-bottom: var(--space-4); font: var(--text-xs) var(--font-mono); color: var(--muted); }
.bom-summary b { color: var(--text); font-weight: 500; }
.adv-sheet { background: var(--surface); border-left: 1px solid var(--line); padding: var(--space-5); overflow-y: auto; scrollbar-width: thin; display: flex; flex-direction: column; gap: var(--space-4); }
.sheet-empty h3, .adv-sheet h3 { font-size: var(--text-lg); font-weight: 500; margin: 6px 0; text-wrap: balance; }
.sheet-empty p, .adv-sheet p { color: var(--muted); line-height: 1.55; font-size: var(--text-sm); }
.sheet-pn { font: 500 var(--text-sm) var(--font-mono); color: var(--accent); letter-spacing: 1px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: 10px var(--font-mono); letter-spacing: .5px; padding: 3px 7px; border: 1px solid var(--line); color: var(--muted); }
.chip.crit { color: var(--crit); border-color: #e0675a66; }
.chip.safe { color: var(--warn); border-color: #e3b04b66; }
.chip.buy { color: #a7b8ff; border-color: #a7b8ff44; }
.kv { display: grid; grid-template-columns: 112px 1fr; gap: 6px 10px; font-size: var(--text-xs); }
.kv dt { font: 10px var(--font-mono); letter-spacing: 1px; color: var(--muted); padding-top: 2px; }
.kv dd { margin: 0; color: var(--text); line-height: 1.45; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.drawing { border: 1px solid #6be1ed30; background: #061019; }
.drawing svg { width: 100%; height: auto; display: block; }
.sheet-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sheet-actions a, .sheet-actions button { font: var(--text-xs) var(--font-mono); padding: 7px 10px; border: 1px solid #6be1ed50; color: var(--accent); background: #6be1ed0c; text-decoration: none; }
.sheet-note { font-size: 11px; color: var(--muted); line-height: 1.5; border-top: 1px solid var(--line); padding-top: 10px; }
.mass-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--space-6); }
.mass-bars { display: flex; flex-direction: column; gap: 6px; }
.mass-row { display: grid; grid-template-columns: 190px 1fr 74px; gap: 10px; align-items: center; font-size: var(--text-xs); }
.mass-row .bar { height: 12px; background: #6be1ed0d; position: relative; }
.mass-row .bar i { position: absolute; inset: 0 auto 0 0; background: var(--s1); border-radius: 0 4px 4px 0; }
.mass-row b { font: 500 var(--text-xs) var(--font-mono); text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- 07 flight */
.flight-doc { overflow-y: auto; scrollbar-width: thin; }
.flight-wrap { padding: var(--space-6) var(--space-8); display: flex; flex-direction: column; gap: var(--space-5); }
.flight-head h2 { font-size: var(--text-xl); font-weight: 500; margin: 6px 0 8px; }
.flight-head p { color: var(--muted); max-width: 78ch; line-height: 1.6; }
.flight-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: var(--space-6); align-items: start; }
.flight-inputs { position: sticky; top: 0; display: flex; flex-direction: column; gap: 12px; padding: var(--space-4); border: 1px solid var(--line); background: var(--surface); }
.flight-inputs h4 { font: 500 10px var(--font-mono); letter-spacing: 1.5px; color: var(--accent); margin: 6px 0 0; }
.fin { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; font-size: var(--text-xs); color: var(--muted); }
.fin output { font: 500 var(--text-xs) var(--font-mono); color: var(--text); font-variant-numeric: tabular-nums; }
.fin input { grid-column: 1 / -1; width: 100%; }
.flight-out { display: flex; flex-direction: column; gap: var(--space-5); min-width: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.kpi { background: var(--surface); padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.kpi small { font: 10px var(--font-mono); letter-spacing: 1px; color: var(--muted); }
.kpi b { font: 500 var(--text-lg) var(--font-mono); color: var(--text); font-variant-numeric: tabular-nums; }
.kpi span { font-size: 11px; color: var(--muted); }
.kpi.ok b::after, .kpi.bad b::after, .kpi.mid b::after { font-size: 10px; margin-left: 6px; letter-spacing: 1px; vertical-align: middle; }
.kpi.ok b::after { content: '● WITHIN'; color: var(--good); }
.kpi.mid b::after { content: '▲ MARGINAL'; color: var(--warn); }
.kpi.bad b::after { content: '■ EXCEEDS'; color: var(--crit); }
.charts { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: var(--space-5); }
.chart-card { border: 1px solid var(--line); background: var(--surface); padding: 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; position: relative; }
.chart-card h4 { font-size: var(--text-sm); font-weight: 500; margin: 0; }
.chart-card .ref { font: 10px var(--font-mono); color: var(--accent-dim); letter-spacing: .5px; }
.chart-card p { font-size: var(--text-xs); color: var(--muted); line-height: 1.5; margin: 0; }
.chart-card svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-card svg text { fill: var(--muted); font: 10px var(--font-mono); }
.chart-card svg .ttl { fill: var(--text); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11px; color: var(--muted); }
.legend i { display: inline-block; width: 14px; height: 2px; vertical-align: middle; margin-right: 6px; }
.chart-tip { position: absolute; pointer-events: none; background: #050d14f2; border: 1px solid #6be1ed40; padding: 6px 8px; font: 11px/1.45 var(--font-mono); color: var(--text); z-index: 5; white-space: nowrap; font-variant-numeric: tabular-nums; }
.flight-notes { border: 1px solid var(--line); padding: var(--space-5); background: var(--surface); display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-5); }
.flight-notes h4 { font: 500 var(--text-sm) var(--font-body); margin: 0 0 6px; }
.flight-notes p, .flight-notes li { color: var(--muted); font-size: var(--text-xs); line-height: 1.6; }
.flight-notes ul { margin: 0; padding-left: 18px; }
.alloc { border-collapse: collapse; font: 11px var(--font-mono); font-variant-numeric: tabular-nums; }
.alloc td, .alloc th { border: 1px solid var(--line); padding: 4px 8px; text-align: right; color: var(--text); }
.alloc th { color: var(--muted); font-weight: 400; }

@media (max-width: 1280px) { .adv-layout { grid-template-columns: 250px minmax(0, 1fr) 320px; } }
@media (max-width: 960px) {
  .adv-panel { height: auto; overflow: visible; }
  main:has(.adv-panel:not([hidden])) { height: auto; overflow: visible; }
  body:has(.adv-panel:not([hidden])) { overflow: auto; height: auto; }
  .seq-layout, .adv-layout, .flight-grid, .mass-grid { grid-template-columns: 1fr; height: auto; }
  .adv-viewport { min-height: 58vh; flex: none; height: 58vh; }
  .adv-tree { max-height: 40vh; }
  .seq-rail { order: 2; }
  .seq-steps button small { display: none !important; }
  .flight-wrap { padding: var(--space-5) max(16px, env(safe-area-inset-right, 0px)) var(--space-5) max(16px, env(safe-area-inset-left, 0px)); }
  .flight-inputs { position: static; }
  .charts { grid-template-columns: 1fr; }
  .mass-row { grid-template-columns: 120px 1fr 64px; }
}

@media (max-width: 1500px) { .mainnav .tabs { gap: var(--space-5); } .mainnav .nav-meta { display: none; } }
@media (max-width: 1240px) { .mainnav .tabs { gap: var(--space-3); } .mainnav .tabs button span { margin-left: 4px; } }

/* ---------- region explorer (tabs 05 / 06) */
.region-chips { position: absolute; left: 16px; right: 16px; bottom: 12px; z-index: 5; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; pointer-events: none; }
.region-chips span { font: 10px var(--font-mono); letter-spacing: 1.5px; color: var(--accent); margin-right: 4px; }
.region-chips button { pointer-events: auto; font: 11px var(--font-mono); padding: 5px 8px; min-height: 28px; color: var(--muted); background: #07121bcc; border: 1px solid var(--line); }
.region-chips button:hover { color: var(--accent); border-color: #6be1ed60; }
.region-chips button.active { color: #08131b; background: var(--amber); border-color: var(--amber); }
.adv-viewport .adv-hint { bottom: auto; top: 10px; }
.region-back { position: absolute; top: 16px; left: 16px; z-index: 6; font: var(--text-xs) var(--font-mono); padding: 8px 12px; color: var(--amber); background: #07121be6; border: 1px solid #edbd7880; }
.region-brief { position: absolute; top: 16px; right: 16px; bottom: 56px; width: min(300px, calc(100% - 32px)); z-index: 6; overflow-y: auto; scrollbar-width: thin;
  background: #06111ae8; border: 1px solid #6be1ed40; border-top: 2px solid var(--amber); padding: 16px; display: flex; flex-direction: column; gap: 10px; backdrop-filter: blur(6px); }
.region-brief h3 { font-size: var(--text-lg); font-weight: 500; text-wrap: balance; }
.region-brief .rb-phase { font: 11px var(--font-mono); letter-spacing: 1.5px; color: var(--amber); }
.region-brief .rb-now { color: var(--text); font-size: var(--text-sm); line-height: 1.55; }
.region-brief .kv { grid-template-columns: 120px 1fr; }
.region-brief .rb-sum { font: 11px var(--font-mono); color: var(--muted); border-top: 1px solid var(--line); padding-top: 8px; }
.region-brief .rb-groups details { border-bottom: 1px solid #b0e4ed14; }
.region-brief .rb-groups summary { cursor: pointer; font-size: var(--text-xs); color: #b9d3da; padding: 5px 0; }
.region-brief .rb-groups summary em { font-style: normal; color: var(--muted); font-family: var(--font-mono); }
.region-brief .rb-groups button { display: block; width: 100%; text-align: left; background: none; color: var(--muted); font-size: 11px; padding: 3px 0 3px 10px; line-height: 1.4; }
.region-brief .rb-groups button:hover { color: var(--text); }
.region-brief .rb-groups button b { font: 10px var(--font-mono); color: var(--accent-dim); font-weight: 400; }
.region-brief .rb-hint { font-size: 11px; color: var(--muted); }
.region-tip { position: absolute; z-index: 7; pointer-events: none; font: 11px var(--font-mono); color: var(--amber-hot); background: #050d14ee; border: 1px solid #edbd7860; padding: 5px 8px; white-space: nowrap; }
.region-tag { border-left-color: var(--amber); transform: translate(-50%, -100%); }
.region-leaders line { stroke: var(--amber); }
.region-leaders circle { fill: var(--amber); }
@media (max-width: 960px) { .region-brief { top: auto; bottom: 56px; max-height: 45%; } }
.adv-viewport.focused .region-chips { right: 372px; }
@media (max-width: 960px) { .adv-viewport.focused .region-chips { display: none; } }
.adv-viewport.focused .adv-hint { display: none; }
.region-brief.in-sheet { position: static; width: auto; inset: auto; backdrop-filter: none; background: #0b1d27; flex: none; overflow: visible; margin: -4px -4px 4px; }
.adv-viewport.focused .region-chips { right: 16px; }
.seq-stage .adv-viewport.focused .region-chips { right: 332px; }

/* ---------- physics checks (tab 07) */
.kpis .checks { grid-column: 1 / -1; background: var(--surface); overflow-x: auto; }
.checks-table { border-collapse: collapse; width: 100%; font-size: var(--text-xs); }
.checks-table th { text-align: left; font: 500 10px var(--font-mono); letter-spacing: 1px; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.checks-table td { padding: 7px 10px; border-bottom: 1px solid #b0e4ed12; color: #b9d3da; vertical-align: top; line-height: 1.45; }
.checks-table td.num { font-family: var(--font-mono); color: var(--text); white-space: nowrap; }
.pill { font: 10px var(--font-mono); letter-spacing: .5px; padding: 2px 7px; border: 1px solid; white-space: nowrap; }
.pill.ok { color: var(--good); border-color: #5fbf7a66; }
.pill.mid { color: var(--warn); border-color: #e3b04b66; }
.pill.bad { color: var(--crit); border-color: #e0675a66; }

/* ---------- 08 miniature prototype */
.proto-top { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: var(--space-5); min-height: 0; }
.proto-stage { display: flex; flex-direction: column; border: 1px solid var(--line); min-width: 0; }
.proto-stage .adv-viewport { flex: none; height: min(62vh, 620px); min-height: 320px; }
.proto-steps { border: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; max-height: calc(min(62vh, 620px) + 54px); min-height: 0; }
.proto-step-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); font: var(--text-xs) var(--font-mono); color: var(--accent); letter-spacing: 1px; }
.proto-step-nav .tl-btn:disabled { opacity: .35; cursor: default; }
.proto-step-list { list-style: none; margin: 0; padding: 6px 0; display: flex; flex-direction: column; border-bottom: 1px solid var(--line); flex: none; max-height: 48%; overflow-y: auto; scrollbar-width: thin; }
.proto-step-list button { width: 100%; text-align: left; display: flex; gap: 10px; align-items: baseline; padding: 3px 12px; background: none; border-left: 2px solid transparent; color: var(--muted); font-size: var(--text-xs); min-height: 24px; }
.proto-step-list button span { font: 10px var(--font-mono); letter-spacing: 1px; }
.proto-step-list button.done { color: #9fc5cf; }
.proto-step-list button.active { color: var(--text); border-left-color: var(--accent); background: #6be1ed0c; }
.proto-step-list button.active span { color: var(--accent); }
.proto-step { padding: 12px 14px 16px; overflow-y: auto; scrollbar-width: thin; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.proto-step h3 { font-size: var(--text-base); font-weight: 500; margin: 0; }
.proto-step p, .proto-step li { color: var(--muted); font-size: var(--text-xs); line-height: 1.55; margin: 0; }
.proto-step ol { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.proto-step li::marker { color: var(--accent); font-family: var(--font-mono); }
.proto-check { border-left: 2px solid var(--good); padding-left: 10px; }
.proto-check b { color: var(--text); font-weight: 500; }
.proto-parts { display: flex; flex-direction: column; gap: 3px; border-top: 1px solid var(--line); padding-top: 8px; }
.proto-parts span { font-size: 11px; color: var(--muted); }
.proto-parts b { font: 500 11px var(--font-mono); color: var(--amber-hot); margin-right: 6px; }
.flight-inputs select { width: 100%; margin-top: 4px; background: #091923; color: var(--text); border: 1px solid var(--line); padding: 6px; font: var(--text-xs) var(--font-mono); min-height: 32px; }
.proto-table { overflow-x: auto; max-height: 460px; overflow-y: auto; scrollbar-width: thin; }
.proto-table .bom-table tr:hover td { cursor: default; }
.proto-table .bom-table tr.grp td { font: 500 10px var(--font-mono); letter-spacing: 1.5px; color: var(--accent); padding-top: 12px; background: none; }
.proto-table a, .chart-card p a { color: var(--accent); }
.wiring .wb rect { fill: #0b1d27; stroke: #6be1ed55; }
.wiring .wb.fc rect { stroke: var(--accent); }
.wiring .pw { stroke: #e0675a; stroke-width: 2.2; }
.wiring .lv { stroke: var(--s3); stroke-width: 1.6; }
.wiring .sg { stroke: var(--accent); stroke-width: 1.2; stroke-dasharray: 4 3; }
.wiring .ph { stroke: var(--s2); stroke-width: 2.6; }
@media (max-width: 960px) {
  .proto-top { grid-template-columns: 1fr; }
  .proto-stage .adv-viewport { height: 58vh; }
  .proto-steps { max-height: none; }
  .proto-step-list { max-height: 220px; }
}
.motor-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: var(--space-5); align-items: start; }
.motor-grid .spec th { text-align: left; white-space: nowrap; }
.motor-grid .spec td { text-align: left; }
.motor-card .charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--space-4); }
.motor-card .charts .chart-card { background: #08151e; }
.motor-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: var(--text-xs); color: var(--muted); line-height: 1.55; }
.motor-steps b { color: var(--text); font-weight: 500; }
.winding { width: 100%; max-width: 300px; height: auto; display: block; margin: 0 auto; }
.winding text { fill: var(--muted); font: 10px var(--font-mono); }
.winding text.ttl { fill: #06121a; font-weight: 600; }
.winding .mn { fill: #c8303f; opacity: .8; } .winding .ms { fill: #3a6ea8; opacity: .8; }
.winding .hub { fill: #0b1d27; stroke: #6be1ed55; }
@media (max-width: 960px) { .motor-grid { grid-template-columns: 1fr; } }

.project-title .jd-back { color: var(--accent); text-decoration: none; margin-right: 18px; }
.project-title .jd-back:hover { text-decoration: underline; }
