/* rekenmodule.css — de rekenmodules in de merk-laag.
 *
 * De drie modules kwamen uit de animatiemap in de product-laag: navy, teal en
 * Inter voor alles. Dat is de laag voor applicaties en portalen. Deze pagina's
 * horen bij de site, dus bij de merk-laag: romig wit, inkt, saffraan, koraal
 * als spark, MuseoModerno voor titels in kleine letters.
 *
 * Alles staat onder .rekenmodule. De modules brengen hun eigen klassenamen mee
 * (.card, .grid, .row, table, details) die botsen met de site-CSS; die scope
 * houdt ze uit elkaar. De klassenamen zelf blijven staan, want de rekenkern in
 * static/js/ zoekt erop.
 *
 * Merk-laag betekent vlak: geen schaduwen, geen verlopen. Diepte komt van
 * vlak-op-vlak, romig wit tegen aubergine.
 */

.rekenmodule {
  font-family: var(--font-body);
  color: var(--text-body);
  font-size: 15px;
  line-height: 1.55;
}

.rekenmodule .num { font-variant-numeric: tabular-nums; }
.rekenmodule b,
.rekenmodule strong { font-weight: 600; color: var(--text-heading); }

/* ----- Kop van de module -------------------------------------------------- */
/* Was een navy masthead met het woordmerk erin. Het woordmerk staat al in de
   navigatie van de site, dus hier blijft alleen de titel over. */
.rekenmodule .masthead,
.rekenmodule > header {
  padding-top: 56px;
  padding-bottom: 8px;
}

.rekenmodule .masthead .in,
.rekenmodule > header > * { max-width: none; margin: 0; }

.rekenmodule .masthead .top { display: none; }   /* woordmerk + eyebrow-rij */
.rekenmodule .wm { display: none; }

.rekenmodule .masthead h1,
.rekenmodule > header h1 {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: lowercase;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text-heading);
  max-width: 20ch;
}

.rekenmodule .masthead .unit {
  display: inline-block;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-heading);
  background: var(--color-paneel);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
}

.rekenmodule .masthead p,
.rekenmodule > header p {
  margin-top: 20px;
  font-size: 18px;
  line-height: 1.5;
  color: var(--text-body);
  max-width: 62ch;
}

/* ----- Raamwerk ----------------------------------------------------------- */
/* De breedte komt van .container van de site; .wrap en main zetten alleen
   nog verticale ruimte. */
.rekenmodule .wrap,
.rekenmodule main {
  max-width: none;
  margin: 0;
  padding: 24px 0 64px;
}

.rekenmodule .grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 28px;
  align-items: start;
}

.rekenmodule .sticky { position: sticky; top: 96px; }

@media (max-width: 1000px) {
  .rekenmodule .grid { grid-template-columns: minmax(0, 1fr); }
  .rekenmodule .sticky { position: static; }
}

/* ----- Kaarten ------------------------------------------------------------ */
.rekenmodule .card {
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-card);
  padding: 28px;
  margin-bottom: 20px;
}

.rekenmodule .card h2 {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: lowercase;
  font-size: 26px;
  letter-spacing: -0.5px;
  color: var(--text-heading);
  margin-bottom: 6px;
}

.rekenmodule .card .lead {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* ----- Eén keuze ---------------------------------------------------------- */
.rekenmodule .keuze {
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 18px;
  margin-bottom: 12px;
  background: var(--surface-card);
  transition: border-color var(--motion-duur) var(--motion-ease);
}

.rekenmodule .keuze.on { border-color: var(--color-saffraan); }

.rekenmodule .keuze .kop {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.rekenmodule .keuze .nr {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.28em;
}

.rekenmodule .keuze .titel {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-heading);
  margin-top: 4px;
}

.rekenmodule .keuze .uitleg { font-size: 14px; color: var(--text-body); margin-top: 8px; }
.rekenmodule .keuze .uitleg b { color: var(--text-heading); }

.rekenmodule .keuze .noot {
  font-size: 13px;
  color: var(--text-body);
  background: var(--color-paneel);
  border-left: 3px solid var(--color-saffraan);
  padding: 10px 12px;
  border-radius: var(--radius-input);
  margin-top: 12px;
}

/* ----- Schakelaar --------------------------------------------------------- */
.rekenmodule .sw {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  flex: none;
  user-select: none;
}

.rekenmodule .sw input { position: absolute; opacity: 0; width: 0; height: 0; }

.rekenmodule .sw .knop {
  width: 44px;
  height: 24px;
  border-radius: var(--radius-pill);
  background: var(--color-paneel-diep);
  position: relative;
  transition: background var(--motion-duur) var(--motion-ease);
}

.rekenmodule .sw .knop::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-kaart);
  transition: left var(--motion-duur) var(--motion-ease);
}

.rekenmodule .sw input:checked + .knop { background: var(--color-saffraan); }
.rekenmodule .sw input:checked + .knop::after { left: 23px; }
.rekenmodule .sw input:focus-visible + .knop { outline: 2px solid var(--color-inkt); outline-offset: 2px; }

.rekenmodule .sw .lbl {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  min-width: 28px;
  text-align: right;
}

/* ----- Schuiven ----------------------------------------------------------- */
.rekenmodule .slider { margin-top: 14px; }

.rekenmodule .slider .rij {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.rekenmodule .slider .rij b { color: var(--text-heading); }

.rekenmodule input[type=range] {
  width: 100%;
  accent-color: var(--color-saffraan);
  height: 24px;
  cursor: pointer;
}

.rekenmodule input[type=range]:disabled { opacity: 0.4; cursor: default; }

/* ----- Segmentknoppen ----------------------------------------------------- */
.rekenmodule .seg,
.rekenmodule .eenheid,
.rekenmodule .tabs {
  display: inline-flex;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-top: 12px;
}

.rekenmodule .seg button,
.rekenmodule .eenheid button,
.rekenmodule .tabs button {
  border: none;
  background: var(--surface-card);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 9px 18px;
  cursor: pointer;
  color: var(--text-body);
  transition: background var(--motion-duur) var(--motion-ease),
              color var(--motion-duur) var(--motion-ease);
}

.rekenmodule .seg button + button,
.rekenmodule .eenheid button + button,
.rekenmodule .tabs button + button { border-left: 1px solid var(--border-default); }

.rekenmodule .seg button.on,
.rekenmodule .eenheid button.on,
.rekenmodule .tabs button.on {
  background: var(--color-inkt);
  color: var(--color-creme);
  font-weight: 600;
}

.rekenmodule .seg button:focus-visible,
.rekenmodule .eenheid button:focus-visible,
.rekenmodule .tabs button:focus-visible { outline: 2px solid var(--color-inkt); outline-offset: -2px; }

/* ----- Invoervelden ------------------------------------------------------- */
.rekenmodule .field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  margin-bottom: 8px;
}

.rekenmodule .field .in {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-input);
  background: var(--surface-card);
  overflow: hidden;
}

.rekenmodule .field .in span {
  padding: 0 12px;
  color: var(--text-muted);
  font-size: 15px;
  border-right: 1px solid var(--border-default);
  background: var(--color-paneel);
  align-self: stretch;
  display: flex;
  align-items: center;
}

.rekenmodule .field input[type=text] {
  flex: 1;
  min-width: 0;
  border: none;
  padding: 11px 12px;
  font: inherit;
  font-size: 15px;
  color: var(--text-heading);
  background: transparent;
}

.rekenmodule .field input:focus { outline: none; }
.rekenmodule .field .in:focus-within { border-color: var(--color-saffraan); }
.rekenmodule .field .hint { font-size: 13px; color: var(--text-muted); margin-top: 8px; }

/* ----- De uitkomst (donker anker) ---------------------------------------- */
.rekenmodule .res {
  background: var(--surface-anker);
  color: var(--color-creme);
  border-radius: var(--radius-card);
  padding: 28px;
  margin-bottom: 20px;
}

.rekenmodule .res .eyebrow { color: rgba(251, 243, 228, 0.62); margin-bottom: 0; }
.rekenmodule .res .groot { margin: 12px 0 6px; }

.rekenmodule .res .groot .v {
  font-family: var(--font-display);
  font-size: 46px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--color-creme);
}

.rekenmodule .res .groot .v small {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  color: rgba(251, 243, 228, 0.62);
  margin-left: 8px;
  letter-spacing: 0;
}

.rekenmodule .res .band { font-size: 13px; color: rgba(251, 243, 228, 0.62); }
.rekenmodule .res .band b { color: var(--color-creme); font-weight: 500; }

.rekenmodule .res .rij {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid rgba(251, 243, 228, 0.16);
  font-size: 14px;
}

.rekenmodule .res .rij .l { color: rgba(251, 243, 228, 0.72); }
.rekenmodule .res .rij .l small { display: block; color: rgba(251, 243, 228, 0.45); font-size: 12px; }
.rekenmodule .res .rij b { color: var(--color-creme); font-weight: 600; }
.rekenmodule .res .rij b.teal { color: var(--color-saffraan); }
.rekenmodule .res .sectie { margin-top: 18px; }

/* ----- Balken ------------------------------------------------------------- */
.rekenmodule .bars { margin-top: 18px; }
.rekenmodule .bar { margin-bottom: 12px; }
.rekenmodule .bar .t { font-size: 12px; color: var(--text-muted); margin-bottom: 5px; }
.rekenmodule .bar .t i { font-style: normal; color: var(--text-heading); font-weight: 600; }
.rekenmodule .bar.na .t i { color: var(--color-vermiljoen); }

.rekenmodule .bar .n {
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--color-paneel-diep);
  overflow: hidden;
}

/* ----- Jaarblok ----------------------------------------------------------- */
.rekenmodule .jaar {
  background: var(--color-paneel);
  border-radius: var(--radius-card);
  padding: 24px;
  margin-bottom: 20px;
}

.rekenmodule .jaar h3 {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: lowercase;
  font-size: 20px;
  color: var(--text-heading);
  margin-bottom: 12px;
}

.rekenmodule .jaar .rij {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  padding: 9px 0;
  border-top: 1px solid var(--color-paneel-diep);
  font-size: 14px;
}

.rekenmodule .jaar .rij:first-of-type { border-top: none; }
.rekenmodule .jaar .rij .l { color: var(--text-body); }
.rekenmodule .jaar .rij .l small { display: block; color: var(--text-muted); font-size: 12px; }
.rekenmodule .jaar .rij b { color: var(--text-heading); font-weight: 600; }
.rekenmodule .jaar .leeg { font-size: 13px; color: var(--text-muted); }

/* ----- Slotzin ------------------------------------------------------------ */
.rekenmodule .slot {
  font-size: 15px;
  color: var(--text-body);
  border-left: 3px solid var(--color-saffraan);
  padding: 4px 0 4px 16px;
  margin-top: 20px;
}

.rekenmodule .slot b { color: var(--text-heading); }

/* ----- Uitklapblokken ----------------------------------------------------- */
.rekenmodule details {
  border-top: 1px solid var(--border-default);
  margin-top: 12px;
}

.rekenmodule details summary {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: lowercase;
  font-size: 20px;
  color: var(--text-heading);
  padding: 20px 0;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 32px;
}

.rekenmodule details summary::-webkit-details-marker { display: none; }

.rekenmodule details summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-body);
  font-size: 22px;
  font-weight: 400;
  color: var(--color-saffraan);
}

.rekenmodule details[open] summary::after { content: "–"; }
.rekenmodule details .body { padding-bottom: 24px; }
.rekenmodule details .body p { font-size: 15px; color: var(--text-body); margin-bottom: 12px; }
.rekenmodule details .body ul { margin: 8px 0 0; padding-left: 0; display: grid; gap: 12px; }

.rekenmodule details .body li {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-body);
  padding-left: 20px;
  position: relative;
  list-style: none;
}

.rekenmodule details .body li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--color-saffraan);
}

.rekenmodule details .body li b { color: var(--text-heading); }

/* ----- Tabellen ----------------------------------------------------------- */
.rekenmodule .tabel { overflow-x: auto; }

.rekenmodule table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.rekenmodule th {
  text-align: right;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  padding: 10px 10px;
  border-bottom: 1px solid var(--border-default);
  white-space: nowrap;
}

.rekenmodule th:first-child,
.rekenmodule td:first-child { text-align: left; }

.rekenmodule td {
  text-align: right;
  padding: 10px;
  border-bottom: 1px solid var(--color-paneel);
  color: var(--text-body);
}

.rekenmodule td:first-child { color: var(--text-heading); }
.rekenmodule td.na { color: var(--color-vermiljoen); font-weight: 600; }

.rekenmodule tr.tot td {
  border-top: 1px solid var(--text-heading);
  border-bottom: none;
  font-weight: 600;
  color: var(--text-heading);
}

/* ----- Pillen ------------------------------------------------------------- */
.rekenmodule .pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: var(--radius-pill);
  padding: 2px 9px;
  vertical-align: middle;
}

.rekenmodule .pill.gemeten { background: var(--color-saffraan); color: var(--color-inkt); }
.rekenmodule .pill.ingeschat { background: var(--color-paneel-diep); color: var(--text-body); }

/* ----- Stappentabel (voertuig inschrijven) -------------------------------- */
.rekenmodule .stappen table { margin-top: 4px; }

.rekenmodule .stappen td input {
  width: 68px;
  text-align: right;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-input);
  padding: 7px 9px;
  font: inherit;
  font-size: 14px;
  color: var(--text-heading);
  background: var(--surface-card);
}

.rekenmodule .stappen td input:focus { outline: none; border-color: var(--color-saffraan); }
.rekenmodule .stappen td small { display: block; color: var(--text-muted); font-size: 12px; }
.rekenmodule .stappen td.winst { color: var(--text-heading); font-weight: 600; }

.rekenmodule .reset {
  border: 1px solid var(--border-default);
  background: var(--surface-card);
  border-radius: var(--radius-pill);
  font: inherit;
  font-size: 13px;
  color: var(--text-body);
  padding: 8px 16px;
  cursor: pointer;
  margin-top: 14px;
  transition: background var(--motion-duur) var(--motion-ease);
}

.rekenmodule .reset:hover { background: var(--color-paneel); }

/* ----- Broking: rijen en kerncijfers -------------------------------------- */
.rekenmodule .row {
  padding: 14px 0;
  border-bottom: 1px solid var(--color-paneel);
}

.rekenmodule .row:last-child { border-bottom: none; }

.rekenmodule .row label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-heading);
  margin-bottom: 2px;
}

.rekenmodule .row small { display: block; color: var(--text-muted); font-size: 12.5px; margin-bottom: 8px; }
.rekenmodule .row input[type=range] { width: 100%; }
.rekenmodule .row .val { display: flex; align-items: center; gap: 10px; margin-top: 6px; }

.rekenmodule .row .val input {
  width: 96px;
  text-align: right;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-input);
  padding: 7px 9px;
  font: inherit;
  font-size: 14px;
  color: var(--text-heading);
  background: var(--surface-card);
}

.rekenmodule .kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.rekenmodule .kpi {
  background: var(--surface-anker);
  color: var(--color-creme);
  border-radius: var(--radius-card);
  padding: 22px;
}

.rekenmodule .kpi.o { background: var(--color-paneel); color: var(--text-heading); }

.rekenmodule .kpi .n1 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.rekenmodule .kpi .l { font-size: 12.5px; margin-top: 6px; color: rgba(251, 243, 228, 0.62); }
.rekenmodule .kpi.o .l { color: var(--text-body); }

.rekenmodule .note { font-size: 13px; color: var(--text-muted); margin-top: 12px; }
.rekenmodule .neg { color: var(--color-vermiljoen); }
.rekenmodule .pos { color: var(--text-heading); }

/* ----- Naar de andere takken --------------------------------------------- */
.rekenmodule__takken {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border-default);
  font-size: 14px;
  color: var(--text-muted);
}

.rekenmodule__takken a {
  color: var(--text-heading);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-pill);
  padding: 7px 15px;
  transition: background var(--motion-duur) var(--motion-ease);
}

.rekenmodule__takken a:hover { background: var(--color-paneel); }
.rekenmodule__takken a[aria-current="page"] { background: var(--color-inkt); color: var(--color-creme); border-color: var(--color-inkt); }
