:root {
  --brand: #c24f1d;
  --coral: #e37854;
  --charcoal: #2e2a28;
  --epic-bg: #fbfbe9;
  --epic-bar: #e6ecd4;
  --epic-line: #aeb79f;
  --surface: #fffef2;
  --white: #fff;
  --line: #cdd2c4;
  --muted: #6b7067;
  --blue: #366889;
  --green: #176b46;
  --amber: #876004;
  --red: #a52b38;
  font-family: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; background: var(--epic-bg); }
body { margin: 0; color: var(--charcoal); background: var(--epic-bg); font-size: 12px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(194, 79, 29, .24); outline-offset: 1px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 4px; font-size: 19px; letter-spacing: 0; }
h2 { margin-bottom: 0; font-size: 13px; letter-spacing: 0; }
h3 { margin-bottom: 0; font-size: 11px; letter-spacing: 0; }
p { color: var(--muted); }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 16px; height: 16px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
sup.tm { margin-left: 1px; font-size: .55em; line-height: 0; vertical-align: super; }

.ehr-shell { min-height: 100vh; display: grid; grid-template-columns: 184px minmax(0, 1fr); grid-template-rows: 53px minmax(0, 1fr); }
.epic-chrome { grid-column: 1 / -1; grid-row: 1; position: sticky; top: 0; z-index: 20; }
.epic-title { min-height: 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 2px 10px; color: #45483e; background: #dedfd2; border-bottom: 1px solid #a9ad93; font-size: 8px; }
.epic-title div { display: flex; align-items: center; gap: 9px; }
.epic-title strong { padding: 1px 9px; color: #fff; background: #6e715e; border-radius: 9px; font-size: 10px; font-style: italic; }
.epic-toolbar { min-height: 31px; display: grid; grid-template-columns: 175px auto minmax(220px, 360px) minmax(170px, 1fr); align-items: center; gap: 5px; padding: 1px 7px; color: #314136; background: #edf0da; border-bottom: 1px solid #9ca785; }
.department strong, .department span { display: block; }
.department strong { font-size: 9px; }
.department span { color: #647165; font-size: 8px; }
.host-launcher { height: 27px; display: flex; border-right: 1px solid #b8c1a5; }
.host-launcher button { position: relative; min-width: 61px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 0 7px; color: #344d3d; background: transparent; border: 0; border-left: 1px solid #c4cab6; font-size: 8px; }
.host-launcher button:hover { background: #dce3c6; }
.host-launcher .ckd-priority-launch { color: #8d3d1e; background: #fff8e8; border-left-color: #d3ad86; font-weight: 800; }
.host-launcher .ckd-priority-launch:hover { color: #6f2e16; background: #ffefcf; }
.host-launcher .ckd-priority-launch img { width: 15px; height: 15px; object-fit: cover; border: 1px solid #d1a18d; border-radius: 2px; }
.host-launcher .ckd-priority-launch span { line-height: 1.05; }
.host-launcher .ckd-priority-launch small { display: block; font-size: 6px; font-weight: 700; }
.host-launcher button i, .host-launcher button b { position: absolute; top: 0; right: 2px; min-width: 12px; height: 12px; display: grid; place-items: center; padding: 0 3px; color: #fff; background: #b62d3b; border-radius: 7px; font-size: 7px; font-style: normal; }
.host-launcher button b { background: var(--brand); }
.chart-search { height: 23px; display: flex; align-items: center; gap: 6px; padding: 0 8px; color: #526158; text-align: left; background: #fff; border: 1px solid #aab69b; border-radius: 10px; font-size: 8px; }
.chart-search span { flex: 1; }
.chart-search kbd { color: #7a847c; font: inherit; }
.toolbar-right { display: flex; align-items: center; justify-content: flex-end; gap: 7px; color: #5e685f; font-size: 8px; }
.toolbar-right button { width: 25px; height: 25px; display: grid; place-items: center; padding: 0; color: #395342; background: transparent; border: 1px solid transparent; }

.storyboard { position: sticky; top: 53px; grid-column: 1; grid-row: 2; height: calc(100vh - 53px); padding: 10px 9px 44px; overflow-y: auto; text-align: center; background: var(--epic-bg); border-right: 1px solid #9da88d; }
.storyboard-avatar { width: 52px; height: 52px; display: grid; place-items: center; margin: 1px auto 7px; color: #5471a7; background: #dce8f4; border: 1px solid #aec1d6; border-radius: 50%; font-size: 18px; }
.storyboard h2 { margin: 0 0 3px; font-size: 13px; }
.storyboard p { margin: 0 0 8px; color: #66695f; font-size: 8px; line-height: 1.4; }
.storyboard-alert { display: block; margin: 0 -9px 8px; padding: 5px 4px; color: #5c4a00; background: #fff324; border-block: 1px solid #d5c800; font-size: 8px; }
.storyboard dl { margin: 0; text-align: left; }
.storyboard dl > div { padding: 7px 4px; border-bottom: 1px solid #d7d9c7; }
.storyboard dt { color: #75796d; font-size: 7px; text-transform: uppercase; }
.storyboard dt.preserve-clinical-case { text-transform: none; }
.storyboard dd { margin: 2px 0 0; font-size: 9px; font-weight: 700; }
.risk { color: var(--red); }
.storyboard-actions { position: fixed; bottom: 0; left: 0; width: 184px; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid #aeb79f; }
.storyboard-actions button { min-height: 34px; color: #3e5d3d; background: #f5f7df; border: 0; border-right: 1px solid #b8c0a7; font-size: 8px; font-weight: 800; text-transform: uppercase; }

.ehr-main { min-width: 0; grid-column: 2; grid-row: 2; }
.patient-strip { min-height: 29px; display: flex; align-items: baseline; gap: 8px; padding: 5px 9px 3px; background: #d9e6bf; border-bottom: 1px solid #9fac8a; }
.patient-strip strong { font-size: 10px; }
.patient-strip span { color: #5d6957; font-size: 8px; }
.patient-strip b { margin-left: auto; color: #73470a; font-size: 8px; }
.epic-activities { min-height: 43px; display: flex; align-items: flex-end; gap: 3px; padding: 4px 8px 0; overflow-x: auto; background: var(--epic-bar); border-bottom: 1px solid #98a786; }
.epic-activities button { min-height: 37px; display: flex; align-items: center; gap: 5px; padding: 0 10px; color: #485447; white-space: nowrap; background: #d6dfc3; border: 1px solid #aeb99c; border-bottom: 0; border-radius: 7px 7px 0 0; font-size: 9px; font-weight: 700; }
.epic-activities button img { width: 18px; height: 18px; object-fit: cover; border: 1px solid #cda691; border-radius: 3px; }
.epic-activities button.is-active { color: #9d3e18; background: #fffdf0; border-top: 3px solid var(--brand); }

.activity-workspace { min-height: calc(100vh - 125px); background: var(--epic-bg); }
.native-activity-heading { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -12px -10px 10px; padding: 5px 10px; background: #f0f2de; border-bottom: 1px solid #aab498; }
.native-activity-heading span { display: block; margin-bottom: 2px; color: #6b7167; font-size: 7px; text-transform: uppercase; }
.native-activity-heading h1 { margin: 0; color: #32372f; font-size: 15px; }
.native-activity-heading > button { padding: 5px 8px; color: #506052; background: #fff; border: 1px solid #aeb79f; font-size: 8px; font-weight: 700; }
.epic-native-section { margin-bottom: 10px; background: #fffef7; border: 1px solid #b9bfae; }
.epic-native-section > header { min-height: 30px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 8px; background: #e8ebdc; border-bottom: 1px solid #c5cabc; }
.epic-native-section > header div { display: flex; align-items: center; gap: 7px; }
.epic-native-section > header b { padding: 2px 5px; color: #fff; background: #6e715e; border-radius: 7px; font-size: 7px; font-style: italic; }
.epic-native-section > header strong { font-size: 9px; }
.epic-native-section > header button { color: #516057; background: transparent; border: 0; font-size: 8px; font-weight: 700; }
.epic-native-row { min-height: 31px; display: grid; grid-template-columns: minmax(0, 1fr) 160px 70px; align-items: center; gap: 10px; padding: 5px 8px; font-size: 8px; }
.epic-native-row strong { font-size: 8px; }
.epic-native-row em { color: var(--green); text-align: right; font-size: 7px; font-style: normal; font-weight: 800; text-transform: uppercase; }
.embedded-section { padding: 8px; background: #fffef7; border: 1px solid #b9bfae; border-top: 3px solid var(--brand); }
.embedded-heading { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; padding: 5px 8px; background: #fffdf0; border: 1px solid #c7cbbd; border-left: 4px solid var(--brand); }
.embedded-section > .embedded-heading { margin: -8px -8px 10px; border: 0; border-bottom: 1px solid #c7cbbd; border-left: 4px solid var(--brand); }
.embedded-brand { display: flex; align-items: center; gap: 7px; }
.embedded-brand img { width: 27px; height: 27px; object-fit: cover; border: 1px solid #d1a18d; border-radius: 2px; }
.embedded-brand strong, .embedded-brand span { display: block; }
.embedded-brand strong { color: var(--brand); font-size: 11px; }
.embedded-brand span { margin-top: 2px; color: var(--muted); font-size: 7px; }
.embedded-context { text-align: right; }
.embedded-context span, .embedded-context b { display: block; }
.embedded-context span { color: #72786f; font-size: 7px; text-transform: uppercase; }
.embedded-context b { margin-top: 3px; color: #485b4d; font-size: 8px; }
.embedded-context small { display: block; margin-top: 3px; color: var(--muted); font-size: 7px; }
.freshness { display: flex; align-items: center; gap: 9px; color: #667065; font-size: 8px; }
.freshness > span { padding: 3px 6px; color: #4f6370; background: #eaf0f2; border: 1px solid #c8d2d7; }
.freshness b { color: var(--green); }
.freshness button { width: 26px; height: 25px; display: grid; place-items: center; padding: 0; color: #395342; background: transparent; border: 1px solid #b5bea7; }
.view-shell { padding: 12px 10px 30px; }
.view { display: none; }
.view.is-active { display: block; }
.view-heading { min-height: 37px; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.view-heading > div > span { display: block; margin-bottom: 4px; color: var(--brand); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.view-heading h2 { margin: 0; font-size: 19px; }
.text-button { display: inline-flex; align-items: center; gap: 5px; padding: 7px 9px; color: #74421d; background: #fff; border: 1px solid #cda98a; font-size: 9px; font-weight: 700; }
.text-button .icon { width: 13px; height: 13px; }
.status-chip { padding: 5px 8px; color: #4e5960; background: #edf0f1; border: 1px solid #cbd1d3; font-size: 8px; font-weight: 800; }
.status-chip.amber { color: #76530b; background: #fff5cb; border-color: #d9c779; }

.genius-update-banner { min-height: 58px; display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 10px; margin-bottom: 10px; padding: 8px 10px; background: #fff7e4; border: 1px solid #d8c18d; border-left: 4px solid var(--brand); }
.genius-update-banner > .icon { width: 20px; height: 20px; color: var(--brand); }
.genius-update-banner span, .genius-update-banner strong, .genius-update-banner small { display: block; }
.genius-update-banner span { color: #815020; font-size: 7px; font-weight: 800; text-transform: uppercase; }
.genius-update-banner strong { margin-top: 3px; color: #49361d; font-size: 10px; }
.genius-update-banner small { margin-top: 3px; color: #72634d; font-size: 8px; }
.genius-update-banner .primary-button { min-width: 118px; white-space: nowrap; }
.genius-update-banner.compact { min-height: 52px; }
.genius-update-banner.assessment-ready { cursor: pointer; background: #edf6ef; border-color: #b8d0be; border-left-color: var(--green); }
.genius-update-banner.assessment-ready > .icon, .genius-update-banner.assessment-ready span { color: var(--green); }
.genius-update-banner.assessment-ready span { text-transform: none; }
.genius-update-banner.assessment-ready strong { color: #314d3a; }
.genius-update-banner.assessment-ready.is-entering { animation: assessment-arrival .36s ease-out; }
.assessment-summary { min-width: 0; padding: 2px 0; text-align: left; background: transparent; border: 0; }
.assessment-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.assessment-actions .icon { width: 12px; height: 12px; }
@keyframes assessment-arrival {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.risk-documentation-alert { min-height: 50px; display: grid; grid-template-columns: 25px minmax(0, 1fr) auto; align-items: center; gap: 10px; margin-bottom: 10px; padding: 7px 10px; background: #edf3f7; border: 1px solid #b9c8d0; border-left: 4px solid var(--blue); }
.risk-documentation-alert > .icon { width: 19px; height: 19px; color: var(--blue); }
.risk-documentation-alert span, .risk-documentation-alert strong, .risk-documentation-alert small { display: block; }
.risk-documentation-alert span { color: var(--blue); font-size: 10px; font-weight: 800; }
.risk-documentation-alert strong { margin-top: 3px; font-size: 8px; }
.risk-documentation-alert small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.hcc-workspace { margin-bottom: 10px; background: #fffef7; border: 1px solid #b9bfae; border-top: 3px solid var(--blue); }
.hcc-workspace > header { min-height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 10px; background: #edf3f7; border-bottom: 1px solid #c8d2d7; }
.hcc-workspace > header span { display: block; margin-bottom: 3px; color: var(--blue); font-size: 7px; font-weight: 800; text-transform: uppercase; }
.hcc-workspace > header b { color: var(--blue); font-size: 8px; white-space: nowrap; }
.hcc-header-actions { display: flex; align-items: center; gap: 9px; }
.hcc-header-actions button { min-height: 28px; }
.hcc-program-context { display: grid; grid-template-columns: .8fr 1fr 1.35fr; background: #f8f9f4; border-bottom: 1px solid #cfd4c8; }
.hcc-program-context > span { min-width: 0; padding: 7px 9px; color: var(--muted); border-right: 1px solid #d5d9d0; font-size: 8px; line-height: 1.35; }
.hcc-program-context > span:last-child { border-right: 0; }
.hcc-program-context b { display: block; margin-bottom: 2px; color: var(--charcoal); font-size: 7px; text-transform: uppercase; }
.icd-awareness { margin-bottom: 10px; background: #fffef7; border: 1px solid #c7cbbd; border-left: 4px solid var(--brand); }
.icd-awareness > header { min-height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 10px; background: #fff2ec; border-bottom: 1px solid #dfc5b9; }
.icd-awareness > header span { display: block; margin-bottom: 3px; color: var(--brand); font-size: 7px; font-weight: 800; text-transform: uppercase; }
.icd-awareness > header b { color: var(--brand); font-size: 8px; }
.icd-change-list article { min-height: 52px; display: grid; grid-template-columns: 82px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px 9px; border-bottom: 1px solid #d7d9cf; }
.icd-change-list article:last-child { border-bottom: 0; }
.icd-change-list article > div strong, .icd-change-list article > div small { display: block; }
.icd-change-list article > div strong { font-size: 9px; }
.icd-change-list article > div small { margin-top: 3px; color: var(--muted); font-size: 8px; line-height: 1.35; }
.icd-change-list article > b { color: var(--green); font-size: 8px; }
.icd-change-list article[data-action-state="added"] { background: #f4f7f1; }
.icd-change-list article[data-action-state="added"] .change-label { color: var(--green); background: #e8f2ea; border-color: #b8cdbd; }
.icd-change-list article[data-action-state="declined"] { background: #f4f4f0; }
.icd-change-list article[data-action-state="declined"] .change-label { color: #5f6862; background: #ebede9; border-color: #c5cac4; }
.change-label { padding: 4px 5px; text-align: center; border: 1px solid; font-size: 7px; font-weight: 800; text-transform: uppercase; }
.change-label.new { color: #9d3215; background: #fff0e9; border-color: #e3ad98; }
.change-label.signal { color: #72520b; background: #fff7d6; border-color: #d8c477; }
.change-label.stable { color: #365d6e; background: #edf3f7; border-color: #b9c8d0; }
.icd-awareness > p { margin: 0; padding: 7px 10px; color: #455c67; background: #edf3f7; border-top: 1px solid #c8d2d7; font-size: 8px; line-height: 1.4; }
.hcc-layout { display: grid; grid-template-columns: minmax(340px, .82fr) minmax(0, 1.18fr); }
.hcc-layout figure { min-width: 0; margin: 0; padding: 9px 10px; border-right: 1px solid #d2d6cb; }
.hcc-layout figcaption { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.hcc-layout figcaption strong { font-size: 9px; }
.hcc-layout figcaption span, .hcc-layout figure > small { color: var(--muted); font-size: 7px; }
.hcc-layout figure svg { width: 100%; height: 112px; display: block; }
.hcc-axis text, .hcc-labels text { fill: #64706a; font-size: 10px; font-family: Arial, Helvetica, sans-serif; }
.hcc-labels text { fill: #354f5c; font-weight: 700; }
.hcc-bars rect { fill: #e4e9e9; }
.hcc-fill rect { fill: #4c7b91; }
#hccCurrentBar { transition: width .2s ease; }
.recapture-status { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: -2px 0 8px; border: 1px solid #d3d8d3; }
.recapture-status > span { padding: 5px 6px; border-right: 1px solid #d3d8d3; }
.recapture-status > span:last-child { border-right: 0; }
.recapture-status b, .recapture-status em { display: block; font-size: 7px; font-style: normal; }
.recapture-status b { color: var(--muted); }
.recapture-status em { margin-top: 2px; font-weight: 800; }
.recapture-status .is-complete { color: var(--green); }
.recapture-status .is-progress { color: #8a6108; }
.recapture-status .is-pending { color: var(--red); }
.recapture-history { margin-top: 8px; border: 1px solid #cfd4c8; }
.recapture-history > header { padding: 6px 7px; background: #f0f2de; border-bottom: 1px solid #cfd4c8; }
.recapture-history > header strong, .recapture-history > header span { display: block; }
.recapture-history > header strong { font-size: 8px; }
.recapture-history > header span { margin-top: 2px; color: var(--muted); font-size: 7px; }
.recapture-history > div { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; align-items: center; gap: 7px; padding: 5px 7px; border-bottom: 1px solid #dedfd8; }
.recapture-history > div:last-child { border-bottom: 0; }
.recapture-history b, .recapture-history span, .recapture-history em { font-size: 7px; }
.recapture-history span { color: var(--muted); }
.recapture-history em { color: #3f6171; font-style: normal; font-weight: 800; white-space: nowrap; }
.hcc-candidates > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 34px; padding: 6px 9px; background: #f8f9f4; border-bottom: 1px solid #d5d8cf; }
.hcc-candidates > header span { color: var(--blue); font-size: 7px; font-weight: 800; text-transform: uppercase; }
.hcc-candidates > header b { color: var(--muted); font-size: 7px; }
.hcc-candidates article { min-height: 78px; display: grid; grid-template-columns: minmax(0, 1fr) 105px 64px; align-items: center; gap: 8px; padding: 7px 9px; border-bottom: 1px solid #d5d8cf; }
.hcc-candidates article span, .hcc-candidates article strong, .hcc-candidates article small { display: block; }
.hcc-candidates article span { color: var(--blue); font-size: 7px; font-weight: 800; text-transform: uppercase; }
.hcc-candidates article strong { margin-top: 3px; font-size: 9px; }
.hcc-candidates article small { margin-top: 3px; color: var(--muted); font-size: 7px; line-height: 1.35; }
.hcc-candidates article .meat-readiness { color: #4f6570; }
.hcc-candidates article > b { color: var(--amber); font-size: 7px; text-align: right; }
.hcc-candidates article[data-review-state="confirmed"] > b { color: var(--green); }
.hcc-candidates article[data-review-state="deferred"] > b { color: var(--muted); }
.hcc-candidates article button { min-width: 58px; }
.hcc-candidates > p { margin: 0; padding: 7px 9px; color: #56636a; background: #f2f5f6; font-size: 7px; line-height: 1.4; }

.priority-banner { min-height: 55px; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 10px; margin-bottom: 10px; padding: 8px 10px; background: #ffffd9; border: 1px solid #c7c58e; border-left: 4px solid #c48910; }
.priority-banner > .icon { width: 23px; height: 23px; color: #946610; }
.priority-banner strong, .priority-banner span { display: block; }
.priority-banner strong { color: #553d10; font-size: 11px; }
.priority-banner span { margin-top: 4px; color: #76612e; font-size: 9px; }
.priority-view-button { min-width: 56px; padding: 6px 9px; color: #74421d; background: #fff; border: 1px solid #cda98a; font-size: 8px; font-weight: 800; }

.chart-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(330px, .55fr); gap: 8px; margin-bottom: 10px; }
.trend-panel, .evidence-panel, .timeline, .milestones, .note-editor, .citation-panel, .action-list, .action-review, .history-strip, .wrap-section { background: var(--surface); border: 1px solid #b9bfae; }
.trend-panel > header, .evidence-panel > header { min-height: 45px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; background: #f0f2de; border-bottom: 1px solid #c9cebd; }
.trend-panel header span, .evidence-panel header span { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; }
.legend { display: flex; align-items: center; gap: 5px; color: #646b61; font-size: 8px; }
.legend i { width: 15px; height: 3px; margin-left: 7px; background: var(--red); }
.legend i.weight { background: var(--blue); }
.trend-chart { width: 100%; height: 220px; display: block; background: #fffef7; }
.trend-chart .grid path { fill: none; stroke: #e0e2d8; stroke-width: 1; }
.trend-chart .axis text { fill: #72776f; font-size: 9px; }
.line-egfr, .line-weight { fill: none; stroke: var(--red); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.line-weight { stroke: var(--blue); }
.points circle { fill: #fff; stroke: var(--red); stroke-width: 3; }
.points .weight-point { stroke: var(--blue); }
.trend-values { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid #c9cebd; }
.trend-values div { padding: 9px 10px; border-right: 1px solid #d4d7cc; }
.trend-values div:last-child { border: 0; }
.trend-values span, .trend-values strong, .trend-values small { display: block; }
.trend-values span { color: var(--muted); font-size: 7px; text-transform: uppercase; }
.trend-values span.preserve-clinical-case { text-transform: none; }
.trend-values strong { margin-top: 4px; font-size: 11px; }
.trend-values small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.evidence-panel ol { margin: 0; padding: 0; list-style: none; }
.evidence-panel li { display: grid; grid-template-columns: 27px minmax(0, 1fr) auto; align-items: center; gap: 7px; padding: 10px; border-bottom: 1px solid #d4d7cc; }
.evidence-panel li > b { width: 25px; height: 25px; display: grid; place-items: center; color: var(--brand); background: #fdf2ed; border: 1px solid #e5bba9; font-size: 8px; }
.evidence-panel li strong, .evidence-panel li span { display: block; }
.evidence-panel li strong { font-size: 9px; }
.evidence-panel li span { margin-top: 3px; color: var(--muted); font-size: 7px; line-height: 1.35; }
.evidence-panel li em { color: var(--green); font-size: 7px; font-style: normal; font-weight: 800; text-transform: uppercase; }
.evidence-panel li.new-evidence { background: #fff8e8; }
.evidence-panel li.new-evidence em { color: var(--brand); }
.evidence-panel > button { margin: 9px 10px; padding: 6px 9px; color: #4d5f58; background: #fff; border: 1px solid #aeb8a8; font-size: 8px; font-weight: 700; }

.episode-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .5fr); gap: 8px; }
.timeline > h2 { padding: 9px 10px; background: #f0f2de; border-bottom: 1px solid #c9cebd; }
.timeline article { display: grid; grid-template-columns: 72px 15px minmax(0, 1fr); gap: 7px; padding: 10px; }
.timeline time { color: #70766d; text-align: right; font-size: 8px; line-height: 1.4; }
.timeline article > i { position: relative; width: 8px; height: 8px; margin-top: 2px; background: var(--brand); border-radius: 50%; }
.timeline article > i::after { position: absolute; top: 8px; left: 3px; width: 1px; height: 58px; content: ""; background: #c8ccbf; }
.timeline article:last-child > i::after { display: none; }
.timeline article strong { font-size: 10px; }
.timeline article p { margin: 3px 0; font-size: 8px; line-height: 1.4; }
.timeline article span { color: var(--blue); font-size: 7px; }
.signal-group + .signal-group { border-top: 1px solid #b9bfae; }
.signal-group > header { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 10px; background: #f0f2de; border-bottom: 1px solid #c9cebd; }
.signal-group > header b { color: var(--green); font-size: 8px; }
.signal-group.missing > header { background: #fff7e4; }
.signal-group.missing > header b { color: var(--amber); }
.signal-group ul { display: grid; gap: 0; margin: 0; padding: 0 10px; list-style: none; }
.signal-group li { position: relative; padding: 8px 0 8px 22px; border-top: 1px solid #dedfd7; font-size: 9px; line-height: 1.35; }
.signal-group li:first-child { border-top: 0; }
.signal-group li::before { position: absolute; left: 3px; content: "✓"; color: var(--green); font-weight: 800; }
.signal-group.missing li::before { content: "!"; color: var(--amber); }

.notes-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .45fr); gap: 8px; }
.note-toolbar { min-height: 42px; display: flex; align-items: center; gap: 8px; padding: 7px 10px; background: #f0f2de; border-bottom: 1px solid #c9cebd; }
.note-toolbar strong { font-size: 10px; }
.note-toolbar span { flex: 1; color: var(--muted); font-size: 8px; }
.note-toolbar button { display: inline-flex; align-items: center; gap: 5px; padding: 5px 7px; color: #536159; background: #fff; border: 1px solid #b5bdac; font-size: 8px; }
.note-editor textarea { width: 100%; min-height: 330px; display: block; padding: 14px; color: #2f312e; resize: vertical; background: #fffef7; border: 0; font-family: Arial, Helvetica, sans-serif; font-size: 10px; line-height: 1.65; }
.note-editor footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; background: #f0f2de; border-top: 1px solid #c9cebd; }
.note-editor footer > span { color: var(--muted); font-size: 7px; }
.note-editor footer > div { display: flex; gap: 6px; }
.citation-panel { padding-bottom: 10px; }
.citation-panel > h2, .citation-panel > p { padding-inline: 10px; }
.citation-panel > h2 { padding-top: 10px; }
.citation-panel > p { margin: 4px 0 9px; font-size: 8px; }
.citation-panel > button { width: calc(100% - 20px); min-height: 39px; display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 6px; margin: 0 10px; color: var(--charcoal); text-align: left; background: #fffef7; border: 0; border-top: 1px solid #d6d9cf; }
.citation-panel > button b { color: var(--brand); }
.citation-panel > button span { font-size: 8px; }
.citation-panel > div { margin: 12px 10px 0; padding: 9px; background: #eaf0f2; border-left: 3px solid #607d8b; }
.citation-panel > div strong, .citation-panel > div span { display: block; }
.citation-panel > div strong { color: #3d5965; font-size: 8px; text-transform: uppercase; }
.citation-panel > div span { margin-top: 4px; color: #53656c; font-size: 7px; line-height: 1.4; }

.review-progress { width: 180px; }
.review-progress span { display: block; margin-bottom: 6px; color: #505850; font-size: 9px; font-weight: 700; }
.review-progress > i { height: 6px; display: block; overflow: hidden; background: #dfe3d7; }
.review-progress > i b { width: 0; height: 100%; display: block; background: var(--brand); transition: width .2s ease; }
.treatment-layout { display: grid; grid-template-columns: minmax(330px, .9fr) minmax(390px, 1.1fr); gap: 8px; }
.action-list button { width: 100%; min-height: 60px; display: grid; grid-template-columns: 6px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 8px 10px; color: var(--charcoal); text-align: left; background: #fffef7; border: 0; border-bottom: 1px solid #d1d5ca; }
.action-list button:last-child { border-bottom: 0; }
.action-list button.is-selected { background: #ffffdf; box-shadow: inset 3px 0 0 var(--brand); }
.action-list button > i { width: 6px; height: 34px; background: #d6b44f; }
.action-list button > i.urgent { background: var(--red); }
.action-list button > i.ready { background: var(--green); }
.action-list button strong, .action-list button span { display: block; }
.action-list button strong { font-size: 10px; }
.action-list button span { margin-top: 4px; color: var(--muted); font-size: 8px; }
.action-list button > b { min-width: 84px; padding: 4px 6px; color: #76530b; text-align: center; white-space: nowrap; background: #fff5cb; font-size: 7px; text-transform: uppercase; }
.action-list button > b.accepted { color: var(--green); background: #e6f3eb; }
.action-list button > b.deferred { color: #626a64; background: #ecefea; }
.action-review > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 10px; background: #f0f2de; border-bottom: 1px solid #c9cebd; }
.action-review > header span { display: block; margin-bottom: 4px; color: var(--brand); font-size: 7px; font-weight: 800; text-transform: uppercase; }
.action-review > header > b { padding: 4px 6px; color: var(--green); background: #e6f3eb; font-size: 7px; }
.action-body { padding: 10px; }
.action-destination { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -2px 0 10px; padding: 7px 8px; background: #edf2e4; border: 1px solid #c8d0bc; }
.action-destination span { color: var(--muted); font-size: 7px; font-weight: 800; text-transform: uppercase; }
.action-destination strong { color: #3f5b43; font-size: 9px; }
.action-body h3 { margin-bottom: 7px; color: #5d655c; text-transform: uppercase; }
.action-body ul { display: grid; gap: 6px; margin: 0 0 12px; padding-left: 18px; color: #4d524c; font-size: 9px; line-height: 1.4; }
.action-body label { display: block; margin-bottom: 5px; color: #5d655c; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.action-body textarea { width: 100%; min-height: 76px; padding: 8px; color: var(--charcoal); resize: vertical; background: #fff; border: 1px solid #b9c0b1; font-size: 9px; line-height: 1.4; }
.action-body p { margin: 8px 0 0; padding: 7px; color: #49606c; background: #eaf0f2; border-left: 3px solid #607d8b; font-size: 8px; }
.action-review > footer { display: flex; justify-content: flex-end; gap: 6px; padding: 9px 10px; background: #f0f2de; border-top: 1px solid #c9cebd; }
.primary-button, .secondary-button { min-height: 29px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 0 9px; font-size: 8px; font-weight: 800; }
.primary-button { color: #fff; background: var(--brand); border: 1px solid var(--brand); }
.secondary-button { color: #4b554f; background: #fff; border: 1px solid #aeb7aa; }
.primary-button .icon, .secondary-button .icon { width: 13px; height: 13px; }
.history-strip { margin-top: 8px; }
.history-strip header { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; background: #f0f2de; border-bottom: 1px solid #c9cebd; }
.history-strip header button { color: #536159; background: transparent; border: 0; font-size: 8px; font-weight: 700; }
.history-strip > div { display: grid; grid-template-columns: 70px minmax(180px, .8fr) minmax(250px, 1.2fr) auto; gap: 10px; padding: 8px 10px; border-bottom: 1px solid #d5d8cf; font-size: 8px; }
.history-strip time, .history-strip span { color: var(--muted); }
.history-strip > div b { color: var(--green); }
.history-strip > div b.deferred { color: var(--amber); }

.wrap-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.wrap-section > h2 { padding: 9px 10px; background: #f0f2de; border-bottom: 1px solid #c9cebd; }
.checklist { margin: 0; padding: 0; list-style: none; }
.checklist li { display: flex; align-items: flex-start; gap: 8px; padding: 9px 10px; border-bottom: 1px solid #d5d8cf; }
.checklist input { margin: 1px 0 0; accent-color: var(--brand); }
.checklist strong, .checklist span { display: block; }
.checklist strong { font-size: 9px; }
.checklist span { margin-top: 3px; color: var(--muted); font-size: 7px; }
.documentation-handoff { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; background: #fff8e8; border-top: 1px solid #e0d49d; }
.documentation-handoff strong, .documentation-handoff span, .documentation-handoff small { display: block; }
.documentation-handoff strong { font-size: 9px; }
.documentation-handoff span { margin-top: 3px; color: #66531f; font-size: 7px; }
.documentation-handoff small { margin-top: 3px; color: var(--muted); font-size: 7px; }
.documentation-handoff button { flex: 0 0 auto; }
.patient-plan { margin: 0; }
.patient-plan > div { display: grid; grid-template-columns: 105px minmax(0, 1fr); padding: 9px 10px; border-bottom: 1px solid #d5d8cf; }
.patient-plan dt { color: var(--muted); font-size: 8px; }
.patient-plan dd { margin: 0; font-size: 9px; font-weight: 700; }
.patient-plan + button { margin: 10px; }
.wrap-section > header { min-height: 49px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; background: #f0f2de; border-bottom: 1px solid #c9cebd; }
.wrap-section > header span { display: block; margin-top: 3px; color: var(--muted); font-size: 7px; }
.wrap-section > header .icon { color: var(--brand); }
.score-row { display: grid; grid-template-columns: repeat(3, 1fr); }
.score-row > div { padding: 10px; text-align: center; border-right: 1px solid #d5d8cf; }
.score-row span, .score-row strong, .score-row small { display: block; }
.score-row span { color: var(--muted); font-size: 7px; text-transform: uppercase; }
.score-row strong { margin-top: 3px; color: var(--brand); font-size: 19px; }
.score-row small { color: var(--muted); font-size: 7px; }
.rewards-module > p { margin: 0; padding: 9px 10px; color: #554a2e; background: #fff7d8; border-block: 1px solid #e0d49d; font-size: 8px; }
.rewards-actions { display: flex; gap: 6px; padding: 9px 10px 5px; }
.score-details-button { min-height: 29px; padding: 0 8px; color: var(--brand); background: #fffaf5; border: 1px solid #d4a58e; font-size: 8px; font-weight: 800; }
.rewards-module > small { display: block; padding: 0 10px 10px; color: var(--muted); font-size: 7px; line-height: 1.4; }
.value-capture dl { margin: 0; }
.value-capture dl > div { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 8px 10px; border-bottom: 1px solid #d5d8cf; }
.value-capture dt { color: var(--muted); font-size: 8px; }
.value-capture dd { margin: 0; font-size: 8px; font-weight: 800; }
.value-capture > p { margin: 0; padding: 9px 10px; color: #536159; font-size: 7px; line-height: 1.4; }

.workqueue[hidden] { display: none; }
.workqueue { position: fixed; inset: 53px 0 0 0; z-index: 50; overflow: auto; background: #f7f8ed; }
.workqueue > header { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 22px; background: #fffef2; border-bottom: 1px solid #aeb79f; }
.workqueue > header span { color: var(--brand); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.workqueue > header h1 { margin: 4px 0 2px; }
.workqueue > header p { margin: 0; font-size: 8px; }
.workqueue > header > button { width: 30px; height: 30px; display: grid; place-items: center; color: #4f5951; background: #fff; border: 1px solid #aeb79f; }
.workqueue-stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 12px 22px; background: #fffef2; border: 1px solid #b9bfae; }
.workqueue-stats > div { padding: 10px 12px; border-right: 1px solid #d3d6cd; }
.workqueue-stats span, .workqueue-stats strong { display: block; }
.workqueue-stats span { color: var(--muted); font-size: 7px; text-transform: uppercase; }
.workqueue-stats strong { margin-top: 4px; font-size: 15px; }
.workqueue-table { margin: 0 22px 24px; background: #fffef2; border: 1px solid #b9bfae; }
.queue-head, .queue-row { display: grid; grid-template-columns: 90px 155px 105px minmax(250px, 1.6fr) minmax(120px, .7fr) minmax(110px, .6fr) 25px; align-items: center; gap: 8px; }
.queue-head { min-height: 31px; padding: 0 10px; color: #5d655c; background: #e8ebdc; border-bottom: 1px solid #aeb79f; font-size: 7px; font-weight: 800; text-transform: uppercase; }
.queue-row { width: 100%; min-height: 65px; padding: 7px 10px; color: var(--charcoal); text-align: left; background: #fffef7; border: 0; border-bottom: 1px solid #d1d5ca; }
.queue-row:last-child { border-bottom: 0; }
.queue-row:hover { background: #ffffdf; box-shadow: inset 3px 0 0 var(--brand); }
.queue-row span { min-width: 0; }
.queue-row strong, .queue-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-row strong { font-size: 9px; }
.queue-row small { margin-top: 4px; color: var(--muted); font-size: 7px; }
.priority { width: 27px; display: inline-block; padding: 3px 0; color: #fff; text-align: center; background: var(--red); font-size: 8px; }
.priority.p2 { background: #b07b0d; }
.priority.p3 { background: #557488; }
.queue-risk strong, .queue-risk small, .queue-risk em { display: block; }
.queue-risk > strong { color: var(--red); font-size: 13px; }
.queue-risk > strong small { display: inline; color: var(--muted); font-size: 7px; font-weight: 700; }
.queue-risk > i { width: 72px; height: 4px; display: block; margin-top: 3px; overflow: hidden; background: #e2e4dd; }
.queue-risk > i b { height: 100%; display: block; background: var(--red); }
.queue-risk > em { margin-top: 3px; color: var(--red); font-size: 7px; font-style: normal; font-weight: 800; }
.queue-risk.elevated > strong, .queue-risk.elevated > em { color: #9a6908; }
.queue-risk.elevated > i b { background: #b17b10; }
.queue-risk.moderate > strong, .queue-risk.moderate > em { color: #527184; }
.queue-risk.moderate > i b { background: #5f7e91; }

dialog { width: min(560px, calc(100% - 30px)); max-height: 85vh; padding: 0; overflow: auto; color: var(--charcoal); background: #fffef7; border: 1px solid #8e9886; box-shadow: 0 20px 50px rgba(30, 38, 28, .24); }
dialog::backdrop { background: rgba(30, 37, 29, .35); }
dialog form > header { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; background: #f0f2de; border-bottom: 1px solid #c9cebd; }
dialog header span { color: var(--brand); font-size: 7px; font-weight: 800; text-transform: uppercase; }
dialog header h2 { margin-top: 3px; }
dialog header button { width: 27px; height: 27px; display: grid; place-items: center; background: #fff; border: 1px solid #b5bdac; }
dialog form > p { margin: 12px; font-size: 9px; line-height: 1.5; }
dialog dl { margin: 0 12px; border: 1px solid #d2d6cb; }
dialog dl > div { display: grid; grid-template-columns: 38px minmax(0, 1fr); padding: 8px; border-bottom: 1px solid #d2d6cb; }
dialog dt { color: var(--brand); font-weight: 800; }
dialog dd { margin: 0; font-size: 8px; }
dialog form > .primary-button { margin: 12px; float: right; }
.workflow-dialog { width: min(820px, calc(100% - 30px)); }
.workflow-dialog form { min-width: 0; }
.workflow-context { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: #e7ebd9; border-bottom: 1px solid #b8c0aa; }
.workflow-context > div { min-width: 0; padding: 8px 10px; border-right: 1px solid #c7ccbe; }
.workflow-context > div:last-child { border-right: 0; }
.workflow-context span, .workflow-context strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workflow-context span { color: var(--muted); font-size: 7px; text-transform: uppercase; }
.workflow-context strong { margin-top: 3px; font-size: 9px; }
.workflow-panel { padding: 12px; }
.workflow-banner { display: flex; align-items: flex-start; gap: 9px; padding: 9px 10px; color: #3f5967; background: #eaf0f2; border-left: 3px solid #607d8b; }
.workflow-banner .icon { width: 19px; height: 19px; }
.workflow-banner strong, .workflow-banner span { display: block; }
.workflow-banner strong { font-size: 9px; }
.workflow-banner span { margin-top: 3px; color: #53656c; font-size: 8px; line-height: 1.4; }
.workflow-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 10px; margin-top: 12px; }
.workflow-fields label { min-width: 0; display: grid; gap: 4px; }
.workflow-fields label.wide { grid-column: 1 / -1; }
.workflow-fields label > span { color: #555e55; font-size: 7px; font-weight: 800; text-transform: uppercase; }
.workflow-fields input, .workflow-fields select, .workflow-fields textarea { width: 100%; min-width: 0; padding: 7px 8px; color: var(--charcoal); background: #fff; border: 1px solid #aeb7aa; font-size: 9px; }
.workflow-fields input, .workflow-fields select { min-height: 31px; }
.workflow-fields input[readonly] { color: #5c655e; background: #f1f2eb; }
.workflow-fields textarea { resize: vertical; line-height: 1.4; }
.medication-alert { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 10px; padding: 8px 10px; color: #6b4a05; background: #fff5cb; border: 1px solid #e1cf84; }
.medication-alert strong { font-size: 8px; text-transform: uppercase; }
.medication-alert span { font-size: 8px; }
.workflow-guardrail { margin: 11px 0 0; padding: 8px 9px; color: #4f5a53; background: #f2f3eb; border-left: 3px solid #8a9485; font-size: 8px; line-height: 1.45; }
.workflow-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 12px; background: #f0f2de; border-top: 1px solid #c9cebd; }
.workflow-footer > p { max-width: 470px; margin: 0; font-size: 8px; line-height: 1.4; }
.workflow-footer > div { display: flex; gap: 6px; flex: 0 0 auto; }
.score-dialog { width: min(760px, calc(100% - 30px)); }
.hcc-dialog { width: min(760px, calc(100% - 30px)); }
.icd-action-dialog { width: min(680px, calc(100% - 30px)); }
.icd-action-body { padding: 11px 12px; }
.icd-action-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 10px; background: #fff2ec; border: 1px solid #dfc5b9; }
.icd-action-summary span, .icd-action-summary strong { display: block; }
.icd-action-summary span { color: var(--brand); font-size: 7px; font-weight: 800; text-transform: uppercase; }
.icd-action-summary strong { margin-top: 3px; font-size: 10px; }
.icd-action-summary > b { color: var(--brand); font-size: 8px; }
.icd-action-evidence { padding: 10px 1px; }
.icd-action-evidence ul { margin: 6px 0 0; padding-left: 18px; color: #505a55; font-size: 8px; line-height: 1.55; }
.icd-attestation { display: grid; grid-template-columns: 16px minmax(0, 1fr); align-items: flex-start; gap: 8px; padding: 10px; background: #f0f2de; border: 1px solid #c9cebd; cursor: pointer; }
.icd-attestation input { margin: 1px 0 0; }
.icd-attestation strong, .icd-attestation small { display: block; }
.icd-attestation strong { font-size: 9px; }
.icd-attestation small { margin-top: 3px; color: var(--muted); font-size: 8px; line-height: 1.4; }
.icd-action-guardrail { margin: 10px 0 0; padding: 8px 9px; color: #4e5f67; background: #edf3f7; border-left: 3px solid var(--blue); font-size: 8px; line-height: 1.45; }
.icd-action-footer { display: flex; justify-content: flex-end; gap: 6px; padding: 9px 12px; background: #f0f2de; border-top: 1px solid #c9cebd; }
.hcc-dialog-body { padding: 11px 12px; }
.hcc-code-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 10px; background: #edf3f7; border: 1px solid #c3d0d6; }
.hcc-code-summary span, .hcc-code-summary strong { display: block; }
.hcc-code-summary span { color: var(--blue); font-size: 7px; font-weight: 800; text-transform: uppercase; }
.hcc-code-summary strong { margin-top: 3px; font-size: 10px; }
.hcc-code-summary > b { color: #385b6b; font-size: 8px; }
.hcc-evidence { padding: 10px 1px; }
.hcc-evidence ul { margin: 6px 0 0; padding-left: 18px; color: #505a55; font-size: 8px; line-height: 1.55; }
.meat-builder { border: 1px solid #c9cebd; }
.meat-builder > header { min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 9px; background: #f0f2de; border-bottom: 1px solid #c9cebd; }
.meat-builder > header span, .meat-builder > header strong { display: block; }
.meat-builder > header span { color: var(--brand); font-size: 7px; font-weight: 800; text-transform: uppercase; }
.meat-builder > header strong { margin-top: 2px; font-size: 9px; }
.meat-builder > header > b { color: var(--muted); font-size: 7px; }
.meat-builder > div { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.meat-builder > div > span { min-height: 58px; padding: 8px; border-right: 1px solid #d5d8cf; }
.meat-builder > div > span:last-child { border-right: 0; }
.meat-builder b, .meat-builder em { display: block; }
.meat-builder b { color: var(--brand); font-size: 8px; }
.meat-builder em { margin-top: 4px; color: var(--muted); font-size: 7px; font-style: normal; line-height: 1.35; }
.hcc-guardrail { margin: 10px 0 0; padding: 8px 9px; color: #4e5f67; background: #f2f5f6; border-left: 3px solid var(--blue); font-size: 8px; line-height: 1.45; }
.hcc-dialog-actions { display: flex; justify-content: flex-end; gap: 6px; padding: 9px 12px; background: #f0f2de; border-top: 1px solid #c9cebd; }
.score-breakdown { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.score-breakdown > section { min-width: 0; padding: 11px; border-right: 1px solid #d2d6cb; }
.score-breakdown > section:last-child { border-right: 0; }
.score-breakdown > section > header { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.score-breakdown > section > header strong { font-size: 10px; }
.score-breakdown > section > header b { color: var(--brand); font-size: 11px; }
.score-breakdown > section > p { min-height: 32px; margin: 5px 0 9px; font-size: 8px; line-height: 1.4; }
.score-breakdown dl { margin: 0; border: 1px solid #d2d6cb; }
.score-breakdown dl > div { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 6px 7px; }
.score-breakdown dt { color: #50574f; font-size: 8px; }
.score-breakdown dd { color: var(--brand); font-weight: 800; }
.score-guardrail { clear: both; color: #455c67; background: #eaf0f2; border-left: 3px solid #607d8b; }
.toast { position: fixed; right: 16px; bottom: 16px; z-index: 70; max-width: 340px; padding: 9px 12px; color: #fff; pointer-events: none; background: #34463b; border-left: 4px solid var(--coral); opacity: 0; transform: translateY(8px); transition: .18s ease; font-size: 9px; }
.toast.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 980px) {
  .epic-toolbar { grid-template-columns: 155px auto minmax(170px, 1fr); }
  .toolbar-right { display: none; }
  .chart-layout, .notes-layout, .episode-layout, .treatment-layout { grid-template-columns: 1fr; }
  .wrap-grid { grid-template-columns: 1fr; }
  .queue-head, .queue-row { grid-template-columns: 80px 140px 100px minmax(230px, 1fr) 110px 100px 24px; }
  .workqueue-table { overflow-x: auto; }
  .queue-head, .queue-row { min-width: 930px; }
}

@media (max-width: 720px) {
  .ehr-shell { display: block; }
  .ehr-main, .activity-workspace, .view-shell, .embedded-section, .trend-panel, .evidence-panel { min-width: 0; max-width: 100%; }
  .epic-chrome { position: sticky; top: 0; }
  .epic-title > span, .department, .chart-search { display: none; }
  .epic-toolbar { display: flex; justify-content: space-between; }
  .host-launcher { width: 100%; border: 0; }
  .host-launcher button { flex: 1; min-width: 0; }
  .storyboard { display: none; }
  .patient-strip { align-items: center; }
  .patient-strip span { display: none; }
  .patient-strip b { max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .embedded-heading { align-items: flex-start; flex-direction: column; }
  .freshness, .embedded-context { width: 100%; text-align: left; }
  .freshness > span { display: none; }
  .view-shell { padding-inline: 7px; }
  .native-activity-heading { margin-inline: -7px; }
  .epic-native-row { grid-template-columns: minmax(0, 1fr) auto; }
  .epic-native-row em { grid-column: 2; }
  .view-heading { align-items: flex-start; flex-direction: column; }
  .view-heading h2 { font-size: 16px; }
  .view-heading .text-button { max-width: 100%; }
  .genius-update-banner { grid-template-columns: 22px minmax(0, 1fr); }
  .genius-update-banner .assessment-actions { grid-column: 2; justify-self: start; flex-wrap: wrap; justify-content: flex-start; }
  .risk-documentation-alert { grid-template-columns: 22px minmax(0, 1fr); }
  .risk-documentation-alert button { grid-column: 2; justify-self: start; }
  .hcc-layout { grid-template-columns: 1fr; }
  .hcc-workspace > header { align-items: flex-start; }
  .hcc-header-actions { align-items: flex-end; flex-direction: column; }
  .hcc-program-context { grid-template-columns: 1fr; }
  .hcc-program-context > span { border-right: 0; border-bottom: 1px solid #d5d9d0; }
  .hcc-program-context > span:last-child { border-bottom: 0; }
  .hcc-layout figure { border-right: 0; border-bottom: 1px solid #d2d6cb; }
  .hcc-candidates article { grid-template-columns: minmax(0, 1fr) auto; }
  .hcc-candidates article button { grid-column: 2; }
  .recapture-history > div { grid-template-columns: 70px minmax(0, 1fr); }
  .recapture-history em { grid-column: 2; }
  .icd-awareness > header { align-items: flex-start; flex-direction: column; }
  .icd-change-list article { grid-template-columns: 76px minmax(0, 1fr); }
  .icd-change-list article button, .icd-change-list article > b { grid-column: 2; justify-self: start; }
  .meat-builder > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .meat-builder > div > span:nth-child(2) { border-right: 0; }
  .meat-builder > div > span:nth-child(-n+2) { border-bottom: 1px solid #d5d8cf; }
  .hcc-code-summary, .hcc-dialog-actions { align-items: flex-start; flex-direction: column; }
  .hcc-dialog-actions button { width: 100%; }
  .icd-action-summary, .icd-action-footer { align-items: flex-start; flex-direction: column; }
  .icd-action-footer button { width: 100%; }
  .priority-banner { grid-template-columns: 24px minmax(0, 1fr); }
  .priority-view-button { grid-column: 2; justify-self: start; }
  .trend-chart { height: auto; }
  .trend-values, .workqueue-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trend-values div:nth-child(2) { border-right: 0; }
  .trend-values div:last-child { grid-column: 1 / -1; border-top: 1px solid #d4d7cc; }
  .note-toolbar { align-items: flex-start; flex-wrap: wrap; }
  .note-toolbar strong { min-width: 0; flex: 1; }
  .note-toolbar span { order: 3; flex-basis: 100%; }
  .note-editor footer { align-items: flex-start; flex-direction: column; }
  .note-editor footer > div { width: 100%; }
  .note-editor footer button { flex: 1; }
  .documentation-handoff { align-items: flex-start; flex-direction: column; }
  .history-strip > div { grid-template-columns: 55px minmax(0, 1fr) auto; }
  .history-strip > div span { grid-column: 2 / -1; }
  .workqueue { inset: 53px 0 0; }
  .workqueue > header, .workqueue-stats, .workqueue-table { margin-inline: 8px; }
  .workqueue > header { margin: 0; padding-inline: 10px; }
  .workqueue-stats > div:nth-child(2) { border-right: 0; }
  .score-breakdown { grid-template-columns: 1fr; }
  .score-breakdown > section { border-right: 0; border-bottom: 1px solid #d2d6cb; }
  .score-breakdown > section > p { min-height: 0; }
  .workflow-context, .workflow-fields { grid-template-columns: 1fr; }
  .workflow-context > div { border-right: 0; border-bottom: 1px solid #c7ccbe; }
  .workflow-context > div:last-child { border-bottom: 0; }
  .workflow-fields label.wide { grid-column: auto; }
  .medication-alert, .workflow-footer { align-items: flex-start; flex-direction: column; }
  .workflow-footer > div { width: 100%; }
  .workflow-footer button { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .genius-update-banner.assessment-ready.is-entering { animation: none; }
}
