/* Final readability pass. Loaded after page-level styles so contrast rules win. */

:where(.definition-box, .verified-box, .warning-box, .tip-box, .answer-box) {
  color: #2f4347 !important;
}

:where(.main-content, body) :where(.definition-box, .verified-box, .warning-box, .tip-box, .answer-box) :where(p, li, span, div) {
  color: #3d4f53 !important;
}

:where(.main-content, body) :where(.definition-box, .verified-box, .warning-box, .tip-box, .answer-box) :where(strong, em) {
  color: #24383c !important;
}

:where(.main-content, body) :where(.definition-box, .verified-box, .warning-box, .tip-box, .answer-box) :where(a) {
  color: #8d351f !important;
  text-decoration: underline !important;
  text-underline-offset: 3px;
}

:where(.definition-box, .verified-box, .warning-box, .tip-box, .answer-box) :where(.def-label, .warn-label, .tip-label, .v-label, .a-label) {
  color: #6f2f1f !important;
  font-weight: 700 !important;
}

.answer-box .a-label {
  color: #3f6450 !important;
}

/* ── Cards that stay dark/colored: keep white text ── */
:where(.sidebar-card.dark, .prev-article, .next-article) {
  color: #fff !important;
}

:where(.sidebar-card.dark, .prev-article, .next-article) :where(p, li, span, div) {
  color: rgba(255, 255, 255, 0.88) !important;
}

:where(.sidebar-card.dark, .prev-article, .next-article) :where(h1, h2, h3, h4, strong, .sidebar-card-title) {
  color: #fff !important;
}

:where(.sidebar-card.dark, .prev-article, .next-article) :where(a) {
  color: #f0cc70 !important;
}

/* ── Lightened callout cards (June 2026 — were dark teal) ──
   These force the light treatment over any page-level inline dark rule.
   contrast-fixes loads last, so !important wins regardless of inline order.
   Backgrounds: answer-box & status & stat = sage/mist; related & hub = warm cream. */
.answer-box      { background: #eef4ef !important; border: 1px solid #cbdcd0 !important; border-left: 4px solid var(--sage) !important; }
.related-article { background: #f3efe7 !important; border: 1px solid #e3dccf !important; border-left: 3px solid var(--gold) !important; box-shadow: 0 1px 2px rgba(26,43,47,.05) !important; }
.related-article:hover { background: #ece6db !important; }
.guide-status-card { background: var(--mist) !important; border: 1px solid #c8d8ca !important; border-top: 3px solid var(--sage) !important; }
.hub-nav-card    { background: #f3efe7 !important; border: 1px solid #e3dccf !important; }
.hub-nav-card:hover { background: #ece6db !important; border-bottom-color: var(--gold) !important; }
.stat-callout    { background: var(--mist) !important; border: 1px solid #c8d8ca !important; border-left: 4px solid var(--sage) !important; }

/* text inside the lightened cards */
:where(.related-article, .guide-status-card, .hub-nav-card, .stat-callout) {
  color: #2f4347 !important;
}
:where(.related-article, .guide-status-card, .hub-nav-card, .stat-callout) :where(p, li, span, div) {
  color: #41595c !important;
}
:where(.related-article, .guide-status-card, .hub-nav-card, .stat-callout) :where(h1, h2, h3, h4, strong, .hn-title) {
  color: var(--deep) !important;
}
:where(.related-article, .guide-status-card, .hub-nav-card, .stat-callout) :where(a) {
  color: #8d351f !important;
}

/* accents that were gold/white on dark → readable on the light fill */
.related-article .nav-label { color: #a0561f !important; }
.guide-status-eyebrow { color: #3f6450 !important; }
.guide-status-card h4 { border-bottom-color: rgba(26, 43, 47, 0.1) !important; }
.stat-callout .big-num { color: #3f6450 !important; }
.stat-callout .stat-text strong { color: var(--deep) !important; }

:where(.req-num, .opt-num, .req-check, .badge-yes) {
  background: #496f58 !important;
  color: #fff !important;
}

:where(.state-badge) {
  color: rgba(255, 255, 255, 0.88) !important;
}

footer {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  gap: 20px !important;
  padding: 48px 60px !important;
}

footer :where(.footer-logo) {
  justify-self: auto !important;
}

footer :where(.footer-note) {
  max-width: 380px !important;
  text-align: center !important;
  justify-self: auto !important;
}

footer :where(.footer-links) {
  display: flex !important;
  gap: 24px !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  justify-self: auto !important;
}

footer :where(.footer-copy) {
  text-align: center !important;
  width: auto !important;
  padding-top: 4px !important;
}

@media (max-width: 1100px) {
  footer { padding: 40px 32px !important; }
}

@media (max-width: 640px) {
  footer { padding: 36px 20px !important; }
}
