/*
  style.css — the form's look. Minimal on purpose: this is a skeleton.

  Every color is a --color-* role token from tokens.css. If you find yourself
  typing a hex here, stop — add it to tokens.css and reference it.

  Ratios and the reasoning are in context/brand/color-guideline.html.
  The rules this file must satisfy are in context/brand/anti-slop.md §3.
*/
@import "tokens.css";

/* ───────────── base ───────────── */

*, *::before, *::after { box-sizing: border-box; }

/*
  `hidden` is how app.js shows one screen at a time. The browser's default
  is `[hidden] { display: none }`, but ANY author `display` rule (like the
  `section { display: grid }` below) would override it — author styles beat
  browser defaults. `!important` here makes `hidden` always win.
*/
[hidden] { display: none !important; }

html { color-scheme: light; }   /* the brand has no dark palette; see color-guideline */

/* Belt and braces: the page must never scroll sideways on a phone. `clip`
   rather than `hidden` so position:sticky still works if we add one later. */
html, body { overflow-x: clip; }

html { height: 100%; }
:root { --col: 600px; }   /* the reading column: ~68 characters at 17px, shared by header, main and footer */
body {
  margin: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--lh-body);
  padding-inline: var(--gutter);
  padding-block: 0;
  -webkit-font-smoothing: antialiased;
}

/* Brand header: wordmark and tagline, one line, on every screen. */
.site {
  width: 100%;
  max-width: var(--col);
  margin: 0 auto;
  min-height: 56px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-4);
  padding-block: var(--sp-4);
}
.site__mark { font-family: var(--font-display); font-weight: 700; font-size: 1.125rem; letter-spacing: -0.01em; }
.site__tag { font-size: var(--text-caption); color: var(--color-text-muted); }

/* The reading column. --col only bites above ~630px; on a phone the gutters set the measure. */
main {
  flex: 1 0 auto;
  width: 100%;
  max-width: var(--col);
  margin: 0 auto;
  padding-block: var(--sp-6) var(--sp-16);
  display: flex;
  flex-direction: column;
}
main > section:not([hidden]) { flex: 1 0 auto; }

.site-foot {
  width: 100%;
  max-width: var(--col);
  margin: 0 auto;
  padding-block: var(--sp-4) calc(var(--sp-4) + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--color-divider);
  font-size: var(--text-caption);
  line-height: var(--lh-caption);
  color: var(--color-text-muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--sp-1) var(--sp-4);
}
.site-foot a { color: var(--color-text-secondary); font-weight: 600; text-decoration: none; }
.site-foot a:focus-visible { outline: 2px solid var(--color-focus-ring); outline-offset: 2px; border-radius: var(--radius-sm); }

/* Screens stack their children with one gap; headings add their own space above. */
section {
  display: grid;
  gap: var(--sp-3);
  align-content: start;
}

/* The welcome screen is the first impression: centred vertically, the brand's
   arch (its logo motif) as the one decorative element on the whole form. */
.welcome { align-content: center; gap: var(--sp-4); padding-block: var(--sp-8); }
.welcome .mark { width: 168px; height: auto; margin-bottom: var(--sp-2); }
.welcome h1 { margin-bottom: 0; }
.welcome .lede { max-width: 52ch; }
.welcome .btn-hero { margin-top: var(--sp-4); }
.welcome__meta { font-size: var(--text-caption); line-height: var(--lh-caption); color: var(--color-text-muted); }
@media (min-width: 768px) {
  .welcome .mark { width: 200px; }
  .welcome .btn-hero { min-width: 220px; padding-inline: var(--sp-8); }
}
/* Grid items default to min-width:auto, which lets long content push a
   column wider than the screen. min-width:0 lets text wrap instead. */
section > *, form > * { min-width: 0; }

/* The question is the headline. Merriweather 400: asked, not announced. */
h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-h1);
  line-height: var(--lh-h1);
  margin: 0 0 var(--sp-2);
  text-wrap: balance;
  overflow-wrap: anywhere;
}
@media (min-width: 768px) {
  h1 { font-size: 2.25rem; line-height: 1.17; }   /* 36/42 */
}
/* Focus lands on the heading when a screen changes. Show the ring only for
   keyboard users (:focus-visible), never `outline: none`. */
h1:focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

/* Section heading. More space above than below (Butterick): it belongs to what follows. */
h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-h2);
  line-height: var(--lh-h2);
  margin: var(--sp-6) 0 0;
  text-wrap: balance;
}

p { margin: 0; }
.lede { color: var(--color-text-secondary); }
.hint { font-size: var(--text-caption); line-height: var(--lh-caption); color: var(--color-text-muted); }

/* A caption above a heading is plain muted text, not a caps eyebrow (GOV.UK caption). */
.eyebrow { color: var(--color-text-muted); margin: 0; }

/* ───────────── effects: resting states ─────────────
   Motion (vendor/motion) animates these; without it, or under reduced motion,
   everything below is simply shown at rest. */

/* Reading progress: a hairline that fills left to right as you scroll. */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 3px;
  background: var(--color-action);
  transform-origin: 0 50%;
  transform: scaleX(0);
  z-index: 10;
  pointer-events: none;
}

/* Sent check mark: drawn fully at rest; Motion draws it in from 0 on arrival. */
.sent__check { color: var(--color-step-done); display: block; }
.sent__check-path { stroke-dasharray: 1; stroke-dashoffset: 0; }

/* Press feedback on buttons and option cards: a slight settle, transform only. */
.btn-primary:active:not(:disabled), .btn-secondary:active { transform: scale(0.985); }
@media (prefers-reduced-motion: reduce) {
  .btn-primary:active:not(:disabled), .btn-secondary:active { transform: none; }
}

/* ───────────── navigation + progress ───────────── */

.back {
  justify-self: start;
  color: var(--color-text);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.back:focus-visible { outline: 2px solid var(--color-focus-ring); outline-offset: 2px; border-radius: var(--radius-sm); }

.progress-text {
  font-size: var(--text-caption);
  line-height: var(--lh-caption);
  color: var(--color-text-muted);
}

/* Decorative — aria-hidden in markup; the text above carries the meaning. */
.dots { display: flex; gap: var(--sp-2); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--color-step-todo); }
.dot.done { background: var(--color-step-done); }
.dot.current { background: var(--color-step-current); }

/* ───────────── questions ───────────── */

form { display: grid; gap: var(--sp-3); }

fieldset { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: var(--sp-2); }
/* <legend> shrink-wraps to its content by default, which lets a long question
   escape the column. Pin it to full width so the <h1> inside wraps normally. */
legend { padding: 0; margin-bottom: var(--sp-2); width: 100%; max-width: 100%; }
legend + .hint { margin-bottom: var(--sp-2); }

/*
  The option card. The native radio is kept for accessibility but visually
  removed with the clip technique — never display:none, which also removes
  it from screen readers and keyboards. The <label> IS the card.
*/
/* ───────────── doors (the other-enquiries screen) ───────────── */

/* A door is not an answer card. The question screens record what you said, so
   they use radios and a Continue button; these four just route you, so each
   row is a button that goes somewhere the moment you press it.

   Everything about the look says "destination" rather than "option": no radio
   dot, a chevron instead, a supporting line under the label, and the quiet
   divider colour rather than the rose border the answer cards use. */
.doors { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-3); }

.door {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  text-align: left;
  font: inherit;
  padding: var(--sp-4);
  min-height: 44px;
  background: var(--color-surface);
  border: 1.5px solid var(--color-divider);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}
.door__text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.door__label { font-weight: 600; color: var(--color-text); }
.door__hint {
  font-size: var(--text-caption);
  line-height: var(--lh-caption);
  color: var(--color-text-secondary);
  text-wrap: pretty;
}
.door__chevron { flex: none; color: var(--color-text-muted); transition: transform 150ms ease, color 150ms ease; }

@media (hover: hover) {
  .door:hover {
    border-color: var(--color-action);
    box-shadow: var(--shadow-card);
  }
  .door:hover .door__chevron { color: var(--color-action); transform: translateX(3px); }
}
.door:focus-visible { outline: 2px solid var(--color-focus-ring); outline-offset: 2px; }
.door:active { background: var(--color-surface-quiet); }

/* ───────────── the welcome screen's quiet second door ───────────── */

/* Everyone who is not a parent leaves through here, and almost nobody is. It
   sits under Begin, behind a rule, in caption type — present, never competing. */
.welcome__other {
  margin-top: var(--sp-8);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--color-divider);
  /* Reading size, not caption size. This block is the only route for a school,
     a speaker or an intern, and at 14px it read as a footnote they skipped. */
  font-size: var(--text-body);
  line-height: var(--lh-body);
  color: var(--color-text-secondary);
  max-width: 44ch;
}
.link-quiet {
  font: inherit;
  font-weight: 600;
  color: var(--color-link);
  background: none;
  border: 0;
  /* Vertical padding only, so the tap target clears 44px without the chevron
     drifting away from the end of the sentence it belongs to. */
  padding: var(--sp-2) 0;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
/* Same glyph and the same 3px nudge as .door, so both say "this goes somewhere". */
.link-quiet__chevron { flex: none; transition: transform 150ms ease; }
@media (prefers-reduced-motion: reduce) { .link-quiet__chevron { transition: none; } }
@media (hover: hover) {
  .link-quiet:hover { color: var(--color-action); }
  .link-quiet:hover .link-quiet__chevron { transform: translateX(3px); }
}
.link-quiet:focus-visible { outline: 2px solid var(--color-focus-ring); outline-offset: 2px; border-radius: 2px; }

.option { position: relative; }

.option input,
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.option label {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: 48px;
  padding: 11px 16px;
  border: 2px solid var(--color-option-border);   /* 2px in EVERY state: no width shift */
  border-radius: var(--radius);
  background: var(--color-surface);
  font-weight: 500;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease;
}

/* The radio indicator, drawn on the label. Third signal alongside border + fill. */
.option label::before {
  content: "";
  flex: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--color-text-secondary);
  background: var(--color-surface);
  transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

@media (hover: hover) {
  .option label:hover { background: var(--color-surface-quiet); }
}

.option input:checked + label {
  border-color: var(--color-option-selected-border);
  background: var(--color-option-selected-bg);
}
.option input:checked + label::before {
  border-color: var(--color-option-check-fill);
  background: var(--color-option-check-fill);
  box-shadow: inset 0 0 0 4px var(--color-surface);   /* the white dot */
}

.option input:focus-visible + label {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
}

/* Checkbox flavour of the same card: square indicator, check mark when on. */
.option--check label::before { border-radius: var(--radius-sm); }
.option--check input:checked + label::before {
  box-shadow: none;
  background-color: var(--color-option-check-fill);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' d='M3 8.5l3 3 7-7'/%3E%3C/svg%3E");
  background-size: 70%;
  background-position: center;
  background-repeat: no-repeat;
}

/* ───────────── availability picker ───────────── */

/*
  Weekday tabs, then a grid of half hours. Everything is a real <button>, so
  it works with a thumb, a keyboard and a screen reader without a library.
  The half hours borrow the answer-card recipe: 2px border in every state,
  magenta border and pink fill when chosen.
*/
.days { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--sp-2); }
.day {
  position: relative;
  min-height: 48px;
  font: inherit;
  font-weight: 600;
  color: var(--color-text);
  background: var(--color-surface);
  border: 2px solid var(--color-option-border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease;
}
/* Weekday on top, its next date underneath in smaller, lighter type. */
.day { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: var(--sp-2) 0; }
.day__date { font-size: 0.75rem; font-weight: 400; line-height: 1; opacity: 0.8; white-space: nowrap; }
/* The day being edited: inverted, so it reads as "you are here", not "chosen". */
.day[aria-current="true"] { background: var(--color-text); border-color: var(--color-text); color: var(--color-surface); }
/* A day that already has times: a small magenta dot, the colour of a pick. */
.day__dot {
  position: absolute; top: 6px; right: 6px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--color-option-check-fill);
}
.day__dot[hidden] { display: none; }

.blocks { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: var(--sp-2); }
.blocks legend { font-weight: 600; padding: 0; margin-bottom: var(--sp-1); }
.blocks__label { margin: var(--sp-2) 0 0; color: var(--color-text-secondary); font-size: 0.9375rem; }
.blocks__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-2); }
.block {
  min-height: 44px;
  font: inherit;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
  background: var(--color-surface);
  border: 2px solid var(--color-option-border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease;
}
.block[aria-pressed="true"] {
  border-color: var(--color-option-selected-border);
  background: var(--color-option-selected-bg);
  font-weight: 700;
}
@media (hover: hover) {
  .day:not([aria-current="true"]):hover,
  .block:not([aria-pressed="true"]):hover { background: var(--color-surface-quiet); }
}
.day:focus-visible, .block:focus-visible { outline: 2px solid var(--color-focus-ring); outline-offset: 2px; }

/* "Your times": the joined windows, as plain lines. */
.picked__heading { margin-top: var(--sp-2); }
.time-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-1); font-weight: 600; }
.time-list__empty { color: var(--color-text-muted); font-weight: 400; }

/* ───────────── inputs ───────────── */

.field { display: grid; gap: var(--sp-1); }

.field label { font-weight: 600; }

/* Scoped to our own fields so the rules never leak into the vendored
   calendar's inputs. :where() keeps specificity at (0,1,1). */
:where(.field) > input[type="text"], :where(.field) > input[type="tel"], :where(.field) > input[type="email"], :where(.field) > input[type="date"], :where(.field) > textarea {
  font: inherit;
  color: var(--color-text);
  background: var(--color-input-bg);
  border: 1.5px solid var(--color-input-border);   /* constant in every state */
  border-radius: var(--radius);
  min-height: 48px;
  padding: 11px 14px;
  width: 100%;
  outline: 2px solid transparent;    /* reserved slot: the ring appears with no layout shift */
  outline-offset: 1px;
}
textarea { resize: vertical; min-height: 5rem; line-height: 1.5; }

:where(.field) > input:focus-visible, :where(.field) > textarea:focus-visible {
  border-color: var(--color-focus-ring);
  outline-color: var(--color-focus-ring);
}

:where(.field) > input[aria-invalid="true"], :where(.field) > textarea[aria-invalid="true"] {
  border-color: var(--color-error);
}

/* Error text. `hidden` attribute controls visibility; this is just the look. */
.error { color: var(--color-error-text); font-weight: 600; }
.error:focus-visible { outline: 2px solid var(--color-focus-ring); outline-offset: 2px; border-radius: var(--radius-sm); }

/* Honeypot: off-screen, not display:none (see index.html). */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ───────────── buttons ───────────── */

.btn-primary, .btn-secondary {
  font: inherit;
  font-weight: 600;
  line-height: 1;
  min-height: 48px;                 /* = input height */
  padding: 14px 24px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  width: 100%;                      /* full width on phones (GOV.UK); auto from 640px */
  text-align: center;
  white-space: nowrap;
  transition: background-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}
@media (min-width: 640px) {
  .btn-primary, .btn-secondary { width: auto; justify-self: start; }
}

.btn-primary {
  background: var(--color-action);
  color: var(--color-text-on-action);
}
@media (hover: hover) {
  .btn-primary:hover:not(:disabled) {
    background: var(--color-action-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lift);     /* the one shadow in the form */
  }
}
.btn-primary:active:not(:disabled) { background: var(--color-action-pressed); box-shadow: none; }
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }   /* + the disabled attribute = three channels */

.btn-secondary {
  background: transparent;
  color: var(--color-action-2-text);
  border-color: var(--color-action-2-border);
}
@media (hover: hover) {
  .btn-secondary:hover { background: var(--color-action-2-hover); }
}

.btn-primary:focus-visible, .btn-secondary:focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
}

/* One primary, at most one secondary. Stacked on phones, a row from 640px. */
.actions { display: flex; flex-direction: column; gap: var(--sp-3); margin-top: var(--sp-5); }
@media (min-width: 640px) { .actions { flex-direction: row; flex-wrap: wrap; } }
form > .btn-primary { margin-top: var(--sp-2); }

/* ───────────── recommendation + sent ───────────── */

/* Unboxed prose. Sections are separated by the h2's space above; nothing is a card.
   8px below a heading, 40px above the next one (32 + the 8 gap). */
.rec { display: grid; gap: var(--sp-2); }
.rec h2, #sent > h2 { margin-top: var(--sp-8); }
.rec > p + p { margin-top: var(--sp-1); }
.rec__paras { display: grid; gap: var(--sp-3); }
.rec__title {                       /* on the Sent screen the recommendation title is an h2 */
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-h1);
  line-height: var(--lh-h1);
  margin: 0;
}

/* "Because you told us": the parent's answers as a short list with a drawn check. */
.reasons { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-2); }
.reasons li { position: relative; padding-left: 28px; font-weight: 500; }
.reasons li::before {
  content: "";
  position: absolute; left: 4px; top: 0.55em;
  width: 6px; height: 11px;
  border-right: 2.5px solid var(--color-step-done);
  border-bottom: 2.5px solid var(--color-step-done);
  transform: rotate(45deg) translateY(-60%);
}

/* Depth on demand. Native <details>; the summary is a full-width row with a drawn chevron. */
.more { border-top: 1px solid var(--color-divider); }
.more:last-of-type { border-bottom: 1px solid var(--color-divider); }
.more summary {
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  min-height: 48px;
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  padding: var(--sp-2) 0;
}
.more summary::-webkit-details-marker { display: none; }
.more summary::after {
  content: "";
  flex: none;
  width: 9px; height: 9px;
  border-right: 2px solid var(--color-text-secondary);
  border-bottom: 2px solid var(--color-text-secondary);
  transform: rotate(45deg);
  margin-right: 6px;
  transition: transform 150ms ease;
}
.more[open] summary::after { transform: rotate(-135deg); }
.more summary:focus-visible { outline: 2px solid var(--color-focus-ring); outline-offset: 2px; border-radius: var(--radius-sm); }
.more > :not(summary) { padding-bottom: var(--sp-4); }
.rec > h2 + .more { margin-top: 0; }
.rec > [data-rec=priceBlock] + .more { margin-top: var(--sp-6); }

/* Getting started: an automated list with hanging numerals (Butterick; GOV.UK numbered list). */
.steps {
  margin: 0;
  padding-left: 1.5em;
  list-style: decimal outside;
  display: grid;
  gap: var(--sp-3);
  font-variant-numeric: tabular-nums;
}
.steps li { padding-left: 0.25em; }
.steps li::marker { font-weight: 600; color: var(--color-text-muted); }

/* Prices: plain rows, one hairline, right-aligned tabular figures. */
.prices { margin: 0; padding: 0; list-style: none; display: grid; }
.prices li {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--color-divider);
}
.prices li:first-child { border-top: 1px solid var(--color-divider); }
.prices .amount { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.price-note { color: var(--color-text-secondary); }
/* The insurance line sits under the price caveat; give it a paragraph gap. */
.price-note + .price-note { margin-top: var(--sp-3); }
/* --color-link is the wine tone chosen for contrast (6.9:1), not hot pink. */
.price-note a { color: var(--color-link); font-weight: 600; }

/* A real quote. Merriweather, no bar, no giant quotation mark; the attribution carries it. */
.quote { margin: 0; display: grid; gap: var(--sp-2); }
.quote blockquote { margin: 0; font-family: var(--font-display); font-weight: 400; }
.quote figcaption { color: var(--color-text-muted); }
.proof__more a { color: var(--color-link); font-weight: 600; text-underline-offset: 3px; }
.proof__more a:focus-visible { outline: 2px solid var(--color-focus-ring); outline-offset: 2px; border-radius: var(--radius-sm); }
.closing { margin-top: var(--sp-6); font-family: var(--font-display); font-size: var(--text-h2); line-height: var(--lh-h2); text-wrap: balance; }

/* The closing line: a sentence, not a box. */
.next-line { font-weight: 600; margin-top: var(--sp-3); }

/* Sent screen groups. Still no boxes: spacing and one rule do the separating.
   The copy-and-phone lines read as one quiet unit under the lede. */
.sent__meta { margin-top: var(--sp-3); display: grid; gap: var(--sp-1); color: var(--color-text-secondary); }
.sent__meta p { margin: 0; }
.sent__times-block { margin-top: var(--sp-10); }
.sent__times-block h2 { margin: 0 0 var(--sp-2); }
.sent__times { margin: 0; padding-left: 1.25em; display: grid; gap: var(--sp-1); }
/* The recommendation is a separate topic from the booking details, so it starts
   after a full-width rule with generous space on both sides. */
#sent .rec { margin-top: var(--sp-10); padding-top: var(--sp-8); border-top: 1px solid var(--color-divider); }
/* A caption belongs to the title under it, so no section gap between them. */
.rec > .eyebrow + .rec__title { margin-top: 0; }

/* ───────────── print (Save as PDF) ───────────── */

@media print {
  /* Paper margins live here, not on the body, so every page gets them. */
  @page { margin: 16mm 14mm; }

  /* The screen layout is a full-height flex column. On paper that creates
     stretched, nearly-empty trailing pages, so flatten it to normal flow. */
  html, body { height: auto; min-height: 0; display: block; background: #fff; padding: 0; }
  main { display: block; flex: none; max-width: none; width: auto; padding: 0; }
  main > section:not([hidden]) { flex: none; }
  .site, .site-foot { max-width: none; width: auto; }

  /* Chrome's default print type is small; 11pt keeps this readable on paper. */
  body { font-size: 11pt; line-height: 1.45; }
  h1, .rec__title { font-size: 20pt; }
  h2 { font-size: 13pt; margin-top: 16pt; }

  /* Screen furniture: gone. */
  .back, .dots, .progress-text, .actions, button, .scroll-progress,
  .more summary::after { display: none !important; }

  /* Focus rings are a screen affordance. They were printing around the heading. */
  *, *:focus, *:focus-visible { outline: none !important; box-shadow: none !important; }

  /* A link is useless on paper without its address. */
  .proof__more a::after { content: " (" attr(href) ")"; font-weight: 400; word-break: break-all; }
  a { color: inherit; text-decoration: none; }

  /* Letterhead and footer: keep them, they make it a document. */
  .site { border-bottom: 1px solid #ccc; padding-block: 0 8pt; margin-bottom: 14pt; }
  .site-foot { border-top: 1px solid #ccc; padding-block: 8pt 0; margin-top: 16pt; }

  /* Don't split a heading from its content, or a step across pages. */
  h1, h2 { break-after: avoid; }
  .steps li, .prices li, .reasons li, .quote { break-inside: avoid; }
  .rec { break-before: auto; }
}
}

/* ───────────── motion ───────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

/* ── Availability window: a From/Until pair ──────────────────────────────────
   Replaces the old grid of single-time radios. A window needs two values, and
   two 21-item radio lists is a lot of thumb on a phone, so these are selects.
   Stacked on narrow screens, side by side once there's room. */
.range {
  display: grid;
  gap: var(--space-sm);
  grid-template-columns: 1fr;
  padding: 2px;                          /* room for focus rings */
}
/* Stacked by default. The dialog's right-hand column is narrow whatever the
   viewport is doing, and side-by-side selects clipped "you close" to "you c".
   Only the full-width fallback below gets columns. */
.range__field { display: grid; gap: 4px; min-width: 0; }
.range__label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-secondary);
}
.range__field select {
  min-height: 44px;
  text-overflow: ellipsis;   /* if it ever does run out of room, say so honestly */                      /* the 44px touch target used elsewhere */
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  font-size: 1rem;                       /* 16px stops iOS zooming on focus */
}
.range__field select:focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
}
.range__field select:disabled { opacity: 0.5; cursor: not-allowed; }

/* The no-library fallback adds a date input and its own Add button. */
.range--fallback { grid-template-columns: 1fr; }
@media (min-width: 560px) {
  .range--fallback { grid-template-columns: repeat(3, 1fr) auto; align-items: end; }
}
.range--fallback input {
  min-height: 44px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius);
  font: inherit;
  font-size: 1rem;
}

/* Question 6's box sits in a fieldset, not a .field, so the input styling
   above never reached it and it rendered in the browser's monospace default.
   Same look as every other box on the form. */
section[data-type="question"] textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  font-size: 1rem;              /* 16px keeps iOS from zooming on focus */
  resize: vertical;
  min-height: 6rem;
  line-height: 1.5;
}
section[data-type="question"] textarea:focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
}
