/* Lead forms (step 12). One small stylesheet for the form block on site pages
   and for the few pages the Worker draws itself (success, errors, one more
   step). Tokens come from the site stylesheet when it is present; each var()
   has the same value as its fallback, so the Worker's pages look the same
   without it. Mobile first: one column, 16px inputs (no zoom on focus on
   phones), touch targets of at least 44px, visible focus. */

.lead-block { background: var(--tint, #f0f4f8); border-top: 4px solid var(--gold, #c4a04c); padding: 40px 0 44px; margin: 0; }
.lead-wrap { max-width: 880px; }
.lead-heading { margin: 0 0 8px; font-family: var(--display, 'Oswald', Impact, 'Arial Narrow', sans-serif); font-weight: 500; font-size: clamp(1.6rem, 3.4vw, 2.1rem); line-height: 1.15; color: var(--navy, #0d1b2a); }
.lead-intro { margin: 0 0 22px; max-width: 62ch; }

.lead-form { display: block; margin: 0; }
.lead-fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px 20px; }
@media (min-width: 700px) {
  .lead-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lead-field-wide { grid-column: 1 / -1; }
}
.lead-field { min-width: 0; }
.lead-field label, .lead-consents legend { display: block; margin: 0 0 6px; font-weight: 600; font-size: 16px; line-height: 1.35; color: var(--navy, #0d1b2a); }
.lead-field input, .lead-field select, .lead-field textarea {
  display: block; width: 100%; min-height: 48px; padding: 10px 12px;
  font: inherit; font-size: 16px; line-height: 1.4; color: var(--ink-900, #111a24);
  background: #fff; border: 2px solid var(--ink-500, #55616f); border-radius: 3px;
}
.lead-field textarea { min-height: 132px; resize: vertical; }
.lead-field select { appearance: auto; }
.lead-field input:focus-visible, .lead-field select:focus-visible, .lead-field textarea:focus-visible,
.lead-check input:focus-visible, .lead-submit:focus-visible, .lead-errors:focus-visible, .lead-notice:focus-visible,
.lead-done:focus-visible, .lead-form a:focus-visible, .lead-page a:focus-visible {
  outline: 3px solid var(--gold, #c4a04c); outline-offset: 2px;
}
.lead-field [aria-invalid='true'] { border-color: #a4161a; }
.lead-hint { margin: 6px 0 0; font-size: 14px; line-height: 1.45; color: var(--ink-500, #55616f); }
.lead-error { margin: 6px 0 0; font-size: 15px; line-height: 1.4; font-weight: 600; color: #a4161a; }
.lead-error::before { content: 'Error: '; }
.lead-error[hidden] { display: none; }

.lead-errors, .lead-notice { margin: 0 0 20px; padding: 14px 18px; background: #fff; border: 2px solid #a4161a; border-left-width: 6px; border-radius: 3px; color: var(--ink-900, #111a24); }
.lead-notice { border-color: var(--navy, #0d1b2a); }
.lead-errors p, .lead-notice p { margin: 0 0 6px; }
.lead-errors ul { margin: 0; padding-left: 20px; }
.lead-errors a { color: #a4161a; font-weight: 600; }
.lead-status:empty { display: none; }
.lead-status { margin: 0 0 16px; padding: 12px 16px; background: #fff; border-left: 6px solid var(--navy, #0d1b2a); }

/* The trap field: off the page for people, there for programs that fill every box. */
.lead-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.lead-consents { margin: 24px 0 0; padding: 0; border: 0; min-width: 0; }
.lead-consents legend { padding: 0; }
.lead-check { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 12px; align-items: start; margin: 14px 0 0; font-size: 15px; line-height: 1.5; color: var(--ink-700, #2b3440); }
.lead-check input { grid-row: 1 / span 2; width: 26px; height: 26px; margin: 2px 0 0; accent-color: var(--navy, #0d1b2a); }
.lead-check label { display: block; padding: 2px 0; cursor: pointer; }
.lead-consent-links { grid-column: 2; display: block; padding: 4px 0 2px; }
.lead-consent-links a { display: inline-block; padding: 6px 0; }
.lead-turnstile:empty { display: none; }
.lead-turnstile { margin: 20px 0 0; min-height: 65px; }
.lead-actions { margin: 24px 0 0; }
.lead-submit { cursor: pointer; min-height: 48px; min-width: 200px; font-size: 16px; }
.lead-submit[disabled] { opacity: 0.6; cursor: progress; }
.lead-under { margin: 16px 0 0; font-size: 14px; line-height: 1.5; color: var(--ink-500, #55616f); max-width: 70ch; }
.lead-done { padding: 20px 22px; background: #fff; border-left: 6px solid var(--gold, #c4a04c); }
.lead-done p { margin: 0 0 8px; }
.lead-done p:first-child { font-family: var(--display, 'Oswald', Impact, 'Arial Narrow', sans-serif); font-size: 1.4rem; line-height: 1.2; color: var(--navy, #0d1b2a); }
.lead-call { margin: 18px 0; }

/* Buttons, for the Worker's own pages (site pages get these from the site stylesheet). */
.lead-page .btn {
  display: inline-block; background: #c4a04c; color: #0d1b2a; text-decoration: none;
  font-family: 'Oswald', Impact, 'Arial Narrow', sans-serif; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  font-size: 16px; line-height: 1.2; padding: 13px 20px; border-radius: 3px; border: 2px solid #c4a04c; text-align: center;
}
.lead-page .btn-navy { background: #0d1b2a; border-color: #0d1b2a; color: #fff; }

/* ---------- pages drawn by the Worker ---------- */
.lead-page { margin: 0; font-family: 'Archivo', 'Helvetica Neue', Arial, sans-serif; font-size: 17px; line-height: 1.6; color: #2b3440; background: #fff; }
.lead-page *, .lead-page *::before, .lead-page *::after { box-sizing: border-box; }
.lead-page a { color: #16293c; }
.lead-skip { position: absolute; left: -9999px; top: 0; background: #c4a04c; color: #0d1b2a; padding: 10px 14px; }
.lead-skip:focus { left: 8px; top: 8px; }
.lead-page-head { background: #000; color: #fff; padding: 14px 20px; }
.lead-page-head p { margin: 0 auto; max-width: 880px; display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; }
.lead-page-head a { color: #fff; font-weight: 600; text-decoration: none; }
.lead-page-head span { color: #c9d3de; font-size: 14px; }
.lead-page-main { max-width: 920px; margin: 0 auto; padding: 32px 20px 48px; }
.lead-page-main h1 { margin: 0 0 18px; font-family: 'Oswald', Impact, 'Arial Narrow', sans-serif; font-weight: 600; font-size: clamp(1.8rem, 5vw, 2.6rem); line-height: 1.12; color: #0d1b2a; }
.lead-page-main h1:focus { outline: none; }
.lead-page-foot { background: #0d1b2a; color: #c9d3de; padding: 24px 20px 32px; font-size: 15px; }
.lead-page-foot p { margin: 0 auto 8px; max-width: 880px; }
.lead-page-foot a { color: #ecdcb6; display: inline-block; padding: 8px 14px 8px 0; }
