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

:root {
  --deep: #033b4a;
  --primary: #005a87;
  --accent: #1f57c3;
  --gold: #d97706;
  --text: #141C1F;
  --muted: #6b7a82;
  --bg-page-1: #eef4f9;
  --bg-page-2: #d9e6f1;
  --card: #ffffff;
  --border: #dde3e8;
  --success: #065f46;
  --success-bg: #d1fae5;
  --warn: #92400e;
  --warn-bg: #fef3c7;
  --danger: #991b1b;
  --danger-bg: #fee2e2;
  --shadow-sm: 0 1px 3px rgba(3, 59, 74, .08);
  --shadow-md: 0 8px 24px rgba(3, 59, 74, .10), 0 2px 6px rgba(3, 59, 74, .06);
  --shadow-lg: 0 20px 48px rgba(3, 59, 74, .14), 0 6px 14px rgba(3, 59, 74, .08);
}

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

html, body { min-height: 100vh; }

body {
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(circle at top right, rgba(31, 87, 195, .18), transparent 55%),
    radial-gradient(circle at bottom left, rgba(217, 119, 6, .08), transparent 50%),
    linear-gradient(180deg, #033b4a 0%, #062835 100%);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
}

header {
  background: transparent;
  padding: 22px 24px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo { height: 44px; }

main {
  max-width: 540px;
  margin: 0 auto;
  padding: 18px 18px 80px;
}

/* ── Card ──────────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--deep) 0%, var(--primary) 50%, var(--accent) 100%);
}

/* ── Intro ─────────────────────────────────────────────────────── */
.intro {
  text-align: center;
  padding: 16px 0 4px;
}
.intro-card {
  background: var(--card);
  border-radius: 18px;
  padding: 36px 28px 32px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.intro-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: linear-gradient(90deg, var(--deep) 0%, var(--primary) 50%, var(--accent) 100%);
}
.intro-icon {
  width: 68px; height: 68px; margin: 0 auto 14px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(31, 87, 195, .35);
}
.intro-icon svg { width: 36px; height: 36px; }
.intro h1 {
  font-size: 1.7rem; font-weight: 800; color: var(--deep);
  line-height: 1.2; margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.intro p { font-size: 1.02rem; color: var(--muted); margin-bottom: 22px; max-width: 440px; margin-left: auto; margin-right: auto; }
.intro .details {
  display: flex; gap: 18px; justify-content: center; margin-bottom: 28px;
  font-size: .85rem; color: var(--muted);
  flex-wrap: wrap;
}
.intro .details span {
  background: var(--bg-page-1);
  padding: 6px 12px;
  border-radius: 999px;
  display: inline-flex; align-items: center; gap: 6px;
}
.intro .details span::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--primary);
}

/* ── Progress ──────────────────────────────────────────────────── */
.progress-wrap { margin-bottom: 22px; }
.progress-bar { height: 8px; background: rgba(3, 59, 74, .08); border-radius: 99px; overflow: hidden; }
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 99px;
  transition: width .35s cubic-bezier(.4,0,.2,1);
}
.progress-label {
  font-size: .82rem; color: var(--muted); margin-top: 8px;
  text-align: right; letter-spacing: .02em; font-weight: 500;
}

/* ── Question ──────────────────────────────────────────────────── */
.question h2 {
  font-size: 1.28rem; font-weight: 700; color: var(--deep);
  margin-bottom: 22px; line-height: 1.35;
  display: flex; align-items: flex-start; gap: 12px;
}
.q-icon {
  flex-shrink: 0;
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 10px rgba(31, 87, 195, .25);
  margin-top: 2px;
}
.q-icon svg { width: 20px; height: 20px; color: #fff; }

.options { display: flex; flex-direction: column; gap: 10px; }
.opt {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .1s;
  font-size: 1rem;
  background: var(--card);
}
.opt:hover { border-color: var(--primary); background: #f0f7fb; transform: translateY(-1px); }
.opt.selected { border-color: var(--primary); background: linear-gradient(180deg, #e8f2f8, #dce9f2); box-shadow: 0 4px 12px rgba(0, 90, 135, .12); }
.opt .check {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: border-color .15s, background .15s;
}
.opt.selected .check { border-color: var(--primary); background: var(--primary); }
.opt.selected .check::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.opt.multi .check { border-radius: 4px; }
.opt.multi.selected .check { border-radius: 4px; }
.opt.multi.selected .check::after {
  content: ''; width: 12px; height: 12px; border-radius: 2px; background: #fff;
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}

/* ── Buttons ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px;
  border: none; border-radius: 10px;
  font: inherit; font-weight: 600; font-size: 1rem;
  cursor: pointer;
  transition: transform .1s, box-shadow .15s, background .15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:active { transform: scale(.98); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  box-shadow: 0 4px 12px rgba(31, 87, 195, .3);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--deep), var(--primary));
  box-shadow: 0 6px 18px rgba(31, 87, 195, .4);
}
.btn-primary:disabled {
  background: #c4ced4; box-shadow: none; cursor: not-allowed;
}
.btn-secondary {
  background: var(--card);
  color: var(--deep);
  border: 2px solid var(--border);
}
.btn-secondary:hover { border-color: var(--primary); background: #f0f7fb; }
.btn-large { padding: 16px 32px; font-size: 1.05rem; border-radius: 12px; font-weight: 700; }
.btn-block { width: 100%; }

.nav-row { display: flex; justify-content: space-between; margin-top: 26px; gap: 12px; }
.nav-row .btn { padding: 12px 22px; }

/* ── Result page ───────────────────────────────────────────────── */
.result-hero {
  text-align: center;
  padding: 4px 0 18px;
}
.result-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 700; font-size: .92rem;
  margin-bottom: 18px;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.result-badge.outcome-yes { background: var(--success-bg); color: var(--success); }
.result-badge.outcome-not_yet { background: var(--warn-bg); color: var(--warn); }
.result-badge.outcome-depends { background: #e0f2fe; color: var(--primary); }
.result-badge svg { width: 16px; height: 16px; }

.result-hero h1 {
  font-size: 1.55rem; font-weight: 800; color: var(--deep);
  line-height: 1.25; margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.result-explanation { color: var(--text); font-size: 1rem; line-height: 1.7; }
.result-explanation p { margin-bottom: 14px; }
.result-explanation p:last-child { margin-bottom: 0; }

.addendum {
  margin-top: 18px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #fff8e7, var(--warn-bg));
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  font-size: .94rem;
  color: var(--text);
  line-height: 1.55;
}

.reasons-card { margin-top: 16px; background: linear-gradient(180deg, var(--card) 0%, #f5f9fc 100%); }
.reasons-card h3 {
  font-size: 1rem; font-weight: 700; color: var(--deep);
  margin-bottom: 10px; letter-spacing: .01em;
  display: flex; align-items: center; gap: 8px;
}
.reasons-card h3::before {
  content: ''; width: 6px; height: 18px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 3px; display: inline-block;
}
.reasons-list { list-style: none; padding: 0; margin: 0; }
.reasons-list li {
  position: relative; padding: 8px 0 8px 22px;
  font-size: .94rem; line-height: 1.55; color: var(--text);
  border-bottom: 1px solid var(--border);
}
.reasons-list li:last-child { border-bottom: none; }
.reasons-list li::before {
  content: ''; position: absolute; left: 4px; top: 15px;
  width: 8px; height: 8px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.cta-card {
  display: flex; flex-direction: column; gap: 12px;
  margin-top: 16px;
}
.cta-hint {
  font-size: .82rem; color: var(--muted);
  text-align: center; margin-top: -2px; font-style: italic;
}
.secondary-ctas {
  display: flex; flex-direction: column; gap: 10px; margin-top: 6px;
}

/* "While you're here, worth a read" — contextual content cards */
.learn-section {
  margin-top: 22px;
}
.learn-section > h3 {
  font-size: .82rem; font-weight: 700;
  color: var(--muted); text-transform: uppercase;
  letter-spacing: .08em; margin-bottom: 12px;
  padding-left: 4px;
}
.learn-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  text-decoration: none;
  color: var(--text);
  margin-bottom: 10px;
  transition: border-color .15s, background .15s, transform .1s, box-shadow .15s;
}
.learn-card:hover {
  border-color: var(--primary);
  background: linear-gradient(180deg, #ffffff, #f5f9fc);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(31, 87, 195, .12);
}
.learn-card:active { transform: scale(.99); }
.learn-card-body { flex: 1; min-width: 0; }
.learn-card-title {
  font-weight: 700; font-size: 1rem; color: var(--deep);
  line-height: 1.3; margin-bottom: 4px;
}
.learn-card-blurb {
  font-size: .9rem; line-height: 1.5; color: var(--muted);
}
.learn-card-arrow {
  font-size: 1.4rem; color: var(--primary);
  font-weight: 700; flex-shrink: 0;
  transition: transform .15s;
}
.learn-card:hover .learn-card-arrow { transform: translateX(3px); }

/* ── Optional capture form ────────────────────────────────────── */
.optional-capture { margin-top: 18px; background: linear-gradient(180deg, var(--card) 0%, #fafcfd 100%); }
.optional-capture h2 { font-size: 1.1rem; font-weight: 700; color: var(--deep); margin-bottom: 6px; }
.optional-capture p { color: var(--muted); font-size: .92rem; margin-bottom: 16px; }
.optional-skip {
  font-size: .8rem; color: var(--muted);
  text-align: center; margin-top: 10px; font-style: italic;
}

/* ── Forms ─────────────────────────────────────────────────────── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: .82rem; font-weight: 600; color: var(--deep); margin-bottom: 5px; letter-spacing: .01em; }
.field input {
  width: 100%; padding: 11px 13px;
  border: 1.5px solid var(--border); border-radius: 9px;
  font: inherit; font-size: .97rem;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(31, 87, 195, .15); }
.consent {
  display: flex; gap: 10px; align-items: flex-start;
  margin-top: 14px; font-size: .85rem; color: var(--muted);
}
.consent input { margin-top: 3px; flex-shrink: 0; }
.consent a { color: var(--accent); }

/* ── Layout A — Two-Column Result Page ────────────────────────── */

body.result-page main {
  max-width: 1200px;
}

.result-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.result-left {
  min-width: 0;
}

.result-right {
  position: sticky;
  top: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Outcome banner — big colored block */
.outcome-banner {
  padding: 32px 36px;
  border-radius: 16px;
  color: #fff;
  margin-bottom: 16px;
  box-shadow: var(--shadow-md);
}
.outcome-banner.outcome-yes {
  background: linear-gradient(135deg, #10b981, #047857);
}
.outcome-banner.outcome-not_yet {
  background: linear-gradient(135deg, #d97706, #b45309);
}
.outcome-banner.outcome-depends {
  background: linear-gradient(135deg, var(--accent), var(--primary));
}
.outcome-banner .outcome-banner-label {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 12px;
  opacity: .9;
}
.outcome-banner h1 {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
  color: #fff;
}
.outcome-banner .outcome-banner-summary {
  font-size: 1rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, .92);
}
.outcome-banner .outcome-banner-summary p { margin-bottom: 8px; }
.outcome-banner .outcome-banner-summary p:last-child { margin-bottom: 0; }

/* Right-column CTA hero card */
.cta-hero {
  background: linear-gradient(135deg, var(--deep), #062835);
  color: #fff;
  padding: 26px 22px;
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
}
.cta-hero-heading {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: #fff;
  letter-spacing: -0.01em;
}
.cta-hero-text {
  color: rgba(255, 255, 255, .82);
  font-size: .94rem;
  line-height: 1.55;
  margin-bottom: 20px;
}
.cta-hero .btn-cta {
  display: block;
  text-align: center;
  background: var(--gold);
  color: #fff;
  padding: 14px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: background .15s, transform .1s, box-shadow .15s;
  margin-bottom: 18px;
  box-shadow: 0 4px 12px rgba(217, 119, 6, .25);
}
.cta-hero .btn-cta:hover {
  background: #b45309;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(217, 119, 6, .35);
}
.cta-hero-divider {
  border-top: 1px solid rgba(255, 255, 255, .15);
  padding-top: 16px;
  text-align: center;
}
.cta-hero-divider-label {
  font-size: .78rem;
  color: rgba(255, 255, 255, .55);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.cta-hero-phone {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 4px;
}
.cta-hero-phone a {
  color: #fff;
  text-decoration: none;
}
.cta-hero-phone a:hover {
  color: rgba(255, 255, 255, .85);
}
.cta-hero-hours {
  font-size: .8rem;
  color: rgba(255, 255, 255, .55);
}

/* Result-left content tweaks */
.result-left .card { margin-bottom: 16px; }
.result-left .card:last-child { margin-bottom: 0; }

/* Compliance addendum standalone (no longer inside main card) */
.result-left .addendum {
  margin-top: 0;
  margin-bottom: 16px;
}

/* Learn section as 3-column horizontal grid in layout A */
.result-layout .learn-section {
  margin-top: 22px;
}
.result-layout .learn-section > h3 {
  font-size: .82rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 12px;
  padding-left: 4px;
}
.learn-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.learn-cards-grid .learn-card {
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 0;
  padding: 18px 18px;
  height: 100%;
}
.learn-cards-grid .learn-card-body {
  flex: 1;
}
.learn-cards-grid .learn-card-title {
  font-size: .98rem;
  margin-bottom: 8px;
}
.learn-cards-grid .learn-card-blurb {
  font-size: .84rem;
  line-height: 1.45;
}
.learn-cards-grid .learn-card-arrow {
  align-self: flex-end;
  margin-top: 14px;
  font-size: 1.2rem;
}

/* Back-to-acs link bar at top of result page (sits on dark body bg) */
.result-back-bar {
  margin-bottom: 12px;
  padding-left: 4px;
}
.result-back-link {
  display: inline-block;
  font-size: .85rem;
  color: rgba(255, 255, 255, .72);
  text-decoration: none;
  font-weight: 600;
  transition: color .15s;
}
.result-back-link:hover { color: #ffffff; }

/* Footer actions at bottom of result-left (retake) */
.result-footer-actions {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.result-retake-link {
  display: inline-block;
  font-size: .9rem;
  color: var(--muted);
  text-decoration: none;
  font-style: italic;
  font-weight: 500;
  transition: color .15s;
}
.result-retake-link:hover { color: var(--primary); text-decoration: underline; }

/* "Email me my results" card in right column */
.email-me-card {
  padding: 22px 20px;
}
.email-me-card h3 {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--deep);
  margin-bottom: 6px;
}
.email-me-card p {
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: 14px;
  line-height: 1.5;
}
.email-me-card .field {
  margin-bottom: 10px;
}
.email-me-card input[type=email] {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font: inherit;
  font-size: .95rem;
  transition: border-color .15s, box-shadow .15s;
}
.email-me-card input[type=email]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(31, 87, 195, .15);
}
.btn-email-me {
  display: block;
  width: 100%;
  padding: 11px 16px;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font: inherit;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.btn-email-me:hover {
  background: var(--deep);
  transform: translateY(-1px);
}
.btn-email-me:disabled {
  background: var(--muted);
  cursor: not-allowed;
  transform: none;
}
.email-me-error {
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--danger-bg);
  color: var(--danger);
  border-radius: 8px;
  font-size: .85rem;
}

/* Right-column optional capture compact form */
.result-right .optional-capture {
  padding: 22px 20px;
}
.result-right .optional-capture h2 { font-size: 1.05rem; }
.result-right .optional-capture p { font-size: .88rem; margin-bottom: 14px; }
.result-right .form-grid { grid-template-columns: 1fr; gap: 10px; }

/* ── Tablet — switch learn cards to 1 column ──────────────────── */
@media (max-width: 900px) {
  body.result-page main { max-width: 540px; }
  .result-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .result-right {
    position: static;
    order: -1;  /* CTA card moves to TOP on mobile */
  }
  .learn-cards-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .learn-cards-grid .learn-card {
    flex-direction: row;
    align-items: center;
    padding: 14px 16px;
  }
  .learn-cards-grid .learn-card-arrow {
    align-self: center;
    margin-top: 0;
  }
  .outcome-banner { padding: 24px 22px; }
  .outcome-banner h1 { font-size: 1.35rem; }
}

/* ── Mobile ────────────────────────────────────────────────────── */
@media (max-width: 520px) {
  main { padding: 12px 14px 60px; }
  .form-grid { grid-template-columns: 1fr; }
  .intro h1 { font-size: 1.4rem; }
  .question h2 { font-size: 1.15rem; }
  .intro .details { flex-direction: column; gap: 8px; }
  .card, .intro-card { padding: 24px 20px; border-radius: 14px; }
}
