/* Authenticated workspace. The entry page keeps its own design. */
body:not(.entry-mode) { --ink: #203449; --muted: #566c7e; --line: #dce5ec; --paper: #f3f6fa; --teal: #08776f; --sidebar-width: 248px; }
body:not(.entry-mode) .site-header { display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center; position: sticky; top: 0; z-index: 20; height: 72px; min-height: 72px; padding: 14px 28px; gap: 16px; background: #122d3d; box-shadow: 0 1px 0 #ffffff12; }
body:not(.entry-mode) .site-header .brand { width: auto; min-width: 0; }
body:not(.entry-mode) .brand-mark { width: 36px; height: 36px; }
body:not(.entry-mode) .site-header h1 { font-size: 18px; font-weight: 650; }
body:not(.entry-mode) .site-header p { font-size: 11px; margin-top: 1px; }
body:not(.entry-mode) .header-actions { margin-left: auto; gap: 8px; }
body:not(.entry-mode) .header-actions button { font-size: 12px; padding: 8px 12px; }
.header-search { display: none; }
body:not(.entry-mode) .header-context { display: none; }
body:not(.entry-mode) .header-search { display: flex; align-items: center; width: clamp(240px, 27vw, 400px); height: 40px; margin: 0 8px 0 0; padding: 0 4px 0 12px; gap: 8px; border: 1px solid #708a9a; border-radius: 7px; background: #fff; color: #203449; }
.header-search:focus-within { outline: 3px solid #53bab2; outline-offset: 3px; }
.header-search input { flex: 1; min-width: 0; width: 100%; margin: 0; padding: 0; border: 0; background: transparent; color: #203449; font-size: 13px; box-shadow: none; }
.header-search input::placeholder { color: #566c7e; opacity: 1; }
.header-search input:focus-visible { outline: none; }
.header-search kbd { flex: none; padding: 2px 5px; border: 1px solid #dce5ec; border-radius: 4px; color: #566c7e; font: 10px system-ui; white-space: nowrap; }
body:not(.entry-mode) .header-search #find-review { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 34px; height: 34px; padding: 7px; border: 0; background: transparent; color: #425970; border-radius: 5px; }
.header-search #find-review:hover { background: #edf7f4; color: #086e65; }
.finder-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.finder-filters button { min-height: 40px; padding: 8px 14px; }
.finder-filters button[aria-pressed="true"] { background: #e4f2ee; border-color: #086e65; color: #086e65; }
.doctor-profile { padding: 0; border: 0; background: transparent; }
.doctor-profile .graph-canvas svg { min-width: 0; min-height: 0; }
.doctor-history-charts .graph-card { margin-top: 12px; }
.doctor-company-context { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; }
.doctor-company-context input { width: auto; margin: 0; }
.doctor-profile #doctor-history-window { margin: 5px 0 8px; }
.doctor-monthly-snapshot { margin-top: 16px; }
#find-review svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
body:not(.entry-mode) main { max-width: none; margin-left: var(--sidebar-width); padding: 22px 32px 48px; }
.entry-mode .navigation-toggle, .navigation-toggle { display: none; }
.workspace-sidebar { position: fixed; inset: 72px auto 0 0; width: var(--sidebar-width); display: flex; flex-direction: column; padding: 24px 14px 16px; background: #fff; border-right: 1px solid var(--line); z-index: 15; overflow-y: auto; overscroll-behavior: auto; }
/* Let scrolling continue into the review when a desktop list reaches its end.
   Only the modal navigation drawer below keeps scrolling contained. */
.sidebar-heading { display: flex; justify-content: space-between; align-items: center; padding: 0 12px 16px; color: #617587; font-size: 10px; font-weight: 750; letter-spacing: 1.7px; }
.sidebar-heading button { display: none; }
#analysis-nav { display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 0; border: 0; margin: 0; z-index: auto; }
#analysis-nav > a, #analysis-nav summary { display: flex; align-items: center; padding: 11px 13px; border: 0; border-radius: 7px; color: #506579; font-size: 13px; font-weight: 600; line-height: 1.4; text-decoration: none; }
#analysis-nav > a::before, #analysis-nav summary::before { content: "◈"; width: 24px; flex: none; font-size: 16px; color: #899aaa; font-weight: 400; }
#analysis-nav > a[data-screen="home"]::before { content: "⌂"; font-size: 20px; }
#analysis-nav > a[data-screen="all"]::before { content: "▦"; }
#analysis-nav .nav-group[data-group="people"] summary::before { content: "♧"; }
#analysis-nav .nav-group[data-group="costs"] summary::before { content: "≋"; font-size: 22px; }
#analysis-nav .nav-group[data-group="commercial"] summary::before { content: "↗"; }
#analysis-nav .nav-group[data-group="data"] summary::before { content: "▤"; }
#analysis-nav summary::after { margin-left: auto; font-size: 16px; transition: transform .15s; }
#analysis-nav details[open] summary::after { transform: rotate(180deg); }
#analysis-nav details { border: 0; padding: 0; margin: 0; }
#analysis-nav > a.active, #analysis-nav .selected-group > summary { border: 0; background: #eaf5f2; color: #08746c; }
#analysis-nav a:hover, #analysis-nav summary:hover { background: #f0f5f8; color: var(--ink); }
#analysis-nav .nav-menu { position: static; min-width: 0; max-width: none; max-height: none; box-shadow: none; border: 0; border-radius: 0; padding: 4px 0 8px 25px; background: transparent; overflow: visible; }
#analysis-nav .nav-menu a { padding: 8px 10px; font-size: 12px; line-height: 1.5; font-weight: 450; border-left: 2px solid #e7edf1; border-radius: 0 5px 5px 0; margin-left: 1px; }
#analysis-nav .nav-menu a.active { border-left-color: #087f78; background: #edf7f4; color: #086e65; font-weight: 650; }
#analysis-nav > a[data-screen]::before, #analysis-nav .nav-group summary::before {
  content: ""; width: 18px; height: 18px; margin-right: 9px; background: #8b9daa;
  mask: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"%3E%3Cpath d="M4 18V11M12 18V5M20 18V8M3 21h18"/%3E%3C/svg%3E') center/contain no-repeat;
}
#analysis-nav > a[data-screen="home"]::before { mask-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"%3E%3Cpath d="m3 10 9-7 9 7M5 9v12h14V9M9 21v-8h6v8"/%3E%3C/svg%3E'); }
#analysis-nav > a[data-screen="all"]::before { mask-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="1.6"%3E%3Crect x="3" y="3" width="7" height="7" rx="1"/%3E%3Crect x="14" y="3" width="7" height="7" rx="1"/%3E%3Crect x="3" y="14" width="7" height="7" rx="1"/%3E%3Crect x="14" y="14" width="7" height="7" rx="1"/%3E%3C/svg%3E'); }
#analysis-nav > a[data-screen="cockpit"]::before, #analysis-nav .nav-group[data-group="sites"] summary::before { mask-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"%3E%3Cpath d="M4 21V5h10v16M14 10h6v11M2 21h20M8 9h2M8 13h2M8 17h2M17 14h1M17 18h1"/%3E%3C/svg%3E'); }
#analysis-nav > a[data-screen="referrers"]::before, #analysis-nav .nav-group[data-group="people"] summary::before { mask-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="1.6" stroke-linecap="round"%3E%3Ccircle cx="9" cy="7" r="3"/%3E%3Cpath d="M3 21v-3a6 6 0 0 1 12 0v3M17 4a3 3 0 0 1 0 6M18 13a5 5 0 0 1 3 5v3"/%3E%3C/svg%3E'); }
#analysis-nav > a[data-screen="operating"]::before, #analysis-nav .nav-group[data-group="costs"] summary::before { mask-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="1.6" stroke-linecap="round"%3E%3Crect x="3" y="5" width="18" height="14" rx="2"/%3E%3Ccircle cx="12" cy="12" r="3"/%3E%3Cpath d="M6 12h1M17 12h1"/%3E%3C/svg%3E'); }
#analysis-nav .nav-group[data-group="commercial"] summary::before { mask-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"%3E%3Cpath d="m3 17 6-6 5 3 7-10M15 4h6v6"/%3E%3C/svg%3E'); }
#analysis-nav .nav-group[data-group="data"] summary::before { mask-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="1.6"%3E%3Cellipse cx="12" cy="5" rx="9" ry="3"/%3E%3Cpath d="M3 5v7c0 4 18 4 18 0V5M3 12v7c0 4 18 4 18 0v-7"/%3E%3C/svg%3E'); }
#analysis-nav > a.active::before, #analysis-nav .selected-group summary::before { background: #087f78; }
.sidebar-footnote { margin-top: auto; padding: 28px 12px 0; font-size: 10px; color: #617587; line-height: 1.8; }
.sidebar-footnote > span:last-child { display: block; padding-left: 11px; }
.sidebar-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #0b9281; margin-right: 6px; vertical-align: middle; }
.saved-navigation { padding: 0 6px 15px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.sidebar-label { font-size: 10px; color: #617587; letter-spacing: .6px; text-transform: uppercase; padding: 0 7px 7px; }
.saved-navigation a { display: block; padding: 7px; font-size: 12px; line-height: 1.4; text-decoration: none; border-radius: 5px; color: #526779; }
.saved-navigation a.active { background: #edf7f4; color: #08746c; }
.navigation-backdrop { position: fixed; inset: 72px 0 0; background: #102b3d88; border-radius: 0; z-index: 30; }
#workspace { position: relative; min-width: 0; }
.workspace-tools { margin: 0 0 18px; min-height: 32px; }
.review-tools button { border-color: #d8e2ea; background: white; font-weight: 500; border-radius: 6px; }
.review-options { position: absolute; top: 0; right: 0; margin: 0; z-index: 8; font-size: 12px; }
.review-options > summary { padding: 7px 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; }
.review-options .review-display { position: absolute; top: 40px; right: 0; width: 280px; margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 30px #17304415; background: white; justify-content: flex-start; }
.review-tools { padding-right: 137px; }
.mobile-review-tools { display: none; }
.mobile-review-tools { width: 100%; }
.mobile-review-tools > button { display: none; }
#review-location { color: #526779; font-size: 11px; }
#review-location a { font-size: 11px; }
body:not(.entry-mode) .top-line { margin: 0 0 12px; padding-top: 4px; }
#page-title { font-size: 27px; font-weight: 700; letter-spacing: -.7px; line-height: 1.25; }
.review-description { font-size: 13px; max-width: 780px; line-height: 1.5; margin: 8px 0 5px; }
#period-caption { margin: 4px 0 0; font-size: 11px; }
.data-freshness { padding: 8px 12px; border: 1px solid #dcebe5; background: #eef6f2; font-size: 11px; margin-bottom: 16px; border-radius: 6px; }
.freshness-summary { gap: 12px; }
.filters { display: flex; gap: 12px; flex-wrap: wrap; padding: 12px 16px; background: #fff; border: 1px solid var(--line); border-radius: 8px; margin: 0 0 18px; }
.filters label { font-size: 10px; text-transform: uppercase; letter-spacing: .65px; font-weight: 650; color: #617587; margin-bottom: 5px; }
.filters select { padding: 8px 30px 8px 10px; min-width: 162px; font-size: 12px; border-color: #d8e2e9; border-radius: 5px; background-color: #fcfdff; min-height: 36px; }
.active-filters { display: flex; gap: 8px; margin: -8px 0 14px; }
.filter-chip { padding: 4px 9px; border: 1px solid #cbe4dc; background: #eaf5f1; color: #186c5f; font-size: 11px; font-weight: 500; border-radius: 20px; }
.section-index { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; padding: 8px 0 14px; border: 0; margin: 0 0 4px; overflow-x: auto; scrollbar-width: thin; white-space: nowrap; }
.section-index-label { color: #526779; font-size: 9px; font-weight: 650; letter-spacing: 1px; flex: none; margin-right: 5px; }
.section-index a { display: block; flex: none; color: #566c7e; font-size: 11px; font-weight: 500; padding: 5px 9px; border: 1px solid transparent; border-radius: 5px; text-decoration: none; }
.section-index a:hover, .section-index a.active { color: #087b70; border-color: #d8e8e2; background: #ebf4ef; }
.panel { scroll-margin-top: 90px; border-radius: 10px; padding: 22px; box-shadow: 0 2px 4px #1b3c5303; }
.panel > h3, .panel-heading h3 { font-size: 16px; font-weight: 650; letter-spacing: -.2px; }
.panel > .muted, .panel > .workflow-notes { font-size: 12px; line-height: 1.6; margin-top: 8px; }
.tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0 0 18px; }
.tiles[data-count="5"], .tiles[data-count="6"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tile { padding: 18px 20px; border-radius: 8px; min-width: 0; position: relative; box-shadow: 0 2px 4px #1b3c5303; }
.tile label { margin-bottom: 8px; color: #526779; font-size: 11px; font-weight: 550; line-height: 1.5; }
.amount { font-size: clamp(21px, 1.7vw, 28px); line-height: 1.35; font-weight: 700; letter-spacing: -.8px; overflow-wrap: anywhere; }
.tile p.metric-comparison { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 9px; font-size: 10px; }
.metric-delta { display: inline-block; padding: 2px 5px; border-radius: 4px; font-size: 10px; font-weight: 650; }
.metric-delta.good { background: #e8f5ed; color: #197749; }
.metric-delta.bad { background: #fceef0; color: #ae3949; }
.tile p.metric-note { font-size: 10px; color: #617587; margin-top: 5px; }
.amount-pair { display: flex; flex-direction: column; gap: 8px; }
.amount-pair .metric-count { font-size: 15px; line-height: 1.2; color: #526779; letter-spacing: 0; font-weight: 500; }
.amount-pair .metric-separator { display: none; }
.amount-pair .metric-value { font-size: clamp(18px, 1.45vw, 25px); }
.site-summary { margin: 18px 0; padding: 0 0 14px; border-bottom: 1px solid var(--line); }
.site-summary h3 { font-size: 21px; letter-spacing: -.5px; }
.site-summary p { margin: 6px 0 0; font-size: 12px; }
.review-empty { display: flex; align-items: center; min-height: 100px; justify-content: center; padding: 24px 16px; background: #f6faf9; border: 1px dashed #d9e6e1; border-radius: 6px; color: #526779; font-size: 12px; text-align: center; margin: 14px 0 0; }
.attention-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid #dbe5ec; background: #fff; border-radius: 8px; margin: 14px 0 24px; }
.attention-item { display: flex; align-items: center; gap: 12px; padding: 16px; color: var(--ink); text-decoration: none; border-right: 1px solid #e4ebf1; }
.attention-item:last-child { border-right: 0; }
.attention-item:hover { background: #f4faf7; }
.attention-count { display: flex; align-items: center; justify-content: center; min-width: 39px; height: 39px; padding: 0 5px; color: #197868; background: #edf6f2; border-radius: 8px; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.attention-label { min-width: 0; }
.attention-label strong { display: block; font-size: 11px; font-weight: 600; }
.attention-label small { display: block; font-size: 9px; color: #617587; margin-top: 3px; }
.attention-arrow { margin-left: auto; color: #93a7b4; font-size: 16px; }
.preview-options { margin: 10px 0 0; font-size: 10px; color: #617587; }
.preview-options > summary { cursor: pointer; padding: 4px 0; }
.preview-options[open] > .table-controls { margin-top: 12px; }
.decision-grid { gap: 18px; }
.decision-grid .panel > h3 { font-size: 16px; }
.decision-grid .panel > .screen-link { margin-top: 12px; font-size: 11px; }
.attention-shortfalls { margin-top: 26px; }
.attention-shortfalls .tiles { gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.attention-shortfalls .tile { padding: 12px; box-shadow: none; background: #f8fafc; }
.attention-shortfalls .amount { font-size: 19px; }
.table-scroll { border: 1px solid #e6edf2; border-radius: 6px; max-width: 100%; scrollbar-width: thin; }
.table-scroll:focus-visible { outline: 2px solid #137f72; outline-offset: 3px; }
table { font-size: 12px; }
th { padding: 10px 12px; font-size: 10px; letter-spacing: .5px; background: #f7f9fc; color: #566c7e; }
td { padding: 11px 12px; border-bottom-color: #eef2f6; }
.table-scroll td:first-child { background: #fff; }
.table-scroll th, .table-scroll th:first-child { background: #f7f9fc; }
tbody tr:nth-child(even) td { background: #fcfdff; }
tbody tr:hover td, tbody tr:focus-within td { background: #f0f7f6; }
.table-sort { font-size: 10px; line-height: 1.4; }
.toolbar { gap: 8px; }
.toolbar button, .toolbar select, .toolbar input { font-size: 12px; }
.report-related, .report-downloads { position: relative; margin: 0; font-size: 12px; }
.report-related > summary, .report-downloads > summary { padding: 9px 12px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: #526b7e; cursor: pointer; min-height: 38px; }
.report-related > select { position: absolute; z-index: 5; top: 42px; left: 0; width: 260px; background: #fff; }
.report-downloads[open] { flex-basis: 100%; }
.report-downloads[open] > summary { display: inline-block; margin-bottom: 8px; }
.report-downloads button { display: block; margin: 6px 0; }
.report-basis { margin: 0 0 18px; color: var(--muted); font-size: 12px; }
.report-basis p { margin: 10px 0; line-height: 1.6; }
.report-graphs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 24px; }
.report-graphs > .panel { margin: 0; }
.report-graphs > .panel:first-child, .report-graphs > .panel:last-child { grid-column: 1/-1; }
.report-graphs .graph-canvas svg { min-width: 0; }
.report-graphs .graph-control select { min-width: 130px; }
.report-graphs.executive-graphs > .panel { grid-column: 1 / -1; }
.report-graphs.forecast-graphs > .panel { grid-column: 1 / -1; }
.forecast-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 18px 0 14px; }
.forecast-summary-card { display: grid; align-content: start; gap: 8px; padding: 15px; border: 1px solid var(--line); border-radius: 7px; background: #f8fafc; min-width: 0; }
.forecast-summary-card > span { font-size: 12px; color: var(--muted); }
.forecast-summary-card > strong { font-size: 21px; letter-spacing: -.4px; overflow-wrap: break-word; }
.forecast-summary-card > small { color: var(--muted); font-size: 11px; }
.forecast-summary-card[data-summary="next"] { background: #f0f4fc; border-top: 3px solid #405dbc; }
.forecast-summary-card[data-summary="range"] > strong { font-size: 16px; line-height: 1.6; }
.forecast-summary-card[data-summary="range"] > strong > span { display: block; }
.forecast-context { font-size: 12px; line-height: 1.6; color: #526779; margin: 12px 0; }
.forecast-values { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 15px; }
.forecast-values > summary { font-size: 13px; font-weight: 600; color: #203449; cursor: pointer; }
.forecast-values > p, .forecast-scope-note { font-size: 12px; line-height: 1.6; }
.forecast-values > button { margin: 10px 0; }
.forecast-scope-note { padding: 12px; background: #f6f8fb; border-radius: 5px; }
.forecast-unavailable { padding: 16px; border: 1px solid #d6e2ec; border-radius: 6px; background: #f6f8fb; }
.forecast-unavailable strong { font-size: 15px; }
.forecast-unavailable p { margin: 8px 0 0; line-height: 1.6; font-size: 13px; }
.report-graphs .forecast-visual .graph-canvas svg { min-width: 0; }
.graph-legend-button.series-dashed::before { height: 0; background: transparent; border-top: 2px dashed var(--series-color); border-radius: 0; }
.graph-legend-button.series-band::before { height: 10px; opacity: var(--band-opacity); }
@media (max-width: 1100px) { .forecast-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 650px) {
  .forecast-summary { gap: 8px; }
  .forecast-summary-card { padding: 12px; }
  .forecast-summary-card > span { font-size: 10px; }
  .forecast-summary-card > strong { font-size: 17px; }
  .forecast-summary-card > small { font-size: 10px; }
  .forecast-summary-card[data-summary="range"] > strong { font-size: 13px; }
  .forecast-panel > .graph-controls .graph-control { width: 100%; }
  .forecast-panel > .graph-controls select { width: 100%; }
  .forecast-visual .graph-inspection { align-items: flex-start; flex-direction: column; gap: 5px; }
}
@media print {
  .forecast-panel { break-inside: auto; }
  .forecast-summary, .forecast-visual { break-inside: avoid; }
}
.ratio-trends { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.ratio-trends.ratio-overlay { display: block; }
.kpi-trend { min-width: 0; border: 1px solid var(--line); border-top: 3px solid var(--series-color); border-radius: 7px; padding: 16px; background: white; }
.kpi-trend:first-child { grid-column: 1 / -1; }
.kpi-trend-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 8px; }
.kpi-trend-value { display: grid; grid-template-columns: auto auto; align-items: baseline; gap: 5px 10px; }
.kpi-trend-value h4 { grid-column: 1 / -1; margin: 0; font-size: 14px; }
.kpi-trend-value strong { font-size: 26px; letter-spacing: -.6px; }
.kpi-trend-value > span { font-size: 11px; }
.kpi-trend-change { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 11px; }
.kpi-trend-change .metric-delta, .kpi-row-change .metric-delta { font-size: 12px; }
.kpi-trend .graph-inspection { font-size: 11px; min-height: 44px; padding: 9px; }
.report-graphs .kpi-trend .graph-canvas svg { min-width: 0; }
.kpi-unit-group { margin: 20px 0; }
.kpi-unit-group > h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); margin: 0 0 10px; }
.kpi-unit-group[data-unit="percent"] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.kpi-unit-group[data-unit="percent"] > h4, .kpi-unit-group[data-unit="percent"] > .kpi-comparison-row:nth-child(2) { grid-column: 1 / -1; }
.kpi-comparison-row { padding: 16px 0; border-top: 1px solid var(--line); break-inside: avoid; }
.kpi-row-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.kpi-row-heading h5 { margin: 0; font-size: 14px; }
.kpi-row-heading button { font-size: 11px; padding: 4px 8px; white-space: nowrap; }
.kpi-row-values { display: flex; flex-wrap: wrap; gap: 12px 36px; margin: 10px 0 8px; }
.kpi-period-value { display: grid; gap: 3px; }
.kpi-period-value > span { font-size: 11px; color: var(--muted); }
.kpi-period-value strong { font-size: 20px; letter-spacing: -.3px; }
.kpi-period-value.prior strong { color: #596e82; font-size: 18px; }
.kpi-row-change { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 11px; }
.kpi-bars { margin-top: 6px; }
.kpi-bars svg { display: block; width: 100%; height: auto; font-family: Arial, sans-serif; }
.kpi-comparison .graph-note { margin-bottom: 6px; }
@media (max-width: 850px) {
  .ratio-trends { grid-template-columns: minmax(0, 1fr); }
  .kpi-unit-group[data-unit="percent"] { grid-template-columns: minmax(0, 1fr); }
  .kpi-trend { padding: 12px; }
  .kpi-trend-header { gap: 6px; }
  .kpi-trend-value { display: flex; flex-direction: column; gap: 4px; }
  .kpi-trend-change { text-align: right; max-width: 46%; }
  .kpi-row-values { gap: 12px 24px; }
  .kpi-period-value strong { font-size: 19px; }
  .kpi-comparison > .graph-controls button { font-size: 11px; }
}
@media print {
  .executive-ratios, .kpi-comparison { break-inside: auto; }
  .kpi-trend, .kpi-comparison-row { break-inside: avoid; }
  .kpi-row-heading button { display: none; }
  .ratio-trends { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.report-context { font-size: 12px; color: var(--muted); margin: 0 0 22px; }
.profitability-review { display: grid; grid-template-columns: minmax(0,1fr); min-width: 0; gap: 18px; }
.profitability-review > * { min-width: 0; }
.profitability-review > .panel { margin: 0; }
.profit-review-controls { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 18px; }
.profit-review-controls > .eyebrow { font-size: 10px; letter-spacing: .8px; }
.profit-measures, .profit-filter-controls, .profit-focus, .profit-analysis-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.profit-measures { margin: 8px 0 16px; }
.profit-measure-button, .profit-focus-button, .profit-analysis-button { background: #f6f8fb; border: 1px solid #d6e1e9; color: #425970; font-size: 12px; border-radius: 5px; padding: 9px 13px; }
.profit-measure-button.active, .profit-focus-button.active, .profit-analysis-button.active { color: #075e52; background: #e6f4ed; border-color: #9fcbbc; }
.profit-filter-controls { align-items: end; gap: 12px; }
.profit-filter-controls > label { display: grid; gap: 6px; font-size: 11px; color: #425970; flex: 1 1 160px; min-width: 0; }
.profit-filter-controls select, .profit-filter-controls input { min-width: 0; width: 100%; min-height: 40px; font-size: 12px; }
.profit-measure-note { font-size: 12px; line-height: 1.6; color: #425970; margin: 12px 0 0; }
.profit-review-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.profit-health-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.profit-health-note { color: #425970; font-size: 11px; line-height: 1.6; margin: 10px 0 18px; }
.profit-cost-guide { margin: 12px 0 16px; padding: 12px 14px; border: 1px solid #d6e1e9; border-left: 3px solid #137f72; border-radius: 5px; background: #f6f9fb; color: #203449; }
.profit-cost-guide > strong { display: block; font-size: 12px; line-height: 1.6; }
.profit-cost-formula { margin: 7px 0; font-size: 12px; font-weight: 600; line-height: 1.6; }
.profit-cost-definition { margin: 0; font-size: 11px; line-height: 1.6; color: #425970; }
.profit-cost-amount { display: grid; gap: 5px; }
.profit-cost-value { color: #203449; white-space: nowrap; font-variant-numeric: tabular-nums; }
.profit-cost-credit { color: #14624e; }
.profit-cost-amount > small { font-size: 10px; line-height: 1.5; white-space: normal; }
.profit-loss-card { grid-column: 1 / -1; }
.profit-loss-card .table-scroll table { min-width: 1000px; table-layout: fixed; }
.profit-loss-card .table-scroll th:first-child { width: 20%; }
.profit-loss-card .table-scroll th:nth-child(2) { width: 10%; }
.profit-loss-card .table-scroll th:nth-child(9) { width: 16%; }
.profit-loss-card .table-scroll th, .profit-loss-card .table-scroll td { padding-left: 8px; padding-right: 8px; }
.profit-loss-card .table-sort { max-width: 100%; white-space: normal; }
.profit-loss-card .table-scroll td { vertical-align: top; padding-top: 6px; padding-bottom: 6px; }
.profit-review-site { display: grid; gap: 3px; padding: 2px 0; }
.profit-review-site > small { color: #425970; font-size: 11px; line-height: 1.35; white-space: normal; }
.profit-review-site .site-evidence-link { white-space: normal; text-align: left; }
.profit-period-pair { display: grid; grid-template-rows: 48px 48px; }
.profit-period-line { display: flex; align-items: center; min-width: 0; padding: 3px 0; }
.profit-period-line + .profit-period-line { border-top: 1px solid #d6e1e9; background: #f6f9fb; }
.profit-review-period { display: grid; gap: 2px; }
.profit-review-period > strong { font-size: 11px; line-height: 1.2; }
.profit-review-period > small { color: #425970; font-size: 10px; line-height: 1.3; }
.profit-completed-caption { display: block; font-weight: 400; }
.profit-ranked-amount { font-weight: 700; }
.profit-loss-controls { display: flex; align-items: end; flex-wrap: wrap; gap: 14px; margin: 16px 0; }
.profit-loss-controls > label { display: grid; gap: 6px; min-width: 170px; font-size: 11px; color: #425970; }
.profit-loss-controls select { margin: 0; }
.profit-loss-show { display: flex; flex-wrap: wrap; gap: 6px; }
.profit-loss-show button[aria-pressed="true"] { background: #e4f2ee; border-color: #08776f; color: #08645d; }
.profit-loss-summary { font-size: 12px; font-weight: 600; line-height: 1.7; color: #203449; }
.profit-explain-button { justify-self: start; font-size: 11px; }
.profit-explain-period { display: grid; gap: 6px; max-width: 360px; font-size: 12px; }
.profit-fytd-trend { display: grid; align-content: center; height: 96px; min-width: 0; cursor: crosshair; border-radius: 3px; }
.profit-fytd-trend:focus-visible { outline: 2px solid #08776f; outline-offset: 2px; }
.profit-fytd-trend > svg { width: 100%; height: 70px; overflow: visible; }
.profit-fytd-readout { display: block; text-align: center; color: #203449; font-size: 10px; line-height: 1.5; font-variant-numeric: tabular-nums; white-space: normal; }
.profit-month-selected > rect:last-child { stroke: #203449; stroke-width: 1; }
.profit-mobile-trend-title { margin: 8px 0 0; font-size: 11px; color: #425970; }
@media(max-width:650px) { .profit-loss-controls > label { flex: 1 1 180px; } .profit-loss-show { width: 100%; } }
.profit-mobile-period { border-top: 1px solid #d6e1e9; padding-top: 12px; margin-top: 12px; }
.profit-mobile-period > h5 { margin: 0 0 12px; font-size: 12px; line-height: 1.7; }
@media(max-width:650px) {
  .profit-loss-card .mobile-row-card { padding: 12px; }
  .profit-loss-card .mobile-row-card h4 { margin-bottom: 6px; }
  .profit-loss-card .mobile-row-card h4 small { margin-top: 3px; line-height: 1.35; }
  .profit-loss-card .mobile-row-card h4 > .site-evidence-link { display: inline-block; min-height: 24px; }
  .profit-loss-card .mobile-row-card > .profit-explain-button { display: inline-flex; align-items: center; min-height: 32px; padding: 6px 0; }
  .profit-loss-card .profit-mobile-period { padding-top: 8px; margin-top: 8px; }
  .profit-loss-card .profit-mobile-period > h5 { margin-bottom: 8px; line-height: 1.5; }
  .profit-loss-card .mobile-row-summary { gap: 6px; margin-bottom: 6px; }
  .profit-loss-card .mobile-row-card > .profit-fytd-trend { max-width: 280px; height: 90px; margin: 0 auto; }
}
.profit-row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.profit-breakdown-button { align-self: start; font-size: 11px; white-space: normal; }
.profit-breakdown { min-width: 0; }
.profit-cost-flow { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 20px 0; }
.profit-cost-step { display: grid; align-content: start; gap: 12px; padding: 16px; border: 1px solid #d6e1e9; border-radius: 7px; background: #fff; }
.profit-cost-step > span:first-child { color: #425970; font-size: 12px; font-weight: 600; line-height: 1.5; }
.profit-cost-step > .profit-value, .profit-cost-step > .profit-negative, .profit-cost-step .profit-cost-value { font-size: clamp(18px,2vw,26px); font-weight: 700; font-variant-numeric: tabular-nums; white-space: normal; overflow-wrap: anywhere; }
.profit-cost-step > .profit-value { color: #14624e; }
.profit-cost-step > small { color: #425970; font-size: 11px; line-height: 1.6; }
.profit-cost-step[data-cost-step="loaded"] { background: #f6f9fb; border-color: #9badba; }
.profit-breakdown-reading { color: #203449; font-size: 13px; line-height: 1.7; }
.profit-central-step { padding: 12px 14px; margin: 16px 0; border: 1px solid #d6e1e9; border-radius: 5px; font-size: 12px; line-height: 1.6; }
.profit-central-step > span { font-weight: 600; }
.profit-central-step p { margin: 5px 0; }
@media(max-width:650px) { .profit-cost-flow { grid-template-columns: minmax(0,1fr); } .profit-cost-step { padding: 14px; gap: 8px; } }
@media(max-width:650px) { .profit-health-summary { grid-template-columns: repeat(2,minmax(0,1fr)); } .profit-health-summary > :first-child { grid-column: 1 / -1; } }
.profit-summary-card { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; background: #fff; color: #203449; text-align: left; padding: 17px; border: 1px solid var(--line); border-radius: 7px; min-width: 0; }
.profit-summary-card > span { font-size: 11px; color: #425970; }
.profit-summary-card > strong { font-size: clamp(18px,1.8vw,25px); letter-spacing: -.4px; overflow-wrap: anywhere; }
.profit-summary-card > small { font-size: 11px; line-height: 1.5; color: #425970; }
button.profit-summary-card:hover, button.profit-summary-card[aria-pressed="true"] { border-color: #9fcbbc; background: #f0f8f4; }
#advanced-page[data-page="home"] .attention-strip { margin-bottom: 16px; }
#advanced-page[data-page="home"] .profit-health-summary { margin-bottom: 12px; }
#advanced-page[data-page="home"] .profit-health-summary > .profit-summary-card { display: grid; grid-template-columns: auto minmax(0,1fr); column-gap: 12px; row-gap: 2px; padding: 10px 14px; }
#advanced-page[data-page="home"] .profit-health-summary strong { grid-column: 1; grid-row: 1 / 3; align-self: center; font-size: 22px; }
#advanced-page[data-page="home"] .profit-health-summary span, #advanced-page[data-page="home"] .profit-health-summary small { grid-column: 2; }
.profit-sites-panel { padding: 18px; margin: 0; }
.profit-sites-panel h3 { margin-bottom: 7px; }
.profit-site-table .table-scroll { max-height: 67vh; }
.profit-site-table table { min-width: 1250px; }
.profit-site-table th:first-child, .profit-site-table td:first-child { position: sticky; left: 0; z-index: 2; min-width: 225px; max-width: 275px; background: #fff; border-right: 1px solid var(--line); }
.profit-site-table thead th:first-child { z-index: 4; background: #f6f8fb; }
.profit-site-table tbody tr:nth-child(even) > td:first-child { background: #fbfcfd; }
.profit-site-table td { vertical-align: middle; }
.profit-site-table td:nth-child(2) { font-weight: 700; }
.profit-site { display: grid; gap: 5px; }
.priority-site { grid-template-columns: minmax(0,1fr) auto; gap: 3px 8px; min-width: 175px; }
.priority-site > .site-evidence-link:not(.profit-explain-button), .priority-site > small { grid-column: 1 / -1; }
.profit-site-details { font-size: 11px; line-height: 1.5; white-space: normal; color: #425970; }
.profit-site-details > summary { cursor: pointer; color: #08776f; min-height: 24px; padding: 3px 0; }
.profit-site-details[open] { grid-column: 1 / -1; }
.profit-site-details > dl { display: grid; gap: 3px; margin: 6px 0; }
.profit-site-details dt { font-weight: 600; }
.profit-site-details dd { margin: 0 0 5px; overflow-wrap: anywhere; }
.priority-site > .profit-breakdown-button { align-self: start; }
.priority-periods-panel .table-scroll table { table-layout: fixed; min-width: 1280px; }
.priority-periods-panel .table-scroll th:first-child { width: 16%; }
.priority-periods-panel .table-scroll th:nth-child(2) { width: 10%; }
.priority-periods-panel .table-scroll th:nth-child(9) { width: 6%; }
.priority-periods-panel .table-scroll th:nth-child(10) { width: 12%; }
.priority-periods-panel .table-scroll th:nth-child(11) { width: 8%; }
.priority-periods-panel .table-sort { max-width: 100%; white-space: normal; }
.priority-periods-panel .table-scroll th, .priority-periods-panel .table-scroll td { padding-left: 8px; padding-right: 8px; }
.priority-periods-panel .table-scroll td { vertical-align: top; padding-top: 6px; padding-bottom: 6px; }
.profit-priority-checks { white-space: normal; font-size: 10px; line-height: 1.5; color: #425970; }
@media(max-width:650px) {
  .priority-periods-panel .mobile-row-card { padding: 12px; }
  .priority-periods-panel .mobile-row-card > .profit-explain-button { min-height: 32px; padding: 6px 0; }
  .priority-periods-panel .profit-mobile-period { padding-top: 8px; margin-top: 8px; }
  .priority-periods-panel .profit-mobile-period > h5 { margin-bottom: 8px; line-height: 1.5; }
  .priority-periods-panel .mobile-row-summary { gap: 6px; margin-bottom: 6px; }
}
@media(max-width:650px) { .mobile-row-card > .profit-site-details > summary { min-height: 32px; padding: 6px 0; } }
.mobile-row-card h4 small { display: block; margin-top: 4px; color: #425970; font-size: 11px; font-weight: 400; line-height: 1.5; }
.profit-site .site-evidence-link { white-space: normal; text-align: left; font-size: 12px; }
.profit-site small { color: #425970; font-size: 10px; line-height: 1.5; }
.profit-negative { color: #a5382a; }
.profit-value { white-space: nowrap; }
.profit-pace, .profit-source-flag, .profit-month-value, .profit-source-status { display: flex; flex-direction: column; gap: 5px; }
.profit-month-value { min-width: 125px; }
.profit-month-value small { font-size: 10px; }
.profit-pace small { font-size: 10px; }
.profit-status { display: inline-block; font-size: 10px; line-height: 1.5; white-space: normal; padding: 4px 6px; border-radius: 4px; color: #425970; background: #edf1f5; }
.profit-status.status-negative_site, .profit-status.status-negative_loaded { color: #962f24; background: #fbece8; }
.profit-status.status-low_margin, .profit-status.status-watch, .profit-status.status-coverage { color: #795616; background: #fcf3dd; }
.profit-status.status-protect { color: #14624e; background: #e6f3ed; }
.profit-status.verdict-before_overhead { color: #962f24; background: #fbece8; }
.profit-status.verdict-overhead, .profit-status.verdict-partial { color: #795616; background: #fcf3dd; }
.profit-status.verdict-central { color: #2d5578; background: #e8f0f7; }
.profit-status.verdict-covers { color: #14624e; background: #e6f3ed; }
.profit-judgement h4 { margin: 14px 0 2px; font-size: 13px; }
.profit-judgement-group { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin: 8px 0 14px; }
@media(max-width:900px) { .profit-judgement-group { grid-template-columns: repeat(2,minmax(0,1fr)); } }
.profit-verdict, .profit-breakeven, .profit-months-loss { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.profit-verdict small, .profit-breakeven small, .profit-months-loss small { font-size: 11px; line-height: 1.45; color: #425970; }
.profit-months-loss small.profit-newer { color: #795616; }
.profit-judgement-lines { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; margin-top: 4px; max-width: 100%; }
.profit-judgement-lines small, .profit-judgement-lines .profit-status { max-width: 100%; white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.profit-judgement-lines small { font-size: 11px; line-height: 1.45; color: #425970; }
.profit-source-flag { font-size: 10px; min-width: 135px; white-space: normal; }
.profit-coverage-ok { color: #14624e; }
.profit-coverage-review { color: #795616; }
.profit-months { min-width: 132px; }
.profit-months svg { display: block; }
.profit-trend-coverage { display: block; text-align: center; font-size: 10px; color: #425970; }
.profit-analysis-tabs { margin: 12px 0 18px; }
.profit-analysis-slot > .panel { margin: 0; padding: 0; border: 0; box-shadow: none; }
.loss-review { min-width: 0; }
.loss-context { font-weight: 650; color: #203449; overflow-wrap: anywhere; }
.loss-summary { display: grid; gap: 8px; padding: 18px 20px; margin: 12px 0 18px; background: #f8f1e6; border: 1px solid #dac8a7; border-left: 4px solid #9b712c; border-radius: 8px; color: #503c1d; }
.loss-headline { font-size: clamp(18px,2vw,23px); line-height: 1.35; }
.loss-total { color: #8f332a; font-variant-numeric: tabular-nums; }
.loss-note, .loss-shown { font-size: 13px; color: #425970; line-height: 1.5; }
.loss-site-list { list-style: none; margin: 0; padding: 0; }
.loss-site-row { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(320px,1fr); gap: 22px; padding: 18px 16px; border-bottom: 1px solid #dce5e9; border-left: 3px solid transparent; }
.loss-site-row.loss-core { background: #fcf8f0; border-left-color: #9b712c; }
.loss-site-identity { display: grid; grid-template-columns: 26px minmax(0,1fr); gap: 7px 8px; align-content: start; min-width: 0; }
.loss-rank { grid-row: 1 / span 4; color: #52677c; font-variant-numeric: tabular-nums; }
.loss-site-link { justify-self: start; text-align: left; white-space: normal; overflow-wrap: anywhere; line-height: 1.4; }
.loss-site-code, .loss-stage, .loss-amount-track, .loss-history-link { grid-column: 2; }
.loss-site-code { color: #52677c; }
.loss-stage { font-size: 12px; font-weight: 600; color: #425970; }
.loss-stage-site, .loss-stage-direct { color: #9c3d32; }
.loss-stage-unavailable { color: #735517; }
.loss-amount-track { height: 7px; background: #e9edf0; border-radius: 3px; overflow: hidden; }
.loss-amount-bar { display: block; height: 100%; background: #8b6863; }
.loss-core .loss-amount-bar { background: #a53d33; }
.loss-history-link { justify-self: start; margin-top: 3px; }
.loss-site-numbers { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 10px; align-content: start; min-width: 0; }
.loss-number { display: grid; gap: 5px; min-width: 0; font-variant-numeric: tabular-nums; }
.loss-number small { color: #52677c; font-size: 11px; }
.loss-number strong { font-size: 14px; overflow-wrap: anywhere; }
.loss-number:first-child strong { color: #a53d33; }
.loss-cumulative-track { grid-column: 1 / -1; position: relative; height: 7px; background: #e9edf0; margin-top: 7px; border-radius: 3px; }
.loss-cumulative-fill { display: block; height: 100%; background: #567b8d; border-radius: 3px; }
.loss-80-marker { position: absolute; left: 80%; top: -4px; height: 15px; border-left: 2px solid #805f23; }
.loss-threshold { grid-column: 1 / -1; font-size: 12px; color: #735517; }
.loss-remainder { margin-top: 16px; border: 1px solid #dce5e9; border-radius: 7px; }
.loss-remainder > summary { padding: 14px 16px; font-weight: 650; cursor: pointer; color: #203449; overflow-wrap: anywhere; }
.loss-remainder > .loss-note { padding: 0 16px; }
@media (max-width: 850px) {
  .loss-site-row { grid-template-columns: minmax(0,1fr); gap: 14px; padding: 16px 10px; }
  .loss-site-numbers { padding-left: 34px; }
  .loss-summary { padding: 14px; }
  .loss-number strong { font-size: 12px; }
}
@media print {
  .loss-site-row { break-inside: avoid; print-color-adjust: exact; }
  .loss-review .graph-controls, .loss-history-link { display: none; }
}
.profit-rank-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; align-items: start; }
.profit-rank-scale-note { color: #425970; font-size: 11px; line-height: 1.6; }
.profit-rank-card { min-width: 0; padding: 16px; margin: 0; border-top: 3px solid #137f72; }
.profit-rank-card[data-rank-group="losses"] { border-top-color: #ba493c; }
.profit-rank-card h3 { font-size: 16px; }
.profit-rank-count, .profit-rank-total, .profit-rank-scroll-hint { color: #425970; font-size: 11px; line-height: 1.6; margin: 8px 0; }
.profit-rank-total { font-weight: 600; }
.profit-rank-axis { position: sticky; top: 0; z-index: 1; background: #fff; color: #425970; font-size: 10px; border-bottom: 1px solid #d6e1e9; padding: 8px 8px 8px 40px; }
.profit-rank-ticks { position: relative; height: 18px; }
.profit-rank-ticks > span { position: absolute; top: 0; white-space: nowrap; }
.profit-ranking { max-height: 440px; overflow-y: auto; overflow-x: hidden; overscroll-behavior-y: auto; scrollbar-gutter: stable; scrollbar-width: auto; scrollbar-color: #91a6b4 #f1f5f8; }
.profit-ranking::-webkit-scrollbar { width: 10px; }
.profit-ranking::-webkit-scrollbar-track { background: #f1f5f8; }
.profit-ranking::-webkit-scrollbar-thumb { background: #91a6b4; border: 2px solid #f1f5f8; border-radius: 8px; }
.profit-ranking:focus-visible { outline: 2px solid #137f72; outline-offset: 2px; }
.profit-rank-row { width: 100%; display: grid; grid-template-columns: 24px minmax(0,1fr) auto; column-gap: 8px; row-gap: 6px; align-items: start; padding: 13px 8px; margin: 0; border: 0; border-bottom: 1px solid #e5edf2; border-radius: 0; background: #fff; color: #203449; text-align: left; white-space: normal; }
.profit-rank-row:hover { background: #f1f7f5; }
.profit-rank-row:focus-visible { outline: 2px solid #137f72; outline-offset: -2px; }
.profit-rank-number { color: #617587; font-size: 10px; padding-top: 2px; }
.profit-rank-name { font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.profit-rank-amount { font-size: 12px; line-height: 1.5; white-space: nowrap; font-variant-numeric: tabular-nums; color: #14624e; }
.profit-rank-card[data-rank-group="losses"] .profit-rank-amount { color: #a5382a; }
.profit-rank-detail { grid-column: 2 / -1; font-size: 10px; line-height: 1.5; color: #425970; }
.profit-rank-track { grid-column: 2 / -1; height: 9px; border-radius: 2px; background: #edf1f5; overflow: hidden; }
.profit-rank-bar { display: block; height: 100%; background: #137f72; }
.profit-rank-card[data-rank-group="losses"] .profit-rank-bar { background: #ba493c; }
.cockpit-site-picker { background: #f6f8fb; border: 1px solid #d6e1e9; border-radius: 8px; padding: 16px; margin-bottom: 12px; }
.cockpit-site-search-fields { display: grid; grid-template-columns: minmax(180px,1fr) minmax(240px,1.5fr) auto; gap: 14px; align-items: end; }
.cockpit-site-search-fields > div { min-width: 0; }
.cockpit-site-search-fields label { display: block; font-size: 12px; color: #425970; margin-bottom: 6px; }
.cockpit-site-search-fields input, .cockpit-site-search-fields select { width: 100%; max-width: 100%; min-width: 0; }
.cockpit-site-search-count { color: #425970; font-size: 11px; line-height: 1.6; margin: 9px 0 0; }
.profit-reconciliation > summary { margin-top: 12px; font-size: 12px; color: #315a70; }
.profit-reconciliation[open] > div { margin-top: 14px; }
.profit-total { font-weight: 700; }
@media (max-width: 850px) {
  .cockpit-site-search-fields { grid-template-columns: minmax(0,1fr); gap: 10px; }
  .cockpit-site-search-fields > button { justify-self: start; }
  .profit-review-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .profit-summary-card { padding: 13px; }
  .profit-review-controls { padding: 14px; }
  .profit-filter-controls > label { flex-basis: calc(50% - 6px); }
  .profit-filter-controls > label:last-child { flex-basis: 100%; }
  .profit-focus-button, .profit-analysis-button { font-size: 11px; padding: 8px 9px; }
  .profit-site-table .table-row-cards { max-height: none; }
  .profit-rank-grid { grid-template-columns: minmax(0,1fr); }
  .profit-ranking { max-height: min(440px,60vh); }
  .profit-rank-row { grid-template-columns: 20px minmax(0,1fr); }
  .profit-rank-axis { padding-left: 36px; }
  .profit-rank-amount { grid-column: 2; }
  .profit-rank-card { padding: 13px; }
  .profit-site-table .mobile-row-card h4 { display: flex; flex-direction: column; gap: 5px; }
  .profit-site-table .mobile-row-card h4 small { font-size: 10px; color: #425970; font-weight: 400; }
  .profit-site-table .mobile-row-card > .profit-months { margin: 10px 0 14px; }
  .profit-site-table .mobile-row-card .profit-trend-coverage { text-align: left; }
  .profit-site-table .mobile-row-card .profit-source-status { font-size: 10px; }
  .profit-site-table .mobile-row-card .profit-status { align-self: flex-start; }
}
@media print {
  .cockpit-site-picker { display: none !important; }
  .profit-review-controls, .profit-focus, .profit-analysis-tabs { display: none !important; }
  .profit-review-summary { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .profit-summary-card { break-inside: avoid; }
  .profit-sites-panel, .profitability-review > .panel { break-inside: auto; }
  .profit-site-table .table-scroll { max-height: none; }
  .profit-site-table table { min-width: 0; font-size: 8px; }
  .profit-site-table th:first-child, .profit-site-table td:first-child { position: static; min-width: 120px; }
  .profit-ranking { max-height: none; overflow: visible; scrollbar-gutter: auto; }
  .profit-rank-grid { display: block; }
  .profit-rank-card { margin-bottom: 18px; break-inside: auto; }
  .profit-ranking button.profit-rank-row { display: grid !important; break-inside: avoid; print-color-adjust: exact; }
  .profit-rank-axis { position: static; }
  .profit-rank-scroll-hint { display: none; }
}
.report-context > summary { padding: 12px 16px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.report-context[open] > .panel { margin-top: 12px; }
.report-section-tools { padding: 14px 18px; background: #fff; border: 1px solid var(--line); border-radius: 8px; margin: 0 0 18px; }
.report-section-tools > .eyebrow { font-size: 10px; letter-spacing: .8px; display: block; margin-bottom: 10px; }
.report-section-tools > select { display: none; }
.report-section-tabs { display: flex; flex-wrap: wrap; gap: 7px; }
.section-button { background: #f6f8fb; border: 1px solid #e3eaf0; border-radius: 5px; color: #526779; font-size: 12px; font-weight: 500; padding: 8px 12px; }
.section-button.active { background: #eaf5f1; border-color: #b9d9cc; color: #086d60; }
.section-count { display: inline-block; margin-left: 8px; padding: 0 4px; border-radius: 3px; background: #e9eef3; color: #425970; font-size: 10px; }
.section-button.active .section-count { background: #d4eadd; color: #315942; }
.screen-directory { margin-top: 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.directory-item { padding: 12px 0; }
.directory-item p { font-size: 12px; margin: 4px 0 0; }
@media (min-width: 1900px) { body:not(.entry-mode) main { max-width: 1650px; margin-right: auto; } }
@media (max-width: 1250px) { body:not(.entry-mode) { --sidebar-width: 225px; } body:not(.entry-mode) main { padding: 22px; } .attention-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } .attention-item:nth-child(2) { border-right: 0; } .attention-item:nth-child(-n+2) { border-bottom: 1px solid var(--line); } .header-context { display: none; } }
@media (max-width: 1050px) {
  .report-graphs { grid-template-columns: minmax(0, 1fr); }
  body:not(.entry-mode) main { margin-left: 0; }
  body:not(.entry-mode) .navigation-toggle { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; font-size: 19px; }
  .workspace-sidebar { transform: translateX(-100%); width: 280px; z-index: 31; transition: transform .18s ease; overscroll-behavior: contain; }
  .navigation-open .workspace-sidebar { transform: translateX(0); }
  .navigation-open { overflow: hidden; }
  .sidebar-heading button { display: block; font-size: 22px; line-height: 1; padding: 5px 9px; }
  body:not(.entry-mode) .header-actions #account-security { display: none; }
  .mobile-review-tools:has([data-review-control="account-security"]) { display: flex; flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 5px; }
  .mobile-review-tools > [data-review-control="account-security"] { display: inline-flex; }
}
@media (max-width: 900px) {
  body:not(.entry-mode) .header-search { width: 40px; height: 40px; margin-right: 0; padding: 0; border-color: #708a9a; background: transparent; }
  .header-search input, .header-search kbd { display: none; }
  body:not(.entry-mode) .header-search #find-review { width: 38px; height: 38px; color: #fff; }
  .header-search #find-review:hover { background: #ffffff15; }
}
@media (max-width: 650px) {
  body:not(.entry-mode) .site-header { padding: 12px 14px; gap: 10px; height: 72px; }
  body:not(.entry-mode) .site-header h1 { font-size: 14px; letter-spacing: -.3px; }
  body:not(.entry-mode) .site-header p { font-size: 9px; }
  body:not(.entry-mode) .brand { gap: 8px; }
  body:not(.entry-mode) .brand-mark { width: 28px; height: 28px; }
  body:not(.entry-mode) .header-actions { gap: 4px; }
  body:not(.entry-mode) .header-actions button { padding: 7px; font-size: 10px; }
  body:not(.entry-mode) .header-actions button:not(#logout):not(#find-review) { display: none; }
  body:not(.entry-mode) main { padding: 16px 14px 36px; }
  .workspace-tools { align-items: flex-start; flex-direction: row; gap: 5px; margin-bottom: 14px; min-height: 32px; }
  #review-location { gap: 6px; min-width: 0; flex-wrap: wrap; font-size: 10px; padding-top: 8px; }
  .review-tools { width: auto; padding-right: 110px; flex-wrap: nowrap; gap: 4px; }
  .review-tools button { padding: 7px; font-size: 10px; }
  #save-review-shortcut, #print-review { display: none; }
  .mobile-review-tools > button { display: inline-flex; }
  .review-options > summary { padding: 7px 9px; font-size: 10px; }
  .review-options .review-display { top: 36px; }
  .mobile-review-tools { display: flex; flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 5px; }
  #page-title { font-size: 23px; }
  .review-description { font-size: 12px; }
  .data-freshness { margin-bottom: 14px; padding: 8px 10px; }
  .freshness-summary { gap: 7px; flex-wrap: wrap; font-size: 10px; }
  .filters { padding: 12px; gap: 10px; }
  .filters > div { width: calc(50% - 5px); }
  .filters select { min-width: 0; width: 100%; font-size: 12px; padding: 8px 24px 8px 8px; min-height: 40px; }
  .section-index { padding: 3px 0 10px; gap: 3px; }
  .section-index-label { display: none; }
  .section-index a { font-size: 10px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tiles[data-count="5"], .tiles[data-count="6"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile { padding: 14px 12px; }
  .tile label { font-size: 10px; }
  .amount { font-size: 21px; letter-spacing: -.6px; }
  .attention-strip { margin-bottom: 18px; }
  .attention-item { padding: 12px 10px; gap: 8px; }
  .attention-count { min-width: 30px; height: 34px; font-size: 16px; }
  .attention-label strong { font-size: 10px; }
  .attention-label small { font-size: 9px; }
  .attention-arrow { display: none; }
  .decision-grid, .screen-directory { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .panel { padding: 16px; border-radius: 8px; }
  .panel > .muted { font-size: 11px; }
  .report-section-tabs { display: none; }
  .report-graphs .graph-canvas svg { min-width: 640px; }
  .report-section-tools > select { display: block; width: 100%; min-width: 0; }
  .table-scroll td:first-child, .table-scroll th:first-child { max-width: 135px; }
  .table-sort { font-size: 10px; }
  .table-scroll { max-height: 60vh; }
  .toolbar > button { max-width: 100%; white-space: normal; }
}
@media (max-width: 380px) {
  body:not(.entry-mode) .brand-mark, body:not(.entry-mode) .site-header p { display: none; }
  body:not(.entry-mode) .site-header h1 { max-width: 120px; line-height: 1.25; }
}
.turnover-context { margin: 12px 0; color: #425970; font-size: 12px; }
.turnover-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 14px 0 18px; }
.turnover-summary-card { display: grid; align-content: start; gap: 7px; padding: 14px 16px; border: 1px solid #d6e1e9; border-top: 3px solid #137f72; border-radius: 6px; background: #f7fafb; min-width: 0; }
.turnover-summary-card[data-summary="expected"] { border-top-color: #40558f; }
.turnover-summary-card[data-summary="gap"] { border-top-color: #536c78; }
.turnover-summary-card > span { font-size: 12px; color: #425970; }
.turnover-summary-card > strong { font-size: 23px; font-variant-numeric: tabular-nums; letter-spacing: -.4px; overflow-wrap: break-word; }
.turnover-summary-card > small { font-size: 11px; color: #425970; line-height: 1.5; }
.turnover-summary-card.below-expected > strong { color: #a44632; }
.turnover-summary-card.above-expected > strong { color: #08685d; }
.turnover-variance-title { margin: 16px 0 5px; font-size: 13px; }
.turnover-variance-note, .turnover-footnote { font-size: 11px; color: #425970; line-height: 1.6; margin: 5px 0 8px; }
.report-graphs .turnover-comparison .graph-canvas svg { min-width: 0; min-height: 0; }
.turnover-inspection { border-left: 3px solid #536c78; }
@media (max-width: 650px) {
  .turnover-summary { gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .turnover-summary-card { padding: 10px; }
  .turnover-summary-card > strong { font-size: 18px; }
  .turnover-summary-card[data-summary="gap"] { grid-column: 1 / -1; }
  .turnover-comparison .graph-controls > button { font-size: 11px; padding: 8px 10px; }
}
@media print { .turnover-summary, .turnover-charts { break-inside: avoid; } }
@media (prefers-reduced-motion: reduce) { .workspace-sidebar, #analysis-nav summary::after { transition: none; } }
@media print {
  body:not(.entry-mode) main { margin: 0 !important; max-width: none; padding: 0 !important; }
  .workspace-sidebar, .navigation-toggle, .navigation-backdrop, .review-options, .active-filters, .section-index, .report-section-tools, .preview-options { display: none !important; }
  body:not(.entry-mode) .site-header { position: static; background: white; color: #203449; box-shadow: none; padding: 8px 0; }
  .attention-strip { break-inside: avoid; }
  .attention-item { color: #203449; }
  .panel, .tile { box-shadow: none; }
  .report-graphs { display: block; }
  .report-graphs > .panel { margin-bottom: 18px; }
  .report-related, .report-downloads { display: none !important; }
}
/* Shared results-first review presentation. Exact values remain in evidence. */
.review-update-notice { padding: 10px 14px; border: 1px solid #c9dbed; border-radius: 6px; background: #edf4fb; color: #284963; font-size: 12px; }
.summary-amount { white-space: nowrap; font-variant-numeric: tabular-nums; }
.related-reviews { margin: 12px 0; font-size: 12px; }
.related-reviews .review-links { margin-top: 10px; }
.section-jump { border: 0; margin: 0; padding: 0; position: relative; }
.section-jump > summary { font-size: 12px; color: #476276; }
.section-jump-links { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 10px; }
.chart-options { margin: 8px 0 12px; padding: 6px 0; border: 0; font-size: 11px; color: #526779; }
.chart-options .graph-controls { margin-top: 12px; }
.review-calculation { margin: 12px 0; font-size: 12px; }
.home-outlook .tiles { grid-template-columns: repeat(3,minmax(0,1fr)); }
.home-outlook .tile { background: #f5faf9; border-color: #dae9e5; }
.outlook-calculation, .profit-loss-explanation { margin-top: 12px; font-size: 12px; }
.shortfall-review .tiles[data-count="2"] { grid-template-columns: repeat(2,minmax(0,1fr)); }
.shortfall-calculation, .shortfall-options { margin: 12px 0; font-size: 12px; }
.profit-loss-card > .review-context { margin: 8px 0 12px; font-size: 12px; font-weight: 550; color: #405c70; }
.profit-loss-card .profit-health-summary { margin: 12px 0; }
.attention-strip { grid-template-columns: repeat(3,minmax(0,1fr)); }
@media (min-width: 1051px) {
  #workspace .filters { display: flex; align-items: center; gap: 16px; padding: 9px 14px; margin-bottom: 12px; }
  #workspace .filters > div { display: flex; align-items: center; gap: 8px; margin: 0; }
  #workspace .filters label { margin: 0; }
  #workspace .filters select { min-width: 125px; padding: 5px 8px; font-size: 12px; }
  #workspace .top-line { margin-bottom: 8px; }
  #workspace .data-freshness { margin-bottom: 10px; }
  #workspace .section-index { margin: 0; padding-bottom: 8px; }
  #workspace .tile { padding: 15px 17px; }
  #workspace .tiles .amount { white-space: nowrap; font-size: clamp(20px,2vw,27px); }
  #workspace .panel { padding: 18px; }
}
@media (max-width: 700px) {
  .home-outlook .tiles { grid-template-columns: 1fr; }
  .attention-strip { grid-template-columns: 1fr; }
  .section-jump-links { flex-direction: column; }
  .chart-options summary { line-height: 1.6; }
}
.patterns-context { color:#425970; font-size:12px; line-height:1.65; margin:12px 0 20px; }
.patterns-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.pattern-card { margin:0; min-width:0; display:flex; flex-direction:column; align-items:stretch; }
.pattern-card > h3 { margin:12px 0 8px; font-size:17px; line-height:1.4; }
.pattern-status { align-self:flex-start; font-size:11px; font-weight:600; color:#425970; background:#eef3f7; padding:5px 9px; border-radius:4px; }
.pattern-status[data-status=flag] { color:#933a2a; background:#fff0ec; }
.pattern-status[data-status=watch] { color:#795c17; background:#fff6df; }
.pattern-finding { color:#203449; font-size:14px; line-height:1.6; margin:0 0 8px; font-weight:600; }
.pattern-interpretation { color:#425970; font-size:12px; line-height:1.65; margin:0 0 12px; }
.pattern-card > .panel { border:0; box-shadow:none; padding:0; margin:8px 0 14px; background:transparent; }
.pattern-card > .panel h3 { font-size:12px; }
.pattern-card .graph-canvas svg { min-width:280px; }
.pattern-card .graph-inspection { font-size:11px; }
.pattern-evidence { border-top:1px solid #e6edf2; padding-top:10px; font-size:12px; line-height:1.6; }
.pattern-evidence > summary { cursor:pointer; color:#08776f; padding:4px 0; }
.pattern-evidence > .table-evidence { margin:12px 0; }
.pattern-card > .screen-link { margin-top:auto; padding-top:14px; font-size:12px; align-self:flex-start; }
@media(max-width:1050px) { .patterns-grid { grid-template-columns:minmax(0,1fr); } }
@media print { .patterns-grid { display:block; } .pattern-card { display:block; break-inside:avoid; margin-bottom:18px; } }

#analysis-nav > a[data-screen="actions"]::before { mask-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"%3E%3Crect x="5" y="4" width="14" height="17" rx="2"/%3E%3Cpath d="M9 4V2h6v2M8 12l2 2 5-5M8 18h8"/%3E%3C/svg%3E'); }
/* The site overview keeps source periods and scope visible on every screen size. */
.home-site-controls { min-width:240px; flex:1 1 320px; max-width:520px; }
.home-site-controls > label { display:grid; gap:6px; }
.home-site-heading { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:24px; border:1px solid #cfdfdc; border-radius:12px; background:linear-gradient(110deg,#edf7f4,#fff); }
.home-site-heading h2 { margin:6px 0; font-size:1.5rem; }
.home-site-heading p { margin:8px 0 0; }
.home-site-heading button { flex-shrink:0; }
.home-site-kicker { font-size:.75rem; font-weight:700; letter-spacing:.09em; color:#266c61; }
.home-site-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
.home-site-grid > * { min-width:0; margin:0; }
.home-site-grid .tiles { grid-template-columns:repeat(2,minmax(0,1fr)); }
.home-site-source { color:#46605c; font-size:.88rem; margin:4px 0 16px; }
.home-site-conclusion { border-left:3px solid #298575; padding:8px 14px; background:#f1f7f5; }
.home-site-overview > * { min-width:0; }
.home-site-overview { display:grid; gap:20px; }
.home-site-overview > .panel { margin:0; }
@media(max-width:760px) {
  .home-site-controls { max-width:none; min-width:0; width:100%; flex-basis:100%; }
  .home-site-heading { flex-direction:column; align-items:flex-start; padding:18px; gap:14px; }
  .home-site-heading h2 { overflow-wrap:anywhere; }
  .home-site-grid { grid-template-columns:minmax(0,1fr); }
}
