/* ==========================================================================
   betterinsurance.today

   One stylesheet, no framework. The source loaded Bootstrap 3 (138 KB),
   owl.carousel, fancyBox, a Font Awesome kit and jQuery 3.5.0 to render a
   header logo, four buttons, a carousel and a footer menu. None of that is
   here: the carousel is a grid, the icons were never used (zero fa- classes in
   any page), and fancyBox had no lightbox markup to attach to.

   Palette is the theme's own, read out of
   wp-content/themes/balancedfinance/css/style.css:
     #152644  primary navy    header, footer, buttons
     #001144  deep navy       hovers, gradient end   (was written #014)
     #ffcc33  gold            accent, CTAs           (was written #fc3)
     #202124  body text
     #70757e  secondary text
     #ededef  section grounds
     #e1e1e1  borders
   ========================================================================== */

:root {
  --navy: #152644;
  --navy-deep: #001144;
  --gold: #ffcc33;
  --gold-dark: #8a6100;      /* gold is unreadable on white; this is its text form */
  --ink: #202124;
  --muted: #70757e;
  --ground: #ededef;
  --line: #e1e1e1;
  --white: #fff;

  --wrap: 1160px;
  --narrow: 760px;
  --radius: 4px;
  --shadow: 0 1px 2px rgba(21, 38, 68, .08), 0 8px 24px -14px rgba(21, 38, 68, .28);
}

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

html { -webkit-text-size-adjust: 100%; }
html.js-smooth-scroll { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html.js-smooth-scroll { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

img, picture, svg { max-width: 100%; }
img { height: auto; border: 0; }

a { color: var(--navy); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--navy-deep); }
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 700; text-wrap: balance; }
h1 { font-size: clamp(28px, 4.2vw, 40px); letter-spacing: -.01em; }
h2 { font-size: clamp(23px, 3vw, 29px); }
h3 { font-size: 20px; }
p, ul, ol { margin: 0 0 1.1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: var(--narrow); }
.center { text-align: center; }

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--gold); color: var(--navy); padding: 10px 16px;
  font-weight: 700; text-decoration: none;
}
.skip-link:focus { left: 0; }

/* ---- header --------------------------------------------------------- */

.site-header { background: var(--navy); color: var(--white); }
.header-inner {
  display: flex; align-items: center; gap: 20px;
  min-height: 78px; flex-wrap: wrap;
}

.site-logo {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--white); text-decoration: none; margin-right: auto;
}
.logo-mark { color: var(--white); flex: none; display: block; }
.logo-word { display: flex; flex-direction: column; line-height: 1; }
.logo-word-1 { font-size: 25px; font-weight: 700; letter-spacing: .01em; }
.logo-word-2 {
  font-size: 12.5px; font-weight: 400; letter-spacing: .34em;
  text-transform: uppercase; color: var(--gold); margin-top: 3px;
}

.nav-toggle {
  display: none; align-items: center; gap: 8px;
  background: transparent; border: 1px solid rgba(255, 255, 255, .45);
  color: var(--white); border-radius: var(--radius);
  padding: 8px 12px; font: inherit; font-size: 15px; cursor: pointer;
}
.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  display: block; width: 18px; height: 2px; background: currentColor; content: "";
}
.nav-toggle-bar { position: relative; }
.nav-toggle-bar::before { position: absolute; top: -6px; }
.nav-toggle-bar::after  { position: absolute; top: 6px; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.site-nav li { position: relative; }
.site-nav a {
  display: block; padding: 10px 14px; color: var(--white);
  text-decoration: none; font-size: 15.5px; border-radius: var(--radius);
}
.site-nav a:hover,
.site-nav a:focus-visible { background: rgba(255, 255, 255, .12); color: var(--white); }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--gold); }

.site-nav .has-children > a::after {
  content: ""; display: inline-block; margin-left: 7px;
  border: 4px solid transparent; border-top-color: currentColor;
  transform: translateY(2px);
}
.subnav {
  display: none; position: absolute; left: 0; top: 100%; z-index: 30;
  min-width: 240px; background: var(--white); padding: 6px;
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); flex-direction: column; gap: 0;
}
.site-nav li:hover > .subnav,
.site-nav li:focus-within > .subnav { display: flex; }
.subnav a { color: var(--ink); font-size: 15px; padding: 9px 12px; }
.subnav a:hover,
.subnav a:focus-visible { background: var(--ground); color: var(--navy); }
.subnav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--gold); }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .site-nav { display: none; width: 100%; padding-bottom: 14px; }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a { padding: 11px 12px; }
  .subnav {
    display: flex; position: static; background: transparent; border: 0;
    box-shadow: none; padding: 0 0 0 14px; min-width: 0;
  }
  .subnav a { color: rgba(255, 255, 255, .82); }
  .subnav a:hover, .subnav a:focus-visible { background: rgba(255,255,255,.12); color: var(--white); }
  .site-nav .has-children > a::after { display: none; }
}

/* ---- hero ----------------------------------------------------------- */

.hero {
  background-color: var(--navy);
  background-size: cover; background-position: center;
  color: var(--white); text-align: center;
}
.hero-inner { padding: clamp(56px, 9vw, 104px) 20px; max-width: 900px; margin: 0 auto; }
.hero h1 { margin: 0 0 14px; color: var(--white); }
.hero-sub { margin: 0; font-size: clamp(17px, 2.1vw, 21px); color: var(--gold); font-weight: 700; }

/* ---- topic buttons -------------------------------------------------- */

.topic-picker { background: var(--ground); padding: 30px 0; }
.topic-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.topic-button {
  display: flex; flex-direction: column; gap: 3px;
  background: var(--white); border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius); padding: 18px 20px;
  text-decoration: none; color: var(--navy); height: 100%;
  transition: transform .12s ease, box-shadow .12s ease;
}
.topic-button:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: var(--navy-deep); }
.topic-name { font-size: 19px; font-weight: 700; }
.topic-count { font-size: 14px; color: var(--muted); }
.topic-grid-404 { margin-bottom: 32px; }

/* ---- generic sections ----------------------------------------------- */

.site-main { display: block; }
.home-intro { padding: 40px 0 6px; }
.home-blog { padding: 44px 0 52px; }
.section-title { text-align: center; margin-bottom: 6px; }
.section-intro { text-align: center; color: var(--muted); max-width: 640px; margin: 0 auto 30px; }

.layout { padding: 30px 0 60px; }
.has-sidebar { display: grid; gap: 44px; grid-template-columns: minmax(0, 1fr) 300px; }
@media (max-width: 980px) { .has-sidebar { grid-template-columns: 1fr; gap: 34px; } }

/* ---- breadcrumb ----------------------------------------------------- */

.breadcrumb { font-size: 14.5px; color: var(--muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--navy); }
.breadcrumb .sep { padding: 0 7px; }

/* ---- entry ---------------------------------------------------------- */

.entry-header { margin-bottom: 18px; }
.entry-meta { color: var(--muted); font-size: 14.5px; margin: 0 0 8px; }
.entry-meta .sep { padding: 0 7px; }
.entry-featured { margin: 0 0 26px; }
.entry-featured img { width: 100%; border-radius: var(--radius); display: block; }

.entry-content h2 { margin-top: 1.5em; }
.entry-content h3 { margin-top: 1.3em; }
.entry-content ul, .entry-content ol { padding-left: 22px; }
.entry-content li { margin-bottom: .45em; }
.entry-content a { color: var(--navy); }
.entry-content strong { font-weight: 700; }

.entry-tags { font-size: 15px; color: var(--muted); margin: 26px 0 0; }
.entry-tags a {
  display: inline-block; background: var(--ground); color: var(--navy);
  border-radius: var(--radius); padding: 3px 11px; margin-left: 6px;
  text-decoration: none; font-size: 14.5px;
}
.entry-tags a:hover { background: var(--gold); color: var(--navy-deep); }

/* ---- prev / next ---------------------------------------------------- */

.post-nav {
  display: grid; gap: 14px; grid-template-columns: 1fr 1fr;
  margin: 36px 0 0; padding-top: 26px; border-top: 1px solid var(--line);
}
@media (max-width: 620px) { .post-nav { grid-template-columns: 1fr; } }
.post-nav a {
  display: flex; flex-direction: column; gap: 5px;
  padding: 15px 18px; border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: var(--navy); background: var(--white);
}
.post-nav a:hover { border-color: var(--navy); box-shadow: var(--shadow); }
.post-nav-next { text-align: right; }
.post-nav-label { font-size: 13.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.post-nav-title { font-weight: 700; line-height: 1.35; }

/* ---- related / cards ------------------------------------------------ */

.related { margin-top: 44px; }
.related h2 { font-size: 22px; }

.card-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card-grid-3 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.card {
  display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--white); overflow: hidden;
  transition: transform .12s ease, box-shadow .12s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card-thumb { display: block; line-height: 0; }
.card-thumb img { width: 100%; display: block; }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { font-size: 18px; margin-bottom: .4em; }
.card-body h3 a { text-decoration: none; }
.card-body h3 a:hover { text-decoration: underline; }
.card-body p { font-size: 15.5px; color: var(--muted); margin-bottom: .8em; }
.card-body .more { margin-top: auto; margin-bottom: 0; }
.card-body .more a { font-weight: 700; text-decoration: none; font-size: 15px; }
.card-body .more a:hover { text-decoration: underline; }

/* ---- post list (archives) ------------------------------------------- */

.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li {
  display: grid; gap: 22px; grid-template-columns: 260px minmax(0, 1fr);
  padding: 26px 0; border-bottom: 1px solid var(--line);
}
.post-list li:first-child { padding-top: 6px; }
.post-list img { width: 100%; border-radius: var(--radius); display: block; }
.post-list h2 { font-size: 22px; margin-bottom: .35em; }
.post-list h2 a { text-decoration: none; }
.post-list h2 a:hover { text-decoration: underline; }
.post-list p { color: var(--muted); font-size: 16px; }
.post-list .more a { font-weight: 700; text-decoration: none; }
.post-list .more a:hover { text-decoration: underline; }
.post-list-plain li { grid-template-columns: 1fr; }
@media (max-width: 640px) { .post-list li { grid-template-columns: 1fr; gap: 14px; } }

.page-intro { color: var(--muted); font-size: 17px; margin-bottom: 8px; }
.empty-state {
  border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 28px; text-align: center; color: var(--muted);
}

/* ---- sidebar -------------------------------------------------------- */

.sidebar .widget { margin-bottom: 30px; }
.widget-title {
  font-size: 13px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--muted); margin-bottom: 12px; font-weight: 700;
}

.cat-list { list-style: none; margin: 0; padding: 0; }
.cat-list li {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--line); padding: 9px 0;
}
.cat-list a { text-decoration: none; font-weight: 700; font-size: 16px; }
.cat-list a:hover { text-decoration: underline; }
.cat-list .count {
  background: var(--ground); color: var(--muted);
  border-radius: 20px; padding: 1px 10px; font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}
.cat-list .is-current a { color: var(--navy-deep); }
.cat-list .is-current .count { background: var(--gold); color: var(--navy-deep); }

.recent-posts { list-style: none; margin: 0; padding: 0; }
.recent-posts li { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.recent-posts img { border-radius: var(--radius); flex: none; display: block; }
.recent-posts a { text-decoration: none; font-size: 15.5px; font-weight: 700; line-height: 1.35; display: block; }
.recent-posts a:hover { text-decoration: underline; }
.recent-posts time { display: block; color: var(--muted); font-size: 13.5px; margin-top: 3px; }

.notice {
  background: var(--ground); border-radius: var(--radius);
  border-top: 4px solid var(--gold); padding: 20px;
}
.notice p { font-size: 15.5px; }
.notice p:last-child { margin-bottom: 0; }
.notice-note { color: var(--muted); font-size: 12.5px !important; margin-top: 10px; }

/* ---- buttons -------------------------------------------------------- */

.btn {
  display: inline-block; background: var(--navy); color: var(--white);
  padding: 12px 24px; border-radius: var(--radius); font-weight: 700;
  text-decoration: none; border: 2px solid var(--navy); font-size: 16px;
  cursor: pointer;
}
.btn:hover { background: var(--navy-deep); border-color: var(--navy-deep); color: var(--white); }
.btn-ghost { background: transparent; color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: var(--white); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--navy-deep); }
.btn-gold:hover { background: #f0b800; border-color: #f0b800; color: var(--navy-deep); }
.btn-block { display: block; text-align: center; }

/* ---- quote CTA ------------------------------------------------------ */

.quote-cta {
  background: linear-gradient(160deg, var(--navy), var(--navy-deep));
  color: var(--white); text-align: center; padding: 52px 0;
}
.quote-cta h2 { color: var(--white); }
.quote-cta p { color: rgba(255, 255, 255, .88); }
.cta-note { font-size: 13px; color: rgba(255, 255, 255, .66); margin: 16px auto 0; max-width: 560px; }
.cta-note a { color: var(--gold); }

/* ---- forms ---------------------------------------------------------- */

.form-wrap { margin-top: 30px; }
.site-form {
  background: var(--ground); border-radius: var(--radius);
  padding: 26px; border-top: 4px solid var(--navy);
}
.form-legend { margin-top: 0; font-size: 21px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; margin-bottom: 5px; font-size: 16px; }
.field .req { color: #b3261e; }
.field-help { font-size: 14px; color: var(--muted); margin: 0 0 7px; }

.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  padding: 11px 13px; border: 1px solid #b9bec7; border-radius: var(--radius);
  background: var(--white);
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--navy); }

/* the honeypot: off-screen rather than display:none, which some bots skip */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-consent { font-size: 13.5px; color: var(--muted); }
.btn-submit { width: 100%; }
@media (min-width: 560px) { .btn-submit { width: auto; min-width: 220px; } }

.form-success {
  background: #e7f3ec; border-left: 4px solid #1d6b52;
  padding: 22px 24px; border-radius: var(--radius);
}
.form-success h2 { margin-top: 0; font-size: 21px; color: #14523f; }
.form-success p:last-child { margin-bottom: 0; }

.form-errors {
  background: #fdeceb; border-left: 4px solid #b3261e;
  padding: 16px 20px; border-radius: var(--radius); margin-bottom: 20px;
}
.form-errors ul { margin: 0; padding-left: 20px; }
.form-errors p { margin-bottom: .4em; }

/* ---- footer --------------------------------------------------------- */

.site-footer { background: var(--navy); color: rgba(255, 255, 255, .8); margin-top: 0; }
.footer-top { padding: 46px 0 34px; }
.footer-cols {
  display: grid; gap: 34px;
  grid-template-columns: 1.4fr 1fr 1.3fr 1.3fr;
}
@media (max-width: 900px) { .footer-cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-cols { grid-template-columns: 1fr; } }

.site-footer .widget-title { color: rgba(255, 255, 255, .62); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: var(--white); text-decoration: none; font-size: 15.5px; }
.site-footer a:hover { color: var(--gold); text-decoration: underline; }

.footer-logo {
  display: flex; align-items: center; gap: 10px;
  color: var(--white); font-weight: 700; font-size: 19px; margin: 0 0 8px;
}
.footer-logo svg { color: var(--white); flex: none; }
.footer-tagline { color: var(--gold); font-size: 15px; margin: 0 0 12px; }
.footer-contact { margin: 0; }

.footer-bar {
  border-top: 1px solid rgba(255, 255, 255, .16);
  padding: 18px 0 26px; font-size: 14px;
}
.footer-bar p { margin: 0 0 6px; }
.footer-disclosure { color: rgba(255, 255, 255, .58); font-size: 13px; margin: 0; }
.footer-disclosure a { font-size: 13px; color: rgba(255, 255, 255, .8); text-decoration: underline; }
