:root {
  color-scheme: dark;
  --bg: #08090b;
  --bg-deep: #060709;
  --surface: #111218;
  --surface-2: #171820;
  --surface-3: #1d1f28;
  --surface-glass: rgb(18 19 24 / 80%);
  --border: rgb(255 255 255 / 8%);
  --border-strong: rgb(255 255 255 / 16%);
  --text: #f5f6f8;
  --text-soft: #c0c3cb;
  --muted: #9296a1;
  --cyan: #5de7ff;
  --cyan-bright: #a9f2ff;
  --blue: #7596ff;
  --green: #89e9a5;
  --green-soft: #b9f5c8;
  --amber: #ffd278;
  --amber-soft: #ffe6ad;
  --coral: #ff8b85;
  --purple: #f39aff;
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow-soft: 0 18px 55px rgb(0 0 0 / 32%);
  --shadow-panel: 0 24px 80px rgb(0 0 0 / 48%);
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --font-sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "SFMono-Regular", "Cascadia Code", Consolas, monospace;
}

* { box-sizing: border-box; }

html,
body { min-height: 100%; }

html { background: var(--bg-deep); }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 22% -12%, rgb(93 231 255 / 8%), transparent 34%),
    radial-gradient(circle at 82% -14%, rgb(243 154 255 / 6%), transparent 30%),
    linear-gradient(145deg, #060709 0%, #090a0d 48%, #060709 100%);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea { font: inherit; }

button { color: inherit; }

button,
a { -webkit-tap-highlight-color: transparent; }

button:not(:disabled),
a { cursor: pointer; }

button:disabled { cursor: not-allowed; }

.ui-icon {
  display: block;
  width: 1em;
  height: 1em;
  overflow: visible;
  flex: 0 0 auto;
}
.ui-icon[data-icon-name="lock"] { transform: translateY(-.6px); }

[hidden] { display: none !important; }

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

::selection { color: #00111d; background: var(--cyan-bright); }

:focus-visible {
  outline: 2px solid var(--cyan-bright);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-xs);
  color: #03101a;
  background: var(--cyan-bright);
  font-weight: 750;
  transform: translateY(-200%);
}

.skip-link:focus { transform: translateY(0); }

.app-frame {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  grid-template-rows: 66px minmax(0, 1fr) 46px;
  width: 100%;
  height: 100vh;
  min-height: 720px;
}

.command-bar {
  z-index: 30;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 238px minmax(260px, 1fr) auto auto;
  align-items: center;
  min-width: 0;
  border-bottom: 1px solid var(--border);
  background: rgb(2 10 19 / 92%);
  box-shadow: 0 12px 40px rgb(0 0 0 / 18%);
  backdrop-filter: blur(20px) saturate(120%);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  align-self: stretch;
  padding: 0 18px;
  border-right: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
}

.brand-symbol {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  filter: drop-shadow(0 0 12px rgb(56 199 255 / 32%));
}

.brand-lockup > span { display: grid; line-height: 1.05; }
.brand-lockup strong { font-size: 18px; letter-spacing: -.03em; }
.brand-lockup small { margin-top: 5px; color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }

.mission-context {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 0 22px;
  color: var(--text-soft);
  white-space: nowrap;
}

.mission-context-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.mission-context strong { overflow: hidden; color: var(--text); font-size: 14px; text-overflow: ellipsis; }
.mission-context-divider { width: 1px; height: 18px; background: var(--border-strong); }
.mission-context [data-phase-label] { overflow: hidden; text-overflow: ellipsis; }

.runtime-cluster,
.command-actions { display: flex; align-items: center; gap: 7px; }

.runtime-cluster { padding-right: 12px; }

.runtime-chip,
.mission-clock {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgb(10 27 44 / 62%);
}

.runtime-chip { gap: 8px; padding: 0 12px; color: var(--text-soft); font-size: 11px; white-space: nowrap; }
.runtime-chip b { color: var(--text); font-variant-numeric: tabular-nums; }
.runtime-chip i,
.panel-live i,
.live-status i,
.ticker-title i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 11px rgb(127 227 106 / 65%); }
.runtime-chip.verified { color: var(--text); border-color: rgb(127 227 106 / 20%); }
.runtime-chip.lock span { color: var(--amber); }

.mission-clock {
  padding: 0 11px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.command-actions { height: 100%; padding: 0 12px 0 4px; border-left: 1px solid var(--border); }

.icon-button,
.stage-tool {
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgb(8 24 39 / 72%);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.icon-button { width: 38px; height: 38px; }
.icon-button .ui-icon { width: 17px; height: 17px; }
.chip-icon { display: inline-grid; place-items: center; }
.chip-icon .ui-icon { width: 13px; height: 13px; }
.icon-button:hover,
.stage-tool:hover { border-color: var(--border-strong); background: var(--surface-3); transform: translateY(-1px); }
.command-trigger { display: flex; width: auto; min-width: 67px; gap: 9px; padding: 0 10px; }
.command-trigger kbd { color: var(--muted); font-family: var(--font-mono); font-size: 10px; }

.navigation-rail {
  z-index: 20;
  grid-row: 2 / 4;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 0;
  padding: 12px 8px 10px;
  border-right: 1px solid var(--border);
  background: rgb(3 12 22 / 92%);
}

.rail-button {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 52px;
  padding: 8px 4px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--muted);
  background: transparent;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}

.rail-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.rail-button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.rail-button:hover { color: var(--text-soft); background: rgb(21 51 76 / 42%); }
.rail-button.active { color: var(--cyan-bright); border-color: rgb(56 199 255 / 24%); background: rgb(26 117 166 / 18%); box-shadow: inset 3px 0 0 var(--cyan); }
.rail-button i { position: absolute; top: 5px; right: 5px; display: grid; place-items: center; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; color: #241700; background: var(--amber); font-size: 9px; font-style: normal; font-weight: 800; }
.rail-bottom { margin-top: auto; }

.workspace {
  position: relative;
  grid-column: 2;
  grid-row: 2;
  display: grid;
  grid-template-columns: minmax(720px, 1fr) 356px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.topology-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-right: 1px solid var(--border);
  background:
    radial-gradient(circle at 56% 41%, rgb(25 106 175 / 13%), transparent 34%),
    linear-gradient(180deg, rgb(3 13 25 / 62%), rgb(2 10 19 / 84%));
  isolation: isolate;
  contain: layout paint style;
  --lens-x: 58%;
  --lens-y: 42%;
}

.reactive-lens {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  pointer-events: none;
  opacity: .2;
  background: radial-gradient(circle, rgb(56 199 255 / 15%) 0, rgb(63 124 255 / 6%) 34%, transparent 70%);
  transform: translate3d(calc(var(--lens-x) - 240px), calc(var(--lens-y) - 240px), 0);
  transition: opacity 320ms ease;
  will-change: transform, opacity;
}

.topology-stage[data-pointer-active="true"] .reactive-lens { opacity: .72; }
.topology-stage[data-lens-x="0"] { --lens-x: 6%; }
.topology-stage[data-lens-x="1"] { --lens-x: 18%; }
.topology-stage[data-lens-x="2"] { --lens-x: 30%; }
.topology-stage[data-lens-x="3"] { --lens-x: 42%; }
.topology-stage[data-lens-x="4"] { --lens-x: 54%; }
.topology-stage[data-lens-x="5"] { --lens-x: 66%; }
.topology-stage[data-lens-x="6"] { --lens-x: 78%; }
.topology-stage[data-lens-x="7"] { --lens-x: 90%; }
.topology-stage[data-lens-x="8"] { --lens-x: 98%; }
.topology-stage[data-lens-y="0"] { --lens-y: 6%; }
.topology-stage[data-lens-y="1"] { --lens-y: 23%; }
.topology-stage[data-lens-y="2"] { --lens-y: 40%; }
.topology-stage[data-lens-y="3"] { --lens-y: 57%; }
.topology-stage[data-lens-y="4"] { --lens-y: 74%; }
.topology-stage[data-lens-y="5"] { --lens-y: 94%; }

.stage-grid {
  position: absolute;
  z-index: -2;
  inset: 0;
  opacity: .34;
  background-image:
    linear-gradient(rgb(109 162 202 / 8%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(109 162 202 / 8%) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at 55% 42%, #000 0%, transparent 78%);
}

.topology-stage::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgb(2 9 18 / 88%) 0, transparent 23%, transparent 77%, rgb(2 9 18 / 48%) 100%);
}

.stage-header {
  position: absolute;
  z-index: 10;
  top: 0;
  right: 0;
  left: 0;
  display: grid;
  grid-template-columns: minmax(170px, 210px) minmax(360px, 590px) auto;
  align-items: center;
  gap: 12px;
  height: 64px;
  padding: 0 18px 0 20px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgb(4 15 28 / 88%), rgb(4 15 28 / 62%));
  backdrop-filter: blur(12px);
}

.section-kicker {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.stage-header h1,
.panel-header h2 { margin: 0; font-size: 16px; letter-spacing: -.015em; }

.stage-tools { display: flex; align-items: center; gap: 6px; }
.stage-tools { justify-self: end; }
.live-status { display: inline-flex; align-items: center; gap: 8px; margin-right: 7px; color: var(--text-soft); font-size: 11px; }
.stage-tool { width: 30px; height: 30px; }
.stage-tools output { width: 45px; color: var(--muted); font-family: var(--font-mono); font-size: 10px; text-align: center; }

.guided-control {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 31px;
  margin-right: 7px;
  padding: 0 10px;
  border: 1px solid rgb(56 199 255 / 22%);
  border-radius: 999px;
  color: var(--cyan-bright);
  background: rgb(14 42 65 / 58%);
  font-size: 10px;
  font-weight: 720;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms var(--ease-out);
}

.guided-control:hover { border-color: rgb(119 225 255 / 50%); background: rgb(19 57 86 / 76%); transform: translateY(-1px); }
.guided-control .ui-icon { width: 14px; height: 14px; }
body[data-guided="active"] .guided-control { color: #02131e; background: var(--cyan-bright); box-shadow: 0 0 24px rgb(56 199 255 / 22%); }

.mission-trajectory {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, minmax(88px, 1fr));
  justify-self: center;
  width: 100%;
  min-width: 0;
  max-width: 590px;
  margin: 0;
  padding: 5px;
  border: 1px solid rgb(145 190 224 / 12%);
  border-radius: 999px;
  background: rgb(4 16 28 / 72%);
  box-shadow: 0 14px 42px rgb(0 0 0 / 18%);
  list-style: none;
  backdrop-filter: blur(14px);
}

.mission-trajectory::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 50%;
  right: 10%;
  left: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgb(56 199 255 / 25%), transparent);
}

.mission-trajectory li {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 7px;
  min-width: 0;
  padding: 6px 8px;
  border-radius: 999px;
  color: var(--muted);
  transition: color 200ms ease, background 200ms ease, opacity 200ms ease;
}

.mission-trajectory li > span { grid-row: 1 / 3; display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid var(--border); border-radius: 50%; background: var(--surface); }
.mission-trajectory .ui-icon { width: 13px; height: 13px; }
.mission-trajectory b { overflow: hidden; font-size: 9px; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.mission-trajectory small { overflow: hidden; font-size: 7px; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.mission-trajectory li[data-state="active"] { color: var(--cyan-bright); background: rgb(56 199 255 / 9%); }
.mission-trajectory li[data-state="active"] > span { border-color: var(--cyan); box-shadow: 0 0 16px rgb(56 199 255 / 24%); animation: trajectory-pulse 1.5s ease-in-out infinite; }
.mission-trajectory li[data-state="complete"] { color: var(--text-soft); }
.mission-trajectory li[data-state="complete"] > span { color: var(--green-soft); border-color: rgb(127 227 106 / 30%); background: rgb(127 227 106 / 7%); }
body[data-phase="complete"] .mission-trajectory li[data-state="complete"] { color: var(--green-soft); background: rgb(127 227 106 / 6%); }

.mission-rail-stack {
  position: absolute;
  z-index: 8;
  top: 80px;
  bottom: 154px;
  left: 16px;
  display: grid;
  align-content: start;
  gap: 8px;
  width: 220px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgb(56 199 255 / 24%) transparent;
  scrollbar-width: thin;
}

.mission-brief,
.provider-legend,
.parallel-reads {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-glass);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px) saturate(120%);
}

.mission-brief,
.provider-legend,
.parallel-reads { position: relative; width: 100%; }

.mission-brief { padding: 14px; }
.mission-brief-head { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 9px; }
.brief-icon { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid rgb(56 199 255 / 28%); border-radius: 50%; color: var(--cyan-bright); background: rgb(56 199 255 / 8%); }
.brief-icon .ui-icon { width: 17px; height: 17px; }
.mission-brief-head p,
.approval-gate-copy p { margin: 0; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.mission-brief-head strong { display: block; overflow: hidden; margin-top: 1px; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.mission-brief-head button { display: inline-grid; place-items: center; min-width: 24px; min-height: 24px; padding: 2px 4px; border: 0; color: var(--cyan-bright); background: transparent; font-size: 10px; }
.mission-brief > p { display: -webkit-box; overflow: hidden; margin: 12px 0; color: var(--text-soft); font-size: 11px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 4; }
.mission-constraints { display: flex; flex-wrap: wrap; gap: 5px; }
.mission-constraints span { padding: 4px 7px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); background: rgb(15 38 60 / 54%); font-size: 9px; }

.mission-brief-head p,
.mission-constraints span { color: #879eb3; }

.primary-action,
.review-action,
.execute-action,
.approval-review > button {
  border: 1px solid rgb(56 199 255 / 44%);
  border-radius: var(--radius-sm);
  color: #00131f;
  background: linear-gradient(135deg, var(--cyan-bright), var(--cyan));
  box-shadow: 0 9px 28px rgb(56 199 255 / 16%);
  font-weight: 780;
  transition: filter 160ms ease, transform 160ms var(--ease-out), box-shadow 160ms ease;
}

.primary-action:hover,
.review-action:hover:not(:disabled),
.execute-action:hover:not(:disabled),
.approval-review > button:hover { filter: brightness(1.1); transform: translateY(-1px); box-shadow: 0 12px 34px rgb(56 199 255 / 23%); }
.primary-action:active,
.review-action:active:not(:disabled),
.execute-action:active:not(:disabled),
.approval-review > button:active { transform: translateY(0) scale(.99); }

.primary-action { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: 12px; padding: 10px 12px; font-size: 11px; }

.provider-legend { padding: 12px 14px; }
.provider-legend > p { margin: 0 0 9px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.provider-legend > span { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 7px; padding: 5px 0; color: var(--text-soft); font-size: 10px; }
.provider-legend > span i { width: 7px; height: 7px; border-radius: 50%; }
.provider-legend i.healthy { background: var(--green); box-shadow: 0 0 8px rgb(127 227 106 / 50%); }
.provider-legend i.degraded { background: var(--amber); }
.provider-legend i.quarantined { background: var(--coral); }
.provider-legend b { font-family: var(--font-mono); color: var(--text); font-size: 10px; }
.provider-legend > button { display: flex; justify-content: space-between; width: 100%; margin-top: 8px; padding: 8px 9px; border: 1px solid var(--border); border-radius: var(--radius-xs); color: var(--text-soft); background: rgb(10 29 47 / 65%); font-size: 9px; }
.provider-legend > button:hover { border-color: rgb(56 199 255 / 30%); color: var(--cyan-bright); }
.provider-legend > button span { display: grid; place-items: center; }
.provider-legend > button .ui-icon { width: 13px; height: 13px; }

.constellation-viewport {
  position: absolute;
  z-index: 1;
  inset: 64px 0 154px 0;
  overflow: hidden;
}

.constellation-mount {
  width: 100%;
  height: 100%;
  transform-origin: 58% 48%;
  transition: transform 300ms var(--ease-out);
}

.constellation-placeholder {
  position: absolute;
  top: 48%;
  left: 58%;
  display: grid;
  justify-items: center;
  width: min(380px, 42%);
  text-align: center;
  transform: translate(-50%, -50%);
}

.constellation-placeholder strong { margin-top: 24px; font-size: 15px; }
.constellation-placeholder p { max-width: 330px; margin: 8px 0 0; color: var(--muted); font-size: 11px; }

.placeholder-orbits { position: relative; width: 158px; height: 158px; }
.placeholder-orbits i { position: absolute; inset: 0; border: 1px solid rgb(56 199 255 / 18%); border-radius: 50%; animation: orbit-breathe 3.2s ease-in-out infinite; }
.placeholder-orbits i:nth-child(2) { inset: 22px; border-color: rgb(63 124 255 / 24%); animation-delay: -1s; }
.placeholder-orbits i:nth-child(3) { inset: 49px; border-color: rgb(127 227 106 / 24%); animation-delay: -2s; }
.placeholder-orbits b { position: absolute; inset: 66px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 28px rgb(56 199 255 / 54%); }

.parallel-reads { padding: 12px; }
.parallel-reads header { display: flex; justify-content: space-between; align-items: flex-start; padding: 1px 2px 9px; border-bottom: 1px solid var(--border); }
.parallel-reads header p { margin: 0; color: var(--muted); font-size: 9px; text-transform: uppercase; }
.parallel-reads h2 { margin: 1px 0 0; font-size: 12px; }
.parallel-reads header > span { color: var(--cyan-bright); font-family: var(--font-mono); font-size: 10px; }
.parallel-reads ol { display: grid; gap: 2px; margin: 8px 0 0; padding: 0; list-style: none; }
.parallel-reads li { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 34px; padding: 4px 3px; border-radius: var(--radius-xs); }
.parallel-reads li[data-state="active"] { background: rgb(56 199 255 / 7%); }
.parallel-reads li > i { width: 6px; height: 6px; border: 1px solid var(--muted); border-radius: 50%; }
.parallel-reads li[data-state="active"] > i { border-color: var(--cyan); background: var(--cyan); box-shadow: 0 0 10px var(--cyan); animation: live-pulse 900ms ease-in-out infinite; }
.parallel-reads li[data-state="complete"] > i { border-color: var(--green); background: var(--green); }
.parallel-reads li span { display: grid; min-width: 0; }
.parallel-reads li strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.parallel-reads li small { color: var(--muted); font-size: 8px; }
.parallel-reads time { color: var(--muted); font-family: var(--font-mono); font-size: 8px; }

.approval-dock {
  position: absolute;
  z-index: 12;
  right: 14px;
  bottom: 12px;
  left: 14px;
  display: grid;
  grid-template-columns: minmax(230px, .85fr) repeat(2, minmax(240px, 1fr)) minmax(170px, .68fr);
  align-items: stretch;
  gap: 10px;
  min-height: 128px;
  padding: 10px;
  border: 1px solid rgb(246 185 65 / 28%);
  border-radius: var(--radius);
  background:
    linear-gradient(120deg, rgb(54 39 12 / 32%), transparent 42%),
    rgb(8 18 29 / 94%);
  box-shadow: 0 -16px 60px rgb(0 0 0 / 28%), inset 0 1px 0 rgb(255 215 130 / 7%);
  backdrop-filter: blur(18px);
}

.approval-dock::before {
  content: "";
  position: absolute;
  top: -1px;
  right: 18px;
  left: 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
  opacity: .5;
}

.approval-gate-copy { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.gate-lock { display: grid; place-items: center; flex: 0 0 42px; height: 42px; border: 1px solid rgb(246 185 65 / 44%); border-radius: 50%; color: var(--amber-soft); background: rgb(246 185 65 / 8%); box-shadow: 0 0 25px rgb(246 185 65 / 10%); }
.gate-lock .ui-icon { width: 19px; height: 19px; }
.approval-gate-copy h2 { margin: 2px 0 0; color: var(--amber-soft); font-size: 14px; }
.approval-gate-copy small { display: block; max-width: 205px; margin-top: 4px; color: var(--muted); font-size: 9px; }

.mutation-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 11px;
  border: 1px solid rgb(246 185 65 / 23%);
  border-radius: var(--radius-sm);
  color: var(--text);
  background: linear-gradient(145deg, rgb(54 42 19 / 32%), rgb(10 25 40 / 80%));
  text-align: left;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms var(--ease-out);
}

.mutation-card:hover { border-color: rgb(246 185 65 / 46%); background: linear-gradient(145deg, rgb(72 52 17 / 38%), rgb(12 30 49 / 90%)); transform: translateY(-1px); }
.mutation-card.approved { border-color: rgb(127 227 106 / 44%); background: linear-gradient(145deg, rgb(31 73 34 / 27%), rgb(10 25 40 / 80%)); }
.mutation-icon { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgb(246 185 65 / 30%); border-radius: 50%; color: var(--amber-soft); }
.mutation-icon .ui-icon { width: 18px; height: 18px; }
.mutation-card > span:nth-child(2) { display: grid; min-width: 0; }
.mutation-card small { color: var(--muted); font-size: 8px; letter-spacing: .07em; text-transform: uppercase; }
.mutation-card strong { overflow: hidden; margin-top: 2px; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.mutation-card em { margin-top: 5px; color: var(--amber); font-size: 9px; font-style: normal; }
.mutation-card.approved em { color: var(--green-soft); }
.mutation-card > i { color: var(--amber); font-size: 17px; font-style: normal; }
.mutation-card > i .ui-icon { width: 15px; height: 15px; }
.mutation-card.sealed .mutation-icon { color: var(--green-soft); border-color: rgb(127 227 106 / 38%); background: rgb(127 227 106 / 7%); }
.mutation-card.sealed > i { color: var(--green); }

.review-action { align-self: center; min-width: 148px; height: 42px; margin: 0 6px; padding: 0 14px; font-size: 10px; white-space: nowrap; }
.review-action:disabled,
.execute-action:disabled { border-color: var(--border); color: var(--muted); background: rgb(17 34 50 / 80%); box-shadow: none; opacity: .65; }

.evidence-panel {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: linear-gradient(180deg, rgb(5 18 31 / 96%), rgb(4 13 24 / 98%));
  box-shadow: -24px 0 70px rgb(0 0 0 / 16%);
}

.panel-header { display: flex; align-items: center; justify-content: space-between; height: 64px; padding: 0 17px; border-bottom: 1px solid var(--border); }
.panel-live { display: inline-flex; align-items: center; gap: 7px; color: var(--text-soft); font-size: 10px; }

.panel-tabs { display: grid; grid-template-columns: repeat(3, 1fr); padding: 0 14px; border-bottom: 1px solid var(--border); }
.panel-tabs button { position: relative; height: 43px; border: 0; color: var(--muted); background: transparent; font-size: 10px; font-weight: 740; }
.panel-tabs button::after { content: ""; position: absolute; right: 7px; bottom: -1px; left: 7px; height: 2px; background: var(--cyan); transform: scaleX(0); transition: transform 180ms var(--ease-out); }
.panel-tabs button.active { color: var(--text); }
.panel-tabs button.active::after { transform: scaleX(1); }

.inspector-body { height: calc(100% - 108px); overflow: auto; padding: 16px; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
body[data-app-view="topology"] .inspector-body { padding-bottom: 156px; }
.inspector-body > section { padding: 16px 0; border-bottom: 1px solid var(--border); }
.inspector-body > section:first-child { padding-top: 2px; }

.selected-node { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; }
.selected-node-icon { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid rgb(56 199 255 / 32%); border-radius: 50%; color: var(--cyan-bright); background: rgb(56 199 255 / 7%); box-shadow: 0 0 22px rgb(56 199 255 / 8%); }
.selected-node-icon .inspector-icon { width: 22px; height: 22px; }
.selected-node small { color: var(--cyan-bright); font-size: 8px; letter-spacing: .1em; text-transform: uppercase; }
.selected-node h3 { margin: 2px 0 0; font-size: 14px; }
.selected-node p { margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }

.block-title { display: flex; align-items: center; justify-content: space-between; color: var(--text-soft); font-size: 9px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.block-title strong { color: var(--cyan-bright); font-family: var(--font-mono); font-size: 16px; letter-spacing: -.04em; }
.block-title b { color: var(--muted); font-family: var(--font-mono); font-size: 9px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.block-title button { display: inline-grid; place-items: center; min-width: 24px; min-height: 24px; padding: 2px 4px; border: 0; color: var(--cyan-bright); background: transparent; font-size: 9px; }

.confidence-track { display: block; width: 100%; height: 4px; margin: 13px 0 9px; overflow: hidden; appearance: none; border: 0; border-radius: 99px; background: rgb(124 164 194 / 15%); }
.confidence-track::-webkit-progress-bar { border-radius: inherit; background: rgb(124 164 194 / 15%); }
.confidence-track::-webkit-progress-value { border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--cyan-bright)); box-shadow: 0 0 12px rgb(56 199 255 / 48%); transition: width 550ms var(--ease-out); }
.confidence-track::-moz-progress-bar { border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--cyan-bright)); box-shadow: 0 0 12px rgb(56 199 255 / 48%); }
.confidence-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; }
.confidence-meta b { color: var(--text-soft); font-weight: 600; }

.origin-identity dl,
.approval-review dl { display: grid; gap: 9px; margin: 13px 0 0; }
.origin-identity dl div,
.approval-review dl div { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 10px; }
.origin-identity dt,
.approval-review dt { color: var(--muted); font-size: 9px; }
.origin-identity dd,
.approval-review dd { overflow: hidden; margin: 0; color: var(--text-soft); font-size: 9px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
code { color: var(--cyan-bright); font-family: var(--font-mono); font-size: .95em; }

.signal-card { display: flex; align-items: center; justify-content: space-between; margin-top: 15px; padding: 12px !important; border: 1px solid rgb(127 227 106 / 20%) !important; border-radius: var(--radius-sm); background: rgb(127 227 106 / 5%); }
.signal-card > div { display: flex; align-items: center; gap: 9px; }
.signal-card > div > span { color: var(--green); }
.signal-card > div > span .ui-icon { width: 17px; height: 17px; }
.signal-card p { display: grid; margin: 0; }
.signal-card small { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.signal-card strong { margin-top: 2px; color: var(--green-soft); font-size: 10px; }
.signal-card > b { color: var(--muted); font-family: var(--font-mono); font-size: 8px; }
.signal-card.quarantine { border-color: rgb(255 107 85 / 32%) !important; background: rgb(255 107 85 / 7%); }
.signal-card.quarantine > div > span,
.signal-card.quarantine strong { color: var(--coral); }

.evidence-stack { border-bottom: 0 !important; }
.evidence-stack [data-evidence-list] { display: grid; gap: 7px; margin-top: 12px; }
.evidence-item { display: grid; grid-template-columns: 7px minmax(0, 1fr) auto; align-items: start; gap: 8px; padding: 9px 10px; border: 1px solid var(--border); border-radius: var(--radius-xs); background: rgb(12 31 49 / 48%); }
.evidence-item > i { width: 6px; height: 6px; margin-top: 4px; border-radius: 50%; background: var(--cyan); }
.evidence-item span { display: grid; }
.evidence-item strong { font-size: 9px; }
.evidence-item small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.evidence-item time { color: var(--muted); font-family: var(--font-mono); font-size: 8px; }
.empty-copy { margin: 0; padding: 20px 8px; color: var(--muted); font-size: 10px; text-align: center; }

.mapping-summary { padding: 12px 13px !important; border: 1px solid var(--border) !important; border-radius: var(--radius-sm); background: rgb(15 38 60 / 48%); }
.mapping-summary p { margin: 0; color: var(--muted); font-size: 8px; text-transform: uppercase; }
.mapping-summary h3 { margin: 3px 0; font-size: 13px; }
.mapping-summary span { color: var(--cyan-bright); font-family: var(--font-mono); font-size: 9px; }
.mapping-list { display: grid; gap: 7px; margin-top: 12px; }
.mapping-row { display: grid; gap: 7px; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-xs); background: rgb(8 26 42 / 64%); }
.mapping-row > div { display: flex; justify-content: space-between; gap: 10px; }
.mapping-row strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.mapping-row b { color: var(--cyan-bright); font-family: var(--font-mono); font-size: 9px; }
.mapping-row small { color: var(--muted); font-family: var(--font-mono); font-size: 8px; }

.audit-stream { display: grid; gap: 1px; }
.audit-event { position: relative; display: grid; grid-template-columns: 46px 10px minmax(0, 1fr); gap: 8px; min-height: 46px; color: var(--text-soft); }
.audit-event::after { content: ""; position: absolute; top: 21px; bottom: -3px; left: 60px; width: 1px; background: var(--border); }
.audit-event:last-child::after { display: none; }
.audit-event time { color: var(--muted); font-family: var(--font-mono); font-size: 8px; }
.audit-event > i { z-index: 1; width: 7px; height: 7px; margin-top: 4px; border: 1px solid var(--cyan); border-radius: 50%; background: var(--surface); }
.audit-event p { display: grid; margin: 0; font-size: 9px; }
.audit-event small { margin-top: 2px; color: var(--muted); font-size: 8px; }

.activity-ticker {
  z-index: 24;
  grid-column: 2;
  grid-row: 3;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  align-items: center;
  min-width: 0;
  border-top: 1px solid var(--border);
  background: rgb(3 11 20 / 96%);
}

.ticker-title { display: flex; align-items: center; gap: 8px; height: 100%; padding: 0 17px; border-right: 1px solid var(--border); }
.ticker-title span { font-weight: 760; }
.ticker-title b { color: var(--green-soft); font-size: 9px; font-weight: 500; }
.ticker-events { display: flex; min-width: 0; overflow: hidden; padding: 0 14px; }
.ticker-events span { display: flex; gap: 9px; overflow: hidden; color: var(--text-soft); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.ticker-events time { color: var(--muted); font-family: var(--font-mono); }
.activity-ticker > button { align-self: stretch; padding: 0 17px; border: 0; border-left: 1px solid var(--border); color: var(--text-soft); background: transparent; font-size: 9px; }
.activity-ticker > button:hover { color: var(--cyan-bright); background: rgb(15 39 61 / 52%); }

.dialog-backdrop {
  position: fixed;
  z-index: 70;
  inset: 0;
  background: rgb(0 5 12 / 70%);
  backdrop-filter: blur(10px);
  animation: fade-in 180ms ease both;
}

.approval-dialog {
  position: fixed;
  z-index: 80;
  top: 50%;
  left: 50%;
  width: min(920px, calc(100vw - 36px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 20px;
  border: 1px solid rgb(246 185 65 / 30%);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 50% 0, rgb(246 185 65 / 8%), transparent 34%),
    #06111e;
  box-shadow: 0 38px 120px rgb(0 0 0 / 58%);
  transform: translate(-50%, -50%);
  animation: dialog-in 260ms var(--ease-out) both;
}

.approval-dialog > header { display: flex; align-items: start; justify-content: space-between; }
.approval-dialog h2 { margin: 3px 0 0; font-size: 23px; letter-spacing: -.03em; }
.dialog-close { width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 50%; color: var(--text-soft); background: rgb(18 38 56 / 65%); font-size: 20px; }
.dialog-intro { max-width: 650px; margin: 8px 0 18px; color: var(--muted); font-size: 11px; }
.approval-review-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.approval-review { padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(145deg, rgb(29 37 39 / 64%), rgb(8 23 37 / 90%)); }
.approval-review.approved { border-color: rgb(127 227 106 / 35%); box-shadow: inset 0 0 0 1px rgb(127 227 106 / 8%); }
.approval-review-head { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.approval-review-head > span { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgb(246 185 65 / 28%); border-radius: 50%; color: var(--amber-soft); }
.approval-review-head > span .ui-icon { width: 18px; height: 18px; }
.approval-review-head small { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.approval-review-head h3 { margin: 2px 0 0; font-size: 14px; }
.approval-review-head b { padding: 4px 7px; border: 1px solid rgb(246 185 65 / 25%); border-radius: 99px; color: var(--amber); font-size: 8px; }
.approval-review.approved .approval-review-head b { border-color: rgb(127 227 106 / 28%); color: var(--green); }
.approval-review dl { padding: 13px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.approval-review pre,
.approval-review blockquote { min-height: 66px; margin: 12px 0; padding: 10px; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-xs); color: var(--text-soft); background: rgb(1 8 15 / 54%); font-family: var(--font-mono); font-size: 8px; line-height: 1.6; }
.approval-review blockquote { font-family: var(--font-sans); font-size: 9px; }
.approval-review > button { width: 100%; min-height: 38px; padding: 8px 12px; font-size: 10px; }
.approval-review.approved > button { border-color: rgb(127 227 106 / 36%); color: #03170a; background: var(--green); }

.approval-dialog > footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.approval-dialog > footer > div { display: flex; align-items: center; gap: 10px; }
.approval-dialog > footer > div > span { color: var(--amber); font-size: 21px; }
.approval-dialog > footer > div > span .ui-icon { width: 20px; height: 20px; }
.approval-dialog > footer p { display: grid; margin: 0; }
.approval-dialog > footer strong { font-size: 10px; }
.approval-dialog > footer small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.execute-action { min-height: 40px; padding: 0 16px; font-size: 10px; }

.command-menu {
  position: fixed;
  z-index: 90;
  top: 78px;
  left: 50%;
  width: min(520px, calc(100vw - 30px));
  padding: 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: rgb(5 18 31 / 96%);
  box-shadow: 0 28px 90px rgb(0 0 0 / 52%);
  transform: translateX(-50%);
  backdrop-filter: blur(20px);
  animation: command-in 190ms var(--ease-out) both;
}
.command-menu label { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; min-height: 45px; padding: 0 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--muted); background: rgb(2 10 19 / 70%); }
.command-menu label .ui-icon { width: 16px; height: 16px; }
.command-menu input { width: 100%; border: 0; outline: 0; color: var(--text); background: transparent; }
.command-menu > div { display: grid; gap: 3px; margin-top: 8px; }
.command-menu > div button { display: flex; justify-content: space-between; padding: 10px; border: 0; border-radius: var(--radius-xs); color: var(--text-soft); background: transparent; text-align: left; }
.command-menu > div button:hover { color: var(--text); background: rgb(24 57 84 / 48%); }
.command-menu kbd { color: var(--muted); font-family: var(--font-mono); font-size: 9px; }

.toast-region { position: fixed; z-index: 100; right: 18px; bottom: 60px; display: grid; gap: 8px; width: min(340px, calc(100vw - 36px)); }
.toast { display: grid; grid-template-columns: 8px minmax(0, 1fr); gap: 10px; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); color: var(--text-soft); background: rgb(7 22 36 / 96%); box-shadow: var(--shadow-panel); animation: toast-in 240ms var(--ease-out) both; }
.toast > i { width: 7px; height: 7px; margin-top: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.toast strong { display: block; color: var(--text); font-size: 10px; }
.toast small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; }

/* Constellation renderer hooks */
.tb-constellation,
.constellation-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.tb-constellation text,
.constellation-svg text { pointer-events: none; font-family: var(--font-sans); }
.tb-constellation__edges { isolation: isolate; }
.tb-edge__route,
.tb-edge__track,
.tb-edge__pulse { fill: none; vector-effect: non-scaling-stroke; }
.tb-edge__route { pointer-events: none; }
.tb-edge__track { stroke: rgb(73 142 198 / 25%); stroke-width: 1.1; transition: stroke 220ms ease, opacity 220ms ease, filter 220ms ease; }
.tb-edge__pulse { stroke: transparent; stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: .08 .92; opacity: 0; }
.tb-edge.is-active .tb-edge__track { stroke: rgb(56 199 255 / 58%); filter: drop-shadow(0 0 3px rgb(56 199 255 / 55%)); }
.tb-edge.is-active .tb-edge__pulse { stroke: var(--cyan-bright); opacity: 1; filter: drop-shadow(0 0 5px var(--cyan)); animation: tb-pulse-travel 900ms linear infinite; }
.tb-edge.is-complete .tb-edge__track { stroke: rgb(127 227 106 / 48%); }
.tb-edge.is-complete .tb-edge__pulse { stroke: rgb(127 227 106 / 66%); opacity: .36; }
.tb-edge.is-quarantined .tb-edge__track { stroke: var(--coral); stroke-dasharray: 3 6; }
.tb-edge.is-quarantined .tb-edge__pulse { stroke: var(--coral); opacity: .72; animation: quarantine-retreat 900ms linear infinite; }
.tb-edge__pulse.is-static { animation: none; }
.tb-edge.is-locked .tb-edge__track { stroke: rgb(246 185 65 / 42%); stroke-dasharray: 3 7; }

.tb-edge__packet-trail {
  fill: none;
  stroke: var(--cyan-bright);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-dasharray: .02 .98;
  opacity: 0;
  vector-effect: non-scaling-stroke;
}

.tb-edge__packet { fill: var(--cyan-bright); opacity: 0; filter: drop-shadow(0 0 7px var(--cyan)); }
.tb-edge.has-packet .tb-edge__packet { opacity: 1; }
.tb-edge.has-packet .tb-edge__packet-trail { opacity: .3; animation: packet-trail-fade 1.05s var(--ease-out) both; }
.tb-edge.has-packet .tb-edge__packet-trail--echo { opacity: .14; animation-delay: 120ms; }
.tb-edge[data-packet-tone="authority"] .tb-edge__packet,
.tb-edge[data-packet-tone="authority"] .tb-edge__packet-trail { color: var(--amber); fill: var(--amber-soft); stroke: var(--amber); filter: drop-shadow(0 0 7px var(--amber)); }
.tb-edge[data-packet-tone="danger"] .tb-edge__packet,
.tb-edge[data-packet-tone="danger"] .tb-edge__packet-trail { color: var(--coral); fill: var(--coral); stroke: var(--coral); filter: drop-shadow(0 0 7px var(--coral)); }
.tb-edge[data-packet-tone="success"] .tb-edge__packet,
.tb-edge[data-packet-tone="success"] .tb-edge__packet-trail { color: var(--green); fill: var(--green); stroke: var(--green); filter: drop-shadow(0 0 7px var(--green)); }

.tb-node { color: var(--cyan); cursor: pointer; outline: none; }
.tb-node__halo { fill: rgb(7 25 43 / 62%); stroke: rgb(71 150 211 / 24%); stroke-width: 1; transition: fill 180ms ease, stroke 180ms ease, filter 180ms ease, transform 180ms var(--ease-out); transform-box: fill-box; transform-origin: center; }
.tb-node__surface { fill: rgb(8 26 45 / 94%); stroke: rgb(72 160 224 / 58%); stroke-width: 1.25; transition: fill 180ms ease, stroke 180ms ease, filter 180ms ease, transform 180ms var(--ease-out); transform-box: fill-box; transform-origin: center; }
.tb-node__label {
  fill: var(--text);
  stroke: rgb(7 8 11 / 96%);
  stroke-width: 3px;
  stroke-linejoin: round;
  paint-order: stroke fill;
  font-size: 10px;
  font-weight: 720;
}
.tb-node__subtitle {
  fill: var(--cyan-bright);
  stroke: rgb(7 8 11 / 96%);
  stroke-width: 2.5px;
  stroke-linejoin: round;
  paint-order: stroke fill;
  font-family: var(--font-mono) !important;
  font-size: 8px;
}
.tb-node__icon { color: var(--cyan-bright); pointer-events: none; opacity: .88; transition: color 180ms ease, opacity 180ms ease; }
.tb-node__icon .tb-icon__stroke { fill: none; stroke: currentColor; }
.tb-node__icon .tb-icon__accent { fill: none; stroke: currentColor; opacity: .72; }
.tb-node__icon .tb-icon__fill { fill: currentColor; stroke: none; opacity: .14; }
.tb-node__icon .tb-icon__signal { fill: currentColor; stroke: none; filter: drop-shadow(0 0 3px currentColor); }
.tb-node--provider .tb-node__icon { color: #89d9ff; }
.tb-node--capability .tb-node__icon { color: var(--cyan-bright); }
.tb-node--hub .tb-node__icon { color: #d5f5ff; filter: drop-shadow(0 0 6px rgb(56 199 255 / 42%)); }
.tb-node--mutation .tb-node__icon { color: var(--amber-soft); }
.tb-node.is-quarantined .tb-node__icon { color: var(--coral); }
.tb-node.is-complete .tb-node__icon { color: var(--green-soft); }
.tb-node:hover .tb-node__surface,
.tb-node:focus .tb-node__surface,
.tb-node[data-selected="true"] .tb-node__surface { fill: rgb(12 48 77 / 96%); stroke: var(--cyan-bright); filter: drop-shadow(0 0 9px rgb(56 199 255 / 44%)); transform: scale(1.045); }
.tb-node:hover .tb-node__halo,
.tb-node:focus .tb-node__halo,
.tb-node[data-selected="true"] .tb-node__halo { stroke: rgb(119 225 255 / 58%); filter: drop-shadow(0 0 13px rgb(56 199 255 / 28%)); transform: scale(1.07); }
.tb-node.is-active .tb-node__surface { stroke: var(--cyan-bright); filter: drop-shadow(0 0 12px rgb(56 199 255 / 56%)); animation: node-breathe 1.1s ease-in-out infinite; }
.tb-node.is-complete .tb-node__surface { stroke: var(--green); }
.tb-node.is-complete .tb-node__halo { stroke: rgb(127 227 106 / 30%); }
.tb-node.is-quarantined .tb-node__surface { fill: rgb(61 17 22 / 94%); stroke: var(--coral); filter: drop-shadow(0 0 9px rgb(255 107 85 / 36%)); }
.tb-node.is-quarantined .tb-node__halo { stroke: rgb(255 107 85 / 36%); }
.tb-node.is-locked .tb-node__surface { fill: rgb(49 36 13 / 92%); stroke: var(--amber); }
.tb-node--provider .tb-node__surface { stroke-width: 1.45; }
.tb-node--capability .tb-node__surface { fill: rgb(6 31 54 / 96%); }
.tb-node--hub .tb-node__halo { fill: none; stroke: rgb(56 199 255 / 30%); stroke-dasharray: 4 7; animation: hub-spin 20s linear infinite; }
.tb-node--hub .tb-node__halo.is-static { animation: none; }
.tb-node--hub .tb-node__surface { fill: #0a3152; stroke-width: 1.8; filter: drop-shadow(0 0 18px rgb(56 199 255 / 25%)); }
.tb-node--hub .tb-node__label { font-size: 15px; letter-spacing: -.02em; }
.tb-node--hub .tb-node__subtitle { font-size: 7.4px; letter-spacing: .015em; }
.tb-node--mutation .tb-node__surface { fill: rgb(41 31 13 / 90%); stroke: rgb(246 185 65 / 62%); }
.tb-node--mutation .tb-node__label { fill: var(--amber-soft); font-size: 11px; }
.tb-approval-gate__ring { fill: rgb(246 185 65 / 8%); stroke: var(--amber); stroke-width: 1; }
.tb-approval-gate__lock { fill: none; stroke: var(--amber-soft); stroke-width: 1.4; transform: translateY(-1px); }
.tb-approval-gate__seal { stroke: var(--green-soft); stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.tb-mutation-kind__ring { fill: rgb(246 185 65 / 4%); stroke: rgb(246 185 65 / 24%); stroke-width: 1; }
.tb-node--mutation.is-complete .tb-node__surface { fill: rgb(18 56 34 / 94%); stroke: var(--green); }
.tb-node--mutation.is-complete .tb-node__label { fill: var(--green-soft); }
.tb-node--mutation.is-complete .tb-approval-gate__ring,
.tb-node--mutation.is-complete .tb-approval-gate__lock,
.tb-node--mutation.is-complete .tb-mutation-kind__ring { stroke: var(--green); }
.tb-approval-gate__scan { opacity: .22; stroke-dasharray: 4 6; vector-effect: non-scaling-stroke; }
.tb-node--mutation.is-active .tb-approval-gate__scan,
.tb-node--mutation.is-locked:hover .tb-approval-gate__scan { opacity: .8; animation: approval-scan 1.15s linear infinite; }
.tb-node.packet-arrival .tb-node__halo,
.tb-node.packet-arrival .tb-node__surface { animation: packet-arrival 520ms var(--ease-out) both; }

body:not([data-phase="complete"]) .tb-node.is-complete .tb-node__surface { stroke: rgb(85 182 229 / 78%); }
body:not([data-phase="complete"]) .tb-node.is-complete .tb-node__halo { stroke: rgb(85 182 229 / 28%); }
body:not([data-phase="complete"]) .tb-node.is-complete .tb-node__icon { color: var(--cyan-bright); }

.tb-constellation .orbit-ring,
.constellation-svg .orbit-ring { fill: none; stroke: rgb(69 145 205 / 15%); stroke-width: 1; vector-effect: non-scaling-stroke; }
.tb-constellation .orbit-ring.inner,
.constellation-svg .orbit-ring.inner { stroke: rgb(84 158 223 / 21%); stroke-dasharray: 2 6; }
.constellation-svg .edge,
.constellation-svg [data-edge-id] { fill: none; stroke: rgb(66 132 189 / 28%); stroke-width: 1.25; transition: stroke 200ms ease, stroke-width 200ms ease, opacity 200ms ease, filter 200ms ease; }
.constellation-svg .edge[data-state="active"],
.constellation-svg [data-edge-id][data-state="active"] { stroke: var(--cyan-bright); stroke-width: 2; stroke-dasharray: 7 10; filter: drop-shadow(0 0 5px rgb(56 199 255 / 75%)); animation: edge-flow 650ms linear infinite; }
.constellation-svg .edge[data-state="complete"],
.constellation-svg [data-edge-id][data-state="complete"] { stroke: rgb(127 227 106 / 68%); }
.constellation-svg .edge[data-state="quarantined"],
.constellation-svg [data-edge-id][data-state="quarantined"] { stroke: var(--coral); stroke-dasharray: 3 8; animation: quarantine-retreat 900ms linear infinite; }
.constellation-svg .edge[data-state="locked"],
.constellation-svg [data-edge-id][data-state="locked"] { stroke: rgb(246 185 65 / 45%); stroke-dasharray: 3 7; }
.constellation-svg .pulse-dot { fill: var(--cyan-bright); filter: drop-shadow(0 0 7px var(--cyan)); }
.constellation-svg .node { cursor: pointer; outline: none; }
.constellation-svg .node-halo { fill: rgb(8 30 50 / 74%); stroke: rgb(76 164 226 / 48%); stroke-width: 1.4; transition: fill 180ms ease, stroke 180ms ease, filter 180ms ease, transform 180ms var(--ease-out); transform-box: fill-box; transform-origin: center; }
.constellation-svg .node:hover .node-halo,
.constellation-svg .node:focus .node-halo,
.constellation-svg .node[data-selected="true"] .node-halo { fill: rgb(13 50 79 / 90%); stroke: var(--cyan-bright); filter: drop-shadow(0 0 12px rgb(56 199 255 / 42%)); transform: scale(1.05); }
.constellation-svg .node[data-state="active"] .node-halo { stroke: var(--cyan-bright); filter: drop-shadow(0 0 12px rgb(56 199 255 / 58%)); animation: node-breathe 1.1s ease-in-out infinite; }
.constellation-svg .node[data-state="complete"] .node-halo { stroke: var(--green); }
.constellation-svg .node[data-state="quarantined"] .node-halo { fill: rgb(74 20 20 / 72%); stroke: var(--coral); filter: drop-shadow(0 0 10px rgb(255 107 85 / 38%)); }
.constellation-svg .node[data-state="locked"] .node-halo { fill: rgb(60 43 11 / 58%); stroke: var(--amber); }
.constellation-svg .node-core { fill: #071828; stroke: currentColor; }
.constellation-svg .node-label { fill: var(--text); font-size: 11px; font-weight: 700; text-anchor: middle; }
.constellation-svg .node-meta { fill: var(--muted); font-family: var(--font-mono); font-size: 8px; text-anchor: middle; }
.constellation-svg .hub-halo { fill: rgb(9 42 69 / 88%); stroke: var(--cyan); stroke-width: 1.8; filter: drop-shadow(0 0 20px rgb(56 199 255 / 24%)); }
.constellation-svg .hub-ring { fill: none; stroke: rgb(56 199 255 / 34%); stroke-width: 1; stroke-dasharray: 3 7; animation: hub-spin 18s linear infinite; transform-box: fill-box; transform-origin: center; }
.constellation-svg .hub-title { fill: var(--text); font-size: 16px; font-weight: 760; text-anchor: middle; }
.constellation-svg .hub-subtitle { fill: var(--cyan-bright); font-size: 9px; text-anchor: middle; }

body[data-phase="discovering"] .mission-brief,
body[data-phase="mapping"] .mission-brief,
body[data-phase="reading"] .mission-brief,
body[data-phase="review"] .mission-brief,
body[data-phase="approved"] .mission-brief,
body[data-phase="executing"] .mission-brief,
body[data-phase="complete"] .mission-brief { opacity: .9; }

body[data-phase="complete"] .approval-dock { border-color: rgb(127 227 106 / 32%); }
body[data-phase="complete"] .approval-dock::before { background: linear-gradient(90deg, transparent, var(--green), transparent); }
body[data-phase="complete"] .mission-brief {
  opacity: 1;
  border-color: rgb(127 227 106 / 30%);
  background: linear-gradient(145deg, rgb(16 52 37 / 88%), rgb(6 20 34 / 94%));
  box-shadow: 0 18px 58px rgb(0 0 0 / 30%), inset 0 0 0 1px rgb(127 227 106 / 5%);
}
body[data-phase="complete"] .mission-brief { padding: 12px; }
body[data-phase="complete"] .mission-brief > p { margin-block: 10px; font-size: 11px; line-height: 1.5; -webkit-line-clamp: 5; }
body[data-phase="complete"] .mission-constraints span { padding: 3px 6px; font-size: 9px; }
body[data-phase="complete"] .primary-action { margin-top: 10px; padding: 8px 10px; }
body[data-phase="complete"] .brief-icon { color: var(--green-soft); border-color: rgb(127 227 106 / 38%); background: rgb(127 227 106 / 8%); }
body[data-phase="complete"] .primary-action:disabled { color: #03170a; border-color: rgb(127 227 106 / 34%); background: var(--green); opacity: .94; }
body[data-phase="complete"] .mission-constraints span { color: var(--green-soft); border-color: rgb(127 227 106 / 20%); }
body[data-phase="complete"] .review-action { color: #03170a; border-color: rgb(127 227 106 / 35%); background: var(--green); }

/* Competition legibility pass */
.selected-node p { font-size: 11px; }
.block-title { font-size: 10px; }
.origin-identity dt,
.approval-review dt { font-size: 10px; }
.origin-identity dd,
.approval-review dd { font-size: 10px; }
.signal-card small { font-size: 9px; }
.signal-card strong { font-size: 11px; }
.evidence-item strong { font-size: 10px; }
.evidence-item small { font-size: 9px; line-height: 1.4; }
.mapping-row strong,
.mapping-row b { font-size: 10px; }
.mapping-row small { font-size: 9px; }
.audit-event p { font-size: 10px; }
.audit-event small { font-size: 9px; line-height: 1.35; }
.approval-review-head small { font-size: 9px; }
.approval-review pre,
.approval-review blockquote { font-size: 9px; }

.rail-button::after {
  content: attr(aria-label);
  position: absolute;
  z-index: 60;
  top: 50%;
  left: calc(100% + 10px);
  padding: 6px 9px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xs);
  color: var(--text);
  background: rgb(5 18 31 / 96%);
  box-shadow: var(--shadow-soft);
  font-size: 9px;
  font-weight: 650;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-5px, -50%);
  transition: opacity 140ms ease, transform 140ms var(--ease-out);
}
.rail-button:hover::after,
.rail-button:focus-visible::after { opacity: 1; transform: translate(0, -50%); }

.constellation-mount,
.inspector-body,
.approval-dock { contain: layout paint style; }
.tb-node.is-active .tb-node__surface,
.tb-edge.has-packet .tb-edge__packet { will-change: opacity, transform; }

@keyframes edge-flow { to { stroke-dashoffset: -34; } }
@keyframes tb-pulse-travel { to { stroke-dashoffset: -1; } }
@keyframes quarantine-retreat { to { stroke-dashoffset: 22; } }
@keyframes trajectory-pulse { 0%, 100% { transform: scale(.94); opacity: .78; } 50% { transform: scale(1.04); opacity: 1; } }
@keyframes packet-trail-fade { 0% { stroke-dashoffset: .5; opacity: 0; } 20% { opacity: .55; } 100% { stroke-dashoffset: -.5; opacity: 0; } }
@keyframes packet-arrival { 0% { filter: drop-shadow(0 0 0 transparent); } 45% { filter: drop-shadow(0 0 15px currentColor); } 100% { filter: drop-shadow(0 0 0 transparent); } }
@keyframes approval-scan { to { stroke-dashoffset: -20; } }
@keyframes orbit-breathe { 0%, 100% { opacity: .35; transform: scale(.98); } 50% { opacity: 1; transform: scale(1.02); } }
@keyframes live-pulse { 0%, 100% { opacity: .55; transform: scale(.86); } 50% { opacity: 1; transform: scale(1.22); } }
@keyframes node-breathe { 0%, 100% { opacity: .82; } 50% { opacity: 1; } }
@keyframes hub-spin { to { transform: rotate(360deg); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes dialog-in { from { opacity: 0; transform: translate(-50%, -47%) scale(.97); } }
@keyframes command-in { from { opacity: 0; transform: translate(-50%, -8px) scale(.985); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1380px) {
  .workspace { grid-template-columns: minmax(680px, 1fr) 330px; }
  .runtime-chip.lock { display: none; }
  .mission-rail-stack { width: 205px; left: 12px; }
  .approval-dock { right: 10px; left: 10px; grid-template-columns: minmax(190px, .72fr) repeat(2, minmax(210px, 1fr)) minmax(150px, .62fr); }
  .approval-gate-copy { padding: 8px; }
  .gate-lock { flex-basis: 34px; height: 34px; }
  .review-action { min-width: 126px; margin: 0 2px; padding: 0 10px; }
  .stage-header { grid-template-columns: minmax(155px, 180px) minmax(310px, 1fr) auto; gap: 8px; }
  .mission-trajectory { width: 100%; transform: none; }
  .mission-trajectory li { grid-template-columns: 22px minmax(0, 1fr); column-gap: 5px; padding: 5px 6px; }
  .mission-trajectory li > span { width: 22px; height: 22px; }
}

@media (max-width: 1160px) {
  .command-bar { grid-template-columns: 218px minmax(200px, 1fr) auto; }
  .command-actions { display: none; }
  .runtime-chip:nth-child(2) { display: none; }
  .workspace { grid-template-columns: minmax(650px, 1fr) 300px; }
  .approval-gate-copy small { display: none; }
  .approval-dock { grid-template-columns: 164px repeat(2, minmax(170px, 1fr)) 132px; }
  .mutation-card { grid-template-columns: 30px minmax(0, 1fr); }
  .mutation-card > i { display: none; }
  .mutation-icon { width: 30px; height: 30px; }
  .review-action { min-width: 104px; white-space: normal; }
  .mission-trajectory { display: none; }
  .stage-header { grid-template-columns: minmax(0, 1fr) auto; }
  .guided-control > span:last-child { display: none; }
  .guided-control { width: 31px; padding: 0; justify-content: center; }
}

@media (max-width: 960px) {
  body { overflow: auto; }
  .app-frame { display: block; min-height: 100vh; height: auto; padding-top: 64px; padding-bottom: 58px; }
  .command-bar { position: fixed; top: 0; right: 0; left: 0; display: grid; grid-template-columns: 205px minmax(0, 1fr) auto; height: 64px; }
  .mission-context [data-phase-label],
  .mission-context-divider,
  .runtime-cluster .runtime-chip:not(:first-child),
  .mission-clock { display: none; }
  .navigation-rail { position: fixed; z-index: 50; right: 0; bottom: 0; left: 0; flex-direction: row; justify-content: space-around; height: 58px; padding: 4px 8px; border-top: 1px solid var(--border); border-right: 0; }
  .rail-button { flex: 1; min-height: 48px; max-width: 96px; }
  .rail-bottom { margin-top: 0; }
  .workspace { display: block; overflow: visible; }
  .topology-stage { height: 900px; border-right: 0; border-bottom: 1px solid var(--border); }
  .mission-rail-stack { bottom: 230px; }
  .evidence-panel { height: 620px; }
  .activity-ticker { position: relative; display: none; }
  .approval-dock { top: auto; right: 12px; bottom: 628px; left: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .approval-gate-copy { grid-column: 1 / -1; }
  .review-action { width: auto; }
  .rail-button::after { display: none; }
}

@media (max-width: 680px) {
  .command-bar { grid-template-columns: 174px minmax(0, 1fr); }
  .brand-lockup { padding: 0 12px; }
  .brand-symbol { width: 31px; height: 31px; }
  .brand-lockup strong { font-size: 16px; }
  .brand-lockup small { display: none; }
  .mission-context { justify-content: flex-end; padding: 0 12px; }
  .mission-context-label { display: none; }
  .runtime-cluster { display: none; }
  .topology-stage { height: 960px; }
  .stage-header { padding: 0 12px; }
  .stage-tools .live-status,
  .stage-tools [data-action="zoom-out"],
  .stage-tools [data-action="zoom-in"],
  .stage-tools [data-action="fit-graph"],
  .stage-tools output { display: none; }
  .mission-rail-stack { top: 76px; right: 12px; bottom: auto; left: 12px; width: auto; overflow: visible; }
  .constellation-viewport { inset: 400px 0 246px; }
  .constellation-placeholder { left: 50%; width: 80%; }
  .approval-dock { grid-template-columns: 1fr; max-height: none; overflow: visible; }
  .approval-gate-copy { grid-column: auto; }
  .approval-dock .mutation-card { min-height: 68px; }
  .review-action { width: 100%; min-height: 42px; }
  .approval-review-grid { grid-template-columns: 1fr; }
  .approval-dialog > footer { align-items: stretch; flex-direction: column; }
  .execute-action { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reactive-lens,
  .tb-edge__packet,
  .tb-edge__packet-trail { display: none !important; }
}

/* Mission gallery and judge checkpoints. */
.mission-context-strip {
  grid-template-rows: auto auto;
  min-height: 112px;
}

.judge-guide-track {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 4px;
  margin: -2px 0 0;
  padding: 7px 0 0;
  border-top: 1px solid var(--border);
  list-style: none;
}

.judge-guide-track li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 8px;
  font-weight: 760;
  letter-spacing: .03em;
  transition: color 180ms ease, opacity 180ms ease;
}

.judge-guide-track li::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 50%;
  right: -3px;
  left: 19px;
  height: 1px;
  background: var(--border);
}

.judge-guide-track li:last-child::after { display: none; }
.judge-guide-track i {
  display: grid;
  place-items: center;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--muted);
  background: #111318;
  font-family: var(--font-mono);
  font-size: 6px;
  font-style: normal;
}
.judge-guide-track span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.judge-guide-track li[data-state="active"] { color: var(--cyan-bright); }
.judge-guide-track li[data-state="active"] i { color: #071014; border-color: var(--cyan); background: var(--cyan-bright); box-shadow: 0 0 14px rgb(93 231 255 / 24%); }
.judge-guide-track li[data-state="complete"] { color: var(--text-soft); opacity: .78; }
.judge-guide-track li[data-state="complete"] i { color: var(--green-soft); border-color: rgb(137 233 165 / 30%); background: rgb(137 233 165 / 7%); }
.judge-guide-track li[data-state="skipped"] { opacity: .32; }
.judge-guide-track li[data-state="skipped"] i { border-style: dashed; }
.mission-trajectory li[data-state="skipped"] { opacity: .28; }
.mission-trajectory li[data-state="skipped"] > span { border-style: dashed; }

.constellation-viewport { top: 188px; }
body[data-phase="idle"] .constellation-placeholder {
  top: 50%;
  left: 61%;
  width: min(820px, calc(100% - 286px));
  max-height: calc(100% - 24px);
  text-align: left;
}

.mission-gallery {
  width: 100%;
  padding: 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(520px 180px at 10% 0, rgb(93 231 255 / 7%), transparent 68%),
    linear-gradient(145deg, rgb(20 22 27 / 92%), rgb(10 11 15 / 94%));
  box-shadow: 0 28px 90px rgb(0 0 0 / 42%), inset 0 1px 0 rgb(255 255 255 / 5%);
  backdrop-filter: blur(24px) saturate(112%);
}

.mission-gallery > header,
.mission-gallery > footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.mission-gallery > header { margin-bottom: 12px; }
.mission-gallery h2 { margin: 3px 0 0; font-size: 22px; letter-spacing: -.035em; }
.mission-gallery > header > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--green-soft);
  font-size: 9px;
  font-weight: 760;
}
.mission-gallery > header > span i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 9px rgb(137 233 165 / 52%); }

.mission-gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.mission-profile-card {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  gap: 10px;
  min-width: 0;
  min-height: 220px;
  padding: 13px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  background: rgb(255 255 255 / 2.5%);
  text-align: left;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms var(--ease-out), box-shadow 180ms ease;
}
.mission-profile-card::before {
  content: "";
  position: absolute;
  top: -1px;
  right: 14px;
  left: 14px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: .22;
}
.mission-profile-card:hover:not(:disabled) { transform: translateY(-2px); border-color: rgb(93 231 255 / 32%); background: rgb(93 231 255 / 5%); box-shadow: 0 18px 42px rgb(0 0 0 / 26%); }
.mission-profile-card[data-selected="true"] { border-color: rgb(93 231 255 / 48%); background: linear-gradient(145deg, rgb(93 231 255 / 9%), rgb(243 154 255 / 3%)); box-shadow: inset 0 0 0 1px rgb(93 231 255 / 8%); }
.mission-profile-card[data-mission-id="incident-trace"]::before { background: linear-gradient(90deg, transparent, var(--amber), transparent); }
.mission-profile-card[data-mission-id="authority-attack"]::before { background: linear-gradient(90deg, transparent, var(--coral), transparent); }
.mission-profile-card:disabled { cursor: default; opacity: .64; }
.mission-profile-index { position: absolute; top: 11px; right: 11px; color: var(--muted); font-family: var(--font-mono); font-size: 7px; }
.mission-profile-icon { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgb(93 231 255 / 24%); border-radius: 50%; color: var(--cyan-bright); background: rgb(93 231 255 / 6%); }
.mission-profile-icon[data-accent="amber"] { color: var(--amber-soft); border-color: rgb(255 210 120 / 28%); background: rgb(255 210 120 / 6%); }
.mission-profile-icon[data-accent="coral"] { color: var(--coral); border-color: rgb(255 116 107 / 28%); background: rgb(255 116 107 / 6%); }
.mission-profile-icon .ui-icon { width: 18px; height: 18px; }
.mission-profile-copy { grid-column: 1 / -1; display: grid; align-content: start; }
.mission-profile-copy small { color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.mission-profile-copy strong { margin-top: 5px; font-size: 16px; letter-spacing: -.025em; }
.mission-profile-copy em { margin-top: 8px; color: var(--text-soft); font-size: 10px; font-style: normal; line-height: 1.5; }
.mission-profile-proof { grid-column: 1 / -1; align-self: end; padding-top: 10px; border-top: 1px solid var(--border); color: var(--text-soft); font-family: var(--font-mono); font-size: 7px; line-height: 1.4; }
.mission-profile-select { position: absolute; right: 12px; bottom: 12px; width: 9px; height: 9px; border: 1px solid var(--muted); border-radius: 50%; }
.mission-profile-card[data-selected="true"] .mission-profile-select { border-color: var(--cyan); background: var(--cyan); box-shadow: 0 0 10px rgb(93 231 255 / 42%); }

.mission-gallery > footer { justify-content: flex-start; margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--border); }
.mission-gallery > footer > span { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid rgb(137 233 165 / 22%); border-radius: 50%; color: var(--green-soft); }
.mission-gallery > footer .ui-icon { width: 14px; height: 14px; }
.mission-gallery > footer p { display: grid; margin: 0; }
.mission-gallery > footer strong { font-size: 9px; }
.mission-gallery > footer small { margin-top: 2px; color: var(--muted); font-size: 8px; }

body[data-mission-profile="incident-trace"] .mission-context-strip::before { background: linear-gradient(90deg, transparent, var(--amber), var(--cyan), transparent); }
body[data-mission-profile="authority-attack"] .mission-context-strip::before { background: linear-gradient(90deg, transparent, var(--coral), var(--purple), transparent); }

@media (max-width: 1380px) {
  body[data-phase="idle"] .constellation-placeholder { left: 60%; width: min(720px, calc(100% - 254px)); }
  .judge-guide-track span { display: none; }
}

@media (max-width: 1160px) {
  .mission-gallery { max-height: 100%; overflow: auto; }
  .mission-gallery-grid { grid-template-columns: 1fr; }
  .mission-profile-card { grid-template-columns: 38px minmax(0, 1fr); grid-template-rows: auto auto; min-height: 0; }
  .mission-profile-copy { grid-column: 2; }
  .mission-profile-copy em { display: none; }
  .mission-profile-proof { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .mission-context-strip { grid-template-rows: auto auto auto auto; }
  .judge-guide-track { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 7px; }
  .judge-guide-track li::after { display: none; }
  .mission-rail-stack { top: 378px; }
  .constellation-viewport { top: 980px; }
  body[data-phase="idle"] .constellation-placeholder { top: 50%; left: 50%; width: calc(100% - 24px); max-height: calc(100% - 18px); }
  .mission-gallery { padding: 12px; }
  .mission-gallery > header > span,
  .mission-gallery > footer { display: none; }
  .mission-gallery h2 { font-size: 18px; }
}

/* V4 perceptual polish: semantic hierarchy, sealed receipts and judge-scale type. */
.stage-header h1 { font-size: 18px; }
.mission-trajectory b { font-size: 10px; }
.mission-trajectory small { font-size: 9px; }
.mission-trajectory li[data-state="complete"] {
  color: var(--text-soft);
  opacity: .72;
}
.mission-trajectory li[data-state="complete"] > span {
  color: #80c9eb;
  border-color: rgb(100 184 225 / 28%);
  background: rgb(35 91 125 / 9%);
  box-shadow: none;
}
body[data-phase="complete"] .mission-trajectory li[data-state="complete"] {
  color: var(--text-soft);
  background: transparent;
}

.mission-brief-head p,
.approval-gate-copy p,
.provider-legend > p,
.parallel-reads header p { font-size: 10px; }
.mission-brief-head strong { font-size: 14px; }
.mission-brief > p { font-size: 12px; line-height: 1.52; }
.mission-constraints span { font-size: 10px; }
.provider-legend > span { font-size: 11px; }
.parallel-reads h2 { font-size: 13px; }
.parallel-reads li strong { font-size: 11px; }
.parallel-reads li small,
.parallel-reads time { font-size: 9px; }

.provider-swap-status {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 6px 8px;
  border: 1px solid rgb(75 174 218 / 24%);
  border-radius: var(--radius-xs);
  color: var(--cyan-bright);
  background: rgb(16 49 71 / 48%);
}
.provider-swap-status > span { display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid rgb(91 190 230 / 25%); border-radius: 50%; }
.provider-swap-status .ui-icon { width: 14px; height: 14px; }
.provider-swap-status p { display: grid; margin: 0; }
.provider-swap-status strong { color: var(--text); font-size: 10px; }
.provider-swap-status small { margin-top: 1px; color: var(--muted); font-size: 9px; }
.provider-legend { padding: 10px 12px; }
.provider-legend > p { margin-bottom: 6px; }
.provider-legend > span { padding: 3px 0; }
.parallel-reads { padding: 10px; }
.parallel-reads header { padding-bottom: 7px; }
.parallel-reads ol { margin-top: 6px; }
.parallel-reads li { min-height: 30px; padding-block: 2px; }

.tb-node__label { font-size: 10.5px; }
.tb-node__subtitle,
.tb-node--hub .tb-node__subtitle { font-size: 9px; }
.tb-node--hub .tb-node__label { font-size: 15px; }
.tb-edge__arrow-marker path { fill: rgb(116 196 231 / 70%); }
body[data-phase="complete"] .tb-node--provider.is-complete .tb-node__surface {
  fill: rgb(7 27 45 / 96%);
  stroke: rgb(101 179 218 / 68%);
}
body[data-phase="complete"] .tb-node--provider.is-complete .tb-node__halo { stroke: rgb(101 179 218 / 20%); }
body[data-phase="complete"] .tb-node--provider.is-complete .tb-node__icon { color: #89d9ff; }
body[data-phase="complete"] .tb-node--capability.is-complete .tb-node__surface {
  fill: rgb(6 31 54 / 96%);
  stroke: rgb(83 177 225 / 74%);
}
body[data-phase="complete"] .tb-node--capability.is-complete .tb-node__halo { stroke: rgb(83 177 225 / 22%); }
body[data-phase="complete"] .tb-node--capability.is-complete .tb-node__icon { color: var(--cyan-bright); }
body[data-phase="complete"] .tb-node--hub.is-complete .tb-node__surface,
body[data-phase="complete"] .tb-node--mutation.is-complete .tb-node__surface { stroke: var(--green); }
body[data-phase="complete"] .tb-node.is-quarantined .tb-node__surface,
body[data-phase="complete"] .tb-node.is-quarantined .tb-node__halo { filter: none; animation: none; }

body[data-phase="complete"] .mission-brief {
  border-color: rgb(86 176 217 / 30%);
  background: linear-gradient(145deg, rgb(8 38 51 / 92%), rgb(6 20 34 / 96%));
  box-shadow: 0 18px 58px rgb(0 0 0 / 28%), inset 3px 0 0 rgb(127 227 106 / 58%);
}
body[data-phase="complete"] .brief-icon {
  color: var(--green-soft);
  border-color: rgb(127 227 106 / 32%);
  background: rgb(127 227 106 / 6%);
}
body[data-phase="complete"] .primary-action:disabled {
  cursor: default;
  color: var(--green-soft);
  border-color: rgb(127 227 106 / 25%);
  background: rgb(22 66 46 / 46%);
  box-shadow: none;
  opacity: 1;
}
body[data-phase="complete"] .mission-constraints span {
  color: var(--text-soft);
  border-color: rgb(99 174 210 / 18%);
}
body[data-phase="complete"] .command-actions [data-action="reset"] { display: none; }

.receipt-id,
.audit-seal {
  display: block;
  width: fit-content;
  margin-top: 4px;
  color: #8cc9e8;
  font-size: 9px;
  letter-spacing: .04em;
}
.audit-seal {
  max-width: 205px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mutation-card.sealed {
  cursor: pointer;
  border-color: rgb(79 164 202 / 30%);
  background: linear-gradient(145deg, rgb(12 42 53 / 76%), rgb(8 24 39 / 88%));
}
.mutation-card.sealed:hover {
  border-color: rgb(100 194 226 / 48%);
  background: linear-gradient(145deg, rgb(15 49 61 / 84%), rgb(8 24 39 / 92%));
  transform: none;
}
.mutation-card.sealed small { color: #7f9eb2; }
.mutation-card.sealed strong { color: var(--text); }
.mutation-card.sealed em { color: var(--text-soft); }
.mutation-card.sealed > i { color: var(--green); }

body[data-phase="complete"] .approval-dock {
  min-height: 112px;
  border-color: rgb(79 164 202 / 28%);
  background: linear-gradient(120deg, rgb(17 48 59 / 24%), transparent 42%), rgb(7 18 29 / 96%);
}
body[data-phase="complete"] .approval-dock::before { background: linear-gradient(90deg, transparent, rgb(105 194 226 / 72%), transparent); }
body[data-phase="complete"] .review-action {
  color: var(--cyan-bright);
  border-color: rgb(56 199 255 / 30%);
  background: rgb(14 54 76 / 76%);
  box-shadow: none;
}
body[data-phase="complete"] .review-action:hover { background: rgb(18 67 92 / 90%); box-shadow: 0 10px 26px rgb(20 119 160 / 14%); }

.audit-body { padding: 12px 14px 16px; }
.audit-overview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding: 10px 11px !important;
  border: 1px solid rgb(74 158 201 / 22%) !important;
  border-radius: var(--radius-sm);
  background: rgb(11 36 55 / 58%);
}
.audit-overview > div { display: grid; }
.audit-overview small { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.audit-overview strong { margin-top: 2px; font-size: 11px; }
.audit-overview code { max-width: 138px; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.audit-stream { gap: 8px; }
.audit-phase {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgb(7 25 41 / 72%);
}
.audit-phase[open] { border-color: rgb(74 158 201 / 30%); background: rgb(8 30 48 / 86%); }
.audit-phase[data-tone="authority"] { border-left: 2px solid rgb(246 185 65 / 55%); }
.audit-phase[data-tone="success"] { border-left: 2px solid rgb(127 227 106 / 62%); }
.audit-phase[data-tone="warning"] { border-left: 2px solid rgb(255 107 85 / 58%); }
.audit-phase summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 10px;
  padding: 10px 11px;
  cursor: pointer;
  list-style: none;
}
.audit-phase summary::-webkit-details-marker { display: none; }
.audit-phase summary > span { display: grid; min-width: 0; }
.audit-phase summary b { font-size: 11px; }
.audit-phase summary small { color: var(--muted); font-size: 9px; }
.audit-phase summary em { align-self: center; color: #81b9d6; font-size: 9px; font-style: normal; }
.audit-phase summary > strong { grid-column: 1 / -1; color: var(--text-soft); font-size: 10px; font-weight: 580; }
.audit-phase-events { padding: 4px 11px 9px; border-top: 1px solid var(--border); }
.audit-phase .audit-event { grid-template-columns: 47px 9px minmax(0, 1fr); min-height: 42px; padding-top: 7px; }
.audit-phase .audit-event::after { left: 59px; }
.audit-event time { font-size: 9px; }
.audit-event p { min-width: 0; font-size: 10.5px; line-height: 1.35; }
.audit-event small { font-size: 9.5px; line-height: 1.4; }

.toast-region {
  right: 384px;
  bottom: 190px;
}
.toast { padding: 13px 15px; }
.toast strong { font-size: 11px; }
.toast small { font-size: 10px; line-height: 1.4; }

@media (max-width: 1380px) {
  .toast-region { right: 354px; }
  .stage-header { grid-template-columns: minmax(180px, 200px) minmax(320px, 365px) auto; }
  .stage-header h1 { font-size: 16px; }
  .mission-trajectory { grid-template-columns: repeat(5, minmax(0, 1fr)); max-width: 365px; }
  .mission-trajectory li { display: grid; grid-template-columns: 1fr; grid-template-rows: auto; justify-items: center; padding: 8px 3px; }
  .mission-trajectory li > span { display: none; }
  .mission-trajectory b { overflow: visible; font-size: 9px; text-align: center; text-overflow: clip; }
  .mission-trajectory small { display: none; }
  .stage-tools .live-status { display: none; }
}

@media (max-width: 1160px) {
  .toast-region { right: 324px; }
}

@media (max-width: 960px) {
  .toast-region { right: 18px; bottom: 76px; }
  body[data-phase="complete"] .command-actions [data-action="reset"] { display: none; }
}

@media (max-height: 920px) and (min-width: 961px) {
  body[data-phase="complete"] .mission-rail-stack { top: 74px; }
  body[data-phase="complete"] .mission-brief > p { -webkit-line-clamp: 3; }
  body[data-phase="complete"] .parallel-reads ol { display: none; }
  body[data-phase="complete"] .parallel-reads header { padding-bottom: 0; border-bottom: 0; }
  body[data-phase="complete"] .approval-dock { min-height: 104px; }
}

@media (max-height: 820px) and (min-width: 961px) {
  body[data-phase="complete"] .mission-rail-stack { top: 70px; }
  body[data-phase="complete"] .mission-brief { padding: 10px; }
  body[data-phase="complete"] .mission-brief > p { margin-block: 8px; -webkit-line-clamp: 3; }
  body[data-phase="complete"] .mission-constraints { gap: 3px; }
  body[data-phase="complete"] .primary-action { margin-top: 7px; padding-block: 6px; }
  body[data-phase="complete"] .approval-dock { min-height: 98px; padding: 8px; }
  body[data-phase="complete"] .approval-gate-copy { padding-block: 6px; }
  body[data-phase="complete"] .mutation-card { min-height: 76px; padding-block: 7px; }
}

@media (max-width: 680px) {
  .topology-stage { height: 1810px; }
  .constellation-viewport {
    top: 930px;
    right: 0;
    bottom: auto;
    left: 0;
    height: 420px;
    overflow: hidden;
  }
  .constellation-mount {
    width: 100%;
    height: 100%;
    contain: none;
    transform-origin: center top;
  }
  .tb-constellation {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    height: auto;
    transform: none;
  }
  .tb-node__label { font-size: 16px; }
  .tb-node--hub .tb-node__label { font-size: 20px; }
  .tb-node--hub .tb-node__subtitle { font-size: 12px; }
  .tb-node--mutation .tb-node__label { font-size: 15px; }
  .approval-dock {
    top: 1370px;
    right: 8px;
    bottom: auto;
    left: 8px;
    max-height: none;
    overflow: visible;
  }
  .toast-region {
    right: 12px;
    bottom: 70px;
    left: 12px;
    width: auto;
  }
  .toast-region > .toast:not(:last-child) { display: none; }
}

/* Living Glass — one calm control surface, with chromatic energy reserved for state. */
.command-bar {
  border-color: var(--border);
  background: rgb(9 10 13 / 88%);
  box-shadow: 0 16px 44px rgb(0 0 0 / 24%);
  backdrop-filter: blur(24px) saturate(112%);
}

.brand-lockup { border-color: var(--border); }
.brand-symbol {
  filter: drop-shadow(0 0 10px rgb(93 231 255 / 18%));
}

.runtime-chip,
.mission-clock,
.icon-button,
.stage-tool {
  border-color: var(--border);
  background: rgb(255 255 255 / 4%);
}
.runtime-chip.verified { border-color: rgb(137 233 165 / 22%); }
.runtime-chip i,
.panel-live i,
.live-status i,
.ticker-title i { background: var(--green); box-shadow: 0 0 10px rgb(137 233 165 / 46%); }
.icon-button { width: 40px; height: 40px; }
.icon-button:hover,
.stage-tool:hover { border-color: var(--border-strong); background: rgb(255 255 255 / 8%); }

.navigation-rail {
  border-color: var(--border);
  background: rgb(8 9 12 / 92%);
}
.rail-button { min-height: 54px; }
.rail-button:hover { color: var(--text-soft); background: rgb(255 255 255 / 5%); }
.rail-button.active {
  color: var(--text);
  border-color: rgb(255 255 255 / 12%);
  background: linear-gradient(135deg, rgb(93 231 255 / 10%), rgb(243 154 255 / 5%) 56%, rgb(255 210 120 / 8%));
  box-shadow: none;
}
.rail-button.active::before {
  content: "";
  position: absolute;
  top: 11px;
  bottom: 11px;
  left: -1px;
  width: 2px;
  border-radius: 99px;
  background: linear-gradient(180deg, var(--cyan), var(--purple) 55%, var(--amber));
  box-shadow: 0 0 12px rgb(93 231 255 / 24%);
}
.rail-button i { color: #151009; background: var(--amber); }
.rail-button::after { border-color: var(--border-strong); background: rgb(14 15 19 / 98%); }

.topology-stage {
  border-color: var(--border);
  background:
    radial-gradient(circle at 57% 43%, rgb(93 231 255 / 7%), transparent 26%),
    radial-gradient(circle at 72% 30%, rgb(243 154 255 / 3%), transparent 25%),
    linear-gradient(180deg, rgb(12 13 17 / 80%), rgb(7 8 11 / 96%));
}
.stage-grid {
  opacity: .42;
  background-image:
    linear-gradient(rgb(255 255 255 / 4%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 4%) 1px, transparent 1px);
}
.topology-stage::after { background: linear-gradient(90deg, rgb(6 7 9 / 86%) 0, transparent 25%, transparent 76%, rgb(6 7 9 / 45%) 100%); }
.reactive-lens {
  opacity: .14;
  background: radial-gradient(circle, rgb(93 231 255 / 14%) 0, rgb(243 154 255 / 4%) 36%, transparent 70%);
}
.topology-stage[data-pointer-active="true"] .reactive-lens { opacity: .48; }

.stage-header {
  border-color: var(--border);
  background: linear-gradient(180deg, rgb(12 13 17 / 90%), rgb(10 11 14 / 68%));
  backdrop-filter: blur(18px) saturate(108%);
}
.section-kicker { color: var(--muted); font-size: 10px; }
.stage-tool { width: 36px; height: 36px; }
.guided-control {
  min-height: 36px;
  border-color: rgb(93 231 255 / 24%);
  color: var(--cyan-bright);
  background: rgb(93 231 255 / 7%);
}
.guided-control:hover { border-color: rgb(169 242 255 / 42%); background: rgb(93 231 255 / 11%); }
body[data-guided="active"] .guided-control { color: #061013; background: var(--cyan-bright); box-shadow: 0 0 22px rgb(93 231 255 / 15%); }

.mission-trajectory {
  border-color: var(--border);
  background: rgb(18 19 24 / 76%);
  box-shadow: 0 16px 46px rgb(0 0 0 / 22%);
}
.mission-trajectory::before { background: linear-gradient(90deg, transparent, rgb(93 231 255 / 22%), rgb(243 154 255 / 12%), transparent); }
.mission-trajectory li > span { border-color: var(--border); background: rgb(255 255 255 / 4%); }
.mission-trajectory li[data-state="active"] { color: var(--cyan-bright); background: rgb(93 231 255 / 8%); }
.mission-trajectory li[data-state="active"] > span { border-color: rgb(93 231 255 / 46%); box-shadow: 0 0 16px rgb(93 231 255 / 18%); }
.mission-trajectory li[data-state="complete"] > span { color: var(--green-soft); border-color: rgb(137 233 165 / 26%); background: rgb(137 233 165 / 6%); }

.mission-brief,
.provider-legend,
.parallel-reads {
  border-color: var(--border);
  background: var(--surface-glass);
  box-shadow: 0 20px 56px rgb(0 0 0 / 30%), inset 0 1px 0 rgb(255 255 255 / 4%);
  backdrop-filter: blur(22px) saturate(112%);
}
.brief-icon,
.selected-node-icon {
  border-color: rgb(93 231 255 / 28%);
  color: var(--cyan-bright);
  background: rgb(93 231 255 / 6%);
  box-shadow: none;
}
.mission-brief-head button,
.block-title button { min-width: 36px; min-height: 36px; }
.mission-brief-head strong {
  overflow: visible;
  line-height: 1.28;
  text-overflow: clip;
  white-space: normal;
}
.mission-constraints span { border-color: var(--border); color: var(--text-soft); background: rgb(255 255 255 / 4%); }
.primary-action,
.review-action,
.execute-action,
.approval-review > button {
  min-height: 44px;
  border-color: rgb(93 231 255 / 38%);
  color: #071014;
  background: linear-gradient(135deg, var(--cyan-bright), var(--cyan));
  box-shadow: 0 10px 30px rgb(93 231 255 / 12%);
}
.primary-action:hover,
.review-action:hover:not(:disabled),
.execute-action:hover:not(:disabled),
.approval-review > button:hover { box-shadow: 0 12px 34px rgb(93 231 255 / 18%); }

.provider-legend > button {
  min-height: 38px;
  border-color: var(--border);
  color: var(--text-soft);
  background: rgb(255 255 255 / 4%);
  font-size: 10px;
}
.provider-legend > button:hover { border-color: rgb(93 231 255 / 30%); color: var(--cyan-bright); }
.provider-swap-status { border-color: rgb(93 231 255 / 18%); background: rgb(93 231 255 / 5%); }
.provider-swap-status > span { border-color: rgb(93 231 255 / 22%); }
.provider-swap-status small,
.parallel-reads li small,
.parallel-reads time { font-size: 10px; }
.parallel-reads li[data-state="active"] { background: rgb(93 231 255 / 6%); }
.parallel-reads li[data-state="active"] > i { border-color: var(--cyan); background: var(--cyan); box-shadow: 0 0 9px rgb(93 231 255 / 48%); }
.parallel-reads li[data-state="complete"] > i { border-color: var(--green); background: var(--green); }

.constellation-viewport::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 8%;
  right: 9%;
  bottom: 5%;
  left: 22%;
  padding: 1px;
  border-radius: 50%;
  pointer-events: none;
  background: conic-gradient(from 205deg, transparent 0 12%, rgb(93 231 255 / 28%) 24%, transparent 40%, rgb(243 154 255 / 20%) 58%, transparent 73%, rgb(255 210 120 / 22%) 86%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: .65;
}
.placeholder-orbits i { border-color: rgb(93 231 255 / 18%); }
.placeholder-orbits i:nth-child(2) { border-color: rgb(243 154 255 / 21%); }
.placeholder-orbits i:nth-child(3) { border-color: rgb(255 210 120 / 22%); }
.placeholder-orbits b { background: var(--cyan); box-shadow: 0 0 26px rgb(93 231 255 / 38%); }

.tb-edge__track { stroke: rgb(194 199 211 / 20%); }
.tb-edge.is-active .tb-edge__track { stroke: rgb(93 231 255 / 58%); filter: drop-shadow(0 0 3px rgb(93 231 255 / 40%)); }
.tb-edge.is-active .tb-edge__pulse { animation: living-signal-travel 980ms linear infinite; }
.constellation-svg .edge[data-state="active"],
.constellation-svg [data-edge-id][data-state="active"] { animation: living-route-flow 980ms linear infinite; }
.tb-edge.is-complete .tb-edge__track { stroke: rgb(137 233 165 / 46%); }
.tb-edge.is-locked .tb-edge__track { stroke: rgb(255 210 120 / 46%); }
.tb-node__halo { fill: rgb(15 16 21 / 60%); stroke: rgb(255 255 255 / 12%); }
.tb-node__surface { fill: rgb(18 19 25 / 94%); stroke: rgb(169 242 255 / 46%); }
.tb-node--provider .tb-node__icon { color: #d0f8ff; }
.tb-node--capability .tb-node__surface { fill: rgb(16 18 24 / 96%); }
.tb-node:hover .tb-node__surface,
.tb-node:focus .tb-node__surface,
.tb-node[data-selected="true"] .tb-node__surface { fill: rgb(22 26 33 / 98%); stroke: var(--cyan-bright); filter: drop-shadow(0 0 8px rgb(93 231 255 / 30%)); }
.tb-node.is-active .tb-node__surface { filter: drop-shadow(0 0 10px rgb(93 231 255 / 38%)); }
.tb-node--hub .tb-node__halo { stroke: rgb(243 154 255 / 28%); }
.tb-node--hub .tb-node__surface {
  fill: rgb(20 23 30 / 98%);
  stroke: var(--cyan-bright);
  filter: drop-shadow(0 0 17px rgb(93 231 255 / 18%));
}
.tb-node--mutation .tb-node__surface { fill: rgb(31 27 19 / 94%); stroke: rgb(255 210 120 / 66%); }
.tb-node.is-quarantined .tb-node__surface { fill: rgb(39 20 21 / 96%); stroke: var(--coral); }
.tb-node.is-locked .tb-node__surface { fill: rgb(34 29 20 / 94%); stroke: var(--amber); }
.tb-constellation .orbit-ring,
.constellation-svg .orbit-ring { stroke: rgb(255 255 255 / 10%); }
.tb-constellation .orbit-ring.inner,
.constellation-svg .orbit-ring.inner { stroke: rgb(93 231 255 / 14%); }

.approval-dock {
  border-color: rgb(255 210 120 / 28%);
  background:
    linear-gradient(120deg, rgb(255 210 120 / 8%), transparent 40%),
    rgb(15 16 20 / 92%);
  box-shadow: 0 -18px 64px rgb(0 0 0 / 34%), inset 0 1px 0 rgb(255 255 255 / 5%);
  backdrop-filter: blur(24px) saturate(110%);
}
.approval-dock::before {
  right: 22px;
  left: 22px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--purple) 48%, var(--amber) 78%, transparent);
  opacity: .48;
}
.gate-lock { border-color: rgb(255 210 120 / 40%); color: var(--amber-soft); background: rgb(255 210 120 / 7%); box-shadow: none; }
.mutation-card {
  min-height: 78px;
  border-color: rgb(255 210 120 / 20%);
  background: linear-gradient(145deg, rgb(255 210 120 / 6%), rgb(255 255 255 / 3%));
}
.mutation-card:hover { border-color: rgb(255 210 120 / 42%); background: linear-gradient(145deg, rgb(255 210 120 / 10%), rgb(255 255 255 / 5%)); }
.mutation-card.approved { border-color: rgb(137 233 165 / 38%); background: linear-gradient(145deg, rgb(137 233 165 / 8%), rgb(255 255 255 / 3%)); }
.mutation-icon { border-color: rgb(255 210 120 / 28%); }
.mutation-card small,
.mutation-card em { font-size: 10px; }
.review-action:disabled,
.execute-action:disabled { border-color: var(--border); color: var(--muted); background: rgb(255 255 255 / 4%); }

.evidence-panel {
  background: linear-gradient(180deg, rgb(13 14 18 / 96%), rgb(8 9 12 / 98%));
  box-shadow: -24px 0 72px rgb(0 0 0 / 22%);
}
.panel-header,
.panel-tabs { border-color: var(--border); }
.panel-tabs button { min-height: 44px; color: var(--muted); font-size: 11px; }
.panel-tabs button::after { background: linear-gradient(90deg, var(--cyan), var(--purple)); }
.inspector-body > section { border-color: var(--border); }
.selected-node small,
.confidence-meta,
.signal-card small,
.signal-card > b,
.evidence-item time,
.mapping-summary p,
.audit-event time { font-size: 10px; }
.selected-node p,
.dialog-intro,
.evidence-item small,
.audit-event small { color: var(--muted); font-size: 11px; }
.confidence-track,
.confidence-track::-webkit-progress-bar { background: rgb(255 255 255 / 8%); }
.confidence-track::-webkit-progress-value,
.confidence-track::-moz-progress-bar { background: linear-gradient(90deg, var(--cyan), var(--purple)); box-shadow: 0 0 10px rgb(93 231 255 / 30%); }
.signal-card { border-color: rgb(137 233 165 / 20%) !important; background: rgb(137 233 165 / 5%); }
.evidence-item,
.mapping-summary,
.mapping-row,
.audit-phase,
.audit-overview { border-color: var(--border) !important; background: rgb(255 255 255 / 3%); }
.audit-phase[open] { border-color: var(--border-strong); background: rgb(255 255 255 / 4%); }
.audit-phase[data-tone="authority"] { border-left-color: rgb(255 210 120 / 58%); }
.audit-phase[data-tone="success"] { border-left-color: rgb(137 233 165 / 62%); }
.audit-phase[data-tone="warning"] { border-left-color: rgb(255 139 133 / 58%); }

.activity-ticker {
  border-color: var(--border);
  background: rgb(9 10 13 / 96%);
}
.ticker-title,
.activity-ticker > button { border-color: var(--border); }
.ticker-events span,
.activity-ticker > button { font-size: 10px; }
.activity-ticker > button:hover { color: var(--cyan-bright); background: rgb(255 255 255 / 5%); }

.dialog-backdrop { background: rgb(2 3 5 / 74%); backdrop-filter: blur(12px); }
.approval-dialog {
  border-color: rgb(255 210 120 / 28%);
  background:
    radial-gradient(circle at 50% 0, rgb(255 210 120 / 7%), transparent 34%),
    rgb(13 14 18 / 98%);
  box-shadow: 0 42px 130px rgb(0 0 0 / 66%), inset 0 1px 0 rgb(255 255 255 / 5%);
}
.approval-dialog::before {
  content: "";
  position: absolute;
  top: 0;
  right: 34px;
  left: 34px;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--purple) 48%, var(--amber) 78%, transparent);
  opacity: .58;
}
.dialog-close { width: 40px; height: 40px; border-color: var(--border); background: rgb(255 255 255 / 5%); }
.approval-review { border-color: var(--border); background: linear-gradient(145deg, rgb(255 210 120 / 5%), rgb(255 255 255 / 3%)); }
.approval-review.approved { border-color: rgb(137 233 165 / 34%); box-shadow: inset 0 0 0 1px rgb(137 233 165 / 7%); }
.approval-review-head > span { border-color: rgb(255 210 120 / 28%); }
.approval-review-head small,
.approval-review-head b,
.approval-review pre,
.approval-review blockquote,
.approval-dialog > footer strong,
.approval-dialog > footer small { font-size: 10px; }
.approval-review pre,
.approval-review blockquote { border-color: var(--border); background: rgb(6 7 9 / 68%); }
.command-menu { border-color: var(--border-strong); background: rgb(14 15 19 / 98%); box-shadow: 0 36px 100px rgb(0 0 0 / 58%); }
.command-menu label { border-color: var(--border); background: rgb(255 255 255 / 4%); }
.command-menu > div button { min-height: 42px; }
.command-menu > div button:hover { color: var(--text); background: rgb(255 255 255 / 6%); }
.toast { border-color: var(--border-strong); background: rgb(16 17 21 / 96%); }

body[data-phase="complete"] .mission-brief {
  border-color: rgb(137 233 165 / 28%);
  background: linear-gradient(145deg, rgb(137 233 165 / 7%), rgb(18 19 24 / 92%));
  box-shadow: 0 20px 58px rgb(0 0 0 / 30%), inset 3px 0 0 rgb(137 233 165 / 54%);
}
body[data-phase="complete"] .mission-constraints span { border-color: var(--border); color: var(--text-soft); }
body[data-phase="complete"] .approval-dock {
  border-color: rgb(137 233 165 / 26%);
  background: linear-gradient(120deg, rgb(137 233 165 / 7%), transparent 42%), rgb(15 16 20 / 94%);
}
body[data-phase="complete"] .approval-dock::before { background: linear-gradient(90deg, transparent, var(--cyan), var(--green), transparent); }
body[data-phase="complete"] .review-action { color: var(--green-soft); border-color: rgb(137 233 165 / 28%); background: rgb(137 233 165 / 8%); }
body[data-phase="complete"] .review-action:hover { background: rgb(137 233 165 / 12%); box-shadow: none; }
body[data-phase="complete"] .tb-node--provider.is-complete .tb-node__surface,
body[data-phase="complete"] .tb-node--capability.is-complete .tb-node__surface { fill: rgb(18 21 24 / 96%); stroke: rgb(137 233 165 / 56%); }

@keyframes living-signal-travel { to { stroke-dashoffset: -1; } }
@keyframes living-route-flow { to { stroke-dashoffset: -34; } }

@media (min-width: 1180px) and (min-height: 748px) {
  .app-frame {
    width: calc(100vw - 28px);
    height: calc(100vh - 28px);
    margin: 14px;
    overflow: hidden;
    border: 1px solid rgb(255 255 255 / 10%);
    border-radius: 22px;
    background: var(--bg);
    box-shadow: 0 32px 110px rgb(0 0 0 / 52%), 0 0 0 1px rgb(0 0 0 / 50%);
  }
}

@media (min-width: 1161px) and (max-width: 1550px) {
  .stage-header { grid-template-columns: minmax(170px, 190px) minmax(300px, 360px) auto; }
  .mission-trajectory { grid-template-columns: repeat(5, minmax(0, 1fr)); max-width: 360px; }
  .mission-trajectory li {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    justify-items: center;
    padding: 8px 3px;
  }
  .mission-trajectory li > span,
  .mission-trajectory small,
  .stage-tools .live-status { display: none; }
  .mission-trajectory b { overflow: visible; font-size: 9px; text-align: center; text-overflow: clip; }
}

@media (max-width: 680px) {
  .constellation-viewport::before { display: none; }
  .command-bar,
  .navigation-rail { background: rgb(9 10 13 / 96%); }
  .mission-context {
    display: grid;
    align-content: center;
    justify-content: start;
    gap: 1px;
  }
  .mission-context [data-phase-label] {
    display: block;
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .stage-header { grid-template-columns: minmax(0, 1fr) auto; }
  .tb-node--provider .tb-node__label { font-size: 15px; }
  .approval-dock { border-radius: var(--radius); }
}

/* Judge context and truthful product-view separation. */
.mission-context-strip {
  position: absolute;
  z-index: 9;
  top: 76px;
  right: 16px;
  left: 252px;
  display: grid;
  grid-template-columns: minmax(128px, .72fr) minmax(0, 2.2fr) minmax(162px, .78fr);
  align-items: center;
  gap: 14px;
  min-height: 82px;
  padding: 11px 12px 11px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background:
    radial-gradient(420px 90px at 0 0, rgb(255 255 255 / 6%), transparent 72%),
    rgb(18 19 24 / 88%);
  box-shadow: 0 20px 58px rgb(0 0 0 / 30%), inset 0 1px 0 rgb(255 255 255 / 6%);
  backdrop-filter: blur(22px) saturate(112%);
}

.mission-context-strip::before {
  content: "";
  position: absolute;
  top: -1px;
  right: 20px;
  left: 20px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--purple) 52%, var(--amber), transparent);
  opacity: .65;
}

.context-strip-title p,
.context-strip-title h2,
.context-strip-status,
.context-strip-status dd { margin: 0; }
.context-strip-title p {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.context-strip-title h2 { margin-top: 2px; font-size: 15px; letter-spacing: -.02em; }
.context-strip-status { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.context-strip-status > div {
  min-width: 0;
  min-height: 54px;
  padding: 7px 9px;
  border-left: 1px solid var(--border);
}
.context-strip-status dt {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.context-strip-status dd {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.context-strip-status > div:last-child dd { color: var(--amber-soft); }

.context-action,
.universal-entry > button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgb(93 231 255 / 38%);
  border-radius: var(--radius-sm);
  color: #071014;
  background: linear-gradient(135deg, var(--cyan-bright), var(--cyan));
  box-shadow: 0 10px 30px rgb(93 231 255 / 14%);
  font-size: 11px;
  font-weight: 800;
  text-align: left;
  transition: filter 160ms ease, transform 160ms var(--ease-out), box-shadow 160ms ease;
}
.context-action:hover:not(:disabled),
.universal-entry > button:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 13px 36px rgb(93 231 255 / 20%); }
.context-action:disabled {
  color: var(--text-soft);
  border-color: var(--border);
  background: rgb(255 255 255 / 5%);
  box-shadow: none;
  opacity: 1;
}
.context-action.is-loading span:last-child { animation: context-working 900ms ease-in-out infinite alternate; }

.constellation-viewport { top: 158px; }

.objective-actions { display: flex; align-items: center; justify-content: flex-end; gap: 2px; }
.objective-actions [data-action="save-objective"] { color: var(--green-soft); }
.objective-actions [data-action="cancel-objective"] { color: var(--text-soft); }
.mission-brief > textarea {
  width: 100%;
  min-height: 118px;
  max-height: 220px;
  margin: 12px 0;
  padding: 10px;
  resize: vertical;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xs);
  outline: 0;
  color: var(--text);
  background: rgb(6 7 9 / 72%);
  font-size: 11px;
  line-height: 1.5;
}
.mission-brief > textarea:focus-visible { border-color: rgb(93 231 255 / 52%); box-shadow: 0 0 0 3px rgb(93 231 255 / 10%); }

/* The dock remains an inspectable secondary surface; the context strip owns the page CTA. */
.review-action {
  color: var(--text-soft);
  border-color: var(--border-strong);
  background: rgb(255 255 255 / 5%);
  box-shadow: none;
}
.review-action:hover:not(:disabled) { color: var(--text); background: rgb(255 255 255 / 9%); box-shadow: none; }
body[data-phase="complete"] .review-action,
body[data-phase="complete"] .review-action:hover {
  color: var(--text-soft);
  border-color: var(--border-strong);
  background: rgb(255 255 255 / 5%);
  box-shadow: none;
}

body[data-app-view="live"] .workspace { grid-template-columns: minmax(0, 1fr); }
.universal-view {
  grid-column: 1 / -1;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: clamp(26px, 5vw, 72px);
  background:
    radial-gradient(720px 420px at 50% 0, rgb(93 231 255 / 7%), transparent 68%),
    radial-gradient(560px 360px at 92% 16%, rgb(243 154 255 / 5%), transparent 70%),
    linear-gradient(180deg, rgb(11 12 15 / 96%), rgb(7 8 10 / 100%));
}
.universal-hero,
.universal-flow,
.universal-entry { width: min(1120px, 100%); margin-inline: auto; }
.universal-hero { max-width: 820px; margin-bottom: clamp(26px, 4vw, 46px); text-align: center; }
.universal-hero h1 { margin: 7px 0 0; font-size: clamp(34px, 5vw, 62px); line-height: 1; letter-spacing: -.055em; }
.universal-hero > p:not(.section-kicker) { max-width: 720px; margin: 17px auto 0; color: var(--text-soft); font-size: clamp(13px, 1.4vw, 16px); line-height: 1.65; }
.universal-truth {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 8px 11px;
  border: 1px solid rgb(137 233 165 / 20%);
  border-radius: 999px;
  color: var(--green-soft);
  background: rgb(137 233 165 / 5%);
  font-size: 11px;
}
.universal-truth .ui-icon { width: 15px; height: 15px; }
.universal-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-block: 0;
  padding: 0;
  counter-reset: universal-step;
  list-style: none;
}
.universal-flow li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 11px;
  min-height: 104px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgb(18 19 24 / 74%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 4%);
}
.universal-flow li > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgb(93 231 255 / 22%);
  border-radius: 50%;
  color: var(--cyan-bright);
  font-family: var(--font-mono);
  font-size: 9px;
}
.universal-flow li:nth-child(4) > span { color: var(--amber-soft); border-color: rgb(255 210 120 / 28%); }
.universal-flow li:nth-child(6) > span { color: var(--green-soft); border-color: rgb(137 233 165 / 26%); }
.universal-flow li div { display: grid; align-content: start; min-width: 0; }
.universal-flow strong { font-size: 13px; }
.universal-flow small { margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.universal-entry {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, .85fr) auto;
  align-items: center;
  gap: 20px;
  margin-top: 12px;
  padding: 20px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgb(93 231 255 / 6%), rgb(243 154 255 / 3%) 55%, rgb(255 210 120 / 5%)), rgb(18 19 24 / 86%);
  box-shadow: 0 24px 72px rgb(0 0 0 / 34%), inset 0 1px 0 rgb(255 255 255 / 5%);
}
.universal-entry h2 { margin: 3px 0 0; font-size: 19px; }
.universal-entry p:not(.section-kicker) { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.universal-entry details { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: rgb(6 7 9 / 45%); }
.universal-entry summary { min-height: 24px; color: var(--text-soft); cursor: pointer; font-size: 11px; font-weight: 750; }
.universal-entry details ol { margin: 9px 0 0; padding-left: 18px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.universal-entry > button { min-width: 178px; }

/* Human-first approval summary; machine binding remains available on demand. */
.approval-dialog { width: min(1080px, calc(100vw - 36px)); }
.approval-review { display: flex; flex-direction: column; }
.change-summary { margin-top: 13px; }
.change-transition {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr);
  align-items: stretch;
  gap: 7px;
}
.change-transition > div {
  min-width: 0;
  min-height: 88px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgb(6 7 9 / 54%);
}
.change-transition > span { align-self: center; color: var(--amber); text-align: center; }
.change-transition small { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.change-transition strong { display: block; margin-top: 5px; font-size: 11px; line-height: 1.4; }
.change-transition blockquote {
  min-height: 0;
  max-height: 72px;
  margin: 7px 0 0;
  padding: 7px;
  font-size: 9px;
  line-height: 1.4;
}
.approval-review .change-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 14px;
  margin: 10px 0 0;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.approval-review .change-facts > div { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 8px; padding: 5px 0; }
.approval-review .change-facts dt { color: var(--muted); font-size: 9px; }
.approval-review .change-facts dd { margin: 0; color: var(--text-soft); font-size: 10px; line-height: 1.4; text-align: left; white-space: normal; }
.technical-details {
  margin: 10px 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgb(255 255 255 / 2%);
}
.technical-details summary {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 11px;
  color: var(--text-soft);
  cursor: pointer;
  font-size: 10px;
  font-weight: 750;
}
.technical-details[open] summary { border-bottom: 1px solid var(--border); }
.approval-review .technical-details dl { margin: 0; padding: 10px 11px; border: 0; }
.approval-review .technical-details dl div { grid-template-columns: 62px minmax(0, 1fr); }
.technical-details pre { max-height: 150px; margin: 0 10px 10px; }
.approval-review > button { margin-top: auto; }

@keyframes context-working { to { transform: translateX(4px); opacity: .55; } }

@media (max-width: 1380px) {
  .mission-context-strip { left: 229px; grid-template-columns: minmax(0, 1fr) minmax(150px, auto); }
  .context-strip-title { display: none; }
}

@media (max-width: 960px) {
  body[data-app-view="live"] .workspace { display: block; }
  .universal-view { min-height: calc(100vh - 122px); }
  .universal-entry { grid-template-columns: 1fr 1fr; }
  .universal-entry > button { grid-column: 1 / -1; width: 100%; }
}

@media (max-width: 680px) {
  .mission-context-strip {
    top: 76px;
    right: 12px;
    left: 12px;
    grid-template-columns: 1fr;
    gap: 9px;
    min-height: 0;
    padding: 13px;
  }
  .context-strip-title { display: block; }
  .context-strip-status { grid-template-columns: 1fr; gap: 3px; }
  .context-strip-status > div { display: grid; grid-template-columns: 86px minmax(0, 1fr); align-items: start; min-height: 0; padding: 5px 7px; }
  .context-strip-status dd { margin-top: 0; -webkit-line-clamp: 3; }
  .context-action { width: 100%; }
  .mission-rail-stack { top: 328px; }
  .topology-stage { height: 1810px; }
  .constellation-viewport { top: 930px; height: 420px; }
  .approval-dock { top: 1370px; }
  .universal-view { padding: 30px 14px 42px; }
  .universal-flow { grid-template-columns: 1fr; }
  .universal-flow li { min-height: 88px; }
  .universal-entry { grid-template-columns: 1fr; padding: 16px; }
  .universal-entry > button { grid-column: auto; }
  .change-transition { grid-template-columns: 1fr; }
  .change-transition > span { transform: rotate(90deg); }
  .approval-review .change-facts { grid-template-columns: 1fr; }
}

@media (max-height: 719px) and (min-width: 961px) {
  body { overflow: auto; }
  .app-frame { height: 720px; min-height: 720px; }
}

/* Product views: the rail switches complete, truthful surfaces. */
body[data-app-view="evidence"] .workspace,
body[data-app-view="audit"] .workspace { grid-template-columns: minmax(0, 1fr); }
body[data-app-view="evidence"] .evidence-panel,
body[data-app-view="audit"] .evidence-panel {
  box-shadow: none;
}
body[data-app-view="evidence"] .evidence-panel .inspector-body,
body[data-app-view="audit"] .evidence-panel .inspector-body { width: min(1040px, 100%); margin-inline: auto; }

.approvals-view {
  grid-column: 1 / -1;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: clamp(24px, 5vw, 72px);
  background:
    radial-gradient(620px 360px at 50% 0, rgb(255 210 120 / 7%), transparent 70%),
    linear-gradient(180deg, rgb(13 14 18 / 98%), rgb(7 8 10 / 100%));
}
.view-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 28px;
  width: min(1040px, 100%);
  margin: 0 auto 24px;
}
.view-header h1 { margin: 5px 0 0; font-size: clamp(32px, 4vw, 52px); line-height: 1; letter-spacing: -.055em; }
.view-header p:not(.section-kicker) { max-width: 660px; margin: 13px 0 0; color: var(--text-soft); font-size: 13px; line-height: 1.6; }
.view-state-pill {
  flex: 0 0 auto;
  padding: 8px 11px;
  border: 1px solid rgb(255 210 120 / 25%);
  border-radius: 999px;
  color: var(--amber-soft);
  background: rgb(255 210 120 / 6%);
  font-family: var(--font-mono);
  font-size: 10px;
  white-space: nowrap;
}
.approval-view-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: min(1040px, 100%);
  margin: 0 auto 12px;
}
.approval-view-summary > div {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 70px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgb(255 255 255 / 3%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 4%);
}
.summary-glyph,
.approval-view-icon { display: grid; place-items: center; flex: 0 0 auto; border: 1px solid rgb(255 210 120 / 26%); border-radius: 50%; color: var(--amber-soft); background: rgb(255 210 120 / 5%); }
.summary-glyph { width: 34px; height: 34px; }
.summary-glyph .ui-icon { width: 15px; height: 15px; }
.approval-view-summary p { display: grid; min-width: 0; margin: 0; }
.approval-view-summary small { color: var(--muted); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.approval-view-summary strong { margin-top: 3px; overflow: hidden; color: var(--text-soft); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.approval-view-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: min(1040px, 100%); margin: 0 auto; }
.approval-view-card {
  display: flex;
  flex-direction: column;
  min-height: 238px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgb(255 210 120 / 5%), rgb(255 255 255 / 3%)), rgb(18 19 24 / 86%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 4%);
  transition: border-color 180ms ease, transform 180ms var(--ease-out), box-shadow 180ms ease;
}
.approval-view-card:hover { border-color: rgb(255 210 120 / 28%); transform: translateY(-2px); box-shadow: 0 18px 44px rgb(0 0 0 / 24%), inset 0 1px 0 rgb(255 255 255 / 4%); }
.approval-view-card.approved { border-color: rgb(137 233 165 / 34%); background: linear-gradient(145deg, rgb(137 233 165 / 6%), rgb(255 255 255 / 3%)), rgb(18 19 24 / 86%); }
.approval-view-card.sealed { border-color: rgb(137 233 165 / 40%); }
.approval-view-card-head { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 11px; }
.approval-view-icon { width: 42px; height: 42px; }
.approval-view-icon .ui-icon { width: 19px; height: 19px; }
.approval-view-card-head small { color: var(--muted); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.approval-view-card-head h2 { margin: 3px 0 0; font-size: 16px; letter-spacing: -.02em; }
.approval-view-card-head b { padding: 5px 8px; border: 1px solid rgb(255 210 120 / 28%); border-radius: 999px; color: var(--amber-soft); font-family: var(--font-mono); font-size: 9px; font-weight: 650; white-space: nowrap; }
.approval-view-card.approved .approval-view-card-head b,
.approval-view-card.sealed .approval-view-card-head b { border-color: rgb(137 233 165 / 32%); color: var(--green-soft); }
.approval-view-card dl { display: grid; gap: 9px; margin: 22px 0 16px; padding: 13px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.approval-view-card dl div { display: grid; grid-template-columns: 66px minmax(0, 1fr); gap: 10px; }
.approval-view-card dt { color: var(--muted); font-size: 10px; }
.approval-view-card dd { overflow: hidden; margin: 0; color: var(--text-soft); font-family: var(--font-mono); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.approval-view-card > button { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 42px; margin-top: auto; padding: 0 12px; border: 1px solid rgb(255 210 120 / 25%); border-radius: var(--radius-sm); color: var(--text-soft); background: rgb(255 255 255 / 4%); font-size: 10px; font-weight: 750; transition: border-color 160ms ease, background 160ms ease, transform 160ms var(--ease-out); }
.approval-view-card > button:hover:not(:disabled) { border-color: rgb(255 210 120 / 48%); color: var(--text); background: rgb(255 210 120 / 7%); transform: translateY(-1px); }
.approval-view-card > button:disabled { color: var(--muted); opacity: .72; }
.approval-view-empty { display: flex; align-items: center; gap: 12px; width: min(1040px, 100%); margin: 12px auto 0; padding: 14px 16px; border: 1px dashed rgb(255 255 255 / 12%); border-radius: var(--radius); color: var(--muted); background: rgb(255 255 255 / 2%); }
.approval-view-empty > span { display: grid; place-items: center; width: 30px; height: 30px; color: var(--cyan-bright); }
.approval-view-empty .ui-icon { width: 18px; height: 18px; }
.approval-view-empty strong { color: var(--text-soft); font-size: 11px; }
.approval-view-empty p { margin: 3px 0 0; font-size: 10px; line-height: 1.5; }

.help-drawer {
  position: fixed;
  z-index: 80;
  top: 78px;
  right: 18px;
  width: min(400px, calc(100vw - 36px));
  max-height: calc(100vh - 108px);
  overflow: auto;
  padding: 20px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgb(16 37 56 / 98%), rgb(11 12 16 / 98%));
  box-shadow: 0 30px 100px rgb(0 0 0 / 54%), inset 0 1px 0 rgb(255 255 255 / 5%);
  animation: drawer-in 220ms var(--ease-out) both;
}
.help-drawer > header { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.help-drawer h2 { margin: 4px 0 0; font-size: 21px; letter-spacing: -.03em; }
.help-drawer .dialog-close { flex: 0 0 auto; }
.help-lead { margin: 16px 0; color: var(--text-soft); font-size: 11px; line-height: 1.6; }
.help-drawer section { padding: 14px 0 0; border-top: 1px solid var(--border); }
.help-drawer h3 { margin: 0 0 9px; color: var(--text); font-size: 11px; }
.help-drawer ol { display: grid; gap: 8px; margin: 0; padding-left: 20px; color: var(--muted); font-size: 10px; }
.help-drawer li { padding-left: 3px; }
.help-drawer li strong { display: block; color: var(--text-soft); font-size: 10px; }
.help-drawer li span { display: block; margin-top: 2px; line-height: 1.45; }
.help-shortcuts p { margin: 0; color: var(--muted); font-family: var(--font-mono); font-size: 9px; line-height: 1.8; }
.help-shortcuts kbd { padding: 2px 5px; border: 1px solid var(--border-strong); border-radius: 4px; color: var(--text-soft); background: rgb(255 255 255 / 5%); }
@keyframes drawer-in { from { opacity: 0; transform: translateY(-8px) scale(.985); } }

@media (max-width: 960px) {
  .rail-button { grid-template-rows: 20px auto; gap: 3px; }
  .rail-button span { position: static; width: auto; height: auto; overflow: hidden; clip-path: none; max-width: 100%; color: currentColor; font-size: 9px; line-height: 1.1; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
  .rail-button svg { width: 18px; height: 18px; }
  .approvals-view { min-height: calc(100vh - 122px); }
  .view-header { gap: 16px; }
}

@media (max-width: 680px) {
  .rail-button { padding: 5px 2px; }
  .rail-button span { max-width: 61px; overflow: visible; font-size: 8px; white-space: normal; }
  .rail-button i { top: 1px; right: 1px; min-width: 15px; height: 15px; font-size: 8px; }
  .view-header { display: grid; gap: 13px; margin-bottom: 18px; }
  .view-header h1 { font-size: 36px; }
  .view-header p:not(.section-kicker) { font-size: 11px; }
  .view-state-pill { justify-self: start; }
  .approval-view-summary,
  .approval-view-grid { grid-template-columns: 1fr; }
  .approval-view-card { min-height: 220px; }
  .help-drawer { top: 72px; right: 10px; width: calc(100vw - 20px); max-height: calc(100vh - 142px); padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .approval-view-card:hover { transform: none; }
}
