/* HailCare: public screens (landing, log in, sign up, errors). Only what the
   shared components don't cover. */

/* Landing: one large heading broken where the thought breaks, a one-sentence
   lead, both capped at 680px, then a quiet line for phlebotomists. The
   heading is 36px on phones (40px lines), 48px from 768px and 60px from
   1104px, with lines as tall as the type. */
.public-intro { display: grid; gap: var(--sp-5); max-width: 760px; padding-top: var(--sp-4); }
.public-title { font-size: var(--fs-display); line-height: 40px; letter-spacing: -0.028em; max-width: 680px; }
@media (min-width: 768px) { .public-title { line-height: 1; } }
.public-intro .lead { max-width: 680px; color: var(--muted); }
.public-cta { margin-top: var(--sp-2); }
@media (max-width: 479px) { .public-cta .btn { width: 100%; } }

/* "Looking for shifts? Sign up as a phlebotomist": a muted question, its
   answer a link that wraps as one piece. */
.home-path { color: var(--muted); }
.home-path a { font-weight: var(--fw-semibold); white-space: nowrap; }

/* "Launching in Los Angeles" over the landing heading: a square badge with a pin. */
.public-eyebrow {
  display: inline-flex; align-items: center; gap: var(--sp-2); justify-self: start; min-height: 32px;
  padding: 0 var(--sp-3) 0 var(--sp-2); border-radius: var(--r-pill);
  background: var(--card); border: 1px solid var(--rule); box-shadow: var(--shadow-card);
  color: var(--primary-soft-ink); font-size: var(--fs-meta); font-weight: var(--fw-semibold);
}
.public-eyebrow .ico { width: 18px; height: 18px; }

/* Landing sections after the intro start below a hairline, like "How it works". */
.public-band { margin-top: var(--sp-10); padding-top: var(--sp-8); border-top: 1px solid var(--rule); }
.public-band > h2 { margin-bottom: var(--sp-3); }
.public-band > p + p { margin-top: var(--sp-3); }

/* For clinics | For phlebotomists: side by side from 768px. */
.public-sides { display: grid; gap: var(--sp-8); }
.public-sides > section {
  display: grid; gap: var(--sp-3); align-content: start;
  padding: var(--sp-5); background: var(--card); border: 1px solid var(--rule); border-radius: var(--r-lg); box-shadow: var(--shadow-card);
}
.public-sides { gap: var(--sp-4); }
@media (min-width: 768px) {
  .public-sides { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-5); }
  .public-sides > section { padding: var(--sp-7); }
}

/* A standalone link with a chevron ("All questions"), 44px tall. */
.public-more { display: inline-flex; align-items: center; gap: var(--sp-1); min-height: 44px; font-weight: var(--fw-semibold); justify-self: start; }
.public-more .ico { width: 18px; height: 18px; }
/* A short list of such links (Guides on the landing, clinic and phlebotomist pages). */
.public-links { list-style: none; display: grid; justify-items: start; }

/* Bulleted facts: a small petrol dot before each, the text at the reading measure. */
.public-points { list-style: none; display: grid; gap: var(--sp-3); max-width: var(--measure); }
.public-points > li { position: relative; padding-left: var(--sp-6); }
.public-points > li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }

/* The landing page's three questions. */
.public-qa { display: grid; gap: var(--sp-5); max-width: var(--measure); margin: var(--sp-3) 0 var(--sp-2); }
.public-qa dt { font-size: var(--fs-lead); font-weight: var(--fw-semibold); line-height: var(--lh-snug); }
.public-qa dd { margin-top: var(--sp-1); }

/* "How it works": a real sequence, numbered large, one step under another;
   beside it from 960px, an example shift on a tint, laid out as on a phone
   and linking nowhere. */
.public-steps { list-style: none; display: grid; gap: var(--sp-6); }
.public-steps > li { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: var(--sp-4); align-items: baseline; align-content: start; }
.public-steps__n { color: var(--primary); font-size: var(--fs-title); font-weight: var(--fw-bold); line-height: 1; font-variant-numeric: tabular-nums; }
.public-steps p { font-size: var(--fs-lead); line-height: 1.4; }
.home-how__grid { display: grid; gap: var(--sp-7); align-items: start; margin-top: var(--sp-6); }
@media (min-width: 960px) { .home-how__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 28rem); column-gap: var(--sp-9); } }
.home-example { display: grid; gap: var(--sp-2); margin: 0; }
.home-example__label { color: var(--muted); font-size: var(--fs-meta); font-weight: var(--fw-semibold); }
.home-example .list > li { padding-bottom: 0; }
.home-example .shift { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "when side" "main main"; column-gap: var(--sp-4); }
.home-example .shift__side { justify-items: end; text-align: right; }
.home-example .shift__main { margin-top: var(--sp-3); }
.home-example .shift:hover::before { background: transparent; }

/* The tagline between what each side gets and How it works: two sentences,
   each on its own line, 36px on phones and 48px from 768px, capped at 680px.
   Its words start muted and turn to ink one by one as it scrolls in
   (public/js/app.js marks it .is-armed and each word .is-lit); without
   JavaScript, or with reduced motion, they are ink from the start. */
.home-tagline { margin-top: var(--sp-10); }
.home-tagline__text { max-width: 680px; font-size: 36px; line-height: 40px; font-weight: var(--fw-semibold); letter-spacing: -0.022em; text-wrap: balance; }
.home-tagline__text > span { display: block; }
@media (min-width: 768px) { .home-tagline__text { font-size: 48px; line-height: 1.1; } }
.home-tagline__text.is-armed .reveal-word { color: var(--muted); transition: color var(--dur-reveal) var(--ease); }
.home-tagline__text.is-armed .reveal-word.is-lit { color: var(--ink); }

/* The closing call: a question, one line, a secondary button back up to the
   request form, and the line for phlebotomists. */
.home-final .actions { margin-top: var(--sp-5); }
.home-final .home-path { margin-top: var(--sp-4); }

/* One real quote or count beside the request form (partials/home-proof.ejs). */
.home-proof { margin: 0; display: grid; gap: var(--sp-2); max-width: 32em; }
.home-proof blockquote { margin: 0; font-size: var(--fs-lead); line-height: 1.45; }
.home-proof figcaption { font-size: var(--fs-meta); font-weight: var(--fw-semibold); }
.home-proof--figure { display: block; color: var(--muted); }
.home-proof--figure strong { color: var(--ink); font-size: var(--fs-figure); }

/* Log in and sign up: a centred narrow column (.container--narrow, 440px).
   Flash messages render inside it (views/auth/flashes.ejs). */
.public-auth { padding-top: var(--sp-2); }
@media (min-width: 768px) { .public-auth { padding-top: var(--sp-6); } }
/* A form with no sections of its own (log in, forgot password, the waitlist)
   is one card; sign-up's sections are cards already. */
.public-auth > .form:not(:has(.fieldset)) {
  padding: var(--sp-5); background: var(--card); border: 1px solid var(--rule); border-radius: var(--r-lg); box-shadow: var(--shadow-raised);
  --well: var(--panel-bg);
}
@media (min-width: 480px) { .public-auth > .form:not(:has(.fieldset)) { padding: var(--sp-7); } }

/* Sign-up chooser: each row is one link, with a chevron. The row tints on
   hover and rings on focus; the title underlines on hover. */
.public-choices > li { padding: 0; }
.public-choices a {
  display: flex; align-items: center; gap: var(--sp-4);
  padding: var(--sp-5);
  color: var(--ink); text-decoration: none;
  transition: background-color var(--dur-color) var(--ease);
}
.public-choices a:hover { background: var(--panel-bg); color: var(--ink); }
/* The rows fill the list's card: the first and last take its corners. */
.public-choices > li:first-child > a { border-radius: calc(var(--r-lg) - 1px) calc(var(--r-lg) - 1px) 0 0; }
.public-choices > li:last-child > a { border-radius: 0 0 calc(var(--r-lg) - 1px) calc(var(--r-lg) - 1px); }
.public-choices > li:only-child > a { border-radius: calc(var(--r-lg) - 1px); }
.public-choices a:focus-visible { outline-offset: -3px; }
.public-choices__text { display: grid; gap: var(--sp-1); flex: 1; min-width: 0; }
.public-choices b { font-size: var(--fs-lead); font-weight: var(--fw-semibold); line-height: var(--lh-snug); }
.public-choices a:hover b { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.public-choices__text > span { color: var(--muted); }
.public-choices .ico { width: 24px; height: 24px; color: var(--primary); }

/* Sign-up form: fieldsets 40px apart, as on Post shift. The confirmation
   and Create account close the form together. (In the narrow column City
   takes its own row, with State and ZIP paired below it: hailcare-ui.css.) */
.public-signup { gap: var(--sp-5); }
.public-signup .fieldset + .fieldset { margin-top: 0; }
.public-signup__end { display: grid; gap: var(--sp-5); }

/* A new password box with "Suggest a strong password" under it (sign-up and
   "Set a new password", partials/suggest-password.ejs). The buttons are text
   buttons 44px tall, like "Use my location"; the status line under them stays
   in the page, empty, so screen readers announce what it says. */
.public-newpass { display: grid; gap: var(--sp-1); }
.public-suggest { display: grid; }
.public-suggest[hidden] { display: none; }
.public-suggest__buttons { display: flex; flex-wrap: wrap; gap: 0 var(--sp-5); }
.public-suggest__button {
  display: inline-flex; align-items: center; gap: var(--sp-2); min-height: 44px; padding: 0; border: 0; background: none;
  color: var(--primary); font: inherit; font-size: var(--fs-meta); font-weight: var(--fw-semibold); cursor: pointer;
}
.public-suggest__button:hover { color: var(--primary-hover); text-decoration: underline; text-underline-offset: 3px; }
.public-suggest__button[hidden] { display: none; }
.public-suggest__button .ico { width: 18px; height: 18px; }

/* Certification checkboxes (partials/cert-fields.ejs, also on Edit profile):
   one row per certification, hairlines between rows; the short label on top
   and the full name below it. */
.public-cert + .public-cert { border-top: 1px solid var(--rule); }
/* "Phlebotomy" and "Life support": small headings over each group. */
.public-certs__group { margin-top: var(--sp-4); color: var(--muted); font-size: var(--fs-meta); font-weight: var(--fw-semibold); }
.public-cert > .check { padding: var(--sp-4) 0; }
.public-cert__text { display: grid; gap: 2px; }
.public-cert__text > b { line-height: var(--lh-snug); }
.public-cert__name { color: var(--muted); font-size: var(--fs-meta); line-height: 1.45; }

/* A certification's License number and Expires fields, under its checkbox
   and in line with its label. Details show only while the box is checked
   or they hold an error. :has() works with JavaScript off; public/js/app.js
   adds .collapsed for browsers without it (separate rules, so a browser that
   can't parse :has() still reads the second). */
.public-certs__details { padding-left: 34px; padding-bottom: var(--sp-5); }
.public-cert:has(> .check input:not(:checked)):not(:has(.err)) > .public-certs__details { display: none; }
.public-certs__details.collapsed { display: none; }
/* Side by side from 600px: the label, box and help or error line of the two
   fields share rows, so the boxes stay level when one label wraps. */
@media (min-width: 600px) {
  .public-certs__details { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); grid-template-rows: repeat(3, auto); }
  .public-certs__details > .field { grid-row: span 3; grid-template-rows: subgrid; }
  /* An error line is too long for the narrow Expires column: stack them. */
  .public-certs__details:has(.err) { grid-template-columns: minmax(0, 1fr); }
}
/* The error summary's "Certifications" link lands on the fieldset with its
   legend in view. */
.public-certs { scroll-margin-top: var(--sp-5); }

/* Privacy policy and terms: one column of prose at the reading measure. */
.legal { display: grid; gap: var(--sp-4); max-width: var(--measure); }
.legal h2 { font-size: var(--fs-heading); margin-top: var(--sp-5); }
.legal ul { display: grid; gap: var(--sp-2); padding-left: 1.25em; }
.legal h3 { font-size: var(--fs-lead); margin-top: var(--sp-3); }

/* Accepting new terms (legal/accept.ejs): the text at the reading measure,
   then the notice, the boxes to check and Accept and continue. */
.legal-accept { display: grid; gap: var(--sp-7); max-width: var(--measure); }
.legal-accept > .page-head { margin-bottom: 0; }
.legal-accept__form { gap: var(--sp-5); }
.legal-accept__form > .credential-notice { margin-bottom: 0; }

/* ---- Public pages: /clinics, /phlebotomists, /pricing, /faq, /about ---- */
/* One column; prose and lists stop at the reading measure. Sections are the
   usual 56px apart, each with an H2, and so are the closing buttons. */
.public-page > .public-cta { margin-top: var(--sp-9); }
.public-page > .section > h2 { margin-bottom: var(--sp-3); }
.public-page > .section > p + p { margin-top: var(--sp-3); }

/* Numbered steps: the number in petrol at the heading size, the step beside it. */
.public-list { list-style: none; display: grid; gap: var(--sp-5); max-width: var(--measure); }
.public-list > li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: var(--sp-3); align-items: baseline; }
.public-list__n { color: var(--primary); font-size: var(--fs-heading); font-weight: var(--fw-bold); line-height: 1; font-variant-numeric: tabular-nums; }

/* Questions: in-page links first, then each group's questions as h3. */
.public-toc { display: flex; flex-wrap: wrap; gap: 0 var(--sp-5); margin: calc(var(--sp-4) * -1) 0 var(--sp-7); }
.public-toc a { display: inline-flex; align-items: center; min-height: 44px; font-weight: var(--fw-semibold); }
.public-faq { scroll-margin-top: var(--sp-5); max-width: var(--measure); }
.public-faq > h3 { margin-top: var(--sp-6); font-size: var(--fs-lead); line-height: var(--lh-snug); }
.public-faq > h2 + h3 { margin-top: var(--sp-4); }
.public-faq > p { margin-top: var(--sp-2); }

/* Pricing: one row per side, the amount at the figure size on the right.
   .public-rows is the same list without amounts (guides: options, certificates). */
.public-prices, .public-rows {
  display: grid; max-width: var(--measure);
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--r-lg); box-shadow: var(--shadow-card);
}
.public-prices > div, .public-rows > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--sp-1) var(--sp-4); padding: var(--sp-5); }
.public-prices > div + div, .public-rows > div + div { border-top: 1px solid var(--rule); }
.public-prices dt, .public-rows dt { font-size: var(--fs-lead); font-weight: var(--fw-semibold); }
.public-prices dd, .public-rows dd { grid-column: 1 / -1; color: var(--muted); }
.public-prices dd.public-prices__amount { grid-column: 2; grid-row: 1; color: var(--ink); font-size: var(--fs-figure); font-weight: var(--fw-bold); line-height: var(--lh-snug); font-variant-numeric: tabular-nums; }

/* Waitlist: the role radios in a fieldset with no frame; the bot trap off screen. */
.public-roles { border: 0; padding: 0; margin: 0; min-width: 0; }
.public-roles > legend { padding: 0; margin-bottom: var(--sp-1); }
.public-roles > .check { padding: var(--sp-2) 0; }
/* "How did you hear about HailCare?": "If other, where?" sits 16px under the
   dropdown and shows once Other is chosen or while it holds an error. A
   browser without :has() always shows it. */
.public-heard { display: grid; gap: var(--sp-4); }
.public-heard:not(:has(select option[value="other"]:checked)) > .public-heard__other:not(:has(.err)) { display: none; }
/* A student's school and expected certificate, and a nurse's interests: in
   line with the role labels, shown once that role is chosen or while they
   hold an error. A browser without :has() always shows them. */
.public-waitlist__more { padding-left: 34px; }
.public-waitlist__student { display: grid; gap: var(--sp-5); }
.public-waitlist:not(:has(input[name="role"][value="student"]:checked)) .public-waitlist__student:not(:has(.err)) { display: none; }
.public-waitlist:not(:has(input[name="role"][value="rn"]:checked)) .public-waitlist__rn { display: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }


/* Guides and answer pages (/guides, /clinics/phlebotomist-for-a-day, …): who
   wrote it and when it last changed under the title, then the plain answer as
   the lead. A short paragraph sits close to the rows it introduces or follows. */
.public-guide__meta { color: var(--muted); font-size: var(--fs-meta); }
.public-guide__lead { max-width: var(--measure); }
.public-guide__before { margin-bottom: var(--sp-4); }
.public-guide__after { margin-top: var(--sp-4); }

/* "Have us post your first shift, free" (partials/first-shift-form.ejs): the
   form in a tinted panel, beside the intro from 1024px (a column up to 28rem
   wide, spanning the intro and, on /clinics, How it works) and right under
   the intro below that, so its heading and first fields show in the first
   screen. From 1104px the intro's column fits the home page's 60px heading
   ("Find a phlebotomist" on one line). Name and email, then phone and ZIP,
   pair up from 600px. */
.first-shift-hero { display: grid; gap: var(--sp-7); align-items: start; }
.first-shift-hero > .page-head { margin-bottom: 0; }
.first-shift-hero__more { margin-top: 0; }
@media (min-width: 1024px) {
  /* The intro's row is only as tall as the intro; what follows it takes the rest. */
  .first-shift-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 28rem); grid-template-rows: auto 1fr; column-gap: var(--sp-9); }
  .first-shift-hero__intro, .first-shift-hero__more { grid-column: 1; }
  .first-shift-hero > .first-shift { grid-column: 2; grid-row: 1 / span 2; }
}
.first-shift { display: grid; gap: var(--sp-5); box-shadow: var(--shadow-raised); }
.first-shift__head { display: grid; gap: var(--sp-2); }
.first-shift__head h2 { font-size: var(--fs-heading); line-height: var(--lh-snug); }
.first-shift__head p:last-child { color: var(--muted); }
.first-shift__eyebrow { color: var(--primary-soft-ink); font-size: var(--fs-meta); font-weight: var(--fw-semibold); }
.first-shift__form { gap: var(--sp-4); }
.first-shift__pair { display: grid; gap: var(--sp-4); }
@media (min-width: 600px) { .first-shift__pair { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* The note starts two lines tall and grows as it fills (where supported). */
.first-shift .textarea { min-height: 0; field-sizing: content; max-height: 14em; }
/* Home: "Prefer to post shifts yourself?" follows the form on phones; from
   1024px it sits right under the line for phlebotomists, beside the form. */
.first-shift-hero--home .first-shift-hero__more { padding-top: 0; }
@media (min-width: 1024px) { .first-shift-hero--home { row-gap: var(--sp-3); } }
/* From 768px the home page starts 40px under the header, not 56px, so the
   request form's button stays in a laptop's first screen. */
@media (min-width: 768px) { .main:has(> .first-shift-hero--home) { padding-top: var(--sp-8); } }

/* Open shifts for someone signed out (views/partials/public-shift.ejs,
   views/public/shift.ejs): the street address is a blurred stand-in, never
   the real one, with a sign-up link beside it that sits above the row's
   whole-row link. */
.public-address { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-1) var(--sp-3); margin: var(--sp-1) 0 var(--sp-2); }
.public-address__blur { filter: blur(5px); color: var(--muted); user-select: none; }
.public-address__cta { position: relative; z-index: 1; font-weight: var(--fw-semibold); }
.public-address--row { margin: 0; }
.public-address__town { display: block; }
.public-shift__summary { margin-top: var(--sp-6); }
.public-cities { gap: var(--sp-1); }
.public-share__form { max-width: var(--form); margin: var(--sp-4) 0; }

/* The printable flyer: one sheet, the link large. */
.flyer__sheet { max-width: 640px; padding: var(--sp-7); border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--card); box-shadow: var(--shadow-card); display: grid; gap: var(--sp-5); }
.flyer__brand { font-size: var(--fs-heading); font-weight: var(--fw-bold); }
.flyer__title { font-size: var(--fs-display); line-height: 1.1; }
.flyer__link { font-size: var(--fs-heading); font-weight: var(--fw-bold); color: var(--primary); overflow-wrap: anywhere; }
.flyer__actions { margin-top: var(--sp-6); }
@media print {
  .header, .footer, .tabbar, .no-print, .flash, .flashes { display: none !important; }
  .flyer__sheet { border: 0; padding: 0; max-width: none; box-shadow: none; background: none; }
}

/* A clinic's invite link (/invite/<token>): one line under the legend saying what happens next. */
.invite-step { margin-bottom: var(--sp-2); }
