/* Stapel — static pages: adverteer.html, admin.html, terme.html, privaatheid.html.
   Loaded after css/style.css, whose palette variables, logo blocks (.logo/.lb)
   and chunky buttons (.btn) these pages reuse. style.css is written for the
   full-screen game (fixed, non-scrolling, non-selectable body), so the first
   section below turns those pages back into ordinary scrolling documents. */

:root {
  /* style.css sizes its components in --u (game px); pin it to a readable range here */
  --u: clamp(0.5px, calc(100vw / 760), 0.66px);
  --page-max: 760px;
  --gutter: 16px;
  --r-card: 26px;
  --r-box: 18px;
  --input-line: #cfdcee;
  --ok: #2f8f3a;
  --ok-bg: #e8f8e8;
  --err: #b3261e;
  --err-bg: #fff1ef;
  --warn-bg: #fff4d6;
  --warn-ink: #6b4800;
  --shadow-card: 0 5px 0 rgba(20, 52, 104, 0.12), 0 16px 32px rgba(10, 34, 78, 0.22);
  /* white headline letters with a chunky dark outline, like the logo blocks */
  --outline-c: #173d7a;
  --outlined:
    0 4px 0 var(--outline-c),
    2px 2px 0 var(--outline-c), -2px 2px 0 var(--outline-c),
    2px -2px 0 var(--outline-c), -2px -2px 0 var(--outline-c),
    2.5px 0 0 var(--outline-c), -2.5px 0 0 var(--outline-c),
    0 2.5px 0 var(--outline-c), 0 -2.5px 0 var(--outline-c),
    0 8px 16px rgba(10, 34, 78, 0.25);
  --outlined-sm:
    0 3px 0 var(--outline-c),
    1.5px 1.5px 0 var(--outline-c), -1.5px 1.5px 0 var(--outline-c),
    1.5px -1.5px 0 var(--outline-c), -1.5px -1.5px 0 var(--outline-c),
    2px 0 0 var(--outline-c), -2px 0 0 var(--outline-c),
    0 2px 0 var(--outline-c), 0 -2px 0 var(--outline-c);
}

html {
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-behavior: smooth;
  scroll-padding-top: 16px;
  background: #c8ecfb;
}

body.page {
  position: relative;
  inset: auto;
  height: auto;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: visible;
  display: flex;
  flex-direction: column;
  background: none;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
  touch-action: auto;
  overscroll-behavior: auto;
}

/* fixed sky behind the scrolling page (background-attachment: fixed is broken on iOS) */
body.page::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(120% 50% at 50% 0%, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, #5ec1f5 0%, #8fd3f4 52%, #c8ecfb 100%);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* zero-specificity resets so every component class below wins */
:where(.page) :where(h1, h2, h3, h4) { margin: 0; line-height: 1.15; font-weight: 900; }
:where(.page) :where(p) { margin: 0; }
:where(.page) :where(a) { color: var(--hemel-d); font-weight: 700; text-underline-offset: 2px; }
:where(.page) :where(a:hover) { color: var(--ink); }

.page button, .page input, .page select, .page textarea { font-family: inherit; }
.page button { -webkit-appearance: none; appearance: none; touch-action: manipulation; cursor: pointer; }
.page button:disabled { cursor: not-allowed; }

.page :focus { outline: none; }
.page :focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 6px;
}
.page .btn:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 4px;
  border-radius: 18px;
}
.on-dark :focus-visible, .on-dark.pill:focus-visible { outline-color: #fff; }
/* headings, alerts and <main> only take focus so screen readers start reading there */
.page [tabindex="-1"]:focus, .page [tabindex="-1"]:focus-visible { outline: none; }

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

.skip {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 50;
  padding: 10px 16px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
  box-shadow: var(--shadow-card);
}
.skip:focus { top: 12px; }

/* ------------------------------------------------------------------------- */
/* Layout                                                                    */
/* ------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left));
  padding-right: max(var(--gutter), env(safe-area-inset-right));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: max(12px, env(safe-area-inset-top));
  padding-bottom: 4px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 18px 8px 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 4px 0 rgba(29, 43, 69, 0.14), 0 8px 18px rgba(10, 34, 78, 0.16);
  transition: transform 0.07s ease-out, box-shadow 0.07s ease-out;
}
a.pill, a.pill:hover { color: var(--ink); }
.pill:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(29, 43, 69, 0.14); }
.pill .ic { width: 18px; height: 18px; }

main { flex: 1 0 auto; }
main:focus { outline: none; }

.stack { display: flex; flex-direction: column; gap: 20px; }
.section-gap { margin-top: 28px; }

/* ------------------------------------------------------------------------- */
/* Hero                                                                      */
/* ------------------------------------------------------------------------- */
.hero {
  text-align: center;
  color: #fff;
  padding: 0 0 8px;
}
.hero .logo {
  padding-top: calc(78 * var(--u));
  font-size: calc(58 * var(--u));
  pointer-events: none;
}
.hero .lb { width: calc(84 * var(--u)); height: calc(84 * var(--u)); }
.hero .lb.hang { --y: calc(-36 * var(--u)); }
.hero .lb.hang::before { --rope: 74; }

.hero h1 {
  margin-top: 18px;
  font-size: clamp(31px, 8.4vw, 48px);
  letter-spacing: 0.01em;
  text-shadow: var(--outlined);
}
.hero-sub {
  margin-top: 10px;
  font-size: clamp(19px, 5vw, 25px);
  font-weight: 900;
  letter-spacing: 0.01em;
  text-shadow: var(--outlined-sm);
  word-spacing: 0.08em;
}
.hero-lead {
  max-width: 32em;
  margin: 14px auto 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
}
.hero-cta { max-width: 420px; margin: 22px auto 6px; }

/* ------------------------------------------------------------------------- */
/* Cards & headings                                                          */
/* ------------------------------------------------------------------------- */
.page .card {
  border-radius: var(--r-card);
  padding: 24px 20px 26px;
  box-shadow: var(--shadow-card);
}
@media (min-width: 600px) {
  .page .card { padding: 30px 32px 32px; }
}

.sec-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.sec-head h2 { font-size: clamp(23px, 6vw, 29px); }
.sec-head p { margin-top: 3px; color: var(--muted); font-weight: 700; font-size: 15px; }

/* a little toy block holding an emoji, like the how-to icons in the game */
.blk {
  --c: var(--protea); --cd: var(--protea-d);
  flex: none;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: var(--c);
  box-shadow: inset 0 -5px 0 var(--cd);
  font-size: 26px;
  transform: rotate(var(--r, -3deg));
}
.blk.k-karoo { --c: var(--karoo); --cd: var(--karoo-d); --r: 3deg; }
.blk.k-sonneblom { --c: var(--sonneblom); --cd: var(--sonneblom-d); --r: -2deg; }
.blk.k-bosveld { --c: var(--bosveld); --cd: var(--bosveld-d); --r: 4deg; }
.blk.k-oseaan { --c: var(--oseaan); --cd: var(--oseaan-d); --r: -4deg; }
.blk.k-jakaranda { --c: var(--jakaranda); --cd: var(--jakaranda-d); --r: 2deg; }
.blk.k-hemel { --c: var(--hemel); --cd: var(--hemel-d); --r: -3deg; }

.page .btn {
  --depth: 6px;
  min-height: 58px;
  padding: 10px 22px;
  gap: 10px;
  border-radius: 18px;
  font-size: 20px;
  text-decoration: none;
  color: var(--fg);
}
.page a.btn, .page a.btn:hover { color: var(--fg); }
.page .btn-big { min-height: 64px; font-size: 22px; border-radius: 20px; }
.page .btn-small { min-height: 46px; font-size: 16px; padding: 8px 16px; border-radius: 14px; --depth: 4px; }
.page .btn .ic { width: 1.05em; height: 1.05em; }
.page .btn:disabled, .page .btn[aria-disabled="true"] {
  filter: grayscale(0.85) brightness(1.05);
  opacity: 0.7;
  transform: none;
}
.page .btn-white { --bg: #fff; --bg-l: #fff; --bg-d: #c9d7ea; --fg: var(--ink); }
.page .card .btn-white { --bg: var(--panel); --bg-l: var(--panel); --bg-d: #cfdcee; }
.page .btn-red { --bg: var(--klei); --bg-l: var(--klei-l); --bg-d: var(--klei-d); }

.ic { width: 1em; height: 1em; flex: none; fill: currentColor; }

/* ------------------------------------------------------------------------- */
/* "Hoekom Stapel?"                                                          */
/* ------------------------------------------------------------------------- */
.why-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 640px) {
  .why-list { grid-template-columns: 1fr 1fr; }
}
.why-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px;
  border-radius: var(--r-box);
  background: var(--panel);
}
.why-item h3 { font-size: 18px; }
.why-item p { margin-top: 4px; font-size: 15.5px; line-height: 1.45; color: var(--ink-soft); font-weight: 600; }

/* ------------------------------------------------------------------------- */
/* Tiers                                                                     */
/* ------------------------------------------------------------------------- */
.tiers-title {
  margin: 30px 0 14px;
  text-align: center;
  color: #fff;
  font-size: clamp(26px, 6.8vw, 34px);
  letter-spacing: 0.01em;
  text-shadow: var(--outlined);
}
.tiers {
  display: grid;
  gap: 22px;
}
@media (min-width: 700px) {
  .tiers { grid-template-columns: 1fr 1fr; align-items: stretch; }
}
.tier {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border: 3px solid transparent;
}
.tier-premium {
  border-color: var(--sonneblom);
  background: linear-gradient(180deg, #ffffff 0%, #fffaf0 100%);
}
.ribbon {
  position: absolute;
  top: -16px;
  right: 18px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--sonneblom-l), var(--sonneblom));
  box-shadow: inset 0 -4px 0 var(--sonneblom-d), 0 6px 14px rgba(10, 34, 78, 0.22);
  color: #5c3d00;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transform: rotate(3deg);
}
.tier-head { display: flex; align-items: center; gap: 14px; }
.tier-head h3 { font-size: 23px; }
.tier-kicker {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.price-box {
  padding: 12px 14px;
  border-radius: var(--r-box);
  background: var(--panel);
}
.tier-premium .price-box { background: #fff3d1; }
.price {
  font-size: 27px;
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
}
.price-quiet { font-size: 20px; }
.price-note { margin-top: 3px; font-size: 15px; font-weight: 700; color: var(--ink-soft); }

.ticks {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ticks li {
  position: relative;
  padding-left: 32px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}
.ticks li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 1px;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat,
    var(--bosveld);
  box-shadow: inset 0 -3px 0 var(--bosveld-d);
}

.tier-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }

/* availability chip */
.avail {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  min-height: 34px;
  padding: 4px 14px 4px 10px;
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 800;
}
.avail::before {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #9aa8c0;
  box-shadow: 0 0 0 3px rgba(154, 168, 192, 0.25);
}
.avail[data-state="ok"] { background: var(--ok-bg); color: var(--ok); }
.avail[data-state="ok"]::before { background: var(--bosveld); box-shadow: 0 0 0 3px rgba(91, 191, 90, 0.28); }
.avail[data-state="taken"] { background: #fde9e7; color: var(--klei-d); }
.avail[data-state="taken"]::before { background: var(--klei); box-shadow: 0 0 0 3px rgba(217, 72, 59, 0.22); }
.avail[data-state="loading"]::before { animation: pulse 1.1s ease-in-out infinite; }
.avail[data-state="soon"] { background: var(--warn-bg); color: var(--warn-ink); }
.avail[data-state="soon"]::before { background: var(--karoo); box-shadow: 0 0 0 3px rgba(243, 154, 43, 0.25); }

/* ------------------------------------------------------------------------- */
/* Form                                                                      */
/* ------------------------------------------------------------------------- */
.form-card { scroll-margin-top: 12px; }

.notice {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
  padding: 16px;
  border-radius: var(--r-box);
  background: var(--warn-bg);
  color: var(--warn-ink);
  font-weight: 700;
  line-height: 1.45;
}
.notice h3 { font-size: 20px; color: #5c3d00; margin-bottom: 4px; }
.notice .blk { width: 44px; height: 44px; font-size: 22px; }

.alert {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 2px solid var(--klei-l);
  border-radius: var(--r-box);
  background: var(--err-bg);
  color: var(--err);
  font-weight: 800;
  line-height: 1.4;
}
.alert::before {
  content: '!';
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--klei);
  color: #fff;
  font-weight: 900;
  font-size: 17px;
  line-height: 1;
}
.alert ul { margin: 6px 0 0; padding-left: 18px; font-weight: 700; }
.alert a { color: var(--err); }
.alert.is-info { border-color: var(--hemel-l); background: #eef5ff; color: var(--hemel-d); }
.alert.is-info::before { content: 'i'; background: var(--hemel); }
.alerts-box .alert > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.alerts-box .alert > .pill { flex: none; }

:where(.page) :where(fieldset) { margin: 0; padding: 0; border: 0; min-width: 0; }
:where(.page) :where(legend) { padding: 0; }
.form-sub {
  margin: 26px 0 4px;
  font-size: 20px;
}
.form-sub + .hint { margin-bottom: 14px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field > label, .field-label {
  font-size: 16.5px;
  font-weight: 900;
}
.opt { font-weight: 700; color: var(--muted); }
.hint { font-size: 14.5px; font-weight: 600; color: var(--muted); line-height: 1.4; }

.input {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 2px solid var(--input-line);
  border-radius: 14px;
  background: var(--panel);
  color: var(--ink);
  font-size: 17px;   /* >= 16px: iOS doesn't zoom into the field */
  font-weight: 700;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.input::placeholder { color: #93a2bb; font-weight: 600; }
.input:focus, .input:focus-visible {
  outline: none;
  border-color: var(--hemel);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(61, 139, 235, 0.25);
}
.input[aria-invalid="true"] { border-color: var(--klei); background: #fff7f6; }
.input[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgba(217, 72, 59, 0.2); }
.input:disabled { opacity: 0.6; }
textarea.input { min-height: 96px; resize: vertical; line-height: 1.4; }
select.input {
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%231d2b45' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
}

.field-foot { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; min-height: 0; }
.counter {
  margin-left: auto;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.counter.is-full { color: var(--karoo-d); }
.field-error {
  display: flex;
  gap: 6px;
  color: var(--err);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.35;
}
.field-error::before { content: '⚠'; flex: none; font-family: var(--emoji); }

/* tier radio cards */
.tier-pick { display: grid; gap: 12px; margin-bottom: 22px; }
.tier-pick legend { margin-bottom: 10px; font-size: 16.5px; font-weight: 900; }
@media (min-width: 600px) {
  .tier-pick { grid-template-columns: 1fr 1fr; }
  .tier-pick legend { grid-column: 1 / -1; }
}
.pick {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 12px 14px;
  border: 3px solid #dbe6f3;
  border-radius: var(--r-box);
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.pick:hover { border-color: var(--hemel-l); }
.pick input {
  flex: none;
  width: 26px;
  height: 26px;
  margin: 0;
  border: 3px solid #b8c7dc;
  border-radius: 50%;
  background: #fff;
  -webkit-appearance: none;
  appearance: none;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.pick input::after {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--hemel);
  transform: scale(0);
  transition: transform 0.12s ease-out;
}
.pick input:checked { border-color: var(--hemel); }
.pick input:checked::after { transform: scale(1); }
.pick:has(input:checked) { border-color: var(--hemel); background: #f1f7ff; box-shadow: 0 4px 0 var(--hemel-l); }
.pick:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 3px; }
.pick input:focus-visible { outline: none; }
.pick:has(input:disabled) { cursor: not-allowed; opacity: 0.6; background: var(--panel); }
.pick-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pick-body b { font-size: 16.5px; line-height: 1.25; }
.pick-sub { font-size: 14.5px; font-weight: 700; color: var(--ink-soft); }
.pick-flag {
  font-size: 12.5px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--klei-d);
}

/* checkboxes */
.check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
}
.check input {
  flex: none;
  width: 28px;
  height: 28px;
  margin: -2px 0 0;
  border: 3px solid #b8c7dc;
  border-radius: 9px;
  background: #fff;
  -webkit-appearance: none;
  appearance: none;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.check input::after {
  content: '';
  width: 16px;
  height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23fff' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  transform: scale(0);
  transition: transform 0.12s ease-out;
}
.check input:checked { background: var(--bosveld); border-color: var(--bosveld-d); }
.check input:checked::after { transform: scale(1); }
.check input[aria-invalid="true"] { border-color: var(--klei); }
.check-error { margin: -6px 0 14px 40px; }

/* the honeypot is for bots only */
.hp {
  position: absolute !important;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.rules {
  margin: 4px 0 18px;
  padding: 14px 16px;
  border-radius: var(--r-box);
  background: var(--panel);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink-soft);
}
.rules b { color: var(--ink); }

.summary {
  margin: 8px 0 20px;
  border-radius: var(--r-box);
  border: 2px dashed #c3d1e4;
  padding: 12px 16px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  padding: 6px 0;
  font-weight: 700;
}
.summary-row + .summary-row { border-top: 2px solid var(--line); }
.summary-row dt { color: var(--muted); font-size: 15px; }
.summary-row dd { margin: 0; text-align: right; font-weight: 900; }

.secure {
  margin-top: 16px;
  text-align: center;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--muted);
}
.secure .ic { display: inline-block; width: 16px; height: 16px; margin-right: 4px; vertical-align: -2px; color: var(--bosveld-d); }

/* ------------------------------------------------------------------------- */
/* Live preview                                                              */
/* ------------------------------------------------------------------------- */
.preview {
  margin: 4px 0 22px;
  padding: 12px;
  border-radius: 22px;
  background: linear-gradient(180deg, #e8f5fd, #d7edfb);
}
.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 2px 4px 10px;
}
.preview-head .tier-kicker { color: var(--hemel-d); }
.preview-canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
}
.preview-canvas + .preview-canvas { margin-top: 10px; }
.preview-cap {
  margin: 10px 4px 2px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink-soft);
  line-height: 1.4;
}
.mini-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 6px 14px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 900;
  box-shadow: 0 3px 0 #c9d7ea;
  transition: transform 0.07s ease-out, box-shadow 0.07s ease-out;
}
.mini-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #c9d7ea; }
.mini-btn .ic { width: 16px; height: 16px; }

/* ------------------------------------------------------------------------- */
/* Callback status                                                           */
/* ------------------------------------------------------------------------- */
.status-card { margin-top: 76px; text-align: center; }
.status-card h2 { font-size: clamp(25px, 6.6vw, 32px); }
.status-msg { max-width: 30em; margin: 12px auto 0; font-size: 17.5px; font-weight: 700; color: var(--ink-soft); line-height: 1.5; }
.status-msg + .status-msg { margin-top: 8px; }
.status-ic {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  margin: -64px auto 14px;
  border-radius: 50%;
  border: 7px solid #fff;
  background: linear-gradient(180deg, var(--hemel-l), var(--hemel));
  box-shadow: 0 12px 22px rgba(10, 34, 78, 0.25), inset 0 -7px 0 var(--hemel-d);
  color: #fff;
  font-size: 42px;
}
.status-ic .ic { width: 46px; height: 46px; }
.status-card[data-state="active"] .status-ic { background: linear-gradient(180deg, var(--bosveld-l), var(--bosveld)); box-shadow: 0 12px 22px rgba(10, 34, 78, 0.25), inset 0 -7px 0 var(--bosveld-d); }
.status-card[data-state="failed"] .status-ic,
.status-card[data-state="invalid"] .status-ic { background: linear-gradient(180deg, var(--klei-l), var(--klei)); box-shadow: 0 12px 22px rgba(10, 34, 78, 0.25), inset 0 -7px 0 var(--klei-d); }
.status-card[data-state="pending"] .status-ic { background: linear-gradient(180deg, var(--sonneblom-l), var(--sonneblom)); box-shadow: 0 12px 22px rgba(10, 34, 78, 0.25), inset 0 -7px 0 var(--sonneblom-d); }
.status-card .preview { margin: 22px 0 6px; text-align: left; }
.status-actions { display: flex; flex-direction: column; gap: 14px; max-width: 420px; margin: 24px auto 0; }
.status-hint { margin-top: 16px; font-size: 14.5px; font-weight: 700; color: var(--muted); }

/* three blocks stacking: the "busy" animation */
.stacker { position: relative; width: 66px; height: 54px; margin: 18px auto 0; }
.stacker i {
  position: absolute;
  left: 50%;
  width: 44px;
  height: 14px;
  margin-left: -22px;
  border-radius: 4px;
  background: var(--c);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18);
  animation: stack-drop 1.8s cubic-bezier(0.5, 0, 0.6, 1.4) infinite both;
}
.stacker i:nth-child(1) { --c: var(--protea); bottom: 0; animation-delay: 0s; }
.stacker i:nth-child(2) { --c: var(--karoo); bottom: 16px; width: 36px; margin-left: -17px; animation-delay: 0.3s; }
.stacker i:nth-child(3) { --c: var(--oseaan); bottom: 32px; width: 28px; margin-left: -15px; animation-delay: 0.6s; }
@keyframes stack-drop {
  0% { transform: translateY(-40px); opacity: 0; }
  25%, 80% { transform: none; opacity: 1; }
  100% { transform: none; opacity: 0; }
}
@keyframes pulse { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }

/* ------------------------------------------------------------------------- */
/* FAQ                                                                       */
/* ------------------------------------------------------------------------- */
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq details {
  border-radius: var(--r-box);
  background: var(--panel);
}
.faq summary {
  position: relative;
  display: block;
  padding: 15px 52px 15px 16px;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.3;
  cursor: pointer;
  list-style: none;
  border-radius: var(--r-box);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  width: 28px;
  height: 28px;
  margin-top: -14px;
  border-radius: 50%;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5' fill='none' stroke='%231d2b45' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat;
  box-shadow: 0 2px 0 #d5e2f2;
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(180deg); }
.faq .faq-a { padding: 0 16px 16px; font-size: 16px; font-weight: 600; line-height: 1.5; color: var(--ink-soft); }
.faq .faq-a p + p { margin-top: 8px; }

/* ------------------------------------------------------------------------- */
/* Footer — the sea under the island                                         */
/* ------------------------------------------------------------------------- */
.site-foot {
  position: relative;
  margin-top: 56px;
  padding: 30px 0 max(26px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, #2f86d8 0%, #1f6fb2 45%, #1b3f8f 100%);
  color: #fff;
}
.site-foot::before {
  /* wave crests along the top edge */
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -15px;
  height: 16px;
  background:
    radial-gradient(circle at 20px -6px, transparent 17px, #2f86d8 18px) 0 0 / 40px 16px repeat-x;
}
.foot-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.foot-nav a {
  display: inline-block;
  padding: 8px 2px;
  color: #fff;
  font-weight: 800;
  font-size: 15.5px;
  text-decoration: none;
  border-bottom: 2px solid rgba(255, 255, 255, 0.35);
}
.foot-nav a:hover { border-bottom-color: #fff; color: #fff; }
.foot-nav a:focus-visible { outline-color: #fff; }
.foot-tag {
  margin-top: 16px;
  text-align: center;
  font-weight: 900;
  letter-spacing: 0.02em;
  opacity: 0.9;
}
.foot-small { margin-top: 6px; text-align: center; font-size: 13.5px; font-weight: 600; opacity: 0.75; }

.nojs-note {
  margin: 20px 0;
  padding: 16px;
  border-radius: var(--r-box);
  background: var(--warn-bg);
  color: var(--warn-ink);
  font-weight: 800;
  text-align: center;
}

/* ------------------------------------------------------------------------- */
/* Legal pages                                                               */
/* ------------------------------------------------------------------------- */
.template-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 12px 0 18px;
  padding: 16px 18px;
  border: 3px dashed var(--karoo);
  border-radius: var(--r-box);
  background: var(--warn-bg);
  color: #5c3d00;
  font-weight: 700;
  line-height: 1.45;
  box-shadow: var(--shadow-card);
}
.template-banner strong { display: block; font-size: 18px; font-weight: 900; margin-bottom: 2px; }
.template-banner .emoji { font-size: 26px; }

.legal-title { text-align: center; color: #fff; margin: 10px 0 18px; }
.legal-title h1 {
  font-size: clamp(29px, 7.6vw, 42px);
  letter-spacing: 0.01em;
  text-shadow: var(--outlined);
}
.legal-title p {
  margin-top: 8px;
  color: var(--ink);
  font-weight: 800;
}

.legal { font-size: 16.5px; line-height: 1.6; }
.legal h2 {
  margin: 30px 0 10px;
  padding-top: 18px;
  border-top: 2px solid var(--line);
  font-size: 21px;
  scroll-margin-top: 16px;
}
.legal h2:first-of-type { margin-top: 22px; }
.legal h3 { margin: 18px 0 6px; font-size: 17.5px; }
.legal p { margin: 0 0 10px; }
.legal ul, .legal ol { margin: 0 0 12px; padding-left: 24px; }
.legal li { margin: 4px 0; }
.legal li::marker { color: var(--muted); font-weight: 800; }
.legal .lead { font-size: 17.5px; font-weight: 700; color: var(--ink-soft); }
.legal .meta { font-size: 14.5px; font-weight: 700; color: var(--muted); }

.toc {
  margin: 18px 0 0;
  padding: 14px 16px 14px 18px;
  border-radius: var(--r-box);
  background: var(--panel);
}
.legal .toc h2 { margin: 0 0 6px; padding: 0; border: 0; font-size: 16px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.toc ol { margin: 0; padding-left: 22px; columns: 1; }
@media (min-width: 640px) { .toc ol { columns: 2; column-gap: 32px; } }
.toc li { margin: 3px 0; break-inside: avoid; }
.toc a { font-weight: 700; }

.disclosure {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px 18px;
  margin: 8px 0 14px;
  padding: 14px 16px;
  border-radius: var(--r-box);
  background: var(--panel);
}
@media (min-width: 600px) {
  .disclosure { grid-template-columns: minmax(180px, 34%) 1fr; }
}
.disclosure dt { font-weight: 900; font-size: 15px; color: var(--ink-soft); padding-top: 6px; }
.disclosure dd { margin: 0; padding-bottom: 6px; border-bottom: 2px solid #dfe8f4; }
.disclosure dd:last-of-type { border-bottom: 0; }
@media (min-width: 600px) {
  .disclosure dt, .disclosure dd { padding: 7px 0; border-bottom: 2px solid #dfe8f4; }
  .disclosure dt:last-of-type, .disclosure dd:last-of-type { border-bottom: 0; }
}

.table-wrap { overflow-x: auto; margin: 6px 0 14px; border-radius: var(--r-box); border: 2px solid var(--line); }
.legal table { width: 100%; border-collapse: collapse; font-size: 15px; }
.legal th, .legal td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 2px solid var(--line); }
.legal th { background: var(--panel); font-weight: 900; }
.legal tr:last-child td { border-bottom: 0; }

/* [[placeholder]] for the owner to fill in */
.ph {
  padding: 0 4px;
  border-radius: 5px;
  background: #fff0b8;
  box-shadow: inset 0 -2px 0 var(--sonneblom);
  color: #5c3d00;
  font-weight: 800;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.owner-note {
  margin: 8px 0 12px;
  padding: 10px 14px;
  border: 1px solid #f6d79a;   /* (1.12: a soft frame, not a thick side stripe) */
  border-radius: 8px;
  background: #fff8e8;
  color: #5c3d00;
  font-size: 15px;
  font-weight: 700;
}

.to-top { margin-top: 26px; text-align: center; }

@media print {
  body.page::before, .topbar, .site-foot, .template-banner, .to-top { display: none !important; }
  body.page { background: #fff; }
  .page .card { box-shadow: none; padding: 0; }
  .legal-title { color: var(--ink); }
  .legal-title h1, .legal-title p { text-shadow: none; }
}

/* ------------------------------------------------------------------------- */
/* Dialogs (admin)                                                           */
/* ------------------------------------------------------------------------- */
.dlg {
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0;
  border: 0;
  border-radius: var(--r-card);
  background: #fff;
  color: var(--ink);
  box-shadow: 0 30px 60px rgba(6, 18, 40, 0.4);
}
.dlg::backdrop { background: var(--scrim); }
.dlg-body { padding: 22px 20px 20px; }
@media (min-width: 600px) { .dlg-body { padding: 28px 30px 26px; } }
.dlg h2 { font-size: 24px; margin-bottom: 10px; }
.dlg p { line-height: 1.5; }
.dlg-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; margin-top: 22px; }
.dlg-actions .btn { width: auto; flex: 1 1 200px; }
.dlg-p + .dlg-p, .dlg-p + .check { margin-top: 12px; }
.grid-2 { display: grid; gap: 0 14px; }
@media (min-width: 520px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.toggle-row { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 4px 0 16px; }
.toggle-row .check { margin: 0; }

/* ------------------------------------------------------------------------- */
/* Admin                                                                     */
/* ------------------------------------------------------------------------- */
body.page-admin { --page-max: 1180px; }
.admin-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0 16px;
  color: #fff;
}
.admin-head h1 { font-size: clamp(26px, 6vw, 34px); letter-spacing: 0.01em; text-shadow: var(--outlined); }
.admin-head .tools { display: flex; flex-wrap: wrap; gap: 10px; }

.login-card { max-width: 480px; margin: 20px auto 0; }
.login-card .btn { margin-top: 6px; }

.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
@media (min-width: 760px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
#payments-box .kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.kpi {
  padding: 14px 16px;
  border-radius: var(--r-box);
  background: #fff;
  box-shadow: 0 4px 0 rgba(20, 52, 104, 0.1), 0 10px 22px rgba(10, 34, 78, 0.14);
}
.kpi b { display: block; overflow: hidden; font-size: 26px; font-weight: 900; line-height: 1.15; font-variant-numeric: tabular-nums; white-space: nowrap; text-overflow: ellipsis; }
.kpi span { display: block; margin-top: 2px; font-size: 14px; font-weight: 800; line-height: 1.3; color: var(--muted); }

.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; padding-bottom: 4px; }
.topbar .tools { display: flex; gap: 8px; }
.tab {
  flex: none;
  min-height: 44px;
  padding: 8px 18px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
}
.tab[aria-selected="true"] { background: #fff; box-shadow: 0 4px 0 rgba(29, 43, 69, 0.14); }

.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 14px; }
.chipbtn {
  min-height: 40px;
  padding: 6px 14px;
  border: 2px solid #dbe6f3;
  border-radius: 999px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 800;
}
.chipbtn[aria-pressed="true"] { border-color: var(--hemel); background: #eaf3ff; color: var(--hemel-d); }
.chipbtn .n { margin-left: 4px; color: var(--muted); font-variant-numeric: tabular-nums; }
.filters .input { flex: 1 1 220px; min-height: 44px; width: auto; padding: 8px 12px; font-size: 16px; }

.panel-card { padding: 18px 16px 20px; }
@media (min-width: 600px) { .panel-card { padding: 22px 24px 24px; } }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.panel-title h2 { font-size: 22px; }

.empty { padding: 26px 10px; text-align: center; color: var(--muted); font-weight: 800; }

/* Statistiek tab */
.stats-range { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; margin-bottom: 16px; }
.stats-range .field { margin-bottom: 0; flex: 1 1 150px; }
.stats-range .btn { flex: 0 0 auto; min-width: 120px; margin-bottom: 2px; }
.stats-presets { margin-top: 10px; }
.stats-period { margin-bottom: 12px; }
.stats-caption { margin: 22px 0 8px; font-size: 18px; font-weight: 900; text-align: left; caption-side: top; }
.dtable tfoot td { border-top: 3px solid var(--line); font-weight: 800; }
.report-btn { white-space: nowrap; }
.report-box { margin-top: 24px; }
.report-text { width: 100%; min-height: 220px; font-family: inherit; font-size: 15px; line-height: 1.5; resize: vertical; }

/* responsive data table: rows become cards on phones */
.dtable { width: 100%; border-collapse: collapse; font-size: 15px; }
.dtable th {
  padding: 10px 10px;
  text-align: left;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 2px solid var(--line);
  white-space: nowrap;
}
.dtable td { padding: 12px 10px; vertical-align: top; border-bottom: 2px solid var(--line); }
.dtable tr:last-child td { border-bottom: 0; }
.dtable .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dtable .muted { color: var(--muted); font-size: 14px; font-weight: 600; }
.dtable .strong { font-weight: 900; }
.dtable .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; word-break: break-all; }
.cell-stack { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cell-stack a, .cell-stack span { overflow-wrap: anywhere; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.row-actions button {
  min-height: 36px;
  padding: 4px 12px;
  border: 2px solid #dbe6f3;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}
.row-actions button:hover { border-color: var(--hemel-l); }
.row-actions button.danger { color: var(--klei-d); border-color: #f5c9c4; }
.row-actions button:disabled { opacity: 0.45; }

@media (max-width: 860px) {
  .dtable thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .dtable, .dtable tbody, .dtable tr, .dtable td { display: block; width: 100%; }
  .dtable tr { padding: 12px 14px; margin-bottom: 12px; border-radius: var(--r-box); background: var(--panel); }
  .dtable td { padding: 5px 0; border: 0; display: grid; grid-template-columns: 96px 1fr; gap: 10px; }
  .dtable td::before { content: attr(data-label); font-size: 12.5px; font-weight: 900; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
  .dtable td.num { text-align: left; }
  .dtable td.no-label { grid-template-columns: 1fr; }
  .dtable td.no-label::before { display: none; }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--panel);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}
.badge.b-live { background: var(--ok-bg); color: var(--ok); }
.badge.b-pending { background: var(--warn-bg); color: var(--warn-ink); }
.badge.b-cancelling { background: #fff0e0; color: var(--karoo-d); }
.badge.b-ended, .badge.b-abandoned, .badge.b-lapsed { background: #eceff4; color: #5a6680; }
.badge.b-hidden { background: #fde9e7; color: var(--klei-d); }
.badge.b-unapproved { background: #f3ecff; color: var(--jakaranda-d); }
.badge.b-premium { background: #fff3d1; color: #6b4800; }
.badge.b-block { background: #eaf3ff; color: var(--hemel-d); }
.badge.b-manual { background: #e9f8f7; color: var(--oseaan-d); }
.badges { display: flex; flex-wrap: wrap; gap: 4px; }

pre.payload {
  max-height: 320px;
  overflow: auto;
  margin: 8px 0 0;
  padding: 12px;
  border-radius: 12px;
  background: #102038;
  color: #d8e6ff;
  font-size: 12.5px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  -webkit-user-select: text;
  user-select: text;
}

.toast-box {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 60;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: calc(100vw - 32px);
  pointer-events: none;
}
.toast-box .toast {
  max-width: 100%;
  padding: 12px 22px;
  font-size: 16px;
  border-radius: 999px;
}
.toast-box .toast.is-err { background: var(--klei-d); }

.copy-row { display: flex; gap: 8px; }
.copy-row .input { font-size: 14px; font-weight: 600; }
.copy-row .btn { width: auto; flex: none; }

.loading-line { display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 800; padding: 16px 4px; }
.loading-line::before {
  content: '';
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: var(--karoo);
  animation: spin-block 0.9s ease-in-out infinite;
}
@keyframes spin-block { to { transform: rotate(180deg); } }

/* success confetti (reuses .confetti from style.css, pinned to the viewport) */
.page-confetti { position: fixed; z-index: 40; }
