/* ============ Base ============ */
:root {
  --blue: #005ea2;
  --blue-dark: #0b4778;
  --blue-light: #e8f1f8;
  --navy: #1b2a3d;
  --green: #12a150;
  --green-dark: #0d8442;
  --text: #22304a;
  --text-muted: #58657a;
  --border: #c9d1de;
  --border-light: #dfe5ee;
  --bg: #f2f5f9;
  --white: #ffffff;
  --radius: 6px;
  --shadow: 0 1px 4px rgba(20, 35, 60, 0.1);
  --font-body: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Merriweather', Georgia, 'Times New Roman', serif;
}

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

html { scroll-behavior: smooth; }

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

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

img, svg { display: block; }

a { color: var(--blue); }

/* ============ Status pill ============ */
.status-pill {
  display: flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  margin: 0 auto 16px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--green-dark);
  background: #eaf7ef;
  border: 1px solid #b5dfc5;
  padding: 6px 14px;
  border-radius: 4px;
  white-space: nowrap;
}
.status-pill strong { letter-spacing: 0.06em; }

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #17b45a;
  position: relative;
  flex-shrink: 0;
}
.pulse-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(23, 180, 90, 0.55);
  animation: pulse 1.6s ease-out infinite;
}

@keyframes pulse {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* ============ Header (legal pages) ============ */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border-light);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark { width: 28px; height: 28px; }
.logo-text { font-weight: 800; font-size: 1.1rem; color: var(--navy); letter-spacing: -0.01em; }
.logo-accent { color: var(--blue); }

.header-badge { display: none; }

/* ============ Steps (funnel screens) ============ */
.step { display: none; }
.step.active { display: block; animation: fadeIn 0.3s ease; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ============ Quiz ============ */
main {
  min-height: calc(100vh - 80px);
}

.quiz-container { max-width: 640px; padding-top: 20px; padding-bottom: 160px; }

.quiz-title {
  font-size: clamp(1.65rem, 6.4vw, 2.3rem);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.025em;
  color: var(--navy);
  text-align: center;
  max-width: 620px;
  margin: 12px auto 28px;
}

#geo-headline-prefix { color: var(--blue); }

.quiz-progress { margin-bottom: 16px; }

.quiz-progress-labels {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 7px;
}

.progress-steps {
  display: flex;
  gap: 6px;
}

.progress-seg {
  flex: 1;
  height: 6px;
  background: var(--border-light);
  border-radius: 2px;
  transition: background 0.3s ease;
}
.progress-seg.filled { background: var(--blue); }

.quiz-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 4px solid var(--blue);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 22px 16px;
  overflow: hidden;
}

/* card motion */
.quiz-card.slide-in-right { animation: slideInRight 0.28s ease both; }
.quiz-card.slide-in-left { animation: slideInLeft 0.28s ease both; }
.quiz-card.slide-out-left { animation: slideOutLeft 0.22s ease both; }

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(36px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-36px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slideOutLeft {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(-36px); }
}

.quiz-question {
  font-size: clamp(1.4rem, 4.8vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--navy);
  line-height: 1.28;
  text-align: center;
  margin-bottom: 8px;
}

.quiz-hint {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 18px;
}

.quiz-options { display: flex; flex-direction: column; gap: 10px; }

.quiz-option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 68px;
  font-family: inherit;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text);
  text-align: left;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 13px 16px;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease, transform 0.1s ease;
}

.quiz-option:hover { border-color: var(--blue); background: var(--blue-light); }
.quiz-option:active { transform: scale(0.985); }

.opt-chip {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.opt-chip::before {
  /* glossy top-light so the chips feel dimensional */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0) 48%);
}
.opt-chip svg { width: 25px; height: 25px; position: relative; }

.chip-blue {
  background: linear-gradient(140deg, #3d8ed4 0%, #0b5cad 100%);
  box-shadow: 0 3px 9px rgba(11, 92, 173, 0.32);
}
.chip-green {
  background: linear-gradient(140deg, #34c37a 0%, #0d8442 100%);
  box-shadow: 0 3px 9px rgba(13, 132, 66, 0.32);
}
.chip-amber {
  background: linear-gradient(140deg, #f2ab3c 0%, #cf7d12 100%);
  box-shadow: 0 3px 9px rgba(207, 125, 18, 0.32);
}

.opt-label { flex: 1; }

.opt-radio {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid #97a3b4;
  background: var(--white);
  position: relative;
  transition: border-color 0.12s ease;
}

.quiz-option:hover .opt-radio { border-color: var(--blue); }

.quiz-option.selected {
  border-color: var(--blue);
  background: var(--blue-light);
}
.quiz-option.selected .opt-radio { border-color: var(--blue); }
.quiz-option.selected .opt-radio::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--blue);
  animation: radioFill 0.18s ease both;
}

@keyframes radioFill {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

.quiz-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 13px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--blue);
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px 4px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.quiz-back:hover { color: var(--blue-dark); }
.quiz-back svg { width: 15px; height: 15px; }
.quiz-back.hidden { display: none; }

.quiz-secure {
  margin: 15px auto 0;
  padding: 0 16px;
  width: 100%;
  box-sizing: border-box;
  font-size: 0.76rem;
  color: #75818f;
  text-align: center;
  line-height: 1.45;
}

.quiz-secure-icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  vertical-align: -2px;
  margin-right: 5px;
}

/* ============ In-card loading ============ */
.quiz-card.is-loading { padding: 36px 24px 32px; }

.loading-panel {
  text-align: center;
  animation: fadeIn 0.28s ease;
}

.loading-panel[hidden] { display: none !important; }
.quiz-panel[hidden] { display: none !important; }

.loading-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 16px;
}
.loading-icon svg {
  width: 54px;
  height: 54px;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--navy);
  margin-bottom: 6px;
}

.loading-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 22px;
}

.load-track {
  height: 12px;
  background: var(--border-light);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 12px;
}

.load-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #0b5cad, #3d8ed4);
  border-radius: 3px;
  transition: width 0.05s linear;
}

.load-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
}

.load-status { font-size: 0.88rem; font-weight: 600; color: var(--text); }
.load-pct { font-size: 0.88rem; font-weight: 700; color: var(--blue); font-variant-numeric: tabular-nums; }

/* ============ Result / Call Outcome ============ */
.result-container { max-width: 560px; padding-top: 24px; padding-bottom: 60px; }

.result-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 6px 28px rgba(20, 35, 60, 0.12);
  overflow: hidden;
}

.result-hero {
  padding: 30px 24px 26px;
  text-align: center;
  background: linear-gradient(180deg, #f4faf6 0%, var(--white) 55%);
}

.result-pill {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--green-dark);
  border: 1.5px solid #a8d9bc;
  background: var(--white);
  padding: 7px 18px;
  border-radius: 100px;
  margin-bottom: 16px;
}

.result-big {
  font-size: clamp(2.1rem, 8vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--navy);
  line-height: 1.1;
  margin-bottom: 8px;
}

.result-callsub {
  font-size: clamp(1rem, 3.2vw, 1.15rem);
  font-weight: 800;
  color: var(--blue);
  margin-bottom: 12px;
}

.result-sub {
  font-size: 0.93rem;
  color: var(--text-muted);
  max-width: 400px;
  margin: 0 auto 22px;
}

.call-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 400px;
  background: #3fe088;
  color: #0d2b1c;
  font-size: clamp(1.5rem, 6.4vw, 1.85rem);
  font-weight: 800;
  letter-spacing: 0.01em;
  text-decoration: none;
  padding: 18px 28px;
  border-radius: 100px;
  box-shadow: 0 10px 30px rgba(23, 180, 90, 0.45);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.call-pill:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(23, 180, 90, 0.55); }
.call-pill svg { width: 26px; height: 26px; flex-shrink: 0; }

.result-urgent {
  margin-top: 18px;
  font-size: 0.88rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--navy);
}

.result-geo {
  margin-top: 7px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--green-dark);
}

.result-refrow {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 30px;
  margin-top: 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.result-refrow strong { color: var(--text); font-weight: 700; }
.result-refrow .lines-open { color: var(--green-dark); }

/* What happens next */
.result-next {
  background: var(--bg);
  border-top: 1px solid var(--border-light);
  padding: 22px 20px 22px;
}

.result-next-title {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 14px;
}

.next-step {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 13px 15px;
  margin-bottom: 9px;
}

.next-num {
  width: 27px;
  height: 27px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.next-text { display: flex; flex-direction: column; gap: 1px; }
.next-text strong { font-size: 0.95rem; font-weight: 800; color: var(--navy); }
.next-text span { font-size: 0.85rem; color: var(--text-muted); line-height: 1.45; }

.result-disclaimer {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
  font-size: 0.75rem;
  color: #75818f;
  line-height: 1.55;
}

/* ============ Footer ============ */
.site-footer {
  background: var(--navy);
  color: #b9c3d6;
  padding: 40px 0 30px;
  margin-top: 80px;
}

.footer-brand { margin-bottom: 16px; }
.logo-text-footer { color: #fff; }
.logo-text-footer .logo-accent { color: #7fb1dd; }

.footer-disclaimer {
  font-size: 0.78rem;
  line-height: 1.65;
  color: #9aa7bd;
  max-width: 860px;
  margin-bottom: 22px;
}
.footer-disclaimer a { color: #9cc3e8; }

.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 16px; }
.footer-links a { color: #d4ddeb; font-size: 0.85rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.footer-address { font-size: 0.8rem; color: #9aa7bd; margin-bottom: 6px; }
.footer-copy { font-size: 0.78rem; color: #7484a0; }

/* ============ Legal pages ============ */
.legal-page { max-width: 800px; padding-top: 40px; padding-bottom: 64px; }
.legal-page h1 { font-family: var(--font-serif); font-size: 1.8rem; color: var(--navy); margin-bottom: 6px; }
.legal-updated { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 30px; }
.legal-page h2 { font-family: var(--font-serif); font-size: 1.15rem; font-weight: 700; color: var(--navy); margin: 28px 0 10px; }
.legal-page p, .legal-page li { font-size: 0.95rem; color: var(--text); margin-bottom: 12px; }
.legal-page ul { padding-left: 22px; margin-bottom: 14px; }

/* ============ Responsive ============ */
@media (max-width: 640px) {
  .quiz-container { padding-top: 16px; padding-bottom: 180px; }
  .quiz-card { padding: 18px 14px 14px; }
  .quiz-card.is-loading { padding: 32px 18px 28px; }
  .quiz-option { padding: 11px 13px; font-size: 0.98rem; min-height: 64px; }
  .quiz-progress { margin-bottom: 14px; }
  .quiz-title { margin: 10px auto 24px; font-size: 1.55rem; }
  .quiz-question { font-size: 1.38rem; }
  .status-pill { margin-bottom: 14px; }
  .result-hero { padding: 26px 18px 22px; }
  .result-next { padding: 18px 14px; }
  .result-container { padding-bottom: 80px; }
  .site-footer { margin-top: 100px; }
}
