/*
Theme Name: HealthMatters Journal
Theme URI: https://blog.healthmatters.io
Author: HealthMatters
Author URI: https://healthmatters.io
Description: Editorial-clinical theme for the HealthMatters blog. Long-form biomarker articles with strong E-E-A-T signals, inline upsells, and reader-focused typography.
Version: 1.2.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: All rights reserved
Text Domain: healthmatters-journal
*/

/* ============================================================
   HEALTHMATTERS JOURNAL — THEME STYLES
   ============================================================
   Sections in this file:
     1. Tokens (CSS variables)
     2. Reset & base
     3. Top bar
     4. Header
     5. Topics navigation
     6. Containers & layout helpers
     7. Hero (homepage)
     8. Card grid (latest articles)
     9. Topic clusters
    10. Newsletter
    11. Article page
    12. Inline upsell
    13. End-of-article CTA
    14. Author card
    15. References
    16. Article sidebar
    17. Footer
    18. Reading progress bar
    19. WordPress core classes (alignments, captions, etc.)
    20. Mobile rules
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;0,6..72,700;0,6..72,800;1,6..72,400;1,6..72,500&family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700&display=swap');

/* 1. TOKENS ---------------------------------------------- */
:root {
  --teal: #0e9b9b;
  --teal-dark: #067272;
  --teal-soft: #e6f5f5;
  --cyan: #29b6f0;
  --ink: #0f1820;
  --body: #2c3a48;
  --muted: #67768a;
  --muted-2: #8b97a8;
  --border: #e2e8ee;
  --border-soft: #eef2f6;
  --bg: #fafbfc;
  --paper: #ffffff;
  --serif: 'Newsreader', Georgia, serif;
  --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* 2. RESET & BASE ---------------------------------------- */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; }

/* 3. TOP BAR --------------------------------------------- */
.hm-topbar {
  background: var(--ink);
  color: rgba(255,255,255,0.85);
  font-size: 12px;
  padding: 8px 0;
}
.hm-topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.hm-topbar a { color: rgba(255,255,255,0.85); }
.hm-topbar a:hover { color: white; }
.hm-topbar-links { display: flex; gap: 24px; }
.hm-topbar-cta { color: white !important; font-weight: 600; }

/* 4. HEADER ---------------------------------------------- */
.hm-header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(10px);
  background: rgba(255,255,255,0.92);
}
.hm-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.hm-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.hm-brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--cyan);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-weight: 700;
  font-style: italic;
  font-size: 19px;
  letter-spacing: -1px;
  flex-shrink: 0;
  padding-right: 2px;
}
.hm-brand-mark::after { content: '.'; }
.hm-brand-words { display: flex; flex-direction: column; line-height: 1; }
.hm-brand-words .top {
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.6px;
}
.hm-brand-words .sub {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: 14px;
  color: var(--teal);
  margin-top: 1px;
}
.hm-brand-divider {
  width: 1px;
  height: 28px;
  background: var(--border);
  margin: 0 4px;
}
.hm-nav { display: flex; gap: 4px; flex: 1; justify-content: center; list-style: none; padding: 0; margin: 0; }
.hm-nav ul, .hm-nav li,
.hm-topics-inner ul, .hm-topics-inner li,
.hm-footer-col ul, .hm-footer-col li {
  list-style: none !important;
  padding-left: 0;
  margin: 0;
}
.hm-nav ul { display: flex; gap: 4px; }
.hm-topics-inner ul { display: flex; gap: 20px; align-items: center; }
.hm-nav a {
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--body);
  border-radius: 8px;
  transition: all 0.15s;
}
.hm-nav a:hover { background: var(--bg); color: var(--ink); }
.hm-nav a.current-menu-item, .hm-nav a.active { color: var(--teal); }
.hm-header-actions { display: flex; gap: 8px; align-items: center; }
.hm-icon-btn {
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--body);
  transition: all 0.15s;
}
.hm-icon-btn:hover { border-color: var(--ink); color: var(--ink); }
.hm-btn {
  padding: 9px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  display: inline-block;
  text-align: center;
}
.hm-btn:hover { background: #000; color: white; }
.hm-btn-teal { background: var(--teal); color: white; }
.hm-btn-teal:hover { background: var(--teal-dark); color: white; }

/* 5. TOPICS NAV ------------------------------------------ */
.hm-topics-bar {
  border-bottom: 1px solid var(--border);
  background: white;
  overflow-x: auto;
  scrollbar-width: none;
}
.hm-topics-bar::-webkit-scrollbar { display: none; }
.hm-topics-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  gap: 20px;
  align-items: center;
  white-space: nowrap;
}
.hm-topics-inner .label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  flex-shrink: 0;
}
.hm-topics-inner a {
  font-size: 13px;
  color: var(--body);
  font-weight: 500;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.hm-topics-inner a:hover, .hm-topics-inner a.active {
  color: var(--teal);
  border-bottom-color: var(--teal);
}

/* 6. LAYOUT ---------------------------------------------- */
.hm-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* 7. HERO ------------------------------------------------ */
.hm-hero { padding: 56px 0 48px; border-bottom: 1px solid var(--border-soft); }
.hm-hero-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 56px;
  align-items: stretch;
}
.hm-hero-feature { display: flex; flex-direction: column; gap: 22px; }
.hm-hero-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  background: linear-gradient(135deg, #c4e9eb 0%, #f4ebd9 50%, #e8d5c4 100%);
  position: relative;
  overflow: hidden;
}
.hm-hero-image img {
  width: 100%; height: 100%; object-fit: cover;
}
.hm-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  padding: 5px 11px;
  border-radius: 999px;
}
.hm-hero-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 48px;
  line-height: 1.05;
  letter-spacing: -1.2px;
  color: var(--ink);
  text-wrap: balance;
}
.hm-hero-deck {
  font-size: 17px;
  line-height: 1.55;
  color: var(--body);
  text-wrap: pretty;
  max-width: 560px;
}
.hm-byline {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
  flex-wrap: wrap;
}
.hm-author-bullet { display: flex; align-items: center; gap: 8px; }
.hm-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d4ecec 0%, #fcecdb 100%);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--teal-dark);
  border: 2px solid white;
  box-shadow: 0 0 0 1px var(--border);
  overflow: hidden;
}
.hm-avatar img { width: 100%; height: 100%; object-fit: cover; }
.hm-author-name { color: var(--ink); font-weight: 600; }
.hm-reviewer-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--teal-dark);
  font-weight: 500;
}
.hm-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted-2); }

.hm-hero-side {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border-soft);
  padding-left: 40px;
}
.hm-side-heading {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  color: var(--muted);
  margin-bottom: 18px;
}
.hm-side-item {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border-soft);
}
.hm-side-item:last-child { border-bottom: none; }
.hm-side-item .num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 28px;
  color: var(--cyan);
  font-weight: 500;
  line-height: 1;
}
.hm-side-item .meta-row {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--teal-dark);
  margin-bottom: 6px;
}
.hm-side-item h4 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.4px;
  color: var(--ink);
  text-wrap: balance;
  margin: 0 0 6px;
}
.hm-side-item .reading { font-size: 12px; color: var(--muted); }

/* 8. SECTION + CARD GRID --------------------------------- */
.hm-section { padding: 56px 0; border-bottom: 1px solid var(--border-soft); }
.hm-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 24px;
}
.hm-section-title {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.7px;
  color: var(--ink);
  margin: 0;
}
.hm-section-sub { font-size: 14px; color: var(--muted); margin-top: 4px; }
.hm-section-link {
  font-size: 13px;
  color: var(--teal-dark);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.hm-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 28px; }
.hm-card { display: flex; flex-direction: column; gap: 14px; }
.hm-card-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(135deg, #c4e9eb, #e8f4ed);
}
.hm-card-img img { width: 100%; height: 100%; object-fit: cover; }
.hm-card-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 700;
}
.hm-card-meta .cat { color: var(--teal-dark); }
.hm-card-meta .meta-dot { color: var(--muted-2); }
.hm-card-meta .time { color: var(--muted); }
.hm-card h3 {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.5px;
  font-weight: 600;
  color: var(--ink);
  text-wrap: balance;
  margin: 0;
}
.hm-card-deck {
  font-size: 14px;
  line-height: 1.5;
  color: var(--body);
  text-wrap: pretty;
  margin: 0;
}
.hm-card-byline {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.hm-card-byline strong { color: var(--ink); font-weight: 600; }

/* 9. TOPIC CLUSTERS -------------------------------------- */
.hm-clusters-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.hm-cluster {
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 22px;
  transition: all 0.18s;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hm-cluster:hover {
  background: white;
  border-color: var(--teal);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(14,155,155,0.08);
}
.hm-cluster-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--teal-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal-dark);
  font-size: 18px;
}
.hm-cluster h4 {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.3px;
  color: var(--ink);
  margin: 0;
}
.hm-cluster .count { font-size: 12px; color: var(--muted); }

/* 10. NEWSLETTER ----------------------------------------- */
.hm-newsletter {
  background: var(--ink);
  color: white;
  border-radius: 16px;
  padding: 48px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: center;
}
.hm-newsletter h3 {
  font-family: var(--serif);
  font-size: 36px;
  line-height: 1.1;
  letter-spacing: -0.8px;
  font-weight: 600;
  margin: 0 0 12px;
}
.hm-newsletter p {
  font-size: 15px;
  line-height: 1.55;
  color: rgba(255,255,255,0.7);
  margin: 0;
}
.hm-newsletter-form { display: flex; flex-direction: column; gap: 10px; }
.hm-newsletter-form .row { display: flex; gap: 8px; }
.hm-newsletter-form input {
  flex: 1;
  padding: 13px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.06);
  color: white;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}
.hm-newsletter-form input::placeholder { color: rgba(255,255,255,0.5); }
.hm-newsletter-form input:focus { border-color: var(--teal); }
.hm-newsletter-form button {
  background: var(--teal);
  color: white;
  border: none;
  padding: 13px 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.hm-newsletter-form button:hover { background: var(--teal-dark); }
.hm-newsletter-fineprint { font-size: 12px; color: rgba(255,255,255,0.5); }
.hm-newsletter-stats {
  display: flex;
  gap: 24px;
  margin-top: 16px;
  color: rgba(255,255,255,0.7);
  font-size: 12px;
}
/* Style Jetpack's subscription form to match our dark newsletter band */
.hm-newsletter-form .wp-block-jetpack-subscriptions__form,
.hm-newsletter-form form { display: flex; flex-direction: column; gap: 8px; }
.hm-newsletter-form input[type="email"],
.hm-newsletter-form .wp-block-jetpack-subscriptions__textfield input {
  width: 100% !important;
  padding: 13px 16px !important;
  border-radius: 10px !important;
  border: 1px solid rgba(255,255,255,0.2) !important;
  background: rgba(255,255,255,0.06) !important;
  color: white !important;
  font-size: 14px !important;
  font-family: inherit !important;
  outline: none !important;
}
.hm-newsletter-form input::placeholder,
.hm-newsletter-form .wp-block-jetpack-subscriptions__textfield input::placeholder { color: rgba(255,255,255,0.5) !important; }
.hm-newsletter-form button,
.hm-newsletter-form .wp-block-jetpack-subscriptions__button {
  background: var(--teal) !important;
  color: white !important;
  border: none !important;
  padding: 13px 22px !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
}
.hm-newsletter-form button:hover,
.hm-newsletter-form .wp-block-jetpack-subscriptions__button:hover { background: var(--teal-dark) !important; }
.hm-newsletter-form .row { display: flex; gap: 8px; }
.hm-newsletter-form .row input { flex: 1; }
.hm-newsletter-stats strong {
  display: block;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  color: white;
  letter-spacing: -0.3px;
}

/* 11. ARTICLE PAGE --------------------------------------- */
.hm-article-shell {
  display: grid;
  grid-template-columns: minmax(0, 200px) minmax(0, 1fr) minmax(0, 280px);
  gap: 48px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}
/* When TOC has no items (auto-hidden by JS), give article column the space */
.hm-article-shell.no-toc {
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 56px;
  max-width: 1140px;
}
.hm-article-toc { position: sticky; top: 100px; align-self: start; }
.hm-toc-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  color: var(--muted);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-soft);
}
.hm-toc-list { list-style: none; display: flex; flex-direction: column; gap: 8px; padding: 0; margin: 0; }
.hm-toc-list a {
  display: block;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
  padding: 4px 0 4px 12px;
  border-left: 2px solid transparent;
  transition: all 0.15s;
}
.hm-toc-list a:hover { color: var(--ink); }
.hm-toc-list a.active {
  color: var(--teal-dark);
  border-left-color: var(--teal);
  font-weight: 600;
}

.hm-article { max-width: 720px; min-width: 0; }
.hm-article-shell.no-toc .hm-article { max-width: 760px; }
.hm-article-cat {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  color: var(--teal-dark);
  margin-bottom: 14px;
}
.hm-article h1 {
  font-family: var(--serif);
  font-size: 42px;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -1px;
  color: var(--ink);
  text-wrap: balance;
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: none;
  margin: 0 0 18px;
}
.hm-article-deck {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 21px;
  line-height: 1.45;
  color: var(--body);
  text-wrap: pretty;
  margin: 0 0 28px;
}
.hm-article-meta-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 0;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 36px;
  font-size: 13px;
  flex-wrap: wrap;
}
.hm-meta-author { display: flex; align-items: center; gap: 10px; }
.hm-meta-author .hm-avatar { width: 36px; height: 36px; font-size: 13px; }
.hm-meta-author .name { font-weight: 600; color: var(--ink); font-size: 14px; }
.hm-meta-author .role { font-size: 12px; color: var(--muted); margin-top: -2px; }
.hm-meta-divider { width: 1px; height: 28px; background: var(--border-soft); }
.hm-meta-fact { color: var(--muted); }
.hm-meta-fact strong { color: var(--ink); font-weight: 600; }
.hm-reviewed-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  background: #e8f4ed;
  color: #2f6147;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.hm-meta-actions { margin-left: auto; display: flex; gap: 6px; }
.hm-meta-action-btn {
  width: 32px; height: 32px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: all 0.15s;
}
.hm-meta-action-btn:hover { color: var(--ink); border-color: var(--ink); }

.hm-article-hero-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  background: linear-gradient(135deg, #c4e9eb 0%, #d8e8db 50%, #f4ebd9 100%);
  margin-bottom: 36px;
  overflow: hidden;
}
.hm-article-hero-img img { width: 100%; height: 100%; object-fit: cover; }

/* AI-snippet defense block */
.hm-answer-block {
  background: var(--teal-soft);
  border-left: 3px solid var(--teal);
  border-radius: 0 12px 12px 0;
  padding: 20px 24px;
  margin-bottom: 32px;
}
.hm-answer-block .ab-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  color: var(--teal-dark);
  margin-bottom: 8px;
}
.hm-answer-block .ab-text {
  font-size: 16px;
  line-height: 1.6;
  color: var(--body);
  text-wrap: pretty;
}
.hm-answer-block .ab-text strong { color: var(--ink); }

/* Article body — applied to .hm-article-body OR to default WP content */
.hm-article-body p,
.hm-article .entry-content > p {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.65;
  color: var(--body);
  text-wrap: pretty;
  margin: 0 0 20px;
}
.hm-article-body h2,
.hm-article .entry-content > h2 {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: var(--ink);
  margin: 40px 0 14px;
  line-height: 1.2;
}
.hm-article-body h3,
.hm-article .entry-content > h3 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  margin: 28px 0 10px;
  letter-spacing: -0.3px;
}
.hm-article-body a,
.hm-article .entry-content a {
  color: var(--teal-dark);
  text-decoration: underline;
  text-decoration-color: rgba(14,155,155,0.3);
  text-underline-offset: 3px;
}
.hm-article-body a:hover,
.hm-article .entry-content a:hover { text-decoration-color: var(--teal); }
.hm-article-body ul, .hm-article-body ol,
.hm-article .entry-content > ul, .hm-article .entry-content > ol {
  padding-left: 22px;
  margin: 0 0 20px;
}
.hm-article-body li,
.hm-article .entry-content li {
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  color: var(--body);
  margin-bottom: 8px;
}
.hm-article-body blockquote,
.hm-article .entry-content blockquote {
  border-left: 3px solid var(--teal);
  padding: 8px 0 8px 24px;
  margin: 32px 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 24px;
  line-height: 1.4;
  color: var(--ink);
  letter-spacing: -0.3px;
}

/* 12. INLINE UPSELL -------------------------------------- */
.hm-inline-upsell {
  background: linear-gradient(135deg, #f0fafa 0%, #e6f5f5 100%);
  border: 1px solid #c5e0e0;
  border-radius: 14px;
  padding: 24px 26px;
  margin: 36px 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}
.hm-inline-upsell .iu-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  color: var(--teal-dark);
  margin-bottom: 6px;
}
.hm-inline-upsell h4 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.3px;
  margin: 0 0 6px;
  line-height: 1.2;
}
.hm-inline-upsell p {
  font-size: 14px !important;
  line-height: 1.5 !important;
  color: var(--body) !important;
  margin: 0 !important;
  font-family: var(--sans) !important;
}
.hm-inline-upsell .iu-cta,
.hm-inline-upsell .iu-cta:link,
.hm-inline-upsell .iu-cta:visited,
.hm-inline-upsell .iu-cta:active {
  background: var(--teal) !important;
  color: #ffffff !important;
  border: none;
  padding: 11px 18px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(14,155,155,0.3);
  display: inline-block;
  text-decoration: none !important;
}
.hm-inline-upsell .iu-cta:hover,
.hm-inline-upsell .iu-cta:focus {
  background: var(--teal-dark) !important;
  color: #ffffff !important;
}

/* 13. END-OF-ARTICLE CTA --------------------------------- */
.hm-eoa-cta {
  margin-top: 48px;
  background: var(--ink);
  color: white;
  border-radius: 16px;
  padding: 36px 36px 32px;
  position: relative;
  overflow: hidden;
}
.hm-eoa-cta::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(14,155,155,0.4), transparent 70%);
  pointer-events: none;
}
.hm-eoa-cta .eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  color: var(--teal);
  margin-bottom: 10px;
}
.hm-eoa-cta h3 {
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.6px;
  font-weight: 600;
  margin: 0 0 10px;
  text-wrap: balance;
  position: relative;
  color: white;
}
.hm-eoa-cta p {
  font-size: 15px !important;
  line-height: 1.55 !important;
  color: rgba(255,255,255,0.7) !important;
  margin: 0 0 20px !important;
  position: relative;
  max-width: 480px;
  font-family: var(--sans) !important;
}
.hm-eoa-cta .row { display: flex; gap: 10px; flex-wrap: wrap; position: relative; }
.hm-eoa-cta .btn-primary {
  background: var(--teal);
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
}
.hm-eoa-cta .btn-primary:hover { background: var(--teal-dark); color: white; }
.hm-eoa-cta .btn-secondary {
  background: transparent;
  color: white;
  padding: 12px 20px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
}
.hm-eoa-cta .btn-secondary:hover { border-color: white; color: white; }

/* 14. AUTHOR CARD ---------------------------------------- */
.hm-author-card {
  margin-top: 36px;
  padding: 24px;
  background: var(--bg);
  border-radius: 12px;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 18px;
  align-items: start;
}
.hm-author-card .hm-avatar { width: 56px; height: 56px; font-size: 18px; }
.hm-author-card .ac-name { font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 2px; }
.hm-author-card .ac-creds {
  font-size: 12px;
  color: var(--teal-dark);
  font-weight: 600;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.hm-author-card .ac-bio {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--body);
  font-family: var(--sans) !important;
}

/* 15. REFERENCES ----------------------------------------- */
.hm-references {
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 22px 24px;
  margin: 36px 0 0;
}
.hm-references h4 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  color: var(--muted);
  margin: 0 0 12px;
}
.hm-references ol { padding-left: 18px; margin: 0; }
.hm-references li {
  font-size: 13px;
  line-height: 1.55;
  color: var(--body);
  margin-bottom: 6px;
  font-family: var(--sans) !important;
}

/* 16. ARTICLE SIDEBAR ------------------------------------ */
.hm-article-side {
  position: sticky;
  top: 100px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.hm-side-card {
  background: white;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 20px;
}
.hm-side-card .label,
.hm-biomarker-mini .label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  color: var(--muted);
  margin-bottom: 14px;
}
.hm-biomarker-mini .label { color: var(--teal-dark); margin-bottom: 10px; }
.hm-side-card h4 {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.25;
  letter-spacing: -0.3px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--ink);
  text-wrap: balance;
}
.hm-related-mini {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-soft);
}
.hm-related-mini:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.hm-related-mini .meta {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  margin-bottom: 4px;
}
.hm-biomarker-mini {
  background: linear-gradient(135deg, #f0fafa 0%, #e6f5f5 100%);
  border: 1px solid #c5e0e0;
  border-radius: 12px;
  padding: 20px;
}
.hm-biomarker-mini h4 {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.3px;
  color: var(--ink);
  margin: 0 0 8px;
}
.hm-biomarker-mini p {
  font-size: 12.5px !important;
  color: var(--body) !important;
  line-height: 1.5 !important;
  margin: 0 0 12px !important;
  font-family: var(--sans) !important;
}
.hm-biomarker-mini a.btn {
  background: var(--teal);
  color: white;
  border: none;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  display: block;
  text-align: center;
  text-decoration: none;
}
.hm-biomarker-mini a.btn:hover { background: var(--teal-dark); color: white; }

/* 17. FOOTER --------------------------------------------- */
.hm-footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 56px 0 32px;
  margin-top: 48px;
}
.hm-footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.hm-footer-col h5 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  color: var(--muted);
  margin: 0 0 14px;
}
.hm-footer-col ul { list-style: none; padding: 0; margin: 0; }
.hm-footer-col ul li { margin-bottom: 8px; }
.hm-footer-col a { font-size: 13.5px; color: var(--body); }
.hm-footer-col a:hover { color: var(--teal-dark); }
.hm-footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 12px;
}
.hm-footer-tag {
  max-width: 360px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--body);
  line-height: 1.55;
}

/* 18. READING PROGRESS ----------------------------------- */
.hm-progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  background: var(--teal);
  z-index: 60;
  width: 0;
  transition: width 0.1s;
}

/* 19. WP CORE CLASSES ------------------------------------ */
.alignleft   { float: left;  margin: 8px 24px 8px 0; max-width: 50%; }
.alignright  { float: right; margin: 8px 0 8px 24px; max-width: 50%; }
.aligncenter { display: block; margin: 24px auto; }
.wp-caption  { max-width: 100%; }
.wp-caption-text {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
  text-align: center;
  margin-top: 6px;
  font-family: var(--sans);
}
.screen-reader-text {
  position: absolute;
  clip: rect(1px, 1px, 1px, 1px);
  width: 1px; height: 1px; overflow: hidden;
}
.sticky { /* honors WP "Stick to top" but no special styling needed */ }

/* Pagination */
.hm-pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 48px 0;
  flex-wrap: wrap;
}
.hm-pagination a, .hm-pagination span {
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--body);
}
.hm-pagination span.current {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}
.hm-pagination a:hover {
  border-color: var(--ink);
  color: var(--ink);
}

/* Search */
.hm-search-form {
  display: flex;
  gap: 8px;
  max-width: 520px;
  margin: 0 auto 32px;
}
.hm-search-form input {
  flex: 1;
  padding: 13px 16px;
  font-size: 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-family: inherit;
  outline: none;
}
.hm-search-form input:focus { border-color: var(--teal); }
.hm-search-form button {
  background: var(--ink);
  color: white;
  border: none;
  padding: 13px 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
}

/* 20. MOBILE --------------------------------------------- */
@media (max-width: 1024px) {
  .hm-hero-grid { grid-template-columns: 1fr !important; gap: 32px; }
  .hm-hero-side { border-left: none; padding-left: 0; border-top: 1px solid var(--border-soft); padding-top: 24px; }
  .hm-grid-3 { grid-template-columns: 1fr !important; }
  .hm-clusters-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .hm-newsletter { grid-template-columns: 1fr !important; padding: 32px; gap: 28px; }
  .hm-newsletter h3 { font-size: 26px; }
  .hm-footer-grid { grid-template-columns: 1fr 1fr !important; gap: 32px; }
  .hm-article-shell,
  .hm-article-shell.no-toc { grid-template-columns: 1fr !important; padding: 32px 18px !important; gap: 24px !important; max-width: 100% !important; }
  .hm-article-toc, .hm-article-side { display: none !important; }
  .hm-article,
  .hm-article-shell.no-toc .hm-article { max-width: 100% !important; min-width: 0 !important; }
  .hm-article h1,
  body .hm-article h1,
  article.hm-article h1 { font-size: 32px !important; letter-spacing: -0.6px; word-break: normal !important; overflow-wrap: break-word; hyphens: none !important; -webkit-hyphens: none !important; width: auto !important; max-width: 100% !important; }
  .hm-article-body p, .hm-article-body li,
  .hm-article .entry-content > p, .hm-article .entry-content li { font-size: 17px; }
  .hm-hero-title { font-size: 32px; letter-spacing: -0.6px; }
  .hm-nav { display: none; }
  .hm-topbar-links { display: none; }
  .hm-topbar-inner { justify-content: center; }
  .hm-inline-upsell { grid-template-columns: 1fr !important; }
  .hm-eoa-cta { padding: 28px; }
  .hm-article-meta-bar { flex-wrap: wrap; gap: 10px 14px; }
}
@media (max-width: 1024px) {
  /* Prevent any inner element from forcing horizontal overflow on mobile */
  body, .hm-article, .hm-article-body, .hm-article .entry-content { overflow-x: hidden; }
  .hm-article img, .hm-article-body img, .hm-article .entry-content img { max-width: 100%; height: auto; }
}
