/* Shared integration rules for the supplied BHG and Verywell Health templates. */
* { box-sizing: border-box; }
body.theme-1 { --site-accent: #b6206c; --site-line: #dfd9d6; }
body.theme-2 { --site-accent: #176d7b; --site-line: #ccdedf; }
body { overflow-wrap: anywhere; }
main, section, article, .feature-copy, .health-feature-copy, .card-copy, .reading-next { min-width: 0; }
a:focus-visible, input:focus-visible { outline: 3px solid var(--site-accent); outline-offset: 5px; }
.skip-link { position: absolute; top: -100px; left: 16px; z-index: 10000; padding: 12px 18px; background: #fff; color: #222; }
.skip-link:focus { top: 12px; }
.home-intro h1, .health-intro h1 { max-width: 850px; }
.bhg-feature .feature-copy h2 { font-size: clamp(30px, 3.5vw, 50px); line-height: 1.12; }
.bhg-feature .feature-copy h2 a, .health-feature-copy h2 a { color: inherit; text-decoration: none; }
.bhg-feature .feature-copy > p, .health-feature-copy > p:not(.story-meta) { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
.card-summary { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; font-size: 15px; line-height: 1.65; margin: 12px 0 0; }
.story-meta { display: block; margin: 12px 0 0; font-size: 12px; line-height: 1.6; }
.feature-copy .story-meta { color: inherit; }
.article-tags { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 12px 0 0; padding: 0; list-style: none; font-size: 12px; line-height: 1.6; }
.article-tags li { max-width: 100%; }
.article-tags li::before { content: '#'; }
.site-pagination { display: flex; justify-content: flex-end; padding-block: 24px 64px; }
.site-pagination a { display: inline-flex; align-items: center; gap: 18px; min-height: 44px; }
.site-pagination svg, .end-link svg { width: 20px; height: 20px; flex-shrink: 0; }
.empty-state { padding-block: 64px; min-height: 280px; }
.empty-state h2 { font-size: 30px; }
.empty-state p { font-size: 16px; line-height: 1.7; }
.integrated-detail { width: min(1120px, calc(100% - 64px)); max-width: 100%; margin: 0 auto; padding: 64px 0 72px; }
.integrated-detail .article-detail { display: block; width: 100%; max-width: 100%; min-width: 0; margin: 0; padding: 0; }
.integrated-detail .article-header { display: block; width: 100%; max-width: 100%; margin: 0 0 40px; padding: 0; }
.integrated-article-heading { max-width: 1020px; }
.integrated-article-heading h1 { max-width: 100%; margin: 24px 0 20px; font-size: clamp(32px, 4vw, 52px); line-height: 1.12; overflow-wrap: anywhere; }
.integrated-article-heading .article-subheading { max-width: 850px; margin: 0 0 20px; font-size: 19px; line-height: 1.65; }
.integrated-article-heading .story-meta { margin: 0; }
.back-link { display: inline-flex; min-height: 44px; align-items: center; color: var(--site-accent); font-size: 14px; }
.integrated-detail .article-content { display: block; width: 100%; max-width: 780px; margin: 0; padding: 0; }
.prose { display: flow-root; min-width: 0; max-width: 100%; font-size: 18px; line-height: 1.9; overflow-wrap: anywhere; }
.prose h1, .prose h2, .prose h3, .prose h4 { margin: 1.5em 0 .65em; line-height: 1.35; scroll-margin-top: 100px; }
.prose h1 { font-size: 32px; }
.prose h2 { font-size: 28px; }
.prose h3 { font-size: 24px; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.25em; }
.prose ul, .prose ol { padding-left: 1.5em; list-style: revert; }
.prose li { margin-bottom: .45em; }
.prose a { color: var(--site-accent); text-decoration: underline; text-underline-offset: 3px; }
.prose img, .prose video { max-width: 100%; height: auto; }
.prose iframe, .prose object, .prose embed { display: none; }
.prose pre { display: block; max-width: 100%; overflow-x: auto; padding: 20px; margin-block: 24px; background: #f3f4f4; font: 14px/1.7 Consolas, monospace; white-space: pre; }
.prose code { font-family: Consolas, monospace; }
.prose table { display: block; width: max-content; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin-block: 24px; font-size: 15px; }
.prose th, .prose td { min-width: 100px; border: 1px solid var(--site-line); padding: 10px 14px; }
.prose th { font-weight: 700; background: #f3f4f4; }
.prose blockquote { margin: 24px 0; border-left: 3px solid var(--site-accent); padding: 8px 24px; }
.end-link { display: inline-flex; align-items: center; gap: 16px; min-height: 44px; margin-top: 30px; color: var(--site-accent); text-decoration: underline; text-underline-offset: 5px; font-size: 15px; }
.related-stories { margin-top: 64px; padding-top: 32px; border-top: 1px solid var(--site-line); }
.related-stories > h2 { margin-bottom: 28px; font-size: 30px; }
.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 28px; }
.related-grid .card-media img { display: block; width: 100%; height: auto; aspect-ratio: 1.5; object-fit: cover; }
.related-grid .card-copy { padding-top: 16px; }
.related-grid h3 { margin: 0; font-size: 23px; line-height: 1.3; }
.related-grid h3 a { color: inherit; text-decoration: none; }
.related-grid h3 a:hover { text-decoration: underline; }
.page-detail .site-footer { padding: 48px 0 20px; border-top: 1px solid var(--site-line); background: #faf7f8; color: #333; }
.page-detail.verywellhealth .site-footer { background: #103f4a; color: #fff; }
.page-detail .site-footer .wrap { width: min(1280px, calc(100% - 64px)); margin-inline: auto; }
.page-detail .footer-top, .page-detail .footer-bottom { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
.page-detail .footer-brand { font-size: 26px; font-weight: 700; color: inherit; }
.page-detail .footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.page-detail .footer-links a, .page-detail .footer-bottom a { color: inherit; }
.page-detail .footer-bottom { margin-top: 32px; font-size: 12px; }
.page-detail .footer-bottom p { margin: 0 0 16px; }
/* Archived desktop header dimensions adapt to narrow screens. */
.page-detail .mm-nav-header-nav__list { width: auto !important; }
.page-detail .mm-nav-header__menu-top { max-width: 100%; }
@media (max-width: 760px) {
    .integrated-detail { width: calc(100% - 40px); padding-block: 32px 48px; }
    .integrated-detail .article-header { margin-bottom: 28px; }
    .integrated-article-heading h1 { font-size: 34px; line-height: 1.18; }
    .integrated-article-heading .article-subheading { font-size: 17px; }
    .prose { font-size: 16px; line-height: 1.85; }
    .prose h1 { font-size: 28px; }
    .prose h2 { font-size: 25px; }
    .prose h3 { font-size: 22px; }
    .prose pre { padding: 14px; font-size: 13px; }
    .related-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    .related-stories { margin-top: 40px; }
    .related-grid h3 { font-size: 25px; }
    .page-detail .site-footer .wrap { width: calc(100% - 40px); }
    .page-detail .footer-top, .page-detail .footer-bottom { flex-direction: column; }
    .site-pagination { padding-bottom: 40px; }
    .bhg-feature .feature-copy h2 { font-size: 34px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
/* Detail headers participate in normal flow so article links remain reachable. */
.page-detail > header { position: relative !important; top: auto !important; }
/* Compact archive-inspired header with working CSS navigation on article pages. */
body.page-detail { padding-top: 0 !important; }
.imported-article-header { border-bottom: 1px solid var(--site-line); background: #fff; }
.imported-header-inner { display: flex; align-items: center; gap: 32px; width: min(1220px, calc(100% - 64px)); min-height: 72px; margin: auto; }
.article-brand { display: inline-flex; align-items: center; flex: 0 1 320px; min-width: 0; color: #b6206c; }
.article-nav { display: flex; align-items: center; gap: 28px; min-width: 0; flex: 1; }
.article-nav a, .article-all-link { display: inline-flex; align-items: center; min-height: 44px; color: inherit; font-size: 14px; font-weight: 700; text-decoration: none; }
.article-nav a:hover, .article-all-link:hover { color: var(--site-accent); text-decoration: underline; text-underline-offset: 5px; }
.article-all-link { margin-left: auto; gap: 12px; white-space: nowrap; }
.article-menu-toggle { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; cursor: pointer; }
.article-menu-toggle svg { width: 24px; height: 24px; }
.imported-article-header .static-menu-check { position: absolute; width: 1px; height: 1px; opacity: 0; }
.imported-article-header .static-menu-check:focus-visible ~ .imported-header-inner .article-menu-toggle { outline: 3px solid var(--site-accent); outline-offset: 3px; }
@media (max-width: 1000px) { .article-nav { gap: 16px; } .imported-header-inner { gap: 24px; } }
@media (max-width: 760px) {
    .imported-header-inner { width: calc(100% - 32px); min-height: 66px; flex-wrap: wrap; gap: 0 12px; }
    .article-menu-toggle { display: inline-flex; }
    .article-all-link { font-size: 12px; }
    .article-nav { display: none; order: 5; flex: 1 0 100%; flex-wrap: wrap; padding: 12px 0; gap: 8px 24px; }
    .imported-article-header .static-menu-check:checked ~ .imported-header-inner .article-nav { display: flex; }
}
.verywellhealth .article-brand { color: #124555; }

/* Each binding supplies its own domain wordmark through site.domain. */
.domain-brand { overflow-wrap: anywhere; text-decoration: none; line-height: 1.15; letter-spacing: -.03em; }
.bhg .domain-brand { font-family: Georgia, serif; font-weight: 700; }
.bhg .header-inner .domain-brand { color: #b6206c; }
.verywellhealth .domain-brand { font-family: Albert, sans-serif; font-weight: 700; }
.verywellhealth .header-inner .domain-brand { color: #124555; }
.header-inner .brand.domain-brand { min-width: 0; max-width: 480px; flex: 0 1 auto; font-size: clamp(28px, 3vw, 42px); }
.page-index .header-inner { height: auto; min-height: 108px; padding-block: 16px; }
.header-actions { flex-shrink: 0; }
.article-brand.domain-brand { font-size: 28px; padding-block: 12px; }
.site-footer .footer-brand.domain-brand { max-width: min(480px, 100%); font-size: 28px; }
@media (max-width: 760px) {
    .page-index .header-inner { min-height: 82px; padding-block: 12px; }
    .header-inner .brand.domain-brand { flex: 1; font-size: 26px; }
    .article-brand.domain-brand { flex: 1; font-size: 23px; }
    .site-footer .footer-brand.domain-brand { font-size: 26px; }
}
.prose .article-auto-image { margin: 24px 0; max-width: 100%; }
.prose .article-auto-image img { display: block; width: 100%; height: auto; margin: 0 auto; }
.story-card .card-media img { width: 100%; height: 100%; object-fit: cover; }

.theme-1 .information-page { padding-block: 48px 72px; }
.theme-1 .information-page > h1 { font-size: clamp(32px, 5vw, 52px); line-height: 1.15; margin-bottom: 28px; }
.theme-1 .information-page .prose { max-width: 800px; }
.theme-1 .footer-links { flex-wrap: wrap; }
.theme-1 .information-lead { font-size: clamp(20px, 2vw, 24px); line-height: 1.6; }
.theme-1 .information-contact { border-top: 1px solid currentColor; margin-top: 48px; padding-top: 12px; }
.theme-1 .information-page .prose a { text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.theme-1 .information-toc { margin-block: 28px 36px; padding: 20px 24px; background: #f5f1f3; border-left: 3px solid var(--site-accent); }
.theme-1 .information-toc h2 { margin-top: 0; font-size: 22px; }
.theme-1 .information-toc ul { margin-bottom: 0; }
.theme-1 .information-page .prose { color: #292929; }
.theme-1 .information-page h2[id] { scroll-margin-top: 100px; }
@media (max-width: 760px) { .theme-1 .information-page .prose { font-size: 18px; line-height: 1.8; } }
/* Theme 1: static reader navigation and accessible article layout. */
body.theme-1 { --site-accent: #962058; }
.theme-1 :is(a, summary, button, [tabindex]):focus-visible { outline: 3px solid #174f79; outline-offset: 4px; }
.theme-1 .reader-header { position: relative; background: #fff; border-bottom: 1px solid var(--site-line); }
.theme-1 .reader-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 88px; }
.theme-1 .reader-brand { color: var(--site-accent); font-size: clamp(26px, 3vw, 40px); font-weight: 700; }
.theme-1 .reader-desktop-nav { display: flex; gap: 24px; flex-wrap: wrap; }
.theme-1 .reader-desktop-nav a, .theme-1 .reader-menu a { display: inline-flex; align-items: center; min-height: 44px; color: #292929; font-size: 16px; }
.theme-1 .reader-menu { display: none; }
.theme-1 .story-meta, .theme-1 .article-tags, .theme-1 .footer-bottom { font-size: 14px; line-height: 1.65; color: #454545; }
.theme-1 .card-summary { font-size: 17px; color: #454545; }
.theme-1 .reader-breadcrumb { margin-bottom: 24px; font-size: 15px; color: #454545; }
.theme-1 .reader-breadcrumb ol { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.theme-1 .reader-breadcrumb li + li::before { content: '/'; margin-right: 8px; }
.theme-1 .reader-breadcrumb a { color: var(--site-accent); text-decoration: underline; }
.theme-1 .reader-toc { padding: 24px; margin-bottom: 32px; background: #f5f1f3; border-left: 3px solid var(--site-accent); }
.theme-1 .reader-toc h2 { margin-top: 0; }
.theme-1 .reader-toc ol { margin-bottom: 0; }
.theme-1 .reader-toc ol ol { margin-top: 8px; }
.theme-1 .reader-feedback, .theme-1 .reader-links { border-top: 1px solid var(--site-line); margin-top: 32px; padding-top: 12px; }
.theme-1 .article-table-scroll { overflow-x: auto; max-width: 100%; margin-block: 24px; }
.theme-1 .article-table-scroll table { display: table; margin: 0; }
.theme-1 .prose { color: #292929; }
.theme-1 .article-heading { scroll-margin-top: 24px; }
.theme-1 .footer-links a { display: inline-flex; min-height: 44px; align-items: center; font-size: 15px; }
@media (max-width: 760px) {
    .theme-1 .reader-header-inner { min-height: 76px; flex-wrap: wrap; gap: 0 16px; padding-block: 12px; }
    .theme-1 .reader-brand { max-width: calc(100% - 92px); }
    .theme-1 .reader-desktop-nav { display: none; }
    .theme-1 .reader-menu { display: block; margin-left: auto; }
    .theme-1 .reader-menu summary { display: list-item; min-height: 44px; padding: 10px 8px; cursor: pointer; color: #292929; font-size: 16px; }
    .theme-1 .reader-menu[open] { width: 100%; margin-top: 8px; }
    .theme-1 .reader-menu nav { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--site-line); padding-top: 8px; }
    .theme-1 .prose { font-size: 18px; line-height: 1.8; }
    .theme-1 .integrated-article-heading .article-subheading { font-size: 18px; }
    .theme-1 .reader-toc { padding: 20px 16px; }
}
.theme-1 .reader-header-inner { width: min(1280px, calc(100% - 64px)); margin-inline: auto; }
.theme-1 .reader-header a { text-decoration: underline; text-underline-offset: 4px; }
.theme-1 .reader-header .reader-brand { text-decoration: none; }
@media (max-width: 760px) { .theme-1 .reader-header-inner { width: calc(100% - 40px); } }

/* Theme 2 reader components retain the teal palette. */
.theme-2 .information-page { padding-block: 48px 72px; }
.theme-2 .information-page > h1 { font-size: clamp(32px, 5vw, 52px); line-height: 1.15; margin-bottom: 28px; }
.theme-2 .information-page .prose { max-width: 800px; }
.theme-2 .footer-links { flex-wrap: wrap; }
.theme-2 .information-lead { font-size: clamp(20px, 2vw, 24px); line-height: 1.6; }
.theme-2 .information-contact { border-top: 1px solid currentColor; margin-top: 48px; padding-top: 12px; }
.theme-2 .information-page .prose a { text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.theme-2 .information-toc { margin-block: 28px 36px; padding: 20px 24px; background: #edf5f5; border-left: 3px solid var(--site-accent); }
.theme-2 .information-toc h2 { margin-top: 0; font-size: 22px; }
.theme-2 .information-toc ul { margin-bottom: 0; }
.theme-2 .information-page .prose { color: #292929; }
.theme-2 .information-page h2[id] { scroll-margin-top: 100px; }
@media (max-width: 760px) { .theme-2 .information-page .prose { font-size: 18px; line-height: 1.8; } }
/* Theme 1: static reader navigation and accessible article layout. */
body.theme-2 { --site-accent: #176d7b; }
.theme-2 :is(a, summary, button, [tabindex]):focus-visible { outline: 3px solid #174f79; outline-offset: 4px; }
.theme-2 .reader-header { position: relative; background: #fff; border-bottom: 1px solid var(--site-line); }
.theme-2 .reader-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 88px; }
.theme-2 .reader-brand { color: var(--site-accent); font-size: clamp(26px, 3vw, 40px); font-weight: 700; }
.theme-2 .reader-desktop-nav { display: flex; gap: 24px; flex-wrap: wrap; }
.theme-2 .reader-desktop-nav a, .theme-2 .reader-menu a { display: inline-flex; align-items: center; min-height: 44px; color: #292929; font-size: 16px; }
.theme-2 .reader-menu { display: none; }
.theme-2 .story-meta, .theme-2 .article-tags, .theme-2 .footer-bottom { font-size: 14px; line-height: 1.65; color: #454545; }
.theme-2 .card-summary { font-size: 17px; color: #454545; }
.theme-2 .reader-breadcrumb { margin-bottom: 24px; font-size: 15px; color: #454545; }
.theme-2 .reader-breadcrumb ol { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.theme-2 .reader-breadcrumb li + li::before { content: '/'; margin-right: 8px; }
.theme-2 .reader-breadcrumb a { color: var(--site-accent); text-decoration: underline; }
.theme-2 .reader-toc { padding: 24px; margin-bottom: 32px; background: #edf5f5; border-left: 3px solid var(--site-accent); }
.theme-2 .reader-toc h2 { margin-top: 0; }
.theme-2 .reader-toc ol { margin-bottom: 0; }
.theme-2 .reader-toc ol ol { margin-top: 8px; }
.theme-2 .reader-feedback, .theme-2 .reader-links { border-top: 1px solid var(--site-line); margin-top: 32px; padding-top: 12px; }
.theme-2 .article-table-scroll { overflow-x: auto; max-width: 100%; margin-block: 24px; }
.theme-2 .article-table-scroll table { display: table; margin: 0; }
.theme-2 .prose { color: #292929; }
.theme-2 .article-heading { scroll-margin-top: 24px; }
.theme-2 .footer-links a { display: inline-flex; min-height: 44px; align-items: center; font-size: 15px; }
@media (max-width: 760px) {
    .theme-2 .reader-header-inner { min-height: 76px; flex-wrap: wrap; gap: 0 16px; padding-block: 12px; }
    .theme-2 .reader-brand { max-width: calc(100% - 92px); }
    .theme-2 .reader-desktop-nav { display: none; }
    .theme-2 .reader-menu { display: block; margin-left: auto; }
    .theme-2 .reader-menu summary { display: list-item; min-height: 44px; padding: 10px 8px; cursor: pointer; color: #292929; font-size: 16px; }
    .theme-2 .reader-menu[open] { width: 100%; margin-top: 8px; }
    .theme-2 .reader-menu nav { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--site-line); padding-top: 8px; }
    .theme-2 .prose { font-size: 18px; line-height: 1.8; }
    .theme-2 .integrated-article-heading .article-subheading { font-size: 18px; }
    .theme-2 .reader-toc { padding: 20px 16px; }
}
.theme-2 .reader-header-inner { width: min(1280px, calc(100% - 64px)); margin-inline: auto; }
.theme-2 .reader-header a { text-decoration: underline; text-underline-offset: 4px; }
.theme-2 .reader-header .reader-brand { text-decoration: none; }
@media (max-width: 760px) { .theme-2 .reader-header-inner { width: calc(100% - 40px); } }

.theme-2 .footer-bottom { color: #fff; }
.theme-2 .policy-date { font-size: 14px; line-height: 1.65; }
.theme-2 .information-page { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
@media (max-width:760px) { .theme-2 .information-page { width: calc(100% - 40px); } }
/* Keep archive homepage copy legible alongside the article reader. */
.theme-2 .health-intro p, .theme-2 .health-feature-copy > p:not(.story-meta), .theme-2 .spotlight-inner p { font-size: 18px; line-height: 1.75; }
.theme-2 .underlined, .theme-2 .button, .theme-2 .health-paths a { font-size: 16px; min-height: 44px; display: inline-flex; align-items: center; }
.theme-2 .category { font-size: 14px; }
.theme-2 .reader-breadcrumb, .theme-2 .information-page, .theme-2 .reader-links { overflow-wrap: anywhere; }
.theme-2 .health-paths > div { flex-wrap: wrap; }
