/* Mobile-first, single column, large tap targets.
   Almost all recruitment traffic is phones, so the phone layout is the base
   case and the desktop rules are the exception. No CDN, no webfont: a landing
   page that waits on a third party is a landing page that loses clicks. */

:root {
  --accent: #0b5fff;
  --ink: #16202c;
  --muted: #5a6674;
  --line: #dfe4ea;
  /* Input outlines are darker than the general hairline: an empty box a
     visitor is meant to fill has to read as a box, not as a faint suggestion. */
  --field-line: #97a3b4;
  --bg: #ffffff;
  --soft: #f5f7fa;
  --error: #b3261e;
  --radius: 10px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* One narrow centred column for the whole funnel, matching the reference the
   client asked us to follow. Everything in it is centred: study name, badges,
   step content, footer. */
.wrap { width: 100%; max-width: 30rem; margin: 0 auto; padding: 0 1.15rem; }

main.wrap { flex: 1; padding-top: 1.5rem; padding-bottom: 2.5rem; }

/* header + footer ------------------------------------------------------- */

.site-header { border-bottom: 1px solid var(--line); padding: 0.85rem 0; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.site-name { font-weight: 650; letter-spacing: -0.01em; }
/* Height-capped rather than width-capped: logos vary wildly in aspect ratio,
   and a fixed width makes a wide wordmark tiny next to a square mark. */
.site-logo { height: 2.4rem; width: auto; max-width: 60vw; display: block; }
.phone { color: var(--accent); font-weight: 600; text-decoration: none; white-space: nowrap; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.35rem 0 2rem;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
  background: var(--soft);
}
.site-footer p { margin: 0.35rem 0; }
.site-footer a { color: var(--muted); }

/* type ------------------------------------------------------------------ */

h1 {
  font-size: 1.72rem;
  line-height: 1.22;
  letter-spacing: -0.02em;
  margin: 0.2rem 0 0.75rem;
}
h1.question { font-size: 1.45rem; margin-bottom: 0.5rem; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 0.4rem;
}
.lede { font-size: 1.05rem; color: var(--muted); margin: 0 0 1.25rem; }
.help { color: var(--muted); margin: 0 0 1rem; font-size: 0.94rem; }
.fine { color: var(--muted); font-size: 0.82rem; margin-top: 1.5rem; }
.error {
  background: #fdecea;
  border-left: 3px solid var(--error);
  color: var(--error);
  padding: 0.65rem 0.8rem;
  border-radius: 6px;
  margin: 0 0 1rem;
}

.bullets { list-style: none; padding: 0; margin: 0 0 1.75rem; }
.bullets li {
  position: relative;
  padding: 0.55rem 0 0.55rem 1.85rem;
  border-bottom: 1px solid var(--line);
}
.bullets li:last-child { border-bottom: 0; }
/* Single column: two-up was right when the page ran the full width, but in a
   30rem measure each cell is ~14rem and every benefit wraps to three lines. */
.bullets li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 1.02rem;
  width: 0.62rem;
  height: 0.34rem;
  border-left: 2.5px solid var(--accent);
  border-bottom: 2.5px solid var(--accent);
  transform: rotate(-45deg);
}

/* controls -------------------------------------------------------------- */

/* 3rem minimum height throughout: comfortably above the ~44px touch target
   guidance, because a mis-tap here is a lost lead. */
.btn {
  display: block;
  width: 100%;
  min-height: 3.25rem;
  padding: 0.9rem 1.25rem;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: var(--radius);
  font-size: 1.05rem;
  font-weight: 650;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.btn:active { filter: brightness(0.93); }

/* The two buttons that carry the funnel — "see if I qualify" and the final
   submit — are deliberately louder than a plain .btn. */
.btn-lg {
  min-height: 3.9rem;
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.options { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 1.15rem; }

.option {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 3.25rem;
  padding: 0.85rem 1.05rem;
  background: var(--soft);
  color: var(--ink);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  font-size: 1.02rem;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.option:active { border-color: var(--accent); }
.option-current { border-color: var(--accent); background: #eef3ff; }

.option-check { gap: 0.75rem; }
.option-check input { width: 1.25rem; height: 1.25rem; accent-color: var(--accent); flex: none; }

.field {
  width: 100%;
  min-height: 3.25rem;
  padding: 0.8rem 1rem;
  border: 1.5px solid var(--field-line);
  border-radius: var(--radius);
  font-size: 1.05rem;      /* >=16px or iOS zooms the page on focus */
  font-family: inherit;
  margin-bottom: 1.15rem;
  background: #fff;
  color: var(--ink);
}
.field:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }

/* progress -------------------------------------------------------------- */

.progress { margin-bottom: 1.35rem; }
.progress-bar { height: 5px; background: var(--line); border-radius: 3px; overflow: hidden; }
.progress-bar span { display: block; height: 100%; background: var(--accent); transition: width 0.2s ease; }
.progress-text { margin: 0.45rem 0 0; font-size: 0.8rem; color: var(--muted); }

/* index ----------------------------------------------------------------- */

.study-list { list-style: none; padding: 0; margin: 1rem 0 0; }
.study-list li { padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
.study-list a { color: var(--accent); font-weight: 600; font-size: 1.08rem; text-decoration: none; }
.study-list p { margin: 0.3rem 0 0; color: var(--muted); font-size: 0.92rem; }

/* masthead — the study name and its badges, above every step ------------- */

.masthead { text-align: center; margin-bottom: 1.4rem; }

/* The intro copy is centred with the masthead it sits under; the lists and
   fields below stay left-aligned, because centred body text is hard to read
   and centred list items lose their alignment down the left edge. */
.hero-copy { text-align: center; }
.hero-copy .symptoms { text-align: left; }

.study-title {
  margin: 0 0 0.7rem;
  font-size: 1.5rem;
  font-weight: 750;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.badges {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}
/* Pill shape, tinted ground, darker text of the same hue. Two tints
   alternating, so a study can list two or six and they stay legible. */
.badge {
  border-radius: 999px;
  padding: 0.28rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-0 { background: #e7f7ee; color: #17724a; }
.badge-1 { background: #f3ecfa; color: #6b3f93; }

/* The line that hands off to the button. Not `.fine` — it's an instruction to
   read, not small print to skip. */
.cta-lead { margin: 0 0 0.9rem; }

/* Step headings sit under the masthead, so they're a size down from it. */
.step-title {
  margin: 0 0 0.7rem;
  font-size: 1.22rem;
  font-weight: 700;
  line-height: 1.3;
}

/* hero ------------------------------------------------------------------ */

.hero { margin-bottom: 1.25rem; }

.hero-media img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  /* Reserve the space before the image loads. Without this the copy jumps
     down mid-read on a slow connection, which on a landing page reads as
     brokenness. */
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--soft);
  margin-top: 1.15rem;
}

/* symptoms — the "are you experiencing" box, deliberately distinct from the
   benefit bullets below it: one is what brought you here, the other is why
   you'd bother. */
.symptoms {
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
  padding: 1rem 1.15rem;
  margin: 0 0 1.5rem;
}
.symptoms-title {
  margin: 0 0 0.5rem;
  font-weight: 700;
  font-size: 0.98rem;
}
/* The symptoms run across the box rather than down it — three short phrases
   stacked is three lines of scroll for no gain. auto-fit means one column on a
   phone and as many as fit above that, whatever the study lists. */
.symptoms ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}
.symptoms li {
  padding: 0.3rem 0;
  font-size: 1.02rem;
  font-weight: 600;
}

/* wider screens --------------------------------------------------------- */

@media (min-width: 40rem) {
  body { font-size: 18px; }
  /* Wide enough for two columns: copy left, image right. No study uses a hero
     now, but the capability is still configurable. */
  .hero-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem;
    align-items: center;
  }
  .hero-split .hero-media img { margin-top: 0; }
  .site-logo { height: 2.8rem; }
  .study-title { font-size: 1.8rem; }
  .step-title { font-size: 1.35rem; }
  main.wrap { padding-top: 2.2rem; }
  /* The buttons stay full-column: in a 30rem measure a floating auto-width
     button reads as an afterthought rather than the one thing to do next. */
}

@media (prefers-reduced-motion: reduce) {
  .progress-bar span { transition: none; }
}

/* form ------------------------------------------------------------------ */

/* Label inside the box, sitting over the input's own padding. It rises to a
   caption on focus or once something is typed, so the field never loses its
   name — the failure of a bare placeholder, which vanishes exactly when you
   need to check what you're filling in. */
.field-wrap { position: relative; }
.field-wrap .field { padding-top: 1.35rem; padding-bottom: 0.4rem; }
.field-wrap .lbl {
  position: absolute;
  left: 1rem;
  top: 0.95rem;
  margin: 0;
  color: var(--muted);
  font-weight: 500;
  font-size: 1.02rem;
  line-height: 1;
  pointer-events: none;
  transition: transform 0.12s ease, font-size 0.12s ease, color 0.12s ease;
  transform-origin: left top;
}
.field-wrap .field:focus + .lbl,
.field-wrap .field:not(:placeholder-shown) + .lbl {
  transform: translateY(-0.62rem);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--muted);
}
.field-wrap .field:focus + .lbl { color: var(--accent); }

/* Single column too, for the same reason: at 30rem a two-up "Date of birth
   (MM/DD/YYYY)" label has nowhere to go. The labels-inside-the-box treatment
   is what actually shortens this step, and that still holds. */

.lbl { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 0.35rem; }
.field-error { border-color: var(--error); }
.field-msg { color: var(--error); font-size: 0.85rem; margin: -0.85rem 0 1rem; }

/* The honeypot has to be reachable by a naive script and invisible to a
   person. Off-screen rather than display:none, since some bots skip hidden
   fields — and aria-hidden + tabindex=-1 keep it away from screen readers
   and the tab order. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
