/* Approved V.I. functional workspace. Only the centre manifestation is raster artwork. */
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) {
  --vi-reference-ratio: 1.8698060942;
  --vi-canvas-width: min(100vw, calc(100dvh * var(--vi-reference-ratio)));
  --vi-canvas-height: min(100dvh, calc(100vw / var(--vi-reference-ratio)));
  --vi-primary-neon: #168cff;
  --vi-edge-cyan: #41dcff;
  color-scheme: dark;
  background: #01060b;
}
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) body {
  overflow: hidden;
  background: radial-gradient(circle at 50% 42%, rgba(0,70,144,.13), transparent 52%), #01060b;
}
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) .vi-shell {
  display: block; min-height: 100dvh; background: transparent;
}
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) .vi-rail,
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) .vi-header,
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) [data-vi-screen="workspace"] > .workspace-mobile-tabs,
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) [data-vi-screen="workspace"] > .workspace-command { display: none !important; }
/* .project-picker is intentionally NOT in the forced-hide list above — its own [hidden]
   attribute (styles.css base rule, native browser default) is the only thing that hides it.
   Root cause of the first-owner setup panel being permanently unreachable: this file previously
   forced `.project-picker { display: none !important; }` unconditionally, regardless of whether
   the section actually carried the `hidden` attribute. */
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) .vi-main,
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) .vi-content,
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) [data-vi-screen="workspace"].vi-screen--active,
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) .workspace-living-visual-panel {
  width: 100%; max-width: none; height: 100dvh; min-height: 100dvh; margin: 0; padding: 0; overflow: hidden; background: transparent;
}
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) [data-vi-screen="workspace"].vi-screen--active { display: block; }

/* A VISIBLE (non-[hidden]) project-picker takes over: it participates in normal document flow
   with its own intrinsic height, the shell/main/content grow to fit it instead of staying pinned
   to a fixed 100dvh pixel-workspace row, and the page scrolls vertically (never horizontally)
   while it's shown. This is the first-owner setup panel — it must never be covered by the
   fixed-height workspace row underneath it. */
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace):has(.project-picker:not([hidden])) body {
  overflow-x: hidden;
  overflow-y: auto;
}
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace):has(.project-picker:not([hidden])) .vi-shell {
  min-height: 100dvh;
  height: auto;
}
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace):has(.project-picker:not([hidden])) .vi-main,
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace):has(.project-picker:not([hidden])) .vi-content,
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace):has(.project-picker:not([hidden])) [data-vi-screen="workspace"].vi-screen--active {
  height: auto;
  min-height: 100dvh;
  overflow: visible;
}
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace):has(.project-picker:not([hidden])) .project-picker {
  display: block;
  overflow: visible;
  height: auto;
}
/* The fixed-height pixel-workspace row must begin AFTER the picker, never stack underneath it —
   it stays a normal-flow sibling rather than being pinned/absolutely positioned. */
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace):has(.project-picker:not([hidden])) .workspace-living-visual-panel {
  height: 100dvh;
  min-height: 100dvh;
}

.vi-pixel-workspace {
  display: grid; width: 100%; height: 100dvh; place-items: center; overflow: hidden;
  color: #b9dbff; background: transparent;
  font-family: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", Quicksand, Nunito, Comfortaa, "Segoe UI Variable", system-ui, -apple-system, sans-serif;
}
.vi-pixel-workspace__canvas {
  position: relative; isolation: isolate; width: var(--vi-canvas-width); height: var(--vi-canvas-height); overflow: hidden;
  border: 1px solid rgba(66,157,255,.58); border-radius: 8px;
  background:
    linear-gradient(rgba(5,19,35,.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(5,19,35,.3) 1px, transparent 1px),
    radial-gradient(circle at 49% 38%, rgba(0,80,165,.16), transparent 38%),
    linear-gradient(145deg,#020b13,#01060b 62%,#030e1a);
  background-size: 22px 22px,22px 22px,auto,auto;
  box-shadow: 0 0 17px rgba(0,123,255,.44),0 0 60px rgba(0,91,191,.28),inset 0 0 30px rgba(26,137,255,.12);
  animation: vi-dashboard-breathe 3.2s ease-in-out infinite;
}
.vi-pixel-workspace__canvas::before {
  position: absolute; z-index: 30; inset: 3px; border: 1px solid rgba(45,141,244,.28); border-radius: 5px;
  box-shadow: inset 0 0 18px rgba(0,123,255,.16); content: ""; pointer-events: none;
}
.vi-dashboard-topbar {
  position: absolute; z-index: 12; inset: 0 0 auto; display: grid; grid-template-columns: 14% 15% 31% 27% 13%;
  height: 10%; border-bottom: 1px solid rgba(37,131,232,.46);
  background: linear-gradient(180deg,rgba(3,14,23,.99),rgba(1,8,14,.96)); box-shadow: 0 2px 16px rgba(0,123,255,.16);
}
.vi-dashboard-topbar > * { min-width: 0; border-right: 1px solid rgba(36,106,180,.24); }
.vi-dashboard-brand { display: flex; align-items: center; gap: 8%; padding: 5% 8%; }
.vi-dashboard-brand img { width: 31%; max-height: 86%; object-fit: contain; filter: drop-shadow(0 0 7px #1687ff); }
.vi-dashboard-brand span,.vi-dashboard-stage,.vi-dashboard-continuity,.vi-dashboard-working {
  display: flex; min-width: 0; flex-direction: column; justify-content: center;
}
.vi-dashboard-brand strong,.vi-dashboard-stage strong {
  overflow: hidden; color: #e3f1ff; font-size: clamp(8px,1.02vw,18px); letter-spacing: .06em; line-height: 1.05;
  text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 0 8px rgba(58,153,255,.7);
}
.vi-dashboard-brand small,.vi-dashboard-stage small,.vi-dashboard-working small {
  color: #72a1d3; font-size: clamp(5px,.54vw,10px); font-weight: 700; letter-spacing: .1em;
}
.vi-dashboard-stage { padding: 4% 8%; }
.vi-dashboard-stage strong { color: #e8e1d7; text-shadow: 0 0 9px rgba(255,199,128,.2); }
.vi-dashboard-stage small { margin-top: 3px; color: #d2c6b4; }

/* Local Environment header — replaces the former Project Egg / Stage label in this same cell.
   Weather color is neutral (matches the existing small-label color) — it must never imply
   evidence, approval, warning, or authority state. */
.vi-local-environment { display: flex; align-items: center; gap: 6px; min-width: 0; }
.vi-local-environment-icon { display: flex; flex: 0 0 auto; align-items: center; color: #9fc2e8; }
.vi-local-environment-icon svg { display: block; }
.vi-local-environment-lines { display: flex; min-width: 0; flex-direction: column; justify-content: center; }
.vi-local-environment-primary,
.vi-local-environment-secondary { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vi-local-environment-toggle {
  flex: 0 0 auto; margin-left: 4px; padding: 2px 8px;
  font-size: clamp(5px,.5vw,9px); letter-spacing: .06em; text-transform: uppercase;
  background: transparent; border: 1px solid rgba(159,194,232,.4); border-radius: 999px; color: #9fc2e8;
  cursor: pointer;
}
.vi-local-environment-toggle:hover,
.vi-local-environment-toggle:focus-visible { background: rgba(159,194,232,.12); }
.vi-dashboard-selectors { display: grid; grid-template-columns: 1fr 1fr; gap: 4%; align-content: center; padding: 3% 4%; }
.vi-dashboard-selectors label {
  display: flex; min-width: 0; align-items: center; gap: 5%; min-height: 28px; padding: 0 6%;
  border: 1px solid rgba(41,144,255,.26); border-radius: 3px;
  background: linear-gradient(180deg,rgba(7,32,58,.55),rgba(2,15,29,.85));
  box-shadow: 0 0 8px rgba(0,123,255,.12),inset 0 0 12px rgba(0,123,255,.07);
  color: #91bbe7; font-size: clamp(5px,.5vw,9px); font-weight: 800; letter-spacing: .05em; white-space: nowrap;
}
.vi-dashboard-selectors select {
  min-width: 0; flex: 1 1 auto; padding: 0; border: 0; border-radius: 0;
  color: #d6eaff; background: transparent; box-shadow: none;
  font: 700 clamp(6px,.56vw,10px)/1 ui-rounded,"SF Pro Rounded",Quicksand,Nunito,Comfortaa,system-ui,sans-serif;
}
.vi-dashboard-selectors p {
  grid-column: 1/-1; overflow: hidden; margin: 0; color: #95b3d4;
  font: 500 clamp(5px,.48vw,9px)/1.2 ui-rounded,"SF Pro Rounded",Quicksand,Nunito,Comfortaa,system-ui,sans-serif;
  text-overflow: ellipsis; white-space: nowrap;
}
.vi-dashboard-continuity {
  gap: 8%; padding: 2% 6%; font: 800 clamp(6px,.6vw,11px)/1.1 ui-rounded,"SF Pro Rounded",Quicksand,Nunito,Comfortaa,system-ui,sans-serif; letter-spacing: .04em;
}
.status-ok { color: #50dc8b; text-shadow: 0 0 8px rgba(54,235,139,.4); }
.vi-dashboard-working { position: relative; padding: 2% 9% 2% 29%; color: #98c3f2; font-size: clamp(5px,.55vw,10px); }
.vi-dashboard-working > span { position: absolute; left: 9%; color: #1687ff; font-size: clamp(12px,1.6vw,28px); text-shadow: 0 0 10px #007bff; }
.vi-dashboard-working small { color: #4fdb91; }
.vi-dashboard-kebab {
  position: absolute; top: 50%; right: 2%; padding: 0 3px; color: #6fa9e6; border: 0; background: none;
  font-size: clamp(9px,1vw,16px); line-height: 1; cursor: pointer; transform: translateY(-50%);
}
.vi-dashboard-kebab:hover,.vi-dashboard-kebab:focus-visible { color: #3798ff; text-shadow: 0 0 8px #007bff; }

.vi-dashboard-rail {
  position: absolute; z-index: 13; top: 10%; bottom: 20%; left: 0; display: grid; width: 5.5%;
  grid-template-rows: repeat(5,1fr) 1.3fr; border-right: 1px solid rgba(39,128,223,.42);
  background: rgba(1,9,16,.97); box-shadow: 3px 0 14px rgba(0,123,255,.12);
}
.vi-dashboard-rail button {
  display: grid; min-width: 0; place-items: center; align-content: center; gap: 4px; padding: 2px; border: 0;
  border-bottom: 1px solid rgba(36,106,180,.18); color: #a1bddb; background: transparent;
  font: 600 clamp(5px,.48vw,9px)/1.1 ui-rounded,"SF Pro Rounded",Quicksand,Nunito,Comfortaa,system-ui,sans-serif; cursor: pointer;
}
.vi-dashboard-rail button span { color: #90b8e3; font-size: clamp(10px,1.12vw,20px); }
.vi-dashboard-rail button:is(:hover,:focus-visible,.is-active) {
  color: #d8ebff; outline: 0; background: transparent; box-shadow: inset 3px 0 #268fff;
}
.vi-dashboard-rail button:is(:hover,:focus-visible,.is-active) span { color: #50a5ff; text-shadow: 0 0 9px #1385ff; }
.vi-conversation-backing {
  position: absolute; top: 10%; bottom: 20%; left: 5.5%; width: 23.5%; border-right: 1px solid rgba(34,124,221,.4);
  background: linear-gradient(145deg,rgba(2,14,27,.99),rgba(1,9,17,.98)); box-shadow: inset -8px 0 18px rgba(0,92,190,.08);
}

.vi-manifestation {
  position: absolute; z-index: 3; top: 10%; left: 29%; width: 31%; height: 52.5%; overflow: hidden;
  border: 1px solid rgba(78,164,255,.92); border-radius: 9px;
  background: #01070d; box-shadow: inset 0 0 24px rgba(0,101,209,.16),0 0 14px rgba(0,123,255,.3);
}
/* No placeholder line floats over the manifestation: when there is nothing
   governed to say, the space stays clear rather than carrying filler. */
.vi-manifestation__context:empty { display: none; }
.vi-manifestation__context {
  position: absolute; z-index: 4; top: 1.5%; right: 2%; left: 2%; overflow: hidden; margin: 0; color: #758ca5;
  font: italic 500 clamp(5px,.5vw,9px)/1.2 ui-rounded,"SF Pro Rounded",Quicksand,Nunito,Comfortaa,system-ui,sans-serif;
  text-align: center; text-overflow: ellipsis; white-space: nowrap;
}
.vi-manifestation__stage { position: absolute; inset: 0; overflow: hidden; }
.vi-manifestation__stage::before,.vi-manifestation__stage::after { position: absolute; z-index: 3; content: ""; pointer-events: none; }
.vi-manifestation__stage::before {
  right: 0; bottom: 0; left: 0; height: 4px; background: linear-gradient(90deg,transparent,#2990ff 20%,#fff 50%,#2990ff 80%,transparent);
  box-shadow: 0 0 15px #1184ff; opacity: .72;
}
.vi-manifestation__stage::after {
  inset: 7% 12% 4%; border-radius: 50%; background: radial-gradient(circle,rgba(130,190,255,.13),rgba(0,115,238,.07) 46%,transparent 72%);
  filter: blur(7px); animation: vi-core-pulse 2.35s ease-in-out infinite;
}
/* Live governed manifestation renderer — replaces the former raster art layers
   (see manifestation-viewport.ts). The real Three.js/WebGL Advanced renderer's
   canvas fills the same stage box the art layers used to occupy. */
.vi-manifestation__stage canvas {
  position: relative; z-index: 2; display: block; width: 100%; height: 100%;
}
.vi-manifestation__explain {
  position: absolute; z-index: 4; right: 2%; bottom: 1.5%; left: 2%; overflow: hidden; margin: 0;
  color: #758ca5; font: italic 500 clamp(5px,.48vw,9px)/1.2 ui-rounded,"SF Pro Rounded",Quicksand,Nunito,Comfortaa,system-ui,sans-serif;
  text-align: center; text-overflow: ellipsis; white-space: nowrap;
}

.vi-inspector,.vi-attention,.vi-path-comparison,.vi-metrics {
  position: absolute; z-index: 5; border: 1px solid rgba(78,164,255,.95); border-radius: 9px;
  background: linear-gradient(150deg,rgba(3,23,44,.98),rgba(1,13,24,.98));
  box-shadow: inset 0 0 22px rgba(0,114,235,.18),0 0 10px rgba(0,123,255,.55),0 0 26px rgba(0,123,255,.3);
  font: 500 clamp(6px,.62vw,11px)/1.3 ui-rounded,"SF Pro Rounded",Quicksand,Nunito,Comfortaa,system-ui,sans-serif;
}
.vi-inspector { top: 10%; left: 60%; width: 19%; height: 52.5%; }
.vi-inspector-tabs { display: grid; height: 9%; grid-template-columns: repeat(3,1fr); border-bottom: 1px solid rgba(37,134,238,.48); }
.vi-inspector-tabs button {
  min-width: 0; padding: 0; border: 0; border-right: 1px solid rgba(38,107,181,.3); color: #a8c5e5; background: rgba(2,12,21,.92);
  font: 700 clamp(5px,.47vw,8px)/1 ui-rounded,"SF Pro Rounded",Quicksand,Nunito,Comfortaa,system-ui,sans-serif; cursor: pointer;
}
/* Approved reference marks the active record tab with an outline, not a filled
   block — the selected state stays legible without a solid highlight. */
.vi-inspector-tabs button[aria-selected="true"] {
  color: #b5d9ff; background: transparent;
  box-shadow: inset 0 0 0 1px rgba(55,152,255,.72),inset 0 -2px #3798ff;
}
.vi-inspector-panel { height: 91%; padding: 4%; overflow: auto; scrollbar-width: thin; scrollbar-color: #1666bb transparent; }
.vi-inspector-panel[hidden] { display: none; }
.vi-inspector h3 { margin: 0 0 4%; color: #87c1ff; font-size: .95em; letter-spacing: .07em; }
.vi-inspector-overview {
  display: grid; grid-template-columns: auto 1fr; gap: 5%; margin-bottom: 4%; padding: 4% 5%;
  border: 1px solid rgba(70,155,246,.6); border-radius: 7px; background: rgba(3,25,48,.5);
  box-shadow: inset 0 0 12px rgba(0,114,235,.14),0 0 7px rgba(0,123,255,.22);
}
.vi-inspector-overview span,.vi-inspector dt { color: #95b5d8; text-transform: uppercase; }
.vi-inspector-overview strong,.vi-inspector dd { overflow: hidden; margin: 0; color: #d3e8ff; text-overflow: ellipsis; white-space: nowrap; }
.vi-sparkline {
  display: flex; height: 12%; min-height: 28px; align-items: center; justify-content: center; gap: 4%; margin: 3% 0 6%;
  border-radius: 7px; box-shadow: inset 0 0 12px rgba(0,114,235,.14),0 0 7px rgba(0,123,255,.22);
  border: 1px solid rgba(70,155,246,.6); background: linear-gradient(180deg,rgba(0,86,177,.04),rgba(0,86,177,.14));
}
/* Continuous oscillograph trace, as in the approved reference, rather than a row
   of separated pills. Purely decorative: the element carries its own label and
   the trace encodes no governed value. */
.vi-sparkline {
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 30' preserveAspectRatio='none'%3E%3Cpolyline points='0,15 7,15 12,7 17,23 22,11 27,19 33,4 39,25 45,13 51,16 58,15 64,9 70,22 76,11 82,18 88,13 94,16 100,15' fill='none' stroke='%2364e7ff' stroke-width='1.5' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E"),
    linear-gradient(180deg,rgba(0,86,177,.04),rgba(0,86,177,.14));
  background-repeat: no-repeat; background-position: center; background-size: 94% 66%,auto;
  filter: drop-shadow(0 0 5px rgba(23,135,255,.5));
}
.vi-sparkline i { display: none; }
.vi-coherence {
  display: flex; justify-content: space-between; margin-bottom: 5%; padding: 4% 5%;
  border: 1px solid rgba(70,155,246,.6); border-radius: 7px; background: rgba(3,25,48,.5);
  box-shadow: inset 0 0 12px rgba(0,114,235,.14),0 0 7px rgba(0,123,255,.22);
}
.vi-coherence strong { color: #51dd8f; }
.vi-inspector dl {
  display: grid; gap: 4px; margin: 0 0 6%; padding: 4% 5%;
  border: 1px solid rgba(70,155,246,.6); border-radius: 7px; background: rgba(3,25,48,.5);
  box-shadow: inset 0 0 12px rgba(0,114,235,.14),0 0 7px rgba(0,123,255,.22);
}
.vi-inspector dl div { display: grid; grid-template-columns: 36% 1fr; gap: 4%; padding-bottom: 4px; border-bottom: 1px solid rgba(31,92,158,.18); }
.vi-inspector-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.vi-inspector-list li { padding: 5px; border: 1px solid rgba(34,107,185,.25); color: #b8d5f4; }

.vi-attention { top: 10%; right: 0; width: 21%; height: 52.5%; padding: 1% .8%; }
.vi-attention h2,.vi-path-comparison h2 { margin: 0; color: #92c7ff; font-size: clamp(6px,.64vw,11px); letter-spacing: .06em; }
.vi-attention > p { margin: 6% 0 3%; color: #a3c2e3; text-align: center; }
.vi-intervention-levels { display: grid; grid-template-columns: repeat(4,1fr); gap: 2px; }
/* Only the level actually in effect is marked. An unselected severity renders as
   plain text — never pre-lit — so the control cannot imply a warning, pause, or
   block that no governed record supports. */
.vi-intervention-levels button {
  min-width: 0; min-height: 26px; padding: 0; border: 1px solid transparent; border-radius: 3px; color: #7b98b8;
  background: transparent; font: 800 clamp(4px,.43vw,8px)/1 ui-rounded,"SF Pro Rounded",Quicksand,Nunito,Comfortaa,system-ui,sans-serif; cursor: pointer;
}
.vi-intervention-levels button:hover,.vi-intervention-levels button:focus-visible {
  border-color: rgba(85,125,168,.5); color: #a8c4e2;
}
.vi-intervention-levels button[aria-pressed="true"] { border-color: currentColor; color: #2990ff; }
.vi-intervention-levels button:nth-child(2)[aria-pressed="true"] { color: #ffad18; }
.vi-intervention-levels button:nth-child(3)[aria-pressed="true"] { color: #ff8318; }
.vi-intervention-levels button:nth-child(4)[aria-pressed="true"] { color: #ff4938; }
.vi-attention > small { display: block; margin: 4% 0; color: #7d99a8; text-align: center; }
.vi-attention-list { display: grid; height: 58%; grid-template-rows: repeat(3,1fr); gap: 4px; }
.vi-attention-list button {
  display: grid; min-width: 0; grid-template-columns: 12% 1fr auto; grid-template-rows: 1fr 1fr; align-items: center; padding: 2% 3%;
  border: 1px solid rgba(70,155,246,.55); border-radius: 7px; color: #b5d5f7; background: rgba(3,25,48,.45);
  box-shadow: inset 0 0 10px rgba(0,114,235,.12),0 0 6px rgba(0,123,255,.2);
  font: inherit; text-align: left; cursor: pointer;
}
.vi-attention-list button:is(:hover,:focus-visible) { outline: 1px solid #3a99ff; background: rgba(0,100,207,.1); }
/* Queue icons sit in glowing enclosures, as in the approved reference, rather
   than as bare glyphs. Each row keeps the colour of the state it reports. */
.vi-attention-list button > span {
  display: grid; width: clamp(14px,1.35vw,24px); aspect-ratio: 1; grid-row: 1/3; place-items: center;
  border: 1px solid currentColor; border-radius: 50%; color: #50dd8c; font-size: .85em;
  box-shadow: 0 0 7px rgba(80,221,140,.32),inset 0 0 6px rgba(80,221,140,.14);
}
.vi-attention-list button:nth-child(2) > span {
  color: #3798ff; box-shadow: 0 0 7px rgba(55,152,255,.32),inset 0 0 6px rgba(55,152,255,.14);
}
.vi-attention-list button:nth-child(3) > span {
  color: #8f9dff; box-shadow: 0 0 7px rgba(143,157,255,.3),inset 0 0 6px rgba(143,157,255,.13);
}
.vi-attention-list button > b { color: #60e799; }
.vi-attention-list button > small { grid-column: 2/4; color: #8cadd0; }

.vi-attention-viewall {
  display: block; width: 100%; margin-top: 3%; padding: 3% 0; border: 1px solid rgba(38,121,210,.34); border-radius: 2px;
  color: #459af5; background: transparent; font: 700 clamp(4px,.42vw,8px)/1 ui-rounded,"SF Pro Rounded",Quicksand,Nunito,Comfortaa,system-ui,sans-serif;
  letter-spacing: .08em; cursor: pointer;
}
.vi-attention-viewall:is(:hover,:focus-visible) { color: #8ac3ff; border-color: #3a99ff; }

.vi-path-comparison {
  top: 62.5%; right: 0; left: 29%; display: grid; height: 16.5%; grid-template-columns: 20% 25% 25% 30%; grid-template-rows: 22% 78%;
}
.vi-path-comparison h2 { grid-column: 1/-1; padding: 1% 1.5%; border-bottom: 1px solid rgba(34,115,201,.28); }
.vi-path-comparison .path {
  display: grid; min-width: 0; align-content: center; gap: 4%; margin: 1% .8%; padding: 3% 5%; overflow: hidden;
  border: 1px solid rgba(70,155,246,.5); border-radius: 8px; background: rgba(3,25,48,.4);
  border-right: 1px solid rgba(34,115,201,.26); color: #c8e0fa; background: transparent; font: inherit; text-align: left; cursor: pointer;
}
.vi-path-comparison .path:is(:hover,:focus-visible) { outline: 1px solid #3697ff; background: rgba(0,101,210,.11); }
.path > span { color: #6d89a6; } .path > strong { overflow: hidden; color: #e1f0ff; text-overflow: ellipsis; white-space: nowrap; }
.path > small { overflow: hidden; color: #758ea8; text-overflow: ellipsis; white-space: nowrap; }
.path > i { display: block; width: 100%; height: 4px; background: repeating-linear-gradient(90deg,#56a8ff 0 6px,transparent 6px 19px); box-shadow: 0 0 7px #258eff; }
.path--current > strong { color: #ff9a1b; }
.path--current > i { background: repeating-linear-gradient(90deg,#ff9f1b 0 6px,transparent 6px 19px); box-shadow: 0 0 7px #ff861b; }
.path--alternative > strong { color: #f36bff; }
.path--alternative > i { background: repeating-linear-gradient(90deg,#ef68ff 0 6px,transparent 6px 19px); box-shadow: 0 0 7px #e55cff; }
.path--evidence > strong { color: #63e99b; }

.vi-metrics {
  right: 0; bottom: 6%; left: 0; display: grid; height: 15%; grid-template-columns: 11% 10% 18% 13% 14% 12% 14% 8%;
}
.vi-metrics article {
  display: grid; min-width: 0; align-content: center; gap: 4%; margin: 1.5% 1%; padding: 4% 6%; overflow: hidden;
  border: 1px solid rgba(70,155,246,.58); border-radius: 8px; background: rgba(3,25,48,.45);
  box-shadow: inset 0 0 12px rgba(0,114,235,.13),0 0 7px rgba(0,123,255,.22);
}
.vi-metrics article > span { overflow: hidden; color: #a5c6e9; font-size: 1em; letter-spacing: .04em; text-overflow: ellipsis; white-space: nowrap; }
.vi-metrics article > strong { color: #dfeeff; font-size: 1.5em; }
.vi-metrics article > small,.vi-metrics article > p { overflow: hidden; margin: 0; color: #94b1d1; text-overflow: ellipsis; }
.vi-metrics article > strong { color: #dcedff; font-size: clamp(11px,1.25vw,23px); line-height: 1.05; }
.vi-metrics ul { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
/* Colour-keyed legend rows, matching the approved reference's tile density.
   The key is decorative — each row still names a real governed field. */
.vi-metrics li {
  display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 5px; color: #9ab9db;
}
.vi-metrics li::before {
  flex: 0 0 auto; width: .5em; height: .5em; border-radius: 50%; background: currentColor; content: "";
}
.vi-metrics li > b { margin-left: auto; }
.vi-metrics li:nth-child(1) { color: #ff5c6e; }
.vi-metrics li:nth-child(2) { color: #3798ff; }
.vi-metrics li:nth-child(3) { color: #35e3a8; }
.vi-metrics li:nth-child(4) { color: #ffa23a; }
.vi-metrics li:nth-child(5) { color: #b58bff; }
.vi-metrics li b { color: #66e99b; }
/* Gauge and its readings sit side by side, as in the approved reference. */
.vi-metrics article:has(.vi-ring):has(ul) {
  grid-template-columns: clamp(26px,2.5vw,44px) 1fr; align-items: center; column-gap: 8%;
}
.vi-metrics article:has(.vi-ring):has(ul) .vi-ring { width: 100%; }
.vi-metrics article:has(.vi-ring):has(ul) > span { grid-column: 1/-1; }
.vi-ring {
  position: relative; display: grid; width: min(58%,58px); aspect-ratio: 1; place-items: center; border-radius: 50%;
  background: conic-gradient(#55a7ff calc(var(--ring-value)*1%),#122e4b 0); box-shadow: 0 0 12px rgba(40,144,255,.34);
}
.vi-ring::before { width: 72%; aspect-ratio: 1; border-radius: 50%; background: #040f1b; content: ""; }
.vi-ring b { position: absolute; color: #c9e3ff; font-size: .75em; }

.vi-dashboard-footer {
  position: absolute; z-index: 15; right: 0; bottom: 0; left: 0; display: grid; height: 6%; grid-template-columns: 24% 1fr 28%;
  align-items: center; padding: 0 2%; border-top: 1px solid rgba(37,127,224,.4); color: #8fabc8; background: rgba(1,8,14,.99);
  font: 500 clamp(5px,.48vw,9px)/1.2 ui-rounded,"SF Pro Rounded",Quicksand,Nunito,Comfortaa,system-ui,sans-serif;
}
.vi-dashboard-footer > span:nth-child(2) { text-align: center; }
.vi-dashboard-footer button {
  justify-self: end; padding: 4px 8px; border: 1px solid rgba(36,116,202,.22); color: #278fff;
  background: rgba(0,74,153,.08); font: inherit; cursor: pointer;
}
.vi-dashboard-footer button:is(:hover,:focus-visible) { outline: 1px solid #3195ff; box-shadow: 0 0 9px rgba(37,142,255,.28); }
/* Non-interactive — Shadow/Observer/Collaborator are simultaneous capabilities, not a cycling
   control, so this reads as a static label rather than a button. */
.vi-dashboard-capabilities {
  justify-self: end; overflow: hidden; padding: 4px 8px; border: 1px solid rgba(36,116,202,.22);
  color: #278fff; background: rgba(0,74,153,.08); text-overflow: ellipsis; white-space: nowrap;
}
.vi-pixel-workspace .sr-only {
  position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important;
  overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important;
}

/* Existing authenticated conversation: real composer and message feed in the approved left window. */
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) [data-vi-screen="workspace"] > .conversation-card {
  position: fixed; z-index: 20;
  top: calc(50dvh - (var(--vi-canvas-height)/2) + (var(--vi-canvas-height)*.1));
  left: calc(50vw - (var(--vi-canvas-width)/2) + (var(--vi-canvas-width)*.055));
  display: flex !important; width: calc(var(--vi-canvas-width)*.235); height: calc(var(--vi-canvas-height)*.69);
  min-height: 0; padding: calc(var(--vi-canvas-width)*.006); overflow: hidden;
  border: 1px solid rgba(78,164,255,.95); border-radius: 9px; color: #cde5ff;
  background: linear-gradient(150deg,rgba(3,21,40,.985),rgba(1,12,22,.985));
  box-shadow: inset 0 0 20px rgba(0,114,235,.15),0 0 14px rgba(0,123,255,.32);
}
/* Approved header band: title and governance qualifier on one line, compact icon
   actions right-aligned — matches the approved reference's conversation header. */
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) .conversation-card .section-heading {
  display: flex; flex: 0 0 auto; gap: 4%; align-items: center; justify-content: space-between;
  min-height: 8%; margin: 0; padding: 0 1% 2%; border-bottom: 1px solid rgba(36,114,198,.25);
}
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) .conversation-card .section-heading > div:first-child {
  display: flex; flex-wrap: wrap; gap: 5px; align-items: baseline; min-width: 0;
}
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) .conversation-card .section-heading h2 {
  margin: 0; color: #9fcdff; font-size: clamp(7px,.68vw,12px); letter-spacing: .1em; text-transform: uppercase;
}
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) .conversation-card .section-heading .eyebrow {
  order: 2; margin: 0; color: #79ade4; font-size: clamp(4px,.4vw,7px); letter-spacing: .08em; text-transform: uppercase;
}
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) .conversation-card .section-heading h2 { order: 1; }
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) .conversation-card .section-heading .eyebrow::before { content: "· "; }
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) .conversation-card .section-heading-actions {
  display: flex; flex: 0 0 auto; flex-direction: row; flex-wrap: nowrap; gap: 5px; align-items: center;
  min-width: max-content;
}
/* Two compact glyph controls, as in the approved reference. The real labels stay
   in the accessibility tree — only the painted text collapses, so a screen
   reader still announces "Governance controls" and "Clear conversation". */
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) .conversation-card .section-heading-actions > * {
  display: grid; flex: 0 0 auto; place-items: center;
  width: clamp(13px,1.15vw,19px); height: clamp(13px,1.15vw,19px);
  padding: 0; border: 0; border-radius: 2px; background: none; box-shadow: none;
  font-size: 0 !important; line-height: 0;
}
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) .conversation-card .section-heading-actions .live-badge::after {
  content: "▶"; color: #3798ff; font-size: clamp(6px,.58vw,9px); line-height: 1;
}
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) .conversation-card .section-heading-actions #clear-conversation::after {
  content: "⚙"; color: #8fbdee; font-size: clamp(7px,.7vw,11px); line-height: 1;
}
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) .conversation-card #brain-live,
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) .conversation-card #interaction-status { display: none !important; }
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) .conversation-card .conversation-feed {
  position: relative; min-height: 0; flex: 1 1 auto; gap: 4px; padding: 2%; overflow: auto;
  scrollbar-width: thin; scrollbar-color: #1666bb transparent;
}
/* Timeline spine threading the speaker avatars, as in the approved reference. */
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) .conversation-card .conversation-feed::before {
  position: absolute; top: 2%; bottom: 2%; left: calc(2% + clamp(8px,.68vw,12px)); width: 1px;
  background: linear-gradient(180deg,transparent,rgba(45,135,232,.34) 8%,rgba(45,135,232,.34) 92%,transparent);
  content: ""; pointer-events: none;
}
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) .conversation-card .message { gap: 4px; margin: 0 0 4px; }
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) .conversation-card .message-avatar {
  width: clamp(16px,1.35vw,24px); height: clamp(16px,1.35vw,24px);
}
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) .conversation-card .message-content {
  padding: 4px 6px; border: 1px solid rgba(32,101,174,.24); color: #9bb8d6; background: rgba(2,16,31,.65);
  font-size: clamp(5px,.48vw,9px); line-height: 1.25;
}
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) .conversation-card .message-content strong { color: #c4e1ff; }
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) .conversation-card .composer {
  flex: 0 0 auto; gap: 4px; padding-top: 4px; border-top: 1px solid rgba(35,113,197,.3);
}
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) .conversation-card .composer label,
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) .conversation-card .composer select { font-size: clamp(5px,.45vw,8px); }
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) .conversation-card .composer textarea {
  min-height: clamp(26px,calc(var(--vi-canvas-height)*.05),44px); max-height: 22%; padding: 5px 26px 5px 7px;
  border: 1px solid rgba(37,128,225,.42); border-radius: 2px; color: #d7eaff; background: rgba(2,13,25,.92);
  box-shadow: inset 0 0 9px rgba(0,106,220,.12); font-size: clamp(6px,.52vw,9px);
}
/* Approved composer: one compact ask row with a square send affordance. The
   footer's hint text and provider control stay in the DOM and the a11y tree —
   they are collapsed visually here, never removed, so routing stays operable. */
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) .conversation-card .composer-footer {
  display: flex; gap: 5px; align-items: center; justify-content: space-between; margin: 0; padding: 0;
}
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) .conversation-card .composer-footer-hint {
  display: flex; flex: 1 1 auto; gap: 4px; align-items: center; min-width: 0;
}
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) .conversation-card .composer-footer-hint > span { display: none; }
/* The approved reference shows the ask row alone. The provider control is taken
   out of the painted layout but deliberately NOT out of the document: it stays
   focusable and announced, so provider routing is still reachable by keyboard
   and assistive tech from this screen. */
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) .conversation-card .provider-select-label {
  position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) .conversation-card .provider-select-label:focus-within {
  position: static; width: auto; height: auto; margin: 0; overflow: visible;
  clip-path: none; white-space: normal;
}
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) .conversation-card .provider-select-label:focus-within select {
  max-width: clamp(70px,7vw,120px); padding: 1px 3px; border-radius: 2px; font-size: clamp(4px,.38vw,7px);
}
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) .conversation-card .composer button[type="submit"] {
  flex: 0 0 auto; min-width: 26px; min-height: 26px; padding: 0; color: #e8f3ff; border-color: #278fff;
  background: linear-gradient(145deg,#0d76e7,#216cff); box-shadow: 0 0 10px rgba(37,142,255,.38);
  font-size: 0 !important; line-height: 0;
}
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) .conversation-card .composer button[type="submit"]::after {
  content: "+"; font-size: 15px; line-height: 1;
}

@keyframes vi-dashboard-breathe {
  0%,100% { box-shadow: 0 0 15px rgba(0,123,255,.38),0 0 52px rgba(0,91,191,.22),inset 0 0 24px rgba(26,137,255,.1); }
  50% { box-shadow: 0 0 26px rgba(0,123,255,.66),0 0 82px rgba(0,109,225,.38),inset 0 0 34px rgba(26,137,255,.17); }
}
@keyframes vi-core-pulse { 0%,100% { scale: .92; opacity: .58; } 50% { scale: 1.18; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .vi-pixel-workspace__canvas,.vi-manifestation__stage::after,.vi-manifestation__pulse { animation: none !important; }
}
html[data-motion-intensity="still"] .vi-pixel-workspace__canvas,
html[data-motion-intensity="still"] .vi-manifestation__stage::after,
html[data-motion-intensity="still"] .vi-manifestation__pulse,
html[data-reduced-motion="true"] .vi-pixel-workspace__canvas,
html[data-reduced-motion="true"] .vi-manifestation__stage::after,
html[data-reduced-motion="true"] .vi-manifestation__pulse { animation: none !important; }

/* Mobile recovery: keep the approved command-center canvas desktop-only at the shell level.
   The existing responsive application shell remains authoritative on phones, so Conversation,
   Living V.I., and Inspector are reachable as full-width tabbed surfaces without horizontal
   overflow or a browser-scaled 1080px desktop canvas. */
@media (max-width: 760px) {
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) {
    --vi-canvas-width: 100%;
    --vi-canvas-height: auto;
  }
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) body {
    overflow-x: hidden;
    overflow-y: auto;
  }
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) .vi-shell {
    display: block;
    min-height: 100dvh;
  }
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) .vi-rail {
    display: flex !important;
  }
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) .vi-header {
    display: grid !important;
  }
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) .vi-main {
    width: 100%;
    max-width: none;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: visible;
  }
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) .vi-content {
    width: 100%;
    max-width: none;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 8px;
    overflow: visible;
  }
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace)
    [data-vi-screen="workspace"].vi-screen--active {
    display: grid;
    width: 100%;
    height: auto;
    min-height: 0;
    overflow: visible;
  }
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace)
    [data-vi-screen="workspace"] > .workspace-mobile-tabs {
    display: grid !important;
  }
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace)
    [data-vi-screen="workspace"][data-mobile-view="conversation"]
    .workspace-living-visual-panel {
    display: none;
  }
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace)
    .workspace-living-visual-panel {
    width: 100%;
    max-width: none;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
  }
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace)
    [data-vi-screen="workspace"] > .conversation-card {
    position: static;
    z-index: auto;
    width: 100%;
    height: auto;
    min-height: calc(100dvh - 116px);
    padding: 10px;
    overflow: hidden;
    border-radius: 16px;
  }
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace)
    .conversation-card .section-heading {
    min-height: 0;
    margin: 0 0 7px;
    padding: 0;
    border-bottom: 0;
  }
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace)
    .conversation-card .section-heading h2 {
    order: initial;
    font-size: 0.9rem;
  }
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace)
    .conversation-card .section-heading .eyebrow {
    order: initial;
    font-size: 0.65rem;
  }
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace)
    .conversation-card .section-heading .eyebrow::before {
    content: none;
  }
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace)
    .conversation-card .section-heading-actions > * {
    display: inline-flex;
    width: auto;
    height: auto;
    min-height: 44px;
    padding: 8px 10px;
    font-size: 0.75rem !important;
    line-height: 1.2;
  }
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace)
    .conversation-card .section-heading-actions .live-badge::after,
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace)
    .conversation-card .section-heading-actions #clear-conversation::after {
    content: none;
  }
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace)
    .conversation-card #brain-live {
    display: block !important;
  }
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace)
    .conversation-card #interaction-status {
    display: grid !important;
  }
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace)
    .conversation-card .conversation-feed {
    padding: 7px;
  }
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace)
    .conversation-card .conversation-feed::before {
    content: none;
  }
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace)
    .conversation-card .message-avatar {
    width: 38px;
    height: 38px;
  }
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace)
    .conversation-card .message-content {
    padding: 9px 10px;
    font-size: 0.875rem;
    line-height: 1.5;
  }
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace)
    .conversation-card .composer textarea {
    min-height: 76px;
    max-height: none;
    padding: 10px;
    font-size: 0.9rem;
  }
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace)
    .conversation-card .composer-footer-hint > span {
    display: inline;
  }
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace)
    .conversation-card .provider-select-label {
    position: static;
    display: flex;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip-path: none;
    white-space: normal;
  }
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace)
    .conversation-card .composer button[type="submit"] {
    width: auto;
    min-width: 44px;
    min-height: 44px;
    padding: 8px 14px;
    font-size: 0.8rem !important;
    line-height: 1.2;
  }
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace)
    .conversation-card .composer button[type="submit"]::after {
    content: none;
  }
  .vi-pixel-workspace {
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: calc(100dvh - 116px);
    place-items: start center;
    overflow: hidden;
  }
  .vi-pixel-workspace__canvas {
    width: 100%;
    height: auto;
    aspect-ratio: 1.8698060942;
    border-radius: 8px;
  }
  /* When the project picker is visible on mobile, hide the entire canvas row so its child
     cannot preserve a viewport-height minimum. The picker is the only visible workspace surface.
     The conversation card is also hidden explicitly to preserve the DOM-state contract. */
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace):has(.project-picker:not([hidden]))
    .workspace-living-visual-panel {
    display: none !important;
  }
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace):has(.project-picker:not([hidden]))
    [data-vi-screen="workspace"] > .conversation-card {
    display: none !important;
  }
}


/* Governed command-center visual refinement.
   Royal blue is the interaction accent; semantic state colours remain distinct. */
.vi-pixel-workspace {
  --vi-electric-blue: #168cff;
  --vi-cyan-edge: #41dcff;
  --vi-blue-glow: rgba(22, 140, 255, .48);
}
.vi-pixel-workspace__canvas {
  border-color: rgba(65, 157, 255, .64);
  background:
    linear-gradient(rgba(7, 31, 52, .25) 1px, transparent 1px),
    linear-gradient(90deg, rgba(7, 31, 52, .25) 1px, transparent 1px),
    radial-gradient(circle at 49% 38%, rgba(22, 140, 255, .2), transparent 42%),
    linear-gradient(145deg, #020914, #01050b 62%, #020d19);
  box-shadow:
    0 0 18px rgba(65, 157, 255, .34),
    0 0 62px rgba(22, 140, 255, .28),
    inset 0 0 34px rgba(22, 140, 255, .12);
}
.vi-pixel-workspace__canvas::after {
  position: absolute;
  z-index: 31;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background:
    linear-gradient(90deg, transparent 0 38%, var(--vi-electric-blue) 46%, #fff 50%, var(--vi-cyan-edge) 54%, transparent 62%)
    0 0 / 34% 100% no-repeat;
  filter: drop-shadow(0 0 7px var(--vi-cyan-edge));
  content: "";
  pointer-events: none;
  animation: vi-horizontal-energy-trace 6.4s linear infinite;
}
.vi-dashboard-brand {
  gap: 6%;
  padding: 4% 7%;
}
.vi-dashboard-brand img {
  width: 38%;
  max-height: 92%;
  object-fit: contain;
  filter: none;
}
.vi-dashboard-brand strong {
  color: #f4f9ff;
  font-weight: 760;
  text-shadow: 0 0 5px rgba(65, 157, 255, .34);
}
.vi-dashboard-brand small {
  color: var(--vi-electric-blue);
  font-weight: 850;
  text-shadow: 0 0 7px rgba(22, 140, 255, .48);
}
.vi-dashboard-rail button:is(:hover, :focus-visible, .is-active) {
  box-shadow: inset 3px 0 var(--vi-electric-blue);
}
.vi-dashboard-selectors label,
.vi-manifestation,
.vi-inspector,
.vi-attention,
.vi-path-comparison,
.vi-metrics {
  border-color: rgba(65, 157, 255, .72);
}
.vi-manifestation {
  isolation: isolate;
  box-shadow:
    inset 0 0 30px rgba(22, 140, 255, .18),
    0 0 15px rgba(65, 157, 255, .34),
    0 0 36px rgba(22, 140, 255, .2);
}
.vi-manifestation::before {
  position: absolute;
  z-index: 7;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(180deg, transparent 0 30%, var(--vi-electric-blue) 44%, #fff 50%, var(--vi-cyan-edge) 56%, transparent 70%)
      left 0 / 2px 32% no-repeat,
    linear-gradient(0deg, transparent 0 30%, var(--vi-electric-blue) 44%, #fff 50%, var(--vi-cyan-edge) 56%, transparent 70%)
      right 100% / 2px 32% no-repeat;
  filter: drop-shadow(0 0 6px var(--vi-cyan-edge));
  content: "";
  pointer-events: none;
  animation: vi-vertical-energy-trace 5.2s ease-in-out infinite alternate;
}
.vi-command-center-city-canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
}
.vi-command-center-city-canvas:focus-visible {
  box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 4px var(--vi-electric-blue);
}
.vi-manifestation__stage.is-receiving-governed-data::after {
  animation: vi-city-receive 1.4s ease-out both;
}
.vi-inspector-tabs button[aria-selected="true"],
.vi-intervention-levels button[aria-pressed="true"] {
  color: #f7fbff;
  box-shadow:
    inset 0 0 0 1px var(--vi-electric-blue),
    inset 0 -2px var(--vi-cyan-edge),
    0 0 10px rgba(22, 140, 255, .22);
}
.vi-conversation-backing,
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) [data-vi-screen="workspace"] > .conversation-card {
  border-color: rgba(65, 157, 255, .74);
}
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) .conversation-card .composer button[type="submit"] {
  border-color: var(--vi-cyan-edge);
  background: linear-gradient(145deg, #168cff, #075fc9);
  box-shadow: 0 0 12px rgba(22, 140, 255, .48);
}

@keyframes vi-horizontal-energy-trace {
  from { background-position-x: -40%; }
  to { background-position-x: 140%; }
}
@keyframes vi-vertical-energy-trace {
  from { background-position-y: -35%, 135%; opacity: .45; }
  to { background-position-y: 135%, -35%; opacity: .92; }
}
@keyframes vi-city-receive {
  0% {
    opacity: .35;
    transform: scale(.96);
    box-shadow: 0 0 0 rgba(22, 140, 255, 0);
  }
  42% {
    opacity: 1;
    transform: scale(1.03);
    box-shadow: 0 0 42px rgba(65, 157, 255, .34);
  }
  100% {
    opacity: .7;
    transform: scale(1);
    box-shadow: 0 0 0 rgba(22, 140, 255, 0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .vi-pixel-workspace__canvas::after,
  .vi-manifestation::before,
  .vi-manifestation__stage.is-receiving-governed-data::after {
    animation: none !important;
  }
}
html[data-motion-intensity="still"] .vi-pixel-workspace__canvas::after,
html[data-motion-intensity="still"] .vi-manifestation::before,
html[data-motion-intensity="still"] .vi-manifestation__stage.is-receiving-governed-data::after,
html[data-reduced-motion="true"] .vi-pixel-workspace__canvas::after,
html[data-reduced-motion="true"] .vi-manifestation::before,
html[data-reduced-motion="true"] .vi-manifestation__stage.is-receiving-governed-data::after {
  animation: none !important;
}

/* Issue #65 mobile composition. The phone owns three purpose-built surfaces;
   none of them inherits the desktop command-center canvas geometry. */
/* Reply actions are available without long-pressing a cramped message bubble. */
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) .message-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  margin-left: auto;
  padding: 3px 7px;
  border: 1px solid rgba(22, 140, 255, .5);
  border-radius: 8px;
  background: rgba(22, 140, 255, .1);
  color: #c9e7ff;
  font: inherit;
  font-size: 0.65rem;
  cursor: pointer;
}
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) .message-copy:focus-visible {
  outline: 2px solid #41dcff;
  outline-offset: 2px;
}
html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) .message-content p {
  user-select: text;
  -webkit-user-select: text;
}

@media (max-width: 820px) {
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) body {
    overflow-x: clip;
    overflow-y: auto;
    background:
      radial-gradient(circle at 50% 18%, rgba(22, 140, 255, .16), transparent 44%),
      #01060b;
  }
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) .vi-shell {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 100dvh;
  }
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) .vi-rail {
    display: flex !important;
  }
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) .vi-header {
    display: grid !important;
  }
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) .vi-main,
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) .vi-content,
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace)
    [data-vi-screen="workspace"].vi-screen--active {
    width: 100%;
    max-width: none;
    height: auto;
    min-height: 0;
    margin: 0;
    overflow: visible;
  }
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace) .vi-content {
    padding: 8px;
  }
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace)
    [data-vi-screen="workspace"].vi-screen--active {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "mobile-tabs" "state" "surface";
    align-content: start;
    gap: 8px;
  }
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace)
    [data-vi-screen="workspace"] > .workspace-mobile-tabs {
    grid-area: mobile-tabs;
    align-self: start;
    position: sticky;
    top: 0;
    z-index: 40;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    padding: 5px;
    border: 1px solid rgba(22, 140, 255, .36);
    border-radius: 14px;
    background: linear-gradient(160deg, rgba(5, 21, 41, .96), rgba(1, 8, 17, .98));
    box-shadow:
      0 0 24px rgba(22, 140, 255, .2),
      inset 0 0 18px rgba(22, 140, 255, .06);
    backdrop-filter: blur(18px);
  }
  .workspace-mobile-tabs button {
    min-width: 0;
    min-height: 44px;
    padding: 8px 5px;
    border: 1px solid rgba(22, 140, 255, .08);
    border-radius: 10px;
    color: #86a6c2;
    background: rgba(2, 12, 24, .72);
    font: 750 .72rem/1.1 ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
    letter-spacing: .025em;
  }
  .workspace-mobile-tabs button[aria-selected="true"] {
    border-color: #41dcff;
    color: #f4fbff;
    background:
      linear-gradient(145deg, rgba(22, 140, 255, .32), rgba(4, 26, 52, .9));
    box-shadow:
      0 0 18px rgba(22, 140, 255, .58),
      0 0 34px rgba(22, 140, 255, .16),
      inset 0 0 0 1px rgba(255, 255, 255, .1),
      inset 0 0 18px rgba(22, 140, 255, .12);
    text-shadow: 0 0 9px rgba(22, 140, 255, .55);
  }

  /* Compact persistent operating strip: the immediate working context stays
     visible without turning Conversation back into a dashboard. */
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace)
    [data-vi-screen="workspace"] > .workspace-command {
    grid-area: state;
    display: block !important;
    margin: 0;
    padding: 7px;
    border: 1px solid rgba(22, 140, 255, .32);
    border-radius: 12px;
    background: linear-gradient(150deg, rgba(5, 20, 38, .88), rgba(2, 10, 21, .94));
    box-shadow: inset 0 0 20px rgba(22, 140, 255, .06);
  }
  .workspace-command__heading,
  .intelligence-cell--anchor,
  .intelligence-cell--progress,
  .intelligence-cell--evidence {
    display: none;
  }
  .workspace-intelligence-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 5px;
  }
  .intelligence-cell--working,
  .intelligence-cell--attention,
  .intelligence-cell--action {
    grid-column: auto;
    min-width: 0;
    min-height: 0;
    padding: 7px 8px;
    border: 1px solid rgba(22, 140, 255, .13);
    border-radius: 8px;
    background: rgba(4, 18, 34, .74);
  }
  .intelligence-cell--working { grid-column: 1 / -1; }
  .intelligence-cell > p:not(.eyebrow),
  .intelligence-cell > span {
    display: block;
    overflow: hidden;
    margin: 2px 0 0;
    font-size: .67rem;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace)
    [data-vi-screen="workspace"] > .conversation-card,
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace)
    .workspace-living-visual-panel {
    grid-area: surface;
    min-width: 0;
  }
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace)
    [data-mobile-view="conversation"] > .conversation-card {
    display: flex;
    /* Allow the page to scroll naturally when status and composer grow.
       The visual viewport helper still keeps the composer accessible with the iOS keyboard. */
    min-height: 0;
    height: auto;
    overflow: visible;
    border: 1px solid rgba(22, 140, 255, .44);
    background: linear-gradient(155deg, rgba(6, 23, 44, .96), rgba(2, 10, 21, .98));
    box-shadow:
      0 0 26px rgba(22, 140, 255, .26),
      0 0 54px rgba(22, 140, 255, .09),
      inset 0 0 28px rgba(22, 140, 255, .055);
  }
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace)
    [data-mobile-view="conversation"] .message-copy {
    min-height: 44px;
    padding: 8px 12px;
    border-color: rgba(22, 140, 255, .6);
    background: linear-gradient(145deg, rgba(22, 140, 255, .22), rgba(3, 20, 38, .96));
    color: #e7f6ff;
    box-shadow: inset 0 0 12px rgba(22, 140, 255, .08), 0 0 14px rgba(22, 140, 255, .12);
    font-size: 0.75rem;
  }
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace)
    [data-mobile-view="conversation"] .section-heading-actions > *,
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace)
    [data-mobile-view="conversation"] #inspect-interaction,
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace)
    [data-mobile-view="conversation"] #cancel-interaction {
    min-width: 44px;
    min-height: 44px;
  }
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace)
    [data-mobile-view="conversation"] #inspect-interaction,
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace)
    [data-mobile-view="conversation"] #cancel-interaction,
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace)
    [data-mobile-view="conversation"] .governance-trace summary {
    border: 1px solid rgba(22, 140, 255, .34);
    border-radius: 8px;
    background: rgba(3, 18, 34, .9);
    color: #bfe2ff;
  }
  /* An idle or completed run is a short status line. Inspect activity restores
     the full details; running and error states keep their information visible. */
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace)
    [data-mobile-view="conversation"] #interaction-status:is([data-state="idle"], [data-state="completed"], [data-state="cancelled"]):not(.interaction-status--expanded) {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 8px 10px;
  }
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace)
    [data-mobile-view="conversation"] #interaction-status:is([data-state="idle"], [data-state="completed"], [data-state="cancelled"]):not(.interaction-status--expanded) .interaction-status__headline .eyebrow,
    [data-mobile-view="conversation"] #interaction-status:is([data-state="idle"], [data-state="completed"], [data-state="cancelled"]):not(.interaction-status--expanded) .interaction-status__pulse,
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace)
    [data-mobile-view="conversation"] #interaction-status:is([data-state="idle"], [data-state="completed"], [data-state="cancelled"]):not(.interaction-status--expanded) .interaction-status__body > p,
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace)
    [data-mobile-view="conversation"] #interaction-status:is([data-state="idle"], [data-state="completed"], [data-state="cancelled"]):not(.interaction-status--expanded) .interaction-status__facts,
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace)
    [data-mobile-view="conversation"] #interaction-status:is([data-state="idle"], [data-state="completed"], [data-state="cancelled"]):not(.interaction-status--expanded) #cancel-interaction {
    display: none;
  }
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace)
    [data-mobile-view="conversation"] #interaction-status:is([data-state="idle"], [data-state="completed"], [data-state="cancelled"]):not(.interaction-status--expanded) .interaction-status__actions {
    grid-column: auto;
  }
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace)
    [data-mobile-view="conversation"] #inspect-interaction {
    min-height: 44px;
  }
  /* Keep replies readable even when the status panel or composer grows.
     Long conversations scroll within a generously sized feed; the page itself
     can also scroll to the composer when the iOS keyboard is open. */
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace)
    [data-mobile-view="conversation"] .conversation-feed {
    flex: 0 0 auto;
    min-height: min(45dvh, 420px, var(--vi-mobile-viewport, 100dvh));
    max-height: min(65dvh, 680px, var(--vi-mobile-viewport, 100dvh));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace)
    [data-mobile-view="conversation"] .workspace-living-visual-panel,
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace)
    [data-mobile-view="living"] > .conversation-card,
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace)
    [data-mobile-view="inspector"] > .conversation-card {
    display: none !important;
  }
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace)
    [data-mobile-view="living"] .workspace-living-visual-panel,
  html[data-vi-active-screen="workspace"]:has(.vi-pixel-workspace)
    [data-mobile-view="inspector"] .workspace-living-visual-panel {
    display: block;
    width: 100%;
    height: auto;
    min-height: 0;
    overflow: visible;
  }
  .vi-pixel-workspace {
    display: block;
    width: 100%;
    height: auto;
    min-height: 0;
    overflow: visible;
  }
  .vi-pixel-workspace__canvas {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: auto;
    overflow: hidden;
    border: 1px solid rgba(22, 140, 255, .42);
    border-radius: 16px;
    background:
      radial-gradient(circle at 50% 38%, rgba(22, 140, 255, .2), transparent 52%),
      linear-gradient(155deg, rgba(4, 18, 35, .98), rgba(1, 7, 15, .99));
    box-shadow:
      0 0 30px rgba(22, 140, 255, .32),
      0 0 68px rgba(22, 140, 255, .1),
      inset 0 0 36px rgba(22, 140, 255, .1);
  }
  .vi-pixel-workspace__canvas > * { display: none; }

  /* Living V.I.: a real phone stage, independent of desktop left/top/31%/52.5%. */
  [data-mobile-view="living"] .vi-pixel-workspace__canvas {
    min-height: clamp(420px, 62dvh, 680px);
  }
  [data-mobile-view="living"] .vi-manifestation {
    position: relative;
    inset: auto;
    z-index: 3;
    display: block;
    width: 100%;
    height: clamp(420px, 62dvh, 680px);
    min-height: 52dvh;
    max-height: 65dvh;
    overflow: hidden;
    border: 0;
    border-radius: 15px;
    background: transparent;
    box-shadow: inset 0 0 34px rgba(22, 140, 255, .12);
  }
  [data-mobile-view="living"] .vi-manifestation__context,
  [data-mobile-view="living"] .vi-manifestation__explain {
    right: 12px;
    left: 12px;
    overflow: hidden;
    color: #9ab5cd;
    font-size: .68rem;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  [data-mobile-view="living"] .vi-manifestation__context { top: 10px; }
  [data-mobile-view="living"] .vi-manifestation__explain { bottom: 10px; }
  [data-mobile-view="living"] .vi-manifestation__stage {
    position: absolute;
    inset: 0;
    min-width: 0;
    min-height: 0;
    touch-action: none;
  }
  [data-mobile-view="living"] .vi-manifestation__stage canvas {
    width: 100% !important;
    height: 100% !important;
    touch-action: none;
  }

  /* Context: the existing governed Inspector, promoted to its own full-width window. */
  [data-mobile-view="inspector"] .vi-pixel-workspace__canvas {
    min-height: max(52dvh, 460px);
    padding: 8px;
  }
  [data-mobile-view="inspector"] .vi-inspector {
    position: relative;
    inset: auto;
    z-index: 3;
    display: block;
    width: 100%;
    height: auto;
    min-height: max(50dvh, 444px);
    overflow: hidden;
    border-color: rgba(22, 140, 255, .52);
    border-radius: 12px;
    box-shadow:
      0 0 24px rgba(22, 140, 255, .35),
      inset 0 0 28px rgba(22, 140, 255, .07);
    font-size: .82rem;
  }
  [data-mobile-view="inspector"] .vi-inspector-tabs {
    height: auto;
    min-height: 52px;
  }
  [data-mobile-view="inspector"] .vi-inspector-tabs button {
    min-height: 52px;
    font-size: .68rem;
  }
  [data-mobile-view="inspector"] .vi-inspector-panel {
    height: auto;
    min-height: calc(max(50dvh, 444px) - 52px);
    padding: 16px;
  }

  .conversation-card .composer {
    padding-bottom: max(8px, env(safe-area-inset-bottom));
  }
  .conversation-card .composer textarea,
  .conversation-card .provider-select-label select,
  .conversation-card .composer button[type="submit"] {
    min-height: 44px;
  }
}
