/* BridgeMD homepage, hero. Loaded after company.css. Edited only by the hero builder.
   These rules replace the older hero and finder card rules that still sit in company.css.
   Two halves with a deliberate difference: the pitch sits on the soft blue gray tint (left), the finder card sits on
   plain white (right). The halves meet in a plain colour change with no divider line; the card's soft shadow does the
   lifting. Colours always come from the page tokens (ink, text, muted, line, tint, accent), so the type grays follow
   whatever company.css sets: ink for the headline, text (dark gray) for the sub line, muted (light gray) on white.
   The hero is exactly one screen tall on desktop and flows naturally when it stacks. */

/* ---------- Layout ---------- */
body.cx-page .cx-hero {
  --hero-top: 116px;                                   /* clears the floating nav */
  --hero-edge: max(28px, calc((100vw - 1240px) / 2 + 28px));
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100svh;                                  /* the first screen is the hero and nothing else; the next section starts below the fold */
  background: #fff;
}
body.cx-page .cx-hero-l { display: flex; align-items: center; padding: var(--hero-top) 40px 76px var(--hero-edge); background: var(--tint); }
body.cx-page .cx-hero-copy { width: 100%; max-width: 600px; }
body.cx-page .cx-hero-r { display: flex; align-items: center; justify-content: flex-end; padding: var(--hero-top) var(--hero-edge) 76px 48px; background: #fff; border: 0; }  /* border: 0 removes the old divider line that company.css still declares */

/* ---------- Pitch ---------- */
body.pub-marketing.cx-page .cx-hero h1 { font-size: clamp(42px, 4.3vw, 66px); line-height: 1.03; letter-spacing: -.034em; font-weight: 600; font-variation-settings: "opsz" 32; text-wrap: balance; }
body.pub-marketing.cx-page .cx-hero h1 em { display: block; font-size: 1em; font-weight: inherit; letter-spacing: inherit; font-variation-settings: inherit; }
body.cx-page .cx-hero-sub { max-width: 46ch; margin-top: 22px; font-size: 18px; line-height: 1.55; letter-spacing: -.011em; font-weight: 400; color: var(--text); text-wrap: balance; }
body.cx-page .cx-hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 30px; }
body.cx-page .cx-hero .cx-cta { height: 52px; padding: 0 22px; border-radius: 12px; font-size: 15px; }

/* ---------- Compliance badges, one quiet line under the buttons ---------- */
body.cx-page .cx-hero-trust { margin-top: 44px; }
body.cx-page .cx-hero-trust-t { margin: 0 0 12px; font-size: 13.5px; line-height: 1.3; font-weight: 500; color: var(--muted); }  /* light gray; the page token holds 4.5 to 1 on this tint too */
body.cx-page .cx-hero-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; }
body.cx-page .cx-hero .cx-chip { gap: 8px; min-height: 32px; }
body.cx-page .cx-hero .cx-chip img { height: 30px; width: auto; flex: none; }
body.cx-page .cx-hero .cx-chip-t { display: grid; gap: 1px; line-height: 1.15; white-space: nowrap; }
body.cx-page .cx-hero .cx-chip-n { font-size: 13.5px; font-weight: 600; color: var(--ink); }
body.cx-page .cx-hero .cx-chip-s { font-size: 13.5px; color: var(--muted); }
body.cx-page .cx-hero .cx-chip:is(:hover, :focus, :focus-visible) .cx-chip-n { color: var(--accent); }
body.cx-page .cx-hero .cx-chip:focus { outline: none; }
body.cx-page .cx-hero .cx-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 8px; }
/* Tooltip sits under its badge, left aligned to it. Tap or focus shows it too, so touch screens get it. */
body.cx-page .cx-hero .cx-chip::after { left: 0; right: auto; width: max-content; max-width: 230px; white-space: normal; transform: translate(0, 4px); }
body.cx-page .cx-hero .cx-chip:is(:hover, :focus, :focus-visible)::after { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }

/* ---------- Finder card ---------- */
body.cx-page .cx-pf {
  --pf-edge: color-mix(in srgb, var(--accent) 18%, var(--line));        /* field borders, a blue leaning step of the page line colour */
  --pf-edge-h: color-mix(in srgb, var(--accent) 40%, var(--line));
  width: 100%; max-width: 520px; padding: 32px; border-radius: 24px; background: #fff; border: 1px solid var(--line); box-sizing: border-box;
  box-shadow: 0 1px 2px rgba(10, 20, 40, .05), 0 10px 24px -8px rgba(10, 20, 40, .09), 0 40px 80px -32px rgba(10, 20, 40, .3); }
body.cx-page .cx-pf h2 { margin: 0; font-family: var(--f-disp); font-size: 28px; line-height: 1.1; letter-spacing: -.034em; font-weight: 600; font-variation-settings: "opsz" 32; color: var(--ink); }
body.cx-page .cx-pf-msg { margin: 14px 0 0; padding: 10px 14px; border-radius: 10px; background: var(--tint); font-size: 14.5px; line-height: 1.45; color: var(--ink); }
body.cx-page .cx-pf-form { display: grid; gap: 10px; margin-top: 24px; }
body.cx-page .cx-find-field { position: relative; display: flex; }
body.cx-page .cx-pf input[type="text"] { width: 100%; height: 52px; padding: 0 16px; border: 1px solid var(--pf-edge); border-radius: 12px; background: #fff; font-size: 16px; color: var(--ink); box-sizing: border-box;
  transition: border-color .15s ease, box-shadow .15s ease; }
body.cx-page .cx-pf input[type="text"]::placeholder { color: var(--muted); opacity: 1; }
body.cx-page .cx-pf input[type="text"]:hover { border-color: var(--pf-edge-h); }
body.cx-page .cx-pf input[type="text"]:focus, body.cx-page .cx-pf input[type="text"]:focus-visible { outline: 2px solid transparent; outline-offset: 0; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(18, 87, 176, .22); }
body.cx-page .cx-pf-form button[type="submit"] { height: 52px; margin-top: 2px; border: 0; border-radius: 12px; background: var(--accent); color: #fff; font-family: var(--f-mono); font-size: 15px; font-weight: 600; letter-spacing: 0; cursor: pointer; transition: background .15s ease; }
body.cx-page .cx-pf-form button[type="submit"]:hover { background: var(--accent-d); }
body.cx-page .cx-pf-form button[type="submit"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 12px; }
body.cx-page .cx-useloc { justify-self: start; display: inline-flex; align-items: center; gap: 7px; min-height: 28px; margin: -2px 0 2px; padding: 0 2px; border: 0; border-radius: 6px; background: none; color: var(--accent); font-size: 14.5px; font-weight: 500; cursor: pointer; }
body.cx-page .cx-useloc:hover { color: var(--accent-d); text-decoration: underline; text-underline-offset: 3px; }
body.cx-page .cx-useloc .ico { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }
body.cx-page .cx-useloc:disabled { opacity: .7; cursor: progress; }

/* Typeahead panel. Rendered from the embedded condition list, so it answers on every keystroke. */
body.cx-page .cx-suggest { position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 30; display: flex; flex-direction: column; padding: 6px; overflow: hidden; text-align: left;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 40px -18px rgba(10, 20, 40, .34), 0 2px 8px rgba(10, 20, 40, .06); }
body.cx-page .cx-suggest[hidden] { display: none; }
body.cx-page .cx-suggest button { display: block; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 9px; background: none; text-align: left; font-size: 15.5px; line-height: 44px;
  color: var(--ink); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.cx-page .cx-suggest button b { color: var(--ink); font-weight: 700; }
/* Every row has the same ink colour. Only the matched start of the word is bold, and only the active row has a tint. The script moves that tint with the arrow keys and with the pointer, so hover never doubles it. */
body.cx-page .cx-suggest button:hover { background: none; }
body.cx-page .cx-suggest button.is-active { background: var(--tint); color: var(--ink); }
body.cx-page .cx-suggest button.is-new { animation: cxRowIn .14s ease-out both; }
@keyframes cxRowIn { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { body.cx-page .cx-suggest button.is-new { animation: none; } }

/* ---------- Narrow desktop and tablet ---------- */
@media (max-width: 1199px) {
  body.cx-page .cx-hero-l { padding-right: 32px; }
  body.cx-page .cx-hero-r { padding-left: 32px; }
}
@media (max-width: 1139px) {
  /* Five badges no longer fit one line next to the card, so they sit in a tidy 3 + 2 grid. */
  body.cx-page .cx-hero-badges { display: grid; grid-template-columns: repeat(3, max-content); gap: 12px 26px; }
}
@media (max-width: 899px) {
  body.cx-page .cx-hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  body.cx-page .cx-hero-l { padding: 128px max(28px, env(safe-area-inset-right, 0px)) 44px max(28px, env(safe-area-inset-left, 0px)); }
  /* Stacked, the pitch sits on the tint and the counter and finder card sit on white, all inside the same 28px page margins as the nav and the sections below. */
  body.cx-page .cx-hero-copy { max-width: none; }
  body.pub-marketing.cx-page .cx-hero h1 { font-size: clamp(40px, 7vw, 56px); }
  body.cx-page .cx-hero-badges { display: flex; }
  body.cx-page .cx-hero-r { justify-content: flex-start; padding: 36px max(28px, env(safe-area-inset-right, 0px)) 56px max(28px, env(safe-area-inset-left, 0px)); }
  body.cx-page .cx-pf { max-width: none; margin: 0; }
}
/* Tablet: the card is wide, so condition and city sit side by side. Phones keep them stacked. */
@media (min-width: 641px) and (max-width: 899px) {
  body.cx-page .cx-hero { min-height: 100vh; min-height: 100svh; }   /* stacked halves still fill exactly one screen, so the demo never peeks in */
  body.cx-page .cx-pf-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  body.cx-page .cx-useloc, body.cx-page .cx-pf-form button[type="submit"] { grid-column: 1 / -1; }
  /* The suggestion panel opens across both columns, so long condition names stay readable. */
  body.cx-page .cx-suggest { right: auto; width: calc(200% + 10px); box-sizing: border-box; }
}
/* Touch screens at any width get 44px targets for the badges and the location link. */
@media (pointer: coarse) {
  body.cx-page .cx-hero .cx-chip, body.cx-page .cx-useloc { min-height: 44px; }
}

/* ---------- Phone ---------- */
@media (max-width: 640px) {
  body.cx-page .cx-hero-l { padding: 100px max(16px, env(safe-area-inset-right, 0px)) 32px max(16px, env(safe-area-inset-left, 0px)); }
  body.pub-marketing.cx-page .cx-hero h1 { font-size: clamp(34px, 10vw, 42px); line-height: 1.08; }
  body.cx-page .cx-hero-sub { margin-top: 18px; }
  body.cx-page .cx-hero-cta { gap: 10px; margin-top: 24px; }
  body.cx-page .cx-hero .cx-cta { flex: 1 1 auto; justify-content: center; min-height: 52px; padding: 0 18px; }
  body.cx-page .cx-hero-trust { margin-top: 28px; }
  body.cx-page .cx-hero-badges { display: grid; grid-template-columns: repeat(3, minmax(0, max-content)); gap: 0 20px; }
  body.cx-page .cx-hero .cx-chip { min-height: 44px; }
  body.cx-page .cx-hero .cx-chip:nth-child(3n)::after { left: auto; right: 0; }
  body.cx-page .cx-hero-r { padding: 24px max(16px, env(safe-area-inset-right, 0px)) 40px max(16px, env(safe-area-inset-left, 0px)); }
  body.cx-page .cx-pf { max-width: none; padding: 24px 20px; border-radius: 20px; }
  body.cx-page .cx-pf h2 { font-size: 24px; }
  body.cx-page .cx-pf-form { margin-top: 20px; }
  body.cx-page .cx-useloc { min-height: 44px; margin: -6px 0 -2px; }
  /* On a phone a long condition name wraps to a second line, so the whole name can be read before it is picked. */
  body.cx-page .cx-suggest button { padding-top: 10px; padding-bottom: 10px; line-height: 1.3; white-space: normal; text-overflow: clip; }
}
@media (max-width: 359px) {
  body.cx-page .cx-hero-badges { column-gap: 12px; }
}

/* Short laptop screens. Tighter vertical rhythm so the pitch, the badges and the card stay in view. */
@media (min-width: 900px) and (max-height: 760px) {
  body.cx-page .cx-hero { --hero-top: 104px; }
  body.cx-page .cx-hero-sub { margin-top: 18px; }
  body.cx-page .cx-hero-cta { margin-top: 24px; }
  body.cx-page .cx-hero-trust { margin-top: 32px; }
  body.cx-page .cx-pf { padding: 28px; }
  body.cx-page .cx-pf-form { margin-top: 18px; }
  body.cx-page .cx-pf input[type="text"], body.cx-page .cx-pf-form button[type="submit"] { height: 50px; }
}

/* Quick questions before the first search */
html.cx-pre-open { overflow: hidden; }
body.cx-page .cx-pre { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(11, 20, 36, .5); }
body.cx-page .cx-pre[hidden] { display: none; }
body.cx-page .cx-pre-card { width: 100%; max-width: 460px; max-height: 100%; overflow: auto; box-sizing: border-box; padding: 26px; border-radius: 18px; background: #fff; box-shadow: 0 24px 60px rgba(11, 20, 36, .28); display: grid; gap: 14px; }
body.cx-page .cx-pre-card h3 { margin: 0; font-family: var(--f-disp); font-size: 24px; line-height: 1.15; letter-spacing: -.03em; font-weight: 600; color: var(--ink); }
body.cx-page .cx-pre-lead { margin: 0; font-size: 15px; line-height: 1.45; color: var(--muted); }
body.cx-page .cx-pre-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
body.cx-page .cx-pre-card label { display: grid; gap: 6px; font-size: 14px; font-weight: 500; color: var(--ink); }
body.cx-page .cx-pre-card label[hidden] { display: none; }
body.cx-page .cx-pre-card input, body.cx-page .cx-pre-card select, body.cx-page .cx-pre-card textarea { width: 100%; box-sizing: border-box; padding: 0 12px; height: 46px; border: 1px solid var(--pf-edge); border-radius: 10px; background: #fff; font: inherit; font-size: 16px; color: var(--ink); }
body.cx-page .cx-pre-card textarea { height: auto; padding: 10px 12px; resize: vertical; }
body.cx-page .cx-pre-card input:focus-visible, body.cx-page .cx-pre-card select:focus-visible, body.cx-page .cx-pre-card textarea:focus-visible { outline: 2px solid transparent; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(18, 87, 176, .22); }
body.cx-page .cx-pre-actions { display: flex; gap: 10px; margin-top: 4px; }
body.cx-page .cx-pre-actions button { height: 50px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--accent); color: #fff; font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; }
body.cx-page .cx-pre-actions button:hover { background: var(--accent-d); }
body.cx-page .cx-pre-actions .cx-pre-skip { background: transparent; color: var(--ink); border: 1px solid var(--pf-edge); }
body.cx-page .cx-pre-actions .cx-pre-skip:hover { background: var(--tint); }
body.cx-page .cx-pre-actions button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 420px) { body.cx-page .cx-pre-grid { grid-template-columns: 1fr; } }

/* The short list on the right: what BridgeMD does, each line a link to its card below. */
body.cx-page .cx-hero-r { justify-content: center; align-items: flex-start; }
body.cx-page .cx-map { width: 100%; max-width: 520px; }
body.cx-page .cx-map h2 { margin: 0 0 14px; font-size: 14px; line-height: 1.3; font-weight: 500; letter-spacing: 0; color: var(--muted); }
body.cx-page .cx-map-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
body.cx-page .cx-map-list a { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; align-items: center; padding: 12px 14px; border-radius: 16px; color: var(--ink); text-decoration: none; transition: background-color .15s ease; }
body.cx-page .cx-map-list a:hover, body.cx-page .cx-map-list a:focus-visible { background: var(--tint); }
body.cx-page .cx-map-ic { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: var(--tint); color: var(--accent); }
body.cx-page .cx-map-ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
body.cx-page .cx-map-list b { display: block; font-size: 17px; line-height: 1.3; letter-spacing: -.012em; font-weight: 600; }
body.cx-page .cx-map-list small { display: block; margin-top: 2px; font-size: 15px; line-height: 1.4; color: var(--muted); }
body.cx-page .cx-hero-find { margin: 18px 0 0; font-size: 15px; line-height: 1.4; color: var(--muted); }
body.cx-page .cx-hero-find a { color: var(--accent); font-weight: 500; text-decoration: none; }
body.cx-page .cx-hero-find a:hover { text-decoration: underline; }
body.cx-page .cx-hero-trust { margin-top: 36px; }

/* The trial finder for patients, in its own band below the comparison. */
body.cx-page .cx-findsec { background: var(--tint); }
body.cx-page .cx-findsec .cx-wrap { max-width: 560px; }
body.cx-page .cx-find-lead { margin: 6px 0 22px; font-size: 20px; line-height: 1.4; letter-spacing: -.015em; font-weight: 500; color: var(--ink); }
body.cx-page .cx-findsec .cx-lc { max-width: none; }
@media (max-width: 960px) { body.cx-page .cx-map { max-width: none; } }
@media (min-width: 561px) and (max-width: 960px) {
  body.cx-page .cx-hero-r { padding: 8px max(28px, env(safe-area-inset-right, 0px)) 52px max(28px, env(safe-area-inset-left, 0px)); }
}
body.cx-page .cx-hero-sep { display: inline-block; width: 3px; height: 3px; margin: 0 12px; vertical-align: middle; border-radius: 50%; background: var(--muted); opacity: .6; }
