/* ==========================================================================
   apply.css: the application flow only (/apply/ and /apply/thanks).
   base.css is the design contract and is linked first. Nothing here
   overrides a base.css component; this file lays them out.

   No assumption is made about the height of the stamped header: the page
   starts with its own top padding and nothing is pinned to the viewport.
   ========================================================================== */

/* ------------------------------------------------------------------ shell */
.apply-main { padding-block: 40px 80px; }
.apply-head { margin-bottom: 28px; }
.apply-head .lead { margin-top: 10px; }

.apply-progress { margin-bottom: 20px; }
.apply-form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }

/* The one-line route to a person, in the same place on every step (WCAG 3.2.6). */
.apply-help { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); }

/* ----------------------------------------------------------- no-JS notice */
.nojs-note {
  font-size: var(--fs-small); color: var(--ink);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 14px; margin: 0 0 24px;
}
html.js .nojs-note { display: none; }

/* ---------------------------------------------------------------- honeypot */
.hp-wrap {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------------ steps */
/* With JavaScript off every panel is visible and the form posts in one go. */
.step-panel { padding-block: 8px 0; }
.step-panel + .step-panel { margin-top: 32px; border-top: 1px solid var(--line); padding-top: 28px; }
html.js .step-panel { display: none; }
html.js .step-panel.is-current { display: block; }
html.js .step-panel + .step-panel { margin-top: 0; border-top: 0; padding-top: 8px; }

.step-heading { margin-bottom: 6px; }
.step-heading:focus { outline: none; }
.step-sub { font-size: var(--fs-small); margin: 0 0 20px; }

.step-nav { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.step-nav .btn--primary { flex: 1 1 200px; }
.step-nav .btn--secondary { flex: 0 0 auto; }

/* ------------------------------------------------------------- questions */
.step-panel .field { margin: 0 0 24px; }
.step-panel > .field:last-of-type { margin-bottom: 0; }
.q__legend { display: block; font-weight: 600; font-size: .9375rem; margin-bottom: 8px; padding: 0; }
.q .field__hint { margin: -2px 0 8px; }
.q .field__error { margin-top: 8px; }

/* The role's own terms, stated per role and never site-wide. */
.role-facts {
  margin: 0 0 4px; padding-left: 12px; border-left: 2px solid var(--accent);
  font-size: var(--fs-small); color: var(--muted);
}
.role-facts + .step-sub { margin-top: 16px; }

.role-block__legend {
  font-size: var(--fs-label); font-weight: 600; letter-spacing: .09em; text-transform: uppercase;
  color: var(--muted); margin: 24px 0 12px;
}
html.js .role-block { display: none; }
html.js .role-block.is-active { display: block; }
html.js .role-block__legend { display: none; }
html.js .role-facts { display: none; }
html.js .role-facts.is-active { display: block; }

/* --------------------------------------------------------- "not sure yet" */
.unsure-btn {
  display: inline-flex; align-items: center; min-height: var(--tap);
  margin-top: 4px; padding: 0; border: 0; background: none; font: inherit; font-weight: 600;
  color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.unsure-btn:hover { color: var(--accent-hover); }
.role-explainer { margin-top: 8px; }
.explainer-list { margin: 14px 0 0; padding-left: 1.1em; }
.explainer-list li + li { margin-top: 8px; }
.explainer-picks { margin-top: 18px; }

/* ------------------------------------------------------------ typed fields */
.name-row { display: grid; gap: 0; }
@media (min-width: 560px) {
  .name-row { grid-template-columns: 1fr 1fr; gap: 0 16px; }
}
.input--short { max-width: 11rem; }

/* Rule 7: the reason sits beside the field in plain view, not behind a link. */
.phone-privacy {
  margin-top: 10px; padding: 10px 12px; color: var(--ink);
  background: var(--accent-tint); border: 1px solid var(--accent-border);
  border-radius: var(--radius); font-size: var(--fs-small); line-height: 1.5;
}

.email-suggest { margin: 8px 0 0; font-size: var(--fs-small); color: var(--muted); }
.email-suggest:empty { display: none; }
.suggest-btn {
  min-height: 24px; padding: 2px 4px; margin-left: 2px; border: 0; background: none;
  font: inherit; font-size: var(--fs-small); font-weight: 600; color: var(--accent-text);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.suggest-btn:hover { color: var(--accent-hover); }

/* ------------------------------------------------------- no dead ends note */
.mismatch {
  margin: 0 0 24px; padding: 14px 16px;
  background: var(--accent-tint); border: 1px solid var(--accent-border);
  border-radius: var(--radius); font-size: var(--fs-small); line-height: 1.55;
}
.mismatch p { margin: 0; }
.mismatch .btn { margin-top: 12px; }
.mismatch:empty { display: none; }

/* --------------------------------------------------------------- messages */
.apply-alert {
  margin-bottom: 20px; padding: 12px 14px; border-radius: var(--radius);
  background: var(--danger-tint); border: 1px solid var(--danger); color: var(--danger);
  font-size: var(--fs-small); font-weight: 500;
}
.apply-alert:empty { display: none; }

.submit-fallback {
  margin: 16px 0 0; padding: 12px 14px; border-radius: var(--radius);
  background: var(--warn-tint); border: 1px solid #D9B45B; color: var(--ink);
  font-size: var(--fs-small); line-height: 1.55;
}
.submit-fallback:empty { display: none; }

/* --------------------------------------------------------------- consent */
.consent-block {
  margin: 28px 0 24px; padding: 18px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.consent-notice { font-size: .9375rem; line-height: 1.5; margin: 0 0 14px; color: var(--ink); }
.consent-block .field { margin: 0; }
.ack-field { margin-top: 4px; }

/* --------------------------------------------------------------- summary */
.summary { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.summary__list { margin-top: 16px; }
.summary__list dd { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.summary__value { flex: 1 1 auto; min-width: 0; }
.summary__edit {
  flex: none; min-height: 24px; padding: 0; border: 0; background: none; font: inherit;
  font-size: var(--fs-small); font-weight: 600; color: var(--accent-text);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.summary__edit:hover { color: var(--accent-hover); }
html.no-js .summary { display: none; }

/* ----------------------------------------------------------- thanks page */
.thanks-next { margin-top: 8px; }
.save-number { margin: 16px 0 4px; }
.save-number__why { font-size: var(--fs-small); color: var(--muted); margin: 0 0 14px; }
.thanks-assistant {
  margin: 16px 0 0; padding: 12px 14px; font-size: var(--fs-small); line-height: 1.55;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.thanks-next .step h3 { margin-bottom: 8px; }
.thanks-next .step p { font-size: .9375rem; }
.thanks-foot { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); }
.thanks-foot p { font-size: .9375rem; }

/* Optional booking after applying (LN-0333, LN-0334) */
.book-now { margin: 24px 0; padding: 20px; display: grid; gap: 14px; }
.book-now__sub { margin: 4px 0 0; color: inherit; opacity: .8; }
.book-now__days { display: grid; gap: 12px; margin-top: 12px; }
.book-now__dayname { margin: 0 0 6px; font-weight: 600; font-size: .9rem; letter-spacing: .02em; }
.book-now__times { display: flex; flex-wrap: wrap; gap: 8px; }
.book-now__time { min-height: 44px; padding: 10px 16px; border: 1.5px solid currentColor; border-radius: 6px; background: transparent; color: inherit; font-family: inherit; font-weight: 600; font-size: 1rem; line-height: 1.2; cursor: pointer; }
.book-now__time:hover, .book-now__time:focus-visible { background: rgba(0, 0, 0, .05); }
.book-now__time:disabled { opacity: .5; cursor: default; }
.book-now__time.is-busy { opacity: 1; }
.book-now__later { margin-top: 12px; }
.book-now__later summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; gap: 10px; list-style: none; }
.book-now__later summary::-webkit-details-marker { display: none; }
.book-now__later summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; }
.book-now__later[open] summary::after { transform: rotate(45deg); }
.book-now__date { display: grid; gap: 6px; margin: 8px 0 10px; font-size: .9rem; }
.book-now__date input { min-height: 44px; padding: 8px 10px; font: inherit; border: 1px solid currentColor; border-radius: 6px; max-width: 240px; }
.book-now__none { margin: 0; opacity: .8; }
.book-now__skip { justify-self: start; margin-top: 12px; padding: 8px 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; min-height: 44px; }
.book-now__actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.book-now__msg { margin: 0; }
.book-now__msg:empty { display: none; }
