/* ==========================================================================
   Go lang! Insurance — Activation page styling
   Brand: vivid yellow-green (#BBE319) on soft off-white (#F7F7F5),
   near-black text (#1A1A1A), light gray secondary (#D1D5DB).
   Body font: Inter. Brand mark: Poppins italic.
   Mobile-first.
   ========================================================================== */

:root {
  --color-bg: #f7f7f5;          /* page background — soft off-white */
  --color-surface: #ffffff;     /* card surfaces */
  --color-border: #d1d5db;      /* secondary / borders */
  --color-text: #1a1a1a;        /* primary text — near black */
  --color-text-muted: #5a6372;  /* muted text for help/labels */
  --color-accent: #bbe319;      /* primary brand accent — vivid yellow-green */
  --color-accent-hover: #a6cb16;
  --color-accent-soft: #eff8c8; /* light tint of accent for highlights */
  --color-on-accent: #1a1a1a;   /* text on top of accent (must contrast) */
  --color-error: #b3261e;
  --color-success: #2e7d57;
  --radius: 12px;
  --radius-pill: 999px;
  --shadow: 0 2px 12px rgba(26, 26, 26, 0.06);
  --max-width: 560px;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-brand: "Poppins", var(--font-sans);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ---------------- Header ---------------- */
.site-header {
  background: var(--color-text);
  color: var(--color-bg);
  padding: 18px 20px;
}
.brand {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.brand-name {
  font-family: var(--font-brand);
  font-style: italic;
  font-weight: 800;
  font-size: 28px;
  color: var(--color-accent);
  letter-spacing: -0.5px;
}
.brand-tag {
  font-family: var(--font-brand);
  font-style: italic;
  font-weight: 700;
  font-size: 13px;
  color: var(--color-accent);
  letter-spacing: 4px;
  margin-top: 2px;
}

/* ---------------- Layout ---------------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 16px 60px;
}

/* ---------------- Hero ---------------- */
.hero h1 {
  font-size: 26px;
  font-weight: 700;
  margin: 4px 0 10px;
  letter-spacing: -0.3px;
}
.lede {
  color: var(--color-text-muted);
  margin: 0 0 20px;
  font-size: 15px;
}
.code-banner {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.code-banner .label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--color-text-muted);
  font-weight: 600;
}
.code-banner .code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
}

/* ---------------- Form ---------------- */
.form {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
fieldset {
  border: none;
  padding: 0;
  margin: 0 0 20px;
}
fieldset + fieldset {
  border-top: 1px solid var(--color-border);
  padding-top: 20px;
}
legend {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding: 0;
  margin-bottom: 12px;
}
.fieldset-intro {
  font-size: 14px;
  color: var(--color-text-muted);
  margin: 0 0 14px;
}

.field {
  display: block;
  margin-bottom: 14px;
}
.field > span {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
}
.field em {
  color: var(--color-error);
  font-style: normal;
}
.field-help {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--color-text-muted);
}
.field-question {
  font-size: 14px;
  font-weight: 500;
  margin: 0 0 12px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 16px; /* ≥16px prevents iOS zoom on focus */
  padding: 12px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-text);
  min-height: 44px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field textarea { resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-soft);
}
.field input:invalid:not(:placeholder-shown) {
  border-color: var(--color-error);
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 420px) {
  .row { grid-template-columns: 1fr; gap: 0; }
}

/* ---------------- Radio group ---------------- */
.radio-group {
  border: none;
  padding: 0;
  margin: 0;
}
.radio {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 15px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.radio:hover { border-color: var(--color-text-muted); }
.radio input[type="radio"] {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  accent-color: var(--color-accent);
  cursor: pointer;
}
.radio input[type="radio"]:checked + span { font-weight: 600; }

/* ---------------- Checkbox ---------------- */
.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 14px;
  cursor: pointer;
}
.checkbox input[type="checkbox"] {
  margin-top: 3px;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  accent-color: var(--color-accent);
}

/* ---------------- Policy start banner ---------------- */
.policy-start-banner {
  background: var(--color-accent-soft);
  border: 1px solid var(--color-accent);
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.policy-start-banner .label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--color-text-muted);
  font-weight: 600;
}
.policy-start-banner .value {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-text);
}

/* ---------------- Exclusion warning ---------------- */
.exclusion-warning {
  background: #fff4f3;
  border: 1px solid var(--color-error);
  border-radius: 8px;
  padding: 14px 16px;
  margin-top: 12px;
  color: var(--color-error);
  font-size: 14px;
}
.exclusion-warning strong { display: block; margin-bottom: 4px; }
.exclusion-warning p { margin: 0; color: var(--color-text); }

/* ---------------- Privacy notice ---------------- */
.privacy-box {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 12px 14px;
  max-height: 200px;
  overflow-y: auto;
  font-size: 13.5px;
  color: var(--color-text-muted);
  margin-bottom: 14px;
}
.privacy-box p { margin: 0 0 8px; }
.privacy-box p:last-child { margin-bottom: 0; }
.privacy-box:focus { outline: 2px solid var(--color-accent); }

/* ---------------- Buttons ---------------- */
.btn-primary {
  width: 100%;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  color: var(--color-on-accent);
  background: var(--color-accent);
  border: none;
  border-radius: var(--radius-pill);
  padding: 14px 18px;
  min-height: 50px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
  letter-spacing: 0.2px;
}
.btn-primary:hover { background: var(--color-accent-hover); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }

/* ---------------- Error ---------------- */
.error {
  color: var(--color-error);
  font-size: 14px;
  margin-top: 12px;
  margin-bottom: 0;
}

/* ---------------- Confirmation page ---------------- */
.confirmation { text-align: center; padding-top: 20px; }
.check-mark {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-on-accent);
  font-size: 40px;
  line-height: 72px;
  margin: 0 auto 14px;
  font-weight: 700;
}
.confirmation h1 {
  font-size: 28px;
  margin: 0 0 8px;
  letter-spacing: -0.3px;
}
.summary-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin: 18px 0;
  text-align: left;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  gap: 12px;
}
.summary-row + .summary-row { border-top: 1px solid var(--color-border); }
.summary-row .label {
  color: var(--color-text-muted);
  font-size: 14px;
}
.summary-row .value {
  font-weight: 600;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  text-align: right;
}
.next-steps { text-align: left; margin-top: 24px; }
.next-steps h2 { font-size: 16px; margin: 0 0 10px; }
.next-steps ul { padding-left: 20px; margin: 0; color: var(--color-text-muted); }
.next-steps li { margin-bottom: 6px; }

/* ---------------- Footer ---------------- */
.site-footer {
  text-align: center;
  padding: 24px 16px 40px;
  color: var(--color-text-muted);
  font-size: 13px;
}
.site-footer p { margin: 4px 0; }
.site-footer .small { font-size: 12px; }

/* ---------------- Utilities ---------------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
