:root {
  --offwhite: #f8f7f4;
  --beige: #eee9df;
  --greige: #bdb3a5;
  --olijf: #70684f;
  --ink: #111c1c;
  --geel: #c4a052;
  --geel-donker: #b08d3f;
  --rood: #913826;
  --wit: #ffffff;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  background: transparent;
  color: var(--ink);
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

button, input, select { font: inherit; }
button { touch-action: manipulation; }

.shell { padding: 12px; }

.app-card {
  width: 100%;
  max-width: 640px;
  min-height: 560px;
  margin: 0 auto;
  padding: 22px 18px 28px;
  border: 1px solid var(--greige);
  border-radius: 24px;
  background: var(--offwhite);
}

/* Ingesloten groeit de iframe mee met de inhoud; een minimale hoogte zou dan witruimte geven. */
.ingesloten .app-card { min-height: 0; }

.intro { margin-bottom: 22px; }
.brand, .staplabel {
  margin: 0 0 6px;
  color: var(--olijf);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .09em;
}

h1, h2, h3 { font-family: Sora, system-ui, sans-serif; line-height: 1.2; }
h1 { max-width: 16ch; margin: 0 0 8px; font-size: clamp(24px, 7vw, 34px); }
.intro > p:last-child, .stapkop > p:last-child { max-width: 50ch; margin: 0; color: #4f514c; }

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}

.steps li { position: relative; padding-top: 9px; color: #77766e; font-size: 11px; }
.steps li::before { position: absolute; inset: 0 0 auto; height: 4px; border-radius: 4px; background: var(--beige); content: ""; }
.steps li.actief::before, .steps li.gedaan::before { background: var(--olijf); }
.steps span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.steps small { font-size: inherit; }
.steps li.actief { color: var(--ink); font-weight: 700; }

.stapkop { margin-bottom: 22px; }
.stapkop h2 { margin: 0 0 7px; font-size: 21px; }

.veld { margin-bottom: 16px; }
.veld label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; }
input, select {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid var(--greige);
  border-radius: 8px;
  background: var(--wit);
  color: var(--ink);
}
input::placeholder { color: #72736e; }
input:focus, select:focus, button:focus-visible { outline: 3px solid #83795b; outline-offset: 2px; }

.turnstile { min-height: 65px; margin: 4px 0; overflow: hidden; }
.melding { margin: 0 0 18px; padding: 11px 13px; border-radius: 8px; font-size: 14px; }
.melding.fout { border: 1px solid #d5a496; background: #f7e7e2; color: #6f281c; }
.melding.succes { background: var(--beige); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  padding: 12px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  white-space: nowrap;
}
.btn:active:not(:disabled), .stapknop:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled, .stapknop:disabled { cursor: not-allowed; opacity: .5; }
/* Geel met donkere tekst: wit op dit geel haalt het contrast niet, antraciet ruim wel. */
.btn.primair { border: 1px solid var(--geel); background: var(--geel); color: var(--ink); }
.btn.primair:hover:not(:disabled) { border-color: var(--geel-donker); background: var(--geel-donker); }
.btn.secundair { border: 1px solid var(--greige); background: transparent; color: var(--ink); }
form > .btn { margin-top: 8px; }

.categorieen { display: grid; gap: 10px; }
.categorie {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 76px;
  padding: 13px;
  border: 1px solid var(--beige);
  border-radius: var(--radius);
  background: var(--wit);
}
.categorie h3 { margin: 0 0 3px; font-size: 16px; }
.categorie p { margin: 0; color: var(--olijf); font-size: 13px; }
.teller { display: grid; grid-template-columns: 36px 28px 36px; align-items: center; flex: 0 0 auto; text-align: center; }
.stapknop { width: 36px; height: 36px; border: 1px solid var(--greige); border-radius: 50%; background: var(--offwhite); color: var(--ink); cursor: pointer; font-size: 22px; line-height: 1; }
.aantal { font-weight: 700; }

.totaal { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin: 20px 0; padding-top: 16px; border-top: 1px solid var(--greige); }
.totaal strong { font-family: Sora, system-ui, sans-serif; font-size: 22px; }
.totaal.groot strong { font-size: 26px; }
.acties { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 20px; }
.acties > .primair { order: -1; }

.velden { display: grid; grid-template-columns: 1fr; column-gap: 14px; }
.privacy, .betaalhint { margin: 5px 0 0; padding: 12px 14px; border-radius: 8px; background: var(--beige); color: #4e4d47; font-size: 14px; }
.overzicht { margin: 0; }
.overzicht-rij { display: grid; grid-template-columns: minmax(110px, .8fr) 1.2fr; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--beige); }
.overzicht dt { color: #5d5e58; }
.overzicht dd { margin: 0; text-align: right; font-weight: 600; overflow-wrap: anywhere; }

@media (min-width: 520px) {
  .shell { padding: 20px; }
  .app-card { padding: 30px 34px 36px; }
  .velden { grid-template-columns: 1fr 1fr; }
  .acties { grid-template-columns: .8fr 1.2fr; }
  .acties > .primair { order: 0; }
}

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

/* Table du Sud x Swapped */
.cobrand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.cobrand img { display: block; height: auto; }
.logo-tds { width: 160px; }
.logo-swapped { width: 98px; }
.kruis { color: var(--olijf); font-size: 18px; line-height: 1; }

.rit { margin: 0 0 16px; padding: 12px 14px; border-radius: 10px; background: var(--beige); }
.rit strong { display: block; margin-bottom: 2px; }
.rit p { margin: 0; font-size: 14px; color: #4f514c; }
.categorie p { margin: 2px 0 0; font-size: 13px; color: #4f514c; }
.categorie p.prijs { margin-top: 4px; color: var(--olijf); font-weight: 600; font-size: 14px; }
.melding.waarschuwing { border: 1px solid #e0cf9f; background: #f8f0d9; color: #5b4712; }

/* Testmodus */
.testbalk { margin: -8px 0 16px; padding: 8px 12px; border-radius: 8px; background: #f8f0d9; color: #5b4712; font-size: 13px; font-weight: 600; text-align: center; }
.btn.test { width: 100%; margin-top: 10px; border: 1px dashed #b89a4a; background: transparent; color: #5b4712; }
