:root {
  color-scheme: light;
  --canvas: #eeebea;
  --surface: #ffffff;
  --subtle: #f7f5f4;
  --ink: #181717;
  --carbon: #2e2d2d;
  --muted: #575555;
  --rule: #d7d3d1;
  --rule-strong: #aaa5a2;
  --danger: #b83d37;
  --danger-bg: #fbefee;
  --warning: #7a5200;
  --warning-bg: #fff8e7;
  --verified: #17663a;
  --verified-bg: #edf8f1;
  --info: #245475;
  --info-bg: #eef6fb;
  --focus: #0b5fcc;
  --radius-sm: 8px;
  --radius-md: 16px;
  --shadow: 0 12px 40px rgb(46 45 45 / 8%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 1.5rem;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

h1,
h2,
h3,
h4,
p,
dl,
dd,
pre {
  margin-top: 0;
}

h1,
h2,
h3,
h4 {
  letter-spacing: -0.025em;
  line-height: 1.12;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.45rem, 3vw, 2.1rem);
}

h3 {
  margin-bottom: 0.75rem;
  font-size: 1.15rem;
}

code,
.mono {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
}

code {
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--subtle);
  padding: 0.12em 0.35em;
}

.breakable {
  overflow-wrap: anywhere;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  transform: translateY(-180%);
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: white;
  padding: 0.65rem 0.9rem;
}

.skip-link:focus {
  transform: translateY(0);
}

.shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 1rem auto 5rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: clip;
}

.product-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
  border-bottom: 1px solid var(--rule);
  padding: 0 2rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 44px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 760;
  text-decoration: none;
}

.wordmark__mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: white;
  font-size: 0.72rem;
  letter-spacing: -0.04em;
}

.product-header__context {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.live-indicator > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--info);
}

.live-indicator--fixture,
.live-indicator--fixture > span {
  color: var(--warning);
}

.live-indicator--fixture > span {
  background: var(--warning);
}

.prior-state {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(240px, 0.75fr);
  gap: 3rem;
  padding: clamp(2rem, 6vw, 5rem) clamp(1.25rem, 6vw, 5rem);
  background: var(--subtle);
}

.prior-state h1 {
  max-width: 18ch;
  margin-bottom: 1rem;
  font-size: clamp(2rem, 5vw, 4.2rem);
}

.lede {
  max-width: 64ch;
  margin-bottom: 0;
  color: var(--carbon);
  font-size: clamp(1.04rem, 1.8vw, 1.25rem);
}

.eyebrow {
  margin-bottom: 0.45rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 760;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.state-facts {
  align-self: end;
  margin-bottom: 0;
  border-top: 1px solid var(--rule-strong);
}

.state-facts > div,
.receipt > div,
.receipt-card dl > div {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 1rem;
  border-bottom: 1px solid var(--rule);
  padding: 0.7rem 0;
}

dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

dd {
  margin: 0;
}

.stage-rail {
  position: sticky;
  z-index: 5;
  top: 0;
  border-block: 1px solid var(--rule);
  background: rgb(255 255 255 / 96%);
  backdrop-filter: blur(10px);
}

.stage-rail ol {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 1rem;
  list-style: none;
}

.stage-rail__item {
  position: relative;
}

.stage-rail__item:not(:last-child)::after {
  position: absolute;
  top: 50%;
  right: -1px;
  width: 1px;
  height: 28px;
  background: var(--rule);
  content: "";
  transform: translateY(-50%);
}

.stage-rail__item a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 68px;
  padding: 0.7rem 1rem;
  text-decoration: none;
}

.stage-rail__number {
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.72rem;
}

.stage-rail strong,
.stage-rail small {
  display: block;
}

.stage-rail strong {
  font-size: 0.9rem;
}

.stage-rail small {
  color: var(--muted);
  font-size: 0.7rem;
}

.stage-rail__item--complete .stage-rail__number,
.stage-rail__item--complete small {
  color: var(--verified);
}

.stage-rail__item--failed .stage-rail__number,
.stage-rail__item--failed small {
  color: var(--danger);
}

.stage-rail__item--denied .stage-rail__number,
.stage-rail__item--denied small,
.stage-rail__item--stale .stage-rail__number,
.stage-rail__item--stale small {
  color: var(--warning);
}

.case-ledger {
  width: min(100%, 1040px);
  margin: 0 auto;
}

.stage {
  min-height: 340px;
  border-bottom: 1px solid var(--rule);
  padding: clamp(2rem, 5vw, 4.5rem) clamp(1.25rem, 5vw, 4rem);
  scroll-margin-top: 70px;
}

.stage__header {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) auto;
  align-items: start;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.stage__number {
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border: 1px solid var(--rule-strong);
  border-radius: 50%;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.75rem;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 28px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 720;
  white-space: nowrap;
}

.status__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentcolor;
}

.status--active {
  border-color: #8db5cd;
  background: var(--info-bg);
  color: var(--info);
}

.status--complete {
  border-color: #9ac7aa;
  background: var(--verified-bg);
  color: var(--verified);
}

.status--failed {
  border-color: #d9a3a0;
  background: var(--danger-bg);
  color: var(--danger);
}

.status--denied,
.status--stale {
  border-color: #d8b36a;
  background: var(--warning-bg);
  color: var(--warning);
}

.evidence-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(290px, 0.8fr);
  gap: 3rem;
}

.evidence-kicker {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
}

.hostile-label {
  display: inline-block;
  margin-top: 1rem;
  border-left: 3px solid var(--rule-strong);
  padding-left: 0.85rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.receipt {
  margin: 0;
  border-top: 1px solid var(--rule);
}

.receipt > div {
  grid-template-columns: 6rem minmax(0, 1fr);
}

.receipt a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}

.rule-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  border-block: 1px solid var(--rule-strong);
  padding: 1rem 0;
}

.rule-banner p {
  margin: 0;
  font-weight: 650;
}

.rule-banner__operator {
  border-radius: 4px;
  background: var(--ink);
  color: white;
  padding: 0.25rem 0.45rem;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 800;
}

.match-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 1.5rem;
  border: 1px solid var(--rule);
  background: var(--rule);
}

.match {
  min-width: 0;
  background: var(--surface);
  padding: 1.25rem;
}

.match__heading {
  display: flex;
  align-items: start;
  gap: 0.75rem;
  min-height: 68px;
}

.match__marker {
  display: grid;
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: var(--subtle);
  color: var(--muted);
  font-weight: 800;
}

.match--exact .match__marker {
  background: var(--verified-bg);
  color: var(--verified);
}

.match h4 {
  margin-bottom: 0;
  font-size: 1rem;
}

.match__keys {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 1rem 0 0;
  border-top: 1px solid var(--rule);
}

.match__keys > div {
  min-width: 0;
  padding-top: 0.75rem;
}

.match__keys dd {
  overflow-wrap: anywhere;
}

.differences {
  margin: 1rem 0 0;
  padding: 0;
  color: var(--danger);
  font-size: 0.78rem;
  list-style: none;
}

.differences li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  border-top: 1px solid var(--rule);
  padding-top: 0.65rem;
}

.differences span {
  color: var(--muted);
  text-transform: capitalize;
}

.sandbox {
  overflow: hidden;
  border: 1px solid #454545;
  border-radius: var(--radius-sm);
  background: #1f1f1f;
  color: #f7f5f4;
}

.sandbox__bar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid #454545;
  padding: 0.65rem 0.9rem;
  color: #c9c4c1;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
}

.sandbox pre {
  max-height: 260px;
  margin: 0;
  padding: 1.1rem;
  overflow: auto;
  white-space: pre-wrap;
}

.sandbox code {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
}

.approval-airlock {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.approval-airlock p:last-child,
.target-missing {
  margin-bottom: 0;
}

.approval-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.approval-choices span {
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  background: var(--surface);
  padding: 0.35rem 0.65rem;
  color: var(--carbon);
  font-size: 0.75rem;
  font-weight: 720;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: white;
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
  font-weight: 750;
  text-decoration: none;
}

.button:hover {
  background: var(--carbon);
}

.target-missing {
  max-width: 29ch;
  color: var(--muted);
  font-size: 0.82rem;
}

.action-contract {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: 1px;
  margin-top: 1rem;
  border: 1px solid var(--rule);
  background: var(--rule);
}

.action-contract > div {
  min-width: 0;
  background: var(--subtle);
  padding: 1rem;
}

.action-contract p:last-child {
  margin-bottom: 0;
}

.argument-list {
  margin: 0;
  border: 1px solid var(--rule);
  border-top: 0;
}

.argument-list > div {
  display: grid;
  grid-template-columns: minmax(8rem, 0.5fr) minmax(0, 1.5fr);
  gap: 1rem;
  border-bottom: 1px solid var(--rule);
  padding: 0.75rem 1rem;
}

.argument-list > div:last-child {
  border-bottom: 0;
}

.argument-list code {
  overflow-wrap: anywhere;
}

.notice {
  border-left: 4px solid var(--rule-strong);
  background: var(--subtle);
  padding: 1rem 1.1rem;
}

.notice p:last-child {
  margin-bottom: 0;
}

.notice--danger {
  border-color: var(--danger);
  background: var(--danger-bg);
}

.notice--warning {
  border-color: var(--warning);
  background: var(--warning-bg);
}

.notice--success {
  border-color: var(--verified);
  background: var(--verified-bg);
}

.notice--info {
  border-color: var(--info);
  background: var(--info-bg);
}

.receipt-card {
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.receipt-card__title {
  background: var(--subtle);
  padding: 1.25rem;
}

.receipt-card__title h3 {
  margin-bottom: 0;
}

.receipt-card dl {
  margin: 0;
  padding: 0 1.25rem;
}

.receipt-card dl > div {
  grid-template-columns: 7rem minmax(0, 1fr);
}

.stage--verified {
  background: #fbfefc;
}

.verified-banner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  border-block: 1px solid #9ac7aa;
  padding: 1.25rem 0;
}

.verified-banner p:last-child {
  margin-bottom: 0;
}

.verified-banner__mark {
  display: grid;
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 50%;
  background: var(--verified);
  color: white;
  font-size: 1.5rem;
  font-weight: 800;
}

.verification-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 1.5rem 0;
  border: 1px solid var(--rule);
  background: var(--rule);
  padding: 0;
  list-style: none;
}

.verification-list li {
  display: flex;
  gap: 0.7rem;
  background: var(--surface);
  padding: 1rem;
}

.verification-list p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.checkmark {
  color: var(--verified);
  font-weight: 900;
}

.verification-time,
.event-meta,
.no-retry,
.empty-state {
  color: var(--muted);
  font-size: 0.85rem;
}

.event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 1.5rem 0 0;
  border-top: 1px solid var(--rule);
  padding-top: 0.75rem;
}

.pending-line {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.pending-line p {
  margin: 0;
}

.spinner {
  display: inline-block;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  border: 2px solid var(--rule-strong);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.contract-warning {
  width: min(calc(100% - 2rem), 1040px);
  margin: 1rem auto 0;
  border: 1px solid var(--danger);
  background: var(--danger-bg);
  padding: 1rem;
}

.contract-warning p:last-child {
  margin-bottom: 0;
}

.loading-page,
.feed-error {
  min-height: 560px;
  padding: clamp(3rem, 8vw, 7rem);
}

.loading-page h1,
.feed-error h1 {
  max-width: 15ch;
  margin: 1rem 0;
  font-size: clamp(2.2rem, 6vw, 4.5rem);
}

.loading-page p,
.feed-error p {
  max-width: 55ch;
}

.feed-error {
  border-left: 5px solid var(--danger);
}

.connection-status {
  position: fixed;
  z-index: 20;
  right: 1rem;
  bottom: 1rem;
  max-width: min(420px, calc(100% - 2rem));
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: 0 8px 24px rgb(46 45 45 / 12%);
  padding: 0.55rem 0.8rem;
  color: var(--muted);
  font-size: 0.75rem;
}

.connection-status--connected {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease 1.5s;
}

.connection-status--error {
  border-color: var(--danger);
  background: var(--danger-bg);
  color: var(--danger);
}

footer {
  border-top: 1px solid var(--rule);
  padding: 1.25rem 2rem;
  color: var(--muted);
  font-size: 0.75rem;
}

footer p {
  margin-bottom: 0;
}

.noscript {
  margin: 2rem;
  border: 1px solid var(--danger);
  background: white;
  padding: 2rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 840px) {
  .prior-state,
  .evidence-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .stage-rail {
    position: static;
    overflow-x: auto;
  }

  .stage-rail ol {
    min-width: 680px;
  }

  .match-grid,
  .verification-list {
    grid-template-columns: 1fr;
  }

  .approval-airlock {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .shell {
    width: 100%;
    margin: 0 0 4rem;
    border-inline: 0;
    border-radius: 0;
  }

  .product-header {
    min-height: 62px;
    padding: 0 1rem;
  }

  .product-header__context > span:first-child {
    display: none;
  }

  .live-indicator {
    font-size: 0.65rem;
  }

  .prior-state {
    padding: 2.5rem 1.25rem;
  }

  .prior-state h1 {
    font-size: 2.4rem;
  }

  .stage {
    min-height: 0;
    padding: 2.5rem 1.25rem;
  }

  .stage__header {
    grid-template-columns: 2.4rem minmax(0, 1fr);
    gap: 0.8rem;
  }

  .stage__number {
    width: 2.4rem;
    height: 2.4rem;
  }

  .stage__header .status {
    grid-column: 2;
    justify-self: start;
  }

  .state-facts > div,
  .receipt > div,
  .receipt-card dl > div,
  .argument-list > div {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .action-contract {
    grid-template-columns: 1fr;
  }

  .sandbox__bar {
    display: grid;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@media (forced-colors: active) {
  .status,
  .notice,
  .approval-airlock,
  .receipt-card,
  .contract-warning {
    border: 2px solid CanvasText;
  }

  .status__dot,
  .verified-banner__mark,
  .wordmark__mark {
    forced-color-adjust: none;
  }
}

.shell {
  overflow: visible;
}

.workspace-shell {
  display: grid;
  grid-template-areas: "sidebar main";
  grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
  min-height: 100%;
}

.workspace-sidebar {
  grid-area: sidebar;
  display: grid;
  align-content: start;
  gap: 1rem;
  border-right: 1px solid var(--rule);
  background:
    linear-gradient(180deg, rgb(247 245 244 / 92%), rgb(255 255 255 / 88%)),
    linear-gradient(180deg, transparent 0, transparent 29px, rgb(215 211 209 / 55%) 29px, rgb(215 211 209 / 55%) 30px);
  background-size: auto, 100% 30px;
  padding: 1rem;
}

.workspace-main {
  grid-area: main;
  min-width: 0;
}

.sidebar-card {
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 10px 28px rgb(46 45 45 / 5%);
  padding: 1rem;
}

.sidebar-card__header h2 {
  margin-bottom: 0;
  font-size: 1.05rem;
}

.queue-list,
.mini-stage-list,
.activity-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.queue-list {
  display: grid;
  gap: 0.75rem;
}

.queue-list li {
  min-width: 0;
}

.queue-card {
  display: flex;
  min-height: 44px;
  flex-direction: column;
  gap: 0.35rem;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--subtle);
  padding: 0.85rem 0.95rem;
  text-decoration: none;
}

.queue-card strong {
  font-size: 0.95rem;
}

.queue-card span,
.queue-card small {
  color: var(--muted);
}

.queue-card--current {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.queue-card--placeholder {
  background: var(--surface);
}

.mini-stage-list {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.mini-stage {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-top: 1px solid var(--rule);
  padding-top: 0.55rem;
}

.mini-stage small {
  color: var(--muted);
}

.mini-stage--complete small {
  color: var(--verified);
}

.mini-stage--failed small {
  color: var(--danger);
}

.mini-stage--denied small,
.mini-stage--stale small {
  color: var(--warning);
}

.workspace-links {
  display: grid;
  gap: 0.5rem;
}

.workspace-links a {
  display: flex;
  align-items: center;
  min-height: 44px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--surface);
  padding: 0.7rem 0.8rem;
  text-decoration: none;
}

.workspace-links a:hover,
.queue-card:hover {
  border-color: var(--rule-strong);
  background: white;
}

.nav-note {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  text-wrap: pretty;
}

.provenance-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 28px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--surface);
  padding: 0.2rem 0.55rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 720;
  letter-spacing: 0.02em;
}

.provenance-badge--live {
  color: var(--ink);
}

.provenance-badge--fixture {
  border-color: #d8b36a;
  background: var(--warning-bg);
  color: var(--warning);
}

.provenance-badge--unavailable {
  border-color: #d9a3a0;
  background: var(--danger-bg);
  color: var(--danger);
}

.timestamp {
  display: grid;
  gap: 0.1rem;
}

.timestamp__friendly {
  color: inherit;
}

.timestamp__exact {
  color: var(--muted);
  font-size: 0.74rem;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

.lede,
.lede--secondary,
.nav-note,
.activity__lede,
.terminal-note,
.feed-error p,
.loading-page p {
  text-wrap: pretty;
}

.lede--secondary {
  margin-top: 1rem;
  max-width: 62ch;
  font-size: 1rem;
}

.state-facts dd {
  min-width: 0;
}

.state-facts .provenance-badge {
  max-width: fit-content;
}

.sidebar-card--terminal {
  padding: 0;
  overflow: hidden;
}

.sidebar-card--terminal .sidebar-card__header {
  padding: 1rem 1rem 0;
}

.sandbox--terminal {
  border: 0;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.terminal-copy {
  padding: 1rem 1.1rem 1.15rem;
}

.terminal-copy p {
  color: #f7f5f4;
}

.terminal-meta {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0 0;
}

.terminal-meta > div {
  display: grid;
  grid-template-columns: 6rem minmax(0, 1fr);
  gap: 0.75rem;
  border-top: 1px solid #454545;
  padding-top: 0.75rem;
}

.terminal-meta dt {
  color: #c9c4c1;
}

.terminal-meta dd {
  color: #f7f5f4;
}

.terminal-note {
  margin: 1rem 0 0;
  color: #c9c4c1;
  font-size: 0.82rem;
}

.activity {
  padding: clamp(2rem, 5vw, 4rem);
}

.activity__header {
  width: min(100%, 1040px);
  margin: 0 auto 1.25rem;
}

.activity__lede {
  max-width: 58ch;
  color: var(--muted);
}

.activity-list {
  display: grid;
  gap: 0.8rem;
  width: min(100%, 1040px);
  margin: 0 auto;
}

.activity-event details {
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--surface);
  overflow: hidden;
}

.activity-event summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 1rem;
  cursor: pointer;
  list-style: none;
  padding: 1rem;
}

.activity-event summary::-webkit-details-marker {
  display: none;
}

.activity-event__seq {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 999px;
  background: var(--subtle);
  color: var(--muted);
  font-size: 0.74rem;
}

.activity-event__body {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.activity-event__body span {
  color: var(--muted);
}

.activity-event__time {
  min-width: 230px;
}

.activity-event__detail {
  border-top: 1px solid var(--rule);
  background: var(--subtle);
  padding: 1rem;
}

.activity-event__detail pre {
  margin: 0;
  overflow: auto;
}

.activity-event--success details {
  border-color: #9ac7aa;
}

.activity-event--warning details {
  border-color: #d8b36a;
}

.activity-event--danger details {
  border-color: #d9a3a0;
}

.connection-status {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  padding: 0;
}

@media (max-width: 1080px) {
  .workspace-shell {
    grid-template-areas:
      "main"
      "sidebar";
    grid-template-columns: 1fr;
  }

  .workspace-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }

  .workspace-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 840px) {
  .product-header {
    align-items: start;
    padding-block: 1rem;
  }

  .product-header__context {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .activity-event summary {
    grid-template-columns: auto 1fr;
  }

  .activity-event__time {
    grid-column: 2;
    min-width: 0;
  }
}

@media (max-width: 600px) {
  .workspace-sidebar {
    padding: 1rem 1rem 0;
  }

  .workspace-links {
    grid-template-columns: 1fr;
  }

  .activity {
    padding: 2rem 1.25rem 2.75rem;
  }

  .activity-event summary {
    grid-template-columns: 1fr;
  }

  .activity-event__seq {
    width: 2.25rem;
    height: 2.25rem;
  }

  .activity-event__time {
    grid-column: auto;
  }

  .timestamp__exact {
    font-size: 0.72rem;
  }

  .terminal-meta > div {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
}

/* Product workspace refinement */
.shell {
  width: min(1320px, calc(100% - 2rem));
}

.workspace-sidebar {
  background: var(--subtle);
}

.product-mode,
.system-state {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--surface);
  padding: 0.2rem 0.6rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 720;
  letter-spacing: 0.02em;
  text-transform: none;
}

.sidebar-card__header--status {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.75rem;
}

.system-state--connected {
  border-color: #aebcb3;
  color: var(--verified);
}

.system-state--unavailable,
.system-state--offline,
.system-state--unauthorized {
  border-color: #d8b36a;
  color: var(--warning);
}

.sidebar-card--terminal {
  padding: 1rem;
  overflow: visible;
}

.sidebar-card--terminal .sidebar-card__header {
  padding: 0;
}

.connection-panel {
  margin-top: 1rem;
  border-top: 1px solid var(--rule-strong);
  padding-top: 1rem;
}

.connection-panel > p {
  margin-bottom: 0;
  color: var(--carbon);
  font-size: 0.88rem;
}

.connection-panel .terminal-meta {
  margin-top: 1rem;
}

.connection-panel .terminal-meta > div {
  grid-template-columns: 6.5rem minmax(0, 1fr);
  border-color: var(--rule);
}

.connection-panel .terminal-meta dt,
.connection-panel .terminal-meta dd,
.connection-panel .terminal-note {
  color: var(--muted);
}

.connection-panel .terminal-note {
  border-top: 1px solid var(--rule);
  padding-top: 1rem;
}

.empty-workspace {
  min-width: 0;
}

.empty-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.65fr);
  align-items: end;
  gap: clamp(2rem, 5vw, 5rem);
  border-bottom: 1px solid var(--rule);
  background: var(--surface);
  padding: clamp(3.5rem, 8vw, 7rem) clamp(1.5rem, 6vw, 5.5rem) clamp(3rem, 6vw, 5rem);
}

.empty-hero h1 {
  max-width: 14ch;
  margin-bottom: 1.25rem;
  font-size: clamp(2.7rem, 6vw, 5.6rem);
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.empty-hero__lede {
  max-width: 58ch;
  margin-bottom: 0;
  color: var(--carbon);
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  text-wrap: pretty;
}

.readiness-card {
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-md);
  background: var(--subtle);
  overflow: hidden;
}

.readiness-card__header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  border-bottom: 1px solid var(--rule);
  background: var(--surface);
  padding: 1rem 1.1rem;
}

.readiness-mark {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--verified);
}

.readiness-card dl {
  margin: 0;
  padding: 0 1.1rem;
}

.readiness-card dl > div {
  display: grid;
  grid-template-columns: minmax(7.5rem, 1fr) auto;
  gap: 1rem;
  border-bottom: 1px solid var(--rule);
  padding: 0.9rem 0;
}

.readiness-card dl > div:last-child {
  border-bottom: 0;
}

.readiness-card dd {
  text-align: right;
  font-weight: 700;
}

.empty-explainer {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: clamp(2rem, 6vw, 5rem);
  border-bottom: 1px solid var(--rule);
  background: var(--subtle);
  padding: clamp(2.5rem, 5vw, 4.5rem) clamp(1.5rem, 6vw, 5.5rem);
}

.empty-explainer h2,
.empty-workflow h2,
.operator-boundary h2 {
  margin-bottom: 1rem;
}

.empty-explainer p,
.empty-workflow__header > p {
  max-width: 58ch;
  color: var(--muted);
}

.authority-note {
  align-self: start;
  border-left: 3px solid var(--ink);
  background: var(--surface);
  padding: 1.2rem 1.35rem;
}

.authority-note p {
  margin: 0.5rem 0 0;
  color: var(--muted);
}

.empty-workflow,
.operator-boundary {
  padding: clamp(2.5rem, 6vw, 5rem) clamp(1.5rem, 6vw, 5.5rem);
}

.empty-workflow {
  border-bottom: 1px solid var(--rule);
}

.empty-workflow__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.7fr);
  gap: 2rem;
  align-items: end;
  margin-bottom: 2rem;
}

.empty-workflow__header > p {
  margin-bottom: 0;
}

.empty-workflow ol {
  margin: 0;
  border: 1px solid var(--rule);
  border-radius: var(--radius-md);
  padding: 0;
  overflow: hidden;
  list-style: none;
}

.empty-workflow li {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.2rem;
  border-bottom: 1px solid var(--rule);
  background: var(--surface);
  padding: 1.15rem 1.25rem;
}

.empty-workflow li:last-child {
  border-bottom: 0;
}

.empty-workflow__number {
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.78rem;
}

.empty-workflow li strong {
  display: block;
  margin-bottom: 0.15rem;
}

.empty-workflow li p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.operator-boundary {
  background: var(--subtle);
}

.boundary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 1.5rem;
  border: 1px solid var(--rule);
  background: var(--rule);
}

.boundary-grid p {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  background: var(--surface);
  padding: 1.25rem;
}

.boundary-grid span {
  color: var(--muted);
  font-size: 0.88rem;
}

@media (max-width: 840px) {
  .empty-hero,
  .empty-explainer,
  .empty-workflow__header {
    grid-template-columns: 1fr;
  }

  .empty-hero {
    align-items: start;
  }

  .boundary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .empty-hero,
  .empty-explainer,
  .empty-workflow,
  .operator-boundary {
    padding-inline: 1.25rem;
  }

  .empty-hero h1 {
    font-size: 3rem;
  }

  .empty-workflow li {
    grid-template-columns: 2rem minmax(0, 1fr);
  }

  .empty-workflow li .status {
    grid-column: 2;
    justify-self: start;
  }

  .readiness-card dl > div,
  .connection-panel .terminal-meta > div {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .readiness-card dd {
    text-align: left;
  }
}
/* Console information architecture: behavior inspired by resource-management consoles; TruthLease visual identity. */
:root {
  --canvas: #ffffff;
  --surface: #ffffff;
  --subtle: #faf8f5;
  --ink: #1b1b1b;
  --carbon: #303030;
  --muted: #6d6d6d;
  --rule: #e9e9e9;
  --rule-strong: #cfcfcf;
  --brand: #088177;
  --brand-text: #066a63;
  --brand-tint: #eff8f6;
  --verified: #088177;
  --verified-text: #066a63;
  --verified-bg: #eff8f6;
  --focus: #0969da;
  --radius-sm: 4px;
  --radius-md: 6px;
  --shadow: none;
}

html {
  scroll-padding-top: 76px;
}

body {
  background: var(--canvas);
  font-size: 0.875rem;
  line-height: 1.5;
}

input:focus-visible,
select:focus-visible {
  border-color: var(--focus);
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}

.shell.console-shell {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: var(--canvas);
  box-shadow: none;
  overflow: visible;
}

.console-topbar.product-header {
  position: sticky;
  z-index: 50;
  top: 0;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) auto;
  min-height: 58px;
  border-bottom: 1px solid var(--rule);
  background: var(--surface);
  padding: 0 18px;
}

.console-topbar .wordmark {
  gap: 0.7rem;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

.console-topbar .wordmark__mark {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: var(--brand);
  font-size: 0.65rem;
  letter-spacing: 0.02em;
}

.console-topbar__scope {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.65rem;
  border-left: 1px solid var(--rule);
  padding-left: 1.25rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.console-topbar__product {
  color: var(--ink);
  font-weight: 650;
}

.console-topbar__divider {
  color: var(--rule-strong);
}

.console-topbar .product-header__context {
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  text-transform: none;
}

.read-only-badge,
.topbar-connection {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--surface);
  padding: 0.2rem 0.65rem;
  font-weight: 650;
}

.topbar-connection > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--warning);
}

.topbar-connection--connected > span {
  background: var(--verified);
}

.console-body.workspace-shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: calc(100vh - 58px);
}

.console-sidebar.workspace-sidebar {
  position: sticky;
  top: 58px;
  display: flex;
  height: calc(100vh - 58px);
  flex-direction: column;
  align-content: unset;
  gap: 0;
  border-right: 1px solid var(--rule);
  border-bottom: 0;
  background: #faf8f5;
  padding: 14px 10px;
  overflow: auto;
}

.console-nav {
  display: grid;
  gap: 1rem;
}

.console-nav__group {
  display: grid;
  gap: 3px;
}

.console-nav__label {
  margin: 0 10px 4px;
  color: #687582;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.console-nav__link {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  min-height: 40px;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0.45rem 0.65rem;
  color: var(--carbon);
  text-decoration: none;
}

.console-nav__link:hover {
  border-color: var(--rule);
  background: var(--surface);
  text-decoration: none;
}

.console-nav__link--active {
  border-color: #c8dadd;
  background: var(--brand-tint);
  color: #0c4a55;
}

.console-nav__link--sub {
  min-height: 34px;
  color: var(--muted);
  font-size: 0.8rem;
}

.console-nav__link span:nth-child(2) {
  min-width: 0;
}

.console-nav__link strong,
.console-nav__link small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.console-nav__link small {
  margin-top: 0.08rem;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 450;
}

.console-nav__icon {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 4px;
  color: #61717f;
  font-size: 0.62rem;
  line-height: 1;
}

.console-nav__count {
  min-width: 22px;
  border-radius: 999px;
  background: #e7ebef;
  padding: 0.08rem 0.4rem;
  color: var(--muted);
  font-size: 0.68rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.console-system {
  position: relative;
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  margin-top: auto;
  border-top: 1px solid var(--rule);
  padding: 0.9rem 0.65rem 0.1rem;
}

.console-system__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--warning);
}

.console-system__dot--connected {
  background: var(--verified);
}

.console-system strong,
.console-system small {
  display: block;
}

.console-system strong {
  font-size: 0.76rem;
}

.console-system small {
  color: var(--muted);
  font-size: 0.68rem;
}

.console-system details {
  position: static;
}

.console-system summary {
  cursor: pointer;
  color: var(--brand);
  font-size: 0.7rem;
  font-weight: 650;
}

.console-system details[open] {
  grid-column: 1 / -1;
  margin-top: 0.7rem;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--surface);
  padding: 0.75rem;
}

.console-system details p,
.console-system details dl {
  margin-bottom: 0.65rem;
  color: var(--muted);
  font-size: 0.72rem;
}

.console-system details p:last-child {
  margin-bottom: 0;
}

.console-system details dl > div {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 0.4rem;
  border-top: 1px solid var(--rule);
  padding-top: 0.45rem;
}

.console-content {
  min-width: 0;
  background: var(--canvas);
}

.console-page {
  width: min(100%, 1500px);
  margin: 0 auto;
  padding: 28px 30px 48px;
}

.console-page__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 2rem;
  margin-bottom: 24px;
}

.console-breadcrumb {
  margin-bottom: 0.45rem;
  color: var(--muted);
  font-size: 0.76rem;
}

.console-page__header h1 {
  margin-bottom: 0.45rem;
  font-size: clamp(1.8rem, 3vw, 2.25rem);
  letter-spacing: -0.035em;
}

.console-page__header > div > p:last-child {
  max-width: 74ch;
  margin-bottom: 0;
  color: var(--muted);
}

.console-page__facts {
  display: flex;
  margin: 0;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.console-page__facts > div {
  min-width: 110px;
  border-right: 1px solid var(--rule);
  padding: 0.65rem 0.85rem;
}

.console-page__facts > div:last-child {
  border-right: 0;
}

.console-page__facts dt {
  color: var(--muted);
  font-size: 0.67rem;
}

.console-page__facts dd {
  margin: 0.1rem 0 0;
  font-size: 0.82rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.resource-panel {
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.resource-toolbar {
  display: grid;
  gap: 0.85rem;
  border-bottom: 1px solid var(--rule);
  padding: 14px 16px;
}

.resource-toolbar__heading,
.resource-toolbar__controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.resource-toolbar__heading h2 {
  font-size: 1rem;
}

.result-count {
  color: var(--muted);
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
}

.resource-toolbar__controls {
  flex-wrap: wrap;
}

.search-control {
  position: relative;
  display: block;
  flex: 1 1 320px;
  max-width: 520px;
}

.search-control__icon {
  position: absolute;
  top: 50%;
  left: 0.75rem;
  color: var(--muted);
  font-size: 0.7rem;
  transform: translateY(-50%);
  pointer-events: none;
}

.search-control input,
.select-control select,
.refresh-button {
  min-height: 40px;
  border: 1px solid var(--rule-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.search-control input {
  width: 100%;
  padding: 0.55rem 0.75rem 0.55rem 2rem;
}

.select-control select {
  min-width: 170px;
  padding: 0.55rem 2rem 0.55rem 0.75rem;
}

.refresh-button {
  cursor: pointer;
  padding: 0.55rem 0.9rem;
  color: var(--brand);
  font-weight: 650;
}

.refresh-button:hover {
  border-color: var(--brand);
  background: var(--brand-tint);
}

.refresh-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.table-scroll {
  max-width: 100%;
  overflow: auto;
}

.case-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 0.8rem;
  text-align: left;
}

.case-table th {
  background: #f8fafb;
  color: #63717e;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.035em;
}

.case-table th,
.case-table td {
  border-bottom: 1px solid var(--rule);
  padding: 0.7rem 0.9rem;
  vertical-align: middle;
}

.case-table tbody tr:not([hidden]):hover {
  background: #f5fafb;
}

.case-table__link,
.case-table__action a {
  color: var(--brand);
  font-weight: 650;
}

.case-table__action {
  width: 100px;
  text-align: right;
  white-space: nowrap;
}

.case-table .timestamp__exact {
  display: none;
}

.table-empty {
  display: grid;
  min-height: 150px;
  place-content: center;
  justify-items: center;
  gap: 0.3rem;
  color: var(--muted);
  text-align: center;
}

.table-empty strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.table-empty .spinner {
  margin-bottom: 0.4rem;
}

.table-empty--error strong {
  color: var(--danger);
}

.resource-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-top: 1px solid var(--rule);
  padding: 0.75rem 0.9rem;
}

.resource-pagination p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.resource-panel__note {
  margin: 0;
  background: #f8fafb;
  padding: 0.6rem 0.9rem;
  color: var(--muted);
  font-size: 0.7rem;
}

.console-support-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(290px, 0.75fr);
  gap: 20px;
  margin-top: 20px;
}

.workflow-reference,
.authority-panel {
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--surface);
  padding: 18px;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.section-heading .eyebrow {
  grid-column: 1;
  margin-bottom: 0.15rem;
}

.section-heading h2 {
  grid-column: 1;
  font-size: 1.05rem;
}

.section-heading > p:last-child {
  grid-column: 2;
  grid-row: 1 / 3;
  max-width: 30ch;
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.lifecycle-list {
  margin: 0;
  border-top: 1px solid var(--rule);
  padding: 0;
  list-style: none;
}

.lifecycle-list li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
  border-bottom: 1px solid var(--rule);
  padding: 0.75rem 0.2rem;
}

.lifecycle-list li:last-child {
  border-bottom: 0;
}

.lifecycle-list__number {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.7rem;
}

.lifecycle-list li strong,
.lifecycle-list li div > span {
  display: block;
}

.lifecycle-list li div > span {
  color: var(--muted);
  font-size: 0.72rem;
}

.authority-panel h2 {
  margin-bottom: 0.85rem;
  font-size: 1.05rem;
}

.authority-panel dl {
  margin: 0;
}

.authority-panel dl > div {
  border-top: 1px solid var(--rule);
  padding: 0.65rem 0;
}

.authority-panel dt {
  color: var(--muted);
  font-size: 0.68rem;
}

.authority-panel dd {
  margin: 0.12rem 0 0;
  font-size: 0.78rem;
}

.authority-panel__note {
  margin: 0.8rem 0 0;
  border-radius: 6px;
  background: var(--brand-tint);
  padding: 0.7rem 0.8rem;
  color: #174d55;
  font-size: 0.72rem;
}

/* Case detail remains one deterministic causal record inside the console. */
.prior-state {
  gap: 2rem;
  border-bottom: 1px solid var(--rule);
  background: var(--surface);
  padding: 28px 30px 24px;
}

.prior-state h1 {
  margin-bottom: 0.65rem;
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  letter-spacing: -0.035em;
}

.prior-state .lede {
  max-width: 72ch;
  font-size: 0.95rem;
}

.prior-state .lede--secondary {
  max-width: 72ch;
  font-size: 0.82rem;
}

.prior-state .state-facts {
  border-radius: 8px;
}

.stage-rail {
  top: 58px;
  z-index: 20;
  background: var(--surface);
  box-shadow: 0 1px 2px rgb(23 33 43 / 6%);
}

.stage-rail a {
  min-height: 58px;
}

.case-ledger {
  background: var(--surface);
}

.stage {
  min-height: 0;
  padding: 28px 30px 34px;
}

.stage__header {
  margin-bottom: 1.4rem;
}

.stage__header h2,
.activity__header h2 {
  font-size: 1.35rem;
}

.activity {
  padding: 28px 30px 40px;
}

.activity-list {
  width: 100%;
}

.activity-event details,
.receipt-card,
.approval-airlock,
.readiness-card {
  border-radius: 8px;
  box-shadow: none;
}

.loading-page,
.feed-error {
  min-height: calc(100vh - 58px);
  padding: 48px 30px;
}

.loading-page h1,
.feed-error h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.console-content > footer {
  background: #f8fafb;
  padding: 0.9rem 30px;
}

@media (max-width: 1040px) {
  .console-page__header,
  .console-support-grid {
    grid-template-columns: 1fr;
  }

  .console-page__facts {
    width: fit-content;
  }
}

@media (max-width: 760px) {
  .console-topbar.product-header {
    grid-template-columns: 1fr auto;
    min-height: 56px;
    padding: 0 12px;
  }

  .console-topbar__scope {
    display: none;
  }

  .console-topbar .read-only-badge {
    display: none;
  }

  .console-body.workspace-shell {
    grid-template-columns: 1fr;
  }

  .console-sidebar.workspace-sidebar {
    position: sticky;
    z-index: 35;
    top: 56px;
    display: block;
    width: 100%;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--rule);
    padding: 6px 8px;
    overflow-x: auto;
  }

  .console-nav {
    display: flex;
    width: max-content;
    gap: 0.35rem;
  }

  .console-nav__group {
    display: flex;
    gap: 3px;
  }

  .console-nav__label,
  .console-system,
  .console-nav__link small,
  .console-nav__count {
    display: none;
  }

  .console-nav__link {
    display: flex;
    min-height: 40px;
    white-space: nowrap;
  }

  .workspace-main {
    order: initial;
  }

  .console-page {
    padding: 22px 16px 36px;
  }

  .console-page__facts {
    width: 100%;
    overflow-x: auto;
  }

  .console-page__facts > div {
    flex: 1 0 108px;
  }

  .resource-toolbar__controls {
    align-items: stretch;
  }

  .search-control,
  .select-control {
    flex: 1 1 100%;
    max-width: none;
  }

  .select-control select {
    width: 100%;
  }

  .refresh-button {
    width: 100%;
  }

  .section-heading {
    display: block;
  }

  .section-heading > p:last-child {
    margin-top: 0.35rem;
  }

  .prior-state,
  .stage,
  .activity {
    padding-inline: 16px;
  }

  .stage-rail {
    top: 103px;
  }
}

@media (max-width: 480px) {
  .product-header__context {
    display: block;
  }

  .topbar-connection {
    min-height: 26px;
    padding-inline: 0.5rem;
  }

  .console-page__header h1,
  .prior-state h1 {
    font-size: 1.75rem;
  }

  .lifecycle-list li {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .lifecycle-list .status {
    grid-column: 2;
    justify-self: start;
  }
}

/* Demo-first verified-ledger lock: evidence carries the visual weight. */
.prior-state {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  align-items: start;
}

.case-hero,
.case-hero__heading > div {
  min-width: 0;
}

.case-hero__heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 1.5rem;
}

.case-hero__phase {
  min-width: 170px;
  border-left: 2px solid var(--brand);
  background: var(--brand-tint);
  padding: 0.65rem 0.8rem;
}

.case-hero__phase span,
.case-hero__phase strong {
  display: block;
}

.case-hero__phase span {
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.case-hero__phase strong {
  margin-top: 0.15rem;
  font-size: 0.82rem;
}

.causal-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 1.35rem 0 0;
  border: 1px solid var(--rule);
  padding: 0;
  list-style: none;
}

.causal-strip li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 0.6rem;
  min-width: 0;
  border-right: 1px solid var(--rule);
  background: var(--subtle);
  padding: 0.8rem;
}

.causal-strip li:last-child {
  border-right: 0;
}

.causal-strip__number {
  color: var(--brand);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.68rem;
  font-weight: 700;
}

.causal-strip strong,
.causal-strip p {
  display: block;
}

.causal-strip strong {
  font-size: 0.78rem;
}

.causal-strip p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.proof-verdict {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(220px, 1fr) minmax(260px, 1.2fr);
  align-items: center;
  margin: -1px 0 1rem;
  border: 1px solid var(--rule);
  background: var(--surface);
}

.proof-verdict > div {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 70px;
  border-right: 1px solid var(--rule);
  padding: 0.75rem 1rem;
}

.proof-verdict__value {
  color: var(--brand);
  font-size: 1.45rem;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
}

.proof-verdict strong,
.proof-verdict small {
  display: block;
}

.proof-verdict small,
.proof-verdict > p {
  color: var(--muted);
  font-size: 0.72rem;
}

.proof-verdict > p {
  margin: 0;
  padding: 0.75rem 1rem;
}

.approval-airlock {
  grid-template-columns: 58px minmax(0, 1fr) minmax(190px, auto);
  border-width: 1px;
  border-color: var(--warning);
  border-radius: 6px;
  background: var(--warning-bg);
  padding: 1.25rem;
}

.approval-airlock__lock {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid var(--warning);
  border-radius: 50%;
  color: var(--warning);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.65rem;
  font-weight: 800;
}

.approval-airlock h3 {
  margin-bottom: 0.35rem;
  font-size: 1.12rem;
}

.patch-diff {
  border-top: 1px solid var(--rule);
  font-size: 0.8rem;
}

.patch-diff > div {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(120px, 1fr) minmax(120px, 1fr);
  gap: 1px;
  border-bottom: 1px solid var(--rule);
  background: var(--rule);
}

.patch-diff > div > * {
  min-width: 0;
  background: var(--surface);
  padding: 0.75rem 1rem;
  overflow-wrap: anywhere;
}

.patch-diff__header > span {
  background: var(--subtle);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.patch-diff code {
  border: 0;
  background: var(--surface);
  color: var(--carbon);
}

.patch-diff > div:not(.patch-diff__header) > code:last-child {
  color: var(--verified-text);
  font-weight: 700;
}

.console-nav__label {
  color: #5f6265;
}

.console-system summary,
.refresh-button,
.case-table__link,
.case-table__action a,
.causal-strip__number,
.proof-verdict__value {
  color: var(--brand-text);
}

.status--complete,
.stage-rail__item--complete .stage-rail__number,
.stage-rail__item--complete small,
.match--exact .match__marker,
.checkmark,
.mini-stage--complete small {
  color: var(--verified-text);
}

.console-nav__link,
.console-nav__link--sub,
.button,
.refresh-button {
  min-height: 44px;
}

@media (max-width: 1180px) {
  .prior-state {
    grid-template-columns: 1fr;
  }

  .prior-state .state-facts {
    width: 100%;
  }
}

@media (max-width: 960px) {
  .causal-strip {
    grid-template-columns: 1fr;
  }

  .causal-strip li {
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }

  .causal-strip li:last-child {
    border-bottom: 0;
  }

  .proof-verdict {
    grid-template-columns: 1fr 1fr;
  }

  .proof-verdict > div:nth-child(2) {
    border-right: 0;
  }

  .proof-verdict > p {
    grid-column: 1 / -1;
    border-top: 1px solid var(--rule);
  }

  .approval-airlock {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .approval-airlock > :last-child {
    grid-column: 2;
  }
}

@media (max-width: 640px) {
  .case-hero__heading,
  .proof-verdict {
    grid-template-columns: 1fr;
  }

  .case-hero__phase {
    width: 100%;
  }

  .proof-verdict > div {
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }

  .proof-verdict > p {
    grid-column: auto;
  }

  .approval-airlock {
    grid-template-columns: 1fr;
  }

  .approval-airlock__lock {
    width: 46px;
    height: 46px;
  }

  .approval-airlock > :last-child {
    grid-column: auto;
  }

  .patch-diff {
    overflow-x: auto;
  }

  .patch-diff > div {
    min-width: 520px;
  }
}

.run-now-control {
  position: fixed;
  z-index: 80;
  right: 18px;
  bottom: 18px;
  display: grid;
  width: min(390px, calc(100vw - 32px));
  gap: 0.85rem;
  border: 1px solid var(--rule-strong);
  border-left: 3px solid var(--brand);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 34px rgb(23 33 43 / 18%);
  padding: 1rem;
}

.run-now-control[hidden] {
  display: none;
}

.run-now-control__eyebrow {
  margin: 0 0 0.18rem;
  color: var(--brand-text);
  font-size: 0.66rem;
  font-weight: 750;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.run-now-control h2 {
  margin: 0;
  font-size: 1rem;
}

.run-now-control__status,
.run-now-control__boundary {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.74rem;
}

.run-now-control__actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.run-now-control button,
.run-now-control a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  padding: 0.55rem 0.9rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
}

.run-now-control button {
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #fff;
  cursor: pointer;
}

.run-now-control button:hover:not(:disabled) {
  background: var(--brand-text);
}

.run-now-control button:disabled {
  border-color: var(--rule-strong);
  background: var(--subtle);
  color: var(--muted);
  cursor: not-allowed;
}

.run-now-control a {
  border: 1px solid var(--rule-strong);
  color: var(--brand-text);
  text-decoration: none;
}

.run-now-control a.run-now-control__primary-link {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.run-now-control a.run-now-control__primary-link:hover {
  background: var(--brand-text);
}

.run-now-control button:focus-visible,
.run-now-control a:focus-visible {
  outline: 3px solid #7cc3cf;
  outline-offset: 2px;
}

.run-now-control__boundary {
  border-top: 1px solid var(--rule);
  padding-top: 0.7rem;
}

@media (max-width: 520px) {
  .run-now-control {
    right: 12px;
    bottom: 12px;
    width: calc(100vw - 24px);
  }
}
