/* Focused mobile repairs; keep the existing desktop layout and editorial design. */
.tph-contents-toggle { display: none; }
/* The repaired fallback menu also needs a readable header on larger screens. */
@media (min-width: 960px) {
 body #site-header:has(.tph-header-links) { position: relative; background: #fff; }
 body #site-header:has(.tph-header-links) #site-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: auto; min-height: 80px; }
 body #site-header:has(.tph-header-links) #site-logo,
 body #site-header:has(.tph-header-links) #site-logo-inner { display: flex; align-items: center; height: auto; max-width: none; }
 body #site-header:has(.tph-header-links) a.site-logo-text { color: #152d3d; font-size: 22px; line-height: 1.25; }
 body #site-header .tph-header-links > li > a { color: #152d3d; line-height: 1.5; padding-block: 16px; }
}
@media (max-width: 959px) {
 body #site-header.transparent-header { position: relative; background: #fff; }
 body #site-header #site-header-inner { gap: 12px; height: auto; min-height: 72px; }
 body #site-header #site-logo { flex: 1 1 auto; min-width: 0; max-width: none; }
 body #site-header #site-logo #site-logo-inner { max-width: none; }
 body #site-header #site-logo a.site-logo-text { font-size: 20px; line-height: 1.25; color: #152d3d; }
 body #site-header .mobile-menu[aria-expanded="false"] .oceanwp-close-text,
 body #site-header .mobile-menu[aria-expanded="true"] .oceanwp-text { display: none; }
 body #site-header .oceanwp-mobile-menu-icon > button.mobile-menu { font-size: 16px; flex-shrink: 0; }
 body #mobile-dropdown { max-height: 75vh; max-height: 75dvh; overflow-y: auto; }
 body #mobile-dropdown .tph-header-links { margin: 0; list-style: none; }
 body #mobile-dropdown .tph-header-links a { display: flex; align-items: center; min-height: 48px; padding: 10px 24px; font-size: 16px; line-height: 1.5; color: #152d3d; }
 body #mobile-dropdown input[type="search"],
 body #eckb-article-header input[type="text"],
 body #eckb-article-header input[type="search"] { font-size: 16px !important; }
 body #mobile-menu-search button { min-width: 48px; min-height: 48px; }
 body .tph-contents-toggle { display: flex; align-items: center; width: 100%; min-height: 48px; padding: 10px 8px; border: 0; background: transparent; color: #152d3d; font: 600 16px/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; text-align: left; text-transform: none; letter-spacing: 0; cursor: pointer; }
 .tph-contents-toggle:focus-visible { outline: 3px solid #99512f; outline-offset: 2px; }
 .tph-contents-label { display: none; }
 .tph-contents-enhanced .eckb-article-toc-outline[hidden] { display: none !important; }
 body #eckb-article-body .eckb-article-toc ul a { display: block; min-height: 44px; padding-block: 10px; font-size: 16px !important; line-height: 1.5; }
 body #eckb-article-content :is(h2, h3, h4)[id] { scroll-margin-top: 20px; }
}
@media (max-width: 767px) {
 .tph-library-mobile-nav summary { display: flex; align-items: center; min-height: 48px; padding: 10px 8px; font-size: 16px; cursor: pointer; }
 #library-search { scroll-margin-top: 20px; }
 .tph-library-mobile-nav[open] nav { max-height: 75vh; max-height: 75dvh; overflow-y: auto; }
 .tph-library-page .tph-library-mobile-nav nav a { display: flex; align-items: center; min-height: 48px; font-size: 16px; }
 body.tph-library-page .tph-library-search #epkb-ml__module-search #epkb-ml-search-classic-layout #epkb-ml-search-form #epkb-ml-search-box .epkb-ml-search-box__input { font-size: 16px !important; }
 .tph-library-page .tph-library-text-link,
 .tph-library-page .tph-library-subject a,
 .tph-library-country-links a,
 .tph-library-case-links a,
 .tph-library-context-links a,
 .tph-library-footer nav a,
 .tph-library-index a,
 .tph-library-country-index a,
 .tph-library-more-cases a { display: flex; align-items: center; min-height: 44px; padding-block: 8px; font-size: 16px; line-height: 1.5; }
 .tph-library-page .tph-library-subject--methods a { font-size: 16px; }
 .tph-library-page .tph-library-start-card p { font-size: 16px; }
 .tph-library-page .tph-library-start-card .tph-library-text-link { max-width: 100%; width: fit-content; }
 .tph-library-start-card .tph-library-art { bottom: 62px; width: 100px; height: 100px; }
 .tph-library-page .tph-library-start-card p { width: auto; max-width: calc(100% - 90px); }
 .tph-library-index summary,
 .tph-library-country-index summary,
 .tph-library-more-cases summary { min-height: 48px; padding-block: 12px; }
}
@media (max-width: 359px) {
 .tph-library-page .tph-library-subject { grid-template-columns: minmax(0, 1fr) 80px; }
 .tph-library-subject .tph-library-art { width: 80px; height: 80px; }
 .tph-library-page .tph-library-start-card p { max-width: 100%; }
 .tph-library-start-card .tph-library-art { display: none; }
 body #site-header #site-logo a.site-logo-text { font-size: 18px; }
}
@media print {
 .tph-contents-toggle { display: none !important; }
 .tph-contents-label { display: inline !important; }
 .tph-contents-enhanced .eckb-article-toc-outline[hidden] { display: block !important; }
}
