/* Shared layouts follow the space available to a report, including detail windows. */
body:not(.entry-mode) { --header-height: 72px; }
body:not(.entry-mode) .site-header { height: var(--header-height); min-height: var(--header-height); }
.workspace-sidebar { top: var(--header-height); }
.navigation-backdrop { top: var(--header-height); }
.panel { scroll-margin-top: calc(var(--header-height, 72px) + 12px); }
body:not(.entry-mode) #toggle-navigation { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex-shrink: 0; }
#advanced-page, #ledger-page, #staffing-page, #editor-body { container: review / inline-size; }
.financial-readiness { padding: 9px 12px; margin-bottom: 14px; gap: 8px 18px; }
.financial-source-details { margin-left: auto; max-width: 100%; }
.financial-source-details > summary { cursor: pointer; color: #375e55; font-weight: 600; }
.financial-source-details[open] { flex: 1 0 100%; margin-left: 0; }
.financial-source-details[open] > summary { margin-bottom: 12px; }
.financial-source-details small { display: block; line-height: 1.5; margin: 8px 0; }
.financial-source-details .financial-source-dates small { margin: 0; }
.financial-source-details button { margin-top: 8px; }
.graph-canvas, .chart-surface { overscroll-behavior-y: auto; touch-action: pan-x pan-y; }
body .graph-canvas svg { width: 100%; min-width: 0; min-height: 0; height: auto; display: block; }
.graph-view-tools { display: flex; justify-content: flex-end; margin: 0 0 8px; }
.graph-view-tools button { padding: 6px 12px; font-size: 12px; }
.graph-legend { gap: 6px 12px; }
.graph-legend button { min-height: 32px; }
dialog { max-height: calc(100dvh - 24px); }
#editor[open], .chart-dialog[open] { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
#editor { width: min(1120px, calc(100vw - 32px)); }
#editor > .panel-heading { position: static; padding: 16px 20px; margin: 0; flex-shrink: 0; border-bottom: 1px solid var(--line); }
#editor-body { overflow: auto; min-height: 0; padding: 18px 20px; }
.chart-dialog { width: min(1500px, calc(100vw - 32px)); }
.chart-dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.chart-dialog-heading h2 { font-size: 19px; margin: 0; }
.chart-dialog-heading button { flex-shrink: 0; }
.chart-dialog-body { min-height: 0; overflow: auto; padding: 18px; }
.chart-dialog .graph-card { margin: 0; box-shadow: none; }
.chart-dialog .graph-plot { min-width: 0; }
.cost-review-filters { top: calc(var(--header-height, 72px) + 8px); }
.mobile-row-details > .mobile-row-summary { margin-top: 10px; }
.operating-history-details, .cost-change-scatter { margin: 16px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.operating-history-details > summary, .cost-change-scatter > summary { cursor: pointer; font-weight: 650; font-size: 13px; }
.operating-history-details[open] > summary, .cost-change-scatter[open] > summary { margin-bottom: 14px; }
.operating-history-charts { min-width: 0; }
.operating-history-charts > .panel { margin-top: 16px; }
.operating-history-evidence { margin-top: 16px; }
.operating-history-evidence > summary { cursor: pointer; padding: 8px 0; font-size: 13px; }

/* Keep shared filters on one baseline, including the doctor's area controls. */
#workspace .filters { align-items: flex-end; gap: 12px 16px; }
#workspace .filters > div:not(.doctor-geography-controls) {
  display: grid; align-items: stretch; gap: 6px; flex: 0 1 180px; min-width: 140px;
}

/* Shared site choices retain exact codes while making large directories searchable. */
.site-picker { position: relative; display: flex; flex-direction: column; gap: 5px; width: 350px; max-width: 100%; min-width: 0; align-self: flex-end; text-align: left; }
.site-picker.is-open { z-index: 100; }
.site-picker-label { color: #536860; font-size: .77rem; font-weight: 650; }
.site-picker .site-picker-native { display: none !important; }
.site-picker .site-picker-toggle { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 3px 12px; width: 100%; min-height: 42px; padding: 10px 12px; border: 1px solid #c6d4db; border-radius: 7px; background: white; color: #213b50; text-align: left; white-space: normal; }
.site-picker-selection { display: flex; gap: 6px; align-items: stretch; min-width: 0; }
.site-picker .site-picker-selection .site-picker-toggle { flex: 1; width: auto; min-width: 0; }
.site-picker .site-picker-clear { flex: 0 0 auto; min-width: 64px; min-height: 44px; padding: 8px 10px; border: 1px solid #b8cec7; border-radius: 7px; background: #eef6f3; color: #235f51; font-size: .8rem; font-weight: 650; white-space: nowrap; }
.site-picker .site-picker-clear:hover { background: #dfeee8; border-color: #39816d; }
.site-picker .site-picker-clear[hidden] { display: none !important; }
.site-picker-selected { overflow-wrap: anywhere; }
.site-picker-chevron { grid-column: 2; grid-row: 1; }
.site-picker-selected-detail { grid-column: 1/-1; color: #536579; font-size: .75rem; line-height: 1.45; overflow-wrap: anywhere; }
.site-picker-menu { position: absolute; top: 100%; right: 0; width: 490px; max-width: calc(100vw - 40px); min-width: 100%; max-height: var(--site-picker-space,580px); overflow-y: auto; padding: 12px; border: 1px solid #b8cdd3; border-radius: 9px; background: white; box-shadow: 0 12px 35px #163d5533; color: #213b50; }
.site-picker-menu.opens-above { top: auto; bottom: 100%; }
.site-picker-menu[hidden], .site-picker-more[hidden] { display: none !important; }
.site-picker .site-picker-menu input { width: 100%; min-width: 0; max-width: 100%; font-size: 16px; }
.site-picker-results { max-height: min(330px,max(90px,calc(var(--site-picker-space,580px) - 205px))); overflow-y: auto; overscroll-behavior: contain; margin: 8px 0; }
.site-picker .site-picker-option { display: flex; flex-wrap: wrap; gap: 5px 8px; width: 100%; padding: 11px 10px; text-align: left; border: 0; border-bottom: 1px solid #e4ebef; border-radius: 4px; background: white; color: #213b50; white-space: normal; }
.site-picker .site-picker-option:hover, .site-picker .site-picker-option.is-active { background: #e9f4f1; outline: 2px solid #298070; outline-offset: -2px; }
.site-picker .site-picker-option[aria-selected="true"] { background: #f0f5f8; }
.site-picker-name { flex-basis: 100%; font-size: .9rem; line-height: 1.5; overflow-wrap: anywhere; }
.site-picker-detail { flex-basis: 100%; color: #536579; font-size: .8rem; line-height: 1.5; overflow-wrap: anywhere; }
.site-picker-badge { border-radius: 4px; background: #edf1f5; color: #536579; font-size: .7rem; padding: 2px 5px; }
.site-picker .site-picker-status { font-size: .78rem; line-height: 1.5; margin: 9px 0; color: #536579; }
.site-picker .site-picker-reset { margin-top: 8px; text-align: left; white-space: normal; }
.site-picker :focus-visible { outline: 2px solid #168578; outline-offset: 2px; }
.doctor-geography-controls > .site-picker { align-self: flex-end; }
.review-workspace-shell > .site-picker { margin-top: 12px; }
@media (max-width: 700px) {
  .site-picker { width: 100%; }
  .site-picker-menu, .site-picker-menu.opens-above { position: fixed; top: 75px; bottom: auto; left: 12px; right: 12px; width: auto; min-width: 0; max-width: none; max-height: calc(100dvh - 95px); overflow-y: auto; }
  .site-picker-results { max-height: min(340px,45dvh); }
}
@media print {
  .site-picker-menu { display: none !important; }
  .site-picker-chevron { display: none; }
  .site-picker-clear { display: none !important; }
}
#workspace .filters label { margin: 0; }
#workspace .filters select { width: 100%; min-width: 0; min-height: 40px; }
#workspace .filters > .doctor-geography-controls { display: contents; }
.filters .doctor-geography-controls > label { flex: 1 1 180px; min-width: 140px; }
.filters .doctor-geography-controls select { max-width: none; }
.filters .doctor-geography-controls > button { min-height: 40px; }
.filters > .period-alignment { margin: 0 0 0 auto; order: 10; align-self: flex-end; }
.filters > .period-alignment > summary { padding: 10px 0; }
.filters > .period-alignment[open] { margin: 0; flex: 1 0 100%; }
.filters > .period-alignment[open] > summary { padding-top: 0; margin-bottom: 10px; }
.filters > .period-alignment select { width: min(100%, 330px); }

/* Small summary groups fill their row instead of leaving a fourth empty slot. */
.tiles[data-count="1"] { grid-template-columns: minmax(0, 1fr); }
@container review (min-width: 901px) {
  .tiles[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles[data-count="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@container review (max-width: 900px) {
  .tiles[data-count="3"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles[data-count="3"] > .tile:last-child { grid-column: 1 / -1; }
}
.action-board > .empty-state { grid-column: 1 / -1; margin: 0; }
.action-board > button { grid-column: 1 / -1; justify-self: start; }

/* Labelled doctor fields, search and disclosure buttons share a lower edge. */
.doctor-utilization-controls { align-items: flex-end; }
.doctor-utilization-controls > input,
.doctor-utilization-controls .doctor-filter-label select { min-height: 42px; }
.doctor-utilization-controls > .doctor-analysis-options { margin-top: 0; align-self: flex-end; }
.doctor-utilization-controls > .doctor-analysis-options[open] { flex: 1 0 100%; }

/* Long editor headings wrap without crowding the print and close controls. */
#editor > .panel-heading { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
#editor > .panel-heading h2 { flex: 1 1 250px; min-width: 0; margin: 0; }
#editor > .panel-heading button { flex: 0 0 auto; }
@container review (max-width: 900px) {
  .tiles, .tiles[data-count="5"], .tiles[data-count="6"], .home-outlook .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles .amount { font-size: clamp(20px, 3cqw, 27px); }
}
@media (min-width: 1051px) {
  body.compact-navigation { --sidebar-width: 72px; }
  .compact-navigation .workspace-sidebar { padding: 16px 8px; }
  .compact-navigation .sidebar-heading, .compact-navigation .sidebar-footnote, .compact-navigation .sidebar-label, .compact-navigation .saved-navigation { display: none; }
  .compact-navigation #analysis-nav > a, .compact-navigation #analysis-nav > details > summary { font-size: 0; padding: 12px; justify-content: center; gap: 0; min-height: 44px; }
  .compact-navigation #analysis-nav summary::after, .compact-navigation #analysis-nav .nav-menu { display: none; }
  .compact-navigation #analysis-nav a::before, .compact-navigation #analysis-nav summary::before { width: 20px; height: 20px; margin-right: 0; }
  .compact-navigation #analysis-nav { width: 100%; min-width: 0; }
  .compact-navigation #analysis-nav > .nav-section-label { display: none; }
  .compact-navigation .workspace-sidebar { overflow-x: hidden; }
}
@media (max-width: 1000px) {
  .cockpit-financial-mobile { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .cockpit-mobile-period { border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
  .cockpit-mobile-period h4 { font-size: 13px; margin: 0 0 10px; }
  .cockpit-mobile-period dl { margin: 0; }
  .cockpit-mobile-value { display: flex; justify-content: space-between; gap: 12px; margin: 7px 0; font-size: 12px; }
  .cockpit-mobile-value dt { max-width: 48%; }
  .cockpit-mobile-value dd { margin: 0; white-space: nowrap; font-size: 13px; font-weight: 650; }
  .cockpit-mobile-period > small { display: block; margin-top: 8px; }
  .cockpit-mobile-period details { margin-top: 12px; font-size: 12px; }
  .cockpit-mobile-period summary { cursor: pointer; }
}
@media (min-width: 701px) and (max-width: 1000px) {
  .cockpit-financial-mobile { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 700px) {
  body:not(.entry-mode) { --header-height: 60px; }
  body:not(.entry-mode) main { padding: 14px 12px 36px; }
  .financial-readiness > strong { flex-basis: auto; }
  .financial-source-details { margin-left: 0; }
  .tiles { gap: 8px; }
  .tiles .tile { padding: 12px; }
  #workspace .tiles .amount { font-size: clamp(18px, 5vw, 24px); }
  .tile-label { font-size: 12px; }
  .graph-card { padding: 12px; }
  .graph-inspection { font-size: 12px; }
  .graph-legend button { min-height: 38px; }
  #editor { width: 100%; max-width: 100%; max-height: 100dvh; border: 0; border-radius: 0; margin: auto 0; }
  #editor > .panel-heading { padding: 12px; }
  #editor-body { padding: 14px 12px; }
  .chart-dialog { width: calc(100vw - 12px); max-width: calc(100vw - 12px); }
  .chart-dialog-heading, .chart-dialog-body { padding: 12px; }
  input, select, textarea, .filters select { font-size: 16px; }
  #workspace .filters > div:not(.doctor-geography-controls) { width: auto; flex: 1 1 140px; }
  .filters > .period-alignment { flex: 1 0 100%; margin: 0; }
  .filters > .period-alignment > summary { padding: 4px 0; white-space: normal; }
  .doctor-utilization-controls > input { flex-basis: 100%; }
}
@media (max-height: 800px) and (min-width: 701px) {
  body:not(.entry-mode) { --header-height: 60px; }
  body:not(.entry-mode) main { padding-top: 16px; }
  .workspace-sidebar { padding-top: 16px; }
  .cost-review-filters { position: static; }
  #editor > .panel-heading, .chart-dialog-heading { padding: 10px 16px; }
}
@media print {
  #toggle-navigation, .graph-view-tools { display: none !important; }
  .financial-source-details { display: none; }
  #editor-body, .chart-dialog-body { overflow: visible; }
}

/* Workspace finish: one visual hierarchy across reports. Screen-only rules keep
   the established print layout and the source meaning of status colours. */
@media screen {
  body:not(.entry-mode) {
    --ink: #1b3043;
    --muted: #526579;
    --line: #dce4eb;
    --paper: #f5f7fa;
    --teal: #08766e;
    --surface-shadow: 0 2px 8px #21364b06;
  }
  body:not(.entry-mode) .site-header {
    background: #132d40;
    border-bottom: 1px solid #ffffff12;
  }
  body:not(.entry-mode) .site-header h1 { letter-spacing: -.35px; }
  body:not(.entry-mode) .site-header p { color: #c0ced8; font-size: 12px; }
  body:not(.entry-mode) .header-search { border-color: #e0e7ed; border-radius: 8px; }
  body:not(.entry-mode) .workspace-sidebar { background: #fff; }
  body:not(.entry-mode) #analysis-nav > a,
  body:not(.entry-mode) #analysis-nav summary { color: #455c70; }
  body:not(.entry-mode) #analysis-nav > a.active,
  body:not(.entry-mode) #analysis-nav .selected-group > summary {
    background: #e8f3f1; color: #08675f;
  }
  body:not(.entry-mode) #analysis-nav > a.active { box-shadow: inset 3px 0 #08766e; }
  body:not(.entry-mode) #analysis-nav .nav-menu a { font-size: 13px; }
  body:not(.entry-mode) #review-location,
  body:not(.entry-mode) #review-location a { font-size: 12px; }
  body:not(.entry-mode) #page-title {
    font-size: clamp(28px, 2.4vw, 34px); line-height: 1.2;
    letter-spacing: -.85px; font-weight: 720;
  }
  body:not(.entry-mode) .top-line { margin-bottom: 20px; }
  body:not(.entry-mode) .review-description { font-size: 14px; line-height: 1.65; }
  body:not(.entry-mode) #period-caption { font-size: 12px; margin-top: 7px; }
  body:not(.entry-mode) .review-tools > button,
  body:not(.entry-mode) .review-options > summary {
    background: transparent; border-color: transparent; color: #4c6175;
  }
  body:not(.entry-mode) .review-tools > button:hover,
  body:not(.entry-mode) .review-options > summary:hover { background: #e9eef3; }
  body:not(.entry-mode) .data-freshness {
    background: #f0f5f5; border-color: #dce7e6; font-size: 12px;
  }
  body:not(.entry-mode) .filters {
    padding: 16px 18px; border-radius: 10px; box-shadow: var(--surface-shadow);
  }
  body:not(.entry-mode) #workspace .filters label {
    font-size: 12px; text-transform: none; letter-spacing: 0; color: #455c70;
  }
  body:not(.entry-mode) .filters select { font-size: 13px; background-color: #fff; }
  body:not(.entry-mode) input:not([type="checkbox"]):not([type="radio"]),
  body:not(.entry-mode) select,
  body:not(.entry-mode) textarea { border-color: #cbd6df; border-radius: 7px; }
  body:not(.entry-mode) input::placeholder { color: #64778a; opacity: 1; }
  body:not(.entry-mode) .panel { border-radius: 12px; box-shadow: var(--surface-shadow); }
  body:not(.entry-mode) .panel > h3,
  body:not(.entry-mode) .panel-heading h3 { font-size: 18px; line-height: 1.4; }
  body:not(.entry-mode) .panel > .muted,
  body:not(.entry-mode) .panel > .workflow-notes { font-size: 13px; }
  body:not(.entry-mode) .tile {
    border-radius: 10px; padding: 22px; box-shadow: var(--surface-shadow);
    border-top: 2px solid #bcd8d3;
  }
  body:not(.entry-mode) .tile label { font-size: 13px; color: #455c70; font-weight: 600; }
  body:not(.entry-mode) .amount { font-size: clamp(24px, 2.1vw, 32px); letter-spacing: -.7px; }
  body:not(.entry-mode) .tile p,
  body:not(.entry-mode) .tile p.metric-note,
  body:not(.entry-mode) .tile p.metric-comparison { font-size: 12px; line-height: 1.6; }
  body:not(.entry-mode) .metric-delta { font-size: 12px; padding: 3px 6px; }
  body:not(.entry-mode) .tile .amount-pair .metric-value { font-size: clamp(22px, 1.8vw, 30px); }
  body:not(.entry-mode) .tile .amount-pair .metric-count { font-size: 15px; }
  body:not(.entry-mode) .financial-readiness {
    background: #edf4f3; border-radius: 8px; padding: 12px 16px;
  }
  body:not(.entry-mode) .financial-readiness > strong { font-size: 13px; }
  body:not(.entry-mode) .financial-source-details { font-size: 12px; }
  body:not(.entry-mode) .table-scroll { border-radius: 8px; }
  body:not(.entry-mode) table { font-variant-numeric: tabular-nums; }
  body:not(.entry-mode) th,
  body:not(.entry-mode) .table-sort {
    font-size: 12px; text-transform: none; letter-spacing: 0; line-height: 1.5;
  }
  body:not(.entry-mode) .table-scroll th,
  body:not(.entry-mode) .table-scroll th:first-child { background: #eef2f6; color: #40586d; }
  body:not(.entry-mode) #workspace[data-table-density="compact"] table th { font-size: 12px; padding-top: 10px; padding-bottom: 10px; }
  body:not(.entry-mode) #workspace[data-table-density="compact"] table td { font-size: 12px; padding-top: 9px; padding-bottom: 9px; }
  body:not(.entry-mode) .subtle-button { border-color: #cbd6df; background: #fff; color: #354f65; }
  body:not(.entry-mode) .subtle-button:hover { border-color: #94afa9; background: #f0f7f5; }
  body:not(.entry-mode) .site-header .subtle-button { background: transparent; color: #e6edf2; border-color: #526c7d; }
  body:not(.entry-mode) .site-header .subtle-button:hover { background: #ffffff10; }
  body:not(.entry-mode) .graph-controls { gap: 8px 12px; }
  body:not(.entry-mode) .graph-note { font-size: 13px; line-height: 1.65; }
  body:not(.entry-mode) .graph-inspection { background: #f6f8fa; border-color: #dce4eb; border-radius: 7px; }
  body:not(.entry-mode) .graph-legend-button { border-radius: 6px; font-size: 12px; }
  body:not(.entry-mode) .review-workspace-shell { background: #edf3f5; border-color: #d8e3e9; padding: 20px; }
  body:not(.entry-mode) .review-workspace-question { color: #213b50; font-size: 18px; }
  body:not(.entry-mode) .review-workspace-tabs a,
  body:not(.entry-mode) .review-process a { font-size: 13px; font-weight: 600; }
  body:not(.entry-mode) .review-workspace-tabs a.active,
  body:not(.entry-mode) .review-process a[aria-current] { background: #08766e; color: #fff; border-color: #08766e; }
  body:not(.entry-mode) .doctor-filter-label > span { font-size: 12px; color: #455c70; }
  body:not(.entry-mode) .doctor-provider-population {
    background: #f5f7fa; border: 1px solid #e1e7ed; color: #4c6175;
    font-size: 13px; line-height: 1.65; padding: 12px 14px;
  }
  body:not(.entry-mode) .doctor-utilization-caption { font-size: 13px; color: #526579; }
  body:not(.entry-mode) .doctor-scope-path { color: #213b50; font-size: 14px; }
  body:not(.entry-mode) .doctor-queue-button { color: #455c70; background: #fff; border-color: #cbd6df; }
  body:not(.entry-mode) .doctor-queue-button[aria-pressed="true"] { background: #08766e; color: #fff; border-color: #08766e; }
  body:not(.entry-mode) .doctor-decision-card { box-shadow: var(--surface-shadow); border-radius: 12px; }
  body:not(.entry-mode) .doctor-card-identity h4 { font-size: 17px; }
  body:not(.entry-mode) .doctor-card-metrics { background: #f7f9fb; padding: 14px; border: 0; border-radius: 7px; margin-bottom: 12px; }
  body:not(.entry-mode) .doctor-card-metrics strong { color: #213b50; font-size: 20px; }
  body:not(.entry-mode) .attention-label strong { font-size: 13px; }
  body:not(.entry-mode) .attention-label small { font-size: 12px; }
  body:not(.entry-mode) .profit-summary-card > span,
  body:not(.entry-mode) .profit-summary-card > small { font-size: 12px; }
  body:not(.entry-mode) dialog { border-color: #dce4eb; border-radius: 12px; box-shadow: 0 24px 80px #102d4033; }
  body:not(.entry-mode) dialog::backdrop { background: #122b3f80; }
  body:not(.entry-mode) #editor > .panel-heading { background: #f7f9fb; }
}
@media screen and (max-width: 700px) {
  body:not(.entry-mode) .site-header p { font-size: 10px; }
  body:not(.entry-mode) #page-title { font-size: 27px; }
  body:not(.entry-mode) .top-line { margin-bottom: 16px; }
  body:not(.entry-mode) .filters { padding: 14px; }
  body:not(.entry-mode) .tile { padding: 14px; }
  body:not(.entry-mode) .tile label { font-size: 12px; }
  body:not(.entry-mode) .tile p { font-size: 11px; }
  body:not(.entry-mode) input:not([type="checkbox"]):not([type="radio"]),
  body:not(.entry-mode) select,
  body:not(.entry-mode) textarea { font-size: 16px; }
  body:not(.entry-mode) .header-search input { font-size: 13px; }
  body:not(.entry-mode) .review-workspace-shell { padding: 14px; }
  body:not(.entry-mode) #editor { border-radius: 0; }
}
/* Reagent costs use neutral marks and a keyboard-accessible evidence review. */
.action-impact,.action-measured-evidence,.action-saved-evidence { margin:16px 0; padding:14px; border:1px solid #d5e0e6; border-radius:8px; min-width:0; }
.action-impact > summary,.action-measured-evidence > summary,.action-saved-evidence > summary { font-weight:650; color:#264e5c; cursor:pointer; }
.action-impact .impact-enable { display:flex; align-items:center; gap:10px; margin:14px 0; }
.action-impact .impact-enable input { width:18px; height:18px; flex:none; }
.action-impact .editor-fields { margin:14px 0; }
.impact-result { padding:12px; background:#eff5f8; border-radius:6px; line-height:1.6; }
.action-saved-evidence pre { white-space:pre-wrap; overflow-wrap:anywhere; font-size:12px; max-width:100%; }
.reagent-history-button { display:grid; gap:3px; width:200px; max-width:100%; padding:5px; border:1px solid #c7d5db; border-radius:7px; color:#2d5264; background:#f7fafb; text-align:left; }
.reagent-history-button:hover { border-color:#478575; background:#edf6f2; }
.reagent-history-button svg { display:block; width:190px; max-width:100%; height:auto; }
.reagent-history-button small { font-size:11px; color:#4c6670; }
.reagent-history-review { min-width:0; }
.reagent-history-review .panel { margin:14px 0; }
.reagent-review-caption { font-weight:650; color:#315c64; }
.reagent-aligned-charts { display:grid; gap:12px; min-width:0; }
.reagent-history-review .toolbar { margin:12px 0; }
.reagent-history-review .tiles { grid-template-columns:repeat(4,minmax(0,1fr)); }
.reagent-history-review .tile .amount { font-size:clamp(17px,2.4vw,25px); overflow-wrap:anywhere; }
.reagent-month-evidence { padding:10px 0; border-bottom:1px solid #d8e3df; }
.reagent-coverage-checks { margin:14px 0; }
@media(max-width:900px) {
  .reagent-history-review .tiles { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:600px) {
  .reagent-history-review .toolbar { flex-wrap:wrap; }
  .reagent-history-review .toolbar select { max-width:100%; }
}

/* One shared review heading and a compact, page-aware sticky filter bar. */
.review-page-heading { position:relative; z-index:19; display:grid; grid-template-columns:minmax(0,1fr) auto; grid-template-areas:"location tools" "title readiness"; gap:8px 20px; align-items:start; margin:0 0 16px; }
.review-page-heading .workspace-tools { grid-area:location; margin:0; min-height:24px; }
.review-page-heading .top-line { grid-area:title; margin:0!important; padding:0; }
.review-page-heading #page-title { font-size:clamp(24px,2.3vw,30px); }
.review-page-heading .review-description { margin:5px 0 0; font-size:13px; line-height:1.45; }
.review-static-context, #review-unfiltered-status { margin:6px 0 0; color:#52697b; font-size:12px; }
.review-static-context[hidden] { display:none; }
#review-unfiltered-status .review-update-notice { font-size:12px; margin:7px 0 0; }
.review-page-heading .review-heading-tools { grid-area:tools; display:flex; align-items:center; justify-content:flex-end; gap:4px; padding:0; width:auto; }
.review-heading-tools.review-tools button, .review-heading-tools .review-options > summary { min-height:36px; padding:7px 10px; font-size:12px; }
.review-heading-tools .review-options { position:relative; inset:auto; margin:0; }
.review-heading-tools .review-options .review-display { top:40px; z-index:25; display:flex; flex-direction:column; align-items:stretch; gap:10px; }
.review-heading-tools .review-options .review-display > button { display:block!important; text-align:left; background:#fff; border:1px solid var(--line); }
.review-heading-tools .review-display select { width:100%; }
.review-page-heading .data-freshness { grid-area:readiness; position:relative; margin:0; padding:6px 9px; border-radius:6px; max-width:360px; font-size:11px; justify-self:end; }
.review-page-heading .freshness-summary { gap:8px; font-size:11px; white-space:nowrap; }
.review-page-heading .freshness-summary strong { white-space:nowrap; }
.review-page-heading .data-freshness > a { font-size:11px; margin:2px 0 0; }
.review-page-heading .freshness-sources { position:absolute; top:100%; right:0; z-index:24; width:min(460px,calc(100vw - 32px)); padding:14px; background:#fff; border:1px solid var(--line); border-radius:8px; box-shadow:0 10px 28px #20344922; }
.review-bar { position:sticky; top:var(--header-height,72px); z-index:18; min-width:0; padding:12px 14px 9px; margin:0 0 16px; background:#fff; border:1px solid #d7e2e8; border-radius:9px; box-shadow:0 3px 9px #2034490c; }
.review-bar-main { display:flex; flex-wrap:wrap; align-items:flex-end; gap:10px 12px; }
body:not(.entry-mode) #workspace .review-bar .filters, .review-page-filters { display:contents; }
.review-bar .filters[hidden], .review-bar[hidden] { display:none!important; }
#workspace .review-bar .filters > div:not(.doctor-geography-controls), .review-page-filters > label, .review-page-filters > .profit-measures { flex:0 1 160px; min-width:130px; max-width:240px; width:auto; margin:0; }
.review-bar label, #workspace .review-bar .filters label { display:grid; gap:5px; align-content:start; margin:0; font-size:11px; font-weight:650; line-height:1.4; }
.review-bar .graph-control { padding:0; }
.review-bar select, #workspace .review-bar .filters select { width:100%; min-width:0; min-height:40px; font-size:13px; padding:8px 28px 8px 10px; }
.review-bar input { min-width:0; width:100%; font-size:13px; min-height:40px; }
.review-page-filters .profit-measures { display:block; }
.review-bar .site-picker, #workspace .review-bar #home-site-controls { flex:1 1 220px; max-width:330px; min-width:190px; }
#workspace .review-bar #home-site-controls > .site-picker { width:100%; }
.review-bar .site-picker-toggle { min-height:40px; padding:8px 10px; }
.review-bar .site-picker-selected { font-size:13px; }
.review-bar .site-picker-selected-detail { display:none; }
.review-bar .site-picker-clear { min-width:42px; padding:8px; font-size:11px; }
.review-bar [data-review-placement="extra"] { display:none!important; }
.review-bar.filters-expanded [data-review-placement="extra"]:not([hidden]) { display:grid!important; }
.review-bar.filters-expanded .period-alignment { display:block!important; flex:1 0 100%; }
.review-bar .review-filter-toggle { flex:0 0 auto; display:flex; align-items:center; justify-content:space-between; gap:10px; order:90; margin:0 0 0 auto; min-height:40px; font-size:12px; padding:8px 10px; color:#365a6d; }
.review-bar .review-filter-toggle[hidden] { display:none!important; }
.review-bar.filters-expanded .review-filter-toggle > span:last-child { transform:rotate(180deg); }
.review-bar .active-filters { display:flex; flex-wrap:wrap; margin:9px 0 0; gap:6px; }
.review-bar .active-filters[hidden] { display:none; }
.review-bar-context { display:flex; align-items:center; flex-wrap:wrap; gap:3px 10px; margin-top:8px; color:#52697b; }
.review-bar-context #period-caption { margin:0; min-width:0; flex:1; font-size:11px; line-height:1.5; }
#review-bar-basis { font-size:11px; font-weight:700; color:#285f59; }
#review-bar-basis[hidden] { display:none; }
.review-bar #busy { font-size:11px; color:#805c1f; }
.review-bar .review-update-notice { margin:7px 0 0; padding:7px 9px; font-size:11px; }
.review-bar .cockpit-site-picker { padding:0; margin:0; border:0; background:transparent; }
.review-bar #date-filter { order:0; }
.review-bar #months-filter, .review-page-filters > label:has(select[aria-label="Profitability period"]), .review-page-filters > label:has(select[aria-label="Doctor utilization period"]) { order:1; }
.review-bar #region-filter { order:2; }
.review-bar #basis-filter, .review-page-filters > .profit-measures, .review-page-filters > .review-field { order:3; }
.review-bar .site-picker, .review-bar #home-site-controls { order:4; }
.review-bar [data-review-placement="extra"] { order:50; }
.review-bar .cockpit-site-picker .site-picker-clear, .review-bar .cockpit-site-picker .site-picker-reset { display:none!important; }
#advanced-page .cost-review-filters:not(:has(select,input)) { display:none; }
.panel, [id^="review-section-"], #page-title { scroll-margin-top:calc(var(--header-height,72px) + var(--review-bar-height,0px) + 16px); }
html { scroll-padding-top:calc(var(--header-height,72px) + var(--review-bar-height,0px) + 12px); }
.review-bar :focus-visible { scroll-margin-top:calc(var(--header-height,72px) + 8px); }
@media(max-width:1050px) { .review-page-heading { grid-template-columns:minmax(0,1fr) auto; } .review-page-heading .data-freshness { max-width:300px; } }
@media(max-width:700px) {
  .review-page-heading { grid-template-areas:"location tools" "title title" "readiness readiness"; gap:8px 10px; margin-bottom:12px; }
  .review-page-heading .data-freshness { justify-self:start; max-width:100%; }
  .review-page-heading .workspace-tools { min-height:0; padding-top:5px; }
  .review-page-heading #page-title { font-size:25px; }
  .review-page-heading .review-description { font-size:12px; }
  .review-heading-tools .review-options .review-display { width:min(280px,calc(100vw - 28px)); }
  .review-bar { padding:9px 11px; border-radius:8px; }
  .review-bar:not(.filters-expanded) .filters, .review-bar:not(.filters-expanded) .review-page-filters { display:none!important; }
  .review-bar .review-filter-toggle { order:-1; flex:1 1 100%; min-width:0; max-width:100%; margin:0; background:#f1f6f6; border-color:#c7dcd8; font-size:12px; }
  .review-bar .review-filter-toggle #review-filter-summary { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .review-bar .review-filter-toggle > span:last-child { flex-shrink:0; }
  #review-filter-summary { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .review-bar.filters-expanded .review-bar-main { max-height:calc(100dvh - var(--header-height,72px) - 150px); overflow-y:auto; overscroll-behavior:contain; padding:2px; }
  #workspace .review-bar .filters > div:not(.doctor-geography-controls), .review-page-filters > label, .review-page-filters > .profit-measures { flex:1 1 130px; max-width:none; min-width:115px; }
  .review-bar .site-picker, #workspace .review-bar #home-site-controls { flex:1 0 100%; max-width:none; width:100%; }
  .review-bar select, #workspace .review-bar .filters select, .review-bar input { font-size:16px; }
  .review-bar .review-bar-context #period-caption { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; flex-basis:100%; }
  .review-bar .active-filters { gap:5px; margin-top:7px; }
  .review-bar .filter-chip { font-size:11px; }
}
@media print {
  .review-page-heading .workspace-tools, .review-heading-tools { display:none!important; }
  .review-page-heading { display:block; }
  .review-bar { position:static; box-shadow:none; break-inside:avoid; }
  .review-bar .review-filter-toggle, .review-bar .active-filters { display:none!important; }
  .review-bar .filters, .review-bar .review-page-filters { display:contents!important; }
  .review-bar select { border:0; appearance:none; background:transparent; padding:0; }
  html { scroll-padding-top:0; }
}
