/* Biotech Pipeline Radar
   Type: Public Sans (the U.S. government's typeface; every number here is federal data).
   Data colors come from the validated dataviz palette; the pine green is for controls only. */

:root {
  color-scheme: light;
  --page: #edf1ef;          /* mist */
  --surface: #fbfcfb;
  --ink: #0f2a24;           /* pine ink */
  --ink-2: #44574f;
  --muted: #6f7f78;
  --line: #d4ddd8;
  --line-soft: #e4eae7;
  --brand: #0b6e4f;         /* pine: controls, links, selection */
  --brand-ink: #ffffff;
  --brand-wash: #dcede5;
  --empty: #e6ece9;         /* a heat cell with no trials */
  --bar: #2a78d6;           /* single-series bars: categorical slot 1 */
  --bar-2: #6250d6;
  /* sequential blue ramp (dataviz reference, light mode: dark = more) */
  --s1: #cde2fb; --s2: #9ec5f4; --s3: #6da7ec; --s4: #3987e5; --s5: #256abf; --s6: #184f95; --s7: #0d366b;
  /* categorical slots (validated on #fbfcfb) */
  --k1: #2a78d6; --k2: #eb6834; --k3: #1baf7a; --k4: #eda100; --k5: #e87ba4; --k6: #008300; --k7: #6250d6; --k8: #e34948;
  --k-other: #8f9a95;
  --crit: #a32d2d; --crit-bg: #fbe9e9;
  --good: #006300; --good-bg: #e3f1df;
  --shadow: 0 18px 50px rgba(15, 42, 36, .18);
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --page: #111816;
    --surface: #18201d;
    --ink: #e7efeb;
    --ink-2: #b4c3bc;
    --muted: #8a9a93;
    --line: #2c3833;
    --line-soft: #222c28;
    --brand: #5fc59c;
    --brand-ink: #08251b;
    --brand-wash: #19352b;
    --empty: #202a26;
    --bar: #3987e5;
    --bar-2: #9085e9;
    /* dark mode: the anchor flips, lighter = more */
    --s1: #133b6e; --s2: #184f95; --s3: #1c5cab; --s4: #2a78d6; --s5: #5598e7; --s6: #86b6ef; --s7: #cde2fb;
    --k1: #3987e5; --k2: #d95926; --k3: #199e70; --k4: #c98500; --k5: #d55181; --k6: #0ca30c; --k7: #9085e9; --k8: #e66767;
    --k-other: #7d8a84;
    --crit: #f1a3a3; --crit-bg: #3a1c1c;
    --good: #7fd17f; --good-bg: #173018;
    --shadow: 0 18px 60px rgba(0, 0, 0, .55);
  }
}

* { box-sizing: border-box; }
html { scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font-family: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; }
h2 { font-size: 1.5rem; line-height: 1.2; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 650; margin-bottom: 10px; }
p { margin: 0 0 10px; }
.note { color: var(--muted); font-size: .875rem; max-width: 72ch; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--brand); color: var(--brand-ink); padding: 8px 12px; border-radius: 6px; z-index: 50; }
.skip:focus { left: 12px; }

/* ------------------------------------------------------------ header */
.site-head {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 14px clamp(16px, 4vw, 48px);
  background: color-mix(in srgb, var(--page) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.wordmark { font-weight: 800; color: var(--ink); text-decoration: none; letter-spacing: -0.02em; font-size: 1.05rem; }
.wordmark::before {             /* three phase bands: the site's mark */
  content: ""; display: inline-block; width: 18px; height: 12px; margin-right: 9px; vertical-align: -1px;
  background:
    linear-gradient(var(--s2), var(--s2)) 0 0 / 4px 100% no-repeat,
    linear-gradient(var(--s4), var(--s4)) 7px 0 / 4px 100% no-repeat,
    linear-gradient(var(--s6), var(--s6)) 14px 0 / 4px 100% no-repeat;
  border-radius: 1px;
}
.site-head nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-head nav a { color: var(--ink-2); text-decoration: none; font-size: .925rem; font-weight: 500; }
.site-head nav a:hover { color: var(--ink); }

main { max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); }

/* ------------------------------------------------------------ hero */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(28px, 4vw, 44px); max-width: 980px; }
.hero h1 {
  font-size: clamp(2.1rem, 5.2vw, 4rem); line-height: 1.04; font-weight: 800; letter-spacing: -0.035em;
  text-wrap: balance;
}
.hero-sub { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--ink-2); max-width: 62ch; margin-top: 18px; line-height: 1.5; }
.hero-meta { color: var(--muted); font-size: .875rem; margin-top: 14px; }

/* ------------------------------------------------------------ explorer */
.explorer {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: clamp(18px, 3vw, 32px); margin-bottom: 72px;
}
.explorer-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px 32px; flex-wrap: wrap; margin-bottom: 20px; }
.explorer-head { max-width: 760px; }
.explorer-head p { color: var(--ink-2); margin-top: 8px; }

.controls { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-bottom: 12px; }
.ctl-label { font-size: .85rem; font-weight: 600; color: var(--ink-2); min-width: 4.5em; }
@media (max-width: 640px) { .ctl-label { min-width: 0; width: 100%; } }
.seg { display: inline-flex; background: var(--page); border: 1px solid var(--line); border-radius: 10px; padding: 3px; flex-wrap: wrap; }
.seg button {
  border: 0; background: transparent; color: var(--ink-2); font: inherit; font-size: .9rem; font-weight: 550;
  padding: 7px 12px; border-radius: 7px; cursor: pointer;
}
.seg button:hover { color: var(--ink); }
.seg button[aria-checked="true"] { background: var(--brand); color: var(--brand-ink); }
.select { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--ink-2); }
.nowrap { white-space: nowrap; }
.select select, .search input {
  font: inherit; font-size: .925rem; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px;
}
.search { position: relative; }
.search input { width: 260px; }
.search ul {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 15; width: 320px; max-height: 340px; overflow: auto;
  list-style: none; margin: 0; padding: 6px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: var(--shadow);
}
.search li { padding: 8px 10px; border-radius: 6px; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; font-size: .925rem; }
.search li[aria-selected="true"], .search li:hover { background: var(--brand-wash); }
.search li .n { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 760px) { .search { margin-left: 0; width: 100%; } .search input { width: 100%; } .search ul { width: 100%; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; font: inherit; font-size: .85rem; color: var(--ink-2);
  background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px 4px 9px; cursor: pointer;
}
.chip:hover { border-color: var(--ink-2); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.chip .n { color: var(--muted); font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] .n { color: inherit; opacity: .75; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; display: inline-block; }

/* the board: rank · disease · heat strip · metric */
.board { --cell: 46px; --cols: 6; }
.board-row {
  display: grid; grid-template-columns: 44px minmax(180px, 1.25fr) calc(var(--cell) * var(--cols) + 2px * var(--cols)) minmax(130px, 1fr);
  gap: 16px; align-items: center; padding: 7px 8px; border-radius: 8px;
}
.board-headrow { color: var(--muted); font-size: .8rem; font-weight: 600; align-items: end; padding-bottom: 8px; border-bottom: 1px solid var(--line); border-radius: 0; }
.heat-cap { display: block; margin-bottom: 4px; }
.heat-labels { display: grid; grid-template-columns: repeat(var(--cols), var(--cell)); gap: 2px; text-align: center; font-weight: 500; font-variant-numeric: tabular-nums; }
.c-metric { text-align: left; }
#board-body .board-row { cursor: pointer; border-bottom: 1px solid var(--line-soft); border-radius: 0; }
#board-body .board-row:hover, #board-body .board-row:focus-visible { background: var(--brand-wash); }
#board-body .board-row.is-open { background: var(--brand-wash); }
.rank { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .9rem; text-align: right; }
.dname { min-width: 0; }
.dname b { display: block; font-weight: 650; font-size: .975rem; line-height: 1.3; }
.dname small { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .8rem; margin-top: 2px; }
.heat { display: grid; grid-template-columns: repeat(var(--cols), var(--cell)); gap: 2px; }
.heat-labels span { white-space: nowrap; overflow: hidden; text-overflow: clip; }
.cell.extra { border-radius: 4px; }
.heat .cell.first-extra, .heat-labels .first-extra { margin-left: 6px; }
.cell {
  height: 28px; border-radius: 4px; display: grid; place-items: center;
  font-size: .78rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink);
}
.cell.z { background: var(--empty); color: transparent; }
.cell.l1 { background: var(--s1); } .cell.l2 { background: var(--s2); } .cell.l3 { background: var(--s3); }
.cell.l4 { background: var(--s4); color: #fff; } .cell.l5 { background: var(--s5); color: #fff; }
.cell.l6 { background: var(--s6); color: #fff; } .cell.l7 { background: var(--s7); color: #fff; }
@media (prefers-color-scheme: dark) {
  .cell.l1, .cell.l2, .cell.l3, .cell.l4 { color: #fff; }
  .cell.l5, .cell.l6, .cell.l7 { color: #0b1d33; }
}
.metric { position: relative; height: 22px; min-width: 0; }
.metric .fill { position: absolute; left: 0; top: 6px; height: 10px; background: var(--bar); border-radius: 0 4px 4px 0; min-width: 2px; }
.metric .v { position: absolute; top: 0; font-variant-numeric: tabular-nums; font-weight: 650; font-size: .925rem; white-space: nowrap; }
.board-divider { padding: 18px 8px 6px; font-size: .85rem; font-weight: 650; color: var(--ink-2); border-bottom: 1px solid var(--line); }
.board-divider span { font-weight: 400; color: var(--muted); }
.board-empty { padding: 40px 8px; color: var(--ink-2); }
.board.loading #board-body { opacity: .45; transition: opacity .15s; }

.heat-key { display: flex; align-items: center; gap: 10px; font-size: .8rem; color: var(--muted); margin-top: 14px; padding-left: 8px; }
.ramp { display: inline-grid; grid-template-columns: repeat(7, 18px); gap: 2px; }
.ramp i { height: 10px; border-radius: 2px; }

@media (max-width: 900px) {
  .board { --cell: 34px; }
  .board-row { grid-template-columns: 30px minmax(110px, 1fr) calc(var(--cell) * var(--cols) + 2px * var(--cols)); }
  .c-metric, .metric { display: none; }
  .cell { font-size: .7rem; }
}
@media (max-width: 560px) {
  /* the heat strip gets its own line under the disease name */
  .board { --cell: min(36px, calc((100vw - 112px) / var(--cols) - 2px)); }
  .board-row { grid-template-columns: 24px 1fr; gap: 4px 8px; padding: 9px 2px; }
  .board-row .c-heat, .board-row .heat { grid-column: 2; }
  .board-headrow .c-rank, .board-headrow .c-name { grid-row: 1; }
  .cell { height: 24px; font-size: .62rem; }
  .heat .cell.first-extra, .heat-labels .first-extra { margin-left: 0; }
  .heat-cap { white-space: nowrap; }
}

/* ------------------------------------------------------------ bands (sections below the explorer) */
.band {
  display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: clamp(20px, 4vw, 56px);
  padding: 40px 0 56px; border-top: 1px solid var(--line);
}
.band-label p { color: var(--ink-2); font-size: .95rem; margin-top: 10px; max-width: 42ch; }
.band-body { min-width: 0; }
@media (max-width: 860px) { .band { grid-template-columns: 1fr; gap: 16px; } }
.supply-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 36px 40px; }
.span-2 { grid-column: 1 / -1; }
@media (max-width: 700px) { .supply-grid { grid-template-columns: 1fr; } }

/* horizontal bar lists (HTML) */
.hbars { display: grid; gap: 4px; }
.hb { display: grid; grid-template-columns: minmax(120px, 210px) 1fr; gap: 12px; align-items: center; font-size: .9rem; padding: 3px 0; }
.hb .lab { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.hb .barline { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hb .b { height: 12px; background: var(--bar); border-radius: 0 4px 4px 0; min-width: 2px; flex: none; }
.hb .b.alt { background: var(--bar-2); }
.hb .val { font-variant-numeric: tabular-nums; font-weight: 600; font-size: .85rem; white-space: nowrap; }
.hb .val small { color: var(--muted); font-weight: 400; margin-left: 4px; }
button.hb { font: inherit; text-align: left; background: none; border: 0; color: inherit; cursor: pointer; border-radius: 6px; padding: 4px 6px; margin: 0 -6px; }
button.hb:hover { background: var(--brand-wash); }
button.hb[aria-pressed="true"] { background: var(--brand-wash); box-shadow: inset 3px 0 0 var(--brand); }

/* svg column chart */
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { fill: var(--muted); font-size: 11px; font-family: inherit; }
.chart .grid { stroke: var(--line-soft); }
.chart .base { stroke: var(--line); }
.chart .col { fill: var(--bar-2); }
.chart .col.faded { opacity: .45; }
.chart .col:hover, .chart .col:focus { fill: var(--ink-2); outline: none; }

/* tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; font-size: .78rem; font-weight: 600; color: var(--muted); padding: 6px 10px 8px 0; border-bottom: 1px solid var(--line); }
td { padding: 9px 10px 9px 0; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.empty { color: var(--muted); padding: 16px 0; }

/* feed */
.feed { list-style: none; margin: 0; padding: 0; columns: 2 340px; column-gap: 40px; }
.feed li { break-inside: avoid; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: .925rem; }
.feed .kind { display: inline-block; font-size: .75rem; font-weight: 650; padding: 1px 7px; border-radius: 4px; margin-right: 6px; background: var(--brand-wash); color: var(--brand); }
.feed .kind.bad { background: var(--crit-bg); color: var(--crit); }
.feed .kind.up { background: var(--good-bg); color: var(--good); }
.feed .meta { color: var(--muted); font-size: .8rem; margin-top: 2px; }

/* story track */
.track { list-style: none; padding: 0; margin: 0 0 22px; display: grid; grid-template-columns: repeat(7, 1fr); position: relative; }
.track::before { content: ""; position: absolute; left: 7%; right: 7%; top: 17px; height: 2px; background: var(--line); }
.track li { position: relative; text-align: center; }
.track button {
  font: inherit; background: none; border: 0; cursor: pointer; color: var(--ink-2); font-size: .8rem; line-height: 1.3;
  display: grid; justify-items: center; gap: 8px; width: 100%; padding: 0 4px;
}
.track .num {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700;
  background: var(--surface); border: 2px solid var(--line); color: var(--ink-2); position: relative; z-index: 1;
}
.track li.done .num { border-color: var(--s4); color: var(--ink); }
.track li.current .num { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.track li.current button { color: var(--ink); font-weight: 650; }
@media (max-width: 700px) {
  .track { grid-template-columns: repeat(7, 1fr); }
  .track button span.t { display: none; }
}
.story-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 22px 24px; display: grid; grid-template-columns: 96px 1fr; gap: 22px; }
.story-panel svg { width: 96px; height: 96px; }
.story-panel svg .ink { stroke: var(--brand); fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.story-panel svg .fill { fill: var(--brand-wash); }
.story-panel svg .hot { fill: var(--s4); }
.story-panel h3 { font-size: 1.2rem; margin-bottom: 6px; }
.story-panel p { max-width: 68ch; color: var(--ink-2); }
.analogy { margin-top: 10px; padding-left: 12px; border-left: 3px solid var(--s3); color: var(--ink); font-size: .95rem; }
@media (max-width: 560px) { .story-panel { grid-template-columns: 1fr; } }
.story-nav { display: flex; justify-content: space-between; margin-top: 14px; }
.btn { font: inherit; font-size: .9rem; font-weight: 600; background: var(--brand); color: var(--brand-ink); border: 1px solid var(--brand); border-radius: 8px; padding: 8px 14px; cursor: pointer; }
.btn.quiet { background: transparent; color: var(--brand); }
.btn:disabled { opacity: .4; cursor: default; }

.about p { max-width: 72ch; color: var(--ink-2); }
.about strong { color: var(--ink); }
.site-foot { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: center; padding: 28px 16px 48px; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); }

/* ------------------------------------------------------------ drawer */
.scrim { position: fixed; inset: 0; background: rgba(9, 22, 19, .38); z-index: 30; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(620px, 100vw); z-index: 31;
  background: var(--surface); box-shadow: var(--shadow); overflow-y: auto; overscroll-behavior: contain;
  transform: translateX(0); transition: transform .22s ease-out;
}
.drawer.entering { transform: translateX(24px); }
@media (prefers-reduced-motion: reduce) { .drawer { transition: none; } }
.drawer-inner { padding: 24px 28px 48px; }
.d-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.d-cat { display: flex; align-items: center; gap: 7px; color: var(--ink-2); font-size: .85rem; }
.d-name { font-size: 1.75rem; line-height: 1.12; font-weight: 800; letter-spacing: -0.02em; margin: 6px 0 4px; }
.d-mesh { color: var(--muted); font-size: .8rem; }
.close { font: inherit; font-size: .875rem; font-weight: 600; background: var(--page); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; cursor: pointer; }
.d-filter { margin-top: 12px; font-size: .85rem; background: var(--brand-wash); border-radius: 8px; padding: 8px 12px; }
.d-filter button { font: inherit; background: none; border: 0; color: var(--brand); text-decoration: underline; cursor: pointer; padding: 0; }
.d-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px 16px; margin: 20px 0 6px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.d-stats div { min-width: 0; }
.d-stats b { display: block; font-size: 1.3rem; font-weight: 750; }
.d-stats span { display: block; font-size: .75rem; color: var(--muted); line-height: 1.3; }
@media (max-width: 520px) { .d-stats { grid-template-columns: repeat(3, 1fr); } .drawer-inner { padding: 18px 18px 40px; } }
.d-sec { margin-top: 26px; }
.d-sec h3 { margin-bottom: 8px; }
.d-sec .hb { grid-template-columns: minmax(110px, 190px) 1fr; }
.trial { padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: .9rem; }
.trial a { font-weight: 600; }
.trial .meta { color: var(--muted); font-size: .8rem; margin-top: 2px; }
.badge { font-size: .72rem; font-weight: 650; padding: 1px 6px; border-radius: 4px; background: var(--page); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.badge.warn { background: var(--crit-bg); color: var(--crit); border-color: transparent; }
.related { display: flex; flex-wrap: wrap; gap: 8px; }
.related button { font: inherit; font-size: .85rem; background: var(--page); color: var(--ink); border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; cursor: pointer; }
.related button:hover { border-color: var(--brand); color: var(--brand); }
.related .n { color: var(--muted); margin-left: 4px; }

/* tooltip */
.tip {
  position: fixed; z-index: 40; pointer-events: none; max-width: 280px;
  background: var(--ink); color: var(--surface); border-radius: 8px; padding: 8px 10px; font-size: .8rem; line-height: 1.4;
  box-shadow: var(--shadow);
}
.tip b { display: block; font-size: .95rem; }

@media (max-width: 640px) {
  .site-head { position: static; }
  .site-head nav { gap: 6px 14px; }
  .site-head nav a { font-size: .85rem; }
  .hb, .d-sec .hb { grid-template-columns: minmax(96px, 42%) 1fr; }
  .seg button { padding: 6px 9px; font-size: .85rem; }
  .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
  .chip { flex: none; }
}
@media (max-width: 560px) { .heat-labels { font-size: .62rem; letter-spacing: -0.02em; } }

@media (min-width: 901px) { .board.wide { --cell: 40px; } }
/* long labels shrink with an ellipsis instead of widening the page */
.supply-grid > div, .hb .lab, .hb .barline { min-width: 0; }
@media (max-width: 640px) { .hb, .d-sec .hb { grid-template-columns: minmax(0, 42%) minmax(0, 1fr); } }

/* ------------------------------------------------------------ trials: lists and trial pages */
.drawer.wide { width: min(780px, 100vw); }
.back { font: inherit; font-size: .875rem; font-weight: 600; background: none; color: var(--brand); border: 0; padding: 6px 0; cursor: pointer; }
.back:hover { text-decoration: underline; }
.badge.ok { background: var(--good-bg); color: var(--good); border-color: transparent; }
.badge.res { background: var(--brand-wash); color: var(--brand); border-color: transparent; }
.linkish { font: inherit; background: none; border: 0; color: var(--brand); text-decoration: underline; cursor: pointer; padding: 0; }
.d-sec h4 { font-size: .92rem; font-weight: 650; margin: 18px 0 6px; }
.d-sec h3:focus { outline: none; }
.drawer details { margin: 10px 0; }
.drawer summary { cursor: pointer; color: var(--brand); font-weight: 600; font-size: .9rem; }
.drawer details[open] > summary { margin-bottom: 8px; }

/* finder buttons in the disease panel */
.find-btns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.find-btn { font: inherit; text-align: left; background: var(--page); border: 1px solid var(--line); border-radius: 10px;
            padding: 10px 12px; cursor: pointer; color: var(--ink); }
.find-btn b { display: block; font-size: .9rem; }
.find-btn span { display: block; font-size: .78rem; color: var(--muted); margin-top: 2px; }
.find-btn:hover { border-color: var(--brand); }
.find-btn:hover b { color: var(--brand); }
@media (max-width: 560px) { .find-btns { grid-template-columns: 1fr; } }
.trial a[data-nct] { cursor: pointer; }

/* list */
.t-filters { display: grid; gap: 10px; margin: 16px 0 6px; }
.t-selects { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.t-selects label, .t-find { font-size: .85rem; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.t-find { flex-direction: column; align-items: stretch; gap: 4px; }
.t-selects select, .t-find input { font: inherit; font-weight: 400; font-size: .9rem; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; min-width: 0; max-width: 100%; }
.t-find input { font-size: 16px; }
.t-count { font-weight: 600; margin: 14px 0 4px; }
.t-list { list-style: none; padding: 0; margin: 0; }
.t-row { display: grid; gap: 3px; width: 100%; text-align: left; font: inherit; color: inherit; background: none; border: 0;
         border-bottom: 1px solid var(--line-soft); padding: 12px 8px; margin: 0 -8px; cursor: pointer; border-radius: 8px; width: calc(100% + 16px); }
.t-row:hover { background: var(--brand-wash); }
.t-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.t-title { font-weight: 650; line-height: 1.35; }
.t-drugs { font-size: .85rem; color: var(--ink-2); }
.more { font: inherit; font-weight: 600; margin-top: 14px; background: var(--page); color: var(--brand); border: 1px solid var(--line);
        border-radius: 8px; padding: 8px 14px; cursor: pointer; }

/* trial page */
.t-head { margin-top: 10px; }
.t-head .d-name { font-size: 1.45rem; margin-top: 8px; text-wrap: balance; }
.t-sponsor { color: var(--ink-2); font-size: .9rem; margin-top: 6px; }
.t-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.t-facts b { font-size: 1.05rem; }
@media (max-width: 560px) { .t-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.t-jump { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; position: sticky; top: 0; background: var(--surface);
          padding: 8px 0; z-index: 2; border-bottom: 1px solid var(--line-soft); }
.t-jump a { font-size: .82rem; font-weight: 600; text-decoration: none; padding: 4px 10px; border-radius: 999px; background: var(--page);
            border: 1px solid var(--line); color: var(--ink-2); }
.t-jump a:hover { color: var(--brand); border-color: var(--brand); }
.drawer.wide .d-sec { scroll-margin-top: 56px; }
.t-phase { background: var(--page); border-radius: 8px; padding: 10px 12px; font-size: .92rem; }
.t-stopped { background: var(--crit-bg); color: var(--ink); border-radius: 8px; padding: 10px 12px; font-size: .92rem; }
.med { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.med-name { margin-bottom: 6px; }
.med .label { border-left: 3px solid var(--brand); padding-left: 12px; margin: 8px 0; font-size: .92rem; }
.med .label p { margin-bottom: 6px; }
.med-desc { font-size: .88rem; color: var(--ink-2); margin: 0; }
.t-arms, .t-out, .contacts, .pubs { list-style: none; padding: 0; margin: 0; }
.t-arms li, .t-out li, .pubs li { padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: .92rem; }
.t-arms .badge { margin-left: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px; }
.chips span { font-size: .85rem; background: var(--page); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; }
.t-open { margin-bottom: 6px; }
.t-open.ok b { color: var(--good); }
.crit { margin: 0; padding-left: 20px; font-size: .9rem; }
.crit li { margin: 4px 0; }
.crit li.lv1 { margin-left: 18px; list-style-type: circle; }
.crit li.lv2, .crit li.lv3 { margin-left: 36px; list-style-type: square; }
.crit li.extra { display: none; }
.crit.all li.extra { display: list-item; }
.crit li.more-li { list-style: none; margin-top: 6px; }
.contacts li { padding: 6px 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .92rem; }
.place { border-bottom: 1px solid var(--line-soft); margin: 0 !important; padding: 8px 0; }
.place summary { display: flex; justify-content: space-between; gap: 12px; color: var(--ink); }
.place summary .meta { font-weight: 400; }
.place ul { list-style: none; padding: 0 0 0 4px; margin: 6px 0 4px; }
.place li { padding: 6px 0; font-size: .88rem; border-top: 1px dashed var(--line-soft); }
.place li.closed { opacity: .6; }
.plain { padding-left: 20px; margin: 6px 0 10px; }
.plain li { margin: 5px 0; }
.caveat { background: var(--brand-wash); border-radius: 8px; padding: 10px 12px; font-size: .9rem; }
.outcome { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 12px 0; }
.outcome h4 { margin: 6px 0 2px; }
.o-type { margin: 0; }
.scroll { overflow-x: auto; }
.rtable { border-collapse: collapse; width: 100%; font-size: .86rem; margin: 8px 0 4px; }
.rtable th, .rtable td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.rtable thead th { font-weight: 650; color: var(--ink-2); }
.rtable td { font-variant-numeric: tabular-nums; }
.rtable .meta { display: block; color: var(--muted); font-size: .76rem; }
.t-source { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 12px; }
#search-results li.alt span:first-child { color: var(--brand); font-weight: 600; }
.drawer .meta { color: var(--muted); font-size: .8rem; }
