.live-shell {
  width: min(1780px, calc(100vw - 36px));
  padding-top: 22px;
}

.live-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 12%, rgba(33,212,253,0.12), transparent 28%),
    linear-gradient(90deg, transparent, rgba(62,229,139,0.05), transparent);
}

.live-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(130,170,210,0.22);
  border-radius: 30px;
  padding: 26px;
  margin-bottom: 16px;
  background:
    linear-gradient(120deg, rgba(13,35,60,0.9), rgba(7,18,32,0.84) 54%, rgba(9,44,35,0.76)),
    radial-gradient(circle at 88% 0%, rgba(62,229,139,0.22), transparent 34%);
  box-shadow: 0 24px 90px rgba(0,0,0,0.34), inset 0 1px rgba(255,255,255,0.06);
}

.live-hero::after {
  content: "";
  position: absolute;
  right: -140px;
  top: -170px;
  width: 460px;
  height: 460px;
  pointer-events: none;
  border: 1px solid rgba(33,212,253,0.16);
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 36px rgba(33,212,253,0.035),
    inset 0 0 0 86px rgba(62,229,139,0.035),
    0 0 120px rgba(33,212,253,0.1);
}

.live-hero > * {
  position: relative;
  z-index: 1;
}

.live-hero h1 {
  max-width: 980px;
  letter-spacing: 0;
}

.live-hero .subtitle {
  max-width: 1040px;
  margin-top: 14px;
  color: #b4cbe0;
}

.hero-proof-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hero-proof-strip span {
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  padding: 8px 11px;
  color: #dff4ff;
  background: rgba(3,12,22,0.34);
  font-size: 12px;
  box-shadow: inset 0 1px rgba(255,255,255,0.05);
}

.live-hero .hero-actions {
  min-width: 220px;
}

.live-control {
  margin-bottom: 14px;
  border-color: rgba(33,212,253,0.3);
  padding: 14px;
  background:
    linear-gradient(90deg, rgba(33,212,253,0.1), rgba(7,18,32,0.88) 46%),
    rgba(7,18,32,0.84);
}

.control-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1.2fr) minmax(230px, 0.54fr) 180px;
  gap: 12px;
  align-items: end;
}

.control-grid label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.control-grid label span {
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.run-button {
  min-height: 44px;
  border: 0;
  border-radius: 16px;
  color: #06111e;
  background: linear-gradient(90deg, #d9ff72, var(--green) 48%, var(--cyan));
  font-weight: 900;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 16px 40px rgba(62,229,139,0.22), inset 0 1px rgba(255,255,255,0.5);
}

.run-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 18px 48px rgba(62,229,139,0.28), inset 0 1px rgba(255,255,255,0.5);
}

.run-button:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.run-meta {
  margin-top: 10px;
  color: var(--muted);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
}

.verdict-banner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 18px;
  align-items: center;
  margin-bottom: 14px;
  border: 1px solid rgba(33,212,253,0.28);
  border-radius: 28px;
  padding: 20px 22px 20px 26px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(33,212,253,0.16), transparent 42%),
    linear-gradient(180deg, rgba(10,31,54,0.92), rgba(5,16,30,0.9));
  box-shadow: 0 22px 76px rgba(0,0,0,0.3), inset 0 1px rgba(255,255,255,0.06);
}

.verdict-banner::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: linear-gradient(180deg, var(--cyan), var(--blue));
}

.verdict-banner p {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.verdict-banner h2 {
  margin: 0;
  font-size: clamp(22px, 2.6vw, 34px);
  line-height: 1.16;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.verdict-banner span {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  line-height: 1.55;
}

.verdict-banner.success {
  border-color: rgba(62,229,139,0.5);
  background:
    linear-gradient(90deg, rgba(62,229,139,0.2), transparent 48%),
    linear-gradient(180deg, rgba(9,38,34,0.92), rgba(5,16,30,0.9));
}

.verdict-banner.success::before {
  background: linear-gradient(180deg, #d9ff72, var(--green));
}

.verdict-banner.mixed {
  border-color: rgba(251,146,60,0.5);
  background:
    linear-gradient(90deg, rgba(251,146,60,0.18), transparent 48%),
    linear-gradient(180deg, rgba(44,29,12,0.92), rgba(5,16,30,0.9));
}

.verdict-banner.mixed::before {
  background: linear-gradient(180deg, var(--orange), var(--red));
}

.verdict-score {
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 22px;
  padding: 15px;
  background: rgba(3,12,22,0.44);
  text-align: center;
  box-shadow: inset 0 1px rgba(255,255,255,0.05);
}

.verdict-score span {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.verdict-score strong {
  display: block;
  margin-top: 9px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 32px;
}

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

.stat-tile {
  position: relative;
  overflow: hidden;
  grid-column: span 2;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 14px 14px 13px;
  background: linear-gradient(180deg, rgba(9,27,48,0.86), rgba(5,16,30,0.9));
  box-shadow: 0 16px 46px rgba(0,0,0,0.22), inset 0 1px rgba(255,255,255,0.05);
}

.stat-tile::after {
  content: "";
  position: absolute;
  inset: auto -30% -48% 40%;
  height: 76px;
  background: radial-gradient(circle, rgba(33,212,253,0.22), transparent 68%);
}

.stat-tile span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-tile strong {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 9px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: clamp(21px, 2vw, 28px);
  line-height: 1;
  overflow-wrap: anywhere;
}

.stat-tile small {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
}

.danger-stat,
.safe-stat {
  grid-column: span 3;
}

.danger-stat {
  border-color: rgba(255,77,94,0.34);
  background: linear-gradient(180deg, rgba(48,18,29,0.86), rgba(5,16,30,0.9));
}

.danger-stat::after {
  background: radial-gradient(circle, rgba(255,77,94,0.28), transparent 68%);
}

.safe-stat {
  border-color: rgba(62,229,139,0.34);
  background: linear-gradient(180deg, rgba(8,40,32,0.86), rgba(5,16,30,0.9));
}

.safe-stat::after {
  background: radial-gradient(circle, rgba(62,229,139,0.28), transparent 68%);
}

.alert-wall {
  display: grid;
  gap: 9px;
  margin-bottom: 14px;
}

.live-alert {
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px;
  padding: 12px 15px;
  display: flex;
  gap: 12px;
  align-items: center;
  background: rgba(8,20,36,0.86);
  box-shadow: 0 16px 40px rgba(0,0,0,0.24);
}

.live-alert strong {
  min-width: 70px;
}

.alert-danger {
  border-color: rgba(255,77,94,0.74);
  background: linear-gradient(90deg, rgba(255,77,94,0.3), rgba(8,20,36,0.9));
  animation: alert-pop 900ms ease;
}

.alert-warn {
  border-color: rgba(251,146,60,0.64);
  background: linear-gradient(90deg, rgba(251,146,60,0.22), rgba(8,20,36,0.9));
}

.alert-safe {
  border-color: rgba(62,229,139,0.64);
  background: linear-gradient(90deg, rgba(62,229,139,0.22), rgba(8,20,36,0.9));
}

.alert-info {
  border-color: rgba(33,212,253,0.4);
}

@keyframes alert-pop {
  0% { transform: scale(0.985); }
  45% { transform: scale(1.008); }
  100% { transform: scale(1); }
}

.duel-stage-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin: 4px 0 12px;
  padding: 0 4px;
}

.duel-stage-head h2 {
  margin: 0;
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
  font-size: clamp(22px, 2.4vw, 34px);
  letter-spacing: 0;
}

.duel-stage-head span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  line-height: 1.55;
}

.stage-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.stage-legend span {
  margin: 0;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  padding: 8px 11px 8px 28px;
  position: relative;
  color: #dff4ff;
  background: rgba(3,12,22,0.48);
  font-size: 12px;
}

.stage-legend span::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  transform: translateY(-50%);
}

.legend-danger::before {
  background: var(--red);
  box-shadow: 0 0 14px rgba(255,77,94,0.5);
}

.legend-safe::before {
  background: var(--green);
  box-shadow: 0 0 14px rgba(62,229,139,0.5);
}

.live-duel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.live-lane {
  min-height: 710px;
  overflow: hidden;
  padding: 16px;
}

.baseline-lane {
  border-color: rgba(255,77,94,0.36);
  background:
    linear-gradient(180deg, rgba(52,17,28,0.8), rgba(7,18,32,0.92)),
    radial-gradient(circle at 16% 10%, rgba(255,77,94,0.2), transparent 34%);
}

.protected-lane {
  border-color: rgba(62,229,139,0.36);
  background:
    linear-gradient(180deg, rgba(9,45,34,0.74), rgba(7,18,32,0.92)),
    radial-gradient(circle at 16% 10%, rgba(62,229,139,0.18), transparent 34%);
}

.lane-banner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  border-radius: 20px;
  padding: 14px 16px;
  margin-bottom: 13px;
  box-shadow: inset 0 1px rgba(255,255,255,0.05);
}

.lane-banner span {
  display: block;
  font-size: 18px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.lane-banner small {
  display: block;
  color: rgba(233,244,255,0.72);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.lane-banner strong {
  flex: none;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 6px 9px;
  background: rgba(3,12,22,0.35);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  text-transform: uppercase;
}

.danger-banner {
  background: linear-gradient(90deg, rgba(255,77,94,0.3), rgba(251,146,60,0.1));
}

.safe-banner {
  background: linear-gradient(90deg, rgba(62,229,139,0.28), rgba(33,212,253,0.1));
}

.hook-rail {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 13px;
}

.hook-step {
  position: relative;
  min-height: 112px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 18px;
  padding: 12px;
  background: rgba(3,12,22,0.48);
  overflow: visible;
  box-shadow: inset 0 1px rgba(255,255,255,0.04);
}

.hook-step::before {
  content: "";
  position: absolute;
  left: 32%;
  right: 0;
  bottom: 0;
  height: 58px;
  border-radius: 0 0 18px 0;
  background: radial-gradient(circle, rgba(33,212,253,0.2), transparent 68%);
}

.hook-step::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: 26px;
  right: -11px;
  width: 18px;
  height: 2px;
  background: rgba(255,255,255,0.2);
}

.hook-step:last-child::after {
  display: none;
}

.hook-step strong {
  position: relative;
  z-index: 1;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  color: #06111e;
  background: var(--cyan);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 13px;
}

.hook-step span {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 10px;
  font-weight: 900;
  font-size: 13px;
}

.hook-step small {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
}

.hook-step em {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 6px;
  color: #cfe7ff;
  font-style: normal;
  font-size: 11px;
  line-height: 1.28;
}

.hook-step.marked,
.hook-step.requires_approval {
  border-color: rgba(251,146,60,0.52);
  background: linear-gradient(180deg, rgba(251,146,60,0.16), rgba(3,12,22,0.5));
}

.hook-step.marked strong,
.hook-step.requires_approval strong {
  background: var(--orange);
}

.hook-step.blocked,
.hook-step.blocked-here {
  border-color: rgba(62,229,139,0.84);
  background: linear-gradient(180deg, rgba(62,229,139,0.25), rgba(3,12,22,0.52));
  box-shadow: 0 0 34px rgba(62,229,139,0.18), inset 0 1px rgba(255,255,255,0.06);
}

.hook-step.blocked strong,
.hook-step.blocked-here strong {
  background: #d9ff72;
}

.hook-step.skipped {
  opacity: 0.68;
  border-style: dashed;
}

.hook-step.passed strong {
  background: var(--green);
}

.live-chain {
  position: relative;
  display: flex;
  gap: 14px;
  overflow-x: auto;
  min-height: 350px;
  padding: 22px 10px 30px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(3,12,22,0.18), rgba(3,12,22,0.62)),
    repeating-linear-gradient(90deg, transparent 0, transparent 86px, rgba(255,255,255,0.035) 87px, transparent 88px);
}

.live-chain::before {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  top: 50%;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(33,212,253,0.35), rgba(251,146,60,0.35), rgba(255,77,94,0.3));
}

.protected-lane .live-chain::before {
  background: linear-gradient(90deg, rgba(33,212,253,0.35), rgba(62,229,139,0.38), rgba(217,255,114,0.32));
}

.live-node-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
}

.live-node {
  position: relative;
  width: 218px;
  min-height: 206px;
  border: 1px solid color-mix(in srgb, var(--level, var(--cyan)) 62%, rgba(255,255,255,0.12));
  border-radius: 22px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  background: rgba(8,21,37,0.96);
  box-shadow: 0 16px 36px rgba(0,0,0,0.24), inset 0 1px rgba(255,255,255,0.05);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.live-node:hover {
  transform: translateY(-4px);
  border-color: var(--cyan);
  box-shadow: 0 20px 44px rgba(0,0,0,0.3), 0 0 24px rgba(33,212,253,0.16);
}

.live-node::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(circle at 20% 0%, color-mix(in srgb, var(--level, var(--cyan)) 32%, transparent), transparent 48%);
}

.live-node::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 12px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--level, var(--cyan)) 82%, transparent), transparent);
}

.live-node-top {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.live-node-top strong {
  color: var(--text);
  font-size: 25px;
  line-height: 1;
}

.live-node-action {
  position: relative;
  z-index: 1;
  margin: 12px 0 10px;
  font-weight: 900;
  line-height: 1.25;
}

.live-badges {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: flex-start;
  margin: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.live-node-source-block {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 11px;
  padding: 9px 10px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  background: rgba(3,12,22,0.34);
}

.live-node-source {
  color: #cfe7ff;
  font-size: 12px;
  line-height: 1.42;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.live-edge {
  min-width: 64px;
  text-align: center;
  color: #a9bfd5;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  position: relative;
}

.live-edge::before {
  content: "";
  display: block;
  height: 3px;
  margin: 0 0 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--orange), var(--red));
  box-shadow: 0 0 18px rgba(251,146,60,0.28);
}

.live-edge::after {
  content: "";
  display: block;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid var(--orange);
  margin: -14px 0 4px auto;
}

.protected-lane .live-edge::before {
  background: linear-gradient(90deg, var(--cyan), var(--green), #d9ff72);
}

.protected-lane .live-edge::after {
  border-left-color: var(--green);
}

.node-danger {
  animation: danger-glow 1.4s ease infinite alternate;
}

@keyframes danger-glow {
  from { box-shadow: 0 16px 36px rgba(0,0,0,0.24), inset 0 1px rgba(255,255,255,0.05); }
  to { box-shadow: 0 0 34px rgba(255,77,94,0.34), 0 20px 46px rgba(0,0,0,0.3); }
}

.live-pulse {
  animation: live-pulse 820ms ease;
}

@keyframes live-pulse {
  0% { transform: scale(0.985); }
  48% { transform: scale(1.035); }
  100% { transform: scale(1); }
}

.event-actual_guard_decision::after,
.event-actual_guard_outcome::after {
  content: "BLOCKED";
  position: absolute;
  left: auto;
  top: -10px;
  right: 14px;
  bottom: auto;
  width: auto;
  height: auto;
  border-radius: 999px;
  padding: 4px 9px;
  background: #d9ff72;
  color: #06111e;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.event-actual_guard_scan {
  border-color: rgba(33,212,253,0.72);
}

.event-actual_guard_decision,
.event-actual_guard_outcome {
  --level: var(--green);
}

.hook-chip {
  border-color: rgba(217,255,114,0.34);
  color: #efffd0;
  background: rgba(217,255,114,0.1);
}

.hook-blocked,
.event-hook_approvetool {
  --level: var(--green);
  border-color: rgba(62,229,139,0.78);
}

.hook-requires_approval,
.event-hook_beforetool {
  --level: var(--orange);
}

.hook-marked,
.event-hook_beforellm {
  --level: var(--yellow);
}

.hook-skipped {
  opacity: 0.82;
  border-style: dashed;
}

.live-summary {
  margin-top: 13px;
  min-height: 160px;
  max-height: 230px;
  overflow: auto;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 13px;
  background: rgba(3,12,22,0.5);
}

.comparison-panel {
  margin-bottom: 16px;
  border-color: rgba(33,212,253,0.28);
}

.evidence-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

.evidence-grid article {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 14px;
  background: rgba(3,12,22,0.46);
}

.evidence-grid h3 {
  margin: 0 0 10px;
  font-size: 14px;
  color: #dff4ff;
}

.evidence-grid pre {
  max-height: 200px;
  overflow: auto;
}

.node-inspector {
  margin-top: 0;
  border-color: rgba(184,146,255,0.28);
}

.node-inspector pre {
  min-height: 170px;
  max-height: 360px;
  overflow: auto;
}

@media (max-width: 1320px) {
  .live-stats {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .stat-tile {
    grid-column: span 2;
  }

  .danger-stat,
  .safe-stat {
    grid-column: span 3;
  }

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

  .hook-step::after {
    display: none;
  }
}

@media (max-width: 1160px) {
  .live-shell {
    width: min(100% - 24px, 980px);
  }

  .live-hero,
  .duel-stage-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .live-hero .hero-actions,
  .stage-legend {
    justify-content: flex-start;
  }

  .control-grid,
  .live-duel,
  .evidence-grid,
  .verdict-banner {
    grid-template-columns: 1fr;
  }

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

  .stat-tile,
  .danger-stat,
  .safe-stat {
    grid-column: span 1;
  }

  .hook-rail {
    grid-template-columns: 1fr;
  }

  .live-lane {
    min-height: 0;
  }
}

@media (max-width: 720px) {
  .live-shell {
    width: min(100% - 18px, 640px);
    padding-top: 12px;
  }

  .live-hero {
    padding: 20px;
    border-radius: 24px;
  }

  .hero-proof-strip,
  .stage-legend {
    width: 100%;
  }

  .hero-proof-strip span,
  .stage-legend span {
    flex: 1 1 160px;
  }

  .live-stats {
    grid-template-columns: 1fr;
  }

  .live-chain {
    min-height: 300px;
  }

  .live-node {
    width: 205px;
  }
}
