:root {
  /* Warm-neutral canvas, near-black ink, hairline borders - modern & minimal */
  --bg: #f7f7f5;
  --surface: #ffffff;
  --surface-2: #fbfbfa;
  --ink: #111114;
  --ink-soft: #33333a;
  --muted: #6b6b74;
  --faint: #a2a2aa;
  --border: #ececEA;
  --border-strong: #dededa;
  --accent: #4f46e5;
  --accent-soft: #eef0fe;
  --accent-ink: #ffffff;
  --btn: #141417;
  --btn-hover: #2b2b31;
  --green: #157a5b;
  --green-bg: #e9f4ef;
  --amber: #97620f;
  --amber-bg: #f7efe0;
  --red: #b42a1f;
  --red-bg: #fbeceb;
  --violet: #6d28d9;
  --violet-bg: #f2ecfd;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 18px;
  --shadow: 0 1px 2px rgba(17,17,20,.04);
  --shadow-lift: 0 1px 2px rgba(17,17,20,.05), 0 14px 34px rgba(17,17,20,.08);
  --mono: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
[hidden] { display: none !important; }
body {
  font-family: var(--sans);
  font-feature-settings: "cv11", "ss01";
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: var(--ink); }
::selection { background: #dfe0ff; }

/* ---------- Sidebar layout ---------- */
.layout { display: flex; min-height: 100vh; align-items: stretch; }
.sidebar { width: 240px; flex-shrink: 0; background: var(--surface);
  border-right: 1px solid var(--border); display: flex; flex-direction: column;
  padding: 20px 16px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700;
  font-size: 16px; color: var(--ink); letter-spacing: -.02em; padding: 4px 8px 0; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 24px; height: 24px; border-radius: 7px; flex-shrink: 0;
  display: block; }
.side-nav { display: flex; flex-direction: column; gap: 2px; margin-top: 26px; }
.side-nav::before { content: "Menu"; font-size: 11px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--faint);
  padding: 0 10px 8px; }
.side-link { padding: 9px 11px; border-radius: 9px; color: var(--muted);
  font-weight: 500; font-size: 14px; letter-spacing: -.01em;
  transition: background .12s, color .12s; }
.side-link:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.side-link.active { background: var(--ink); color: #fff; font-weight: 600; }
.side-foot { margin-top: auto; border-top: 1px solid var(--border); padding-top: 14px; }
.side-foot .who { font-size: 13px; color: var(--ink); font-weight: 600;
  padding: 4px 11px 10px; letter-spacing: -.01em; }
.side-foot .who span { display: block; color: var(--faint); font-weight: 400;
  font-size: 12px; margin-top: 2px; }
.content { flex: 1; min-width: 0; padding: 40px 48px 64px; max-width: 1120px; }

/* ---------- Generic layout ---------- */
.wrap { max-width: 1120px; margin: 0 auto; padding: 24px 28px 48px; }
.narrow { max-width: 560px; }
.page-head { margin-bottom: 28px; }
.page-head h1 { font-size: 30px; margin: 0 0 6px; letter-spacing: -.03em;
  font-weight: 700; }
.page-head p { color: var(--muted); margin: 0; font-size: 15px; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px;
}
.card + .card { margin-top: 16px; }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 40px 20px; }
.auth .card { width: 100%; max-width: 420px; padding: 34px 32px;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lift); }
.auth h1 { margin: 0 0 6px; font-size: 24px; letter-spacing: -.03em; font-weight: 700; }
.auth .sub { color: var(--muted); margin: 0 0 26px; font-size: 14px; }
.auth .foot { text-align: center; margin-top: 22px; color: var(--muted); font-size: 14px; }
.auth-hero { margin-bottom: 26px; }
.hero-mark { width: 46px; height: 46px; border-radius: 13px; display: block; }

/* ---------- Forms ---------- */
label { display: block; font-size: 13px; font-weight: 600; color: var(--ink);
  margin-bottom: 7px; letter-spacing: -.01em; }
.hint { font-weight: 400; color: var(--faint); }
input[type=text], input[type=email], input[type=password], input[type=number],
textarea, select {
  width: 100%; padding: 11px 13px; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); font-size: 15px; font-family: inherit; color: var(--ink);
  background: #fff; transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3.5px var(--accent-soft);
}
textarea { resize: vertical; min-height: 150px; line-height: 1.6; }
.field { margin-bottom: 18px; }
.row { display: flex; gap: 14px; }
.row > .field { flex: 1; }
.check { display: flex; align-items: center; gap: 8px; }
.check input { width: auto; }
.check label { margin: 0; font-weight: 500; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600;
  letter-spacing: -.01em; border: 1px solid transparent; cursor: pointer;
  font-family: inherit; transition: background .15s, border-color .15s, transform .04s, box-shadow .15s; }
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--btn); color: #fff; }
.btn-primary:hover { background: var(--btn-hover); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--faint); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 13px; font-size: 13px; }

/* ---------- Flash ---------- */
.flash { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 18px;
  font-size: 14px; border: 1px solid; }
.flash.error { background: var(--red-bg); border-color: #f2cec9; color: var(--red); }
.flash.ok, .flash.success { background: var(--green-bg); border-color: #c4e6d6; color: var(--green); }
.toast-stack { position: fixed; right: 18px; top: 74px; z-index: 1200;
  width: min(420px, calc(100vw - 22px)); display: flex; flex-direction: column; gap: 10px; }
.flash-toast { margin: 0; display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; box-shadow: 0 8px 26px rgba(20, 24, 40, .14); border-radius: 12px;
  background: var(--surface); color: var(--ink-soft); border-color: var(--border); }
.flash-toast.info { background: #edf2ff; border-color: #cdd8ff; color: #3c4a8a; }
.toast-close { border: 0; background: transparent; color: inherit; opacity: .55;
  font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; margin-top: -1px; }
.toast-close:hover { opacity: .9; }
.flash-toast.toast-hide { opacity: 0; transform: translateY(-6px); transition: opacity .22s, transform .22s; }
@media (max-width: 820px) {
  .toast-stack { left: 12px; right: 12px; width: auto; top: 68px; }
}

/* ---------- Search tool (primary, full-width) ---------- */
.tool-head { display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.tool-head h1 { font-size: 30px; margin: 0; letter-spacing: -.03em; font-weight: 700; }

.import-bar { display: flex; align-items: stretch; gap: 16px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 13px 16px; margin-bottom: 14px; }
.import-seg { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.import-divider { display: flex; align-items: center; color: var(--faint);
  font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.import-divider span { position: relative; padding: 0 2px; }
.ehr-input { width: 210px; padding: 8px 11px !important; font-size: 13px !important;
  font-family: var(--mono) !important; }
.file-btn.as-btn { border: 0; }
.link-btn { background: none; border: 0; color: var(--accent); font-size: 13px;
  font-weight: 600; cursor: pointer; padding: 0; font-family: inherit; }
.link-btn:hover { text-decoration: underline; }
.import-label { font-weight: 600; font-size: 14px; color: var(--ink); letter-spacing: -.01em; }
.file-btn { position: relative; overflow: hidden; display: inline-flex;
  align-items: center; gap: 8px; background: var(--ink); color: #fff;
  font-size: 13px; font-weight: 600; padding: 9px 15px; border-radius: 9px;
  cursor: pointer; margin: 0; transition: background .15s; }
.file-btn:hover { background: var(--btn-hover); }
.file-btn input[type=file] { position: absolute; inset: 0; opacity: 0;
  cursor: pointer; width: 100%; }
.import-hint { font-size: 13px; color: var(--muted); }

.tool-form { background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.tool-form label { font-size: 13px; }
.loc-strip { display: flex; gap: 14px; align-items: flex-end; margin-bottom: 18px; }
.loc-strip .field { margin: 0; }
.loc-strip .loc-field { flex: 1; }
.loc-field label { display: flex; align-items: center; gap: 6px; }
.loc-field label .ico { width: 15px; height: 15px; color: var(--accent); }
.loc-strip #radius { width: 130px; }
.loc-strip #country { width: 140px; }
.req { color: var(--accent); font-weight: 600; font-size: 11px; text-transform: uppercase;
  letter-spacing: .05em; background: var(--accent-soft); padding: 1px 7px;
  border-radius: 999px; }
.loc-use { margin-left: auto; display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; }
.loc-use .ico { width: 13px; height: 13px; }
.loc-use:disabled { color: var(--faint); cursor: default; text-decoration: none; }
.loc-field label { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.loc-confirm { margin-top: 8px; font-size: 13px; padding: 8px 12px; border-radius: 9px;
  line-height: 1.45; }
.loc-confirm.ok { background: var(--green-bg); color: var(--green); border: 1px solid #c4e6d6; }
.loc-confirm.ok b { font-weight: 700; }
.loc-confirm.err { background: var(--amber-bg); color: var(--amber); border: 1px solid #ecd9b6; }
.ehr-conn { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px;
  color: var(--green); font-weight: 600; font-size: 11px; }
.ehr-conn .ico { width: 12px; height: 12px; }
.ehr-disc { font-size: 12px; color: var(--faint); }
.ehr-disc:hover { color: var(--amber); }
.drop-wrap { position: relative; }
.note-big { min-height: 40vh; font-size: 15px; line-height: 1.65;
  border-radius: var(--radius-sm); padding: 16px 18px; width: 100%;
  background: var(--surface-2); }
.note-big:focus { background: #fff; }
.drop-hint { position: absolute; inset: 0; display: none; align-items: center;
  justify-content: center; border-radius: var(--radius-sm); font-size: 16px; font-weight: 600;
  color: var(--accent); background: rgba(79,70,229,.06);
  border: 2px dashed var(--accent); pointer-events: none; }
.drop-wrap.dragging .drop-hint { display: flex; }
.toolbar { display: flex; gap: 14px; align-items: flex-end; margin-top: 16px;
  flex-wrap: wrap; }
.toolbar .field { margin: 0; width: auto; }
.toolbar .field input, .toolbar .field select { width: 190px; }
.toolbar #condition { width: 190px; }
.toolbar #location { width: 220px; }
.toolbar #country { width: 120px; }
.toolbar #radius { width: 120px; }
.tb-check { display: flex; align-items: center; gap: 8px; font-size: 14px;
  font-weight: 500; white-space: nowrap; padding-bottom: 11px; margin: 0; }
.tb-check input { width: auto; }
.tool-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.tool-foot .tb-check { padding: 0; font-size: 13px; font-weight: 500; }
.tool-foot .tag { color: var(--faint); font-size: 13px; }
.tool-foot kbd, .tool-foot b { font-weight: 600; }
.spacer { flex: 1; }
.toolbar .btn { padding: 12px 28px; font-size: 15px; }

.stat-strip { display: flex; gap: 20px; align-items: center; flex-wrap: wrap;
  font-size: 13px; color: var(--muted); }
.stat-strip .s b { color: var(--ink); font-size: 15px; font-weight: 700;
  margin-right: 4px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.stat-strip .s.accent b { color: var(--green); }
.stat-strip .strip-link { font-weight: 600; font-size: 13px; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  margin-bottom: 26px; }
.stat { background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.stat .n { font-size: 30px; font-weight: 700; letter-spacing: -.03em;
  font-variant-numeric: tabular-nums; }
.stat .l { font-size: 12px; color: var(--muted); margin-top: 4px;
  text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.stat.accent .n { color: var(--green); }

/* ---------- Trial result cards (expandable) ---------- */
.result { background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 12px;
  overflow: hidden; transition: box-shadow .15s, border-color .15s; }
.result:hover { border-color: var(--border-strong); }
.result[open] { box-shadow: var(--shadow-lift); border-color: var(--border-strong); }
.rhead { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between;
  padding: 18px 20px; cursor: pointer; list-style: none; }
.rhead::-webkit-details-marker { display: none; }
.rhead:hover { background: var(--surface-2); }
.rh-title { font-size: 16px; font-weight: 650; letter-spacing: -.015em;
  margin-bottom: 6px; line-height: 1.35; }
.rh-meta { color: var(--muted); font-size: 13px; display: flex; flex-wrap: wrap;
  gap: 6px 8px; align-items: center; }
.rh-why { color: var(--ink-soft); font-size: 14px; margin-top: 9px; line-height: 1.5; }
.rh-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
  flex-shrink: 0; }
.chev { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap;
  display: inline-flex; align-items: center; gap: 4px; }
.result[open] .chev { color: var(--faint); }

.type-badge.obs { padding: 2px 9px; border-radius: 999px; background: var(--amber-bg);
  color: var(--amber); font-size: 12px; font-weight: 600; }
.status-tag { padding: 2px 9px; border-radius: 999px; background: var(--green-bg);
  color: var(--green); font-size: 12px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 5px; }
.status-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); }
.dist { display: inline-block; padding: 2px 9px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--ink-soft); font-size: 12px; font-weight: 600; }

.rbody { padding: 6px 20px 20px; border-top: 1px solid var(--border); }
.rsec { margin-top: 18px; }
.rsec h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--faint); margin: 0 0 9px; font-weight: 600; }
.crit { margin: 8px 0 0; font-size: 14px; line-height: 1.55; }
.crit .lab { font-weight: 700; margin-right: 4px; }
.crit.met .lab { color: var(--green); }
.crit.fail .lab { color: var(--red); }
.crit.ask .lab { color: var(--amber); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px 20px; margin-top: 18px; padding: 16px 18px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius-sm); }
.facts dt { font-size: 11px; color: var(--faint); text-transform: uppercase;
  letter-spacing: .05em; font-weight: 600; }
.facts dd { margin: 3px 0 0; font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
.rsum { font-size: 14px; color: var(--muted); line-height: 1.65; margin: 0;
  max-height: 170px; overflow: auto; }
.crit-box { font-size: 13px; color: var(--muted); line-height: 1.65;
  white-space: pre-wrap; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 15px 16px; max-height: 260px; overflow: auto; }
.ico-h4 .count { margin-left: auto; font-size: 11px; font-weight: 600;
  color: var(--muted); text-transform: none; letter-spacing: 0;
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 2px 8px; border-radius: 999px; }
.sites { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden; }
.sites li { display: flex; justify-content: space-between; gap: 14px;
  align-items: center; padding: 12px 14px; border-top: 1px solid var(--border); }
.sites li:first-child { border-top: 0; }
.sites li:hover { background: var(--surface-2); }
.s-main { min-width: 0; }
.s-main b { font-size: 14px; letter-spacing: -.01em; }
.s-loc { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.s-contact { display: block; font-size: 12px; color: var(--faint); margin-top: 3px; }
.s-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
  flex-shrink: 0; text-align: right; }
.site-status { font-size: 11px; font-weight: 600; color: var(--green);
  display: inline-flex; align-items: center; gap: 5px; }
.site-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); }
.other-sites { font-size: 13px; color: var(--muted); margin: 12px 2px 0;
  line-height: 1.5; }
.refer-panel { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  flex-wrap: wrap; }
.ctlink { font-size: 13px; font-weight: 600; }
.refer-form { display: flex; gap: 10px; align-items: center; }

/* ---------- Pills ---------- */
.pill { display: inline-flex; align-items: center; padding: 4px 11px;
  border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap;
  letter-spacing: -.01em; }
.pill .score { opacity: .65; margin-left: 5px; font-weight: 500;
  font-variant-numeric: tabular-nums; }
.pill.likely_eligible { background: var(--green-bg); color: var(--green); }
.pill.possible { background: var(--amber-bg); color: var(--amber); }
.pill.unlikely, .pill.error { background: #f0f0ee; color: var(--muted); }

.status { display: inline-flex; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; text-transform: capitalize; letter-spacing: -.01em; }
.status.referred { background: var(--accent-soft); color: var(--accent); }
.status.received { background: #e6f0fe; color: #1f6feb; }
.status.contacted { background: #ecebfd; color: var(--violet); }
.status.screened { background: var(--violet-bg); color: var(--violet); }
.status.enrolled { background: var(--green-bg); color: var(--green); }
.status.screen_failed, .status.declined, .status.withdrawn {
  background: #f0f0ee; color: var(--muted); }

/* ---------- Table ---------- */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11px; text-transform: uppercase;
  letter-spacing: .06em; color: var(--faint); font-weight: 600;
  padding: 0 14px 12px; }
td { padding: 15px 14px; border-top: 1px solid var(--border); font-size: 14px;
  vertical-align: middle; letter-spacing: -.01em; }
tr:hover td { background: var(--surface-2); }
td .tag { color: var(--muted); font-size: 13px; }
td.num { font-variant-numeric: tabular-nums; }

/* ---------- Misc ---------- */
.empty { text-align: center; padding: 60px 24px; color: var(--muted); }
.empty h3 { color: var(--ink); margin: 0 0 6px; font-size: 18px; letter-spacing: -.02em; }
.section-title { display: flex; align-items: baseline; justify-content: space-between;
  margin: 2px 0 16px; }
.section-title h2 { font-size: 15px; margin: 0; letter-spacing: -.01em; }
.mono { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0; }
.banner { background: var(--amber-bg); border: 1px solid #ecd9b6; color: var(--amber);
  padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 20px; }
.summary-box { background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 15px 16px; font-size: 14px; white-space: pre-wrap;
  color: var(--muted); max-height: 220px; overflow: auto; line-height: 1.65; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 10px 16px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 18px 22px;
  border-left: 2px solid var(--border); }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 3px;
  width: 12px; height: 12px; border-radius: 50%; background: var(--ink);
  border: 2px solid #fff; box-shadow: 0 0 0 1px var(--border); }
.timeline .t { font-size: 12px; color: var(--faint); }
.grid-2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px;
  align-items: start; }

.loc-note { font-size: 13px; color: var(--muted); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px;
  margin-bottom: 18px; }
.loc-note.warn { background: var(--amber-bg); border-color: #ecd9b6; color: var(--amber); }

/* ---------- Loading overlay + progress ---------- */
.loading-overlay { position: fixed; inset: 0; z-index: 100; display: none;
  align-items: center; justify-content: center;
  background: rgba(17,17,20,.42); backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px); }
.loading-overlay.show { display: flex; animation: ov-fade .2s ease; }
@keyframes ov-fade { from { opacity: 0; } to { opacity: 1; } }
.loading-card { background: #fff; border-radius: var(--radius-lg); padding: 32px;
  width: min(440px, 90vw); text-align: center;
  box-shadow: 0 24px 70px rgba(17,17,20,.28); animation: card-in .25s ease; }
@keyframes card-in { from { transform: translateY(10px) scale(.98); opacity: 0; }
  to { transform: none; opacity: 1; } }
.loading-spark { width: 34px; height: 34px; margin: 0 auto 18px; border-radius: 10px;
  background: var(--ink); animation: spark 1.3s ease-in-out infinite; }
@keyframes spark { 0%,100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(.8); opacity: .6; } }
.loading-title { font-weight: 700; font-size: 18px; letter-spacing: -.02em; }
.loading-sub { color: var(--muted); font-size: 14px; margin-top: 6px; min-height: 20px; }
.loading-foot { color: var(--faint); font-size: 12px; margin-top: 4px; }
.progress { height: 6px; background: #ededea; border-radius: 999px;
  overflow: hidden; margin: 20px 0 12px; }
.progress-bar { position: relative; height: 100%; width: 0%; border-radius: 999px;
  background: var(--ink); transition: width .3s ease; }
.progress-bar::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.5), transparent);
  transform: translateX(-100%); animation: gloss 1.3s ease-in-out infinite; }
@keyframes gloss { 100% { transform: translateX(100%); } }

/* ---------- Icons ---------- */
.ico { width: 16px; height: 16px; stroke: currentColor; fill: none;
  stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0; display: inline-block; vertical-align: -3px; }
.side-link { display: flex; align-items: center; gap: 11px; }
.side-link .ico { width: 17px; height: 17px; opacity: .9; }
.btn .ico { transition: transform .16s ease; }
.ctlink { display: inline-flex; align-items: center; gap: 5px; }
.ctlink .ico { width: 14px; height: 14px; }
.chev-ico { width: 14px; height: 14px; transition: transform .24s cubic-bezier(.16,.84,.44,1); }
.result[open] .chev .chev-ico { transform: rotate(180deg); }
.ico-h4 { display: flex; align-items: center; gap: 7px; }
.ico-h4 .ico { width: 14px; height: 14px; color: var(--faint); }
.stat .l { display: flex; align-items: center; gap: 6px; }
.stat .n { margin-top: 8px; }
.stat-ico { width: 14px; height: 14px; color: var(--faint); }
.stat.accent .stat-ico { color: var(--green); }

/* ---------- Micro-animations ---------- */
.btn-primary:hover { box-shadow: 0 4px 16px rgba(17,17,20,.16); }
.btn-block:hover .ico { transform: translateX(3px); }
.file-btn:hover .ico { transform: translateY(-1px); }
.rhead:hover .chev { color: var(--ink); }

.result { animation: fade-up .42s cubic-bezier(.16,.84,.44,1) both; }
.result:nth-child(1) { animation-delay: .02s; }
.result:nth-child(2) { animation-delay: .06s; }
.result:nth-child(3) { animation-delay: .10s; }
.result:nth-child(4) { animation-delay: .14s; }
.result:nth-child(5) { animation-delay: .18s; }
.result:nth-child(6) { animation-delay: .22s; }
.result:nth-child(n+7) { animation-delay: .26s; }
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; } }

.stat { animation: fade-up .4s cubic-bezier(.16,.84,.44,1) both; }
.stat:nth-child(2) { animation-delay: .05s; }
.stat:nth-child(3) { animation-delay: .10s; }
.stat:nth-child(4) { animation-delay: .15s; }

.status-tag::before { animation: pulse-dot 2s ease-in-out infinite; }
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(21,122,91,.4); }
  70% { box-shadow: 0 0 0 5px rgba(21,122,91,0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important;
    animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

.stat { transition: border-color .15s, box-shadow .15s, transform .15s; }
.stat:hover { border-color: var(--border-strong); box-shadow: var(--shadow-lift);
  transform: translateY(-2px); }
tr { transition: background .12s; }

/* ---------- Referral loop: consent, sharing, coordinator page ---------- */
.consent-box { margin-top: 18px; background: var(--accent-soft);
  border: 1px solid #d9dcfb; border-radius: var(--radius-sm); padding: 14px 16px; }
.consent-box .check { align-items: flex-start; gap: 10px; }
.consent-box .check input { margin-top: 3px; }
.consent-box .check span { font-size: 13.5px; line-height: 1.5; color: var(--ink-soft); }
.copy-row { display: flex; gap: 8px; align-items: center; }
.copy-row input { font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
.copy-row .btn { flex-shrink: 0; }
.actor-tag { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em; color: var(--faint);
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 1px 7px; border-radius: 999px; vertical-align: 1px; }
.coord-wrap { max-width: 640px; margin: 0 auto; padding: 32px 20px 56px; }
.coord-brand { display: flex; align-items: center; gap: 9px; font-weight: 700;
  font-size: 16px; letter-spacing: -.02em; margin-bottom: 22px; }
.coord-tag { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--muted);
  background: var(--surface); border: 1px solid var(--border);
  padding: 3px 10px; border-radius: 999px; }
.coord-foot { text-align: center; color: var(--faint); font-size: 12px; margin-top: 24px; }
.or-line { display: flex; align-items: center; text-align: center; color: var(--faint);
  font-size: 12px; margin: 14px 0; gap: 10px; }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ---------- Referrals list toolbar ---------- */
.list-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px;
  flex-wrap: wrap; }
.search-field { position: relative; display: flex; align-items: center; }
.search-field .ico { position: absolute; left: 12px; color: var(--faint); }
.search-field input { padding-left: 36px; width: 300px; }
.list-toolbar select { width: 180px; }
.mini-tag { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--green); background: var(--green-bg);
  padding: 1px 6px; border-radius: 999px; vertical-align: 1px; }
.sent-dot { display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%; background: var(--green-bg); color: var(--green); }
.sent-dot .ico { width: 13px; height: 13px; }

@media (max-width: 820px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .row { flex-direction: column; gap: 0; }
  .toolbar .field { width: 100%; }
  .toolbar .field input, .toolbar .field select { width: 100%; }
  .toolbar .btn { width: 100%; }
  .loc-strip { flex-direction: column; align-items: stretch; }
  .loc-strip .field { width: 100%; }
  .loc-strip #radius, .loc-strip #country { width: 100%; }
  .import-bar { flex-direction: column; align-items: stretch; }
  .import-divider { justify-content: center; }
  .ehr-input { width: 100%; }
  .spacer { display: none; }
  .content { padding: 24px 20px 48px; }
  .page-head h1, .tool-head h1 { font-size: 24px; }
  .layout { flex-direction: column; }
  .sidebar { width: auto; height: auto; position: static; flex-direction: row;
    align-items: center; gap: 6px; padding: 12px 16px; }
  .brand { padding: 0; margin-right: 6px; }
  .side-nav { flex-direction: row; margin-top: 0; }
  .side-nav::before { display: none; }
  .side-foot { margin: 0 0 0 auto; border: 0; padding: 0; display: flex;
    align-items: center; gap: 4px; }
  .side-foot .who { display: none; }
}

/* ------------------------------------------------------------------ */
/* Public consumer site (patient-facing)                              */
/* ------------------------------------------------------------------ */
body.pub { background: var(--surface); }
.btn-lg { padding: 13px 22px; font-size: 15px; border-radius: 12px; }

.pub-nav { display: flex; align-items: center; justify-content: space-between;
  max-width: 1180px; margin: 0 auto; padding: 20px 32px; }
.pub-nav-links { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
.pub-nav-links a { color: var(--muted); text-decoration: none; font-weight: 500;
  font-size: 14px; }
.pub-nav-links a:hover { color: var(--ink); }
.pub-nav-links .pub-clin { border: 1px solid var(--border-strong); padding: 7px 14px;
  border-radius: 999px; color: var(--ink); }
.pub-nav-tools { max-width: 1180px; margin: 0 auto; padding: 0 32px 12px; }
.pub-flash-wrap { max-width: 720px; margin: 0 auto; padding: 0 24px; }

/* Demo POV switcher */
.pov-tools { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pov-switch { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap;
  padding: 3px; border-radius: 999px; background: #f0f1f5; border: 1px solid #e1e3ea; }
.pov-pill { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none;
  padding: 6px 11px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 12.5px; transition: .15s; }
.pov-pill .ico { width: 14px; height: 14px; }
.pov-pill:hover { color: var(--ink); background: #fff; border-color: #e6e8ef; }
.pov-pill.on { background: #fff; color: #111218; border-color: #dfe2eb; box-shadow: 0 1px 2px rgba(17,17,20,.07); }
.demo-toggle-form { margin: 0; }
.demo-toggle { border: 1px solid #e1e3ea; background: #fff; border-radius: 999px; padding: 4px 9px 4px 5px;
  font-size: 12px; font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.demo-toggle:hover { color: var(--ink); border-color: #d4d8e3; }
.demo-toggle-track { width: 30px; height: 18px; border-radius: 999px; background: #d2d6e1;
  position: relative; transition: .15s; }
.demo-toggle-knob { width: 14px; height: 14px; border-radius: 50%; background: #fff;
  position: absolute; top: 2px; left: 2px; transition: .15s; box-shadow: 0 1px 2px rgba(17,17,20,.22); }
.demo-toggle.on { color: #111218; border-color: #ced4e3; }
.demo-toggle.on .demo-toggle-track { background: #2f63ff; }
.demo-toggle.on .demo-toggle-knob { left: 14px; }
.side-pov { margin-top: 12px; padding: 0 8px; }
.side-pov .pov-tools { width: 100%; flex-direction: column; align-items: stretch; gap: 8px; }
.side-pov .pov-switch { width: 100%; justify-content: space-between; border-radius: 12px; background: #f5f6fa; }
.side-pov .pov-pill { padding: 6px 8px; font-size: 12px; justify-content: center; flex: 1; }
.side-pov .demo-toggle { width: 100%; justify-content: center; }
.pub-main { min-height: 60vh; }

/* Hero */
.hero { max-width: 1080px; margin: 0 auto; padding: 48px 24px 24px; text-align: center; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 13px;
  font-weight: 600; color: var(--accent); background: var(--accent-soft);
  padding: 6px 14px; border-radius: 999px; }
.hero-eyebrow .ico { width: 14px; height: 14px; }
.hero h1 { font-size: 52px; line-height: 1.05; letter-spacing: -.04em; margin: 20px 0 0;
  font-weight: 800; }
.hero-sub { font-size: 18px; color: var(--muted); max-width: 620px; margin: 18px auto 0;
  line-height: 1.55; }
.hero-search { display: flex; gap: 10px; max-width: 760px; margin: 32px auto 0;
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 16px; padding: 8px; box-shadow: var(--shadow-lift); }
.hero-field { display: flex; align-items: center; gap: 8px; flex: 1; padding: 0 12px; }
.hero-field .ico { width: 18px; height: 18px; color: var(--faint); flex-shrink: 0; }
.hero-field input { border: 0; outline: 0; width: 100%; font-size: 15px;
  font-family: var(--sans); background: transparent; padding: 12px 0; color: var(--ink); }
.hero-field { position: relative; }
.hero-chip-input { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; width: 100%;
  min-height: 46px; padding: 8px 0; }
.hero-chip-list { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hero-term-chip { border: 1px solid var(--border-strong); background: #fff; color: var(--ink-soft);
  border-radius: 999px; padding: 4px 10px; font-size: 12.5px; display: inline-flex;
  align-items: center; gap: 7px; cursor: pointer; }
.hero-term-chip .x { font-size: 13px; color: var(--faint); line-height: 1; }
.hero-chip-input input { min-width: 170px; flex: 1; padding: 8px 0; }
.hero-suggest { position: absolute; left: 32px; right: 10px; top: calc(100% + 2px);
  background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lift);
  max-height: 230px; overflow: auto; z-index: 15; padding: 4px; }
.hero-suggest-item { width: 100%; text-align: left; border: 0; background: transparent;
  padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 13px; color: var(--ink-soft); }
.hero-suggest-item:hover { background: var(--surface-2); color: var(--ink); }
.hero-search .btn { flex-shrink: 0; }
.hero-more { max-width: 760px; margin: 12px auto 0; text-align: left; }
.hero-more > summary { list-style: none; cursor: pointer; font-size: 13px; color: var(--faint);
  display: inline-flex; align-items: center; gap: 6px; justify-content: center; width: 100%; }
.hero-more > summary::-webkit-details-marker { display: none; }
.hero-more > summary .ico { width: 14px; height: 14px; }
.hero-more[open] > summary { margin-bottom: 12px; }
.hero-more-grid { display: flex; gap: 12px; }
.hero-more-grid label, .hero-more-about { display: flex; flex-direction: column; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--ink-soft); flex: 1; }
.hero-more-about { margin-top: 12px; }
.hero-more label span { font-weight: 400; color: var(--faint); }
.hero-more input, .hero-more select, .hero-more textarea { border: 1px solid var(--border-strong);
  border-radius: 10px; padding: 10px 12px; font-size: 14px; font-family: var(--sans); outline: 0;
  background: var(--surface); color: var(--ink); }
.hero-more input:focus, .hero-more select:focus, .hero-more textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.hero-more textarea { resize: vertical; }
.hero-loc-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 12px; max-width: 760px; margin: 12px auto 0; }
.hero-loc-actions .loc-use { margin-left: 0; font-size: 14px; }
.hero-loc-actions .loc-confirm { margin-top: 0; }
.chips-block { max-width: 780px; margin: 32px auto 0; display: flex;
  flex-direction: column; gap: 14px; }
.chip-row { display: grid; grid-template-columns: 84px 1fr; align-items: start;
  gap: 14px; }
.chip-label { font-size: 11px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--faint); display: inline-flex;
  align-items: center; gap: 5px; padding-top: 8px; justify-content: flex-end; }
.chip-label .ico { width: 13px; height: 13px; }
.chip-cluster { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 15px;
  border-radius: 999px; border: 1px solid var(--border-strong); color: var(--ink-soft);
  text-decoration: none; font-size: 13.5px; font-weight: 500; background: var(--surface);
  cursor: pointer; transition: border-color .15s, color .15s, background .15s, transform .1s; }
.chip:hover { border-color: var(--accent); color: var(--accent);
  background: var(--accent-soft); transform: translateY(-1px); }
.chip-trend::before { content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); opacity: .75; }
.cond-item-link { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px;
  font-size: 13px; color: var(--accent); text-decoration: none; }
.cond-item-link .ico { width: 13px; height: 13px; }
.cond-note { color: var(--muted); font-size: 14px; margin-top: 8px; }

/* Steps */
.steps-wrap { max-width: 1000px; margin: 72px auto 8px; padding: 0 24px; }
.steps-title { text-align: center; font-size: 26px; letter-spacing: -.03em;
  margin: 0 0 28px; font-weight: 800; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step { text-align: left; padding: 24px 22px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: box-shadow .15s, transform .12s; }
.step:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.step-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft);
  color: var(--accent); display: flex; align-items: center; justify-content: center;
  margin: 0 0 16px; }
.step-ic .ico { width: 22px; height: 22px; }
.step-num { font-size: 11px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.step h3 { margin: 0 0 6px; font-size: 17px; letter-spacing: -.02em; }
.step p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }

/* Reassure band */
.reassure { background: var(--bg); border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border); }
.reassure-in { max-width: 720px; margin: 0 auto; padding: 56px 24px; text-align: center; }
.reassure-in h2 { font-size: 30px; letter-spacing: -.03em; margin: 0 0 24px; }
.reassure-in ul { list-style: none; padding: 0; margin: 0 0 28px; text-align: left;
  display: inline-block; }
.reassure-in li { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0;
  font-size: 16px; color: var(--ink-soft); line-height: 1.5; }
.reassure-in li .ico { width: 20px; height: 20px; color: var(--green); flex-shrink: 0;
  margin-top: 2px; }

/* Find form */
.find-wrap { max-width: 640px; margin: 0 auto; padding: 40px 24px 64px; }
.find-title { font-size: 34px; letter-spacing: -.03em; margin: 0 0 6px; }
.find-lead { color: var(--muted); margin: 0 0 28px; font-size: 16px; }
.find-form { display: flex; flex-direction: column; gap: 18px; }
.find-row.two { display: flex; gap: 14px; }
.find-field { display: flex; flex-direction: column; gap: 7px; flex: 1; }
.find-field.narrow { flex: 0 0 160px; }
.find-field > span { font-size: 13px; font-weight: 600; color: var(--ink-soft);
  display: flex; align-items: center; gap: 6px; }
.find-field > span .ico { width: 15px; height: 15px; color: var(--faint); }
.find-field input, .find-field select, .find-field textarea {
  border: 1px solid var(--border-strong); border-radius: 10px; padding: 12px 14px;
  font-size: 15px; font-family: var(--sans); background: var(--surface); color: var(--ink);
  width: 100%; outline: 0; }
.find-field input:focus, .find-field select:focus, .find-field textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.find-field .req { color: var(--accent); font-size: 10px; text-transform: uppercase;
  letter-spacing: .05em; background: var(--accent-soft); padding: 1px 6px; border-radius: 999px; }
.find-field .opt { color: var(--faint); font-weight: 400; }
.find-hint { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.find-error { margin: 2px 0 0; font-size: 12px; color: var(--red); min-height: 16px; display: none; }
.find-error.show { display: block; }
.find-field input.input-invalid, .find-field select.input-invalid, .find-field textarea.input-invalid {
  border-color: #dd6b55;
  box-shadow: 0 0 0 3px rgba(221, 107, 85, .14);
}
.find-privacy { display: flex; align-items: center; gap: 7px; color: var(--muted);
  font-size: 13px; margin: 4px 0 0; }
.find-privacy .ico { width: 15px; height: 15px; color: var(--green); }

/* Auth cards */
.auth-shell { max-width: 1160px; margin: 0 auto; padding: 34px 20px 72px; }
.auth-card { max-width: 560px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; box-shadow: var(--shadow); padding: 28px 26px 24px; }
.auth-brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 14px; margin-bottom: 16px; }
.auth-brand img { width: 21px; height: 21px; border-radius: 6px; }
.auth-title { margin: 0 0 7px; font-size: 34px; line-height: 1.07; letter-spacing: -.03em; }
.auth-sub { color: var(--muted); font-size: 15px; margin: 0 0 18px; line-height: 1.5; }
.auth-google { display: inline-flex; align-items: center; justify-content: center; gap: 9px; width: 100%;
  min-height: 46px; border-radius: 12px; border: 1px solid var(--border-strong); background: #fff;
  color: var(--ink); text-decoration: none; font-weight: 600; transition: border-color .15s, box-shadow .15s, transform .1s; }
.auth-google:hover { border-color: var(--accent); transform: translateY(-1px); }
.auth-google:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.auth-google .g { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--border); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #4285f4; background: #fff; }
.auth-divider { display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; margin: 14px 0 14px; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; background: var(--border); flex: 1; }
.auth-alt { color: var(--muted); font-size: 13px; margin: 0 0 4px; }
.auth-resend { margin-top: 10px; }
@media (max-width: 680px) {
  .auth-shell { padding: 16px 14px 40px; }
  .auth-card { border-radius: 14px; padding: 20px 16px 16px; }
  .auth-title { font-size: 28px; }
}

/* Patient results - marketplace layout */
.pr-layout { max-width: 1180px; margin: 0 auto; padding: 28px 32px 64px;
  display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; align-items: start; }
.pr-main { min-width: 0; }
.pr-list { display: flex; flex-direction: column; gap: 16px; }
.pr-list .pr-card { margin-bottom: 0; }

/* Filter sidebar */
.pr-filters { position: sticky; top: 20px; border: 1px solid var(--border);
  border-radius: 14px; background: var(--surface); padding: 18px 18px 8px; }
.pr-filters-head { display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px; }
.pr-filters-head h2 { font-size: 15px; letter-spacing: -.01em; margin: 0; }
.filt-group { padding: 14px 0; border-top: 1px solid var(--border); }
.filt-group:first-of-type { border-top: 0; }
.filt-label { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700;
  color: var(--ink-soft); margin-bottom: 10px; }
.filt-label .ico { width: 14px; height: 14px; color: var(--faint); }
.filt-select { width: 100%; border: 1px solid var(--border-strong); border-radius: 9px;
  padding: 9px 10px; font-size: 13.5px; font-family: var(--sans); background: var(--surface);
  color: var(--ink); outline: 0; cursor: pointer; }
.filt-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.filt-hint { font-size: 11.5px; color: var(--faint); margin: 7px 0 0; line-height: 1.4; }
.filt-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-soft);
  padding: 5px 0; cursor: pointer; }
.filt-check input { accent-color: var(--accent); width: 15px; height: 15px; flex-shrink: 0; }
.filt-check .dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.filt-check .dot-good { background: var(--green); }
.filt-check .dot-maybe { background: var(--amber); }
.filt-check .dot-no { background: var(--red); }
.filt-note { font-size: 12px; color: var(--muted); line-height: 1.5; display: flex;
  align-items: flex-start; gap: 6px; }
.filt-note .ico { width: 14px; height: 14px; color: var(--green); flex-shrink: 0; margin-top: 1px; }
.pr-head-actions { display: flex; gap: 8px; align-items: center; }
.pr-filter-toggle { display: none; }
.pr-recruiting { font-size: 12px; color: var(--green); display: inline-flex; align-items: center; gap: 4px; }
.pr-recruiting .ico { width: 12px; height: 12px; }
.pr-noresults { text-align: center; }

/* Plain "how it works" strip above results */
.pr-how { display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 16px; margin-bottom: 18px; }
.pr-how-step { display: inline-flex; align-items: center; gap: 8px; font-size: 13px;
  color: var(--ink-soft); flex: 1; min-width: 200px; }
.pr-how-step b { display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: #fff;
  font-size: 12px; flex-shrink: 0; }
.pr-how-arrow { color: var(--faint); display: inline-flex; }
.pr-how-arrow .ico { width: 15px; height: 15px; }
.if-intro { font-size: 13px; color: var(--ink-soft); line-height: 1.55; margin: 0;
  padding: 10px 12px; background: var(--accent-soft); border-radius: 9px; }

@media (max-width: 640px) { .pr-how-arrow { display: none; } }

@media (max-width: 900px) {
  .pr-layout { grid-template-columns: 1fr; gap: 16px; padding: 20px 20px 56px; }
  .pr-filters { position: static; display: none; order: -1; }
  .pr-filters.open { display: block; }
  .pr-filter-toggle { display: inline-flex; }
}
@media (max-width: 560px) {
  .pr-layout { padding: 16px 14px 48px; }
  .pr-head { flex-direction: column; align-items: stretch; gap: 12px; }
  .pr-head-actions { justify-content: flex-end; }
  .if-row.two { flex-direction: column; }
}
.pr-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  margin-bottom: 24px; }
.pr-head h1 { font-size: 28px; letter-spacing: -.03em; margin: 0 0 4px; }
.pr-sub { color: var(--muted); margin: 0; font-size: 14px; display: flex; align-items: center; gap: 5px; }
.pr-sub .ico { width: 15px; height: 15px; }
.pr-empty { text-align: center; padding: 48px 24px; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--surface-2); }
.pr-empty h2 { margin: 0 0 8px; font-size: 20px; }
.pr-empty p { color: var(--muted); max-width: 420px; margin: 0 auto 20px; line-height: 1.5; }
.pr-card { border: 1px solid var(--border-strong); border-radius: var(--radius);
  padding: 22px; margin-bottom: 16px; background: var(--surface); box-shadow: var(--shadow);
  animation: fade-up .35s ease both; }
.pr-card-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.fit { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700;
  padding: 4px 11px; border-radius: 999px; }
.fit .ico { width: 13px; height: 13px; }
.fit-good { background: var(--green-bg); color: var(--green); }
.fit-maybe { background: var(--amber-bg); color: var(--amber); }
.fit-no { background: var(--red-bg); color: var(--red); }
.pr-dist, .pr-phase { font-size: 12px; color: var(--muted); display: inline-flex;
  align-items: center; gap: 4px; }
.pr-phase { background: var(--surface-2); border: 1px solid var(--border); padding: 3px 9px;
  border-radius: 999px; }
.pr-dist .ico { width: 12px; height: 12px; }
.pr-card-title { font-size: 18px; line-height: 1.35; letter-spacing: -.02em; margin: 4px 0 10px; }
.pr-summary { color: var(--muted); font-size: 14px; line-height: 1.55; margin: 0 0 12px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pr-why { background: var(--accent-soft); color: var(--ink-soft); font-size: 14px;
  padding: 12px 14px; border-radius: 10px; line-height: 1.5; margin-bottom: 12px; }
.pr-facts { display: flex; flex-direction: column; gap: 6px; font-size: 13px;
  color: var(--muted); margin-bottom: 14px; }
.pr-facts span { display: flex; align-items: center; gap: 6px; }
.pr-facts .ico { width: 14px; height: 14px; flex-shrink: 0; }
.pr-facts a { color: inherit; text-decoration: none; }
.pr-facts a:hover { color: var(--accent); text-decoration: underline; }
.pr-elig { margin-bottom: 14px; border-top: 1px solid var(--border); padding-top: 12px; }
.pr-elig summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--ink-soft);
  display: flex; align-items: center; gap: 6px; list-style: none; }
.pr-elig summary::-webkit-details-marker { display: none; }
.pr-elig summary .ico { width: 15px; height: 15px; transition: transform .2s; }
.pr-elig[open] summary .ico { transform: rotate(180deg); }
.pr-elig-b { margin-top: 10px; font-size: 13.5px; }
.pr-elig-b b { display: block; margin-bottom: 3px; }
.pr-elig-b.good b { color: var(--green); }
.pr-elig-b.maybe b { color: var(--amber); }
.pr-elig-b.no b { color: var(--red); }
.pr-elig-b ul { margin: 0; padding-left: 18px; color: var(--ink-soft); line-height: 1.5; }
.pr-interest > summary { list-style: none; cursor: pointer; }
.pr-interest > summary::-webkit-details-marker { display: none; }
.interest-form { display: flex; flex-direction: column; gap: 12px; margin-top: 14px;
  padding: 16px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
  animation: fade-up .25s ease both; }
.interest-form label { font-size: 13px; font-weight: 600; color: var(--ink-soft);
  display: flex; flex-direction: column; gap: 6px; }
.interest-form input { border: 1px solid var(--border-strong); border-radius: 9px;
  padding: 10px 12px; font-size: 14px; font-family: var(--sans); outline: 0; }
.interest-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.if-row.two { display: flex; gap: 12px; }
.if-row.two label { flex: 1; }
.if-consent { flex-direction: row !important; align-items: flex-start; gap: 9px !important;
  font-weight: 400 !important; font-size: 13px !important; color: var(--muted) !important;
  line-height: 1.45; }
.if-consent input { flex: 0 0 auto; margin-top: 2px; }
.if-consent > span { flex: 1 1 auto; min-width: 0; }
.if-consent b { font-weight: 650; color: var(--ink-soft); }
.pr-foot-note { color: var(--faint); font-size: 12px; line-height: 1.5; margin-top: 24px;
  text-align: center; }

/* Condition SEO pages */
.cond-hero { max-width: 800px; margin: 0 auto; padding: 40px 24px 8px; }
.crumbs { font-size: 13px; color: var(--faint); margin-bottom: 16px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.cond-hero h1 { font-size: 36px; letter-spacing: -.03em; margin: 0 0 12px; line-height: 1.1; }
.cond-lead { color: var(--muted); font-size: 16px; line-height: 1.6; margin: 0 0 24px; max-width: 640px; }
.cond-search { display: flex; gap: 10px; align-items: center; background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: 14px; padding: 8px;
  box-shadow: var(--shadow-lift); max-width: 760px; }
.cond-loc-actions { max-width: 760px; margin-top: 12px; display: flex;
  flex-wrap: wrap; align-items: center; gap: 12px; }
.cond-loc-actions .loc-use { margin-left: 0; font-size: 14px; }
.cond-loc-actions .loc-confirm { margin-top: 0; }
.cond-list { max-width: 800px; margin: 40px auto; padding: 0 24px; }
.cond-list h2, .cond-cities h2 { font-size: 22px; letter-spacing: -.02em; margin: 0 0 16px; }
.cond-item { display: flex; gap: 16px; justify-content: space-between; align-items: flex-start;
  padding: 18px; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 12px;
  text-decoration: none; color: inherit; background: var(--surface); transition: .15s; }
.cond-item:hover { border-color: var(--accent); box-shadow: var(--shadow-lift); }
.cond-item h3 { margin: 0 0 6px; font-size: 16px; letter-spacing: -.01em; }
.cond-item p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.cond-item-meta { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; flex-shrink: 0; }
.cond-cities { max-width: 800px; margin: 40px auto; padding: 0 24px; }
.chip-grid { display: flex; flex-wrap: wrap; gap: 10px; }

/* Thank-you */
.thanks { max-width: 560px; margin: 0 auto; padding: 72px 24px; text-align: center; }
.thanks-mark { width: 64px; height: 64px; border-radius: 50%; background: var(--green-bg);
  color: var(--green); display: flex; align-items: center; justify-content: center; margin: 0 auto 24px; }
.thanks-mark .ico { width: 32px; height: 32px; }
.thanks h1 { font-size: 32px; letter-spacing: -.03em; margin: 0 0 14px; }
.thanks p { color: var(--muted); font-size: 16px; line-height: 1.6; margin: 0 auto 12px; max-width: 460px; }
.thanks-next { text-align: left; max-width: 460px; margin: 0 auto 8px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; }
.thanks-next h2 { font-size: 15px; margin: 0 0 10px; letter-spacing: -.01em; }
.thanks-next ol { margin: 0; padding-left: 20px; color: var(--ink-soft); }
.thanks-next li { font-size: 14px; line-height: 1.5; margin-bottom: 6px; }
.thanks-sub { font-size: 14px !important; }
.thanks-actions { display: flex; gap: 12px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }

/* Footer */
.pub-foot { border-top: 1px solid var(--border); background: var(--bg); margin-top: 40px; }
.pub-foot-in { max-width: 1180px; margin: 0 auto; padding: 22px 32px; display: flex;
  align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.pub-foot-brand { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pub-foot-brand > span:first-child { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); }
.pub-foot-note { line-height: 1.5; }
.pub-foot-tools { display: inline-flex; justify-content: flex-end; }

@media (max-width: 720px) {
  .pub-nav { padding: 14px 16px; align-items: flex-start; gap: 10px; }
  .pub-nav-links { width: 100%; justify-content: flex-start; gap: 10px; }
  .pub-nav-tools { padding: 0 16px 10px; }
  .pub-nav-tools .pov-tools { width: 100%; flex-direction: column; align-items: stretch; }
  .pub-nav-tools .pov-switch { width: 100%; justify-content: space-between; }
  .pub-nav-tools .pov-pill { flex: 1; justify-content: center; }
  .pub-nav-tools .demo-toggle { justify-content: center; }
  .pub-foot-in { padding: 18px 16px; align-items: flex-start; }
  .pub-foot-tools { width: 100%; }
  .pub-foot-tools .pov-tools { width: 100%; flex-direction: column; align-items: stretch; }
  .pub-foot-tools .pov-switch { width: 100%; justify-content: space-between; }
  .pub-foot-tools .pov-pill { flex: 1; justify-content: center; }
  .pub-foot-tools .demo-toggle { justify-content: center; }
  .hero h1 { font-size: 36px; }
  .hero-search, .cond-search { flex-direction: column; }
  .hero-search .btn { width: 100%; justify-content: center; }
  .steps { grid-template-columns: 1fr; gap: 14px; }
  .chip-row { grid-template-columns: 1fr; gap: 8px; }
  .chip-label { justify-content: flex-start; padding-top: 0; }
  .chip-cluster { justify-content: flex-start; }
  .find-row.two { flex-direction: column; }
  .find-field.narrow { flex: 1; }
  .pr-head { flex-direction: column; }
}

/* Applied state on a result card */
.pr-applied { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px;
  color: var(--green); background: var(--green-bg); border: 1px solid #c4e6d6;
  border-radius: 10px; padding: 12px 14px; }
.pr-applied .ico { width: 15px; height: 15px; }
.pr-applied a { color: var(--accent); text-decoration: none; margin-left: auto; font-weight: 600; }

/* Nav badge for application count */
.nav-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px;
  height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 700; }
.nav-badge-new { background: #e0483d; }

/* Results page: "notify me of new trials" CTA */
.pr-alert { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; margin: 0 0 20px; padding: 14px 16px; border-radius: 14px;
  border: 1px solid var(--border-strong); background: var(--accent-soft); }
.pr-alert-copy { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px;
  line-height: 1.45; color: var(--ink); flex: 1 1 280px; }
.pr-alert-copy .ico { width: 18px; height: 18px; flex-shrink: 0; color: var(--accent); margin-top: 1px; }
.pr-alert-act { display: flex; gap: 8px; flex: 0 0 auto; }
.pr-alert-act input { width: 190px; padding: 9px 12px; border: 1px solid var(--border-strong);
  border-radius: 10px; font: inherit; font-size: 13.5px; background: #fff; }
.pr-alert-act input:focus { outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3.5px rgba(90,101,240,.15); }

/* Alerts page */
.alert-new { margin: 0 0 26px; padding: 18px; border: 1px solid var(--border-strong);
  border-radius: 16px; background: #fff; box-shadow: var(--shadow-lift); }
.alert-new-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.alert-new-row label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px;
  font-weight: 600; color: var(--muted); flex: 1 1 180px; }
.alert-new-row label .opt { color: var(--faint); font-weight: 500; }
.alert-new-row input { padding: 10px 12px; border: 1px solid var(--border-strong);
  border-radius: 10px; font: inherit; font-size: 14px; background: #fff; }
.alert-new-row input:focus { outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3.5px rgba(90,101,240,.15); }
.alert-new-row .btn { flex: 0 0 auto; }
.alert-new-hint { margin: 12px 2px 0; font-size: 12px; color: var(--faint); line-height: 1.5; }

.alert-card { border: 1px solid var(--border-strong); border-radius: 16px; background: #fff;
  padding: 18px 20px; margin-bottom: 16px; }
.alert-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.alert-title { margin: 0; font-size: 17px; font-weight: 700; text-transform: capitalize; }
.alert-meta { margin: 5px 0 0; font-size: 12.5px; color: var(--muted); display: flex;
  align-items: center; gap: 5px; flex-wrap: wrap; }
.alert-meta .ico { width: 14px; height: 14px; }
.alert-new-banner { display: flex; align-items: center; gap: 8px; margin: 14px 0 4px;
  padding: 9px 12px; border-radius: 10px; background: #fdeceb; color: #b23a30;
  font-size: 13px; font-weight: 600; }
.alert-new-banner .ico { width: 16px; height: 16px; }
.alert-matches { list-style: none; margin: 12px 0 0; padding: 0; display: flex;
  flex-direction: column; gap: 2px; }
.alert-match { display: flex; align-items: center; gap: 10px; padding: 9px 4px;
  border-top: 1px solid var(--border); font-size: 14px; }
.alert-match a { color: var(--ink); font-weight: 500; text-decoration: none; flex: 1; }
.alert-match a:hover { color: var(--accent); text-decoration: underline; }
.alert-match-nct { font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.alert-tag-new { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  color: #fff; background: #e0483d; padding: 2px 6px; border-radius: 999px; }
.alert-none { margin: 12px 0 0; font-size: 13px; color: var(--muted); }

/* My applications (patient tracker) */
.apps-wrap { max-width: 860px; margin: 0 auto; padding: 32px 24px 64px; }
.apps-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  margin-bottom: 24px; }
.apps-head h1 { font-size: 28px; letter-spacing: -.03em; margin: 0 0 4px; }
.apps-sub { color: var(--muted); margin: 0; font-size: 14px; }
.apps-empty { text-align: center; padding: 56px 24px; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--surface-2); }
.apps-empty-mark { width: 56px; height: 56px; border-radius: 50%; background: var(--accent-soft);
  color: var(--accent); display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; }
.apps-empty-mark .ico { width: 26px; height: 26px; }
.apps-empty h2 { margin: 0 0 8px; font-size: 20px; }
.apps-empty p { color: var(--muted); max-width: 400px; margin: 0 auto 22px; line-height: 1.55; }

.app-card { border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow); padding: 22px; margin-bottom: 16px; }
.app-card.app-closed { opacity: .9; }
.app-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.app-title { font-size: 17px; letter-spacing: -.02em; margin: 0 0 4px; line-height: 1.35; }
.app-meta { color: var(--muted); font-size: 13px; margin: 0; }
.app-status { font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px;
  white-space: nowrap; flex-shrink: 0; }
.app-status-open { background: var(--accent-soft); color: var(--accent); }
.app-status-closed { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.app-blurb { color: var(--ink-soft); font-size: 14px; line-height: 1.55; margin: 12px 0 18px; }

.app-steps { list-style: none; display: flex; margin: 0 0 18px; padding: 0; }
.app-step { flex: 1; text-align: center; position: relative; font-size: 11.5px; color: var(--faint); }
.app-step::before { content: ''; position: absolute; top: 13px; left: -50%; width: 100%; height: 2px;
  background: var(--border); z-index: 0; }
.app-step:first-child::before { display: none; }
.app-step-dot { position: relative; z-index: 1; width: 26px; height: 26px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--border); color: var(--faint); display: flex;
  align-items: center; justify-content: center; margin: 0 auto 6px; font-size: 12px; font-weight: 700; }
.app-step-dot .ico { width: 13px; height: 13px; }
.app-step.done .app-step-dot { background: var(--green); border-color: var(--green); color: #fff; }
.app-step.done::before { background: var(--green); }
.app-step.done .app-step-label { color: var(--ink-soft); }
.app-step.current .app-step-dot { background: var(--accent); border-color: var(--accent); color: #fff;
  box-shadow: 0 0 0 4px var(--accent-soft); }
.app-step.current .app-step-label { color: var(--accent); font-weight: 700; }

.app-closed-note { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px;
  color: var(--muted); background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; line-height: 1.5; }
.app-closed-note .ico { width: 15px; height: 15px; flex-shrink: 0; margin-top: 1px; }

.app-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 14px; }
.app-applied { font-size: 12px; color: var(--faint); }
.app-foot-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.app-link { color: var(--accent); text-decoration: none; font-size: 13px; display: inline-flex;
  align-items: center; gap: 5px; }
.app-link .ico { width: 13px; height: 13px; }
.app-withdraw { color: var(--red); }
.app-timeline summary { cursor: pointer; font-size: 13px; color: var(--ink-soft); list-style: none;
  display: inline-flex; align-items: center; gap: 5px; }
.app-timeline summary::-webkit-details-marker { display: none; }
.app-timeline summary .ico { width: 14px; height: 14px; transition: transform .2s; }
.app-timeline[open] summary .ico { transform: rotate(180deg); }
.app-timeline ul { margin: 10px 0 0; padding-left: 18px; font-size: 13px; color: var(--ink-soft);
  line-height: 1.6; }
.apps-foot-note { color: var(--faint); font-size: 12px; text-align: center; margin-top: 20px;
  line-height: 1.5; }

.app-records-form { margin: 0 0 16px; }
.app-records-form .btn { margin-bottom: 6px; }
.app-records-note { display: block; font-size: 11.5px; color: var(--faint); line-height: 1.45; }
.app-records { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; margin-bottom: 16px;
  padding: 10px 12px; border-radius: 10px; background: var(--green-bg); color: var(--green);
  border: 1px solid #c4e6d6; }
.app-records .ico { width: 15px; height: 15px; flex-shrink: 0; margin-top: 1px; }

/* Connect-once records: banners (apply panel + applications page) */
.rec-banner { display: flex; align-items: center; gap: 10px; font-size: 13.5px;
  padding: 12px 14px; border-radius: 12px; line-height: 1.45; margin: 0 0 14px; }
.rec-banner .ico { width: 17px; height: 17px; flex-shrink: 0; }
.rec-banner span { flex: 1; }
.rec-banner.ok { background: var(--green-bg); color: var(--green); border: 1px solid #c4e6d6; }
.rec-banner.connect { background: var(--accent-soft); color: var(--ink); border: 1px solid var(--border-strong); }
.rec-banner.wide { margin-bottom: 22px; }
.rec-banner.connect .btn { flex-shrink: 0; }
.rec-banner .link-btn { flex-shrink: 0; }

.rec-connect-form { margin: 0 0 14px; }
.rec-connect { width: 100%; display: flex; align-items: center; gap: 9px; text-align: left;
  padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--accent);
  background: var(--accent-soft); color: var(--ink); font: inherit; font-size: 13.5px;
  cursor: pointer; transition: background .15s, border-color .15s; }
.rec-connect:hover { background: #e6e9fe; }
.rec-connect .ico { width: 18px; height: 18px; flex-shrink: 0; color: var(--accent); }
.rec-connect-hint { display: block; font-size: 11.5px; color: var(--faint); line-height: 1.45;
  margin-top: 5px; }
.btn.is-loading, .rec-connect.is-loading { opacity: .76; cursor: wait; }

.lead-redcap-form { margin-top: 6px; }
.lead-sched-form { margin-top: 6px; display: flex; flex-direction: column; gap: 5px; }
.lead-sched-form input { padding: 6px 9px; border: 1px solid var(--border-strong);
  border-radius: 8px; font: inherit; font-size: 12.5px; background: #fff; min-width: 190px; }
.lead-sched-form input:focus { outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(90,101,240,.15); }

/* Patient "book your screening call" CTA on the applications page */
.app-book { display: flex; align-items: center; justify-content: space-between; gap: 14px;
  flex-wrap: wrap; margin: 14px 0 4px; padding: 13px 15px; border-radius: 12px;
  border: 1px solid #c4e6d6; background: var(--green-bg); }
.app-book-copy { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px;
  line-height: 1.45; color: var(--ink); flex: 1 1 260px; }
.app-book-copy .ico { width: 18px; height: 18px; flex-shrink: 0; color: var(--green); margin-top: 1px; }
.app-book .btn { flex-shrink: 0; }

/* Upcoming visits on the applications page */
.app-visits { margin: 12px 0 4px; display: flex; flex-direction: column; gap: 8px; }
.app-visit { display: flex; align-items: flex-start; gap: 9px; padding: 11px 13px;
  border-radius: 11px; border: 1px solid var(--border-strong); background: var(--surface-2);
  font-size: 13.5px; line-height: 1.45; }
.app-visit .ico { width: 17px; height: 17px; flex-shrink: 0; color: var(--accent); margin-top: 1px; }
.app-visit-note { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }

/* Message thread (shared: patient applications + candidate workspace) */
.thread { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 14px; }
.thread-head { display: flex; align-items: center; gap: 7px; font-size: 12.5px;
  font-weight: 700; letter-spacing: .01em; color: var(--muted); text-transform: uppercase; }
.thread-head .ico { width: 15px; height: 15px; color: var(--accent); }
.thread-list { list-style: none; margin: 12px 0; padding: 0; display: flex;
  flex-direction: column; gap: 8px; max-height: 320px; overflow-y: auto; }
.msg { display: flex; flex-direction: column; gap: 2px; max-width: 82%;
  padding: 9px 12px; border-radius: 13px; font-size: 13.5px; line-height: 1.45; }
.msg-who { font-size: 11px; font-weight: 700; opacity: .7; }
.msg-body { white-space: pre-wrap; word-break: break-word; }
.msg-time { font-size: 10.5px; color: var(--faint); }
/* patient's own messages right-aligned; the other party left; system centered */
.msg-patient { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.msg-patient .msg-who, .msg-patient .msg-time { color: rgba(255,255,255,.8); opacity: 1; }
.msg-site { align-self: flex-start; background: #fff; border: 1px solid var(--border-strong); border-bottom-left-radius: 4px; }
.msg-system { align-self: center; background: var(--accent-soft); color: var(--ink);
  max-width: 92%; text-align: center; font-size: 12.5px; }
.msg-system .msg-who { color: var(--accent); }
/* On the study-team workspace 'you' = site, so flip which side is accented */
.coord-wrap .msg-site { align-self: flex-end; background: var(--accent); color: #fff; border: none; border-bottom-right-radius: 4px; }
.coord-wrap .msg-site .msg-who, .coord-wrap .msg-site .msg-time { color: rgba(255,255,255,.8); opacity: 1; }
.coord-wrap .msg-patient { align-self: flex-start; background: #fff; border: 1px solid var(--border-strong); color: var(--ink); border-bottom-left-radius: 4px; }
.coord-wrap .msg-patient .msg-who, .coord-wrap .msg-patient .msg-time { color: var(--muted); }
.thread-empty { font-size: 13px; color: var(--muted); margin: 10px 0; line-height: 1.5; }
.thread-form { display: flex; gap: 8px; }
.thread-form input { flex: 1; padding: 10px 13px; border: 1px solid var(--border-strong);
  border-radius: 10px; font: inherit; font-size: 14px; background: #fff; }
.thread-form input:focus { outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(90,101,240,.15); }

/* Study-team workspace: visit form + badges */
.visit-list { list-style: none; margin: 0 0 12px; padding: 0; display: flex;
  flex-direction: column; gap: 6px; font-size: 13.5px; }
.visit-list li { display: flex; align-items: center; gap: 8px; }
.visit-list .ico { width: 15px; height: 15px; color: var(--accent); }
.visit-form { display: flex; flex-direction: column; gap: 9px; }
.visit-row { display: flex; gap: 10px; flex-wrap: wrap; }
.visit-row label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px;
  font-weight: 600; color: var(--muted); flex: 1 1 160px; }
.visit-form input, .visit-form select { padding: 9px 11px; border: 1px solid var(--border-strong);
  border-radius: 9px; font: inherit; font-size: 13.5px; background: #fff; }
.visit-form input:focus, .visit-form select:focus { outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(90,101,240,.15); }

.msg-badge { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px;
  background: #e0483d; color: #fff; font-size: 10.5px; font-weight: 700; vertical-align: middle; }
.cand-open { display: inline-flex; align-items: center; gap: 5px; margin-top: 5px;
  font-size: 12px; color: var(--accent); text-decoration: none; }
.cand-open .ico { width: 13px; height: 13px; }
.cand-open:hover { text-decoration: underline; }
.recon-tag { margin-top: 6px; color: var(--green); background: var(--green-bg); }

/* Recruitment dashboard */
.dash-leak { display: flex; align-items: flex-start; gap: 10px; margin: 4px 0 20px;
  padding: 13px 16px; border-radius: 12px; background: #fdeceb; border: 1px solid #f3c9c4;
  color: #8f2f26; font-size: 13.5px; line-height: 1.5; }
.dash-leak .ico { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }
.dash-card { margin-bottom: 0; }
.dash-hint { font-size: 12.5px; color: var(--muted); margin: -4px 0 14px; }

.funnel { display: flex; flex-direction: column; gap: 12px; }
.funnel-row { display: flex; flex-direction: column; gap: 5px; }
.funnel-meta { display: flex; justify-content: space-between; align-items: baseline; }
.funnel-label { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.funnel-n { font-size: 15px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.funnel-bar-wrap { display: flex; align-items: center; gap: 10px; }
.funnel-bar { height: 12px; border-radius: 999px; background: linear-gradient(90deg, var(--accent), #7c83f6);
  min-width: 6px; transition: width .5s ease; }
.funnel-conv { font-size: 11.5px; color: var(--muted); white-space: nowrap; }

.tis { display: flex; flex-direction: column; gap: 12px; }
.tis-row { display: flex; flex-direction: column; gap: 5px; }
.tis-label { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.tis-label .ico { width: 13px; height: 13px; }
.tis-arrow { display: inline-flex; }
.tis-bar-wrap { display: flex; align-items: center; gap: 9px; }
.tis-bar { height: 10px; border-radius: 999px; background: var(--amber); min-width: 4px; }
.tis-val { font-size: 12.5px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.tis-n { font-weight: 500; color: var(--faint); }
.tis-none { font-weight: 500; color: var(--faint); }

.dash-table { width: 100%; }
.dash-trial-title { color: var(--muted); font-size: 13px; }
.dash-conv { font-weight: 700; }
.dash-eng { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 16px; padding: 0 4px;
  font-size: 13px; color: var(--muted); }
.dash-eng span { display: inline-flex; align-items: center; gap: 7px; }
.dash-eng .ico { width: 15px; height: 15px; color: var(--accent); }
.dash-verify-note { display: flex; align-items: flex-start; gap: 10px; margin: -8px 0 18px;
  padding: 11px 13px; border-radius: 10px; background: var(--green-bg); border: 1px solid #c4e6d6;
  color: var(--green); font-size: 13px; line-height: 1.45; }
.dash-verify-note .ico { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.dash-src { font-weight: 600; }
.dash-src-sub { color: var(--muted); font-size: 12px; }

/* Physician referral: attribution badges */
.app-referred { display: inline-flex; align-items: center; gap: 6px; margin: 2px 0 10px;
  padding: 4px 11px; border-radius: 999px; background: var(--accent-soft); color: var(--accent);
  font-size: 12.5px; font-weight: 600; }
.app-referred .ico { width: 14px; height: 14px; }
.pill-ref { background: var(--accent-soft); color: var(--accent); }
.pill-ref .ico { width: 13px; height: 13px; vertical-align: -2px; }

/* Invite landing (patient) */
.inv-land { max-width: 680px; margin: 40px auto; padding: 0 20px; }
.inv-badge { display: inline-flex; align-items: center; gap: 7px; padding: 5px 13px;
  border-radius: 999px; background: var(--accent-soft); color: var(--accent);
  font-size: 13px; font-weight: 600; margin-bottom: 18px; }
.inv-badge .ico { width: 15px; height: 15px; }
.inv-land h1 { font-size: 30px; letter-spacing: -.025em; line-height: 1.15; margin: 0 0 12px; }
.inv-sub { font-size: 16px; color: var(--muted); line-height: 1.55; margin: 0 0 26px; }
.inv-trial { padding: 24px; }
.inv-trial h2 { font-size: 19px; letter-spacing: -.015em; margin: 0 0 10px; }
.inv-trial-meta { display: flex; flex-wrap: wrap; gap: 16px; color: var(--muted); font-size: 13.5px; margin-bottom: 16px; }
.inv-trial-meta span { display: inline-flex; align-items: center; gap: 6px; }
.inv-trial-meta .ico { width: 15px; height: 15px; color: var(--accent); }
.inv-note { background: var(--surface-2); border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0; padding: 13px 16px; font-size: 14.5px; line-height: 1.5;
  color: var(--ink); margin-bottom: 20px; font-style: italic; }
.inv-note-label { display: block; font-style: normal; font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; color: var(--accent); margin-bottom: 5px; }
.inv-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.inv-reassure { list-style: none; margin: 26px 0 0; padding: 0; display: flex;
  flex-direction: column; gap: 11px; }
.inv-reassure li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px;
  color: var(--muted); line-height: 1.45; }
.inv-reassure .ico { width: 17px; height: 17px; color: var(--ok, #16a34a); flex-shrink: 0; margin-top: 1px; }

/* Invite management (clinician) */
.inv-new { border: 1px solid var(--accent); background: var(--accent-soft); }
.inv-link-row { display: flex; gap: 8px; margin: 4px 0 8px; }
.inv-link-row input { flex: 1; padding: 10px 13px; border: 1px solid var(--border-strong);
  border-radius: 10px; font: inherit; font-size: 13.5px; background: #fff; }
.inv-hint { font-size: 12.5px; color: var(--muted); margin: 0; }
.inv-form { display: flex; flex-direction: column; gap: 12px; max-width: 560px; }
.inv-form label { display: flex; flex-direction: column; gap: 5px; font-size: 13px;
  font-weight: 600; color: var(--muted); }
.inv-form input, .inv-form textarea { padding: 10px 13px; border: 1px solid var(--border-strong);
  border-radius: 10px; font: inherit; font-size: 14px; background: #fff; }
.inv-form input:focus, .inv-form textarea:focus { outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(90,101,240,.15); }
.inv-table { width: 100%; }
.inv-enrolled { color: var(--ok, #16a34a); }

/* Study-team setup + claimed-study scoping */
.site-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
@media (max-width: 900px) { .site-grid { grid-template-columns: 1fr; } }
.site-form { display: flex; flex-direction: column; gap: 11px; }
.site-form label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.site-form input { padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 10px; font: inherit; font-size: 14px; background: #fff; }
.site-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(90,101,240,.15); }
.site-hint { margin-top: 12px; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.claim-table { width: 100%; }

.claims-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 2px 0 14px; }
.claims-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.claims-label .ico { width: 14px; height: 14px; color: var(--accent); }
.claims-pill { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--accent); background: var(--accent-soft); }
.claims-link { margin-left: auto; font-size: 12.5px; color: var(--accent); text-decoration: none; }
.claims-link:hover { text-decoration: underline; }

/* ATS-style lanes for study-team pipeline */
.pipeline-lane { margin-bottom: 18px; }
.lane-head { display: flex; align-items: center; gap: 10px; margin: 10px 2px 12px; }
.lane-head h2 { margin: 0; font-size: 17px; display: inline-flex; align-items: center; gap: 7px; }
.lane-head .ico { width: 16px; height: 16px; color: var(--accent); }
.lane-n { font-size: 12px; color: var(--muted); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 999px; padding: 2px 8px; font-weight: 700; }
.cand-share.slim summary { font-size: 12.5px; color: var(--muted); }
.outreach-card { padding: 16px 18px; }
.outreach-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.outreach-top h3 { margin: 0 0 3px; font-size: 18px; }
.outreach-top p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.outreach-top .tagline { margin-top: 3px; }
.outreach-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.outreach-form { display: flex; flex-direction: column; gap: 6px; }
.outreach-form label { margin: 0; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.outreach-form input, .outreach-form select { border: 1px solid var(--border-strong); border-radius: 9px; padding: 8px 10px; font-size: 13px; font-family: var(--sans); background: #fff; }
.outreach-form input:focus, .outreach-form select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(90,101,240,.12); }
.status-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.status-row select { min-width: 140px; }
.status-row input { min-width: 110px; flex: 1; }
.outreach-foot { margin-top: 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
@media (max-width: 900px) {
  .outreach-grid { grid-template-columns: 1fr; }
}

/* -------------------------------------------------------------------------- */
/* Modern credibility polish (simple, clean, high-trust)                      */
/* -------------------------------------------------------------------------- */
:root {
  --sans: "Manrope", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius: 16px;
  --radius-sm: 11px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(17,17,20,.04), 0 10px 26px rgba(17,17,20,.05);
}

h1, h2, h3 {
  letter-spacing: -0.03em;
}

.card {
  border-color: #ececf0;
  box-shadow: var(--shadow);
}

.btn {
  border-radius: 11px;
}

.btn-primary {
  box-shadow: 0 1px 2px rgba(17,17,20,.2), inset 0 -1px 0 rgba(255,255,255,.08);
}

.pub-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(247,247,245,.84);
  border-bottom: 1px solid rgba(226,226,233,.85);
}

.hero {
  padding-top: 34px;
}

.hero h1 {
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.05;
}

.hero-sub {
  max-width: 720px;
}

.hero-search {
  border: 1px solid #e8e8ef;
  border-radius: 18px;
  padding: 12px;
  background: #fff;
  box-shadow: 0 2px 4px rgba(17,17,20,.03), 0 16px 32px rgba(17,17,20,.06);
}

.hero-trust {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 13px;
  color: var(--muted);
}

.hero-trust span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-trust .ico {
  width: 14px;
  height: 14px;
  color: #0f8b66;
}

.chips-block {
  margin-top: 16px;
}

.chip {
  border: 1px solid #e7e7ef;
  background: #fff;
  transition: border-color .14s ease, transform .14s ease, box-shadow .14s ease;
}

.chip:hover {
  border-color: #d7d7e8;
  box-shadow: 0 4px 12px rgba(17,17,20,.07);
  transform: translateY(-1px);
}

.steps-wrap {
  border-top: 1px solid #ececf2;
  margin-top: 20px;
  padding-top: 28px;
}

.step {
  border: 1px solid #e9e9f0;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff 0%, #fcfcfe 100%);
}

.apps-head h1,
.page-head h1 {
  font-size: clamp(28px, 3.3vw, 38px);
}

.app-card {
  border: 1px solid #e8e8ef;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(17,17,20,.03), 0 12px 30px rgba(17,17,20,.05);
}

.app-next-step {
  margin: 12px 0 2px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #ece8d5;
  background: #fffaf0;
  color: #7b5b1a;
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.app-next-step .ico {
  width: 15px;
  height: 15px;
  color: #a77416;
  margin-top: 1px;
}

.thread {
  border-top-color: #ededf3;
}

.thread-list {
  padding-right: 4px;
}

.stats .stat {
  border: 1px solid #e8e8ef;
  box-shadow: 0 1px 2px rgba(17,17,20,.03);
}

/* Dense KPI strip for recruiter-style boards */
.stats-compact { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 10px 0 16px; }
.stats-compact .stat.compact { padding: 10px 12px; border-radius: 10px; box-shadow: none; }
.stats-compact .stat.compact .l {
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: 10px;
  margin-top: 0;
}
.stats-compact .stat.compact .n {
  margin-top: 4px;
  font-size: 24px;
  line-height: 1.1;
}
.stats-compact .stat.compact:hover {
  transform: none;
  box-shadow: none;
}
@media (max-width: 1080px) { .stats-compact { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) { .stats-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.cand-row {
  border: 1px solid #e8e8ef;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(17,17,20,.03);
}

.triage-note {
  margin: -8px 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f4f6ff;
  border: 1px solid #e2e6ff;
  color: #3e4aa8;
  font-size: 12.8px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.triage-note .ico {
  width: 14px;
  height: 14px;
}

.dash-card,
.dash-table,
.funnel,
.tis {
  font-size: 14px;
}

@media (max-width: 560px) {
  .app-step-label { font-size: 10px; }
  .apps-head { flex-direction: column; }
}

/* Operator: application status controls */
.lead-status-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.lead-status-form select, .lead-status-form input { border: 1px solid var(--border-strong);
  border-radius: 8px; padding: 6px 8px; font-size: 12.5px; font-family: var(--sans);
  background: var(--surface); color: var(--ink); }
.lead-status-form input { width: 120px; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.pill { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 4px 10px;
  border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border);
  color: var(--ink-soft); white-space: nowrap; }
.pill-submitted { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.pill-reviewing, .pill-contacted, .pill-screening { background: var(--amber-bg); color: var(--amber);
  border-color: transparent; }
.pill-enrolled { background: var(--green-bg); color: var(--green); border-color: transparent; }
.pill-closed, .pill-withdrawn { background: var(--surface-2); color: var(--muted); }
.rec-sum { margin-top: 6px; }
.rec-sum summary { cursor: pointer; font-size: 11px; color: var(--green); }
.rec-sum pre { white-space: pre-wrap; font-size: 11px; color: var(--ink-soft); margin: 6px 0 0;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 8px; }

/* Landing: link to full flow */
.steps-more { text-align: center; margin: 24px auto 8px; }
.steps-more a { color: var(--accent); text-decoration: none; font-weight: 600; font-size: 14px;
  display: inline-flex; align-items: center; gap: 6px; }
.steps-more a .ico { width: 15px; height: 15px; }

/* How it works (closed-loop explainer) */
.how-wrap { max-width: 1000px; margin: 0 auto; padding: 40px 24px 64px; }
.how-head { text-align: center; margin-bottom: 40px; }
.how-head h1 { font-size: 40px; letter-spacing: -.03em; margin: 16px 0 0; line-height: 1.08; }
.how-lead { color: var(--muted); font-size: 17px; line-height: 1.6; max-width: 680px;
  margin: 16px auto 0; }
.how-cols { display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; align-items: stretch; }
.how-col { border: 1px solid var(--border-strong); border-radius: 16px; background: var(--surface);
  padding: 24px; box-shadow: var(--shadow); }
.how-col-alt { background: var(--surface-2); }
.how-col h2 { font-size: 17px; letter-spacing: -.02em; margin: 0 0 16px; display: flex;
  align-items: center; gap: 8px; }
.how-col h2 .ico { width: 18px; height: 18px; color: var(--accent); }
.how-flow { max-width: 640px; margin: 0 auto; }
.how-steps { list-style: none; counter-reset: how; margin: 0; padding: 0; }
.how-steps li { counter-increment: how; position: relative; padding: 0 0 18px 34px; }
.how-steps li::before { content: counter(how); position: absolute; left: 0; top: 0; width: 24px;
  height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12px;
  font-weight: 700; display: flex; align-items: center; justify-content: center; }
.how-steps li:not(:last-child)::after { content: ''; position: absolute; left: 11px; top: 26px;
  bottom: 4px; width: 2px; background: var(--border); }
.how-steps b { display: block; font-size: 14px; margin-bottom: 2px; }
.how-steps span { color: var(--muted); font-size: 13px; line-height: 1.5; }
.how-loop { display: flex; align-items: center; justify-content: center; color: var(--accent); }
.how-loop .ico { width: 26px; height: 26px; }

.how-track { margin: 44px 0; padding: 28px; border: 1px solid var(--border); border-radius: 16px;
  background: var(--surface); }
.how-track h2 { font-size: 20px; letter-spacing: -.02em; margin: 0 0 6px; }
.how-track > p { color: var(--muted); font-size: 14px; margin: 0 0 20px; }
.how-track > p a { color: var(--accent); text-decoration: none; }
.how-track-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.how-track-steps li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; }
.how-track-dot { width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft);
  color: var(--accent); font-weight: 700; font-size: 12px; display: flex; align-items: center;
  justify-content: center; }
.how-track-steps b { font-size: 14px; }
.how-track-blurb { display: block; color: var(--muted); font-size: 13px; line-height: 1.5;
  grid-column: 2; }

.how-privacy { display: flex; gap: 12px; align-items: flex-start; padding: 18px 20px;
  background: var(--green-bg); border: 1px solid #c4e6d6; border-radius: 14px; margin-bottom: 32px; }
.how-privacy > .ico { width: 20px; height: 20px; color: var(--green); flex-shrink: 0; margin-top: 2px; }
.how-privacy b { font-size: 14px; }
.how-privacy p { margin: 4px 0 0; color: var(--ink-soft); font-size: 13px; line-height: 1.55; }
.how-cta { text-align: center; }

@media (max-width: 760px) {
  .how-head h1 { font-size: 30px; }
  .how-cols { grid-template-columns: 1fr; }
  .how-loop { transform: rotate(90deg); padding: 4px 0; }
}

/* Patient apply: short screener */
.if-screener { display: grid; gap: 10px; padding: 14px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 10px; }
.if-screener label { font-size: 13px; font-weight: 600; color: var(--ink-soft); display: flex;
  align-items: center; justify-content: space-between; gap: 14px; flex-direction: row; }
.if-screener label > span { flex: 1 1 auto; min-width: 0; line-height: 1.4; }
.if-screener select { flex: 0 0 auto; width: 140px; border: 1px solid var(--border-strong);
  border-radius: 8px; padding: 8px 10px; font-size: 13px; font-family: var(--sans);
  background: var(--surface); color: var(--ink); cursor: pointer; }
@media (max-width: 520px) {
  .if-screener label { flex-direction: column; align-items: stretch; gap: 6px; }
  .if-screener select { width: 100%; }
}

/* Study-team candidate review board */
.sec-title { display: flex; align-items: center; gap: 8px; font-size: 15px; letter-spacing: -.01em;
  margin: 28px 0 14px; color: var(--ink); }
.sec-title .ico { width: 16px; height: 16px; color: var(--accent); }
/* Tabbed queue so Reviewed isn't buried below a long scroll */
.rev-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 22px 0 18px; }
.rev-tab { display: inline-flex; align-items: center; gap: 7px; background: none; border: 0;
  padding: 10px 6px; margin-bottom: -1px; font: inherit; font-size: 14px; font-weight: 600;
  color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; }
.rev-tab .ico { width: 15px; height: 15px; }
.rev-tab:hover { color: var(--ink); }
.rev-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-n { font-size: 12px; background: var(--surface-2); border: 1px solid var(--border);
  color: var(--muted); padding: 1px 8px; border-radius: 999px; font-weight: 700; }
.rev-tab.active .tab-n { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.rev-panel { display: flex; flex-direction: column; gap: 12px; }

/* Horizontal candidate row: id | trial+eligibility | actions */
.cand-row { display: flex; gap: 24px; align-items: flex-start;
  border: 1px solid var(--border-strong); border-radius: 14px; background: var(--surface);
  box-shadow: var(--shadow); padding: 18px 20px; }
.cand-row:hover { box-shadow: var(--shadow-lift); }
.cr-left { width: 180px; flex-shrink: 0; display: flex; flex-direction: column; gap: 9px; }
.cr-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.cr-right { width: 244px; flex-shrink: 0; display: flex; flex-direction: column; gap: 8px;
  padding-left: 20px; border-left: 1px solid var(--border); }
.cr-rec { font-size: 12.5px; display: inline-flex; align-items: center; gap: 5px; }
.cr-rec .ico { width: 14px; height: 14px; }
.cr-right form { width: 100%; margin: 0; }
.cr-right .btn-ok, .cr-right .decline-pop > summary { width: 100%; justify-content: center; }
.cand-details { display: flex; flex-direction: column; gap: 8px; }
.cand-code { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; }
.cand-code .ico { width: 15px; height: 15px; color: var(--accent); }
.cand-demo { font-size: 12px; color: var(--muted); background: var(--surface-2);
  border: 1px solid var(--border); padding: 3px 10px; border-radius: 999px; }
.cand-trial a { font-size: 12px; color: var(--accent); text-decoration: none; }
.cand-title { font-size: 14px; font-weight: 600; line-height: 1.35; margin-top: 2px; }
.cand-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 12.5px; color: var(--muted); }
.cand-meta span { display: inline-flex; align-items: center; gap: 5px; }
.cand-meta .ico { width: 13px; height: 13px; }
.rec-yes { color: var(--green) !important; }
.rec-no { color: var(--faint) !important; }
.cand-elig { display: flex; gap: 8px; flex-wrap: wrap; }
.ec { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.ec-met { background: var(--green-bg); color: var(--green); }
.ec-unk { background: var(--amber-bg); color: var(--amber); }
.ec-no { background: var(--red-bg); color: var(--red); }
.cand-flags { font-size: 12.5px; color: var(--amber); background: var(--amber-bg); border-radius: 8px;
  padding: 8px 10px; display: flex; align-items: center; gap: 6px; }
.cand-flags .ico { width: 14px; height: 14px; }
.cand-detail { border-top: 1px solid var(--border); padding-top: 10px; }
.cand-detail summary { cursor: pointer; font-size: 13px; color: var(--ink-soft); font-weight: 600; }
.cand-rationale { font-size: 13px; color: var(--ink-soft); margin: 8px 0; line-height: 1.5; }
.eb { font-size: 12.5px; margin-top: 8px; }
.eb b { display: block; margin-bottom: 3px; }
.eb-met b { color: var(--green); } .eb-unk b { color: var(--amber); } .eb-no b { color: var(--red); }
.eb ul { margin: 0; padding-left: 18px; color: var(--ink-soft); line-height: 1.5; }
.cand-screener { list-style: none; margin: 8px 0 0; padding: 0; }
.cand-screener li { display: flex; justify-content: space-between; gap: 10px; font-size: 13px;
  padding: 4px 0; border-bottom: 1px solid var(--border); }
.cand-screener li span { color: var(--muted); }
.cand-record { white-space: pre-wrap; font-size: 12px; color: var(--ink-soft); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 8px; padding: 10px; margin: 8px 0 0; }
.cand-actions { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; margin-top: 4px; }
.btn-ok { background: var(--green); color: #fff; border-color: var(--green); }
.btn-ok:hover { filter: brightness(.95); }
.decline-pop summary { list-style: none; }
.decline-pop summary::-webkit-details-marker { display: none; }
.decline-pop form { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.decline-pop input { border: 1px solid var(--border-strong); border-radius: 8px; padding: 6px 9px;
  font-size: 12.5px; font-family: var(--sans); }
.cand-priv { font-size: 11.5px; color: var(--faint); display: flex; align-items: center; gap: 5px; margin: 0; }
.cand-priv .ico { width: 13px; height: 13px; color: var(--green); }
.cand-share { margin: 2px 0; }
.cand-share > summary { list-style: none; cursor: pointer; display: flex; align-items: center;
  gap: 5px; font-size: 12px; font-weight: 600; color: var(--muted); }
.cand-share > summary::-webkit-details-marker { display: none; }
.cand-share > summary:hover { color: var(--accent); }
.cand-share > summary .ico { width: 13px; height: 13px; }
.cand-share-row { display: flex; gap: 6px; margin-top: 8px; }
.cand-share-row input { flex: 1; min-width: 0; font-size: 12px; padding: 6px 8px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface-2); color: var(--muted); font-family: var(--mono); }
.cand-share-hint { display: block; font-size: 11px; color: var(--faint); margin-top: 4px; line-height: 1.4; }
.locked { color: var(--faint); display: inline-flex; align-items: center; gap: 4px; }
.locked .ico { width: 13px; height: 13px; }
@media (max-width: 900px) {
  .cand-row { flex-direction: column; gap: 14px; }
  .cr-left, .cr-right { width: 100%; }
  .cr-left { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
  .cr-right { padding-left: 0; border-left: 0; border-top: 1px solid var(--border); padding-top: 14px; }
}

/* Clickable result cards -> trial detail page (list view) */
.pr-card { transition: border-color .15s, box-shadow .15s, transform .15s; }
.pr-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-lift);
  transform: translateY(-2px); }
.pr-card-title a.pr-card-link { color: inherit; text-decoration: none; }
.pr-card-title a.pr-card-link:hover { color: var(--accent); }
.pr-card-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.pr-view { margin-left: auto; }
.pr-applied-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 13px;
  font-weight: 600; color: var(--green); }
.pr-applied-tag .ico { width: 15px; height: 15px; }

/* Trial detail page - Airbnb-style: info left, apply panel right */
.td-back { max-width: 1320px; margin: 24px auto 0; padding: 0 48px; }
.td-back a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; }
.td-back a:hover { color: var(--accent); }
.td-layout { max-width: 1320px; margin: 12px auto 0; padding: 12px 48px 72px;
  display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 64px; align-items: start; }
.td-main { min-width: 0; }
.td-badges { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.pr-recruiting { font-size: 12px; color: var(--green); display: inline-flex;
  align-items: center; gap: 4px; }
.pr-recruiting .ico { width: 13px; height: 13px; }
.td-title { font-size: 30px; line-height: 1.2; letter-spacing: -.03em; margin: 0 0 16px; }
.td-why { background: var(--accent-soft); color: var(--ink-soft); font-size: 15px;
  padding: 14px 16px; border-radius: 12px; line-height: 1.55; margin-bottom: 24px; }
.td-section { border-top: 1px solid var(--border); padding-top: 20px; margin-top: 20px; }
.td-section h2 { font-size: 18px; letter-spacing: -.02em; margin: 0 0 12px; }
.td-summary { color: var(--ink-soft); font-size: 15px; line-height: 1.65; margin: 0; }
.td-summary-struct { margin: 0; display: flex; flex-direction: column; gap: 14px; }
.td-summary-struct > div { display: grid; grid-template-columns: 160px 1fr; gap: 18px;
  align-items: start; }
.td-summary-struct dt { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--faint); padding-top: 2px; }
.td-summary-struct dd { margin: 0; color: var(--ink-soft); font-size: 15px; line-height: 1.6; }
.td-source { font-size: 12.5px; color: var(--faint); margin: 16px 0 0; line-height: 1.5; }
.td-source a { color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.td-source a:hover { color: var(--accent); }
.td-source a .ico { width: 12px; height: 12px; }
@media (max-width: 640px) {
  .td-summary-struct > div { grid-template-columns: 1fr; gap: 3px; }
}
.td-site, .td-other { color: var(--ink-soft); font-size: 14px; line-height: 1.5;
  margin: 0 0 8px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.td-site .ico { width: 15px; height: 15px; }
.td-other { color: var(--muted); }
.td-facts { display: flex; flex-direction: column; gap: 8px; font-size: 14px;
  color: var(--muted); margin-top: 20px; }
.td-facts span { display: flex; align-items: center; gap: 6px; }
.td-facts .ico { width: 15px; height: 15px; flex-shrink: 0; }
.td-facts a { color: var(--accent); text-decoration: none; }
.td-aside { position: sticky; top: 24px; }
.td-apply { border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  background: var(--surface); box-shadow: var(--shadow-lift); padding: 22px; }
.td-apply-title { font-size: 17px; letter-spacing: -.02em; margin: 0 0 6px;
  display: flex; align-items: center; gap: 7px; }
.td-apply-title .ico { width: 18px; height: 18px; color: var(--accent); }
.td-apply-sub { color: var(--muted); font-size: 13px; line-height: 1.5; margin: 0 0 8px; }
.td-apply .interest-form { margin-top: 6px; background: transparent; border: 0; padding: 0; }
.td-applied { text-align: center; padding: 8px 4px; }
.td-applied-ic { width: 48px; height: 48px; border-radius: 50%; background: var(--green-bg);
  color: var(--green); display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; }
.td-applied-ic .ico { width: 24px; height: 24px; }
.td-applied h3 { margin: 0 0 6px; font-size: 18px; }
.td-applied p { color: var(--muted); font-size: 14px; margin: 0 0 16px; line-height: 1.5; }

@media (max-width: 980px) {
  .td-layout { grid-template-columns: 1fr; gap: 24px; padding: 12px 24px 56px; }
  .td-back { padding: 0 24px; }
  .td-aside { position: static; }
}
