:root {
  --ink: #14202d;
  --ink-soft: #526171;
  --ink-muted: #83909c;
  --paper: #f2f5f1;
  --panel: #fbfcfa;
  --line: #dfe6e2;
  --line-strong: #cbd6d0;
  --navy: #0b151f;
  --navy-2: #122232;
  --navy-3: #1d3142;
  --lime: #cdf36d;
  --lime-deep: #91ca3c;
  --mint: #dff7d1;
  --orange: #ffab68;
  --coral: #ff756d;
  --blue: #83b7ff;
  --violet: #ab9aff;
  --shadow: 0 18px 50px rgba(10, 24, 34, 0.08);
  --shadow-small: 0 7px 20px rgba(10, 24, 34, 0.07);
  --radius-xl: 25px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: #081019;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
textarea,
select {
  font: inherit;
}

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

button {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(145, 202, 60, 0.55);
  outline-offset: 3px;
}

a {
  color: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  position: relative;
  max-width: 1660px;
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--paper);
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.26;
  pointer-events: none;
}

.ambient-one {
  top: -120px;
  left: -150px;
  background: #6eabf0;
}

.ambient-two {
  right: -170px;
  bottom: -100px;
  background: #b5e45a;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  padding: 0 4.2vw;
  color: #edf4ee;
  background: var(--navy);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: block;
  width: 27px;
  height: 27px;
  transform: rotate(-5deg);
}

.brand-leaf {
  position: absolute;
  display: block;
  width: 16px;
  height: 10px;
  background: var(--lime);
  border-radius: 100% 0 100% 0;
}

.leaf-a {
  top: 2px;
  left: 0;
  transform: rotate(26deg);
}

.leaf-b {
  top: 1px;
  right: 0;
  transform: scaleX(-1) rotate(26deg);
}

.brand-stem {
  position: absolute;
  left: 13px;
  top: 7px;
  width: 2px;
  height: 20px;
  background: var(--lime);
  border-radius: 3px;
  transform: rotate(23deg);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-name {
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.05em;
}

.brand-caption {
  color: #738393;
  font-size: 8px;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.topbar-center {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #a7b6c0;
  font-size: 11px;
  letter-spacing: 0.01em;
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--lime);
  font-weight: 700;
}

.live-dot,
.mini-dot,
.status-pip,
.console-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime-deep);
  box-shadow: 0 0 0 3px rgba(145, 202, 60, 0.12);
}

.topbar-divider {
  width: 1px;
  height: 15px;
  background: #30414e;
}

.topbar-context {
  color: #8798a5;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-button,
.avatar-button {
  border: 0;
}

.icon-button {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  color: #afbec8;
  background: transparent;
  border: 1px solid #30414e;
  border-radius: 50%;
}

.icon-button:hover {
  color: var(--lime);
  border-color: #63804a;
  background: #172732;
}

.icon-button svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.avatar-button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--navy);
  font-size: 11px;
  font-weight: 800;
  background: var(--lime);
  border-radius: 50%;
}

.avatar-button:hover {
  background: #e2ff9a;
}

main {
  position: relative;
  padding: 0 4.2vw 60px;
}

.hero-section {
  position: relative;
  display: flex;
  min-height: 408px;
  padding: 68px 6.2% 74px;
  overflow: hidden;
  color: #f2f8f3;
  background: var(--navy);
  border-bottom: 1px solid #1c2c38;
}

.hero-section::after {
  position: absolute;
  right: 0;
  bottom: -130px;
  width: 540px;
  height: 270px;
  border: 1px solid rgba(205, 243, 109, 0.13);
  border-radius: 50%;
  content: "";
  transform: rotate(-16deg);
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;
  max-width: 690px;
}

.eyebrow,
.section-kicker {
  margin: 0;
  color: var(--lime-deep);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.18em;
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #a7c474;
}

.eyebrow-line {
  width: 23px;
  height: 1px;
  background: var(--lime);
}

.eyebrow-chip {
  display: inline-flex;
  padding: 4px 7px;
  color: #7f929e;
  font-size: 8px;
  letter-spacing: 0.08em;
  background: #152531;
  border: 1px solid #2b3c48;
  border-radius: 999px;
}

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

h1 {
  max-width: 660px;
  margin: 23px 0 16px;
  color: #f4f8f2;
  font-size: clamp(43px, 5.4vw, 82px);
  font-weight: 450;
  letter-spacing: -0.075em;
  line-height: 0.96;
}

h1 em {
  color: var(--lime);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.98em;
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.08em;
}

.hero-description {
  width: 100%;
  max-width: 500px;
  margin-bottom: 28px;
  color: #a9bac1;
  font-size: 14px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 11px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  gap: 9px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: -0.01em;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  color: #12200f;
  background: var(--lime);
  box-shadow: 0 8px 22px rgba(120, 158, 43, 0.22);
}

.button-primary:hover {
  background: #e3ff9d;
}

.button-ghost {
  color: #aec0c8;
  background: transparent;
  border-color: #334754;
}

.button-ghost:hover {
  color: #f3f8f2;
  border-color: #6e8490;
  background: #162735;
}

.button-dark {
  color: #f4f7f2;
  background: var(--navy);
}

.button-dark:hover {
  background: #1e3546;
}

.button-small {
  min-height: 35px;
  padding: 0 13px;
  font-size: 10px;
}

.button-outline {
  color: var(--ink);
  background: transparent;
  border-color: var(--line-strong);
}

.button-outline:hover {
  border-color: var(--ink);
  background: #f2f6f2;
}

.button-full {
  width: 100%;
}

.button-icon {
  font-size: 14px;
  line-height: 1;
}

.button-shortcut {
  display: inline-flex;
  min-width: 20px;
  justify-content: center;
  padding: 3px 5px;
  color: #5b7833;
  font-size: 9px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.28);
  border-radius: 5px;
}

.hero-protocol {
  position: absolute;
  top: 0;
  right: 5.2%;
  width: min(430px, 37%);
  height: 100%;
  min-width: 320px;
}

.protocol-orbit {
  position: absolute;
  border: 1px solid rgba(205, 243, 109, 0.2);
  border-radius: 50%;
  transform: rotate(-21deg);
}

.orbit-a {
  top: 83px;
  left: 86px;
  width: 245px;
  height: 245px;
}

.orbit-b {
  top: 42px;
  left: 27px;
  width: 390px;
  height: 285px;
  border-color: rgba(131, 183, 255, 0.12);
  transform: rotate(22deg);
}

.protocol-core {
  position: absolute;
  top: 152px;
  left: 175px;
  display: flex;
  width: 74px;
  height: 74px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  background: var(--lime);
  border-radius: 50%;
  box-shadow: 0 0 0 9px rgba(205, 243, 109, 0.07), 0 0 42px rgba(205, 243, 109, 0.2);
}

.protocol-core-label {
  font-size: 7px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.protocol-core-symbol {
  margin-top: -1px;
  font-size: 22px;
  font-weight: 350;
}

.protocol-node {
  position: absolute;
  display: grid;
  width: 41px;
  height: 41px;
  place-items: center;
  color: #c7d5d1;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 7px;
  letter-spacing: 0.02em;
  background: #172835;
  border: 1px solid #5d7884;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(93, 120, 132, 0.1);
}

.node-one {
  top: 91px;
  left: 110px;
}

.node-two {
  top: 258px;
  left: 125px;
}

.node-three {
  top: 161px;
  right: 42px;
}

.protocol-note {
  position: absolute;
  right: 15px;
  bottom: 68px;
  display: flex;
  width: 138px;
  flex-direction: column;
  padding: 12px 13px;
  background: rgba(19, 37, 49, 0.88);
  border: 1px solid #2d4653;
  border-radius: 11px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.17);
}

.protocol-note-kicker {
  color: #7fa0a3;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.protocol-note-title {
  margin-top: 7px;
  color: #ecf5ee;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
}

.protocol-note-status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  color: #9db1b8;
  font-size: 8px;
}

.protocol-note-status .status-pip {
  width: 5px;
  height: 5px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 21px 0 12px;
}

.skip-link {
  position: fixed;
  z-index: 50;
  top: 10px;
  left: 10px;
  padding: 9px 12px;
  color: #14202d;
  font-size: 11px;
  font-weight: 800;
  background: var(--lime);
  border-radius: 7px;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

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

.evidence-lab {
  margin: 12px 0 23px;
}

.lab-heading {
  display: flex;
  min-width: 0;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  padding: 18px 3px 12px;
}

.lab-heading h2 {
  margin: 7px 0 0;
  color: var(--ink);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 430;
  letter-spacing: -0.065em;
}

.lab-heading > p {
  max-width: 360px;
  margin: 0 0 2px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.55;
  text-align: right;
}

.lab-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  gap: 13px;
}

.lab-grid > * {
  min-width: 0;
}

.lab-grid-lower {
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  margin-top: 13px;
}

.proof-panel {
  color: #eaf5ec;
  background: linear-gradient(145deg, #122635, #0e1b27);
  border-color: #28424d;
}

.proof-panel h2,
.safety-panel h2,
.proof-panel .section-kicker {
  color: #eff8ef;
}

.proof-panel .section-kicker {
  color: #96bf58;
}

.runtime-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 31px;
  padding: 8px 10px;
  color: #8ea7a9;
  font-size: 8px;
  background: rgba(5, 14, 22, 0.56);
  border: 1px solid #294651;
  border-radius: 8px;
}

.runtime-status strong {
  color: #c9e87a;
  font-size: 9px;
}

.runtime-dot {
  width: 7px;
  height: 7px;
  background: #78939b;
  border-radius: 50%;
}

.runtime-dot.live {
  background: var(--lime);
  box-shadow: 0 0 0 4px rgba(205, 243, 109, 0.11);
}

.role-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 10px;
  background: rgba(24, 48, 61, 0.72);
  border: 1px solid #2c4a56;
  border-radius: 9px;
}

.role-control label {
  display: block;
  color: #d5e5d5;
  font-size: 9px;
  font-weight: 800;
}

.role-control small {
  display: block;
  margin-top: 3px;
  color: #829da0;
  font-size: 7px;
}

.role-select {
  min-width: 132px;
  padding: 8px 24px 8px 9px;
  color: #1f332e;
  font-size: 9px;
  font-weight: 800;
  background: #eaf7d9;
  border: 1px solid #b8d779;
  border-radius: 7px;
}

.proof-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 11px;
}

.proof-panel .button-ghost {
  color: #b9ccca;
  border-color: #3b5861;
}

.proof-panel .button-ghost:hover {
  color: #f0f8ee;
  border-color: #719187;
  background: #203a47;
}

.judge-prompt {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 13px;
  padding: 9px 10px;
  color: #93aaac;
  background: #0a1822;
  border-left: 2px solid #91ca3c;
  border-radius: 0 7px 7px 0;
}

.prompt-label {
  flex: 0 0 auto;
  color: #789195;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.judge-prompt code {
  color: #c8debc;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 8px;
  line-height: 1.45;
}

.capability-heading,
.trace-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 15px;
  color: #c3d5cf;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.capability-heading span:last-child,
.trace-heading span:last-child {
  color: #6f8b91;
  font-size: 7px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.capability-map {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}

.capability-card {
  min-width: 0;
  padding: 9px;
  background: #172f3c;
  border: 1px solid #284954;
  border-radius: 8px;
}

.capability-card.is-active {
  background: #203d43;
  border-color: #779958;
  box-shadow: inset 0 0 0 1px rgba(205, 243, 109, 0.15);
}

.capability-card-head {
  display: flex;
  align-items: center;
  gap: 6px;
}

.capability-index {
  color: #83a59e;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 7px;
}

.capability-card strong {
  color: #e7f2e7;
  font-size: 9px;
}

.capability-active {
  margin-left: auto;
  color: #a7cc65;
  font-size: 7px;
  font-weight: 800;
  text-transform: uppercase;
}

.capability-card p {
  min-height: 25px;
  margin: 6px 0 7px;
  color: #8ea7a8;
  font-size: 7px;
  line-height: 1.35;
}

.capability-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.capability-chip {
  max-width: 100%;
  padding: 3px 4px;
  overflow: hidden;
  color: #a8c4bd;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 6px;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: #102530;
  border-radius: 3px;
}

.capability-chip.human {
  color: #f1c789;
  background: #3a2e27;
}

.agent-trace {
  display: flex;
  max-height: 205px;
  min-height: 58px;
  flex-direction: column;
  margin-top: 8px;
  overflow-y: auto;
  background: #09151e;
  border: 1px solid #233f49;
  border-radius: 8px;
}

.trace-row {
  display: grid;
  grid-template-columns: 18px 15px minmax(95px, 0.75fr) minmax(100px, 1.25fr);
  align-items: center;
  gap: 6px;
  padding: 7px 8px;
  border-bottom: 1px solid #18303a;
}

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

.trace-row.is-refused {
  background: rgba(255, 117, 109, 0.08);
}

.trace-index,
.trace-detail {
  color: #59747c;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 7px;
}

.trace-status {
  display: grid;
  width: 14px;
  height: 14px;
  place-items: center;
  color: #bbdf71;
  font-size: 9px;
  font-weight: 900;
  background: rgba(145, 202, 60, 0.12);
  border-radius: 50%;
}

.trace-row.is-refused .trace-status {
  color: #ff958b;
  background: rgba(255, 117, 109, 0.15);
}

.trace-main {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.trace-main strong {
  overflow: hidden;
  color: #c6e579;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trace-main small {
  overflow: hidden;
  color: #718e94;
  font-size: 6px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trace-detail {
  overflow: hidden;
  color: #78959a;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trace-empty {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 58px;
  padding: 10px;
  color: #708c90;
  font-size: 8px;
}

.trace-empty span:first-child {
  color: #a5cd62;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.safety-panel {
  background: #fffdf8;
  border-color: #ebe5d8;
}

.panel-badge-warm {
  color: #ad7452;
  background: #fff0e1;
}

.lab-description {
  margin: -5px 0 13px;
  color: #899792;
  font-size: 9px;
  line-height: 1.5;
}

.safety-scenario-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.safety-scenario {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: 8px 7px;
  color: #52655c;
  text-align: left;
  background: #f7f8f2;
  border: 1px solid #e2e8dc;
  border-radius: 7px;
}

.safety-scenario:hover,
.safety-scenario.is-selected {
  background: #eef7e4;
  border-color: #aacd7f;
}

.safety-scenario.is-tested {
  background: #f2f8e8;
}

.safety-index {
  color: #91a08e;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 7px;
}

.safety-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.safety-copy strong {
  overflow: hidden;
  color: #40564b;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.safety-copy small {
  overflow: hidden;
  color: #9aa59c;
  font-size: 6px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.safety-severity {
  padding: 3px 4px;
  color: #ad7653;
  font-size: 6px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #fff0e1;
  border-radius: 3px;
}

.safety-severity.critical {
  color: #b3564e;
  background: #ffebe5;
}

.safety-severity.high {
  color: #ad7653;
}

.safety-run-all {
  width: 100%;
  margin-top: 9px;
}

.safety-result {
  min-height: 190px;
  margin-top: 12px;
  padding: 12px;
  background: #152730;
  border: 1px solid #2b4950;
  border-radius: 9px;
}

.safety-placeholder {
  display: flex;
  min-height: 164px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #90a9a4;
  font-size: 8px;
  line-height: 1.45;
  text-align: center;
}

.safety-placeholder strong {
  color: #d5e7d2;
  font-size: 10px;
}

.safety-placeholder-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: #c7e677;
  font-size: 17px;
  background: #203b3f;
  border: 1px dashed #5e8565;
  border-radius: 50%;
}

.safety-result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.safety-result h3 {
  margin: 5px 0 0;
  color: #edf7eb;
  font-size: 13px;
  font-weight: 720;
  letter-spacing: -0.03em;
}

.blocked-pill,
.sandbox-pill {
  display: inline-flex;
  padding: 3px 5px;
  font-size: 6px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border-radius: 4px;
}

.blocked-pill {
  color: #ffb3a1;
  background: rgba(255, 117, 109, 0.14);
}

.sandbox-pill {
  color: #a9c86d;
  background: rgba(145, 202, 60, 0.12);
}

.refusal-copy {
  margin: 12px 0;
  color: #ffc4ad;
  font-size: 9px;
  font-weight: 720;
  line-height: 1.45;
}

.evidence-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.evidence-label,
.safe-alternative > span {
  color: #759296;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.evidence-line {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  color: #a8c1bd;
  font-size: 8px;
  line-height: 1.35;
}

.evidence-line > span:first-child {
  flex: 0 0 auto;
  color: #a9d260;
  font-weight: 900;
}

.safe-alternative {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #2a454c;
}

.safe-alternative strong {
  color: #d2e4bd;
  font-size: 8px;
  line-height: 1.4;
}

.reasoning-panel,
.impact-panel {
  min-height: 100%;
}

.reasoning-block + .reasoning-block {
  margin-top: 13px;
}

.reasoning-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.reasoning-block-head > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.reasoning-label {
  color: #8a9b96;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.reasoning-block-head strong {
  color: #40574b;
  font-size: 11px;
}

.match-explanation,
.delay-explanation {
  min-height: 104px;
  margin-top: 9px;
  padding: 10px;
  background: #f4f8f1;
  border: 1px solid #e1ebdf;
  border-radius: 8px;
}

.insight-placeholder {
  display: flex;
  min-height: 82px;
  align-items: center;
  color: #9aa7a1;
  font-size: 8px;
  line-height: 1.5;
}

.insight-score-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.insight-score {
  display: flex;
  min-width: 53px;
  height: 53px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #507c3d;
  font-size: 20px;
  font-weight: 450;
  letter-spacing: -0.08em;
  background: #e8f6d4;
  border: 2px solid #abd17a;
  border-radius: 50%;
}

.insight-score small {
  color: #78936a;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0;
}

.insight-score-row > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.insight-score-row strong {
  color: #3e5d47;
  font-size: 10px;
}

.insight-score-row span {
  color: #87968b;
  font-size: 8px;
  line-height: 1.35;
}

.score-breakdown {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  margin-top: 9px;
}

.score-breakdown span {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 6px;
  background: #eaf2e6;
  border-radius: 5px;
}

.score-breakdown small {
  color: #96a49a;
  font-size: 6px;
  text-transform: capitalize;
}

.score-breakdown strong {
  color: #5f843f;
  font-size: 9px;
}

.counterfactual {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid #dfe9dc;
}

.counterfactual > span {
  color: #8b9d91;
  font-size: 7px;
  font-weight: 800;
  text-transform: uppercase;
}

.counterfactual strong {
  color: #58705f;
  font-size: 8px;
  line-height: 1.35;
}

.counterfactual small {
  color: #9ca99f;
  font-size: 7px;
}

.insight-blocked {
  display: flex;
  min-height: 82px;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.insight-blocked strong {
  color: #a45b4f;
  font-size: 9px;
}

.insight-blocked span {
  color: #8f9b92;
  font-size: 8px;
  line-height: 1.45;
}

.reasoning-divider {
  height: 1px;
  margin: 13px 0;
  background: #e8eee8;
}

.delay-control {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.delay-control label {
  color: #82928b;
  font-size: 8px;
  font-weight: 750;
}

.delay-control input {
  flex: 1;
  accent-color: var(--lime-deep);
}

.delay-control output {
  min-width: 38px;
  color: #55745a;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 8px;
  font-weight: 800;
  text-align: right;
}

.delay-summary {
  display: flex;
  align-items: center;
  gap: 8px;
}

.delay-summary > span:not(.delay-arrow):not(.delay-status) {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
}

.delay-summary small {
  color: #95a39a;
  font-size: 6px;
  text-transform: uppercase;
}

.delay-summary strong {
  color: #5a7f46;
  font-size: 17px;
  font-weight: 450;
  letter-spacing: -0.06em;
}

.delay-summary.blocked strong {
  color: #be6955;
}

.delay-arrow {
  color: #a6b3a7;
  font-size: 15px;
}

.delay-status {
  padding: 4px 5px;
  color: #9f6b49;
  font-size: 6px;
  font-weight: 850;
  text-transform: uppercase;
  background: #fff0dd;
  border-radius: 4px;
}

.delay-summary.blocked .delay-status {
  color: #a9534b;
  background: #ffebe5;
}

.delay-explanation p {
  margin: 9px 0 7px;
  color: #7f9085;
  font-size: 8px;
  line-height: 1.45;
}

.impact-panel {
  background: #f8fbf3;
  border-color: #dce9d4;
}

.impact-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.impact-stat {
  min-height: 72px;
  padding: 8px;
  background: #eef5e9;
  border: 1px solid #e0ebdc;
  border-radius: 7px;
}

.impact-stat.accent {
  background: #e5f5cc;
  border-color: #cce6a7;
}

.impact-stat.warn {
  background: #fff1e6;
  border-color: #f2dfcd;
}

.impact-stat span,
.impact-stat small {
  display: block;
}

.impact-stat span {
  overflow: hidden;
  color: #829486;
  font-size: 6px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.impact-stat strong {
  display: block;
  margin: 8px 0 4px;
  color: #4b704c;
  font-size: 16px;
  font-weight: 450;
  letter-spacing: -0.07em;
}

.impact-stat.warn strong {
  color: #b4694e;
}

.impact-stat small {
  color: #9ca99e;
  font-size: 6px;
  line-height: 1.25;
}

.impact-note {
  margin-top: 10px;
  padding: 8px 9px;
  color: #7a907d;
  font-size: 7px;
  line-height: 1.4;
  background: #eaf3e4;
  border-left: 2px solid #9cc866;
  border-radius: 0 6px 6px 0;
}

.benchmark-panel {
  margin-top: 18px;
}

.benchmark-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.benchmark-stat {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.benchmark-stat.accent {
  border-color: rgba(103, 222, 157, 0.3);
  background: rgba(103, 222, 157, 0.06);
}

.benchmark-stat span,
.benchmark-stat small {
  display: block;
  color: var(--muted);
}

.benchmark-stat span {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.benchmark-stat strong {
  display: block;
  margin: 7px 0 4px;
  color: var(--paper);
  font-size: clamp(18px, 2vw, 24px);
  letter-spacing: -0.03em;
}

.benchmark-stat small {
  font-size: 11px;
  line-height: 1.45;
}

.benchmark-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.benchmark-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 12px;
}

.benchmark-table th,
.benchmark-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.benchmark-table thead th {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.benchmark-table tbody tr:last-child th,
.benchmark-table tbody tr:last-child td {
  border-bottom: 0;
}

.benchmark-table tbody th {
  color: var(--muted-strong);
  font-weight: 500;
}

.benchmark-table td {
  color: var(--paper);
}

.benchmark-table .benchmark-best {
  color: var(--green-bright);
  font-weight: 650;
}

.benchmark-method,
.benchmark-source,
.benchmark-placeholder {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.benchmark-method {
  display: flex;
  gap: 9px;
  margin-top: 12px;
  padding: 11px 13px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.benchmark-method-mark {
  flex: 0 0 auto;
  color: var(--green-bright);
  font-size: 16px;
}

.benchmark-source {
  margin-top: 14px;
}

.benchmark-source a {
  color: var(--green-bright);
}

.benchmark-source code {
  color: var(--paper);
}

.benchmark-placeholder {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 17px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
}

.benchmark-placeholder strong {
  color: var(--paper);
}

.benchmark-placeholder.is-error {
  border-color: rgba(255, 133, 119, 0.35);
}

.evidence-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 22px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 18px;
  background: linear-gradient(105deg, rgba(25, 35, 47, 0.9), rgba(13, 20, 28, 0.72));
  overflow: hidden;
}

.evidence-strip > div {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 12px;
  padding: 15px 17px;
  border-right: 1px solid rgba(255, 255, 255, 0.11);
}

.evidence-strip > div:last-child { border-right: 0; }
.evidence-strip span { grid-row: 1 / 3; color: var(--lime); font: 700 0.68rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; padding-top: 3px; }
.evidence-strip strong { color: #f4f7ee; font-size: 0.78rem; letter-spacing: 0.01em; }
.evidence-strip small { color: #9eabb6; font: 500 0.64rem/1.35 ui-monospace, SFMono-Regular, Menlo, monospace; }

@media (max-width: 860px) {
  .evidence-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .evidence-strip > div:nth-child(2) { border-right: 0; }
  .evidence-strip > div:nth-child(-n + 2) { border-bottom: 1px solid rgba(255, 255, 255, 0.11); }
}

@media (max-width: 520px) {
  .evidence-strip { grid-template-columns: 1fr; }
  .evidence-strip > div { border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.11); }
  .evidence-strip > div:nth-child(2) { border-right: 0; }
  .evidence-strip > div:last-child { border-bottom: 0; }

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

.metric-card {
  min-height: 132px;
  padding: 17px 18px 14px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-small);
}

.metric-card.metric-primary {
  color: #f6fbf4;
  background: var(--navy-2);
  border-color: var(--navy-2);
}

.metric-card.metric-primary .metric-label,
.metric-card.metric-primary .metric-foot {
  color: #9bb1b4;
}

.metric-card.metric-alert {
  background: #fff9f3;
  border-color: #f1e0d1;
}

.metric-topline,
.metric-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.metric-label {
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.metric-trend {
  font-size: 9px;
  font-weight: 750;
}

.positive {
  color: var(--lime-deep);
}

.metric-icon {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  font-size: 15px;
  line-height: 1;
  border-radius: 7px;
}

.icon-leaf {
  color: #5f8f30;
  background: #e3f1d5;
}

.icon-cloud {
  color: #628a91;
  background: #e6f0f1;
}

.icon-alert {
  color: #d8794b;
  font-size: 11px;
  font-weight: 900;
  background: #ffe5d0;
}

.metric-value {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 16px 0 13px;
  color: inherit;
  font-size: 35px;
  font-weight: 400;
  letter-spacing: -0.08em;
  line-height: 0.8;
}

.metric-value small {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0;
}

.metric-primary .metric-value {
  color: var(--lime);
}

.metric-alert .metric-value {
  color: #cf6a4e;
}

.metric-foot {
  color: var(--ink-muted);
  font-size: 9px;
}

.metric-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--lime-deep);
  font-weight: 700;
}

.metric-primary .metric-status {
  color: var(--lime);
}

.mini-dot {
  width: 5px;
  height: 5px;
  box-shadow: none;
}

.sparkline {
  display: inline-flex;
  height: 17px;
  align-items: end;
  gap: 2px;
}

.sparkline i {
  display: block;
  width: 3px;
  background: #99c65b;
  border-radius: 3px;
}

.sparkline i:nth-child(1) { height: 6px; opacity: 0.45; }
.sparkline i:nth-child(2) { height: 9px; opacity: 0.55; }
.sparkline i:nth-child(3) { height: 7px; opacity: 0.6; }
.sparkline i:nth-child(4) { height: 12px; opacity: 0.75; }
.sparkline i:nth-child(5) { height: 10px; opacity: 0.82; }
.sparkline i:nth-child(6) { height: 14px; opacity: 0.9; }
.sparkline i:nth-child(7) { height: 12px; opacity: 0.95; }
.sparkline i:nth-child(8) { height: 17px; }

.attention-pulse {
  width: 8px;
  height: 8px;
  background: var(--coral);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(255, 117, 109, 0.1);
}

.workflow-section {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 20px 21px 24px;
}

.workflow-heading {
  display: flex;
  min-width: 140px;
  flex-direction: column;
  gap: 6px;
}

.workflow-hint {
  color: var(--ink-muted);
  font-size: 10px;
  line-height: 1.35;
}

.workflow-steps {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.workflow-step {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 120px;
  color: #8a9699;
}

.step-number {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: #8d9aa0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  border: 1px solid #cbd6d0;
  border-radius: 50%;
}

.step-name {
  display: block;
  color: #495862;
  font-size: 11px;
  font-weight: 780;
}

.step-detail {
  display: block;
  margin-left: -1px;
  color: #9da8aa;
  font-size: 8px;
}

.workflow-step.is-active .step-number,
.workflow-step.is-complete .step-number {
  color: var(--navy);
  background: var(--lime);
  border-color: var(--lime);
  box-shadow: 0 0 0 4px rgba(145, 202, 60, 0.11);
}

.workflow-step.is-active .step-name,
.workflow-step.is-complete .step-name {
  color: var(--ink);
}

.workflow-step.is-complete .step-number::after {
  content: "✓";
  font-size: 12px;
  font-weight: 900;
}

.workflow-step.is-complete .step-number {
  font-size: 0;
}

.workflow-connector {
  display: flex;
  flex: 1;
  min-width: 22px;
  align-items: center;
  padding: 0 8px;
}

.workflow-connector span {
  display: block;
  width: 100%;
  height: 1px;
  background: #d7e0db;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.96fr) minmax(390px, 1.42fr) minmax(280px, 0.88fr);
  align-items: start;
  gap: 13px;
}

.left-column,
.center-column,
.right-column {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 13px;
}

.panel {
  min-width: 0;
  padding: 20px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-small);
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.panel-heading-tight {
  align-items: center;
  margin-bottom: 15px;
}

.panel h2,
.agent-panel h2,
.approval-panel h2 {
  margin: 6px 0 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 720;
  letter-spacing: -0.045em;
  line-height: 1.1;
}

.panel-badge,
.queue-count,
.activity-live,
.connected-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.panel-badge {
  padding: 6px 8px;
  color: #6f8d35;
  background: #edf7dd;
}

.queue-count {
  color: var(--ink-muted);
  letter-spacing: 0;
  text-transform: none;
}

.intake-panel {
  padding-bottom: 14px;
}

.intake-panel h2 {
  max-width: 240px;
}

.intake-textarea {
  display: block;
  width: 100%;
  min-height: 92px;
  resize: vertical;
  padding: 12px 13px;
  color: #3c4b55;
  font-size: 12px;
  line-height: 1.55;
  background: #f5f8f5;
  border: 1px solid #d9e4dc;
  border-radius: 10px;
}

.intake-textarea::placeholder {
  color: #9eaba8;
}

.intake-textarea:focus {
  background: white;
  border-color: var(--lime-deep);
  outline: none;
  box-shadow: 0 0 0 4px rgba(145, 202, 60, 0.12);
}

.intake-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
}

.intent-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.intent-tag {
  padding: 5px 7px;
  color: #7c8a87;
  font-size: 8px;
  font-weight: 750;
  background: #eff4ef;
  border-radius: 5px;
}

.quick-prompts {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
  padding-top: 13px;
  border-top: 1px solid #e9eeea;
}

.quick-label {
  color: #9aa6a4;
  font-size: 8px;
  font-weight: 750;
}

.quick-prompt {
  padding: 4px 7px;
  color: #58745f;
  font-size: 8px;
  background: transparent;
  border: 1px solid #d7e5d6;
  border-radius: 999px;
}

.quick-prompt:hover {
  color: #284f2a;
  background: #eff8e9;
  border-color: #afd387;
}

.text-button {
  padding: 0;
  color: #7b8a8c;
  font-size: 9px;
  font-weight: 750;
  background: transparent;
  border: 0;
}

.text-button:hover {
  color: #36555d;
}

.text-button span {
  margin-left: 3px;
  color: var(--lime-deep);
  font-size: 12px;
}

.supply-list,
.recipient-list,
.allocation-list,
.activity-list,
.route-stops {
  display: flex;
  flex-direction: column;
}

.supply-item,
.recipient-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-top: 1px solid #edf1ee;
}

.supply-item:first-child,
.recipient-item:first-child {
  padding-top: 2px;
  border-top: 0;
}

.supply-item.is-selected,
.recipient-item.is-selected {
  position: relative;
}

.supply-item.is-selected::before,
.recipient-item.is-selected::before {
  position: absolute;
  left: -12px;
  width: 3px;
  height: 29px;
  background: var(--lime-deep);
  border-radius: 0 3px 3px 0;
  content: "";
}

.item-icon {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  font-size: 13px;
  background: #eef6e6;
  border-radius: 9px;
}

.item-icon.icon-orange {
  background: #fff0df;
}

.item-icon.icon-blue {
  background: #e8f1fc;
}

.item-icon.icon-purple {
  background: #eeeaff;
}

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

.item-title-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.item-title {
  overflow: hidden;
  color: #2d3d46;
  font-size: 11px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-subtitle {
  overflow: hidden;
  margin-top: 3px;
  color: #8d9a9b;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-side {
  display: flex;
  min-width: 42px;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.item-quantity {
  color: #344d3f;
  font-size: 12px;
  font-weight: 820;
  letter-spacing: -0.03em;
}

.item-quantity small {
  margin-left: 2px;
  color: #9aa79f;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.item-time {
  color: #a17a55;
  font-size: 8px;
  font-weight: 740;
}

.item-time.critical {
  color: #dd6f57;
}

.priority-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 5px;
  font-size: 7px;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border-radius: 4px;
}

.priority-urgent,
.priority-critical {
  color: #bb5c4a;
  background: #ffebe2;
}

.priority-high {
  color: #9c6b36;
  background: #fff3dc;
}

.priority-normal,
.priority-medium {
  color: #668172;
  background: #eaf4ea;
}

.mini-select {
  padding: 6px 20px 6px 8px;
  color: #697978;
  font-size: 8px;
  font-weight: 700;
  background: #f1f5f1;
  border: 1px solid #dfe8e0;
  border-radius: 7px;
}

.recipient-item {
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 8px;
  padding: 10px 0;
}

.recipient-avatar {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: #58746d;
  font-size: 9px;
  font-weight: 800;
  background: #dfeee5;
  border-radius: 7px;
}

.recipient-avatar.orange {
  color: #956641;
  background: #fce8d4;
}

.recipient-avatar.blue {
  color: #4d719a;
  background: #e1ecf8;
}

.recipient-avatar.violet {
  color: #76639f;
  background: #ece6fb;
}

.recipient-progress {
  display: flex;
  width: 51px;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

.progress-track {
  width: 51px;
  height: 4px;
  overflow: hidden;
  background: #edf1ed;
  border-radius: 99px;
}

.progress-bar {
  height: 100%;
  background: var(--lime-deep);
  border-radius: inherit;
}

.progress-text {
  color: #94a09f;
  font-size: 7px;
  white-space: nowrap;
}

.route-panel {
  padding-bottom: 14px;
}

.route-heading {
  align-items: center;
}

.route-heading-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
}

.map-legend,
.map-time {
  color: #8c9a9b;
  font-size: 8px;
  white-space: nowrap;
}

.map-legend {
  display: flex;
  align-items: center;
  gap: 5px;
}

.legend-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 4px;
  border-radius: 50%;
}

.legend-supply {
  background: var(--lime-deep);
}

.legend-need {
  background: var(--coral);
}

.map-time {
  color: #526663;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 750;
}

.map-canvas {
  position: relative;
  min-height: 362px;
  overflow: hidden;
  background: #eaf2eb;
  border: 1px solid #d9e4dc;
  border-radius: 13px;
}

.map-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.map-background path {
  fill: none;
  stroke: #c3d5c9;
  stroke-width: 1.6;
  vector-effect: non-scaling-stroke;
}

.map-background .road-faint {
  stroke: #d4e0d6;
  stroke-dasharray: 1 3;
}

.map-background circle {
  fill: #b7cdbd;
}

.map-grid-lines {
  position: absolute;
  inset: 0;
  opacity: 0.26;
  background-image: linear-gradient(rgba(121, 155, 133, 0.12) 1px, transparent 1px), linear-gradient(90deg, rgba(121, 155, 133, 0.12) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, transparent, black 16%, black 84%, transparent);
}

.map-label {
  position: absolute;
  color: #9aae9f;
  font-size: 7px;
  font-weight: 850;
  letter-spacing: 0.16em;
  opacity: 0.82;
}

.label-north { top: 10%; left: 7%; }
.label-river { top: 31%; right: 10%; }
.label-east { right: 7%; bottom: 13%; }
.label-downtown { left: 8%; bottom: 29%; }

.map-compass {
  position: absolute;
  top: 14px;
  right: 15px;
  display: flex;
  width: 23px;
  height: 32px;
  flex-direction: column;
  align-items: center;
  color: #78917e;
  font-family: Georgia, serif;
  font-size: 10px;
  font-weight: 700;
}

.map-compass i {
  display: block;
  width: 1px;
  height: 19px;
  margin-top: 1px;
  background: #89a88e;
}

.map-compass i::before {
  display: block;
  width: 0;
  height: 0;
  margin-left: -4px;
  border-right: 4px solid transparent;
  border-bottom: 8px solid #89a88e;
  border-left: 4px solid transparent;
  content: "";
}

.map-scale {
  position: absolute;
  bottom: 14px;
  left: 15px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: #91a39a;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 7px;
}

.map-scale span {
  display: block;
  width: 25px;
  height: 4px;
  border-right: 1px solid #8da496;
  border-bottom: 1px solid #8da496;
  border-left: 1px solid #8da496;
}

.map-empty {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  width: 170px;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  color: #688073;
  text-align: center;
  transform: translate(-50%, -50%);
}

.map-empty[hidden] {
  display: none;
}

.empty-icon {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  color: #7fa28a;
  font-size: 23px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px dashed #a8c0ab;
  border-radius: 50%;
}

.map-empty strong {
  color: #5a7467;
  font-size: 11px;
}

.map-empty small {
  color: #9aac9f;
  font-size: 8px;
  line-height: 1.45;
}

.map-marker {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 5px;
  transform: translate(-50%, -50%);
  animation: marker-in 350ms ease both;
}

.map-marker-dot {
  display: block;
  width: 12px;
  height: 12px;
  border: 3px solid rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  box-shadow: 0 2px 7px rgba(44, 72, 52, 0.26);
}

.map-marker.supply .map-marker-dot {
  background: var(--lime-deep);
}

.map-marker.need .map-marker-dot {
  background: var(--coral);
}

.map-marker-label {
  max-width: 116px;
  padding: 4px 6px;
  overflow: hidden;
  color: #3f5b4b;
  font-size: 7px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(204, 220, 207, 0.9);
  border-radius: 5px;
  box-shadow: 0 4px 10px rgba(67, 95, 71, 0.09);
}

.map-marker.need .map-marker-label {
  color: #8c5c54;
  border-color: #f2c9be;
}

.route-line {
  position: absolute;
  height: 2px;
  transform-origin: left center;
  background: repeating-linear-gradient(90deg, #85a687 0 5px, transparent 5px 9px);
  opacity: 0.82;
  animation: line-in 500ms ease both;
}

@keyframes marker-in {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.78); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes line-in {
  from { opacity: 0; transform: scaleX(0); }
  to { opacity: 0.82; transform: scaleX(1); }
}

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

.route-stat {
  padding: 10px 11px;
  background: #f4f8f4;
  border-radius: 9px;
}

.route-stat-label {
  color: #92a09d;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.route-stat-value {
  margin-top: 5px;
  color: #3d594b;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.route-status {
  display: inline-flex;
  margin-top: 4px;
  padding: 3px 5px;
  color: #668a3e;
  font-size: 7px;
  font-weight: 850;
  background: #e7f4d6;
  border-radius: 4px;
}

.route-status.awaiting_approval {
  color: #aa7146;
  background: #fff0dc;
}

.route-status.dispatched {
  color: #3f7376;
  background: #dcf1ef;
}

.route-status.completed {
  color: #5d7a65;
  background: #e6f3e7;
}

.route-stop {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 9px;
  padding: 11px 0 0;
}

.route-stop-marker {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: #69816f;
  font-size: 9px;
  font-weight: 850;
  background: #e6f1e5;
  border: 1px solid #ccdfcc;
  border-radius: 7px;
}

.route-stop.delivery .route-stop-marker {
  color: #a86a5b;
  background: #fff0ea;
  border-color: #f2d1c9;
}

.route-stop-name {
  overflow: hidden;
  color: #4b5f61;
  font-size: 10px;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-stop-detail {
  margin-top: 3px;
  overflow: hidden;
  color: #9aa6a4;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-stop-time {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  color: #899b92;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 8px;
  font-weight: 750;
}

.route-slack {
  color: #6f8c72;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 7px;
  white-space: nowrap;
}

.route-slack.tight {
  color: #b46b3d;
}

.route-stop-link {
  width: 100%;
  height: 1px;
  margin-top: 9px;
  background: #e6eeea;
}

.route-stop-link:last-child {
  display: none;
}

.allocation-empty,
.console-empty,
.activity-empty {
  display: flex;
  min-height: 76px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #9ba8a3;
  text-align: center;
  font-size: 9px;
  line-height: 1.45;
}

.allocation-empty::before {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  color: #829984;
  font-size: 14px;
  background: #edf4ed;
  border: 1px dashed #c6d8c8;
  border-radius: 50%;
  content: "↔";
}

.allocation-card {
  padding: 12px 0;
  border-top: 1px solid #edf1ee;
}

.allocation-card:first-child {
  padding-top: 1px;
  border-top: 0;
}

.allocation-top,
.allocation-route,
.allocation-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.allocation-route {
  justify-content: flex-start;
  margin: 8px 0;
  color: #485e5b;
  font-size: 9px;
  font-weight: 750;
}

.allocation-route strong {
  color: #31473e;
}

.allocation-arrow {
  color: #93ac76;
  font-size: 12px;
}

.allocation-score {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #5c8435;
  font-size: 9px;
  font-weight: 850;
}

.score-ring {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: #5d823d;
  font-size: 8px;
  background: #eef7e6;
  border: 2px solid #b5d98a;
  border-radius: 50%;
}

.allocation-foot {
  align-items: flex-end;
}

.allocation-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.reason-chip {
  padding: 4px 5px;
  color: #82908a;
  font-size: 7px;
  background: #f1f5f1;
  border-radius: 4px;
}

.allocation-status {
  color: #a47450;
  font-size: 7px;
  font-weight: 800;
  white-space: nowrap;
}

.agent-panel {
  color: #eaf5ec;
  background: var(--navy-2);
  border-color: #243947;
}

.agent-panel h2 {
  color: #edf7ee;
}

.agent-panel .section-kicker {
  color: #90ba50;
}

.agent-panel-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.agent-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--navy);
  font-size: 17px;
  background: var(--lime);
  border-radius: 11px;
}

.connected-pill {
  margin-left: auto;
  padding: 6px 8px;
  color: #9fc660;
  background: rgba(145, 202, 60, 0.1);
}

.agent-description {
  margin: 16px 0 14px;
  color: #97aeb2;
  font-size: 10px;
  line-height: 1.5;
}

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

.tool-chip {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  padding: 8px 7px;
  color: #b5c5c5;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 7px;
  background: #172c3a;
  border: 1px solid #294250;
  border-radius: 6px;
}

.tool-chip::before {
  flex: 0 0 auto;
  width: 4px;
  height: 4px;
  background: #6e9f65;
  border-radius: 50%;
  content: "";
}

.tool-chip.readonly::before {
  background: #7daed0;
}

.tool-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-console {
  margin: 14px 0;
  overflow: hidden;
  background: #09141e;
  border: 1px solid #223b48;
  border-radius: 9px;
}

.console-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  color: #7c969c;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 7px;
  border-bottom: 1px solid #1a303d;
}

.console-header > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.console-dot {
  width: 5px;
  height: 5px;
  background: #7eae54;
  box-shadow: none;
}

.console-list {
  display: flex;
  max-height: 210px;
  min-height: 112px;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
}

.console-entry {
  padding: 9px 10px;
  border-bottom: 1px solid #142631;
}

.console-entry:last-child {
  border-bottom: 0;
}

.console-entry-head,
.console-entry-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.console-tool {
  overflow: hidden;
  color: #c7e977;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 8px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.console-kind {
  color: #5d7a82;
  font-size: 7px;
  text-transform: uppercase;
}

.console-output {
  margin-top: 5px;
  overflow: hidden;
  color: #8ea7a7;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 7px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.console-time {
  color: #4f6872;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 7px;
}

.agent-panel .button-outline {
  color: #b3c5c7;
  border-color: #34505b;
}

.agent-panel .button-outline:hover {
  color: #ecf5ee;
  background: #1b3543;
  border-color: #5b7a7f;
}

.approval-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  background: #f3f8e9;
  border-color: #dcebc3;
}

.approval-icon {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  place-items: center;
  color: #668f39;
  font-size: 15px;
  font-weight: 900;
  background: #e0f1bc;
  border-radius: 10px;
}

.approval-copy {
  flex: 1 1 180px;
}

.approval-panel h2 {
  color: #3d552e;
  font-size: 14px;
}

.approval-panel .section-kicker {
  color: #739e3f;
}

.approval-panel p:last-child {
  margin: 8px 0 0;
  color: #7b8c74;
  font-size: 9px;
  line-height: 1.55;
}

.approval-actions {
  display: flex;
  width: 100%;
  gap: 7px;
}

.approval-actions .button {
  flex: 1;
}

.approval-actions:empty {
  display: none;
}

.activity-live {
  color: #70936a;
  letter-spacing: 0;
  text-transform: none;
}

.activity-live .live-dot {
  width: 5px;
  height: 5px;
  box-shadow: none;
}

.activity-item {
  position: relative;
  display: grid;
  grid-template-columns: 17px minmax(0, 1fr) auto;
  gap: 8px;
  padding: 10px 0 10px 2px;
  border-top: 1px solid #edf1ee;
}

.activity-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.activity-marker {
  position: relative;
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  color: #6f8f68;
  font-size: 8px;
  font-weight: 900;
  background: #e7f2e4;
  border-radius: 6px;
}

.activity-marker.tool {
  color: #5d7fa0;
  background: #e7f0f9;
}

.activity-marker.alert {
  color: #b36f49;
  background: #fff0e2;
}

.activity-label {
  overflow: hidden;
  color: #586a6c;
  font-size: 9px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-detail {
  overflow: hidden;
  margin-top: 3px;
  color: #98a5a2;
  font-size: 8px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-time {
  color: #9ba8a5;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 7px;
  white-space: nowrap;
}

.trust-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 15px;
  color: #597065;
  background: #e7f2e6;
  border: 1px solid #d5e6d6;
  border-radius: var(--radius-md);
}

.trust-card-icon {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  color: #698c57;
  font-size: 19px;
  background: #d7ebd5;
  border-radius: 9px;
}

.trust-card div:not(.trust-card-icon) {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.trust-card strong {
  color: #44634e;
  font-size: 10px;
}

.trust-card span:not(.trust-arrow) {
  color: #81988a;
  font-size: 8px;
  line-height: 1.4;
}

.trust-arrow {
  margin-left: auto;
  color: #81a96a;
  font-size: 15px;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 4.2vw 30px;
  color: #7d8d8e;
  font-size: 9px;
  background: var(--paper);
  border-top: 1px solid #dfe8e0;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #5c706d;
  font-weight: 750;
}

.footer-brand span:not(.footer-mark) {
  color: #a7b2ad;
}

.footer-mark {
  color: var(--lime-deep);
  font-size: 15px;
}

.footer-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-separator {
  width: 3px;
  height: 3px;
  background: #bdc9c2;
  border-radius: 50%;
}

.footer a {
  color: #678571;
  text-decoration: none;
}

.footer a:hover {
  color: #395e43;
  text-decoration: underline;
}

.modal-backdrop {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(5, 13, 20, 0.65);
  backdrop-filter: blur(8px);
}

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

.guide-modal {
  position: relative;
  width: min(480px, 100%);
  padding: 30px;
  color: #e8f2e9;
  background: #122331;
  border: 1px solid #2d4750;
  border-radius: 19px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
}

.guide-modal h2 {
  margin: 9px 0 12px;
  color: #f3f8f2;
  font-size: 27px;
  font-weight: 450;
  letter-spacing: -0.06em;
}

.guide-modal > p:not(.section-kicker) {
  margin-bottom: 22px;
  color: #9eb3b5;
  font-size: 11px;
  line-height: 1.65;
}

.guide-modal code {
  color: #ccec7d;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
}

.modal-close {
  position: absolute;
  top: 13px;
  right: 15px;
  width: 27px;
  height: 27px;
  color: #8ea4aa;
  font-size: 21px;
  line-height: 1;
  background: transparent;
  border: 0;
}

.modal-close:hover {
  color: var(--lime);
}

.guide-grid {
  display: grid;
  gap: 8px;
  margin-bottom: 23px;
}

.guide-grid > div {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  column-gap: 9px;
  padding: 10px;
  background: #172d3b;
  border: 1px solid #284350;
  border-radius: 9px;
}

.guide-grid span {
  grid-row: span 2;
  color: #9bc65a;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  font-weight: 800;
}

.guide-grid strong {
  color: #e0ece2;
  font-size: 10px;
}

.guide-grid small {
  margin-top: 3px;
  color: #8ea5a6;
  font-size: 8px;
  line-height: 1.45;
}

.toast-region {
  position: fixed;
  z-index: 30;
  right: 22px;
  bottom: 22px;
  display: flex;
  width: min(340px, calc(100vw - 44px));
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px 13px;
  color: #e9f4e9;
  background: #122532;
  border: 1px solid #36515a;
  border-radius: 10px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.22);
  animation: toast-in 240ms ease both;
}

.toast::before {
  display: block;
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  margin-top: 4px;
  background: var(--lime);
  border-radius: 50%;
  content: "";
}

.toast.error::before {
  background: var(--coral);
}

.toast-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.toast strong {
  font-size: 10px;
}

.toast span {
  color: #94abb0;
  font-size: 8px;
  line-height: 1.4;
}

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

@media (max-width: 1320px) {
  .topbar,
  main,
  .footer {
    padding-right: 3vw;
    padding-left: 3vw;
  }

  .hero-section {
    padding-right: 4%;
    padding-left: 4%;
  }

  .hero-protocol {
    right: 1%;
  }

  .dashboard-grid {
    grid-template-columns: minmax(230px, 0.9fr) minmax(360px, 1.35fr) minmax(270px, 0.85fr);
  }
}

@media (max-width: 1080px) {
  .hero-section {
    min-height: 390px;
  }

  .hero-protocol {
    right: -4%;
    opacity: 0.78;
    transform: scale(0.88);
    transform-origin: right center;
  }

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

  .lab-grid,
  .lab-grid-lower {
    grid-template-columns: 1fr;
  }

  .left-column {
    grid-column: 1;
  }

  .center-column {
    grid-column: 2;
  }

  .right-column {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(240px, 0.75fr);
    align-items: start;
  }

  .right-column .activity-panel {
    grid-column: 1;
  }

  .right-column .trust-card {
    grid-column: 2;
    grid-row: 2;
  }
}

@media (max-width: 760px) {
  .topbar {
    min-height: 68px;
  }

  .topbar-center {
    display: none;
  }

  .hero-section {
    min-height: 476px;
    padding: 52px 7% 35px;
  }

  .hero-protocol {
    top: 267px;
    right: 0;
    width: 335px;
    min-width: 335px;
    height: 220px;
    opacity: 0.8;
    transform: scale(0.72);
    transform-origin: top right;
  }

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

  .lab-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .lab-heading > p {
    max-width: 500px;
    text-align: left;
  }

  .capability-map {
    grid-template-columns: 1fr;
  }

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

  .workflow-section {
    display: block;
    padding: 18px 0 20px;
  }

  .workflow-heading {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 15px;
  }

  .workflow-steps {
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .workflow-step {
    min-width: 110px;
  }

  .workflow-connector {
    min-width: 18px;
  }

  .dashboard-grid {
    display: flex;
    flex-direction: column;
  }

  .left-column,
  .center-column,
  .right-column {
    width: 100%;
  }

  .right-column {
    display: flex;
  }

  .panel {
    padding: 17px;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-meta {
    flex-wrap: wrap;
  }
}

@media (max-width: 460px) {
  main {
    padding-right: 14px;
    padding-left: 14px;
  }

  .topbar {
    padding-right: 14px;
    padding-left: 14px;
  }

  .hero-section {
    margin: 0 -14px;
    padding-right: 24px;
    padding-left: 24px;
  }

  h1 {
    font-size: 46px;
  }

  .hero-description {
    max-width: 310px;
    font-size: 12px;
  }

  .metrics-grid,
  .evidence-lab,
  .lab-grid,
  .lab-grid-lower {
    width: 100%;
    max-width: 100%;
  }

  .hero-protocol {
    right: -37px;
  }

  .metric-card {
    min-height: 119px;
    padding: 14px;
  }

  .metric-value {
    font-size: 29px;
  }

  .metric-foot {
    font-size: 8px;
  }

  .role-control {
    align-items: stretch;
    flex-direction: column;
  }

  .role-select {
    width: 100%;
  }

  .proof-actions {
    flex-direction: column;
  }

  .proof-actions .button {
    width: 100%;
  }

  .safety-scenario-list {
    grid-template-columns: 1fr;
  }

  .impact-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .benchmark-overview {
    grid-template-columns: 1fr;
  }

  .trace-row {
    grid-template-columns: 18px 15px minmax(100px, 1fr);
  }

  .trace-detail {
    display: none;
  }

  .intake-footer {
    align-items: flex-end;
    flex-direction: column;
  }

  .intake-footer .button {
    width: 100%;
  }

  .route-summary {
    grid-template-columns: 1fr;
  }

  .route-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .route-stat-value {
    margin-top: 0;
  }

  .route-status {
    margin: 0 0 0 auto;
  }

  .map-canvas {
    min-height: 315px;
  }

  .map-marker-label {
    max-width: 82px;
  }

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

  .approval-actions {
    flex-direction: column;
  }
}

/* Keep narrow embeds usable even when the browser reports a slightly wider
   layout viewport than its physical capture width. */
@media (max-width: 520px) {
  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .hero-description {
    max-width: min(300px, 100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
