:root {
  color-scheme: light;
  --canvas: #f3f5f4;
  --surface: #ffffff;
  --ink: #17201d;
  --muted: #65706c;
  --line: #d7ddda;
  --line-strong: #b9c3bf;
  --accent: #2e6b52;
  --accent-soft: #e5eee9;
  --attention: #a7611a;
  --attention-soft: #f6eadc;
  --danger: #9a3932;
  --danger-soft: #f7e8e6;
  --focus: #176bce;
  --sidebar: #1b2521;
  --sidebar-muted: #9caaa4;
  --radius: 6px;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-size: 15px; line-height: 1.5; }
a { color: inherit; text-decoration-color: var(--line-strong); text-underline-offset: 0.2em; }
a:hover { text-decoration-color: currentColor; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--focus) 70%, transparent); outline-offset: 3px; }
::selection { color: var(--ink); background: #cddfd5; }
code { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 0.88em; overflow-wrap: anywhere; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 232px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 24px 16px 18px; display: flex; flex-direction: column; color: #eef4f1; background: var(--sidebar); }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 26px; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; display: inline-grid; flex: 0 0 auto; place-items: center; border: 1px solid #52625b; border-radius: 50%; color: #fff; font-size: 14px; font-weight: 720; }
.brand strong, .brand small { display: block; }
.brand strong { letter-spacing: -0.02em; }
.brand small { margin-top: 1px; color: var(--sidebar-muted); font-size: 11px; }
.primary-nav { display: grid; gap: 3px; }
.primary-nav a { min-height: 44px; display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-left: 2px solid transparent; color: #cbd5d1; text-decoration: none; }
.primary-nav a span { width: 20px; color: #74847d; font: 10px/1 ui-monospace, "SFMono-Regular", monospace; }
.primary-nav a:hover { color: #fff; background: #222f2a; }
.primary-nav a.active { border-left-color: #72aa8f; color: #fff; background: #26342e; }
.sidebar-foot { margin-top: auto; display: grid; gap: 18px; padding: 18px 8px 0; border-top: 1px solid #35433d; }
.contour-state { display: flex; align-items: flex-start; gap: 9px; color: #dce5e1; font-size: 12px; }
.contour-state small { display: block; margin-top: 2px; color: var(--sidebar-muted); }
.state-dot { width: 7px; height: 7px; margin-top: 5px; border: 1px solid #8d9c96; border-radius: 50%; }
.state-dot.active { border-color: #7bc29e; background: #7bc29e; }
.sidebar .text-action { color: var(--sidebar-muted); }
.workspace-shell { min-width: 0; }
.topbar { height: 58px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(24px, 4vw, 64px); border-bottom: 1px solid var(--line); background: rgba(243, 245, 244, 0.94); }
.environment-label { color: var(--muted); font-size: 12px; }
.quick-action { color: var(--accent); font-size: 13px; font-weight: 650; }
.topbar-actions { display: flex; align-items: center; gap: 18px; }
.topbar-actions form { display: inline-flex; }
.shell-search { height: 32px; border-bottom: 1px solid var(--line-strong); }
.shell-search:focus-within { border-color: var(--accent); }
.shell-search input { width: clamp(120px, 15vw, 220px); padding: 5px 4px; border: 0; outline: 0; background: transparent; font-size: 13px; }
.shell-search button { width: 30px; padding: 0; border: 0; color: var(--accent); background: transparent; font-size: 19px; cursor: pointer; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.shell-stop { min-height: 32px; display: inline-flex; align-items: center; padding: 5px 10px; border: 1px solid #c4938f; border-radius: 3px; color: #782c27; background: #fbefee; cursor: pointer; font-size: 12px; font-weight: 700; text-decoration: none; }
.shell-stop:hover, .shell-stop.active { border-color: #7f2f2a; color: #fff; background: #7f2f2a; }
.global-stop-banner { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 9px clamp(24px, 4vw, 64px); color: #fff; background: #7f2f2a; text-decoration: none; }
.global-stop-banner strong { font-size: 13px; }
.global-stop-banner span { color: #f5d8d5; font-size: 12px; text-align: right; }
.main-content { width: min(1420px, 100%); margin: 0 auto; padding: clamp(32px, 5vw, 72px) clamp(24px, 4vw, 64px) 80px; }

.page-heading { margin-bottom: var(--space-4); display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); }
.page-heading h1 { max-width: 820px; margin: 2px 0 8px; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.08; letter-spacing: -0.045em; }
.eyebrow, .section-index { margin: 0 0 6px; color: var(--muted); font: 650 11px/1.3 ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: 0.04em; }
.lede { max-width: 720px; margin: 0; color: var(--muted); font-size: 16px; }
.muted { color: var(--muted); }
.section-heading { min-height: 54px; margin-bottom: 6px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line-strong); }
.section-heading h2 { margin: 0 0 14px; font-size: 20px; letter-spacing: -0.025em; }
.section-heading > a { margin-top: 13px; color: var(--accent); font-size: 13px; }

.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; padding: 9px 15px; border: 1px solid var(--line-strong); border-radius: var(--radius); color: var(--ink); background: var(--surface); cursor: pointer; font-weight: 650; text-align: center; text-decoration: none; }
.button:hover { border-color: #82908a; }
.button.primary { border-color: var(--accent); color: #fff; background: var(--accent); }
.button.primary:hover { background: #265b46; }
.button.quiet { color: var(--accent); background: transparent; }
.button.attention { border-color: var(--attention); color: #fff; background: var(--attention); }
.button.danger { border-color: #cfaaa6; color: var(--danger); background: var(--danger-soft); }
.button.wide { width: 100%; }
.text-action { min-height: 28px; padding: 0; border: 0; color: var(--accent); background: none; cursor: pointer; font-size: 13px; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 0.2em; }
.text-action.danger { color: var(--danger); }

.notice, .validation-summary { margin: 0 0 24px; padding: 12px 14px; border-left: 3px solid var(--accent); color: #244637; background: var(--accent-soft); }
.validation-summary-valid { display: none; }

.planning-disclosure { margin-top: 1.25rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.planning-disclosure summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.provenance-card, .escalation-card { border-left: 3px solid var(--accent); background: var(--paper); padding: 1rem 1.25rem; margin: 1rem 0; }
.provenance-card { display: grid; gap: .35rem; }
.provenance-card span { color: var(--muted); }
.provenance-card p { overflow-wrap: anywhere; }
.timeline-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.timeline-list li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.timeline-list li > span { margin-left: 8px; font-size: 11px; }
.timeline-list li p { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.inline-actions { margin-top: 8px; }
.route-list { margin: 1rem 0; padding-left: 1.35rem; color: var(--muted); }
.route-list li { padding: .2rem 0; }
.route-list .passed { text-decoration: line-through; opacity: .7; }
.route-list .current { color: var(--accent); font-weight: 700; }
.compact-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: .75rem 0; }
.validation-summary:empty { display: none; }
.validation-summary { border-left-color: var(--danger); color: #6f2824; background: var(--danger-soft); }
.validation-summary ul { margin: 0; padding-left: 20px; }
.field-error { color: var(--danger); font-size: 12px; }
.field-error:empty { display: none; }
.input-validation-error { border-color: var(--danger) !important; }

.signal-strip { margin-bottom: var(--space-5); display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.signal-strip div { min-width: 0; padding: 17px 20px; border-right: 1px solid var(--line); }
.signal-strip div:first-child { padding-left: 0; }
.signal-strip div:last-child { border-right: 0; }
.signal-strip strong { display: inline-block; min-width: 36px; font: 680 27px/1 ui-monospace, "SFMono-Regular", Consolas, monospace; font-variant-numeric: tabular-nums; }
.signal-strip span { color: var(--muted); font-size: 12px; }
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 60px); }
.ledger-section { min-width: 0; }
.recent-section, .history-section, .task-ledger { margin-top: var(--space-5); }

.exception-signals { margin-bottom: 38px; }
.exception-signals strong { color: var(--danger); }
.exception-ledger { max-width: 1180px; }
.exception-updated { margin-top: 13px; color: var(--muted); font: 11px/1.4 ui-monospace, "SFMono-Regular", Consolas, monospace; }
.exception-empty { min-height: 118px; }
.exception-list { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.exception-card { padding: 21px 23px 19px; border: 1px solid var(--line-strong); border-left: 4px solid var(--attention); background: var(--surface); }
.exception-card.critical { border-left-color: var(--danger); }
.exception-card > header, .exception-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.exception-card > header > div { display: flex; align-items: center; gap: 8px; }
.exception-card > header time, .exception-category { color: var(--muted); font: 650 10px/1.4 ui-monospace, "SFMono-Regular", Consolas, monospace; text-transform: uppercase; letter-spacing: .045em; }
.exception-marker { width: 7px; height: 7px; border-radius: 50%; background: var(--attention); }
.exception-card.critical .exception-marker { background: var(--danger); }
.exception-title-row { margin: 10px 0 18px; }
.exception-title-row h3 { margin: 0; font-size: 20px; letter-spacing: -.025em; }
.exception-title-row p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.status.critical { color: var(--danger); background: var(--danger-soft); }
.status.attention { color: #77501f; background: var(--attention-soft); }
.exception-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.exception-facts div { min-width: 0; padding: 14px 18px 14px 0; }
.exception-facts div + div { padding-left: 18px; border-left: 1px solid var(--line); }
.exception-facts dt { margin-bottom: 5px; color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .055em; }
.exception-facts dd { margin: 0; color: #3f4b47; font-size: 12px; line-height: 1.55; }
.exception-action { display: inline-block; margin-top: 14px; color: var(--accent); font-size: 12px; font-weight: 650; }
.routine-state { margin-top: var(--space-5); }
.routine-signals { margin-bottom: 36px; }

.work-list, .run-list, .entity-list, .timeline { margin: 0; padding: 0; list-style: none; }
.work-list li { border-bottom: 1px solid var(--line); }
.work-list a { min-height: 68px; display: grid; grid-template-columns: 50px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 0; text-decoration: none; }
.work-list a:hover strong { color: var(--accent); }
.work-number { color: var(--muted); font: 12px/1 ui-monospace, "SFMono-Regular", monospace; }
.work-main { min-width: 0; }
.work-main strong, .work-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.work-main small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.status { display: inline-flex; align-items: center; gap: 6px; width: fit-content; padding: 4px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: transparent; font-size: 11px; font-weight: 650; white-space: nowrap; }
.status::before { width: 5px; height: 5px; border-radius: 50%; background: currentColor; content: ""; }
.status.positive { border-color: #bad0c4; color: var(--accent); background: var(--accent-soft); }
.status.active { border-color: #9fc5b2; color: var(--accent); background: #eef6f1; }
.status.attention { border-color: #ddbf9e; color: var(--attention); background: var(--attention-soft); }
.status.negative { border-color: #dab6b2; color: var(--danger); background: var(--danger-soft); }
.status.large { min-height: 34px; padding: 6px 11px; font-size: 12px; }

.run-list { position: relative; }
.run-list::before { position: absolute; top: 19px; bottom: 19px; left: 5px; width: 1px; background: var(--line-strong); content: ""; }
.run-list li { position: relative; display: grid; grid-template-columns: 11px minmax(0, 1fr); gap: 13px; }
.run-list a { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); text-decoration: none; }
.run-list a strong, .run-list a small { display: block; }
.run-list a small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.pulse-marker { z-index: 1; width: 11px; height: 11px; margin-top: 28px; border: 2px solid var(--canvas); border-radius: 50%; background: var(--line-strong); box-shadow: 0 0 0 1px var(--line-strong); }
.pulse-marker.active, .pulse-marker.positive { background: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.pulse-marker.attention { background: var(--attention); box-shadow: 0 0 0 1px var(--attention); }

.empty-state { min-height: 150px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 5px; padding: 24px 0; color: var(--muted); border-bottom: 1px solid var(--line); }
.empty-state strong { color: var(--ink); font-size: 16px; }
.empty-state a { margin-top: 9px; color: var(--accent); }
.empty-state.compact { min-height: 100px; }

.split-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(310px, 0.75fr); gap: clamp(34px, 5vw, 74px); align-items: start; }
.split-layout.wide-editor { grid-template-columns: minmax(0, 1.15fr) minmax(370px, 0.85fr); }
.editor-panel { position: sticky; top: 86px; padding: 24px; border: 1px solid var(--line-strong); background: var(--surface); }
.editor-panel h2 { margin: 0 0 21px; font-size: 22px; letter-spacing: -0.025em; }
.stack-form { display: grid; gap: 8px; }
.stack-form label, .decision-form label { margin-top: 8px; color: #39433f; font-size: 12px; font-weight: 650; }
input, textarea, select { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 3px; color: var(--ink); background: var(--surface); }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: #8a9691; }
input:read-only { color: var(--muted); background: #edf0ef; }
.stack-form .button { margin-top: 10px; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-pair > div { min-width: 0; display: grid; gap: 8px; }

.entity-list > li { display: flex; align-items: flex-start; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.planning-links { margin: 12px 0; padding-left: 20px; overflow-wrap: anywhere; }
.planning-links li { display: list-item; margin: 6px 0; }
.planning-form { margin: 20px 0; }
.planning-choices { min-width: 0; margin: 8px 0; padding: 14px; border: 1px solid var(--line); }
.planning-choices legend { padding: 0 6px; font-weight: 650; }
.planning-choices label { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; overflow-wrap: anywhere; }
.planning-choices input[type="checkbox"] { width: 18px; height: 18px; min-height: 18px; margin-top: 3px; flex: 0 0 18px; }
.planning-choices small { display: block; color: var(--muted); }
.planning-progress { padding: 12px 0; border-bottom: 1px solid var(--line); }
.entity-main { min-width: 0; flex: 1; }
.entity-main strong, .entity-main small { display: block; }
.entity-main small { margin-top: 2px; color: var(--muted); }
.entity-main p { margin: 9px 0 0; color: #414b47; }
.entity-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
.entity-actions form { display: inline-flex; }
.identity-mark { width: 32px; height: 32px; display: grid; flex: 0 0 auto; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--accent); background: var(--accent-soft); font-size: 12px; font-weight: 700; }
.profile-note { display: block; margin-top: 9px; color: var(--muted); font-size: 12px; }

.inbox-composer { margin-bottom: var(--space-5); padding: 22px 24px; border-left: 3px solid var(--accent); background: var(--surface); }
.inbox-composer h2 { margin: 0; font-size: 20px; }
.inbox-composer form { margin-top: 17px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 12px; }
.table-wrap { overflow-x: auto; }
.task-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.task-table th { padding: 10px 12px; color: var(--muted); border-bottom: 1px solid var(--line-strong); font-size: 11px; font-weight: 650; text-align: left; white-space: nowrap; }
.task-table th:first-child, .task-table td:first-child { padding-left: 0; }
.task-table td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.task-table td:nth-child(2) { min-width: 280px; }
.task-table td:last-child { color: var(--muted); white-space: nowrap; }
.task-table small { max-width: 480px; display: block; margin-top: 2px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.task-title-link { font-weight: 650; text-decoration: none; }
.task-title-link:hover { color: var(--accent); }

.breadcrumb { margin: -18px 0 28px; display: flex; gap: 8px; color: var(--muted); font-size: 12px; }
.task-heading, .run-heading { align-items: center; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: clamp(34px, 5vw, 72px); align-items: start; }
.detail-main { min-width: 0; display: grid; gap: 42px; }
.task-form { max-width: 850px; padding-top: 10px; }
.brief-readonly h3 { margin: 24px 0 7px; font-size: 12px; color: var(--muted); }
.brief-readonly > p { max-width: 850px; margin: 0; white-space: pre-line; }
.criteria-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.criteria-list li { display: grid; grid-template-columns: 26px minmax(0, 1fr); align-items: start; gap: 7px; }
.criteria-list li span { width: 22px; height: 22px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--muted); font: 10px/1 ui-monospace, monospace; }
.criteria-list li.satisfied span { border-color: var(--accent); color: #fff; background: var(--accent); }
.result-sheet { padding: 24px; border-left: 3px solid var(--accent); background: var(--accent-soft); }
.result-sheet h2 { margin: 0 0 12px; font-size: 22px; }
.result-sheet p { margin: 0; white-space: pre-line; }
.inline-message { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; padding-top: 12px; }
.action-rail, .run-inspector { position: sticky; top: 86px; display: grid; gap: 22px; }
.action-rail > section, .run-inspector > section { padding: 19px; border: 1px solid var(--line-strong); background: var(--surface); }
.action-rail form + form, .action-rail a + form, .run-inspector a + form { margin-top: 9px; }
.metadata-list { margin: 0; display: grid; }
.metadata-list div { display: flex; justify-content: space-between; gap: 18px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.metadata-list dt { color: var(--muted); font-size: 12px; }
.metadata-list dd { margin: 0; text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; }

.run-state { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.connection-state { color: var(--attention); font-size: 11px; }
.connection-state.connected { color: var(--accent); }
.run-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: clamp(34px, 5vw, 72px); align-items: start; }
.timeline-sheet { min-width: 0; }
.timeline { position: relative; padding-top: 6px; }
.timeline::before { position: absolute; top: 12px; bottom: 20px; left: 74px; width: 1px; background: var(--line-strong); content: ""; }
.timeline li { position: relative; display: grid; grid-template-columns: 57px 11px minmax(0, 1fr); gap: 13px; min-height: 94px; padding: 13px 0 20px; }
.timeline li time { color: var(--muted); font: 11px/1.4 ui-monospace, "SFMono-Regular", monospace; font-variant-numeric: tabular-nums; }
.timeline-node { z-index: 1; width: 11px; height: 11px; margin-top: 2px; border: 3px solid var(--canvas); border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.timeline li div { max-width: 850px; padding-bottom: 19px; border-bottom: 1px solid var(--line); }
.timeline li small, .timeline li strong { display: block; }
.timeline li small { margin-bottom: 4px; color: var(--muted); font: 10px/1.3 ui-monospace, "SFMono-Regular", monospace; }
.timeline li strong { font-size: 16px; }
.timeline li p { margin: 7px 0 0; color: #48534f; white-space: pre-line; }
.timeline li.timeline-empty { grid-template-columns: 57px 11px minmax(0, 1fr); }
.timeline-empty time { visibility: hidden; }

.decision-count { min-width: 70px; padding: 12px 14px; border-top: 2px solid var(--attention); color: var(--attention); background: var(--attention-soft); font-weight: 700; text-align: center; }
.decision-ledger { max-width: 1040px; }
.approval-sheet { margin: 24px 0 38px; padding: 24px; border: 1px solid #d8b793; border-top: 3px solid var(--attention); background: var(--surface); }
.approval-sheet > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.approval-sheet h3 { margin: 0; font-size: 23px; letter-spacing: -0.025em; }
.approval-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; margin: 22px 0; }
.approval-facts div { padding: 11px 0; border-top: 1px solid var(--line); }
.approval-facts dt { margin-bottom: 4px; color: var(--muted); font-size: 11px; }
.approval-facts dd { margin: 0; overflow-wrap: anywhere; }
.decision-form { display: grid; gap: 8px; margin: 20px 0 14px; padding-top: 18px; border-top: 1px solid var(--line-strong); }
.decision-form > div { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }

.runner-heading { align-items: center; }
.runner-count { min-width: 96px; padding: 11px 14px; border-top: 2px solid var(--accent); text-align: right; }
.runner-count strong, .runner-count span { display: block; }
.runner-count strong { font: 680 25px/1 ui-monospace, "SFMono-Regular", monospace; }
.runner-count span { margin-top: 5px; color: var(--muted); font-size: 11px; }
.runner-layout { grid-template-columns: minmax(0, 1.45fr) minmax(330px, 0.65fr); }
.runner-list { margin: 0; padding: 0; list-style: none; }
.runner-list > li { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 15px; padding: 21px 0; border-bottom: 1px solid var(--line); }
.runner-identity { position: relative; width: 38px; height: 48px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--surface); }
.runner-identity strong { color: var(--accent); font-size: 13px; }
.runner-identity .state-dot { position: absolute; top: -4px; right: -4px; margin: 0; border: 2px solid var(--canvas); }
.runner-identity .state-dot.active { border-color: var(--canvas); background: #4d9873; }
.runner-identity .state-dot.attention { border-color: var(--canvas); background: var(--attention); }
.runner-identity .state-dot.negative { border-color: var(--canvas); background: var(--danger); }
.runner-main { min-width: 0; }
.runner-title { display: flex; align-items: center; gap: 10px; }
.runner-main > p { margin: 4px 0 12px; color: var(--muted); font-size: 12px; }
.runner-facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; }
.runner-facts div { display: flex; gap: 7px; }
.runner-facts dt, .runner-facts dd { margin: 0; font-size: 11px; }
.runner-facts dt { color: var(--muted); }
.runner-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.enrollment-panel > .muted { margin: -7px 0 18px; }
.enrollment-result { display: grid; gap: 10px; margin: 4px 0 16px; padding: 17px; border-left: 3px solid var(--attention); background: var(--attention-soft); }
.enrollment-result > span { color: #6e451c; font-size: 12px; font-weight: 650; }
.enrollment-result > code { padding: 10px; overflow-wrap: anywhere; border: 1px solid #ddbf9e; background: var(--surface); }
.enrollment-result small { color: #735b43; }
.enrollment-note { display: grid; gap: 5px; margin-top: 24px; padding-top: 17px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.enrollment-note strong { color: var(--ink); }

.emergency-heading { align-items: center; }
.emergency-state { min-width: 124px; padding: 12px 14px; border-top: 3px solid var(--accent); color: var(--accent); background: var(--accent-soft); font-size: 12px; font-weight: 750; text-align: center; }
.emergency-state.stopped { border-color: #7f2f2a; color: #782c27; background: #f4dcda; }
.emergency-auth-note { border-left-color: var(--attention); color: #684218; background: var(--attention-soft); }
.emergency-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr); gap: clamp(34px, 5vw, 72px); align-items: start; }
.stop-ready-panel { padding: 25px 0 8px; }
.stop-ready-panel > strong { display: block; font-size: 21px; letter-spacing: -0.025em; }
.stop-ready-panel > p { max-width: 620px; margin: 8px 0 18px; color: var(--muted); }
.stop-ready-panel .stack-form { max-width: 620px; }
.button.emergency-button { margin-top: 13px; border-color: #7f2f2a; color: #fff; background: #7f2f2a; }
.button.emergency-button:hover { background: #672520; }
.active-stop-panel { margin-top: 22px; padding: 23px; border: 1px solid #c4938f; border-left: 5px solid #7f2f2a; background: #fffafa; }
.active-stop-panel > div span, .active-stop-panel > div strong { display: block; }
.active-stop-panel > div span { color: var(--danger); font-size: 11px; }
.active-stop-panel > div strong { margin-top: 3px; font-size: 23px; letter-spacing: -0.025em; }
.active-stop-panel > p { margin: 16px 0; color: #573633; }
.active-stop-panel dl { display: grid; grid-template-columns: 1fr 1fr; margin: 0 0 20px; border-top: 1px solid #e5c8c5; }
.active-stop-panel dl div { padding: 12px 0; border-bottom: 1px solid #e5c8c5; }
.active-stop-panel dt { color: var(--muted); font-size: 11px; }
.active-stop-panel dd { margin: 3px 0 0; font: 680 22px/1 ui-monospace, "SFMono-Regular", Consolas, monospace; }
.local-stop-list { margin-top: 34px; }
.local-stop-list h3 { margin: 0; font-size: 16px; }
.local-stop-list article { display: grid; gap: 7px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.local-stop-list article > div { display: flex; align-items: center; gap: 10px; }
.local-stop-list article p { margin: 0; color: var(--muted); font-size: 13px; }
.unknown-count { min-width: 32px; color: var(--danger); font: 700 24px/1 ui-monospace, "SFMono-Regular", Consolas, monospace; text-align: right; }
.outcome-list, .stop-history-list { margin: 0; padding: 0; list-style: none; }
.outcome-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.outcome-list li > div:first-child span, .outcome-list li > div:first-child strong, .outcome-list li > div:first-child small { display: block; }
.outcome-list li > div:first-child span { color: var(--muted); font-size: 11px; }
.outcome-list li > div:first-child strong { margin-top: 3px; }
.outcome-list li > div:first-child small { margin-top: 3px; color: var(--muted); }
.outcome-list li > div:last-child { display: grid; justify-items: end; gap: 8px; font-size: 12px; }
.emergency-history { margin-top: var(--space-5); }
.stop-history-list li { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 4px 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.stop-history-list li > span { grid-row: 1 / span 2; color: var(--muted); font: 11px/1.5 ui-monospace, "SFMono-Regular", Consolas, monospace; }
.stop-history-list li > small { color: var(--muted); }

.schedule-preview { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.schedule-preview h3 { margin-top: 24px; }
.schedule-toggle { margin-top: 18px; }
.schedule-list code { color: var(--ink); font-size: .82rem; }
.schedule-occurrences { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.schedule-occurrences li { display: grid; gap: 3px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.schedule-occurrences small { color: var(--muted); font: 11px/1.5 ui-monospace, "SFMono-Regular", Consolas, monospace; }

.search-page-form { max-width: 850px; margin: 3px 0 38px; padding: 22px 0; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line); }
.search-page-form > label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.search-page-form > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.search-page-form input { min-width: 0; font-size: 16px; }
.search-results { max-width: 980px; }
.search-result-list { margin: 0; padding: 0; list-style: none; }
.search-result-list li { border-bottom: 1px solid var(--line); }
.search-result-list a { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 18px; align-items: start; padding: 21px 0; color: inherit; text-decoration: none; }
.search-result-list a:hover strong { color: var(--accent); }
.search-result-kind { padding-top: 3px; color: var(--accent); font: 700 10px/1.3 ui-monospace, "SFMono-Regular", monospace; text-transform: uppercase; letter-spacing: 0.08em; }
.search-result-main { min-width: 0; }
.search-result-main strong, .search-result-main span, .search-result-main small { display: block; }
.search-result-main strong { font-size: 17px; }
.search-result-main span { margin: 6px 0; color: #48534f; line-height: 1.55; }
.search-result-main small { color: var(--muted); }
.search-more { margin-top: 22px; color: var(--muted); font-size: 12px; }

.data-policy-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.export-note { position: static; }
.export-note p { line-height: 1.6; }
.artifact-ledger { margin-top: 48px; }
.artifact-list { margin: 0; padding: 0; list-style: none; }
.artifact-list li { display: flex; justify-content: space-between; gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.artifact-list strong, .artifact-list p, .artifact-list small { display: block; }
.artifact-list strong { margin-top: 5px; font-size: 17px; }
.artifact-list p { margin: 4px 0; }
.artifact-list small { color: var(--muted); overflow-wrap: anywhere; }
.artifact-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 9px; }

.resource-heading { align-items: center; }
.resource-overview, .resource-breakdowns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 4vw, 60px); }
.resource-overview { margin-bottom: 48px; }
.resource-card { min-width: 0; padding: 24px; border: 1px solid var(--line-strong); background: var(--surface); }
.resource-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.resource-facts div { padding: 14px 12px 14px 0; border-bottom: 1px solid var(--line); }
.resource-facts dt, .usage-totals dt, .recent-usage-list dt { color: var(--muted); font-size: 11px; }
.resource-facts dd, .usage-totals dd, .recent-usage-list dd { margin: 4px 0 0; font-weight: 680; }
.usage-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
.usage-totals div { padding: 22px 12px 22px 0; }
.usage-totals dd { font: 680 22px/1.2 ui-monospace, "SFMono-Regular", Consolas, monospace; overflow-wrap: anywhere; }
.resource-note { margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; line-height: 1.6; }
.usage-list, .recent-usage-list { margin: 0; padding: 0; list-style: none; }
.usage-list li { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.usage-list strong, .usage-list small { display: block; }
.usage-list small { margin-top: 4px; color: var(--muted); }
.usage-list > li > span { font: 650 12px/1.3 ui-monospace, "SFMono-Regular", Consolas, monospace; white-space: nowrap; }
.recent-usage { margin-top: 48px; }
.recent-usage-list li { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(420px, 1.2fr); align-items: center; gap: 32px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.usage-attempt-main a { color: inherit; text-decoration-color: var(--line-strong); text-underline-offset: .2em; }
.usage-attempt-main small { display: block; margin-top: 5px; color: var(--muted); }
.recent-usage-list dl { display: grid; grid-template-columns: .7fr .8fr 1.2fr; gap: 16px; margin: 0; }
.recent-usage-list dl div { min-width: 0; }
.recent-usage-list dd { overflow-wrap: anywhere; }

.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--canvas); }
.auth-panel { width: min(440px, 100%); padding: clamp(28px, 6vw, 48px); border-top: 3px solid var(--accent); background: var(--surface); box-shadow: 0 18px 50px rgba(23, 32, 29, 0.08); }
.auth-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 44px; font-weight: 700; }
.auth-panel .brand-mark { border-color: var(--accent); color: var(--accent); }
.auth-panel h1 { margin: 0 0 9px; font-size: 32px; letter-spacing: -0.04em; }
.auth-panel .lede { margin-bottom: 25px; }
.auth-note { margin: 24px 0 0; color: var(--muted); font-size: 12px; }

@media (max-width: 1020px) {
  .app-shell { grid-template-columns: 196px minmax(0, 1fr); }
  .split-layout, .split-layout.wide-editor, .detail-grid, .run-layout, .emergency-grid, .data-policy-grid, .resource-overview, .resource-breakdowns { grid-template-columns: 1fr; }
  .editor-panel, .action-rail, .run-inspector { position: static; }
  .action-rail, .run-inspector { max-width: 520px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .exception-facts { grid-template-columns: 1fr; }
  .exception-facts div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 720px) {
  .app-shell { display: block; }
  .sidebar { position: static; width: 100%; height: auto; padding: 14px 16px 0; }
  .brand { padding-bottom: 12px; }
  .primary-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 -16px; padding: 0 12px; border-top: 1px solid #35433d; }
  .primary-nav a { min-width: 0; justify-content: center; padding: 9px 4px; border-left: 0; border-bottom: 2px solid transparent; font-size: 13px; }
  .primary-nav a.active { border-bottom-color: #72aa8f; }
  .primary-nav a span { display: none; }
  .sidebar-foot { display: none; }
  .topbar { height: 52px; padding: 0 18px; }
  .environment-label { display: none; }
  .topbar-actions { width: 100%; gap: 10px; }
  .shell-search { flex: 1; min-width: 0; }
  .shell-search input { width: 100%; min-width: 0; }
  .quick-action { display: none; }
  .global-stop-banner { align-items: flex-start; flex-direction: column; gap: 1px; padding: 10px 18px; }
  .global-stop-banner span { text-align: left; }
  .main-content { padding: 32px 18px 64px; }
  .page-heading { display: grid; gap: 20px; }
  .page-heading h1 { font-size: 2rem; }
  .signal-strip { grid-template-columns: 1fr 1fr; }
  .signal-strip div, .signal-strip div:first-child { padding: 14px 10px; border-bottom: 1px solid var(--line); }
  .signal-strip div:nth-child(2) { border-right: 0; }
  .field-pair, .approval-facts { grid-template-columns: 1fr; }
  .editor-panel, .approval-sheet { padding: 19px; }
  .inbox-composer { padding: 18px; }
  .inbox-composer form, .inline-message { grid-template-columns: 1fr; }
  .work-list a { grid-template-columns: 43px minmax(0, 1fr); }
  .work-list .status { grid-column: 2; }
  .entity-list > li { flex-wrap: wrap; }
  .entity-actions { width: 100%; justify-content: flex-start; padding-left: 46px; }
  .timeline::before { left: 11px; }
  .timeline li, .timeline li.timeline-empty { grid-template-columns: 11px minmax(0, 1fr); }
  .timeline li time { grid-column: 2; grid-row: 1; }
  .timeline li .timeline-node { grid-column: 1; grid-row: 1 / span 2; }
  .timeline li div { grid-column: 2; }
  .decision-form > div { flex-direction: column-reverse; }
  .decision-form .button { width: 100%; }
  .runner-heading { align-items: start; }
  .runner-count { text-align: left; }
  .runner-list > li { grid-template-columns: 42px minmax(0, 1fr); }
  .runner-actions { grid-column: 2; align-items: flex-start; }
  .runner-title { align-items: flex-start; flex-direction: column; }
  .emergency-heading { align-items: start; }
  .active-stop-panel dl { grid-template-columns: 1fr; }
  .outcome-list li { grid-template-columns: 1fr; }
  .outcome-list li > div:last-child { justify-items: start; }
  .stop-history-list li { grid-template-columns: 1fr; }
  .stop-history-list li > span { grid-row: auto; }
  .search-page-form > div, .search-result-list a { grid-template-columns: 1fr; }
  .search-result-kind { padding: 0; }
  .search-result-list .status { justify-self: start; }
  .data-heading { align-items: start; }
  .artifact-list li { flex-direction: column; }
  .artifact-actions { align-items: flex-start; }
  .resource-heading { align-items: start; }
  .exception-card { padding: 18px; }
  .exception-card > header, .exception-title-row { gap: 12px; }
  .exception-title-row { flex-direction: column; }
  .resource-card { padding: 18px; }
  .resource-facts, .usage-totals { grid-template-columns: 1fr; }
  .recent-usage-list li { grid-template-columns: 1fr; gap: 14px; }
  .recent-usage-list dl { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
