.intake-profile { border-bottom: 1px solid var(--rule); padding: 19px 0 13px; scroll-margin-block-start: 16px; min-width: 0; }
.ip-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 3px 15px; margin-bottom: 12px; }
.ip-heading h2, .ip-caption h3 { margin: 0; color: var(--ink); font-weight: var(--weight-medium); letter-spacing: -.02em; }
.ip-heading h2 { font-size: 1rem; }
.ip-heading p, .ip-caption p, .ip-method, .ip-state { margin: 0; color: var(--muted); font-size: var(--type-meta); line-height: 1.5; }
.ip-fields { display: flex; flex-wrap: wrap; gap: 4px; }
.ip-field { display: flex; align-items: center; min-height: 35px; padding: 6px 12px; color: var(--muted); background: transparent; border: 1px solid transparent; border-radius: 7px; cursor: pointer; font: inherit; }
.ip-field:hover { background: #f0f5fb; }
.ip-field[aria-pressed=true] { border-color: #c5d9f6; background: #e9f2fe; color: #124da5; }
.ip-tab-copy { display: grid; min-width: 0; gap: 2px; text-align: left; }
.ip-tab-copy strong { font-size: var(--type-label); line-height: 1.3; font-weight: var(--weight-regular); }
.ip-field[aria-pressed=true] .ip-tab-copy strong { font-weight: var(--weight-medium); }
.ip-lead { color: var(--muted); font-size: var(--type-micro); line-height: 1.3; overflow-wrap: anywhere; }
.ip-detail { display: grid; grid-template-columns: minmax(155px, .7fr) minmax(0, 2fr); gap: clamp(16px,3vw,42px); align-items: start; padding: 17px 2px 10px; }
.ip-caption h3 { margin-bottom: 4px; font-size: var(--type-head); }
.ip-caption .ip-sample { margin: 10px 0 6px; }
.ip-sample strong { font-weight: var(--weight-medium); color: var(--ink); font-variant-numeric: tabular-nums; }
.ip-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 9px; }
.ip-distribution { min-width: 0; padding: 8px 12px; border: 1px solid var(--viz-grid); border-radius: 10px; background: linear-gradient(120deg,var(--viz-paper),var(--viz-field)); }
.ip-chart { width: 100%; table-layout: auto; border-collapse: collapse; font-size: var(--type-meta); }
.ip-chart th, .ip-chart td { padding: 6px; vertical-align: middle; }
.ip-chart tbody tr:last-child :is(th,td) { border-bottom: 0; }
.ip-chart th:first-child { padding-left: 0; }
.ip-chart thead th { background: transparent; border-bottom: 1px solid var(--rule); text-transform: none; letter-spacing: 0; font-size: var(--type-micro); }
.ip-chart tbody th { width: 30%; text-align: left; color: var(--ink); text-transform: none; background: transparent; font-size: inherit; font-weight: var(--weight-regular); letter-spacing: normal; overflow-wrap: anywhere; }
.ip-chart .ip-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ip-share { color: var(--muted); }
.ip-chart .ip-plot { width: 38%; padding-inline: 12px 14px; }
.ip-scale { display: flex; justify-content: space-between; color: var(--muted); font-size: .64rem; font-weight: var(--weight-regular); }
.ip-track { display: block; position: relative; height: 10px; background:
  linear-gradient(var(--viz-grid),var(--viz-grid)) center / 100% 1px no-repeat,
  linear-gradient(90deg,var(--viz-grid) 1px,transparent 1px) left center / 25% 6px repeat-x;
  border-right: 1px solid var(--viz-grid); }
.ip-track i,.ip-key i { width: 8px; height: 8px; border: 2px solid var(--viz-royal); border-radius: 50%; background: var(--viz-paper); box-sizing: border-box; }
.ip-track i { position: absolute; top: 50%; transform: translate(-50%,-50%); }
.ip-track b,.ip-key b { height: 8px; min-width: 2px; box-sizing: border-box; border: 1px solid var(--viz-teal); border-radius: 2px; background: var(--viz-tint); }
.ip-track b { position: absolute; top: 1px; }
.ip-key,.ip-key span { display: flex; align-items: center; }
.ip-key { gap: 10px; justify-content: flex-end; padding-block: 3px; font-size: var(--type-micro); color: var(--viz-muted); }
.ip-key span { gap: 4px; }
.ip-key b { width: 13px; }
.ip-more, .ip-method summary { font: inherit; font-size: var(--type-meta); font-weight: var(--weight-regular); color: var(--teal); cursor: pointer; }
.ip-more { margin-top: 6px; border: 0; padding: 3px 0; background: transparent; text-decoration: underline; text-underline-offset: 2px; }
.ip-method summary { width: fit-content; }
.ip-method p { max-width: 82ch; margin: 4px 0; }
.ip-note { font-size: var(--type-micro); color: var(--muted); margin: 5px 0 0; }
.ip-state { padding: 10px 0; }
@media (max-width: 660px) {
  .ip-fields { gap: 2px; }
  .ip-detail { grid-template-columns: minmax(0,1fr); gap: 10px; padding-top: 13px; }
  .ip-caption .ip-sample { margin: 4px 0; }
  .ip-field { padding: 7px; }
}
@media (max-width: 470px) {
  .ip-distribution { padding: 5px 7px; }
  .ip-chart .ip-plot { width: 22%; padding-inline: 5px 8px; }
  .ip-chart tbody th { width: 38%; }
  .ip-scale { justify-content: center; white-space: nowrap; }
  .ip-scale span { display: none; }
  .ip-scale::before { content: '0–100%'; }
}
@media (max-width: 380px) {
  .ip-chart { table-layout: fixed; min-width: 0; }
  .ip-chart .ip-plot { width: 20%; }
  .ip-chart th:first-child { width: 37%; white-space: normal; overflow-wrap: anywhere; }
  .ip-chart .ip-num { padding-inline: 3px; white-space: normal; overflow-wrap: anywhere; }
}

/* The same released count band drives a matrix tile and its legend swatch. */
#demand-body .demand-wrap { border: 1px solid var(--viz-grid); padding: 4px; border-radius: 10px; background: var(--viz-field); }
#demand-body .demand-table { border-spacing: 3px; }
#demand-body .demand-table :is(th[scope="row"],thead th:first-child) { background: var(--viz-field); }
#demand-body .demand-table thead th { color: var(--viz-muted); font-weight: var(--weight-medium); text-transform: none; letter-spacing: normal; }
#demand-body .demand-table .heat-cell { height: 31px; border-radius: 6px; box-shadow: inset 0 0 0 1px rgb(26 68 101 / .1); }
#demand-body .heat-cell.heat-0 { background: #edf2f5; color: #536a7c; }
#demand-body .heat-cell.heat-1 { background: #cee8ed; color: #174253; }
#demand-body .heat-cell.heat-2 { background: #93cadb; color: #11384c; }
#demand-body .heat-cell.heat-3 { background: #32758d; color: #fff; }
#demand-body .heat-cell.heat-4 { background: var(--viz-royal); color: #fff; }
#demand-body .demand-table .heat-withheld { background: repeating-linear-gradient(135deg,#f4f6f8 0 4px,#d9e1e7 4px 5px); color: #344b5d; }
#demand-body .heat-takeaway { color: var(--viz-ink); background: var(--viz-tint); border-left-color: var(--viz-teal); }
#demand-body .heat-takeaway strong { color: var(--viz-ink); }
#demand-body .heat-scale { color: var(--viz-muted); }

/* Anatomical zones follow the 3:2 shoulder-to-hand illustration. */
.patient-demand {
  --pd-rule: #dce5ee; --pd-ink: #182f4b; --pd-muted: #486079;
  min-width: 0; scroll-margin-block-start: 16px; padding: clamp(15px,1.6vw,23px);
  border: 1px solid var(--pd-rule); border-radius: 15px; background: #fff;
}
.pd-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 3px 12px; margin-bottom: 14px; }
.pd-heading h2 { margin: 0; color: var(--pd-ink); font-size: 1rem; letter-spacing: -.025em; }
.pd-heading p { margin: 0; color: var(--pd-muted); font-size: var(--type-meta); }
.pd-body { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(0,1fr); align-items: center; gap: clamp(13px,1.65vw,27px); }
.pd-map,.pd-data { min-width: 0; }
.pd-map { overflow: hidden; border-radius: 9px; background: #eff3f6; }
.pd-image { position: relative; isolation: isolate; width: 100%; aspect-ratio: 3 / 2; }
.pd-image img { width: 100%; height: 100%; display: block; }
.patient-demand [data-band="low"] { --heat-rgb: 106 188 208; }
.patient-demand [data-band="middle"] { --heat-rgb: 39 156 197; }
.patient-demand [data-band="upper"] { --heat-rgb: 36 113 195; }
.patient-demand [data-band="high"] { --heat-rgb: 30 68 165; }
.patient-demand [data-band="unknown"],.patient-demand [data-band="zero"] { --heat-rgb: 208 219 226; }
.pd-heat {
  position: absolute; inset: 0; pointer-events: none; mix-blend-mode: multiply;
  background: rgb(var(--heat-rgb) / .72);
  clip-path: polygon(0 0,0 0,0 0);
}
.pd-heat[data-zone="Neck"] {
  clip-path: polygon(95% 0,100% 0,100% 21%,96% 20%,90% 18%,86% 17%,90% 14%,93% 11%,94.7% 6%);
}
.pd-heat[data-zone="Shoulder"] {
  clip-path: polygon(71.7% 33.8%,72.2% 29.7%,74.4% 25%,77.1% 21.8%,81.6% 19.3%,86% 19%,90% 20%,92% 22.8%,92.7% 26.8%,91.1% 33.6%,88.8% 36.8%,87% 34%,84% 31.3%,80.6% 30.4%,76.8% 31.5%);
}
.pd-heat[data-zone="Arm"] {
  clip-path: polygon(46.6% 48.4%,50.7% 48.3%,54.6% 46%,58% 43%,60.7% 41.5%,64% 40.5%,67.2% 40.4%,69.1% 38.5%,71.4% 35.4%,74% 34%,80% 31.7%,83.4% 32%,86% 34%,87.5% 36.9%,87.8% 40.8%,86% 43.3%,84.3% 47.3%,82.3% 51.9%,78.2% 55.1%,74.3% 57.1%,72.1% 59.7%,67.7% 62.1%,64.1% 64.8%,60.3% 66.8%,55.3% 68%,50.2% 68.5%,47.3% 69.1%);
}
.pd-heat[data-zone="Hand"] {
  clip-path: polygon(
    18.3% 20.8%,19.7% 21%,25.5% 25%,30.5% 29.7%,34.3% 31.6%,41.9% 42.5%,44% 48%,45.1% 69.6%,43.8% 70.1%,37.8% 75.8%,28% 79.5%,
    19.5% 88.2%,14.8% 90.9%,13.4% 89.5%,13.8% 86.7%,23.8% 75%,24.3% 73.8%,23.6% 72.7%,21.9% 72.9%,7.7% 81.7%,5.6% 81.1%,4.9% 79.4%,
    5% 77.6%,6.3% 75.5%,20.7% 65.3%,19.8% 64%,18.7% 64.1%,3.3% 69.8%,1.5% 68.8%,1% 65.7%,1.8% 63.6%,4.7% 61.5%,11.8% 58%,18.1% 56.5%,
    19.2% 55.4%,19.2% 54.5%,18.2% 53.3%,14.6% 52.7%,3.5% 53%,2% 51.8%,1.6% 49.3%,2.9% 46.7%,5.7% 45.4%,11.9% 44.4%,19.5% 44.9%,
    26% 42.5%,27.8% 40.4%,28.2% 38.9%,27.4% 37.6%,20.5% 32.3%,17.7% 28.3%,16.7% 25.4%,16.6% 23.3%,17.1% 21.8%
  );
}
.pd-heat[data-band="zero"],.pd-heat[data-band="unknown"] { background: transparent; }
.pd-map-label {
  position: absolute; z-index: 1; display: inline-flex; align-items: baseline; gap: 4px; padding: 3px 6px;
  border: 1px solid #d1dbe6; border-radius: 5px; background: rgb(255 255 255 / 92%);
  color: #263f5b; line-height: 1.25; white-space: nowrap; font-size: clamp(.61rem,.77vw,.72rem); font-weight: var(--weight-regular);
}
.pd-map-label b { color: #122f50; font-variant-numeric: tabular-nums; font-weight: var(--weight-medium); }
.pd-map-label[data-zone="Neck"] { right: 1.5%; top: 4%; }
.pd-map-label[data-zone="Shoulder"] { right: 10%; top: 22%; }
.pd-map-label[data-zone="Arm"] { left: 52%; top: 51%; }
.pd-map-label[data-zone="Hand"] {
  top: 80%; left: 29%; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 5px;
  padding: 4px 7px; border-color: #a6b8c6; background: #fff; color: #1c344a;
  font-size: clamp(.75rem,.9vw,.88rem); font-weight: var(--weight-medium);
}
.pd-map-label[data-zone="Hand"] small { font-size: .65rem; font-weight: var(--weight-regular); color: #536579; }
.pd-hand-guide { position: absolute; left: 31%; top: 61%; height: 20%; width: 1px; background: #526b7f; }
.pd-hand-guide::before { content: ''; position: absolute; top: -3px; left: -3px; width: 7px; height: 7px; border: 1px solid #526b7f; background: #fff; border-radius: 50%; box-sizing: border-box; }
.pd-scale { display: flex; flex-wrap: wrap; gap: 3px 10px; align-items: center; padding: 6px 9px; border-top: 1px solid #dbe2e8; color: #41556a; font-size: .61rem; }
.pd-key { display: inline-flex; gap: 3px; align-items: center; white-space: nowrap; }
.pd-key i,.pd-dot { display: inline-block; background: rgb(var(--heat-rgb)); border-radius: 2px; }
.pd-key i { width: 9px; height: 6px; }
.pd-sample { display: flex; flex-wrap: wrap; gap: 2px 6px; align-items: baseline; margin: 0 0 11px; color: var(--pd-muted); font-size: var(--type-label); }
.pd-sample strong { color: var(--pd-ink); font-size: clamp(1.35rem,2.2vw,2rem); font-weight: var(--weight-medium); line-height: 1; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.pd-finding { margin: 0 0 4px; color: var(--pd-ink); font-size: clamp(.94rem,1.21vw,1.15rem); font-weight: var(--weight-medium); line-height: 1.25; letter-spacing: -.025em; }
.pd-finding + .pd-sample { margin-bottom: 9px; gap: 3px; }
.pd-finding + .pd-sample strong { font-size: inherit; font-weight: var(--weight-regular); letter-spacing: 0; }
.pd-region-list,.pd-detail table { width: 100%; min-width: 0; border-collapse: collapse; }
.pd-region-list th,.pd-region-list td,.pd-detail th,.pd-detail td {
  padding: 6px 4px; text-align: right; border-bottom: 1px solid #e3ebf1; background: transparent; text-transform: none; letter-spacing: normal;
  font-size: var(--type-label); line-height: 1.3;
}
.pd-region-list th:first-child,.pd-detail th:first-child { padding-left: 0; text-align: left; }
.pd-region-list td:last-child,.pd-region-list th:last-child,.pd-detail td:last-child,.pd-detail th:last-child { padding-right: 0; }
.pd-region-list thead th,.pd-detail thead th { color: var(--pd-muted); font-size: var(--type-micro); font-weight: var(--weight-medium); }
.pd-region-list tbody th,.pd-detail tbody th { color: var(--pd-ink); font-weight: var(--weight-regular); }
.pd-region-list td,.pd-detail td { color: var(--pd-ink); font-variant-numeric: tabular-nums; }
.pd-region-list td:last-child { color: var(--pd-muted); }
.pd-region-row[data-availability="unmeasured"] th::before {
  content: ''; display: inline-block; box-sizing: border-box; width: 7px; height: 7px;
  margin-right: 6px; border: 1px dashed #758a9d; border-radius: 2px; vertical-align: 1px;
}
.pd-region-row[data-availability="unmeasured"] td { color: var(--pd-muted); font-size: var(--type-meta); }
.pd-state-hand { display: grid; gap: 3px; margin: 0; color: var(--pd-muted); font-size: var(--type-meta); }
.pd-state-hand strong { font-weight: var(--weight-medium); color: var(--pd-ink); font-size: 1rem; }
.pd-dot { width: 7px; height: 7px; margin-right: 6px; vertical-align: 1px; }
.pd-region-row[data-location="Other"] .pd-dot { border: 1px solid #8799a7; background: transparent; }
.pd-scope-note { margin: 9px 0 0; color: var(--pd-muted); font-size: var(--type-meta); line-height: 1.45; }
.pd-footer { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: start; gap: 4px 8px; margin-top: 10px; }
.pd-reading summary,.pd-source-links a { width: fit-content; color: var(--teal); padding: 6px 0; font-size: var(--type-meta); font-weight: var(--weight-regular); cursor: pointer; }
.pd-reading[open] { grid-column: 1 / -1; }
.pd-reading[open] ~ .ip-actions { justify-self: end; }
.pd-detail { margin: 2px 0; }
.pd-detail table { max-width: 580px; }
.pd-source-links { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 15px; }
.pd-footer .ip-actions button,.pd-source-links button { font-size: var(--type-meta); }
@media (max-width: 640px) {
  .pd-heading { margin-bottom: 11px; }
  .pd-body { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .pd-map { width: 100%; max-width: 420px; justify-self: center; }
  .pd-data { width: 100%; }
  .pd-sample { margin-bottom: 5px; }
  .pd-region-list th,.pd-region-list td { padding-block: 5px; }
}
@media (max-width: 380px) {
  .pd-map-label { font-size: .60rem; gap: 2px; padding: 2px 4px; }
  .pd-scale { gap: 3px 6px; padding-inline: 5px; }
  .pd-footer { display: flex; flex-wrap: wrap; justify-content: space-between; }
  .pd-reading[open] { width: 100%; }
}
