/*
Theme Name: BooksOfMedical
Theme URI: https://booksofmedical.com/
Author: BooksOfMedical
Author URI: https://booksofmedical.com/
Description: BooksOfMedical — medical knowledge, study and practice resources for healthcare learners and professionals: medical specialties, original MCQs, clinical cases, study notes, drug knowledge, procedures, and 319 SEO health calculators in 10 categories (General Health, Nutrition, Blood Pressure & Heart, Diabetes, Pregnancy & Women's Health, Baby & Child Growth, Fitness, Temperature & Vital Signs, Medication & Dosage, Sleep & Lifestyle), each on its own page.
Version: 2.12.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: booksofmedical
Tags: medical, health, calculator, education, custom-menu, featured-images, threaded-comments
*/

/* Calculator design lives in assets/css/booksofmedical.css. This file
   holds the theme header above plus the styles WordPress content pages
   and the homepage need. */

:root {
  --bom-navy: #0f2a3d;
  --bom-navy-2: #12394f;
  --bom-teal: #0e7490;
  --bom-teal-2: #0d9488;
  --bom-ink: #1e293b;
  --bom-muted: #64748b;
  --bom-line: #e2e8f0;
  --bom-bg: #f8fafc;
  --bom-card: #ffffff;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bom-bg); color: var(--bom-ink); font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; line-height: 1.6; }
a { color: var(--bom-teal); text-decoration: none; }
a:hover { color: var(--bom-navy); }
img { max-width: 100%; height: auto; }

/* --- Header --- */
.bom-header { background: var(--bom-navy); color: #fff; position: sticky; top: 0; z-index: 50; }
.bom-header-inner { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 18px; min-height: 64px; flex-wrap: wrap; }
.bom-brand { color: #fff; font-weight: 800; font-size: 20px; letter-spacing: -.3px; white-space: nowrap; }
.bom-brand span { color: #2dd4bf; }
.bom-brand:hover { color: #fff; }
.bom-nav { margin-left: auto; }
.bom-nav ul { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; flex-wrap: wrap; }
.bom-nav a { display: inline-block; padding: 9px 12px; border-radius: 9px; color: #cbd5e1; font-weight: 600; font-size: 14px; }
.bom-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.bom-nav .current-menu-item a, .bom-nav .current_page_item a { background: var(--bom-teal-2); color: #fff; }
@media (max-width: 860px) { .bom-nav { margin-left: 0; } }

/* --- Footer --- */
.bom-footer { background: var(--bom-navy); color: #cbd5e1; margin-top: 48px; }
.bom-footer-inner { max-width: 1200px; margin: 0 auto; padding: 36px 20px 28px; }
.bom-footer-menu ul { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0 0 16px; padding: 0; list-style: none; }
.bom-footer-menu a { color: #94a3b8; font-size: 14px; font-weight: 600; }
.bom-footer-menu a:hover { color: #fff; }
.bom-footer p { font-size: 13px; line-height: 1.7; margin: 6px 0; }
.bom-footer .bom-disclaimer { color: #94a3b8; }

/* --- Layout / cards --- */
.bom-page { max-width: 1200px; margin: 0 auto; padding: 28px 20px 40px; }
.bom-hero { background: linear-gradient(135deg, var(--bom-navy), var(--bom-teal)); color: #fff; border-radius: 18px; padding: 38px 34px; margin-bottom: 24px; }
.bom-hero .bom-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: #5eead4; }
.bom-hero h1 { margin: 8px 0 0; font-size: 32px; line-height: 1.2; letter-spacing: -.5px; }
.bom-hero p { margin: 10px 0 0; color: #dbeafe; font-size: 15px; max-width: 720px; }
.bom-hero .bom-hero-cta { display: inline-block; margin-top: 18px; background: #fff; color: var(--bom-navy); border-radius: 10px; padding: 11px 18px; font-weight: 700; font-size: 14px; }
.bom-section { margin-top: 32px; }
.bom-section h2 { font-size: 22px; margin: 0 0 4px; letter-spacing: -.3px; }
.bom-section > p { color: var(--bom-muted); margin: 0 0 16px; font-size: 14px; }
.bom-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 960px) { .bom-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .bom-grid { grid-template-columns: 1fr; } .bom-hero h1 { font-size: 26px; } }
.bom-card { background: var(--bom-card); border: 1px solid var(--bom-line); border-radius: 15px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 8px 24px rgba(15,42,61,.05); }
.bom-card:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(15,42,61,.10); }
.bom-card-thumb { display: block; }
.bom-card-thumb img { width: 100%; height: 180px; object-fit: cover; display: block; }
.bom-card-thumb-fallback { height: 140px; display: grid; place-items: center; background: linear-gradient(135deg, var(--bom-teal), var(--bom-teal-2)); color: #fff; font-size: 44px; font-weight: 800; }
.bom-card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.bom-card-meta { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--bom-teal); }
.bom-card-meta time { color: var(--bom-muted); font-weight: 600; text-transform: none; letter-spacing: 0; }
.bom-card-title { margin: 8px 0 0; font-size: 18px; line-height: 1.35; }
.bom-card-title a { color: var(--bom-ink); }
.bom-card-title a:hover { color: var(--bom-teal); }
.bom-card-excerpt { margin: 8px 0 0; color: var(--bom-muted); font-size: 14px; line-height: 1.6; flex: 1; }
.bom-card-link { margin-top: 14px; font-weight: 700; font-size: 14px; }
.bom-calc-card .bom-card-body { padding: 20px; }
.bom-calc-card .bom-calc-icon { font-size: 28px; }
.bom-calc-card h3 { margin: 8px 0 0; font-size: 17px; }
.bom-calc-card h3 a { color: var(--bom-ink); }
.bom-calc-card h3 a:hover { color: var(--bom-teal); }
.bom-layout { display: grid; grid-template-columns: 1fr 320px; gap: 22px; align-items: start; }
@media (max-width: 960px) { .bom-layout { grid-template-columns: 1fr; } }
.bom-panel { background: var(--bom-card); border: 1px solid var(--bom-line); border-radius: 15px; padding: 26px 28px; box-shadow: 0 8px 24px rgba(15,42,61,.05); }
.bom-panel h1 { margin: 4px 0 0; font-size: 28px; line-height: 1.25; letter-spacing: -.4px; }
.bom-byline { margin-top: 10px; color: var(--bom-muted); font-size: 13px; }
.bom-cta { background: var(--bom-navy); color: #fff; border-radius: 15px; padding: 22px; margin-top: 22px; }
.bom-cta h3 { margin: 0; font-size: 17px; }
.bom-cta p { margin: 6px 0 0; color: #94a3b8; font-size: 13px; line-height: 1.6; }
.bom-cta a.bom-cta-btn { display: block; margin-top: 14px; text-align: center; background: var(--bom-teal-2); color: #fff; border-radius: 10px; padding: 12px; font-weight: 700; font-size: 14px; }
.bom-pagination { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; font-size: 14px; font-weight: 700; }
.bom-pagination a { background: #fff; border: 1px solid var(--bom-line); border-radius: 10px; padding: 10px 16px; }
.bom-search-form { display: flex; gap: 8px; margin-top: 16px; max-width: 560px; }
.bom-search-form input[type="search"] { flex: 1; height: 43px; border: 1px solid #cbd5e1; background: #fff; border-radius: 10px; padding: 0 15px; outline: none; color: var(--bom-ink); }
.bom-search-form input[type="search"]:focus { border-color: var(--bom-teal); box-shadow: 0 0 0 3px rgba(14,116,144,.15); }
.bom-search-form button { border: 0; background: var(--bom-teal); color: #fff; border-radius: 10px; padding: 0 20px; font-weight: 700; cursor: pointer; }
.bom-empty { background: #fff; border: 1px dashed #cbd5e1; border-radius: 15px; padding: 32px; text-align: center; color: var(--bom-muted); }
.bom-404 { max-width: 620px; margin: 60px auto; text-align: center; background: #fff; border: 1px solid var(--bom-line); border-radius: 15px; padding: 44px 32px; }
.bom-404 .bom-404-code { font-size: 64px; font-weight: 800; color: var(--bom-teal); line-height: 1; }
.bom-widget { background: #fff; border: 1px solid var(--bom-line); border-radius: 15px; padding: 20px 22px; margin-bottom: 18px; }
.bom-widget .widget-title { margin: 0 0 12px; font-size: 15px; font-weight: 800; }
.bom-widget ul { margin: 0; padding: 0; list-style: none; }
.bom-widget li { padding: 6px 0; border-top: 1px solid #f1f5f9; font-size: 14px; }
.bom-widget li:first-child { border-top: 0; }

/* WordPress content typography inside panels. */
.booksofmedical-content a { text-decoration: underline; }
.booksofmedical-content p { margin-bottom: 1rem; line-height: 1.7; }
.booksofmedical-content h2, .booksofmedical-content h3, .booksofmedical-content h4 { font-weight: 800; color: var(--bom-navy); margin: 1.75rem 0 .75rem; line-height: 1.3; }
.booksofmedical-content h2 { font-size: 1.45rem; border-top: 1px solid var(--bom-line); padding-top: 1.25rem; }
.booksofmedical-content h3 { font-size: 1.15rem; }
.booksofmedical-content ul, .booksofmedical-content ol { margin: 0 0 1rem 1.25rem; }
.booksofmedical-content ul { list-style: disc; }
.booksofmedical-content ol { list-style: decimal; }
.booksofmedical-content blockquote { border-left: 4px solid var(--bom-teal); padding-left: 1rem; color: var(--bom-muted); margin-bottom: 1rem; }
.booksofmedical-content table { width: 100%; border-collapse: collapse; margin: 0 0 1rem; font-size: 14px; }
.booksofmedical-content th, .booksofmedical-content td { border: 1px solid var(--bom-line); padding: 8px 10px; text-align: left; }
.booksofmedical-content th { background: #f0fdfa; }

/* --- v2: dropdown menus, mobile toggle, category cards --- */
.bom-menu-toggle { display: none; border: 1px solid rgba(255,255,255,.35); background: transparent; color: #fff; border-radius: 9px; padding: 8px 12px; font-weight: 700; cursor: pointer; margin-left: auto; }
.bom-nav ul ul { display: none; position: absolute; top: 100%; left: 0; min-width: 260px; background: #12394f; border-radius: 0 0 12px 12px; padding: 8px; box-shadow: 0 16px 32px rgba(0,0,0,.3); z-index: 60; }
.bom-nav ul li { position: relative; }
.bom-nav ul li:hover > ul, .bom-nav ul li:focus-within > ul { display: block; }
.bom-nav ul ul li { display: block; }
.bom-nav ul ul a { display: block; padding: 8px 12px; white-space: normal; }
@media (max-width: 860px) {
  .bom-menu-toggle { display: inline-block; }
  .bom-nav { display: none; width: 100%; }
  .bom-nav.bom-nav-open { display: block; }
  .bom-nav ul { flex-direction: column; }
  .bom-nav ul ul { position: static; display: block; background: transparent; box-shadow: none; padding-left: 16px; }
}
.bom-cat-tools { margin: 10px 0 0; padding: 0; list-style: none; }
.bom-cat-tools li { padding: 4px 0; border-top: 1px solid #f1f5f9; font-size: 13.5px; }
.bom-cat-tools li a { color: var(--bom-ink); }
.bom-cat-tools li a:hover { color: var(--bom-teal); }
.bom-cat-count { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--bom-teal); }

/* --- v2.1 homepage: reference look — pale slate-blue page, white cards, icon squares --- */
body { background: #f1f5f9; }
.bom-page { max-width: 1280px; }
.bom-hero21 { background: linear-gradient(135deg, #0f2a44 0%, #0e7490 62%, #0d9488 100%); color: #fff; border-radius: 18px; padding: 44px 40px 36px; margin-bottom: 20px; box-shadow: 0 16px 36px rgba(15,42,68,.18); }
.bom-hero21 .bom-eyebrow { color: #5eead4; }
.bom-hero21 h1 { margin: 8px 0 0; font-size: 38px; line-height: 1.15; letter-spacing: -.6px; color: #fff; }
.bom-hero21 p.bom-hero-sub { margin: 12px 0 0; color: #dbeafe; font-size: 16px; max-width: 680px; }
.bom-search21 { margin-top: 22px; max-width: 640px; position: relative; }
.bom-search21 input[type="search"] { width: 100%; height: 52px; border: 0; border-radius: 13px; padding: 0 96px 0 46px; font: inherit; font-size: 15px; color: #0f2a44; background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.18); outline: none; }
.bom-search21 input[type="search"]:focus { box-shadow: 0 0 0 3px rgba(94,234,212,.55), 0 8px 24px rgba(0,0,0,.18); }
.bom-search21 .bom-search-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #64748b; display: flex; pointer-events: none; }
.bom-search21 .bom-search-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: #f1f5f9; color: #0f2a44; border-radius: 8px; padding: 7px 12px; font-weight: 700; font-size: 13px; cursor: pointer; }
.bom-search-results { display: none; position: absolute; left: 0; right: 0; top: calc(100% + 8px); background: #fff; color: #0f2a44; border-radius: 13px; box-shadow: 0 18px 40px rgba(15,42,68,.22); overflow: hidden; z-index: 20; }
.bom-search-results.bom-show { display: block; }
.bom-search-results a { display: flex; justify-content: space-between; gap: 12px; padding: 11px 16px; color: #0f2a44; font-weight: 600; font-size: 14px; border-top: 1px solid #f1f5f9; }
.bom-search-results a:first-child { border-top: 0; }
.bom-search-results a:hover { background: #f0fdfa; color: #0e7490; }
.bom-search-results .bom-sr-cat { color: #64748b; font-weight: 600; font-size: 12px; white-space: nowrap; }
.bom-search-results .bom-sr-none { padding: 14px 16px; color: #64748b; font-size: 14px; }
.bom-chips21 { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; align-items: center; }
.bom-chips21 span { color: #bae6fd; font-size: 13px; font-weight: 700; }
.bom-chips21 a { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28); color: #fff; border-radius: 999px; padding: 6px 13px; font-size: 13px; font-weight: 700; }
.bom-chips21 a:hover { background: #fff; color: #0f2a44; }
.bom-stats21 { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 24px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.22); }
.bom-stats21 div { font-size: 13px; color: #dbeafe; }
.bom-stats21 strong { display: block; font-size: 20px; color: #fff; line-height: 1.2; }
.bom-recent21 { background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 20px 22px; box-shadow: 0 8px 24px rgba(15,42,68,.05); margin-top: 20px; }
.bom-recent-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.bom-recent-head h2 { font-size: 17px; margin: 0; }
.bom-recent-head a { font-weight: 700; font-size: 14px; white-space: nowrap; }
.bom-recent-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
@media (max-width: 860px) { .bom-recent-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .bom-recent-grid { grid-template-columns: 1fr; } }
.bom-recent-item { display: flex; gap: 12px; align-items: center; border: 1px solid #e2e8f0; border-radius: 12px; padding: 12px 14px; color: #0f2a44; }
.bom-recent-item:hover { border-color: #0e7490; background: #f0fdfa; }
.bom-recent-item strong { display: block; font-size: 14px; line-height: 1.3; }
.bom-recent-item span { font-size: 12px; color: #64748b; }
.bom-icon-sq { flex: none; width: 40px; height: 40px; border-radius: 10px; background: #eef2ff; color: #0e7490; display: inline-flex; align-items: center; justify-content: center; }
.bom-icon-sq svg { width: 22px; height: 22px; }
.bom-section21 { margin-top: 36px; }
.bom-section21 > h2 { font-size: 23px; color: #0f2a44; }
.bom-section21 > p { color: #64748b; }
.bom-spec-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 1020px) { .bom-spec-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .bom-spec-grid { grid-template-columns: 1fr; } }
.bom-spec-card { display: flex; gap: 14px; align-items: center; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 18px; color: #0f2a44; box-shadow: 0 6px 18px rgba(15,42,68,.04); }
.bom-spec-card:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(15,42,68,.10); border-color: #0e7490; }
.bom-spec-card strong { display: block; font-size: 15px; line-height: 1.3; }
.bom-spec-card span { font-size: 13px; color: #64748b; }
.bom-spec-card .bom-spec-count { display: block; font-size: 12px; color: #0e7490; font-weight: 700; margin-top: 2px; }
.bom-cat-grid21 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 1020px) { .bom-cat-grid21 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .bom-cat-grid21 { grid-template-columns: 1fr; } }
.bom-cat-card21 { background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; box-shadow: 0 8px 24px rgba(15,42,68,.05); display: flex; flex-direction: column; overflow: hidden; }
.bom-cat-card21:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(15,42,68,.10); }
.bom-cat-card21 .bom-card-body { padding: 22px; }
.bom-cat-card21 h3 { margin: 12px 0 0; font-size: 19px; color: #0f2a44; }
.bom-cat-card21 h3 a { color: #0f2a44; }
.bom-cat-card21 h3 a:hover { color: #0e7490; }
.bom-cat-foot { margin-top: auto; padding: 0 22px 18px; }
.bom-cat-foot a { font-weight: 700; font-size: 14px; }
.bom-pop-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 1020px) { .bom-pop-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .bom-pop-grid { grid-template-columns: 1fr; } }
.bom-pop-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 22px; box-shadow: 0 8px 24px rgba(15,42,68,.05); display: flex; flex-direction: column; }
.bom-pop-card:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(15,42,68,.10); }
.bom-pop-card h3 { margin: 12px 0 0; font-size: 17px; color: #0f2a44; }
.bom-pop-card h3 a { color: #0f2a44; }
.bom-pop-card p { color: #64748b; font-size: 14px; margin: 8px 0 0; flex: 1; }
.bom-pop-card .bom-card-link { margin-top: 14px; }
.bom-steps21 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px) { .bom-steps21 { grid-template-columns: 1fr; } }
.bom-step { background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 22px; }
.bom-step-num { width: 36px; height: 36px; border-radius: 50%; background: #0e7490; color: #fff; display: grid; place-items: center; font-weight: 800; }
.bom-step h3 { margin: 12px 0 0; font-size: 16px; color: #0f2a44; }
.bom-step p { color: #64748b; font-size: 14px; margin: 6px 0 0; }
.bom-trust21 { margin-top: 16px; background: #0f2a44; color: #dbeafe; border-radius: 14px; padding: 16px 20px; font-size: 14px; text-align: center; }
.bom-trust21 strong { color: #fff; }
.bom-faq21 details { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; }
.bom-faq21 summary { font-weight: 700; color: #0f2a44; cursor: pointer; font-size: 15px; }
.bom-faq21 p { color: #475569; font-size: 14px; margin: 8px 0 0; }
.bom-home-note { color: #64748b; font-size: 14px; }
.bom-footer-cols { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; margin-bottom: 20px; }
@media (max-width: 760px) { .bom-footer-cols { grid-template-columns: 1fr; } }
.bom-footer-heading { font-weight: 800; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: #fff; margin: 0 0 10px; }
.bom-footer-cats ul { margin: 0; padding: 0; list-style: none; columns: 2; }
.bom-footer-cats li { padding: 3px 0; }
.bom-footer-cats a { color: #94a3b8; font-size: 13.5px; }
.bom-footer-cats a:hover { color: #fff; }
@media (max-width: 860px) { .bom-hero21 h1 { font-size: 28px; } .bom-hero21 { padding: 32px 22px; } }

/* --- v2.2 dark mode: small header toggle + site-wide dark theme --- */
/* Toggle: 32px round button in the header, moon in light mode, sun in dark. */
.bom-dark-toggle { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.08); color: #e2e8f0; cursor: pointer; flex: none; padding: 0; }
.bom-dark-toggle:hover { background: rgba(255,255,255,.18); color: #fff; }
.bom-dark-toggle .bom-dark-icon-sun { display: none; }
html[data-theme="dark"] .bom-dark-toggle .bom-dark-icon-sun { display: block; }
html[data-theme="dark"] .bom-dark-toggle .bom-dark-icon-moon { display: none; }
/* Dark palette: bg #0f172a, cards #1e293b, text #e2e8f0, muted #94a3b8, teal #2dd4bf (readable on dark). */
html[data-theme="dark"] { --bom-ink: #e2e8f0; --bom-muted: #94a3b8; --bom-line: #334155; --bom-bg: #0f172a; --bom-card: #1e293b; --bom-navy: #0b1220; --bom-navy-2: #111827; --bom-teal: #2dd4bf; }
html[data-theme="dark"] body { background: #0f172a; color: #e2e8f0; }
html[data-theme="dark"] a { color: #2dd4bf; }
html[data-theme="dark"] a:hover { color: #5eead4; }
html[data-theme="dark"] .bom-header { background: #0b1220; }
html[data-theme="dark"] .bom-nav a { color: #cbd5e1; }
html[data-theme="dark"] .bom-nav ul ul { background: #1e293b; }
html[data-theme="dark"] .bom-footer { background: #0b1220; }
html[data-theme="dark"] .bom-card, html[data-theme="dark"] .bom-cat-card21, html[data-theme="dark"] .bom-pop-card, html[data-theme="dark"] .bom-spec-card, html[data-theme="dark"] .bom-recent21, html[data-theme="dark"] .bom-step, html[data-theme="dark"] .bom-panel, html[data-theme="dark"] .bom-widget, html[data-theme="dark"] .bom-404, html[data-theme="dark"] .bom-empty { background: #1e293b; border-color: #334155; color: #e2e8f0; }
html[data-theme="dark"] .bom-card-title a, html[data-theme="dark"] .bom-cat-card21 h3 a, html[data-theme="dark"] .bom-pop-card h3 a, html[data-theme="dark"] .bom-cat-card21 h3, html[data-theme="dark"] .bom-pop-card h3, html[data-theme="dark"] .bom-step h3, html[data-theme="dark"] .bom-panel h1, html[data-theme="dark"] .bom-section21 > h2, html[data-theme="dark"] .bom-recent-head h2, html[data-theme="dark"] .bom-faq21 summary { color: #e2e8f0; }
html[data-theme="dark"] .bom-card-excerpt, html[data-theme="dark"] .bom-pop-card p, html[data-theme="dark"] .bom-step p, html[data-theme="dark"] .bom-section21 > p, html[data-theme="dark"] .bom-home-note, html[data-theme="dark"] .bom-faq21 p, html[data-theme="dark"] .bom-byline { color: #94a3b8; }
html[data-theme="dark"] .bom-cat-tools li { border-top-color: #334155; }
html[data-theme="dark"] .bom-cat-tools li a { color: #e2e8f0; }
html[data-theme="dark"] .bom-cat-count, html[data-theme="dark"] .bom-spec-card .bom-spec-count { color: #2dd4bf; }
html[data-theme="dark"] .bom-recent-item { background: #1e293b; border-color: #334155; color: #e2e8f0; }
html[data-theme="dark"] .bom-recent-item:hover { background: #134e4a; border-color: #2dd4bf; }
html[data-theme="dark"] .bom-recent-item span, html[data-theme="dark"] .bom-spec-card span { color: #94a3b8; }
html[data-theme="dark"] .bom-recent-item strong, html[data-theme="dark"] .bom-spec-card strong { color: #e2e8f0; }
html[data-theme="dark"] .bom-icon-sq { background: #164e63; color: #2dd4bf; }
html[data-theme="dark"] .bom-search-results { background: #1e293b; color: #e2e8f0; }
html[data-theme="dark"] .bom-search-results a { color: #e2e8f0; border-top-color: #334155; }
html[data-theme="dark"] .bom-search-results a:hover { background: #134e4a; color: #5eead4; }
html[data-theme="dark"] .bom-search-results .bom-sr-cat, html[data-theme="dark"] .bom-search-results .bom-sr-none { color: #94a3b8; }
html[data-theme="dark"] .bom-trust21 { background: #111827; color: #cbd5e1; }
html[data-theme="dark"] .bom-faq21 details { background: #1e293b; border-color: #334155; }
html[data-theme="dark"] .bom-cta { background: #0b1220; }
html[data-theme="dark"] .bom-pagination a { background: #1e293b; border-color: #334155; color: #e2e8f0; }
html[data-theme="dark"] .bom-search-form input[type="search"] { background: #0f172a; color: #e2e8f0; border-color: #475569; }
html[data-theme="dark"] .booksofmedical-content h2, html[data-theme="dark"] .booksofmedical-content h3, html[data-theme="dark"] .booksofmedical-content h4 { color: #e2e8f0; border-top-color: #334155; }
html[data-theme="dark"] .booksofmedical-content th, html[data-theme="dark"] .booksofmedical-content td { border-color: #334155; }
html[data-theme="dark"] .booksofmedical-content th { background: #164e63; color: #e2e8f0; }
html[data-theme="dark"] .bom-widget li { border-top-color: #334155; }
html[data-theme="dark"] .bom-404 .bom-404-code { color: #2dd4bf; }

/* --- v2.4 all-calculators: jump navigation + 10 category sections --- */
html { scroll-behavior: smooth; }
.bom-jump-nav { position: sticky; top: 70px; z-index: 30; display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 14px; box-shadow: 0 8px 20px rgba(15,42,68,.08); margin: 0 0 8px; }
.bom-jump-pill { background: #fff; border: 1px solid #e2e8f0; color: #0f2a44; border-radius: 999px; padding: 8px 14px; font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.bom-jump-pill:hover { border-color: #0e7490; color: #0e7490; }
.bom-jump-pill.bom-active { background: #0e7490; border-color: #0e7490; color: #fff; }
.bom-cat-section { scroll-margin-top: 140px; margin-top: 28px; }
.bom-cat-section:first-of-type { margin-top: 16px; }
.bom-cat-head { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 20px 22px; box-shadow: 0 8px 24px rgba(15,42,68,.05); margin-bottom: 14px; }
.bom-cat-head > div { flex: 1; min-width: 0; }
.bom-cat-head h3 { margin: 4px 0 0; font-size: 20px; color: #0f2a44; }
.bom-cat-head h3 a { color: #0f2a44; }
.bom-cat-head h3 a:hover { color: #0e7490; }
.bom-cat-head .bom-card-excerpt { margin: 6px 0 0; }
.bom-cat-page-link { margin-left: auto; font-weight: 700; font-size: 14px; white-space: nowrap; padding-top: 6px; }
.bom-tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 1020px) { .bom-tool-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .bom-tool-grid { grid-template-columns: 1fr; } }
.bom-tool-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 18px; display: flex; flex-direction: column; box-shadow: 0 6px 18px rgba(15,42,68,.04); }
.bom-tool-card:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(15,42,68,.10); border-color: #0e7490; }
.bom-tool-card h4 { margin: 0; font-size: 15.5px; line-height: 1.35; color: #0f2a44; }
.bom-tool-card h4 a { color: #0f2a44; }
.bom-tool-card h4 a:hover { color: #0e7490; }
.bom-tool-card p { color: #64748b; font-size: 13.5px; line-height: 1.55; margin: 6px 0 0; flex: 1; }
.bom-tool-card .bom-card-link { margin-top: 12px; font-weight: 700; font-size: 14px; }
@media (max-width: 760px) {
  .bom-jump-nav { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .bom-cat-head { flex-wrap: wrap; }
  .bom-cat-page-link { margin-left: 0; }
}
/* v2.4 dark mode: jump pills, category sections and tool cards. */
html[data-theme="dark"] .bom-jump-nav { background: #0f172a; border-color: #334155; }
html[data-theme="dark"] .bom-jump-pill { background: #1e293b; border-color: #334155; color: #e2e8f0; }
html[data-theme="dark"] .bom-jump-pill:hover { border-color: #2dd4bf; color: #5eead4; }
html[data-theme="dark"] .bom-jump-pill.bom-active { background: #2dd4bf; border-color: #2dd4bf; color: #0b1220; }
html[data-theme="dark"] .bom-cat-head, html[data-theme="dark"] .bom-tool-card { background: #1e293b; border-color: #334155; color: #e2e8f0; }
html[data-theme="dark"] .bom-cat-head h3, html[data-theme="dark"] .bom-cat-head h3 a, html[data-theme="dark"] .bom-tool-card h4, html[data-theme="dark"] .bom-tool-card h4 a { color: #e2e8f0; }
html[data-theme="dark"] .bom-cat-head .bom-card-excerpt, html[data-theme="dark"] .bom-tool-card p { color: #94a3b8; }

/* --- v2.6 dark toggle in menu row --- */
/* The 32px toggle lives INSIDE <nav>, as the last item of the menu row:
   the menu list takes the free space (flex:1) and the toggle sits at the
   right end, vertically centred with the menu links. header-inner no
   longer wraps, so the toggle can never drop to its own line. */
.bom-header-inner { flex-wrap: nowrap; }
.bom-nav { display: flex; align-items: center; flex: 1 1 auto; min-width: 0; margin-left: auto; position: relative; }
.bom-nav > ul { flex: 1 1 auto; min-width: 0; }
.bom-dark-toggle { margin-left: 12px; }
@media (max-width: 860px) {
  /* Mobile: the nav itself stays in the visible header row (brand +
     Menu button + toggle); only its <ul> is hidden until the Menu
     button opens it, when it drops below the whole header. */
  .bom-header-inner { position: relative; }
  .bom-nav { flex: 0 0 auto; margin-left: 0; position: static; }
  .bom-nav > ul { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--bom-navy-2); border-radius: 0 0 12px 12px; padding: 8px; box-shadow: 0 16px 32px rgba(0,0,0,.3); z-index: 60; }
  .bom-nav.bom-nav-open > ul { display: flex; }
}

/* --- v2.6 General Health subgroups --- */
.bom-gh-subnav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.bom-gh-subnav a { background: #fff; border: 1px solid #e2e8f0; color: #0f2a44; border-radius: 999px; padding: 7px 13px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.bom-gh-subnav a:hover { border-color: #0e7490; color: #0e7490; }
.bom-gh-subgroup { scroll-margin-top: 140px; margin-top: 20px; }
.bom-gh-subgroup:first-of-type { margin-top: 4px; }
.bom-gh-subhead { font-size: 17px; color: #0f2a44; margin: 0 0 12px; padding-top: 6px; border-top: 1px solid #e2e8f0; }
.bom-gh-subhead span { color: #64748b; font-size: 13px; font-weight: 600; }
html[data-theme="dark"] .bom-gh-subnav a { background: #1e293b; border-color: #334155; color: #e2e8f0; }
html[data-theme="dark"] .bom-gh-subnav a:hover { border-color: #2dd4bf; color: #5eead4; }
html[data-theme="dark"] .bom-gh-subhead { color: #e2e8f0; border-top-color: #334155; }
html[data-theme="dark"] .bom-gh-subhead span { color: #94a3b8; }

/* --- v2.7 two-row header + picture menu order + teal active pill --- */
/* Row 1: brand only. Row 2: the menu row, full width, left-aligned, with
   the 32px dark-mode toggle at its far right end, vertically centred
   with the menu links. Both rows are the same dark navy (#0f2a44) as in
   the user's screenshot; the menu row has only a faint top divider. */
.bom-header { background: #0f2a44; }
.bom-header-brand-row { background: #0f2a44; }
.bom-header-brand-row .bom-header-inner { min-height: 56px; }
.bom-header-menu-row { background: #0f2a44; border-top: 1px solid rgba(255,255,255,.07); }
.bom-header-menu-inner { min-height: 48px; flex-wrap: nowrap; }
.bom-header .bom-nav { display: flex; align-items: center; flex: 1 1 auto; min-width: 0; margin-left: 0; position: relative; }
.bom-header .bom-nav > ul { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; flex: 1 1 auto; min-width: 0; margin: 0; padding: 0; list-style: none; }
.bom-header .bom-nav a { color: #e2e8f0; font-size: 15px; font-weight: 600; padding: 8px 14px; border-radius: 8px; white-space: nowrap; }
.bom-header .bom-nav a:hover { background: rgba(255,255,255,.10); color: #fff; }
/* Active item = teal pill, as in the screenshot. Uses the WordPress
   classes only — no invented active state. The ancestor rule pills the
   parent category while one of its calculator pages is open. */
.bom-header .bom-nav ul li.current-menu-item > a,
.bom-header .bom-nav ul li.current_page_item > a,
.bom-header .bom-nav ul li.current-menu-ancestor > a { background: #0e7490; color: #fff; }
.bom-header .bom-nav ul ul a { padding: 8px 12px; font-size: 14px; white-space: normal; }
.bom-header .bom-dark-toggle { margin-left: 12px; border: 1px solid rgba(255,255,255,.45); background: transparent; }
.bom-header .bom-dark-toggle:hover { background: rgba(255,255,255,.14); }
@media (max-width: 860px) {
  /* Mobile: brand row on top; menu row below it holds the Menu button
     and the dark toggle in the same row. The nav itself stays visible
     (display:flex overrides the older display:none rule); only its <ul>
     is hidden until Menu is tapped, when it drops below the menu row. */
  .bom-header-brand-row .bom-header-inner { min-height: 48px; }
  .bom-header-brand-row .bom-brand { font-size: 18px; }
  .bom-header .bom-menu-toggle { display: inline-flex; margin-left: 0; flex: none; }
  .bom-header .bom-nav { display: flex; flex: 1 1 auto; margin-left: 0; position: static; }
  .bom-header .bom-nav > ul { display: none; flex-direction: column; align-items: stretch; position: absolute; top: 100%; left: 0; right: 0; background: var(--bom-navy-2); border-radius: 0 0 12px 12px; padding: 8px; box-shadow: 0 16px 32px rgba(0,0,0,.3); z-index: 60; }
  .bom-header .bom-nav.bom-nav-open > ul { display: flex; }
  .bom-header .bom-nav ul ul { position: static; display: block; background: transparent; box-shadow: none; padding-left: 16px; }
  .bom-header .bom-dark-toggle { margin-left: auto; }
}
html[data-theme="dark"] .bom-header,
html[data-theme="dark"] .bom-header-brand-row,
html[data-theme="dark"] .bom-header-menu-row { background: #0b1220; }

/* --- v2.8 Nutrition subgroups (same pattern as v2.6 General Health) --- */
.bom-nt-subnav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.bom-nt-subnav a { background: #fff; border: 1px solid #e2e8f0; color: #0f2a44; border-radius: 999px; padding: 7px 13px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.bom-nt-subnav a:hover { border-color: #0e7490; color: #0e7490; }
.bom-nt-subgroup { scroll-margin-top: 140px; margin-top: 20px; }
.bom-nt-subgroup:first-of-type { margin-top: 4px; }
.bom-nt-subhead { font-size: 17px; color: #0f2a44; margin: 0 0 12px; padding-top: 6px; border-top: 1px solid #e2e8f0; }
.bom-nt-subhead span { color: #64748b; font-size: 13px; font-weight: 600; }
html[data-theme="dark"] .bom-nt-subnav a { background: #1e293b; border-color: #334155; color: #e2e8f0; }
html[data-theme="dark"] .bom-nt-subnav a:hover { border-color: #2dd4bf; color: #5eead4; }
html[data-theme="dark"] .bom-nt-subhead { color: #e2e8f0; border-top-color: #334155; }
html[data-theme="dark"] .bom-nt-subhead span { color: #94a3b8; }

/* --- v2.9 Blood Pressure & Heart subgroups (same pattern as v2.6 / v2.8) --- */
.bom-bp-subnav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.bom-bp-subnav a { background: #fff; border: 1px solid #e2e8f0; color: #0f2a44; border-radius: 999px; padding: 7px 13px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.bom-bp-subnav a:hover { border-color: #0e7490; color: #0e7490; }
.bom-bp-subgroup { scroll-margin-top: 140px; margin-top: 20px; }
.bom-bp-subgroup:first-of-type { margin-top: 4px; }
.bom-bp-subhead { font-size: 17px; color: #0f2a44; margin: 0 0 12px; padding-top: 6px; border-top: 1px solid #e2e8f0; }
.bom-bp-subhead span { color: #64748b; font-size: 13px; font-weight: 600; }
html[data-theme="dark"] .bom-bp-subnav a { background: #1e293b; border-color: #334155; color: #e2e8f0; }
html[data-theme="dark"] .bom-bp-subnav a:hover { border-color: #2dd4bf; color: #5eead4; }
html[data-theme="dark"] .bom-bp-subhead { color: #e2e8f0; border-top-color: #334155; }
html[data-theme="dark"] .bom-bp-subhead span { color: #94a3b8; }

/* --- v2.10 Fitness subgroups (same pattern as v2.6 / v2.8 / v2.9) --- */
.bom-ft-subnav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.bom-ft-subnav a { background: #fff; border: 1px solid #e2e8f0; color: #0f2a44; border-radius: 999px; padding: 7px 13px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.bom-ft-subnav a:hover { border-color: #0e7490; color: #0e7490; }
.bom-ft-subgroup { scroll-margin-top: 140px; margin-top: 20px; }
.bom-ft-subgroup:first-of-type { margin-top: 4px; }
.bom-ft-subhead { font-size: 17px; color: #0f2a44; margin: 0 0 12px; padding-top: 6px; border-top: 1px solid #e2e8f0; }
.bom-ft-subhead span { color: #64748b; font-size: 13px; font-weight: 600; }
html[data-theme="dark"] .bom-ft-subnav a { background: #1e293b; border-color: #334155; color: #e2e8f0; }
html[data-theme="dark"] .bom-ft-subnav a:hover { border-color: #2dd4bf; color: #5eead4; }
html[data-theme="dark"] .bom-ft-subhead { color: #e2e8f0; border-top-color: #334155; }
html[data-theme="dark"] .bom-ft-subhead span { color: #94a3b8; }

/* --- v2.11 Sleep & Lifestyle subgroups (same pattern as v2.6 / v2.8 / v2.9 / v2.10) --- */
.bom-sl-subnav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.bom-sl-subnav a { background: #fff; border: 1px solid #e2e8f0; color: #0f2a44; border-radius: 999px; padding: 7px 13px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.bom-sl-subnav a:hover { border-color: #0e7490; color: #0e7490; }
.bom-sl-subgroup { scroll-margin-top: 140px; margin-top: 20px; }
.bom-sl-subgroup:first-of-type { margin-top: 4px; }
.bom-sl-subhead { font-size: 17px; color: #0f2a44; margin: 0 0 12px; padding-top: 6px; border-top: 1px solid #e2e8f0; }
.bom-sl-subhead span { color: #64748b; font-size: 13px; font-weight: 600; }
html[data-theme="dark"] .bom-sl-subnav a { background: #1e293b; border-color: #334155; color: #e2e8f0; }
html[data-theme="dark"] .bom-sl-subnav a:hover { border-color: #2dd4bf; color: #5eead4; }
html[data-theme="dark"] .bom-sl-subhead { color: #e2e8f0; border-top-color: #334155; }
html[data-theme="dark"] .bom-sl-subhead span { color: #94a3b8; }

/* --- v2.12 Baby & Child Growth subgroups (same pattern as v2.6 / v2.8 / v2.9 / v2.10 / v2.11) --- */
.bom-pd-subnav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.bom-pd-subnav a { background: #fff; border: 1px solid #e2e8f0; color: #0f2a44; border-radius: 999px; padding: 7px 13px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.bom-pd-subnav a:hover { border-color: #0e7490; color: #0e7490; }
.bom-pd-subgroup { scroll-margin-top: 140px; margin-top: 20px; }
.bom-pd-subgroup:first-of-type { margin-top: 4px; }
.bom-pd-subhead { font-size: 17px; color: #0f2a44; margin: 0 0 12px; padding-top: 6px; border-top: 1px solid #e2e8f0; }
.bom-pd-subhead span { color: #64748b; font-size: 13px; font-weight: 600; }
html[data-theme="dark"] .bom-pd-subnav a { background: #1e293b; border-color: #334155; color: #e2e8f0; }
html[data-theme="dark"] .bom-pd-subnav a:hover { border-color: #2dd4bf; color: #5eead4; }
html[data-theme="dark"] .bom-pd-subhead { color: #e2e8f0; border-top-color: #334155; }
html[data-theme="dark"] .bom-pd-subhead span { color: #94a3b8; }
