/* Clinical Trial Atlas. An atlas of where trials run, so the page borrows from atlases and nothing else:
   - every status is a map-legend pin: shape, colour and word together, never colour alone
     (solid dot recruiting, ring not yet recruiting, dotted ring by invitation, half dot active, square closed);
   - lists of places and conditions are a gazetteer index: name, leader dots, count;
   - lists of studies keep a reference margin on the left (pin and NCT number), the facts table uses the same margin;
   - the header and footer carry a map neatline (a thin rule set off by a gap).
   One family, Archivo, across its width axis: wide for the name, narrow for counts and references.
   Cool chart paper, slate ink, petrol links. No script, no inline style, no data: image (the CSP forbids them). */
@font-face { font-family: "Archivo"; src: url("/static/fonts/archivo-latin-var.woff2") format("woff2");
  font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
:root {
  --paper: #f5f7f6; --sheet: #ffffff; --ink: #13272d; --muted: #55686d; --line: #d3dbd9; --soft: #e4eae8;
  --link: #0a5a6e; --band: #13272d; --band-text: #c9dcdd; --pin: #82d9a8;
  --rec: #11703a; --rec-bg: #e1f1e6; --soon: #2a50a3; --soon-bg: #e5ecf9; --act: #8f5200; --act-bg: #f9eedb;
  --closed: #637074; --closed-bg: #eaeeed; --warn: #8a2c12; --warn-bg: #fbece6;
  --margin: 11.5rem; --rail: 21rem;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.6 "Archivo", system-ui, sans-serif;
  overflow-wrap: anywhere; font-variant-numeric: lining-nums; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--soon); outline-offset: 2px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
p { max-width: 46em; }

/* ---- header: the atlas cover band, then the neatline */
header.top { background: var(--band); color: #fff; box-shadow: 0 4px 0 var(--paper), 0 5px 0 var(--band); }
header.top .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 28px;
  min-height: 64px; padding-top: 10px; padding-bottom: 10px; }
.mark { display: inline-flex; align-items: center; gap: 12px; font-weight: 800; font-stretch: 118%; font-size: 19px;
  letter-spacing: .005em; color: #fff; text-decoration: none; }
.mark:hover { color: #fff; }
.mark .pin { width: 13px; height: 13px; border-radius: 50%; background: var(--pin); box-shadow: 0 0 0 4px rgba(130, 217, 168, .22); }
nav.main { display: flex; flex-wrap: wrap; gap: 2px 20px; font-size: 15px; }
nav.main a { color: var(--band-text); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
nav.main a:hover { color: #fff; border-bottom-color: rgba(255, 255, 255, .45); }
nav.main a[aria-current="page"] { color: #fff; border-bottom-color: var(--pin); }
header.top :focus-visible { outline-color: #fff; }

/* ---- type */
main { padding: 30px 0 64px; }
.crumbs { font-size: 14px; font-stretch: 94%; color: var(--muted); margin: 0 0 10px; }
.crumbs a { color: var(--muted); }
h1 { font-weight: 760; font-stretch: 92%; font-size: clamp(27px, 1.1vw + 20px, 36px); line-height: 1.14;
  letter-spacing: -.014em; margin: 0 0 14px; max-width: 28em; text-wrap: pretty; }
h2 { font-weight: 720; font-stretch: 96%; font-size: 22px; line-height: 1.25; letter-spacing: -.005em;
  margin: 44px 0 14px; text-wrap: balance; }
h3 { font-size: 17px; font-weight: 700; margin: 22px 0 6px; }
.lede { font-size: 18px; }
.answer { font-size: 19px; line-height: 1.55; max-width: 42em; margin: 0 0 8px; }
.checked { color: var(--muted); font-size: 14px; margin: 0 0 26px; }
.note, .dim { color: var(--muted); font-size: 14.5px; }
strong, b { font-weight: 700; }

/* ---- the legend pins */
.pill { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 650; line-height: 1.3;
  padding: 3px 10px 3px 8px; border-radius: 99px; white-space: nowrap; background: var(--closed-bg); color: var(--closed); }
.pill::before { content: ""; flex: none; width: 10px; height: 10px; border: 2px solid currentColor; border-radius: 1px; }
.pill.rec { background: var(--rec-bg); color: var(--rec); }
.pill.rec::before { border-radius: 50%; background: currentColor; }
.pill.soon, .pill.inv { background: var(--soon-bg); color: var(--soon); }
.pill.soon::before { border-radius: 50%; }
.pill.inv::before { border-radius: 50%; border-style: dotted; }
.pill.act { background: var(--act-bg); color: var(--act); }
.pill.act::before { border-radius: 50%; background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.pill.big { font-size: 15px; padding: 4px 12px 4px 10px; }
.tag { display: inline-block; font-size: 12.5px; font-weight: 650; padding: 1px 8px; border: 1px solid #e0c79c;
  border-radius: 3px; color: var(--act); background: var(--sheet); white-space: nowrap; }

/* ---- two columns: main and rail */
.cols { display: grid; grid-template-columns: minmax(0, 1fr); }
.rail-top > :first-child, .rail-end > :first-child { margin-top: 0; }
.rail-top { margin-bottom: 8px; }
@media (min-width: 1000px) {
  .cols { grid-template-columns: minmax(0, 1fr) var(--rail); grid-template-rows: auto 1fr; column-gap: 56px; }
  .col-main { grid-column: 1; grid-row: 1 / span 2; }
  .rail-top { grid-column: 2; grid-row: 1; margin-bottom: 0; }
  .rail-end { grid-column: 2; grid-row: 2; }
  .rail-top + .col-main + .rail-end { padding-top: 8px; }
  .col-main > :first-child { margin-top: 0; }
  .rail-top h2, .rail-end h2 { font-size: 18px; margin: 30px 0 10px; }
  .rail-end .grid, .rail-top .grid { grid-template-columns: minmax(0, 1fr); }
}
.toc { display: none; }
@media (min-width: 1000px) {
  .toc { display: block; position: sticky; top: 24px; margin-top: 28px; font-size: 15px; }
  .toc p { font-weight: 700; margin: 0 0 8px; }
  .toc ul { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
  .toc a { display: block; padding: 4px 0 4px 14px; margin-left: -2px; border-left: 2px solid transparent;
    text-decoration: none; color: var(--muted); }
  .toc a:hover { color: var(--ink); border-left-color: var(--ink); }
}

/* ---- boxes a reader acts on */
.box { padding: 16px 18px; margin: 0 0 16px; background: var(--sheet); border: 1px solid var(--line);
  border-top: 4px solid var(--rec); border-radius: 4px; max-width: 46em; }
.box.closed { border-top-color: var(--closed); }
.box.paid { border-top-color: var(--act); }
.box p { margin: 0 0 8px; }
.box p:last-child { margin-bottom: 0; }
.join { display: block; text-align: center; margin-top: 14px; font-weight: 700; background: var(--ink); color: #fff;
  padding: 11px 16px; border-radius: 4px; text-decoration: none; }
.join:hover { background: var(--link); color: #fff; }
.advice { font-size: 14.5px; color: var(--warn); background: var(--warn-bg); padding: 10px 14px; border-left: 3px solid var(--warn);
  margin: 20px 0; max-width: 46em; }

/* ---- the facts table: the reference margin, then the value */
.facts { display: grid; grid-template-columns: var(--margin) minmax(0, 1fr); margin: 0 0 20px; background: var(--sheet);
  border: 1px solid var(--line); border-radius: 4px; }
.facts dt, .facts dd { margin: 0; padding: 10px 16px; border-top: 1px solid var(--soft); }
.facts dt { color: var(--muted); font-size: 14px; font-weight: 600; padding-top: 12px; }
.facts dt:first-of-type, .facts dt:first-of-type + dd { border-top: 0; }
.facts ul { margin: 0; padding-left: 18px; }

/* ---- the register's own text, set off by a rule */
.text { border-left: 3px solid var(--line); padding: 2px 0 2px 22px; margin: 0 0 18px; max-width: 46em; }
.text p { margin: 0 0 12px; }
.text ul, .text ol { margin: 0 0 12px; padding-left: 22px; }
.text li { margin: 4px 0; }
.faq h3 { margin: 22px 0 4px; }
.faq p { margin: 0 0 8px; }

/* ---- lists of studies: pin and NCT number in the margin, the study on the right */
.studies { list-style: none; padding: 0; margin: 0 0 8px; border-top: 1px solid var(--line); max-width: 62rem; }
.studies li { display: grid; grid-template-columns: var(--margin) minmax(0, 1fr); gap: 6px 20px; padding: 16px 0 17px;
  border-bottom: 1px solid var(--line); }
.studies .st { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding-top: 1px; }
.studies .id { font-size: 13.5px; font-stretch: 88%; letter-spacing: .02em; color: var(--muted); font-variant-numeric: tabular-nums; }
.studies .bd { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.studies .t { font-weight: 650; font-size: 17.5px; line-height: 1.35; text-decoration: none; margin-bottom: 2px; }
.studies .t:hover { text-decoration: underline; }
.studies .who, .studies .where { font-size: 15px; }
.studies .meta { font-size: 14px; color: var(--muted); }

/* ---- gazetteer indexes: name, leader dots, count */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 0 40px; padding: 0;
  list-style: none; margin: 0 0 8px; }
.grid li { display: flex; align-items: baseline; align-items: last baseline; gap: 6px; padding: 5px 0; }
.grid li a { text-decoration: none; min-width: 0; }
.grid li a:hover { text-decoration: underline; }
.grid li::after { content: ""; order: 1; flex: 1 1 10px; min-width: 10px; border-bottom: 2px dotted #b9c4c1;
  transform: translateY(-5px); }
.grid .n { order: 2; color: var(--muted); font-size: 14px; font-stretch: 88%; font-variant-numeric: tabular-nums;
  white-space: nowrap; }
.letters { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 18px; padding: 0; list-style: none; }
.letters a { display: inline-block; min-width: 34px; text-align: center; padding: 5px 6px; border: 1px solid var(--line);
  border-radius: 3px; background: var(--sheet); text-decoration: none; font-weight: 650; }
.letters a:hover { border-color: var(--ink); }
ul.more { display: flex; flex-wrap: wrap; gap: 6px 22px; list-style: none; padding: 0; margin: 12px 0 18px; font-size: 15.5px; }
.quotes { max-width: 46em; padding-left: 20px; margin: 0 0 14px; }
.quotes li { margin: 6px 0; }

/* ---- sites of one study, by country */
details.country { max-width: 62rem; margin: 0 0 4px; border-bottom: 1px solid var(--line); }
details.country summary { cursor: pointer; font-weight: 700; padding: 10px 0; }
details.country summary:hover { color: var(--link); }
details.country .note { margin: 6px 0 14px; }
.sites { list-style: none; padding: 0; margin: 0; }
.sites li { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) 12rem; gap: 2px 18px; align-items: baseline;
  padding: 8px 0; border-top: 1px solid var(--soft); }
.sites .c { font-size: 15px; }
.sites .pill { justify-self: start; }

/* ---- search */
form.search { display: flex; gap: 8px; max-width: 40rem; margin: 18px 0 20px; }
form.search input { flex: 1; min-width: 0; font: inherit; padding: 12px 14px; border: 2px solid var(--ink); background: #fff;
  border-radius: 4px; }
form.search button { font: 700 16px "Archivo", sans-serif; padding: 12px 20px; border: 2px solid var(--ink); background: var(--ink);
  color: #fff; cursor: pointer; border-radius: 4px; }
form.search button:hover { background: var(--link); border-color: var(--link); }
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin: 20px 0; font-weight: 650; }
.pager a { padding: 6px 12px; border: 1px solid var(--line); border-radius: 3px; background: var(--sheet); text-decoration: none; }
.pager a:hover { border-color: var(--ink); }
.pager span { color: var(--muted); font-weight: 500; }

/* ---- home: the title and search, beside a map key of the register */
.hero { display: grid; gap: 28px 64px; margin: 6px 0 12px; padding-bottom: 34px; border-bottom: 1px solid var(--line); }
.hero h1 { font-size: clamp(32px, 2.6vw + 16px, 52px); font-stretch: 86%; line-height: 1.06; letter-spacing: -.02em; max-width: 13em; }
.hero form.search { margin-bottom: 0; }
.key { align-self: end; background: var(--sheet); border: 1px solid var(--line); outline: 1px solid var(--line);
  outline-offset: 3px; padding: 20px 22px 16px; margin: 4px; }
.key .bars { display: block; width: 100%; height: 18px; }
.key .b-all { fill: #dfe5e3; }
.key .b-open { fill: #e8c68e; }
.key .b-rec { fill: var(--rec); }
.legend { list-style: none; padding: 0; margin: 14px 0 10px; display: grid; gap: 6px; }
.legend li { display: flex; align-items: baseline; gap: 10px; color: var(--muted); font-size: 15px; }
.legend b { color: var(--ink); font-size: 20px; font-weight: 760; font-stretch: 88%; font-variant-numeric: tabular-nums;
  min-width: 4.3em; }
.legend li::before { content: ""; flex: none; width: 11px; height: 11px; transform: translateY(-1px); border: 2px solid transparent; }
.legend .k-rec::before { background: var(--rec); border-color: var(--rec); border-radius: 50%; }
.legend .k-open::before { background: #e8c68e; border-color: #c79a4f; border-radius: 50%; }
.legend .k-all::before { background: #dfe5e3; border-color: #b9c4c1; border-radius: 1px; }
.legend .k-new { border-top: 1px solid var(--soft); padding-top: 8px; margin-top: 2px; }
.key .note { margin: 0; font-size: 13.5px; }
@media (min-width: 1000px) {
  .hero { grid-template-columns: minmax(0, 1fr) 22rem; }
}

/* ---- footer: neatline, then the notice and the index */
footer { background: var(--sheet); box-shadow: 0 -4px 0 var(--paper), 0 -5px 0 var(--line); font-size: 14.5px; color: var(--muted);
  padding: 28px 0 32px; margin-top: 5px; }
footer .wrap { display: grid; gap: 8px 56px; }
footer p { margin: 0 0 10px; }
footer a { color: var(--muted); }
footer a:hover { color: var(--ink); }
nav.foot ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, max-content); gap: 4px 28px; }
.build { font-size: 13px; font-stretch: 90%; margin: 6px 0 0; }
@media (min-width: 1000px) {
  footer .wrap { grid-template-columns: minmax(0, 1fr) auto; }
  .build { grid-column: 1 / -1; }
}

/* ---- phones */
@media (max-width: 640px) {
  body { font-size: 16.5px; }
  .wrap { padding: 0 16px; }
  main { padding-top: 20px; }
  h1 { font-size: 24px; }
  .hero h1 { font-size: 31px; }
  header.top .wrap { min-height: 0; }
  nav.main { gap: 2px 14px; font-size: 14.5px; }
  .facts { grid-template-columns: 1fr; }
  .facts dt { padding-bottom: 0; }
  .facts dd { border-top: 0; padding-top: 2px; }
  .studies li { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .studies .st { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
  .sites li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .text { padding-left: 14px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .answer { font-size: 18px; }
}

/* ---- study alerts: the "Get new recruiting trials by email" boxes and the /watch pages */
form.watch { display: grid; grid-template-columns: minmax(0, 1fr); gap: 9px; max-width: 46em; margin: 0 0 16px; padding: 16px 18px; background: var(--sheet);
  border: 1px solid var(--line); border-top: 4px solid var(--link); border-radius: 4px; }
form.watch .wh { margin: 0; }
form.watch .where { font-size: 15px; }
form.watch .row, form.watchbox .row { display: flex; flex-wrap: wrap; gap: 8px; }
form.watch input[type=email], form.watchbox input { flex: 1 1 200px; min-width: 0; font: inherit; padding: 9px 11px;
  border: 2px solid var(--ink); background: #fff; border-radius: 4px; }
form.watch select { font: inherit; padding: 5px 8px; border: 1px solid var(--ink); border-radius: 4px; background: #fff;
  width: 100%; max-width: 100%; margin-top: 4px; }
form.watch .where label { display: block; }
form.watch button, form.watchbox button, form.act button { font: 700 15px "Archivo", sans-serif; padding: 9px 16px;
  border: 2px solid var(--link); background: var(--link); color: #fff; cursor: pointer; border-radius: 4px; }
form.watch button:hover, form.watchbox button:hover, form.act button:hover { background: var(--ink); border-color: var(--ink); }
form.watch button.plain, form.act button.plain { background: var(--sheet); color: var(--ink); border: 1px solid var(--line);
  padding: 7px 10px; font-weight: 600; font-size: 14px; justify-self: start; text-align: left; }
form.watch button.plain:hover, form.act button.plain:hover { border-color: var(--ink); background: var(--sheet); }
form.act { display: inline; margin: 0; }
form.act button.danger { background: var(--warn); border-color: var(--warn); }
form.watch .fine, form.watchbox .fine { font-size: 13px; line-height: 1.5; color: var(--muted); }
form.watchbox { display: grid; gap: 8px; max-width: 700px; margin: 8px 0 18px; }
form.watchbox label { font-weight: 650; }
.plans { width: 100%; max-width: 760px; border-collapse: collapse; background: var(--sheet); border: 1px solid var(--line); }
.plans th, .plans td { text-align: left; padding: 10px 14px; border-top: 1px solid var(--soft); vertical-align: top; }
.plans thead th { border-top: 0; font-size: 17px; }
.notice { padding: 12px 16px; margin: 0 0 16px; border-left: 4px solid var(--link); background: var(--sheet); max-width: 46em; }
.notice.warn { border-left-color: var(--warn); background: var(--warn-bg); }
.watchlist { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); max-width: 46em; }
.watchlist li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.watchlist .top { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; }
.watchlist .gone { color: var(--warn); font-size: 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 18px; align-items: center; }
.actions p { margin: 0; flex: 1 1 100%; }
