/* Finance Broker Quotes design system.
   NerdWallet-style: calm, spacious, editorial. Tokens from the approved
   concept. Inter self-hosted; no third-party requests from the public
   site. One restrained dark-green conversion panel per page. */

/* ---- Fonts ---- */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("/static/fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("/static/fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("/static/fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("/static/fonts/inter-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 800; font-display: swap; src: url("/static/fonts/inter-latin-800-normal.woff2") format("woff2"); }

/* ---- Tokens ---- */
:root {
  --ink: #191c1f;
  --body: #464b52;
  --muted: #6b7178;
  --green: #0a8f5a;
  --green-deep: #076b43;
  --green-ink: #053d27;
  --mint: #e9f7f0;
  --tint: #f7f9fb;
  --border: #e5e8ec;
  --white: #ffffff;
  --r-card: 16px;
  --r-panel: 24px;
  --r-pill: 999px;
  --shadow-rest: 0 1px 2px rgba(25, 28, 31, 0.05);
  --shadow-hover: 0 10px 30px rgba(25, 28, 31, 0.10);
  --wrap: 1120px;
  --wrap-narrow: 760px;
}

/* ---- Base ---- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--body);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { color: var(--ink); line-height: 1.18; margin: 0 0 0.5em; letter-spacing: -0.015em; }
h1 { font-size: clamp(2.1rem, 4.5vw, 3.1rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--green-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--green); }
img { max-width: 100%; height: auto; display: block; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: var(--wrap-narrow); }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--green-ink); color: #fff; padding: 10px 18px; border-radius: 0 0 12px 0; z-index: 100; }
.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; border-radius: 4px; }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--green-deep);
  background: var(--mint);
  border-radius: var(--r-pill);
  padding: 6px 14px;
  margin: 0 0 18px;
}
.lede { font-size: 1.17rem; color: var(--body); max-width: 40em; }
.section-title { margin-bottom: 28px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-link { font-weight: 600; white-space: nowrap; }

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  font-weight: 700;
  font-size: 1rem;
  border-radius: var(--r-pill);
  padding: 13px 28px;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-deep); color: #fff; box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--green-ink); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--green); color: var(--green-deep); }
.btn-light { background: #fff; color: var(--green-ink); }
.btn-light:hover { background: var(--mint); color: var(--green-ink); box-shadow: var(--shadow-hover); }
.btn-big { padding: 16px 36px; font-size: 1.06rem; }

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  background: radial-gradient(120% 120% at 20% 15%, var(--green) 0%, var(--green-deep) 70%);
  position: relative;
}
.brand-mark::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 12px; height: 12px; border-radius: 50%;
  border: 2.5px solid #fff; border-left-color: transparent;
  transform: rotate(-45deg);
}
.brand-name { font-weight: 800; color: var(--ink); font-size: 1.06rem; letter-spacing: -0.01em; white-space: nowrap; }
/* Nav links must never wrap. A wrapped link is centred independently of
   its neighbours, which is what makes a multi-line header look jumbled:
   the baselines stop lining up. Keeping every item on one line and
   hiding items in priority order at narrow widths keeps the row optically
   level at every size. */
.site-nav { display: flex; align-items: center; gap: 22px; flex-wrap: nowrap; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.93rem; white-space: nowrap; line-height: 1; }
.site-nav a:hover { color: var(--green-deep); }
.nav-cta { background: var(--green); color: #fff !important; border-radius: var(--r-pill); padding: 11px 20px; line-height: 1; white-space: nowrap; flex-shrink: 0; transition: background 0.18s ease; }
.nav-cta:hover { background: var(--green-deep); }
.cta-short { display: none; }

/* ---- Hero ---- */
.hero {
  background:
    radial-gradient(900px 460px at 78% -10%, var(--mint) 0%, rgba(233, 247, 240, 0) 62%),
    radial-gradient(700px 420px at 8% 110%, var(--tint) 0%, rgba(247, 249, 251, 0) 60%),
    var(--white);
  padding: 84px 0 72px;
}
.hero-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 56px; align-items: center; }
.hero-copy h1 { margin-bottom: 18px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 26px; }
.hero-points { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 10px; font-size: 0.98rem; color: var(--body); }
.hero-points li { display: flex; align-items: center; gap: 10px; }
.hero-points .tick {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--mint); color: var(--green-deep);
  display: inline-flex; align-items: center; justify-content: center;
}
.hero-points .tick svg { width: 12px; height: 12px; }
.hero-figure { position: relative; }
.hero-figure img { border-radius: var(--r-panel); box-shadow: var(--shadow-hover); aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.hero-chip {
  position: absolute; left: -18px; bottom: 26px;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--r-card); box-shadow: var(--shadow-hover);
  padding: 12px 18px; display: flex; align-items: center; gap: 12px;
}
.hero-chip .chip-ic { width: 34px; height: 34px; border-radius: 10px; background: var(--mint); color: var(--green-deep); display: inline-flex; align-items: center; justify-content: center; }
.hero-chip .chip-ic svg { width: 18px; height: 18px; }
.hero-chip strong { display: block; color: var(--ink); font-size: 0.95rem; line-height: 1.2; }
.hero-chip span { color: var(--muted); font-size: 0.82rem; }

/* ---- Category cards ---- */
.categories { padding: 72px 0; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.cat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 26px 24px;
  text-decoration: none;
  color: var(--body);
  box-shadow: var(--shadow-rest);
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
  display: flex; flex-direction: column; gap: 10px;
}
.cat-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); border-color: #d7e9df; color: var(--body); }
.cat-icon {
  width: 46px; height: 46px; border-radius: 13px;
  background: var(--mint); color: var(--green-deep);
  display: inline-flex; align-items: center; justify-content: center;
}
.cat-icon svg { width: 24px; height: 24px; }
.cat-card h3 { margin: 6px 0 0; }
.cat-card p { margin: 0; font-size: 0.94rem; color: var(--muted); }
.cat-go { margin-top: auto; font-weight: 700; color: var(--green-deep); font-size: 0.94rem; }
.cat-card:hover .cat-go { color: var(--green); }

/* ---- Steps ---- */
.steps { padding: 72px 0; background: var(--tint); }
.steps-row { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
.step-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-card); padding: 28px 26px; box-shadow: var(--shadow-rest); }
.step-marker {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--green-ink); color: #fff;
  font-weight: 800; margin-bottom: 14px;
}
.step-card h3 { margin-bottom: 6px; }
.step-card p { margin: 0; font-size: 0.96rem; }

/* ---- Guide cards ---- */
.guides-section { padding: 72px 0; }
.guide-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 26px 24px 24px;
  text-decoration: none;
  color: var(--body);
  box-shadow: var(--shadow-rest);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  display: flex; flex-direction: column; gap: 8px;
}
.guide-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px;
  background: linear-gradient(90deg, var(--green) 0%, var(--green-deep) 55%, var(--green-ink) 100%);
}
.guide-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); color: var(--body); }
.card-kicker { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--green-deep); }
.guide-card h3 { margin: 2px 0 0; }
.guide-card p { margin: 0; font-size: 0.93rem; color: var(--muted); }
.card-go { margin-top: auto; font-weight: 700; color: var(--green-deep); font-size: 0.94rem; }
.guide-card:hover .card-go { color: var(--green); }

/* ---- Conversion panel (one per page) ---- */
.convert-panel {
  background:
    radial-gradient(640px 300px at 85% 0%, rgba(10, 143, 90, 0.35) 0%, rgba(10, 143, 90, 0) 60%),
    var(--green-ink);
  color: #dff0e7;
  border-radius: var(--r-panel);
  padding: 52px 48px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px; flex-wrap: wrap;
}
.convert-panel h2 { color: #fff; margin-bottom: 8px; }
.convert-panel p { margin: 0; max-width: 34em; }
.convert-wrap { padding: 24px 0 88px; }

/* ---- Footer ---- */
.site-footer { background: var(--tint); border-top: 1px solid var(--border); padding: 56px 0 36px; margin-top: 0; font-size: 0.92rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; }
.footer-brand { font-weight: 800; color: var(--ink); font-size: 1.02rem; margin-bottom: 10px; }
.footer-note { color: var(--muted); max-width: 34em; }
.footer-col h4 { font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.footer-col a { display: block; color: var(--body); text-decoration: none; padding: 4px 0; font-weight: 500; }
.footer-col a:hover { color: var(--green-deep); }
.footer-legal { color: var(--muted); border-top: 1px solid var(--border); margin-top: 36px; padding-top: 22px; font-size: 0.85rem; }

/* ---- Page head (interior pages) ---- */
.page-head { padding: 64px 0 36px; background: linear-gradient(180deg, var(--tint) 0%, rgba(247, 249, 251, 0) 100%); }
.listing { padding: 12px 0 72px; }
.listing h2 { margin: 40px 0 20px; }
.index-list { list-style: none; margin: 0; padding: 0; }
.index-list li { display: flex; justify-content: space-between; gap: 16px; padding: 13px 2px; border-bottom: 1px solid var(--border); }
.index-list a { text-decoration: none; font-weight: 600; color: var(--ink); }
.index-list a:hover { color: var(--green-deep); }
.index-date { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }

/* ---- Article ---- */
.article-head { padding: 56px 0 8px; }
.crumbs { font-size: 0.85rem; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); text-decoration: none; font-weight: 500; }
.crumbs a:hover { color: var(--green-deep); }
.crumb-sep { margin: 0 8px; }
.article-standfirst { font-size: 1.17rem; color: var(--body); max-width: 38em; }
.article-dateline { color: var(--muted); font-size: 0.86rem; }
.article-hero { padding: 10px 0 8px; }
.article-hero img { border-radius: var(--r-panel); box-shadow: var(--shadow-rest); width: 100%; aspect-ratio: 16 / 8; object-fit: cover; }
.article-hero figcaption { color: var(--muted); font-size: 0.82rem; margin-top: 10px; }
.article-body { padding: 24px 0 8px; }
.article-body h2 { margin-top: 1.7em; }
.article-body h3 { margin-top: 1.4em; }
.article-body ul, .article-body ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.article-body li { margin-bottom: 0.35em; }
.article-body table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 0.94rem; border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; }
.article-body th { background: var(--tint); color: var(--ink); text-align: left; font-weight: 700; }
.article-body th, .article-body td { padding: 12px 14px; border-bottom: 1px solid var(--border); }
.article-body tr:last-child td { border-bottom: 0; }
.article-body blockquote { margin: 1.4em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--green); color: var(--ink); font-weight: 500; }

.article-faq { padding: 24px 0 8px; }
.faq-item { border: 1px solid var(--border); border-radius: var(--r-card); background: var(--white); margin-bottom: 12px; box-shadow: var(--shadow-rest); overflow: hidden; }
.faq-item summary { list-style: none; cursor: pointer; padding: 18px 52px 18px 22px; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h3 { display: inline; font-size: 1.02rem; margin: 0; }
.faq-item summary::after {
  content: ""; position: absolute; right: 20px; top: 50%;
  width: 10px; height: 10px; border-right: 2.5px solid var(--green-deep); border-bottom: 2.5px solid var(--green-deep);
  transform: translateY(-70%) rotate(45deg); transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq-item[open] summary { background: var(--tint); }
.faq-item > p { padding: 16px 22px 18px; margin: 0; }

.article-cta {
  background:
    radial-gradient(520px 260px at 88% 0%, rgba(10, 143, 90, 0.32) 0%, rgba(10, 143, 90, 0) 60%),
    var(--green-ink);
  color: #dff0e7;
  border-radius: var(--r-panel);
  padding: 40px 38px;
  margin: 40px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
}
.article-cta h2 { color: #fff; font-size: 1.4rem; margin-bottom: 6px; }
.article-cta p { margin: 0; max-width: 32em; font-size: 0.97rem; }

.article-spokes { padding: 20px 0; }
.article-related { padding: 8px 0 16px; }
.related-list { list-style: none; margin: 0; padding: 0; }
.related-list li { border-bottom: 1px solid var(--border); }
.related-list a { display: block; padding: 12px 2px; text-decoration: none; font-weight: 600; color: var(--ink); }
.related-list a:hover { color: var(--green-deep); }

.article-disclaimer { padding: 8px 0 72px; }
.disclosure {
  background: var(--tint);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 20px 24px;
  font-size: 0.86rem;
  color: var(--muted);
}
.disclosure p { margin: 0 0 0.8em; }
.disclosure p:last-child { margin: 0; }

/* ---- Forms ---- */
.quote-section { padding: 16px 0 88px; }
.quote-form fieldset { border: 1px solid var(--border); border-radius: var(--r-card); background: var(--white); box-shadow: var(--shadow-rest); padding: 26px 26px 18px; margin: 0 0 24px; }
.quote-form legend { font-weight: 800; color: var(--ink); padding: 0 10px; font-size: 1.05rem; }
.field { margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
label { display: block; font-weight: 600; color: var(--ink); margin-bottom: 7px; font-size: 0.95rem; }
input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px rgba(10, 143, 90, 0.13); }
.check-label { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; font-size: 0.93rem; color: var(--body); margin-bottom: 12px; }
.check-label input { width: auto; margin-top: 3px; }
.consent-block { background: var(--tint); }
.hp-field { position: absolute; left: -9999px; }
.form-errors { background: #fdf1f1; border: 1px solid #f0caca; color: #8c2f2f; border-radius: var(--r-card); padding: 18px 22px; margin-bottom: 24px; }
.form-errors ul { margin: 6px 0 0; padding-left: 1.2em; }
.form-fine { color: var(--muted); font-size: 0.88rem; margin-top: 12px; }

/* ---- Reveal animation ---- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.in, .no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .guide-card, .cat-card { transition: none; }
  html { scroll-behavior: auto; }
}

/* ---- Responsive ---- */
/* Shed the least important nav items first so the row never wraps. */
@media (max-width: 1180px) {
  .site-nav { gap: 18px; }
  .site-nav a.nav-secondary { display: none; }
}
@media (max-width: 1000px) {
  .site-nav a.nav-hub { display: none; }
}

@media (max-width: 920px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero { padding: 56px 0 52px; }
  .hero-figure { max-width: 480px; }
  .steps-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .site-nav { gap: 16px; }
  .site-nav a:not(.nav-cta) { display: none; }
}
@media (max-width: 620px) {
  /* The brand and CTA both stay on one line, so at phone widths they are
     scaled down to fit rather than allowed to wrap. */
  .brand-name { font-size: 0.98rem; }
  .brand { gap: 8px; }
  .header-row { gap: 12px; }
  .site-header .wrap { padding-left: 16px; padding-right: 16px; }
  .nav-cta { font-size: 0.86rem; padding: 10px 16px; }
  .cta-long { display: none; }
  .cta-short { display: inline; }
  .field-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .convert-panel, .article-cta { padding: 34px 26px; }
  .nav-cta { padding: 10px 16px; }
  body { font-size: 16px; }
}

@media (max-width: 400px) {
  .brand-name { font-size: 0.92rem; }
}

/* Very small legacy phones. Only the brand and the CTA are present here,
   so letting the brand wrap costs nothing: there is no nav row left to
   fall out of alignment with. flex:none above stops the brand compressing
   on desktop, so it is released here to let the name wrap. */
@media (max-width: 360px) {
  .brand { flex: 1 1 auto; min-width: 0; }
  .brand-name { white-space: normal; line-height: 1.15; }
}
