:root {
  color-scheme: dark;
  --ink: #f4f7fb;
  --muted: #95a2b7;
  --dim: #66758d;
  --bg: #050812;
  --panel: rgba(10, 15, 29, 0.9);
  --panel-solid: #0a101e;
  --panel-raised: #0e1729;
  --line: rgba(137, 160, 196, 0.19);
  --line-strong: rgba(137, 160, 196, 0.34);
  --cyan: #69daf0;
  --cyan-soft: rgba(105, 218, 240, 0.13);
  --mint: #79e6b5;
  --mint-soft: rgba(121, 230, 181, 0.12);
  --amber: #f6c76a;
  --amber-soft: rgba(246, 199, 106, 0.13);
  --coral: #ff8b7d;
  --coral-soft: rgba(255, 139, 125, 0.13);
  --violet: #bba7ff;
  --violet-soft: rgba(187, 167, 255, 0.13);
  --radius: 18px;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", ui-monospace, monospace;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% -8%, rgba(105, 218, 240, 0.12), transparent 32rem),
    radial-gradient(circle at 90% 13%, rgba(187, 167, 255, 0.08), transparent 35rem),
    var(--bg);
  font: 14px/1.45 var(--sans);
}

button,
input,
select {
  font: inherit;
}

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

button {
  color: inherit;
}

a {
  color: inherit;
}

code,
pre,
kbd,
output {
  font-family: var(--mono);
}

#universe {
  position: fixed;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  opacity: 0.72;
  pointer-events: none;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background:
    linear-gradient(rgba(5, 8, 18, 0.18), rgba(5, 8, 18, 0.9)),
    linear-gradient(90deg, rgba(105, 218, 240, 0.025) 1px, transparent 1px),
    linear-gradient(rgba(105, 218, 240, 0.025) 1px, transparent 1px);
  background-size: auto, 56px 56px, 56px 56px;
  mask-image: linear-gradient(to bottom, black, transparent 76%);
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  transform: translateY(-140%);
  border-radius: 8px;
  padding: 8px 12px;
  color: #041017;
  background: var(--cyan);
  font-weight: 800;
  text-decoration: none;
}

.skip-link:focus {
  transform: none;
}

.app-shell {
  width: min(1540px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
}

.product-mark {
  position: relative;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border: 1px solid rgba(105, 218, 240, 0.45);
  border-radius: 14px;
  background:
    radial-gradient(circle at 68% 28%, var(--cyan), transparent 11%),
    linear-gradient(145deg, rgba(105, 218, 240, 0.16), rgba(187, 167, 255, 0.08));
  box-shadow: inset 0 0 22px rgba(105, 218, 240, 0.08), 0 0 34px rgba(105, 218, 240, 0.06);
}

.product-mark span {
  position: absolute;
  left: 10px;
  width: 27px;
  height: 1px;
  background: var(--cyan);
  transform-origin: left;
}

.product-mark span:nth-child(1) {
  top: 14px;
  transform: rotate(14deg);
}

.product-mark span:nth-child(2) {
  top: 24px;
  width: 21px;
  transform: rotate(-20deg);
}

.product-mark span:nth-child(3) {
  top: 32px;
  width: 23px;
  transform: rotate(9deg);
}

.kicker {
  margin: 0 0 3px;
  color: var(--cyan);
  font: 800 10px/1.3 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.subtitle {
  margin: 4px 0 0;
  color: #bac5d6;
  font-size: 12px;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.release-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px 9px;
}

.release-nav-primary {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(5, 9, 19, 0.78);
}

.release-nav-primary a {
  display: grid;
  align-content: center;
  gap: 2px;
  min-height: 43px;
  padding: 7px 11px;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}

.release-nav-primary a + a {
  border-left: 1px solid var(--line);
}

.release-nav-primary a:hover,
.release-nav-primary a:focus-visible {
  color: var(--cyan);
  outline: none;
}

.release-nav-primary a[aria-current="page"] {
  color: #041017;
  background: var(--cyan);
}

.release-nav-primary a > span {
  color: inherit;
  font: 800 10px/1 var(--mono);
}

.release-nav-primary small {
  color: inherit;
  font: 750 7px/1.15 var(--mono);
  letter-spacing: 0.01em;
  opacity: 0.78;
}

.release-nav-cue {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font: 750 8px/1.2 var(--mono);
  letter-spacing: 0.04em;
  white-space: nowrap;
  opacity: 0.72;
}

.release-nav-cue i {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 8px rgba(121, 230, 181, 0.52);
}

.mode-tabs {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(5, 9, 19, 0.78);
}

.mode-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  text-decoration: none;
}

.mode-tab.active {
  color: #041017;
  background: var(--cyan);
  font-weight: 800;
}

.local-status,
.version-link,
.pill,
.receipt-id {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--muted);
  background: rgba(5, 9, 19, 0.78);
  font-size: 11px;
  white-space: nowrap;
}

.local-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 10px currentColor;
}

.local-status.online {
  color: #b9f7d7;
  border-color: rgba(121, 230, 181, 0.3);
}

.local-status.online i {
  background: var(--mint);
}

.local-status.offline {
  color: #ffc4bc;
  border-color: rgba(255, 139, 125, 0.34);
}

.local-status.offline i {
  background: var(--coral);
}

.version-link {
  text-decoration: none;
  transition: color 130ms ease, border-color 130ms ease, transform 130ms ease;
}

.version-link:hover {
  color: var(--cyan);
  border-color: rgba(105, 218, 240, 0.46);
  transform: translateY(-1px);
}

.surface {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(13, 20, 37, 0.94), rgba(7, 12, 24, 0.92));
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.workflow-guide {
  display: grid;
  grid-template-columns: minmax(240px, 0.78fr) minmax(430px, 1.45fr) minmax(300px, 0.92fr);
  align-items: stretch;
  gap: 12px;
  padding: 12px;
  border-color: rgba(105, 218, 240, 0.34);
  background:
    linear-gradient(110deg, rgba(105, 218, 240, 0.09), transparent 30%),
    linear-gradient(145deg, rgba(13, 20, 37, 0.97), rgba(7, 12, 24, 0.95));
}

.workflow-guide-heading {
  align-self: center;
  padding: 2px 4px;
}

.workflow-guide-heading h2 {
  margin: 0;
  color: #f0f6fc;
  font-size: clamp(18px, 1.65vw, 24px);
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.workflow-guide-heading > p:last-child {
  max-width: 390px;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.workflow-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(92px, 1fr));
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.workflow-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  color: var(--dim);
  background: rgba(4, 9, 18, 0.7);
  opacity: 0.72;
  transition: opacity 120ms ease, border-color 120ms ease, background 120ms ease;
}

.workflow-step > span:last-child,
.workflow-step strong,
.workflow-step output {
  display: block;
  min-width: 0;
}

.workflow-step strong {
  overflow: hidden;
  color: #c6d2df;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-step output {
  margin-top: 2px;
  overflow: hidden;
  color: currentColor;
  font: 750 8px/1.25 var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-shape {
  display: grid;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid currentColor;
  background: rgba(255, 255, 255, 0.025);
  font: 900 15px/1 var(--mono);
}

.workflow-shape.square {
  border-radius: 6px;
  color: var(--cyan);
}

.workflow-shape.diamond {
  border-radius: 9px;
  color: var(--amber);
}

.workflow-shape.triangle {
  border-radius: 50%;
  color: var(--violet);
}

.workflow-shape.circle {
  border-radius: 50%;
  color: var(--mint);
}

.workflow-step.active,
.workflow-step.done,
.workflow-step.blocked {
  opacity: 1;
}

.workflow-step.active {
  color: var(--cyan);
  border-color: rgba(105, 218, 240, 0.42);
  background: var(--cyan-soft);
  box-shadow: inset 0 -2px 0 var(--cyan);
}

#workflow-step-inspect.active {
  color: var(--amber);
  border-color: rgba(246, 199, 106, 0.42);
  background: var(--amber-soft);
  box-shadow: inset 0 -2px 0 var(--amber);
}

#workflow-step-resolve.active {
  color: var(--violet);
  border-color: rgba(187, 167, 255, 0.42);
  background: var(--violet-soft);
  box-shadow: inset 0 -2px 0 var(--violet);
}

#workflow-step-harmonize.active {
  color: var(--mint);
  border-color: rgba(121, 230, 181, 0.42);
  background: var(--mint-soft);
  box-shadow: inset 0 -2px 0 var(--mint);
}

.workflow-step.done {
  color: var(--mint);
  border-color: rgba(121, 230, 181, 0.27);
}

.workflow-step.done .workflow-shape {
  color: var(--mint);
  background: var(--mint-soft);
}

.workflow-step.blocked {
  color: var(--coral);
  border-color: rgba(255, 139, 125, 0.38);
  background: var(--coral-soft);
  box-shadow: inset 0 -2px 0 var(--coral);
}

.workflow-next {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-width: 0;
  border: 1px solid rgba(105, 218, 240, 0.28);
  border-radius: 11px;
  padding: 8px;
  background: rgba(3, 9, 18, 0.76);
}

.workflow-next-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 10px;
  color: var(--cyan);
  background: var(--cyan-soft);
  font: 900 17px/1 var(--mono);
}

.workflow-next-copy,
.workflow-next-copy small,
.workflow-next-copy strong,
.workflow-next-copy > span {
  display: block;
  min-width: 0;
}

.workflow-next-copy small {
  color: var(--cyan);
  font: 800 8px/1.2 var(--mono);
  letter-spacing: 0.12em;
}

.workflow-next-copy strong {
  margin-top: 2px;
  overflow: hidden;
  color: #edf4fc;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-next-copy > span {
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-next .button.primary {
  min-height: 38px;
  max-width: 175px;
  padding: 7px 12px;
  font-size: 10px;
}

.workflow-next[data-state="inspect"] {
  border-color: rgba(246, 199, 106, 0.36);
}

.workflow-next[data-state="inspect"] .workflow-next-mark {
  color: var(--amber);
  background: var(--amber-soft);
}

.workflow-next[data-state="resolve"] {
  border-color: rgba(187, 167, 255, 0.36);
}

.workflow-next[data-state="resolve"] .workflow-next-mark {
  color: var(--violet);
  background: var(--violet-soft);
}

.workflow-next[data-state="blocked"] {
  border-color: rgba(255, 139, 125, 0.4);
  background: var(--coral-soft);
}

.workflow-next[data-state="blocked"] .workflow-next-mark {
  color: var(--coral);
  background: rgba(255, 139, 125, 0.08);
}

.workflow-next[data-state="ready"] {
  border-color: rgba(121, 230, 181, 0.4);
  background: var(--mint-soft);
}

.workflow-next[data-state="ready"] .workflow-next-mark {
  color: var(--mint);
  background: rgba(121, 230, 181, 0.08);
}

.workflow-next[data-state="ready"] .button.primary {
  border-color: var(--mint);
  background: var(--mint);
  box-shadow: 0 8px 28px rgba(121, 230, 181, 0.14);
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(330px, 0.72fr);
  gap: 14px;
  margin-top: 12px;
}

.mission-card,
.source-card,
.review-flow,
.batch-overview,
.pipeline,
.adapters-panel,
.evidence-panel,
.timeline-panel,
.compile-dock {
  padding: 16px;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 13px;
}

.section-heading h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.025em;
}

.pill {
  min-height: 28px;
  padding: 4px 9px;
  font-family: var(--mono);
}

.pill.accent {
  color: var(--cyan);
  border-color: rgba(105, 218, 240, 0.32);
  background: var(--cyan-soft);
}

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

.arcade-heading h2 {
  max-width: 760px;
  font-size: clamp(20px, 2.25vw, 31px);
  line-height: 1.08;
}

.arcade-badges {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
}

.live-pill {
  color: var(--mint);
  border-color: rgba(121, 230, 181, 0.32);
  background: var(--mint-soft);
  font-family: var(--mono);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.live-pill i,
.live-signal i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(121, 230, 181, 0.1), 0 0 14px rgba(121, 230, 181, 0.72);
}

.sim-stage {
  position: relative;
  min-height: 390px;
  overflow: hidden;
  border: 1px solid rgba(105, 218, 240, 0.18);
  border-radius: 14px;
  background: #050914;
}

#sim-canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 390px;
  outline: none;
  cursor: crosshair;
  touch-action: none;
}

#sim-canvas:focus-visible {
  box-shadow: inset 0 0 0 2px var(--cyan);
}

.sim-hud {
  position: absolute;
  top: 11px;
  left: 11px;
  right: 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}

.sim-hud span,
.sim-legend {
  border: 1px solid rgba(137, 160, 196, 0.22);
  border-radius: 7px;
  padding: 5px 8px;
  color: #bfd0e8;
  background: rgba(3, 7, 16, 0.72);
  font: 800 9px/1.2 var(--mono);
  letter-spacing: 0.09em;
}

.sim-hud span:first-child {
  color: var(--cyan);
}

.sim-legend {
  position: absolute;
  right: 11px;
  bottom: 11px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  pointer-events: none;
}

.sim-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.sim-legend i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.legend-robot {
  background: var(--cyan);
}

.legend-object {
  background: var(--amber);
}

.legend-goal {
  border: 1px solid var(--mint);
}

.instruction-router {
  position: relative;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid rgba(105, 218, 240, 0.38);
  border-radius: 14px;
  padding: 13px;
  background:
    linear-gradient(115deg, rgba(105, 218, 240, 0.12), transparent 38%),
    linear-gradient(160deg, rgba(18, 30, 53, 0.98), rgba(8, 14, 27, 0.97));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025), 0 16px 42px rgba(0, 0, 0, 0.18);
}

.instruction-router::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  content: "";
  background: linear-gradient(var(--cyan), var(--violet));
}

.instruction-label,
.instruction-footer,
.live-board-heading,
.live-feed-heading,
.stream-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.instruction-label {
  margin: 0 0 7px 3px;
}

.instruction-label label {
  color: #eaf9fc;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.01em;
}

.instruction-label span {
  border: 1px solid rgba(105, 218, 240, 0.3);
  border-radius: 999px;
  padding: 3px 7px;
  color: var(--cyan);
  background: var(--cyan-soft);
  font: 800 8px/1.2 var(--mono);
  letter-spacing: 0.1em;
}

.instruction-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.instruction-row input {
  min-height: 48px;
  border-color: rgba(105, 218, 240, 0.42);
  padding: 10px 13px;
  color: #f4fcff;
  background: rgba(4, 10, 21, 0.86);
  font-size: 14px;
  box-shadow: inset 0 0 24px rgba(105, 218, 240, 0.025);
}

.instruction-row input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(105, 218, 240, 0.11);
}

.button.instruction-submit {
  min-height: 48px;
  border-color: rgba(105, 218, 240, 0.76);
  padding-inline: 17px;
  color: #031116;
  background: var(--cyan);
  font-weight: 850;
}

.instruction-footer {
  align-items: flex-start;
  margin: 7px 3px 0;
  color: var(--muted);
  font-size: 9px;
}

.instruction-footer small {
  max-width: 720px;
}

.instruction-footer output {
  flex: 0 1 auto;
  color: #cfe7ef;
  text-align: right;
}

.instruction-footer output.accepted {
  color: var(--mint);
}

.instruction-footer output.rejected {
  color: var(--amber);
}

.instruction-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 9px 3px 0;
}

.instruction-presets button {
  min-height: 27px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--muted);
  background: rgba(6, 12, 24, 0.72);
  cursor: pointer;
  font-size: 9px;
}

.instruction-presets button:hover {
  color: var(--cyan);
  border-color: rgba(105, 218, 240, 0.42);
}

.live-causal-board {
  margin-top: 12px;
  border: 1px solid rgba(137, 160, 196, 0.22);
  border-radius: 14px;
  padding: 13px;
  background: rgba(4, 8, 18, 0.72);
}

.live-board-heading {
  margin-bottom: 10px;
}

.live-board-heading h3,
.live-feed-heading h3 {
  margin: 0;
}

.live-board-heading h3 {
  font-size: 16px;
  letter-spacing: -0.02em;
}

.live-signal {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--mint);
  font: 800 9px/1.2 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.live-stream-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.live-stream {
  --stream-color: var(--cyan);
  min-width: 0;
  border: 1px solid var(--line);
  border-top: 2px solid var(--stream-color);
  border-radius: 10px;
  padding: 10px;
  background: linear-gradient(180deg, rgba(17, 27, 47, 0.92), rgba(7, 13, 25, 0.88));
}

.live-stream.critic {
  --stream-color: var(--amber);
}

.live-stream.coach {
  --stream-color: var(--violet);
}

.live-stream.action {
  --stream-color: var(--mint);
}

.stream-heading {
  margin-bottom: 8px;
}

.stream-heading span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--stream-color);
  font: 850 9px/1.2 var(--mono);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.stream-heading i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--stream-color);
  box-shadow: 0 0 10px var(--stream-color);
}

.stream-heading b {
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 2px 5px;
  color: var(--muted);
  font: 700 7px/1.2 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.live-stream > strong,
.live-stream > small {
  display: block;
}

.live-stream > strong {
  min-height: 38px;
  color: #e4edf8;
  font-size: 11px;
  line-height: 1.42;
}

.live-stream > small {
  margin-top: 7px;
  color: var(--dim);
  font: 500 8px/1.35 var(--mono);
}

.live-feed-panel {
  margin-top: 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(2, 6, 14, 0.62);
}

.live-feed-heading {
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
}

.live-feed-heading h3 {
  color: #cbd7e6;
  font-size: 11px;
}

.live-feed-heading output {
  color: var(--dim);
  font-size: 8px;
}

.live-feed {
  display: grid;
  max-height: 212px;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

.feed-event {
  --stream-color: var(--cyan);
  display: grid;
  grid-template-columns: 62px 74px minmax(0, 1fr);
  align-items: baseline;
  gap: 8px;
  border-left: 2px solid var(--stream-color);
  border-bottom: 1px solid rgba(137, 160, 196, 0.11);
  padding: 7px 10px 7px 8px;
}

.feed-event:last-child {
  border-bottom: 0;
}

.feed-event.critic {
  --stream-color: var(--amber);
}

.feed-event.coach {
  --stream-color: var(--violet);
}

.feed-event.action {
  --stream-color: var(--mint);
}

.feed-event time,
.feed-channel,
.feed-event small {
  font-family: var(--mono);
}

.feed-event time {
  color: var(--dim);
  font-size: 8px;
}

.feed-channel {
  color: var(--stream-color);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.07em;
}

.feed-event strong {
  min-width: 0;
  color: #d8e4f1;
  font-size: 9px;
  font-weight: 650;
}

.feed-event small {
  grid-column: 3;
  color: var(--dim);
  font-size: 7px;
}

.causal-loop {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1.15fr auto 1fr;
  align-items: stretch;
  gap: 7px;
  margin-top: 10px;
}

.causal-loop > div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 9px;
  background: rgba(7, 12, 23, 0.68);
}

.causal-loop > i {
  align-self: center;
  color: var(--dim);
  font-style: normal;
}

.causal-loop span,
.causal-loop strong {
  display: block;
}

.causal-loop span {
  margin-bottom: 3px;
  color: var(--dim);
  font: 800 8px/1.2 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.causal-loop strong {
  overflow: hidden;
  color: #d8e2f1;
  font-size: 10px;
  line-height: 1.35;
  text-overflow: ellipsis;
}

.causal-loop .coach-step {
  border-color: rgba(187, 167, 255, 0.34);
  background: var(--violet-soft);
}

.causal-loop .coach-step span {
  color: var(--violet);
}

.sim-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 11px;
}

.control-copy strong,
.control-copy span {
  display: block;
}

.control-copy strong {
  font-size: 12px;
}

.control-copy span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

kbd {
  display: inline-grid;
  min-width: 18px;
  min-height: 17px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 4px;
  color: #dce7f5;
  background: #101a2d;
  font-size: 9px;
}

.control-buttons,
.compile-actions,
.timeline-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.button,
.icon-button,
.footer-button {
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  padding: 7px 11px;
  color: #dce6f5;
  background: #111b2f;
  cursor: pointer;
  font-size: 11px;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.button:hover:not(:disabled),
.icon-button:hover:not(:disabled),
.footer-button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(105, 218, 240, 0.62);
}

.button:disabled {
  opacity: 0.46;
  cursor: not-allowed;
}

.button.ghost,
.icon-button,
.footer-button {
  background: rgba(10, 17, 31, 0.75);
}

.button.primary {
  min-height: 44px;
  border-color: var(--cyan);
  padding: 9px 17px;
  color: #041116;
  background: var(--cyan);
  font-weight: 850;
  box-shadow: 0 8px 28px rgba(105, 218, 240, 0.14);
}

.button.primary.busy {
  animation: compiler-pulse 1.2s ease-in-out infinite;
}

@keyframes compiler-pulse {
  50% { box-shadow: 0 0 0 5px rgba(105, 218, 240, 0.08), 0 8px 28px rgba(105, 218, 240, 0.18); }
}

.button-spark {
  margin-right: 5px;
}

.select-label,
.compile-options label {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font: 800 9px/1.2 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.select-wrap {
  position: relative;
}

.select-wrap::after {
  position: absolute;
  top: 50%;
  right: 12px;
  content: "⌄";
  color: var(--cyan);
  transform: translateY(-52%);
  pointer-events: none;
}

select,
input {
  width: 100%;
  min-height: 39px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  padding: 8px 10px;
  color: var(--ink);
  background: #0a1324;
  outline: none;
}

select {
  padding-right: 32px;
  appearance: none;
}

select:focus,
input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(105, 218, 240, 0.1);
}

.microcopy {
  margin: 6px 0 12px;
  color: var(--dim);
  font-size: 9px;
}

.source-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--line);
}

.source-facts div {
  padding: 9px 10px;
  background: rgba(8, 14, 27, 0.94);
}

.source-facts dt {
  color: var(--dim);
  font-size: 9px;
}

.source-facts dd {
  margin: 2px 0 0;
  color: #d7e2f1;
  font: 700 12px/1.2 var(--mono);
}

.eligibility-card {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 9px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px;
  background: rgba(7, 12, 23, 0.72);
}

.status-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  color: var(--amber);
  background: var(--amber-soft);
  font: 900 14px/1 var(--mono);
}

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

.eligibility-card small {
  color: var(--dim);
  font: 800 8px/1.2 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.eligibility-card strong {
  margin-top: 2px;
  font-size: 11px;
}

.eligibility-card p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.eligibility-card.eligible {
  border-color: rgba(121, 230, 181, 0.32);
  background: var(--mint-soft);
}

.eligibility-card.eligible .status-icon {
  color: var(--mint);
  background: rgba(121, 230, 181, 0.12);
}

.eligibility-card.ineligible {
  border-color: rgba(255, 139, 125, 0.34);
  background: var(--coral-soft);
}

.eligibility-card.ineligible .status-icon {
  color: var(--coral);
  background: rgba(255, 139, 125, 0.12);
}

.batch-fieldset {
  min-width: 0;
  margin: 11px 0 0;
  border: 1px solid rgba(105, 218, 240, 0.24);
  border-radius: 12px;
  padding: 10px;
  background: linear-gradient(150deg, rgba(105, 218, 240, 0.055), rgba(7, 13, 25, 0.58));
}

.batch-fieldset legend {
  padding: 0 5px;
  color: var(--cyan);
  font: 800 8px/1.2 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.satchel-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.satchel-toolbar strong,
.satchel-toolbar span {
  display: block;
}

.satchel-toolbar strong {
  color: #e6f7fb;
  font-size: 12px;
}

.satchel-toolbar span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

#satchel-compatibility {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--dim);
  font: 700 8px/1.35 var(--mono);
}

#satchel-compatibility::before {
  display: inline-grid;
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 4px;
  content: "?";
  font-size: 8px;
}

#satchel-compatibility.compatible {
  color: var(--mint);
}

#satchel-compatibility.compatible::before {
  border-radius: 50%;
  content: "✓";
}

#satchel-compatibility.mixed {
  color: var(--coral);
}

#satchel-compatibility.mixed::before {
  border-radius: 2px;
  content: "!";
}

.satchel-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.satchel-actions button {
  min-height: 27px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 4px 8px;
  color: var(--muted);
  background: rgba(7, 13, 25, 0.84);
  cursor: pointer;
  font-size: 9px;
}

.satchel-actions button:hover {
  color: var(--cyan);
  border-color: rgba(105, 218, 240, 0.42);
}

.batch-sources {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  max-height: 220px;
  overflow: auto;
}

.batch-source {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px;
  color: var(--muted);
  background: rgba(8, 14, 27, 0.88);
  cursor: pointer;
}

.batch-source:has(input:checked) {
  border-color: rgba(105, 218, 240, 0.37);
  background: var(--cyan-soft);
  box-shadow: inset 3px 0 var(--cyan);
}

.batch-source input {
  width: 15px;
  min-height: 15px;
  margin: 0;
  accent-color: var(--cyan);
}

.batch-source-copy {
  min-width: 0;
}

.batch-source-copy strong,
.batch-source-copy small {
  display: block;
}

.batch-source-copy strong {
  overflow: hidden;
  color: #dce7f4;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.batch-source-copy small {
  margin-top: 2px;
  overflow: hidden;
  color: var(--dim);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.batch-source-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 5px;
  color: var(--dim);
  font: 700 7px/1.2 var(--mono);
  text-transform: uppercase;
}

.batch-source-status::before {
  display: inline-grid;
  width: 10px;
  height: 10px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 3px;
  content: "?";
  font-size: 6px;
}

.batch-source-status.eligible {
  color: var(--mint);
  border-color: rgba(121, 230, 181, 0.28);
}

.batch-source-status.eligible::before {
  border-radius: 50%;
  content: "✓";
}

.batch-source-status.ineligible {
  color: var(--coral);
  border-color: rgba(255, 139, 125, 0.3);
}

.batch-source-status.ineligible::before {
  content: "!";
}

.satchel-note {
  margin: 8px 1px 0;
  color: var(--dim);
  font-size: 8px;
}

.episode-inspector,
.selection-settings {
  margin-top: 9px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(5, 11, 22, 0.66);
}

.episode-inspector > summary,
.selection-settings > summary {
  min-height: 43px;
  cursor: pointer;
  list-style: none;
}

.episode-inspector > summary::-webkit-details-marker,
.selection-settings > summary::-webkit-details-marker {
  display: none;
}

.episode-inspector > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 9px;
}

.episode-inspector > summary::after,
.selection-settings > summary::after {
  color: var(--cyan);
  content: "⌄";
  font-size: 12px;
  transition: transform 120ms ease;
}

.episode-inspector[open] > summary::after,
.selection-settings[open] > summary::after {
  transform: rotate(180deg);
}

.episode-inspector-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.episode-inspector-title > span:last-child,
.episode-inspector-title strong,
.episode-inspector-title small {
  display: block;
  min-width: 0;
}

.episode-inspector-title strong {
  color: #dce7f4;
  font-size: 10px;
}

.episode-inspector-title small {
  margin-top: 1px;
  color: var(--dim);
  font-size: 8px;
}

.episode-inspector-mark {
  display: grid;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(105, 218, 240, 0.28);
  border-radius: 8px;
  color: var(--cyan);
  background: var(--cyan-soft);
  font-size: 13px;
}

.episode-inspector-open {
  margin-left: auto;
  color: var(--dim);
  font: 700 7px/1 var(--mono);
  text-transform: uppercase;
}

.episode-inspector[open] .episode-inspector-open {
  color: var(--cyan);
}

.episode-inspector-body,
.selection-settings-body {
  border-top: 1px solid var(--line);
  padding: 10px;
}

.selection-settings > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
}

.selection-settings > summary span {
  color: var(--dim);
  font: 700 7px/1.2 var(--mono);
  text-transform: uppercase;
}

.autorun-control {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-top: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 9px;
  background: rgba(7, 13, 25, 0.65);
  cursor: pointer;
}

.autorun-control > input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  opacity: 0;
}

.autorun-switch {
  position: relative;
  width: 30px;
  height: 17px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #10182a;
  transition: background 130ms ease, border-color 130ms ease;
}

.autorun-switch i {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 130ms ease, background 130ms ease;
}

.autorun-control > input:checked + .autorun-switch {
  border-color: rgba(121, 230, 181, 0.48);
  background: var(--mint-soft);
}

.autorun-control > input:checked + .autorun-switch i {
  background: var(--mint);
  transform: translateX(13px);
}

.autorun-control > input:focus-visible + .autorun-switch {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.autorun-control > span:nth-of-type(2) {
  min-width: 0;
}

.autorun-control strong,
.autorun-control small {
  display: block;
}

.autorun-control strong {
  color: #dce6f4;
  font-size: 10px;
}

.autorun-control small {
  margin-top: 1px;
  color: var(--dim);
  font-size: 8px;
}

.autorun-control output {
  color: var(--mint);
  font: 750 8px/1.2 var(--mono);
  white-space: nowrap;
}

.autorun-control output.off {
  color: var(--dim);
}

.empty-state {
  color: var(--dim);
  font-size: 10px;
}

.compile-options {
  display: grid;
  grid-template-columns: 1fr 92px;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.compile-options label {
  margin: 0;
}

.compile-options input {
  min-height: 34px;
  text-align: right;
}

.review-flow,
.batch-overview {
  margin-top: 14px;
}

.automation-steps {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.automation-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: rgba(7, 13, 25, 0.72);
}

.automation-step > span {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 8px;
  color: var(--cyan);
  font: 800 8px/1 var(--mono);
}

.automation-step.review > span {
  color: var(--amber);
}

.automation-step.validate > span {
  color: var(--violet);
}

.automation-step strong,
.automation-step small {
  display: block;
}

.automation-step strong {
  color: #dce7f3;
  font-size: 11px;
}

.automation-step small {
  margin-top: 3px;
  color: var(--dim);
  font-size: 8px;
}

.automation-connector {
  align-self: center;
  color: var(--dim);
  font-size: 15px;
}

.review-status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}

.review-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  gap: 10px;
  margin-top: 10px;
}

.review-queue-panel,
.review-guardrail {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 11px;
  background: rgba(6, 11, 22, 0.72);
}

.review-queue-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.review-queue-heading h3,
.review-queue-heading p,
.review-guardrail h3,
.review-guardrail p {
  margin: 0;
}

.review-queue-heading h3,
.review-guardrail h3 {
  color: #e2ebf6;
  font-size: 12px;
}

.review-queue-heading p,
.review-guardrail p {
  margin-top: 2px;
  color: var(--dim);
  font-size: 8px;
}

.inbox-controls {
  display: grid;
  gap: 7px;
  margin-bottom: 9px;
  border: 1px solid rgba(105, 218, 240, 0.16);
  border-radius: 9px;
  padding: 8px;
  background: rgba(7, 14, 27, 0.72);
}

.inbox-filters,
.inbox-selection-bar,
.inbox-command,
.inbox-rules-list article > div {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.inbox-filters button,
.inbox-selection-bar button,
.inbox-command button,
.inbox-rules-list button {
  min-height: 27px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 4px 7px;
  color: var(--muted);
  background: rgba(8, 15, 28, 0.9);
  cursor: pointer;
  font-size: 8px;
}

.inbox-filters button[aria-selected="true"] {
  color: var(--cyan);
  border-color: rgba(105, 218, 240, 0.48);
  background: var(--cyan-soft);
}

.inbox-filters button span {
  display: inline-grid;
  min-width: 16px;
  height: 16px;
  place-items: center;
  margin-left: 3px;
  border-radius: 999px;
  color: #dce9f5;
  background: rgba(255, 255, 255, 0.08);
  font: 700 7px/1 var(--mono);
}

.inbox-search {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr);
  align-items: center;
  gap: 7px;
  color: var(--dim);
  font-size: 8px;
}

.inbox-search input,
.inbox-command input {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 5px 8px;
  color: #e4edf7;
  background: rgba(3, 8, 17, 0.85);
  font-size: 9px;
}

.inbox-selection-bar strong {
  margin-right: auto;
  color: var(--mint);
  font: 700 8px/1.2 var(--mono);
}

.inbox-filters button:disabled,
.inbox-selection-bar button:disabled,
.inbox-rules-list button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.inbox-command {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto;
}

.inbox-command label {
  color: var(--dim);
  font-size: 8px;
}

.inbox-command-help,
.inbox-rules-panel {
  border-top: 1px solid var(--line);
  padding-top: 6px;
  color: var(--dim);
  font-size: 8px;
}

.inbox-command-help summary,
.inbox-rules-panel summary {
  color: var(--muted);
  cursor: pointer;
}

.inbox-command-help code {
  display: inline-block;
  margin: 6px 4px 0 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 3px 5px;
  color: var(--cyan);
}

.inbox-rules-panel > p {
  margin: 6px 0;
}

.inbox-rules-list {
  display: grid;
  gap: 5px;
}

.inbox-rules-list > span {
  display: block;
  padding: 6px;
  color: var(--dim);
}

.inbox-rules-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 6px;
  background: rgba(10, 18, 31, 0.8);
}

.inbox-rules-list article > div,
.inbox-rules-list article > code,
.inbox-rules-list article > small,
.inbox-rules-list article > p {
  grid-column: 1;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inbox-rules-list article > div span {
  color: var(--mint);
}

.inbox-rules-list article > button {
  grid-row: 1 / span 2;
}

.inbox-rules-list article > button:last-child {
  grid-column: 3;
}

.review-queue {
  display: grid;
  gap: 6px;
  max-height: 520px;
  overflow: auto;
}

.review-empty,
.analysis-empty {
  display: grid;
  min-height: 70px;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 9px;
  padding: 12px;
  color: var(--dim);
  font-size: 9px;
  text-align: center;
}

.review-item {
  border: 1px solid var(--line);
  border-left: 3px solid var(--amber);
  border-radius: 9px;
  padding: 9px;
  background: rgba(12, 20, 35, 0.82);
}

.review-item.abstained {
  border-left-color: var(--coral);
}

.review-item.auto-inferred {
  border-left-color: var(--cyan);
}

.review-item.lossy {
  border-left-color: var(--amber);
}

.review-item-top,
.review-item-route,
.review-item-actions,
.manual-review-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.review-item-top {
  justify-content: space-between;
}

.review-item-top strong {
  overflow: hidden;
  color: #dce7f4;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.inbox-item-check input {
  width: 14px;
  height: 14px;
  accent-color: var(--cyan);
}

.inbox-origin {
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 5px;
  color: var(--dim);
  font: 700 7px/1 var(--mono);
  white-space: nowrap;
}

.review-item.reviewed {
  border-left-color: var(--mint);
}

.review-item > p {
  margin: 6px 0;
  color: var(--muted);
  font-size: 9px;
}

.inbox-provenance {
  display: grid;
  gap: 3px;
  margin-top: 7px;
  border-radius: 6px;
  padding: 6px;
  color: var(--dim);
  background: rgba(2, 8, 17, 0.55);
  font-size: 7px;
}

.inbox-provenance span {
  overflow-wrap: anywhere;
}

.inbox-provenance strong {
  color: var(--muted);
}

.review-item-route {
  min-width: 0;
  color: var(--dim);
  font-size: 8px;
}

.review-item-route code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-item-actions {
  flex-wrap: wrap;
  margin-top: 8px;
}

.review-item-actions button,
.flag-actions button {
  min-height: 26px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 4px 7px;
  color: var(--muted);
  background: rgba(7, 13, 25, 0.86);
  cursor: pointer;
  font-size: 8px;
}

.review-item-actions button:hover,
.review-item-actions button.selected,
.review-item-actions button[aria-pressed="true"],
.flag-actions button:hover,
.flag-actions button.selected,
.flag-actions button[aria-pressed="true"] {
  color: var(--cyan);
  border-color: rgba(105, 218, 240, 0.42);
  background: var(--cyan-soft);
}

.review-truncation {
  margin: 3px 0 0;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 7px 8px;
  color: var(--amber);
  font-size: 8px;
}

.review-decision {
  margin-left: auto;
  color: var(--mint);
  font: 700 8px/1.2 var(--mono);
}

.manual-review-row {
  margin-top: 7px;
}

.manual-review-row input {
  min-height: 30px;
  padding: 5px 7px;
  font-size: 9px;
}

.manual-review-row button {
  flex: 0 0 auto;
  min-height: 30px;
}

.review-guardrail {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-content: start;
  gap: 9px;
  border-color: rgba(187, 167, 255, 0.26);
  background: var(--violet-soft);
}

.guardrail-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(187, 167, 255, 0.4);
  border-radius: 9px;
  color: var(--violet);
  font: 800 16px/1 var(--mono);
}

.review-guardrail ul {
  margin: 9px 0 0;
  padding-left: 17px;
  color: var(--muted);
  font-size: 8px;
}

.review-guardrail li + li {
  margin-top: 5px;
}

/* Harmonization Inbox
   Familiar mail geometry, adapted to the existing dark arcade language:
   stacks / message rows / evidence reader. */
.review-grid.inbox-mail-shell {
  display: grid;
  grid-template-columns: 212px minmax(330px, 0.92fr) minmax(360px, 1.08fr);
  min-height: 620px;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(4, 9, 19, 0.88);
}

.inbox-stack-sidebar,
.inbox-reading-column,
.review-grid.inbox-mail-shell .review-queue-panel {
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.inbox-stack-sidebar {
  padding: 13px 10px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(13, 23, 40, 0.97), rgba(6, 12, 24, 0.95));
}

.inbox-sidebar-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 7px;
  padding: 3px 5px 11px;
}

.inbox-sidebar-heading > div > span,
.inbox-sidebar-heading > div > strong {
  display: block;
}

.inbox-sidebar-heading > div > span {
  color: var(--cyan);
  font: 800 8px/1.2 var(--mono);
  letter-spacing: 0.16em;
}

.inbox-sidebar-heading > div > strong {
  margin-top: 3px;
  color: #dbe7f5;
  font-size: 10px;
}

.inbox-sidebar-heading .pill {
  min-height: 22px;
  padding: 3px 6px;
  font-size: 7px;
}

.inbox-mail-shell .inbox-filters {
  display: grid;
  gap: 5px;
}

.inbox-mail-shell .inbox-filters button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 50px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 7px 8px;
  color: var(--muted);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.inbox-mail-shell .inbox-filters button:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.035);
}

.inbox-mail-shell .inbox-filters button[aria-selected="true"] {
  color: var(--ink);
  border-color: rgba(105, 218, 240, 0.3);
  background:
    linear-gradient(90deg, rgba(105, 218, 240, 0.18), rgba(105, 218, 240, 0.055));
  box-shadow: inset 2px 0 0 var(--cyan);
}

.stack-glyph {
  position: relative;
  display: block;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(105, 218, 240, 0.3);
  border-radius: 8px;
  background: var(--cyan-soft);
}

.stack-glyph::before,
.stack-glyph::after {
  position: absolute;
  left: 5px;
  right: 5px;
  height: 3px;
  border: 1px solid currentColor;
  border-radius: 2px;
  content: "";
}

.stack-glyph::before {
  top: 6px;
}

.stack-glyph::after {
  top: 12px;
}

.stack-glyph.all {
  color: var(--cyan);
}

.stack-glyph.blocking {
  color: var(--coral);
  border-color: rgba(255, 139, 125, 0.34);
  background: var(--coral-soft);
}

.stack-glyph.suggested {
  color: var(--amber);
  border-color: rgba(246, 199, 106, 0.34);
  background: var(--amber-soft);
}

.stack-glyph.resolved {
  color: var(--mint);
  border-color: rgba(121, 230, 181, 0.34);
  background: var(--mint-soft);
}

.stack-glyph.abstained {
  color: var(--violet);
  border-color: rgba(187, 167, 255, 0.34);
  background: var(--violet-soft);
}

.stack-glyph.rules {
  width: 20px;
  height: 20px;
  color: var(--violet);
  border-color: rgba(187, 167, 255, 0.34);
  background: var(--violet-soft);
}

.stack-glyph.rules::before,
.stack-glyph.rules::after {
  left: 4px;
  right: 4px;
}

.stack-glyph.rules::before {
  top: 4px;
}

.stack-glyph.rules::after {
  top: 10px;
}

.stack-copy {
  min-width: 0;
}

.stack-copy strong,
.stack-copy small {
  display: block;
}

.stack-copy strong {
  overflow: hidden;
  color: inherit;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stack-copy small {
  margin-top: 2px;
  overflow: hidden;
  color: var(--dim);
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inbox-mail-shell .inbox-filters .stack-count {
  display: inline-grid;
  min-width: 22px;
  height: 20px;
  place-items: center;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #dce9f5;
  background: rgba(1, 6, 14, 0.5);
  font: 700 8px/1 var(--mono);
}

.inbox-mail-shell .inbox-search {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.inbox-mail-shell .inbox-search span,
.inbox-mail-shell .inbox-command label {
  color: var(--dim);
  font: 700 7px/1.2 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.inbox-mail-shell .inbox-search input,
.inbox-mail-shell .inbox-command input {
  width: 100%;
  min-height: 34px;
  border-color: var(--line-strong);
  border-radius: 9px;
  background: rgba(2, 7, 16, 0.82);
}

.inbox-mail-shell .inbox-rules-panel,
.inbox-mail-shell .inbox-command-help {
  margin-top: 11px;
  padding-top: 10px;
}

.inbox-mail-shell .inbox-rules-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  color: #cbd7e6;
  font-size: 9px;
}

.inbox-mail-shell .inbox-rules-panel summary > span:first-child {
  display: flex;
  align-items: center;
  gap: 7px;
}

.inbox-mail-shell .inbox-rules-panel summary > span:last-child {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 999px;
  background: var(--violet-soft);
  font: 700 8px/1 var(--mono);
}

.inbox-mail-shell .inbox-rules-list article {
  grid-template-columns: minmax(0, 1fr);
  margin-top: 6px;
}

.inbox-mail-shell .inbox-rules-list article > button,
.inbox-mail-shell .inbox-rules-list article > button:last-child {
  grid-column: 1;
  grid-row: auto;
}

.inbox-mail-shell .inbox-command {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  margin-top: 13px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
}

.inbox-mail-shell .inbox-command > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px;
}

.inbox-mail-shell .inbox-command button {
  min-width: 40px;
  border-color: rgba(105, 218, 240, 0.28);
  color: var(--cyan);
}

.review-grid.inbox-mail-shell .review-queue-panel {
  display: flex;
  flex-direction: column;
  padding: 0;
  border-right: 1px solid var(--line);
  background: rgba(7, 13, 25, 0.77);
}

.inbox-mail-shell .review-queue-heading {
  min-height: 71px;
  align-items: center;
  margin: 0;
  padding: 12px 13px;
  border-bottom: 1px solid var(--line);
}

.inbox-mail-shell .review-queue-heading h3 {
  margin: 1px 0 0;
  color: #eff5fc;
  font-size: 14px;
}

.inbox-mail-shell .review-queue-heading p {
  color: var(--dim);
  font-size: 8px;
}

.inbox-local-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  border: 1px solid rgba(121, 230, 181, 0.25);
  border-radius: 999px;
  padding: 4px 7px;
  color: var(--mint);
  font: 700 7px/1 var(--mono);
  text-transform: uppercase;
}

.inbox-local-badge i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 8px rgba(121, 230, 181, 0.65);
}

.inbox-mail-shell .inbox-selection-bar {
  display: flex;
  min-height: 43px;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(3, 8, 18, 0.62);
}

.inbox-mail-shell .inbox-selection-bar strong {
  min-width: 60px;
}

.inbox-mail-shell .inbox-selection-bar button {
  min-height: 25px;
  padding: 3px 6px;
}

.inbox-mail-shell .review-queue {
  display: block;
  min-height: 0;
  max-height: 604px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.inbox-mail-shell .review-empty {
  min-height: 210px;
  margin: 12px;
}

.inbox-mail-row {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0;
  min-height: 82px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid transparent;
  border-radius: 0;
  padding: 0;
  background: rgba(8, 15, 28, 0.66);
  transition: background 120ms ease, border-color 120ms ease;
}

.inbox-mail-row:hover {
  background: rgba(15, 25, 42, 0.92);
}

.inbox-mail-row.active {
  border-left-color: var(--cyan);
  background:
    linear-gradient(90deg, rgba(105, 218, 240, 0.13), rgba(12, 21, 36, 0.94) 42%);
}

.inbox-mail-row.reviewed {
  box-shadow: inset 0 -1px 0 rgba(121, 230, 181, 0.13);
}

.inbox-row-check {
  display: grid;
  align-items: start;
  padding: 14px 2px 0 10px;
}

.inbox-row-check input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--cyan);
}

.inbox-row-open {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 9px;
  width: 100%;
  min-width: 0;
  border: 0;
  padding: 11px 10px 10px 8px;
  color: inherit;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.inbox-row-sender,
.inbox-row-subject,
.inbox-row-preview {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inbox-row-sender {
  color: #edf4fc;
  font-size: 10px;
  font-weight: 800;
}

.inbox-row-subject {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #c7d3e1;
  font: 700 9px/1.35 var(--mono);
}

.inbox-row-preview {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 8px;
}

.inbox-row-meta {
  display: flex;
  grid-column: 2;
  grid-row: 1 / span 2;
  align-items: flex-end;
  flex-direction: column;
  gap: 5px;
}

.inbox-scope-badge {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 5px;
  color: var(--dim);
  font: 700 7px/1 var(--mono);
  white-space: nowrap;
}

.inbox-severity {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--amber);
  font: 700 7px/1 var(--mono);
}

.inbox-severity::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.inbox-severity.blocking {
  color: var(--coral);
}

.inbox-severity.resolved {
  color: var(--mint);
}

.inbox-severity.abstained {
  color: var(--violet);
}

.inbox-reading-column {
  display: flex;
  min-height: 0;
  flex-direction: column;
  background:
    radial-gradient(circle at 95% 5%, rgba(187, 167, 255, 0.08), transparent 18rem),
    rgba(6, 11, 22, 0.86);
}

.inbox-reading-pane {
  min-height: 428px;
  padding: 17px;
}

.inbox-reader-empty {
  display: grid;
  min-height: 350px;
  place-items: center;
  align-content: center;
  padding: 24px;
  color: var(--dim);
  text-align: center;
}

.inbox-reader-empty > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  margin-bottom: 10px;
  border: 1px solid rgba(105, 218, 240, 0.24);
  border-radius: 14px;
  color: var(--cyan);
  background: var(--cyan-soft);
  font-size: 20px;
}

.inbox-reader-empty strong {
  color: #dce7f4;
  font-size: 13px;
}

.inbox-reader-empty p {
  max-width: 290px;
  margin: 5px 0 0;
  font-size: 9px;
}

.inbox-reader-message {
  height: 100%;
}

.inbox-reader-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.inbox-reader-eyebrow {
  margin: 0 0 4px;
  color: var(--cyan);
  font: 800 8px/1.2 var(--mono);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.inbox-reader-header h4 {
  margin: 0;
  color: #f0f5fb;
  font-size: 18px;
  line-height: 1.14;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}

.inbox-reader-from {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.inbox-reader-status {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 6px;
}

.inbox-reader-section {
  margin-top: 14px;
}

.inbox-reader-section > span {
  display: block;
  margin-bottom: 5px;
  color: var(--dim);
  font: 800 7px/1.2 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.inbox-reader-section > p {
  margin: 0;
  color: #bac7d7;
  font-size: 10px;
  line-height: 1.55;
}

.inbox-reader-route {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
}

.inbox-reader-route code {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px;
  color: var(--cyan);
  background: rgba(2, 7, 16, 0.66);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inbox-reader-route > span {
  color: var(--dim);
}

.inbox-reader-evidence {
  display: grid;
  gap: 5px;
  margin: 0;
}

.inbox-reader-evidence div {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 8px;
  border-radius: 7px;
  padding: 7px 8px;
  background: rgba(2, 7, 16, 0.52);
}

.inbox-reader-evidence dt,
.inbox-reader-evidence dd {
  margin: 0;
}

.inbox-reader-evidence dt {
  color: var(--dim);
  font: 700 7px/1.4 var(--mono);
  text-transform: uppercase;
}

.inbox-reader-evidence dd {
  color: var(--muted);
  font-size: 8px;
  overflow-wrap: anywhere;
}

.inbox-reader-suggestion {
  border: 1px solid rgba(246, 199, 106, 0.2);
  border-radius: 9px;
  padding: 9px;
  color: #e8d8ae;
  background: var(--amber-soft);
  font-size: 9px;
  overflow-wrap: anywhere;
}

.inbox-reading-pane .review-item-actions {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.inbox-reading-pane .review-item-actions button {
  min-height: 30px;
  font-size: 8px;
}

.inbox-reading-pane .review-decision {
  width: 100%;
  margin: 4px 0 0;
}

.inbox-reading-column .review-guardrail {
  margin: auto 12px 12px;
  border-radius: 10px;
  padding: 10px;
}

.inbox-reading-column .review-guardrail h3 {
  font-size: 10px;
}

.inbox-reading-column .review-guardrail p,
.inbox-reading-column .review-guardrail ul {
  font-size: 7px;
}

.batch-overview-note {
  margin: -4px 0 11px;
  color: var(--muted);
  font-size: 9px;
}

.analysis-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

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

.analysis-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 10px;
  background: rgba(6, 11, 22, 0.74);
}

.analysis-card > header,
.analysis-card > header > div {
  display: flex;
  align-items: center;
  gap: 7px;
}

.analysis-card > header {
  justify-content: space-between;
  margin-bottom: 9px;
}

.analysis-card > header span {
  color: var(--cyan);
  font: 800 8px/1 var(--mono);
}

.analysis-card > header h3 {
  margin: 0;
  color: #dfe9f5;
  font-size: 11px;
}

.analysis-card > header small {
  color: var(--dim);
  font: 600 7px/1.2 var(--mono);
  text-align: right;
}

.missingness-scroll {
  overflow: auto;
}

.missingness-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 3px;
}

.missingness-table th {
  max-width: 116px;
  padding: 3px;
  overflow: hidden;
  color: var(--dim);
  font-size: 7px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.missingness-table td {
  min-width: 54px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 5px;
  color: var(--dim);
  background: rgba(10, 17, 31, 0.8);
  font: 700 7px/1.2 var(--mono);
  text-align: center;
}

.matrix-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}

.matrix-legend span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 5px;
  color: var(--dim);
  font: 700 7px/1.2 var(--mono);
}

.missingness-table td.present,
.matrix-legend .present {
  color: var(--mint);
  border-color: rgba(121, 230, 181, 0.25);
  background: var(--mint-soft);
}

.missingness-table td.external,
.matrix-legend .external {
  color: var(--violet);
  border-color: rgba(187, 167, 255, 0.28);
  background: var(--violet-soft);
}

.missingness-table td.flagged,
.matrix-legend .flagged {
  color: var(--amber);
  border-color: rgba(246, 199, 106, 0.28);
  background: var(--amber-soft);
}

.missingness-table td.absent,
.matrix-legend .absent {
  color: var(--coral);
  border-color: rgba(255, 139, 125, 0.26);
  background: var(--coral-soft);
}

.schema-clusters,
.correlation-view,
.analysis-flags {
  display: grid;
  gap: 6px;
}

.analysis-inbox-summary {
  display: grid;
  min-height: 92px;
  align-content: center;
  gap: 6px;
  border: 1px solid rgba(105, 218, 240, 0.24);
  border-radius: 9px;
  padding: 10px;
  background: var(--cyan-soft);
}

.analysis-inbox-summary strong {
  color: #def7fb;
  font-size: 10px;
}

.analysis-inbox-summary span {
  color: var(--cyan);
  font: 700 8px/1.3 var(--mono);
}

.analysis-inbox-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 8px;
}

.cluster-row,
.correlation-row,
.analysis-flag {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 8px;
  background: rgba(10, 17, 31, 0.72);
}

.cluster-row > div,
.correlation-row > div,
.flag-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cluster-row strong,
.correlation-row strong,
.analysis-flag strong {
  color: #dce6f2;
  font-size: 9px;
}

.cluster-row span,
.correlation-row span,
.analysis-flag small {
  color: var(--dim);
  font-size: 8px;
}

.cluster-bar,
.correlation-bar {
  height: 5px;
  margin-top: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(137, 160, 196, 0.12);
}

.cluster-bar i,
.correlation-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--cyan);
}

.correlation-row p,
.analysis-flag p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 8px;
}

.analysis-flag .flag-suggestion {
  border-left: 2px solid var(--cyan);
  padding-left: 7px;
  color: #bccbdd;
}

.analysis-flag .flag-suggestion strong {
  color: var(--cyan);
  font-size: inherit;
}

.correlation-row.caution .correlation-bar i {
  background: var(--amber);
}

.analysis-flag {
  border-left: 3px solid var(--amber);
}

.analysis-flag.abstained {
  border-left-color: var(--coral);
}

.flag-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.pipeline {
  margin-top: 14px;
}

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

.receipt-id {
  max-width: 42%;
  overflow: hidden;
  font-family: var(--mono);
  text-overflow: ellipsis;
}

.pipeline-track {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px minmax(0, 1.14fr) 76px minmax(0, 1fr);
  align-items: stretch;
  gap: 0;
}

.pipeline-stage {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(7, 12, 23, 0.74);
}

.pipeline-stage header {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
}

.stage-index {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  color: var(--cyan);
  background: var(--cyan-soft);
  font: 800 10px/1 var(--mono);
}

.pipeline-stage small,
.pipeline-stage h3 {
  display: block;
}

.pipeline-stage small {
  color: var(--dim);
  font-size: 8px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.pipeline-stage h3 {
  margin: 1px 0 0;
  font: 850 12px/1.2 var(--mono);
  letter-spacing: 0.04em;
}

.stage-content {
  padding: 10px 12px 11px;
}

.stage-content > code {
  display: block;
  overflow: hidden;
  color: var(--cyan);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-content ul {
  display: grid;
  gap: 4px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.stage-content li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  font-size: 9px;
}

.stage-content li span {
  color: var(--dim);
}

.stage-content li strong {
  overflow: hidden;
  color: #c9d5e5;
  font-family: var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-content p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.pipeline-arrow {
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  color: var(--dim);
}

.pipeline-arrow span {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--line), var(--cyan), var(--line));
}

.pipeline-arrow b {
  margin: -1px 0;
  padding: 2px 5px;
  color: var(--cyan);
  background: var(--panel-solid);
  font: 700 8px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric-cluster {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  min-height: 79px;
  padding: 1px 0 0;
  background: var(--line);
}

.metric {
  display: grid;
  place-content: center;
  min-width: 0;
  padding: 8px 4px;
  text-align: center;
  background: rgba(7, 12, 23, 0.96);
}

.metric strong,
.metric span {
  display: block;
}

.metric strong {
  font: 800 20px/1 var(--mono);
}

.metric span {
  margin-top: 4px;
  color: var(--dim);
  font-size: 8px;
  text-transform: uppercase;
}

.metric.exact strong,
.status-chip.exact {
  color: var(--mint);
}

.metric.inferred strong,
.status-chip.inferred,
.status-chip.auto-inferred {
  color: var(--cyan);
}

.metric.lossy strong,
.status-chip.lossy {
  color: var(--amber);
}

.metric.unresolved strong,
.status-chip.unresolved,
.status-chip.needs-review,
.status-chip.abstained {
  color: var(--coral);
}

.status-chip.needs-review {
  color: var(--amber);
}

.status-chip.abstained {
  background: var(--coral-soft);
}

.metric.preserved strong {
  color: var(--violet);
}

.status-chip.preserved-not-policy-eligible {
  color: var(--violet);
  border-color: rgba(187, 167, 255, 0.34);
  background: rgba(187, 167, 255, 0.08);
}

.output-stage.eligible {
  border-color: rgba(121, 230, 181, 0.38);
  background: var(--mint-soft);
}

.output-stage.eligible .stage-index {
  color: var(--mint);
  background: rgba(121, 230, 181, 0.15);
}

.output-stage.eligible h3 {
  color: var(--mint);
}

.output-stage.ineligible {
  border-color: rgba(255, 139, 125, 0.38);
  background: var(--coral-soft);
}

.output-stage.ineligible .stage-index {
  color: var(--coral);
  background: rgba(255, 139, 125, 0.15);
}

.output-stage.ineligible h3 {
  color: var(--coral);
}

.details-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(290px, 0.6fr);
  gap: 14px;
  margin-top: 14px;
}

.legend-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 2px 6px;
  background: rgba(4, 8, 17, 0.5);
  font: 700 8px/1.2 var(--mono);
  text-transform: uppercase;
}

.status-chip::before {
  margin-right: 4px;
  content: "·";
  font-size: 7px;
}

.status-chip.exact::before {
  content: "●";
}

.status-chip.inferred::before,
.status-chip.auto-inferred::before {
  content: "◇";
}

.status-chip.lossy::before {
  content: "◆";
}

.status-chip.unresolved::before,
.status-chip.needs-review::before {
  content: "△";
}

.status-chip.abstained::before,
.status-chip.preserved-not-policy-eligible::before {
  content: "■";
}

.adapter-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.adapter-card {
  position: relative;
  min-height: 118px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 10px;
  color: inherit;
  background: rgba(7, 12, 23, 0.76);
  cursor: pointer;
  text-align: left;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.adapter-card:hover,
.adapter-card.selected {
  transform: translateY(-2px);
  border-color: rgba(105, 218, 240, 0.45);
  background: rgba(14, 24, 42, 0.92);
}

.adapter-card .status-chip {
  margin-bottom: 9px;
}

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

.adapter-card code {
  overflow: hidden;
  color: #d7e3f1;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.adapter-card strong {
  margin: 3px 0;
  color: var(--cyan);
  font-size: 10px;
}

.adapter-card small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.adapter-placeholder {
  grid-column: 1 / -1;
  min-height: 118px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: 11px;
  color: var(--dim);
  text-align: center;
}

.field-ledger {
  margin-top: 10px;
  border-top: 1px solid var(--line);
  padding-top: 9px;
}

.field-ledger summary,
.evidence-content summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
}

.field-ledger summary span {
  float: right;
  color: var(--dim);
}

.table-scroll {
  max-height: 290px;
  margin-top: 9px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 9px;
  text-align: left;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--dim);
  background: #0d1728;
  font: 800 8px/1.2 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 7px 8px;
  vertical-align: top;
}

td {
  color: #c8d4e4;
}

td code {
  color: var(--cyan);
  font-size: 9px;
}

.evidence-panel {
  min-width: 0;
}

.evidence-empty {
  min-height: 220px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: 11px;
  padding: 22px;
  color: var(--dim);
  text-align: center;
}

.evidence-title span {
  color: var(--violet);
  font: 800 8px/1.2 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.evidence-title h3 {
  margin: 3px 0 0;
  font-size: 16px;
}

.evidence-content > p {
  margin: 9px 0;
  color: var(--muted);
  font-size: 10px;
}

.evidence-content dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 5px 9px;
  margin: 0 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px;
  font-size: 9px;
}

.evidence-content dt {
  color: var(--dim);
}

.evidence-content dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: #d5e0ee;
  font-family: var(--mono);
}

.evidence-content pre {
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px;
  color: #b8c7db;
  background: #060b15;
  font-size: 8px;
  white-space: pre-wrap;
  word-break: break-word;
}

.timeline-panel {
  margin-top: 14px;
}

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

.timeline-actions output {
  min-width: 64px;
  color: var(--cyan);
  text-align: right;
  font-size: 10px;
}

.icon-button {
  width: 34px;
  padding: 0;
}

.timeline-ruler {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin-left: 154px;
  padding: 0 3px 5px;
  color: var(--dim);
  font: 700 8px/1 var(--mono);
}

.timeline-ruler span:not(:first-child) {
  text-align: right;
}

.causal-timeline {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(90deg, transparent calc(25% - .5px), var(--line) 25%, transparent calc(25% + .5px)),
    linear-gradient(90deg, transparent calc(50% - .5px), var(--line) 50%, transparent calc(50% + .5px)),
    linear-gradient(90deg, transparent calc(75% - .5px), var(--line) 75%, transparent calc(75% + .5px)),
    rgba(6, 11, 21, 0.72);
  background-size: calc(100% - 154px) 100%;
  background-position: 154px 0;
  background-repeat: no-repeat;
}

.timeline-lane {
  display: grid;
  grid-template-columns: 154px minmax(0, 1fr);
  min-height: 61px;
}

.timeline-lane + .timeline-lane {
  border-top: 1px solid var(--line);
}

.lane-label {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 8px 1fr;
  align-content: center;
  column-gap: 8px;
  border-right: 1px solid var(--line);
  padding: 8px 11px;
  background: #0a1323;
}

.lane-label strong,
.lane-label small {
  grid-column: 2;
  display: block;
}

.lane-label strong {
  font-size: 10px;
}

.lane-label small {
  margin-top: 1px;
  color: var(--dim);
  font-size: 8px;
}

.lane-dot {
  grid-row: 1 / 3;
  align-self: center;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.lane-dot.annotation {
  background: var(--mint);
}

.lane-dot.critic {
  background: var(--amber);
}

.lane-dot.coach {
  background: var(--violet);
}

.lane-dot.action {
  background: var(--cyan);
}

.lane-track {
  position: relative;
  min-width: 0;
  min-height: 61px;
}

.timeline-event {
  position: absolute;
  top: 13px;
  min-width: 22px;
  height: 35px;
  overflow: hidden;
  border: 1px solid currentColor;
  border-radius: 7px;
  padding: 5px 7px;
  cursor: pointer;
  text-align: left;
}

.timeline-event span,
.timeline-event small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-event span {
  font: 800 8px/1.15 var(--mono);
  text-transform: uppercase;
}

.timeline-event small {
  margin-top: 2px;
  color: #dbe4f0;
  font-size: 8px;
}

.timeline-event.annotation {
  color: var(--mint);
  background: var(--mint-soft);
}

.timeline-event.critic {
  color: var(--amber);
  background: var(--amber-soft);
}

.timeline-event.coach {
  color: var(--violet);
  background: var(--violet-soft);
}

.timeline-event.action {
  color: var(--cyan);
  background: var(--cyan-soft);
}

.timeline-event.provisional {
  border-style: dashed;
  opacity: 0.76;
}

.playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 154px;
  z-index: 2;
  width: 1px;
  background: var(--coral);
  box-shadow: 0 0 9px rgba(255, 139, 125, 0.65);
  pointer-events: none;
}

.playhead::before {
  position: absolute;
  top: 0;
  left: -4px;
  width: 9px;
  height: 6px;
  border-radius: 0 0 5px 5px;
  content: "";
  background: var(--coral);
}

.timeline-note {
  margin: 8px 0 0;
  color: var(--dim);
  font-size: 9px;
}

.compile-dock {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.72fr) auto;
  align-items: center;
  gap: 24px;
  margin-top: 14px;
  border-color: rgba(105, 218, 240, 0.24);
}

.compile-dock h2 {
  margin: 0;
  font-size: 18px;
}

.compile-dock p:not(.kicker) {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.compile-progress > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 9px;
}

.compile-progress i {
  display: block;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #18243a;
}

.compile-progress b {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--mint));
  transition: width 220ms ease;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 4px 0;
  color: var(--dim);
  font-size: 9px;
}

.site-footer strong,
.site-footer span {
  display: block;
}

.site-footer nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.site-footer a {
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--cyan);
}

.footer-button {
  min-height: 29px;
  padding: 5px 8px;
  color: var(--muted);
  font-size: 9px;
}

#freeze-status.pass {
  color: var(--mint);
}

#freeze-status.fail {
  color: var(--coral);
}

.toast-region {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  display: grid;
  gap: 8px;
  width: min(370px, calc(100vw - 36px));
  pointer-events: none;
}

.toast {
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--cyan);
  border-radius: 10px;
  padding: 10px 12px;
  color: #d9e4f2;
  background: rgba(8, 14, 27, 0.97);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.38);
  font-size: 11px;
  animation: toast-in 170ms ease-out;
}

.toast.error {
  border-left-color: var(--coral);
}

.toast.success {
  border-left-color: var(--mint);
}

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

body[data-mode="inspect"] .mission-card,
body[data-mode="play"] .workflow-guide,
body[data-mode="play"] .source-card,
body[data-mode="play"] .review-flow,
body[data-mode="play"] .batch-overview,
body[data-mode="play"] .pipeline,
body[data-mode="play"] .details-grid,
body[data-mode="play"] .timeline-panel,
body[data-mode="play"] .compile-dock {
  display: none;
}

body[data-mode="inspect"] .overview-grid,
body[data-mode="play"] .overview-grid {
  grid-template-columns: minmax(0, 1fr);
}

body[data-mode="inspect"] .source-card,
body[data-mode="inspect"] .review-flow,
body[data-mode="inspect"] .batch-overview,
body[data-mode="inspect"] .pipeline,
body[data-mode="inspect"] .details-grid,
body[data-mode="inspect"] .timeline-panel {
  border-color: rgba(105, 218, 240, 0.28);
}

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

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

@media (max-width: 1120px) {
  .workflow-guide {
    grid-template-columns: minmax(230px, 0.7fr) minmax(0, 1.3fr);
  }

  .workflow-next {
    grid-column: 1 / -1;
  }

  .site-header {
    align-items: flex-start;
  }

  .header-actions {
    flex-wrap: wrap;
    max-width: 560px;
  }

  .causal-loop {
    grid-template-columns: 1fr 1fr;
  }

  .causal-loop > i {
    display: none;
  }

  .adapter-cards {
    grid-template-columns: 1fr 1fr;
  }

  .pipeline-track {
    grid-template-columns: 1fr 48px 1.14fr 48px 1fr;
  }

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

  .review-grid.inbox-mail-shell {
    grid-template-columns: 172px minmax(285px, 0.92fr) minmax(320px, 1.08fr);
  }
}

@media (max-width: 900px) {
  .app-shell {
    width: min(100% - 24px, 760px);
    padding-top: 14px;
  }

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

  .header-actions {
    width: 100%;
    max-width: none;
    justify-content: flex-start;
  }

  .workflow-guide {
    grid-template-columns: minmax(0, 1fr);
  }

  .workflow-next {
    grid-column: auto;
  }

  .release-nav {
    width: 100%;
  }

  .release-nav-primary {
    flex: 1;
  }

  .release-nav-primary a {
    flex: 1;
    justify-content: center;
    text-align: center;
  }

  .overview-grid,
  .details-grid,
  .batch-analysis-grid {
    grid-template-columns: 1fr;
  }

  .automation-steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .automation-connector {
    display: none;
  }

  .pipeline-track {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .pipeline-arrow {
    grid-template-columns: 1fr auto 1fr;
    min-height: 26px;
  }

  .pipeline-arrow span {
    width: 100%;
  }

  .metric-cluster {
    min-height: 72px;
  }

  .compile-dock {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .compile-actions {
    justify-content: flex-start;
  }

  .site-footer nav {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .review-grid.inbox-mail-shell {
    grid-template-columns: 140px minmax(235px, 0.9fr) minmax(285px, 1.1fr);
  }

  .inbox-reading-column {
    grid-column: auto;
    display: flex;
    border-top: 0;
  }

  .inbox-reading-column .review-guardrail {
    margin: auto 8px 8px;
  }
}

@media (max-width: 620px) {
  .app-shell {
    width: calc(100% - 16px);
  }

  .app-shell button,
  .app-shell .button,
  .app-shell select,
  .app-shell .icon-button,
  .app-shell .footer-button,
  .release-nav-primary a {
    min-height: 44px !important;
  }

  .brand-block {
    align-items: flex-start;
  }

  .workflow-guide {
    padding: 10px;
  }

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

  .workflow-next {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .workflow-next .button.primary {
    grid-column: 1 / -1;
    width: 100%;
    max-width: none;
  }

  .product-mark {
    width: 40px;
    height: 40px;
  }

  .product-mark span {
    left: 8px;
    width: 23px;
  }

  .header-actions {
    align-items: stretch;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .release-nav {
    grid-column: 1 / -1;
    align-items: flex-start;
    flex-direction: column;
  }

  .release-nav-primary {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr;
    border-radius: 12px;
  }

  .release-nav-primary a + a {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .release-nav-primary a {
    justify-content: stretch;
    white-space: normal;
    text-align: left;
  }

  .mode-tabs {
    grid-column: 1 / -1;
  }

  .mode-tab {
    justify-content: center;
    flex: 1;
    min-height: 44px;
  }

  .local-status,
  .version-link {
    justify-content: center;
    min-height: 44px;
    white-space: normal;
    text-align: center;
  }

  .mission-card,
  .source-card,
  .review-flow,
  .batch-overview,
  .pipeline,
  .adapters-panel,
  .evidence-panel,
  .timeline-panel,
  .compile-dock {
    padding: 12px;
  }

  .sim-stage,
  #sim-canvas {
    min-height: 310px;
  }

  .sim-legend {
    display: none;
  }

  .causal-loop {
    grid-template-columns: 1fr;
  }

  .batch-sources {
    grid-template-columns: minmax(0, 1fr);
  }

  .satchel-toolbar,
  .analysis-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .satchel-actions,
  .analysis-actions {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .satchel-actions button,
  .analysis-actions .button {
    width: 100%;
    min-height: 44px;
  }

  select,
  input,
  .button,
  .icon-button,
  .footer-button {
    min-height: 44px;
  }

  .instruction-presets button {
    min-height: 44px;
    padding-inline: 12px;
  }

  .batch-source {
    min-height: 58px;
  }

  .batch-source input,
  .inbox-item-check input,
  .inbox-row-check input {
    width: 22px;
    height: 22px;
    min-height: 22px;
  }

  .autorun-control {
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 52px;
  }

  .autorun-control > input {
    grid-column: 1;
  }

  .autorun-control output {
    grid-column: 2;
  }

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

  .review-grid.inbox-mail-shell {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .inbox-mail-shell .inbox-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow-x: visible;
    padding-bottom: 0;
  }

  .inbox-mail-shell .inbox-filters button {
    min-width: 0;
    min-height: 52px;
  }

  .inbox-mail-shell .inbox-search input,
  .inbox-mail-shell .inbox-command input,
  .inbox-mail-shell .inbox-command button,
  .inbox-mail-shell .inbox-rules-list button {
    min-height: 44px;
  }

  .inbox-mail-shell .inbox-rules-panel summary,
  .inbox-command-help summary {
    display: flex;
    min-height: 44px;
    align-items: center;
  }

  .inbox-mail-shell .inbox-selection-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .inbox-mail-shell .inbox-selection-bar strong {
    grid-column: 1 / -1;
  }

  .inbox-mail-shell .inbox-selection-bar button {
    width: 100%;
    min-height: 44px;
  }

  .inbox-row-check {
    min-width: 44px;
    padding: 14px 8px 0 10px;
  }

  .review-grid.inbox-mail-shell .review-queue-panel {
    border-right: 0;
  }

  .inbox-reading-column {
    grid-column: 1;
    border-top: 1px solid var(--line);
  }

  .inbox-reading-pane {
    padding: 13px;
  }

  .inbox-reader-header {
    grid-template-columns: minmax(0, 1fr);
  }

  .inbox-reader-status {
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .inbox-reader-route {
    grid-template-columns: minmax(0, 1fr);
  }

  .inbox-reader-route > span {
    transform: rotate(90deg);
    justify-self: center;
  }

  .review-item-actions,
  .flag-actions {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .review-item-actions button,
  .flag-actions button,
  .inbox-reading-pane .review-item-actions button {
    width: 100%;
    min-height: 44px;
  }

  .review-decision {
    grid-column: 1 / -1;
    margin-left: 0;
  }

  .manual-review-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .manual-review-row input,
  .manual-review-row button {
    width: 100%;
    min-height: 44px;
  }

  .control-buttons {
    width: 100%;
  }

  .control-buttons .button {
    flex: 1;
  }

  .metric-cluster {
    grid-template-columns: repeat(5, minmax(52px, 1fr));
    overflow-x: auto;
  }

  .metric {
    min-width: 58px;
  }

  .adapter-cards {
    grid-template-columns: 1fr;
  }

  .legend-chips {
    display: none;
  }

  .timeline-ruler {
    margin-left: 100px;
  }

  .causal-timeline {
    background-size: calc(100% - 100px) 100%;
    background-position: 100px 0;
  }

  .timeline-lane {
    grid-template-columns: 100px minmax(0, 1fr);
  }

  .lane-label {
    padding: 7px;
  }

  .lane-label small {
    display: none;
  }

  .playhead {
    left: 100px;
  }

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

  .timeline-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .timeline-actions output {
    margin-left: auto;
  }

  .compile-actions {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .site-footer nav {
    width: 100%;
  }

  .site-footer nav a,
  .site-footer .footer-button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
