:root {
  --brand: #0a2540;
  --accent: #e11d2a;
  --bg: #f4f6f9;
  --card: #ffffff;
  --text: #12203a;
  --muted: #5b6b82;
  --border: #d7dee8;
  --error: #c0261f;
  --ok: #1a8a4a;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Assistant", "Rubik", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  background: var(--card);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
}

/* Mobile-first: the form fills the whole screen — full-bleed white, no frame. */
.card {
  width: 100%;
  max-width: 560px;
  background: var(--card);
  padding: calc(env(safe-area-inset-top) + 22px) 18px calc(env(safe-area-inset-bottom) + 36px);
}

/* Desktop / tablet: float the form as a centered card on a tinted page. */
@media (min-width: 640px) {
  body {
    align-items: center;
    padding: 40px 16px;
    background:
      radial-gradient(1200px 600px at 100% -10%, rgba(10, 37, 64, 0.06), transparent 60%),
      radial-gradient(900px 500px at -10% 110%, rgba(225, 29, 42, 0.05), transparent 55%),
      var(--bg);
  }
  .card {
    max-width: 480px;
    border-radius: var(--radius);
    box-shadow: 0 12px 40px rgba(10, 37, 64, 0.10);
    padding: 34px 40px 28px;
  }
}

.brand { text-align: center; margin-bottom: 18px; }

.logo {
  font-weight: 800;
  letter-spacing: 1px;
  font-size: 28px;
  color: var(--brand);
  word-break: break-word;
}
.logo span { color: var(--accent); }

.logo-img {
  max-width: 220px;
  max-height: 72px;
  width: auto;
  height: auto;
  object-fit: contain;
}

h1 { font-size: 21px; margin: 12px 0 6px; }

.lede { color: var(--muted); margin: 0; font-size: 15px; }

.field { margin-bottom: 14px; }

label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 15px; }

.req { color: var(--accent); }

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="date"],
select {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px; /* >=16px prevents iOS zoom-on-focus */
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-family: inherit;
}

select { cursor: pointer; }

input:focus,
select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(10, 37, 64, 0.12);
}

/* Two fields side by side on wider screens; stacked on small phones. */
.row-2 { display: grid; grid-template-columns: 1fr; gap: 0 14px; }
@media (min-width: 440px) {
  .row-2 { grid-template-columns: 1fr 1fr; }
}

input[aria-invalid="true"] { border-color: var(--error); }

.error {
  color: var(--error);
  font-size: 13px;
  margin: 6px 0 0;
  min-height: 0;
}

.consent {
  background: #f7f9fc;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  margin-top: 18px;
}

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400;
  margin: 0;
  cursor: pointer;
}

.consent-row input[type="checkbox"] {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  accent-color: var(--accent);
}

.consent-text {
  font-size: 13.5px;
  color: var(--text);
}

.consent-text a { color: var(--brand); text-decoration: underline; }

button[type="submit"] {
  width: 100%;
  margin-top: 18px;
  padding: 14px;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
}

button[type="submit"]:hover { filter: brightness(0.95); }
button[type="submit"]:disabled { opacity: 0.6; cursor: default; }

.form-error {
  color: var(--error);
  text-align: center;
  font-size: 14px;
  margin: 12px 0 0;
}

.success { text-align: center; padding: 12px 0; }

.check {
  width: 64px;
  height: 64px;
  line-height: 64px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--ok);
  color: #fff;
  font-size: 34px;
  font-weight: 700;
}

.foot {
  margin-top: 18px;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
}
