/* CQCNow design tokens + primitives.
   Single source of truth for BOTH the Svelte app and the vanilla HTML pages.
   Values verified against the style guide — every metadata colour clears 4.5:1
   on all three warm surfaces (#FFFFFF / #FBFAF8 / #F3F1EA). Do not "tidy" a
   colour here without re-measuring on every surface it is used on. */

:root {
  /* Ink */
  --ink: #14213D;
  --ink-deep: #0E1830;
  --ink-raised: #1B2A4A;
  --ink-hairline: #2A3A5C;
  --ink-ghost: #4A5A7C;

  /* Accent — one accent, it means "this is the way forward" */
  --teal: #0F766E;
  --teal-pressed: #0B5B55;
  --teal-on-dark: #5BC0B4;
  --teal-border-dark: #2F8C83;
  --teal-ghost-dark: #57998F;
  --mint: #F0F6F5;
  --mint-border: #CBE0DD;
  --mint-text: #DCEEEB;
  --mint-label: #C6E4E0;

  /* Warm neutrals — the paper */
  --paper: #FFFFFF;
  --paper-warm: #FBFAF8;
  --paper-deep: #F3F1EA;
  --border: #E4E0D8;
  --hairline: #EFEBE3;
  --border-strong: #DDD8CE;
  --border-ghost: #C9C3B7;
  --disabled: #D7D1C5;
  --disabled-text: #6B5F4E;

  /* Text */
  --body: #3A4A66;          /* 8.93 / 8.56 / 7.90 */
  --muted: #646E88;         /* 5.09 / 4.88 / 4.50 */
  --meta: #736D5F;          /* 5.14 / 4.93 / 4.55 */
  --on-navy: #AFB8CB;       /* 8.02 on --ink */
  --on-navy-muted: #8B96AE; /* 5.38 on --ink, 4.79 on --ink-raised */

  /* Warning — time, risk, or unverified. Nothing else. */
  --amber: #B45309;         /* never on --paper-deep: 4.44 */
  --amber-tint: #FDF8F1;
  --amber-pill: #FBF1E4;
  --amber-border: #EBD7B8;
  --amber-on-dark: #E0A45C;

  /* Type */
  --serif: Newsreader, Georgia, serif;
  --sans: 'Public Sans', system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;

  --fs-display: clamp(40px, 5.4vw, 76px);
  --fs-h1: clamp(34px, 4.6vw, 56px);
  --fs-h2: clamp(27px, 3.2vw, 40px);
  --fs-h2-sm: clamp(26px, 3vw, 38px);
  --fs-h3: clamp(22px, 2.4vw, 30px);
  --fs-lead: clamp(20px, 2.2vw, 27px);

  /* Space */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px;
  --s5: 22px; --s6: 26px; --s7: 34px; --s8: 44px;
  --s9: 64px; --s10: 88px;

  /* Container — content caps at 1328px, gutters never below 20px */
  --gutter: max(20px, calc((100% - 1328px) / 2));
  --gutter-doc: max(20px, calc((100% - 980px) / 2));

  --r-tag: 4px; --r-control: 6px; --r-card: 10px; --r-card-lg: 12px; --r-pill: 20px;
  --shadow-float: 0 20px 40px -28px rgba(20, 33, 61, 0.35);

  /* The sticky header's height. Anything that scrolls into view has to clear it,
     or the thing you jumped to lands underneath the nav. */
  --header-h: 70px;
}

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

html {
  /* One rule for every anchor on the site — table links, FAQ headings, the
     footer nav jump — rather than scroll-margin on each target. */
  scroll-padding-top: calc(var(--header-h) + 20px);
  scroll-behavior: smooth;
}
/* Smooth scrolling is motion. Some people get sick from it. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
/* ── Account icon ───────────────────────────────────────────────────────
   The only entry point to the admin sign-in, and deliberately the quietest
   thing in the header. It is not a call to action — nobody visiting this site
   to research CQC registration wants to log in — so it gets an icon, an
   accessible name, and no label. Kept visible at every width, because the one
   person who needs it is usually on a phone. */
.site-header__account {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; flex: none;
  border: 1px solid var(--border); border-radius: 50%;
  color: var(--muted); background: transparent;
}
.site-header__account:hover { border-color: var(--ink); color: var(--ink); text-decoration: none; }
.site-header__account svg { display: block; width: 17px; height: 17px; }

/* ── Signup form ────────────────────────────────────────────────────────
   Used on /start. A single column at every width: this form is the page's only
   job, and side-by-side fields buy nothing but a smaller tap target. */
.signup { display: grid; gap: var(--s5); max-width: 460px; margin-top: var(--s6); }
.signup__field { display: grid; gap: 6px; }
.signup__field label { font-size: 15px; font-weight: 600; color: var(--ink); }
.signup__optional { font-weight: 400; color: var(--meta); font-size: 13.5px; }
.signup input[type='email'],
.signup input[type='text'],
.signup select {
  width: 100%; padding: 11px 13px; font: inherit; font-size: 16px; /* 16px: iOS zooms below it */
  color: var(--ink); background: var(--paper);
  border: 1px solid var(--border); border-radius: 8px;
}
.signup input:focus-visible, .signup select:focus-visible {
  outline: 2px solid var(--teal); outline-offset: 1px; border-color: var(--teal);
}
.signup__hint { font-size: 13.5px; line-height: 1.5; color: var(--meta); }
.signup__consent {
  display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start;
  font-size: 14px; line-height: 1.55; color: var(--body);
}
.signup__consent input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--teal); }
.signup__submit { justify-self: start; }
.signup__small { font-size: 13px; line-height: 1.55; color: var(--meta); }
.signup__error {
  font-size: 14px; line-height: 1.5; color: var(--amber);
  border-left: 3px solid var(--amber); padding-left: 12px;
}
.signup__done {
  border: 1px solid var(--teal-border, var(--border)); border-left: 3px solid var(--teal);
  background: var(--paper-warm); border-radius: 8px; padding: 16px 18px;
  font-size: 15px; line-height: 1.6; color: var(--body);
}
/* The form is generated as a raw block inside .prose, which sets its own vertical
   rhythm on every child. Neutralise it — the grid gap above owns the spacing. */
.prose .signup > * + * { margin-top: 0; }

/* ── Expert headshots ───────────────────────────────────────────────────
   Square crop so three photographs taken in three different places read as
   one set. Floated on the profile so the standfirst wraps beside it, and
   dropped to full width on a phone where a 150px float leaves an unreadable
   column of text next to it. */
.expert-photo {
  float: right; width: 172px; height: 172px; object-fit: cover;
  border-radius: 12px; margin: 0 0 18px 24px; background: var(--paper-deep);
}
.expert-photo--sm { width: 108px; height: 108px; margin-bottom: 12px; }
@media (max-width: 560px) {
  .expert-photo { float: none; display: block; width: 128px; height: 128px; margin: 0 0 18px; }
}


body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--teal-pressed); text-decoration: underline; }
::selection { background: var(--mint-border); }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  border-radius: 3px;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); line-height: 1.05; letter-spacing: -0.02em; }
h2 { font-size: var(--fs-h2); line-height: 1.1; }
h3 { font-size: var(--fs-h3); line-height: 1.15; }
p { margin: 0; text-wrap: pretty; }

/* ── Layout ─────────────────────────────────────────────────────────── */
.section { padding: 60px var(--gutter); }
.section--tight { padding: 26px var(--gutter); }
.section--tall { padding: 70px var(--gutter); }
.section--warm { background: var(--paper-warm); }
.section--deep { background: var(--paper-deep); }
.section--navy { background: var(--ink); color: #FBFAF8; }
.section--teal { background: var(--teal); color: #FBFAF8; }
.section--mint { background: var(--mint); border-block: 1px solid var(--mint-border); }
.section--rule { border-top: 1px solid var(--hairline); }
.section--doc { padding: 60px var(--gutter-doc); }

.section--navy h2, .section--teal h2 { color: #FBFAF8; }

/* Fluid grids — no breakpoints anywhere in this codebase */
.grid { display: grid; gap: var(--s5); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.grid--split { grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 52px; align-items: center; }
.grid--stat { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 20px; }

.row { display: flex; align-items: center; gap: var(--s3); }
.row--between { justify-content: space-between; flex-wrap: wrap; gap: 24px; }
.row--end { align-items: flex-end; }
.stack { display: flex; flex-direction: column; gap: var(--s3); }

/* ── Type primitives ────────────────────────────────────────────────── */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
}
.eyebrow--meta { color: var(--meta); letter-spacing: 0.1em; font-size: 11px; }
.eyebrow--on-teal { color: var(--mint-label); letter-spacing: 0.12em; font-size: 11px; }
.eyebrow--on-navy { color: var(--teal-on-dark); letter-spacing: 0.12em; font-size: 11px; }

.lead { font-size: 19px; line-height: 1.6; color: var(--body); }
.lead--serif { font-family: var(--serif); font-style: italic; font-size: var(--fs-lead); line-height: 1.45; }
.caption { font-size: 14px; line-height: 1.5; color: var(--muted); }
.figure { font-family: var(--serif); font-size: 42px; line-height: 1; color: var(--ink); }
.figure--sm { font-size: 32px; }
.price { font-family: var(--serif); font-size: 42px; line-height: 1; color: var(--ink); }
.quote { font-family: var(--serif); font-style: italic; font-size: 26px; line-height: 1.25; color: var(--ink); }

/* ── Buttons ────────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
  padding: 16px 28px;
  border: 1px solid transparent;
  border-radius: var(--r-control);
  text-decoration: none;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--teal); color: #FBFAF8; }
.btn--primary:hover { background: var(--teal-pressed); color: #FBFAF8; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--border-ghost); font-weight: 400; }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn--inverse { background: #FBFAF8; color: var(--ink); }
.btn--inverse:hover { background: var(--paper); color: var(--ink); }
.btn--ghost-inverse { background: transparent; color: #FBFAF8; border-color: var(--ink-ghost); font-weight: 400; }
.btn--ghost-inverse:hover { border-color: var(--on-navy-muted); color: #FBFAF8; }
.btn--on-teal { background: #FBFAF8; color: var(--teal); }
.btn--ghost-on-teal { background: transparent; color: #FBFAF8; border-color: var(--teal-ghost-dark); font-weight: 400; }
.btn--sm { font-size: 15px; padding: 10px 16px; }
.btn--md { font-size: 16px; padding: 13px 20px; }
.btn--block { display: block; width: 100%; text-align: center; }
.btn[aria-disabled='true'] { background: var(--disabled); color: var(--disabled-text); cursor: not-allowed; pointer-events: none; }

.link-fwd { font-size: 17px; font-weight: 600; color: var(--teal); }
.link-meta { font-size: 15px; color: var(--muted); }

/* ── Surfaces ───────────────────────────────────────────────────────── */
.card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: var(--s6);
}
.card--warm { background: var(--paper-warm); }
.card--float { border-radius: var(--r-card-lg); padding: 30px; box-shadow: var(--shadow-float); }
.card--selected { border: 1.5px solid var(--teal); }
.card--flex { display: flex; flex-direction: column; }
.card--on-navy { background: var(--ink-raised); border-color: var(--ink-hairline); border-radius: 9px; padding: var(--s5); }
.card--on-teal { background: var(--teal-pressed); border: 1px solid var(--teal-border-dark); border-radius: 9px; padding: var(--s4); }
.card--warning { background: var(--amber-tint); border-color: var(--amber-border); }
.panel { border: 1px solid var(--border); border-radius: 8px; padding: 14px; background: var(--paper-warm); }
.divider { height: 1px; background: var(--hairline); margin: 20px 0; }

/* ── Tags & pills ───────────────────────────────────────────────────── */
.tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 5px 9px;
  border-radius: var(--r-tag);
  border: 1px solid var(--mint-border);
  background: var(--mint);
  color: var(--teal);
  white-space: nowrap;
}
.tag--warning { border-color: var(--amber-border); background: var(--amber-tint); color: var(--amber); }
/* `.tag` is nowrap because a tag is a chip. A placeholder note is a sentence
   wearing a chip's clothes, and at 390px a nowrap sentence is 1,100px wide and
   clipped. Anything longer than a couple of words needs this. */
.tag--wrap { white-space: normal; display: inline-block; line-height: 1.6; max-width: 100%; }
.tag--on-teal { border-color: var(--teal-ghost-dark); background: transparent; color: #FBFAF8; }
.pill {
  font-size: 12px;
  padding: 5px 9px;
  border-radius: var(--r-pill);
  border: 1px solid var(--mint-border);
  background: #E9F2F0;
  color: var(--teal);
}
.pill--warning { border-color: var(--amber-border); background: var(--amber-pill); color: var(--amber); }
.placeholder-note { font-family: var(--mono); font-size: 11px; color: var(--meta); }

/* ── Chips (the Matrix control) ─────────────────────────────────────── */
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.chip {
  font-family: var(--sans);
  font-size: 14px;
  padding: 9px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-strong);
  background: var(--paper);
  color: var(--body);
  cursor: pointer;
  user-select: none;
  transition: all 120ms ease;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed='true'] { background: var(--teal); border-color: var(--teal); color: #FBFAF8; font-weight: 600; }

/* ── Status rows (Linked Intelligence) ──────────────────────────────── */
.status-row {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding: 14px 16px; border: 1px solid var(--border); border-radius: 7px;
  font-size: 15px; color: var(--ink);
}
.status-row__value { font-size: 13px; color: var(--teal); white-space: nowrap; }
.status-row--due { border-color: var(--amber-border); background: var(--amber-tint); }
.status-row--due .status-row__value { color: var(--amber); }

/* ── Comparison table ───────────────────────────────────────────────── */
.compare { border: 1px solid var(--border); border-radius: var(--r-card-lg); overflow: hidden; overflow-x: auto; }
.compare__row { display: grid; grid-template-columns: 1.1fr 1fr 1fr 1.15fr; min-width: 860px; border-bottom: 1px solid var(--hairline); }
.compare__row--head { background: var(--paper-deep); border-bottom-color: var(--border); }
.compare__row:last-child { border-bottom: none; }
.compare__cell { padding: 16px 20px; font-size: 15px; color: var(--muted); }
.compare__cell--dim { font-weight: 600; color: var(--ink); }
.compare__cell--head { font-weight: 700; color: var(--body); }
.compare__cell--ours { background: var(--mint); color: var(--ink); font-weight: 600; }
.compare__cell--ours-head { background: var(--teal); color: #FBFAF8; font-weight: 700; }

/* Restack before the table would start scrolling. A 4-column table on a 390px
   phone put our column — the whole argument — off-screen right, and cropped the
   competitor column mid-word so it read as broken rather than scrollable. One
   card per dimension instead, so "and neither of them is this" lands six times.
   Labels come from data-label, so there is only ever one copy of the content.

   899px, not 860px: the row needs 860px and --gutter is 20px a side below
   1328px, so the table runs out of room at a 900px viewport, not an 860px one.
   Breaking at 860 would leave 861–899px scrolling and clipped — the same defect,
   just on fewer screens. If either number changes, change both. */
@media (max-width: 899px) {
  /* auto-fit rather than a second breakpoint: one column on a phone, two on a
     tablet, without a stacked card ever stretching to 840px and reading sparse. */
  .compare {
    display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    border: none; border-radius: 0; overflow: visible;
  }
  .compare__row {
    display: block; min-width: 0; background: var(--paper);
    border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden;
  }
  /* Must follow .compare__row — same specificity, so source order decides. The
     column headings become each cell's data-label once restacked. */
  .compare__row--head { display: none; }
  .compare__cell {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
    gap: 14px; align-items: baseline; padding: 11px 16px;
    border-top: 1px solid var(--hairline);
  }
  .compare__cell::before {
    content: attr(data-label);
    font-size: 13px; font-weight: 500; color: var(--muted);
  }
  /* The dimension is the card's heading, not a labelled value. */
  .compare__cell--dim {
    display: block; padding: 13px 16px; border-top: none;
    background: var(--paper-deep); font-size: 15px;
  }
  .compare__cell--dim::before { content: none; }
  .compare__cell--ours::before { color: var(--teal); font-weight: 600; }
}

/* ── Media placeholders (until real photography exists) ─────────────── */
.hatch { background: repeating-linear-gradient(135deg, var(--border) 0 7px, var(--hairline) 7px 14px); border-radius: 7px; }
.hatch--portrait { height: 150px; }
.hatch--avatar { width: 52px; height: 52px; border-radius: 6px; flex: none; }
.hatch--on-teal { background: repeating-linear-gradient(135deg, var(--teal-border-dark) 0 6px, var(--teal) 6px 12px); }

/* ── Header ─────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; flex-wrap: nowrap; gap: 28px;
  padding: 14px max(16px, calc((100% - 1328px) / 2));
  border-bottom: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
}
.site-header__logo { height: 30px; width: auto; display: block; flex: none; }
.site-header__nav { display: flex; flex-wrap: nowrap; gap: 24px; font-size: 15px; white-space: nowrap; }
.site-header__nav a { color: var(--body); }
.site-header__actions { display: flex; align-items: center; gap: 12px; margin-left: auto; flex: none; }
.site-header__menu { display: none; }
/* One collapse rule, expressed as the only media query in the system */
@media (max-width: 1180px) {
  .site-header__nav { display: none; }
  .site-header__menu { display: inline-block; }
}
@media (max-width: 430px) {
  .site-header__call { display: none; }
  /* Logo + Menu + account + "Start free" is 10px wider than a 390px screen at
     the default gaps. Tightening the gaps keeps all four — dropping one of them
     would mean either no way to sign in or no CTA on the narrowest phones. */
  .site-header { gap: 12px; padding-inline: 12px; }
  .site-header__actions { gap: 8px; }
}

/* ── Pinned CTA ─────────────────────────────────────────────────────── */
.pinned-cta {
  position: fixed; right: 28px; bottom: 28px; z-index: 30; width: 300px;
  background: var(--paper); border: 1px solid var(--border); border-radius: var(--r-card-lg);
  box-shadow: 0 20px 40px -20px rgba(20, 33, 61, 0.35); padding: 18px 20px;
  transition: opacity 220ms ease, transform 220ms ease;
  opacity: 0; transform: translateY(14px); pointer-events: none;
}
.pinned-cta[data-shown='true'] { opacity: 1; transform: translateY(0); pointer-events: auto; }

.pinned-cta__copy { font-size: 15px; line-height: 1.45; color: var(--ink); padding-right: 22px; }
.pinned-cta__btn { display: block; text-align: center; margin-top: 14px; }
.pinned-cta__alt { display: block; text-align: center; margin-top: 10px; font-size: 13.5px; color: var(--meta); }
.pinned-cta__alt:hover { color: var(--ink); }

/* Small, quiet, and unmistakably a dismiss. A CTA that follows you down every
   page has to be easy to turn off, or it stops being a CTA and becomes a
   grievance. */
.pinned-cta__close {
  position: absolute; top: 10px; right: 10px;
  width: 28px; height: 28px; padding: 0;
  display: grid; place-items: center;
  border: 0; border-radius: 50%; background: transparent;
  color: var(--muted); cursor: pointer;
}
.pinned-cta__close:hover { background: var(--paper-deep); color: var(--ink); }
.pinned-cta__close svg { width: 15px; height: 15px; }

@media (max-width: 640px) {
  .pinned-cta { right: 0; left: 0; bottom: 0; width: auto; border-radius: 0; border-left: none; border-right: none; }
  /* Side by side on a phone, so the bar costs one line of screen rather than
     three on a device where the content is already the scarce thing. */
  .pinned-cta { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 14px 16px; }
  .pinned-cta__copy { font-size: 14px; padding-right: 26px; }
  .pinned-cta__btn { margin-top: 0; white-space: nowrap; }
  .pinned-cta__alt { display: none; }
}

/* ── Footer ─────────────────────────────────────────────────────────── */
.site-footer { padding: 56px var(--gutter) 40px; background: var(--ink-deep); color: var(--on-navy-muted); }
.site-footer__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 32px; }
.site-footer__col { display: flex; flex-direction: column; gap: 9px; }
.site-footer__heading { font-size: 15px; font-weight: 700; color: #FBFAF8; }
.site-footer a { font-size: 14px; color: var(--on-navy); line-height: 1.5; }
.site-footer__legal {
  display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: baseline;
  margin-top: 40px; padding-top: 24px; border-top: 1px solid #1E2A46; font-size: 13px; line-height: 1.6;
}
.site-footer__stamp { font-family: var(--mono); font-size: 11px; color: var(--on-navy-muted); }
/* Legal links sit inline after the disclaimer sentence, not as a nav column —
   they are an obligation, not part of the link graph. */
.site-footer__legal-link { margin-left: 16px; text-decoration: underline; text-underline-offset: 3px; }

/* ── Prose (vanilla content pages) ──────────────────────────────────── */
.prose { max-width: 760px; }
.prose > * + * { margin-top: 20px; }
.prose h2 { margin-top: 44px; font-size: var(--fs-h2-sm); }
.prose h3 { margin-top: 30px; }
.prose p, .prose li { font-size: 17px; line-height: 1.7; color: var(--body); }
.prose ul, .prose ol { padding-left: 22px; }
.prose li + li { margin-top: 8px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--hairline); }
.prose th { background: var(--paper-deep); font-weight: 700; color: var(--body); }

/* The answer to the page's own question, before the first subheading. Sized up
   because on a phone this is often the only thing that gets read. */
.answer-first { font-size: 19px !important; line-height: 1.6 !important; color: var(--ink) !important; }

/* Data tables can't wrap below ~460px without becoming unreadable, so they scroll
   inside their own box. The page itself must never scroll sideways. */
.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-card); }
/* Self-contained rather than inheriting from .prose — these tables are used both
   inside prose and directly in a Section, and outside .prose they were rendering
   centred and unpadded. */
.data-table { width: 100%; min-width: 460px; border-collapse: collapse; font-size: 15px; }
.data-table th, .data-table td { text-align: left; vertical-align: top;
  padding: 12px 14px; border-bottom: 1px solid var(--hairline); }
.data-table thead th { background: var(--paper-deep); font-weight: 700; color: var(--body); }
.data-table caption { text-align: left; padding: 12px 14px; font-size: 13px;
  color: var(--meta); border-bottom: 1px solid var(--hairline); }
.data-table th[scope='row'] { background: transparent; font-weight: 600; color: var(--ink); }
.data-table tbody tr:last-child th, .data-table tbody tr:last-child td { border-bottom: none; }

/* Numbered phases. The counter is decorative — the heading carries the meaning. */
.steps { list-style: none; padding-left: 0 !important; counter-reset: step; }
.steps__item { counter-increment: step; position: relative;
  padding: 18px 20px 18px 58px; border: 1px solid var(--border);
  border-radius: var(--r-card); background: var(--paper-warm); }
.steps__item + .steps__item { margin-top: 12px; }
.steps__item::before { content: counter(step); position: absolute; left: 18px; top: 18px;
  width: 26px; height: 26px; border-radius: 50%; background: var(--teal); color: #FBFAF8;
  font-size: 14px; font-weight: 700; display: grid; place-items: center; }
.steps__title { font-size: 17px; font-weight: 700; color: var(--ink); }
.steps__meta { font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em;
  color: var(--meta); margin-top: 4px; }
.steps__item p { margin-top: 8px; }

/* Amber is warnings only, per the palette. A callout is a warning or it is a
   paragraph — there is no third, decorative use for it. */
.callout { border: 1px solid var(--amber-border); background: var(--amber-tint);
  border-left: 3px solid var(--amber); border-radius: var(--r-card); padding: 18px 20px; }
.callout__title { font-size: 16px; font-weight: 700; color: var(--amber); margin-bottom: 6px; }
.callout p { margin-top: 0; }
.placeholder-note--block { display: block; padding: 12px 14px;
  border: 1px dashed var(--amber-border); border-radius: var(--r-card); background: var(--amber-tint); }

/* ── Reveal (native <details>) ───────────────────────────────────────────
   Zero JS. The content is in the server HTML whether it is open or not, so a
   crawler reads it and a browser auto-expands it when you follow a link to an
   anchor inside — which is what makes numbers in a table clickable with no
   script at all. */
.reveal { border: 1px solid var(--border); border-radius: var(--r-card);
  background: var(--paper); overflow: hidden; }
.prose .reveal + .reveal { margin-top: 8px; }
.reveal__summary { list-style: none; cursor: pointer; padding: 14px 18px;
  display: flex; align-items: center; gap: 12px; }
.reveal__summary::-webkit-details-marker { display: none; }
/* The chevron is drawn rather than a marker so it can rotate on open. */
.reveal__summary::after { content: ''; margin-left: auto; flex: none;
  width: 8px; height: 8px; border-right: 2px solid var(--teal); border-bottom: 2px solid var(--teal);
  transform: rotate(45deg); transition: transform 0.15s ease; }
.reveal[open] .reveal__summary::after { transform: rotate(-135deg); }
.reveal__summary:hover { background: var(--paper-warm); }
.reveal__title { margin: 0 !important; font-size: 16px !important; font-weight: 700;
  color: var(--ink); line-height: 1.45; }
.reveal__body { padding: 0 18px 18px; }
.prose .reveal__body > * { margin-top: 0; }
.prose .reveal__body > * + * { margin-top: 14px; }
.reveal__group-head { font-family: var(--mono); font-size: 11px; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--meta); margin-bottom: 8px; }
.prose .reveal__group ul { margin-top: 0; }
.prose .reveal__group li { font-size: 15px; line-height: 1.6; }
.reveal__note { font-size: 13.5px !important; line-height: 1.55; color: var(--meta) !important; }
.reveal__source { font-family: var(--mono); font-size: 11px !important; line-height: 1.6;
  color: var(--meta) !important; padding-top: 12px; border-top: 1px solid var(--hairline); }
/* The cell links that open them. Underlined so they read as controls, not values. */
.data-table a { color: var(--teal); font-weight: 600; text-decoration: underline;
  text-underline-offset: 3px; }

/* Available to screen readers, invisible on screen. Used to tell people using one
   that a link leaves the site or opens a new tab — something sighted users infer
   from context and they cannot. */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

.breadcrumb { font-size: 13px; color: var(--muted); }
.breadcrumb a { color: var(--teal); }
.byline { font-size: 14px; color: var(--meta); }

/* ── Account icon ───────────────────────────────────────────────────────
   The only entry point to the admin sign-in, and deliberately the quietest
   thing in the header. It is not a call to action — nobody visiting this site
   to research CQC registration wants to log in — so it gets an icon, an
   accessible name, and no label. Kept visible at every width, because the one
   person who needs it is usually on a phone. */
.site-header__account {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; flex: none;
  border: 1px solid var(--border); border-radius: 50%;
  color: var(--muted); background: transparent;
}
.site-header__account:hover { border-color: var(--ink); color: var(--ink); text-decoration: none; }
.site-header__account svg { display: block; width: 17px; height: 17px; }

/* ── Signup form ────────────────────────────────────────────────────────
   Used on /start. A single column at every width: this form is the page's only
   job, and side-by-side fields buy nothing but a smaller tap target. */
.signup { display: grid; gap: var(--s5); max-width: 460px; margin-top: var(--s6); }
.signup__field { display: grid; gap: 6px; }
.signup__field label { font-size: 15px; font-weight: 600; color: var(--ink); }
.signup__optional { font-weight: 400; color: var(--meta); font-size: 13.5px; }
.signup input[type='email'],
.signup input[type='text'],
.signup select {
  width: 100%; padding: 11px 13px; font: inherit; font-size: 16px; /* 16px: iOS zooms below it */
  color: var(--ink); background: var(--paper);
  border: 1px solid var(--border); border-radius: 8px;
}
.signup input:focus-visible, .signup select:focus-visible {
  outline: 2px solid var(--teal); outline-offset: 1px; border-color: var(--teal);
}
.signup__hint { font-size: 13.5px; line-height: 1.5; color: var(--meta); }
.signup__consent {
  display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start;
  font-size: 14px; line-height: 1.55; color: var(--body);
}
.signup__consent input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--teal); }
.signup__submit { justify-self: start; }
.signup__small { font-size: 13px; line-height: 1.55; color: var(--meta); }
.signup__error {
  font-size: 14px; line-height: 1.5; color: var(--amber);
  border-left: 3px solid var(--amber); padding-left: 12px;
}
.signup__done {
  border: 1px solid var(--teal-border, var(--border)); border-left: 3px solid var(--teal);
  background: var(--paper-warm); border-radius: 8px; padding: 16px 18px;
  font-size: 15px; line-height: 1.6; color: var(--body);
}
/* The form is generated as a raw block inside .prose, which sets its own vertical
   rhythm on every child. Neutralise it — the grid gap above owns the spacing. */
.prose .signup > * + * { margin-top: 0; }

/* ── Expert headshots ───────────────────────────────────────────────────
   Square crop so three photographs taken in three different places read as
   one set. Floated on the profile so the standfirst wraps beside it, and
   dropped to full width on a phone where a 150px float leaves an unreadable
   column of text next to it. */
.expert-photo {
  float: right; width: 172px; height: 172px; object-fit: cover;
  border-radius: 12px; margin: 0 0 18px 24px; background: var(--paper-deep);
}
.expert-photo--sm { width: 108px; height: 108px; margin-bottom: 12px; }
@media (max-width: 560px) {
  .expert-photo { float: none; display: block; width: 128px; height: 128px; margin: 0 0 18px; }
}

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