:root {
  color-scheme: dark;
  --void: #050609;
  --canvas: #31578f;
  --canvas-lift: #54739a;
  --surface: rgba(15, 35, 65, 0.38);
  --surface-raised: rgba(17, 39, 72, 0.58);
  --surface-soft: rgba(255, 255, 255, 0.075);
  --line: rgba(255, 255, 255, 0.16);
  --line-strong: rgba(255, 255, 255, 0.26);
  --white: #f7f8fb;
  --bone: #e8e9ee;
  --ash: rgba(255, 255, 255, 0.76);
  --muted: rgba(255, 255, 255, 0.54);
  --muted-deep: rgba(255, 255, 255, 0.37);
  --preview: #9281f7;
  --preview-blue: #6f9cff;
  --preview-wash: rgba(146, 129, 247, 0.115);
  --green: #3ad389;
  --green-wash: rgba(58, 211, 137, 0.1);
  --amber: #ffca62;
  --amber-wash: rgba(255, 202, 98, 0.1);
  --red: #ff8d8c;
  --red-wash: rgba(255, 100, 101, 0.105);
  --rail-top: #3d68ac;
  --rail-middle: #627fa3;
  --rail-bottom: #aa8069;
  --radius-frame: 32px;
  --radius-panel: 22px;
  --radius-card: 15px;
  font-family: "DM Sans", "Geist", "Inter", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

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

body {
  min-height: 100vh;
  margin: 0;
  color: var(--bone);
  background:
    radial-gradient(circle at 25% 0%, rgba(94, 108, 191, 0.13), transparent 27rem),
    radial-gradient(circle at 88% 100%, rgba(105, 62, 80, 0.1), transparent 32rem),
    var(--void);
  overflow-x: hidden;
}

button { font: inherit; }
button:focus-visible { outline: 2px solid var(--preview); outline-offset: 3px; }

.phase-review {
  --rail-top: #3b5e96;
  --rail-middle: #62758e;
  --rail-bottom: #9a665f;
}

.phase-replayed {
  --rail-top: #3f62ac;
  --rail-middle: #687ca5;
  --rail-bottom: #8e7780;
}

.phase-approved {
  --rail-top: #4a4f9f;
  --rail-middle: #6a7199;
  --rail-bottom: #887471;
}

.phase-aborted {
  --rail-top: #38404f;
  --rail-middle: #626b76;
  --rail-bottom: #877469;
}

.shell {
  min-height: 100vh;
  padding: 10px;
}

.app-frame {
  position: relative;
  display: grid;
  grid-template-columns: 326px minmax(0, 1fr);
  width: min(1720px, 100%);
  min-height: calc(100vh - 20px);
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: var(--radius-frame);
  background:
    radial-gradient(circle at 78% 9%, rgba(110, 145, 225, .5), transparent 34%),
    radial-gradient(circle at 18% 72%, rgba(255, 255, 255, .08), transparent 35%),
    linear-gradient(180deg, var(--rail-top) 0%, var(--rail-middle) 49%, var(--rail-bottom) 100%);
  box-shadow: 0 36px 120px rgba(0, 0, 0, 0.38);
  overflow: clip;
}

.narrative-rail {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 22px);
  padding: 25px 27px 24px;
  color: #fff;
  border-right: 1px solid rgba(255,255,255,.17);
  background: rgba(24, 52, 92, .08);
  transition: background 500ms ease;
  overflow: hidden;
}

.narrative-rail::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 0;
  background:
    radial-gradient(circle at 25% 12%, rgba(255,255,255,.2), transparent 25%),
    radial-gradient(circle at 120% 55%, rgba(52, 104, 200, 0.2), transparent 42%),
    linear-gradient(118deg, rgba(255,255,255,.055), transparent 50%);
  opacity: .8;
}

.narrative-rail::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.06), transparent 60%, rgba(0,0,0,.12));
  pointer-events: none;
}

.rail-grain {
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: .12;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.28'/%3E%3C/svg%3E");
  pointer-events: none;
}

.rail-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 35px;
}

.brand-symbol,
.boot-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2);
}

.brand-symbol::before,
.brand-symbol::after,
.brand-symbol span,
.boot-mark::before,
.boot-mark::after,
.boot-mark span {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff;
}

.brand-symbol::before,
.boot-mark::before { transform: translate(-5px, 0); }
.brand-symbol::after,
.boot-mark::after { transform: translate(5px, 0); }
.brand-symbol span,
.boot-mark span { width: 5px; height: 5px; }

.brand-word {
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .13em;
}

.judge-chip {
  margin-left: auto;
  padding: 6px 9px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  color: rgba(255,255,255,.76);
  background: rgba(14,24,45,.16);
  backdrop-filter: blur(12px);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.rail-story { margin-top: clamp(42px, 7vh, 82px); }

.rail-eyebrow,
.section-kicker,
.surface-kicker,
.empty-kicker,
.journey-title,
.inspector-label {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.rail-eyebrow { color: rgba(255,255,255,.74); }

.rail-story h1 {
  max-width: 280px;
  margin: 10px 0 13px;
  color: #fff;
  font-size: clamp(31px, 3vw, 42px);
  font-weight: 500;
  line-height: .99;
  letter-spacing: -.045em;
}

.rail-copy {
  max-width: 270px;
  margin: 0;
  color: rgba(255,255,255,.78);
  font-size: 11px;
  line-height: 1.58;
}

.instruction-card {
  margin-top: 23px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 16px;
  background: rgba(12, 27, 52, 0.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1);
  backdrop-filter: blur(18px);
}

.instruction-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,.7);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.agent-dot {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  color: #26385f;
  background: rgba(255,255,255,.82);
  font-size: 8px;
  font-weight: 800;
}

.instruction-card p {
  margin: 10px 0 0;
  color: rgba(255,255,255,.94);
  font-size: 11px;
  line-height: 1.52;
}

.journey { margin-top: 28px; }
.journey-title { margin-bottom: 7px; color: rgba(255,255,255,.74); }

.journey-step {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  min-height: 34px;
  padding: 0 7px;
  border-left: 2px solid transparent;
  color: rgba(255,255,255,.68);
  font-size: 10px;
  transition: color 250ms ease, background 250ms ease, border-color 250ms ease;
}

.journey-short { display: none; }
.journey-number { color: rgba(255,255,255,.6); font-variant-numeric: tabular-nums; }
.journey-step.active { border-left-color: rgba(255,255,255,.95); color: #fff; background: linear-gradient(90deg, rgba(255,255,255,.12), transparent); }
.journey-step.done { color: rgba(255,255,255,.83); }
.journey-step.done .journey-number::before { content: "\2713  "; color: #fff; }

.rail-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-top: auto;
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,.16);
}

.rail-footer div { display: grid; }
.rail-footer strong { color: #fff; font-size: 25px; font-weight: 500; line-height: 1; letter-spacing: -.04em; }
.rail-footer strong.safe { color: #fff; }
.rail-footer span { margin-top: 4px; color: rgba(255,255,255,.78); font-size: 9px; }
.rail-footer p { max-width: 120px; margin: 0; color: rgba(255,255,255,.78); font-size: 9px; line-height: 1.4; text-align: right; }

.runtime-stage {
  position: relative;
  min-width: 0;
  background:
    radial-gradient(circle at 74% 2%, rgba(119, 153, 226, .22), transparent 30rem),
    linear-gradient(115deg, rgba(23, 51, 91, .05), rgba(255,255,255,.025));
}

.runtime-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .16;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
  pointer-events: none;
}

.stage-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  padding: 0 27px;
  border-bottom: 1px solid var(--line);
  background: rgba(25, 53, 94, .22);
  backdrop-filter: blur(22px);
}

.stage-context,
.stage-actions,
.isolation-chip {
  display: flex;
  align-items: center;
}

.stage-context {
  gap: 9px;
  color: var(--muted);
  font-size: 10px;
}

.context-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--preview);
  box-shadow: 0 0 10px rgba(146,129,247,.75);
}

.context-divider { width: 1px; height: 13px; background: var(--line-strong); }
.stage-actions { gap: 7px; }

.isolation-chip {
  gap: 7px;
  height: 29px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ash);
  background: rgba(255,255,255,.025);
  font-size: 9px;
}

.isolation-chip i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
}

.quiet-action {
  min-height: 29px;
  padding: 0 9px;
  border: 0;
  border-radius: 8px;
  color: rgba(255,255,255,.68);
  background: transparent;
  cursor: pointer;
  font-size: 9px;
}

.quiet-action:hover { color: var(--white); background: var(--surface-soft); }
.quiet-action.danger-text:hover { color: var(--red); }

.live-trigger {
  gap: 7px;
  min-height: 31px;
  padding: 0 12px;
  border: 1px solid rgba(146,129,247,.34);
  border-radius: 999px;
  color: #f6f3ff;
  background: rgba(146,129,247,.09);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07);
  font-size: 10px;
  font-weight: 600;
}

.live-trigger i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px rgba(58,211,137,.7);
}

.live-trigger:hover { border-color: rgba(172,160,255,.58); background: rgba(146,129,247,.15); }

.stage-content {
  position: relative;
  z-index: 1;
  width: min(1330px, 100%);
  margin: 0 auto;
  padding: 31px 30px 72px;
}

.stage-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 22px;
}

.section-kicker,
.surface-kicker,
.empty-kicker,
.inspector-label { color: var(--muted); }

.stage-intro h2 {
  max-width: 650px;
  margin: 8px 0 0;
  color: var(--white);
  font-size: clamp(24px, 2.8vw, 38px);
  font-weight: 450;
  line-height: 1.04;
  letter-spacing: -.04em;
}

.stage-proof {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.022);
}

.proof-light {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.proof-light.safe { background: var(--green); box-shadow: 0 0 12px rgba(58,211,137,.55); }
.proof-light.committed { background: var(--preview); box-shadow: 0 0 12px rgba(146,129,247,.55); }
.stage-proof div { display: grid; gap: 2px; }
.stage-proof strong { color: var(--bone); font-size: 10px; font-weight: 650; }
.stage-proof span { color: var(--muted); font-size: 8px; }

.surface {
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: linear-gradient(145deg, rgba(18, 45, 80, .48), rgba(17, 34, 62, .34));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 24px 70px rgba(25,45,72,.12);
  backdrop-filter: blur(24px) saturate(115%);
  overflow: hidden;
}

.empty-canvas {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 500px;
  padding: 30px 25px 31px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 38%, rgba(167, 184, 255, .24), transparent 25rem),
    linear-gradient(150deg, rgba(31, 67, 111, .4), rgba(25, 47, 82, .26));
}

.empty-canvas::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .45;
  background-image: radial-gradient(circle, rgba(255,255,255,.14) 1px, transparent 1px);
  background-size: 23px 23px;
  mask-image: radial-gradient(circle at center, black, transparent 60%);
}

.boundary-visual {
  position: relative;
  width: 210px;
  height: 210px;
  margin: -12px 0 -7px;
  transform: scale(.78);
}

.boundary-ring,
.boundary-core,
.system-satellite {
  position: absolute;
  border-radius: 50%;
}

.boundary-ring { border: 1px solid rgba(146,129,247,.2); }
.ring-one { inset: 14px; animation: slow-spin 30s linear infinite; }
.ring-two { inset: 49px; border-style: dashed; animation: slow-spin 20s linear infinite reverse; }
.ring-one::before, .ring-two::before { content: ""; position: absolute; top: -3px; left: 50%; width: 6px; height: 6px; border-radius: 50%; background: var(--preview); box-shadow: 0 0 12px var(--preview); }

.boundary-core {
  inset: 77px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.28);
  background: radial-gradient(circle at 35% 25%, #c9c3ff, var(--preview) 40%, #33345d 100%);
  box-shadow: 0 0 38px rgba(146,129,247,.26), inset 0 1px 8px rgba(255,255,255,.35);
}

.boundary-core i { width: 8px; height: 8px; border: 2px solid rgba(255,255,255,.8); border-radius: 50%; }

.system-satellite {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  border: 1px solid var(--line-strong);
  color: var(--ash);
  background: rgba(19, 45, 78, .58);
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 25px rgba(0,0,0,.25);
}

.system-satellite svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.satellite-calendar { top: 9px; left: 26px; }
.satellite-mail { top: 38px; right: 5px; }
.satellite-crm { bottom: 5px; left: 47px; }

.empty-canvas > * { position: relative; z-index: 1; }
.empty-canvas h3 { margin: 7px 0 8px; color: var(--white); font-size: 29px; font-weight: 480; letter-spacing: -.04em; }
.empty-copy { max-width: 465px; margin: 0 0 21px; color: var(--ash); font-size: 11px; line-height: 1.6; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--bone);
  background: var(--surface-soft);
  cursor: pointer;
  font-size: 10px;
  font-weight: 650;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.button:hover:not(:disabled) { transform: translateY(-1px); border-color: rgba(255,255,255,.27); background: rgba(255,255,255,.07); }
.button:disabled, .quiet-action:disabled { opacity: .45; cursor: wait; }
.button b { font-size: 14px; font-weight: 400; }
.button-large { min-height: 48px; padding: 0 21px; border-radius: 999px; }
.button-preview { border-color: rgba(146,129,247,.45); color: #f4f1ff; background: linear-gradient(125deg, rgba(111,156,255,.22), rgba(146,129,247,.3)); box-shadow: inset 0 1px 0 rgba(255,255,255,.09); }
.button-preview:hover:not(:disabled) { border-color: rgba(172,160,255,.72); background: linear-gradient(125deg, rgba(111,156,255,.3), rgba(146,129,247,.4)); }
.button-primary { border-color: #fff; color: #050609; background: #fff; }
.button-primary:hover:not(:disabled) { border-color: #ddd9ff; background: #ddd9ff; }
.button-quiet { background: rgba(255,255,255,.075); }
.button.full { width: 100%; }

.empty-foot {
  position: absolute;
  right: 25px;
  bottom: 22px;
  left: 25px;
  display: flex;
  justify-content: center;
  gap: 23px;
  color: var(--muted-deep);
  font-family: "Commit Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 8px;
}

.runtime-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 286px;
  gap: 14px;
  align-items: start;
}

.stage-stack { display: grid; gap: 12px; min-width: 0; }
.surface-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 68px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.surface-header h3 { margin: 5px 0 0; color: var(--bone); font-size: 14px; font-weight: 600; letter-spacing: -.015em; }

.graph-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 11px; color: var(--muted); font-size: 8px; }
.graph-legend span { display: inline-flex; align-items: center; gap: 5px; }
.graph-legend i { width: 5px; height: 5px; border-radius: 50%; }
.legend-reversible { background: var(--green); }
.legend-compensable { background: var(--amber); }
.legend-irreversible { background: var(--red); }

.graph-grid {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 14px;
  background:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 28px 28px;
}

.graph-lane {
  position: relative;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  gap: 17px;
  min-height: 131px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(20, 49, 84, .27);
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.graph-lane.landmine { border-color: rgba(255,141,140,.58); background: linear-gradient(90deg, rgba(133,45,62,.2), rgba(30,55,91,.18)); box-shadow: inset 0 0 0 1px rgba(255,141,140,.11), 0 0 24px rgba(130,36,52,.24); }
.lane-head { display: grid; gap: 7px; }
.lane-head div { display: flex; align-items: center; gap: 7px; }
.lane-head strong { color: var(--bone); font-size: 10px; font-weight: 650; }
.lane-head > span { color: var(--muted); font-size: 8px; }
.graph-lane.landmine .lane-head > span { color: var(--red); font-size: 10px; font-weight: 750; letter-spacing: -.01em; text-shadow: 0 0 12px rgba(255,141,140,.22); }
.lane-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--preview-blue); box-shadow: 0 0 9px rgba(111,156,255,.5); }
.landmine .lane-dot { background: var(--red); box-shadow: 0 0 9px rgba(255,141,140,.45); }

.node-chain { display: flex; align-items: center; min-width: 0; }

.effect-node {
  position: relative;
  flex: 1 1 0;
  min-width: 82px;
  max-width: 126px;
  min-height: 88px;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(31, 61, 101, .72), rgba(24, 45, 78, .6));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.09), 0 12px 24px rgba(35,58,89,.13);
  backdrop-filter: blur(16px);
  animation: node-in 420ms both;
  animation-delay: calc(var(--node-order, 0) * 90ms);
}

.node-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.node-icon { display: grid; place-items: center; width: 27px; height: 27px; border: 1px solid var(--line); border-radius: 8px; color: var(--ash); background: rgba(255,255,255,.035); }
.node-icon svg, .effect-icon svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.node-risk { width: 6px; height: 6px; border-radius: 50%; }
.risk-node-reversible .node-risk { background: var(--green); box-shadow: 0 0 8px rgba(58,211,137,.5); }
.risk-node-compensable .node-risk { background: var(--amber); box-shadow: 0 0 8px rgba(255,202,98,.5); }
.risk-node-irreversible .node-risk { background: var(--red); box-shadow: 0 0 8px rgba(255,141,140,.5); }
.effect-node strong { display: block; color: var(--bone); font-size: 9px; font-weight: 650; }
.effect-node > span:last-child { display: block; margin-top: 4px; color: var(--muted); font-size: 7px; }

.graph-edge {
  position: relative;
  flex: 0 1 37px;
  min-width: 18px;
  height: 1px;
  background: rgba(146,129,247,.38);
  overflow: visible;
}

.graph-edge::after { content: ""; position: absolute; right: -1px; top: -2px; width: 4px; height: 4px; border-top: 1px solid var(--preview); border-right: 1px solid var(--preview); transform: rotate(45deg); }
.graph-edge i { position: absolute; top: -1px; left: 0; width: 8px; height: 3px; border-radius: 4px; background: var(--preview); box-shadow: 0 0 8px var(--preview); animation: flow 2.1s ease-in-out infinite; }

.removed-lane {
  min-height: 95px;
  border-style: dashed;
  border-color: rgba(146,129,247,.22);
  background: rgba(98,111,184,.12);
  animation: branch-settle 320ms cubic-bezier(.2,.72,.2,1) both;
}

.removed-chain { opacity: .25; filter: grayscale(1); }
.removed-node { min-height: 64px; padding: 8px; border-style: dashed; box-shadow: none; }
.removed-node .node-top { margin-bottom: 5px; }
.removed-node strong, .removed-node > span:last-child { text-decoration: line-through; }
.constraint-stamp { position: absolute; right: 15px; top: 12px; padding: 5px 8px; border: 1px solid rgba(146,129,247,.23); border-radius: 999px; color: #b8afff; background: rgba(146,129,247,.08); font-size: 7px; text-transform: uppercase; letter-spacing: .08em; }

.motion-replay-out .graph-lane.landmine { transform-origin: center; animation: replay-branch-dim 180ms ease-out 420ms both; }
.motion-replay-out .graph-lane.landmine .effect-node { animation: replay-card-collapse 300ms cubic-bezier(.2,.72,.2,1) both; animation-delay: calc(var(--node-order, 0) * 120ms); }
.motion-replay-out .graph-lane.landmine .effect-node > span:last-child { animation: replay-label-out 180ms ease-out both; animation-delay: calc(var(--node-order, 0) * 120ms); }
.motion-replay-out .graph-lane.landmine .effect-node::after { content: "Branch removed"; position: absolute; left: 10px; bottom: 9px; color: var(--muted); font-size: 7px; opacity: 0; animation: replay-label-in 220ms ease-out both; animation-delay: calc(80ms + (var(--node-order, 0) * 120ms)); }

.blast-alert {
  display: grid;
  grid-template-columns: 37px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 15px;
  border: 1px solid rgba(255,141,140,.24);
  border-radius: 17px;
  background: linear-gradient(110deg, rgba(120, 41, 57, .34), rgba(38, 61, 99, .25));
  backdrop-filter: blur(18px);
}

.blast-alert.facts-only { grid-template-columns: 37px minmax(0, 1fr); }

.alert-mark { display: grid; place-items: center; width: 35px; height: 35px; border: 1px solid rgba(255,141,140,.25); border-radius: 11px; color: var(--red); background: rgba(255,100,101,.09); font-size: 14px; font-weight: 700; }
.blast-alert p { margin: 0 0 4px; color: var(--red); font-size: 8px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.blast-alert h3 { margin: 0; color: #fff0f0; font-size: 11px; font-weight: 600; line-height: 1.45; }
.blast-alert div > span { display: block; margin-top: 4px; color: rgba(255,236,238,.62); font-size: 8px; line-height: 1.45; }

.replay-banner {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px 15px;
  border: 1px solid rgba(146,129,247,.24);
  border-radius: 17px;
  background: linear-gradient(110deg, rgba(73, 124, 196, .34), rgba(99, 85, 171, .28));
  backdrop-filter: blur(18px);
}

.replay-symbol { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 50%; color: #0c0d13; background: #c5bdff; font-size: 13px; font-weight: 800; box-shadow: 0 0 20px rgba(146,129,247,.19); }
.replay-banner p { margin: 0 0 4px; color: #a9a0f3; font-size: 8px; text-transform: uppercase; letter-spacing: .1em; }
.replay-banner strong { color: var(--bone); font-size: 11px; font-weight: 600; }
.effect-reduction { display: flex; align-items: center; gap: 8px; color: var(--muted); font-family: "Commit Mono", "SFMono-Regular", Consolas, monospace; font-size: 8px; }
.effect-reduction strong { color: #c8c1ff; font-size: 9px; }
.motion-replay-in .effect-reduction s { position: relative; text-decoration: none; }
.motion-replay-in .effect-reduction s::after { content: ""; position: absolute; left: -1px; top: 50%; width: calc(100% + 2px); height: 1px; background: rgba(255,141,140,.78); transform: scaleX(0); transform-origin: left; animation: replay-strike 260ms ease-out 120ms both; }
.motion-replay-in .effect-reduction > strong { animation: replay-number-in 260ms cubic-bezier(.2,.72,.2,1) 330ms both; }

.ledger-header { min-height: 65px; }
.ledger-count { display: flex; align-items: baseline; gap: 6px; }
.ledger-count strong { color: var(--white); font-size: 18px; font-weight: 500; }
.ledger-count span { color: var(--muted); font-size: 8px; }
.effect-groups { display: grid; gap: 10px; padding: 12px; }
.effect-group { border: 1px solid var(--line); border-radius: var(--radius-card); background: rgba(18,48,83,.23); overflow: hidden; }
.effect-group.risky { border-color: rgba(255,141,140,.18); }

.effect-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 13px;
  border-bottom: 1px solid var(--line);
}

.effect-group-head div { display: flex; align-items: center; gap: 8px; }
.effect-group-head strong { color: var(--bone); font-size: 9px; }
.effect-group-head div span:last-child { color: var(--muted); font-size: 7px; }
.customer-marker { width: 6px; height: 6px; border-radius: 50%; background: var(--preview-blue); }
.risky .customer-marker { background: var(--red); }
.customer-value { color: var(--muted); font-size: 8px; }
.risky .customer-value { color: var(--red); }

.effect-row {
  display: grid;
  grid-template-columns: 31px minmax(145px, .75fr) minmax(205px, 1.25fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 65px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
}

.effect-row:last-child { border-bottom: 0; }
.effect-icon { display: grid; place-items: center; width: 29px; height: 29px; border: 1px solid var(--line); border-radius: 8px; color: var(--ash); background: rgba(255,255,255,.025); }
.effect-identity { min-width: 0; }
.effect-identity strong { display: -webkit-box; overflow: hidden; color: var(--bone); font-size: 9px; font-weight: 600; line-height: 1.35; overflow-wrap: break-word; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.effect-identity span { display: block; margin-top: 4px; color: var(--muted); font-family: "Commit Mono", "SFMono-Regular", Consolas, monospace; font-size: 7px; }
.effect-diff { min-width: 0; }
.time-diff { display: flex; align-items: center; gap: 7px; font-family: "Commit Mono", "SFMono-Regular", Consolas, monospace; font-size: 7px; }
.time-diff b { color: var(--muted-deep); font-weight: 400; }
.diff-before { color: #777d88; text-decoration: line-through; text-decoration-color: rgba(255,141,140,.5); }
.diff-after { color: #d8dae2; }
.mail-diff { display: grid; gap: 4px; min-width: 0; color: #c7cad2; font-size: 8px; }
.mail-diff span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-diff small { display: inline-block; width: 42px; color: var(--muted); font-size: 7px; }
.mail-recipient-line { display: flex; align-items: center; min-width: 0; }
.mail-recipient-line small { flex: 0 0 42px; }
.mail-recipient { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.external-chip { display: inline-flex; flex: 0 0 auto; align-items: center; min-height: 20px; margin-left: 7px; padding: 0 7px; border: 1px solid rgba(255,141,140,.24); border-radius: 999px; color: var(--red); background: var(--red-wash); font-size: 6.5px; font-style: normal; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }

.risk-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 22px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: .055em;
  text-transform: uppercase;
  white-space: nowrap;
}

.risk-pill i { width: 4px; height: 4px; border-radius: 50%; }
.risk-reversible { color: var(--green); border-color: rgba(58,211,137,.17); background: var(--green-wash); }
.risk-reversible i { background: var(--green); }
.risk-compensable { color: var(--amber); border-color: rgba(255,202,98,.17); background: var(--amber-wash); }
.risk-compensable i { background: var(--amber); }
.risk-irreversible { color: var(--red); border-color: rgba(255,141,140,.18); background: var(--red-wash); }
.risk-irreversible i { background: var(--red); }

.inspector {
  position: sticky;
  top: 74px;
  border-radius: 18px;
}

.inspector-section { padding: 15px; border-bottom: 1px solid var(--line); }
.inspector-section:last-child { border-bottom: 0; }
.inspector-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.inspector-head p, .inspector-label { margin: 0; color: var(--ash); font-size: 9px; font-weight: 650; }
.runtime-status { padding: 5px 7px; border-radius: 999px; font-size: 7px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.runtime-status.safe { color: var(--green); background: var(--green-wash); }
.runtime-status.committed { color: #bcb3ff; background: var(--preview-wash); }

.proof-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.proof-metrics article { display: grid; gap: 4px; padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.065); }
.proof-metrics strong { color: var(--bone); font-size: 17px; font-weight: 500; letter-spacing: -.04em; }
.proof-metrics strong.safe { color: var(--green); }
.proof-metrics span { color: var(--muted); font-size: 7px; }
.bindings { display: grid; gap: 11px; }
.binding { display: grid; gap: 4px; min-width: 0; }
.binding span { color: var(--muted); font-size: 7px; text-transform: uppercase; letter-spacing: .08em; }
.binding code { overflow: hidden; color: #b7bac5; font-family: "Commit Mono", "SFMono-Regular", Consolas, monospace; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.binding.invalid code { color: #8f6066; text-decoration: line-through; }
.sealed-roll { position: relative; display: block; width: 22px; height: 21px; }
.sealed-roll > span { position: absolute; inset: 0; }
.sealed-roll-new { opacity: 0; }
.motion-replay-in .sealed-roll-old { animation: sealed-count-out 240ms ease-out 170ms both; }
.motion-replay-in .sealed-roll-new { animation: sealed-count-in 280ms cubic-bezier(.2,.72,.2,1) 300ms both; }
.motion-replay-in .binding.invalid code { position: relative; text-decoration: none; }
.motion-replay-in .binding.invalid code::after { content: ""; position: absolute; left: 0; top: 50%; width: 100%; height: 1px; background: rgba(255,141,140,.7); transform: scaleX(0); transform-origin: left; animation: hash-strike 300ms ease-out 180ms both; }
.motion-replay-in .active-binding { animation: active-hash-in 280ms ease-out 430ms both; }

.decision-box { padding: 2px; }
.decision-box > p { margin: 0 0 6px; color: #a99ff4; font-size: 7px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.decision-box h4 { margin: 0 0 7px; color: var(--bone); font-size: 13px; font-weight: 600; letter-spacing: -.015em; }
.decision-box > span { display: block; margin-bottom: 13px; color: var(--muted); font-size: 8px; line-height: 1.5; }
.warning-decision > p { color: var(--red); }
.approved-decision > p, .verified-decision > p { color: var(--green); }
.decision-actions { display: grid; gap: 7px; }
.decision-abort { min-height: 28px; border: 0; color: rgba(255,141,140,.78); background: transparent; cursor: pointer; font: inherit; font-size: 8px; }
.decision-abort:hover:not(:disabled) { color: #ffc1c0; }
.decision-abort:disabled { opacity: .45; cursor: wait; }

.finale-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 305px;
  gap: 14px;
  animation: finale-in 650ms cubic-bezier(.2,.72,.2,1) both;
}

.ecosystem {
  min-height: 600px;
  background:
    radial-gradient(circle at 50% 48%, rgba(151, 137, 255, .23), transparent 25%),
    radial-gradient(circle at 17% 10%, rgba(128, 180, 255, .2), transparent 28%),
    linear-gradient(145deg, rgba(31, 67, 111, .48), rgba(22, 43, 76, .29));
}

.finale-header {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 76px;
  padding: 17px 19px;
  border-bottom: 1px solid var(--line);
}

.finale-header h3 { margin: 6px 0 0; color: var(--white); font-size: 17px; font-weight: 550; letter-spacing: -.025em; }
.finale-status { display: inline-flex; align-items: center; gap: 7px; padding: 7px 9px; border: 1px solid rgba(58,211,137,.18); border-radius: 999px; color: #a7f2cd; background: rgba(29,120,91,.12); font-size: 8px; font-weight: 650; white-space: nowrap; }
.finale-status i { width: 5px; height: 5px; border-radius: 50%; background: var(--green); box-shadow: 0 0 9px rgba(58,211,137,.8); }

.network-map {
  position: relative;
  min-height: 455px;
  overflow: hidden;
}

.network-grid {
  position: absolute;
  inset: 0;
  opacity: .32;
  background-image: radial-gradient(circle, rgba(255,255,255,.18) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(circle at 50% 49%, black 0%, transparent 74%);
}

.preview-core {
  position: absolute;
  z-index: 6;
  left: 50%;
  top: 49%;
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 36px;
  color: white;
  background: linear-gradient(145deg, rgba(91, 119, 201, .88), rgba(76, 65, 144, .68));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 25px 70px rgba(39,32,103,.35), 0 0 0 9px rgba(180,169,255,.06);
  transform: translate(-50%, -50%);
}

.core-halo { position: absolute; inset: -25px; z-index: -1; border: 1px solid rgba(185,177,255,.14); border-radius: 49px; animation: halo-pulse 3s ease-in-out infinite; }
.core-symbol { width: 39px; height: 39px; }
.preview-core strong { margin-top: -17px; font-size: 11px; letter-spacing: .14em; }
.preview-core small { margin-top: -25px; color: rgba(255,255,255,.58); font-size: 7px; letter-spacing: .08em; text-transform: uppercase; }

.network-node {
  position: absolute;
  z-index: 5;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 9px;
  width: 171px;
  min-height: 56px;
  padding: 9px;
  border-radius: 14px;
  transform: translate(-50%, -50%);
}

.verified-node { border: 1px solid rgba(255,255,255,.23); background: linear-gradient(135deg, rgba(38,77,125,.87), rgba(25,49,84,.73)); box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 17px 38px rgba(25,42,71,.22); backdrop-filter: blur(16px); }
.future-node { border: 1px dashed rgba(206,199,255,.28); color: rgba(255,255,255,.63); background: rgba(70,69,120,.14); backdrop-filter: blur(10px); }
.network-node-icon { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 10px; color: #daddff; background: rgba(255,255,255,.07); }
.network-node-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
.future-monogram { font-family: "Commit Mono", "SFMono-Regular", Consolas, monospace; font-size: 11px; font-weight: 700; }
.network-node div { display: grid; gap: 3px; min-width: 0; }
.network-node strong { color: var(--white); font-size: 9px; font-weight: 650; }
.network-node div span { overflow: hidden; color: var(--muted); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.future-node strong { color: rgba(255,255,255,.73); }
.node-check { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: #062016; background: var(--green); font-size: 8px; font-style: normal; font-weight: 900; box-shadow: 0 0 13px rgba(58,211,137,.25); }
.future-orbit { width: 6px; height: 6px; margin: auto; border: 1px solid #b8afff; border-radius: 50%; opacity: .75; }

.node-calendar { left: 50%; top: 13%; }
.node-mail { left: 22%; top: 72%; }
.node-crm { left: 78%; top: 72%; }
.node-files { left: 18%; top: 23%; }
.node-payments { left: 82%; top: 23%; }
.node-messaging { left: 50%; top: 91%; }

.network-path {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 49%;
  height: 1px;
  transform-origin: 0 50%;
}

.verified-path { background: linear-gradient(90deg, rgba(179,169,255,.75), rgba(58,211,137,.72)); box-shadow: 0 0 9px rgba(146,129,247,.35); }
.verified-path::after { content: ""; position: absolute; right: -2px; top: -2px; width: 5px; height: 5px; border-radius: 50%; background: var(--green); box-shadow: 0 0 9px var(--green); }
.verified-path i { position: absolute; top: -1px; left: 0; width: 10px; height: 3px; border-radius: 9px; background: #d4ceff; box-shadow: 0 0 10px #9281f7; animation: verified-flow 2.4s ease-in-out infinite; }
.future-path { height: 0; border-top: 1px dashed rgba(196,188,255,.28); }
.path-calendar { width: 142px; transform: rotate(-90deg); }
.path-mail { width: 222px; transform: rotate(153deg); }
.path-crm { width: 222px; transform: rotate(27deg); }
.path-files { width: 270px; transform: rotate(-151deg); }
.path-payments { width: 270px; transform: rotate(-29deg); }
.path-messaging { width: 190px; transform: rotate(90deg); }

.network-legend {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 17px;
  min-height: 51px;
  padding: 0 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 7px;
}

.network-legend span { display: inline-flex; align-items: center; gap: 6px; }
.network-legend i { width: 19px; height: 1px; }
.solid-key { background: linear-gradient(90deg, var(--preview), var(--green)); }
.dotted-key { border-top: 1px dashed #b8afff; }
.network-legend > strong { margin-left: auto; color: rgba(255,255,255,.72); font-size: 8px; font-weight: 600; }
.network-legend b { margin: 0 4px; color: #c3bbff; }

.finale-receipt {
  align-self: start;
  border-color: rgba(255,255,255,.2);
  background:
    radial-gradient(circle at 100% 0%, rgba(108, 164, 226, .22), transparent 40%),
    linear-gradient(155deg, rgba(20, 48, 83, .72), rgba(26, 39, 66, .55));
}

.receipt-hero { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 12px; padding: 18px 16px 16px; border-bottom: 1px solid var(--line); }
.receipt-seal { display: grid; place-items: center; width: 43px; height: 43px; border: 1px solid rgba(194,255,224,.32); border-radius: 14px; color: #062016; background: linear-gradient(145deg, #72e4ac, var(--green)); font-size: 15px; font-weight: 900; box-shadow: 0 0 28px rgba(58,211,137,.19); }
.receipt-hero h3 { margin: 5px 0 0; color: var(--white); font-size: 15px; font-weight: 520; line-height: 1.12; letter-spacing: -.025em; }
.receipt-score { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
.receipt-score article { display: grid; gap: 4px; padding: 13px 8px; border-right: 1px solid var(--line); text-align: center; }
.receipt-score article:last-child { border-right: 0; }
.receipt-score strong { color: #a7f2cd; font-size: 15px; font-weight: 550; }
.receipt-score span { color: var(--muted); font-size: 6.5px; }
.finale-effects { display: grid; gap: 0; }
.finale-effects article { display: grid; grid-template-columns: 19px 1fr auto; align-items: start; gap: 8px; padding: 11px 13px; border-bottom: 1px solid var(--line); }
.effect-check { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: var(--green); background: var(--green-wash); font-size: 8px; }
.finale-effects strong { display: block; color: var(--bone); font-size: 8px; text-transform: capitalize; }
.finale-effects p { margin: 4px 0 0; color: var(--muted); font-size: 7px; line-height: 1.4; }
.finale-effects b { color: var(--green); font-size: 7px; font-weight: 600; }
.receipt-bindings { display: grid; gap: 9px; padding: 13px; border-bottom: 1px solid var(--line); }
.receipt-bindings > p { margin: 0; color: var(--ash); font-size: 8px; font-weight: 650; }
.receipt-bindings > span { display: grid; gap: 3px; }
.receipt-bindings small { color: var(--muted); font-size: 6.5px; letter-spacing: .08em; text-transform: uppercase; }
.receipt-bindings code { overflow: hidden; color: #c4c1d8; font-family: "Commit Mono", "SFMono-Regular", Consolas, monospace; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.button.full.finale-reset { width: calc(100% - 26px); margin: 13px; }

.motion-commit-in .finale-layout { animation: none; }
.motion-commit-in .verified-node .node-check { animation: verified-check-in 240ms cubic-bezier(.2,.72,.2,1) both; }
.motion-commit-in .verified-node.node-calendar .node-check { animation-delay: 80ms; }
.motion-commit-in .verified-node.node-mail .node-check { animation-delay: 280ms; }
.motion-commit-in .verified-node.node-crm .node-check { animation-delay: 480ms; }
.motion-commit-in .finale-receipt { animation: receipt-enter 320ms cubic-bezier(.2,.72,.2,1) 720ms both; }
.motion-commit-in .finale-status { animation: verified-badge-in 320ms cubic-bezier(.2,.72,.2,1) 1050ms both; }

.commit-write-counter { position: relative; display: block; width: 24px; height: 25px; }
.write-tick { position: absolute; inset: 0; opacity: 0; transform-origin: center; }
.write-tick-0 { opacity: 1; animation: write-zero-out 150ms ease-out 80ms both; }
.write-tick-1 { animation: write-middle-tick 200ms ease-out 80ms both; }
.write-tick-2 { animation: write-middle-tick 200ms ease-out 280ms both; }
.write-tick-3 { animation: write-final-tick 240ms cubic-bezier(.2,.72,.2,1) 480ms both; }
.commit-label-crossfade { position: relative; min-width: 120px; min-height: 27px; }
.commit-label-crossfade > span { position: absolute; inset: 0; }
.commit-label-old { opacity: 1; animation: commit-label-out 220ms ease-out 250ms both; }
.commit-label-new { opacity: 0; animation: commit-label-in 240ms ease-out 390ms both; }

.abort-canvas { min-height: 520px; }
.abort-symbol { position: relative; width: 105px; height: 105px; margin-bottom: 12px; border: 1px solid rgba(255,255,255,.11); border-radius: 50%; }
.abort-symbol::before { content: ""; position: absolute; inset: 21px; border: 1px dashed rgba(255,255,255,.13); border-radius: 50%; }
.abort-symbol span { position: absolute; top: 50%; left: 50%; width: 35px; height: 1px; background: var(--red); transform: translate(-50%, -50%) rotate(-45deg); box-shadow: 0 0 10px rgba(255,141,140,.35); }

.boot-card {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 100vh;
  gap: 13px;
  color: var(--muted);
  font-size: 10px;
}

.boot-mark { border-color: var(--line-strong); background: var(--surface-raised); animation: breathe 1.5s ease-in-out infinite; }

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 100;
  max-width: 360px;
  padding: 12px 15px;
  border: 1px solid rgba(255,141,140,.26);
  border-radius: 11px;
  color: #f4d7d8;
  background: rgba(35,16,20,.94);
  box-shadow: 0 18px 55px rgba(0,0,0,.38);
  font-size: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
  transition: 200ms ease;
}

.toast.show { opacity: 1; transform: translateY(0); }
.loading .button, .loading .quiet-action { pointer-events: none; }
.loading .context-dot { animation: breathe 700ms ease-in-out infinite; }

.panel-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(10,18,34,.62);
  backdrop-filter: blur(18px);
}

.product-panel {
  width: min(920px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 24px;
  color: var(--bone);
  background: linear-gradient(145deg, rgba(38,73,123,.96), rgba(48,62,97,.96) 68%, rgba(87,72,78,.96));
  box-shadow: 0 30px 90px rgba(4,9,18,.48), inset 0 1px 0 rgba(255,255,255,.08);
}

.panel-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; padding: 24px 26px 20px; border-bottom: 1px solid var(--line); }
.panel-head h3 { margin: 5px 0 0; color: #fff; font-size: 24px; font-weight: 500; letter-spacing: -.025em; }
.panel-close { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; color: var(--ash); background: rgba(255,255,255,.04); cursor: pointer; font-size: 20px; line-height: 1; }
.panel-close:hover { color: #fff; background: rgba(255,255,255,.08); }
.authority-strip { display: flex; flex-wrap: wrap; gap: 9px 20px; padding: 12px 26px; border-bottom: 1px solid var(--line); color: var(--muted); font: 8px "Commit Mono", "SFMono-Regular", Consolas, monospace; }
.authority-strip span { display: flex; align-items: center; gap: 6px; }
.authority-strip i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px rgba(58,211,137,.45); }

.live-form { display: grid; gap: 14px; padding: 24px 26px 26px; }
.live-form label, .panel-section-label { color: #b8afff; font-size: 8px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.live-form textarea { width: 100%; min-height: 105px; resize: vertical; padding: 15px 16px; border: 1px solid rgba(255,255,255,.15); border-radius: 14px; outline: 0; color: #fff; background: rgba(7,18,36,.25); font: 13px/1.55 "DM Sans", system-ui, sans-serif; }
.live-form textarea:focus { border-color: rgba(146,129,247,.64); box-shadow: 0 0 0 3px rgba(146,129,247,.1); }
.sandbox-world { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.sandbox-world > div { display: flex; align-items: center; gap: 11px; min-height: 65px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; background: rgba(10,29,56,.2); }
.sandbox-world p { display: grid; gap: 4px; margin: 0; }
.sandbox-world strong { font-size: 10px; }
.sandbox-world small { color: var(--muted); font-size: 8px; }
.live-form .button { justify-self: start; }
.form-footnote, .panel-warning { margin: 0; color: var(--muted); font-size: 8px; line-height: 1.5; }
.panel-warning { padding: 10px 12px; border: 1px solid rgba(255,202,22,.2); border-radius: 10px; color: #e7d69a; background: rgba(255,202,22,.06); }

.live-result { display: grid; gap: 14px; padding: 22px 26px 26px; }
.live-result-proof { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.live-result-proof div { display: grid; gap: 7px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.035); }
.live-result-proof span { color: var(--muted); font-size: 7px; text-transform: uppercase; letter-spacing: .06em; }
.live-result-proof strong { font-size: 18px; font-weight: 500; }
.live-intent { padding: 12px 14px; border-left: 2px solid var(--preview); background: rgba(146,129,247,.055); }
.live-intent small, .live-trace small { display: block; margin-bottom: 5px; color: var(--muted); font-size: 7px; text-transform: uppercase; letter-spacing: .08em; }
.live-intent p, .live-output { margin: 0; font-size: 10px; line-height: 1.55; }
.live-effects { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; }
.live-effect { display: grid; grid-template-columns: 31px minmax(145px,.8fr) minmax(205px,1.2fr) auto; align-items: center; gap: 11px; min-height: 68px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.live-effect:last-child { border-bottom: 0; }
.live-effect > div:nth-child(2) { display: grid; gap: 4px; min-width: 0; }
.live-effect > div:nth-child(2) strong { overflow: hidden; color: var(--bone); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.live-effect > div:nth-child(2) span { color: var(--muted); font: 7px "Commit Mono", "SFMono-Regular", Consolas, monospace; }
.live-trace { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.live-trace > div:first-child span { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.live-trace code { color: #d8d2ff; font: 7px "Commit Mono", "SFMono-Regular", Consolas, monospace; }
.live-trace b { color: var(--muted-deep); font-size: 8px; }
.live-output { color: var(--muted); }
.live-result-actions { display: flex; flex-wrap: wrap; gap: 9px; }

.live-bridge-banner {
  display: grid;
  grid-template-columns: 45px minmax(0,1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  border: 1px solid rgba(146,129,247,.24);
  border-radius: 18px;
  background: linear-gradient(110deg, rgba(83,136,228,.12), rgba(146,129,247,.13));
}

.live-bridge-banner p { margin: 0 0 5px; color: #b8afff; font-size: 8px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.live-bridge-banner strong { font-size: 13px; font-weight: 600; }
.live-zero-write { color: var(--green); font: 9px "Commit Mono", "SFMono-Regular", Consolas, monospace; }
.live-review-ledger .live-effects { margin: 15px 18px 18px; }
.live-review-trace { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; padding: 18px; }
.live-review-trace > div { min-width: 0; }
.live-review-trace span { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; color: var(--ash); font-size: 9px; line-height: 1.55; }
.live-review-trace code { color: #d8d2ff; font: 8px "Commit Mono", "SFMono-Regular", Consolas, monospace; }
.live-review-trace b { color: var(--muted-deep); font-size: 8px; }
.live-review-inspector .inspector-section:last-child { border-bottom: 0; }

.evidence-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 16px; padding: 24px 26px; }
.evidence-grid > section:first-child { display: grid; align-content: start; gap: 8px; }
.evidence-row { display: grid; grid-template-columns: 8px 1fr; gap: 10px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.025); }
.evidence-row > i { width: 6px; height: 6px; margin-top: 4px; border-radius: 50%; background: var(--green); }
.evidence-row div { display: grid; gap: 4px; }
.evidence-row strong { font-size: 10px; }
.evidence-row span { color: var(--muted); font-size: 8px; line-height: 1.5; }
.certification-card { overflow: hidden; border: 1px solid rgba(58,211,137,.2); border-radius: 15px; background: linear-gradient(145deg, rgba(22,73,72,.2), rgba(13,35,63,.28)); }
.certification-card > p, .certification-card > h4, .certification-card > span { margin-inline: 16px; }
.certification-card > p { margin-top: 16px; }
.certification-card h4 { margin-top: 14px; margin-bottom: 4px; color: var(--green); font: 20px "Commit Mono", "SFMono-Regular", Consolas, monospace; }
.certification-card > span { display: block; color: var(--muted); font-size: 8px; line-height: 1.45; }
.certification-effects { margin-top: 15px; border-top: 1px solid var(--line); }
.certification-effects p { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 7px; min-height: 48px; margin: 0; padding: 0 14px; border-bottom: 1px solid var(--line); }
.certification-effects i { display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; color: #05241a; background: var(--green); font-style: normal; font-size: 10px; }
.certification-effects strong { font-size: 9px; }
.certification-effects span { color: var(--green); font-size: 7px; }
.certification-card footer { display: grid; grid-template-columns: repeat(2,1fr); }
.certification-card footer span { display: grid; place-items: center; gap: 3px; min-height: 62px; color: var(--muted); font-size: 7px; }
.certification-card footer span:first-child { border-right: 1px solid var(--line); }
.certification-card footer strong { color: var(--green); font-size: 18px; }
.truth-note { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 14px 26px 18px; border-top: 1px solid var(--line); }
.truth-note strong { color: #fff; font-size: 9px; }
.truth-note span { color: var(--muted); font-size: 8px; line-height: 1.45; }

@keyframes slow-spin { to { transform: rotate(360deg); } }
@keyframes flow { 0% { left: 0; opacity: 0; } 25%, 70% { opacity: 1; } 100% { left: calc(100% - 8px); opacity: 0; } }
@keyframes node-in { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes branch-settle { from { opacity: 0; transform: translateY(-4px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes breathe { 50% { opacity: .55; transform: scale(.96); } }
@keyframes finale-in { from { opacity: 0; transform: translateY(12px); filter: blur(5px); } to { opacity: 1; transform: translateY(0); filter: blur(0); } }
@keyframes halo-pulse { 50% { inset: -32px; opacity: .45; } }
@keyframes verified-flow { 0% { left: 3%; opacity: 0; } 18%, 75% { opacity: 1; } 100% { left: calc(100% - 10px); opacity: 0; } }
@keyframes replay-card-collapse { from { opacity: 1; transform: scale(1); } to { opacity: .55; transform: scale(.98); } }
@keyframes replay-branch-dim { from { opacity: 1; transform: scale(1); } to { opacity: .55; transform: scale(.98); } }
@keyframes replay-label-out { to { opacity: 0; transform: translateY(-2px); } }
@keyframes replay-label-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
@keyframes replay-strike { to { transform: scaleX(1); } }
@keyframes hash-strike { to { transform: scaleX(1); } }
@keyframes replay-number-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes sealed-count-out { to { opacity: 0; transform: translateY(-7px); } }
@keyframes sealed-count-in { from { opacity: 0; transform: translateY(7px) scale(.9); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes active-hash-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes verified-check-in { from { opacity: 0; transform: scale(.5); } to { opacity: 1; transform: scale(1); } }
@keyframes receipt-enter { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: translateX(0); } }
@keyframes verified-badge-in { 0% { opacity: 0; transform: scale(.96); } 58% { opacity: 1; transform: scale(1.035); } 100% { opacity: 1; transform: scale(1); } }
@keyframes write-zero-out { to { opacity: 0; transform: scale(.88); } }
@keyframes write-middle-tick { 0% { opacity: 0; transform: scale(.72); } 28%, 72% { opacity: 1; transform: scale(1.08); } 100% { opacity: 0; transform: scale(.92); } }
@keyframes write-final-tick { from { opacity: 0; transform: scale(.72); } 55% { opacity: 1; transform: scale(1.08); } to { opacity: 1; transform: scale(1); } }
@keyframes commit-label-out { to { opacity: 0; transform: translateY(-3px); } }
@keyframes commit-label-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1260px) {
  .app-frame { grid-template-columns: 280px minmax(0, 1fr); }
  .narrative-rail { padding-inline: 22px; }
  .rail-story h1 { font-size: 34px; }
  .runtime-layout { grid-template-columns: 1fr; }
  .inspector { position: static; display: grid; grid-template-columns: 1fr 1fr 1fr; }
  .inspector-section { border-right: 1px solid var(--line); border-bottom: 0; }
  .inspector-section:last-child { border-right: 0; }
  .finale-layout { grid-template-columns: 1fr; }
  .finale-receipt { width: 100%; }
}

@media (max-width: 920px) {
  .shell { padding: 0; }
  .app-frame { grid-template-columns: 1fr; min-height: 100vh; border-width: 0; border-radius: 0; }
  .narrative-rail { min-height: auto; padding: 20px; }
  .rail-story { margin-top: 35px; }
  .rail-story h1, .rail-copy { max-width: 620px; }
  .instruction-card { max-width: 720px; }
  .journey { margin-top: 22px; }
  .journey-title { display: none; }
  .journey { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
  .journey-step { display: flex; justify-content: space-between; min-height: 35px; padding: 0 8px; border-left: 0; border-bottom: 2px solid transparent; }
  .journey-step.active { border-bottom-color: #fff; background: rgba(255,255,255,.1); }
  .journey-label { display: none; }
  .journey-short { display: inline; }
  .rail-footer { margin-top: 22px; }
  .runtime-stage::before { display: none; }
  .stage-bar { position: relative; }
}

@media (max-width: 680px) {
  .stage-content { padding: 24px 13px 55px; }
  .stage-bar { padding: 0 14px; }
  .stage-tool { display: none; }
  .isolation-chip { display: none; }
  .stage-intro { align-items: start; flex-direction: column; }
  .stage-proof { width: 100%; }
  .empty-canvas { min-height: 550px; }
  .graph-lane { grid-template-columns: 1fr; }
  .node-chain { width: 100%; }
  .graph-legend { display: none; }
  .blast-alert { grid-template-columns: 35px 1fr; }
  .blast-alert .button { grid-column: 1 / -1; width: 100%; }
  .effect-row { grid-template-columns: 29px 1fr auto; }
  .product-panel { max-height: calc(100vh - 24px); border-radius: 18px; }
  .panel-backdrop { padding: 12px; }
  .panel-head, .live-form, .live-result { padding-inline: 16px; }
  .live-result-proof { grid-template-columns: repeat(2, 1fr); }
  .live-effect { grid-template-columns: 29px 1fr auto; }
  .live-effect > .time-diff, .live-effect > .mail-diff { grid-column: 2 / -1; }
  .live-bridge-banner { grid-template-columns: 40px 1fr; }
  .live-zero-write { grid-column: 2; }
  .live-review-trace { grid-template-columns: 1fr; }
  .evidence-grid { grid-template-columns: 1fr; padding-inline: 16px; }
  .effect-diff { grid-column: 2 / -1; }
  .inspector { grid-template-columns: 1fr; }
  .inspector-section { border-right: 0; border-bottom: 1px solid var(--line); }
  .receipt-main { grid-template-columns: 43px 1fr; }
  .receipt-resolution { grid-column: 2; }
  .receipt-effects { grid-template-columns: 1fr; }
  .network-map { min-height: 485px; }
  .network-node { width: 155px; }
  .node-files { left: 16%; }
  .node-payments { left: 84%; }
  .node-mail { left: 20%; }
  .node-crm { left: 80%; }
  .network-legend { flex-wrap: wrap; gap: 7px 15px; padding-block: 11px; }
  .network-legend > strong { width: 100%; margin-left: 0; }
}

@media (max-width: 480px) {
  .narrative-rail { padding-inline: 15px; }
  .rail-story h1 { font-size: 31px; }
  .journey-step { padding-inline: 5px; }
  .journey-short { font-size: 8px; }
  .journey-number { display: none; }
  .stage-context .context-divider, .stage-context span:last-child { display: none; }
  .empty-foot { flex-wrap: wrap; gap: 7px 14px; }
  .graph-lane { padding-inline: 10px; }
  .effect-node { min-width: 70px; padding: 8px; }
  .graph-edge { min-width: 10px; }
  .replay-banner { grid-template-columns: 32px 1fr; }
  .effect-reduction { grid-column: 2; }
  .surface-header { align-items: start; flex-direction: column; padding-block: 14px; }
  .finale-header { align-items: start; flex-direction: column; }
  .network-map { min-height: 540px; }
  .network-node { grid-template-columns: 29px minmax(0, 1fr) 16px; width: 137px; min-height: 51px; padding: 7px; }
  .network-node-icon { width: 29px; height: 29px; }
  .preview-core { width: 112px; height: 112px; border-radius: 31px; }
  .node-calendar { top: 12%; }
  .node-files { left: 18%; top: 27%; }
  .node-payments { left: 82%; top: 27%; }
  .node-mail { left: 20%; top: 70%; }
  .node-crm { left: 80%; top: 70%; }
  .node-messaging { top: 90%; }
  .path-calendar { width: 158px; }
  .path-mail, .path-crm { width: 170px; }
  .path-files, .path-payments { width: 185px; }
  .path-messaging { width: 220px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; transition: none !important; }
  .sealed-roll-old, .write-tick-0, .write-tick-1, .write-tick-2, .commit-label-old { opacity: 0 !important; }
  .sealed-roll-new, .write-tick-3, .commit-label-new, .motion-commit-in .verified-node .node-check, .motion-commit-in .finale-receipt, .motion-commit-in .finale-status { opacity: 1 !important; transform: none !important; }
}
