:root {
  color-scheme: dark;
  --bg-0: #03090b;
  --bg-1: #061113;
  --bg-2: #081a1d;
  --panel: rgba(8, 27, 31, 0.86);
  --panel-strong: rgba(10, 35, 40, 0.94);
  --panel-soft: rgba(10, 42, 47, 0.62);
  --line: rgba(119, 241, 225, 0.16);
  --line-strong: rgba(119, 241, 225, 0.32);
  --text: #eef8f6;
  --muted: #91a8aa;
  --faint: #61797c;
  --cyan: #39efe0;
  --cyan-2: #13b7c4;
  --amber: #f2b84b;
  --red: #ff6d61;
  --green: #74e38a;
  --blue: #7ea7ff;
  --ink: #031113;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.44);
  --glow-cyan: 0 0 24px rgba(57, 239, 224, 0.26);
  --radius: 8px;
  --radius-sm: 5px;
  --topbar-h: 70px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg-0);
}

body {
  min-height: 100dvh;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(57, 239, 224, 0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(57, 239, 224, 0.026) 1px, transparent 1px),
    linear-gradient(180deg, rgba(5, 20, 25, 0.94), var(--bg-0) 58%),
    var(--bg-0);
  background-size: 36px 36px, 36px 36px, auto, auto;
  font-family: "Bahnschrift", "DIN Alternate", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(115deg, rgba(57, 239, 224, 0.12), transparent 24%),
    linear-gradient(250deg, rgba(255, 109, 97, 0.09), transparent 28%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 4px);
  mix-blend-mode: screen;
  opacity: 0.74;
}

body::selection {
  color: var(--ink);
  background: var(--cyan);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

button,
a,
select,
input {
  touch-action: manipulation;
}

button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 2px solid rgba(57, 239, 224, 0.86);
  outline-offset: 2px;
}

code {
  padding: 2px 6px;
  border: 1px solid rgba(57, 239, 224, 0.16);
  border-radius: 4px;
  color: var(--cyan);
  background: rgba(3, 17, 19, 0.7);
}

.app-shell {
  min-height: 100dvh;
}

.command-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  min-height: var(--topbar-h);
  grid-template-columns: minmax(290px, 4fr) minmax(330px, auto) minmax(520px, 7fr);
  gap: 14px;
  align-items: center;
  padding: 10px max(14px, calc((100vw - 1780px) / 2 + 14px));
  border-bottom: 1px solid var(--line);
  background: rgba(3, 11, 13, 0.91);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
  max-width: 100%;
}

.brand__mark {
  display: grid;
  width: 58px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(57, 239, 224, 0.68);
  border-radius: 7px;
  color: var(--cyan);
  background:
    linear-gradient(135deg, rgba(57, 239, 224, 0.2), rgba(8, 27, 31, 0.6)),
    rgba(8, 27, 31, 0.92);
  box-shadow: var(--glow-cyan);
  font-size: 28px;
  font-style: italic;
  font-weight: 900;
}

.brand__copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand__copy strong {
  overflow: hidden;
  font-size: 18px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand__copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand__team {
  color: var(--cyan) !important;
  letter-spacing: 0;
  text-transform: none !important;
}

.main-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(78px, 1fr));
  gap: 6px;
  align-items: center;
  justify-self: center;
  width: min(100%, 390px);
  min-width: 330px;
  padding: 4px;
  border: 1px solid rgba(119, 241, 225, 0.12);
  border-radius: var(--radius);
  background: rgba(4, 16, 19, 0.76);
}

.main-nav a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #c8d7d7;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.main-nav a:hover,
.main-nav a.is-active {
  border-color: rgba(57, 239, 224, 0.42);
  color: var(--text);
  background: linear-gradient(180deg, rgba(57, 239, 224, 0.22), rgba(57, 239, 224, 0.06));
  box-shadow: inset 0 -2px 0 var(--cyan), var(--glow-cyan);
}

.main-nav a:active {
  transform: scale(0.98);
}

.topbar-ops {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  justify-self: end;
  max-width: 100%;
}

.status-pill,
.topbar-chip,
.mini-label,
.mini-link,
.panel-link,
.rail-note {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid rgba(119, 241, 225, 0.16);
  border-radius: 999px;
  color: #cddedf;
  background: rgba(8, 27, 31, 0.76);
  font-size: 11px;
  white-space: nowrap;
}

.status-pill {
  min-width: 132px;
  border-color: rgba(116, 227, 138, 0.28);
  color: var(--green);
  background: rgba(20, 83, 44, 0.36);
}

.status-pill strong {
  color: inherit;
  font-size: 11px;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 16px currentColor;
}

.topbar-chip--button {
  cursor: pointer;
}

.topbar-chip--accent {
  border-color: rgba(242, 184, 75, 0.28);
  color: var(--amber);
}

.topbar-chip--model,
.topbar-chip--kg {
  border-color: rgba(57, 239, 224, 0.24);
  color: #c9fffa;
}

.lang-toggle {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid rgba(119, 241, 225, 0.2);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(8, 27, 31, 0.76);
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.workspace-grid {
  display: grid;
  grid-template-columns: 178px minmax(0, 1fr);
  gap: 12px;
  width: min(1800px, calc(100% - 16px));
  margin: 0 auto;
  padding: 10px 0 18px;
}

.command-main {
  min-width: 0;
}

.ops-rail {
  position: sticky;
  top: calc(var(--topbar-h) + 10px);
  display: grid;
  gap: 0;
  align-self: start;
  max-height: calc(100dvh - var(--topbar-h) - 24px);
  overflow: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(57, 239, 224, 0.08), transparent 34%),
    rgba(4, 18, 21, 0.86);
  box-shadow: var(--shadow);
}

.workbench-title {
  min-height: 54px;
  padding: 18px 18px 12px;
  border-bottom: 1px solid rgba(119, 241, 225, 0.1);
  color: #d7e5e4;
  font-size: 15px;
  font-weight: 800;
}

.workbench-nav {
  display: grid;
  padding: 16px 0;
}

.workbench-nav__item {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 0 16px 0 18px;
  border-left: 3px solid transparent;
  color: #9fb4b6;
  font-size: 15px;
  font-weight: 800;
}

.workbench-nav__item:hover,
.workbench-nav__item.is-active {
  border-left-color: var(--cyan);
  color: var(--text);
  background: linear-gradient(90deg, rgba(57, 239, 224, 0.2), rgba(57, 239, 224, 0.02));
}

.workbench-icon {
  position: relative;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid rgba(119, 241, 225, 0.28);
  border-radius: 6px;
}

.workbench-icon::before,
.workbench-icon::after {
  position: absolute;
  content: "";
}

.workbench-icon::before {
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.workbench-icon--pin::before {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.workbench-icon--list::before {
  width: 14px;
  height: 2px;
  border: 0;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 6px 0 currentColor, 0 -6px 0 currentColor;
}

.workbench-icon--model::before {
  width: 14px;
  height: 8px;
}

.workbench-icon--shield::before {
  border-radius: 50% 50% 45% 45%;
}

.mission-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  min-height: 114px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(120deg, rgba(57, 239, 224, 0.14), transparent 42%),
    linear-gradient(270deg, rgba(255, 109, 97, 0.09), transparent 34%),
    rgba(6, 22, 26, 0.9);
  box-shadow: var(--shadow);
}

.mission-strip--page {
  min-height: 142px;
}

.mission-copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(28px, 3vw, 48px);
  line-height: 1.06;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0;
  font-size: 15px;
  line-height: 1.2;
}

.mission-copy p:last-child {
  max-width: 880px;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.mission-meta {
  display: grid;
  min-width: 230px;
  gap: 8px;
  justify-items: end;
}

.mission-meta span {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(119, 241, 225, 0.14);
  border-radius: 6px;
  color: #c7dddc;
  background: rgba(3, 14, 16, 0.64);
  font-size: 12px;
}

.kpi-grid,
.model-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 10px;
  margin: 10px 0;
}

.kpi-card,
.summary-card,
.runtime-card,
.proof-card,
.health-tile {
  position: relative;
  min-width: 0;
  border: 1px solid rgba(119, 241, 225, 0.14);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(57, 239, 224, 0.09), transparent 48%),
    rgba(8, 27, 31, 0.84);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.kpi-card {
  display: grid;
  min-height: 92px;
  align-content: center;
  gap: 5px;
  padding: 14px 15px;
}

.kpi-card::after,
.summary-card::after,
.proof-card::after {
  position: absolute;
  right: 12px;
  bottom: 10px;
  width: 38px;
  height: 12px;
  border-top: 2px solid rgba(57, 239, 224, 0.32);
  border-bottom: 2px solid rgba(57, 239, 224, 0.14);
  content: "";
  transform: skewX(-18deg);
}

.kpi-card small,
.summary-card small,
.runtime-card small,
.proof-card small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kpi-card strong,
.summary-card strong,
.runtime-card strong,
.proof-card strong {
  display: block;
  overflow: hidden;
  color: #f3fffd;
  font-variant-numeric: tabular-nums;
  font-size: 28px;
  line-height: 1.02;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kpi-card em,
.summary-card em,
.runtime-card em,
.proof-card em {
  display: block;
  overflow: hidden;
  color: var(--cyan);
  font-size: 11px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-grid {
  display: grid;
  align-items: start;
  gap: 10px;
  margin-top: 10px;
}

.command-grid--dashboard {
  grid-template-columns: minmax(0, 1.62fr) minmax(360px, 0.72fr);
  align-items: start;
}

.command-grid--evidence {
  grid-template-columns: minmax(420px, 1fr) minmax(420px, 1fr);
  align-items: stretch;
  grid-auto-rows: minmax(360px, auto);
}

.ops-console-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(360px, 0.72fr);
  --ops-panel-height: clamp(720px, calc(100vh - 238px), 860px);
  gap: 10px;
  align-items: stretch;
  margin-top: 10px;
}

.command-grid--data,
.command-grid--models,
.command-grid--knowledge {
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.78fr);
}

.command-grid--data-hero {
  grid-template-columns: minmax(0, 1.55fr) minmax(360px, 0.72fr);
}

.command-grid--data-evidence {
  grid-template-columns: minmax(340px, 0.78fr) minmax(0, 1.22fr);
}

.command-grid--data-files {
  grid-template-columns: minmax(0, 1fr);
}

.command-grid--knowledge-main {
  grid-template-columns: minmax(0, 1fr);
}

.command-grid--data-lower,
.command-grid--models-lower,
.command-grid--knowledge-lower {
  grid-template-columns: minmax(340px, 0.72fr) minmax(0, 1.28fr);
}

.command-grid--single {
  grid-template-columns: 1fr;
}

.panel {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(57, 239, 224, 0.06), transparent 34%),
    rgba(5, 21, 24, 0.88);
  box-shadow: var(--shadow);
}

.panel--tight {
  padding: 12px;
}

.panel__head {
  display: flex;
  min-height: 42px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel__head--map {
  margin-bottom: 8px;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.metric-tabs {
  display: inline-grid;
  grid-template-columns: repeat(4, minmax(52px, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(119, 241, 225, 0.14);
  border-radius: 7px;
  background: rgba(3, 14, 16, 0.72);
}

.metric-tabs button {
  min-height: 32px;
  border: 0;
  border-radius: 5px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.metric-tabs button.is-active {
  color: var(--ink);
  background: var(--cyan);
}

#zoneMetric {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

select {
  min-width: 132px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(119, 241, 225, 0.2);
  border-radius: 6px;
  color: var(--text);
  background: #061315;
  cursor: pointer;
}

.map-command-panel {
  display: grid;
  grid-template-rows: auto minmax(360px, 1fr) auto;
  gap: 10px;
  height: var(--ops-panel-height);
  align-content: stretch;
  overflow: hidden;
}

.ops-console-grid > .right-stack {
  height: var(--ops-panel-height);
}

.map-stage {
  position: relative;
  min-height: 475px;
  border: 1px solid rgba(119, 241, 225, 0.13);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(119, 241, 225, 0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(119, 241, 225, 0.035) 1px, transparent 1px),
    #061113;
  background-size: 42px 42px;
  overflow: hidden;
}

.map-stage--data {
  min-height: 500px;
}

.map-stage--real {
  min-height: 500px;
}

.map-command-panel .map-stage--real {
  min-height: 0;
}

.map-stage canvas {
  position: absolute;
  inset: 0;
}

.real-map {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #061113;
}

.fallback-map-canvas {
  z-index: 0;
  opacity: 0;
}

.map-stage.is-offline .real-map {
  display: none;
}

.map-stage.is-offline .fallback-map-canvas {
  z-index: 1;
  opacity: 1;
}

.leaflet-container {
  font: inherit;
  color: var(--text);
  background: #061113;
}

.leaflet-tile {
  filter: invert(1) hue-rotate(160deg) saturate(1.55) brightness(0.55) contrast(1.18);
}

.leaflet-control-attribution {
  color: rgba(238, 248, 246, 0.72);
  background: rgba(3, 14, 16, 0.72) !important;
  font-size: 10px;
}

.leaflet-control-zoom a {
  border-color: rgba(119, 241, 225, 0.18) !important;
  color: var(--cyan) !important;
  background: rgba(3, 14, 16, 0.86) !important;
}

.leaflet-bottom.leaflet-right {
  bottom: 64px;
}

.map-zone-label {
  border: 1px solid rgba(255, 109, 97, 0.45);
  color: #ffe5e2;
  background: rgba(112, 37, 32, 0.88);
  box-shadow: 0 0 20px rgba(255, 109, 97, 0.35);
  font-weight: 900;
}

.map-legend {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 4;
  display: grid;
  gap: 8px;
  min-width: 148px;
  padding: 12px;
  border: 1px solid rgba(119, 241, 225, 0.14);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(3, 14, 16, 0.66);
  backdrop-filter: blur(10px);
  font-size: 12px;
}

.map-offline-notice {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 4;
  max-width: 280px;
  padding: 9px 11px;
  border: 1px solid rgba(242, 184, 75, 0.35);
  border-radius: 7px;
  color: #ffe4a9;
  background: rgba(67, 45, 14, 0.82);
  font-size: 12px;
}

.map-legend strong {
  color: var(--text);
  font-size: 12px;
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

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

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

.legend-ring {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid var(--red);
  border-radius: 50%;
}

.map-tools {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  display: grid;
  gap: 7px;
}

.map-tools span {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(119, 241, 225, 0.2);
  border-radius: 6px;
  background: rgba(3, 14, 16, 0.72);
}

.embedded-chart {
  display: grid;
  gap: 8px;
  padding-top: 2px;
}

.embedded-chart__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.segmented {
  display: inline-grid;
  min-width: 250px;
  grid-template-columns: repeat(3, minmax(70px, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(119, 241, 225, 0.14);
  border-radius: 7px;
  background: rgba(3, 14, 16, 0.74);
}

.segmented button {
  min-height: 32px;
  border: 0;
  border-radius: 5px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.segmented button.is-active {
  color: var(--ink);
  background: var(--cyan);
  box-shadow: var(--glow-cyan);
}

.chart-frame {
  position: relative;
  width: 100%;
  min-height: 300px;
  border: 1px solid rgba(119, 241, 225, 0.1);
  border-radius: var(--radius);
  background: rgba(3, 14, 16, 0.6);
  overflow: hidden;
}

.chart-frame--compact {
  min-height: 176px;
  height: 176px;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
}

.right-stack {
  display: grid;
  gap: 10px;
}

.zone-stack {
  min-height: 0;
  grid-template-rows: minmax(0, 0.95fr) minmax(0, 1.05fr) auto;
  align-content: stretch;
  overflow: hidden;
}

.zone-intel-panel {
  min-height: 0;
}

.zone-stack > .panel {
  display: grid;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.zone-stack > .panel:last-child {
  align-self: center;
  width: 100%;
}

.zone-toolbar {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.zone-toolbar select {
  width: min(190px, 42vw);
  min-width: 0;
  height: 34px;
  min-height: 34px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
}

.zone-stack .zone-detail-card,
.zone-stack .dashboard-model-matrix {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.zone-stack .diversion-card {
  align-content: center;
}

.zone-detail-card {
  display: grid;
  gap: 10px;
}

.zone-detail-card__head,
.zone-headline,
.matrix-headline {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.zone-headline h3 {
  overflow: hidden;
  margin: 0;
  font-size: 28px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zone-headline small,
.matrix-headline em {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zone-score-card {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid rgba(119, 241, 225, 0.14);
  border-radius: var(--radius);
  background: rgba(3, 14, 16, 0.52);
  overflow: hidden;
}

.zone-score-card span,
.zone-detail-grid span,
.neighbor-line,
.diversion-card,
.matrix-row,
.check-item,
.rank-item,
.adr-item {
  min-width: 0;
  border: 1px solid rgba(119, 241, 225, 0.11);
  border-radius: 7px;
  background: rgba(8, 27, 31, 0.72);
}

.zone-score-card span {
  display: grid;
  gap: 5px;
  min-height: 68px;
  padding: 10px 12px;
  border-width: 0 1px 0 0;
  border-radius: 0;
}

.zone-score-card span:last-child {
  border-right: 0;
}

.zone-score-card small,
.zone-detail-grid small,
.neighbor-line span,
.diversion-card span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zone-score-card strong {
  color: #f4fffd;
  font-size: clamp(18px, 1.3vw, 24px);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  word-break: keep-all;
}

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

.zone-detail-grid span {
  display: grid;
  gap: 5px;
  padding: 9px 10px;
}

.zone-detail-grid strong,
.neighbor-line strong,
.diversion-card strong {
  overflow: hidden;
  color: #f0fbfa;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.neighbor-line,
.diversion-card {
  display: grid;
  gap: 5px;
  padding: 10px 12px;
}

.diversion-card strong {
  color: var(--cyan);
}

.risk-badge,
.status-badge {
  display: inline-flex;
  min-width: 64px;
  min-height: 27px;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border: 1px solid rgba(116, 227, 138, 0.28);
  border-radius: 999px;
  color: #dfffe6;
  background: rgba(36, 128, 68, 0.4);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.risk-badge.medium,
.status-badge.warning {
  border-color: rgba(242, 184, 75, 0.32);
  color: #ffe4a9;
  background: rgba(126, 80, 22, 0.48);
}

.status-badge.success {
  border-color: rgba(116, 227, 138, 0.34);
  color: #c6ffd3;
  background: rgba(36, 128, 68, 0.42);
}

.risk-badge.high,
.status-badge.fail,
.status-badge.danger {
  border-color: rgba(255, 109, 97, 0.36);
  color: #ffd4d1;
  background: rgba(135, 39, 36, 0.56);
}

.status-badge.neutral {
  border-color: rgba(157, 188, 194, 0.28);
  color: rgba(229, 243, 244, 0.78);
  background: rgba(54, 78, 84, 0.35);
}

.rank-list,
.check-list,
.adr-list,
.bar-stack,
.model-matrix {
  display: grid;
  gap: 8px;
}

.rank-list--dense {
  max-height: 360px;
  overflow: auto;
}

.rank-item,
.check-item,
.adr-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 52px;
  padding: 10px;
}

.rank-item--button {
  width: 100%;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.rank-item--button:hover,
.rank-item--button:focus-visible,
.rank-item--button.is-selected {
  border-color: rgba(57, 239, 224, 0.42);
  background: rgba(57, 239, 224, 0.08);
}

.interactive-row {
  cursor: pointer;
}

.interactive-row:hover td,
.interactive-row:focus-visible td,
.interactive-row.is-selected td {
  background: rgba(57, 239, 224, 0.07);
}

.interactive-row.is-selected td:first-child {
  box-shadow: inset 3px 0 0 var(--cyan);
}

.prediction-audit-note {
  display: grid;
  gap: 5px;
  min-height: 62px;
  padding: 12px;
  border: 1px solid rgba(242, 184, 75, 0.18);
  border-radius: 7px;
  color: var(--muted);
  background:
    linear-gradient(90deg, rgba(242, 184, 75, 0.12), transparent),
    rgba(8, 27, 31, 0.72);
}

.prediction-audit-note strong {
  color: var(--amber);
  font-size: 14px;
}

.prediction-audit-note span {
  font-size: 12px;
}

.rank-index {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(242, 184, 75, 0.32);
  border-radius: 5px;
  color: var(--amber);
  background: rgba(126, 80, 22, 0.24);
  font-weight: 900;
}

.rank-copy {
  min-width: 0;
}

.rank-copy strong,
.adr-item strong,
.matrix-row span,
.matrix-row strong,
.matrix-row em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-copy span,
.check-item span,
.adr-item span {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(119, 241, 225, 0.1);
  border-radius: var(--radius);
  background: rgba(3, 14, 16, 0.44);
}

.command-grid--evidence > .panel {
  display: flex;
  min-height: 360px;
  max-height: 480px;
  flex-direction: column;
  overflow: hidden;
}

.strategy-panel .table-wrap,
.dashboard-model-matrix--wide,
.command-grid--evidence .bar-stack,
.proof-panel .proof-grid,
.proof-panel .health-grid {
  min-height: 0;
  overflow: auto;
}

.strategy-panel .table-wrap,
.dashboard-model-matrix--wide {
  flex: 1;
}

.strategy-panel .panel-link {
  flex: 0 0 auto;
}

.balanced-scroll {
  scrollbar-width: thin;
  scrollbar-color: rgba(57, 239, 224, 0.42) rgba(3, 14, 16, 0.42);
}

.zone-stack .zone-detail-card,
.zone-stack .dashboard-model-matrix,
.strategy-panel .table-wrap,
.dashboard-model-matrix--wide,
.command-grid--evidence .bar-stack,
.proof-panel .proof-grid,
.proof-panel .health-grid {
  scrollbar-width: thin;
  scrollbar-color: rgba(57, 239, 224, 0.38) rgba(3, 14, 16, 0.42);
}

.zone-stack .zone-detail-card::-webkit-scrollbar,
.zone-stack .dashboard-model-matrix::-webkit-scrollbar,
.strategy-panel .table-wrap::-webkit-scrollbar,
.dashboard-model-matrix--wide::-webkit-scrollbar,
.command-grid--evidence .bar-stack::-webkit-scrollbar,
.proof-panel .proof-grid::-webkit-scrollbar,
.proof-panel .health-grid::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

.zone-stack .zone-detail-card::-webkit-scrollbar-thumb,
.zone-stack .dashboard-model-matrix::-webkit-scrollbar-thumb,
.strategy-panel .table-wrap::-webkit-scrollbar-thumb,
.dashboard-model-matrix--wide::-webkit-scrollbar-thumb,
.command-grid--evidence .bar-stack::-webkit-scrollbar-thumb,
.proof-panel .proof-grid::-webkit-scrollbar-thumb,
.proof-panel .health-grid::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(57, 239, 224, 0.34);
}

table {
  width: 100%;
  min-width: 660px;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(119, 241, 225, 0.08);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

td {
  color: #e9f7f5;
}

td.reason-cell {
  min-width: 240px;
  color: var(--muted);
  line-height: 1.6;
}

tr:last-child td {
  border-bottom: 0;
}

.panel-link,
.mini-link {
  width: fit-content;
  margin-top: 10px;
  border-color: rgba(57, 239, 224, 0.24);
  color: var(--cyan);
  background: rgba(57, 239, 224, 0.08);
}

.proof-grid,
.health-grid,
.runtime-grid {
  display: grid;
  gap: 8px;
}

.proof-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 8px;
}

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

.health-tile,
.proof-card {
  min-height: 74px;
  padding: 12px;
}

.health-tile strong {
  display: block;
  color: var(--cyan);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.health-tile span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.bar-row {
  display: grid;
  gap: 6px;
}

.bar-row__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.bar-row__top span,
.bar-row__top strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-row__top strong {
  color: #dcefed;
  font-variant-numeric: tabular-nums;
}

.bar-track {
  height: 9px;
  border: 1px solid rgba(119, 241, 225, 0.09);
  border-radius: 999px;
  background: rgba(3, 14, 16, 0.74);
  overflow: hidden;
}

.bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--cyan);
  box-shadow: 0 0 16px currentColor;
}

.data-files-panel,
.runtime-panel,
.leaderboard-panel {
  min-height: 420px;
}

.data-trust-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.data-trust-card {
  min-height: 92px;
  padding: 14px;
}

.data-workbench-row {
  align-items: stretch;
}

.data-workbench-row > .panel {
  display: grid;
  min-height: 0;
  overflow: hidden;
}

.data-workbench-row--hero > .panel {
  height: 640px;
}

.data-map-panel {
  grid-template-rows: auto minmax(0, 1fr);
}

.data-map-panel .map-stage--data {
  min-height: 0;
}

.data-contract-panel {
  grid-template-rows: auto auto minmax(0, 1fr);
}

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

.data-health-tile {
  min-height: 86px;
}

.data-health-tile strong {
  overflow-wrap: anywhere;
  font-size: 16px;
  line-height: 1.25;
}

.data-lineage {
  position: relative;
  display: grid;
  align-content: center;
  gap: 10px;
  min-height: 0;
  padding: 12px;
  border: 1px solid rgba(119, 241, 225, 0.11);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(119, 241, 225, 0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(119, 241, 225, 0.035) 1px, transparent 1px),
    rgba(3, 14, 16, 0.54);
  background-size: 30px 30px;
}

.lineage-step {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 10px;
  border: 1px solid rgba(119, 241, 225, 0.12);
  border-radius: 7px;
  background: rgba(8, 27, 31, 0.74);
}

.lineage-step span {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid rgba(57, 239, 224, 0.36);
  border-radius: 5px;
  color: var(--cyan);
  background: rgba(57, 239, 224, 0.1);
  font-weight: 900;
}

.lineage-step strong,
.lineage-step em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lineage-step em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.data-workbench-row--evidence > .panel {
  height: 430px;
  grid-template-rows: auto minmax(0, 1fr);
}

.data-workbench-row--files > .panel {
  height: 420px;
  grid-template-rows: auto minmax(0, 1fr);
}

.data-schema-panel .check-list,
.data-pressure-panel .pressure-stack,
.data-files-panel .table-wrap {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(57, 239, 224, 0.38) rgba(3, 14, 16, 0.42);
}

.pressure-stack {
  align-content: start;
}

.pressure-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 64px;
  padding: 10px;
  border: 1px solid rgba(119, 241, 225, 0.11);
  border-radius: 7px;
  color: inherit;
  background: rgba(8, 27, 31, 0.72);
  cursor: pointer;
  text-align: left;
}

.pressure-row:hover,
.pressure-row:focus-visible {
  border-color: rgba(57, 239, 224, 0.42);
  background: rgba(57, 239, 224, 0.08);
}

.pressure-copy {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.pressure-copy strong,
.pressure-copy em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pressure-copy em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.pressure-copy i {
  display: block;
  height: 7px;
  border-radius: 999px;
  background: rgba(3, 14, 16, 0.74);
  overflow: hidden;
}

.pressure-copy b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--amber);
  box-shadow: 0 0 14px rgba(242, 184, 75, 0.42);
}

.model-summary {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.summary-card,
.runtime-card {
  display: grid;
  min-height: 92px;
  align-content: center;
  gap: 6px;
  padding: 14px;
}

.runtime-grid {
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  margin-bottom: 10px;
}

.runtime-table-wrap {
  max-height: 310px;
}

.inline-control {
  display: inline-grid;
  grid-template-columns: minmax(92px, 126px) auto;
  gap: 8px;
}

.inline-control input {
  min-width: 0;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(119, 241, 225, 0.18);
  border-radius: 6px;
  color: var(--text);
  background: rgba(3, 14, 16, 0.74);
}

.inline-control button {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  color: var(--ink);
  background: var(--cyan);
  cursor: pointer;
  font-weight: 900;
}

.model-matrix-panel {
  min-height: 430px;
}

.models-workbench-row {
  align-items: stretch;
}

.models-workbench-row > .panel {
  display: grid;
  min-height: 0;
  overflow: hidden;
}

.models-workbench-row--runtime > .panel {
  height: clamp(560px, calc(100vh - 460px), 640px);
  grid-template-rows: auto minmax(0, 1fr);
}

.models-workbench-row--runtime > .runtime-panel {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.models-workbench-row--matrix > .panel {
  height: 600px;
  grid-template-rows: auto minmax(0, 1fr);
}

.models-workbench-row--audit > .panel {
  height: 620px;
  grid-template-rows: auto minmax(0, 1fr);
}

.models-workbench-row--cluster > .panel {
  min-height: 300px;
  grid-template-rows: auto minmax(0, 1fr);
}

.models-live-panel .rank-list,
.models-prediction-panel .rank-list,
.models-importance-panel .bar-stack,
.model-matrix-panel .model-matrix,
.models-cluster-panel .table-wrap,
.leaderboard-panel .table-wrap,
.runtime-panel .runtime-table-wrap {
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(57, 239, 224, 0.38) rgba(3, 14, 16, 0.42);
}

.runtime-panel .runtime-table-wrap {
  max-height: none;
}

.models-importance-panel .bar-stack {
  align-content: center;
}

.models-prediction-panel .rank-list {
  align-content: start;
}

.dashboard-model-matrix {
  display: grid;
  gap: 10px;
}

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

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

.mini-matrix-grid div {
  display: grid;
  gap: 6px;
  min-width: 0;
  min-height: 70px;
  padding: 10px;
  border: 1px solid rgba(119, 241, 225, 0.11);
  border-radius: 7px;
  background: rgba(8, 27, 31, 0.72);
}

.mini-matrix-grid span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-matrix-grid strong {
  overflow: hidden;
  color: var(--cyan);
  font-size: 19px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.matrix-unavailable {
  display: grid;
  min-height: 100%;
  align-content: center;
  gap: 10px;
}

.matrix-unavailable--compact {
  align-content: start;
}

.coverage-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid rgba(119, 241, 225, 0.14);
  border-radius: 7px;
  background: linear-gradient(135deg, rgba(20, 65, 66, 0.68), rgba(5, 20, 22, 0.82));
}

.coverage-banner strong {
  display: block;
  margin-bottom: 5px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.3;
}

.coverage-banner span:last-child,
.matrix-unavailable p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.map-marker--observed {
  cursor: help;
}

.map-marker--tracked {
  cursor: pointer;
}

.matrix-foot {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

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

.serving-summary div {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(119, 241, 225, 0.11);
  border-radius: 7px;
  background: rgba(8, 27, 31, 0.72);
}

.serving-summary span,
.serving-summary strong,
.serving-summary em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.serving-summary span,
.serving-summary em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.serving-summary strong {
  margin: 4px 0;
  color: var(--text);
  font-size: 14px;
}

.matrix-headline strong {
  overflow: hidden;
  font-size: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.matrix-columns h3 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.matrix-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 10px;
  min-height: 54px;
  margin-bottom: 8px;
  padding: 10px;
}

.matrix-row.is-selected {
  border-color: rgba(57, 239, 224, 0.5);
  background: rgba(57, 239, 224, 0.12);
}

.matrix-row strong {
  color: var(--cyan);
  font-size: 14px;
}

.matrix-row em {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.knowledge-stage {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.knowledge-map-panel {
  min-height: 690px;
}

.kg-visual-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 10px;
}

.kg-canvas-wrap {
  position: relative;
  min-height: 570px;
  height: 100%;
  border: 1px solid rgba(119, 241, 225, 0.11);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 50% 50%, rgba(57, 239, 224, 0.16), transparent 28%),
    linear-gradient(90deg, rgba(119, 241, 225, 0.03) 1px, transparent 1px),
    linear-gradient(0deg, rgba(119, 241, 225, 0.03) 1px, transparent 1px),
    rgba(3, 14, 16, 0.64);
  background-size: auto, 34px 34px, 34px 34px, auto;
  overflow: hidden;
  isolation: isolate;
}

.kg-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.kg-canvas:active {
  cursor: grabbing;
}

.kg-graph-hud {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 2;
  display: grid;
  gap: 4px;
  min-width: 210px;
  padding: 12px;
  border: 1px solid rgba(119, 241, 225, 0.22);
  border-radius: 8px;
  background: rgba(3, 14, 16, 0.68);
  backdrop-filter: blur(10px);
}

.kg-graph-hud strong {
  color: var(--cyan);
  font-size: 14px;
}

.kg-graph-hud span {
  color: var(--muted);
  font-size: 11px;
}

.kg-node-panel {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 570px;
  padding: 14px;
  border: 1px solid rgba(119, 241, 225, 0.12);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(57, 239, 224, 0.07), transparent 42%),
    rgba(3, 14, 16, 0.72);
}

.kg-node-panel h3 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 22px;
  line-height: 1.18;
}

.kg-node-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.kg-node-panel small {
  overflow-wrap: anywhere;
  color: var(--faint);
  font-size: 11px;
}

.kg-node-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.kg-node-meta span {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(119, 241, 225, 0.11);
  border-radius: 6px;
  color: var(--text);
  background: rgba(8, 27, 31, 0.68);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kg-layer-legend,
.kg-related {
  display: grid;
  gap: 7px;
}

.kg-layer-legend button,
.kg-related button {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid rgba(119, 241, 225, 0.11);
  border-radius: 6px;
  color: var(--text);
  background: rgba(8, 27, 31, 0.68);
  cursor: pointer;
  font-size: 12px;
}

.kg-related button {
  grid-template-columns: minmax(0, 1fr);
  justify-items: start;
}

.kg-layer-legend button:hover,
.kg-related button:hover {
  border-color: rgba(57, 239, 224, 0.42);
  background: rgba(57, 239, 224, 0.08);
}

.kg-layer-legend i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  box-shadow: 0 0 12px currentColor;
}

.kg-layer-legend span,
.kg-related button {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kg-layer-legend strong {
  color: var(--cyan);
  font-size: 11px;
}

.kg-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-bottom: 12px;
}

.kg-search input {
  min-width: 0;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(119, 241, 225, 0.18);
  border-radius: 7px;
  color: var(--text);
  background: rgba(3, 14, 16, 0.74);
}

.kg-search button {
  min-height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 7px;
  color: var(--ink);
  background: var(--cyan);
  cursor: pointer;
  font-weight: 900;
}

.kg-results {
  display: grid;
  gap: 8px;
}

.kg-result {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  min-height: 86px;
  padding: 12px;
  border: 1px solid rgba(119, 241, 225, 0.11);
  border-radius: 7px;
  color: inherit;
  background: rgba(8, 27, 31, 0.68);
  cursor: pointer;
  text-align: left;
}

.kg-result:hover,
.kg-result:focus-visible {
  border-color: rgba(57, 239, 224, 0.42);
  background: rgba(57, 239, 224, 0.08);
}

.kg-result strong,
.kg-result p,
.kg-result small {
  display: block;
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  text-overflow: ellipsis;
}

.kg-result p {
  margin: 5px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.kg-result small {
  color: var(--cyan);
  font-size: 11px;
}

.knowledge-stage .summary-card strong,
.kg-node-panel h3,
.kg-node-panel p,
.kg-node-panel small {
  overflow-wrap: anywhere;
  white-space: normal;
}

.layer-card {
  min-height: 150px;
  padding: 16px;
  border: 1px solid rgba(119, 241, 225, 0.14);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(57, 239, 224, 0.09), transparent 50%),
    rgba(8, 27, 31, 0.82);
  box-shadow: var(--shadow);
}

.layer-card span {
  display: inline-grid;
  width: 36px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(57, 239, 224, 0.42);
  border-radius: 6px;
  color: var(--cyan);
  background: rgba(57, 239, 224, 0.1);
  font-weight: 900;
}

.layer-card strong,
.layer-card small {
  display: block;
}

.layer-card strong {
  margin-top: 22px;
  font-size: 18px;
}

.layer-card small {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.5;
}

.system-map {
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, 1fr));
  gap: 12px;
  min-height: 310px;
  align-content: center;
  padding: 18px;
  border: 1px solid rgba(119, 241, 225, 0.11);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(119, 241, 225, 0.03) 1px, transparent 1px),
    linear-gradient(0deg, rgba(119, 241, 225, 0.03) 1px, transparent 1px),
    rgba(3, 14, 16, 0.54);
  background-size: 38px 38px;
}

.system-node {
  display: grid;
  min-height: 82px;
  place-items: center;
  border: 1px solid rgba(119, 241, 225, 0.18);
  border-radius: 8px;
  color: #e8fbf9;
  background: rgba(8, 27, 31, 0.82);
  text-align: center;
  font-weight: 900;
}

.system-node--source {
  border-color: rgba(242, 184, 75, 0.32);
  color: var(--amber);
}

.system-node--ai {
  border-color: rgba(126, 167, 255, 0.36);
  color: var(--blue);
}

.system-node--ui {
  border-color: rgba(57, 239, 224, 0.45);
  color: var(--cyan);
}

.evolution-steps {
  display: grid;
  gap: 9px;
}

.evolution-steps div {
  min-height: 72px;
  padding: 12px;
  border: 1px solid rgba(119, 241, 225, 0.11);
  border-radius: 7px;
  background: rgba(8, 27, 31, 0.7);
}

.evolution-steps strong,
.evolution-steps span {
  display: block;
}

.evolution-steps span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.error-state {
  display: grid;
  min-height: 60vh;
  place-content: center;
  gap: 14px;
  text-align: center;
}

.error-state p {
  color: var(--muted);
}

.primary-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  justify-self: center;
  padding: 0 18px;
  border-radius: 6px;
  color: var(--ink);
  background: var(--cyan);
  font-weight: 900;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 92px;
  z-index: 70;
  display: none;
  max-width: 360px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 109, 97, 0.32);
  border-radius: var(--radius);
  color: #ffe2df;
  background: rgba(70, 24, 24, 0.94);
  box-shadow: var(--shadow);
}

.toast.is-visible {
  display: block;
}

.logout-form {
  display: contents;
}

.auth-chip {
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.auth-page {
  min-height: 100dvh;
  background:
    radial-gradient(circle at 12% 18%, rgba(57, 239, 224, 0.18), transparent 30%),
    radial-gradient(circle at 88% 20%, rgba(242, 184, 75, 0.09), transparent 26%),
    linear-gradient(135deg, #02080a 0%, #031114 48%, #071113 100%);
}

.auth-page--cinematic {
  display: grid;
  overflow-x: hidden;
}

.login-cinema {
  width: min(1680px, calc(100% - 40px));
  min-height: 100dvh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(420px, 0.72fr);
  align-items: center;
  gap: clamp(22px, 3vw, 54px);
  padding: clamp(18px, 3vw, 46px) 0;
}

.login-map-panel {
  position: relative;
  min-height: min(860px, calc(100dvh - 56px));
  overflow: hidden;
  border: 1px solid rgba(57, 239, 224, 0.28);
  border-radius: 10px;
  background:
    linear-gradient(90deg, rgba(57, 239, 224, 0.05) 1px, transparent 1px),
    linear-gradient(0deg, rgba(57, 239, 224, 0.04) 1px, transparent 1px),
    #031012;
  background-size: 36px 36px;
  box-shadow:
    0 34px 120px rgba(0, 0, 0, 0.64),
    inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    inset 0 0 70px rgba(57, 239, 224, 0.05);
}

.login-map-panel::before {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(90deg, rgba(2, 8, 10, 0.2), transparent 20%, transparent 62%, rgba(2, 8, 10, 0.78)),
    linear-gradient(180deg, rgba(2, 8, 10, 0.2), transparent 54%, rgba(2, 8, 10, 0.72));
}

.login-real-map,
.login-map-vignette {
  position: absolute;
  inset: 0;
}

.login-real-map {
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(57, 239, 224, 0.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(57, 239, 224, 0.035) 1px, transparent 1px),
    #031012;
  background-size: 34px 34px;
}

.login-real-map .leaflet-tile-pane {
  filter: saturate(1.35) contrast(1.18) brightness(0.5) hue-rotate(142deg);
}

.login-real-map .leaflet-control-container {
  display: none;
}

.login-map-vignette {
  z-index: 3;
  pointer-events: none;
  background:
    radial-gradient(circle at 48% 43%, transparent 0 30%, rgba(0, 0, 0, 0.18) 58%, rgba(0, 0, 0, 0.7) 100%),
    radial-gradient(circle at 18% 32%, rgba(57, 239, 224, 0.18), transparent 24%),
    radial-gradient(circle at 60% 46%, rgba(255, 109, 97, 0.13), transparent 22%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.72));
  mix-blend-mode: screen;
}

.login-map-hud,
.login-hero-lockup,
.login-capability-row,
.login-map-attribution {
  position: relative;
  z-index: 7;
}

.login-map-hud {
  position: absolute;
  top: 22px;
  left: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(57, 239, 224, 0.2);
  border-radius: 8px;
  background: rgba(3, 15, 18, 0.72);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(12px);
  color: #d9f6f3;
  font-size: 12px;
  font-weight: 850;
}

.login-map-hud span {
  color: var(--cyan);
  font-family: var(--mono);
}

.login-map-hud b {
  color: var(--muted);
  font-weight: 800;
}

.login-hero-lockup {
  position: absolute;
  left: clamp(30px, 5vw, 72px);
  right: clamp(26px, 6vw, 92px);
  bottom: clamp(140px, 16vh, 190px);
}

.brand--login {
  width: fit-content;
  margin-bottom: clamp(22px, 4vh, 42px);
  filter: drop-shadow(0 0 22px rgba(57, 239, 224, 0.28));
}

.login-copy {
  max-width: 780px;
}

.login-copy h1 {
  margin: 12px 0 14px;
  font-size: clamp(42px, 5.8vw, 92px);
  line-height: 0.95;
  text-shadow: 0 14px 40px rgba(0, 0, 0, 0.58);
}

.login-copy p:not(.eyebrow) {
  max-width: 660px;
  color: #d0e2e0;
  font-size: clamp(16px, 1.2vw, 21px);
  line-height: 1.7;
}

.login-capability-row {
  position: absolute;
  left: clamp(30px, 5vw, 72px);
  right: clamp(30px, 8vw, 132px);
  bottom: 42px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.login-capability-row article {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 70px;
  padding: 12px 14px;
  border: 1px solid rgba(57, 239, 224, 0.18);
  border-radius: 8px;
  background: rgba(2, 12, 15, 0.56);
  backdrop-filter: blur(12px);
}

.login-capability-row strong,
.login-capability-row small {
  display: block;
}

.login-capability-row strong {
  color: #eef8f6;
  font-size: 15px;
}

.login-capability-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.login-map-attribution {
  position: absolute;
  right: 18px;
  bottom: 14px;
  color: rgba(210, 238, 235, 0.56);
  font-family: var(--mono);
  font-size: 11px;
}

.login-access-card {
  position: relative;
  display: grid;
  gap: 20px;
  align-content: center;
  min-height: 650px;
  padding: clamp(26px, 3.2vw, 48px);
  overflow: hidden;
  border: 1px solid rgba(57, 239, 224, 0.46);
  border-radius: 10px;
  background:
    linear-gradient(140deg, rgba(57, 239, 224, 0.12), transparent 35%),
    linear-gradient(180deg, rgba(9, 45, 49, 0.88), rgba(3, 14, 17, 0.94));
  box-shadow:
    0 36px 110px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -60px 110px rgba(57, 239, 224, 0.04);
  backdrop-filter: blur(18px);
}

.login-access-card::before {
  position: absolute;
  inset: 12px;
  pointer-events: none;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.035);
  border-radius: 8px;
}

.login-card-glow {
  position: absolute;
  top: -110px;
  right: -130px;
  width: 330px;
  height: 330px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(57, 239, 224, 0.18), transparent 64%);
  pointer-events: none;
}

.login-security-pill {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(116, 227, 138, 0.18);
  border-radius: 8px;
  color: #98f5b1;
  background: rgba(28, 104, 54, 0.18);
  font-size: 13px;
  font-weight: 900;
}

.login-card-heading {
  position: relative;
}

.login-card-heading h2 {
  margin: 10px 0 10px;
  font-size: clamp(34px, 3.2vw, 54px);
  line-height: 1.05;
  text-shadow: 0 10px 36px rgba(0, 0, 0, 0.5);
}

.login-card-heading p:not(.eyebrow) {
  max-width: 520px;
  color: #a9bebf;
  line-height: 1.7;
}

.secure-form {
  display: grid;
  gap: 14px;
}

.secure-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.secure-form input,
.secure-form select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.3);
  color: var(--text);
  padding: 0 13px;
  font: inherit;
  outline: none;
}

.secure-form input:focus,
.secure-form select:focus {
  border-color: var(--cyan);
  box-shadow: var(--glow-cyan);
}

.secure-form button:not(.password-toggle),
.admin-actions button {
  min-height: 42px;
  border: 1px solid rgba(45, 232, 219, 0.46);
  border-radius: 7px;
  background: linear-gradient(135deg, rgba(45, 232, 219, 0.92), rgba(31, 202, 189, 0.88));
  color: #032021;
  font-weight: 950;
  cursor: pointer;
}

.login-form {
  gap: 18px;
}

.login-field {
  gap: 9px;
}

.login-input-shell {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 58px;
  border: 1px solid rgba(142, 205, 207, 0.34);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.login-input-shell:focus-within {
  border-color: rgba(57, 239, 224, 0.82);
  background: rgba(2, 20, 23, 0.72);
  box-shadow: 0 0 0 3px rgba(57, 239, 224, 0.08), var(--glow-cyan);
}

.login-input-icon {
  position: relative;
  width: 18px;
  height: 18px;
  margin-left: 15px;
  color: #b5cccd;
}

.login-input-shell--user .login-input-icon::before {
  position: absolute;
  left: 5px;
  top: 1px;
  width: 8px;
  height: 8px;
  content: "";
  border: 2px solid currentColor;
  border-radius: 50%;
}

.login-input-shell--user .login-input-icon::after {
  position: absolute;
  left: 1px;
  bottom: 0;
  width: 16px;
  height: 9px;
  content: "";
  border: 2px solid currentColor;
  border-radius: 10px 10px 2px 2px;
}

.login-input-shell--password .login-input-icon::before {
  position: absolute;
  left: 2px;
  bottom: 0;
  width: 14px;
  height: 12px;
  content: "";
  border: 2px solid currentColor;
  border-radius: 4px;
}

.login-input-shell--password .login-input-icon::after {
  position: absolute;
  left: 5px;
  top: 0;
  width: 8px;
  height: 10px;
  content: "";
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 9px 9px 0 0;
}

.login-form .login-input-shell input {
  min-height: 56px;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #eef8f6;
  padding: 0 12px;
}

.login-form .login-input-shell input:focus {
  box-shadow: none;
}

.login-form .login-input-shell input::placeholder {
  color: rgba(211, 229, 228, 0.5);
}

.password-toggle {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 0;
  color: #b9d2d3;
  background: transparent;
  cursor: pointer;
}

.password-toggle svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-toggle:hover {
  color: var(--cyan);
}

.login-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  padding: 0 22px;
  font-size: 18px;
  letter-spacing: 0;
  box-shadow: 0 14px 42px rgba(57, 239, 224, 0.22);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.login-submit:hover {
  filter: brightness(1.07);
  box-shadow: 0 18px 56px rgba(57, 239, 224, 0.32);
  transform: translateY(-1px);
}

.login-submit:active {
  transform: translateY(0) scale(0.99);
}

.login-system-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(119, 241, 225, 0.16);
  border-radius: 8px;
  background: rgba(119, 241, 225, 0.14);
}

.login-system-strip article {
  min-height: 78px;
  padding: 15px;
  background: rgba(4, 22, 25, 0.84);
}

.login-system-strip span,
.login-system-strip strong {
  display: block;
}

.login-system-strip span {
  color: #a5babb;
  font-size: 12px;
  font-weight: 850;
}

.login-system-strip strong {
  margin-top: 8px;
  color: var(--green);
  font-size: 16px;
  line-height: 1.2;
}

.login-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: center;
  color: var(--muted);
  font-size: 13px;
}

.login-meta-line span + span::before {
  content: "·";
  margin-right: 18px;
  color: rgba(145, 168, 170, 0.55);
}

.form-alert {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-weight: 850;
}

.form-alert--error {
  border-color: rgba(255, 108, 96, 0.46);
  background: rgba(132, 35, 30, 0.28);
  color: #ffd0cc;
}

.form-alert--success {
  border-color: rgba(115, 233, 154, 0.42);
  background: rgba(27, 113, 61, 0.26);
  color: #baf8ca;
}

.command-grid--admin {
  grid-template-columns: minmax(320px, 0.45fr) minmax(0, 1fr);
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-actions form {
  margin: 0;
}

.admin-actions button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
}

.admin-actions .admin-action-accent {
  border-color: rgba(57, 239, 224, 0.34);
  color: var(--cyan);
  background: rgba(57, 239, 224, 0.12);
}

.admin-actions .admin-action-danger {
  border-color: rgba(255, 109, 97, 0.32);
  color: #ffbeb9;
  background: rgba(135, 39, 36, 0.2);
}

.reset-form {
  display: flex;
  gap: 6px;
  align-items: center;
}

.reset-form input {
  width: 140px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.24);
  color: var(--text);
  padding: 0 9px;
}

.status-badge.danger {
  border-color: rgba(255, 108, 96, 0.45);
  background: rgba(132, 35, 30, 0.24);
  color: #ffaca5;
}

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

.audit-row {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  border: 1px solid rgba(45, 232, 219, 0.14);
  border-radius: 7px;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.18);
}

.audit-row strong {
  color: var(--cyan);
}

.audit-row span,
.audit-row em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.audit-row--empty {
  grid-template-columns: 1fr;
  color: var(--muted);
}

.assistant-widget {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
}

.assistant-fab {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border: 1px solid rgba(57, 239, 224, 0.72);
  border-radius: 50%;
  color: var(--ink);
  background: var(--cyan);
  box-shadow: var(--shadow), var(--glow-cyan);
  cursor: pointer;
  font-weight: 900;
}

.assistant-panel {
  position: absolute;
  right: 0;
  bottom: 68px;
  display: grid;
  width: min(430px, calc(100vw - 24px));
  max-height: min(690px, calc(100dvh - 104px));
  grid-template-rows: auto auto auto minmax(190px, 1fr) auto;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(57, 239, 224, 0.11), transparent 38%),
    rgba(4, 15, 18, 0.98);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(18px);
}

.assistant-panel[hidden] {
  display: none;
}

.assistant-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.assistant-panel__head h2 {
  margin-bottom: 4px;
}

.assistant-panel__head span {
  color: var(--muted);
  font-size: 12px;
}

.assistant-icon-button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(119, 241, 225, 0.16);
  border-radius: 6px;
  color: #d8eeee;
  background: rgba(3, 14, 16, 0.74);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.assistant-status {
  min-height: 36px;
  padding: 9px 10px;
  border: 1px solid rgba(116, 227, 138, 0.24);
  border-radius: 6px;
  color: var(--green);
  background: rgba(20, 83, 44, 0.22);
  font-size: 12px;
  line-height: 1.45;
}

.assistant-prompts {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.assistant-prompts button {
  min-height: 32px;
  flex: 0 0 auto;
  padding: 0 10px;
  border: 1px solid rgba(119, 241, 225, 0.15);
  border-radius: 999px;
  color: #d7e9e8;
  background: rgba(8, 27, 31, 0.84);
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
}

.assistant-prompts button:hover {
  border-color: rgba(57, 239, 224, 0.38);
  color: var(--cyan);
}

.assistant-messages {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 190px;
  overflow-y: auto;
  padding: 2px;
}

.assistant-message {
  max-width: 91%;
  padding: 11px 12px;
  border: 1px solid rgba(119, 241, 225, 0.12);
  border-radius: 8px;
  color: #e9f8f6;
  background: rgba(8, 27, 31, 0.84);
}

.assistant-message--user {
  justify-self: end;
  border-color: rgba(57, 239, 224, 0.34);
  background: rgba(18, 82, 83, 0.58);
}

.assistant-message p {
  margin: 0;
  white-space: pre-line;
  font-size: 13px;
  line-height: 1.7;
}

.assistant-message small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.assistant-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.assistant-form input {
  min-width: 0;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(119, 241, 225, 0.16);
  border-radius: 6px;
  color: var(--text);
  background: rgba(3, 14, 16, 0.78);
}

.assistant-form button {
  min-width: 70px;
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  color: var(--ink);
  background: var(--cyan);
  cursor: pointer;
  font-weight: 900;
}

@media (prefers-reduced-motion: no-preference) {
  .panel,
  .kpi-card,
  .summary-card,
  .rail-group,
  .rank-item,
  .assistant-panel {
    animation: rise-in 260ms ease both;
  }

  @keyframes rise-in {
    from {
      opacity: 0;
      transform: translateY(8px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

@media (max-width: 1400px) {
  :root {
    --topbar-h: 117px;
  }

  .command-topbar {
    grid-template-columns: minmax(260px, 1fr) auto;
    row-gap: 10px;
  }

  .topbar-ops {
    grid-column: 1 / -1;
    justify-content: center;
    overflow: visible;
  }

  .workspace-grid {
    grid-template-columns: 220px minmax(0, 1fr);
  }

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

  .command-grid--dashboard,
  .ops-console-grid,
  .command-grid--evidence,
  .command-grid--data,
  .command-grid--data-hero,
  .command-grid--data-evidence,
  .command-grid--data-files,
  .command-grid--data-lower,
  .command-grid--models,
  .command-grid--models-lower,
  .command-grid--knowledge,
  .command-grid--knowledge-lower {
    grid-template-columns: 1fr;
  }

  .kg-visual-shell {
    grid-template-columns: 1fr;
  }

  .kg-node-panel {
    min-height: 0;
  }

  .ops-console-grid {
    --ops-panel-height: auto;
    align-items: start;
  }

  .map-command-panel,
  .ops-console-grid > .right-stack {
    height: auto;
  }

  .map-command-panel {
    grid-template-rows: auto;
    overflow: visible;
  }

  .map-command-panel .map-stage--real {
    min-height: 500px;
  }

  .zone-stack {
    grid-template-rows: none;
    overflow: visible;
  }

  .zone-stack > .panel {
    overflow: visible;
  }

  .zone-stack .zone-detail-card,
  .zone-stack .dashboard-model-matrix,
  .strategy-panel .table-wrap,
  .dashboard-model-matrix--wide,
  .command-grid--evidence .bar-stack,
  .proof-panel .proof-grid,
  .proof-panel .health-grid {
    overflow: visible;
  }

  .command-grid--evidence > .panel {
    max-height: none;
  }

  .data-trust-strip {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .data-workbench-row > .panel {
    height: auto;
    overflow: visible;
  }

  .data-map-panel .map-stage--data {
    min-height: 520px;
  }

  .data-schema-panel .check-list,
  .data-pressure-panel .pressure-stack,
  .data-files-panel .table-wrap {
    overflow: visible;
  }

  .models-workbench-row > .panel {
    height: auto;
    overflow: visible;
  }

  .models-live-panel .rank-list,
  .models-prediction-panel .rank-list,
  .models-importance-panel .bar-stack,
  .model-matrix-panel .model-matrix,
  .models-cluster-panel .table-wrap,
  .leaderboard-panel .table-wrap,
  .runtime-panel .runtime-table-wrap {
    overflow: visible;
  }
}

@media (max-width: 1020px) {
  .login-cinema {
    grid-template-columns: 1fr;
    min-height: auto;
    align-content: start;
    align-items: stretch;
    padding: 24px 0;
  }

  .login-map-panel {
    min-height: 620px;
  }

  .login-access-card {
    min-height: auto;
  }

  .login-hero-lockup {
    bottom: 132px;
  }

  .login-capability-row {
    right: 30px;
  }

  .command-grid--admin {
    grid-template-columns: 1fr;
  }

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

  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .ops-rail {
    position: static;
    max-height: none;
    grid-template-columns: 1fr;
  }

  .workbench-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 10px;
  }

  .workbench-title {
    min-height: 42px;
    padding: 12px 14px;
  }

  .workbench-nav__item {
    min-height: 48px;
    border-left: 0;
    border-radius: 7px;
    padding: 0 10px;
  }

  .command-topbar {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .main-nav,
  .topbar-ops {
    justify-self: stretch;
  }

  .main-nav {
    width: 100%;
    min-width: 0;
  }

  .topbar-ops {
    justify-content: flex-start;
  }

  .model-summary,
  .data-trust-strip,
  .knowledge-stage,
  .runtime-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  :root {
    --topbar-h: 64px;
  }

  .command-topbar {
    position: static;
    padding: 10px;
  }

  .login-cinema {
    width: min(100% - 16px, 1180px);
    padding: 8px 0 18px;
  }

  .login-map-panel {
    min-height: 560px;
  }

  .login-map-panel::after,
  .login-map-hud,
  .login-map-attribution {
    display: none;
  }

  .login-hero-lockup {
    left: 18px;
    right: 18px;
    bottom: 180px;
  }

  .brand--login {
    margin-bottom: 24px;
  }

  .login-copy h1 {
    font-size: clamp(34px, 10.2vw, 42px);
    text-wrap: balance;
  }

  .login-copy p:not(.eyebrow) {
    max-width: 320px;
    font-size: 15px;
    line-height: 1.55;
    overflow-wrap: anywhere;
  }

  .login-capability-row {
    left: 14px;
    right: 14px;
    bottom: 14px;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .login-capability-row article {
    min-height: 58px;
    padding: 9px 10px;
  }

  .login-access-card {
    padding: 18px;
  }

  .login-system-strip {
    grid-template-columns: 1fr;
  }

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

  .reset-form,
  .admin-actions {
    width: 100%;
  }

  .reset-form input {
    flex: 1;
    min-width: 0;
  }

  .brand {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .brand__mark {
    width: 48px;
    height: 38px;
    font-size: 22px;
  }

  .brand__copy strong {
    font-size: 15px;
  }

  .main-nav {
    width: 100%;
    overflow-x: auto;
  }

  .main-nav a {
    min-width: 72px;
  }

  .workspace-grid {
    width: min(100% - 12px, 1800px);
    padding-top: 6px;
  }

  .topbar-ops {
    width: 100%;
    flex-wrap: wrap;
    overflow: visible;
  }

  .status-pill,
  .topbar-chip {
    min-height: 32px;
  }

  .ops-rail,
  .kpi-grid,
  .model-summary,
  .data-trust-strip,
  .knowledge-stage,
  .runtime-grid,
  .proof-grid,
  .health-grid,
  .zone-score-card,
  .zone-detail-grid,
  .matrix-columns,
  .system-map {
    grid-template-columns: 1fr;
  }

  .kg-canvas-wrap {
    min-height: 430px;
    height: 430px;
  }

  .kg-canvas {
    min-height: 430px;
  }

  .kg-graph-hud {
    left: 10px;
    top: 10px;
    min-width: 0;
    max-width: calc(100% - 20px);
  }

  .kg-node-meta {
    grid-template-columns: 1fr;
  }

  .kg-search {
    grid-template-columns: 1fr;
  }

  .workbench-nav {
    grid-template-columns: 1fr;
  }

  table {
    min-width: 100%;
    table-layout: fixed;
    font-size: 12px;
  }

  th,
  td {
    padding: 9px 8px;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .table-wrap {
    overflow-x: hidden;
  }

  .mission-strip,
  .embedded-chart__head,
  .panel__head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .mission-strip {
    display: grid;
    min-height: 0;
    padding: 16px;
  }

  .mission-meta {
    min-width: 0;
    justify-items: start;
  }

  h1 {
    font-size: 30px;
  }

  .map-stage,
  .map-stage--data {
    min-height: 370px;
  }

  .map-stage--real {
    min-height: 430px;
  }

  .map-legend {
    position: relative;
    top: auto;
    left: auto;
    margin: 10px;
  }

  .map-stage canvas {
    top: 116px;
    height: calc(100% - 116px);
  }

  .real-map {
    top: 116px;
  }

  .segmented {
    width: 100%;
    min-width: 0;
  }

  .assistant-widget {
    right: 12px;
    bottom: 12px;
  }

  .assistant-panel {
    bottom: 66px;
    max-height: calc(100dvh - 88px);
  }

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

  .lineage-step {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .lineage-step em {
    grid-column: 2;
  }
}

/* Login: desktop cinematic city operations entry */
.login-mobile-block {
  display: none;
}

.auth-page--cinematic {
  min-height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(circle at 72% 22%, rgba(126, 167, 255, 0.13), transparent 30%),
    radial-gradient(circle at 20% 88%, rgba(57, 239, 224, 0.16), transparent 30%),
    #02080e;
}

.auth-page--cinematic .login-cinema {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 100dvh;
  height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(470px, 31vw, 580px);
  gap: clamp(28px, 4vw, 72px);
  align-items: center;
  margin: 0;
  padding: clamp(24px, 3.2vw, 44px) clamp(40px, 5vw, 82px);
  overflow: hidden;
}

.auth-page--cinematic .login-map-panel {
  position: absolute;
  inset: 0;
  z-index: 0;
  min-height: 100dvh;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 42% 45%, rgba(57, 239, 224, 0.16), transparent 26%),
    linear-gradient(180deg, #030c13, #010509);
  box-shadow: none;
}

.auth-page--cinematic .login-map-panel::before {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle at 42% 44%, transparent 0 24%, rgba(1, 6, 10, 0.08) 46%, rgba(1, 5, 8, 0.58) 100%),
    linear-gradient(90deg, rgba(0, 8, 13, 0.08), transparent 30%, rgba(0, 7, 12, 0.16) 60%, rgba(0, 7, 12, 0.52)),
    linear-gradient(180deg, rgba(0, 8, 13, 0.06), transparent 46%, rgba(0, 7, 12, 0.6));
}

.auth-page--cinematic .login-map-panel::after {
  display: none;
}

.auth-page--cinematic .login-real-map {
  z-index: 0;
}

.auth-page--cinematic .login-real-map .leaflet-tile-pane {
  filter: saturate(1.08) contrast(1.22) brightness(0.54) hue-rotate(166deg);
  opacity: 1;
}

.auth-page--cinematic .login-real-map .login-satellite-tile {
  filter: saturate(1.12) contrast(1.16) brightness(0.9) hue-rotate(166deg);
}

.auth-page--cinematic .login-real-map .login-road-overlay {
  mix-blend-mode: screen;
  filter: saturate(1.32) contrast(1.28) brightness(1.18) hue-rotate(138deg);
}

.auth-page--cinematic .login-map-vignette {
  z-index: 3;
  background:
    radial-gradient(circle at 46% 42%, rgba(16, 106, 124, 0.1), transparent 30%),
    linear-gradient(90deg, rgba(0, 8, 13, 0.03), transparent 36%, rgba(0, 7, 12, 0.38)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.52));
  mix-blend-mode: screen;
}

.auth-page--cinematic .login-map-canvas {
  display: none;
}

.auth-page--cinematic .login-scanline {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  background:
    linear-gradient(180deg, transparent 0%, rgba(57, 239, 224, 0.08) 43%, rgba(57, 239, 224, 0.22) 50%, rgba(57, 239, 224, 0.08) 57%, transparent 100%),
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.07), transparent);
  opacity: 0.34;
  transform: translateY(-100%);
  animation: loginScan 7.5s ease-in-out infinite;
  mix-blend-mode: screen;
}

@keyframes loginScan {
  0%,
  18% {
    transform: translateY(-100%);
  }
  74%,
  100% {
    transform: translateY(100%);
  }
}

.login-top-brand {
  position: absolute;
  top: clamp(24px, 3.4vw, 48px);
  left: clamp(42px, 5vw, 76px);
  z-index: 8;
  display: inline-grid;
  grid-template-columns: 54px auto;
  gap: 16px;
  align-items: center;
  color: #eef8f6;
  filter: drop-shadow(0 0 18px rgba(57, 239, 224, 0.22));
}

.login-top-brand .brand__mark {
  width: 54px;
  height: 42px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: var(--cyan);
  font-size: 34px;
}

.login-top-brand span:last-child {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
}

.login-top-brand strong {
  font-size: 22px;
  font-weight: 950;
}

.login-top-brand b {
  color: #d9e7e7;
  font-size: 18px;
  font-weight: 850;
}

.login-top-brand em {
  padding: 4px 8px;
  border: 1px solid rgba(57, 239, 224, 0.28);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(57, 239, 224, 0.08);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.auth-page--cinematic .login-hero-lockup {
  position: absolute;
  left: clamp(42px, 5vw, 76px);
  right: auto;
  bottom: clamp(222px, 25vh, 280px);
  z-index: 8;
  width: min(820px, 56vw);
}

.auth-page--cinematic .login-copy {
  max-width: 850px;
}

.auth-page--cinematic .login-copy h1 {
  margin: 0 0 16px;
  color: #f5fbfb;
  font-size: clamp(48px, 4.45vw, 76px);
  line-height: 1.03;
  text-shadow: 0 18px 44px rgba(0, 0, 0, 0.72);
}

.auth-page--cinematic .login-copy p:not(.eyebrow) {
  max-width: 760px;
  color: rgba(232, 244, 243, 0.84);
  font-size: clamp(17px, 1.25vw, 22px);
  line-height: 1.72;
  text-shadow: 0 8px 22px rgba(0, 0, 0, 0.72);
}

.auth-page--cinematic .login-capability-row {
  position: absolute;
  left: clamp(42px, 5vw, 76px);
  right: auto;
  bottom: clamp(104px, 14vh, 152px);
  z-index: 8;
  width: min(860px, 56vw);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(119, 241, 225, 0.14);
  border-radius: 8px;
  background: rgba(3, 13, 18, 0.42);
  backdrop-filter: blur(16px);
}

.auth-page--cinematic .login-capability-row article {
  min-height: 78px;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: 8px;
  padding: 16px 20px;
  border: 0;
  border-right: 1px solid rgba(119, 241, 225, 0.12);
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  text-align: center;
}

.auth-page--cinematic .login-capability-row article > div {
  display: grid;
  justify-items: center;
  gap: 6px;
  width: 100%;
  text-align: center;
}

.auth-page--cinematic .login-capability-row article:last-child {
  border-right: 0;
}

.auth-page--cinematic .login-capability-row strong {
  display: block;
  font-size: 17px;
}

.auth-page--cinematic .login-capability-row small {
  display: block;
  color: rgba(204, 221, 222, 0.76);
}

.login-footer-line {
  position: absolute;
  left: clamp(42px, 5vw, 76px);
  bottom: clamp(28px, 4.2vh, 52px);
  z-index: 8;
  display: flex;
  width: min(860px, 56vw);
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: rgba(210, 226, 226, 0.74);
  font-size: 15px;
  font-weight: 780;
  text-align: center;
}

.login-footer-line span + span::before {
  content: "·";
  margin-right: 16px;
  color: rgba(210, 226, 226, 0.48);
}

.auth-page--cinematic .login-access-card {
  z-index: 10;
  grid-column: 2;
  justify-self: end;
  width: min(100%, 560px);
  max-height: calc(100dvh - clamp(48px, 6.4vw, 88px));
  min-height: 0;
  overflow: hidden;
  gap: clamp(14px, 2vh, 22px);
  padding: clamp(28px, 3vh, 44px);
  border: 1px solid rgba(190, 224, 236, 0.54);
  border-radius: 10px;
  background:
    linear-gradient(150deg, rgba(118, 166, 210, 0.24), rgba(3, 14, 24, 0.62) 28%, rgba(2, 9, 15, 0.88)),
    rgba(4, 16, 28, 0.78);
  box-shadow:
    0 34px 120px rgba(0, 0, 0, 0.58),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -80px 120px rgba(57, 239, 224, 0.05),
    0 0 0 1px rgba(57, 239, 224, 0.14);
  backdrop-filter: blur(20px);
}

.auth-page--cinematic .login-access-card::before {
  inset: 14px;
  border-color: rgba(255, 255, 255, 0.04);
}

.auth-page--cinematic .login-card-glow {
  top: -140px;
  right: -90px;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(122, 179, 230, 0.24), transparent 66%);
}

.auth-page--cinematic .login-security-pill {
  min-width: 104px;
  min-height: 40px;
  padding: 0 12px;
  justify-content: center;
  justify-self: end;
  gap: 0;
  border-color: rgba(57, 239, 224, 0.18);
  color: var(--cyan);
  background: rgba(57, 239, 224, 0.08);
  text-align: center;
}

.auth-page--cinematic .login-security-pill strong {
  display: block;
  width: 100%;
  text-align: center;
}

.auth-page--cinematic .login-card-heading h2 {
  margin: 10px 0 12px;
  font-size: clamp(38px, 3.1vw, 52px);
}

.auth-page--cinematic .login-card-heading p:not(.eyebrow) {
  max-width: 420px;
  color: rgba(217, 231, 232, 0.76);
  font-size: 16px;
  line-height: 1.72;
}

.auth-page--cinematic .login-form {
  gap: clamp(14px, 1.7vh, 18px);
}

.auth-page--cinematic .login-input-shell {
  min-height: clamp(52px, 6.2vh, 58px);
  border-color: rgba(166, 199, 209, 0.24);
  background: rgba(2, 10, 18, 0.48);
}

.auth-page--cinematic .login-input-shell:focus-within {
  border-color: rgba(57, 239, 224, 0.78);
  box-shadow: 0 0 0 3px rgba(57, 239, 224, 0.08), 0 0 26px rgba(57, 239, 224, 0.18);
}

.auth-page--cinematic .login-submit {
  min-height: clamp(54px, 6.4vh, 60px);
  margin-top: 4px;
  border-color: rgba(57, 239, 224, 0.6);
  background: linear-gradient(135deg, rgba(89, 221, 239, 0.95), rgba(16, 191, 173, 0.86));
  box-shadow: 0 18px 54px rgba(57, 239, 224, 0.22);
}

.auth-page--cinematic .login-system-strip {
  margin-top: 2px;
  border-color: rgba(119, 241, 225, 0.12);
  background: rgba(119, 241, 225, 0.1);
}

.auth-page--cinematic .login-system-strip article {
  min-height: clamp(66px, 8vh, 78px);
  background: rgba(3, 15, 24, 0.58);
}

.auth-page--cinematic .login-meta-line {
  color: rgba(203, 219, 220, 0.72);
}

@media (max-width: 1180px) {
  .auth-page--cinematic .login-cinema {
    grid-template-columns: minmax(0, 1fr) minmax(430px, 500px);
    padding-inline: 36px;
  }

  .auth-page--cinematic .login-hero-lockup,
  .auth-page--cinematic .login-capability-row {
    width: min(720px, 50vw);
  }
}

@media (max-height: 840px) and (min-width: 901px) {
  .auth-page--cinematic .login-cinema {
    padding-block: 18px;
  }

  .login-top-brand {
    top: 20px;
  }

  .auth-page--cinematic .login-copy h1 {
    font-size: clamp(42px, 4vw, 64px);
  }

  .auth-page--cinematic .login-card-heading h2 {
    font-size: clamp(34px, 3vw, 46px);
  }

  .auth-page--cinematic .login-card-heading p:not(.eyebrow) {
    line-height: 1.58;
  }

  .auth-page--cinematic .login-hero-lockup {
    bottom: 198px;
  }

  .auth-page--cinematic .login-capability-row {
    bottom: 84px;
  }

  .login-footer-line,
  .auth-page--cinematic .login-meta-line {
    display: none;
  }
}

@media (max-width: 900px), (pointer: coarse) {
  .auth-page--cinematic {
    overflow: hidden;
  }

  .auth-page--cinematic .login-cinema {
    display: none;
  }

  .login-mobile-block {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
      radial-gradient(circle at 50% 16%, rgba(57, 239, 224, 0.18), transparent 30%),
      linear-gradient(90deg, rgba(57, 239, 224, 0.055) 1px, transparent 1px),
      linear-gradient(0deg, rgba(57, 239, 224, 0.04) 1px, transparent 1px),
      #02090c;
    background-size: auto, 34px 34px, 34px 34px, auto;
  }

  .login-mobile-card {
    width: min(100%, 420px);
    display: grid;
    justify-items: center;
    gap: 14px;
    padding: 34px 22px;
    border: 1px solid rgba(57, 239, 224, 0.34);
    border-radius: 10px;
    background:
      linear-gradient(145deg, rgba(57, 239, 224, 0.13), transparent 40%),
      rgba(4, 18, 22, 0.92);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.54), var(--glow-cyan);
    text-align: center;
  }

  .login-mobile-card .brand__mark {
    width: 74px;
    height: 56px;
    font-size: 34px;
  }

  .login-mobile-card h1 {
    margin: 4px 0 0;
    font-size: clamp(30px, 9vw, 42px);
    line-height: 1.1;
  }

  .login-mobile-card p:not(.eyebrow) {
    margin: 0;
    color: rgba(223, 239, 238, 0.76);
    font-size: 16px;
    line-height: 1.7;
  }

  .login-mobile-card > span:last-child {
    margin-top: 4px;
    color: var(--cyan);
    font-size: 13px;
    font-weight: 850;
  }
}
