/* The hospital list (institutions/index.html), 2026-11-18: design_exploration_2026-11-18_hospital_filters/ (v3).
   Filters in a side column from 1100px, a sheet below. Rows or a grid with a locator map. Few boxes: the search field,
   the "Filters" button, the view switch and the shortlist bar are the only outlined or filled controls. Token values only. */
.hf { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-8); padding: var(--s-6) 0 var(--s-12); }
.hf:not(.on) .hf-side, .hf:not(.on) .hf-open, .hf:not(.on) .hf-view { display: none; }   /* without JavaScript: the full A-Z list */
@media (min-width: 1100px) { .hf.on { grid-template-columns: 248px minmax(0, 1fr); } }

/* side column */
.hf-side { font-size: var(--fs-meta); }
.hf-sh, .hf-sf { display: none; }
@media (min-width: 1100px) {
  .hf-side { position: sticky; top: calc(var(--hdr) + var(--s-4)); align-self: start; max-height: calc(100vh - var(--hdr) - var(--s-8)); display: flex; flex-direction: column; }
  .hf-body { overflow-y: auto; padding-right: var(--s-3); overscroll-behavior: contain; }
}
.hf-g { padding: var(--s-4) 0; border-top: var(--bw) solid var(--hair); }
.hf-g:first-child { border-top: 0; padding-top: 0; }
.hf-g h3 { margin: 0 0 var(--s-2); font: 700 var(--fs-meta)/var(--lh-snug) var(--sans); color: var(--ink); }
.hf-g h4 { display: flex; align-items: center; gap: var(--s-2); margin: var(--s-3) 0 var(--s-1); font-size: var(--fs-micro); font-weight: 600; color: var(--ink-2); }
.hf-g h4::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--g); }
.hf .g-cancer { --g: var(--g-cancer); } .hf .g-blood { --g: var(--g-blood); } .hf .g-other { --g: var(--g-other); }
.hf-l { list-style: none; margin: 0; padding: 0; }
.hf-o { display: flex; align-items: center; gap: var(--s-2); width: 100%; min-height: 32px; padding: var(--s-1) 0; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.hf-o i { flex: none; width: 16px; height: 16px; border: var(--bw-2) solid var(--line); border-radius: 50%; }
.hf-o.box i { border-radius: var(--r-mark); }
.hf-o[aria-pressed="true"] i { border-color: var(--ink); background: var(--ink); box-shadow: inset 0 0 0 3px var(--page); }
.hf-o.box i { position: relative; }
.hf-o.box[aria-pressed="true"] i { box-shadow: none; }
.hf-o.box[aria-pressed="true"] i::after { content: ""; position: absolute; left: 4px; top: 0; width: 4px; height: 8px; border: solid var(--page); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.hf-o .l { flex: 1; min-width: 0; }
.hf-o .n { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.hf-o:hover .l { text-decoration: underline; }
.hf-o[aria-pressed="true"] .l { font-weight: 700; }
.hf-all { margin-top: var(--s-1); padding: 0; border: 0; background: none; color: var(--link); font: inherit; text-decoration: underline; cursor: pointer; }
.hf-note { margin: 0; padding-top: var(--s-4); border-top: var(--bw) solid var(--hair); font-size: var(--fs-micro); color: var(--ink-2); line-height: var(--lh-body); }

/* below 1100px the side column is a sheet */
@media (max-width: 1099px) {
  .hf-side { position: fixed; inset: 0; z-index: 70; display: none; flex-direction: column; background: var(--page); }
  .hf.on .hf-side.open { display: flex; }
  .hf-sh { display: flex; align-items: center; justify-content: space-between; padding: var(--s-3) var(--gut); border-bottom: var(--bw) solid var(--hair); }
  .hf-sh h2 { margin: 0; font: 700 var(--fs-list) var(--sans); }
  .hf-x { width: 44px; height: 44px; margin-right: calc(var(--s-3) * -1); border: 0; background: none; color: var(--ink); font-size: var(--fs-h4); cursor: pointer; }
  .hf-body { flex: 1; overflow-y: auto; padding: var(--s-4) var(--gut); overscroll-behavior: contain; }
  .hf-o { min-height: 44px; }
  .hf-sf { display: block; padding: var(--s-3) var(--gut); border-top: var(--bw) solid var(--hair); }
  .hf-apply { width: 100%; min-height: 48px; border: 0; border-radius: var(--r-m); background: var(--ink); color: var(--on-ink); font: 700 var(--fs-list) var(--sans); cursor: pointer; }
  .hf-lock, .hf-lock body { overflow: hidden; }
}

/* the bar above the results */
.hf-top { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-4); min-height: 44px; }
.hf-open { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; padding: 0 var(--s-4); border: var(--bw) solid var(--line); border-radius: var(--r-m); background: var(--page); color: var(--ink); font: 700 var(--fs-meta) var(--sans); cursor: pointer; }
.hf-open span { min-width: 20px; padding: 0 var(--s-1); border-radius: var(--r-pill); background: var(--ink); color: var(--on-ink); font-size: var(--fs-micro); text-align: center; }
@media (min-width: 1100px) { .hf-open { display: none; } }
.hf-n { margin: 0; font-size: var(--fs-meta); font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.hf-view { display: inline-flex; margin-left: auto; border: var(--bw) solid var(--line); border-radius: var(--r-m); overflow: hidden; }
.hf-view button { display: inline-flex; align-items: center; gap: var(--s-1); min-height: 40px; padding: 0 var(--s-3); border: 0; background: var(--page); color: var(--ink-2); font: 600 var(--fs-meta) var(--sans); cursor: pointer; }
.hf-view button + button { border-left: var(--bw) solid var(--line); }
.hf-view button[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }
.hf-tot { font-weight: 400; color: var(--ink-2); }
@media (max-width: 559px) { .hf-tot { display: none; } .hf-view span { display: none; } .hf-view button { min-width: 44px; justify-content: center; } }
.hf-view svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.hf-act { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-4); margin-top: var(--s-3); font-size: var(--fs-meta); }
.hf-act[hidden], .hf-jump[hidden], .hf-moreb[hidden], .hf-none[hidden] { display: none; }
.hf-chip { display: inline-flex; align-items: center; gap: var(--s-1); min-height: 32px; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.hf-chip span { color: var(--ink-2); font-size: var(--fs-list); }
.hf-chip:hover { text-decoration: underline; }
.hf-clear { padding: 0; border: 0; background: none; color: var(--link); font: inherit; text-decoration: underline; cursor: pointer; }
.hf-jump { margin: var(--s-2) 0 0; font-size: var(--fs-meta); }
.hf-jump a { color: var(--link); font-weight: 600; }

/* rows */
ul.hl { list-style: none; margin: var(--s-4) 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); column-gap: var(--s-8); border-top: var(--bw) solid var(--hair); }
.hl li { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "m sv" "dc sv"; column-gap: var(--s-3); align-items: start; padding: var(--s-4) 0; border-bottom: var(--bw) solid var(--hair); }
.hr-m { grid-area: m; min-width: 0; }
.hr-dc { grid-area: dc; min-width: 0; }
.hr-tc { display: none; }
.hl li > .hr-sv { grid-area: sv; }
.hr-nd { display: none; }
.hr-d a { color: inherit; }
.hr-d a:hover { color: var(--ink); }
.hl li[hidden] { display: none; }
.hr-map { display: none; }
.hr-n { display: block; color: var(--ink); font-size: var(--fs-list); font-weight: 650; line-height: var(--lh-snug); text-decoration: none; }
.hr-n:hover { text-decoration: underline; }
.hr-z { display: block; margin-top: 2px; font-size: var(--fs-micro); color: var(--ink-2); }
.hr-f { display: flex; flex-wrap: wrap; gap: 0 var(--s-3); margin: var(--s-1) 0 0; font-size: var(--fs-micro); color: var(--ink-2); }
.hr-f .rec { color: var(--rec); font-weight: 600; text-decoration: none; }
.hr-f .rec::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: var(--s-1); border-radius: 50%; background: var(--rec); vertical-align: 1px; }
.hr-f .rec:hover { text-decoration: underline; }
.hr-aka { color: var(--ink); }
.hr-d { margin: var(--s-1) 0 0; font-size: var(--fs-micro); color: var(--ink-2); line-height: var(--lh-snug); }
.hr-d b { color: var(--g); font-weight: 700; }
.hr-more { white-space: nowrap; }
.hr-sv { display: grid; place-items: center; width: 44px; height: 44px; margin: calc(var(--s-3) * -1) calc(var(--s-3) * -1) 0 0; border: 0; border-radius: var(--r-m); background: none; color: var(--ink-2); cursor: pointer; }
.hr-sv svg { width: 18px; height: 18px; fill: none; }
.hr-sv:hover { color: var(--ink); background: var(--soft); }
.hr-sv[aria-pressed="true"] { color: var(--ink); }
.hr-sv[aria-pressed="true"] svg { fill: currentColor; }

/* 2026-11-19: grouped by city (a heading row before each city), and from 1280px a table: hospital | diseases | open trials */
.hf-ord { display: inline-flex; margin-left: auto; border: var(--bw) solid var(--line); border-radius: var(--r-m); overflow: hidden; }
.hf-ord + .hf-view { margin-left: 0; }
.hf-ord button { min-height: 40px; padding: 0 var(--s-3); border: 0; background: var(--page); color: var(--ink-2); font: 600 var(--fs-meta) var(--sans); cursor: pointer; }
.hf-ord button + button { border-left: var(--bw) solid var(--line); }
.hf-ord button[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }
.hf:not(.on) .hf-ord { display: none; }
.hl-cj { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-4); margin: var(--s-3) 0 0; padding: 0; list-style: none; font-size: var(--fs-meta); }
.hl-cj[hidden] { display: none; }
.hl-cj a { color: var(--link); }
.hl-cj span { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.hl li.hl-city { display: flex; align-items: baseline; gap: var(--s-3); grid-column: 1 / -1; padding: var(--s-8) 0 var(--s-2); }
.hl li.hl-city:first-child { padding-top: var(--s-2); }
.hl li.hl-city[hidden] { display: none; }
.hl-city h3 { margin: 0; font: var(--fw-regular) var(--fs-h3)/var(--lh-head) var(--display); color: var(--ink); scroll-margin-top: calc(var(--hdr) + var(--s-9)); }
.hl-city small { font: var(--fs-meta) var(--sans); color: var(--ink-2); }
.hl-city a { margin-left: auto; font-size: var(--fs-meta); color: var(--link); }
.hl-cols { display: none; }
.hl-key { margin: var(--s-5) 0 0; font-size: var(--fs-micro); color: var(--ink-2); }
.hl.by-city .hr-f > span:first-child { display: none; }   /* the city is the heading above */
@media (min-width: 1280px) {
  .hf.on ul.hl:not(.grid) li:not(.hl-city), .hf.on .hl-cols { grid-template-columns: minmax(0, 1fr) minmax(0, .9fr) 96px 44px; grid-template-areas: "m dc tc sv"; column-gap: var(--s-5); }
  .hf.on .hl-cols:has(+ ul.hl:not(.grid)) { display: grid; position: sticky; top: var(--hdr); z-index: 2; margin-top: var(--s-4); padding: var(--s-2) 0; background: var(--page); font-size: var(--fs-micro); font-weight: 700; color: var(--ink-2); }
  .hf.on .hl-cols:has(+ ul.hl:not(.grid)) + ul.hl { margin-top: 0; }
  .hf.on .hl-cols span:nth-child(1) { grid-area: m; } .hf.on .hl-cols span:nth-child(2) { grid-area: dc; } .hf.on .hl-cols span:nth-child(3) { grid-area: tc; }
  .hf.on ul.hl:not(.grid) .hr-nd { display: block; color: var(--link); font-size: var(--fs-meta); }
  .hf.on ul.hl:not(.grid) .hr-tc { display: block; grid-area: tc; font-size: var(--fs-meta); color: var(--ink-2); }
  .hf.on ul.hl:not(.grid) .hr-tc.rec a { color: var(--rec); font-weight: 700; }
  .hf.on ul.hl:not(.grid) .hr-f .rec { display: none; }
}

/* grid: each hospital with a small map of where it is (its city, or its address when geocoded) */
ul.hl.grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s-6) var(--s-4); border-top: 0; }
@media (min-width: 760px) { ul.hl.grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s-7) var(--s-5); } }
.hl.grid li { position: relative; display: flex; flex-direction: column; align-items: stretch; gap: var(--s-3); padding: 0; border: 0; }
.hl.grid li[hidden] { display: none; }
.hl.grid .hr-map { position: relative; display: block; aspect-ratio: 1.42; border-radius: var(--r-m); background: var(--soft); overflow: hidden; }
.hl.grid.has-land .hr-map::before { content: ""; position: absolute; inset: 0; background: color-mix(in srgb, var(--line) 45%, var(--soft)); -webkit-mask: var(--hl-land) var(--mx, 0) var(--my, 0) / 260% auto no-repeat; mask: var(--hl-land) var(--mx, 0) var(--my, 0) / 260% auto no-repeat; }   /* 260%: build_ui.HL_ZOOM */
.hl.grid .hr-map i { position: absolute; left: var(--x); top: var(--y); width: 10px; height: 10px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 3px var(--page); transform: translate(-50%, -50%); }
.hl.grid .hr-sv { position: absolute; top: var(--s-2); right: var(--s-2); margin: 0; width: 40px; height: 40px; border-radius: 50%; background: var(--page); color: var(--ink); }
.hl.grid .hr-m { padding-right: 0; }
.hl.grid .hr-n { font-size: var(--fs-meta); }
.hl.grid li.hl-city { flex-direction: row; align-items: baseline; gap: var(--s-3); padding: var(--s-4) 0 0; }
.hl.grid li.hl-city:first-child { padding-top: 0; }

.hf-moreb { margin: var(--s-6) 0 0; text-align: center; }
.hf-moreb button { min-height: 44px; padding: 0 var(--s-5); border: 0; background: none; color: var(--link); font: 600 var(--fs-meta) var(--sans); text-decoration: underline; cursor: pointer; }
.hf-none { margin: var(--s-5) 0 0; max-width: var(--measure); color: var(--ink-2); }
.hf-none a { color: var(--link); }

/* the shortlist, shown like a shop's cart */
.hf-cart { position: fixed; z-index: 60; left: 50%; bottom: var(--s-5); transform: translateX(-50%); display: inline-flex; align-items: center; gap: var(--s-3); max-width: calc(100vw - 2 * var(--gut)); min-height: 48px; padding: 0 var(--s-5); border-radius: var(--r-pill); background: var(--ink); color: var(--on-ink); font-size: var(--fs-meta); text-decoration: none; white-space: nowrap; }
.hf-cart[hidden] { display: none; }
.hf-cart svg { width: 16px; height: 16px; fill: currentColor; flex: none; }
.hf-cart b { padding-left: var(--s-3); border-left: var(--bw) solid currentColor; }
.hf-lock .hf-cart { display: none; }
@media (prefers-reduced-motion: no-preference) { .hf-o i, .hr-sv svg { transition: background-color var(--t-fast) var(--ease), fill var(--t-fast) var(--ease); } }

/* Research sources (research/index.html), 2026-11-19: design_exploration_2026-11-18_data_pages/research.html.
   One closed line per disease or hospital (details/summary); the sources open on click. From 900px a table:
   name | hospitals or diseases named | number of sources. The switch and type filter reuse .hf-ord and .hf-o above. */
.rsx .rx-note { margin: var(--s-2) 0 0; font-size: var(--fs-meta); color: var(--ink-2); }
.rsx .rx-note a { color: var(--link); }
.rsx .rx-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-5); margin-top: var(--s-6); }
.rsx .rx-bar[hidden], .rsx .filterbox input[hidden] { display: none; }
.rsx .rx-bar .hf-ord { margin-left: 0; }
.rsx .rx-types { display: flex; flex-wrap: wrap; gap: 0 var(--s-5); margin: 0; padding: 0; list-style: none; font-size: var(--fs-meta); }
.rsx .rx-types .hf-o { width: auto; }
.rsx [data-rx-n] { margin-top: var(--s-5); }
.rsx .rx-v[hidden] { display: none; }
.rsx .rx-azb { display: flex; flex-wrap: wrap; margin: var(--s-3) 0 0; padding: 0; list-style: none; }
.rsx .rx-azb a, .rsx .rx-azb span { display: grid; place-items: center; min-width: 32px; min-height: 36px; font-size: var(--fs-meta); }
.rsx .rx-azb a { color: var(--link); font-weight: 600; }
.rsx .rx-azb span { color: var(--ink-2); opacity: .45; }
.rsx .rx-cols { display: none; }
.rsx .rx-l { margin-bottom: var(--s-10); }
.rsx h3.rx-az { margin: var(--s-8) 0 0; padding-bottom: var(--s-2); border-bottom: var(--bw) solid var(--hair); font: var(--fw-regular) var(--fs-h3)/1 var(--display); color: var(--ink); scroll-margin-top: calc(var(--hdr) + var(--s-4)); }
.rsx h3.rx-az:first-child { margin-top: var(--s-4); }
.rsx h3.rx-az[hidden], .rsx details.rx[hidden], .rsx .rx-b li[hidden] { display: none; }
.rsx details.rx { border-bottom: var(--bw) solid var(--hair); }
.rsx .rx summary { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; column-gap: var(--s-3); align-items: start; padding: var(--s-3) 0; cursor: pointer; list-style: none; }
.rsx .rx summary::-webkit-details-marker { display: none; }
.rsx .rx summary::before { content: ""; width: 8px; height: 8px; margin: var(--s-2) 0 0 var(--s-1); border-right: var(--bw-2) solid var(--ink-2); border-bottom: var(--bw-2) solid var(--ink-2); transform: rotate(-45deg); }
.rsx .rx[open] > summary::before { transform: rotate(45deg); margin-top: var(--s-1); }
.rsx .rx summary:hover .rx-n { text-decoration: underline; }
.rsx .rx summary:focus-visible { outline: var(--focus); outline-offset: var(--focus-off); }
.rsx .rx-m { min-width: 0; }
.rsx .rx-n { color: var(--ink); font-size: var(--fs-list); font-weight: 650; line-height: var(--lh-snug); }
.rsx .rx-o, .rsx .rx-mix { display: block; margin-top: 2px; font-size: var(--fs-micro); color: var(--ink-2); }
.rsx .rx-hs { display: none; }
.rsx .rx-c { text-align: right; }
.rsx .rx-c b { display: block; font: var(--fw-num) var(--fs-h4)/1 var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.rsx .rx-c small { display: block; margin-top: 2px; font-size: var(--fs-micro); color: var(--ink-2); white-space: nowrap; }
.rsx .rx-b { padding: 0 0 var(--s-5) 32px; }
.rsx .rx-b p.rx-lk { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-5); margin: 0 0 var(--s-3); font-size: var(--fs-meta); }
.rsx .rx-b ol { list-style: none; margin: 0; padding: 0; }
.rsx .rx-b li { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; padding: var(--s-3) 0; border-top: var(--bw) solid var(--hair); font-size: var(--fs-meta); line-height: var(--lh-snug); }
.rsx .rx-b li:first-child { border-top: 0; padding-top: 0; }
.rsx .rx-k { font-size: var(--fs-micro); font-weight: 700; color: var(--ink-2); }
.rsx .rx-s a, .rsx .rx-b p.rx-lk a { color: var(--link); }
.rsx .rx-h { color: var(--ink); }
.rsx .rx-h a { color: var(--ink); }
.rsx .rx-h small, .rsx .rx-d { font-size: var(--fs-micro); color: var(--ink-2); }
.rsx .rx-d { font-variant-numeric: tabular-nums; }
@media (min-width: 900px) {
  .rsx .rx summary, .rsx .rx-cols { grid-template-columns: 20px minmax(0, 1.1fr) minmax(0, 1fr) 72px; column-gap: var(--s-3); }
  .rsx .rx-cols { display: grid; position: sticky; top: var(--hdr); z-index: 2; margin-top: var(--s-4); padding: var(--s-2) 0; background: var(--page); font-size: var(--fs-micro); font-weight: 700; color: var(--ink-2); }
  .rsx .rx-cols span:last-child { text-align: right; }
  .rsx .rx-hs { display: block; font-size: var(--fs-meta); color: var(--ink); line-height: var(--lh-snug); }
  .rsx .rx-hs small { display: block; color: var(--ink-2); font-size: var(--fs-micro); }
  .rsx .rx-b li { grid-template-columns: 136px minmax(0, 1.2fr) minmax(0, 1fr) 88px; column-gap: var(--s-4); }
  .rsx .rx-d { text-align: right; }
}
@media (prefers-reduced-motion: no-preference) { .rsx .rx summary::before { transition: transform var(--t-fast) var(--ease); } }
