/* OQVAR Explore — the landing page's dark palette in a calm, Apple-style window: toolbar, library, sheet, ask panel.
   The sheet stays paper; its takeoff marks keep their own paper-tuned colours (--s-*). */
:root {
  --ink: #08090b;
  --panel: #0e1013;
  --card: #15181c;
  --card-2: #1c2026;
  --muted: #1b1e23;
  --line: rgba(236, 230, 214, .10);
  --line-2: rgba(236, 230, 214, .18);
  --bone: #ece6d6;
  --bone-2: rgba(236, 230, 214, .72);
  --bone-3: rgba(236, 230, 214, .56);
  --red: #e0301e;
  --red-text: #ff5a4a;
  --hl: #ffe24a;
  --green: #4cc98a;
  --amber: #f2b33d;
  --blue: #5a8ae0;          /* the one data colour on dark, validated for the chart surface */
  --brand: "Sora", "IBM Plex Sans", system-ui, sans-serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --lib-w: 272px;
  --insp-w: 372px;
  --glass: rgba(20, 22, 27, .84);
  --float: 0 18px 44px -18px rgba(0, 0, 0, .85), 0 0 0 .5px rgba(0, 0, 0, .5);
  --ease: cubic-bezier(.22, 1, .36, 1);
  /* paper-side colours for marks drawn on the sheet */
  --s-ink: #15171b; --s-ink-3: #5d6269; --s-white: #fff; --s-red: #cf2a1e; --s-red-ink: #b1221a; --s-green: #156f45; --s-amber: #b97a00;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
html { color-scheme: dark; }
body { background: var(--ink); color: var(--bone); font: 13px/1.45 var(--sans); -webkit-font-smoothing: antialiased; overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p, dl, dd, ol, ul { margin: 0; padding: 0; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 2px solid rgba(236, 230, 214, .7); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--hl); color: var(--s-ink); }
* { scrollbar-width: thin; scrollbar-color: rgba(236, 230, 214, .18) transparent; }
svg.i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
[data-icon] { display: inline-flex; align-items: center; justify-content: center; }
.lbl { font: 500 11px/1.2 var(--sans); color: var(--bone-3); }

/* keycaps */
kbd { display: inline-block; min-width: 18px; padding: 1px 5px; border: 1px solid var(--line-2); border-radius: 5px; background: rgba(236, 230, 214, .06);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .45); font: 500 10.5px/1.5 var(--sans); color: var(--bone-2); text-align: center; }

/* ------------------------------------------------------------------ controls */
.icon-btn { display: inline-grid; place-items: center; width: 30px; height: 30px; flex: none; border: 0; border-radius: 7px; background: transparent; color: var(--bone-2); transition: background-color .15s, color .15s; }
.icon-btn svg.i { width: 17px; height: 17px; }
#btn-settings svg.i { width: 18px; height: 18px; stroke-width: 1.5; }
.icon-btn:hover { background: rgba(236, 230, 214, .08); color: var(--bone); }
.icon-btn[aria-pressed="true"] { background: rgba(236, 230, 214, .14); color: var(--bone); }
.icon-btn:disabled { opacity: .3; cursor: not-allowed; background: transparent; }
.seg { display: inline-flex; gap: 2px; padding: 2px; border-radius: 9px; background: var(--muted); border: 1px solid var(--line); flex: none; }
.seg button { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border: 0; border-radius: 7px; background: transparent; color: var(--bone-2); font: 500 12px/1.4 var(--sans); transition: background-color .15s, color .15s; }
.seg button svg.i { width: 14px; height: 14px; }
.seg button:hover:not(:disabled) { color: var(--bone); }
.seg button.on, .seg button[aria-pressed="true"] { background: #2a2e35; color: var(--bone); box-shadow: 0 1px 2px rgba(0, 0, 0, .45), inset 0 0 0 .5px rgba(236, 230, 214, .08); }
.seg button:disabled { opacity: .35; cursor: not-allowed; }
.seg.small button { padding: 3px 9px; font-size: 11.5px; }
.seg.small i { font-style: normal; color: var(--bone-3); }
.popup { appearance: none; -webkit-appearance: none; min-width: 0; max-width: 240px; padding: 5px 28px 5px 10px; border: 1px solid var(--line-2); border-radius: 7px; color: var(--bone);
  background: var(--muted) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3.5 4.5 6 2l2.5 2.5M3.5 7.5 6 10l2.5-2.5' fill='none' stroke='%23ece6d6' stroke-opacity='.7' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 8px center / 11px;
  font: 500 12px/1.4 var(--sans); cursor: pointer; text-overflow: ellipsis; }
.popup option { background: var(--card); color: var(--bone); }
.btn { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border: 1px solid var(--line-2); border-radius: 7px; background: rgba(236, 230, 214, .06); color: var(--bone); font: 500 11.5px/1.4 var(--sans); }
.btn:hover { background: rgba(236, 230, 214, .12); }

/* ------------------------------------------------------------------ toolbar: logo, the drawing's name in the middle, three actions */
.tb { position: relative; z-index: 8; height: 52px; display: grid; grid-template-columns: 1fr minmax(0, auto) 1fr; align-items: center; gap: 12px; padding: 0 10px 0 12px; border-bottom: 1px solid var(--line);
  background: rgba(14, 16, 19, .94); backdrop-filter: blur(20px) saturate(1.3); -webkit-backdrop-filter: blur(20px) saturate(1.3); }
.tb-lead { justify-self: start; display: flex; align-items: center; }
.tb-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--bone); text-decoration: none; padding: 4px 6px; border-radius: 7px; }
.tb-brand:hover { background: rgba(236, 230, 214, .06); }
.tb-mark { height: 22px; width: auto; flex: none; }
.tb-wm { display: block; height: 11px; width: auto; overflow: visible; }
.tb-title { min-width: 0; max-width: min(560px, 46vw); text-align: center; }
.tb-title h1 { font: 600 13.5px/1.25 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-title p { font-size: 11.5px; color: var(--bone-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-title p span { cursor: help; }
.tb-title p i { font-style: normal; }
.tb-end { justify-self: end; display: flex; align-items: center; gap: 8px; }
.tb-upload { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px 0 10px; border: 0; border-radius: 15px; background: var(--bone); color: var(--ink); font: 600 12.5px/1 var(--sans); flex: none; transition: opacity .15s; }
.tb-upload svg.i { width: 15px; height: 15px; stroke-width: 1.9; }
.tb-upload:hover { opacity: .88; }
.set-wrap { position: relative; flex: none; }
.settings { position: absolute; top: calc(100% + 10px); right: -4px; z-index: 30; width: 290px; padding: 6px; border: 1px solid var(--line-2); border-radius: 14px; background: rgba(22, 24, 29, .985); box-shadow: 0 24px 60px rgba(0, 0, 0, .7); animation: pal-in .16s var(--ease); }
.settings[hidden] { display: none; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 9px; cursor: pointer; }
.set-row:hover, .set-item:hover { background: rgba(236, 230, 214, .06); }
.set-row b { display: block; font-size: 13px; font-weight: 500; color: var(--bone); }
.set-row small, .set-item small { display: block; font-size: 11.5px; color: var(--bone-3); }
.set-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 9px; background: transparent; color: var(--bone); text-align: left; }
.set-item b { display: block; font-size: 13px; font-weight: 500; }
.set-item svg.i { color: var(--bone-2); }
.set-sep { height: 1px; margin: 5px 8px; background: var(--line); }
.set-head { padding: 6px 10px 4px; font-size: 11px; font-weight: 600; color: var(--bone-3); }
.set-keys { display: grid; gap: 2px; padding: 0 10px 6px; font-size: 12px; color: var(--bone-2); }
.set-keys div { display: flex; align-items: center; justify-content: space-between; padding: 3px 0; }
.set-keys dd { display: flex; gap: 3px; }
.search-pill { display: inline-flex; align-items: center; gap: 8px; width: 168px; height: 30px; padding: 0 6px 0 10px; border: 1px solid var(--line); border-radius: 15px; background: var(--muted); color: var(--bone-3); font-size: 12.5px; flex: none; }
.search-pill:hover { border-color: var(--line-2); color: var(--bone-2); }
.search-pill kbd { margin-left: auto; border-radius: 9px; }

/* ------------------------------------------------------------------ layout: library | the drawing | details, side panels only when asked for */
.desk { display: grid; grid-template-columns: var(--lib-col, var(--lib-w)) minmax(0, 1fr) var(--insp-col, 0px); height: calc(100% - 52px); transition: grid-template-columns .34s var(--ease); }
body.lib-off { --lib-col: 0px; }
body.insp-on { --insp-col: var(--insp-w); }
.reg, .insp { display: flex; flex-direction: column; min-height: 0; background: var(--panel); overflow: hidden; }
.reg { box-shadow: inset -1px 0 0 var(--line); }
.insp { box-shadow: inset 1px 0 0 var(--line); }
body.lib-off .reg, body:not(.insp-on) .insp { visibility: hidden; transition: visibility 0s linear .34s; }

/* ------------------------------------------------------------------ library */
.reg-tools { display: grid; gap: 10px; padding: 12px 12px 10px; }
.find { display: flex; align-items: center; gap: 7px; padding: 6px 9px; border: 1px solid transparent; border-radius: 8px; background: var(--muted); color: var(--bone-3); }
.find:focus-within { border-color: var(--line-2); box-shadow: 0 0 0 3px rgba(236, 230, 214, .08); color: var(--bone-2); }
.find input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 13px; color: var(--bone); }
.find input::placeholder { color: var(--bone-3); }
.find input::-webkit-search-cancel-button { filter: invert(.8); }
.filters { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.filters .popup { flex: 1 1 0; width: 0; max-width: none; }
.switch { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--bone-2); cursor: pointer; white-space: nowrap; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch span { position: relative; width: 28px; height: 16px; border-radius: 8px; background: rgba(236, 230, 214, .2); transition: background-color .2s; flex: none; }
.switch span::after { content: ""; position: absolute; left: 2px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--bone); transition: transform .2s var(--ease); box-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(12px); }
.switch input:focus-visible + span { outline: 2px solid rgba(236, 230, 214, .7); outline-offset: 2px; }
.rows { flex: 1; overflow-y: auto; padding: 2px 8px 14px; }
.reg-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 8px 2px 16px; }
.reg-head span { font-size: 12px; font-weight: 600; color: var(--bone-2); }
.grp { margin-top: 4px; }
.grp > summary { display: flex; align-items: center; gap: 6px; padding: 7px 8px; border-radius: 8px; list-style: none; cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--bone-2); user-select: none; }
.grp > summary::-webkit-details-marker { display: none; }
.grp > summary:hover { background: rgba(236, 230, 214, .05); color: var(--bone); }
.grp > summary svg.i { width: 13px; height: 13px; transition: transform .2s var(--ease); }
.grp[open] > summary svg.i { transform: rotate(90deg); }
.grp > summary #reg-count { margin-left: auto; font-weight: 400; color: var(--bone-3); }
.grp .reg-tools { padding: 6px 4px 8px; }
#demo { padding: 2px 0 4px; }
.ex { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border: 0; border-radius: 8px; background: transparent; color: var(--bone); text-align: left; font-size: 13px; }
.ex svg.i { color: var(--red-text); }
.ex small { margin-left: auto; font-size: 11px; color: var(--bone-3); }
.ex:hover { background: rgba(236, 230, 214, .06); }
.ex.on { background: rgba(236, 230, 214, .12); }
.row { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 10px; align-items: center; width: 100%; padding: 6px 8px; border: 0; border-radius: 8px; background: transparent; color: var(--bone); text-align: left; }
.row:hover { background: rgba(236, 230, 214, .05); }
.row.on { background: rgba(236, 230, 214, .12); }
.row img { width: 40px; height: 30px; object-fit: cover; border-radius: 5px; background: #fff; display: block; }
.row b { display: block; font-weight: 500; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row span { display: flex; align-items: center; gap: 6px; margin-top: 1px; font-size: 11px; color: var(--bone-3); white-space: nowrap; overflow: hidden; }
.row span svg.i { width: 12px; height: 12px; color: var(--bone-2); }
.more { padding: 12px; font-size: 11.5px; color: var(--bone-3); text-align: center; }
.more-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: calc(100% - 4px); margin: 8px 2px 0; padding: 8px; border: 0; border-radius: 8px; background: rgba(236, 230, 214, .06); color: var(--bone); font-size: 12.5px; font-weight: 500; }
.more-btn span { font-weight: 400; color: var(--bone-3); }
.more-btn:hover { background: rgba(236, 230, 214, .11); }

/* ------------------------------------------------------------------ sheet stage */
.board { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #0b0c0e; container: board / inline-size; }
.stage { position: relative; flex: 1; min-height: 0; overflow: hidden; cursor: grab; user-select: none; touch-action: none;
  background: radial-gradient(circle, rgba(236, 230, 214, .055) 1px, transparent 1.2px) 0 0 / 24px 24px, #0b0c0e; }
.stage.drag { cursor: grabbing; }
.stage.drop { outline: 2px dashed var(--red-text); outline-offset: -12px; }
.canvas { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.canvas.anim { transition: transform .42s cubic-bezier(.2, .8, .2, 1); }
.sheet { position: relative; background: var(--s-white); box-shadow: 0 0 0 1px rgba(0, 0, 0, .45), 0 30px 80px -24px rgba(0, 0, 0, .85); }
.sheet img { display: block; width: 100%; height: 100%; -webkit-user-drag: none; }
.sheet > svg.plan { display: block; width: 100%; height: 100%; }
.sheet svg.ov { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.sheet svg.ov.hl { mix-blend-mode: multiply; }
#three { position: absolute; left: 0; top: 0; width: 100%; height: calc(100% - var(--dock-h, 0px)); border: 0; background: #0b0c0e; }  /* ends above the ask dock */

/* takeoff marks: highlighter over each counted item, a numbered balloon beside it (paper colours) */
.shape { fill: var(--hl); stroke: #d9a900; stroke-width: var(--sw, 2px); stroke-linejoin: round; pointer-events: auto; cursor: pointer; animation: ink-in .22s both; }
.shape:hover { fill: #ffd000; }
.shape.focus { fill: #ffd000; stroke: var(--s-red); stroke-width: calc(var(--sw, 2px) * 1.7); }
.dim .shape:not(.focus) { fill-opacity: .4; stroke-opacity: .5; }
.balloon { pointer-events: auto; cursor: pointer; }
.balloon circle { fill: var(--s-white); stroke: var(--s-red); stroke-width: 1.6px; }
.balloon line { stroke: var(--s-red); stroke-width: 1.4px; }
.balloon .dot { fill: var(--s-red); stroke: none; }
.balloon text { fill: var(--s-red-ink); font: 600 10.5px var(--mono); text-anchor: middle; dominant-baseline: central; }
.balloon.focus circle { fill: var(--s-red); } .balloon.focus text { fill: #fff; }
.balloon.focus line { stroke-width: 2.2px; }
.dim .balloon:not(.focus) { opacity: .5; }
svg.plan .pl-ev, svg.plan .pl-ev > * { fill: var(--hl) !important; stroke: var(--s-red) !important; stroke-width: .28 !important; }
svg.plan .pl-ev.focus, svg.plan .pl-ev.focus > * { fill: #ffc400 !important; stroke-width: .6 !important; }
svg.plan [data-guid] { cursor: pointer; }
@keyframes ink-in { from { fill-opacity: 0; stroke-opacity: 0; } }
.route { fill: none; stroke: var(--s-red); stroke-width: calc(var(--sw, 2px) * 2.2); stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: calc(var(--sw, 2px) * 6) calc(var(--sw, 2px) * 3); animation: march 1.2s linear infinite; }
.route-end { fill: var(--s-red); stroke: var(--s-white); stroke-width: var(--sw, 2px); }
@keyframes march { to { stroke-dashoffset: calc(var(--sw, 2px) * -18); } }
svg.ov.gr .e { fill: none; stroke-linecap: round; }
svg.ov.gr .e.door { stroke: var(--s-ink); stroke-width: calc(var(--sw, 2px) * 1.3); }
svg.ov.gr .e.open { stroke: var(--s-ink); stroke-width: calc(var(--sw, 2px) * 1.3); stroke-dasharray: calc(var(--sw, 2px) * 3) calc(var(--sw, 2px) * 2.5); }
svg.ov.gr .e.wall { stroke: var(--s-ink-3); stroke-width: var(--sw, 2px); stroke-opacity: .45; stroke-dasharray: 1 calc(var(--sw, 2px) * 2.5); }
svg.ov.gr .dn { fill: var(--s-white); stroke: var(--s-ink); stroke-width: var(--sw, 2px); }
svg.ov.gr .n { fill: var(--s-ink); stroke: var(--s-white); stroke-width: var(--sw, 2px); pointer-events: auto; cursor: help; }
svg.ov.gr .n.out { fill: var(--s-red); }
.pulse { fill: none; pointer-events: none; transform-box: fill-box; transform-origin: center; }
.pulse.ring { stroke: var(--s-red); stroke-width: 2.4px; }
.pulse.wave { stroke: var(--s-red); stroke-width: 3px; animation: pulse-wave 1.3s cubic-bezier(.2, .7, .3, 1) infinite; }
@keyframes pulse-wave { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.55); opacity: 0; } }
.heat .shape.b-direct { fill: rgba(39, 158, 92, .5); stroke: var(--s-green); }
.heat .shape.b-inferred { fill: rgba(255, 184, 0, .55); stroke: var(--s-amber); }
.heat .shape.b-review { fill: rgba(222, 55, 40, .45); stroke: var(--s-red); }
.heat .shape.focus { stroke: var(--s-ink); }
.heat svg.plan .pl-ev.b-direct, .heat svg.plan .pl-ev.b-direct > * { fill: rgba(39, 158, 92, .55) !important; stroke: var(--s-green) !important; }
.heat svg.plan .pl-ev.b-inferred, .heat svg.plan .pl-ev.b-inferred > * { fill: rgba(255, 184, 0, .6) !important; stroke: var(--s-amber) !important; }
.heat svg.plan .pl-ev.b-review, .heat svg.plan .pl-ev.b-review > * { fill: rgba(222, 55, 40, .5) !important; stroke: var(--s-red) !important; }
.heat .balloon.b-direct circle { stroke: var(--s-green); } .heat .balloon.b-direct text { fill: var(--s-green); }
.heat .balloon.b-inferred circle { stroke: var(--s-amber); } .heat .balloon.b-inferred text { fill: var(--s-amber); }
.heat .balloon.focus circle { fill: var(--s-ink); stroke: var(--s-ink); } .heat .balloon.focus text { fill: #fff; }
.lg-box { fill: none; stroke: var(--s-red); stroke-width: 1.5px; stroke-dasharray: 6 4; }

/* floating controls over the sheet: glass capsules that leave the drawing in charge */
.hud, .vcap { position: absolute; z-index: 3; display: flex; align-items: center; gap: 2px; padding: 4px; border: 1px solid var(--line-2); border-radius: 12px;
  background: var(--glass); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); box-shadow: var(--float); color: var(--bone); }
.hud button { display: grid; place-items: center; min-width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: var(--bone-2); }
.hud button:hover { background: rgba(236, 230, 214, .1); color: var(--bone); }
.zoom { top: 12px; right: 12px; flex-direction: column; }
.zoom output { width: 34px; padding: 1px 0; text-align: center; font: 500 10px/1.4 var(--sans); color: var(--bone-3); }
.vcap { z-index: 6; top: 12px; left: 12px; gap: 4px; max-width: calc(100% - 80px); }
.vcap .seg { border: 0; background: rgba(236, 230, 214, .06); }
.vcap .popup { height: 30px; max-width: 220px; background-color: rgba(236, 230, 214, .06); border-color: transparent; }
.vsep { width: 1px; height: 18px; margin: 0 2px; background: var(--line-2); flex: none; }
.credit { position: absolute; left: 12px; bottom: 16px; z-index: 7; display: flex; align-items: center; gap: 6px; max-width: calc(50% - 360px); min-width: 28px; height: 28px; padding: 0 9px 0 7px; border-radius: 14px;
  background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); font-size: 11px; color: var(--bone-3); white-space: nowrap; overflow: hidden; }
.credit #credit { overflow: hidden; text-overflow: ellipsis; }
.credit svg.i { width: 14px; height: 14px; }
.credit a { color: var(--bone-2); }
.stage-msg { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; pointer-events: none; padding: 30px; text-align: center; }
.stage-msg:empty { display: none; }
.stage-msg div { max-width: 420px; padding: 16px 20px; border: 1px solid var(--line-2); border-radius: 14px; background: rgba(22, 24, 29, .97); box-shadow: 0 20px 50px -16px rgba(0, 0, 0, .8); font-size: 12.5px; color: var(--bone-2); }
.stage-msg b { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 600; color: var(--bone); }
.mark { display: block; width: 18px; height: 18px; margin: 0 auto 10px; border: 2px solid rgba(236, 230, 214, .18); border-top-color: var(--bone); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.heat-key { position: absolute; left: 12px; top: 64px; z-index: 3; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; max-width: calc(100% - 80px);
  padding: 7px 11px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--glass); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); font-size: 11.5px; color: var(--bone-2); }
.heat-key b { font-weight: 600; color: var(--bone); }
.heat-key .k { display: flex; align-items: center; gap: 5px; }
.heat-key .k i { width: 10px; height: 10px; border-radius: 3px; }
.heat-key .k em { font-style: normal; color: var(--bone-3); }
.heat-key .direct i { background: var(--green); } .heat-key .inferred i { background: var(--amber); } .heat-key .review i { background: var(--red-text); }
.heat-key small { flex-basis: 100%; color: var(--red-text); font-size: 11px; }

/* the start screen: nothing open, so uploading is the one big action */
.start { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; padding: 24px; overflow: auto; cursor: default; }
.start[hidden] { display: none; }
.start { grid-template-rows: auto auto auto; align-content: center; justify-items: center; gap: 12px; }
.start-btn { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 24px 0 19px; border: 0; border-radius: 23px; background: var(--bone); color: var(--ink); font: 600 15px/1 var(--sans);
  box-shadow: 0 12px 32px -14px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .55); transition: transform .15s var(--ease), opacity .15s; }
.start-btn svg.i { width: 18px; height: 18px; stroke-width: 1.9; }
.start-btn:hover { transform: translateY(-1px); opacity: .94; }
.start-btn:active { transform: scale(.98); }
.stage.drop .start-btn { transform: scale(1.05); }
.start-sub { font-size: 13px; color: var(--bone-3); }
.link { padding: 0; border: 0; background: none; color: var(--bone); font: inherit; text-decoration: underline; text-decoration-color: rgba(236, 230, 214, .35); text-underline-offset: 3px; cursor: pointer; }
.link:hover { text-decoration-color: var(--bone); }
.start small { min-height: 1.4em; max-width: 46ch; font-size: 12px; line-height: 1.4; color: var(--bone-3); text-align: center; }
/* nothing open: only the logo, the gear and the upload symbol */
body.no-drawing .vcap, body.no-drawing .dock, body.no-drawing .hud.zoom, body.no-drawing .credit, body.no-drawing .tb-title,
body.no-drawing .tb-upload, body.no-drawing .search-pill { display: none !important; }
body.no-drawing .stage { cursor: default; }

/* a narrow drawing area: the source credit folds into its (i) and opens on hover */
@container board (max-width: 1100px) {
  .credit { max-width: 28px; padding: 0 7px; transition: max-width .25s var(--ease); }
  .credit:hover, .credit:focus-visible { max-width: calc(100% - 24px); z-index: 9; background: rgba(22, 24, 29, .97); }
}

/* split view: a second sheet beside the first */
.stages { position: relative; flex: 1; min-height: 0; display: flex; }
.stages > .stage { flex: 1; min-width: 0; }
.stage2 { flex: 1; min-width: 0; display: flex; flex-direction: column; border-left: 1px solid var(--line-2); background: #0b0c0e; }
.stage2.hidden { display: none; }
.stage2 header { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--panel); border-bottom: 1px solid var(--line); }
.stage2 header .lbl { font-weight: 600; color: var(--bone-2); }
.stage2 select { flex: 1; min-width: 0; appearance: none; padding: 5px 8px; border: 1px solid var(--line-2); border-radius: 7px; background: var(--muted); color: var(--bone); font-size: 12px; }
.board.split .dock { left: 25%; width: min(560px, calc(50% - 32px)); }
.s2-view { position: relative; flex: 1; min-height: 0; overflow: hidden; cursor: grab; user-select: none; touch-action: none;
  background: radial-gradient(circle, rgba(236, 230, 214, .055) 1px, transparent 1.2px) 0 0 / 24px 24px, #0b0c0e; }

/* ------------------------------------------------------------------ the ask dock: the answer card above the question box, bottom centre */
.dock { position: absolute; z-index: 6; left: 50%; bottom: 16px; transform: translateX(-50%); width: min(660px, calc(100% - 120px)); display: flex; flex-direction: column; gap: 8px; }
.ask { display: flex; align-items: flex-end; gap: 2px; padding: 5px; border: 1px solid var(--line-2); border-radius: 22px; background: var(--glass);
  backdrop-filter: blur(24px) saturate(1.5); -webkit-backdrop-filter: blur(24px) saturate(1.5); box-shadow: var(--float); transition: border-color .15s, box-shadow .15s; }
.ask:focus-within { border-color: rgba(236, 230, 214, .34); box-shadow: var(--float), 0 0 0 4px rgba(236, 230, 214, .06); }
.ask textarea { flex: 1; min-width: 0; max-height: 120px; padding: 7px 6px; border: 0; outline: 0; resize: none; background: transparent; font-size: 14.5px; line-height: 1.4; color: var(--bone); }
.ask textarea::placeholder { color: var(--bone-3); }
.ask textarea:disabled { cursor: not-allowed; }
.ask .icon-btn { width: 32px; height: 32px; border-radius: 50%; }
.ask .mic.live { background: rgba(255, 90, 74, .18); color: var(--red-text); }
#btn-hist { position: relative; }
#btn-hist[aria-expanded="true"] { background: rgba(236, 230, 214, .14); color: var(--bone); }
#hist-n { position: absolute; top: -3px; right: -4px; box-shadow: 0 0 0 2px #15171b; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px; background: var(--bone); color: var(--ink); font: 700 9.5px/15px var(--sans); text-align: center; }
#hist-n:empty { display: none; }
.send { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border: 0; border-radius: 50%; background: var(--bone); color: var(--ink); transition: opacity .15s, transform .15s; }
.send svg.i { width: 15px; height: 15px; stroke-width: 2.2; }
.send:hover { transform: scale(1.05); }
.send:disabled { opacity: .35; cursor: progress; transform: none; }

/* the answer card: the question, the answer, its check, and a stepper through the marks */
.card { padding: 10px 10px 10px 16px; border: 1px solid var(--line-2); border-radius: 18px; background: var(--glass);
  backdrop-filter: blur(24px) saturate(1.5); -webkit-backdrop-filter: blur(24px) saturate(1.5); box-shadow: var(--float); animation: card-in .3s var(--ease); }
@keyframes card-in { from { opacity: 0; transform: translateY(8px) scale(.99); } }
.dock:has(.hist:not([hidden])) .card { display: none; }
.c-top { display: flex; align-items: center; gap: 6px; }
.c-q { flex: 1; min-width: 0; font-size: 12.5px; color: var(--bone-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-btn { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px 0 8px; border: 0; border-radius: 13px; background: rgba(236, 230, 214, .07); color: var(--bone-2); font-size: 12px; font-weight: 500; flex: none; }
.c-btn svg.i { width: 14px; height: 14px; }
.c-btn:hover { background: rgba(236, 230, 214, .12); color: var(--bone); }
.c-btn[aria-expanded="true"] { background: rgba(236, 230, 214, .18); color: var(--bone); }
.card .c-x { width: 26px; height: 26px; border-radius: 50%; }
.card .c-x svg.i { width: 14px; height: 14px; }
.c-a { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 2px 6px 0 0; min-height: 40px; }
.card .val { font-size: 34px; }
.card .val.word { font-size: 22px; }
.card .lines { flex: 1; min-width: 0; }
.card .lines li { padding: 3px 0; }
.c-text { flex: 1; min-width: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; line-height: 1.45; color: var(--bone); }
.c-text.muted { font-size: 13px; color: var(--bone-2); }
.c-link { margin-top: 4px; padding: 0; border: 0; background: none; font-size: 12px; color: var(--bone-3); text-decoration: underline; text-decoration-color: rgba(236, 230, 214, .3); text-underline-offset: 3px; }
.c-link:hover { color: var(--bone); }
.c-why { display: grid; gap: 8px; margin: 6px 6px 2px 0; }
.c-why p { font-size: 13px; line-height: 1.45; color: var(--bone-2); }
.c-alts { display: flex; flex-wrap: wrap; gap: 5px; }
.alt { padding: 5px 11px; border: 1px solid var(--line-2); border-radius: 999px; background: rgba(236, 230, 214, .05); color: var(--bone); font-size: 12px; text-align: left; }
.alt:hover { background: rgba(236, 230, 214, .12); }
.c-step { display: flex; align-items: center; gap: 2px; margin: 8px 0 -2px -8px; padding-top: 6px; border-top: 1px solid var(--line); }
.c-step .icon-btn { width: 28px; height: 28px; border-radius: 50%; }
.c-step output { flex: 1; min-width: 0; padding: 0 6px; font-size: 12.5px; color: var(--bone-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-step output b { font: 600 12px var(--mono); color: var(--bone); }
.c-step output i { font: 400 12px var(--mono); font-style: normal; color: var(--bone-3); }
.c-step output em { font-style: normal; color: var(--bone-3); }
.st-all { height: 26px; padding: 0 11px; border: 0; border-radius: 13px; background: rgba(236, 230, 214, .07); color: var(--bone-2); font-size: 12px; font-weight: 500; }
.st-all:hover { background: rgba(236, 230, 214, .12); color: var(--bone); }
.wait { display: flex; align-items: center; gap: 9px; padding: 8px 0 4px; font-size: 13px; color: var(--bone-2); }
.wait::before { content: ""; width: 14px; height: 14px; border: 2px solid rgba(236, 230, 214, .18); border-top-color: var(--bone); border-radius: 50%; animation: spin .8s linear infinite; }

/* earlier answers: a menu that grows out of the question box */
.hist { max-height: min(320px, 50vh); overflow-y: auto; padding: 6px; border: 1px solid var(--line-2); border-radius: 16px; background: rgba(22, 24, 29, .97);
  box-shadow: var(--float); animation: pal-in .16s var(--ease); }
.hist[hidden] { display: none; }
.hist-head { padding: 6px 10px 4px; font-size: 11px; font-weight: 600; color: var(--bone-3); }
.h-row { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; color: var(--bone); text-align: left; font-size: 13px; }
.h-row:hover { background: rgba(236, 230, 214, .07); }
.h-row.on { background: rgba(236, 230, 214, .12); }
.h-row span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-row b { font: 600 12.5px var(--brand); white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.h-row i { width: 7px; height: 7px; border-radius: 50%; }

/* values and checks (card and details share these) */
.rec-a { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.val { font: 600 44px/.95 var(--brand); letter-spacing: -.035em; color: var(--bone); }
.val small { margin-left: 6px; font: 500 15px var(--sans); letter-spacing: 0; color: var(--bone-2); }
.val.word { font-size: 26px; letter-spacing: -.02em; }
.val.no { font: 400 13.5px/1.45 var(--sans); letter-spacing: 0; color: var(--bone-2); }
.lines { list-style: none; width: 100%; font-size: 12.5px; }
.lines li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.lines li:last-child { border-bottom: 0; }
.lines li span { font-weight: 500; } .lines li em { font: 400 11.5px var(--mono); font-style: normal; color: var(--bone-2); text-align: right; }
.lines li.sub span { font-weight: 400; padding-left: 12px; color: var(--bone-2); }
.lines li.long { display: block; }
.lines li.long em { display: block; margin-top: 2px; font: 400 12px/1.45 var(--sans); text-align: left; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px 4px 7px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; flex: none; animation: pill-in .3s var(--ease) both; }
.pill svg.i { width: 13px; height: 13px; stroke-width: 2; }
.pill.ok { background: rgba(76, 201, 138, .14); color: var(--green); }
.pill.bad { background: rgba(255, 90, 74, .15); color: var(--red-text); }
.pill.est { background: rgba(242, 179, 61, .15); color: var(--amber); }
.pill.calc { background: rgba(90, 138, 224, .17); color: #9cbcf3; }
.pill.none { background: rgba(236, 230, 214, .08); color: var(--bone-3); }
.dot.ok { background: var(--green); } .dot.bad { background: var(--red-text); } .dot.est { background: var(--amber); } .dot.calc { background: var(--blue); } .dot.none { background: var(--bone-3); }
@keyframes pill-in { from { opacity: 0; transform: scale(.85); } }
.summary { margin-top: 8px; font-size: 11.5px; color: var(--bone-3); }
.summary b { font-weight: 500; color: var(--bone-2); }

/* ------------------------------------------------------------------ details: everything behind the answer, one panel, grouped */
.insp-head { display: flex; align-items: center; justify-content: space-between; height: 46px; padding: 0 8px 0 18px; flex: none; }
.insp-head h2 { font-size: 13px; font-weight: 600; }
.insp-body { flex: 1; min-height: 0; overflow-y: auto; width: var(--insp-w); padding: 0 18px 28px; }
.i-sec { padding: 14px 0; border-top: 1px solid var(--line); }
.i-sec:first-child { padding-top: 2px; border-top: 0; }
.i-sec > h3 { margin-bottom: 10px; font-size: 11.5px; font-weight: 600; color: var(--bone-3); }
.i-q { margin-bottom: 10px; font-size: 13px; line-height: 1.45; color: var(--bone-2); }
.i-sec .crew { margin-top: 12px; }
.i-lines { margin-top: 12px; }

/* evidence */
.take-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.take-head .lbl { font-weight: 600; color: var(--bone-2); }
.take-head .lbl b { font-weight: 500; color: var(--bone-3); }
.take-head div { display: flex; gap: 6px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 5px; max-height: 176px; overflow-y: auto; padding: 2px; }
.th { position: relative; aspect-ratio: 1; padding: 0; border: 0; border-radius: 6px; background-color: #fff; background-repeat: no-repeat; overflow: hidden; box-shadow: 0 0 0 1px rgba(0, 0, 0, .4); }
.th:hover, .th.focus { box-shadow: 0 0 0 2px var(--red-text); }
.th, .st, .el { cursor: pointer; }
.th u { position: absolute; background: var(--hl); mix-blend-mode: multiply; }
.tag { position: absolute; left: 3px; top: 3px; z-index: 1; min-width: 15px; padding: 1px 4px; border-radius: 4px; background: var(--s-red); color: #fff; font: 600 9.5px/1.3 var(--mono); text-align: center; }
.strips { display: grid; gap: 4px; max-height: 200px; overflow: auto; justify-items: start; padding: 2px; }
.st { position: relative; height: 22px; padding: 0; border: 0; border-radius: 4px; background-color: #fff; background-repeat: no-repeat; box-sizing: content-box; overflow: hidden; box-shadow: 0 0 0 1px rgba(0, 0, 0, .4); }
.st::after { content: ""; position: absolute; inset: 0 0 0 22px; background: var(--hl); mix-blend-mode: multiply; }
.st:hover, .st.focus { box-shadow: 0 0 0 2px var(--red-text); }
.elist { display: grid; gap: 1px; max-height: 190px; overflow-y: auto; }
.el { position: relative; display: flex; align-items: baseline; gap: 10px; padding: 6px 8px 6px 32px; border: 0; border-radius: 7px; background: transparent; color: var(--bone); text-align: left; font-size: 12.5px; }
.el:hover, .el.focus { background: rgba(236, 230, 214, .08); }
.el .tag { top: 50%; left: 6px; transform: translateY(-50%); }
.el em { margin-left: auto; font: 400 11.5px var(--mono); font-style: normal; color: var(--bone-2); }
.note { margin: 10px 0 0; padding-left: 9px; border-left: 2px solid rgba(255, 90, 74, .55); font-size: 11.5px; color: var(--bone-3); }

/* nothing could answer: the reason, and questions that will work */
.why { display: grid; gap: 8px; font-size: 12.5px; line-height: 1.45; color: var(--bone-2); }
.why-next { color: var(--bone); font-weight: 500; }
.why-alts { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.why-alts .lbl { width: 100%; }
.why-checked summary { font-size: 11.5px; color: var(--bone-3); cursor: pointer; }
.why-checked ul { margin: 5px 0 0; padding-left: 16px; font-size: 11.5px; }

/* how it was found: method, cost, crew, audit, references, legend */
.spec { display: grid; grid-template-columns: 64px minmax(0, 1fr); font-size: 12px; }
.spec dt { padding: 5px 0; border-bottom: 1px solid var(--line); color: var(--bone-3); font-size: 11.5px; }
.spec dd { padding: 5px 0 5px 8px; border-bottom: 1px solid var(--line); min-width: 0; overflow-wrap: anywhere; }
.spec code { font: 500 11px/1.5 var(--mono); padding: 1px 4px; border-radius: 4px; background: rgba(236, 230, 214, .08); box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.spec .zero { color: var(--green); font-weight: 500; }
.conf { display: inline-flex; gap: 2px; margin-right: 6px; vertical-align: 1px; }
.conf i { width: 7px; height: 7px; border-radius: 2px; background: rgba(236, 230, 214, .18); } .conf i.f { background: var(--bone); }
.crew { display: grid; gap: 6px; }
.crew-run { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; font-size: 11px; }
.crew-run li { display: flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; background: rgba(236, 230, 214, .06); color: var(--bone-2); }
.crew-run li i { font-style: normal; font-size: 10px; color: var(--bone-3); }
.crew-run li.declined b { text-decoration: line-through; color: var(--bone-3); }
.crew-run li.answered { background: rgba(236, 230, 214, .12); color: var(--bone); }
.crew-run li.checked { background: rgba(76, 201, 138, .14); color: var(--green); }
.audit { list-style: none; display: grid; gap: 4px; font-size: 11.5px; line-height: 1.4; color: var(--bone-2); }
.audit li { display: grid; grid-template-columns: 16px 1fr; gap: 6px; align-items: start; }
.audit .mk { width: 15px; height: 15px; display: grid; place-items: center; margin-top: 1px; border-radius: 50%; font: 700 9px/1 var(--mono); background: rgba(236, 230, 214, .1); }
.audit b { font-weight: 600; color: var(--bone); }
.audit .pass .mk { background: rgba(76, 201, 138, .2); color: var(--green); } .audit .warn .mk { background: rgba(242, 179, 61, .2); color: var(--amber); }
.audit .fail .mk { background: var(--red); color: #fff; } .audit .info .mk { color: var(--bone-3); }
.xrefs { display: grid; gap: 8px; }
.xref { display: grid; grid-template-columns: 88px 14px minmax(0, 1fr); gap: 6px 8px; align-items: center; }
.xref figure { margin: 0; display: grid; gap: 3px; }
.xref figure img { width: 100%; height: auto; display: block; border-radius: 5px; background: #fff; }
.xref figure.none { align-self: stretch; border: 1px dashed var(--line-2); border-radius: 5px; place-items: center; padding: 6px; }
.xref figcaption { font-size: 10.5px; line-height: 1.35; color: var(--bone-3); }
.xref figcaption b { color: var(--bone); } .xref figcaption i { font-style: normal; }
.xref .arrow { font-size: 13px; color: var(--red-text); text-align: center; }
.xref .btn { grid-column: 3; justify-self: start; }
.ref-text { margin: 8px 0 0; font: 400 12px/1.5 var(--sans); white-space: pre-wrap; color: var(--bone-2); }
.legend .take-head { margin-bottom: 6px; }
.lg-thumb { position: relative; display: block; width: 100%; max-width: 320px; padding: 0; border: 0; border-radius: 6px; background-color: #fff; background-repeat: no-repeat; overflow: hidden; cursor: zoom-in; }
.lg-thumb u { position: absolute; border: 2px solid var(--s-red); background: rgba(255, 226, 74, .45); mix-blend-mode: multiply; animation: pulse-row 1.3s ease-in-out infinite alternate; }
@keyframes pulse-row { from { box-shadow: 0 0 0 0 rgba(207, 42, 30, .5); } to { box-shadow: 0 0 0 5px rgba(207, 42, 30, 0); } }

/* ------------------------------------------------------------------ command palette (⌘K) */
.palette { width: min(640px, 92vw); max-height: 72vh; margin: 13vh auto auto; padding: 0; border: 1px solid var(--line-2); border-radius: 16px; background: rgba(22, 24, 29, .985); color: var(--bone);
  box-shadow: 0 40px 120px rgba(0, 0, 0, .75); overflow: hidden; }
.palette[open] { display: flex; flex-direction: column; animation: pal-in .18s var(--ease); }
.palette::backdrop { background: rgba(0, 0, 0, .45); }
@keyframes pal-in { from { opacity: 0; transform: translateY(-6px) scale(.985); } }
.pal-in { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--bone-3); }
.pal-in svg.i { width: 18px; height: 18px; }
.pal-in input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 16px; color: var(--bone); }
.pal-in input::placeholder { color: var(--bone-3); }
.pal-list { flex: 1; overflow-y: auto; padding: 6px; }
.pal-sect { padding: 8px 10px 4px; font-size: 11px; font-weight: 600; color: var(--bone-3); }
.pal-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border: 0; border-radius: 9px; background: transparent; color: var(--bone); text-align: left; font-size: 13.5px; }
.pal-item svg.i { color: var(--bone-2); }
.pal-item img { width: 34px; height: 26px; object-fit: cover; border-radius: 4px; background: #fff; flex: none; }
.pal-item .pi-t { min-width: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pal-item .pi-sub { font-size: 11.5px; color: var(--bone-3); white-space: nowrap; }
.pal-item[aria-selected="true"] { background: rgba(236, 230, 214, .12); }
.pal-empty { padding: 18px 12px; text-align: center; font-size: 12.5px; color: var(--bone-3); }
.pal-foot { display: flex; align-items: center; gap: 4px; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 11px; color: var(--bone-3); }
.pal-foot kbd { margin-left: 6px; } .pal-foot kbd:first-child { margin-left: 0; }

/* ------------------------------------------------------------------ test report */
.report { width: min(920px, 94vw); max-height: 88vh; padding: 0; border: 1px solid var(--line-2); border-radius: 18px; background: var(--card); color: var(--bone); box-shadow: 0 40px 120px rgba(0, 0, 0, .75); overflow-y: auto; }
.report::backdrop { background: rgba(0, 0, 0, .5); }
.report > header { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); background: var(--card); }
.report h2 { margin-top: 2px; font: 600 22px/1.15 var(--brand); letter-spacing: -.03em; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.kpi { padding: 16px 22px; border-right: 1px solid var(--line); } .kpi:last-child { border-right: 0; }
.kpi b { display: block; font: 600 32px/1 var(--brand); letter-spacing: -.03em; }
.kpi span { display: block; margin-top: 6px; font-size: 11.5px; color: var(--bone-3); }
.kpi:nth-child(-n + 2) b { color: var(--green); }
.group { padding: 18px 22px 6px; }
.group h3 { margin-bottom: 4px; font-size: 13px; font-weight: 600; }
.group > p { margin-bottom: 8px; max-width: 760px; font-size: 12.5px; color: var(--bone-2); }
.brow { display: grid; grid-template-columns: 230px 1fr 64px; gap: 16px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); }
.brow b { display: block; font-size: 13px; font-weight: 500; } .brow small { display: block; margin-top: 2px; font-size: 11px; color: var(--bone-3); }
.bar { height: 10px; border-radius: 5px; background: rgba(236, 230, 214, .08); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 0 5px 5px 0; background: rgba(236, 230, 214, .35); }
.bar.ev i, .bar.top i { background: var(--blue); }
.brow output { font: 600 13px var(--mono); text-align: right; }
.fine { margin-top: 12px; padding: 12px 22px 20px; border-top: 1px solid var(--line); }
.fine p { margin-bottom: 6px; max-width: 800px; font-size: 12px; color: var(--bone-3); }

.tip { position: fixed; z-index: 30; max-width: 340px; padding: 5px 9px; border-radius: 7px; background: var(--bone); color: var(--s-ink); font-size: 11.5px; line-height: 1.35; pointer-events: none; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); }

/* ------------------------------------------------------------------ smaller screens, reduced motion */
@media (max-width: 1320px) { :root { --lib-w: 248px; --insp-w: 340px; } .search-pill { width: auto; } .search-pill .sp-text { display: none; } }
@media (max-width: 1100px) { .tb-brand .tb-wm { display: none; } }
@media (max-width: 900px) {
  /* side panels float over the drawing instead of squeezing it */
  .desk, body.lib-off .desk, body.insp-on .desk { grid-template-columns: minmax(0, 1fr); }
  .reg { position: fixed; z-index: 20; top: 52px; bottom: 0; left: 0; width: min(320px, 88vw); box-shadow: 30px 0 60px -20px rgba(0, 0, 0, .8); transition: transform .3s var(--ease), visibility 0s; }
  body.lib-off .reg { transform: translateX(-102%); transition: transform .3s var(--ease), visibility 0s linear .3s; }
  .insp { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; max-height: 72vh; border: 1px solid var(--line-2); border-bottom: 0; border-radius: 18px 18px 0 0;
    box-shadow: 0 -30px 80px -20px rgba(0, 0, 0, .9); transition: transform .32s var(--ease), visibility 0s; }
  body:not(.insp-on) .insp { transform: translateY(102%); transition: transform .32s var(--ease), visibility 0s linear .32s; }
  .insp-body { width: auto; }
  .dock { width: calc(100% - 24px); bottom: 12px; }
  .credit { display: none; }
  .tb-title { max-width: 40vw; }
}
@media (max-width: 640px) {
  .tb { grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; }
  .tb-title { max-width: none; text-align: left; }
  .tb-title p { display: none; }
  .tb-upload { width: 30px; padding: 0; justify-content: center; } .tbu-t { display: none; }
  .vcap { max-width: calc(100% - 70px); overflow-x: auto; }
  .vcap .popup { max-width: 120px; }
  .card .val { font-size: 28px; }
  #mic { display: none; }
  .search-pill { padding: 0 8px; } .search-pill kbd, .c-step .hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .pill, .shape, .mark, .wait::before, .palette[open], .route, .pulse.wave, .lg-thumb u, .settings, .card, .hist { animation: none; }
  .canvas.anim, .switch span::after, .desk, .reg, .insp, .credit { transition: none; }
}
