/* Case study reporting workspace: dense software UI inside the site. */
.csd {
  --csd-navy: #142944;
  --csd-blue: #245bd8;
  --csd-ink: #172238;
  --csd-muted: #657184;
  --csd-line: #dde3eb;
  --csd-canvas: #f4f6f9;
  padding: clamp(32px, 4vw, 58px) 0 clamp(88px, 9vw, 130px);
  background: linear-gradient(180deg, #f8fafd, #eef3fb);
  color: var(--csd-ink);
}
.csd-wrap { width: min(1480px, calc(100% - 2 * clamp(16px, 3vw, 44px))); margin-inline: auto; }
.csd-intro { display: flex; align-items: end; justify-content: space-between; gap: 40px; margin-bottom: 27px; }
.csd-intro-k { margin-bottom: 8px; color: #315bae; font-size: 12px; font-weight: 700; letter-spacing: .055em; text-transform: uppercase; }
.csd-intro h2 { max-width: 17ch; font-size: clamp(34px, 3.5vw, 52px); line-height: 1.04; letter-spacing: -.045em; font-weight: 650; }
.csd-intro > p { max-width: 42ch; padding-bottom: 3px; color: #5a6880; font-size: 15px; line-height: 1.5; }

.csd-app { display: grid; grid-template-columns: 206px minmax(0,1fr); min-height: 660px; overflow: hidden; border: 1px solid #cfd8e5; border-radius: 14px; background: var(--csd-canvas); box-shadow: 0 36px 65px -46px rgba(20,41,68,.48), 0 8px 28px -24px rgba(20,41,68,.3); }
.csd-sidebar { display: flex; flex-direction: column; min-width: 0; padding: 20px 12px 18px; background: var(--csd-navy); color: #e3ebf6; }
.csd-side-brand { display: flex; align-items: center; gap: 11px; padding: 1px 12px 24px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.csd-side-logo { display: grid; place-items: center; flex: none; width: 31px; height: 31px; border-radius: 7px; background: #f3f6ff; color: #1f56cf; font-size: 12px; font-weight: 800; letter-spacing: -.08em; }
.csd-side-account { display: flex; align-items: center; gap: 9px; margin-bottom: 28px; padding: 10px 9px; border: 1px solid #3e5370; border-radius: 7px; background: #1e3655; min-width: 0; }
.csd-side-avatar, .csd-top-avatar { display: grid; place-items: center; flex: none; border-radius: 50%; background: #395f97; color: white; font-size: 10px; font-weight: 750; }
.csd-side-avatar { width: 28px; height: 28px; }
.csd-side-account > span:nth-child(2) { min-width: 0; flex: 1; }
.csd-side-account strong, .csd-side-account small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.csd-side-account strong { font-size: 11px; line-height: 1.3; }
.csd-side-account small { margin-top: 2px; color: #a5b7d0; font-size: 10px; }
.csd-side-chevron { color: #a3b6cf; }
.csd-side-group { display: grid; gap: 3px; }
.csd-side-group > small { padding: 0 11px 8px; color: #8ea5c1; font-size: 9px; font-weight: 750; letter-spacing: .09em; }
.csd-side-item { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 6px; color: #b9c9dc; font-size: 11.5px; font-weight: 560; }
.csd-side-item svg { width: 15px; height: 15px; flex: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.csd-side-active { color: #fff; background: #2b4d78; font-weight: 700; }
.csd-side-foot { display: flex; align-items: center; gap: 7px; margin-top: auto; padding: 12px 10px 0; border-top: 1px solid #36506e; color: #a8bad1; font-size: 10px; }
.csd-side-status, .csd-source-badge i, .csd-fact-dot { display: inline-block; flex: none; width: 6px; height: 6px; border-radius: 50%; background: #56b87e; }

.csd-main { min-width: 0; }
.csd-topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 58px; padding: 11px clamp(19px, 2.4vw, 32px); border-bottom: 1px solid var(--csd-line); background: #fff; }
.csd-breadcrumb { color: #718095; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.csd-breadcrumb span { padding-inline: 8px; color: #a0adbb; }
.csd-breadcrumb strong { color: #293c55; font-weight: 650; }
.csd-top-actions { display: flex; align-items: center; gap: 17px; flex: none; }
.csd-source-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 9px; border: 1px solid #d8e2f1; border-radius: 5px; background: #f5f8fc; color: #3f587a; font-size: 10px; font-weight: 650; white-space: nowrap; }
.csd-source-badge i { background: #2a67df; }
.csd-top-avatar { width: 29px; height: 29px; }
.csd-content { padding: clamp(18px, 2.4vw, 31px); }
.csd-report-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.csd-report-overline { margin-bottom: 5px; color: #6e7e92; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.csd-report-head h3 { font-size: clamp(21px, 2vw, 27px); line-height: 1.16; letter-spacing: -.025em; font-weight: 670; }
.csd-report-head p:last-child { margin-top: 4px; color: #768397; font-size: 11px; }
.csd-scope { position: relative; flex: none; }
.csd-scope summary { display: inline-flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid #cfd8e5; border-radius: 6px; background: #fff; color: #334967; cursor: pointer; font-size: 10px; font-weight: 650; list-style: none; white-space: nowrap; }
.csd-scope summary::-webkit-details-marker { display: none; }
.csd-scope summary svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.csd-scope summary span { color: #728097; }
.csd-scope > p { position: absolute; z-index: 10; top: calc(100% + 7px); right: 0; width: min(250px, 65vw); padding: 11px 13px; border: 1px solid #cfd8e5; border-radius: 7px; background: #fff; box-shadow: 0 12px 24px rgba(20,41,68,.15); color: #53647b; font-size: 11px; line-height: 1.45; }
.csd-tabs { display: flex; gap: 24px; margin-top: 25px; border-bottom: 1px solid #cfd8e5; overflow-x: auto; scrollbar-width: thin; }
.csd-tabs button { position: relative; min-height: 37px; flex: none; padding: 0 2px 11px; color: #6c7b8e; font-size: 12px; font-weight: 600; white-space: nowrap; }
.csd-tabs button[aria-selected="true"] { color: #2459d1; }
.csd-tabs button[aria-selected="true"]::after { content: ''; position: absolute; height: 2px; bottom: -1px; left: 0; right: 0; background: #2459d1; }
.csd-tabs button:focus-visible, .csd-next-row button:focus-visible, .csd-scope summary:focus-visible { outline: 2px solid #2459d1; outline-offset: -2px; }
.csd-panel { padding-top: 20px; }
.csd-panel[hidden] { display: none !important; }
.csd-panel-caption { display: flex; align-items: center; gap: 8px; margin-bottom: 13px; color: #5a6b81; font-size: 10px; font-weight: 620; }
.csd-fact-dot { background: #2b70d7; }
.csd-panel-caption-right { margin-left: auto; color: #8a96a6; font-weight: 450; text-align: right; }

.csd-kpis { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.csd-kpi { min-width: 0; min-height: 112px; padding: 14px 15px 12px; border: 1px solid #dce3ec; border-radius: 7px; background: #fff; }
.csd-kpi p { margin-bottom: 12px; color: #64758b; font-size: 10.5px; font-weight: 600; }
.csd-kpi strong { display: block; color: #16243b; font-size: clamp(19px, 1.75vw, 27px); font-weight: 690; line-height: 1.05; letter-spacing: -.045em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.csd-kpi span { display: block; margin-top: 7px; color: #7a8798; font-size: 9.5px; line-height: 1.35; }
.csd-kpi-rate strong { color: #1f58c9; }
.csd-overview-grid { display: grid; grid-template-columns: minmax(0,1.17fr) minmax(0,.83fr); gap: 12px; margin-top: 12px; }
.csd-widget { min-width: 0; border: 1px solid #dce3ec; border-radius: 7px; background: #fff; }
.csd-widget-head { display: flex; justify-content: space-between; align-items: start; gap: 16px; padding: 16px 17px 13px; }
.csd-widget-head h4 { font-size: 13px; font-weight: 680; line-height: 1.2; letter-spacing: -.01em; }
.csd-widget-head p { margin-top: 3px; color: #8591a0; font-size: 10px; }
.csd-widget-menu { color: #8491a1; font-size: 12px; line-height: .8; letter-spacing: 1px; }
.csd-attendance-plot { display: grid; grid-template-columns: repeat(15,minmax(0,1fr)); gap: 4px; padding: 12px 17px 0; }
.csd-attendance-plot span { height: 74px; border-radius: 3px 3px 0 0; }
.csd-attendance-plot .is-show { background: linear-gradient(180deg,#4b86e4,#235fd2); }
.csd-attendance-plot .is-variable { background: repeating-linear-gradient(45deg,#89acee 0 4px,#d6e4fa 4px 8px); }
.csd-attendance-plot .is-no-show { background: #dfe5ed; }
.csd-attendance-axis { display: flex; justify-content: space-between; gap: 8px; margin: 0 17px; padding: 8px 0 0; border-top: 1px solid #cfd7e2; color: #718095; font-size: 9px; }
.csd-attendance-legend { display: flex; flex-wrap: wrap; gap: 9px 17px; margin: 17px 17px 0; padding: 12px 0 15px; border-top: 1px solid #eef1f5; color: #65758a; font-size: 9px; }
.csd-attendance-legend span { display: inline-flex; align-items: center; gap: 6px; }
.csd-attendance-legend i { width: 8px; height: 8px; border-radius: 2px; }
.csd-attendance-legend .is-show { background: #2c68d5; }
.csd-attendance-legend .is-variable { background: repeating-linear-gradient(45deg,#89acee 0 2px,#d6e4fa 2px 4px); }
.csd-attendance-legend .is-no-show { background: #dfe5ed; }
.csd-ledger-widget { overflow-x: auto; }
.csd-ledger-widget table { width: calc(100% - 34px); min-width: 290px; margin: 0 17px; border-collapse: collapse; font-size: 10px; font-variant-numeric: tabular-nums; }
.csd-ledger-widget thead { background: #f7f9fc; }
.csd-ledger-widget th, .csd-ledger-widget td { padding: 9px 7px; border-bottom: 1px solid #edf0f4; text-align: left; white-space: nowrap; }
.csd-ledger-widget thead th { color: #7a899b; font-size: 9px; font-weight: 650; }
.csd-ledger-widget tbody th { color: #34455c; font-weight: 620; }
.csd-ledger-widget td { color: #50637d; }
.csd-no-bill, .csd-yes-bill { display: inline-block; padding: 2px 6px; border-radius: 4px; font-size: 9px; font-weight: 650; }
.csd-no-bill { color: #607186; background: #f1f3f6; }
.csd-yes-bill { color: #166943; background: #e7f6ed; }
.csd-ledger-foot { margin: 12px 17px 16px; color: #748398; font-size: 10px; }
.csd-next-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 12px; padding: 16px 18px; border: 1px solid #dce3ec; border-radius: 7px; background: #fff; }
.csd-next-row strong, .csd-next-row span { display: block; }
.csd-next-row strong { font-size: 12px; font-weight: 650; }
.csd-next-row > div:first-child span { margin-top: 3px; color: #77879b; font-size: 10px; }
.csd-next-row > div:last-child { display: flex; gap: 6px; flex: none; }
.csd-next-row button { display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid #c7d7f0; border-radius: 5px; color: #2459c7; background: #f5f8fe; font-size: 10px; font-weight: 650; white-space: nowrap; }
.csd-next-row button span { display: inline; font-size: 13px; }
.csd-next-row button:hover { background: #eaf1ff; }

/* Practice economics is visually separate from observed account results. */
.csd-model-head { display: flex; justify-content: space-between; align-items: start; gap: 20px; margin-bottom: 17px; }
.csd-model-k { color: #426db1; font-size: 10px; font-weight: 730; letter-spacing: .06em; text-transform: uppercase; }
.csd-model-head h4 { margin-top: 4px; font-size: 22px; line-height: 1.17; letter-spacing: -.025em; font-weight: 680; }
.csd-model-head p:last-child { max-width: 65ch; margin-top: 7px; color: #6b7a8c; font-size: 11px; line-height: 1.45; }
.csd-model-tag { flex: none; padding: 6px 8px; border: 1px solid #cfddf0; border-radius: 5px; background: #edf4ff; color: #3564a9; font-size: 9px; font-weight: 680; white-space: nowrap; }
.csd-model-grid { display: grid; grid-template-columns: minmax(230px,.7fr) minmax(0,1.3fr); gap: 12px; }
.csd-model-controls, .csd-model-result { min-width: 0; padding: 20px; border: 1px solid #dce3ec; border-radius: 7px; background: #fff; }
.csd-close-control { padding: 0; border: 0; }
.csd-close-control legend, .csd-cost-control label { margin-bottom: 9px; color: #45586f; font-size: 11px; font-weight: 650; }
.csd-close-options { display: grid; grid-template-columns: repeat(3,1fr); gap: 4px; max-width: 270px; padding: 3px; border: 1px solid #d6dfeb; border-radius: 5px; background: #f5f7fb; }
.csd-close-options label { position: relative; cursor: pointer; }
.csd-close-options input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.csd-close-options span { display: grid; place-items: center; min-height: 32px; border-radius: 3px; color: #607086; font-size: 11px; font-weight: 650; }
.csd-close-options input:checked + span { color: white; background: #2863d2; }
.csd-close-options input:focus-visible + span { outline: 2px solid #142944; outline-offset: 2px; }
.csd-cost-control { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 22px; }
.csd-cost-control label { max-width: 155px; margin: 0; line-height: 1.35; }
.csd-cost-input { display: flex; align-items: center; gap: 3px; width: 74px; padding: 6px 8px; border: 1px solid #c5d1e0; border-radius: 5px; background: #fff; }
.csd-cost-input:focus-within { outline: 2px solid #2a61d4; outline-offset: 1px; }
.csd-cost-input input { width: 100%; min-width: 0; border: 0; outline: 0; color: #233a59; font: inherit; font-size: 12px; font-weight: 700; text-align: right; appearance: textfield; }
.csd-cost-input input::-webkit-inner-spin-button, .csd-cost-input input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.csd-cost-input span { color: #6b7c90; font-size: 11px; }
.csd-control-note { margin-top: 7px; color: #7b8a9b; font-size: 10px; line-height: 1.4; }
.csd-cost-input:has(input[aria-invalid="true"]) { border-color: #c94848; }
.csd-model-assumptions { display: grid; gap: 9px; margin-top: 23px; padding-top: 15px; border-top: 1px solid #e2e7ef; }
.csd-model-assumptions div { display: flex; justify-content: space-between; gap: 12px; font-size: 10px; }
.csd-model-assumptions dt { color: #7a899b; }
.csd-model-assumptions dd { color: #354b66; font-weight: 650; text-align: right; }
.csd-contribution { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding-bottom: 18px; border-bottom: 1px solid #e0e6ee; }
.csd-contribution > span { color: #314863; font-size: 12px; font-weight: 650; }
.csd-contribution small { display: block; margin-top: 3px; color: #8290a1; font-size: 9px; font-weight: 450; }
.csd-contribution strong { color: #1f5cbf; font-size: clamp(28px,3.1vw,40px); line-height: 1; letter-spacing: -.05em; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.csd-model-result[data-negative="true"] .csd-contribution strong { color: #b74444; }
.csd-bar-chart { display: grid; gap: 12px; margin-top: 19px; }
.csd-bar-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; color: #5b6c81; font-size: 10px; }
.csd-bar-row strong { color: #2a3d57; font-size: 11px; font-weight: 670; font-variant-numeric: tabular-nums; }
.csd-bar-row small { color: #8895a6; font-size: 9px; }
.csd-bar-track { grid-column: 1 / -1; height: 7px; border-radius: 4px; background: #edf1f6; overflow: hidden; }
.csd-bar-track i { display: block; height: 100%; border-radius: inherit; transition: width .3s ease; }
.csd-bar-revenue { width: 100%; background: #2865d4; }
.csd-bar-clinical { width: 40%; background: #7898c4; }
.csd-bar-fees { width: 16.67%; background: #aabbd3; }
.csd-bar-profit { width: 43.33%; background: #39a173; }
.csd-model-result[data-negative="true"] .csd-bar-profit { background: #ce5757; }
.csd-formula { margin-top: 13px; padding: 12px 15px; border: 1px solid #dce3ec; border-radius: 6px; background: #fff; }
.csd-formula summary { color: #3e5d87; font-size: 11px; font-weight: 650; cursor: pointer; }
.csd-formula summary:focus-visible { outline: 2px solid #245bd8; outline-offset: 3px; }
.csd-formula p { max-width: 100ch; margin-top: 9px; color: #64778f; font-size: 10px; line-height: 1.55; }
.csd-source-note { margin: 12px 4px 0; color: #738094; font-size: 11px; line-height: 1.45; }

@media (max-width: 1080px) {
  .csd-app { grid-template-columns: 168px minmax(0,1fr); }
  .csd-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .csd-overview-grid { grid-template-columns: 1fr; }
}
@media (max-width: 780px) {
  .csd-intro { display: block; }
  .csd-intro > p { max-width: 64ch; margin-top: 10px; }
  .csd-app { grid-template-columns: 54px minmax(0,1fr); }
  .csd-sidebar { padding: 14px 6px; }
  .csd-side-brand { justify-content: center; padding: 0 0 21px; font-size: 0; }
  .csd-side-brand span:last-child, .csd-side-account, .csd-side-group > small, .csd-side-foot { display: none; }
  .csd-side-item { justify-content: center; padding: 10px 5px; font-size: 0; }
  .csd-side-item svg { width: 17px; height: 17px; }
  .csd-content { padding: 18px; }
  .csd-report-head { align-items: start; }
  .csd-panel-caption-right { display: none; }
  .csd-next-row { display: block; }
  .csd-next-row > div:last-child { margin-top: 12px; }
  .csd-model-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .csd { padding-top: 23px; }
  .csd-app { display: block; }
  .csd-sidebar { display: none; }
  .csd-intro h2 { font-size: clamp(32px, 8vw, 42px); }
  .csd-intro > p { font-size: 13px; }
  .csd-topbar { min-height: 50px; padding: 9px 14px; }
  .csd-breadcrumb { font-size: 9px; }
  .csd-breadcrumb span { padding-inline: 4px; }
  .csd-top-actions { gap: 7px; }
  .csd-source-badge { font-size: 0; padding: 7px; }
  .csd-source-badge i { width: 7px; height: 7px; }
  .csd-top-avatar { width: 24px; height: 24px; font-size: 8px; }
  .csd-content { padding: 15px 13px; }
  .csd-report-head { display: block; }
  .csd-scope { display: inline-block; margin-top: 14px; }
  .csd-tabs { gap: 18px; margin-top: 16px; }
  .csd-tabs button { font-size: 11px; }
  .csd-kpis { gap: 7px; }
  .csd-kpi { min-height: 100px; padding: 11px; }
  .csd-kpi strong { font-size: clamp(18px,5vw,23px); }
  .csd-kpi p { font-size: 9px; }
  .csd-kpi span { font-size: 8px; }
  .csd-attendance-plot { gap: 2px; }
  .csd-attendance-plot span { height: 58px; }
  .csd-attendance-axis { font-size: 8px; }
  .csd-model-head { display: block; }
  .csd-model-tag { display: inline-block; margin-top: 10px; }
  .csd-model-controls, .csd-model-result { padding: 16px; }
  .csd-next-row > div:last-child { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .csd *, .csd *::before, .csd *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
