:root {
  /* ============================================================= *
   * SINGLE SOURCE OF TRUTH for the BridgeMD design system.        *
   * All screens must consume these tokens (never hardcode colors, *
   * radii, or shadows). Shared UI lives in templates/_ui.html.    *
   * ============================================================= */

  /* Surfaces & ink ------------------------------------------------ */
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --ink: #0f172a;
  --ink-soft: #334155;
  --muted: #5a6a7e;
  --faint: #94a3b8;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;

  /* Brand & actions (BridgeMD blue) ------------------------------ */
  --accent: #1a6eb0;
  --accent-soft: #e8f2fb;
  --accent-ink: #ffffff;
  --btn: #1a6eb0;
  --btn-hover: #155a90;

  /* Status tones (one per meaning - do not add new greens/reds) --- */
  --green: #16a34a;
  --green-bg: #e7f7ec;
  --ok: var(--green);            /* alias: success == brand green */
  --ok-bg: var(--green-bg);
  --amber: #97620f;
  --amber-bg: #f7efe0;
  --red: #b42a1f;
  --red-bg: #fbeceb;
  --violet: #6d28d9;
  --violet-bg: #f2ecfd;
  --info: #0e7490;
  --info-bg: #e6f6fb;

  /* Soft borders per tone (pair with the -bg fills; used by badges,
   * verdict cards, chips in the study-team app). One per meaning. */
  --brand-border: #c4ddf3;
  --ok-border: #b7e6c6;
  --warn-border: #ecd6ac;
  --danger-border: #ecc4c0;
  --info-border: #b7e0ec;
  --violet-border: #ddd0f5;
  --neutral-bg: #f1f4f8;
  --neutral-border: #e2e8f0;

  /* Radii --------------------------------------------------------- */
  --radius: 16px;
  --radius-sm: 11px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  /* Elevation ----------------------------------------------------- */
  --shadow: 0 1px 2px rgba(17,17,20,.04), 0 10px 26px rgba(17,17,20,.05);
  --shadow-lift: 0 1px 2px rgba(17,17,20,.05), 0 14px 34px rgba(17,17,20,.08);

  /* Spacing scale (use instead of ad-hoc px) ---------------------- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;

  /* Type ---------------------------------------------------------- */
  --mono: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  --sans: "Manrope", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  /* Editorial serif for display headlines - reads authoritative/academic. */
  --serif: "Newsreader", Georgia, "Times New Roman", serif;

  /* Slate ink for display headlines (blue stays the ACTION accent).
   * --display-ink flips light in dark mode via the theme override. */
  --navy: #0f172a;
  --navy-soft: #475569;
  --display-ink: var(--navy);
}

* { 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: #cfe4f5; }

/* ---------- 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(--accent); 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:disabled, .btn[disabled] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn:disabled:active, .btn[disabled]:active { transform: none; }
.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-danger { background: var(--red); color: #fff; border-color: var(--red); }
.btn-danger:hover { filter: brightness(.95); }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }

/* ---------- 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-collapse {
  margin-bottom: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.import-collapse > summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
}
.import-collapse > summary::-webkit-details-marker { display: none; }
.import-collapse > summary .ico { width: 14px; height: 14px; color: var(--accent); }
.import-collapse > summary span { color: var(--faint); font-weight: 600; }
.import-collapse[open] > summary {
  width: 100%;
  border-bottom: 1px solid var(--border);
}
.import-collapse > .import-bar {
  margin-bottom: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 14px 16px;
}

.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: 0; }
.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: 24px; box-shadow: var(--shadow); }
.tool-form label { font-size: 13px; }
.loc-strip { display: flex; gap: 14px; align-items: flex-end; margin-bottom: 22px; }
.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: 30vh; 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: 18px;
  flex-wrap: wrap; }
.toolbar .field { margin: 0; flex: 1 1 240px; min-width: 0; }
.toolbar .field input, .toolbar .field select { width: 100%; }
.toolbar #condition { width: 100%; }
.toolbar #location { width: 220px; }
.toolbar #country { width: 120px; }
.toolbar #radius { width: 120px; }
.toolbar .spacer { display: none; }
.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: 18px; 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); }

/* ---------- Visitors-over-time chart (owner analytics) ---------- */
.ts-card { margin-bottom: 26px; }
.ts-head { display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px; }
.ts-legend { display: inline-flex; align-items: center; gap: 16px; }
.ts-key { display: inline-flex; align-items: center; gap: 6px; font-size: 12px;
  color: var(--muted); font-weight: 600; background: none; border: 0;
  padding: 4px 6px; border-radius: var(--radius); cursor: pointer; font-family: inherit; }
.ts-key:hover { background: var(--surface-2); }
.ts-key.is-off { opacity: .4; }
.ts-key.is-off::before { opacity: .5; }
.ts-key::before { content: ""; width: 12px; height: 3px; border-radius: 2px; }
.ts-key-visitors::before { background: var(--accent); }
.ts-key-searches::before { background: var(--violet); }
.ts-key-applies::before { background: var(--green); }
.ts-chart { position: relative; margin-top: 12px; }
.ts-svg { width: 100%; height: 260px; display: block; overflow: visible; }
.ts-grad-top { stop-color: var(--accent); stop-opacity: .22; }
.ts-grad-bot { stop-color: var(--accent); stop-opacity: 0; }
.ts-area { fill: url(#tsGrad); stroke: none; }
.ts-line { fill: none; stroke-width: 2.5; vector-effect: non-scaling-stroke;
  stroke-linejoin: round; stroke-linecap: round; }
.ts-line-visitors { stroke: var(--accent); }
.ts-line-searches { stroke: var(--violet); stroke-width: 2; stroke-dasharray: 1 6; }
.ts-line-applies { stroke: var(--green); stroke-width: 2; }
.ts-gridline { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.ts-ylabel { fill: var(--faint); font-size: 11px; font-family: var(--sans); }
.ts-cursor { stroke: var(--border-strong); stroke-width: 1;
  vector-effect: non-scaling-stroke; stroke-dasharray: 3 3; }
.ts-dot-visitors { fill: var(--surface); stroke: var(--accent); stroke-width: 2.5; }
.ts-xaxis { display: flex; justify-content: space-between; margin-top: 6px;
  font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.ts-xaxis span { flex: 1; }
.ts-tip { position: absolute; top: 6px; transform: translateX(-50%);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lift);
  padding: 8px 10px; font-size: 12px; color: var(--ink); pointer-events: none;
  white-space: nowrap; z-index: 5; }
.ts-tip b { display: block; margin-bottom: 4px; color: var(--muted);
  font-weight: 600; font-size: 11px; }
.ts-tip span { display: flex; align-items: center; gap: 6px;
  font-variant-numeric: tabular-nums; }
.ts-sw { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.ts-sw-visitors { background: var(--accent); }
.ts-sw-searches { background: var(--violet); }
.ts-sw-applies { background: 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; } }
/* Branded "pulse" loader: an accent core that gently breathes, with concentric
   rings radiating out (radar/heartbeat feel). All colors derive from --accent. */
.loading-spark { position: relative; width: 44px; height: 44px; margin: 6px auto 24px;
  border-radius: var(--radius-pill); background: var(--accent);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 32%, transparent);
  animation: spark-pulse 1.4s ease-in-out infinite; }
.loading-spark::before, .loading-spark::after { content: ""; position: absolute;
  inset: -2px; border-radius: var(--radius-pill); border: 2px solid var(--accent);
  animation: spark-ring 1.8s cubic-bezier(.22,.61,.36,1) infinite; }
.loading-spark::after { animation-delay: .9s; }
@keyframes spark-pulse { 0%,100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(.84); opacity: .92; } }
@keyframes spark-ring { 0% { transform: scale(.85); opacity: .5; }
  100% { transform: scale(2.3); opacity: 0; } }
.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: var(--surface-2); border-radius: var(--radius-pill);
  overflow: hidden; margin: 22px 0 12px; }
.progress-bar { position: relative; height: 100%; width: 0%; border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--btn-hover), var(--accent)); 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%); } }
@media (prefers-reduced-motion: reduce) {
  .loading-spark, .loading-spark::before, .loading-spark::after,
  .progress-bar::after { animation: none; }
}

/* ---------- 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; }
/* Full-color brand/product marks (Google, Zoom, PDF, …). Colors live in the SVG
   itself, so we don't force currentColor stroke/fill like line icons do. */
.brand-ico { width: 18px; height: 18px; stroke: none;
  flex-shrink: 0; display: inline-block; vertical-align: -4px; }
.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; }
  .workflow-row { flex-direction: column; }
  .workflow-shell .workflow-chips { width: 100%; }
  .import-collapse > summary { width: 100%; }
  .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: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: 16px; padding: 14px 40px; }
.pub-nav .brand { justify-self: start; }
.pub-nav-center { display: flex; align-items: center; gap: 4px; justify-self: center; }
.pub-nav-center a { color: var(--muted); text-decoration: none; font-weight: 500;
  font-size: 14px; padding: 7px 12px; border-radius: var(--radius-sm); }
.pub-nav-center a:hover { color: var(--ink); background: var(--surface-2); text-decoration: none; }
.pub-nav-alerts { display: inline-flex; align-items: center; gap: 6px; }
.pub-nav-alerts .ico { width: 15px; height: 15px; }
.pub-nav-auth { display: flex; align-items: center; gap: 14px; justify-self: end; }
.pub-nav-auth a { color: var(--muted); text-decoration: none; font-weight: 500; font-size: 14px; }
.pub-nav-auth a:hover { color: var(--ink); }
.pub-nav-auth .pub-signup { color: var(--accent-ink); border-radius: var(--radius-pill); }
.pub-nav-auth .pub-signup:hover { color: var(--accent-ink); text-decoration: none; }
/* Legacy right-aligned nav container (kept for any page not yet migrated). */
.pub-nav-links { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
.nav-user { display: inline-flex; align-items: center; gap: 7px; font-size: 13px;
  color: var(--ink-soft); padding: 3px 11px 3px 3px; border: 1px solid var(--border);
  border-radius: 999px; background: var(--surface, #fff); }
.nav-user .ico { width: 15px; height: 15px; color: var(--muted); }
.nav-user b { font-weight: 700; color: var(--ink); }
.nav-user-av { width: 24px; height: 24px; border-radius: 50%; background: var(--accent);
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex: none; }
.nav-user em { font-style: normal; font-size: 11px; color: var(--faint);
  border: 1px solid var(--border); border-radius: 999px; padding: 2px 7px; }
.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: 2px 32px 10px; display: flex; justify-content: center; }
.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; }
.demo-lane-picker { display: inline-flex; align-items: center; gap: 8px; }
.demo-lane-form { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.demo-lane-select { border: 1px solid #e1e3ea; background: #fff; color: var(--ink-soft);
  border-radius: 999px; padding: 6px 12px; font-size: 12.5px; font-weight: 600;
  font-family: var(--sans); min-width: 260px; outline: 0; }
.demo-lane-select:focus { border-color: #ced4e3; box-shadow: 0 0 0 3px rgba(47, 99, 255, .12); }
.demo-lane-go { width: 32px; height: 32px; border-radius: 999px; border: 1px solid #e1e3ea;
  background: #fff; color: var(--muted); display: inline-flex; align-items: center;
  justify-content: center; cursor: pointer; }
.demo-lane-go:hover { color: var(--ink); border-color: #ced4e3; }
.demo-lane-go .ico { width: 14px; height: 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; }
.side-pov .demo-lane-picker { width: 100%; flex-direction: column; align-items: stretch; }
.side-pov .demo-lane-form { width: 100%; }
.side-pov .demo-lane-select { width: 100%; border-radius: 10px; min-width: 0; }
.side-pov .demo-lane-go { flex: 0 0 auto; border-radius: 10px; }
.pub-main { min-height: 60vh; }

/* Simple traction cards (home) */
.traction { padding: 8px 32px 52px; }
.traction-in { max-width: 1120px; margin: 0 auto; }
.traction-eyebrow { text-align: center; font-size: 12px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 16px; }
.traction-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.traction-card { border: 1px solid var(--border); border-radius: 14px;
  padding: 24px 20px; background: var(--surface); text-align: center; }
.traction-num { display: block; font-family: 'Manrope', system-ui, sans-serif;
  font-size: 34px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); line-height: 1; }
.traction-label { display: block; margin-top: 8px; font-size: 13px; color: var(--muted); line-height: 1.4; }
@media (max-width: 720px) { .traction-grid { grid-template-columns: 1fr 1fr; } }
body.demo-home .pub-nav { padding-bottom: 12px; border-bottom: 1px solid var(--border); }
body.demo-home .pub-nav-tools { max-width: 1120px; padding-top: 8px; padding-bottom: 6px; }
body.demo-home .pov-tools { background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 10px; box-shadow: var(--shadow); }
body.demo-home .hero { max-width: 1180px; padding: 44px 24px 24px; }
body.demo-home .hero-in { max-width: 900px; margin: 0 auto; }
body.demo-home .hero h1 { font-size: 58px; line-height: 1.02; }
body.demo-home .hero-sub { max-width: 700px; }
body.demo-home .hero-search { max-width: 680px; margin-top: 14px; }

/* Hero */
.hero { max-width: 1080px; margin: 0 auto; padding: 64px 24px 28px; text-align: center;
  position: relative; box-sizing: border-box;
  /* Fill the first screen so the sections below (how-it-works, FAQ, trials
     near you) only appear once you scroll - the page reads as a single clean
     hero on load. Uses svh so mobile browser chrome doesn't cause a peek. */
  min-height: calc(100vh - 64px);
  min-height: calc(100svh - 64px); }
/* Subtle academic halo behind the hero for depth (restrained, not flashy). */
.hero::before { content: ""; position: absolute; inset: 0 0 auto; height: 340px; z-index: -1;
  background: radial-gradient(58% 100% at 50% 0, var(--accent-soft), transparent 72%);
  opacity: .7; pointer-events: none; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px;
  font-weight: 600; letter-spacing: .11em; text-transform: uppercase; color: var(--navy-soft);
  padding: 6px 15px; border: 1px solid var(--border); border-radius: var(--radius-pill);
  background: var(--surface); box-shadow: var(--shadow); }
.hero-eyebrow .ico { width: 14px; height: 14px; color: var(--accent); }
.hero h1 { font-family: var(--sans); font-size: 58px; line-height: 1.04; letter-spacing: -.035em;
  margin: 20px auto 0; font-weight: 800; color: var(--display-ink); max-width: 15ch; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-sub { font-size: 18.5px; color: var(--muted); max-width: 600px; margin: 18px auto 0;
  line-height: 1.6; }

/* Stats bar - three credibility cells with hairline dividers (design homepage). */
.hero-stats { display: inline-flex; align-items: stretch; gap: 1px; margin: 22px auto 0;
  border: 1px solid var(--border); background: var(--border);
  border-radius: var(--radius-sm); overflow: hidden; }
.hero-stat { display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; padding: 10px 20px; background: var(--surface); min-width: 132px; }
.hero-stat-v { font-size: 17px; font-weight: 800; letter-spacing: -.02em; color: var(--ink);
  line-height: 1.1; }
.hero-stat-v.hero-stat-green { color: var(--green); }
.hero-stat-l { font-size: 11.5px; color: var(--faint); line-height: 1.25; text-align: center; }

/* Search card - wraps the mode toggle, search bar and "use my location". */
.hero-card { max-width: 780px; margin: 24px auto 0; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 2px 20px rgba(15,23,42,.06), 0 1px 4px rgba(15,23,42,.04);
  padding: 20px; text-align: left; }
.hero-card .search-modes { margin: 0 0 14px; }
.hero-card .hero-search { margin: 0; box-shadow: 0 1px 2px rgba(15,23,42,.04);
  border-color: var(--border); }
.hero-card .hero-search:focus-within { box-shadow: 0 0 0 3px var(--accent-soft); }
.hero-card .hero-loc-actions { justify-content: flex-end; margin: 8px 0 0; }
.hero-card .hero-hint { text-align: left; margin: 10px 0 0; }

/* Single trust line under the search card (design homepage). */
.hero-trust { max-width: 640px; margin: 22px auto 0; text-align: center;
  font-size: 12.5px; color: var(--faint); line-height: 1.6; }
.hero-trust a { color: var(--faint); text-decoration: underline; }
.hero-trust a:hover { color: var(--muted); }

@media (max-width: 640px) {
  .hero-stats { width: 100%; }
  .hero-stat { flex: 1 1 0; min-width: 0; padding: 10px 8px; }
  .hero-stat-l { font-size: 10.5px; }
  .hero-card { padding: 16px; }
}

/* ==========================================================================
   Homepage single-screen layout (1:1 with the Figma): nav / vertically-centered
   hero / pinned footer bar, all inside one viewport. Scoped to body.home-screen
   so no other page is affected. The Figma is set in Inter on a flat #f8fafc bg.
   ========================================================================== */
body.home-screen { display: flex; flex-direction: column; min-height: 100vh;
  background: var(--bg);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
/* Grow to fill tall screens (pins the footer to the bottom) but never shrink
   below the hero's natural height - otherwise short viewports clip the footer
   instead of scrolling. */
body.home-screen .pub-main { flex: 1 0 auto; display: flex; flex-direction: column; }
body.home-screen .landing-legal { flex-shrink: 0; }
body.home-screen .hero { flex: 1 1 auto; display: flex; align-items: center; justify-content: center;
  max-width: none; margin: 0; padding: 10px 24px 12px; }
body.home-screen .hero::before { display: none; }          /* flat background, no halo */
body.home-screen .hero-in { max-width: 820px; width: 100%; margin: 0 auto; }
body.home-screen .hero h1 { font-family: inherit; max-width: none; margin: 0 auto;
  font-size: 42px; line-height: 1.05; letter-spacing: -.03em; font-weight: 800; white-space: nowrap; }
body.home-screen .hero-sub { font-size: 15.5px; margin-top: 8px; }
body.home-screen .hero-hint { display: none; }             /* Figma has no hint line */
body.home-screen .hero-stats { margin-top: 10px; }
body.home-screen .hero-stat { padding: 6px 16px; }
body.home-screen .hero-card { margin-top: 10px; padding: 14px; }
body.home-screen .hero-card .search-modes { margin-bottom: 8px; }
body.home-screen .hero-trust { margin-top: 8px; }

/* Trending: sentence-case inline label + chips (not the uppercase pill label).
   Keep it to a single row on the home screen so it never adds variable height
   (extra chips clip gracefully instead of wrapping and pushing the footer). */
body.home-screen .chips-block { margin-top: 10px; }
body.home-screen .chip-row { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px;
  overflow: hidden; }
body.home-screen .chip-cluster { flex-wrap: nowrap; overflow: hidden; }
body.home-screen .chip-label { text-transform: none; letter-spacing: 0; font-size: 14px;
  font-weight: 500; color: var(--faint); padding: 0; gap: 0; justify-content: flex-start; }
body.home-screen .chip-label::after { content: ":"; }

/* Legal line becomes the pinned full-width footer bar (matches the Figma footer). */
body.home-screen .landing-legal { margin: 0; max-width: none; width: 100%;
  padding: 9px 40px; background: var(--surface);
  border-top: 1px solid var(--border); display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: 6px 24px; text-align: left;
  box-sizing: border-box; }
body.home-screen .landing-legal-disc { margin: 0; flex: 1 1 420px; font-size: 12px;
  color: var(--faint); max-width: 720px; line-height: 1.5; }
body.home-screen .landing-legal-links { margin: 0; flex: 0 0 auto; font-size: 12px; white-space: nowrap; }

@media (max-width: 760px) {
  body.home-screen .hero { padding: 22px 16px; }
  body.home-screen .hero h1 { font-size: 32px; white-space: normal; }
  body.home-screen .hero-sub { font-size: 15.5px; }
  body.home-screen .landing-legal { padding: 14px 16px; }
  /* On phones the page scrolls anyway, so let chips wrap instead of clipping. */
  body.home-screen .chip-row, body.home-screen .chip-cluster {
    flex-wrap: wrap; overflow: visible; }
}

/* Trust bar - light inline credibility markers directly under the hero. */
.trust-bar { max-width: 900px; margin: 40px auto 0; padding: 0 24px; }
.trust-bar-in { display: flex; flex-wrap: wrap; justify-content: center;
  align-items: center; gap: 12px 28px; }
.trust-item { display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--muted); line-height: 1.4; }
.trust-item b { color: var(--ink-soft); font-weight: 600; }
.trust-item .ico { width: 15px; height: 15px; color: var(--accent); flex-shrink: 0; }
@media (max-width: 720px) {
  .trust-bar-in { flex-direction: column; align-items: flex-start; gap: 12px; }
}
/* Search: one cohesive, elevated bar - [condition | location | Find] - so the
 * entry point reads as a single confident instrument (Airbnb/Google style). */
.hero-search { display: flex; align-items: stretch; gap: 4px; max-width: 760px;
  margin: 22px auto 0; padding: 7px; background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
  transition: border-color .15s ease, box-shadow .15s ease; }
.hero-search:focus-within { border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow-lift); }
.hero-search-query { flex: 1.7 1 0; min-width: 0; display: flex; }
.hero-search-loc { flex: 1 1 0; min-width: 0; display: flex; position: relative; }
.hero-search-loc::before { content: ""; align-self: center; width: 1px; height: 26px;
  background: var(--border); flex-shrink: 0; }
/* Segments inside the bar are borderless; the bar itself owns the focus ring. */
.hero-field { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0;
  padding: 0 14px; position: relative; border: 0; border-radius: var(--radius);
  background: transparent; }
.hero-field:focus-within { border: 0; box-shadow: none; }
.hero-field .ico { width: 18px; height: 18px; color: var(--faint); flex-shrink: 0; }
.hero-field input { border: 0; outline: 0; width: 100%; font-size: 16px;
  font-family: var(--sans); background: transparent; padding: 15px 0; color: var(--ink); }
.hero-go { flex-shrink: 0; align-self: stretch; border-radius: var(--radius); }
/* Reassurance: free to use, no gate. */
.hero-free { display: inline-flex; align-items: center; gap: 7px; margin: 14px auto 0;
  font-size: 13px; font-weight: 500; color: var(--muted); }
.hero-free .ico { width: 15px; height: 15px; color: var(--green); }
@media (max-width: 640px) {
  .hero-search { flex-direction: column; gap: 8px; padding: 8px; }
  .hero-search-loc::before { display: none; }
  .hero-search .hero-field { border: 1px solid var(--border); border-radius: var(--radius-sm); }
  .hero-search .hero-field:focus-within { border-color: var(--accent); }
  .hero-go { width: 100%; justify-content: center; }
}
/* The bordered field shows the focus ring (focus-within); inner input stays flat. */
.hero-field input:focus, .hero-field input:focus-visible {
  box-shadow: none; border-color: transparent; outline: none; }
.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: 360px; 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);
  display: flex; align-items: center; gap: var(--space-3); }
.hero-suggest-item:hover, .hero-suggest-item.is-active { background: var(--surface-2); color: var(--ink); }
.hero-suggest-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero-suggest-tag { flex: 0 0 auto; font-size: 10px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; padding: 2px 7px; border-radius: var(--radius-pill);
  background: var(--accent-soft); color: var(--accent); }
.hero-loc-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-loc-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-loc-item:hover, .hero-loc-item.is-active { 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-hint { text-align: center; color: var(--muted); font-size: 13px;
  margin: var(--space-2) auto 0; max-width: 620px; }
.search-modes { display: inline-flex; gap: 4px; margin: 24px auto 10px;
  padding: 3px; border: 1px solid var(--border); border-radius: var(--radius-pill);
  background: var(--surface-2); }
.search-mode { border: 0; background: transparent; padding: 7px 18px;
  border-radius: var(--radius-pill); font-family: var(--sans); font-size: 13.5px;
  font-weight: 600; color: var(--muted); cursor: pointer;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease; }
.search-mode:hover { color: var(--ink); }
.search-mode.is-active { background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 1px 5px rgba(26,110,176,.28); }
.search-mode.is-active:hover { color: var(--accent-ink); }
/* Reusable typeahead dropdown (alerts "new alert" form matches hero search). */
.ac-field { position: relative; }
.ac-suggest { position: absolute; left: 0; right: 0; top: calc(100% + 4px);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lift); max-height: 240px; overflow: auto; padding: 4px; z-index: 30; }
.ac-suggest-item { display: block; width: 100%; text-align: left; border: 0; background: transparent;
  padding: 8px 10px; border-radius: var(--radius-sm); cursor: pointer; font-size: 14px;
  color: var(--ink-soft); font-family: var(--sans); }
.ac-suggest-item:hover, .ac-suggest-item.is-active { background: var(--surface-2); color: var(--ink); }
.presearch-lead { color: var(--muted); font-size: 14px; margin: 0 0 var(--space-4); }
.presearch-grid { display: flex; gap: var(--space-3); }
.presearch-grid label, .presearch-row { display: flex; flex-direction: column; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--ink-soft); flex: 1; }
.presearch-row { margin-top: var(--space-3); }
.presearch-opt { font-weight: 400; color: var(--faint); }
.presearch-grid input, .presearch-grid select, .presearch-row input,
.presearch-row select, .presearch-row textarea { border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 10px 12px; font-size: 14px;
  font-family: var(--sans); outline: 0; background: var(--surface); color: var(--ink); }
.presearch-grid input:focus, .presearch-grid select:focus, .presearch-row input:focus,
.presearch-row select:focus, .presearch-row textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.presearch-row textarea { resize: vertical; }
.presearch-actions { display: flex; gap: var(--space-3); margin-top: var(--space-5); }
.modal-actions { display: flex; gap: var(--space-3); justify-content: flex-end;
  margin-top: var(--space-5); }
.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; }
/* Signed-in home: personal shortcuts + "search again" (no marketing chrome) */
.home-you { display: grid; gap: var(--space-3); margin-top: var(--space-4); }
.home-you-links { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.home-you-link { display: inline-flex; align-items: center; gap: 7px; text-decoration: none;
  font-size: 13.5px; font-weight: 600; color: var(--ink-soft); padding: 8px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--surface);
  transition: border-color .15s, color .15s, background .15s; }
.home-you-link:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.home-you-link .ico { width: 15px; height: 15px; }
.recent-chip { font-family: inherit; }
.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); }

/* Chip / tag input (e.g. multiple conditions on Settings) */
.chips-input { display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  min-height: 46px; padding: 7px 10px; border: 1px solid var(--border-strong);
  border-radius: 10px; background: var(--surface); cursor: text; }
.chips-input:focus-within { border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft); }
.chip-tag { display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 6px 4px 11px; border-radius: 999px; background: var(--accent-soft);
  color: var(--accent); font-size: 13px; font-weight: 600; max-width: 100%; }
.chip-tag > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-x { border: 0; background: transparent; color: inherit; cursor: pointer;
  font-size: 16px; line-height: 1; padding: 0 2px; border-radius: 999px; opacity: .7; }
.chip-x:hover { opacity: 1; }
.chips-entry { flex: 1; min-width: 140px; border: 0 !important; outline: 0;
  background: transparent; padding: 5px 2px !important; font-size: 15px;
  font-family: var(--sans); color: var(--ink); width: auto !important;
  box-shadow: none !important; }
.set-signout { margin-top: var(--space-5); padding-top: var(--space-4);
  border-top: 1px solid var(--border); }
.ui-modal-lead { margin: 0 0 var(--space-4); font-size: 14px; line-height: 1.5;
  color: var(--ink-soft); }
.withdraw-form { display: grid; gap: var(--space-4); }
.withdraw-actions { display: flex; justify-content: flex-end; gap: var(--space-2);
  flex-wrap: wrap; }
.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 .google-mark { width: 18px; height: 18px; display: inline-block; flex: 0 0 18px; }
.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; }
.records-auth-card { max-width: 620px; }
.records-auth-provider {
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}
.records-auth-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.records-auth-label .ico { width: 14px; height: 14px; }
.records-auth-value { margin: 6px 0 4px; font-size: 15px; font-weight: 700; color: var(--ink); }
.records-auth-note { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.45; }
.records-auth-consent { margin: 8px 0 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-check .dot-pay { background: var(--violet); border-radius: 3px; }
.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; }
.pr-notice { display: flex; align-items: flex-start; gap: 10px; font-size: 13px;
  color: var(--ink-soft); line-height: 1.5; background: var(--accent-soft);
  border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px;
  margin-bottom: 18px; }
.pr-notice .ico { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px;
  color: var(--accent); }
.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; }
}
/* Inline "search something new" bar at the top of results - mirrors the homepage
   finder (incl. the By condition / Describe it language toggle) so patients can
   retweak the query + location without leaving the page. */
.pr-topsearch { margin: 0 0 18px; }
/* Reuse the homepage's mode toggle (.search-modes/.search-mode) verbatim; just
   tighten the margin for the results context. */
.pr-topsearch .search-modes { margin: 0 0 8px; }
.pr-topsearch-row { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.pr-topsearch-field { display: flex; align-items: center; gap: 8px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 0 14px;
  transition: border-color .12s ease, box-shadow .12s ease; }
.pr-topsearch-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pr-topsearch-field .ico { width: 17px; height: 17px; color: var(--faint); flex-shrink: 0; }
.pr-topsearch-field input { border: none; background: none; outline: none; padding: 12px 0;
  font: 400 15px/1 var(--sans); color: var(--ink); width: 100%; }
.pr-topsearch-cond { flex: 2 1 260px; position: relative; }
.pr-topsearch-loc { flex: 1 1 180px; }
.pr-topsearch-btn { flex-shrink: 0; white-space: nowrap; }
@media (max-width: 560px) {
  .pr-topsearch-field { flex-basis: 100%; }
  .pr-topsearch-btn { width: 100%; justify-content: center; }
}
.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); }
.fit-unknown { background: var(--neutral-bg); color: var(--muted); }
.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-pay { font-size: 12px; display: inline-flex; align-items: center; gap: 4px;
  border-radius: 999px; padding: 3px 9px; border: 1px solid var(--border); }
.pr-pay .ico { width: 12px; height: 12px; }
.pr-pay-high { background: rgba(56, 189, 248, .1); color: #0369a1; border-color: rgba(3, 105, 161, .2); }
.pr-pay-likely { background: rgba(99, 102, 241, .1); color: #4338ca; border-color: rgba(67, 56, 202, .2); }
.pr-pay-mentioned { background: var(--surface-2); color: var(--muted); }
.pr-benefit { font-size: 12px; display: inline-flex; align-items: center; gap: 4px;
  border-radius: 999px; padding: 3px 9px; border: 1px solid #cde4d8;
  background: #eef8f2; color: #24644a; }
.pr-benefit .ico { width: 12px; height: 12px; }
.pr-benefit-money { border-color: #d9d3f4; background: #f4f1ff; color: #4a3aa8; }
/* Late-stage (Phase 3) + healthy-volunteers card tags - patient-relevant signals
   built from data we already scrape. Tokenized (no raw hex) per UI rules. */
.pr-late { font-size: 12px; font-weight: 600; display: inline-flex; align-items: center;
  gap: 4px; border-radius: 999px; padding: 3px 9px; border: 1px solid var(--info-border);
  background: var(--info-bg); color: var(--info); }
.pr-late .ico { width: 12px; height: 12px; }
.pr-hv { font-size: 12px; display: inline-flex; align-items: center; gap: 4px;
  border-radius: 999px; padding: 3px 9px; border: 1px solid var(--border);
  background: var(--green-bg); color: var(--green); }
.pr-hv .ico { width: 12px; height: 12px; }
.filt-check .dot-hv { background: var(--green); }
/* "Enrolling soon" = not-yet-recruiting but approved and opening (amber, so it
   reads as distinct from actively-recruiting green). */
.pr-soon { font-size: 12px; display: inline-flex; align-items: center; gap: 4px;
  color: var(--amber); }
.pr-soon .ico { width: 12px; height: 12px; }
.pr-card-title { font-size: 18px; line-height: 1.35; letter-spacing: -.02em; margin: 4px 0 10px; }
.pr-official-title { margin: -6px 0 10px; color: var(--faint); font-size: 12.5px; line-height: 1.4; }
.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-benefit-notes { margin: -4px 0 12px; color: var(--ink-soft); font-size: 12.5px; line-height: 1.45; }
/* "Where your search term appears" evidence snippet on a result card. */
.pr-evidence { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  margin: 0 0 12px; padding: 8px 11px; background: var(--neutral-bg);
  border: 1px solid var(--neutral-border); border-radius: var(--radius-sm);
  font-size: 12.5px; line-height: 1.5; }
.pr-ev-field { flex: none; font-weight: 700; font-size: 10.5px; text-transform: uppercase;
  letter-spacing: .05em; color: var(--muted); padding-top: 1px; }
.pr-ev-text { color: var(--ink-soft); }
.pr-evidence mark { background: var(--amber-bg); color: var(--ink); font-weight: 700;
  padding: 0 3px; border-radius: 4px; }
.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 .if-lbl { white-space: nowrap; }
.interest-form .if-lbl .opt { color: var(--faint); font-weight: 400; }
.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); }
/* Inline "verify your email to apply" (anti-bot, no login wall) */
.if-verify { display: grid; gap: var(--space-2); margin: -2px 0 2px; }
.if-verify-row { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.if-verify-hint { font-size: 12px; color: var(--muted); line-height: 1.4; }
.if-verify-hint.is-error { color: var(--red); }
.if-code-row { display: flex; gap: var(--space-2); }
.if-code-row input { flex: 1 1 auto; min-width: 0; letter-spacing: .18em; font-weight: 650;
  text-align: center; }
.if-verified-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 13px;
  font-weight: 650; color: var(--green); background: var(--green-bg); border-radius: var(--radius-sm);
  padding: 7px 11px; align-self: flex-start; }
.if-verified-badge .ico { width: 15px; height: 15px; }
.if-verify-gate { font-size: 12px; color: var(--faint); text-align: center; margin: 6px 0 0; }
.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-wrap { margin-bottom: 12px; }
.cond-item { display: flex; gap: 16px; justify-content: space-between; align-items: flex-start;
  width: 100%; text-align: left; cursor: pointer; font: inherit;
  padding: 18px; border: 1px solid var(--border); border-radius: 12px;
  color: inherit; background: var(--surface); transition: .15s; }
.cond-item:hover { border-color: var(--accent); box-shadow: var(--shadow-lift); }
.cond-item:hover .cond-item-go { color: var(--accent); }
.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-item-go { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px;
  font-size: 12.5px; font-weight: 650; color: var(--muted); transition: color .15s; white-space: nowrap; }
.cond-item-go .ico { width: 13px; height: 13px; }
.cond-item-links { display: flex; flex-wrap: wrap; gap: 16px; margin: 8px 0 0 2px; }
.cond-item-ext, .cond-item-more { display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--faint); text-decoration: none; }
.cond-item-more { color: var(--accent); font-weight: 600; }
.cond-item-ext:hover, .cond-item-more:hover { color: var(--accent); }
.cond-item-ext .ico, .cond-item-more .ico { width: 12px; height: 12px; }
.cond-eu .cond-lead { margin: -4px 0 18px; font-size: 13.5px; }
.cond-eu-geo { display: inline-flex; align-items: center; gap: 5px; margin: 0 !important;
  font-size: 12.5px; color: var(--muted); }
.cond-eu-geo .ico { width: 13px; height: 13px; }
.badge-eu { display: inline-flex; align-items: center; font-size: 11px; font-weight: 700;
  letter-spacing: .02em; padding: 2px 8px; border-radius: var(--radius-pill);
  background: var(--violet-bg); color: var(--violet); }
.cond-cities { max-width: 800px; margin: 40px auto; padding: 0 24px; }
.chip-grid { display: flex; flex-wrap: wrap; gap: 10px; }

/* Condition-page intro copy + FAQ (SEO body content + FAQPage rich results) */
.cond-intro { max-width: 800px; margin: 8px auto 0; padding: 0 24px; }
.cond-intro p { color: var(--muted); font-size: 15px; line-height: 1.7; margin: 0;
  max-width: 720px; }
.cond-intro strong { color: var(--ink); font-weight: 650; }
.cond-faq { max-width: 800px; margin: 40px auto; padding: 0 24px; }
.cond-faq h2 { font-size: 22px; letter-spacing: -.02em; margin: 0 0 16px; }
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item { border: 1px solid var(--border); border-radius: 12px; background: var(--surface);
  padding: 4px 18px; }
.faq-item > summary { cursor: pointer; list-style: none; padding: 14px 0;
  font-size: 15.5px; font-weight: 650; color: var(--ink); display: flex;
  justify-content: space-between; align-items: center; gap: 12px; }
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::after { content: "+"; color: var(--faint); font-weight: 400;
  font-size: 20px; line-height: 1; }
.faq-item[open] > summary::after { content: "\2013"; }
.faq-item > p { margin: 0 0 16px; color: var(--muted); font-size: 14.5px; line-height: 1.65; }

/* ---------- Per-study SEO page ---------- */
.study { max-width: 1180px; margin: 0 auto; padding: 32px 32px 8px; }
.study-head { margin: 8px 0 24px; }
.study-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.study-cond { font-size: 12px; font-weight: 600; color: var(--muted); }
.study-head h1 { font-size: 30px; letter-spacing: -.03em; line-height: 1.15; margin: 0 0 12px; }
.study-official { font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; margin: 0 0 10px; }
.study-official span { font-weight: 700; color: var(--faint); text-transform: uppercase;
  letter-spacing: .05em; font-size: 11px; margin-right: 6px; }
.study-id { font-size: 12.5px; color: var(--faint); margin: 0; }
.study-grid { display: grid; grid-template-columns: 1fr 320px; gap: 28px; align-items: start; }
.study-block { margin-bottom: 28px; }
.study-block h2 { font-size: 19px; letter-spacing: -.02em; margin: 0 0 12px; }
.study-block h3 { font-size: 14px; margin: 16px 0 8px; color: var(--ink-soft); }
.study-block p { color: var(--ink-soft); line-height: 1.6; margin: 0 0 8px; }
.study-meta > div { display: flex; flex-direction: column; gap: 2px; }
.sf-l { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); }
.sf-v { font-size: 14px; color: var(--ink); font-weight: 600; }
.study-note { font-size: 12.5px; color: var(--faint); font-style: italic; }
.study-drug { background: var(--accent-soft); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px; margin: 0 0 16px; }
.study-drug h3 { display: flex; align-items: center; gap: 7px; margin: 0 0 6px;
  font-size: 15px; color: var(--ink); font-weight: 700; }
.study-drug h3 .ico { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; }
.study-drug p { color: var(--ink-soft); line-height: 1.6; margin: 0 0 6px; }
.study-drug-aka { font-size: 13px; color: var(--faint); }
.study-drug-note { font-size: 12px; color: var(--faint); font-style: italic; margin: 6px 0 0; }
.study-locs { list-style: none; margin: 0; padding: 0; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.study-locs li { display: flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--ink-soft); }
.study-locs .ico { width: 14px; height: 14px; color: var(--accent); flex-shrink: 0; }
.study-faq { border-top: 1px solid var(--border); padding: 12px 0; }
.study-faq summary { cursor: pointer; font-weight: 600; color: var(--ink); list-style: none; }
.study-faq summary::-webkit-details-marker { display: none; }
.study-faq summary::after { content: "+"; float: right; color: var(--faint); font-weight: 400; }
.study-faq[open] summary::after { content: "\2212"; }
.study-faq p { margin: 10px 0 0; }
.study-side { display: grid; gap: 16px; position: sticky; top: 88px; }
.study-cta { padding: 20px; }
.study-cta h2 { font-size: 17px; margin: 0 0 6px; }
.study-cta p { font-size: 13px; color: var(--muted); margin: 0 0 14px; line-height: 1.45; }
.study-cta .hero-field { margin-bottom: 10px; }
.study-cta .loc-use { margin: 10px auto 0; }
.study-ext { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px;
  font-size: 12.5px; color: var(--faint); text-decoration: none; }
.study-ext:hover { color: var(--accent); }
.study-ext .ico { width: 13px; height: 13px; }
.study-meta { padding: 16px 20px; display: grid; gap: 12px; }
.study-disc { max-width: 1180px; margin: 24px auto 0; padding: 0 32px; font-size: 12px;
  color: var(--faint); line-height: 1.5; }
@media (max-width: 820px) {
  .study-grid { grid-template-columns: 1fr; }
  /* Float the eligibility CTA to the top on phones so the primary action isn't
     buried under the full article; the sponsor/meta card stays below content. */
  .study-side { position: static; display: contents; }
  .study-cta { order: -1; margin-bottom: 8px; }
  .study-meta { order: 1; }
}

/* 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; }
.pub-foot-legal { max-width: 1180px; margin: 0 auto; padding: 0 32px 22px;
  font-size: 12px; color: var(--faint); line-height: 1.55; }
.pub-foot-disc { margin: 0 0 6px; max-width: 720px; }
.pub-foot-links a { color: var(--muted); text-decoration: none; }
.pub-foot-links a:hover { color: var(--ink); text-decoration: underline; }

/* Home-page compact legal footer */
.landing-legal { max-width: 900px; margin: 48px auto 0; padding: 22px 24px 40px;
  text-align: center; color: var(--faint); font-size: 12.5px; line-height: 1.6; }
.landing-legal-disc { margin: 0 0 8px; max-width: 680px; margin-inline: auto; }
.landing-legal-links a { color: var(--muted); text-decoration: none; }
.landing-legal-links a:hover { color: var(--ink); text-decoration: underline; }

/* Privacy / Terms prose pages */
.legal-page { max-width: 760px; margin: 0 auto; padding: 40px 24px 64px; }
.legal-page h1 { font-size: 28px; margin: 0 0 6px; }
.legal-page h2 { font-size: 17px; margin: 28px 0 8px; }
.legal-page p, .legal-page li { color: var(--ink-soft); line-height: 1.65; font-size: 14.5px; }
.legal-page ul { padding-left: 20px; margin: 8px 0; }
.legal-page li { margin: 6px 0; }
.legal-page a { color: var(--accent); }
.legal-lead { color: var(--muted) !important; font-size: 14px !important; }
.legal-contact { margin-top: 28px; font-weight: 600; }
.legal-foot { margin-top: 8px; color: var(--muted); }

/* Signup consent */
.auth-consent { display: flex; gap: 9px; align-items: flex-start; margin: 4px 0 14px;
  font-size: 12.5px; color: var(--ink-soft); line-height: 1.5; cursor: pointer; }
.auth-consent input { margin-top: 2px; flex: none; }
.auth-consent a { color: var(--accent); }

@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-nav-tools .demo-lane-picker { width: 100%; flex-direction: column; align-items: stretch; gap: 6px; }
  .pub-nav-tools .demo-lane-form { width: 100%; }
  .pub-nav-tools .demo-lane-select { width: 100%; border-radius: 10px; min-width: 0; }
  .pub-nav-tools .demo-lane-go { border-radius: 10px; }
  body.demo-home .pov-tools { border-radius: 12px; padding: 10px; box-shadow: none; }
  body.demo-home .hero { padding-top: 30px; }
  body.demo-home .hero h1 { font-size: 42px; line-height: 1.08; }
  .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; }
  .pub-foot-tools .demo-lane-picker { width: 100%; flex-direction: column; align-items: stretch; gap: 6px; }
  .pub-foot-tools .demo-lane-form { width: 100%; }
  .pub-foot-tools .demo-lane-select { width: 100%; border-radius: 10px; min-width: 0; }
  .pub-foot-tools .demo-lane-go { border-radius: 10px; }
  .hero h1 { font-size: 36px; }
  .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); }

/* Alert quality controls: radius + strong-fit + live preview */
.alert-radius-in { display: inline-flex; align-items: stretch; gap: 0; }
.alert-radius-in input { width: 68px; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.alert-radius-in select { padding: 8px 6px; border: 1px solid var(--border-strong);
  border-left: none; border-radius: 0 10px 10px 0; background: var(--surface-2);
  font-size: 13px; color: var(--ink); }
.alert-strong-check { display: flex; align-items: center; gap: 8px; margin: 12px 2px 0;
  font-size: 12.5px; color: var(--ink-soft); cursor: pointer; }
.alert-strong-check input { accent-color: var(--accent); }
.alert-tune { display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-4); flex-wrap: wrap;
  margin: var(--space-4) 0 0; padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface-2); }
.alert-tune-fields { display: flex; align-items: center; gap: var(--space-5);
  flex-wrap: wrap; }
.alert-tune-actions { display: flex; align-items: center; gap: var(--space-2); }
.alert-tune-field { display: flex; align-items: center; gap: var(--space-2);
  font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.alert-tune input[type="number"] { padding: 8px 10px; border: 1px solid var(--border-strong);
  border-radius: 10px; font-size: 13px; }
.alert-tune .alert-strong-check { margin: 0; }
.alert-preview { margin: 12px 0 0; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: 12px; background: var(--green-bg); }
.alert-preview-lbl { margin: 0 0 8px; font-size: 12.5px; font-weight: 700; color: var(--ink); }
.alert-preview-loading { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.alert-preview-list { list-style: none; margin: 0; padding: 0; display: flex;
  flex-direction: column; gap: 6px; }
.alert-preview-list li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.alert-preview-list a { color: var(--ink); font-weight: 500; text-decoration: none; }
.alert-preview-list a:hover { color: var(--accent); text-decoration: underline; }
.alert-preview-strong { font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .04em; color: #0b7a4b; background: #d6f3e4; padding: 2px 6px;
  border-radius: 999px; }

/* Post-apply opt-in offer (thanks page) */
.thanks-alert { max-width: 460px; margin: 22px auto 0; padding: 16px 18px; text-align: left;
  border: 1px solid var(--border-strong); border-radius: 16px; background: var(--surface-2); }
.thanks-alert-body { display: flex; gap: 12px; align-items: flex-start; }
.thanks-alert-body .ico { width: 22px; height: 22px; flex: 0 0 auto; color: var(--accent); }
.thanks-alert-body b { font-size: 14.5px; }
.thanks-alert-body p { margin: 4px 0 0; font-size: 13px; color: var(--ink-soft); line-height: 1.5; }
.thanks-alert .btn { margin-top: 14px; width: 100%; }
.thanks-alert-skip { display: block; margin-top: 8px; font-size: 11.5px; color: var(--faint);
  text-align: center; }

/* 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; }
.app-support-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 2px; }
.app-support-card { border: 1px solid var(--border-strong); border-radius: 12px; padding: 11px 12px;
  background: #fff; display: flex; flex-direction: column; gap: 8px; }
.support-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.support-grid input { min-width: 0; padding: 8px 9px; border: 1px solid var(--border-strong);
  border-radius: 9px; font: inherit; font-size: 12.5px; background: #fff; }
.support-grid input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(90,101,240,.12); }
.support-grid .support-span { grid-column: 1 / -1; }
.support-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; margin-top: 2px; }

/* 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; }

/* Pre-screen readiness estimate (patient application) */
.app-readiness { margin: 4px 0 16px; padding: 14px 16px; border-radius: 12px;
  border: 1px solid var(--border-strong); background: var(--surface-2); }
.rd-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rd-label { display: inline-flex; align-items: center; gap: 7px; font-size: 13px;
  font-weight: 700; color: var(--ink); }
.rd-label .ico { width: 16px; height: 16px; }
.rd-score { font-size: 20px; font-weight: 800; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums; }
.rd-score-max { font-size: 12px; font-weight: 600; color: var(--faint); }
.rd-meter { margin: 10px 0 0; height: 8px; border-radius: 999px; background: var(--border);
  overflow: hidden; }
.rd-meter span { display: block; height: 100%; border-radius: 999px; }
.rd-note { margin: 10px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--ink); }
.rd-confirm { margin: 8px 0 0; }
.rd-confirm summary { font-size: 12.5px; font-weight: 600; color: var(--ink-soft);
  cursor: pointer; }
.rd-confirm ul { margin: 8px 0 0; padding-left: 18px; color: var(--ink-soft);
  font-size: 13px; line-height: 1.5; }
.rd-qform { margin: 10px 0 0; display: flex; flex-direction: column; gap: 10px; }
.rd-qhint { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.rd-q { display: flex; flex-direction: column; gap: 5px; }
.rd-q > span { font-size: 13px; font-weight: 600; color: var(--ink); }
.rd-q input[type="text"] { padding: 9px 11px; border: 1px solid var(--border-strong);
  border-radius: 9px; font-size: 13.5px; font-family: var(--sans); background: var(--surface);
  color: var(--ink); }
.rd-q input[type="text"]:focus { outline: 0; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft); }
.rd-qform .btn { align-self: flex-start; }
.rd-disc { margin: 10px 0 0; font-size: 11.5px; color: var(--faint); line-height: 1.4; }
.rd-strong .rd-score { color: #0b7a4b; }
.rd-strong .rd-meter span { background: #16a06a; }
.rd-good .rd-score { color: #b06d0a; }
.rd-good .rd-meter span { background: #e0a13a; }
.rd-review .rd-score { color: var(--ink-soft); }
.rd-review .rd-meter span { background: var(--muted); }

/* Read-only "Your answers" on the application */
.app-answers { margin: 0 0 16px; border: 1px solid var(--border-strong);
  border-radius: 12px; background: #fff; overflow: hidden; }
.app-answers > summary { display: flex; align-items: center; gap: 7px; padding: 12px 15px;
  font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; list-style: none; }
.app-answers > summary::-webkit-details-marker { display: none; }
.app-answers > summary .ico { width: 15px; height: 15px; color: var(--green); }
.app-answers[open] > summary { border-bottom: 1px solid var(--border); }
.app-answers-list { list-style: none; margin: 0; padding: 4px 0; }
.app-answers-list li { display: flex; align-items: baseline; justify-content: space-between;
  gap: 14px; padding: 9px 15px; font-size: 13.5px; border-top: 1px solid var(--border); }
.app-answers-list li:first-child { border-top: none; }
.aa-q { color: var(--ink-soft); flex: 1; }
.aa-a { font-weight: 600; color: var(--ink); text-align: right; white-space: nowrap; }

/* 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); }
.msg-sending { opacity: .6; }
.msg-failed { outline: 1px solid var(--danger, #d64545); }
.msg-failed .msg-time { color: var(--danger, #d64545); }
/* 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-flex; align-items: center; justify-content: center; margin-left: 6px;
  min-height: 20px; padding: 0 8px; border-radius: 999px; border: 1px solid #e7a7a2;
  background: #fff2f1; color: #b4362b; font-size: 10.5px; font-weight: 700; line-height: 1; 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: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; align-items: start; }
.inv-form label { display: flex; flex-direction: column; gap: 5px; font-size: 13px;
  font-weight: 600; color: var(--muted); }
.inv-form .inv-span { grid-column: 1 / -1; }
.inv-form button.inv-span { justify-self: start; }
.inv-form input, .inv-form textarea { width: 100%; box-sizing: border-box; padding: 10px 13px;
  border: 1px solid var(--border-strong); border-radius: 10px; font: inherit; font-size: 14px; background: #fff; }
@media (max-width: 640px) { .inv-form { grid-template-columns: 1fr; } }
.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); }

/* Ad campaign builder + live post-click preview */
.camp-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 18px; margin-bottom: 18px; align-items: start; }
@media (max-width: 900px) { .camp-grid { grid-template-columns: 1fr; } }
.camp-form { max-width: none; }
.camp-form select { padding: 10px 13px; border: 1px solid var(--border-strong); border-radius: 10px;
  font: inherit; font-size: 14px; background: #fff; }
.camp-dest { border: 1px dashed var(--border-strong); border-radius: 12px; padding: 13px 14px; display: flex;
  flex-direction: column; gap: 12px; background: var(--surface-2); }
.camp-dest-title { font-size: 12px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); }
.camp-dest-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .camp-dest-row { grid-template-columns: 1fr; } }
.camp-compliance { margin: 2px 0 0; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; line-height: 1.4; }
.camp-compliance .ico { width: 14px; height: 14px; flex: none; }

.camp-preview-card { position: sticky; top: 16px; }
.ad-preview { border: 1px solid var(--border-strong); border-radius: 14px; overflow: hidden;
  background: #fff; box-shadow: 0 1px 3px rgba(17,17,20,.07); }
.ad-top { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.ad-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; flex: none; }
.ad-meta { display: flex; flex-direction: column; line-height: 1.25; }
.ad-meta b { font-size: 13.5px; color: var(--ink); }
.ad-sponsored { font-size: 11.5px; color: var(--muted); }
.ad-preview .ad-text { padding: 0 14px 12px; font-size: 13.5px; color: var(--ink); line-height: 1.5; }
.ad-media { height: 150px; background: linear-gradient(135deg, var(--accent-soft), #e8ecff);
  display: flex; align-items: center; justify-content: center; }
.ad-media .ico { width: 40px; height: 40px; color: var(--accent); opacity: .7; }
.ad-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; background: var(--surface-2); border-top: 1px solid var(--border); }
.ad-headline { font-size: 13.5px; font-weight: 800; color: var(--ink); line-height: 1.3; }
.ad-cta { flex: none; border: none; border-radius: 8px; padding: 8px 14px; font: inherit; font-size: 12.5px;
  font-weight: 800; background: var(--accent); color: #fff; cursor: default; }
.camp-link { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.camp-link-title { font-size: 12.5px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.camp-link-title .ico { width: 15px; height: 15px; color: var(--ok, #16a34a); }
.camp-hint { margin: 14px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.camp-link-cell { display: flex; gap: 6px; flex-wrap: wrap; }
.camp-demo-btn { margin-top: 14px; }
.camp-demo-hint { margin: 8px 0 0; font-size: 12px; color: var(--muted); line-height: 1.45; text-align: center; }
.ad-cta[data-flow-open], .ad-cta[data-flow-next] { cursor: pointer; }
.ad-cta[data-flow-open]:hover, .ad-cta[data-flow-next]:hover { filter: brightness(1.06); }

/* Click-to-apply walkthrough modal (phone frame) */
.flow-demo { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 24px; }
.flow-demo[hidden] { display: none; }
.flow-backdrop { position: absolute; inset: 0; background: rgba(17,17,20,.55); backdrop-filter: blur(2px); }
.flow-phone { position: relative; width: 360px; max-width: 100%; max-height: 90vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 26px;
  box-shadow: 0 24px 60px rgba(17,17,20,.35); padding: 18px 16px 20px; }
.flow-x { position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; }
.flow-x:hover { color: var(--ink); }
.flow-x .ico { width: 15px; height: 15px; }
.flow-omni { display: flex; align-items: center; gap: 7px; margin: 0 36px 8px 2px; padding: 7px 12px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; min-width: 0; }
.flow-lock { flex: none; color: var(--muted); }
.flow-url { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.flow-progress { height: 2px; border-radius: 999px; margin: 0 2px 12px; overflow: hidden; }
.flow-progress.loading::after { content: ""; display: block; height: 100%; border-radius: 999px;
  background: var(--accent); animation: flowLoad .5s ease forwards; }
@keyframes flowLoad { from { width: 8%; opacity: 1; } to { width: 100%; opacity: .2; } }
.flow-tap { transition: transform .08s ease; }
.flow-tap:active { transform: scale(.97); }
.flow-steps { display: flex; gap: 6px; justify-content: center; margin: 2px 0 14px; }
.flow-dot { width: 22px; height: 4px; border-radius: 999px; background: var(--border-strong); transition: background .2s; }
.flow-dot.on { background: var(--accent); }
.flow-screen { animation: flowIn .28s ease; }
@keyframes flowIn { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
.flow-label { font-size: 11px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.flow-note { margin: 10px 2px 0; font-size: 12px; color: var(--muted); text-align: center; }
.flow-ad { box-shadow: none; }

.flow-land { text-align: center; padding: 4px 2px; }
.flow-land .inv-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700;
  color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 5px 11px; margin-bottom: 12px; }
.flow-land .inv-badge .ico { width: 14px; height: 14px; }
.flow-land h3 { margin: 0 0 6px; font-size: 17px; line-height: 1.3; }
.flow-land-sub { margin: 0 0 14px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.flow-trial { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; text-align: left; }
.flow-trial b { display: block; font-size: 14px; margin-bottom: 2px; }
.flow-trial span { font-size: 12.5px; color: var(--muted); }

.flow-form { display: flex; flex-direction: column; gap: 11px; }
.flow-prefill { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--ok, #16a34a);
  background: rgba(22,163,74,.09); border-radius: 10px; padding: 9px 11px; line-height: 1.4; }
.flow-prefill .ico { width: 15px; height: 15px; flex: none; }
.flow-fld { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 600; color: var(--muted); }
.flow-fld select, .flow-fld input { padding: 9px 11px; border: 1px solid var(--border-strong); border-radius: 9px;
  font: inherit; font-size: 13px; background: #fff; color: var(--ink); }
.flow-fld-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.flow-consent { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; color: var(--ink); line-height: 1.4; }
.flow-consent input { margin-top: 2px; }

.flow-done { text-align: center; padding: 14px 4px 4px; }
.flow-check { width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 50%; background: rgba(22,163,74,.12);
  color: var(--ok, #16a34a); display: flex; align-items: center; justify-content: center; }
.flow-check .ico { width: 26px; height: 26px; }
.flow-done h3 { margin: 0 0 8px; font-size: 18px; }
.flow-done p { margin: 0 0 16px; font-size: 13px; color: var(--muted); line-height: 1.55; }
.flow-done-actions { display: flex; gap: 8px; justify-content: center; }

[data-theme="dark"] .flow-fld select, [data-theme="dark"] .flow-fld input { background: var(--surface); border-color: var(--border-strong); }

/* 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-2col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 20px; align-items: start; max-width: none; }
.site-form-2col > label { margin: 0; }
.site-form-2col label:has(textarea) { grid-column: 1 / -1; }
.site-form-2col > button, .site-form-2col > .btn { grid-column: 1 / -1; justify-self: start; }
@media (max-width: 720px) { .site-form-2col { grid-template-columns: 1fr; } }
.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%; }
.setup-shell { margin-bottom: 16px; }
.setup-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.setup-tab { border: 1px solid var(--border); background: var(--surface-2); color: var(--muted);
  border-radius: 999px; padding: 7px 11px; font-size: 12.5px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; }
.setup-tab .ico { width: 14px; height: 14px; }
.setup-tab:hover { color: var(--ink); border-color: var(--border-strong); }
.setup-tab.on { background: #fff; color: var(--ink); border-color: #d6dced; box-shadow: 0 1px 2px rgba(17,17,20,.08); }
.setup-count { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px;
  border-radius: 999px; padding: 0 5px; font-size: 11px; font-weight: 700; color: #fff; background: var(--accent); }
.setup-sub { margin: 10px 2px 0; font-size: 12.5px; color: var(--muted); }
.setup-panel[hidden] { display: none !important; }

/* ---- REDCap intake panel (clean fast path; guide lives in a modal) ---- */
.redcap-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.redcap-sub { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); max-width: 60ch; }
.redcap-guide-btn { flex: none; }
.redcap-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.redcap-advanced { border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); padding: 0; }
.redcap-advanced > summary { cursor: pointer; list-style: none; padding: 10px 14px; font-size: 12.5px;
  font-weight: 700; color: var(--muted); }
.redcap-advanced > summary::-webkit-details-marker { display: none; }
.redcap-advanced[open] > summary { border-bottom: 1px solid var(--border); }
.redcap-adv-field { display: block; padding: 12px 14px; }
.redcap-token-hint { display: block; font-size: 11.5px; color: var(--muted); margin-top: 5px; }

/* Guide modal */
.redcap-modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center;
  padding: 20px; }
.redcap-modal[hidden] { display: none; }
.redcap-modal-backdrop { position: absolute; inset: 0; background: rgba(17,17,20,.5); backdrop-filter: blur(2px); }
.redcap-modal-dialog { position: relative; width: min(680px, 100%); max-height: 88vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lift, 0 20px 60px rgba(0,0,0,.25)); }
.redcap-modal-head { position: sticky; top: 0; background: var(--surface); display: flex; align-items: center;
  justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.redcap-modal-head h3 { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 9px; }
.redcap-modal-head .ico { width: 18px; height: 18px; color: var(--accent); }
.redcap-modal-x { border: none; background: transparent; color: var(--muted); cursor: pointer; display: inline-flex;
  padding: 4px; border-radius: 8px; }
.redcap-modal-x:hover { background: var(--surface-2); color: var(--ink); }
.redcap-modal-x .ico { width: 18px; height: 18px; }
.redcap-modal-body { padding: 18px 20px 20px; }
.redcap-help-intro { margin: 0 0 16px; font-size: 13.5px; line-height: 1.55; color: var(--ink-soft, var(--muted)); }
.redcap-help-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .redcap-help-cols { grid-template-columns: 1fr; } }
.redcap-help-part { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.redcap-help-part h4 { margin: 0 0 10px; font-size: 13px; color: var(--accent); }
.redcap-help-part ol { margin: 0; padding-left: 20px; }
.redcap-help-part li { margin: 0 0 9px; line-height: 1.5; font-size: 13px; color: var(--ink); }
.redcap-help-part .clickthis { font-weight: 700; }
.redcap-help-notes { margin-top: 14px; display: grid; gap: 8px; }
.redcap-help-note { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--ink);
  background: var(--green-bg, var(--accent-soft)); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; }
.redcap-help-note .ico { width: 15px; height: 15px; flex: none; color: var(--green, var(--accent)); }
.redcap-it { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 12px; }
.redcap-it > summary { cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.redcap-it p { margin: 8px 0 0; font-size: 12px; line-height: 1.55; color: var(--muted); }

.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; }

.workflow-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.wf-chip { border: 1px solid var(--border); background: var(--surface-2); color: var(--muted);
  border-radius: 999px; padding: 8px 12px; font-size: 12.5px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; }
.wf-chip .ico { width: 14px; height: 14px; }
.wf-chip.active { background: #fff; color: var(--ink); border-color: #d6dced; box-shadow: 0 1px 2px rgba(17,17,20,.08); }
.workflow-shell { padding: 18px 20px; margin-bottom: 14px; }
.workflow-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.workflow-row h2 { margin: 0; font-size: 15px; }
.workflow-sub { margin: 5px 0 0; font-size: 12.5px; color: var(--muted); }
.workflow-shell .workflow-chips { margin-bottom: 0; }
.workflow-hint { margin-top: 10px; margin-bottom: 0; }
.wf-lead { margin: 0 0 12px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.wf-panel[hidden] { display: none !important; }

@media (max-width: 720px) {
  .setup-tab { flex: 1 1 calc(50% - 8px); justify-content: center; }
}

/* 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; }
.ats-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 10px; }
.ats-main h3 { margin: 0 0 3px; font-size: 20px; }
.ats-main p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.ats-main .tagline { margin-top: 4px; }
.ats-badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; max-width: 48%; }
.ats-badges .tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.2;
}
.ats-actions { display: grid; gap: 9px; margin-top: 8px; }
.ats-action { display: flex; flex-direction: column; gap: 6px; }
.ats-action label { margin: 0; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.ats-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ats-row input, .ats-row select { flex: 1 1 140px; min-width: 120px; border: 1px solid var(--border-strong); border-radius: 10px; padding: 9px 10px; font-size: 13px; font-family: var(--sans); background: #fff; }
.ats-row input:focus, .ats-row select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(90,101,240,.12); }
.ats-row .btn { flex: 0 0 auto; }
.ats-advanced { margin-top: 10px; border-top: 1px dashed var(--border); padding-top: 8px; }
.ats-advanced > summary { cursor: pointer; list-style: none; font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.ats-advanced > summary .ico { width: 14px; height: 14px; transition: transform .16s ease; }
.ats-advanced[open] > summary .ico { transform: rotate(180deg); }
.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; }
.ats-list-wrap { padding: 12px; }
.ats-toolbar {
  display: grid;
  grid-template-columns: 2fr repeat(6, minmax(130px, 1fr)) auto;
  gap: 8px;
  margin-bottom: 10px;
}
.ats-toolbar input,
.ats-toolbar select {
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 13px;
  font-family: var(--sans);
  background: #fff;
}
.ats-toolbar input:focus,
.ats-toolbar select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(90,101,240,.12);
}
.ats-table-wrap { overflow-x: auto; }
.ats-table { width: 100%; border-collapse: collapse; min-width: 920px; }
.ats-table th, .ats-table td {
  border-bottom: 1px solid var(--border);
  padding: 10px 8px;
  vertical-align: top;
  text-align: left;
}
.ats-table th {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 700;
}
.ats-table td .tag { margin: 3px 4px 0 0; display: inline-block; }
.ats-row-item:hover { background: rgba(90,101,240,.03); }
.active-bars { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 10px; }
.active-bar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.active-bar .ico { width: 13px; height: 13px; }
.active-bar.needs { background: var(--amber-bg); color: var(--amber); }
.active-bar.ready { background: var(--green-bg); color: var(--green); }
.active-bar.flow { background: var(--surface-2); color: var(--muted); }
.active-group { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.active-fold { border-top: 1px solid var(--border); padding-top: 8px; }
.active-fold > summary { cursor: pointer; list-style: none; }
.active-fold > summary::-webkit-details-marker { display: none; }
.active-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 2px 2px 0;
}
.active-fold[open] > .active-group-head { margin-bottom: 10px; }
.active-group-head h3 {
  margin: 0;
  font-size: 14px;
  letter-spacing: -.01em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.active-group-head h3 .ico { width: 14px; height: 14px; color: var(--accent); }
.active-group-head span {
  font-size: 12px;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 8px;
  font-weight: 700;
}

/* Keep operational badges compact and non-dominant */
.outreach-card .msg-badge {
  margin-left: 0;
  padding: 0 8px;
  font-size: 10px;
}
@media (max-width: 900px) {
  .app-support-grid { grid-template-columns: 1fr; }
  .support-grid { grid-template-columns: 1fr; }
  .support-actions { justify-content: stretch; }
  .support-actions .btn { width: 100%; }
  .ats-head { flex-direction: column; }
  .ats-badges { max-width: none; justify-content: flex-start; }
  .ats-row { flex-direction: column; align-items: stretch; }
  .ats-row .btn { width: 100%; }
  .outreach-grid { grid-template-columns: 1fr; }
  .ats-toolbar { grid-template-columns: 1fr 1fr; }
  .ats-toolbar .btn { width: 100%; }
  .dash-table, .claim-table, .inv-table, .pipeline-lane table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }
}

/* -------------------------------------------------------------------------- */
/* Modern credibility polish (simple, clean, high-trust)                      */
/* Tokens now live in the single :root at the top of this file.               */
/* -------------------------------------------------------------------------- */
h1, h2, h3 {
  letter-spacing: -0.03em;
}

.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(255,255,255,.88);
  border-bottom: 1px solid var(--border);
}
@media (max-width: 760px) {
  .pub-nav { display: flex; flex-wrap: wrap; justify-content: space-between; }
  .pub-nav-center { order: 3; width: 100%; justify-content: flex-start; flex-wrap: wrap; }
}

.hero {
  padding-top: 34px;
}

.home-profile-strip {
  margin: 2px 0 0;
  max-width: none;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}
.home-profile-main p { margin: 0; color: var(--muted); font-size: 12.5px; }
.home-profile-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: .01em;
  font-weight: 600;
}
.home-profile-eyebrow .ico { width: 14px; height: 14px; }
.home-profile-eyebrow b { font-weight: 700; color: var(--ink); }
.home-profile-eyebrow em { font-style: normal; font-size: 11px; color: var(--faint);
  border: 1px solid var(--border); border-radius: 999px; padding: 2px 7px; }
.home-profile-meta { margin-top: 3px; }
.home-profile-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.hero h1 {
  font-size: clamp(36px, 6.2vw, 60px);
  line-height: 1.04;
}

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

@media (max-width: 900px) {
  .home-profile-strip { flex-direction: column; align-items: flex-start; }
  .home-profile-actions { width: 100%; }
}

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

.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; }
/* Application-status pills (distinct from match-likelihood .pill above).
   Base shared with .pill; modifiers below set tone. */
.pill { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 4px 10px;
  border-radius: var(--radius-pill); 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-head { font-size: 13px; font-weight: 700; color: var(--ink);
  line-height: 1.4; }
.if-screener-body { display: grid; gap: 10px; }
.if-q-skel { display: grid; gap: 10px; }
.if-q-skel span { height: 38px; border-radius: 8px; display: block;
  background: linear-gradient(90deg, var(--surface) 25%, var(--border) 37%, var(--surface) 63%);
  background-size: 400% 100%; animation: ifQSkel 1.4s ease infinite; }
.if-q-skel span:nth-child(1) { width: 92%; }
.if-q-skel span:nth-child(2) { width: 86%; }
.if-q-skel span:nth-child(3) { width: 94%; }
.if-q-skel span:nth-child(4) { width: 80%; }
@keyframes ifQSkel { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .if-q-skel span { animation: none; } }
.if-screener-note { font-size: 12px; font-weight: 600; color: var(--ink-soft);
  line-height: 1.4; }
.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; }

/* Global "filter by trial" bar for the candidate card lanes */
.trial-filter-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 0 0 16px; padding: 10px 14px; border: 1px solid var(--border);
  border-radius: 12px; background: var(--surface-2); }
.trial-filter-bar label { display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; color: var(--muted); }
.trial-filter-bar label .ico { width: 15px; height: 15px; }
.trial-filter-bar select { padding: 7px 12px; border: 1px solid var(--border-strong);
  border-radius: 8px; font: inherit; font-size: 13px; background: var(--surface);
  color: var(--ink); max-width: 420px; }
.trial-filter-count { font-size: 12.5px; font-weight: 700; color: var(--accent); }
.trial-empty { margin-top: 4px; }

/* 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: 1240px; margin: 10px auto 0; padding: 10px 48px 64px;
  display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 36px; align-items: start; }
.td-main { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.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-why-neutral { background: var(--neutral-bg); border: 1px solid var(--neutral-border);
  color: var(--ink-soft); }
.td-why-neutral svg { width: 15px; height: 15px; color: var(--muted);
  vertical-align: -2px; margin-right: 4px; }
.td-section { border: 1px solid var(--border); border-radius: 14px; padding: 18px; margin: 0;
  background: var(--surface); box-shadow: 0 1px 2px rgba(17,17,20,.03); }
.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; }
}
/* Public study page: the side-label grid indents the body text and misaligns it
   with the section heading + drug box above. Stack label-over-value so every
   block lines up flush-left and reads like an article, not a form. */
.study .td-summary-struct { gap: 18px; }
.study .td-summary-struct > div { grid-template-columns: 1fr; gap: 4px; }
.study .td-summary-struct dt { padding-top: 0; color: var(--muted); }
/* "In plain terms" panel */
.tp-personal { display: flex; align-items: flex-start; gap: 9px; margin: 0 0 14px;
  padding: 11px 13px; border-radius: 11px; font-size: 13.5px; line-height: 1.5; }
.tp-personal .ico { width: 17px; height: 17px; flex-shrink: 0; margin-top: 1px; }
.tp-personal-ok { background: var(--green-bg); color: var(--ink);
  border: 1px solid #c4e6d6; }
.tp-personal-ok .ico { color: var(--green); }
.tp-personal-warn { background: #fdf3e7; color: var(--ink); border: 1px solid #f0d8b8; }
.tp-personal-warn .ico { color: var(--amber); }
[data-theme="dark"] .tp-personal-warn { background: rgba(224,161,58,.12);
  border-color: rgba(224,161,58,.32); }
.tp-facts { list-style: none; margin: 0 0 14px; padding: 0; display: flex;
  flex-wrap: wrap; gap: 8px; }
.tp-facts li { display: inline-flex; align-items: center; gap: 6px; font-size: 13px;
  font-weight: 500; color: var(--ink); padding: 6px 11px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--surface-2); }
.tp-facts .ico { width: 14px; height: 14px; color: var(--accent); }
.tp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tp-col h3 { display: flex; align-items: center; gap: 7px; font-size: 13.5px;
  margin: 0 0 8px; letter-spacing: -.01em; }
.tp-col h3 .ico { width: 16px; height: 16px; }
.tp-join h3 { color: var(--green); }
.tp-rule h3 { color: var(--red); }
.tp-basics { margin: 0 0 8px; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.tp-col ul { margin: 0; padding-left: 18px; color: var(--ink-soft); font-size: 13.5px;
  line-height: 1.55; display: flex; flex-direction: column; gap: 4px; }
.tp-full { margin-top: 14px; }
.tp-full > summary { font-size: 13px; font-weight: 600; color: var(--muted);
  cursor: pointer; }
.tp-full > summary:hover { color: var(--accent); }
.tp-full-b { margin-top: 12px; font-size: 13px; }
.tp-full-b b { display: block; margin-bottom: 4px; color: var(--ink); }
.tp-full-b ul { margin: 0; padding-left: 18px; color: var(--ink-soft); line-height: 1.55; }
/* Plain "what to expect" stages + placebo callout (layperson education) */
.tp-expect { margin: 4px 0 14px; }
.tp-expect h3, .tp-placebo h3 { display: flex; align-items: center; gap: 7px;
  font-size: 14px; margin: 0 0 10px; letter-spacing: -.01em; color: var(--ink); }
.tp-placebo h3 svg, .tp-placebo h3 .ico { width: 16px; height: 16px; color: var(--accent); }
.tp-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column;
  gap: 10px; counter-reset: step; }
.tp-steps li { position: relative; padding-left: 34px; }
.tp-steps li::before { counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 999px;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
  background: var(--surface-2); color: var(--accent); border: 1px solid var(--border-strong); }
.tp-steps li b { display: block; font-size: 13.5px; color: var(--ink); }
.tp-steps li span { display: block; font-size: 13px; color: var(--ink-soft); line-height: 1.5; }
.tp-note { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); }
.tp-placebo { margin: 4px 0 14px; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: 12px; background: var(--surface-2); }
.tp-placebo p { margin: 0; font-size: 13.5px; color: var(--ink-soft); line-height: 1.6; }
@media (max-width: 640px) { .tp-grid { grid-template-columns: 1fr; } }

.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; }
.site-map-link { color: var(--accent); font-weight: 600; text-decoration: none;
  display: inline-flex; align-items: center; gap: 4px; }
.site-map-link:hover { text-decoration: underline; }
.site-map-link .ico { width: 13px; height: 13px; opacity: .7; }
.site-map-dir { color: var(--accent); font-size: 13px; font-weight: 600;
  text-decoration: none; display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; }
.site-map-dir:hover { background: var(--surface-2); }
.site-map-dir .ico { width: 12px; height: 12px; }
.td-other { color: var(--muted); }
.td-contact-list { display: grid; grid-template-columns: 1fr; gap: 10px; }
.td-contact { border: 1px solid var(--border); background: var(--surface-2); border-radius: 12px; padding: 12px; }
.td-contact-name { margin: 0 0 6px; color: var(--ink); font-size: 14px; }
.td-contact-name span { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-left: 5px; }
.td-contact-lines { margin: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.td-contact-lines a { color: var(--accent); text-decoration: none; }
.td-contact-lines a:hover { text-decoration: underline; }
/* "Who's running this study" card - replaces raw public contacts so patients
   apply through BridgeMD instead of cold-emailing the site (keeps the lead + the
   pre-screen). */
.td-runby { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--border);
  background: var(--surface-2); border-radius: 14px; padding: 14px 16px; }
.td-runby-ic { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid;
  place-items: center; background: var(--accent-bg, var(--surface-2)); color: var(--accent); }
.td-runby-ic svg { width: 18px; height: 18px; }
.td-runby-body { min-width: 0; }
.td-runby-name { margin: 0; color: var(--ink); font-size: 15px; }
.td-runby-name span { font-size: 11px; color: var(--muted); font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em; margin-left: 6px; }
.td-runby-site { margin: 4px 0 0; color: var(--muted); font-size: 13.5px;
  display: flex; align-items: center; gap: 5px; }
.td-runby-site svg { width: 14px; height: 14px; flex: none; }
.td-facts { display: flex; flex-direction: column; gap: 8px; font-size: 14px;
  color: var(--muted); margin-top: 6px; border: 1px solid var(--border); border-radius: 14px;
  padding: 14px 16px; background: var(--surface); }
.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-pay-note { margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.5; }
.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; }
.td-footnote { color: var(--faint); font-size: 12.5px; line-height: 1.55; margin: 2px 2px 0; }

@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; }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

/* Clear keyboard-focus indicator on every interactive element (mouse clicks
   stay clean thanks to :focus-visible). */
a:focus-visible, button:focus-visible, summary:focus-visible,
[role="button"]:focus-visible, [tabindex]:focus-visible,
.btn:focus-visible, .link-btn:focus-visible, .chip:focus-visible,
.side-link:focus-visible, .pov-pill:focus-visible, .theme-toggle:focus-visible,
.toast-close:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
/* Never remove the focus ring when a real keyboard user is navigating. */
main:focus { outline: none; }

/* Screen-reader-only text */
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Skip-to-content link (first tab stop) */
.skip-link {
  position: fixed; left: 12px; top: -80px; z-index: 2000;
  background: var(--accent); color: #fff; padding: 10px 16px; border-radius: 10px;
  font-weight: 700; font-size: 14px; box-shadow: var(--shadow-lift);
  transition: top .16s ease;
}
.skip-link:focus { top: 12px; text-decoration: none; outline: 3px solid #fff; outline-offset: 2px; }

/* Light / dark theme toggle */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 999px; flex-shrink: 0;
  border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--ink-soft); cursor: pointer; padding: 0;
  transition: background .15s, border-color .15s, color .15s;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--faint); }
.theme-toggle .ico { width: 18px; height: 18px; }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: inline-block; }
.side-theme-toggle { margin-top: 10px; }
.theme-toggle-float { position: fixed; top: 16px; right: 16px; z-index: 30; box-shadow: var(--shadow); }

/* ==========================================================================
   Colorblind-safe status cues — never rely on hue alone. The match-quality
   dots get distinct SHAPES, and fit badges carry distinct ICONS (set in the
   templates: check / sparkle / x) plus a defining border.
   ========================================================================== */
.filt-check .dot { border: 1.5px solid rgba(0, 0, 0, .35); box-sizing: border-box; }
.filt-check .dot-good { border-radius: 50%; }                    /* circle */
.filt-check .dot-maybe { border-radius: 2px; }                   /* square */
.filt-check .dot-no { border-radius: 2px; transform: rotate(45deg); } /* diamond */
.fit { border: 1px solid transparent; }
.fit-good { border-color: rgba(21, 122, 91, .45); }
.fit-maybe { border-color: rgba(151, 98, 15, .45); }
.fit-no { border-color: rgba(180, 42, 31, .5); }
.fit-unknown { border-color: var(--neutral-border); }
/* Eligibility count chips (study board) + criteria markers: add a leading
   glyph so met / check-needed / barrier read without color. */
.ec-met::before, .eb-met b::before, .crit.met .lab::before,
.pr-elig-b.good b::before { content: "\2713\00a0"; }   /* ✓ */
.ec-unk::before, .eb-unk b::before, .crit.ask .lab::before,
.pr-elig-b.maybe b::before { content: "?\00a0"; }
.ec-no::before, .eb-no b::before, .crit.fail .lab::before,
.pr-elig-b.no b::before { content: "\2715\00a0"; }     /* ✕ */

/* ==========================================================================
   Mobile fix: the clinician/study top bar (was a non-wrapping row that ran
   ~300px off-screen on phones). Let it wrap and keep nav reachable.
   ========================================================================== */
@media (max-width: 820px) {
  .sidebar { flex-wrap: wrap; gap: 8px 12px; }
  .brand { margin-right: auto; }
  .side-foot { order: 2; margin: 0; gap: 8px; }
  .side-foot .side-theme-toggle { margin-top: 0; }
  .side-pov { order: 3; flex: 1 1 100%; margin-top: 0; padding: 0; }
  .side-nav { order: 4; flex: 1 1 100%; margin-top: 0; flex-wrap: wrap; gap: 6px; }
  .side-nav .side-link { white-space: nowrap; }
  /* Tab bars: scroll horizontally instead of overflowing the page */
  .rev-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; }
  .rev-tab { white-space: nowrap; flex-shrink: 0; }
}

/* ==========================================================================
   Dark mode. Applied when <html data-theme="dark"> (set before paint by the
   inline script in the base templates; defaults to the OS preference). Most of
   the UI is variable-driven, so we redefine the tokens and then patch the few
   places that hardcode light colors.
   ========================================================================== */
[data-theme="dark"] {
  --bg: #0f1115;
  --surface: #171a1f;
  --surface-2: #1e222a;
  --ink: #eceef3;
  --ink-soft: #cfd2db;
  --muted: #9ea1ae;
  --faint: #71747f;
  --border: #2a2e37;
  --border-strong: #3a3f4b;
  --accent: #6bb2e6;
  --accent-soft: #16283a;
  --accent-ink: #0f1115;
  --btn: #2a86c9;
  --btn-hover: #3f97d8;
  --green: #4ecb9c;
  --green-bg: #10261e;
  --amber: #e2ab55;
  --amber-bg: #2a2210;
  --red: #f3897c;
  --red-bg: #2d1613;
  --violet: #b99cf5;
  --violet-bg: #201a33;
  --navy: #aab8d6;
  --navy-soft: #8b9ac0;
  --display-ink: #eef1f8;
  --shadow: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow-lift: 0 1px 2px rgba(0, 0, 0, .5), 0 16px 40px rgba(0, 0, 0, .6);
  color-scheme: dark;
}
[data-theme="dark"] body { background: var(--bg); }
[data-theme="dark"] ::selection { background: #33366a; }

/* Sticky nav glass */
[data-theme="dark"] .pub-nav {
  background: rgba(15, 17, 21, .82);
  border-bottom-color: var(--border);
}

/* Surfaces that hardcode #fff / light backgrounds -> theme surface */
[data-theme="dark"] input[type=text],
[data-theme="dark"] input[type=email],
[data-theme="dark"] input[type=password],
[data-theme="dark"] input[type=number],
[data-theme="dark"] textarea,
[data-theme="dark"] select,
[data-theme="dark"] .btn-ghost,
[data-theme="dark"] .note-big,
[data-theme="dark"] .note-big:focus,
[data-theme="dark"] .hero-term-chip,
[data-theme="dark"] .hero-suggest,
[data-theme="dark"] .hero-field,
[data-theme="dark"] .cond-search,
[data-theme="dark"] .chip,
[data-theme="dark"] .step,
[data-theme="dark"] .auth-google,
[data-theme="dark"] .auth-google .g,
[data-theme="dark"] .records-auth-provider,
[data-theme="dark"] .home-profile-strip,
[data-theme="dark"] .pr-alert-act input,
[data-theme="dark"] .alert-new,
[data-theme="dark"] .alert-card,
[data-theme="dark"] .alert-new-row input,
[data-theme="dark"] .alert-radius-in select,
[data-theme="dark"] .alert-tune,
[data-theme="dark"] .alert-tune input[type="number"],
[data-theme="dark"] .thanks-alert,
[data-theme="dark"] .app-readiness,
[data-theme="dark"] .app-answers,
[data-theme="dark"] .app-support-card,
[data-theme="dark"] .support-grid input,
[data-theme="dark"] .lead-sched-form input,
[data-theme="dark"] .thread-form input,
[data-theme="dark"] .visit-form input,
[data-theme="dark"] .visit-form select,
[data-theme="dark"] .inv-link-row input,
[data-theme="dark"] .inv-form input,
[data-theme="dark"] .inv-form textarea,
[data-theme="dark"] .site-form input,
[data-theme="dark"] .ats-row input,
[data-theme="dark"] .ats-row select,
[data-theme="dark"] .outreach-form input,
[data-theme="dark"] .outreach-form select,
[data-theme="dark"] .ats-toolbar input,
[data-theme="dark"] .ats-toolbar select,
[data-theme="dark"] .decline-pop input,
[data-theme="dark"] .interest-form input,
[data-theme="dark"] .lead-status-form select,
[data-theme="dark"] .lead-status-form input,
[data-theme="dark"] .camp-form select,
[data-theme="dark"] .ad-preview,
[data-theme="dark"] .loading-card,
[data-theme="dark"] .msg-site {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--ink);
}
[data-theme="dark"] .camp-dest { background: var(--surface-2); }
[data-theme="dark"] .ad-card-foot { background: var(--surface-2); }
[data-theme="dark"] .step { background: var(--surface-2); }
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder { color: var(--faint); }
[data-theme="dark"] .auth-google .g { color: #7aa2ff; }

/* Card / panel borders that hardcode light greys */
[data-theme="dark"] .card,
[data-theme="dark"] .stats .stat,
[data-theme="dark"] .app-card,
[data-theme="dark"] .cand-row,
[data-theme="dark"] .step,
[data-theme="dark"] .chip { border-color: var(--border); }
[data-theme="dark"] .steps-wrap,
[data-theme="dark"] .thread { border-top-color: var(--border); }

/* Buttons/badges that use a near-black or accent bg with white text */
[data-theme="dark"] .file-btn { background: var(--btn); }
[data-theme="dark"] .side-link.active { background: var(--btn); color: #fff; }
[data-theme="dark"] .msg-patient,
[data-theme="dark"] .coord-wrap .msg-site,
[data-theme="dark"] .pr-how-step b,
[data-theme="dark"] .how-steps li::before,
[data-theme="dark"] .nav-badge,
[data-theme="dark"] .setup-count { background: var(--btn); }
[data-theme="dark"] .coord-wrap .msg-patient {
  background: var(--surface); border-color: var(--border-strong); color: var(--ink);
}

/* Progress track */
[data-theme="dark"] .progress { background: var(--surface-2); }

/* Tinted status pills / callouts that hardcode light tints + dark text */
[data-theme="dark"] .flash-toast.info { background: #1a2340; color: #c2ccf7; border-color: #2f3a68; }
[data-theme="dark"] .pill.unlikely,
[data-theme="dark"] .pill.error,
[data-theme="dark"] .status.screen_failed,
[data-theme="dark"] .status.declined,
[data-theme="dark"] .status.withdrawn { background: var(--surface-2); color: var(--muted); }
[data-theme="dark"] .status.received { background: #142640; color: #82b2f7; }
[data-theme="dark"] .status.contacted { background: var(--violet-bg); color: var(--violet); }
[data-theme="dark"] .pr-benefit { background: var(--green-bg); color: var(--green); border-color: rgba(78, 203, 156, .3); }
[data-theme="dark"] .pr-benefit-money { background: var(--violet-bg); color: var(--violet); border-color: rgba(185, 156, 245, .3); }
[data-theme="dark"] .pr-pay-high { background: rgba(56, 189, 248, .16); color: #7fd0f5; border-color: rgba(56, 189, 248, .32); }
[data-theme="dark"] .pr-pay-likely { background: rgba(129, 132, 248, .18); color: #c0c1fb; border-color: rgba(129, 132, 248, .34); }
[data-theme="dark"] .app-next-step { background: var(--amber-bg); color: var(--amber); border-color: rgba(226, 171, 85, .3); }
[data-theme="dark"] .app-next-step .ico { color: var(--amber); }
[data-theme="dark"] .triage-note { background: var(--accent-soft); color: var(--accent); border-color: var(--border-strong); }
[data-theme="dark"] .dash-leak,
[data-theme="dark"] .alert-new-banner,
[data-theme="dark"] .msg-badge { background: var(--red-bg); color: var(--red); border-color: rgba(243, 137, 124, .35); }

/* Green-tinted callout borders (backgrounds already themed via --green-bg) */
[data-theme="dark"] .flash.ok,
[data-theme="dark"] .flash.success,
[data-theme="dark"] .loc-confirm.ok,
[data-theme="dark"] .app-records,
[data-theme="dark"] .rec-banner.ok,
[data-theme="dark"] .app-book,
[data-theme="dark"] .dash-verify-note,
[data-theme="dark"] .how-privacy,
[data-theme="dark"] .pr-applied { border-color: rgba(78, 203, 156, .32); }
[data-theme="dark"] .flash.error,
[data-theme="dark"] .loc-confirm.err { border-color: rgba(243, 137, 124, .32); }

/* Demo POV switcher (hardcoded light greys) */
[data-theme="dark"] .pov-switch,
[data-theme="dark"] .side-pov .pov-switch { background: var(--surface-2); border-color: var(--border); }
[data-theme="dark"] .pov-pill.on,
[data-theme="dark"] .pov-pill:hover { background: var(--surface); color: var(--ink); border-color: var(--border-strong); }
[data-theme="dark"] .demo-toggle { background: var(--surface); color: var(--muted); border-color: var(--border-strong); }
[data-theme="dark"] .demo-toggle-track { background: var(--border-strong); }
[data-theme="dark"] .demo-toggle-knob { background: var(--ink); }
[data-theme="dark"] .demo-lane-select { background: var(--surface); color: var(--ink); border-color: var(--border-strong); }
[data-theme="dark"] .demo-lane-select:focus { border-color: rgba(111, 143, 255, .65); box-shadow: 0 0 0 3px rgba(111, 143, 255, .18); }
[data-theme="dark"] body.demo-home .pub-nav { border-bottom-color: var(--border); }
[data-theme="dark"] body.demo-home .pov-tools { background: var(--surface); border-color: var(--border); }
[data-theme="dark"] .demo-lane-go { background: var(--surface); color: var(--muted); border-color: var(--border-strong); }
[data-theme="dark"] .demo-lane-go:hover { color: var(--ink); border-color: var(--border-strong); }
[data-theme="dark"] .setup-tab.on { background: var(--surface); color: var(--ink); border-color: var(--border-strong); }

/* Rec-connect dashed CTA hover */
[data-theme="dark"] .rec-connect:hover { background: var(--accent-soft); }
[data-theme="dark"] .rec-banner.connect { background: var(--accent-soft); color: var(--ink); border-color: var(--border-strong); }

/* Misc hairlines that hardcode light greys */
[data-theme="dark"] .ats-row-item:hover { background: rgba(164, 166, 251, .06); }

/* ==========================================================================
   Lane 4 — EHR background matching (demo). Token-driven so it themes with dark
   mode automatically; stacks cleanly on mobile.
   ========================================================================== */
/* Compact, functional connection line (not a marketing banner) */
.ehr-status {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px;
  font-size: 12.5px; color: var(--muted); margin: 2px 0 22px;
}
.ehr-status-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--green);
  flex-shrink: 0;
}
.ehr-status-note {
  color: var(--faint); padding-left: 10px; margin-left: 2px;
  border-left: 1px solid var(--border);
}

.ehr-trial {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow); margin-bottom: 14px;
  overflow: hidden;
}
.ehr-trial-head {
  display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px;
  border-bottom: 1px solid var(--border); background: var(--surface-2);
}
.ehr-trial-badge {
  flex-shrink: 0; font-size: 12px; font-weight: 700; color: var(--accent-ink);
  background: var(--accent); padding: 4px 11px; border-radius: 999px; white-space: nowrap;
}
.ehr-trial-badge.is-clear { background: var(--green); }
.ehr-trial-main { min-width: 0; }
.ehr-trial-main h3 { margin: 0 0 5px; font-size: 15.5px; letter-spacing: -.01em; line-height: 1.35; }
.ehr-trial-meta {
  display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--muted);
}
.ehr-trial-meta span { display: inline-flex; align-items: center; gap: 5px; }
.ehr-trial-meta .ico { width: 13px; height: 13px; }

.ehr-pt-list { list-style: none; margin: 0; padding: 0; }
.ehr-pt { border-top: 1px solid var(--border); }
.ehr-pt:first-child { border-top: 0; }
.ehr-pt.is-done { opacity: .62; }
.ehr-pt-row {
  display: grid; grid-template-columns: 190px minmax(0, 1fr) auto;
  gap: 14px 18px; align-items: center; padding: 14px 18px;
}
.ehr-pt-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ehr-pt-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent);
  font-size: 12px; font-weight: 700; letter-spacing: -.02em;
}
.ehr-pt-idmain { min-width: 0; }
.ehr-pt-idmain b { font-size: 13.5px; display: block; }
.ehr-pt-demo { font-size: 12px; color: var(--muted); }
.ehr-pt-reason { font-size: 13px; color: var(--ink-soft); line-height: 1.45; min-width: 0; }
.ehr-pt-flags { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.ehr-pt-summary { display: block; }
.ehr-pt-score { font-size: 11px; font-weight: 700; color: var(--muted); }
.ehr-pt-flag {
  display: inline-block; font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .03em; padding: 2px 8px; border-radius: 999px;
}
.ehr-pt-flag.flag-good { background: var(--green-bg); color: var(--green); }
.ehr-pt-flag.flag-likely { background: var(--accent-soft); color: var(--accent); }
.ehr-pt-flag.flag-review { background: var(--amber-bg); color: var(--amber); }
.ehr-pt-actions { display: flex; gap: 8px; flex-shrink: 0; }
.ehr-toggle .ico { width: 14px; height: 14px; transition: transform .15s ease; }
.ehr-pt.is-open .ehr-toggle .ico { transform: rotate(180deg); }
.ehr-pt-done {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px;
  font-weight: 600; color: var(--green); justify-self: end;
}
.ehr-pt-done .ico { width: 15px; height: 15px; }

/* Expandable de-identified chart snapshot */
.ehr-pt-detail { padding: 0 18px 16px; }
.ehr-detail-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px 28px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px 18px;
}
.ehr-detail-col { display: flex; flex-direction: column; gap: 14px; }
.ehr-detail-block { display: flex; flex-direction: column; gap: 6px; }
.ehr-detail-label {
  font-size: 10.5px; font-weight: 800; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted);
}
.ehr-detail-line { margin: 0; font-size: 13px; color: var(--ink); }
.ehr-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ehr-chip {
  font-size: 12px; color: var(--ink-soft); background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px; padding: 3px 8px;
}
.ehr-chip b { color: var(--ink); font-weight: 700; }
.ehr-chip.tone-met { border-color: var(--green); }
.ehr-chip.tone-review { border-color: var(--amber); }
.ehr-med-list { margin: 0; padding-left: 18px; font-size: 13px; color: var(--ink-soft); line-height: 1.55; }
.ehr-crit { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.ehr-crit li { display: flex; align-items: flex-start; gap: 7px; font-size: 12.5px; line-height: 1.4; color: var(--ink-soft); }
.ehr-crit li .ico { width: 14px; height: 14px; flex: none; margin-top: 1px; }
.ehr-crit li.crit-met .ico, .ehr-crit li.crit-exclude .ico { color: var(--green); }
.ehr-crit li.crit-review .ico { color: var(--amber); }
.ehr-detail-foot { margin: 12px 0 0; font-size: 11.5px; color: var(--faint); display: flex; align-items: center; gap: 6px; }
.ehr-detail-foot .ico { width: 13px; height: 13px; color: var(--green); flex: none; }

.ehr-connect-card { text-align: center; max-width: 560px; margin: 0 auto; padding: 40px 32px; }
.ehr-connect-ic {
  width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 18px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent);
}
.ehr-connect-ic .ico { width: 28px; height: 28px; }
.ehr-connect-card h2 { margin: 0 0 8px; font-size: 21px; letter-spacing: -.02em; }
.ehr-connect-card p { color: var(--muted); font-size: 14.5px; line-height: 1.6; margin: 0 auto 22px; }
.ehr-connect-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 720px) {
  .ehr-pt-row { grid-template-columns: 1fr; gap: 10px; }
  .ehr-pt-actions { flex-wrap: wrap; }
  .ehr-pt-actions .btn { flex: 1 1 auto; }
  .ehr-pt-done { justify-self: start; }
  .ehr-detail-grid { grid-template-columns: 1fr; }
}

/* ---- Collaboration: candidate-thread documents + checklist ---- */
.collab-block { margin-top: 4px; }
.collab-count { display: inline-block; margin-left: 8px; font-size: 11px; font-weight: 700;
  color: var(--muted); background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px; padding: 1px 8px; }
.collab-count.collab-open { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.collab-count.collab-review { color: var(--amber); background: var(--amber-bg); border-color: transparent; }
.collab-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 12px; }
@media (max-width: 720px) { .collab-grid { grid-template-columns: 1fr; } }
.collab-col { display: flex; flex-direction: column; gap: 8px; }
.collab-h { font-size: 12px; font-weight: 800; letter-spacing: .01em; color: var(--muted);
  display: flex; align-items: center; gap: 6px; }
.collab-h .ico { width: 14px; height: 14px; }
.collab-empty { font-size: 12.5px; color: var(--muted); margin: 0; }

.doc-list, .task-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.doc-item { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.doc-tag { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em;
  border-radius: 999px; padding: 2px 7px; flex: none; }
.doc-tag.doc-out { color: var(--accent); background: var(--accent-soft); }
.doc-tag.doc-in { color: var(--ok, #16a34a); background: rgba(22,163,74,.12); }
.doc-link { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--border-strong); }
.doc-link:hover { color: var(--accent); }

.doc-drop { display: flex; flex-direction: column; gap: 8px; border: 1.5px dashed var(--border-strong);
  border-radius: 12px; padding: 12px; background: var(--surface-2); transition: border-color .15s, background .15s; }
.doc-drop.drag { border-color: var(--accent); background: var(--accent-soft); }
.doc-drop.has-file { border-style: solid; border-color: var(--accent); }
.doc-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.doc-drop-label { font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer;
  display: flex; align-items: center; gap: 7px; }
.doc-drop-label .ico { width: 15px; height: 15px; }
.doc-drop-row { display: flex; gap: 8px; }
.doc-note { flex: 1; padding: 7px 10px; border: 1px solid var(--border-strong); border-radius: 8px;
  font: inherit; font-size: 13px; background: var(--surface); color: var(--ink); }

/* Requested records tracker (coordinator + patient) */
.collab-reqs { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 8px; }
.req-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.req { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px;
  background: var(--surface-2); display: flex; flex-direction: column; gap: 6px; }
.req-received, .req.req-received { border-color: var(--amber); }
.req-accepted { opacity: .72; }
.req-main { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.req-title { font-size: 13px; font-weight: 700; color: var(--ink); }
.req-note { font-size: 12px; color: var(--muted); margin: 0; }
.req-reject { font-size: 12px; color: var(--amber); margin: 0; }
.req-up, .req-review, .req-add { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0; }
.req-add { margin-top: 4px; }
.req-add input[type=text] { flex: 1; min-width: 160px; padding: 7px 10px; border: 1px solid var(--border-strong);
  border-radius: 8px; font: inherit; font-size: 13px; background: var(--surface); color: var(--ink); }
.doc-drop-mini { padding: 4px 0; }
.app-reqs { border-top: 1px solid var(--border); padding-top: 14px; margin-top: 4px; }

.task-item { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.task-toggle { margin: 0; }
.task-check { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--border-strong);
  background: var(--surface); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  color: #fff; padding: 0; }
.task-check .ico { width: 13px; height: 13px; }
.task-done .task-check { background: var(--ok, #16a34a); border-color: var(--ok, #16a34a); }
.task-title { flex: 1; }
.task-done .task-title { text-decoration: line-through; color: var(--muted); }
.task-who { font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--muted); }
.task-add { display: flex; gap: 8px; margin-top: 2px; }
.task-add input { flex: 1; padding: 7px 10px; border: 1px solid var(--border-strong); border-radius: 8px;
  font: inherit; font-size: 13px; background: var(--surface); color: var(--ink); }

/* ---- Patient side: to-do list + documents ---- */
.app-tasks, .app-docs { border-top: 1px solid var(--border); padding-top: 14px; margin-top: 4px; }
.task-open-badge, .task-done-badge { margin-left: 8px; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 9px; }
.task-open-badge { color: var(--accent); background: var(--accent-soft); }
.task-done-badge { color: var(--ok, #16a34a); background: rgba(22,163,74,.12); }
.ptask-list, .pdoc-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.ptask { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.ptask-check { width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--border-strong);
  background: var(--surface); cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  color: #fff; padding: 0; }
.ptask-check .ico { width: 14px; height: 14px; }
.ptask-done .ptask-check { background: var(--ok, #16a34a); border-color: var(--ok, #16a34a); }
.ptask-title { flex: 1; }
.ptask-done .ptask-title { text-decoration: line-through; color: var(--muted); }
.pdoc { display: flex; align-items: center; gap: 9px; font-size: 14px; }
.pdoc-tag { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em;
  color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: 2px 8px; flex: none; }
.pdoc-link { color: var(--ink); border-bottom: 1px solid var(--border-strong); text-decoration: none; }
.pdoc-link:hover { color: var(--accent); }
.pdoc-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px;
  border: 1.5px dashed var(--border-strong); border-radius: 12px; padding: 12px; background: var(--surface-2);
  transition: border-color .15s, background .15s; }
.pdoc-form.drag { border-color: var(--accent); background: var(--accent-soft); }
.pdoc-form.has-file { border-style: solid; border-color: var(--accent); }

/* ========================================================================== */
/* SHARED UI COMPONENTS  (macros in templates/_ui.html)                       */
/* Canonical primitives - every screen should converge on these.             */
/* ========================================================================== */

/* --- Badge (status label) ------------------------------------------------- */
.ui-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 700; line-height: 1.4; white-space: nowrap;
  border: 1px solid transparent;
}
.ui-badge .ico { width: 13px; height: 13px; }
.ui-badge-neutral { background: var(--surface-2); color: var(--ink-soft); border-color: var(--border); }
.ui-badge-brand   { background: var(--accent-soft); color: var(--accent); }
.ui-badge-ok      { background: var(--ok-bg); color: var(--ok); }
.ui-badge-warn    { background: var(--amber-bg); color: var(--amber); }
.ui-badge-danger  { background: var(--red-bg); color: var(--red); }
.ui-badge-violet  { background: var(--violet-bg); color: var(--violet); }
.ui-badge-info    { background: #edf2ff; color: #3c4a8a; }

/* --- Count badge (unread / totals) --------------------------------------- */
.ui-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--radius-pill);
  font-size: 11.5px; font-weight: 700; line-height: 1;
}
.ui-count-brand { background: var(--accent); color: #fff; }
.ui-count-danger { background: var(--red); color: #fff; }
.ui-count-neutral { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }

/* --- Chip / toggle -------------------------------------------------------- */
.ui-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--radius-pill);
  font-size: 12.5px; font-weight: 600; line-height: 1;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink-soft);
  cursor: pointer; transition: background .12s, border-color .12s, color .12s;
}
.ui-chip .ico { width: 14px; height: 14px; }
.ui-chip:hover { border-color: var(--faint); color: var(--ink); }
.ui-chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* --- Empty state ---------------------------------------------------------- */
.ui-empty {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 6px; padding: 44px 24px; color: var(--muted);
}
.ui-empty-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: var(--radius-pill);
  background: var(--surface-2); border: 1px solid var(--border); color: var(--faint); margin-bottom: 2px;
}
.ui-empty-ico .ico { width: 20px; height: 20px; }
.ui-empty-title { margin: 0; font-weight: 700; color: var(--ink); font-size: 15px; }
.ui-empty-body { margin: 0; font-size: 13.5px; color: var(--muted); max-width: 340px; }
.ui-empty-action { margin-top: 10px; }

/* --- Modal ---------------------------------------------------------------- */
.ui-modal { position: fixed; inset: 0; z-index: 1400; display: grid; place-items: center; padding: 20px; }
.ui-modal-backdrop { position: absolute; inset: 0; background: rgba(17,17,20,.42); backdrop-filter: blur(2px); }
.ui-modal-card { position: relative; width: min(520px, 100%); max-height: calc(100vh - 40px);
  overflow: auto; padding: 22px 24px; border-radius: var(--radius-lg); box-shadow: var(--shadow-lift); }
.ui-modal-lg .ui-modal-card { width: min(720px, 100%); }
.ui-modal-sm .ui-modal-card { width: min(420px, 100%); }
.ui-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.ui-modal-head h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 18px; letter-spacing: -.02em; }
.ui-modal-head h3 .ico { width: 18px; height: 18px; color: var(--accent); }
.ui-modal-x { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 2px;
  line-height: 0; border-radius: 8px; }
.ui-modal-x:hover { background: var(--surface-2); color: var(--ink); }
.ui-modal-x .ico { width: 18px; height: 18px; }
.ui-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

/* ==========================================================================
   For-clinics / study-team (B2B) marketing page. Same blue/slate theme; hero
   headline uses Inter to match the homepage vibe. Product "snapshots" are
   token-based CSS mock-ups (not screenshots) that mirror the real workspace.
   ========================================================================== */
.b2b-hero { max-width: 860px; margin: 0 auto; padding: 56px 24px 8px; text-align: center; }
.b2b-in { max-width: 720px; margin: 0 auto; }
.b2b-hero h1 { font-family: "Inter", var(--sans); font-size: 48px; line-height: 1.05;
  letter-spacing: -.03em; font-weight: 800; color: var(--display-ink); margin: 18px 0 0; }
.b2b-sub { font-size: 18px; color: var(--muted); line-height: 1.6; margin: 14px auto 0; max-width: 620px; }
.b2b-cta { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 24px 0 0; }
.b2b-note { display: inline-flex; align-items: center; gap: 7px; margin: 16px 0 0;
  font-size: 13px; font-weight: 500; color: var(--muted); }
.b2b-note .ico { width: 15px; height: 15px; color: var(--green); }

/* "Works with your tools" — real brand marks for an at-a-glance trust signal. */
.integrations { max-width: 1000px; margin: 20px auto 4px; padding: 0 24px; }
.integrations-in { text-align: center; }
.integrations-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--faint); margin: 0 0 16px; }
.integrations-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.integ-chip { display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border: 1px solid var(--border); border-radius: var(--radius-pill);
  background: var(--surface); font: 600 13px/1 var(--sans); color: var(--ink-soft); }

/* Snapshots: alternating mock-UI + copy rows. */
.snaps { max-width: 1000px; margin: 8px auto 0; padding: 24px 24px 8px; }
.snaps-eyebrow { text-align: center; font-size: 12px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--faint); margin: 0 0 26px; }
.snap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 36px; align-items: center;
  margin: 0 0 44px; }
.snap-reverse .snap-ui { order: 2; }
.snap-txt h3 { font-size: 22px; letter-spacing: -.02em; margin: 0 0 10px; }
.snap-txt p { font-size: 15px; color: var(--muted); line-height: 1.6; margin: 0; }

/* Mock window chrome shared by all snapshots. */
.snap-win { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lift); overflow: hidden; }
.snap-bar { display: flex; align-items: center; gap: 6px; padding: 11px 14px;
  border-bottom: 1px solid var(--border); background: var(--surface-2); font-size: 12.5px;
  font-weight: 700; color: var(--ink-soft); }
.snap-bar b { margin-left: 8px; font-weight: 700; }
.snap-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); }
.snap-rows { padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.snap-row { display: flex; align-items: center; gap: 11px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.snap-av { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft);
  color: var(--accent); font-size: 11.5px; font-weight: 700; display: inline-flex;
  align-items: center; justify-content: center; flex-shrink: 0; }
.snap-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.snap-row-main b { font-size: 13.5px; color: var(--ink); }
.snap-row-main span { font-size: 11.5px; color: var(--faint); }

/* Funnel snapshot. */
.snap-funnel { padding: 14px; display: flex; flex-direction: column; gap: 11px; }
.snap-frow { display: flex; align-items: center; gap: 12px; font-size: 12.5px; }
.snap-flabel { width: 74px; flex-shrink: 0; color: var(--muted); font-weight: 600; }
.snap-ftrack { flex: 1; height: 10px; border-radius: var(--radius-pill); background: var(--surface-2);
  overflow: hidden; }
.snap-ftrack i { display: block; height: 100%; border-radius: var(--radius-pill); background: var(--accent); }
.snap-ftrack i.is-ok { background: var(--green); }
.snap-frow b { width: 34px; text-align: right; color: var(--ink); font-weight: 700; }
.snap-foot { padding: 11px 14px; border-top: 1px solid var(--border); font-size: 12px;
  color: var(--muted); }
.snap-foot b { color: var(--ink); }

/* Eligibility snapshot. */
.snap-elig { padding: 14px; }
.snap-elig-h { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 0 0 10px; }
.snap-elig-h b { font-size: 13.5px; color: var(--ink); }
.snap-crit { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.snap-crit li { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--ink-soft); }
.snap-crit li .ico { width: 15px; height: 15px; flex-shrink: 0; }
.snap-crit li.ok .ico { color: var(--green); }
.snap-crit li.no { color: var(--muted); }
.snap-crit li.no .ico { color: var(--amber); }
/* compact stat trio inside a snapshot window (ROI / proof) */
.snap-stats { padding: 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.snap-stat { background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 13px 10px; text-align: center; }
.snap-stat b { display: block; font-size: 20px; letter-spacing: -.02em; color: var(--ink); }
.snap-stat.ok b { color: var(--green); }
.snap-stat span { display: block; margin-top: 3px; font-size: 11px; color: var(--faint); line-height: 1.3; }

/* Demo request. */
.b2b-demo { max-width: 620px; margin: 0 auto; padding: 16px 24px 72px; }
.b2b-demo-card { background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 30px 28px; }
.b2b-demo-head { text-align: center; margin: 0 0 22px; }
.b2b-demo-head h2 { font-size: 28px; letter-spacing: -.02em; margin: 0 0 8px; }
.b2b-demo-head p { color: var(--muted); font-size: 14.5px; line-height: 1.55; margin: 0; }
.b2b-form { display: flex; flex-direction: column; gap: 14px; }
.b2b-form-row { display: flex; gap: 14px; }
.b2b-field { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0;
  font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.b2b-field em { font-weight: 400; color: var(--faint); font-style: normal; }
.b2b-field input, .b2b-field select, .b2b-field textarea { border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 11px 13px; font-size: 15px; font-family: var(--sans);
  background: var(--surface); color: var(--ink); outline: 0; width: 100%; }
.b2b-field input:focus, .b2b-field select:focus, .b2b-field textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.b2b-field textarea { resize: vertical; }
.b2b-or { text-align: center; font-size: 13px; color: var(--muted); margin: 4px 0 0; }

@media (max-width: 760px) {
  .b2b-hero { padding: 36px 18px 4px; }
  .b2b-hero h1 { font-size: 34px; }
  .snap { grid-template-columns: 1fr; gap: 18px; margin-bottom: 32px; }
  .snap-reverse .snap-ui { order: 0; }
  .b2b-form-row { flex-direction: column; }
  .b2b-demo-card { padding: 22px 18px; }
}

/* ================================================================= *
 * STUDY-TEAM APP ("BridgeMD for sites") — shell + screens.          *
 * Consumes the :root tokens only. Badges/buttons/chips/empty/modal  *
 * still come from _ui.html macros; this adds the shell + layout      *
 * primitives those screens share.                                    *
 * ================================================================= */
.appshell { display: flex; min-height: 100vh; background: var(--bg); }
.appside { width: 240px; flex-shrink: 0; background: var(--surface);
  border-right: 1px solid var(--border); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; }
.appside-brand { padding: 20px 20px 16px; border-bottom: 1px solid var(--border);
  display: flex; gap: 10px; align-items: center; }
.appside-logo { width: 30px; height: 30px; background: var(--accent);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; }
.appside-logo img, .appside-logo svg { width: 18px; height: 18px; display: block; }
.appside-brand .bt { line-height: 1.1; }
.appside-brand .bt b { font-weight: 800; font-size: 16px; letter-spacing: -.02em;
  color: var(--ink); display: block; }
.appside-brand .bt small { font-size: 10px; color: var(--faint); font-weight: 600;
  letter-spacing: .07em; text-transform: uppercase; }
.appnav { flex: 1; padding: 12px; overflow-y: auto; display: flex;
  flex-direction: column; gap: 2px; }
.appnav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  border-radius: 8px; color: var(--muted); font-weight: 500; font-size: 14px;
  transition: background .12s, color .12s; }
.appnav a .ico { width: 17px; height: 17px; opacity: .9; }
.appnav a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.appnav a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.appside-foot { padding: 12px; border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 4px; }
.appside-user { display: flex; gap: 10px; align-items: center; padding: 6px 8px; }
.appside-avatar { width: 32px; height: 32px; border-radius: 50%;
  background: var(--violet-bg); color: var(--violet); display: flex;
  align-items: center; justify-content: center; font-size: 13px; font-weight: 700;
  flex-shrink: 0; }
.appside-user .u b { font-size: 13px; color: var(--ink); display: block; line-height: 1.2; }
.appside-user .u span { font-size: 11px; color: var(--faint); }
.appside-foot a.mini, .appside-foot .mini { display: flex; align-items: center;
  gap: 8px; padding: 7px 8px; border-radius: 7px; font-size: 12.5px;
  color: var(--muted); font-weight: 500; }
.appside-foot a.mini:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
/* The theme toggle here also carries .theme-toggle (a fixed 38px circle), which
   would clip the "Theme" label out of the panel. Render it as a full-width row
   that matches the Sign-out link above it. */
.appside-foot .theme-toggle.mini {
  width: 100%; height: auto; margin-top: 0; justify-content: flex-start;
  border: none; background: none; border-radius: 7px; cursor: pointer;
}
.appside-foot .theme-toggle.mini:hover { background: var(--surface-2); color: var(--ink); }
.appside-foot .theme-toggle.mini .ico { width: 16px; height: 16px; }

.appmain { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.apptop { height: 56px; background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 16px; padding: 0 24px;
  position: sticky; top: 0; z-index: 20; }
/* Study switcher (dropdown) */
.appswitch-wrap { position: relative; flex-shrink: 0; }
.appswitch { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--bg);
  font-size: 13px; font-weight: 700; color: var(--ink); cursor: pointer;
  list-style: none; max-width: 240px; }
.appswitch::-webkit-details-marker { display: none; }
.appswitch:hover { border-color: var(--accent); }
.appswitch-lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appswitch .ico { width: 15px; height: 15px; color: var(--faint); margin-left: auto;
  transition: transform .15s ease; }
.appswitch-wrap[open] .appswitch .ico { transform: rotate(180deg); }
.appswitch-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 40;
  min-width: 280px; max-height: 60vh; overflow-y: auto; padding: 6px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); }
.appswitch-menu a { display: flex; flex-direction: column; gap: 1px; padding: 9px 11px;
  border-radius: 9px; text-decoration: none; color: var(--ink); }
.appswitch-menu a:hover { background: var(--bg); }
.appswitch-menu a.active { background: var(--accent-bg, var(--bg));
  outline: 1px solid var(--accent); }
.appswitch-menu .ss-main { font-size: 13px; font-weight: 700; }
.appswitch-menu .ss-sub { font-size: 11.5px; color: var(--faint); }
.appswitch-empty { display: block; padding: 12px; font-size: 12.5px; color: var(--faint); }

/* Search - prominent, centered, primary affordance in the top bar */
.appsearch { flex: 1; max-width: 560px; position: relative; margin: 0 auto; }
.appsearch input { width: 100%; padding: 10px 14px 10px 38px; border: 1px solid var(--border);
  border-radius: var(--radius-pill); font-size: 14px; background: var(--bg);
  color: var(--ink); transition: border-color .15s ease, box-shadow .15s ease; }
.appsearch input:focus { outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg, rgba(26,110,176,.12)); background: var(--surface); }
.appsearch .ico { position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--faint); width: 17px; height: 17px; }
.apptop-spacer { flex: 1; }

/* Inline omnibox: a real search input in the top bar with a live results
   dropdown anchored directly beneath it (pages + studies + applicants). No
   full-screen modal - the page stays visible behind the dropdown. */
.appsearch-wrap { flex: 1; max-width: 720px; position: relative; margin: 0 auto; }
.appsearch-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--faint); width: 16px; height: 16px; pointer-events: none; display: inline-flex; }
/* Selector is intentionally .appsearch-wrap .appsearch-input so it beats the
   global input[type=text] rule (which would otherwise reset the left padding
   and slide the placeholder under the search icon). */
.appsearch-wrap .appsearch-input { width: 100%; padding: 10px 48px 10px 42px;
  border: 1px solid var(--border); border-radius: var(--radius-pill); font: inherit;
  font-size: 14px; background: var(--bg); color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease; }
.appsearch-wrap .appsearch-input::placeholder { color: var(--faint); }
.appsearch-wrap .appsearch-input:focus { outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg, rgba(26,110,176,.12)); background: var(--surface); }
.appsearch-kbd { position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  font: inherit; font-size: 11px; font-weight: 600; color: var(--faint);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm, 8px); padding: 1px 6px; line-height: 1.5;
  pointer-events: none; }
.appsearch-panel { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 40;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg, 0 24px 60px rgba(2,6,23,.28)); max-height: 62vh;
  overflow-y: auto; padding: 6px; animation: cmdk-pop .12s ease; }
.appsearch-panel[hidden] { display: none; }
.appsearch-sub { color: var(--faint); font-size: 12.5px; margin-left: 10px; flex-shrink: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 55%; }
.appsearch-empty { padding: 20px 12px; text-align: center; color: var(--faint); font-size: 13.5px; }

/* Command-palette trigger (looks like a search box, opens the ⌘K palette). */
.cmdk-trigger { display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 9px 12px 9px 38px; border: 1px solid var(--border);
  border-radius: var(--radius-pill); background: var(--bg); color: var(--faint);
  font: inherit; font-size: 14px; cursor: text; text-align: left;
  transition: border-color .15s ease, box-shadow .15s ease; }
.cmdk-trigger:hover { border-color: var(--border-strong); }
.cmdk-trigger .ico { color: var(--faint); }
.cmdk-trigger-label { flex: 1; }
.cmdk-trigger-kbd, .cmdk-esc, .cmdk-foot kbd { font: inherit; font-size: 11px;
  font-weight: 600; color: var(--faint); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm, 8px);
  padding: 1px 6px; line-height: 1.5; }

/* Command palette overlay. */
.cmdk { position: fixed; inset: 0; z-index: 1000; display: flex;
  align-items: flex-start; justify-content: center; padding: 12vh 16px 16px; }
.cmdk[hidden] { display: none; }
.cmdk-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.45);
  backdrop-filter: blur(2px); }
.cmdk-panel { position: relative; width: 100%; max-width: 620px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg, 0 24px 60px rgba(2,6,23,.35));
  overflow: hidden; display: flex; flex-direction: column; max-height: 66vh;
  animation: cmdk-pop .12s ease; }
@keyframes cmdk-pop { from { transform: translateY(-6px); opacity: 0; } to { transform: none; opacity: 1; } }
.cmdk-inputwrap { position: relative; display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid var(--border); }
.cmdk-inputwrap .ico { color: var(--faint); width: 18px; height: 18px; flex-shrink: 0; }
.cmdk-input { flex: 1; border: 0; outline: none; background: none; color: var(--ink);
  font-size: 16px; }
.cmdk-input::placeholder { color: var(--faint); }
.cmdk-list { overflow-y: auto; padding: 6px; }
.cmdk-group { font-size: 11px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: var(--faint); padding: 10px 10px 4px; }
.cmdk-item { display: flex; align-items: center; width: 100%; text-align: left;
  gap: 10px; padding: 9px 10px; border: 0; background: none; color: var(--ink);
  font: inherit; font-size: 14px; border-radius: var(--radius-sm, 8px); cursor: pointer; }
.cmdk-item.is-active { background: var(--accent-soft); color: var(--accent); }
.cmdk-item-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdk-empty { padding: 28px 16px; text-align: center; color: var(--faint); font-size: 14px; }
.cmdk-foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--border);
  font-size: 12px; color: var(--faint); }
.cmdk-foot span { display: inline-flex; align-items: center; gap: 5px; }
.appbell { position: relative; color: var(--muted); background: none; border: none;
  cursor: pointer; padding: 6px; display: inline-flex; }
.appbell .ico { width: 19px; height: 19px; }
.appbell .dot { position: absolute; top: 0; right: 0; min-width: 15px; height: 15px;
  border-radius: 999px; background: var(--red); color: #fff; font-size: 9px;
  font-weight: 700; display: flex; align-items: center; justify-content: center;
  padding: 0 3px; }
.appbody { flex: 1; padding: 28px 32px; max-width: 1180px; width: 100%; }
.appbody-wide { max-width: 1320px; }

/* Page header ----------------------------------------------------- */
.app-head { margin-bottom: 24px; display: flex; align-items: flex-start;
  justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.app-head h1 { font-size: 22px; font-weight: 800; letter-spacing: -.02em;
  color: var(--ink); margin: 0 0 3px; }
.app-head p { color: var(--muted); font-size: 13.5px; margin: 0; }
.app-back { display: inline-flex; align-items: center; gap: 6px; color: var(--accent);
  font-size: 13px; font-weight: 600; margin-bottom: 14px; }
.app-back .ico { width: 15px; height: 15px; }

/* Cards ----------------------------------------------------------- */
.app-card { background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: 0 1px 4px rgba(15,23,42,.06); }
.app-card.pad { padding: 22px 24px; }
.app-card + .app-card { margin-top: 16px; }
.app-card-title { font-weight: 700; font-size: 15px; color: var(--ink);
  margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
.app-card-title .ico { width: 16px; height: 16px; }

.app-sec { margin-bottom: 30px; }
.app-sec-head { display: flex; align-items: center; gap: 8px; margin-bottom: 13px; }
.app-sec-head .ico { width: 16px; height: 16px; }
.app-sec-head b { font-size: 13px; font-weight: 700; color: var(--ink); }
.app-sec-head span { font-size: 12px; color: var(--faint); }

/* Triage cockpit: work-count chips that jump to each worklist section. These
   are actionable counts (how much needs you), not vanity status totals - a zero
   is a good "caught up here" signal. */
.triage { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.triage-chip { display: inline-flex; align-items: center; gap: 9px; padding: 11px 15px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface);
  text-decoration: none; color: var(--ink);
  transition: border-color .12s ease, box-shadow .12s ease, transform .06s ease; }
.triage-chip:hover { border-color: var(--accent); box-shadow: 0 2px 10px rgba(15,23,42,.07); }
.triage-chip:active { transform: translateY(1px); }
.triage-chip .ico { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }
.triage-chip .tc-n { font: 800 19px/1 var(--sans); color: var(--ink); }
.triage-chip .tc-l { font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.triage-chip.t-danger .tc-n { color: var(--red); }
.triage-chip.t-warn   .tc-n { color: var(--amber); }
.triage-chip.t-brand  .tc-n { color: var(--accent); }
.triage-chip.t-info   .tc-n { color: var(--info, var(--accent)); }
.triage-chip.t-violet .tc-n { color: var(--violet, var(--accent)); }
.triage-chip.zero { opacity: .5; }
.triage-chip.zero .tc-n { color: var(--faint); }
@media (max-width: 720px) { .triage-chip { flex: 1; justify-content: center; } }

/* Daily cockpit: count tiles that double as worklist tabs --------- */
.work-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin-bottom: 20px; }
.work-tabs .worktab { width: 100%; cursor: pointer; text-align: left; }
.work-tabs .worktab.is-active { border-color: var(--accent); background: var(--accent-soft);
  box-shadow: 0 2px 10px rgba(15,23,42,.07); opacity: 1; }
.work-tabs .worktab.is-active .tc-l { color: var(--ink); }
.work-panel[hidden] { display: none; }
.work-sub { font-size: 12.5px; color: var(--faint); margin: 0 0 12px; }
@media (max-width: 720px) { .work-tabs { grid-template-columns: repeat(2, 1fr); } }

/* Stat cards ------------------------------------------------------ */
.app-stats { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.app-stat { flex: 1; min-width: 150px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px; padding: 18px 22px;
  box-shadow: 0 1px 4px rgba(15,23,42,.06); }
.app-stat .l { font-size: 12px; color: var(--muted); font-weight: 500; margin-bottom: 6px; }
.app-stat .n { font-size: 27px; font-weight: 800; letter-spacing: -.03em; color: var(--ink); }
.app-stat .s { font-size: 12px; color: var(--faint); margin-top: 3px; }
.app-stat.accent .n { color: var(--accent); }
.app-stat.ok .n { color: var(--green); }

/* Avatars + score --------------------------------------------------- */
.app-av { width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft);
  color: var(--accent); display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0; text-transform: uppercase; }
.app-av.lg { width: 52px; height: 52px; font-size: 18px; }
.app-av.neutral { background: var(--neutral-bg); color: var(--muted); }
.score-pill { font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; }
.score-pill.hi { background: var(--ok-bg); color: var(--green); }
.score-pill.mid { background: var(--amber-bg); color: var(--amber); }
.score-pill.lo { background: var(--red-bg); color: var(--red); }
.score-bar { display: flex; align-items: center; gap: 8px; min-width: 110px; }
.score-bar .track { flex: 1; height: 6px; background: var(--neutral-bg);
  border-radius: 3px; overflow: hidden; }
.score-bar .fill { height: 100%; border-radius: 3px; background: var(--green); }
.score-bar .fill.mid { background: var(--amber); }
.score-bar .fill.lo { background: var(--red); }
.score-bar b { font-size: 12px; font-weight: 700; color: var(--ink); min-width: 22px; }

/* Table ----------------------------------------------------------- */
.app-table { width: 100%; border-collapse: collapse; }
.app-table th { padding: 11px 16px; text-align: left; font-size: 12px;
  font-weight: 600; color: var(--muted); white-space: nowrap;
  border-bottom: 1px solid var(--border); }
.app-table td { padding: 12px 16px; border-bottom: 1px solid var(--border);
  font-size: 13px; color: var(--ink-soft); vertical-align: middle; }
.app-table tr:last-child td { border-bottom: none; }
.app-table tbody tr.link { cursor: pointer; transition: background .1s; }
.app-table tbody tr.link:hover { background: var(--bg); }
.app-table .who { display: flex; align-items: center; gap: 10px; }
.app-table .who b { font-weight: 600; font-size: 14px; color: var(--ink); display: block; }
.app-table .who span { font-size: 12px; color: var(--muted); }
.app-table tr.win { background: var(--ok-bg); }

/* Draft / decision list rows -------------------------------------- */
.app-row { display: flex; align-items: flex-start; gap: 14px; padding: 14px 18px; }
.app-row + .app-row { border-top: 1px solid var(--border); }
.app-row .main { flex: 1; min-width: 0; }
.app-row .top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
  flex-wrap: wrap; }
.app-row .top b { font-size: 14px; font-weight: 600; color: var(--ink); }
.app-row .top .reason { font-size: 12px; color: var(--faint); }
.app-row .subj { font-size: 12px; color: var(--muted); font-weight: 500; margin-bottom: 2px; }
.app-row .prev { font-size: 12px; color: var(--faint); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.app-row .acts { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.app-row.dim { opacity: .55; }
.app-row-link { text-decoration: none; color: inherit; transition: background .12s; }
.app-row-link:hover { background: var(--bg); }
.app-row .app-when { font-size: 12px; color: var(--faint); white-space: nowrap;
  align-self: center; flex-shrink: 0; }
.app-row .app-you { color: var(--muted); font-weight: 600; }

/* Filter chip row ------------------------------------------------- */
.app-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }

/* Internal matching queue ----------------------------------------- */
.appnav-count { margin-left: auto; min-width: 18px; height: 18px; padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; border-radius: var(--radius-pill);
  background: var(--accent); color: var(--accent-ink); }
.app-head-badges { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.match-source { display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 18px; }
.match-source .ms-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.match-source .ms-ico { width: 34px; height: 34px; border-radius: var(--radius-pill);
  background: var(--ok-bg); color: var(--green); display: flex; align-items: center;
  justify-content: center; flex-shrink: 0; }
.match-source .ms-ico .ico { width: 17px; height: 17px; }
.match-source .ms-title { font-size: 14px; font-weight: 700; color: var(--ink); }
.match-source .ms-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.match-source .ms-stat { text-align: right; flex-shrink: 0; }
.match-source .ms-stat b { display: block; font-size: 22px; font-weight: 800;
  letter-spacing: -.03em; color: var(--accent); }
.match-source .ms-stat span { font-size: 11px; color: var(--faint); }
@media (max-width: 720px) {
  .match-source { flex-direction: column; align-items: flex-start; }
  .match-source .ms-stat { text-align: left; }
}
.match-how { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 18px;
  padding: 12px 16px; border-radius: var(--radius-sm); background: var(--accent-soft);
  border: 1px solid var(--brand-border); color: var(--ink-soft);
  font-size: 12.5px; line-height: 1.5; }
.match-how .ico { width: 18px; height: 18px; color: var(--accent); flex-shrink: 0; margin-top: 1px; }
.match-list { display: flex; flex-direction: column; }
.match-item { display: grid; grid-template-columns: 40px 1fr auto; gap: 14px;
  padding: 16px 20px; align-items: start; }
.match-item + .match-item { border-top: 1px solid var(--border); }
.match-main { min-width: 0; }
.match-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 5px; }
.match-top b { font-size: 14.5px; font-weight: 700; color: var(--ink); }
.match-dem { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.match-summary { font-size: 13px; color: var(--ink-soft); line-height: 1.5; margin-bottom: 8px; }
.match-trial { display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  margin-bottom: 6px; font-size: 12.5px; }
.match-trial .ico { width: 14px; height: 14px; color: var(--muted); flex-shrink: 0; }
.match-trial .mt-title { font-weight: 600; color: var(--ink); }
.match-trial .mt-site { color: var(--faint); }
.match-why { display: flex; align-items: flex-start; gap: 7px; font-size: 12.5px;
  color: var(--green); line-height: 1.45; }
.match-why .ico { width: 14px; height: 14px; flex-shrink: 0; margin-top: 2px; }
.match-src { display: flex; align-items: center; gap: 6px; margin-top: 6px;
  font-size: 12px; color: var(--faint); }
.match-src .ico { width: 13px; height: 13px; }
.match-side { display: flex; flex-direction: column; gap: 10px; align-items: flex-end;
  min-width: 150px; }
.match-verdict { display: flex; flex-direction: column; gap: 7px; align-items: flex-end; }
.match-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  justify-content: flex-end; }
.match-snapshot { font-size: 14px; color: var(--ink-soft); line-height: 1.6; margin: 0 0 14px; }
.match-facts { display: flex; flex-direction: column; gap: 8px; }
.match-facts > div { display: flex; justify-content: space-between; gap: 12px;
  font-size: 13px; border-top: 1px solid var(--border); padding-top: 8px; }
.match-facts .l { color: var(--muted); }
.match-facts .v { color: var(--ink); font-weight: 600; text-align: right; }
.match-trial-title { font-size: 15px; font-weight: 700; color: var(--ink);
  line-height: 1.4; margin-bottom: 10px; }
.match-trial-meta { display: flex; flex-direction: column; gap: 6px;
  font-size: 12.5px; color: var(--muted); }
.match-trial-meta .ico { width: 14px; height: 14px; }
.match-trial-meta > div { display: flex; align-items: center; gap: 7px; }
.match-action-note { font-size: 13px; color: var(--muted); line-height: 1.55; margin: 0 0 12px; }
.match-compliance { display: flex; align-items: flex-start; gap: 8px; margin-top: 14px;
  padding-top: 12px; border-top: 1px solid var(--border); font-size: 11.5px;
  color: var(--faint); line-height: 1.5; }
.match-compliance .ico { width: 14px; height: 14px; color: var(--green); flex-shrink: 0; margin-top: 1px; }
@media (max-width: 720px) {
  .match-item { grid-template-columns: 36px 1fr; }
  .match-side { grid-column: 1 / -1; align-items: flex-start; }
  .match-acts { justify-content: flex-start; }
}

/* Sortable table headers (Applicants queue). */
.app-table th.sort { cursor: pointer; user-select: none; white-space: nowrap; }
.app-table th.sort:hover { color: var(--ink); }
.sort-ar { display: inline-block; width: 0; height: 0; margin-left: 6px;
  vertical-align: middle; opacity: 0;
  border-left: 4px solid transparent; border-right: 4px solid transparent; }
.app-table th.sort.asc .sort-ar { opacity: .7; border-bottom: 5px solid currentColor; }
.app-table th.sort.desc .sort-ar { opacity: .7; border-top: 5px solid currentColor; }

/* Screening questionnaire answers on the applicant detail page. */
.qa-sub { margin: -4px 0 12px; font-size: 13px; color: var(--faint); }
.qa-list { display: flex; flex-direction: column; }
.qa-row { display: flex; justify-content: space-between; align-items: center;
  gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.qa-row:last-child { border-bottom: 0; }
.qa-q { color: var(--muted); font-size: 14px; }
.qa-a { font-weight: 600; color: var(--ink); font-size: 14px; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px; }
.qa-row.concern .qa-a { color: var(--amber); }
.qa-row.concern .qa-a .ico { width: 14px; height: 14px; }

/* Right rail (dashboard) ------------------------------------------ */
.app-split { display: grid; grid-template-columns: 1fr 300px; gap: 26px;
  align-items: start; }
.rail-h { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700;
  color: var(--muted); letter-spacing: .05em; text-transform: uppercase; margin-bottom: 12px; }
.rail-h .ico { width: 15px; height: 15px; color: var(--muted); }
.rail-item { display: flex; gap: 12px; align-items: center; padding: 10px 14px;
  border-radius: 10px; background: var(--surface); border: 1px solid var(--border);
  margin-bottom: 8px; }
.rail-item .accent-bar { width: 3px; align-self: stretch; border-radius: 999px;
  background: var(--accent); flex-shrink: 0; }
.rail-item .t { font-size: 12px; font-weight: 700; color: var(--ink); }
.rail-item .p { font-size: 12px; font-weight: 600; color: var(--ink); }
.rail-item .s { font-size: 11px; color: var(--faint); }
.rail-feed .fi { padding: 10px 0; border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 2px; }
.rail-feed .fi:last-child { border-bottom: none; }
.rail-feed .fi .row1 { display: flex; align-items: flex-start; gap: 8px; }
.rail-feed .dot { width: 6px; height: 6px; border-radius: 50%; margin-top: 5px;
  flex-shrink: 0; background: var(--border-strong); }
.rail-feed .dot.urgent { background: var(--amber); }
.rail-feed .fi .tx { font-size: 12px; color: var(--ink); line-height: 1.5; }
.rail-feed .fi .tm { font-size: 11px; color: var(--faint); padding-left: 14px; }
/* Right-rail: clickable items and "view all" links. */
.rail-link { text-decoration: none; color: inherit; transition: border-color .12s ease; }
.rail-link:hover { border-color: var(--accent); }
.mini-list .mi-link { text-decoration: none; color: inherit; padding: 8px; margin: 0 -8px;
  border-radius: 8px; transition: background .12s ease; }
.mini-list .mi-link:hover { background: var(--bg); }
.rail-more { display: inline-block; margin-top: 12px; font-size: 12.5px; font-weight: 600;
  color: var(--accent); text-decoration: none; }
.rail-more:hover { text-decoration: underline; }
/* Approvals list in the rail: stacked (title clamps, status + study below) so
   long document names never collide with the badge in the narrow column. */
.rail-docs { display: flex; flex-direction: column; }
.rail-doc { display: block; padding: 11px 0; border-top: 1px solid var(--border);
  text-decoration: none; color: inherit; }
.rail-doc:first-child { border-top: none; padding-top: 2px; }
.rail-doc-title { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rail-doc:hover .rail-doc-title { color: var(--accent); }
.rail-doc-meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.rail-doc-nct { font-size: 11px; color: var(--faint); }

/* Verdict (AI pre-screen) card ------------------------------------ */
.verdict { border: 1.5px solid var(--brand-border) !important; }
.verdict-head { display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; }
.verdict-head .l { display: flex; align-items: center; gap: 8px; font-weight: 700;
  font-size: 16px; color: var(--ink); }
.verdict-head .l .ico { width: 18px; height: 18px; color: var(--violet); }
.verdict-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.verdict-grid .col-h { font-size: 12px; font-weight: 700; margin-bottom: 8px;
  text-transform: uppercase; letter-spacing: .04em; }
.verdict-grid .col-h.ok { color: var(--green); }
.verdict-grid .col-h.info { color: var(--info); }
.verdict-grid .col-h.warn { color: var(--amber); }
.verdict-li { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 6px;
  font-size: 13px; color: var(--ink); }
.verdict-li .ico { width: 14px; height: 14px; margin-top: 1px; flex-shrink: 0; }
.verdict-li.ok .ico { color: var(--green); }
.verdict-li.info .ico { color: var(--info); }
.verdict-li.warn .ico { color: var(--amber); }
.verdict-note { background: var(--bg); border-radius: 8px; padding: 12px 16px;
  margin-bottom: 16px; font-size: 13px; color: var(--muted); line-height: 1.6; }
.verdict-fine { font-size: 11px; color: var(--faint); margin-top: 10px; }

/* Applicant next step: confirm eligibility -> invite to book ------ */
.nextstep { border: 1px solid var(--brand-border); background: var(--accent-soft);
  border-radius: var(--radius-sm); padding: 16px; margin-top: 4px; }
.nextstep .ns-h { display: flex; align-items: center; gap: 8px; font-weight: 700;
  font-size: 15px; color: var(--ink); margin-bottom: 4px; }
.nextstep .ns-h .ico { width: 16px; height: 16px; color: var(--accent); }
.nextstep .ns-p { font-size: 13px; color: var(--muted); line-height: 1.55; margin: 0 0 12px; }
.nextstep .ns-p a { color: var(--accent); font-weight: 600; }
.ns-reach { display: flex; gap: 8px; align-items: flex-start; font-size: 13px;
  color: var(--muted); background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; line-height: 1.5; }
.ns-reach .ico { width: 15px; height: 15px; color: var(--muted); flex-shrink: 0; margin-top: 1px; }
.ns-reach b { color: var(--ink); font-weight: 600; }
.elig-more { margin-bottom: 14px; }
.elig-more > summary { cursor: pointer; font-size: 12px; font-weight: 700;
  color: var(--muted); text-transform: uppercase; letter-spacing: .04em;
  list-style: none; user-select: none; }
.elig-more > summary::-webkit-details-marker { display: none; }
.elig-more > summary::before { content: "\25B8"; color: var(--faint); margin-right: 6px; }
.elig-more[open] > summary::before { content: "\25BE"; }

/* Message thread -------------------------------------------------- */
.thread { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.thread .stamp { text-align: center; }
.thread .stamp span { font-size: 11px; color: var(--faint); background: var(--bg);
  padding: 3px 12px; border-radius: 999px; }
.bubble { max-width: 74%; padding: 10px 14px; border-radius: 12px; font-size: 13px;
  color: var(--ink); line-height: 1.55; border: 1px solid var(--border); background: var(--bg); }
.bubble .m { font-size: 11px; color: var(--faint); margin-top: 4px; }
.msg-out { display: flex; justify-content: flex-end; }
.msg-out .bubble { background: var(--accent-soft); border-color: var(--brand-border); }
.msg-in { display: flex; justify-content: flex-start; }
.msg-sys { display: flex; justify-content: center; }
.msg-sys .bubble { background: var(--violet-bg); border-color: var(--violet-border);
  color: var(--violet); max-width: 90%; text-align: center; }
.composer { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.composer textarea { width: 100%; padding: 12px 14px; border: none; outline: none;
  resize: none; font: inherit; font-size: 13px; min-height: 70px; box-sizing: border-box; }
.composer .bar { display: flex; gap: 8px; align-items: center; padding: 8px 12px;
  border-top: 1px solid var(--border); background: var(--bg); }
.composer .bar .sp { flex: 1; }

/* Side panel widgets --------------------------------------------- */
.mini-list .mi { display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 10px; }
.mini-list .mi:last-child { margin-bottom: 0; }
.mini-list .mi .lbl { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--ink); }
.mini-list .mi .lbl .ico { width: 14px; height: 14px; color: var(--muted); }
.task { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.task .box { width: 16px; height: 16px; border-radius: 4px; border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.task .box .ico { width: 10px; height: 10px; color: #fff; }
.task.done .box { background: var(--green); border-color: var(--green); }
.task .tl { font-size: 13px; color: var(--ink); }
.task.done .tl { color: var(--faint); text-decoration: line-through; }

/* Timeline -------------------------------------------------------- */
.tl-item { display: flex; gap: 12px; position: relative; padding-bottom: 16px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item .line { position: absolute; left: 7px; top: 18px; bottom: 0; width: 2px;
  background: var(--border); }
.tl-item:last-child .line { display: none; }
.tl-item .dot { width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0;
  margin-top: 2px; background: var(--neutral-border); }
.tl-item .dot.brand { background: var(--accent); }
.tl-item .dot.ok { background: var(--green); }
.tl-item .dot.violet { background: var(--violet); }
.tl-item .lbl { font-size: 13px; color: var(--ink); font-weight: 500; }
.tl-item .dt { font-size: 11px; color: var(--faint); }

/* Funnel ---------------------------------------------------------- */
.funnel { display: flex; gap: 0; flex-wrap: wrap; }
.funnel .stage { flex: 1; min-width: 120px; padding-right: 12px; }
.funnel .stage .n { font-size: 25px; font-weight: 800; letter-spacing: -.03em; color: var(--ink); }
.funnel .stage .l { font-size: 13px; font-weight: 600; color: var(--ink); }
.funnel .stage .c { font-size: 12px; font-weight: 500; color: var(--green); }
.funnel .stage .c.warn { color: var(--amber); }

/* Source breakdown bars ------------------------------------------- */
.srcbar { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.srcbar .lbl { width: 120px; font-size: 12px; color: var(--muted); text-align: right; flex-shrink: 0; }
.srcbar .track { flex: 1; height: 10px; background: var(--neutral-bg); border-radius: 5px; overflow: hidden; }
.srcbar .fill { height: 100%; border-radius: 5px; background: var(--accent); }
.srcbar .pct { width: 34px; font-size: 12px; font-weight: 700; color: var(--ink); }

/* Intake address / code block ------------------------------------- */
.codebox { display: flex; gap: 10px; align-items: center; }
.codebox code { flex: 1; background: var(--bg); border: 1px solid var(--border);
  border-radius: 7px; padding: 9px 12px; font-size: 13px; color: var(--ink);
  font-family: var(--mono); overflow-x: auto; }
.dropzone { border: 2px dashed var(--border); border-radius: 10px; padding: 22px 20px;
  text-align: center; }
.dropzone .ico { width: 22px; height: 22px; color: var(--faint); }

/* Step indicator (campaign builder) ------------------------------- */
.steps-ind { display: flex; align-items: center; margin-bottom: 30px; }
.steps-ind .st { display: flex; align-items: center; gap: 8px; }
.steps-ind .st .num { width: 28px; height: 28px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; background: var(--neutral-bg);
  color: var(--faint); font-size: 13px; font-weight: 700; flex-shrink: 0; }
.steps-ind .st.active .num { background: var(--accent); color: #fff; }
.steps-ind .st.done .num { background: var(--green); color: #fff; }
.steps-ind .st .lbl { font-size: 13px; color: var(--faint); font-weight: 500; }
.steps-ind .st.active .lbl { color: var(--ink); font-weight: 700; }
.steps-ind .sep { flex: 1; height: 2px; background: var(--border); margin: 0 12px; }
.steps-ind .sep.done { background: var(--green); }

/* Info / callout strips ------------------------------------------- */
.callout { border-radius: 8px; padding: 12px 16px; display: flex; gap: 10px;
  font-size: 13px; line-height: 1.5; }
.callout .ico { width: 15px; height: 15px; flex-shrink: 0; margin-top: 1px; }
.callout.info { background: var(--info-bg); border: 1px solid var(--info-border); color: var(--info); }
.callout.warn { background: var(--amber-bg); border: 1px solid var(--warn-border); color: var(--amber); }

/* Document workspace: preview + approve attestation */
.app-av .ico { width: 18px; height: 18px; }
.doc-name { display: inline-flex; align-items: center; gap: 7px; }
.doc-name .doc-pdf { width: 16px; height: 16px; vertical-align: -3px; }
.doc-preview { border: 1px solid var(--neutral-border); border-radius: var(--radius);
  background: var(--neutral-bg); padding: 18px; }
.doc-preview-head { display: flex; justify-content: space-between; align-items: baseline;
  gap: 12px; margin-bottom: 8px; }
.doc-preview-head b { font-size: 15px; }
.doc-preview-head span { font-size: 12px; color: var(--faint); }
.doc-preview p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.6; }
.doc-preview-fine { margin-top: 12px; font-size: 11px; color: var(--faint); }
.doc-attest { display: flex; gap: 10px; align-items: flex-start; font-size: 12px;
  color: var(--muted); line-height: 1.5; }
.doc-attest input { margin-top: 2px; flex-shrink: 0; }

@media (max-width: 900px) {
  .appside { display: none; }
  .app-split { grid-template-columns: 1fr; }
  .verdict-grid { grid-template-columns: 1fr; }
  .appbody { padding: 20px 16px; }
}

/* Dark mode: keep the app shell legible ---------------------------- */
[data-theme="dark"] .appside, [data-theme="dark"] .apptop,
[data-theme="dark"] .app-card, [data-theme="dark"] .app-stat,
[data-theme="dark"] .rail-item { background: var(--surface); }
[data-theme="dark"] .appnav a.active { background: var(--accent); color: #fff; }

/* --------------------------------------------------------------------------
   Copilot - a docked, always-on side panel on study-team pages (third column)
   -------------------------------------------------------------------------- */
.appdock {
  width: 360px; flex-shrink: 0; background: var(--surface);
  border-left: 1px solid var(--border); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.appdock[data-open="0"] { display: none; }
.dock-head {
  display: flex; align-items: center; gap: var(--space-3);
  padding: 16px 18px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.dock-title { display: flex; align-items: center; gap: 10px; }
.dock-title > div { display: flex; flex-direction: column; line-height: 1.25; }
.dock-title b { font-size: 15px; color: var(--ink); letter-spacing: -.01em; }
.dock-title span { font-size: 11.5px; color: var(--faint); }
.dock-brand { position: relative; width: 32px; height: 32px; flex-shrink: 0;
  border-radius: var(--radius-pill); background: var(--accent-soft);
  display: inline-flex; align-items: center; justify-content: center; }
.dock-brand img { width: 18px; height: 18px; display: block; }
.dock-dot { position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px;
  border-radius: var(--radius-pill); background: var(--green, #16a34a);
  border: 2px solid var(--surface); }
.dock-collapse {
  margin-left: auto; background: none; border: none; cursor: pointer;
  color: var(--faint); display: inline-flex; padding: 4px;
}
.dock-collapse svg { width: 18px; height: 18px; }
.dock-log { flex: 1; overflow-y: auto; padding: 18px; display: flex;
  flex-direction: column; gap: var(--space-3); }
.copilot-msg { max-width: 90%; }
.copilot-msg p {
  margin: 0; padding: 10px 12px; border-radius: var(--radius);
  font-size: 13px; line-height: 1.5; white-space: pre-wrap;
}
.copilot-msg.bot { align-self: flex-start; }
.copilot-msg.bot p { background: var(--bg); color: var(--ink);
  border: 1px solid var(--border); }
.copilot-msg.me { align-self: flex-end; }
.copilot-msg.me p { background: var(--accent); color: #fff; }
.copilot-suggest, .copilot-cites { display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 8px; }
.copilot-chip {
  border: 1px solid var(--border); background: var(--surface); cursor: pointer;
  color: var(--accent); font: 600 12px/1 var(--sans);
  padding: 7px 10px; border-radius: var(--radius-pill); text-align: left;
}
.copilot-cites a {
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--accent); text-decoration: none; font-size: 12px; font-weight: 600;
  padding: 5px 9px; border-radius: var(--radius-pill);
}
.copilot-cites a:hover { border-color: var(--accent); background: var(--accent-soft); }
/* Each message gently slides in, like a chat assistant. */
@keyframes copilot-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.copilot-msg { animation: copilot-in .18s ease both; }
.copilot-msg.bot p { box-shadow: var(--shadow-sm, 0 1px 2px rgba(2,6,23,.05)); }
/* "Working" row: a spinner + status, like an agent that's on the task. */
.copilot-working {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 11px 14px; border-radius: var(--radius);
  background: var(--bg); border: 1px solid var(--border);
  font: 600 12.5px/1 var(--sans); color: var(--muted);
}
.cw-spin {
  width: 14px; height: 14px; border-radius: var(--radius-pill); flex-shrink: 0;
  border: 2px solid var(--border); border-top-color: var(--accent);
  animation: cw-spin .7s linear infinite;
}
@keyframes cw-spin { to { transform: rotate(360deg); } }
/* Agent step trace: each thing it did, revealed with a check (Codex-style). */
.copilot-steps { display: flex; flex-direction: column; gap: 5px; }
.copilot-step {
  display: flex; align-items: flex-start; gap: 7px;
  font: 500 12.5px/1.45 var(--sans); color: var(--ink-soft, var(--muted));
  animation: copilot-in .18s ease both;
}
.cs-check { color: var(--green, #16a34a); font-weight: 800; flex-shrink: 0; }
@media (prefers-reduced-motion: reduce) {
  .copilot-msg, .copilot-step { animation: none; }
  .cw-spin { animation-duration: 0s; }
}
/* Confirmable action card ("send this / book this") shown inline in the log. */
.copilot-confirm {
  margin-top: 10px; border: 1px solid var(--border); background: var(--surface);
  border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column;
  gap: 8px;
}
.cc-to { font: 600 12px/1.3 var(--sans); color: var(--ink); }
.cc-to span {
  display: inline-block; margin-right: 6px; padding: 2px 6px;
  border-radius: var(--radius-pill); background: var(--bg); color: var(--muted);
  font-size: 11px; text-transform: uppercase; letter-spacing: .03em;
}
.cc-text {
  width: 100%; resize: vertical; border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 8px 10px; background: var(--bg);
  color: var(--ink); font: 400 13px/1.45 var(--sans);
}
.cc-url {
  font: 500 12px/1.3 var(--sans); color: var(--accent); word-break: break-all;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 7px 9px;
}
.cc-actions { display: flex; gap: 8px; }
.cc-confirm {
  border: none; cursor: pointer; background: var(--accent); color: #fff;
  font: 700 12px/1 var(--sans); padding: 9px 14px; border-radius: var(--radius-pill);
}
.cc-confirm:disabled { opacity: .6; cursor: default; }
.cc-cancel {
  border: 1px solid var(--border); cursor: pointer; background: var(--surface);
  color: var(--muted); font: 600 12px/1 var(--sans); padding: 9px 12px;
  border-radius: var(--radius-pill);
}
.cc-note { color: var(--danger); font-size: 12px; }
.cc-note:empty { display: none; }
.copilot-confirm.is-done { border-color: var(--ok-border, var(--border)); }
.cc-done { color: var(--ok, var(--green)); font: 600 13px/1.4 var(--sans); }
.dock-form { display: flex; gap: 8px; padding: 14px 18px;
  border-top: 1px solid var(--border); flex-shrink: 0; }
.dock-form input {
  flex: 1; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-pill); font: 400 13px/1 var(--sans);
  background: var(--bg); color: var(--ink);
  transition: border-color .12s ease, box-shadow .12s ease;
}
.dock-form input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.dock-form input:disabled { opacity: .7; }
.dock-form button {
  border: none; cursor: pointer; background: var(--accent); color: #fff;
  width: 40px; flex-shrink: 0; border-radius: var(--radius-pill);
  display: inline-flex; align-items: center; justify-content: center;
  transition: opacity .12s ease, transform .12s ease;
}
.dock-form button:hover:not(:disabled) { transform: translateY(-1px); }
.dock-form button:disabled { opacity: .5; cursor: default; }
.dock-form button svg { width: 18px; height: 18px; }
/* Collapsed-state launcher: a clean circular button with the brand logo. */
.copilot-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 60; display: none;
  width: 56px; height: 56px; padding: 0; border: 1px solid var(--border);
  cursor: pointer; background: var(--surface);
  border-radius: var(--radius-pill); box-shadow: var(--shadow-lg, 0 12px 30px rgba(2,6,23,.22));
  align-items: center; justify-content: center;
  transition: transform .14s ease, box-shadow .14s ease;
}
.copilot-fab:hover { transform: translateY(-2px) scale(1.03);
  box-shadow: 0 16px 38px rgba(2,6,23,.28); }
.copilot-fab img { width: 28px; height: 28px; display: block; }
.copilot-fab .fab-dot { position: absolute; top: 11px; right: 11px; width: 11px; height: 11px;
  border-radius: var(--radius-pill); background: var(--green, #16a34a);
  border: 2px solid var(--surface); }
.appdock[data-open="0"] ~ .copilot-fab { display: inline-flex; }
/* On narrow screens the dock overlays instead of eating a column. */
@media (max-width: 1099px) {
  .appdock { position: fixed; top: 0; right: 0; bottom: 0; height: 100vh;
    width: min(380px, 100vw); z-index: 62; box-shadow: var(--shadow); }
}
[data-theme="dark"] .appdock, [data-theme="dark"] .copilot-chip,
[data-theme="dark"] .copilot-cites a { background: var(--surface); }
[data-theme="dark"] .copilot-working { background: var(--surface); }

/* ── Ad maker (campaign creative): editor + live channel-native preview ── */
.admaker { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: var(--space-5); align-items: start; }
@media (max-width: 900px) { .admaker { grid-template-columns: 1fr; } }
.am-ai { display: flex; align-items: center; gap: var(--space-2);
  margin-bottom: var(--space-3); flex-wrap: wrap; }
.am-save { display: flex; justify-content: flex-end; margin-top: var(--space-2); }
.am-preview { background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: var(--space-4); }
.am-controls { display: flex; justify-content: center; margin-bottom: var(--space-4); }
.am-seg { display: inline-flex; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 3px; }
.am-chip { border: none; background: transparent; padding: 5px 13px;
  border-radius: var(--radius-pill); font: inherit; font-size: 13px;
  font-weight: 600; color: var(--muted); cursor: pointer; }
.am-chip.active { background: var(--ink); color: var(--surface); }
.am-frame { display: flex; justify-content: center; }

/* Social (Meta/IG) card */
.fb-card { width: 100%; max-width: 360px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.fb-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; }
.fb-av { width: 36px; height: 36px; border-radius: var(--radius-pill);
  background: var(--ink); color: var(--surface); display: flex;
  align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.fb-name { font-weight: 700; font-size: 14px; color: var(--ink); }
.fb-spon { font-size: 12px; color: var(--faint); }
.fb-text { padding: 0 12px 10px; font-size: 14px; color: var(--ink-soft);
  white-space: pre-wrap; word-break: break-word; }
.fb-img { width: 100%; display: block; background: var(--surface);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.fb-link { display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 10px 12px; background: var(--bg); }
.fb-link-t { font-weight: 700; font-size: 13px; color: var(--ink);
  word-break: break-word; }
.fb-cta { flex: none; font-size: 12px; font-weight: 700; padding: 6px 12px;
  border-radius: var(--radius-sm); background: var(--surface);
  border: 1px solid var(--border-strong); color: var(--ink); }

/* Search (Google) result */
.g-card { width: 100%; max-width: 440px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; }
.g-ad { display: inline-block; font-size: 12px; font-weight: 700;
  color: var(--ink); margin-bottom: 4px; }
.g-url { font-size: 13px; color: var(--muted); }
.g-title { font-size: 18px; color: #1a0dab; font-weight: 500; margin: 2px 0;
  word-break: break-word; }
[data-theme="dark"] .g-title { color: #8ab4f8; }
.g-desc { font-size: 13px; color: var(--ink-soft); word-break: break-word; }

/* Poster / full image */
.am-poster { max-width: 100%; max-height: 460px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow); }

/* Image style controls */
.am-styles { margin-top: var(--space-4); display: flex; flex-direction: column;
  gap: var(--space-3); }
.am-row { display: flex; align-items: center; gap: var(--space-3); }
.am-lbl { width: 46px; flex: none; font-size: 11px; font-weight: 700;
  color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.am-sw { display: inline-flex; gap: 8px; }
.sw { width: 24px; height: 24px; border-radius: var(--radius-pill);
  background: var(--sw); border: 2px solid var(--surface); cursor: pointer;
  padding: 0; box-shadow: 0 0 0 1px var(--border); }
.sw.active { box-shadow: 0 0 0 2px var(--sw); }
.am-dl { margin-top: var(--space-1); display: inline-flex; align-items: center;
  gap: 6px; font-size: 13px; font-weight: 600; color: var(--accent);
  text-decoration: none; }
.am-dl:hover { text-decoration: underline; }

/* ==========================================================================
   Landing conversion sections (below the hero): "trials near you" card,
   how-it-works, objection FAQ, trust strip. Token-only; drives found->contacted.
   ========================================================================== */
.landing-extra { max-width: 980px; margin: 0 auto; padding: 8px 24px 24px;
  width: 100%; box-sizing: border-box; }
.lx-section { margin-top: 56px; }
.lx-h2 { font-size: 26px; font-weight: 800; letter-spacing: -.02em;
  color: var(--ink); margin: 0 0 var(--space-6); display: flex;
  align-items: center; gap: 8px; }
.lx-h2 .ico { width: 22px; height: 22px; color: var(--accent); }
.lx-center { justify-content: center; text-align: center; }
.lx-cta { text-align: center; margin-top: var(--space-6); }

/* Trials near you */
.near-wrap { max-width: 980px; margin: 40px auto 0; padding: 0 24px;
  width: 100%; box-sizing: border-box; }
.near-head { display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: var(--space-4); flex-wrap: wrap; }
.near-head .lx-h2 { margin: 0; }
.near-sub { color: var(--muted); font-size: 13px; }
.near-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: var(--space-4); }
.near-card { display: flex; flex-direction: column; gap: 6px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-5);
  box-shadow: var(--shadow); color: var(--ink);
  transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease; }
.near-card:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px);
  border-color: var(--border-strong); }
.near-tag { align-self: flex-start; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; color: var(--ok);
  background: var(--ok-bg); border-radius: var(--radius-pill); padding: 2px 10px; }
.near-title { font-weight: 700; font-size: 15px; line-height: 1.3; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.near-cond { font-size: 13px; color: var(--muted); }
.near-meta { font-size: 12px; color: var(--faint); margin-top: 2px; }
.near-go { margin-top: auto; padding-top: 6px; font-size: 13px; font-weight: 600;
  color: var(--accent); display: inline-flex; align-items: center; gap: 5px; }
.near-foot { margin-top: var(--space-4); text-align: center; }

/* How it works */
.hiw-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.hiw-step { background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: var(--space-6); box-shadow: var(--shadow); }
.hiw-num { display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: var(--radius-pill);
  background: var(--accent-soft); color: var(--accent); font-weight: 800;
  font-size: 16px; margin-bottom: var(--space-3); }
.hiw-step h3 { margin: 0 0 6px; font-size: 17px; font-weight: 700; color: var(--ink); }
.hiw-step p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

/* Objection FAQ */
.faq-list { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column;
  gap: var(--space-3); }
.faq-item { background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: var(--space-4) var(--space-5);
  box-shadow: var(--shadow); }
.faq-item summary { cursor: pointer; font-weight: 600; color: var(--ink);
  font-size: 15px; list-style: none; display: flex; justify-content: space-between;
  align-items: center; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--accent); font-size: 20px;
  font-weight: 400; line-height: 1; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { margin: var(--space-3) 0 0; color: var(--muted); font-size: 14px;
  line-height: 1.6; }
.faq-item em { font-style: italic; }

/* Trust strip */
.trust-strip { max-width: 980px; margin: 48px auto 8px; padding: 0 24px;
  display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3) var(--space-4); }
.trust-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px;
  font-weight: 600; color: var(--muted); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 7px 14px; }
.trust-pill .ico { width: 15px; height: 15px; color: var(--ok); }

@media (max-width: 760px) {
  .hiw-grid { grid-template-columns: 1fr; }
  .lx-h2 { font-size: 22px; }
  .lx-section { margin-top: 40px; }
  .landing-extra { padding: 8px 16px 24px; }
  .near-wrap { padding: 0 16px; }
  .trust-strip { padding: 0 16px; }
}
