:root {
  --bg: #0b1020;
  --bg-elevated: #141c2f;
  --text: #eef3ff;
  --muted: #9aa8c7;
  --accent: #5b9dff;
  --accent-soft: rgba(91, 157, 255, 0.15);
  --ok: #3ecf8e;
  --warn: #f0b429;
  --bad: #f07178;
  --border: #27324a;
  --radius: 12px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(1200px 600px at 10% -10%, #1a2850 0%, var(--bg) 55%);
  color: var(--text);
  line-height: 1.5;
}
.brand-short { display: none; }
.topbar-end {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  justify-content: flex-end;
  min-width: 0;
}
.user-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.user-label {
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
}
.nav-user-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.nav-user-link:hover {
  color: var(--text);
  background: var(--accent-soft);
}

.form-loading {
  color: var(--accent);
  font-size: 0.9rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.5rem;
  background: rgba(20, 28, 47, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.nav { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  transition: background 0.15s, color 0.15s;
}
.nav a:hover { color: var(--text); background: var(--accent-soft); }
.nav a.active {
  color: var(--text);
  background: var(--accent-soft);
  font-weight: 600;
}
.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}
h1 { font-size: 1.65rem; margin: 0 0 0.35rem; font-weight: 650; }
.lead { color: var(--muted); margin: 0 0 1.25rem; max-width: 62ch; }
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.5;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.1s, background 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #061018; }
.btn-primary:hover { filter: brightness(1.05); }
.btn-danger {
  background: rgba(240, 113, 120, 0.2);
  color: #ffc9cd;
  border: 1px solid rgba(240, 113, 120, 0.45);
}
.btn-danger:hover { background: rgba(240, 113, 120, 0.32); }
.btn-sm {
  padding: 0.25rem 0.65rem;
  font-size: 0.78rem;
  border-radius: 6px;
  text-decoration: none;
  display: inline-block;
}
.section-title {
  font-size: 1rem;
  margin: 0 0 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.page-header-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-shrink: 0;
}
.enforcement-banner.enforcement-allowed { border-left: 3px solid var(--ok); }
.enforcement-banner.enforcement-denied { border-left: 3px solid var(--bad); }
.badge-policy { background: rgba(147, 130, 255, 0.2); color: #c4b5fd; }
textarea.code-input { font-family: ui-monospace, monospace; font-size: 0.85rem; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.messages { list-style: none; padding: 0; margin: 0 0 1rem; }
.messages li {
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  background: rgba(62, 207, 142, 0.12);
  border: 1px solid rgba(62, 207, 142, 0.35);
  color: #d7ffe8;
}
.messages li.message-error {
  background: rgba(240, 113, 120, 0.14);
  border-color: rgba(240, 113, 120, 0.45);
  color: #ffd6d9;
}
.policy-error { margin: 0.35rem 0 0; max-width: 32ch; overflow-wrap: anywhere; }
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 1rem;
}
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
}
.card strong { font-size: 1.75rem; display: block; margin-top: 0.15rem; }
.panel {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.panel-header {
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
.panel-title {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  font-weight: 650;
}
.panel-subtitle { margin: 0; }
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}
.page-header-text { flex: 1; min-width: 0; }
.page-header-text .lead { margin-bottom: 0; }
.page-header-action {
  flex-shrink: 0;
  margin-top: 0.2rem;
}
.row-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}
table.data td .row-actions {
  flex-wrap: nowrap;
  white-space: nowrap;
}
.policy-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: nowrap;
  font-size: 0.92rem;
}
.row-link-danger {
  color: var(--bad);
}
.row-link-danger:hover {
  color: #ffb4b9;
}
.table-desktop { display: block; overflow-x: auto; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
table.data th, table.data td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
table.data th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
table.data tr:last-child td { border-bottom: none; }
.cards-mobile { display: none; }
.exec-card, .agent-card, .policy-card, .grant-card {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}
.exec-card:last-child, .agent-card:last-child,
.policy-card:last-child, .grant-card:last-child { border-bottom: none; }
.exec-card h3, .agent-card h3, .policy-card h3, .grant-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}
.meta { color: var(--muted); font-size: 0.86rem; }
.row-link { color: var(--accent); text-decoration: none; font-weight: 600; }
.row-link:hover { text-decoration: underline; }
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.badge-ok { background: rgba(62, 207, 142, 0.18); color: var(--ok); }
.badge-retired { background: rgba(148, 163, 184, 0.2); color: #94a3b8; }
.badge-run { background: var(--accent-soft); color: var(--accent); }
.badge-fail { background: rgba(240, 113, 120, 0.18); color: var(--bad); }
.badge-model { background: rgba(167, 139, 250, 0.2); color: #c4b5fd; }
.badge-tool { background: rgba(56, 189, 248, 0.18); color: #7dd3fc; }
.search {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.5rem;
  flex: 1 1 280px;
  min-width: 0;
}
.search input { flex: 1 1 auto; width: auto; min-width: 0; }
.search button { flex: none; }
.input, .search input, select.input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0f1628;
  color: var(--text);
  font: inherit;
}
.search button {
  padding: 0.6rem 1rem;
  border-radius: 10px;
  border: none;
  background: var(--accent);
  color: #061018;
  font-weight: 700;
  cursor: pointer;
}
.form-grid {
  display: grid;
  gap: 1rem;
  max-width: 520px;
}
.form-grid label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.86rem;
  color: var(--muted);
}
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.timeline li:last-child { border-bottom: none; }
.timeline .seq {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  padding-top: 0.15rem;
}
.timeline-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.35rem;
}
.timeline .dur {
  color: var(--muted);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}
.chain-ok { color: var(--ok); font-size: 0.8rem; }
.chain-bad { color: var(--bad); font-size: 0.8rem; }
.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.sub-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  color: var(--muted);
  word-break: break-all;
}
@media (max-width: 720px) {
  .table-desktop { display: none; }
  .cards-mobile { display: block; }
  .page { padding-inline: 1rem; }
  .timeline li { grid-template-columns: 1fr; gap: 0.35rem; }
  .page-header {
    flex-direction: column;
    align-items: stretch;
  }
  .page-header-action {
    margin-top: 0;
    width: 100%;
  }
  .topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
    padding: 0.65rem 1rem;
  }
  .brand-long { display: none; }
  .brand-short { display: inline; }
  .topbar-end {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 0.35rem;
    width: 100%;
  }
  .nav {
    flex: 1;
    flex-wrap: nowrap;
    gap: 0.15rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a {
    font-size: 0.82rem;
    padding: 0.4rem 0.55rem;
    white-space: nowrap;
  }
  .user-nav { gap: 0.25rem; }
  .user-label { display: none; }
  .nav-user-link {
    font-size: 0.82rem;
    padding: 0.4rem 0.55rem;
  }
}

.form-panel { padding: 1.5rem; max-width: 720px; }
.form-panel .form-grid { max-width: none; }
.form-grid > label, .form-grid > div { min-width: 0; }
.form-panel select { width: 100%; min-width: 0; }
.publication-status { padding: 1rem 1.25rem; margin-bottom: 1.5rem; }
.publication-status p { margin: .4rem 0 0; }
.publication-status.needs-attention, .attention-banner { border-left: 3px solid var(--bad); }
.status-heading { display: block; font-size: 0.98rem; }
.status-bad { color: #ffb4b9; }
.status-alert { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.status-details { margin-top: 0.6rem; font-size: 0.86rem; }
.status-details summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.86rem;
  width: fit-content;
}
.status-details pre {
  margin: 0.5rem 0 0;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  background: #0f1628;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.78rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.dead-letters { list-style: none; margin: 0; padding: 0; }
.dead-letters li { padding: 0.75rem 0 0; }
.dead-letters li + li { margin-top: 0.75rem; border-top: 1px solid var(--border); }
.dead-letters p { margin: 0.25rem 0 0; color: var(--text); }
.attention-banner {
  display: block;
  padding: 1rem 1.25rem;
  margin: 1rem 0 1.25rem;
  color: var(--text);
  text-decoration: none;
}
.attention-banner:hover { background: #18213a; }
.attention-banner .meta { display: block; margin-top: 0.3rem; }
.attention-banner.attention-notice { border-left-color: var(--warn); }
.enforcement-banner, .timeline, .request-id { overflow-wrap: anywhere; }
button:disabled { opacity: .6; cursor: wait; }
@media (max-width: 600px) { .form-panel { padding: 1rem; } }
.form-error-summary {
  margin: 0 0 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  background: rgba(240, 113, 120, 0.14);
  border: 1px solid rgba(240, 113, 120, 0.45);
  color: #ffd6d9;
  font-size: 0.9rem;
}
.field-error { color: var(--bad); font-size: 0.82rem; }
pre.field-error {
  margin: 0.15rem 0 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.input:not(textarea) { min-height: 2.625rem; }
.field-help { color: var(--muted); font-size: 0.8rem; }
.selected-tool-label { font-size: 0.8rem; }
@media (min-width: 721px) { .selected-tool-label { display: none; } }
table.data td.nowrap { white-space: nowrap; }
.ident {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}
.tool-server { display: block; margin-top: 0.15rem; }
.enforcement-banner { padding: 1rem 1.25rem; margin-bottom: 1rem; }
.enforcement-banner .enforcement-label { display: block; font-size: 1.1rem; margin-top: 0.25rem; }
.enforcement-banner p { margin: 0.35rem 0 0; }
.enforcement-banner .bypass-note { margin-top: 0.6rem; }
/* The async form handler focuses the replaced page for screen readers; no visible ring. */
main.page:focus { outline: none; }

/* Approvals and evidence (phase 3) */
.badge-pending { background: rgba(240, 180, 41, 0.18); color: var(--warn); }
.badge-approval { background: rgba(240, 180, 41, 0.14); color: #f5cc6a; }
.nav-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  margin-left: 0.35rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--warn);
  color: #1a1300;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}
.tabs {
  display: flex;
  gap: 0.25rem;
  margin: 0 0 1rem;
  border-bottom: 1px solid var(--border);
}
.tab {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.55rem 0.9rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--accent); }
.tab-count {
  display: inline-block;
  margin-left: 0.3rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  background: rgba(240, 180, 41, 0.18);
  color: var(--warn);
  font-size: 0.75rem;
}
.countdown {
  color: var(--warn);
  font-size: 0.82rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.countdown-lg { font-size: 1rem; }
.empty-state { color: var(--muted); padding: 1.25rem 1rem; margin: 0; }
.breadcrumb { margin: 0 0 0.75rem; font-size: 0.9rem; }
.breadcrumb a::before { content: "\2190  "; }
.decision-panel { padding: 1.15rem 1.25rem; margin-bottom: 1rem; border-left: 3px solid var(--border); }
.decision-panel.decision-pending { border-left-color: var(--warn); }
.decision-panel.decision-approved { border-left-color: var(--ok); }
.decision-panel.decision-denied { border-left-color: var(--bad); }
.decision-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.decision-text { margin: 0.6rem 0 0; }
.decision-note { margin: 0.85rem 0 0; color: var(--muted); }
.decision-form { margin-top: 1rem; display: grid; gap: 0.85rem; max-width: 640px; }
.decision-comment { display: grid; gap: 0.35rem; font-size: 0.86rem; color: var(--muted); }
.decision-comment .meta { font-size: 0.8rem; }
.decision-comment textarea { resize: vertical; min-height: 3.2rem; }
.decision-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.65rem; }
.decision-comment-quote {
  margin: 0.75rem 0 0;
  padding: 0.55rem 0.85rem;
  border-left: 2px solid var(--border);
  color: var(--text);
  background: #0f1628;
  border-radius: 0 8px 8px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.approval-context { margin-bottom: 1rem; }
.card .card-value { font-size: 1rem; margin-top: 0.15rem; overflow-wrap: anywhere; }
.card .card-value + .meta, .card .card-link + .sub-id { display: block; margin-top: 0.25rem; }
.card-link { display: block; margin-top: 0.15rem; overflow-wrap: anywhere; }
.detail-section { padding: 1rem 1.25rem; margin-bottom: 1rem; }
.detail-section .panel-title { margin-bottom: 0.75rem; }
.detail-section > .meta { margin: 0.75rem 0 0; overflow-wrap: anywhere; }
.kv {
  display: grid;
  grid-template-columns: minmax(8rem, max-content) 1fr;
  gap: 0.45rem 1.25rem;
  margin: 0;
}
.kv dt { color: var(--muted); font-size: 0.86rem; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
code.digest { overflow-wrap: anywhere; }
.trail { list-style: none; margin: 0; padding: 0; }
.trail li { padding: 0.7rem 0; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.trail li:first-child { padding-top: 0; }
.trail li:last-child { border-bottom: none; }
.enforcement-banner.enforcement-pending { border-left: 3px solid var(--warn); }
.download-action { display: flex; flex-direction: column; align-items: flex-end; gap: 0.35rem; }
.download-status { margin: 0; font-size: 0.86rem; max-width: 36ch; overflow-wrap: anywhere; }
.download-ok { color: var(--ok); }
.range-form { max-width: none; margin-bottom: 1.5rem; }
.range-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 15rem)) max-content;
  justify-content: start;
  gap: 0.85rem;
  align-items: end;
}
.range-fields .btn { min-height: 2.625rem; }
.range-fields label { display: grid; gap: 0.35rem; font-size: 0.86rem; color: var(--muted); }
.range-form .download-status { margin-top: 0.75rem; max-width: none; }
.range-form .field-help { display: block; margin-top: 0.75rem; }
.verify-cell { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.verify-message { flex-basis: 100%; }
.status-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.status-row > div { min-width: 0; }
.status-row form { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 0.35rem; }
.problem-list { margin: 0.5rem 0 0; padding-left: 1.1rem; font-size: 0.86rem; overflow-wrap: anywhere; }
.section-note { margin: 0.75rem 0 2rem; overflow-wrap: anywhere; }
.check-row {
  display: grid !important;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.6rem !important;
  color: var(--text) !important;
}
.check-row input[type=checkbox] { width: 1.1rem; height: 1.1rem; margin: 0.15rem 0 0; accent-color: var(--accent); }
.check-row > span { display: grid; gap: 0.2rem; }
.check-label { font-size: 0.9rem; }
.card-link-block { text-decoration: none; color: var(--text); }
.card-link-block:hover { background: #18213a; }
.count-pending { color: var(--warn); }
@media (max-width: 720px) {
  .status-row { flex-direction: column; align-items: stretch; }
  .status-row form { align-items: stretch; }
  .status-row form .btn { width: 100%; }
  .range-fields { grid-template-columns: 1fr; justify-content: stretch; }
  .kv { grid-template-columns: 1fr; gap: 0.15rem; }
  .kv dd { margin-bottom: 0.5rem; }
  .download-action { align-items: stretch; }
  .download-action .btn { width: 100%; }
  .decision-actions { align-items: stretch; }
  .decision-actions .btn { flex: 1 1 auto; white-space: nowrap; }
}
@media (max-width: 720px) {
  /* Brand and account share the first row; every section stays visible below, wrapping. */
  .topbar {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "brand user" "nav nav";
    align-items: center;
    row-gap: 0.45rem;
  }
  .topbar-end { display: contents; }
  .brand { grid-area: brand; }
  .user-nav { grid-area: user; }
  .nav {
    grid-area: nav;
    flex-wrap: wrap;
    overflow: visible;
    gap: 0.2rem;
    margin: 0 -0.55rem;
  }
  .nav a { display: inline-flex; align-items: center; }
}
.nowrap { white-space: nowrap; }
.principal { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.86rem; }
.lead-wide { max-width: none; }
.digest-short { font-size: 0.8rem; color: var(--muted); }
@media (max-width: 720px) {
  form.page-header-action .btn { width: 100%; }
}

/* Former inline styles: the Content-Security-Policy allows stylesheet rules only. */
.empty-note { padding: 1rem; }
.card strong.card-value-text { font-size: 1rem; }
.card strong.card-value-id { font-size: 0.85rem; }
.timeline-panel { padding: 0 1rem; }
.event-result { margin-top: 0.35rem; }
.event-time { margin-top: 0.25rem; }
.form-panel-padded { padding: 1.25rem; }
.toolbar.form-actions { margin-top: 1.25rem; margin-bottom: 0; }
.section-title.section-spaced { margin-top: 2rem; }
.panel.server-panel { margin-bottom: 1rem; }

/* Public sandbox (phase 4) */
.sandbox-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(240, 180, 41, 0.45);
  background: rgba(240, 180, 41, 0.12);
  color: #f5cc6a;
  font-size: 0.78rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}
.sandbox-hero { margin: 0.5rem 0 1.5rem; }
.sandbox-hero h1 { font-size: 2rem; line-height: 1.2; margin-bottom: 0.6rem; }
.sandbox-hero .lead { max-width: 72ch; margin-bottom: 1rem; }
.eyebrow {
  margin: 0 0 0.4rem;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.sandbox-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.sandbox-facts strong { color: var(--text); font-variant-numeric: tabular-nums; }
.sandbox-facts strong.count-pending { color: var(--warn); }
.scenario-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1rem;
}
/* Three enforcement scenarios on the first row, the two approval scenarios on the second. */
.scenario-card { grid-column: span 2; }
.scenario-card:nth-child(n + 4) { grid-column: span 3; }
@media (max-width: 960px) {
  .scenario-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scenario-card, .scenario-card:nth-child(n + 4) { grid-column: auto; }
}
@media (max-width: 600px) {
  .scenario-grid { grid-template-columns: minmax(0, 1fr); }
}
.scenario-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.1rem 1.15rem;
  overflow: visible;
}
.scenario-card.scenario-chosen { border-color: var(--accent); }
.scenario-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.scenario-head .policy-code { color: var(--muted); font-size: 0.8rem; }
.scenario-card h3 { margin: 0.15rem 0 0; font-size: 1.05rem; }
.scenario-summary { margin: 0; color: var(--text); font-size: 0.9rem; flex: 1; }
.scenario-who { margin: 0; overflow-wrap: anywhere; }
.scenario-card .btn { align-self: flex-start; margin-top: 0.35rem; }
.run-row {
  display: grid;
  grid-template-columns: 1fr auto 6.5rem;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
}
.run-row:last-child { border-bottom: none; }
.run-row:hover { background: #18213a; }
.run-row-title { font-weight: 600; overflow-wrap: anywhere; }
.run-row-title .badge { margin-left: 0.35rem; vertical-align: middle; }
.run-row-time { text-align: right; font-variant-numeric: tabular-nums; }
.explore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 1rem;
}
.explore-card strong { font-size: 1.05rem; margin: 0 0 0.3rem; }
.explore-card .meta { display: block; }
.run-ids { margin: 0.6rem 0 0; overflow-wrap: anywhere; }
.run-status.run-queued, .run-status.run-running { border-left-color: var(--warn); }
.run-status.run-done { border-left-color: var(--ok); }
.run-status.run-failed { border-left-color: var(--bad); }
.run-steps { list-style: none; margin: 0; padding: 0; }
.run-step {
  display: grid;
  grid-template-columns: 1.25rem 1fr;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
}
.run-step:first-child { padding-top: 0; }
.run-step:last-child { border-bottom: none; padding-bottom: 0; }
.run-step p { margin: 0.25rem 0 0; overflow-wrap: anywhere; }
.step-marker {
  width: 0.8rem;
  height: 0.8rem;
  margin-top: 0.35rem;
  border-radius: 999px;
  background: var(--ok);
}
.step-held .step-marker { background: var(--warn); }
.step-blocked .step-marker { background: var(--bad); }
.step-waiting .step-marker { background: transparent; border: 2px solid var(--muted); }
.run-links { display: flex; flex-wrap: wrap; gap: 0.65rem; margin-bottom: 2rem; }
@media (max-width: 720px) {
  .sandbox-hero h1 { font-size: 1.6rem; }
  .run-row { grid-template-columns: 1fr auto; gap: 0.35rem 0.75rem; }
  .run-row-time { grid-column: 1 / -1; text-align: left; }
  .scenario-card .btn, .run-links .btn { width: 100%; }
}
