:root {
  --nav: #07105f;
  --nav-active: #086cff;
  --blue: #0969ff;
  --blue-soft: #eaf3ff;
  --green: #0f8f55;
  --green-soft: #e2f6ec;
  --amber: #c67800;
  --amber-soft: #fff1d8;
  --red: #d83b34;
  --red-soft: #fde7e5;
  --ink: #18202a;
  --muted: #667386;
  --line: #cfd8e3;
  --page: #f3f5f8;
  --panel: #fff;
  --soft: #f7f9fc;
  --shadow: 0 1px 3px rgba(17, 31, 48, 0.10);
}

* {
  box-sizing: border-box;
}

body {
  background: var(--page);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  margin: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.left-nav {
  background: var(--nav);
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100vh;
  left: 0;
  padding: 10px 0;
  position: fixed;
  top: 0;
  width: 154px;
  z-index: 20;
}

.nav-brand {
  align-items: center;
  display: flex;
  font-size: 18px;
  gap: 7px;
  margin: 0 10px 18px;
}

.brand-mark {
  background:
    radial-gradient(circle, currentColor 1px, transparent 2px),
    radial-gradient(circle at center, transparent 7px, currentColor 8px, transparent 9px);
  background-size: 5px 5px, 24px 24px;
  border-radius: 50%;
  height: 23px;
  width: 23px;
}

.left-nav button {
  background: transparent;
  border: 0;
  color: #d8e2ff;
  min-height: 40px;
  padding: 0 16px;
  text-align: left;
}

.left-nav button.active {
  background: var(--nav-active);
  color: #fff;
  font-weight: 800;
}

.nav-foot {
  bottom: 12px;
  color: #c9d5ff;
  font-size: 10px;
  font-weight: 700;
  left: 10px;
  position: absolute;
}

.app {
  margin-left: 154px;
  min-height: 100vh;
}

.top-bar {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 16px;
  grid-template-columns: 190px minmax(280px, 1fr) auto;
  min-height: 48px;
  padding: 0 18px;
  position: sticky;
  top: 0;
  z-index: 12;
}

.top-left,
.tenant,
.title-row,
.title-actions,
.panel-head,
.panel-actions,
.tabs,
.source-toggle,
.legend,
.prompt-row,
.metric-line,
.step-row,
.kpi-card .kpi-sub {
  align-items: center;
  display: flex;
}

.top-left {
  gap: 10px;
}

.hamburger {
  color: var(--muted);
  font-weight: 900;
}

.search {
  align-items: center;
  border: 1px solid #8d98a6;
  display: grid;
  grid-template-columns: 64px 1fr;
  height: 30px;
  max-width: 720px;
}

.search span {
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  padding-left: 11px;
}

.search input {
  border: 0;
  color: #526070;
  min-width: 0;
  outline: 0;
}

.tenant {
  gap: 8px;
  justify-content: flex-end;
  white-space: nowrap;
}

.tenant span:not(.avatar) {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.avatar {
  align-items: center;
  background: #5f36b7;
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  font-size: 11px;
  font-weight: 900;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.workspace {
  padding: 12px;
}

.title-row,
.panel,
.kpi-card {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.title-row {
  border-radius: 4px;
  justify-content: space-between;
  margin-bottom: 10px;
  min-height: 78px;
  padding: 14px 18px;
}

.crumb,
.eyebrow {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  margin: 0 0 4px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h1 {
  font-size: 24px;
  line-height: 1.1;
  margin: 0;
}

h2 {
  font-size: 16px;
  margin: 0;
}

h3 {
  font-size: 14px;
  margin: 0;
}

.title-row p:last-child {
  color: #415063;
  margin: 6px 0 0;
}

.title-actions {
  gap: 8px;
}

.scenario-control {
  align-items: center;
  border: 1px solid var(--line);
  display: grid;
  gap: 6px;
  grid-template-columns: auto minmax(180px, 1fr);
  min-height: 32px;
  padding: 0 8px;
}

.scenario-control span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.scenario-control select {
  border: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  min-width: 0;
  outline: 0;
}

.primary,
.secondary,
.icon-button {
  border-radius: 3px;
  font-weight: 800;
  min-height: 32px;
  padding: 0 14px;
}

.primary {
  background: #078b52;
  border: 1px solid #057141;
  color: #fff;
}

.secondary,
.icon-button {
  background: #fff;
  border: 1px solid #97a5b6;
  color: var(--ink);
}

.secondary.small {
  font-size: 12px;
  min-height: 28px;
  padding: 0 10px;
}

.icon-button {
  font-size: 19px;
  height: 30px;
  padding: 0;
  width: 30px;
}

.kpi-row {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 10px;
}

.kpi-card {
  border-radius: 3px;
  min-height: 82px;
  padding: 12px 14px;
}

.kpi-card strong {
  display: block;
  font-size: 28px;
  line-height: 1;
  margin: 7px 0 6px;
}

.kpi-card .kpi-sub {
  color: var(--muted);
  font-size: 12px;
  gap: 6px;
}

.pill {
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  padding: 4px 7px;
}

.pill.ok,
.health.ok,
.health {
  background: var(--green-soft);
  color: #087846;
}

.pill.warn,
.status-pill,
.status-pill.warn,
.health.warn {
  background: var(--amber-soft);
  color: #8a5200;
}

.pill.bad,
.status-pill.bad,
.health.bad {
  background: var(--red-soft);
  color: var(--red);
}

.portal-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 290px minmax(650px, 1fr) 310px;
  grid-template-areas:
    "inventory blueprint assistant"
    "inventory map inspector"
    "source source records"
    "smartboard smartboard records";
}

.panel {
  border-radius: 3px;
  min-width: 0;
  padding: 12px;
}

.panel-head {
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.panel-actions {
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.inventory {
  grid-area: inventory;
}

.blueprint {
  grid-area: blueprint;
  align-self: start;
}

.blueprint.collapsed .tabs,
.blueprint.collapsed .blueprint-grid {
  display: none;
}

.blueprint.collapsed .panel-head {
  margin-bottom: 0;
}

.inspector {
  grid-area: inspector;
  max-height: 548px;
  overflow: auto;
}

.map-panel {
  grid-area: map;
  min-height: 0;
}

.assistant {
  grid-area: assistant;
  align-self: start;
}

.source-panel {
  grid-area: source;
}

.smartboard {
  grid-area: smartboard;
}

.records {
  grid-area: records;
}

.tree {
  background: #f7f7f7;
  border: 1px solid var(--line);
  margin-bottom: 10px;
}

.tree-row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  font-size: 12px;
  justify-content: space-between;
  min-height: 26px;
  padding: 0 8px;
}

.tree-row:last-child {
  border-bottom: 0;
}

.tree-row.active {
  background: #dcdcdc;
  font-weight: 900;
}

.agent-list {
  display: grid;
  gap: 8px;
}

.agent-card {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid transparent;
  border-radius: 4px;
  padding: 10px;
  text-align: left;
  width: 100%;
}

.agent-card.active {
  background: #f6fbff;
  border-color: #9cc8ff;
  border-left-color: var(--blue);
}

.agent-class {
  color: var(--blue);
  display: block;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.agent-card p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  margin: 6px 0 8px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tag {
  background: #eef2f7;
  border-radius: 999px;
  color: #425061;
  font-size: 10px;
  font-weight: 900;
  padding: 4px 6px;
}

.tag.ok {
  background: var(--green-soft);
  color: #087846;
}

.tag.warn {
  background: var(--amber-soft);
  color: #8a5200;
}

.tag.bad {
  background: var(--red-soft);
  color: var(--red);
}

.tabs {
  border-bottom: 1px solid var(--line);
  gap: 20px;
  margin: 0 -12px 12px;
  padding: 0 12px;
}

.tabs button {
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  min-height: 34px;
}

.tabs button.active {
  border-bottom-color: var(--blue);
  color: var(--ink);
}

.blueprint-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-card,
.metric-line,
.source-card {
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 9px 10px;
}

.field-card.wide {
  grid-column: 1 / -1;
}

.field-card span,
.metric-line span,
.step-row span {
  color: var(--muted);
  display: block;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.field-card strong,
.metric-line strong {
  display: block;
  font-size: 13px;
  margin-top: 3px;
}

.field-card p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  margin: 4px 0 0;
}

.metric-stack {
  display: grid;
  gap: 8px;
}

.metric-line {
  justify-content: space-between;
  min-height: 44px;
}

.metric-line strong {
  text-align: right;
}

.inspector .metric-line {
  align-items: start;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
}

.inspector .metric-line strong {
  overflow-wrap: anywhere;
  text-align: left;
}

.health,
.status-pill {
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  padding: 5px 8px;
}

.workflow-map {
  background:
    linear-gradient(90deg, rgba(18, 46, 77, 0.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(18, 46, 77, 0.06) 1px, transparent 1px),
    #fbfdff;
  background-size: 28px 28px;
  border: 1px solid var(--line);
  height: clamp(250px, 17vw, 315px);
  min-height: 0;
  overflow: hidden;
  padding: 10px;
}

.workflow-map svg {
  display: block;
  height: 100%;
  width: 100%;
}

.lane-label {
  fill: #667386;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.lane-line {
  stroke: #c8d3df;
  stroke-dasharray: 7 7;
}

.lane-band {
  fill: rgba(234, 243, 255, 0.58);
  stroke: rgba(178, 194, 213, 0.55);
}

.flow-edge {
  fill: none;
  marker-end: url(#arrow);
  stroke: #8ca3bc;
  stroke-width: 2.4;
}

.flow-edge.warn,
.flow-edge.active {
  stroke: var(--amber);
}

.flow-edge.bad {
  stroke: var(--red);
}

.map-node {
  cursor: pointer;
}

.node-ring {
  fill: #fff;
  stroke: var(--green);
  stroke-width: 4;
}

.map-node.warn .node-ring {
  stroke: var(--amber);
}

.map-node.bad .node-ring {
  stroke: var(--red);
}

.map-node.selected .node-ring {
  stroke: var(--blue);
  stroke-width: 5.5;
}

.node-core {
  fill: #172232;
  stroke: #fff;
  stroke-width: 2;
}

.node-letter {
  fill: #fff;
  font-size: 16px;
  font-weight: 900;
  text-anchor: middle;
}

.node-title {
  fill: var(--ink);
  font-size: 12px;
  font-weight: 900;
  text-anchor: middle;
}

.node-meta,
.edge-label {
  fill: #687588;
  font-size: 10px;
  font-weight: 800;
  opacity: 0.9;
  text-anchor: middle;
}

.legend {
  color: var(--muted);
  font-size: 11px;
  gap: 12px;
}

.legend i {
  border-radius: 50%;
  display: inline-block;
  height: 7px;
  margin-right: 4px;
  width: 7px;
}

.ok-dot {
  background: var(--green);
}

.warn-dot {
  background: var(--amber);
}

.bad-dot {
  background: var(--red);
}

.node-evidence {
  border: 1px solid var(--line);
  border-top: 0;
  display: grid;
  gap: 8px;
  padding: 10px;
}

.node-evidence-head {
  align-items: start;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.node-evidence h3 {
  font-size: 14px;
  margin: 0 0 4px;
}

.node-evidence p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.38;
  margin: 0;
}

.evidence-grid,
.strategy-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.evidence-card,
.strategy-card {
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 8px 9px;
}

.evidence-card span,
.strategy-card span {
  color: var(--muted);
  display: block;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.evidence-card strong,
.strategy-card strong {
  display: block;
  font-size: 12px;
  line-height: 1.25;
}

.strategy-hero {
  background: #f8fbff;
  border: 1px solid #b8d5ff;
  border-left: 4px solid var(--blue);
  border-radius: 3px;
  padding: 9px;
}

.strategy-hero strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}

.strategy-hero p,
.strategy-section p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.38;
  margin: 0;
}

.strategy-section {
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 9px;
}

.strategy-section h3 {
  font-size: 12px;
  margin: 0 0 6px;
}

.strategy-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
}

.strategy-list li {
  color: #2e3a4a;
  font-size: 12px;
  line-height: 1.35;
  list-style: none;
  padding-left: 14px;
  position: relative;
}

.strategy-list li::before {
  background: var(--blue);
  border-radius: 50%;
  content: "";
  height: 5px;
  left: 0;
  position: absolute;
  top: 6px;
  width: 5px;
}

.strategy-cta {
  border-color: #9cc8ff;
  background: var(--blue-soft);
}

.assistant-thread {
  display: grid;
  gap: 8px;
  max-height: 210px;
  overflow: auto;
}

.message {
  background: #f7faff;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 12px;
  line-height: 1.45;
  padding: 9px;
}

.message b {
  display: block;
  margin-bottom: 4px;
}

.prompt-row {
  gap: 6px;
  margin-top: 10px;
}

.prompt-row button,
.source-toggle button {
  background: var(--blue-soft);
  border: 1px solid #b8d5ff;
  border-radius: 3px;
  color: #174f91;
  flex: 1;
  font-size: 12px;
  font-weight: 900;
  min-height: 28px;
}

.source-toggle {
  background: #eef3f9;
  border: 1px solid var(--line);
  border-radius: 4px;
  gap: 3px;
  padding: 3px;
}

.source-toggle button {
  background: transparent;
  border: 0;
  color: #4f5f71;
  min-width: 84px;
}

.source-toggle button.active {
  background: #fff;
  box-shadow: var(--shadow);
  color: var(--ink);
}

.source-layout {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 0.8fr) minmax(420px, 1.2fr);
}

#sourceSummary {
  display: grid;
  gap: 8px;
}

.source-card strong {
  display: block;
  margin-bottom: 4px;
}

.source-card p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  margin: 0;
}

#sourceJson,
.script-preview {
  background: #172232;
  border-radius: 3px;
  color: #edf6ff;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.5;
  margin: 0;
  max-height: 260px;
  overflow: auto;
  padding: 12px;
  white-space: pre-wrap;
}

.timeline {
  border: 1px solid var(--line);
  background: #fff;
  height: clamp(230px, 15vw, 275px);
  min-height: 0;
  overflow: hidden;
  padding: 10px 12px 12px;
}

.timeline svg {
  display: block;
  height: calc(100% - 52px);
  min-height: 160px;
  width: 100%;
}

.chart-metrics {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 6px;
}

.chart-metric {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 6px 8px;
}

.chart-metric span {
  color: var(--muted);
  display: block;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin-bottom: 3px;
  text-transform: uppercase;
}

.chart-metric strong {
  display: block;
  font-size: 14px;
}

.steps {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
}

.step-row {
  border: 1px solid var(--line);
  border-left: 4px solid var(--line);
  border-radius: 3px;
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(0, 1fr) 70px 70px;
  padding: 9px;
}

.step-row.warn {
  border-left-color: var(--amber);
}

.step-row.bad {
  border-left-color: var(--red);
}

.step-row strong {
  display: block;
  font-size: 12px;
}

.bar-track {
  background: #e5eaf0;
  border-radius: 99px;
  height: 5px;
  margin-top: 5px;
  overflow: hidden;
}

.bar {
  background: var(--blue);
  height: 100%;
}

.toast {
  background: #172232;
  border-radius: 3px;
  bottom: 18px;
  color: #fff;
  font-weight: 900;
  left: 50%;
  opacity: 0;
  padding: 10px 14px;
  pointer-events: none;
  position: fixed;
  transform: translate(-50%, 12px);
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 30;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.modal-backdrop {
  align-items: center;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 34px;
  position: fixed;
  z-index: 60;
}

.modal-backdrop.hidden {
  display: none;
}

.instant-window {
  background: #fff;
  border: 1px solid #9aa7b6;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: min(880px, calc(100vh - 68px));
  max-width: 1120px;
  min-height: 640px;
  width: min(1120px, calc(100vw - 68px));
}

.instant-titlebar,
.instant-footer {
  align-items: center;
  display: flex;
}

.instant-titlebar {
  border-bottom: 1px solid var(--line);
  justify-content: space-between;
  min-height: 62px;
  padding: 12px 16px;
}

.modal-close {
  background: transparent;
  border: 0;
  color: #344255;
  font-size: 24px;
  height: 34px;
  width: 34px;
}

.instant-body {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  min-height: 0;
}

.instant-side {
  background: #f2f4f7;
  border-right: 1px solid var(--line);
  display: grid;
  align-content: start;
  gap: 0;
  padding: 10px 0;
}

.instant-side button {
  background: transparent;
  border: 0;
  border-left: 4px solid transparent;
  color: #344255;
  font-size: 12px;
  font-weight: 900;
  min-height: 36px;
  padding: 0 14px;
  text-align: left;
}

.instant-side button.active {
  background: #fff;
  border-left-color: var(--blue);
}

.instant-main {
  min-height: 0;
  overflow: auto;
  padding: 14px;
}

.instant-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 12px;
}

.instant-summary-card,
.quick-check {
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 10px;
}

.instant-summary-card span,
.quick-check span {
  color: var(--muted);
  display: block;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.instant-summary-card strong {
  display: block;
  font-size: 20px;
}

.instant-summary-card .subtle {
  color: var(--muted);
  display: block;
  font-size: 11px;
  line-height: 1.35;
  margin-top: 4px;
}

.quick-check-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.quick-check {
  border-left: 4px solid var(--green);
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.quick-check.warn {
  border-left-color: var(--amber);
}

.quick-check.bad {
  border-left-color: var(--red);
}

.quick-check.running {
  border-left-color: var(--blue);
}

.quick-check p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  margin: 2px 0 0;
}

.quick-check strong {
  display: block;
  font-size: 14px;
}

.check-status {
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  padding: 5px 8px;
  place-self: start end;
}

.check-status.ok {
  background: var(--green-soft);
  color: #087846;
}

.check-status.warn {
  background: var(--amber-soft);
  color: #8a5200;
}

.check-status.bad {
  background: var(--red-soft);
  color: var(--red);
}

.check-status.running {
  background: var(--blue-soft);
  color: #174f91;
}

.instant-footer {
  border-top: 1px solid var(--line);
  gap: 8px;
  justify-content: flex-end;
  padding: 10px 14px;
}

@media (max-width: 1320px) {
  .portal-grid {
    grid-template-columns: 280px minmax(0, 1fr);
    grid-template-areas:
      "inventory blueprint"
      "inventory map"
      "inspector assistant"
      "source source"
      "smartboard records";
  }

  .kpi-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .evidence-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .left-nav {
    display: none;
  }

  .app {
    margin-left: 0;
  }

  .portal-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "inventory"
      "blueprint"
      "map"
      "inspector"
      "assistant"
      "source"
      "smartboard"
      "records";
  }

  .inspector {
    max-height: none;
    overflow: visible;
  }

  .inventory .agent-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .top-bar,
  .source-layout {
    grid-template-columns: 1fr;
  }

  .evidence-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .left-nav {
    display: none;
  }

  .app {
    margin-left: 0;
  }

  .title-row,
  .blueprint-grid {
    grid-template-columns: 1fr;
  }

  .title-row,
  .title-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .scenario-control {
    grid-template-columns: 1fr;
    padding: 7px 8px;
  }

  .kpi-row {
    grid-template-columns: 1fr;
  }

  .inventory .agent-list {
    grid-template-columns: 1fr;
  }

  .source-toggle,
  .tabs {
    overflow-x: auto;
  }

  .instant-window {
    min-height: 0;
    width: calc(100vw - 28px);
  }

  .instant-body,
  .instant-summary,
  .quick-check-grid,
  .evidence-grid,
  .chart-metrics {
    grid-template-columns: 1fr;
  }
}
