/* ==========================================================================
   benefitcheck.org
   Palette and type carried from the original balancedfinance theme:
     #001144 header / icon        #152644 deep panel, headings
     #ffcc33 primary CTA          #202124 CTA text and hover ground
     #ededef footer ground        #70757e footer text
     #e1e1e1 borders              #fff / #000 / #333 base
   Roboto 400, 400 italic, 700 only.
   ========================================================================== */

:root {
  --navy:        #001144;
  --navy-deep:   #152644;
  --gold:        #ffcc33;
  --ink:         #202124;
  --footer-bg:   #ededef;
  --footer-fg:   #70757e;
  --border:      #e1e1e1;
  --body:        #333;
  --black:       #000;
  --white:       #fff;
  --muted-bg:    #f7f7f9;
  --wrap:        1140px;
  --wrap-narrow: 780px;
  --radius:      5px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.7;
  color: var(--body);
  background: var(--white);
}

img, picture, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--navy-deep); }
a:hover, a:focus { color: var(--navy); }

h1, h2, h3, h4 {
  font-weight: 700;
  color: var(--black);
  line-height: 1.25;
  margin: 0 0 .6em;
}
h1 { font-size: 2.4rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.3rem; }
p  { margin: 0 0 1.25em; }

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

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

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

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

.btn {
  display: inline-block;
  background: var(--gold);
  border: 2px solid var(--gold);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  padding: 13px 26px;
  border-radius: var(--radius);
  text-align: center;
  transition: background .15s, color .15s;
  cursor: pointer;
}
.btn:hover, .btn:focus {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--gold);
}
.btn-block { display: block; width: 100%; }

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

.site-header { background: var(--navy); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 14px;
  padding-bottom: 14px;
}

/* The source theme sized the logo at 32px tall; kept. */
.site-logo { margin: 0; line-height: 0; }
.site-logo img { height: 32px; width: auto; }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, .5);
  color: var(--white);
  font: 700 .95rem Roboto, Arial, sans-serif;
  padding: 8px 14px;
  border-radius: var(--radius);
  cursor: pointer;
}
.nav-toggle-bar {
  width: 18px; height: 2px; background: currentColor;
  box-shadow: 0 5px 0 currentColor, 0 -5px 0 currentColor;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.site-nav > ul > li { position: relative; }
.site-nav a {
  display: block;
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
  font-size: .95rem;
  padding: 9px 13px;
  border-radius: var(--radius);
}
.site-nav a:hover,
.site-nav a:focus,
.site-nav a[aria-current="page"] {
  background: var(--gold);
  color: var(--ink);
}

.site-nav .subnav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--navy-deep);
  padding: 6px;
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  z-index: 20;
  flex-direction: column;
}
.site-nav .has-children:hover > .subnav,
.site-nav .has-children:focus-within > .subnav { display: flex; }

/* ---------- home ---------- */

.home-hero { padding: 30px 0 10px; text-align: center; }
.home-hero h1 { font-size: 2.6rem; margin-bottom: .6em; }
.home-hero-img { margin: 0 0 1.5em; }
.home-hero-img img { border-radius: var(--radius); width: 100%; }
.home-hero p { max-width: 760px; margin-inline: auto; }

.section-title {
  text-align: center;
  margin: 1.8em 0 1em;
  font-size: 1.6rem;
}

/* The four category buttons the source homepage had, at its own 24px scale. */
.option-grid {
  list-style: none;
  margin: 0 0 1em;
  padding: 0;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, 1fr);
}
.option-grid .btn { font-size: 1.25rem; padding: 17px 10px; }

.card-grid {
  display: grid;
  gap: 26px;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 2em;
}
.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--white);
}
.card-thumb img { width: 100%; }
.card-body { padding: 18px 18px 20px; }
.card-body h3 { font-size: 1.15rem; margin-bottom: .4em; }
.card-body h3 a { color: var(--black); text-decoration: none; }
.card-body h3 a:hover { color: var(--navy-deep); }
.card-body p { margin-bottom: .8em; font-size: .95rem; }

/* ---------- layout with sidebar ---------- */

.site-main { padding: 34px 0 60px; }

.layout.has-sidebar {
  display: grid;
  gap: 40px;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: start;
}

/* ---------- entries ---------- */

.entry-header { margin-bottom: 1.4em; }
.entry-meta {
  font-size: .9rem;
  color: var(--footer-fg);
  margin-bottom: .5em;
}
.entry-meta time { font-style: italic; }
.entry-meta a { color: var(--footer-fg); }
.entry-meta .sep { margin: 0 .5em; }

.entry-featured { margin: 0 0 1.6em; }
.entry-featured img { border-radius: var(--radius); width: 100%; }

.entry-content h2 { margin-top: 1.4em; font-size: 1.5rem; }
.entry-content h3 { margin-top: 1.3em; }
.entry-content ul, .entry-content ol { margin: 0 0 1.25em; padding-left: 1.3em; }
.entry-content li { margin-bottom: .4em; }
.entry-content a { text-decoration: underline; }
.entry-content .btn { text-decoration: none; }

.cat-chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 2em 0 0;
  border-top: 1px solid var(--border);
  padding-top: 1.2em;
}
.cat-chips a {
  display: inline-block;
  background: var(--muted-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 15px;
  font-size: .88rem;
  text-decoration: none;
}

/* ---------- listings ---------- */

.page-intro { font-size: 1.05rem; margin-bottom: 1.6em; }

.post-list { list-style: none; margin: 0; padding: 0; }
.post-list > li {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 22px;
  padding-bottom: 26px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--border);
}
.post-list img { border-radius: var(--radius); width: 100%; }
.post-list h2 { font-size: 1.4rem; margin-bottom: .3em; }
.post-list h2 a { color: var(--black); text-decoration: none; }
.post-list h2 a:hover { color: var(--navy-deep); }
.post-list-plain > li { grid-template-columns: 1fr; }
.more a { font-weight: 700; text-decoration: none; }

.empty-state {
  background: var(--muted-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 26px;
}
.empty-state p:last-child { margin-bottom: 0; }

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

.sidebar .widget {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 18px 20px;
  margin-bottom: 24px;
  background: var(--white);
}
.widget-title {
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--navy-deep);
  border-bottom: 2px solid var(--gold);
  padding-bottom: .5em;
  margin-bottom: .9em;
}
.sidebar ul { list-style: none; margin: 0; padding: 0; }

.recent-posts li {
  display: grid;
  grid-template-columns: 75px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-bottom: 14px;
}
.recent-posts img { border-radius: 4px; }
.recent-posts a { text-decoration: none; font-weight: 700; font-size: .93rem; }
.recent-posts time { display: block; font-size: .82rem; color: var(--footer-fg); font-style: italic; }

.cat-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
}
.cat-list li:last-child { border-bottom: 0; }
.cat-list a { text-decoration: none; font-weight: 700; }
.cat-list .count {
  background: var(--muted-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  min-width: 28px;
  text-align: center;
  font-size: .82rem;
}

.notice {
  background: var(--muted-bg);
  border-left: 4px solid var(--gold);
  padding: 14px 16px;
  font-size: .9rem;
}
.notice p { margin: 0; }

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

.site-footer { background: var(--footer-bg); color: var(--footer-fg); margin-top: 40px; }
.footer-top { padding: 40px 0 26px; }
.footer-cols {
  display: grid;
  gap: 34px;
  grid-template-columns: repeat(3, 1fr);
}
.site-footer .widget-title {
  color: var(--navy-deep);
  border-bottom-color: var(--gold);
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: var(--footer-fg); text-decoration: none; }
.site-footer a:hover, .site-footer a:focus { color: var(--navy); text-decoration: underline; }
.recent-list time { display: block; font-size: .82rem; font-style: italic; }

.footer-bar {
  border-top: 1px solid #dcdce0;
  padding: 18px 0;
  font-size: .88rem;
}
.footer-bar .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  align-items: center;
  justify-content: space-between;
}
.footer-bar p { margin: 0; }
.footer-bar nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
/* Tagline exists in WordPress but the source theme never rendered it. */
.footer-tagline { display: block; font-style: italic; }

/* ---------- responsive ---------- */

@media (max-width: 1000px) {
  .layout.has-sidebar { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    flex-basis: 100%;
    padding-bottom: 8px;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 2px; }
  .site-nav .subnav {
    display: flex;
    position: static;
    box-shadow: none;
    background: transparent;
    padding: 0 0 0 14px;
  }
}

@media (max-width: 640px) {
  h1 { font-size: 1.8rem; }
  .home-hero h1 { font-size: 1.9rem; }
  .section-title { font-size: 1.35rem; }
  .option-grid,
  .card-grid,
  .footer-cols { grid-template-columns: 1fr; }
  .option-grid .btn { font-size: 1.1rem; }
  .post-list > li { grid-template-columns: 1fr; }
  .footer-bar .wrap { justify-content: flex-start; }
}
