:root {
  color-scheme: dark;
  --bg: #07100f;
  --bg-2: #0b1815;
  --panel: rgba(10, 24, 21, 0.72);
  --panel-strong: rgba(13, 32, 28, 0.92);
  --text: #f0f5f4;
  --muted: #91a7a0;
  --line: rgba(190, 255, 224, 0.16);
  --line-strong: rgba(190, 255, 224, 0.32);
  --mint: #a8f0c6;
  --mint-2: #6fe3ad;
  --amber: #d6c08a;
  --danger: #ffb4a2;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 78% 2%, rgba(55, 143, 111, 0.17), transparent 30rem),
    linear-gradient(180deg, #08110f 0%, var(--bg) 34%, #040807 100%);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(168, 240, 198, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168, 240, 198, 0.03) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, black, transparent 78%);
}

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

button {
  font: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 4px;
}

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

.page {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  min-height: 98px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  width: max-content;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--mint);
  color: var(--mint);
  font-family: Georgia, serif;
  font-size: 1.25rem;
}

.brand strong,
.brand small,
.status-line,
.toplink,
.section-kicker,
.node-index,
.radar small,
.radar-stats dt,
.radar-stats dd,
.agent-chip small,
.stage-step,
.topology-label {
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.brand strong {
  display: block;
  font-size: 0.95rem;
}

.brand small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.62rem;
}

.status-line {
  justify-self: center;
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.7rem;
}

.status-line span {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 10px;
  border-radius: 999px;
  background: var(--mint);
  box-shadow: 0 0 18px var(--mint);
}

.toplink {
  border-bottom: 1px solid var(--line-strong);
  color: var(--text);
  font-size: 0.72rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 16px;
}

.locale-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
}

.locale-switch button {
  min-width: 42px;
  min-height: 36px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.locale-switch button:hover {
  color: var(--text);
}

.locale-switch button[aria-pressed="true"] {
  background: var(--mint);
  color: var(--bg);
}

html[lang="zh-CN"] .brand strong,
html[lang="zh-CN"] .brand small,
html[lang="zh-CN"] .status-line,
html[lang="zh-CN"] .toplink,
html[lang="zh-CN"] .section-kicker,
html[lang="zh-CN"] .stage-step,
html[lang="zh-CN"] .topology-label {
  letter-spacing: 0.08em;
}

.jump-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px 0 0;
}

.jump-nav a {
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  min-height: 44px;
  padding: 13px 14px;
  text-transform: uppercase;
}

.jump-nav a:hover {
  border-color: var(--mint);
  color: var(--mint);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 72px;
  min-height: 680px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.section-kicker {
  margin: 0 0 24px;
  color: var(--mint);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
}

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

h1 {
  max-width: 780px;
  margin-bottom: 28px;
  font-size: clamp(3.9rem, 8vw, 6.9rem);
  font-weight: 500;
  letter-spacing: -0.075em;
  line-height: 0.92;
}

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

h2 {
  margin-bottom: 18px;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1;
}

h3 {
  margin-bottom: 12px;
  font-size: 1.2rem;
  font-weight: 500;
}

.lede {
  max-width: 740px;
  color: #bdcbc7;
  font-size: 1.02rem;
  line-height: 1.9;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  margin-top: 42px;
}

.primary-action {
  display: inline-flex;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  background: var(--mint);
  color: #06100d;
  font-weight: 700;
  padding: 0 24px;
}

.hero-actions span {
  color: var(--muted);
  font-size: 0.92rem;
}

.radar-card {
  position: relative;
  min-height: 520px;
  padding-left: 64px;
  border-left: 1px solid var(--line);
}

.radar {
  position: relative;
  display: grid;
  width: min(360px, 100%);
  aspect-ratio: 1;
  margin: 0 auto 34px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(168, 240, 198, 0.18);
  border-radius: 999px;
  background:
    radial-gradient(circle, transparent 0 24%, rgba(168, 240, 198, 0.09) 24.4% 24.9%, transparent 25.2% 42%, rgba(168, 240, 198, 0.09) 42.4% 42.9%, transparent 43.2% 60%, rgba(168, 240, 198, 0.09) 60.4% 60.9%, transparent 61.2%),
    linear-gradient(90deg, transparent 49.7%, rgba(168, 240, 198, 0.13) 50%, transparent 50.3%),
    linear-gradient(0deg, transparent 49.7%, rgba(168, 240, 198, 0.13) 50%, transparent 50.3%);
}

.sweep {
  position: absolute;
  width: 44%;
  height: 120%;
  transform: rotate(36deg) translateY(-24%);
  transform-origin: 50% 70%;
  background: linear-gradient(180deg, rgba(168, 240, 198, 0.2), transparent);
  opacity: 0.65;
}

.dot {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--mint);
  box-shadow: 0 0 18px var(--mint);
}

.dot-a {
  top: 34%;
  right: 26%;
}

.dot-b {
  bottom: 23%;
  right: 35%;
}

.dot-c {
  left: 25%;
  top: 44%;
}

.radar strong {
  position: relative;
  font-size: 3rem;
  font-weight: 400;
  letter-spacing: -0.06em;
}

.radar small {
  position: absolute;
  top: calc(50% + 42px);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.58rem;
}

.radar-stats {
  margin: 0;
}

.radar-stats div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.radar-stats dt,
.radar-stats dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.72rem;
}

.radar-stats dt {
  color: var(--muted);
}

.radar-stats dt::before {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 14px;
  border-radius: 999px;
  background: var(--mint);
  content: "";
}

.radar-stats dd {
  color: var(--text);
  font-weight: 700;
}

.section {
  padding: 92px 0;
  border-bottom: 1px solid var(--line);
}

.scenario-strip {
  display: grid;
  grid-template-columns: minmax(220px, 0.35fr) minmax(0, 1fr);
  gap: 18px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(14, 33, 29, 0.74), rgba(7, 18, 15, 0.7));
  padding: 22px;
}

.scenario-strip h3 {
  margin-bottom: 0;
}

.scenario-switcher {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.scenario-card {
  min-height: 132px;
  border: 1px solid var(--line);
  background: rgba(4, 10, 9, 0.28);
  color: var(--muted);
  cursor: pointer;
  padding: 16px;
  text-align: left;
}

.scenario-card strong,
.scenario-card span {
  display: block;
}

.scenario-card strong {
  color: var(--text);
  font-size: 0.95rem;
}

.scenario-card span {
  margin-top: 12px;
  line-height: 1.55;
}

.scenario-card.active {
  border-color: var(--mint);
  background: linear-gradient(180deg, rgba(35, 72, 61, 0.72), rgba(12, 31, 26, 0.88));
  box-shadow: inset 0 0 28px rgba(168, 240, 198, 0.08);
}

.mission-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.65fr);
  gap: 22px;
}

.topology-stage {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 52% 48%, rgba(168, 240, 198, 0.12), transparent 24rem),
    linear-gradient(180deg, rgba(14, 33, 29, 0.88), rgba(5, 12, 10, 0.9));
}

.topology-stage::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(168, 240, 198, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168, 240, 198, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at center, black, transparent 76%);
}

#topology-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.topology-figure {
  position: absolute;
  inset: 0;
  margin: 0;
}

.topology-fallback {
  position: absolute;
  inset: 24px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 24px;
  text-align: center;
}

.topology-fallback[hidden] {
  display: none;
}

.stage-overlay {
  position: absolute;
  right: 24px;
  bottom: 24px;
  width: min(390px, calc(100% - 48px));
  border: 1px solid var(--line-strong);
  background: rgba(5, 14, 12, 0.82);
  backdrop-filter: blur(10px);
  padding: 22px;
}

.stage-overlay .section-kicker {
  margin-bottom: 14px;
}

.stage-overlay p:last-child {
  color: #bdcbc7;
  line-height: 1.6;
}

.topology-label {
  position: absolute;
  z-index: 2;
  max-width: 122px;
  pointer-events: none;
  color: rgba(240, 245, 244, 0.42);
  font-family: var(--mono);
  font-size: 0.56rem;
  text-align: center;
  text-shadow: 0 0 18px #020705;
  transform-origin: left top;
  translate: -50% 18px;
  transition: color 260ms ease, text-shadow 260ms ease;
}

.topology-label.active {
  color: var(--mint);
  text-shadow: 0 0 20px rgba(168, 240, 198, 0.55);
}

.mission-panel {
  display: grid;
  align-content: start;
  gap: 22px;
}

.panel-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.text-control {
  min-height: 44px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--mint);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  padding: 8px 10px;
  text-transform: uppercase;
}

.text-control:hover {
  border-color: var(--mint);
}

.mission-panel > div,
.agent-chip,
.stage-step {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(14, 33, 29, 0.88), rgba(8, 20, 17, 0.78));
}

.mission-panel > div {
  padding: 22px;
}

.agent-roster,
.stage-timeline {
  display: grid;
  gap: 10px;
}

.agent-chip {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  color: var(--muted);
}

.agent-chip.active {
  border-color: color-mix(in srgb, var(--agent-color) 72%, transparent);
  color: var(--text);
  box-shadow: inset 0 0 24px color-mix(in srgb, var(--agent-color) 9%, transparent);
}

.agent-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--agent-color);
  box-shadow: 0 0 16px var(--agent-color);
}

.agent-chip strong {
  font-size: 0.86rem;
}

.agent-chip small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.56rem;
}

.stage-step {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  min-height: 54px;
  align-items: center;
  color: var(--muted);
  cursor: pointer;
  padding: 12px;
  text-align: left;
}

.stage-step.active {
  border-color: var(--mint);
  color: var(--text);
  background: linear-gradient(180deg, rgba(35, 72, 61, 0.86), rgba(12, 31, 26, 0.9));
}

.stage-step span {
  font-family: var(--mono);
  font-size: 0.68rem;
}

.stage-step small {
  color: var(--mint);
  font-family: var(--mono);
  font-size: 0.58rem;
}

.simulation-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 18px;
  margin-top: 22px;
}

.simulation-card {
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(14, 33, 29, 0.9), rgba(7, 18, 15, 0.82)),
    radial-gradient(circle at top right, rgba(168, 240, 198, 0.08), transparent 18rem);
  padding: 22px;
}

.simulation-card h3 {
  margin-bottom: 8px;
}

.simulation-card.report-card {
  grid-column: 1 / -1;
}

.primary-action.compact {
  min-height: 48px;
  white-space: nowrap;
  padding: 0 18px;
}

.primary-action:hover,
.primary-action:focus-visible {
  background: #c8ffdc;
}

.primary-action:active,
.text-control:active,
.stage-step:active,
.node-card:active,
.tab:active {
  transform: translateY(1px);
}

.agent-log {
  min-height: 220px;
  margin-top: 18px;
  border: 1px solid rgba(168, 240, 198, 0.12);
  background: rgba(4, 10, 9, 0.38);
}

.agent-log-list {
  display: grid;
  gap: 0;
  max-height: 340px;
  margin: 0;
  overflow: auto;
  padding: 0;
  list-style: none;
}

.agent-log-list:empty::before {
  display: block;
  padding: 18px;
  color: var(--muted);
  content: "Run the incident simulation to stream agent evidence events.";
}

.agent-log-entry {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 10px 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

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

.agent-log-entry p {
  grid-column: 2 / -1;
  margin: 0;
  color: #bdcbc7;
  line-height: 1.55;
}

.agent-log-entry.blocked {
  background: linear-gradient(90deg, rgba(255, 180, 162, 0.08), transparent);
}

.log-time,
.log-risk {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
}

.agent-log-entry.allowed .log-risk {
  color: var(--mint);
}

.agent-log-entry.blocked .log-risk {
  color: var(--danger);
}

.confidence-meter {
  display: grid;
  gap: 8px;
  margin: 18px 0;
  padding: 20px;
  border: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(168, 240, 198, 0.22) 0 90%, rgba(255, 180, 162, 0.12) 90% 100%),
    rgba(4, 10, 9, 0.34);
}

.confidence-meter strong {
  color: var(--mint);
  font-size: clamp(3rem, 7vw, 5.2rem);
  font-weight: 500;
  letter-spacing: -0.08em;
  line-height: 0.9;
}

.confidence-meter span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.confidence-factors {
  display: grid;
  gap: 8px;
}

.factor-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  color: #bdcbc7;
}

.factor-row strong {
  font-family: var(--mono);
}

.factor-row.positive strong {
  color: var(--mint);
}

.factor-row.negative strong {
  color: var(--danger);
}

.approval-boundary {
  display: grid;
  gap: 14px;
}

.boundary-list {
  border: 1px solid var(--line);
  padding: 16px;
}

.boundary-list h4 {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.boundary-list.allowed h4 {
  color: var(--mint);
}

.boundary-list.blocked h4 {
  color: var(--danger);
}

.runbook-snippets,
.approval-actions {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.runbook-card,
.approval-action {
  border: 1px solid var(--line);
  background: rgba(4, 10, 9, 0.34);
  padding: 16px;
}

.runbook-card h4,
.approval-action h4 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 0.95rem;
}

.runbook-card p,
.approval-action p {
  margin: 0;
  color: #bdcbc7;
  line-height: 1.55;
}

.approval-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

.approval-action .text-control {
  color: var(--danger);
}

.devpost-mode .jump-nav,
.devpost-mode .blueprint-section,
.devpost-mode .replay-section {
  display: none;
}

.devpost-mode .hero {
  min-height: auto;
  padding: 54px 0;
}

.brief-output {
  width: 100%;
  min-height: 260px;
  margin-top: 18px;
  resize: vertical;
  border: 1px solid var(--line);
  background: rgba(4, 10, 9, 0.52);
  color: #d9e5e1;
  font: 0.82rem/1.65 var(--mono);
  padding: 16px;
}

.brief-output:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 4px;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.7fr);
  gap: 64px;
  align-items: end;
  margin-bottom: 42px;
}

.section-head .section-kicker {
  grid-column: 1 / -1;
  margin-bottom: -34px;
}

.section-head p:not(.section-kicker) {
  color: var(--muted);
  line-height: 1.75;
}

.blueprint-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(330px, 0.8fr);
  gap: 26px;
}

/* The incident card is short metadata while the workspace holds dense
   evidence, so the workspace gets the wider column. */
.replay-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.7fr) minmax(0, 1.3fr);
  gap: 26px;
  align-items: start;
}

.replay-layout .incident-card {
  position: sticky;
  top: 24px;
}

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

.node-card,
.selected-panel,
.incident-card,
.workspace,
.card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(14, 33, 29, 0.88), rgba(8, 20, 17, 0.78));
}

.node-card {
  position: relative;
  min-height: 150px;
  color: var(--text);
  cursor: pointer;
  padding: 22px;
  text-align: left;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.node-card:hover,
.node-card.active {
  border-color: var(--mint);
  background: linear-gradient(180deg, rgba(26, 56, 48, 0.95), rgba(11, 30, 25, 0.86));
  transform: translateY(-2px);
}

.node-index {
  display: block;
  margin-bottom: 24px;
  color: var(--mint);
  font-family: var(--mono);
  font-size: 0.78rem;
}

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

.node-card small {
  margin-top: 10px;
  color: var(--muted);
}

.selected-panel,
.incident-card,
.workspace {
  padding: 28px;
}

.selected-panel {
  min-height: 320px;
}

.panel-body,
.meta {
  color: var(--muted);
  line-height: 1.7;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.tag-row span {
  border: 1px solid var(--line-strong);
  color: var(--mint);
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 8px 10px;
}

.incident-card {
  align-self: start;
}

.incident-summary {
  display: grid;
  gap: 0;
  margin: 28px 0 0;
}

.incident-summary div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.incident-summary dt {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.incident-summary dd {
  margin: 0;
  color: var(--text);
}

.tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 22px;
  border: 1px solid var(--line);
}

.tab {
  min-height: 52px;
  border: 0;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.01);
  color: var(--muted);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tab:last-child {
  border-right: 0;
}

.tab.active {
  background: var(--mint);
  color: #06100d;
  font-weight: 800;
}

.content {
  min-height: 380px;
}

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

.card {
  padding: 22px;
}

.card h3 {
  color: var(--text);
}

.evidence-list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.evidence-list li {
  position: relative;
  padding: 14px 0 14px 22px;
  border-top: 1px solid var(--line);
  color: #bdcbc7;
  line-height: 1.55;
}

.evidence-list li::before {
  position: absolute;
  top: 21px;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--mint);
  content: "";
}

.evidence-record {
  margin: 14px 0 0;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.evidence-record div {
  display: grid;
  grid-template-columns: minmax(88px, auto) minmax(0, 1fr);
  gap: 12px;
  padding: 7px 0;
}

.evidence-record dt {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.07em;
  line-height: 1.7;
  text-transform: uppercase;
}

.evidence-record dd {
  margin: 0;
  color: #bdcbc7;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.cause-card {
  overflow: hidden;
}

.cause-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 18px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.cause-header > div:first-child {
  flex: 1 1 180px;
  min-width: 0;
}

.cause-header .section-kicker {
  margin-bottom: 14px;
}

.cause-header h3 {
  margin-bottom: 0;
}

.score-group {
  display: grid;
  flex: 0 0 auto;
  gap: 6px;
  justify-items: end;
  text-align: right;
}

.score {
  color: var(--mint);
  font-size: clamp(1.9rem, 2.4vw, 2.6rem);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 0.9;
  white-space: nowrap;
}

.score-label {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 32px 0 48px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@media (max-width: 960px) {
  .topbar,
  .hero,
  .section-head,
  .scenario-strip,
  .blueprint-layout,
  .replay-layout,
  .mission-layout,
  .simulation-grid {
    grid-template-columns: 1fr;
  }

  .replay-layout .incident-card {
    position: static;
  }

  .topbar {
    gap: 16px;
    padding: 20px 0;
  }

  .status-line,
  .topbar-actions {
    justify-self: start;
  }

  .topbar-actions {
    flex-wrap: wrap;
  }

  .brand,
  .toplink {
    min-height: 44px;
  }

  .hero {
    gap: 36px;
    min-height: auto;
    padding: 72px 0;
  }

  .radar-card {
    min-height: auto;
    padding-left: 0;
    border-left: 0;
  }

  .section-head .section-kicker {
    margin-bottom: 0;
  }

  .tabs,
  .node-map,
  .scenario-switcher,
  .card-grid {
    grid-template-columns: 1fr;
  }

  .topology-stage {
    min-height: 520px;
  }

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

  .approval-action {
    grid-template-columns: 1fr;
  }

  .tab {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .tab:last-child {
    border-bottom: 0;
  }
}

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

@media (max-width: 620px) {
  .page {
    width: min(100% - 24px, 1180px);
  }

  h1 {
    font-size: 3.35rem;
  }

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

  .incident-summary div {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

/* ---- Topology view-mode switch ---- */
.topology-modes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.topology-mode {
  min-height: 44px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 10px 18px;
}

.topology-mode:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.topology-mode.active {
  border-color: var(--mint);
  color: var(--bg);
  background: var(--mint);
}

.topology-mode-hint {
  flex: 1 1 240px;
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
}

/* ---- Blast radius panel ---- */
.blast-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 22px;
  margin-top: 26px;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 24px;
}

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

.blast-controls-head h3 {
  margin: 6px 0;
}

.fault-picker {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.fault-group-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.fault-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fault-chip {
  min-height: 34px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 0.72rem;
  padding: 6px 12px;
}

.fault-chip:hover {
  border-color: var(--mint-2);
}

.fault-chip.suggested {
  border-style: dashed;
  border-color: var(--line-strong);
}

.fault-chip.active {
  border-color: var(--danger);
  background: rgba(255, 122, 104, 0.16);
  color: var(--text);
}

.blast-report {
  display: grid;
  gap: 16px;
  align-content: start;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  padding: 22px;
}

.blast-report-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.blast-report-head h3 {
  margin: 4px 0;
}

.severity-badge {
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.severity-badge.sev-critical {
  border-color: #ff4d6d;
  color: #ff4d6d;
  background: rgba(255, 77, 109, 0.12);
}

.severity-badge.sev-high {
  border-color: #ff7a68;
  color: #ff7a68;
  background: rgba(255, 122, 104, 0.12);
}

.severity-badge.sev-medium {
  border-color: var(--amber);
  color: var(--amber);
  background: rgba(214, 192, 138, 0.12);
}

.severity-badge.sev-low {
  border-color: var(--mint);
  color: var(--mint);
  background: rgba(168, 240, 198, 0.1);
}

.blast-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.blast-stat {
  border: 1px solid var(--line);
  padding: 12px;
  text-align: center;
}

.blast-stat strong {
  display: block;
  font-size: 1.5rem;
}

.blast-stat span {
  color: var(--muted);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.blast-meta-row {
  display: grid;
  gap: 8px;
}

.blast-meta-label {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mini-chip {
  padding: 4px 10px;
  border: 1px solid var(--line);
  font-size: 0.7rem;
}

.mini-chip.state-source {
  border-color: #ff4d6d;
  color: #ff4d6d;
}

.mini-chip.state-down {
  border-color: #ff7a68;
  color: #ff9c8f;
}

.mini-chip.state-degraded {
  border-color: var(--amber);
  color: var(--amber);
}

.blast-ok {
  color: var(--mint);
  font-size: 0.78rem;
}

.blast-notes {
  display: grid;
  gap: 8px;
}

.blast-node-list {
  display: grid;
  gap: 6px;
  margin-top: 4px;
}

.blast-node-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  padding: 8px 12px;
  font-size: 0.78rem;
}

.blast-node-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--muted);
}

.blast-node-layer {
  color: var(--muted);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.blast-node-state {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.blast-node-row.state-source {
  border-color: #ff4d6d;
}

.blast-node-row.state-source .blast-node-dot {
  background: #ff4d6d;
  box-shadow: 0 0 12px #ff4d6d;
}

.blast-node-row.state-source .blast-node-state {
  color: #ff4d6d;
}

.blast-node-row.state-down {
  border-color: rgba(255, 122, 104, 0.6);
}

.blast-node-row.state-down .blast-node-dot {
  background: #ff7a68;
  box-shadow: 0 0 12px #ff7a68;
}

.blast-node-row.state-down .blast-node-state {
  color: #ff9c8f;
}

.blast-node-row.state-degraded {
  border-color: rgba(214, 192, 138, 0.5);
}

.blast-node-row.state-degraded .blast-node-dot {
  background: var(--amber);
  box-shadow: 0 0 10px rgba(214, 192, 138, 0.6);
}

.blast-node-row.state-degraded .blast-node-state {
  color: var(--amber);
}

@media (max-width: 900px) {
  .blast-panel {
    grid-template-columns: 1fr;
  }
}

/* ---- Static swim-lane fallback ---- */
.topology-fallback {
  place-items: start stretch;
  align-content: start;
  overflow: auto;
  text-align: left;
}

.topology-fallback-note {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.78rem;
}

.topology-lanes-grid {
  display: grid;
  gap: 10px;
  width: 100%;
}

.lane {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  padding: 8px 12px;
}

.lane-label {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lane-nodes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lane-node {
  border: 1px solid var(--line);
  padding: 5px 10px;
  font-size: 0.72rem;
  color: var(--text);
}

.lane-node.is-critical {
  border-color: var(--line-strong);
  font-weight: 600;
}

.lane-node.dimmed {
  opacity: 0.4;
}

.lane-node.state-source {
  border-color: #ff4d6d;
  color: #ff4d6d;
  background: rgba(255, 77, 109, 0.14);
}

.lane-node.state-down {
  border-color: #ff7a68;
  color: #ff9c8f;
  background: rgba(255, 122, 104, 0.14);
}

.lane-node.state-degraded {
  border-color: var(--amber);
  color: var(--amber);
  background: rgba(214, 192, 138, 0.12);
}

@media (max-width: 620px) {
  .lane {
    grid-template-columns: 1fr;
  }
}
