/*
 * FirstRing Businesscase Crisiscommunicatie: vormgeving
 *
 * Inhoud:
 *   1. Lettertypen en huisstijlkleuren
 *   2. Basis
 *   3. Kop, introductie en privacy
 *   4. Profielkeuze, algemene uitgangspunten, knoppen
 *   5. Twee kolommen: categorieën, groepen, cellen
 *   6. Invoervelden, toelichtingen, vinkjes
 *   7. Uitkomsten per onderdeel en statuslabels
 *   8. Eindoverzicht
 *   9. Tussenstand onderaan, dialoogvenster, voettekst
 *  10. Tablet en mobiel
 *  11. Print / PDF
 */

/* 1. Lettertypen en huisstijlkleuren --------------------------------------- */

@font-face {
  font-family: 'Roboto Slab';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/roboto-slab-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Roboto Slab';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/roboto-slab-600.woff2') format('woff2');
}

@font-face {
  font-family: 'Roboto Slab';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/roboto-slab-700.woff2') format('woff2');
}

@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/roboto-mono-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/roboto-mono-500.woff2') format('woff2');
}

:root {
  /* FirstRing-huisstijl */
  --navy: #102956;
  --blue: #2c6cf5;
  --blue-dark: #1d52c9;
  --light-blue: #82a6f3;
  --soft-blue: #cad8ed;
  --ice-blue: #e2e9f7;
  --ice-blue-light: #f1f5fc;
  --purple-dark: #4a1587;
  --ice-purple: #eadff7;
  --red: #e32b3a;
  --red-dark: #b3202d;

  --text: #0f1b33;
  --text-muted: #475569;
  --border-strong: #7e8896;
  --border: #d4d8dd;
  --border-soft: #e5e7eb;
  --surface: #ffffff;
  --page: #f6f8fc;

  --font-heading: 'Roboto Slab', Georgia, 'Times New Roman', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-data: 'Roboto Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius: 12px;
  --radius-small: 8px;
  --shadow: 0 1px 2px rgba(16, 41, 86, 0.06), 0 4px 16px rgba(16, 41, 86, 0.05);
  --column-head-height: 52px;
}

/* 2. Basis ----------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--column-head-height) + 16px);
  scroll-padding-bottom: 104px;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--navy);
  font-family: var(--font-heading);
  line-height: 1.25;
}

p {
  margin: 0;
}

[hidden] {
  display: none !important;
}

.wrap {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 24px;
}

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-small);
  background: var(--surface);
  color: var(--navy);
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
}

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

.brand {
  color: var(--navy);
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand--small {
  font-size: 1rem;
}

.noscript {
  margin: 24px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: var(--surface);
}

/* 3. Kop, introductie en privacy ------------------------------------------- */

.site-header {
  border-bottom: 1px solid var(--border-soft);
  background: var(--surface);
}

.site-header__inner {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding-block: 16px;
}

.site-header__context {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.hero {
  padding-block: 56px 48px;
  background: var(--navy);
  color: #ffffff;
}

.hero h1 {
  max-width: 20ch;
  color: #ffffff;
  overflow-wrap: break-word;
  hyphens: auto;
  font-size: clamp(1.75rem, 1.2rem + 2.8vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.015em;
}

.lead {
  max-width: 62ch;
  margin-top: 20px;
  color: var(--ice-blue);
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
}

.privacy-note {
  max-width: 62ch;
  margin-top: 32px;
  padding: 16px 20px;
  border: 1px solid rgba(202, 216, 237, 0.4);
  border-radius: var(--radius-small);
  background: rgba(255, 255, 255, 0.06);
  color: var(--ice-blue);
  font-size: 0.9375rem;
}

.privacy-note__title {
  margin-bottom: 4px;
  color: #ffffff;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 700;
}

/* 4. Profielkeuze, algemene uitgangspunten, knoppen ------------------------- */

.setup {
  padding-block: 48px 8px;
}

.section-title {
  margin-bottom: 20px;
  font-size: 1.5rem;
  font-weight: 700;
}

.profiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  border: 0;
}

.profile {
  position: relative;
  display: flex;
  min-width: 0;
}

.profile__radio {
  position: absolute;
  top: 22px;
  left: 20px;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--blue);
}

.profile__label {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 18px 20px 18px 54px;
  border: 1px solid var(--border-strong);
  overflow-wrap: anywhere;
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.profile__label:hover {
  border-color: var(--blue);
}

.profile__radio:checked + .profile__label {
  border-color: var(--blue);
  background: var(--ice-blue-light);
  box-shadow: inset 0 0 0 1px var(--blue);
}

/* De focusring staat om de hele kaart, niet nog eens om het rondje zelf. */
.profile__radio:focus-visible {
  outline: none;
}

.profile__radio:focus-visible + .profile__label {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

.profile__name {
  color: var(--navy);
  font-family: var(--font-heading);
  font-size: 1.1875rem;
  font-weight: 600;
}

.profile__basis {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.assumptions-notice {
  margin-top: 28px;
  padding: 18px 22px;
  border-left: 4px solid var(--blue);
  border-radius: 0 var(--radius-small) var(--radius-small) 0;
  background: var(--ice-blue);
  color: var(--navy);
}

.assumptions-notice p + p {
  margin-top: 6px;
  color: var(--text);
  font-size: 0.9375rem;
}

.general {
  margin-top: 28px;
  padding: 22px 24px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.general__title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin-bottom: 16px;
  font-size: 1.1875rem;
  font-weight: 600;
}

.general__scope {
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 400;
}

.general__fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 40px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-small);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn--primary {
  background: var(--blue);
  color: #ffffff;
}

.btn--primary:hover {
  background: var(--blue-dark);
}

.btn--ghost {
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--navy);
}

.btn--ghost:hover {
  border-color: var(--navy);
  background: var(--ice-blue-light);
}

.btn--small {
  min-height: 44px;
  padding: 8px 16px;
  font-size: 0.9375rem;
}

/* 5. Twee kolommen: categorieën, groepen, cellen --------------------------- */

.column-heads {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: var(--column-head-height);
  margin-top: 32px;
  border-radius: var(--radius-small);
  box-shadow: 0 6px 16px rgba(16, 41, 86, 0.12);
  overflow: hidden;
}

.column-head {
  display: flex;
  align-items: center;
  padding: 12px 24px;
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
}

.column-head--current {
  border: 1px solid var(--border);
  border-right: 0;
  border-radius: var(--radius-small) 0 0 var(--radius-small);
  background: var(--surface);
  color: var(--navy);
}

.column-head--firstring {
  background: var(--navy);
  color: #ffffff;
}

.category {
  margin-top: 48px;
}

.category__header {
  margin-bottom: 20px;
}

.category__title {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 1.625rem;
  font-weight: 700;
}

.category__number {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--navy);
  color: #ffffff;
  font-size: 1.125rem;
}

.category__intro {
  max-width: 78ch;
  margin-top: 10px;
  color: var(--text-muted);
}

.shared-fields {
  max-width: 560px;
  margin-bottom: 16px;
  padding: 18px 24px 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.group {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.group__title {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 1.1875rem;
  font-weight: 600;
}

.pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pair + .pair {
  border-top: 1px solid var(--border-soft);
}

.cell {
  min-width: 0;
  padding: 18px 24px 6px;
}

.cell--firstring {
  border-left: 1px solid var(--soft-blue);
  background: var(--ice-blue-light);
}

.cell__tag {
  display: none;
}

.cell__note {
  margin: -4px 0 14px;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* 6. Invoervelden, toelichtingen, vinkjes ---------------------------------- */

.field {
  margin-bottom: 14px;
}

/* Label | i-knop (of lege plek) | statuslabel. De i-knop blijft naast het label staan,
   zodat gelijke labels links en rechts op dezelfde manier afbreken. */
.field__label-row {
  display: grid;
  grid-template-columns: minmax(0, auto) 24px minmax(0, 1fr);
  align-items: start;
  gap: 6px 8px;
  min-height: 26px;
  margin-bottom: 6px;
}

.field__label-row .status {
  justify-self: start;
  margin-top: 2px;
}

.info-spacer {
  width: 24px;
  height: 24px;
}

.field__label {
  padding-top: 2px;
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
}

.input-wrap {
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: 260px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-small);
  background: var(--surface);
  overflow: hidden;
}

.input-wrap:focus-within {
  border-color: var(--blue);
  outline: 3px solid var(--blue);
  outline-offset: 1px;
}

.input {
  flex: 1;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--font-data);
  font-size: 1rem;
  font-weight: 500;
}

.input:focus {
  outline: none;
}

/* Veld dat de huidige situatie volgt: typbaar, maar zichtbaar 'meelopend'. */
.input-wrap--linked {
  border-style: dashed;
  background: var(--ice-blue-light);
}

.input-wrap--linked .input {
  color: var(--text-muted);
}

.field__link-note {
  display: none;
  max-width: 46ch;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.input-wrap--linked ~ .field__link-note {
  display: block;
}

.input[aria-invalid='true'] {
  background: #fdf3f4;
}

.input-affix {
  display: flex;
  flex: none;
  align-items: center;
  padding-inline: 12px;
  background: var(--page);
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.input-affix--prefix {
  border-right: 1px solid var(--border);
}

.input-affix--suffix {
  border-left: 1px solid var(--border);
}

.field__hint {
  max-width: 46ch;
  margin-top: 6px;
  color: var(--navy);
  font-size: 0.875rem;
  font-weight: 600;
}

.field__msg {
  min-height: 0;
  margin-top: 4px;
  color: var(--red-dark);
  font-size: 0.875rem;
  font-weight: 600;
}

.field__msg:empty {
  display: none;
}

.info-btn {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1.5px solid var(--blue);
  border-radius: 50%;
  background: var(--surface);
  color: var(--blue-dark);
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  position: relative;
}

/* Groter aanraakvlak dan het zichtbare rondje */
.info-btn::after {
  content: '';
  position: absolute;
  inset: -10px;
}

.info-btn:hover,
.info-btn[aria-expanded='true'] {
  background: var(--blue);
  color: #ffffff;
}

.field__info {
  max-width: 60ch;
  margin-bottom: 10px;
  padding: 10px 14px;
  border-left: 3px solid var(--light-blue);
  border-radius: 0 var(--radius-small) var(--radius-small) 0;
  background: var(--ice-blue);
  color: var(--text);
  font-size: 0.875rem;
}

.cell--firstring .field__info {
  background: var(--surface);
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  margin-top: 6px;
  color: var(--text);
  font-size: 0.875rem;
  cursor: pointer;
}

.check input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--blue);
}

.computed {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 12px;
  margin-bottom: 14px;
  padding: 10px 14px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-small);
  max-width: 420px;
}

.computed__label {
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 600;
}

.computed__value {
  color: var(--navy);
  font-family: var(--font-data);
  font-size: 1rem;
  font-weight: 500;
}

.computed__note {
  flex-basis: 100%;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.modules__list {
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
}

.module {
  display: grid;
  grid-template-columns: minmax(0, 200px) minmax(0, 1fr);
  align-items: end;
  gap: 0 16px;
  padding: 10px 14px 4px;
  border: 1px solid var(--soft-blue);
  border-radius: var(--radius-small);
  background: var(--surface);
}

.module .field {
  margin-bottom: 8px;
}

.module .check {
  min-height: 44px;
  margin: 0 0 8px;
}

.module .module__price {
  grid-column: 1 / -1;
  padding-top: 4px;
}

.module__price .input-wrap {
  max-width: 200px;
}

/* 7. Uitkomsten per onderdeel en statuslabels ------------------------------ */

.pair--results .cell {
  padding-block: 14px 12px;
  background: var(--page);
}

.pair--results .cell--firstring {
  background: var(--ice-blue);
}

.results {
  margin: 0;
}

.results__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-block: 5px;
}

.results__label {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.results__value {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-end;
  gap: 4px 8px;
  margin: 0;
  color: var(--text);
  font-family: var(--font-data);
  font-size: 0.9375rem;
  font-weight: 500;
  text-align: right;
  white-space: nowrap;
}

.results__value .status {
  order: -1;
}

.results__row--total {
  margin-top: 4px;
  padding-top: 9px;
  border-top: 1px solid var(--border-strong);
}

.results__row--total .results__label {
  color: var(--navy);
  font-weight: 700;
}

.results__row--total .results__value {
  color: var(--navy);
  font-size: 1.0625rem;
}

.group--total {
  border-color: var(--navy);
}

.group--total .group__title {
  border-bottom: 0;
  background: var(--navy);
  color: #ffffff;
}

.group--total .results__row--total .results__value {
  font-size: 1.25rem;
}

.status {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.5;
  white-space: nowrap;
}

.status--lower,
.status--dropped {
  background: var(--navy);
  color: #ffffff;
}

.status--higher,
.status--new {
  background: var(--ice-purple);
  color: var(--purple-dark);
  box-shadow: inset 0 0 0 1px var(--purple-dark);
}

.status--equal {
  background: var(--surface);
  color: var(--text-muted);
  box-shadow: inset 0 0 0 1px var(--border-strong);
}

.explain {
  margin-top: 8px;
  font-size: 0.875rem;
}

.explain summary {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--blue-dark);
  font-weight: 600;
  cursor: pointer;
}

.explain summary:hover {
  text-decoration: underline;
}

.explain__lines {
  margin: 4px 0 6px;
  padding: 10px 14px 10px 30px;
  border-radius: var(--radius-small);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-data);
  font-size: 0.8125rem;
  line-height: 1.6;
}

.explain__lines li + li {
  margin-top: 4px;
}

/* 8. Eindoverzicht --------------------------------------------------------- */

.overview {
  margin-top: 72px;
  padding-block: 64px;
  background: var(--navy);
}

.overview:focus {
  outline: none;
}

.overview__title {
  color: #ffffff;
  font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.375rem);
  font-weight: 700;
}

.overview__profile {
  margin-top: 8px;
  color: var(--soft-blue);
}

.headlines {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.headline {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px 28px;
  border-radius: var(--radius);
  background: var(--surface);
  container-type: inline-size;
}

.headline--difference {
  background: var(--ice-blue);
}

.headline__title {
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.headline__values {
  display: flex;
  align-items: flex-start;
  gap: 8px 20px;
}

/* In een smalle kaart staan 'nu' en 'met FirstRing' bewust onder elkaar, met de pijl omlaag. */
@container (max-width: 500px) {
  .headline__values {
    flex-direction: column;
    gap: 4px;
  }

  .headline__arrow::before {
    content: '\2193';
  }
}

.headline__side {
  display: flex;
  flex-direction: column;
}

.headline__value {
  color: var(--navy);
  font-family: var(--font-heading);
  font-size: clamp(1.625rem, 1.2rem + 1.3vw, 2.125rem);
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
}

.headline__value--large {
  font-size: clamp(2rem, 1.4rem + 2.2vw, 2.875rem);
}

.headline__caption {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.headline--difference .headline__caption {
  color: var(--navy);
  font-size: 1.0625rem;
  font-weight: 600;
}

.headline__arrow::before {
  content: '\2192';
  color: var(--blue);
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  line-height: 1.3;
}

.headline__note {
  color: var(--text);
  font-size: 0.9375rem;
}

.table-scroll {
  margin-top: 16px;
  border-radius: var(--radius);
  background: var(--surface);
  overflow-x: auto;
}

.comparison {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}

.comparison caption {
  padding: 20px 28px 8px;
  color: var(--text-muted);
  font-size: 0.9375rem;
  text-align: left;
}

.comparison th,
.comparison td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-soft);
  text-align: right;
  vertical-align: baseline;
}

.comparison th:first-child,
.comparison td:first-child {
  padding-left: 28px;
  text-align: left;
}

.comparison th:last-child,
.comparison td:last-child {
  padding-right: 28px;
}

.comparison thead td {
  border-bottom: 2px solid var(--navy);
}

.comparison thead th {
  border-bottom: 2px solid var(--navy);
  color: var(--navy);
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 600;
  vertical-align: bottom;
}

.comparison tbody th {
  color: var(--text);
  font-weight: 500;
}

.comparison tbody td {
  font-family: var(--font-data);
  font-size: 0.9375rem;
  font-weight: 500;
  white-space: nowrap;
}

.comparison tbody td:last-child {
  color: var(--navy);
  font-weight: 500;
}

.comparison__total th,
.comparison__total td {
  background: var(--ice-blue-light);
}

.comparison .comparison__total th {
  color: var(--navy);
  font-weight: 700;
}

.comparison .comparison__total td {
  color: var(--navy);
  font-size: 1.0625rem;
}

.comparison .comparison__section th {
  padding-top: 24px;
  border-bottom: 1px solid var(--border-strong);
  color: var(--navy);
  font-family: var(--font-heading);
  font-weight: 600;
  text-align: left;
}

.comparison__sub {
  display: block;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 400;
}

.comparison tbody:last-child tr:last-child th,
.comparison tbody:last-child tr:last-child td {
  border-bottom: 0;
  padding-bottom: 20px;
}

.overview__notes {
  display: grid;
  gap: 8px;
  max-width: 86ch;
  margin: 28px 0 0;
  padding-left: 20px;
  color: var(--ice-blue);
  font-size: 0.9375rem;
}

.overview__notes strong {
  color: #ffffff;
}

.overview__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 32px;
}

.overview__actions .btn--primary {
  border-color: #ffffff;
}

.overview__actions-note {
  color: var(--soft-blue);
  font-size: 0.875rem;
}

/* 9. Tussenstand onderaan, dialoogvenster, voettekst ----------------------- */

.site-footer {
  padding-block: 28px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.875rem;
}

.site-footer .brand {
  margin-right: 6px;
}

.summary-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  border-top: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 -6px 20px rgba(16, 41, 86, 0.1);
  transition: transform 0.25s ease, visibility 0.25s;
}

.summary-bar--hidden {
  transform: translateY(100%);
  visibility: hidden;
}

.summary-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-block: 12px;
}

.summary-bar__text {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 20px;
}

.summary-bar__label {
  color: var(--navy);
  font-family: var(--font-heading);
  font-weight: 600;
}

.summary-bar__figures {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 12px;
}

.summary-bar__caption {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.summary-bar__value {
  color: var(--navy);
  font-family: var(--font-data);
  font-weight: 500;
}

.summary-bar__arrow::before {
  content: '\2192';
  color: var(--blue);
}

.summary-bar .btn {
  flex: none;
  white-space: nowrap;
}

.summary-bar__diff {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--ice-blue);
  color: var(--navy);
  font-family: var(--font-data);
  font-size: 0.9375rem;
  font-weight: 500;
  white-space: nowrap;
}

.summary-bar__diff[data-direction='higher'] {
  background: var(--ice-purple);
  color: var(--purple-dark);
}

.dialog {
  width: min(460px, calc(100vw - 32px));
  padding: 28px;
  border: 0;
  border-radius: var(--radius);
  color: var(--text);
  box-shadow: 0 24px 64px rgba(16, 41, 86, 0.35);
}

.dialog::backdrop {
  background: rgba(16, 41, 86, 0.55);
}

.dialog__title {
  font-size: 1.25rem;
  font-weight: 700;
}

.dialog__message {
  margin-top: 12px;
}

.dialog__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.dialog__actions .btn {
  flex: 1 1 140px;
}

.print-report {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* 10. Tablet en mobiel ----------------------------------------------------- */

@media screen and (max-width: 1100px) {
  .module {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media screen and (max-width: 960px) {
  .wrap {
    padding-inline: 20px;
  }

  .cell {
    padding-inline: 16px;
  }

  .group__title,
  .column-head {
    padding-inline: 16px;
  }

  .column-head {
    font-size: 1rem;
  }

  .profiles {
    grid-template-columns: 1fr;
  }

  /* Ruime aanraakvlakken op tablet en telefoon. */
  .check,
  .explain summary {
    min-height: 44px;
  }

  .results__row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .results__value {
    justify-content: flex-start;
    text-align: left;
  }
}

/* Onder deze breedte staan beide situaties per onderdeel onder elkaar. */
@media screen and (max-width: 700px) {
  html {
    scroll-padding-top: 16px;
    scroll-padding-bottom: 132px;
  }

  .wrap {
    padding-inline: 16px;
  }

  .hero {
    padding-block: 40px 36px;
  }

  .setup {
    padding-top: 36px;
  }

  .general {
    padding-inline: 16px;
  }

  .general__fields {
    grid-template-columns: 1fr;
  }

  .toolbar {
    justify-content: stretch;
  }

  .toolbar .btn {
    flex: 1 1 100%;
  }

  .column-heads {
    display: none;
  }

  .category {
    margin-top: 40px;
  }

  .category__title {
    font-size: 1.375rem;
  }

  .pair {
    grid-template-columns: 1fr;
  }

  .cell--firstring {
    border-top: 1px solid var(--soft-blue);
    border-left: 0;
  }

  .cell__tag {
    display: inline-block;
    margin-bottom: 12px;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .cell--current .cell__tag {
    background: var(--border-soft);
    color: var(--text);
  }

  .cell--firstring .cell__tag {
    background: var(--navy);
    color: #ffffff;
  }

  .input-wrap {
    max-width: none;
  }

  .results__row {
    flex-direction: row;
    align-items: baseline;
  }

  .results__value {
    justify-content: flex-end;
    text-align: right;
  }

  .overview {
    margin-top: 56px;
    padding-block: 44px;
  }

  .headlines {
    grid-template-columns: 1fr;
  }

  .headline {
    padding: 20px;
  }

  .comparison caption,
  .comparison th:first-child,
  .comparison td:first-child {
    padding-left: 16px;
  }

  .comparison th,
  .comparison td {
    padding-inline: 10px;
  }

  .comparison th:last-child,
  .comparison td:last-child {
    padding-right: 16px;
  }

  .summary-bar__inner {
    flex-wrap: wrap;
    gap: 6px 12px;
    padding-block: 8px;
  }

  .summary-bar__label {
    display: none;
  }

  .summary-bar__text {
    flex: 1 1 100%;
    font-size: 0.9375rem;
  }

  .summary-bar__figures {
    gap: 2px 8px;
  }

  .summary-bar .btn {
    flex: 1 1 auto;
  }

  .summary-bar .btn {
    flex: 1 1 auto;
  }

  /* De vergelijkingstabel wordt per regel een blokje: nu, met FirstRing en verschil onder elkaar. */
  .table-scroll {
    overflow: visible;
  }

  .comparison,
  .comparison caption,
  .comparison tbody,
  .comparison tr,
  .comparison th,
  .comparison td {
    display: block;
  }

  .comparison thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .comparison tbody tr {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-soft);
  }

  .comparison tbody th,
  .comparison tbody td,
  .comparison th:first-child,
  .comparison td:first-child,
  .comparison th:last-child,
  .comparison td:last-child {
    padding: 2px 0;
    border: 0;
    background: transparent;
    text-align: left;
    white-space: normal;
  }

  .comparison tbody th {
    margin-bottom: 4px;
    font-weight: 700;
  }

  .comparison tbody td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
  }

  .comparison tbody td::before {
    content: attr(data-label);
    color: var(--text-muted);
    font-family: var(--font-body);
    font-weight: 400;
  }

  .comparison .comparison__total {
    background: var(--ice-blue-light);
  }

  .comparison .comparison__section {
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border-strong);
  }

  .comparison .comparison__section th {
    padding-top: 8px;
  }

  .comparison tbody:last-child tr:last-child th,
  .comparison tbody:last-child tr:last-child td {
    padding-bottom: 2px;
  }
}

/* 11. Print / PDF ---------------------------------------------------------- */

@page {
  size: A4;
  margin: 16mm 15mm 18mm;
}

@media print {
  html,
  body {
    background: #ffffff;
  }

  body {
    padding: 0;
    color: #000000;
    font-size: 9.5pt;
    line-height: 1.4;
  }

  /* Alleen het rapport wordt afgedrukt; de interactieve calculator niet. */
  body > *:not(#print-report) {
    display: none !important;
  }

  .print-report {
    display: block;
  }

  .print-report * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .pr-header {
    padding-bottom: 10pt;
    border-bottom: 2pt solid var(--navy);
  }

  .pr-header .brand {
    font-size: 13pt;
  }

  .pr-title {
    margin-top: 4pt;
    font-size: 20pt;
    font-weight: 700;
  }

  .pr-meta {
    display: flex;
    gap: 24pt;
    margin-top: 6pt;
    color: var(--text-muted);
    font-size: 10pt;
  }

  .pr-section {
    margin-top: 16pt;
  }

  .pr-heading {
    margin-bottom: 6pt;
    font-size: 13pt;
    font-weight: 700;
    break-after: avoid;
  }

  .pr-text {
    max-width: none;
    margin-bottom: 6pt;
    color: var(--text);
  }

  .print-report .headlines {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8pt;
    margin-top: 0;
  }

  .print-report .headline {
    gap: 4pt;
    padding: 10pt 12pt;
    border: 0.75pt solid var(--border-strong);
    border-radius: 6pt;
    background: #ffffff;
    break-inside: avoid;
  }

  .print-report .headline--difference {
    background: var(--ice-blue);
  }

  .print-report .headline__title {
    font-size: 8pt;
  }

  .print-report .headline__value {
    font-size: 15pt;
  }

  .print-report .headline__value--large {
    font-size: 18pt;
  }

  .print-report .headline__caption,
  .print-report .headline__note,
  .print-report .headline--difference .headline__caption {
    font-size: 8.5pt;
  }

  .print-report .headline__arrow::before {
    font-size: 13pt;
  }

  .print-report .comparison {
    margin-top: 10pt;
    font-size: 9.5pt;
    break-inside: avoid;
  }

  .print-report .comparison caption {
    padding: 0 0 4pt;
    font-size: 8.5pt;
  }

  .print-report .comparison th,
  .print-report .comparison td,
  .print-report .comparison th:first-child,
  .print-report .comparison td:first-child,
  .print-report .comparison th:last-child,
  .print-report .comparison td:last-child {
    padding: 4pt 6pt;
    font-size: 9.5pt;
  }

  .print-report .comparison .comparison__section th {
    padding-top: 10pt;
  }

  .print-report .comparison__sub {
    font-size: 8pt;
  }

  .pr-table {
    width: 100%;
    margin-top: 8pt;
    border-collapse: collapse;
    break-inside: avoid;
  }

  .pr-table caption {
    padding-bottom: 3pt;
    color: var(--navy);
    font-family: var(--font-heading);
    font-size: 10.5pt;
    font-weight: 600;
    text-align: left;
    break-after: avoid;
  }

  .pr-table th,
  .pr-table td {
    padding: 3pt 6pt;
    border-bottom: 0.5pt solid var(--border);
    text-align: left;
    vertical-align: top;
  }

  .pr-table thead th {
    width: 27%;
    border-bottom: 1pt solid var(--navy);
    color: var(--navy);
    font-size: 8.5pt;
    font-weight: 700;
    text-align: right;
  }

  .pr-table tbody th {
    font-weight: 400;
  }

  .pr-table tbody td {
    font-family: var(--font-data);
    font-size: 8.5pt;
    text-align: right;
  }

  .pr-table .pr-row--result th,
  .pr-table .pr-row--result td {
    background: var(--page);
  }

  .pr-table .pr-row--total th,
  .pr-table .pr-row--total td {
    border-top: 0.75pt solid var(--navy);
    background: var(--ice-blue);
    color: var(--navy);
    font-weight: 700;
  }

  /* Roboto Mono is meegeleverd tot gewicht 500; vetter zou de browser kunstmatig aandikken. */
  .pr-table .pr-row--total td {
    font-weight: 500;
  }

  .pr-table--total caption {
    font-size: 11pt;
  }

  .pr-notes {
    break-inside: avoid;
  }

  .print-report .overview__notes {
    gap: 3pt;
    max-width: none;
    margin: 0 0 8pt;
    padding-left: 14pt;
    color: var(--text);
    font-size: 9pt;
  }

  .print-report .overview__notes strong {
    color: var(--navy);
  }
}
