/* ==========================================================================
   QuoteAmerica — global stylesheet
   Brand: white / blue #113491 / red #ba0422. Light theme only.
   Headings: Inter. Paragraphs: Merriweather.
   ========================================================================== */

/* --- Self-hosted variable fonts (latin subset) --- */
@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/Inter.c940764593.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Merriweather';
  src: url('/assets/fonts/Merriweather.af1be39e2f.woff2') format('woff2');
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --blue: #113491;
  --blue-dark: #0c2569;
  --blue-light: #e8edf8;
  --blue-tint: #f4f6fc;
  --red: #ba0422;
  --red-dark: #94031b;
  --red-tint: #fdf2f4;
  --white: #ffffff;

  --ink: #14181f;
  --ink-soft: #414a58;
  --ink-muted: #6a7382;
  --line: #dfe3ea;
  --line-soft: #eef1f5;
  --bg-alt: #f7f8fb;

  --font-head: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  /* Proxima Nova is a licensed font; if you license it, it will be used first. */
  --font-body: 'Proxima Nova', 'Merriweather', Georgia, 'Times New Roman', serif;
  --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --wrap: 1180px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(20, 24, 31, 0.06), 0 1px 3px rgba(20, 24, 31, 0.05);
  --shadow: 0 4px 6px -1px rgba(20, 24, 31, 0.07), 0 2px 4px -2px rgba(20, 24, 31, 0.05);
  --shadow-lg: 0 12px 28px -8px rgba(17, 52, 145, 0.18), 0 4px 10px -4px rgba(20, 24, 31, 0.08);

  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  color: var(--blue);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.18;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 5.2vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.35rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); font-weight: 700; }
h4 { font-size: 1.1rem; font-weight: 700; }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--red); }

img { max-width: 100%; height: auto; display: block; }
ul, ol { padding-left: 1.35em; }
li { margin-bottom: .45em; }
strong, b { font-weight: 700; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 780px; }
.center { text-align: center; }
.eyebrow {
  font-family: var(--font-ui);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: .75rem;
}
.lede { font-size: 1.12rem; color: var(--ink-soft); }
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section--alt { background: var(--bg-alt); }
.section--tint { background: var(--blue-tint); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--blue); color: #fff; padding: 12px 20px;
  font-family: var(--font-ui); font-weight: 700; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* ============================== BUTTONS ==============================
   Every CTA is red #ba0422 with bold white text. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.2;
  padding: 17px 34px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background-color .16s ease, transform .12s ease, box-shadow .16s ease, color .16s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px); }

.btn--primary,
.btn--cta {
  background: var(--red);
  color: var(--white);
  box-shadow: var(--shadow);
}
.btn--primary:hover,
.btn--cta:hover { background: var(--red-dark); color: var(--white); box-shadow: var(--shadow-lg); }

.btn--ghost { background: transparent; color: var(--blue); border-color: var(--blue); }
.btn--ghost:hover { background: var(--blue); color: var(--white); }

.btn--white { background: var(--white); color: var(--blue); }
.btn--white:hover { background: var(--blue-light); color: var(--blue); }

.btn--lg { font-size: 1.12rem; padding: 20px 44px; }
.btn--block { display: flex; width: 100%; }
.btn[disabled], .btn[aria-disabled='true'] { opacity: .5; cursor: not-allowed; }

.btn-note {
  font-family: var(--font-ui);
  font-size: .82rem;
  color: var(--ink-muted);
  margin-top: .75rem;
}

/* ---- Click-to-call CTA: [phone icon] [number] [label] ---- */
.btn--call { gap: 9px; white-space: nowrap; }
.btn--call .call-icon { width: 1.05em; height: 1.05em; flex-shrink: 0; stroke-width: 2.1; }
.btn--call .call-num { font-weight: 800; letter-spacing: .01em; }
@media (max-width: 400px) { .btn--call { gap: 7px; } }

/* Lead-in above the chooser's call CTA. */
.call-prompt {
  font-family: var(--font-ui);
  font-size: .82rem; font-weight: 600; line-height: 1.4;
  color: var(--ink);
  text-align: center;
  margin: 14px 0 8px;
}


/* Requested 50px breathing room between the nav bar and the page content.
   Applied from tablet up. Phones are excluded on purpose: the hard rule is that
   100% of the quote card stays above the fold, and the tightest phone viewport
   (375x553 — an SE with Safari's chrome) has only ~16px of slack left, so 50px
   there would push the form below the fold. Verified by tools/fold.cjs. */
@media (min-width: 768px) {
  main { margin-top: 50px; }
}
/* Short screens (iPad landscape, 720p laptops) cannot spare the full 50px and
   still keep the last funnel step above the fold. */
@media (min-width: 768px) and (max-height: 800px) {
  main { margin-top: 24px; }
}
@media (min-width: 768px) and (max-height: 740px) {
  main { margin-top: 14px; }
}

/* ============================== HEADER / NAV ============================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.header-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: var(--header-h);
}
.logo { display: flex; align-items: center; flex-shrink: 0; }
.logo img { height: 38px; width: auto; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav-list { display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; list-style: none; }
/* The <li>s are grandchildren of .nav (inside .nav-list) — reset them directly,
   or the default disc markers render between the nav links. */
.nav-list > li, .nav-item { list-style: none; margin: 0; position: relative; }

.nav-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-ui); font-weight: 600; font-size: .95rem;
  color: var(--ink); text-decoration: none;
  padding: 10px 14px; border-radius: 8px;
  background: none; border: 0; cursor: pointer;
  white-space: nowrap;
}
.nav-link:hover, .nav-link[aria-expanded='true'] { background: var(--blue-tint); color: var(--blue); }
.nav-link[aria-current='page'] { color: var(--blue); }
.nav-link[aria-current='page']::after {
  content: ''; position: absolute; left: 14px; right: 14px; bottom: 4px;
  height: 2px; background: var(--red); border-radius: 2px;
}
.caret { width: 10px; height: 10px; transition: transform .18s ease; flex-shrink: 0; }
.nav-link[aria-expanded='true'] .caret { transform: rotate(180deg); }

.submenu {
  position: absolute; top: calc(100% + 6px); left: 0;
  min-width: 268px; margin: 0; padding: 8px;
  list-style: none;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.nav-item[data-open='true'] .submenu { opacity: 1; visibility: visible; transform: translateY(0); }
.submenu li { margin: 0; }
.submenu a {
  display: block; padding: 11px 14px; border-radius: 8px;
  font-family: var(--font-ui); font-size: .93rem; font-weight: 600;
  color: var(--ink); text-decoration: none;
}
.submenu a:hover { background: var(--blue-tint); color: var(--blue); }
.submenu a small {
  display: block; font-weight: 400; font-size: .8rem; color: var(--ink-muted);
  margin-top: 2px; line-height: 1.45;
}
.submenu a:hover small { color: var(--ink-soft); }

.header-cta { flex-shrink: 0; }
.header-cta .btn { padding: 13px 24px; font-size: .95rem; }

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  padding: 10px; margin-right: -10px; border-radius: 8px;
}
.nav-toggle span {
  display: block; width: 26px; height: 2.5px; background: var(--blue);
  border-radius: 2px; transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle span + span { margin-top: 6px; }
.nav-toggle[aria-expanded='true'] span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
.nav-toggle[aria-expanded='true'] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded='true'] span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }

@media (max-width: 1000px) {
  .nav-toggle { display: block; }
  /* Call CTA stays visible in the mobile nav bar. The full wordmark stays on
     the left, so the button is centered in the space BETWEEN the logo and the
     hamburger — a viewport-centered button would overlap the wordmark on a
     phone (at 320px it would need a ~14px-tall logo to clear it). */
  .header-bar { position: relative; }
  .header-cta {
    display: flex;
    flex: 1;
    justify-content: center;
    min-width: 0;
  }
  .header-cta .btn--call {
    padding: 15px 18px;
    font-size: 1rem;
    gap: 8px;
    box-shadow: none;
  }
  .nav {
    position: fixed; inset: var(--header-h) 0 0 0;
    background: var(--white);
    display: block; overflow-y: auto;
    padding: 12px 20px 48px;
    transform: translateX(100%);
    transition: transform .24s ease;
    border-top: 1px solid var(--line);
  }
  .nav[data-open='true'] { transform: translateX(0); }
  body.nav-open { overflow: hidden; }
  .nav-list { display: block; }
  .nav-item { border-bottom: 1px solid var(--line-soft); }
  .nav-link {
    width: 100%; justify-content: space-between;
    padding: 17px 4px; font-size: 1.05rem; border-radius: 0;
  }
  .nav-link[aria-current='page']::after { display: none; }
  .nav-link[aria-current='page'] { color: var(--red); }
  .submenu {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; border-radius: 0;
    padding: 0 0 10px 4px; min-width: 0;
    display: none;
  }
  .nav-item[data-open='true'] .submenu { display: block; }
  .submenu a { padding: 12px 14px; }
}

/* ============================== BREADCRUMBS ============================== */
.breadcrumbs { background: var(--bg-alt); border-bottom: 1px solid var(--line-soft); }
.breadcrumbs ol {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  list-style: none; margin: 0; padding: 13px 0;
  font-family: var(--font-ui); font-size: .82rem;
}
.breadcrumbs li { display: flex; align-items: center; gap: 6px; margin: 0; }
.breadcrumbs li + li::before {
  content: '›'; color: var(--ink-muted); font-size: 1.05rem; line-height: 1;
}
.breadcrumbs a { color: var(--ink-muted); text-decoration: none; font-weight: 600; }
.breadcrumbs a:hover { color: var(--red); text-decoration: underline; }
.breadcrumbs [aria-current='page'] { color: var(--blue); font-weight: 700; }

/* ============================== HERO ============================== */
.hero {
  background: linear-gradient(168deg, var(--blue-tint) 0%, var(--white) 62%);
  padding: clamp(2.5rem, 5vw, 4.25rem) 0 clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--line-soft);
}
.hero-grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}
.hero h1 { margin-bottom: .45em; }
.hero-sub { font-size: 1.15rem; color: var(--ink-soft); margin-bottom: 1.75rem; max-width: 34em; }
.hero-logo { margin-bottom: 1.5rem; }
.hero-logo img { height: 52px; width: auto; }

.hero--home { background: linear-gradient(168deg, var(--blue-tint) 0%, var(--white) 70%); }
.hero--home .hero-grid { align-items: start; }
.hero--center { text-align: center; }
.hero--center .hero-sub { margin-left: auto; margin-right: auto; }

.trust-row {
  display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center;
  font-family: var(--font-ui); font-size: .86rem; font-weight: 600; color: var(--ink-soft);
  margin-top: 1.5rem;
}
.trust-row span { display: inline-flex; align-items: center; gap: 7px; }
.trust-row svg { width: 17px; height: 17px; color: var(--blue); flex-shrink: 0; }
.hero--center .trust-row { justify-content: center; }

@media (max-width: 900px) {
  /* The quote form must be fully above the fold. It is the second grid child
     in source order (good for SEO — the <h1> still comes first in the DOM);
     visually it moves to the top on narrow screens. */
  .hero { padding: 14px 0 28px; }
  .hero-grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .hero-grid > *:last-child { order: -1; }
  .hero-sub { font-size: 1.02rem; }
  .hero-logo { margin-bottom: 1rem; }
  .hero-logo img { height: 40px; }
  .hero--center .hero-grid > *:last-child { order: 0; }
}

/* ============================== VERTICAL GRID ============================== */
.vgrid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.vcard {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.vcard:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--blue);
}
.vcard-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--blue-light); color: var(--blue);
  display: grid; place-items: center; flex-shrink: 0;
}
.vcard-icon svg { width: 26px; height: 26px; }
.vcard h3 { margin: 0; font-family: var(--font-head); color: var(--blue); font-size: 1.22rem; }
.vcard p { font-size: .95rem; color: var(--ink-soft); line-height: 1.65; margin: 0; flex-grow: 1; }
.vcard-link {
  font-family: var(--font-ui); font-weight: 700; font-size: .92rem; color: var(--red);
  display: inline-flex; align-items: center; gap: 6px;
}
.vcard:hover .vcard-link { gap: 10px; }
.vcard-link svg { width: 15px; height: 15px; transition: transform .16s ease; }

/* ============================== FEATURE / BENEFIT LIST ============================== */
.benefits { display: grid; gap: 26px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.benefit { display: flex; gap: 16px; align-items: flex-start; }
.benefit-check {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
  background: var(--red); color: var(--white);
  display: grid; place-items: center; margin-top: 3px;
}
.benefit-check svg { width: 16px; height: 16px; }
.benefit h3 { font-size: 1.06rem; margin: 0 0 .3em; color: var(--blue); font-weight: 700; }
.benefit p { font-size: .95rem; color: var(--ink-soft); margin: 0; line-height: 1.65; }

/* ============================== STEPS ============================== */
.steps { display: grid; gap: 30px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); counter-reset: step; }
.step { text-align: center; }
.step-num {
  width: 60px; height: 60px; margin: 0 auto 1rem;
  border-radius: 50%; background: var(--blue); color: var(--white);
  display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 800; font-size: 1.5rem;
}
.step h3 { font-size: 1.12rem; margin-bottom: .4em; }
.step p { font-size: .95rem; color: var(--ink-soft); margin: 0; }

/* ============================== FAQ ============================== */
.faq-list { max-width: 860px; margin: 0 auto; }
.faq {
  border-bottom: 1px solid var(--line);
  background: var(--white);
}
.faq:first-child { border-top: 1px solid var(--line); }
.faq summary {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
  padding: 22px 4px; cursor: pointer; list-style: none;
  font-family: var(--font-head); font-weight: 700; font-size: 1.06rem; color: var(--blue);
  line-height: 1.45;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--red); }
.faq-plus {
  flex-shrink: 0; width: 22px; height: 22px; position: relative; margin-top: 4px;
}
.faq-plus::before, .faq-plus::after {
  content: ''; position: absolute; background: var(--red); border-radius: 2px;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
}
.faq-plus::before { width: 14px; height: 2.5px; }
.faq-plus::after { width: 2.5px; height: 14px; transition: transform .2s ease, opacity .2s ease; }
.faq[open] .faq-plus::after { transform: translate(-50%, -50%) rotate(90deg); opacity: 0; }
.faq-answer { padding: 0 4px 24px; color: var(--ink-soft); font-size: 1rem; max-width: 74ch; }

/* ============================== QUOTE FORM ============================== */
.quote-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.quote-head { padding: 24px 28px 0; }
.quote-head h2 { font-size: 1.4rem; margin-bottom: .25em; }
.quote-head p { font-size: .92rem; color: var(--ink-muted); font-family: var(--font-ui); margin: 0; }

.progress { padding: 18px 28px 0; }
.progress-track { height: 6px; background: var(--line-soft); border-radius: 99px; overflow: hidden; }
.progress-fill {
  height: 100%; width: 0%; background: var(--red);
  border-radius: 99px; transition: width .3s ease;
}
.progress-label {
  font-family: var(--font-ui); font-size: .78rem; font-weight: 600;
  color: var(--ink-muted); margin-top: 8px;
  display: flex; justify-content: space-between;
}

.quote-body { padding: 22px 28px 28px; }
.qstep { display: none; }
.qstep[data-active='true'] { display: block; animation: qfade .22s ease; }
@keyframes qfade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.quote-card legend, .quote-card .qtitle {
  font-family: var(--font-head); font-weight: 800; color: var(--blue);
  font-size: 1.28rem; line-height: 1.3; margin-bottom: .35em; padding: 0;
  letter-spacing: -0.015em;
}
.qhelp { font-family: var(--font-ui); font-size: .86rem; color: var(--ink-muted); margin-bottom: 1.1rem; }
.quote-card fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }

.opts { display: grid; gap: 10px; margin: 1.15rem 0 0; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.opt label {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-ui); font-weight: 600; font-size: .98rem;
  cursor: pointer; background: var(--white);
  transition: border-color .14s ease, background-color .14s ease, box-shadow .14s ease;
  min-height: 58px;
}
.opt label::before {
  content: ''; flex-shrink: 0; width: 21px; height: 21px;
  border: 2px solid var(--line); border-radius: 50%;
  transition: border-color .14s ease, box-shadow .14s ease;
}
.opt label:hover { border-color: var(--blue); background: var(--blue-tint); }
.opt input:checked + label { border-color: var(--red); background: var(--red-tint); }
.opt input:checked + label::before {
  border-color: var(--red); box-shadow: inset 0 0 0 5px var(--red);
}
.opt input:focus-visible + label { outline: 3px solid var(--red); outline-offset: 2px; }

/* Homepage category chooser — 2-up tiles, no radio dot, red on select. */
.opts--grid { grid-template-columns: 1fr 1fr; gap: 10px; }
.opts--grid .opt label {
  flex-direction: column; justify-content: center; align-items: center;
  text-align: center; gap: 7px; min-height: 84px; padding: 12px 8px;
  font-size: .9rem; line-height: 1.25;
}
.opts--grid .opt label::before { display: none; }
.opts--grid .opt label svg { width: 24px; height: 24px; color: var(--blue); flex-shrink: 0; }
.opts--grid .opt input:checked + label svg { color: var(--red); }
/* A trailing odd tile spans both columns; with an even count nothing spans. */
.opts--grid .opt:last-child:nth-child(odd) { grid-column: 1 / -1; }
.opts--grid .opt:last-child:nth-child(odd) label { flex-direction: row; gap: 10px; min-height: 56px; }
.chooser-form noscript ul { margin: 1rem 0 0; font-family: var(--font-ui); font-size: .9rem; }

.field { margin-bottom: 16px; }
.field label, .field .flabel {
  display: block; font-family: var(--font-ui); font-weight: 600; font-size: .88rem;
  color: var(--ink); margin-bottom: 6px;
}
.field input, .field select, .field textarea {
  width: 100%; padding: 15px 16px;
  font-family: var(--font-ui); font-size: 1rem; color: var(--ink);
  background: var(--white);
  border: 2px solid var(--line); border-radius: var(--radius);
  transition: border-color .14s ease;
  -webkit-appearance: none; appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%236a7382' stroke-width='2'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; background-size: 12px;
  padding-right: 42px;
}
.field textarea { min-height: 140px; resize: vertical; font-family: var(--font-ui); line-height: 1.6; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--blue);
}
.field input[aria-invalid='true'], .field select[aria-invalid='true'], .field textarea[aria-invalid='true'] {
  border-color: var(--red); background: var(--red-tint);
}
.field-error {
  display: none; font-family: var(--font-ui); font-size: .8rem; font-weight: 600;
  color: var(--red); margin-top: 5px;
}
.field-error[data-show='true'] { display: block; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; gap: 0; } }

.consent {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--bg-alt); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; margin: 18px 0;
}
.consent input[type='checkbox'] {
  flex-shrink: 0; width: 22px; height: 22px; margin: 2px 0 0;
  accent-color: var(--red); cursor: pointer;
}
.consent label {
  font-family: var(--font-ui); font-size: .76rem; line-height: 1.6; color: var(--ink-soft);
  cursor: pointer;
}
.consent a { color: var(--blue); font-weight: 600; }
.consent[data-invalid='true'] { border-color: var(--red); background: var(--red-tint); }

.qnav { display: flex; gap: 12px; align-items: center; margin-top: 22px; }
/* Chooser: the call CTA replaces Continue and spans the full card width. */
.qnav--call { display: block; }
.qnav--call .btn--call { width: 100%; }
.qnav .btn--primary { flex: 1; }
.qback {
  background: none; border: 0; cursor: pointer; flex-shrink: 0;
  font-family: var(--font-ui); font-weight: 600; font-size: .92rem; color: var(--ink-muted);
  padding: 14px 12px; border-radius: 8px;
  display: inline-flex; align-items: center; gap: 6px;
}
.qback:hover { color: var(--blue); background: var(--blue-tint); }
.qback svg { width: 14px; height: 14px; }

.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; overflow: hidden; }

/* Lock + secure message under the quiz buttons — centered, 10px. */
.secure-note {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-family: var(--font-ui);
  font-size: 10px; line-height: 1.4;
  color: var(--ink-muted);
  margin: 10px 0 0;
  text-align: center;
}
.secure-note svg { width: 12px; height: 12px; flex-shrink: 0; color: var(--blue); }


.qdone { text-align: center; padding: 20px 0 8px; }
.qdone-icon {
  width: 72px; height: 72px; margin: 0 auto 1.25rem; border-radius: 50%;
  background: var(--blue); color: var(--white); display: grid; place-items: center;
}
.qdone-icon svg { width: 36px; height: 36px; }
.qdone h2 { font-size: 1.6rem; }
.qdone p { color: var(--ink-soft); font-size: 1rem; }
.qdone .ref {
  font-family: var(--font-ui); font-size: .8rem; color: var(--ink-muted);
  background: var(--bg-alt); border: 1px solid var(--line);
  border-radius: 8px; padding: 10px 14px; display: inline-block; margin-top: 1rem;
}

.form-alert {
  display: none; padding: 14px 16px; border-radius: var(--radius);
  font-family: var(--font-ui); font-size: .9rem; font-weight: 600;
  margin-bottom: 16px;
}
.form-alert[data-show='true'] { display: block; }
.form-alert--error { background: var(--red-tint); border: 1px solid var(--red); color: var(--red-dark); }
.form-alert--ok { background: var(--blue-tint); border: 1px solid var(--blue); color: var(--blue); }

.spinner {
  width: 18px; height: 18px; border: 2.5px solid rgba(255, 255, 255, .35);
  border-top-color: #fff; border-radius: 50%;
  animation: spin .6s linear infinite; display: none;
}
.btn[data-loading='true'] .spinner { display: block; }
.btn[data-loading='true'] .btn-text { opacity: .75; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ================== ABOVE-THE-FOLD COMPACTION ==================
   HARD REQUIREMENT: 100% of the quote card is visible above the fold on every
   device, for every step — including the tall final contact step. It applies on
   narrow screens AND on short screens (720p/768p laptops), because the binding
   constraint is viewport HEIGHT, not width. Verified by tools/fold.cjs. */
@media (max-width: 900px), (max-height: 1200px) {
  .quote-head { padding: 14px 16px 0; }
  .quote-head h2 { font-size: 1.04rem; line-height: 1.25; margin-bottom: 0; }
  .quote-head p { display: none; }

  .progress { padding: 10px 16px 0; }
  .progress-track { height: 5px; }
  .progress-label { font-size: .68rem; margin-top: 5px; }

  .quote-body { padding: 12px 16px 16px; }

  .quote-card legend, .quote-card .qtitle { font-size: 1rem; margin-bottom: .25em; }
  .qhelp { font-size: .72rem; line-height: 1.45; margin-bottom: .5rem; }

  .opts { gap: 7px; margin-top: .6rem; }
  .opt label {
    min-height: 44px;               /* keep the 44px tap-target floor */
    padding: 9px 13px; gap: 10px;
    font-size: .9rem;
  }
  .opt label::before { width: 17px; height: 17px; }
  .opt input:checked + label::before { box-shadow: inset 0 0 0 4px var(--red); }

  .field { margin-bottom: 9px; }
  .field label, .field .flabel { font-size: .74rem; margin-bottom: 3px; }
  .field input, .field select {
    padding: 10px 12px;
    font-size: 16px;                /* < 16px makes iOS Safari zoom on focus */
  }
  .field select { background-position: right 12px center; padding-right: 36px; }
  .field-error { font-size: .72rem; margin-top: 3px; }

  /* Two columns even at 320px — stacking these blows the fold budget. */
  .field-row { grid-template-columns: 1fr 1fr; gap: 10px; }

  .consent { padding: 9px 11px; margin: 10px 0; gap: 9px; }
  .consent label { font-size: .63rem; line-height: 1.45; }
  .consent input[type='checkbox'] { width: 19px; height: 19px; }

  .opts--grid { gap: 8px; }
  .opts--grid .opt label { min-height: 70px; padding: 10px 6px; font-size: .84rem; gap: 6px; }
  .opts--grid .opt label svg { width: 21px; height: 21px; }
  .opts--grid .opt:last-child:nth-child(odd) label { min-height: 48px; }

  .qnav { margin-top: 12px; gap: 8px; }
  .qnav .btn { padding: 13px 18px; font-size: .95rem; }
  .qback { padding: 12px 10px; font-size: .86rem; }
  .quote-card .btn-note { display: none; }
}

/* Short viewports: reclaim hero padding and drop non-essential form chrome. */
@media (max-height: 820px) {
  .hero { padding-top: 16px; padding-bottom: 26px; }
  .qstep .qhelp { display: none; }
  .secure-note { margin-top: 7px; }
  .call-prompt { font-size: .76rem; margin: 10px 0 6px; }
}

/* Phones: the field labels become placeholders. The <label> stays in the DOM,
   visually hidden, so screen readers and `for=`/`id=` pairing still work. */
@media (max-width: 900px) {
  .quote-card .field > label {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
}

/* Very short viewports (iPhone SE/8 at 667, SE w/ chrome, 720p laptops). */
@media (max-height: 700px) {
  .secure-note { margin-top: 5px; gap: 5px; }
  .call-prompt { font-size: .72rem; margin: 8px 0 5px; }
  .consent { margin: 8px 0; }
  .progress-label { display: none; }
  .progress { padding-bottom: 2px; }
  .quote-head h2 { font-size: .96rem; }
  .quote-body { padding: 10px 14px 14px; }
  .quote-card legend, .quote-card .qtitle { font-size: .95rem; }
  .opts { gap: 6px; }
  .opt label { min-height: 44px; padding: 8px 12px; font-size: .86rem; }
  .field { margin-bottom: 7px; }
  .consent { padding: 8px 10px; margin: 8px 0; }
  .consent label { font-size: .58rem; line-height: 1.38; }
  .hero { padding-top: 8px; padding-bottom: 20px; }
  .qnav { margin-top: 9px; }
}

/* Smallest phones (320×568, or a 375 device once Safari's chrome is subtracted). */
@media (max-height: 620px) {
  .secure-note { margin-top: 4px; }
  .call-prompt { font-size: .7rem; margin: 6px 0 4px; }
  :root { --header-h: 52px; }
  .logo img { height: 27px; }
  .breadcrumbs ol { padding: 5px 0; font-size: .7rem; }
  .quote-head { padding: 11px 14px 0; }
  .quote-head h2 { font-size: .92rem; }
  .progress { padding: 7px 14px 0; }
  .quote-body { padding: 9px 14px 12px; }
  .quote-card legend, .quote-card .qtitle { font-size: .92rem; margin-bottom: .2em; }
  .opts { gap: 5px; margin-top: .5rem; }
  .opt label { padding: 7px 11px; font-size: .84rem; }
  .opts--grid { gap: 4px; }
  .opts--grid .opt label { min-height: 46px; font-size: .78rem; gap: 2px; }
  .opts--grid .opt label svg { width: 16px; height: 16px; }
  .opts--grid .opt:last-child:nth-child(odd) label { min-height: 44px; }
  .field { margin-bottom: 6px; }
  .field input, .field select { padding: 9px 11px; }
  .consent { padding: 7px 9px; margin: 4px 0; gap: 8px; }
  .consent label { font-size: .55rem; line-height: 1.35; }
  .qnav { margin-top: 8px; }
  .qnav .btn { padding: 12px 16px; font-size: .92rem; }
}

/* 320px-wide phones need one more notch. Button padding is deliberately left
   at >=13px so tap targets stay above the 44px floor. */
@media (max-width: 360px) {
  .quote-head h2 { font-size: .88rem; }
  .quote-card legend, .quote-card .qtitle { font-size: .88rem; }
  .opts--grid { gap: 4px; }
  .opts--grid .opt label { min-height: 46px; font-size: .72rem; gap: 2px; }
  .opts--grid .opt label svg { width: 16px; height: 16px; }
  .opt label { font-size: .82rem; padding: 7px 10px; }
  .field { margin-bottom: 4px; }
  .field input, .field select { padding: 8px 10px; }
  .consent { padding: 6px 8px; margin: 4px 0; gap: 7px; }
  .consent label { font-size: .5rem; line-height: 1.28; }
}

@media (max-width: 900px) {
  /* Taller nav bar. Stepped down on short viewports because a bigger header
     eats the fold budget and the quote card must stay fully above the fold. */
  :root { --header-h: 76px; }
  .logo img { height: 30px; }
  /* Keep the trail on ONE line — a wrapped breadcrumb costs ~26px of fold
     budget on deep pages. It scrolls horizontally inside its own container,
     so the page body never scrolls sideways. */
  .breadcrumbs ol {
    padding: 8px 0; font-size: .74rem;
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
  }
  .breadcrumbs ol::-webkit-scrollbar { display: none; }
  .breadcrumbs li { white-space: nowrap; flex-shrink: 0; }
}

@media (max-width: 900px) and (max-height: 700px) { :root { --header-h: 66px; } }
@media (max-width: 900px) and (max-height: 620px) { :root { --header-h: 58px; } }

/* Narrow phones: step the wordmark, button and hamburger down together so the
   three never collide. Sizes proven across 320-1000px by tools/header.cjs. */
@media (max-width: 460px) {
  .wrap { padding: 0 14px; }
  .logo img { height: 24px; }
  .header-cta .btn--call { padding: 14px 12px; font-size: .88rem; gap: 7px; }
  .header-cta .call-icon { width: .95em; height: .95em; }
  .nav-toggle { padding: 8px; margin-right: -8px; }
  .nav-toggle span { width: 22px; }
}
@media (max-width: 380px) {
  .logo img { height: 21px; }
  .header-cta .btn--call { padding: 14px 9px; font-size: .8rem; gap: 5px; }
}
@media (max-width: 340px) {
  .wrap { padding: 0 10px; }
  .logo img { height: 19px; }
  .header-cta .btn--call { padding: 16px 7px; font-size: .74rem; gap: 4px; }
  .nav-toggle { padding: 6px; margin-right: -6px; }
  .nav-toggle span { width: 20px; }
}

/* ============================== CTA BAND ============================== */
.cta-band {
  background: var(--blue);
  color: var(--white);
  text-align: center;
  padding: clamp(3rem, 6vw, 4.5rem) 0;
}
.cta-band h2 { color: var(--white); }
.cta-band p { color: rgba(255, 255, 255, .86); max-width: 56ch; margin: 0 auto 2rem; }
.cta-band .btn-note { color: rgba(255, 255, 255, .68); }
.cta-band-buttons { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
@media (max-width: 480px) { .cta-band-buttons { flex-direction: column; } .cta-band-buttons .btn { width: 100%; } }

/* ============================== CONTACT PAGE ============================== */
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 3.5rem; align-items: start; max-width: 1000px;
}
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; } }

/* ============================== PROSE (legal + content pages) ============================== */
.prose { max-width: 76ch; }
.prose h2 { font-size: 1.5rem; margin-top: 2.5rem; }
.prose h3 { font-size: 1.15rem; margin-top: 1.75rem; color: var(--ink); }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose ul, .prose ol { margin-bottom: 1.25em; }
.prose li { color: var(--ink-soft); }
.prose p { color: var(--ink-soft); }
.prose table {
  width: 100%; border-collapse: collapse; margin: 1.5rem 0;
  font-family: var(--font-ui); font-size: .9rem;
}
.prose th, .prose td { border: 1px solid var(--line); padding: 12px 14px; text-align: left; }
.prose th { background: var(--bg-alt); font-weight: 700; color: var(--blue); }
.prose-updated {
  font-family: var(--font-ui); font-size: .85rem; color: var(--ink-muted);
  padding-bottom: 1.5rem; margin-bottom: 2rem; border-bottom: 1px solid var(--line);
}
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.callout {
  background: var(--blue-tint); border-left: 4px solid var(--blue);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 22px; margin: 1.75rem 0;
  font-family: var(--font-ui); font-size: .93rem; color: var(--ink-soft); line-height: 1.7;
}
.callout--warn { background: var(--red-tint); border-left-color: var(--red); }
.callout strong { color: var(--ink); }

/* ============================== SITEMAP PAGE ============================== */
.sitemap-grid { display: grid; gap: 36px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.sitemap-col h2 { font-size: 1.15rem; padding-bottom: .6rem; border-bottom: 2px solid var(--red); margin-bottom: 1rem; }
.sitemap-col ul { list-style: none; padding: 0; margin: 0; }
.sitemap-col li { margin-bottom: .6em; }
.sitemap-col a { font-family: var(--font-ui); font-size: .94rem; font-weight: 600; color: var(--ink-soft); text-decoration: none; }
.sitemap-col a:hover { color: var(--red); text-decoration: underline; }
.sitemap-col ul ul { padding-left: 16px; margin-top: .6em; border-left: 2px solid var(--line); }
.sitemap-col ul ul a { font-weight: 400; }

/* ============================== FOOTER ============================== */
.site-footer { background: var(--blue); color: rgba(255, 255, 255, .82); padding: 3.5rem 0 0; }
/* 5 children: brand + Insurance + Home Services + Financial + Company. */
.footer-top {
  display: grid; gap: 36px;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  padding-bottom: 2.5rem;
}
.footer-brand img { height: 34px; width: auto; background: var(--white); border-radius: 6px; padding: 7px 10px; }
.footer-brand p {
  font-family: var(--font-ui); font-size: .85rem; line-height: 1.7;
  color: rgba(255, 255, 255, .7); margin: 1rem 0 0; max-width: 34ch;
}
.footer-col h3 {
  font-family: var(--font-ui); font-size: .78rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--white); margin-bottom: 1rem;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: .55em; }
.footer-col a {
  font-family: var(--font-ui); font-size: .88rem; color: rgba(255, 255, 255, .72); text-decoration: none;
}
.footer-col a:hover { color: var(--white); text-decoration: underline; }

@media (max-width: 1100px) { .footer-top { grid-template-columns: 1fr 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 760px) { .footer-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-top { grid-template-columns: 1fr; gap: 30px; } }

/* Global footer disclaimer band — 90% width, 9px, gray keyed to dark blue bg */
#qa-global-footer {
  width: 90%; max-width: 90%; margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, .16);
  padding: 24px 0 28px;
}
#qa-global-footer, #qa-global-footer * { font-size: 9px !important; }
#qa-global-footer {
  font-family: var(--font-ui);
  line-height: 1.75;
  color: #aab2c8;
}
#qa-global-footer { text-align: center; }
#qa-global-footer p { margin: 0 0 10px; }
#qa-global-footer strong { color: #c9d0e2; font-weight: 700; }
#qa-global-footer a { color: #c9d0e2; text-decoration: underline; }
#qa-global-footer a:hover { color: #fff; }
.footer-legal-links {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px;
  margin: 0 0 16px; padding: 0; list-style: none;
}
.footer-legal-links li { margin: 0; }
.footer-copy {
  border-top: 1px solid rgba(255, 255, 255, .12);
  margin-top: 14px; padding-top: 14px;
}

/* ============================== UTIL ============================== */
.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;
}
.mt-0 { margin-top: 0; }
.mb-2 { margin-bottom: 2rem; }
.stack > * + * { margin-top: 1.5rem; }

@media print {
  .site-header, .site-footer, .quote-card, .cta-band, .breadcrumbs { display: none !important; }
}
