/*
 * rob-sherwood.co.uk
 * Tokens first, then base, layout, components, utilities.
 * Every colour is a custom property. Dark mode follows the system setting.
 * Contrast for each text and background pair is checked to WCAG 2.2 AA.
 */

/* ---------- Fonts (self-hosted, SIL Open Font Licence) ---------- */

@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-3.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/source-sans-3-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */

:root {
  /* Colour: light */
  --bg: #fbf8f3;            /* warm paper */
  --surface: #f2ede4;       /* cards, table stripes */
  --surface-raised: #ffffff;
  --text: #1d2733;          /* 14.3:1 on --bg */
  --text-muted: #55606c;    /* 6.1:1 on --bg */
  --base: #173a5e;          /* deep ink blue, 11:1 on --bg */
  --base-contrast: #ffffff;
  --accent: #a3471a;        /* burnt orange, 5.7:1 on --bg */
  --accent-hover: #86390f;
  --accent-contrast: #ffffff; /* 6:1 on --accent */
  --breach: #6b2c91;        /* deep plum: strong, not alarm red. 8.8:1 with white */
  --breach-hover: #57217a;
  --breach-contrast: #ffffff;
  --breach-tint: #f3ebf8;
  --border: #8a8f96;        /* 3:1 for UI boundaries */
  --border-soft: #e0d9cd;
  --focus: #173a5e;
  --todo-bg: #fff1a8;
  --todo-text: #3d3200;
  --tip-tint: #e8f0f7;
  --important-tint: #fbeee6;
  --error: #a3241a;          /* 7:1 on --bg */
  --error-tint: #fbe9e7;
  --success: #1e6b3a;        /* 6.3:1 on --bg */
  --success-tint: #e6f3ea;

  /* Type */
  --font-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-heading: "Fraunces", Georgia, "Times New Roman", serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --text-base: 1.1875rem;   /* 19px */
  --text-small: 1rem;
  --text-xs: 0.875rem;
  --h1: clamp(2.25rem, 1.6rem + 3vw, 3.5rem);
  --h2: clamp(1.75rem, 1.4rem + 1.6vw, 2.375rem);
  --h3: clamp(1.3rem, 1.2rem + 0.5vw, 1.5rem);
  --leading: 1.6;

  /* Space and shape */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --measure: 70ch;
  --wide: 72rem;
  --gutter: 1rem;
  --radius: 0.5rem;
  --radius-large: 1rem;
  --shadow: 0 1px 2px rgb(29 39 51 / 0.06), 0 4px 16px rgb(29 39 51 / 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11161d;
    --surface: #1a212b;
    --surface-raised: #202835;
    --text: #e8e6e1;          /* 14.6:1 */
    --text-muted: #a9b1ba;    /* 8.4:1 */
    --base: #9cc3ea;          /* 9.9:1 */
    --base-contrast: #11161d;
    --accent: #f0a070;        /* 8.6:1 */
    --accent-hover: #f5b994;
    --accent-contrast: #11161d;
    --breach: #c9a0ec;        /* 8.4:1 */
    --breach-hover: #dbbdf3;
    --breach-contrast: #11161d;
    --breach-tint: #241a2d;
    --border: #6b7480;
    --border-soft: #2c3542;
    --focus: #9cc3ea;
    --todo-bg: #5c4d00;
    --todo-text: #fff6c7;
    --tip-tint: #172434;
    --important-tint: #2a1d16;
    --error: #ff9a8f;
    --error-tint: #2d1715;
    --success: #8fd6a6;
    --success-tint: #13261a;
    --shadow: none;
  }
}

@media (min-width: 48rem) {
  :root { --gutter: 2rem; }
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--space-6);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading);
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.15;
  color: var(--base);
  margin: var(--space-7) 0 var(--space-4);
  text-wrap: balance;
}
h1 { font-size: var(--h1); margin-top: 0; letter-spacing: -0.01em; }
h2 { font-size: var(--h2); }
h3 { font-size: var(--h3); margin-top: var(--space-6); }
h4 { font-size: 1.15rem; font-family: var(--font-body); font-weight: 700; }

p, ul, ol, dl, table, figure, blockquote, details { margin: 0 0 var(--space-4); }
ul, ol { padding-left: 1.4em; }
li + li { margin-top: var(--space-2); }
p { text-wrap: wrap; }

a {
  color: var(--accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--accent-hover); text-decoration-thickness: 0.14em; }

strong { font-weight: 700; }
small { font-size: var(--text-small); }

code, kbd, samp, pre { font-family: var(--font-mono); font-size: 0.875em; }
code {
  background: var(--surface);
  padding: 0.1em 0.35em;
  border-radius: 0.25rem;
}
pre {
  background: var(--surface);
  padding: var(--space-4);
  border-radius: var(--radius);
  overflow-x: auto;
  line-height: 1.5;
}
pre code { background: none; padding: 0; }

img, svg, video { max-width: 100%; height: auto; display: block; }

hr {
  border: 0;
  border-top: 1px solid var(--border-soft);
  margin: var(--space-7) 0;
}

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

::selection { background: var(--accent); color: var(--accent-contrast); }

mark.todo {
  background: var(--todo-bg);
  color: var(--todo-text);
  padding: 0 0.25em;
  border-radius: 0.2em;
  font-family: var(--font-mono);
  font-size: 0.8em;
}

/* ---------- Layout ---------- */

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -10rem;
  z-index: 10;
  background: var(--base);
  color: var(--base-contrast);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  font-weight: 700;
}
.skip-link:focus { top: var(--space-4); color: var(--base-contrast); }

.wrap {
  width: 100%;
  max-width: var(--wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Reading column, around 70 characters */
.prose {
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap .prose { padding-inline: 0; margin-inline: 0; }

.section { padding-block: var(--space-7); }
.section--tint { background: var(--surface); }
.section > .wrap > :first-child,
.section > .prose > :first-child { margin-top: 0; }

.lede {
  font-size: 1.3rem;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 48ch;
}

.grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
  padding: 0;
  list-style: none;
}
.grid > li { margin: 0; }

.stack > * + * { margin-top: var(--space-4); }

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-block: var(--space-5);
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--border-soft);
  background: var(--bg);
}
.site-header__inner {
  max-width: var(--wide);
  margin-inline: auto;
  padding: var(--space-4) var(--gutter) var(--space-3);
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "brand breach"
    "nav nav";
  align-items: center;
  gap: var(--space-3) var(--space-4);
}

.brand {
  grid-area: brand;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--base);
  line-height: 1.2;
}
.brand:hover { color: var(--base); }
.brand__name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.45rem;
}
.brand__tag {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.site-header__breach { grid-area: breach; }

.site-nav { grid-area: nav; }
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-4);
}
.site-nav li { margin: 0; }
.site-nav a {
  display: inline-block;
  padding: var(--space-1) 0;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--text-small);
  border-bottom: 3px solid transparent;
}
.site-nav a:hover { color: var(--accent); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--accent); }

@media (min-width: 60rem) {
  .site-header__inner {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "brand nav breach";
    padding-block: var(--space-4);
  }
  .site-nav ul { justify-content: flex-end; gap: var(--space-5); }
  .site-nav a { padding-block: var(--space-2); font-size: 1.0625rem; }
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: var(--space-8);
  background: var(--surface);
  border-top: 1px solid var(--border-soft);
  font-size: var(--text-small);
}
.site-footer__inner {
  max-width: var(--wide);
  margin-inline: auto;
  padding: var(--space-7) var(--gutter) var(--space-6);
  display: grid;
  gap: var(--space-6);
}
.site-footer__name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--base);
  margin-bottom: var(--space-2);
}
.site-footer__nav { display: flex; flex-wrap: wrap; gap: var(--space-6); }
.site-footer__nav ul { list-style: none; padding: 0; margin: 0; }
.site-footer__nav li + li { margin-top: var(--space-2); }
.site-footer__nav a { color: var(--text); }
.site-footer__legal {
  color: var(--text-muted);
  border-top: 1px solid var(--border-soft);
  padding-top: var(--space-5);
  margin: 0;
}
.site-footer__badge {
  display: inline-block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-1) var(--space-3);
}

@media (min-width: 48rem) {
  .site-footer__inner { grid-template-columns: 1.2fr 1fr; }
  .site-footer__legal { grid-column: 1 / -1; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.875rem;       /* comfortably over the 24px target size */
  padding: var(--space-3) var(--space-5);
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover { text-decoration: none; }

.btn--primary { background: var(--accent); color: var(--accent-contrast); }
.btn--primary:hover { background: var(--accent-hover); color: var(--accent-contrast); }

.btn--secondary { background: transparent; color: var(--base); border-color: var(--base); }
.btn--secondary:hover { background: var(--base); color: var(--base-contrast); }

.btn--breach { background: var(--breach); color: var(--breach-contrast); }
.btn--breach:hover { background: var(--breach-hover); color: var(--breach-contrast); }

.btn--quiet { background: transparent; color: var(--accent); padding-inline: 0; text-decoration: underline; text-underline-offset: 0.18em; }
.btn--quiet:hover { color: var(--accent-hover); text-decoration: underline; }

.btn--small { min-height: 2.5rem; padding: var(--space-2) var(--space-4); font-size: var(--text-small); }

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}

/* ---------- Small technical touches ---------- */

.term-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}
.term-label::before { content: "~/"; color: var(--accent); }
.term-label + h1, .term-label + h2, .term-label + h3 { margin-top: 0; }

/* ---------- Cards ---------- */

.card {
  position: relative;
  background: var(--surface-raised);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-large);
  padding: var(--space-5);
  box-shadow: var(--shadow);
  height: 100%;
}
.card > :last-child { margin-bottom: 0; }
.card__title { margin: 0 0 var(--space-3); font-size: 1.3rem; }
.card__title a { color: var(--base); text-decoration: none; }
/* Whole card is clickable, but only the heading link is announced */
.card__title a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-large); }
.card:hover .card__title a { text-decoration: underline; text-decoration-color: var(--accent); }
.card:focus-within { outline: 3px solid var(--focus); outline-offset: 3px; }
.card__title a:focus-visible { outline: none; }

.card__more { color: var(--accent); font-weight: 700; }
.card__more::after { content: " \2192"; }
.card__price { font-weight: 700; color: var(--text); }
.card__meta { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-muted); margin-bottom: var(--space-2); }

.card--problem { border-left: 4px solid var(--accent); }

/* ---------- Callouts ---------- */

.callout {
  border-left: 4px solid var(--base);
  background: var(--tip-tint);
  padding: var(--space-4) var(--space-5);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-block: var(--space-5);
}
.callout > :last-child { margin-bottom: 0; }
.callout__title { font-weight: 700; margin-bottom: var(--space-2); }
.callout--note { border-left-color: var(--border); background: var(--surface); }
.callout--important { border-left-color: var(--accent); background: var(--important-tint); }

/* ---------- Quote ---------- */

.quote { margin: var(--space-6) 0; }
.quote blockquote {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(1.3rem, 1.15rem + 0.8vw, 1.7rem);
  line-height: 1.35;
  color: var(--base);
}
.quote blockquote p::before { content: "\201C"; }
.quote blockquote p::after { content: "\201D"; }
.quote figcaption { margin-top: var(--space-3); color: var(--text-muted); }

/* ---------- FAQ (details and summary, no JavaScript) ---------- */

.faq { border-top: 1px solid var(--border-soft); margin-block: var(--space-5); }
.faq__item { border-bottom: 1px solid var(--border-soft); margin: 0; }
.faq__item summary {
  cursor: pointer;
  list-style: none;
  padding: var(--space-4) 2.5rem var(--space-4) 0;
  position: relative;
  font-weight: 700;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+";
  position: absolute;
  right: var(--space-2);
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 1.4rem;
  color: var(--accent);
}
.faq__item[open] summary::after { content: "\2212"; }
.faq__answer { padding-bottom: var(--space-4); }
.faq__answer > :last-child { margin-bottom: 0; }

/* ---------- Tables ---------- */

.table-wrap { overflow-x: auto; margin-block: var(--space-5); }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-small);
  margin: 0;
}
.table caption {
  text-align: left;
  font-weight: 700;
  padding-bottom: var(--space-3);
  font-size: var(--text-base);
}
.table th, .table td {
  text-align: left;
  vertical-align: top;
  padding: var(--space-3) var(--space-4) var(--space-3) 0;
  border-bottom: 1px solid var(--border-soft);
}
.table thead th { border-bottom: 2px solid var(--border); font-weight: 700; }
.table tbody th { font-weight: 700; color: var(--base); }
.table--compare td { min-width: 7rem; }

/* ---------- Prices ---------- */

.price-box {
  background: var(--surface-raised);
  border: 1px solid var(--border-soft);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius-large);
  padding: var(--space-5);
  box-shadow: var(--shadow);
  margin-block: var(--space-5);
}
.price-box > :last-child { margin-bottom: 0; }
.price-list { margin: 0 0 var(--space-4); }
.price-list__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-1) var(--space-4);
  padding-block: var(--space-3);
  border-bottom: 1px solid var(--border-soft);
}
.price-list__row:first-child { padding-top: 0; }
.price-list__row:last-child { border-bottom: 0; padding-bottom: 0; }
.price-list dt { flex: 1 1 14rem; }
.price-list dd {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--base);
  white-space: nowrap;
}
.price-box__guarantee {
  background: var(--tip-tint);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
}
.price-box__note { color: var(--text-muted); font-size: var(--text-small); }

.price-terms { color: var(--text-muted); font-size: var(--text-small); }

/* ---------- Breach banner ---------- */

.breach-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3) var(--space-5);
  background: var(--breach-tint);
  border: 2px solid var(--breach);
  border-radius: var(--radius-large);
  padding: var(--space-4) var(--space-5);
  margin-block: var(--space-5);
}
.breach-banner p { margin: 0; }

/* ---------- Forms ---------- */

.field { margin-bottom: var(--space-5); }
.field label, .field legend { display: block; font-weight: 700; margin-bottom: var(--space-2); }
.field__hint { display: block; color: var(--text-muted); font-size: var(--text-small); margin-bottom: var(--space-2); }
.field input[type="text"],
.field input[type="email"],
.field input[type="number"],
.field textarea,
.field select {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--surface-raised);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-3);
}
.field textarea { min-height: 9rem; resize: vertical; }
.field fieldset { border: 0; padding: 0; margin: 0; }
.field .choice { display: flex; gap: var(--space-2); align-items: center; margin-bottom: var(--space-2); }
.field .choice input { width: 1.25rem; height: 1.25rem; accent-color: var(--accent); }

/* ---------- Photos ---------- */

.photo-placeholder {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: var(--radius-large);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-small);
  text-align: center;
  padding: var(--space-4);
}

/* ---------- Page heads and breadcrumbs ---------- */

.page-head { padding-block: var(--space-6) var(--space-5); }
.page-head h1 { margin-bottom: var(--space-3); }
.page-head .lede { max-width: 52ch; }
.section--flush { padding-top: 0; }

.breadcrumbs { margin-bottom: var(--space-5); font-size: var(--text-xs); }
.breadcrumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--space-1); }
.breadcrumbs li { margin: 0; color: var(--text-muted); }
.breadcrumbs li + li::before { content: "/"; margin-right: var(--space-1); color: var(--border); }
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a[aria-current="page"] { text-decoration: none; color: var(--text); }

.price-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-5);
  margin-top: var(--space-5);
}
.price-strip__price {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.75rem;
  color: var(--base);
}

.groups--detail .groups__item > ul > li { padding-block: var(--space-3); border-top: 1px solid var(--border-soft); }
.groups--detail .groups__item > ul > li + li { margin-top: 0; }
.groups__summary { display: block; font-size: var(--text-small); color: var(--text-muted); margin-top: var(--space-1); }
.groups__price { display: block; font-weight: 700; font-size: var(--text-small); margin-top: var(--space-1); }

/* ---------- Breach page ---------- */

.breach-head h1 { color: var(--breach); }
.steps { list-style: none; padding: 0; margin: var(--space-6) 0 0; counter-reset: step; }
.steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 var(--space-5) 3.75rem;
  margin: 0;
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--breach);
  color: var(--breach-contrast);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.3rem;
  display: grid;
  place-items: center;
}
.steps h2, .steps h3 { font-size: var(--h3); margin: 0.3rem 0 var(--space-2); color: var(--text); }
.steps p { margin: 0; }

.contact-card {
  border: 2px solid var(--breach);
  background: var(--breach-tint);
  border-radius: var(--radius-large);
  padding: var(--space-5);
}
.contact-card h2 { margin-top: 0; color: var(--breach); }
.contact-card__list { margin: 0 0 var(--space-4); }
.contact-card__list > div {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 var(--space-4);
  padding-block: var(--space-2);
  border-bottom: 1px solid var(--border-soft);
}
.contact-card__list dt { font-weight: 700; font-size: var(--text-small); color: var(--text-muted); }
.contact-card__list dd { margin: 0; }
.contact-card__big { font-family: var(--font-heading); font-weight: 600; font-size: 1.75rem; line-height: 1.2; }
.contact-card__big a { color: var(--breach); text-decoration: none; }
.contact-card__note { margin: 0; font-size: var(--text-small); }
@media (min-width: 40rem) {
  .contact-card__list > div { grid-template-columns: 9rem 1fr; align-items: baseline; }
}

.cta-panel.cta-panel--breach { background: var(--breach); color: var(--breach-contrast); }
.cta-panel--breach .cta-panel__amount { font-size: clamp(1.9rem, 1.4rem + 2.4vw, 3rem); }
.cta-panel--breach h2 { color: var(--breach-contrast); }
.cta-panel--breach a { color: inherit; text-decoration: none; }
.cta-panel--breach a:hover { color: inherit; text-decoration: underline; }

/* ---------- Alternatives and articles ---------- */

.short-answer {
  border-left: 4px solid var(--accent);
  background: var(--surface-raised);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: var(--space-4) var(--space-5);
  margin-block: var(--space-5) var(--space-3);
  box-shadow: var(--shadow);
}
.short-answer p { margin: 0; }

.draft-banner {
  display: inline-block;
  background: var(--todo-bg);
  color: var(--todo-text);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius);
}

.byline { font-size: var(--text-small); color: var(--text-muted); margin-bottom: var(--space-4); }

.licence-notes { font-size: var(--text-xs); color: var(--text-muted); padding-left: 1.2em; }
.licence-notes li + li { margin-top: var(--space-1); }

.article > :first-child { margin-top: var(--space-6); }
.article h2 { margin-top: var(--space-7); }

.screenshot { margin: var(--space-5) 0; }
.screenshot img { border: 1px solid var(--border-soft); border-radius: var(--radius); }
.screenshot figcaption { font-size: var(--text-xs); color: var(--text-muted); margin-top: var(--space-2); }

.draft-list { columns: 2 16rem; }

.costs {
  margin-block: var(--space-7);
  background: var(--surface);
  border-radius: var(--radius-large);
  padding: var(--space-5);
}
.costs h2 { margin-top: 0; }
.costs__grid { display: grid; gap: var(--space-4); }
@media (min-width: 40rem) { .costs__grid { grid-template-columns: 1fr 1fr; } }
.costs__col {
  background: var(--surface-raised);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: var(--space-4);
}
.costs__col--self { border: 2px solid var(--accent); }
.costs__col h3 { margin: 0 0 var(--space-3); font-size: 1.2rem; }
.costs__col ul { list-style: none; padding: 0; margin: 0; font-size: var(--text-small); }
.costs__col li + li { margin-top: var(--space-3); }
.costs__checked { display: block; font-size: var(--text-xs); color: var(--text-muted); }
.costs__small { font-size: var(--text-xs); color: var(--text-muted); margin: var(--space-3) 0 0; }

/* ---------- Contact form ---------- */

.contact-layout { display: grid; gap: var(--space-6); }
#form-status { max-width: var(--measure); }
@media (min-width: 60rem) {
  .contact-layout { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: var(--space-8); align-items: start; }
  .contact-details { order: 2; position: sticky; top: var(--space-5); }
}
.contact-details .contact-card__list { margin-bottom: var(--space-5); }
.field--trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.field__error { display: block; color: var(--error); font-weight: 700; margin-bottom: var(--space-2); }
.field [aria-invalid="true"] { border-color: var(--error); border-width: 3px; }
.form-message {
  border-left: 4px solid var(--base);
  background: var(--tip-tint);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-5);
}
.form-message h2 { margin: 0 0 var(--space-2); font-size: var(--h3); }
.form-message > :last-child { margin-bottom: 0; }
.form-message--error { border-left-color: var(--error); background: var(--error-tint); }
.form-message--success { border-left-color: var(--success); background: var(--success-tint); }

/* ---------- Self-check ---------- */

.check__list { list-style: none; padding: 0; counter-reset: q; }
.check__item { counter-increment: q; margin: 0 0 var(--space-4); }
.check__item fieldset {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface-raised);
  padding: var(--space-4);
  margin: 0;
}
.check__item legend { font-weight: 700; padding: 0; float: left; width: 100%; }
.check__item legend::before { content: counter(q) ". "; color: var(--accent); font-family: var(--font-mono); font-weight: 500; }
.check__why { clear: both; font-size: var(--text-small); color: var(--text-muted); margin: var(--space-2) 0 var(--space-3); }
.check__choices { display: flex; gap: var(--space-5); }
.check__choices .choice { display: flex; gap: var(--space-2); align-items: center; }
.check__choices input { width: 1.25rem; height: 1.25rem; accent-color: var(--accent); }
.check__result {
  border-left: 6px solid var(--base);
  background: var(--surface);
  border-radius: 0 var(--radius-large) var(--radius-large) 0;
  padding: var(--space-5);
  margin-block: var(--space-6);
}
.check__result h2 { margin-top: 0; }
.check__result--low { border-left-color: var(--success); }
.check__result--medium { border-left-color: var(--accent); }
.check__result--high { border-left-color: var(--error); }

/* ---------- About ---------- */


/* ---------- Home ---------- */

.hero { padding-block: var(--space-7) var(--space-6); }
.hero__inner > * { max-width: 46rem; }
.hero__inner > :last-child { margin-bottom: 0; }
.hero .lede { color: var(--text); font-size: clamp(1.3rem, 1.15rem + 0.6vw, 1.6rem); }
@media (min-width: 52rem) {
  .hero { padding-block: var(--space-8) var(--space-7); }
}

/* Small round photo with a line beside it (home hero, about). */
.avatar { display: block; flex: none; width: 4.5rem; height: 4.5rem; }
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent);
}
.intro-callout {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin: 0 0 var(--space-5);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
  line-height: 1.3;
  color: var(--base);
}
@media (min-width: 52rem) {
  .avatar { width: 5.5rem; height: 5.5rem; }
}

.grid--pairs { grid-template-columns: repeat(auto-fill, minmax(min(100%, 24rem), 1fr)); }

.groups {
  list-style: none;
  padding: 0;
  margin: var(--space-6) 0;
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  counter-reset: group;
}
.groups__item {
  margin: 0;
  background: var(--surface-raised);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-large);
  padding: var(--space-5);
  counter-increment: group;
}
.groups__item h3 { margin: 0 0 var(--space-2); font-size: 1.3rem; }
.groups__item h3::before {
  content: counter(group, decimal-leading-zero) " ";
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--text-xs);
  color: var(--accent);
  vertical-align: middle;
  margin-right: var(--space-1);
}
.groups__item p { color: var(--text-muted); font-size: var(--text-small); }
.groups__item ul { list-style: none; padding: 0; margin: 0; }
.groups__item li + li { margin-top: var(--space-1); }
.groups__item a { font-weight: 600; }
.groups__item--emergency { border-color: var(--breach); background: var(--breach-tint); }
.groups__item--emergency h3::before { color: var(--breach); }
.groups__item--emergency a { color: var(--breach); }

.reasons {
  list-style: none;
  padding: 0;
  display: grid;
  gap: var(--space-5) var(--space-6);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
}
.reasons li { margin: 0; padding-left: var(--space-4); border-left: 3px solid var(--accent); }
.reasons h3 { margin: 0 0 var(--space-2); font-size: 1.3rem; }
.reasons p { margin: 0; }

.cta-panel {
  display: grid;
  gap: var(--space-5);
  background: var(--base);
  color: var(--base-contrast);
  border-radius: var(--radius-large);
  padding: var(--space-6) var(--space-5);
}
.cta-panel h2 { color: var(--base-contrast); margin-top: 0; }
.cta-panel .term-label, .cta-panel .muted { color: inherit; opacity: 0.85; }
.cta-panel .term-label::before { color: inherit; }
.cta-panel p { margin-bottom: var(--space-3); }
.cta-panel__amount {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 3rem;
  line-height: 1;
  margin-bottom: var(--space-1);
}
.cta-panel .btn--primary { margin-top: var(--space-2); }
@media (min-width: 52rem) {
  .cta-panel { grid-template-columns: 1.6fr 1fr; align-items: center; padding: var(--space-7); gap: var(--space-7); }
}

.dev-placeholder { margin: var(--space-4) 0; }

/* ---------- Cookie consent ---------- */

.consent {
  position: fixed;
  left: var(--gutter);
  right: var(--gutter);
  bottom: var(--gutter);
  z-index: 20;
  max-width: 40rem;
  margin-inline: auto;
  background: var(--surface-raised);
  color: var(--text);
  border: 2px solid var(--base);
  border-radius: var(--radius-large);
  padding: var(--space-4) var(--space-5);
  box-shadow: 0 8px 32px rgb(0 0 0 / 0.18);
  font-size: var(--text-small);
}
.consent[hidden] { display: none; }
.consent p { margin-bottom: var(--space-3); }
.consent__buttons { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.link-button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}
.link-button[hidden] { display: none; }

/* ---------- Utilities ---------- */

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.muted { color: var(--text-muted); }

/* ---------- Style guide page ---------- */

.sg-section { padding-block: var(--space-6); border-bottom: 1px solid var(--border-soft); }
.sg-swatches { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); padding: 0; list-style: none; }
.sg-swatches li { margin: 0; font-family: var(--font-mono); font-size: var(--text-xs); }
.sg-swatch { display: block; height: 4rem; border-radius: var(--radius); border: 1px solid var(--border-soft); margin-bottom: var(--space-2); }
.sg-swatch--bg { background: var(--bg); }
.sg-swatch--surface { background: var(--surface); }
.sg-swatch--text { background: var(--text); }
.sg-swatch--muted { background: var(--text-muted); }
.sg-swatch--base { background: var(--base); }
.sg-swatch--accent { background: var(--accent); }
.sg-swatch--breach { background: var(--breach); }
.sg-swatch--border { background: var(--border); }

/* ---------- Print ---------- */

@media print {
  .site-header, .site-footer__nav, .skip-link, .btn { display: none; }
  body { font-size: 12pt; background: #fff; color: #000; }
  a { color: inherit; }
}

a[href^="tel:"] { white-space: nowrap; }

/* Alternatives hub table */
.table--alts th[scope="row"] { min-width: 9rem; }
.table--alts td:last-child { min-width: 16rem; }
.table--alts tr.is-featured th[scope="row"] { color: var(--accent); }
