:root {
  --ink: #141414;
  --muted: #5b6168;
  --line: #d9dde1;
  --bg: #f5f6f7;
  --card: #ffffff;
  --brand: #01a2dd;
  --action: #00739e;
  --action-hover: #005d80;
  --error: #b42318;
  --error-bg: #fdecea;
  --test-bg: #fff6d6;
  --radius: 10px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; background: var(--bg); }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }

.site-header { background: var(--card); border-bottom: 3px solid var(--brand); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 64px; }
.logo img { display: block; height: 38px; width: auto; }
.header-link { color: var(--muted); font-size: 0.9rem; text-decoration: none; }
.header-link:hover { color: var(--ink); text-decoration: underline; }

.intro { margin: 32px 0 20px; }
h1 { font-size: clamp(1.7rem, 4vw, 2.2rem); line-height: 1.15; margin: 0 0 10px; letter-spacing: -0.01em; }
.intro p { margin: 0; color: var(--muted); max-width: 60ch; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 32px; }
fieldset { border: 0; padding: 0; margin: 0 0 20px; }
legend { font-weight: 650; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 10px; padding: 0; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 560px) { .row { grid-template-columns: 1fr; } .card { padding: 18px; } }

.field { margin-bottom: 12px; }
label { display: block; font-weight: 550; font-size: 0.95rem; margin-bottom: 4px; }
.optional { font-weight: 400; color: var(--muted); }
input {
  width: 100%; font: inherit; color: inherit; padding: 10px 12px;
  border: 1px solid #b9c0c7; border-radius: 6px; background: #fff;
}
input:focus { outline: 3px solid rgba(1, 162, 221, 0.35); outline-offset: 0; border-color: var(--action); }
input[aria-invalid="true"] { border-color: var(--error); }
.money { position: relative; }
.money span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.money input { padding-left: 26px; font-variant-numeric: tabular-nums; }
.error { color: var(--error); font-size: 0.85rem; margin: 4px 0 0; min-height: 0; }
.error:empty { display: none; }

.summary { border-top: 1px solid var(--line); padding-top: 14px; margin: 4px 0 18px; font-variant-numeric: tabular-nums; }
.summary div { display: flex; justify-content: space-between; padding: 3px 0; color: var(--muted); }
.summary .total { color: var(--ink); font-weight: 700; font-size: 1.15rem; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; }

.turnstile:empty { display: none; }
.turnstile { margin-bottom: 12px; }

button, .button {
  display: inline-block; font: inherit; font-weight: 650; border: 0; border-radius: 6px; cursor: pointer;
  background: var(--action); color: #fff; padding: 13px 22px; text-decoration: none; text-align: center;
}
button { width: 100%; font-size: 1.05rem; }
button:hover, .button:hover { background: var(--action-hover); }
button:disabled { opacity: 0.6; cursor: wait; }
.button-secondary { background: transparent; color: var(--action); border: 1px solid var(--action); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.button-secondary:hover { background: #eaf6fb; }
.fine { font-size: 0.85rem; color: var(--muted); margin: 12px 0 0; }

.notice { border-radius: 6px; padding: 10px 14px; margin: 0 0 16px; background: #eaf6fb; border: 1px solid #b6e1f2; }
.notice-error { background: var(--error-bg); border-color: #f4c7c3; color: var(--error); }
.notice-test { background: var(--test-bg); border-color: #f1dc8f; }
[hidden] { display: none !important; }

.done { margin-top: 40px; }
.done p { color: var(--muted); }
.done .button { margin-top: 8px; }

.site-footer { color: var(--muted); font-size: 0.85rem; padding: 8px 0 32px; }
.site-footer a { color: inherit; }
