:root {
  --ink: #17211f;
  --muted: #64716c;
  --soft: #eef1ee;
  --paper: #f4f6f4;
  --white: #ffffff;
  --line: #d8deda;
  --line-strong: #b9c3be;
  --red: #b83b35;
  --red-soft: #fff0ed;
  --amber: #b76d0a;
  --amber-soft: #fff6dd;
  --green: #236e60;
  --green-soft: #e6f2ee;
  --blue: #315f74;
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "DM Sans", sans-serif; letter-spacing: 0; }
button, textarea, input { font: inherit; letter-spacing: 0; }
button { color: inherit; }
.app-shell { min-height: 100vh; }
.app-header { min-height: 74px; padding: 0 28px; background: var(--white); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 280px 1fr 280px; align-items: stretch; position: sticky; top: 0; z-index: 20; }
.brand { color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 12px; width: max-content; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border: 2px solid var(--ink); background: #f1c84b; box-shadow: 3px 3px 0 var(--ink); }
.brand-mark span { width: 8px; height: 16px; border: 2px solid var(--ink); border-top: 0; border-radius: 0 0 7px 7px; transform: rotate(45deg); }
.brand b, .brand small, .source-health b, .source-health small { display: block; }
.brand b { font-size: 18px; line-height: 1.1; }
.brand small { margin-top: 3px; color: var(--muted); font-size: 13px; }
.primary-nav { display: flex; align-items: stretch; justify-content: center; gap: 26px; }
.primary-nav button { border: 0; border-bottom: 3px solid transparent; background: transparent; padding: 3px 2px 0; font-size: 15px; font-weight: 600; cursor: pointer; }
.primary-nav button:hover { color: var(--blue); }
.primary-nav button.active { border-bottom-color: var(--red); color: var(--red); }
.source-health { border: 0; background: transparent; display: grid; grid-template-columns: 10px 1fr 22px; align-items: center; gap: 9px; text-align: left; cursor: pointer; padding: 0; justify-self: end; }
.source-health b { font-size: 14px; }
.source-health small { color: var(--muted); font-size: 12px; margin-top: 2px; }
.health-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--amber); flex: 0 0 auto; }
.health-dot.ok { background: var(--green); }
.health-dot.bad { background: var(--red); }
.refresh-glyph { font-size: 20px; color: var(--muted); }
.checking .refresh-glyph { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.workspace, .content-page { width: min(1500px, 100%); margin: 0 auto; padding: 20px 28px 54px; }
.mode-banner { border: 1px solid #e5ca8c; background: var(--amber-soft); min-height: 58px; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.mode-banner > div { display: flex; align-items: center; gap: 12px; }
.mode-banner b { font-size: 15px; }
.mode-label, .section-label { font: 600 12px "IBM Plex Mono", monospace; text-transform: uppercase; color: var(--muted); }
.mode-label { color: #70460f; background: #f5dfaa; padding: 5px 7px; white-space: nowrap; }
.mode-banner p { margin: 0; color: #6f5a35; font-size: 14px; max-width: 600px; text-align: right; }
.live-banner { border-color: #a7c8be; background: var(--green-soft); }
.live-banner .mode-label { color: #175c50; background: #cce3dc; }
.live-banner p { color: #45635b; }
.stale-banner { border-color: #e1aaa6; background: var(--red-soft); }
.stale-banner .mode-label { color: #852c27; background: #f2ceca; }
.stale-banner p { color: #75504d; }
.workspace-intro { display: flex; justify-content: space-between; gap: 40px; align-items: end; padding: 24px 0 20px; }
.workspace-intro h1, .page-intro h1 { margin: 5px 0 5px; font-size: 28px; line-height: 1.2; }
.workspace-intro p, .page-intro p { margin: 0; max-width: 820px; color: var(--muted); font-size: 16px; line-height: 1.5; }
.queue-count { text-align: right; flex: 0 0 auto; }
.queue-count b { display: block; font: 600 25px "IBM Plex Mono", monospace; }
.queue-count span { color: var(--muted); font-size: 13px; }
.workspace-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 0; border: 1px solid var(--line); background: var(--white); min-height: 750px; }
.queue-pane { background: #f8f9f7; border-right: 1px solid var(--line); }
.queue-pane-header { height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.queue-pane-header h2 { margin: 3px 0 0; font-size: 17px; }
.queue-pane-header > span { color: var(--muted); font-size: 12px; }
.queue-list { display: grid; }
.queue-item { width: 100%; border: 0; border-bottom: 1px solid var(--line); border-left: 4px solid transparent; background: transparent; text-align: left; padding: 15px 14px 16px 12px; cursor: pointer; }
.queue-item:hover { background: var(--white); }
.queue-item.selected { border-left-color: var(--red); background: var(--white); }
.queue-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.recency-tag { color: var(--blue); font: 600 11px "IBM Plex Mono", monospace; text-transform: uppercase; }
.priority { color: #67420c; background: var(--amber-soft); border: 1px solid #e6ca89; padding: 3px 5px; font: 600 11px "IBM Plex Mono", monospace; text-transform: uppercase; white-space: nowrap; }
.priority.high { color: #852c27; background: var(--red-soft); border-color: #e4aaa6; }
.case-status { display: inline-block; color: var(--muted); font: 600 11px "IBM Plex Mono", monospace; text-transform: uppercase; white-space: nowrap; }
.case-status.investigating { color: var(--red); }
.case-status.known-incident, .case-status.resolved { color: var(--green); }
.case-status.acknowledged { color: var(--blue); }
.case-status.monitoring { color: var(--amber); }
.case-status.dismissed { color: var(--muted); text-decoration: line-through; }
.queue-item > strong { display: block; margin: 12px 0 6px; font-size: 16px; line-height: 1.25; }
.queue-reason, .queue-meta { display: block; color: var(--muted); font-size: 13px; line-height: 1.45; }
.confidence-row { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; color: var(--muted); font-size: 12px; }
.confidence-row b { color: var(--ink); font: 600 12px "IBM Plex Mono", monospace; }
.confidence-track { display: block; height: 4px; margin: 4px 0 7px; background: #dde3df; overflow: hidden; }
.confidence-track i { display: block; height: 100%; background: var(--green); }
.queue-meta { margin-top: 3px; }
.queue-foot { margin: 18px 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.queue-foot b { color: var(--ink); }
.queue-foot p { margin: 5px 0 0; line-height: 1.45; }

.case-detail { min-width: 0; }
.case-heading { min-height: 125px; padding: 22px 24px; display: flex; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.case-kicker { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.case-heading h1 { margin: 10px 0 5px; font-size: 28px; line-height: 1.2; }
.trigger-summary { margin: 0; max-width: 800px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.decision-state { text-align: right; flex: 0 0 auto; }
.decision-state > span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 7px; }
.decision-state .case-status { font-size: 12px; border: 1px solid var(--line); padding: 6px 8px; text-decoration: none; }
.recommendation { margin: 18px 24px 0; background: #edf4f2; border-left: 4px solid var(--green); padding: 14px 16px; display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start; }
.recommendation-icon { width: 27px; height: 27px; border: 1px solid var(--green); color: var(--green); font: 600 16px "IBM Plex Mono", monospace; display: grid; place-items: center; border-radius: 50%; }
.recommendation span { color: var(--green); font: 600 11px "IBM Plex Mono", monospace; text-transform: uppercase; }
.recommendation h2 { font-size: 17px; margin: 3px 0; }
.recommendation p { color: #52655f; font-size: 13px; margin: 0; }
.operational-match { margin: 14px 24px 0; border: 1px solid var(--line); background: #fafbf9; padding: 15px 16px; }
.case-evidence > .operational-match { margin: 18px 0 0; }
.match-heading, .block-heading, .related-title { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.match-heading h2 { margin: 4px 0 0; font-size: 18px; }
.match-state { color: #765315; background: var(--amber-soft); border: 1px solid #e6ca89; padding: 5px 7px; font: 600 11px "IBM Plex Mono", monospace; text-transform: uppercase; white-space: nowrap; }
.match-state.linked { color: var(--green); background: var(--green-soft); border-color: #a7c8be; }
.operational-match > p { margin: 8px 0 12px; color: var(--muted); font-size: 13px; line-height: 1.45; max-width: 920px; }
.related-list { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.related-title { padding: 8px 0; }
.related-title b { font-size: 13px; }
.related-title span { color: var(--muted); font-size: 11px; }
.related-record { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 12px; }
.related-record > div:last-child { text-align: right; }
.related-record b, .related-record span { display: block; }
.related-record span { color: var(--muted); margin-top: 2px; }
.match-empty { color: var(--muted); font-size: 12px; margin: 0; padding: 9px 0; border-top: 1px solid var(--line); }
.match-empty b, .match-empty span { display: block; }
.match-empty b { color: var(--ink); margin-bottom: 3px; }
.work-order-actions { display: grid; grid-template-columns: minmax(210px, 1fr) max-content max-content; align-items: center; gap: 8px; margin-top: 13px; }
.work-order-actions input, select { width: 100%; min-height: 38px; border: 1px solid var(--line-strong); border-radius: 2px; background: var(--white); color: var(--ink); padding: 8px 10px; font-size: 13px; }
.work-order-actions .text-button { padding: 7px; }
.dashboard-action { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.dashboard-action span { color: var(--muted); font-size: 12px; }
.dashboard-action .secondary-button { display: inline-flex; align-items: center; text-decoration: none; }
.lifecycle-band { margin: 14px 24px 0; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); background: var(--white); }
.lifecycle-step { min-height: 48px; display: flex; align-items: center; gap: 8px; padding: 9px 11px; border-right: 1px solid var(--line); color: var(--muted); }
.lifecycle-step:last-child { border-right: 0; }
.lifecycle-step span { width: 22px; height: 22px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid var(--line-strong); border-radius: 50%; font: 600 11px "IBM Plex Mono", monospace; }
.lifecycle-step b { font-size: 12px; overflow-wrap: anywhere; }
.lifecycle-step.complete { color: var(--green); background: #f4f9f7; }
.lifecycle-step.complete span { color: var(--white); background: var(--green); border-color: var(--green); }
.lifecycle-step.active { color: var(--red); background: var(--red-soft); }
.lifecycle-step.active span { color: var(--white); background: var(--red); border-color: var(--red); }
.case-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .8fr); gap: 0; margin-top: 0; }
.case-evidence { padding: 20px 24px 24px; min-width: 0; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 12px; }
.section-heading h2 { margin: 4px 0 0; font-size: 19px; }
.no-hindsight { color: var(--green); border: 1px solid #a7c8be; background: var(--green-soft); padding: 4px 7px; font: 600 11px "IBM Plex Mono", monospace; text-transform: uppercase; }
.map { width: 100%; height: 300px; background: #e9eeeb; border: 1px solid var(--line); }
.maplibregl-ctrl-group { border-radius: 2px !important; }
.maplibregl-popup-content { border-radius: 2px; font-size: 13px; line-height: 1.5; }
.report-list { border: 1px solid var(--line); border-top: 0; max-height: 290px; overflow: auto; }
.report-row { min-height: 62px; display: grid; grid-template-columns: 28px 82px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 9px 11px; border-bottom: 1px solid var(--line); font-size: 13px; }
.report-row:last-child { border-bottom: 0; }
.report-index { width: 25px; height: 25px; display: grid; place-items: center; color: var(--white); background: var(--muted); border-radius: 50%; font: 600 12px "IBM Plex Mono", monospace; }
.report-row:nth-child(-n+3) .report-index { background: var(--red); }
.report-time { font: 500 12px "IBM Plex Mono", monospace; color: var(--muted); }
.report-address { min-width: 0; }
.report-address b, .report-address small { display: block; overflow-wrap: anywhere; }
.report-address small { color: var(--muted); margin-top: 2px; }
.alert-marker { color: var(--red); font: 600 11px "IBM Plex Mono", monospace; text-transform: uppercase; }
.future-lock, .outcome-summary { min-height: 54px; padding: 10px 12px; display: flex; align-items: center; gap: 10px; border: 1px dashed var(--line-strong); border-top: 0; background: var(--soft); }
.future-lock > span { color: var(--muted); }
.future-lock b, .future-lock small, .outcome-summary b, .outcome-summary span { display: block; }
.future-lock b, .outcome-summary b { font-size: 13px; }
.future-lock small, .outcome-summary span { color: var(--muted); font-size: 12px; margin-top: 2px; }
.outcome-summary { border-style: solid; border-color: #a7c8be; background: var(--green-soft); }
.outcome-summary b { color: var(--green); min-width: 112px; }
.current-summary { border-top: 0; }
.reveal-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.reveal-controls span { color: var(--muted); font-size: 12px; }
.review-sidebar { border-left: 1px solid var(--line); background: #fafbf9; }
.review-block { padding: 18px; border-bottom: 1px solid var(--line); }
.plain-reasons { list-style: none; padding: 0; margin: 11px 0 0; }
.review-title { margin: 0; font-size: 16px; }
.plain-reasons li { margin: 8px 0; padding-left: 13px; position: relative; font-size: 14px; line-height: 1.4; }
.plain-reasons li:before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--red); position: absolute; left: 0; top: 6px; }
.technical-detail { margin-top: 13px; padding-top: 10px; border-top: 1px solid var(--line); }
.technical-detail summary { cursor: pointer; color: var(--blue); font-size: 13px; font-weight: 600; }
.technical-detail dl { margin: 10px 0 4px; }
.technical-detail dl div { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.technical-detail dt { color: var(--muted); }
.technical-detail dd { margin: 0; font-weight: 600; }
.technical-detail p { color: var(--muted); font-size: 11px; line-height: 1.4; }
.checklist { margin-top: 11px; }
.checklist label { display: grid; grid-template-columns: 18px 1fr; align-items: start; gap: 8px; margin: 10px 0; font-size: 13px; line-height: 1.35; cursor: pointer; }
.checklist input { width: 15px; height: 15px; accent-color: var(--green); margin: 0; }
.demo-chip { color: var(--blue); border: 1px solid #a6bfcb; background: #eef5f7; padding: 3px 5px; font: 600 11px "IBM Plex Mono", monospace; text-transform: uppercase; white-space: nowrap; }
.field-label { display: block; margin: 10px 0 5px; color: var(--muted); font-size: 11px; font-weight: 600; }
.activity-heading { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); font: 600 11px "IBM Plex Mono", monospace; text-transform: uppercase; color: var(--muted); }
.activity-list { list-style: none; margin: 7px 0 0; padding: 0; }
.activity-list li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 11px; line-height: 1.35; }
.activity-list time { color: var(--muted); white-space: nowrap; }
.activity-list .empty-activity { color: var(--muted); display: block; }
.confidence-pill { color: var(--green); border: 1px solid #a7c8be; background: var(--green-soft); padding: 4px 7px; font: 600 11px "IBM Plex Mono", monospace; text-transform: uppercase; }
.note-label { display: block; margin-bottom: 8px; }
textarea { width: 100%; resize: vertical; min-height: 76px; border: 1px solid var(--line-strong); border-radius: 2px; padding: 10px; background: var(--white); color: var(--ink); font-size: 13px; line-height: 1.4; }
textarea:focus { outline: 2px solid #8ab5aa; outline-offset: 1px; }
.text-button { border: 0; background: transparent; color: var(--blue); padding: 7px 0 0; font-size: 13px; font-weight: 600; cursor: pointer; }
.action-grid { display: grid; grid-template-columns: 1fr; gap: 7px; margin-top: 10px; }
.action-button, .secondary-button { border: 1px solid var(--line-strong); background: var(--white); min-height: 38px; padding: 9px 12px; border-radius: 2px; font-size: 13px; font-weight: 600; cursor: pointer; }
.action-button:hover, .secondary-button:hover { border-color: var(--ink); }
.primary-action { color: var(--white); background: var(--green); border-color: var(--green); }
.primary-action:hover { background: #19584d; border-color: #19584d; }
.local-note { color: var(--muted); font-size: 11px; line-height: 1.4; margin: 9px 0 0; }
.empty-queue { min-height: 420px; border: 1px solid var(--line); background: var(--white); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 20px; text-align: center; }
.empty-check { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid #8ab5aa; border-radius: 50%; color: var(--green); font-size: 20px; }
.empty-queue h2 { margin: 14px 0 5px; font-size: 18px; }
.empty-queue p { margin: 0 0 16px; max-width: 480px; color: var(--muted); font-size: 14px; line-height: 1.5; }

.content-page { max-width: 1180px; padding-top: 42px; }
.page-intro { max-width: 860px; padding-bottom: 25px; }
.page-intro h1 { font-size: 33px; }
.decision-metrics { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--white); border: 1px solid var(--line); }
.decision-metrics > div { min-height: 132px; padding: 20px; border-right: 1px solid var(--line); }
.decision-metrics > div:last-child { border-right: 0; }
.decision-metrics span, .decision-metrics small { display: block; }
.decision-metrics span { color: var(--muted); font: 600 12px "IBM Plex Mono", monospace; text-transform: uppercase; }
.decision-metrics b { display: block; margin: 10px 0 7px; font: 600 27px "IBM Plex Mono", monospace; }
.decision-metrics small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.explanation-band { margin: 26px 0 38px; padding: 19px 20px; border-left: 4px solid var(--green); background: var(--green-soft); display: grid; grid-template-columns: 1fr 1.15fr; gap: 50px; align-items: center; }
.explanation-band h2 { font-size: 19px; margin: 5px 0 0; }
.explanation-band p { color: #52655f; margin: 0; font-size: 14px; line-height: 1.55; }
.evidence-section { margin: 36px 0; padding-top: 28px; border-top: 1px solid var(--line); }
.evidence-section > h2 { font-size: 20px; margin: 5px 0 16px; }
.model-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 50px; align-items: center; }
.bar-row { display: grid; grid-template-columns: 145px minmax(100px, 1fr) 45px; align-items: center; gap: 10px; margin: 13px 0; font-size: 13px; }
.bar-track { height: 24px; background: #e2e7e3; }
.bar-track i { display: block; height: 100%; background: var(--green); }
.model-note { border-left: 3px solid #f1c84b; padding: 4px 0 4px 14px; }
.model-note b { font-size: 15px; }
.model-note p, .supporting-copy { color: var(--muted); font-size: 13px; line-height: 1.55; }
.hindsight-flow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hindsight-flow span, .hindsight-flow b { border: 1px solid var(--line-strong); background: var(--white); padding: 8px 10px; font: 600 11px "IBM Plex Mono", monospace; text-transform: uppercase; }
.hindsight-flow b { color: var(--red); border-color: #dea19d; background: var(--red-soft); }
.hindsight-flow i { width: 18px; border-top: 1px solid var(--line-strong); }
.hindsight-flow em { width: 130px; text-align: center; border-top: 2px dashed var(--line-strong); color: var(--muted); font: 600 11px "IBM Plex Mono", monospace; padding-top: 6px; text-transform: uppercase; }
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); background: var(--white); }
.process-grid > div { padding: 20px; border-right: 1px solid var(--line); }
.process-grid > div:last-child { border: 0; }
.process-grid span { font: 600 12px "IBM Plex Mono", monospace; color: var(--red); }
.process-grid h2 { font-size: 18px; margin: 18px 0 6px; }
.process-grid p { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 0; }
.boundary-section { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; margin: 40px 0; }
.boundary-section > div { border-top: 3px solid var(--green); padding-top: 15px; }
.boundary-section > div:last-child { border-color: var(--red); }
.boundary-section h2 { font-size: 19px; line-height: 1.35; }
.boundary-section ul { padding-left: 18px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.source-section { border: 1px solid var(--line); background: var(--white); padding: 18px; display: flex; justify-content: space-between; gap: 30px; align-items: center; }
.source-section > div { display: flex; gap: 12px; align-items: start; }
.source-section .health-dot { margin-top: 5px; }
.source-section h2 { font-size: 18px; margin: 4px 0; }
.source-section p { color: var(--muted); font-size: 13px; margin: 0; }
footer { min-height: 70px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 18px 28px; color: var(--muted); font-size: 12px; }
footer span:first-child { color: var(--ink); font-weight: 700; }
.loading { min-height: 100vh; padding: 80px 24px; text-align: center; color: var(--muted); }
#toast { position: fixed; right: 22px; bottom: 22px; z-index: 40; max-width: min(360px, calc(100vw - 30px)); background: var(--ink); color: var(--white); padding: 11px 15px; border-radius: 2px; font-size: 14px; opacity: 0; transform: translateY(8px); transition: .2s; pointer-events: none; }
#toast.show { opacity: 1; transform: none; }
.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; }

@media (max-width: 1050px) {
  .app-header { grid-template-columns: 220px 1fr 210px; }
  .primary-nav { gap: 16px; }
  .workspace-grid { grid-template-columns: 290px minmax(0, 1fr); }
  .case-layout { grid-template-columns: 1fr; }
  .review-sidebar { border-left: 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; }
  .review-block { border-right: 1px solid var(--line); }
}

@media (max-width: 760px) {
  .app-header { position: static; min-height: 0; padding: 14px 14px 0; grid-template-columns: 1fr auto; grid-template-areas: "brand source" "nav nav"; }
  .brand { grid-area: brand; }
  .brand small { display: none; }
  .source-health { grid-area: source; grid-template-columns: 9px 1fr; }
  .source-health small, .refresh-glyph { display: none; }
  .primary-nav { grid-area: nav; justify-content: stretch; gap: 0; margin-top: 12px; }
  .primary-nav button { flex: 1; min-height: 42px; font-size: 13px; }
  .workspace, .content-page { padding: 12px 10px 36px; }
  .mode-banner { display: block; padding: 11px; }
  .mode-banner > div { display: block; }
  .mode-label { display: inline-block; margin-bottom: 7px; }
  .mode-banner b { display: block; line-height: 1.35; }
  .mode-banner p { margin-top: 6px; text-align: left; }
  .workspace-intro { padding: 18px 2px 14px; }
  .workspace-intro h1 { font-size: 24px; }
  .queue-count { display: none; }
  .workspace-grid { display: block; border: 0; background: transparent; }
  .queue-pane { border: 1px solid var(--line); background: var(--white); margin-bottom: 12px; }
  .queue-pane-header { height: auto; min-height: 58px; }
  .queue-list { grid-template-columns: repeat(3, minmax(210px, 1fr)); overflow-x: auto; }
  .queue-item { border-left: 0; border-bottom: 0; border-right: 1px solid var(--line); border-top: 4px solid transparent; min-height: 140px; }
  .queue-item.selected { border-left: 0; border-top-color: var(--red); }
  .queue-foot { display: none; }
  .case-detail { border: 1px solid var(--line); background: var(--white); }
  .case-heading { display: block; padding: 18px 14px; }
  .case-heading h1 { font-size: 24px; overflow-wrap: anywhere; }
  .decision-state { text-align: left; margin-top: 14px; }
  .recommendation { margin: 12px 14px 0; grid-template-columns: 26px 1fr; padding: 12px; }
  .recommendation h2 { font-size: 16px; }
  .operational-match, .lifecycle-band { margin-left: 14px; margin-right: 14px; }
  .work-order-actions { grid-template-columns: 1fr; }
  .work-order-actions .action-button { justify-content: center; width: 100%; }
  .dashboard-action { align-items: stretch; flex-direction: column; }
  .dashboard-action .secondary-button { justify-content: center; width: 100%; }
  .lifecycle-step { padding: 8px 5px; display: block; text-align: center; }
  .lifecycle-step span { margin: 0 auto 5px; }
  .lifecycle-step b { font-size: 11px; }
  .case-layout { margin-top: 12px; }
  .case-evidence { padding: 16px 14px; }
  .map { height: 285px; }
  .report-row { grid-template-columns: 25px 58px minmax(0, 1fr); }
  .alert-marker { grid-column: 3; }
  .review-sidebar { display: block; }
  .review-block { border-right: 0; }
  .reveal-controls { align-items: flex-start; }
  .content-page { padding-top: 30px; }
  .page-intro h1 { font-size: 28px; }
  .decision-metrics, .process-grid { grid-template-columns: 1fr 1fr; }
  .decision-metrics > div, .process-grid > div { min-height: 120px; border-bottom: 1px solid var(--line); }
  .decision-metrics > div:nth-child(2), .process-grid > div:nth-child(2) { border-right: 0; }
  .decision-metrics > div:nth-last-child(-n+2), .process-grid > div:nth-last-child(-n+2) { border-bottom: 0; }
  .explanation-band, .model-layout, .boundary-section { grid-template-columns: 1fr; gap: 18px; }
  .hindsight-flow em { width: 70px; }
  .source-section { align-items: flex-start; }
  footer { align-items: flex-start; padding: 16px 12px; }
}

@media (max-width: 430px) {
  .brand-mark { width: 30px; height: 30px; }
  .brand b { font-size: 16px; }
  .source-health b { font-size: 12px; }
  .decision-metrics, .process-grid { grid-template-columns: 1fr; }
  .decision-metrics > div, .process-grid > div { border-right: 0; border-bottom: 1px solid var(--line) !important; }
  .decision-metrics > div:last-child, .process-grid > div:last-child { border-bottom: 0 !important; }
  .case-kicker { align-items: flex-start; flex-direction: column; }
  .section-heading { align-items: flex-start; }
  .report-row { grid-template-columns: 25px minmax(0, 1fr); }
  .report-time { grid-column: 2; grid-row: 2; }
  .report-address { grid-column: 2; grid-row: 1; }
  .alert-marker { grid-column: 2; grid-row: 3; }
  .future-lock { align-items: flex-start; }
  .outcome-summary { display: block; }
  .outcome-summary b { margin-bottom: 5px; }
  .reveal-controls { display: grid; }
  .source-section { display: block; }
  .source-section .secondary-button { width: 100%; margin-top: 14px; }
  footer { display: block; }
  footer span { display: block; margin: 4px 0; }
  .match-heading, .related-title { align-items: flex-start; }
  .related-record { grid-template-columns: 1fr; gap: 4px; }
  .related-record > div:last-child { text-align: left; }
}

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