@font-face {
  font-family: 'Instrument Sans'; src: url('/assets/type/instrument-sans-latin-variable.woff2') format('woff2');
  font-weight: 400 700; font-style: normal; font-display: swap;
}
:root {
  color-scheme: dark;
  --bg: #0d1423; --rail: #0b111e; --surface: #121d2e; --raised: #1a273c; --user: #20304b;
  --border: #304057; --subtle: #263449; --text: #eff4ff; --muted: #b1bfd4; --faint: #95a6be;
  --accent: #a1b6ff; --active: #233453; --button: #acc0ff; --on-button: #142344;
  --danger: #ff9ca7; --success: #78dfbc; --warning: #f5c681;
  --fig: #0c1525; --fig-text: #f1f5ff; --fig-muted: #b2c3de;
  --edge: var(--border); --fg: var(--text); --panel: var(--surface); --card: var(--raised); --warn: var(--warning);
  --mono: ui-monospace, 'SFMono-Regular', Consolas, monospace; --ease: cubic-bezier(.2,.72,.2,1);
  --rail-width: clamp(184px,13vw,224px); --gutter: clamp(20px,2.15vw,44px);
  font: 100%/1.45 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', sans-serif;
}
:root[data-theme='light'] {
  color-scheme: light;
  --bg: #f2f5fa; --rail: #f9fbfe; --surface: #fcfdff; --raised: #eaf0f8; --user: #e7edfa;
  --border: #bac8da; --subtle: #d4deea; --text: #13243a; --muted: #465972; --faint: #52657d;
  --accent: #344f9c; --active: #e0e8fb; --button: #3656a7; --on-button: #fff;
  --danger: #a63449; --success: #156d54; --warning: #815716;
}
*, *::before, *::after {box-sizing: border-box}
[hidden] {display:none !important}
body {margin:0; background:var(--bg); color:var(--text)}
button, input, textarea, select {font:inherit}
button {color:inherit; border:0; background:none; cursor:pointer; padding:0; -webkit-tap-highlight-color:transparent}
button, summary {touch-action:manipulation}
button:disabled {opacity:.42; cursor:default}
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, canvas:focus-visible, textarea:focus-visible {
  outline:2px solid var(--accent); outline-offset:3px;
}
button {transition:background-color .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease), transform .16s var(--ease)}
button:active:not(:disabled) {transform:translateY(1px)}
a {color:var(--accent)}
img, svg {display:block}
img {max-width:100%}
.ico {width:19px; height:19px; flex:none}
.sr-only {position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0}
.app {display:grid; grid-template-columns:var(--rail-width) minmax(0,1fr); min-height:100svh}
main {width:100%; min-width:0; max-width:1900px; margin:0 auto; padding:0 var(--gutter) 1rem}
.sidebar {height:100dvh; position:sticky; top:0; display:flex; flex-direction:column; gap:2rem; padding:1.25rem .8rem .75rem; background:var(--rail); border-right:1px solid var(--subtle); overflow:auto; scrollbar-width:thin}
.brand {display:flex; align-items:center; gap:.55rem; padding:.16rem .48rem; flex:none}
.brand strong {font-size:1.35rem; font-weight:650; letter-spacing:-.065em}
.brand img {width:35px; height:35px}
.nav-section {display:grid; gap:2px}
.nav-section+.nav-section {border-top:1px solid var(--subtle); margin-top:1.25rem; padding-top:1.25rem}
.nav-label {font-size:.75rem; font-weight:550; color:var(--faint); padding:0 .8rem .65rem}
.nav-item {position:relative; display:flex; align-items:center; gap:.8rem; min-height:40px; padding:0 .8rem; border-radius:6px; text-align:start; font-size:.9rem; color:var(--muted)}
.nav-item .ico {width:18px; height:18px}
.nav-item.active {color:var(--text); font-weight:600; background:var(--raised)}
.nav-item.secondary-active {color:var(--accent); background:var(--active); font-weight:600}
.nav-item.secondary-active::before {content:''; position:absolute; inset:10px auto 10px 0; width:2px; background:var(--accent); border-radius:2px}
.profile {display:flex; align-items:center; gap:.65rem; color:var(--muted); margin-top:auto; border-top:1px solid var(--subtle); padding:.95rem .45rem .15rem; text-align:start; font-size:.9rem}
.profile img {width:30px; height:30px; border-radius:50%}
.profile-name {min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.profile .ico {width:14px; height:14px; margin-left:auto}
.topbar {min-height:60px; display:flex; align-items:center; gap:.65rem; border-bottom:1px solid var(--subtle)}
.breadcrumb, .top-tools, .icon-button, #work-mode, .workspace-foot button, #open-report {display:flex; align-items:center}
.breadcrumb {gap:.8rem; min-width:0; font-size:.875rem; color:var(--muted)}
.breadcrumb>span:first-of-type {color:var(--faint); opacity:.62}
.breadcrumb a {min-height:40px; display:inline-flex; align-items:center; color:var(--faint)}
.breadcrumb a, a.nav-item, .top-tools a, .menu-grid a {text-decoration:none}
#crumb-title {overflow:hidden; white-space:nowrap; text-overflow:ellipsis}
.top-tools {margin-left:auto; flex:none; gap:.25rem}
.icon-button {width:40px; height:40px; justify-content:center; border-radius:7px; color:var(--muted)}
#work-mode {min-height:36px; padding:0 .85rem; margin-right:.65rem; gap:.48rem; border-radius:6px; color:var(--on-button); background:var(--button); font-size:.875rem; font-weight:650}
#work-mode .ico {width:16px; height:16px}
#mobile-menu, #agent-link {display:none}
.project {display:flex; align-items:center; justify-content:space-between; gap:1.6rem; padding:clamp(1.35rem,2vw,2.45rem) 0}
.project-name {min-width:0}
.project h1 {font-size:clamp(2rem,2.7vw,3.1rem); font-weight:560; letter-spacing:-.065em; line-height:1.06; margin:0; overflow-wrap:anywhere}
.project p {margin:.48rem 0 0; color:var(--muted); font-size:.9rem; letter-spacing:.003em}
.stepper {display:flex; align-items:center; list-style:none; margin:0; padding:0; gap:0; flex:none}
.stepper li {display:flex; align-items:center; min-width:0}
.stepper li:not(:last-child)::after {content:''; width:clamp(8px,1.05vw,22px); height:1px; background:var(--border); margin:0 .24rem}
.stepper li.done:not(:last-child)::after {background:color-mix(in srgb,var(--success) 60%,var(--border))}
.stepper li.current:not(:last-child)::after {background:linear-gradient(to right,var(--accent) var(--stage-fill,0%),var(--border) var(--stage-fill,0%))}
.step-label {display:flex; align-items:center; gap:.45rem; min-height:40px; padding:0 .15rem; color:var(--faint); font-size:.84rem; white-space:nowrap; border-radius:4px}
.step-badge {width:21px; height:21px; display:grid; place-items:center; font:500 .73rem var(--mono); border:1px solid var(--border); border-radius:50%}
.step-badge .ico {width:13px; height:13px}
.done .step-badge {color:var(--success); border-color:color-mix(in srgb,var(--success) 46%,var(--border))}
.current .step-label {color:var(--text); font-weight:650}
.current .step-badge {color:var(--on-button); background:var(--button); border-color:var(--button)}
.workspace {display:grid; grid-template-columns:minmax(0, 1fr) minmax(325px, .47fr); align-items:start; gap:clamp(14px,1.4vw,26px)}
.simulation {display:grid; min-width:0; gap:0}
.viewport {border:1px solid var(--border); border-radius:14px; background:var(--fig); display:flex; flex-direction:column; min-width:0; overflow:hidden; position:relative; container-type:inline-size}
.viewport-toolbar {background:var(--surface); display:flex; align-items:stretch; justify-content:space-between; gap:.4rem; padding:0 .85rem; min-height:49px; border-bottom:1px solid var(--border)}
.tabs {display:flex; align-items:stretch; min-width:0; gap:.66rem}
.tabs button {position:relative; display:grid; place-items:center; min-width:0; padding:0 .42rem; color:var(--muted); font-size:.875rem; font-weight:500; white-space:nowrap}
.tabs button.selected {color:var(--text); font-weight:650}
.tabs button.selected::after {content:''; position:absolute; inset:auto .4rem -1px; height:2px; background:var(--accent)}
.tabs button:focus-visible {outline-offset:-4px; border-radius:5px}
.view-controls {display:flex; flex:none; align-items:center}
.view-controls .icon-button {width:34px; height:34px}
.view-controls .ico {width:18px; height:18px}
.field-plane {color:var(--fig-text); position:relative; background:var(--fig); display:flex; flex-direction:column; min-height:0}
.field-caption {display:flex; align-items:center; justify-content:space-between; gap:.8rem; padding:1.05rem 1.35rem .35rem; position:relative; z-index:1; pointer-events:none}
#field-context {color:#b1c4f6; font:500 .73rem/1.3 var(--mono); letter-spacing:.075em; text-transform:uppercase}
.field-caption h2 {font-size:clamp(1.38rem,1.7vw,1.88rem); letter-spacing:-.045em; font-weight:540; margin:.16rem 0 0; line-height:1.14}
#viewport-info {max-width:44%; text-align:end; font-size:.76rem; color:var(--fig-muted)}
.viewport-body {position:relative; min-height:0; display:flex; align-items:stretch; flex:1}
#reference-view {min-width:0; width:100%; display:grid; place-items:center; padding:0 0 .6rem; align-self:center}
.guide-art {position:relative; width:100%; max-width:min(980px, max(610px, 87vh)); line-height:0; isolation:isolate}
#kit-view {display:block; width:100%; height:auto; aspect-ratio:785/391; object-fit:contain; mask-image:linear-gradient(to right,#000 96%,transparent),linear-gradient(to bottom,transparent,#000 5%,#000 94%,transparent); mask-composite:intersect}
.region-pin {position:absolute; transform:translate(-50%,-50%); width:44px; height:44px; display:grid; place-items:center; color:white; border-radius:50%; z-index:1}
.region-pin:active:not(:disabled) {transform:translate(-50%,-50%)}
.region-pin i {position:relative; display:grid; place-items:center; width:16px; height:16px; border:1px solid #fff; background:#0c182975; border-radius:50%; box-shadow:0 0 0 3px #0a132c4d}
.region-pin i::after {content:''; width:4px; height:4px; border-radius:50%; background:#fff}
.region-pin span {pointer-events:none; position:absolute; left:calc(50% + 11px); bottom:calc(50% + 15px); min-width:max-content; font-size:.76rem; font-weight:550; line-height:1.2; padding:4px 7px; background:#111c30eb; color:#f1f6ff; border:1px solid #8194b1; border-radius:4px; transition:background .18s var(--ease)}
.region-pin span::before {position:absolute; content:''; width:15px; height:1px; background:#d0d9e8; left:-9px; bottom:-5px; transform:rotate(-55deg)}
.region-pin[data-region='hvac'] span {left:auto; right:calc(50% + 11px); bottom:auto; top:calc(50% + 15px)}
.region-pin[data-region='hvac'] span::before {left:auto; right:-10px; bottom:auto; top:-6px}
.region-pin:focus-visible {outline-color:white; outline-offset:-5px}
.legend {color:var(--fig-muted); align-self:center; min-width:59px; padding:4px .7rem 4px .2rem; display:grid; gap:.56rem; font:400 .72rem/1 var(--mono); font-variant-numeric:tabular-nums; text-align:start}
.legend-body {display:flex; gap:6px; height:clamp(125px,12.5vw,208px)}
.gradient {width:6px; border-radius:3px; flex:none; background:linear-gradient(to top,#0b03aa,#0a49e6,#00d7fc,#00fa86,#daff00,#ff9600,#d80000)}
.legend-values {display:flex; flex-direction:column; justify-content:space-between}
#canvas-status {position:absolute; left:1rem; bottom:.6rem; color:var(--fig-text); font-size:.85rem; pointer-events:none}
#canvas-status:not(:empty) {padding:4px 8px; background:#101b2eed; border-radius:4px}
#live-view {position:relative; flex:1; min-width:0; height:clamp(260px,25vw,485px); overflow:hidden}
#live-view canvas, #pin-layer {position:absolute; inset:0; width:100%; height:100%}
#live-view canvas {touch-action:none}
#pin-layer {pointer-events:none}
.pin, #probe {position:absolute; font:.75rem var(--mono); color:white; background:#111e32eb; border:1px solid #697d9f; border-radius:4px; padding:3px 5px}
#probe {z-index:1; pointer-events:none; padding:6px 9px}
#layers {position:absolute; right:9px; top:9px; display:grid; gap:4px}
#layers button {width:35px; height:35px; display:grid; place-items:center; color:#e2eaff; background:#152235dc; border:1px solid #495c77; border-radius:6px}
#layers button[aria-pressed=true] {background:#344666; border-color:#93a8d8}
.transport {padding:.65rem 1.35rem; background:var(--surface); border-top:1px solid var(--border)}
#guide-controls, #timeline {display:flex; align-items:center; gap:1rem; min-height:47px}
.play-button {display:grid; flex:none; place-items:center; width:38px; height:38px; color:var(--on-button); background:var(--button); border-radius:50%}
.play-button .ico {width:17px; height:17px}
.time-ruler {min-width:0; position:relative; flex:1; height:48px; margin:0 1rem}
.scale-track {position:absolute; left:0; right:0; top:11px; height:9px; border-bottom:1px solid var(--border); background:repeating-linear-gradient(to right,var(--border) 0 1px,transparent 1px calc(100% / 28))}
#time-head {position:absolute; left:0; bottom:-3px; height:13px; width:3px; border-radius:2px; background:var(--accent); transform:translateX(-50%)}
#time-fill {position:absolute; left:0; bottom:-1px; width:0; height:2px; background:var(--accent)}
#guide-scrub {position:absolute; z-index:1; inset:0 -7px auto; width:calc(100% + 14px); height:22px; margin:0; opacity:0; cursor:ew-resize}
.time-ruler:has(#guide-scrub:focus-visible) {outline:2px solid var(--accent); outline-offset:3px; border-radius:2px}
.frame-buttons {position:absolute; inset:21px 0 0}
.frame-buttons button {position:absolute; height:28px; min-width:34px; transform:translateX(-50%); font:500 .74rem var(--mono); color:var(--faint); border-radius:3px}
.frame-buttons button[aria-pressed=true] {color:var(--accent); font-weight:700}
.frame-buttons button:active:not(:disabled) {transform:translateX(-50%)}
.live-scale {min-width:0; flex:1; display:grid; gap:.15rem; color:var(--muted); font-size:.8rem; font-variant-numeric:tabular-nums}
.live-scale input {width:100%; accent-color:var(--accent); margin:0; cursor:pointer}
#open-report {min-height:38px; gap:.4rem; border:1px solid var(--border); padding:0 .62rem; border-radius:5px; font-size:.85rem}
.viewport:fullscreen, .viewport.expanded {border-radius:0; background:var(--fig); width:100%; height:100%; container-type:normal}
.viewport.expanded {position:fixed; z-index:8; inset:0; height:100dvh}
body.field-expanded {overflow:hidden}
:is(.viewport:fullscreen,.viewport.expanded) .field-plane {flex:1}
:is(.viewport:fullscreen,.viewport.expanded) .guide-art {max-width:min(100%,calc((100dvh - 230px)*2))}
:is(.viewport:fullscreen,.viewport.expanded) #live-view {height:auto}
.metrics {display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); border-bottom:1px solid var(--subtle); padding:1.1rem 0 1.2rem; column-gap:.7rem}
.metric {padding:0 0 0 clamp(.55rem,1.05vw,1.25rem); border-left:1px solid var(--subtle); min-width:0}
.metric:first-child {padding-left:.15rem; border-left:0}
.metric>span {display:block; color:var(--muted); font-size:.79rem; min-height:1.3em}
.metric strong {display:block; font-weight:550; font-size:clamp(1.35rem,1.75vw,2.1rem); font-variant-numeric:tabular-nums; letter-spacing:-.055em; margin-top:.18rem; white-space:nowrap; line-height:1.18}
.metric .bad {color:var(--danger)}
.metric .good, .summary .good {color:var(--success)}
.workflow-assets {margin:0; padding:.25rem 0 0; min-width:0}
.workflow-assets summary {display:flex; align-items:center; gap:.55rem; list-style:none; color:var(--muted); cursor:pointer; min-height:41px; width:fit-content; font-weight:550; font-size:.88rem}
.workflow-assets summary::-webkit-details-marker {display:none}
.workflow-assets summary::after {content:''; width:7px; height:7px; border:solid currentColor; border-width:0 1.3px 1.3px 0; transform:rotate(45deg); margin-top:-3px; transition:transform .16s var(--ease)}
.workflow-assets[open] summary::after {transform:rotate(225deg); margin-top:3px}
.pipeline {display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:clamp(7px,1vw,18px)}
.pipeline-item {min-width:0; text-align:start; display:grid; justify-items:start; align-content:start; gap:6px; border-radius:5px; color:var(--muted)}
.pipeline-item img {width:100%; height:clamp(45px,4vw,76px); object-fit:cover; object-position:center 52%; border:1px solid var(--border); border-radius:5px; opacity:.86; transition:opacity .2s var(--ease), border-color .2s var(--ease)}
.pipeline-item span {font-size:.78rem; line-height:1.25; overflow-wrap:anywhere}
.agent {background:var(--surface); border:1px solid var(--border); border-radius:14px; min-width:0; display:flex; flex-direction:column; align-self:stretch; overflow:hidden}
.agent-header {display:flex; align-items:center; gap:.6rem; padding:.95rem 1.15rem; min-height:56px; border-bottom:1px solid var(--subtle)}
.agent-header>img {width:27px; height:27px}
.agent-header h2 {font-size:1.18rem; font-weight:590; letter-spacing:-.04em; margin:0; line-height:1.15}
.agent-status {display:flex; align-items:center; gap:.35rem; color:var(--muted); font-size:.75rem; margin-left:auto; white-space:nowrap}
.agent-status span {width:6px; height:6px; background:var(--success); border-radius:50%}
.agent-status.working span {background:var(--accent)}
.thread {flex:1 1 auto; min-height:0; max-height:clamp(435px,61svh,735px); overflow:auto; scrollbar-width:thin; scrollbar-color:var(--border) transparent; padding:1.1rem clamp(1rem,1.25vw,1.5rem) 1.15rem}
.user-row {display:flex; justify-content:flex-end; margin:0 0 1.45rem}
.user-message {width:fit-content; max-width:91%; color:var(--text); background:var(--user); border-radius:10px 10px 2px 10px; padding:.65rem .85rem; font-size:.92rem; line-height:1.45; overflow-wrap:anywhere}
.user-message p {margin:0}
.agent-row {min-width:0; margin-bottom:1.1rem}
.agent-row:last-child {margin-bottom:0}
.response {min-width:0; overflow-wrap:anywhere}
.response h3 {font-size:1.19rem; line-height:1.24; letter-spacing:-.035em; font-weight:580; margin:0 0 .4rem}
.response p {color:var(--muted); font-size:.97rem; line-height:1.55; margin:0 0 1rem}
.response h4 {margin:1.1rem 0 .6rem; font-size:.875rem; font-weight:650}
.warning {display:flex; gap:.75rem; align-items:center; border-left:2px solid var(--danger); padding:.55rem .7rem; margin:1rem 0; background:color-mix(in srgb,var(--danger) 6%,var(--surface)); border-radius:0 5px 5px 0}
.warning svg {width:80px; height:48px; color:var(--danger); flex:none; fill:none; stroke:currentColor; stroke-linecap:round}
.warning .skew-base {stroke:var(--faint); stroke-width:1.2}
.warning .skew-target {stroke:var(--faint); stroke-dasharray:2.5 3; stroke-width:1.2}
.warning .skew-measured {stroke-width:1.8}
.warning>div {display:grid; grid-template-columns:1fr auto; gap:.08rem .5rem; align-items:baseline; flex:1}
.warning small {grid-column:1/-1; color:var(--muted); font-size:.78rem}
.warning strong {font-variant-numeric:tabular-nums; font-size:1.5rem; font-weight:550; color:var(--danger); letter-spacing:-.06em; line-height:1.2}
.warning em {font-size:.74rem; font-style:normal; color:var(--muted); white-space:nowrap}
.task-list {list-style:none; margin:0 0 1rem; padding:0; display:grid; gap:.52rem}
.task-list li {display:flex; align-items:center; gap:.55rem; color:var(--muted); font-size:.9rem}
.task-list svg {width:16px; height:16px; flex:none}
.task-list .complete {color:var(--text)}
.task-list .complete svg {color:var(--success)}
.task-list .current {color:var(--text); font-weight:600}
.task-list .current svg {color:var(--accent)}
.task-list .pending svg {color:var(--faint)}
.primary {display:inline-flex; align-items:center; justify-content:center; padding:.65rem 1rem; min-height:40px; border-radius:6px; color:var(--on-button); background:var(--button); font-size:.9rem; font-weight:650}
.response>.primary {color:var(--accent); background:var(--active); border:1px solid color-mix(in srgb,var(--accent) 34%,var(--border))}
.progress-card {padding:.75rem 0 .8rem; margin:.45rem 0 .7rem}
.progress-label {font-size:.83rem; color:var(--muted)}
.progress-track {height:5px; margin-top:8px; border-radius:5px; background:var(--border); overflow:hidden}
.progress-fill {height:100%; border-radius:5px; background:var(--accent)}
.summary {border-top:1px solid var(--subtle); border-bottom:1px solid var(--subtle); margin:.7rem 0 1rem; padding:.7rem 0 .25rem}
.summary>small, .summary-line small {color:var(--muted); font-size:.76rem}
.summary-line {display:grid; grid-template-columns:1fr auto; align-items:baseline; padding:.5rem 0; gap:3px .7rem; font-size:.9rem}
.summary-line small {grid-column:1/-1}
.summary-line strong {font-variant-numeric:tabular-nums; font-weight:550; font-size:1.2rem; line-height:1.2}
.composer {flex:none; margin:auto clamp(.75rem,1.05vw,1.2rem) .9rem; border:1px solid var(--border); border-radius:9px; background:var(--bg); padding:.56rem .65rem; transition:border-color .16s var(--ease)}
.composer:focus-within {border-color:var(--accent)}
.composer textarea {width:100%; display:block; line-height:1.4; border:0; resize:none; field-sizing:content; min-height:calc(2lh + .5rem); max-height:min(9rem,30dvh); overflow-y:auto; padding:.15rem .15rem .35rem; background:none; color:var(--text); font-size:.93rem}
.composer textarea:focus {outline:none}
.composer textarea::placeholder {color:var(--faint)}
.composer-actions {display:flex; align-items:center; justify-content:space-between; gap:.5rem; padding-top:.2rem}
.composer-actions button {display:inline-flex; align-items:center; justify-content:center; gap:.4rem; min-height:38px; padding:0 .5rem; color:var(--muted); border-radius:6px; font-size:.875rem; font-weight:550}
.composer-actions .ico {width:18px; height:18px}
.composer-actions .send {flex:none; width:38px; height:38px; padding:0; background:var(--button); color:var(--on-button)}
.composer-actions .send .ico {width:19px; height:19px}
.file-list, .local-message {color:var(--muted); font-size:.83rem; overflow-wrap:anywhere}
.file-list {max-height:min(10rem,22dvh); overflow-y:auto; overscroll-behavior:contain; padding:3px; border-block:1px solid var(--subtle)}
.attachment-items {list-style:none; margin:0; padding:0}
.attachment-item {display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:.12rem .5rem; padding:.32rem 0}
.attachment-name {color:var(--text); font-weight:550}
.attachment-meta {grid-column:1; font-size:.78rem}
.attachment-remove {grid-area:1 / 2 / span 2; width:32px; min-height:32px; border-radius:5px; color:var(--muted); font-size:1.1rem}
.attachment-notice {margin:.3rem 0; font-size:.78rem}
.local-message {margin:.5rem 0}
.workspace-foot {display:flex; align-items:center; gap:1rem; margin-top:1rem; padding:.55rem 0 0; border-top:1px solid var(--subtle)}
.workspace-foot small {font-size:.77rem; color:var(--faint)}
#workspace-actions {margin-left:auto; display:flex; align-items:center; gap:.65rem; flex-wrap:wrap}
.workspace-foot button {gap:.35rem; font-size:.8rem; color:var(--muted); min-height:32px; white-space:nowrap}
.workspace-foot .ico {width:15px; height:15px}
.workspace-foot button.primary {color:var(--on-button)}
.live-actions, .menu-grid, .controls-row {display:flex; gap:7px; flex-wrap:wrap; align-items:center}
.live-actions button, .menu-grid button, #modal-body .menu-grid a, .controls-row button, dialog #modal-body button {min-height:38px; display:inline-flex; align-items:center; justify-content:center; gap:6px; padding:.4rem .7rem; border:1px solid var(--border); border-radius:6px; background:var(--raised); color:var(--text); font-size:.88rem}
.menu-grid button, .menu-grid a {flex:1 1 40%}
.live-actions button.primary, dialog #modal-body button.primary {background:var(--button); color:var(--on-button)}
dialog{background:var(--panel);color:var(--fg);border:1px solid var(--edge);border-radius:12px;width:min(660px,94vw);max-height:87dvh;padding:0;box-shadow:0 24px 80px #0005}dialog::backdrop{background:#06111bc9}.modal-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 19px;border-bottom:1px solid var(--edge);position:sticky;top:0;background:var(--panel);z-index:1}.modal-head h2{font-size:1.1rem}#modal-body{padding:18px;line-height:1.5}#modal-body h3{font-size:1rem;margin:14px 0 6px}#modal-body p{margin:6px 0 12px}.grid-form,.console-form{display:grid;gap:12px}.grid-form{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-form label,.console-form label{display:grid;gap:4px}.actions,.console-actions,.console-tabs,.console-pager{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:12px}.console-tabs{margin:0 0 12px}.console-table{overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:.84rem}td,th{padding:8px;text-align:start;border-bottom:1px solid var(--edge)}.console-metrics{display:flex;flex-wrap:wrap;gap:12px}.console-metrics dt{color:var(--muted);font-size:.8rem}dd{margin:0}.console-qr{max-width:200px}.console-status.is-error,.error{color:var(--warn)}pre{overflow:auto;font-size:.78rem;padding:10px;background:var(--bg);border-radius:5px}#toast{position:fixed;bottom:44px;left:50%;transform:translateX(-50%);background:var(--card);border:1px solid var(--edge);padding:10px 16px;border-radius:7px;z-index:10;max-width:90vw;font-size:.85rem}.listitem{display:flex;gap:9px;align-items:center;border-bottom:1px solid var(--edge);padding:6px 0}.listitem small{margin-left:auto}.notice{border-left:3px solid var(--warn);padding:7px 12px;background:var(--card);font-size:.87rem}details{margin:8px 0}summary{cursor:pointer}canvas:focus-visible{outline:2px solid var(--accent)}
.console-content{display:grid;gap:14px}.console-content>*{min-width:0}.console-form{display:grid;gap:10px;margin:10px 0}.console-form label,.console-content label{display:grid;gap:5px;color:var(--muted)}.console-form input,.console-form select,.console-form textarea,.console-content select{width:100%;box-sizing:border-box;color:var(--fg);background:var(--bg);border:1px solid var(--edge);border-radius:5px;padding:8px}
.console-form button[type=submit]{justify-self:start}.console-actions,.console-tabs,.console-pager{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.console-tabs button[aria-selected=true],.console-tabs button[aria-pressed=true]{background:var(--active);color:var(--accent)}.console-metrics{display:grid;grid-template-columns:minmax(80px,1fr) 1fr;gap:7px;margin:0}.console-metrics dd{margin:0;font-variant-numeric:tabular-nums}.console-table{overflow-x:auto}.console-table table{min-width:320px}.console-pager{justify-content:flex-end;font-size:.82rem}.console-link{color:var(--accent)}.console-status:not([hidden]){color:var(--warn)}.console-qr{display:block;background:white;padding:8px;max-width:100%;height:auto}.console-docs pre{overflow:auto;font-size:.76rem;background:var(--bg);padding:9px}.console-docs code,dialog td{overflow-wrap:anywhere}.console-order p{overflow-wrap:anywhere}

/* Shared workspace dialogs */
dialog {scrollbar-width:thin; overscroll-behavior:contain}
dialog .modal-head {min-height:54px; padding:.45rem 1.05rem}
.modal-head h2 {margin:0; letter-spacing:-.025em}
#modal-body {overflow-wrap:anywhere}
#modal-body form input:not([type=checkbox]):not([type=range]), #modal-body select, #modal-body textarea {max-width:100%; background:var(--bg); border:1px solid var(--border); border-radius:5px; color:var(--text); padding:7px}
#modal-body a {color:var(--accent)}
#modal-body .ico {width:18px; height:18px; flex:none}
#modal-body input[type=range] {max-width:100%; accent-color:var(--accent)}
#toast {color:var(--text); background:var(--raised); pointer-events:none}
@media (hover:hover) {
  .icon-button:hover, .nav-item:hover, .composer-actions button:hover:enabled, .attachment-remove:hover, .step-label:hover, #open-report:hover {background:var(--raised); color:var(--text)}
  .tabs button:hover, .breadcrumb a:hover, .workflow-assets summary:hover, .frame-buttons button:hover, .workspace-foot button:hover {color:var(--accent)}
  .pipeline-item:hover {color:var(--text)}
  .pipeline-item:hover img {opacity:1; border-color:var(--accent)}
  #work-mode:hover, .play-button:hover:not(:disabled), .composer-actions .send:hover:enabled {background:color-mix(in srgb,var(--button) 87%,var(--text)); color:var(--on-button)}
  .response>.primary:hover {background:color-mix(in srgb,var(--accent) 20%,var(--surface))}
  .region-pin:hover i, .region-pin:focus-visible i {box-shadow:0 0 0 5px #e7eeff4a}
  .region-pin:hover span, .region-pin:focus-visible span {background:#e7efff; color:#142540; border-color:#e7efff}
}
@container (max-width:570px) {
  .viewport-toolbar {padding:0 .58rem; gap:.16rem}
  .tabs {gap:.18rem}
  .tabs button {padding:0 .3rem}
  .view-controls .icon-button {width:30px}
  .view-controls .icon-button:last-child {display:none}
  .field-caption {padding:.85rem .9rem .45rem}
  .legend {min-width:47px; padding-right:.45rem}
  .region-pin span {font-size:.69rem}
}
@container (max-width:431px) {
  .viewport-toolbar {padding:0 .35rem; min-height:46px}
  .tabs {gap:0; flex:1; justify-content:space-between}
  .tabs button {font-size:.81rem; padding:0 .32rem}
  .view-controls .icon-button {width:34px; height:40px}
  .view-controls .icon-button:not(:first-child) {display:none}
  .field-caption {padding:.75rem .85rem .45rem}
  .field-caption h2 {font-size:1.3rem}
  #field-context {font-size:.69rem}
  .legend {min-width:37px; padding:3px .25rem; font-size:.65rem; gap:.4rem}
  .legend-body {gap:3px; height:100px}
  .gradient {width:4px}
  .transport {padding:.4rem .7rem}
  #guide-controls, #timeline {gap:.55rem}
  .time-ruler {margin:0 .7rem}
  .region-pin span {padding:3px 5px}
  .play-button {width:36px; height:36px}
}
@media (max-width:1250px) and (min-width:801px) {
  :root {--rail-width:66px; --gutter:clamp(16px,2vw,26px)}
  .sidebar {padding:.9rem .43rem; align-items:center; gap:1.5rem}
  .brand {padding:0}
  .brand strong, .nav-item .btntext, .nav-label, .profile-name, .profile .ico {display:none}
  .nav-item {padding:0; justify-content:center; width:44px; min-height:40px}
  .profile {padding:.9rem .35rem .3rem}
  .stepper li:not(:last-child)::after {width:9px}
}
@media (min-width:801px) and (max-width:1010px) {
  .workspace {grid-template-columns:minmax(0,1fr) minmax(285px,.61fr); gap:12px}
  .stepper {gap:4px}
  .step-label {gap:.3rem}
  .stepper li:not(:last-child)::after {width:5px; margin:0 .1rem}
  .warning svg {width:56px}
  .thread {padding:1rem .8rem}
  .metric strong {font-size:1.25rem}
  .metric>span {font-size:.74rem}
}
@media (max-width:800px) {
  :root {--gutter:clamp(12px,3vw,24px)}
  .app {display:block}
  .sidebar {display:none}
  .sidebar.open {display:flex; position:fixed; z-index:6; left:0; top:0; bottom:0; width:min(268px,82vw); height:100dvh; padding:1.1rem 1rem; box-shadow:8px 0 40px #050b1940; gap:1.1rem}
  .sidebar.open .nav-item {min-height:40px}
  #nav-shade {position:fixed; inset:0; z-index:5; background:#050b1899}
  #mobile-menu, #agent-link {display:grid; place-items:center}
  .topbar {min-height:54px; gap:.2rem}
  #mobile-menu {margin-left:-6px}
  .top-tools {gap:0}
  #work-mode {margin-right:.2rem}
  .project {padding:1.35rem 0 1rem; flex-wrap:wrap; gap:.7rem}
  .project h1 {font-size:clamp(2.05rem,5.7vw,2.75rem)}
  .stepper {flex:1 1 auto; justify-content:flex-end}
  .stepper li:not(:last-child)::after {width:clamp(6px,1vw,16px); margin:0 .25rem}
  .workspace {grid-template-columns:minmax(0,1fr); gap:1rem}
  .agent {align-self:auto; scroll-margin:12px}
  .agent-header {padding:.8rem 1rem}
  .thread {max-height:min(72dvh,600px); padding:1rem}
  .composer {margin:.15rem .8rem .8rem}
  .agent .user-message {max-width:min(88%,26rem)}
  .agent-row {max-width:44rem}
  .workspace-foot {margin-top:.95rem}
  .pipeline-item img {height:clamp(36px,9vw,68px)}
  .pipeline-item span {font-size:.75rem}
  #live-view {height:clamp(235px,52vw,380px)}
}
@media (max-width:600px) {
  #notifications {display:none}
  #work-mode {min-height:40px; gap:.32rem; padding:0 .6rem}
  #work-mode .btntext {display:none}
  #work-mode::after {content:attr(data-short)}
  .top-tools .icon-button, #mobile-menu {width:40px; height:42px}
  .breadcrumb {gap:.38rem; font-size:.78rem}
  .project {gap:.66rem; padding:1.05rem 0 .8rem}
  .project h1 {letter-spacing:-.06em}
  .project p {margin-top:.32rem; font-size:.86rem}
  .stepper {flex:1 1 100%; display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); align-items:start}
  .stepper li {position:relative; justify-content:center}
  .stepper li:not(:last-child)::after {position:absolute; top:12px; left:calc(50% + 14px); right:calc(-50% + 14px); margin:0; width:auto}
  .step-label {flex-direction:column; gap:4px; font-size:.73rem; min-height:42px; line-height:1.2; padding:2px 0; width:100%}
  .step-badge {width:19px; height:19px}
  .stage-name {white-space:normal; text-align:center}
  .workspace {gap:.55rem}
  .metrics {grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:.8rem; row-gap:.8rem; padding:1rem .15rem}
  .metric {padding-left:.85rem}
  .metric:nth-child(2n+1) {padding-left:0; border-left:0}
  .metric>span {font-size:.78rem}
  .metric strong {font-size:1.42rem}
  .pipeline {gap:6px; padding-bottom:.65rem}
  .pipeline-item span {font-size:.72rem}
  .workflow-assets summary {min-height:40px}
  .workspace-foot {align-items:start; flex-wrap:wrap; gap:.45rem}
  #workspace-actions {margin-left:0; flex-wrap:nowrap}
  .grid-form {grid-template-columns:1fr}
  .warning>div {max-width:20rem}
}
@media (pointer:coarse) {
  .composer-actions button {min-height:44px}
  .composer-actions .send {width:44px; height:44px}
}
@media (max-width:400px) {
  .breadcrumb span {display:none}
  .topbar {gap:0}
  .region-pin span {font-size:.67rem}
}
@container (max-width:340px) {
  .tabs button {font-size:.76rem; padding:0 .17rem}
  .view-controls .icon-button {width:30px}
  .legend {min-width:34px}
  #viewport-info {font-size:.7rem}
}
@media (prefers-reduced-motion:reduce) {
  *, *::before, *::after {transition:none !important; animation:none !important; scroll-behavior:auto !important}
}
/* The field and its transport form one instrument; the asset tray spans the workspace. */
.mobile-wordmark, #close-rail {display:none}
.brand strong {letter-spacing:-.048em}
.project {padding:clamp(1rem,1.45vw,1.65rem) 0}
.project h1 {letter-spacing:-.043em; word-spacing:.015em}
.field-caption {padding-top:.72rem}
.field-caption h2 {letter-spacing:-.033em}
.field-tools {display:flex; align-items:center; gap:.25rem}
#view-compare {display:grid; place-items:center; color:var(--muted); width:36px; height:36px; border-radius:6px}
#view-compare .ico {width:18px; height:18px}
.region-pin span {pointer-events:auto; cursor:pointer}
.region-pin[data-region='windshield'] span {left:auto; right:calc(50% + 10px)}
.region-pin[data-region='windshield'] span::before {left:auto; right:-9px; transform:rotate(55deg)}
#kit-view {aspect-ratio:auto}
.guide-art {max-width:min(100%, max(590px, 81vh))}
html[data-workspace='guide'] .legend-values {position:relative; min-width:3ch}
html[data-workspace='guide'] .legend-values span {position:absolute; transform:translateY(-50%)}
.legend>div:first-child {white-space:nowrap}
#guide-phase {font-size:.87rem; line-height:1.25; color:var(--text); width:clamp(85px,8vw,135px); flex:none}
#time-fill {width:100%; transform-origin:left}
#time-head {width:100%; left:0; height:14px; background:transparent; pointer-events:none}
#time-head::after {content:''; position:absolute; bottom:0; left:-1px; width:3px; height:13px; background:var(--accent); border-radius:2px}
.metrics {border-bottom:0}
.workflow-assets {border-top:1px solid var(--subtle); margin:.65rem 0 0; padding:.1rem 0 0}
.workflow-assets summary {min-height:40px}
.pipeline {grid-template-columns:repeat(5,minmax(0,1fr)); gap:.8rem}
.pipeline-item {display:flex; align-items:center; gap:.6rem; min-height:50px; padding:2px}
.pipeline-item img {width:clamp(48px,5.3vw,92px); height:clamp(35px,3.3vw,52px); flex:none}
.pipeline-item span {font-size:.83rem}
.agent {max-height:calc(100svh - 140px); min-height:470px}
.thread {max-height:none; flex:1 1 0}
.composer {margin-top:.2rem}
.comparison {display:grid; gap:.9rem}
.compare-choices {display:flex; gap:6px}
#modal-body .compare-choices button[aria-pressed='true'] {background:var(--active); color:var(--accent); border-color:var(--accent)}
.compare-stage {--split:50%; position:relative; aspect-ratio:785/391; background:var(--fig); overflow:hidden; border-radius:7px; isolation:isolate}
.compare-stage img {position:absolute; width:100%; height:100%; inset:0; object-fit:contain}
.compare-before {clip-path:inset(0 calc(100% - var(--split)) 0 0)}
.compare-divider {position:absolute; left:var(--split); inset-block:0; width:2px; background:white; box-shadow:0 0 5px #152543; pointer-events:none}
.compare-divider i {position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); width:32px; height:32px; border:1px solid #fff; border-radius:50%; background:#172640; display:flex; align-items:center; justify-content:center; gap:3px}
.compare-divider i::before, .compare-divider i::after {content:''; display:block; width:6px; height:6px; transform:rotate(45deg); border:1.5px solid #fff}
.compare-divider i::before {border-top:0; border-right:0}
.compare-divider i::after {border-bottom:0; border-left:0}
.compare-stage input {position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:ew-resize; touch-action:pan-y}
.compare-stage:has(input:focus-visible) {outline:2px solid var(--accent); outline-offset:3px}
.compare-caption {display:flex; justify-content:space-between; gap:.7rem; font-size:.9rem; color:var(--muted)}
.compare-caption>div {display:grid; gap:2px}
.compare-caption>div:last-child {text-align:end}
.compare-caption b {font:.83rem var(--mono); color:var(--text)}
@media (hover:hover) {#view-compare:hover {color:var(--text); background:var(--raised)}}
@media (min-width:801px) and (max-width:1010px) {
  .metric {display:flex; flex-direction:column; justify-content:space-between}
  .pipeline-item {gap:.4rem}
  .pipeline-item img {width:47px}
}
@media (min-width:801px) and (max-height:750px) {
  .agent {min-height:430px; max-height:calc(100svh - 80px)}
  .project {padding:.8rem 0}
  .thread {padding-top:.75rem}
}
@media (max-width:800px) {
  .mobile-wordmark {display:block; font-size:1.1rem; letter-spacing:-.045em; font-weight:650}
  .breadcrumb {display:none}
  .sidebar.open #close-rail {display:grid; margin-left:auto}
  .agent {min-height:0; max-height:none}
  .thread {flex:0 1 auto; max-height:min(72dvh,600px)}
  .workflow-assets {margin-top:.75rem}
}
@media (max-width:600px) {
  .project {padding:1rem 0 .65rem}
  .workspace {gap:0}
  .pipeline {gap:.35rem}
  .pipeline-item {display:grid; align-content:start; gap:4px}
  .pipeline-item img {width:100%; height:clamp(30px,9vw,48px)}
  .pipeline-item span {font-size:.72rem}
  .workspace-foot {margin-top:.1rem}
}
@container (max-width:570px) {
  #guide-controls {display:grid; grid-template-columns:38px minmax(0,1fr); grid-template-rows:auto 36px; gap:0 .75rem}
  #guide-play {grid-row:1/3; align-self:center}
  #guide-phase {grid-column:2; font-size:.78rem; width:auto; line-height:1.1; padding-left:.15rem}
  .time-ruler {grid-column:2; height:36px; margin:0 .9rem; align-self:end}
  .scale-track {top:4px}
  #guide-scrub {height:16px}
  .frame-buttons {top:14px}
  .frame-buttons button {height:23px}
  html[data-workspace='guide'] .legend-values span:nth-child(even):not(:last-child) {display:none}
  html[data-workspace='guide'] .legend {font-size:.73rem}
  .field-caption {padding-top:.6rem}
}
@container (max-width:431px) {
  .field-tools {gap:0}
  #view-compare {width:32px; height:38px}
  .legend-body {height:105px}
  .tabs button {padding:0 .25rem}
  .transport {padding:.65rem .7rem .4rem}
}
#navigation, .nav-section, .nav-item {min-width:0}
.nav-section {grid-template-columns:minmax(0,1fr)}
.nav-item {gap:.65rem; padding-inline:.62rem}
.nav-item .btntext {min-width:0; overflow:hidden; text-overflow:ellipsis}
.stepper {min-height:40px}
@media (min-width:801px) and (max-width:960px) {
  .workspace {grid-template-columns:minmax(0,1fr); gap:.1rem}
  .project {flex-wrap:wrap; justify-content:space-between; gap:.45rem}
  .project-name {flex:1 0 230px}
  #agent-link {display:grid; place-items:center}
  .agent {max-height:none; min-height:0}
  .thread {flex:0 1 auto; max-height:54dvh; padding:1rem 1.2rem}
  .response {max-width:42rem}
  .user-message {max-width:29rem}
  .composer {margin-top:.6rem}
}
@container (max-width:431px) {
  html[data-workspace='live'] .field-tools {position:absolute; z-index:2; right:7px; top:51px}
  html[data-workspace='live'] .tabs {width:100%; justify-content:space-around}
  html[data-workspace='live'] .view-controls .icon-button {width:36px; height:36px; color:var(--fig-muted); background:#19283d}
  html[data-workspace='live'] .field-caption {display:block; padding-right:48px}
  html[data-workspace='live'] #viewport-info {display:block; margin-top:.35rem; max-width:none; text-align:start; line-height:1.3}
  #open-report {width:38px; padding:0; justify-content:center}
  #open-report .btntext {display:none}
}
#frame-label {display:flex; flex-wrap:wrap; gap:.2rem .7rem; align-items:baseline; line-height:1.3}
#frame-label strong {color:var(--text); font-weight:600}
#frame-label span {color:var(--faint); font:.73rem var(--mono)}
@media (max-width:355px) {
  .mobile-wordmark {font-size:1rem}
  #mobile-menu {width:34px; flex:none}
  .top-tools .icon-button {width:35px}
  #work-mode {font-size:.82rem}
  #work-mode::after {content:attr(data-compact)}
}
@media (min-width:1251px) {:root {--rail-width:clamp(198px,13vw,224px)}}
@container (max-width:340px) {
  .field-tools {position:absolute; z-index:2; top:48px; right:7px}
  .tabs {width:100%; justify-content:space-around}
  .field-tools .icon-button, #view-compare {width:32px; height:32px; color:var(--fig-muted); background:#19283d; border-radius:5px}
  html[data-workspace='guide'] #field-context {display:block; min-height:23px; line-height:23px}
}
.skip-field {position:fixed; left:1rem; top:.5rem; z-index:7; transform:translateY(-170%); padding:.45rem .75rem; border-radius:5px; color:var(--on-button); background:var(--button); font-size:.9rem}
.skip-field:focus {transform:none}
.viewport:focus-visible {outline:2px solid var(--accent); outline-offset:3px}
.glass-chart {width:100%; max-height:170px; margin:.8rem 0 .4rem; overflow:visible}
.glass-chart text {font:10px var(--mono); fill:var(--muted)}
.glass-chart .chart-rule {stroke:var(--border)}
.glass-chart .chart-cursor {stroke:var(--faint); stroke-dasharray:2 3}
.zone-0 {--zone:var(--accent)}
.zone-1 {--zone:var(--success)}
.zone-2 {--zone:var(--warning)}
.glass-chart polyline {fill:none; stroke:var(--zone); stroke-width:2}
.glass-chart polyline.zone-1 {stroke-dasharray:5 3}
.glass-chart polyline.zone-2 {stroke-dasharray:2 2}
.glass-chart circle {fill:var(--zone); stroke:var(--surface); stroke-width:1}
.zone-readings {margin:.5rem 0 1rem; display:grid}
.zone-readings>div {display:flex; justify-content:space-between; align-items:center; padding:.4rem 0; border-bottom:1px solid var(--subtle); gap:.5rem; font-size:.9rem}
.zone-readings span {display:flex; align-items:center; gap:.45rem; color:var(--muted)}
.zone-readings span::before {content:''; width:14px; height:0; border-top:2px solid var(--zone)}
.zone-readings .zone-1 span::before {border-top-style:dashed}
.zone-readings .zone-2 span::before {border-top-style:dotted}
.zone-readings strong {font-weight:550; font-variant-numeric:tabular-nums}
.response table {margin-bottom:1rem}
.response table th {color:var(--muted); font-weight:500; padding-left:0}
.response table td {text-align:end; font-variant-numeric:tabular-nums; white-space:nowrap}
.response p.notice {font-size:.85rem; margin:.65rem 0 .95rem; background:transparent; color:var(--muted)}

/* The walkthrough and both comparison surfaces share the camera's film gate. */
.guide-art {aspect-ratio:640/296; background:radial-gradient(ellipse at 55% 50%,#1b304b 0%,#101d31 48%,var(--fig) 82%)}
#tour-canvas, #kit-view {position:absolute; inset:0; width:100%; height:100%; mask-image:none; object-fit:contain}
#tour-canvas {display:block; visibility:hidden; touch-action:none; cursor:grab}
#tour-canvas:active {cursor:grabbing}
#tour-canvas:focus-visible {outline:2px solid var(--accent); outline-offset:-3px}
.guide-art[data-renderer='webgl'] #tour-canvas {visibility:visible}
.guide-art[data-renderer='webgl'] #kit-view {visibility:hidden}
#tour-notice {position:absolute; left:8px; bottom:4px; display:flex; align-items:center; gap:.5rem; padding:2px 6px; background:#131f30ed; color:#e2ebf7; font-size:.74rem; line-height:1.4; border-radius:4px}
#tour-notice button {color:#c5d7ff; text-decoration:underline; padding:4px}
.compare-stage {aspect-ratio:640/296}
.compare-stage canvas {position:absolute; inset:0; width:100%; height:100%; background:radial-gradient(ellipse at center,#1b304b,var(--fig) 82%)}

/* The live run belongs with the field it is computing. */
.compute-status {--run-color:#a9c5ff;display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;column-gap:.9rem;margin:.4rem 1.15rem .8rem;padding:.52rem .76rem;border-inline-start:3px solid var(--run-color);border-radius:3px;background:#192b43;color:var(--fig-text)}
.compute-reading {display:flex;align-items:center;gap:.5rem;min-width:0;font-size:.9rem;line-height:1.35}
#compute-state {font-weight:650}
#compute-detail, #compute-worker {font-size:.83rem;color:#c0cde1}
#compute-detail:empty {display:none}
#compute-symbol {display:flex;align-items:center;justify-content:center;flex:none;width:17px;color:var(--run-color)}
#compute-symbol .ico {width:17px;height:17px}
#compute-worker {white-space:nowrap}
#run-details {min-height:32px;padding:0 .65rem;border:1px solid #586c89;border-radius:5px;color:#edf4ff;font-size:.85rem;font-weight:550}
#run-details:hover, #run-details:focus-visible {background:#314966}
#compute-progress {grid-column:1/-1;width:100%;height:3px;margin-top:.5rem;border:0;border-radius:2px;overflow:hidden;appearance:none;background:#384a62;color:var(--run-color)}
#compute-progress::-webkit-progress-bar {background:#384a62}
#compute-progress::-webkit-progress-value {background:var(--run-color)}
#compute-progress::-moz-progress-bar {background:var(--run-color)}
.compute-status[data-state='succeeded'] {--run-color:#7cdebc;background:#172d32}
.compute-status:is([data-state='failed'],[data-state='submit-error']) {--run-color:#ffaaa9;background:#35242e}
.compute-status:is([data-state='unavailable'],[data-state='cancelled']) {--run-color:#ecc997;background:#2c2930}
.compute-status[data-state='idle'] {margin:0 1.35rem .5rem;padding:0;border:0;background:none}
.compute-status[data-state='idle'] #compute-state {font-size:.81rem;font-weight:500;color:#b7c8e3}
.compute-status[data-state='idle'] #compute-symbol {width:7px;height:7px;border-radius:50%;background:#97a8bd;color:inherit}
.compute-status[data-state='idle'][data-worker='online'] #compute-symbol {background:#76d7b7}
.compute-status[data-state='idle'][data-worker='offline'] #compute-symbol {background:#ecc997}

.transport {display:flex;align-items:center;gap:.85rem}
#guide-controls, #timeline {flex:1;min-width:0}
#open-report {flex:none;justify-content:center;gap:.45rem;width:auto;padding:0 .7rem;min-height:38px;background:var(--raised);color:var(--text);font-size:.88rem;font-weight:550}
#open-report .btntext {display:inline}
#open-report:hover, #open-report:focus-visible {border-color:var(--accent)}
.live-scale input {min-height:24px;cursor:pointer;margin-block:-4px}

#modal-body .dialog-stack {display:grid;grid-template-columns:minmax(0,1fr);gap:1rem}
#modal-body .dialog-stack > :is(p,table,details,.actions) {margin:0}
#modal-body .dialog-stack > .actions {gap:.55rem;padding-top:.9rem;border-top:1px solid var(--subtle)}
#modal-body .actions button {min-height:40px;line-height:1.25}
#modal-body .property-table {font-size:.875rem;font-variant-numeric:tabular-nums}
#modal-body .property-table th {width:52%;padding:.52rem .8rem .52rem 0;color:var(--muted);font-weight:500;overflow-wrap:normal}
#modal-body .property-table td {text-align:end;padding:.52rem 0 .52rem .35rem}
#modal-body .property-table tr:last-child > * {border-bottom:0}
#modal-body .reference-report td, #modal-body .reference-report th:not(:first-child) {text-align:end;font-variant-numeric:tabular-nums}
#modal-body .reference-report th:first-child {padding-left:0}
#modal-body .reference-report tr > :last-child {padding-right:0}
@container (max-width:570px) {
  .compute-status {margin:.3rem .8rem .65rem;column-gap:.55rem}
  .compute-status[data-state='idle'] {margin-inline:.85rem}
  #footer:has(#guide-controls:not([hidden])):has(#open-report:not([hidden])) {display:grid;grid-template-columns:36px minmax(0,1fr) auto;grid-template-rows:auto 36px;gap:.15rem .55rem}
  #footer:has(#open-report:not([hidden])) #guide-controls:not([hidden]) {display:contents}
  #footer:has(#guide-controls:not([hidden])):has(#open-report:not([hidden])) .time-ruler {grid-column:2/4;grid-row:2;align-self:stretch}
  #footer:has(#guide-controls:not([hidden])) #open-report {grid-column:3;grid-row:1}
}
@container (max-width:445px) {
  .compute-status {grid-template-columns:minmax(0,1fr) auto}
  .compute-reading {flex-wrap:wrap;column-gap:.38rem;row-gap:.1rem}
  #compute-worker {grid-column:1;grid-row:2;margin:.15rem 0 0 1.44rem}
  #run-details {grid-column:2;grid-row:1/3;min-height:36px}
  #compute-progress {grid-row:3}
  .transport {gap:.55rem}
}
@media (max-width:480px) {
  #modal-body .dialog-stack > .actions:has(> :nth-child(2)) {display:grid;grid-template-columns:minmax(0,1fr)}
}

/* Shared navigation for the studio, Projects and Account. */
html {scroll-padding-top:4.25rem}
.topbar {position:sticky;top:0;z-index:4;background:var(--bg)}
.appearance-tools {display:flex;align-items:center;gap:2px;flex:none}
.appearance-tools button {min-height:40px;min-width:40px;flex:none;border-radius:6px;color:var(--muted)}
.appearance-tools #locale {padding:0 .32rem;font-size:.84rem;font-weight:600;text-align:center}
.profile {text-decoration:none}
a.profile[aria-current=page] {color:var(--accent);font-weight:600}
:is(.account-page,.projects-page) .brand a {display:flex;align-items:center;gap:.55rem;color:var(--text);text-decoration:none}
:is(.account-page,.projects-page) .mobile-wordmark {color:var(--text);text-decoration:none}
@media (hover:hover) {.appearance-tools button:hover,a.profile:hover {color:var(--text);background:var(--raised)}}
@media (max-width:800px) {
  :is(.account-page,.projects-page) .mobile-wordmark,:is(.account-page,.projects-page) .sidebar.open #close-rail {display:flex}
}
@media (max-width:440px) {
  #app .topbar .mobile-wordmark {width:23px;height:26px;flex:none;overflow:hidden;font-size:0;background:url('/assets/kit/brand/dynasolver-mark.svg') center/contain no-repeat}
  .appearance-tools {gap:0}
}
@media (max-width:355px) {
  #app .top-tools .icon-button,#app .appearance-tools button {min-width:35px;width:35px}
  #app .topbar .mobile-wordmark {width:18px}
}
