:root {
  color-scheme: light dark; /* native controls (drop-down lists, tick boxes) follow the same light or dark choice as the page */
  --bg: #ffffff; --card: #ffffff; --surface: #f3f4f6; --text: #111111; --muted: #5f6673; --line: #d1d5db;
  --primary: #111111; --on-primary: #ffffff; --gold: #b8893b; --success: #0b7a56; --danger: #c81e1e;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e10; --card: #18181b; --surface: #222226; --text: #f5f5f5; --muted: #a1a1aa; --line: #34343a;
    --primary: #f5f5f5; --on-primary: #111111; --gold: #cfa04b; --success: #34d399; --danger: #f87171;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.wrap { max-width: 640px; margin: 0 auto; padding: 16px 16px 48px; }
header.top { display: flex; align-items: center; justify-content: space-between; padding: 8px 0 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: 0.06em; font-size: 18px; }
.brand span { color: var(--gold); }
/* The logo from idmaid4you.com, painted in the text colour through a mask so it reads in light and dark mode. */
.brand .brand-logo {
  width: 42px; height: 44px; flex: none; background-color: var(--text);
  -webkit-mask: url(logo.png) center / contain no-repeat; mask: url(logo.png) center / contain no-repeat;
}
h1 { font-size: 26px; line-height: 1.2; margin: 8px 0 4px; }
h2 { font-size: 19px; margin: 0 0 8px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin: 12px 0; }
label { display: block; font-weight: 600; margin: 12px 0 4px; }
input, select, textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
}
textarea { min-height: 96px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
[aria-invalid="true"] { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: 14px; margin: 4px 0 0; }
.hint { color: var(--muted); font-size: 14px; margin: 4px 0 0; }
.hint a { color: inherit; }
fieldset { border: 0; padding: 0; margin: 12px 0 0; min-width: 0; }
legend { font-weight: 600; padding: 0; margin-bottom: 4px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 0; font-weight: 400; }
.check input { width: 22px; height: 22px; min-height: 0; padding: 0; flex: none; accent-color: var(--gold); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 400px) { .grid2 { grid-template-columns: 1fr; } }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px;
  font: inherit; font-weight: 700; border-radius: 12px; border: 1px solid var(--primary); cursor: pointer;
  background: var(--primary); color: var(--on-primary); text-decoration: none;
}
.btn.secondary { background: transparent; color: var(--text); border-color: var(--line); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: #111111; }
.btn.small { min-height: 40px; padding: 0 14px; }
.btn[disabled] { opacity: 0.55; cursor: default; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack > * + * { margin-top: 12px; }
.invoice { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.invoice:first-of-type { border-top: 0; }
.chip { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--surface); }
.chip.paid { color: var(--success); }
.chip.due { color: var(--danger); }
.pay-office { padding: 12px 14px; margin: 0 0 12px; border-radius: 12px; background: var(--surface); }
.pay-office a { color: inherit; }
/* Cloudflare's bot check on the price form draws its own box (300 x 65) into this spot; the height is reserved so the form does not jump. */
.turnstile { min-height: 65px; margin-top: 16px; }
.notice { border-radius: 12px; padding: 12px 14px; margin: 12px 0; background: var(--surface); }
.notice.error { border: 1px solid var(--danger); color: var(--danger); }
.notice.ok { border: 1px solid var(--success); color: var(--success); }
.hidden { display: none !important; }
.center { text-align: center; padding-top: 48px; }
.link { background: none; border: 0; padding: 0; color: var(--text); text-decoration: underline; font: inherit; cursor: pointer; }
footer { margin-top: 32px; color: var(--muted); font-size: 14px; }
footer a { color: var(--muted); }
.mt12 { margin-top: 12px; }
.mt16 { margin-top: 16px; }
.right { text-align: right; }
.amount { font-size: 28px; font-weight: 800; margin: 0 0 8px; }
h2 .amount { display: block; margin: 4px 0 0; }
.lines { list-style: none; margin: 12px 0; padding: 0; }
.lines li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--line); }
.lines li.total { font-weight: 700; }
/* A heading that receives focus from the script (so a screen reader announces the result) is not a control: no focus ring. */
h2[tabindex="-1"]:focus { outline: none; }
