@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap');

:root {
  --brand: #1a5fb4;
  --brand-dark: #123d75;
  --brand-light: #e8f0fb;
  --accent: #1a9e6f;
  --text: #1c1f26;
  --muted: #5b6472;
  --border: #d7dce3;
  --bg: #f5f7fa;
  --card: #ffffff;
  --error: #c0392b;
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

h1, h2, .logo, .btn-primary, .btn-secondary, .trust-bar, .hero-tagline {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.wrap { max-width: 640px; margin: 0 auto; padding: 0 20px; }

/* ---------- header / hero ---------- */

.site-header {
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
  color: #fff;
  padding: 18px 0;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}
.logo-mark { flex-shrink: 0; color: #fff; }
.logo strong { font-weight: 800; }

/* .hero-tagline/.trust-bar deliberately have NO background of their own --
   they're transparent children inside .site-header's single gradient, which
   spans the full header edge-to-edge. Giving each one its own copy of the
   same gradient (as an earlier version did) computes it relative to each
   element's own narrower, centered box instead of the full-width header,
   producing a visible seam/rectangle rather than one continuous wash. */
.hero-tagline {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 20px 20px;
  text-align: center;
  color: #fff;
  font-size: 0.95rem;
  opacity: 0.95;
}

.trust-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 20px 20px;
}
.trust-bar span {
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0.95;
  white-space: nowrap;
}

.wizard-shell { padding: 32px 0 64px; }

.progress-label { font-size: 0.85rem; color: var(--muted); margin-bottom: 8px; font-weight: 600; }
.progress-bar {
  height: 8px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 28px;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  transition: width 0.3s ease;
  width: 16.66%;
}

.step {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: 0 4px 16px rgba(18, 61, 117, 0.06);
}
.step h1 { font-size: 1.35rem; margin: 0 0 8px; color: var(--brand-dark); font-weight: 700; }
.step .sub { color: var(--muted); margin: 0 0 20px; }

.field { margin-bottom: 18px; }
.field-row-inline { display: flex; gap: 12px; }
.field-row-inline select { flex: 1; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.95rem; }
.field input,
.field select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  background: #fff;
  color: var(--text);
}
.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(26, 95, 180, 0.15);
}
.field-note { font-size: 0.82rem; color: var(--muted); margin: 4px 0 0; }
.field-error { font-size: 0.85rem; color: var(--error); margin: 4px 0 0; min-height: 1.1em; }
.field.has-error input,
.field.has-error select { border-color: var(--error); }

.step-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}
.btn-primary,
.btn-secondary {
  border: none;
  border-radius: 8px;
  padding: 13px 26px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  margin-left: auto;
  box-shadow: 0 4px 12px rgba(26, 95, 180, 0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(26, 95, 180, 0.4); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-secondary { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg); }

.consent-block { margin: 20px 0; font-size: 0.85rem; color: var(--muted); line-height: 1.5; }
.checkbox-label { display: flex; gap: 10px; align-items: flex-start; }
.checkbox-label input[type="checkbox"] { margin-top: 3px; flex-shrink: 0; width: 18px; height: 18px; accent-color: var(--brand); }
.link-btn {
  background: none;
  border: none;
  color: var(--brand);
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  font: inherit;
}

.site-footer { padding: 24px 0 40px; color: var(--muted); font-size: 0.85rem; }
.footer-copy { margin: 0 0 8px; }
.footer-links a { color: var(--muted); margin-right: 16px; }

.spinner {
  width: 36px;
  height: 36px;
  border: 4px solid var(--border);
  border-top-color: var(--brand);
  border-radius: 50%;
  margin: 0 auto 16px;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
#resultContent { text-align: center; padding: 20px 0; }
#resultMessage strong { font-size: 1.3rem; display: block; margin-bottom: 8px; color: var(--brand-dark); }

/* ---------- modal ---------- */
/* .modal-overlay's own display:flex must not win over the [hidden] attribute
   -- without this override, the browser's default `[hidden]{display:none}`
   loses the cascade to this class's flex rule (equal specificity, author
   rule wins), so the overlay would show permanently regardless of the
   `hidden` attribute JS toggles. */
.modal-overlay[hidden] { display: none; }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}
.modal-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  max-width: 440px;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--muted);
}
.modal-footnote { font-size: 0.85rem; color: var(--muted); }
