/* Layout: one calm reading column; the tools open into two columns on wide screens. Formal palette (charcoal, claret, cool grey) chosen to stay clear of GOV.UK's black, blue, green and yellow. */
:root {
  --bg: #F6F7F8;
  --surface: #FFFFFF;
  --surface-2: #ECEEF1;
  --ink: #1D2129;
  --muted: #5A606B;
  --line: #D9DCE1;
  --accent: #7A1F2E;
  --accent-ink: #FFFFFF;
  --accent-soft: #F4E6E8;
  --strip-bg: #1D2129;
  --strip-fg: #EEF0F3;
  --ok: #1F6B47;
  --ok-soft: #DFEEE6;
  --warn: #8A5A00;
  --warn-soft: #F7ECD6;
  --bad: #B3261E;
  --bad-soft: #F8E1DF;
  --focus: #7A1F2E;

  --display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;

  --r: 6px;
  --wrap: 1120px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121419; --surface: #1A1D24; --surface-2: #232733; --ink: #E7E9EE; --muted: #A3A9B5; --line: #2F3441;
    --accent: #D9768A; --accent-ink: #1A0A0E; --accent-soft: #3A2128;
    --strip-bg: #232733; --strip-fg: #E7E9EE;
    --ok: #6CC79A; --ok-soft: #173326; --warn: #E8BC62; --warn-soft: #3A2F17; --bad: #F08B80; --bad-soft: #3F1F1C;
    --focus: #D9768A; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121419; --surface: #1A1D24; --surface-2: #232733; --ink: #E7E9EE; --muted: #A3A9B5; --line: #2F3441;
    --accent: #D9768A; --accent-ink: #1A0A0E; --accent-soft: #3A2128;
    --strip-bg: #232733; --strip-fg: #E7E9EE;
    --ok: #6CC79A; --ok-soft: #173326; --warn: #E8BC62; --warn-soft: #3A2F17; --bad: #F08B80; --bad-soft: #3F1F1C;
    --focus: #D9768A; color-scheme: dark;
}

* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.6; margin: 0; }
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; text-wrap: balance; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: 20px; }
.eyebrow { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.lede { color: var(--muted); max-width: 62ch; font-size: 1.05rem; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
/* Links that leave the site get an arrow so visitors know they are going to the official source */
a.ext { font-weight: 600; white-space: nowrap; }
a.ext::after { content: "\2197"; font-size: 0.8em; margin-left: 2px; }

/* Disclaimer strip */
.strip { background: var(--strip-bg); color: var(--strip-fg); font-size: 0.9rem; }
.strip .wrap { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; justify-content: space-between; padding-block: 10px; }
.strip strong { font-weight: 600; }
.strip a { font-weight: 600; white-space: nowrap; }

/* Header */
header.site { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.15rem; line-height: 1.15; }
.brand-mark { width: 30px; height: 30px; flex: none; }
nav.primary { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 0.95rem; }
nav.primary a { text-decoration: none; color: var(--muted); }
nav.primary a:hover { color: var(--ink); text-decoration: underline; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 0.95rem var(--body); padding: 11px 20px; border-radius: 4px; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.05); }

/* Hero */
.hero { padding-block: 56px 48px; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: start; }
.hero h1 { font-size: clamp(2.3rem, 5.4vw, 4rem); font-weight: 700; margin-block: 14px 18px; }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.facts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); }
.fact { min-width: 0; }
.fact b { display: block; font-family: var(--display); font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.fact span { font-size: 0.85rem; color: var(--muted); }

/* Deadline finder card: styled as a key tag */
.finder { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: var(--r); padding: 26px; box-shadow: 0 18px 40px -30px rgba(29, 33, 41, 0.5); min-width: 0; }
.finder label { display: block; font-weight: 600; margin-bottom: 8px; }
select, input[type="email"], input[type="number"] { font: 1rem var(--body); color: var(--ink); background: var(--bg); border: 1.5px solid var(--line); border-radius: 4px; padding: 10px 12px; width: 100%; }
.finder-out { margin-top: 22px; display: grid; gap: 14px; }
.countdown { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.countdown .num { font-family: var(--display); font-weight: 700; font-size: clamp(3rem, 7vw, 4.4rem); line-height: 1; font-variant-numeric: tabular-nums; }
.dates { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dates div { background: var(--surface-2); border-radius: var(--r); padding: 10px 12px; }
.dates dt { font-size: 0.78rem; color: var(--muted); }
.dates dd { margin: 0; font-family: var(--mono); font-weight: 500; }
.chip { display: inline-flex; align-items: center; gap: 6px; font: 600 0.78rem var(--body); padding: 3px 9px; border-radius: 3px; white-space: nowrap; }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip.ok { color: var(--ok); background: var(--ok-soft); }
.chip.warn { color: var(--warn); background: var(--warn-soft); }
.chip.bad { color: var(--bad); background: var(--bad-soft); }
.chip.idle { color: var(--muted); background: var(--surface-2); }

/* Sections */
section.block { padding-block: 64px; border-top: 1px solid var(--line); }
.head { display: grid; gap: 12px; margin-bottom: 32px; }

/* Rollout table */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 560px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); }
th { font: 500 0.75rem var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); }
td.mono { white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tr.sel td { background: var(--accent-soft); }
tr.sel td:first-child { font-weight: 600; }
.note { font-size: 0.85rem; color: var(--muted); margin-top: 12px; }

/* Two-column tool sections */
.split { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: start; }
.split > * { min-width: 0; }

/* Checklist */
.checklist { display: grid; gap: 22px; }
.group h3 { margin-bottom: 10px; display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.group h3 small { font: 400 0.8rem var(--mono); color: var(--muted); }
.check { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; }
.check + .check { margin-top: 8px; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ok); }
.check b { font-weight: 600; display: block; }
.check span { color: var(--muted); font-size: 0.9rem; }
.check:has(input:checked) { border-color: var(--ok); }
.progress { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin-top: 20px; }
.progress i { display: block; height: 100%; width: 0; background: var(--ok); transition: width .3s; }

/* Readiness check */
.quiz { display: grid; gap: 12px; }
.q { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.q legend { font-weight: 600; padding: 0; margin-bottom: 8px; }
.q fieldset { border: 0; margin: 0; padding: 0; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opts label { position: relative; }
.opts input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.opts span { display: inline-block; padding: 6px 14px; border-radius: 4px; border: 1.5px solid var(--line); font-size: 0.9rem; }
.opts input:checked + span { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.opts input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.result { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 84px); background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: var(--r); padding: 24px; }
.score { display: flex; align-items: baseline; gap: 10px; margin-block: 8px 16px; }
.score .num { font-family: var(--display); font-weight: 700; font-size: 3.4rem; line-height: 1; font-variant-numeric: tabular-nums; }
.gaps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.gaps li { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; font-size: 0.93rem; }
.example { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; font-size: 0.85rem; color: var(--muted); background: var(--surface-2); border-radius: var(--r); padding: 8px 12px; }
.linkbtn { background: none; border: 0; padding: 0; font: 600 0.85rem var(--body); color: var(--ink); text-decoration: underline; cursor: pointer; }

/* Cost */
.cost { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cost > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: grid; gap: 8px; align-content: start; min-width: 0; }
.cost .big { font-family: var(--display); font-weight: 700; font-size: 2.2rem; font-variant-numeric: tabular-nums; line-height: 1.1; }
.cost .penalty .big { color: var(--accent); }
.calc { display: flex; gap: 10px; align-items: center; }
.calc input { width: 90px; }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.plan.featured { border-color: var(--accent); box-shadow: inset 0 4px 0 var(--accent); }
.plan .price { font-family: var(--display); font-weight: 700; font-size: 2.2rem; line-height: 1; }
.plan .price small { font: 400 0.9rem var(--body); color: var(--muted); }
.plan ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 0.93rem; }
.plan .btn { margin-top: auto; }
.plan-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.fine { font-size: 0.82rem; color: var(--muted); }

/* Waitlist */
.signup { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.signup form { display: grid; gap: 14px; min-width: 0; }
.signup label { font-weight: 600; display: grid; gap: 6px; }
.consent { display: grid !important; grid-template-columns: auto 1fr; gap: 10px !important; font-weight: 400 !important; font-size: 0.88rem; color: var(--muted); }
.consent input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--ink); }
.done { background: var(--ok-soft); color: var(--ok); border-radius: var(--r); padding: 12px 14px; font-weight: 600; }

/* FAQ */
.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 0 18px; }
.faq summary { cursor: pointer; padding-block: 16px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--muted); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding-bottom: 16px; color: var(--muted); max-width: 68ch; }

footer { border-top: 1px solid var(--line); padding-block: 40px 56px; font-size: 0.88rem; color: var(--muted); }
footer .wrap { display: grid; gap: 14px; }
footer .legal { max-width: 80ch; }
footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.ph { background: var(--warn-soft); color: var(--warn); padding: 0 4px; border-radius: 3px; font-family: var(--mono); font-size: 0.85em; }

@media (max-width: 880px) {
  .hero .wrap, .split, .signup { grid-template-columns: 1fr; gap: 32px; }
  .cost, .plans { grid-template-columns: 1fr; }
  .result { position: static; }
}
@media (max-width: 420px) {
  .wrap { padding-inline: 16px; }
  .dates { grid-template-columns: 1fr; }
  .finder, .signup { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Skip link: hidden until focused */
.skip { position: absolute; left: 16px; top: -200px; z-index: 20; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 4px; font-weight: 600; text-decoration: none; }
.skip:focus { top: calc(env(safe-area-inset-top, 0px) + 8px); }

/* Header tools: theme switch and phone menu */
.tools { display: flex; align-items: center; gap: 8px; }
.icon-btn { display: inline-flex; align-items: center; gap: 6px; font: 500 0.85rem var(--body); color: var(--ink); background: transparent; border: 1.5px solid var(--line); border-radius: 4px; padding: 7px 10px; cursor: pointer; }
.icon-btn:hover { border-color: var(--muted); }
.icon-btn svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.menu-btn { display: none; }
@media (max-width: 1024px) {
  .menu-btn { display: inline-flex; }
  nav.primary { display: none; order: 3; width: 100%; flex-direction: column; flex-wrap: nowrap; gap: 0; padding-bottom: 4px; }
  header.site.open nav.primary { display: flex; }
  nav.primary a { padding-block: 12px; border-top: 1px solid var(--line); font-size: 1rem; color: var(--ink); }
}
@media (max-width: 420px) {
  .brand { font-size: 1rem; }
  .theme-label { display: none; }
}

/* Sign-up extras */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-error { background: var(--bad-soft); color: var(--bad); border-radius: var(--r); padding: 12px 14px; font-weight: 600; }
button[disabled] { opacity: 0.6; cursor: progress; }

/* About and contact */
.contact { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: var(--r); padding: 24px; display: grid; gap: 16px; }
.contact dl { margin: 0; display: grid; gap: 12px; }
.contact dt { font-size: 0.78rem; color: var(--muted); }
.contact dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
#about .lede + .lede { margin-top: 4px; }

/* Legal and message pages */
.doc { max-width: 72ch; padding-block: 48px 72px; }
.doc h1 { font-size: clamp(2rem, 4.4vw, 2.8rem); font-weight: 700; margin-block: 10px 14px; }
.doc h2 { font-size: 1.4rem; margin-block: 36px 10px; }
.doc h3 { margin-block: 22px 6px; }
.doc p, .doc li { color: var(--ink); }
.doc p + p { margin-top: 12px; }
.doc ul { padding-left: 20px; display: grid; gap: 6px; margin: 10px 0 0; }
.doc .updated { color: var(--muted); font-size: 0.9rem; }
.doc .table-scroll table { min-width: 520px; }
.doc .table-scroll td, .doc .table-scroll th { vertical-align: top; font-size: 0.93rem; }
.draft { background: var(--warn-soft); color: var(--warn); border-radius: var(--r); padding: 12px 16px; font-weight: 600; margin-bottom: 24px; }
.message { max-width: 60ch; padding-block: 72px 96px; display: grid; gap: 16px; }
.message h1 { font-size: clamp(2rem, 4.4vw, 2.8rem); font-weight: 700; }
.message .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
html { scroll-padding-top: 88px; }
.plan .price-note { margin-top: -6px; font-family: var(--mono); font-size: 0.85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.signup .interest { border: 0; padding: 0; margin: 0; min-width: 0; }
.signup .interest legend { font-weight: 600; padding: 0; margin-bottom: 8px; }
.signup .interest legend span { font-weight: 400; color: var(--muted); }
#about .about-sub { font-size: 1.3rem; margin-top: 12px; }
