/*
 * HealthEngine Theme — main.css
 *
 * Architecture:
 *  1. CSS Custom Properties (design tokens)
 *  2. Reset & Base
 *  3. Typography
 *  4. Layout system
 *  5. Header
 *  6. Footer
 *  7. Breadcrumbs
 *  8. Page hero (shared)
 *  9. Sections (shared)
 * 10. Cards & grids
 * 11. Badges
 * 12. Buttons
 * 13. E-E-A-T bar
 * 14. Medical disclaimer
 * 15. Urgency badge
 * 16. Alert components
 * 17. TOC
 * 18. FAQ accordion
 * 19. Stars rating
 * 20. Coverage badge
 * 21. Locality banner
 * 22. Contact card
 * 23. Cost components
 * 24. Coverage checklist
 * 25. Pros/cons
 * 26. Insurance plan card
 * 27. Tables
 * 28. Sidebar
 * 29. Filters (A-Z, body system, urgency)
 * 30. Provider hero
 * 31. Homepage-specific
 * 32. Search results
 * 33. 404 page
 * 34. AdSense slots
 * 35. Pagination
 * 36. Utilities
 * 37. Responsive breakpoints
 * 38. Dark mode
 * 39. Print styles
 */

/* ═══════════════════════════════════════════════════════════════
   1. CSS CUSTOM PROPERTIES — DESIGN TOKENS
   ═══════════════════════════════════════════════════════════════ */
:root {
  /* Brand colours */
  --he-color-primary:       #0057B8;   /* Deep blue — medical authority */
  --he-color-primary-light: #E8F0FF;
  --he-color-primary-dark:  #003D82;
  --he-color-accent:        #00A878;   /* Teal green — health positive */
  --he-color-accent-light:  #E0F7F1;

  /* Semantic colours */
  --he-color-urgent:        #D32F2F;   /* Red — emergency / urgent */
  --he-color-urgent-bg:     #FFF3F3;
  --he-color-warning:       #E65100;   /* Orange — caution */
  --he-color-warning-bg:    #FFF8E1;
  --he-color-info:          #0277BD;   /* Blue — informational */
  --he-color-info-bg:       #E1F5FE;
  --he-color-success:       #2E7D32;   /* Green — positive */
  --he-color-success-bg:    #E8F5E9;

  /* Insurance tier colours */
  --he-tier-bronze:         #CD7F32;
  --he-tier-silver:         #8E8E8E;
  --he-tier-gold:           #DAA520;
  --he-tier-platinum:       #B0C4DE;
  --he-tier-catastrophic:   #777;

  /* Neutrals */
  --he-color-text:          #1A1A1A;
  --he-color-text-secondary:#4A4A4A;
  --he-color-text-muted:    #767676;   /* WCAG AA contrast on white */
  --he-color-border:        #DEDEDE;
  --he-color-border-light:  #F0F0F0;
  --he-color-bg:            #FFFFFF;
  --he-color-bg-alt:        #F7F9FC;
  --he-color-bg-dark:       #1E2B3C;

  /* Typography */
  --he-font-body:    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --he-font-heading: var(--he-font-body);
  --he-font-mono:    'Courier New', Courier, monospace;

  --he-text-xs:   0.75rem;
  --he-text-sm:   0.875rem;
  --he-text-base: 1rem;
  --he-text-md:   1.125rem;
  --he-text-lg:   1.25rem;
  --he-text-xl:   1.5rem;
  --he-text-2xl:  1.875rem;
  --he-text-3xl:  2.25rem;
  --he-text-4xl:  3rem;

  --he-line-height-tight:  1.25;
  --he-line-height-base:   1.6;
  --he-line-height-loose:  1.8;

  --he-font-weight-normal:  400;
  --he-font-weight-medium:  500;
  --he-font-weight-bold:    700;

  /* Spacing */
  --he-space-1:   0.25rem;
  --he-space-2:   0.5rem;
  --he-space-3:   0.75rem;
  --he-space-4:   1rem;
  --he-space-5:   1.25rem;
  --he-space-6:   1.5rem;
  --he-space-8:   2rem;
  --he-space-10:  2.5rem;
  --he-space-12:  3rem;
  --he-space-16:  4rem;
  --he-space-20:  5rem;
  --he-space-24:  6rem;

  /* Layout */
  --he-max-width:        1280px;
  --he-content-width:    820px;
  --he-sidebar-width:    320px;
  --he-gutter:           var(--he-space-4);
  --he-gap:              var(--he-space-6);

  /* Borders */
  --he-radius-sm:  4px;
  --he-radius:     8px;
  --he-radius-lg:  16px;
  --he-radius-xl:  24px;
  --he-radius-full: 9999px;

  /* Shadows */
  --he-shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --he-shadow:     0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.06);
  --he-shadow-lg:  0 10px 30px rgba(0,0,0,.10), 0 4px 8px rgba(0,0,0,.06);

  /* Transitions */
  --he-transition: 150ms ease;
  --he-transition-slow: 300ms ease;

  /* Z-index */
  --he-z-header: 100;
  --he-z-overlay: 200;
  --he-z-modal: 300;
}

/* ═══════════════════════════════════════════════════════════════
   2. RESET & BASE
   ═══════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--he-font-body);
  font-size: var(--he-text-base);
  line-height: var(--he-line-height-base);
  color: var(--he-color-text);
  background: var(--he-color-bg);
  -webkit-font-smoothing: antialiased;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input, button, textarea, select { font: inherit; }

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
  margin-top: 0;
}

a {
  color: var(--he-color-primary);
  text-decoration: none;
}
a:hover, a:focus { text-decoration: underline; }
a:focus-visible {
  outline: 3px solid var(--he-color-primary);
  outline-offset: 2px;
  border-radius: var(--he-radius-sm);
}

ul, ol { padding-left: var(--he-space-6); }

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  padding: var(--he-space-3) var(--he-space-4);
  background: var(--he-color-primary);
  color: #fff;
  font-weight: var(--he-font-weight-bold);
  z-index: var(--he-z-modal);
}
.skip-link:focus { top: 0; }

/* ═══════════════════════════════════════════════════════════════
   3. TYPOGRAPHY
   ═══════════════════════════════════════════════════════════════ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--he-font-heading);
  font-weight: var(--he-font-weight-bold);
  line-height: var(--he-line-height-tight);
  color: var(--he-color-text);
  margin-bottom: var(--he-space-4);
}

h1 { font-size: var(--he-text-3xl); }
h2 { font-size: var(--he-text-2xl); }
h3 { font-size: var(--he-text-xl);  }
h4 { font-size: var(--he-text-lg);  }
h5 { font-size: var(--he-text-md);  }
h6 { font-size: var(--he-text-base);}

/* Prose — long-form content */
.he-prose {
  max-width: 72ch;
  font-size: var(--he-text-md);
  line-height: var(--he-line-height-loose);
  color: var(--he-color-text);
}
.he-prose p   { margin-bottom: var(--he-space-4); }
.he-prose ul,
.he-prose ol  { margin-bottom: var(--he-space-4); }
.he-prose li  { margin-bottom: var(--he-space-2); }
.he-prose a   { color: var(--he-color-primary); text-decoration: underline; }
.he-prose strong { font-weight: var(--he-font-weight-bold); }

/* Description lists */
.he-dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--he-space-2) var(--he-space-4);
  margin: 0;
}
.he-dl dt {
  font-weight: var(--he-font-weight-bold);
  color: var(--he-color-text-secondary);
  font-size: var(--he-text-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.he-dl dd { margin: 0; }

/* Mark (search highlight) */
mark {
  background: #FFF59D;
  padding: 0 2px;
  border-radius: 2px;
}

/* ═══════════════════════════════════════════════════════════════
   4. LAYOUT SYSTEM
   ═══════════════════════════════════════════════════════════════ */
.he-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Inner container */
.he-site-header__inner,
.he-section__inner,
.he-hero__inner,
.he-stats-bar__inner,
.he-pros-cons,
.he-insurance-hub-grid,
.he-archive-grid,
.he-page__content-grid,
.he-site-footer__inner {
  width: 100%;
  max-width: var(--he-max-width);
  margin-inline: auto;
  padding-inline: var(--he-gutter);
}

/* Two-column: main + sidebar */
.he-page__content-grid {
  display: grid;
  grid-template-columns: 1fr var(--he-sidebar-width);
  gap: var(--he-gap);
  align-items: start;
  padding-block: var(--he-space-8);
}

.he-page__main { min-width: 0; }

/* Insurance hub two-column */
.he-insurance-hub-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--he-gap);
  align-items: start;
  padding-block: var(--he-space-8);
}

/* ═══════════════════════════════════════════════════════════════
   5. SITE HEADER
   ═══════════════════════════════════════════════════════════════ */
.he-site-header {
  position: sticky;
  top: 0;
  z-index: var(--he-z-header);
  background: var(--he-color-bg);
  border-bottom: 1px solid var(--he-color-border-light);
  box-shadow: var(--he-shadow-sm);
}

.he-site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--he-space-4);
  padding-block: var(--he-space-3);
}

.he-site-header__brand { flex-shrink: 0; }

.he-site-header__site-name {
  font-size: var(--he-text-lg);
  font-weight: var(--he-font-weight-bold);
  color: var(--he-color-primary);
  text-decoration: none;
}

/* Nav */
.he-nav--primary { flex: 1; }
.he-nav__list {
  display: flex;
  gap: var(--he-space-6);
  list-style: none;
  margin: 0;
  padding: 0;
}
.he-nav__list a {
  font-size: var(--he-text-sm);
  font-weight: var(--he-font-weight-medium);
  color: var(--he-color-text);
  text-decoration: none;
  padding-block: var(--he-space-2);
  transition: color var(--he-transition);
}
.he-nav__list a:hover { color: var(--he-color-primary); }

/* Header search */
.he-site-header__search { flex-shrink: 0; }
.he-search-form { display: flex; align-items: center; gap: var(--he-space-2); }
.he-search-form__input {
  width: 220px;
  padding: var(--he-space-2) var(--he-space-3);
  border: 1px solid var(--he-color-border);
  border-radius: var(--he-radius-full);
  font-size: var(--he-text-sm);
  transition: border-color var(--he-transition);
}
.he-search-form__input:focus {
  outline: none;
  border-color: var(--he-color-primary);
  box-shadow: 0 0 0 3px var(--he-color-primary-light);
}
.he-search-form__submit {
  padding: var(--he-space-2) var(--he-space-3);
  background: var(--he-color-primary);
  color: #fff;
  border: none;
  border-radius: var(--he-radius-full);
  cursor: pointer;
  transition: background var(--he-transition);
}
.he-search-form__submit:hover { background: var(--he-color-primary-dark); }

/* Mobile toggle */
.he-site-header__menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--he-color-border);
  border-radius: var(--he-radius-sm);
  padding: var(--he-space-2);
  cursor: pointer;
}
.he-site-header__menu-icon,
.he-site-header__menu-icon::before,
.he-site-header__menu-icon::after {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--he-color-text);
  transition: transform var(--he-transition);
}
.he-site-header__menu-icon { position: relative; }
.he-site-header__menu-icon::before,
.he-site-header__menu-icon::after {
  content: '';
  position: absolute;
}
.he-site-header__menu-icon::before { top: -6px; }
.he-site-header__menu-icon::after  { top: 6px; }

/* ═══════════════════════════════════════════════════════════════
   6. FOOTER
   ═══════════════════════════════════════════════════════════════ */
.he-site-footer {
  background: var(--he-color-bg-dark);
  color: #CBD5E1;
  margin-top: auto;
  padding-block: var(--he-space-12) var(--he-space-8);
}

.he-site-footer__brand { margin-bottom: var(--he-space-8); }

.he-site-footer__logo {
  font-size: var(--he-text-xl);
  font-weight: var(--he-font-weight-bold);
  color: #fff;
  text-decoration: none;
}

.he-site-footer__tagline {
  font-size: var(--he-text-sm);
  color: #94A3B8;
  margin-top: var(--he-space-2);
}

.he-site-footer__nav-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--he-space-8);
  margin-bottom: var(--he-space-8);
}

.he-site-footer__nav-heading {
  font-size: var(--he-text-sm);
  font-weight: var(--he-font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #fff;
  margin-bottom: var(--he-space-4);
}

.he-site-footer__nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.he-site-footer__nav-list li { margin-bottom: var(--he-space-3); }
.he-site-footer__nav-list a {
  color: #94A3B8;
  font-size: var(--he-text-sm);
  text-decoration: none;
  transition: color var(--he-transition);
}
.he-site-footer__nav-list a:hover { color: #fff; }

.he-site-footer__disclaimer {
  border-top: 1px solid #334155;
  padding-top: var(--he-space-6);
  font-size: var(--he-text-xs);
  color: #64748B;
  line-height: var(--he-line-height-base);
}
.he-site-footer__disclaimer p { margin-bottom: var(--he-space-2); }

.he-site-footer__ads-disclosure {
  font-size: var(--he-text-xs);
  color: #64748B;
  margin-top: var(--he-space-4);
}

/* ═══════════════════════════════════════════════════════════════
   7. BREADCRUMBS
   ═══════════════════════════════════════════════════════════════ */
.he-breadcrumbs {
  max-width: var(--he-max-width);
  margin-inline: auto;
  padding-inline: var(--he-gutter);
  padding-block: var(--he-space-4);
}

.he-breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--he-space-1);
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: var(--he-text-sm);
  color: var(--he-color-text-muted);
}

.he-breadcrumbs__item + .he-breadcrumbs__item::before {
  content: '/';
  margin-right: var(--he-space-1);
  color: var(--he-color-border);
}

.he-breadcrumbs__item a {
  color: var(--he-color-text-muted);
  text-decoration: none;
  transition: color var(--he-transition);
}
.he-breadcrumbs__item a:hover { color: var(--he-color-primary); }
.he-breadcrumbs__item--current { color: var(--he-color-text-secondary); }

/* ═══════════════════════════════════════════════════════════════
   8. PAGE HERO (SHARED)
   ═══════════════════════════════════════════════════════════════ */
.he-page__hero {
  max-width: var(--he-max-width);
  margin-inline: auto;
  padding-inline: var(--he-gutter);
  padding-block: var(--he-space-8) var(--he-space-6);
}

.he-page__title {
  font-size: clamp(var(--he-text-2xl), 4vw, var(--he-text-3xl));
  line-height: 1.2;
  margin-bottom: var(--he-space-4);
}

.he-page__subtitle {
  font-size: var(--he-text-md);
  color: var(--he-color-text-secondary);
  max-width: 65ch;
  margin-bottom: var(--he-space-4);
}

.he-page__also-known,
.he-page__prevalence,
.he-page__address,
.he-page__experience,
.he-page__parent-link,
.he-page__location {
  font-size: var(--he-text-sm);
  color: var(--he-color-text-secondary);
  margin-bottom: var(--he-space-2);
}

.he-page__badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--he-space-2);
  margin-bottom: var(--he-space-4);
}

.he-page__description { margin-top: var(--he-space-4); }

/* Insurance hero specific */
.he-page__logo img {
  max-height: 60px;
  width: auto;
  margin-bottom: var(--he-space-4);
}

/* ═══════════════════════════════════════════════════════════════
   9. SECTIONS (SHARED)
   ═══════════════════════════════════════════════════════════════ */
.he-section {
  margin-bottom: var(--he-space-10);
  scroll-margin-top: 80px; /* account for sticky header */
}

.he-section__title {
  font-size: var(--he-text-xl);
  margin-bottom: var(--he-space-5);
  padding-bottom: var(--he-space-3);
  border-bottom: 2px solid var(--he-color-border-light);
}

.he-section__body { margin-bottom: var(--he-space-6); }

.he-section__intro {
  font-size: var(--he-text-md);
  color: var(--he-color-text-secondary);
  margin-bottom: var(--he-space-5);
}

/* Urgent section styling */
.he-section--urgent { background: var(--he-color-urgent-bg); border-radius: var(--he-radius); padding: var(--he-space-6); }
.he-section--urgent .he-section__title { color: var(--he-color-urgent); border-bottom-color: #FFCDD2; }

/* Insurance section */
.he-section--insurance { background: var(--he-color-primary-light); border-radius: var(--he-radius); padding: var(--he-space-6); }

.he-section__disclaimer {
  font-size: var(--he-text-xs);
  color: var(--he-color-text-muted);
  margin-top: var(--he-space-4);
  font-style: italic;
}

.he-national-link {
  padding: var(--he-space-4);
  background: var(--he-color-bg-alt);
  border-left: 4px solid var(--he-color-accent);
  border-radius: 0 var(--he-radius) var(--he-radius) 0;
  margin-bottom: var(--he-space-6);
}

/* ═══════════════════════════════════════════════════════════════
   10. CARDS & GRIDS
   ═══════════════════════════════════════════════════════════════ */
.he-card-grid {
  display: grid;
  gap: var(--he-space-4);
  margin-bottom: var(--he-space-6);
}
.he-card-grid--2col { grid-template-columns: repeat(2, 1fr); }
.he-card-grid--3col { grid-template-columns: repeat(3, 1fr); }
.he-card-grid--4col { grid-template-columns: repeat(4, 1fr); }

/* Base card */
.he-card {
  background: var(--he-color-bg);
  border: 1px solid var(--he-color-border-light);
  border-radius: var(--he-radius);
  transition: box-shadow var(--he-transition), transform var(--he-transition);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.he-card:hover {
  box-shadow: var(--he-shadow);
  transform: translateY(-2px);
  text-decoration: none;
}

.he-card__inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
  padding: var(--he-space-4);
}

.he-card__body { flex: 1; }

.he-card__title {
  font-size: var(--he-text-base);
  font-weight: var(--he-font-weight-bold);
  color: var(--he-color-text);
  margin-bottom: var(--he-space-2);
  line-height: var(--he-line-height-tight);
}

.he-card__meta {
  font-size: var(--he-text-xs);
  color: var(--he-color-text-muted);
  margin-bottom: var(--he-space-2);
  display: block;
}

.he-card__excerpt {
  font-size: var(--he-text-sm);
  color: var(--he-color-text-secondary);
  line-height: var(--he-line-height-base);
  margin: 0;
}

.he-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--he-space-3);
  padding-top: var(--he-space-3);
  border-top: 1px solid var(--he-color-border-light);
}

.he-card__arrow {
  color: var(--he-color-primary);
  font-size: var(--he-text-lg);
  transition: transform var(--he-transition);
}
.he-card:hover .he-card__arrow { transform: translateX(4px); }

.he-card__system {
  font-size: var(--he-text-xs);
  color: var(--he-color-text-muted);
  padding: var(--he-space-1) var(--he-space-3);
  background: var(--he-color-bg-alt);
  border-top: 1px solid var(--he-color-border-light);
  display: block;
}

.he-card__date {
  font-size: var(--he-text-xs);
  color: var(--he-color-text-muted);
  padding: var(--he-space-2) var(--he-space-4);
  background: var(--he-color-bg-alt);
  display: block;
}

/* Card logo (for insurance companies) */
.he-card__logo {
  padding: var(--he-space-3) var(--he-space-4) 0;
}
.he-card__logo img {
  max-height: 40px;
  width: auto;
}

/* Related section */
.he-related { margin-bottom: var(--he-space-8); }
.he-related__title {
  font-size: var(--he-text-xl);
  margin-bottom: var(--he-space-5);
}
.he-related__grid { display: grid; gap: var(--he-space-3); }
.he-related__grid--3col { grid-template-columns: repeat(3, 1fr); }

/* ═══════════════════════════════════════════════════════════════
   11. BADGES
   ═══════════════════════════════════════════════════════════════ */
.he-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--he-space-1);
  padding: var(--he-space-1) var(--he-space-3);
  font-size: var(--he-text-xs);
  font-weight: var(--he-font-weight-medium);
  border-radius: var(--he-radius-full);
  white-space: nowrap;
  text-decoration: none;
}

.he-badge--system    { background: var(--he-color-primary-light); color: var(--he-color-primary-dark); }
.he-badge--specialty { background: var(--he-color-accent-light);  color: #007A58; }
.he-badge--icd10     { background: #F3F4F6; color: var(--he-color-text-secondary); font-family: var(--he-font-mono); }
.he-badge--location  { background: #EDE9FE; color: #5B21B6; }
.he-badge--type      { background: var(--he-color-bg-alt); color: var(--he-color-text-secondary); border: 1px solid var(--he-color-border); }
.he-badge--emergency { background: var(--he-color-urgent-bg); color: var(--he-color-urgent); }
.he-badge--accred    { background: var(--he-color-success-bg); color: var(--he-color-success); }
.he-badge--accepting { background: var(--he-color-success-bg); color: var(--he-color-success); }
.he-badge--telehealth{ background: var(--he-color-info-bg);    color: var(--he-color-info); }
.he-badge--nationwide{ background: #DBEAFE; color: #1D4ED8; }
.he-badge--rating    { background: #FEF9C3; color: #854D0E; font-weight: var(--he-font-weight-bold); }
.he-badge--insurance { background: var(--he-color-primary-light); color: var(--he-color-primary); }

/* Urgency badge on symptom cards */
.he-card__badge--urgency-high   { background: var(--he-color-urgent-bg);  color: var(--he-color-urgent); }
.he-card__badge--urgency-medium { background: var(--he-color-warning-bg); color: var(--he-color-warning); }
.he-card__badge--urgency-low    { background: var(--he-color-success-bg); color: var(--he-color-success); }
.he-card__badge--insurance      { background: var(--he-color-primary-light); color: var(--he-color-primary); font-size: var(--he-text-xs); padding: var(--he-space-1) var(--he-space-2); border-radius: var(--he-radius-sm); }

/* Metal tier badges */
.he-badge--tier { font-weight: var(--he-font-weight-bold); }
.he-badge--tier-bronze    { background: #FEF3C7; color: var(--he-tier-bronze); }
.he-badge--tier-silver    { background: #F3F4F6; color: var(--he-tier-silver); }
.he-badge--tier-gold      { background: #FFFBEB; color: var(--he-tier-gold); }
.he-badge--tier-platinum  { background: #EFF6FF; color: #1E40AF; }
.he-badge--tier-catastrophic { background: #F3F4F6; color: var(--he-tier-catastrophic); }

/* OTC / Rx badges */
.he-badge--otc  { background: var(--he-color-success-bg); color: var(--he-color-success); }
.he-badge--rx   { background: var(--he-color-urgent-bg);  color: var(--he-color-urgent); }
.he-badge--both { background: var(--he-color-warning-bg); color: var(--he-color-warning); }

/* ═══════════════════════════════════════════════════════════════
   12. BUTTONS
   ═══════════════════════════════════════════════════════════════ */
.he-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--he-space-2);
  padding: var(--he-space-3) var(--he-space-5);
  font-size: var(--he-text-sm);
  font-weight: var(--he-font-weight-medium);
  border-radius: var(--he-radius);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--he-transition), color var(--he-transition), border-color var(--he-transition);
  white-space: nowrap;
}

.he-btn--primary {
  background: var(--he-color-primary);
  color: #fff;
  border-color: var(--he-color-primary);
}
.he-btn--primary:hover { background: var(--he-color-primary-dark); border-color: var(--he-color-primary-dark); color: #fff; text-decoration: none; }

.he-btn--secondary {
  background: var(--he-color-accent);
  color: #fff;
  border-color: var(--he-color-accent);
}
.he-btn--secondary:hover { background: #008060; border-color: #008060; color: #fff; text-decoration: none; }

.he-btn--outline {
  background: transparent;
  color: var(--he-color-primary);
  border-color: var(--he-color-primary);
}
.he-btn--outline:hover { background: var(--he-color-primary-light); text-decoration: none; }

.he-btn--full { width: 100%; justify-content: center; }

/* Links */
.he-link--more {
  display: inline-flex;
  align-items: center;
  gap: var(--he-space-2);
  font-size: var(--he-text-sm);
  font-weight: var(--he-font-weight-medium);
  color: var(--he-color-primary);
  text-decoration: none;
  margin-top: var(--he-space-4);
}
.he-link--more:hover { text-decoration: underline; }
.he-link { color: var(--he-color-primary); font-size: var(--he-text-sm); }

/* ═══════════════════════════════════════════════════════════════
   13. E-E-A-T BAR
   ═══════════════════════════════════════════════════════════════ */
.he-eeat-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--he-space-4);
  padding: var(--he-space-3) var(--he-space-4);
  background: var(--he-color-bg-alt);
  border: 1px solid var(--he-color-border-light);
  border-radius: var(--he-radius);
  font-size: var(--he-text-sm);
  margin-block: var(--he-space-4);
}

.he-eeat-bar__reviewer {
  display: flex;
  align-items: center;
  gap: var(--he-space-3);
}

.he-eeat-bar__icon {
  font-size: var(--he-text-xl);
  color: var(--he-color-primary);
}

.he-eeat-bar__reviewer-info { display: flex; flex-direction: column; gap: 2px; }

.he-eeat-bar__label {
  font-size: var(--he-text-xs);
  color: var(--he-color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.he-eeat-bar__name {
  font-weight: var(--he-font-weight-bold);
  color: var(--he-color-text);
}

.he-eeat-bar__title {
  font-size: var(--he-text-xs);
  color: var(--he-color-text-muted);
}

.he-eeat-bar__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--he-space-4);
  margin-left: auto;
}

.he-eeat-bar__date {
  display: flex;
  align-items: center;
  gap: var(--he-space-2);
  color: var(--he-color-text-secondary);
}

.he-eeat-bar__reading-time {
  color: var(--he-color-text-muted);
  font-size: var(--he-text-xs);
}

.he-eeat-bar__badge--reviewed {
  background: var(--he-color-success-bg);
  color: var(--he-color-success);
  padding: var(--he-space-1) var(--he-space-3);
  border-radius: var(--he-radius-full);
  font-size: var(--he-text-xs);
  font-weight: var(--he-font-weight-medium);
}

/* ═══════════════════════════════════════════════════════════════
   14. MEDICAL DISCLAIMER
   ═══════════════════════════════════════════════════════════════ */
.he-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: var(--he-space-3);
  padding: var(--he-space-3) var(--he-space-4);
  border-radius: var(--he-radius);
  font-size: var(--he-text-sm);
  line-height: var(--he-line-height-base);
  max-width: var(--he-max-width);
  margin-inline: auto;
  margin-block: var(--he-space-3);
  padding-inline: var(--he-gutter);
}

.he-disclaimer--general  { background: var(--he-color-info-bg);    color: var(--he-color-info); }
.he-disclaimer--insurance{ background: var(--he-color-warning-bg); color: var(--he-color-warning); }
.he-disclaimer--drug     { background: var(--he-color-urgent-bg);  color: var(--he-color-urgent); }

.he-disclaimer__icon { font-size: var(--he-text-xl); flex-shrink: 0; }
.he-disclaimer__text { margin: 0; }

/* ═══════════════════════════════════════════════════════════════
   15. URGENCY BADGE (symptom pages)
   ═══════════════════════════════════════════════════════════════ */
.he-urgency-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--he-space-2);
  padding: var(--he-space-2) var(--he-space-4);
  border-radius: var(--he-radius-full);
  font-size: var(--he-text-sm);
  font-weight: var(--he-font-weight-bold);
  margin-bottom: var(--he-space-4);
}

.he-urgency-badge--high   { background: var(--he-color-urgent-bg);  color: var(--he-color-urgent); border: 2px solid var(--he-color-urgent); }
.he-urgency-badge--medium { background: var(--he-color-warning-bg); color: var(--he-color-warning); border: 2px solid var(--he-color-warning); }
.he-urgency-badge--low    { background: var(--he-color-success-bg); color: var(--he-color-success); border: 2px solid var(--he-color-success); }

.he-urgency-text--high   { color: var(--he-color-urgent); }
.he-urgency-text--medium { color: var(--he-color-warning); }
.he-urgency-text--low    { color: var(--he-color-success); }

/* ═══════════════════════════════════════════════════════════════
   16. ALERTS
   ═══════════════════════════════════════════════════════════════ */
.he-alert {
  display: flex;
  align-items: flex-start;
  gap: var(--he-space-3);
  padding: var(--he-space-4);
  border-radius: var(--he-radius);
  margin-bottom: var(--he-space-5);
  font-size: var(--he-text-sm);
}

.he-alert--emergency { background: var(--he-color-urgent-bg);  border-left: 4px solid var(--he-color-urgent); }
.he-alert--warning   { background: var(--he-color-warning-bg); border-left: 4px solid var(--he-color-warning); }
.he-alert--info      { background: var(--he-color-info-bg);    border-left: 4px solid var(--he-color-info); }

.he-alert__icon { font-size: var(--he-text-xl); flex-shrink: 0; }
.he-alert__content strong { display: block; margin-bottom: var(--he-space-2); }

/* ═══════════════════════════════════════════════════════════════
   17. TABLE OF CONTENTS
   ═══════════════════════════════════════════════════════════════ */
.he-toc {
  background: var(--he-color-bg-alt);
  border: 1px solid var(--he-color-border-light);
  border-radius: var(--he-radius);
  padding: var(--he-space-5);
  margin-bottom: var(--he-space-6);
}

.he-toc__title {
  font-size: var(--he-text-sm);
  font-weight: var(--he-font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--he-color-text-muted);
  margin-bottom: var(--he-space-3);
}

.he-toc__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--he-space-2);
}

.he-toc__link {
  display: block;
  font-size: var(--he-text-sm);
  color: var(--he-color-primary);
  text-decoration: none;
  padding: var(--he-space-1) var(--he-space-2);
  border-radius: var(--he-radius-sm);
  transition: background var(--he-transition);
}
.he-toc__link:hover { background: var(--he-color-primary-light); text-decoration: none; }

/* ═══════════════════════════════════════════════════════════════
   18. FAQ ACCORDION
   ═══════════════════════════════════════════════════════════════ */
.he-faq { margin-bottom: var(--he-space-8); }

.he-faq__title {
  font-size: var(--he-text-xl);
  margin-bottom: var(--he-space-5);
  padding-bottom: var(--he-space-3);
  border-bottom: 2px solid var(--he-color-border-light);
}

.he-faq__list { display: flex; flex-direction: column; gap: var(--he-space-2); }

.he-faq__item {
  border: 1px solid var(--he-color-border-light);
  border-radius: var(--he-radius);
  overflow: hidden;
}

.he-faq__question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--he-space-4) var(--he-space-5);
  background: var(--he-color-bg);
  border: none;
  text-align: left;
  font-size: var(--he-text-base);
  font-weight: var(--he-font-weight-medium);
  cursor: pointer;
  transition: background var(--he-transition);
  color: var(--he-color-text);
}

.he-faq__question:hover     { background: var(--he-color-bg-alt); }
.he-faq__question[aria-expanded="true"] { background: var(--he-color-primary-light); color: var(--he-color-primary-dark); }

.he-faq__icon {
  font-size: var(--he-text-xl);
  line-height: 1;
  flex-shrink: 0;
  transition: transform var(--he-transition);
}
.he-faq__question[aria-expanded="true"] .he-faq__icon { transform: rotate(45deg); }

.he-faq__answer {
  padding: var(--he-space-4) var(--he-space-5);
  background: var(--he-color-bg-alt);
  border-top: 1px solid var(--he-color-border-light);
  font-size: var(--he-text-sm);
  line-height: var(--he-line-height-loose);
  color: var(--he-color-text-secondary);
}

/* ═══════════════════════════════════════════════════════════════
   19. STAR RATING
   ═══════════════════════════════════════════════════════════════ */
.he-stars {
  display: inline-flex;
  align-items: center;
  gap: var(--he-space-2);
  margin-block: var(--he-space-3);
}

.he-stars__star { font-size: var(--he-text-lg); }
.he-stars__star--full  { color: #F59E0B; }
.he-stars__star--half  { color: #F59E0B; }
.he-stars__star--empty { color: #D1D5DB; }

.he-stars__value {
  font-weight: var(--he-font-weight-bold);
  font-size: var(--he-text-md);
}
.he-stars__count {
  font-size: var(--he-text-sm);
  color: var(--he-color-text-muted);
}

/* ═══════════════════════════════════════════════════════════════
   20. COVERAGE BADGE
   ═══════════════════════════════════════════════════════════════ */
.he-coverage-badge {
  margin-block: var(--he-space-4);
}

.he-coverage-badge__link {
  display: inline-flex;
  align-items: center;
  gap: var(--he-space-2);
  padding: var(--he-space-3) var(--he-space-5);
  background: var(--he-color-primary-light);
  color: var(--he-color-primary);
  border: 1px solid var(--he-color-primary);
  border-radius: var(--he-radius);
  font-weight: var(--he-font-weight-medium);
  font-size: var(--he-text-sm);
  text-decoration: none;
  transition: background var(--he-transition);
}
.he-coverage-badge__link:hover { background: var(--he-color-primary); color: #fff; text-decoration: none; }
.he-coverage-badge__icon { font-size: var(--he-text-lg); }
.he-coverage-badge__arrow { margin-left: auto; }

/* ═══════════════════════════════════════════════════════════════
   21. LOCALITY BANNER
   ═══════════════════════════════════════════════════════════════ */
.he-locality-banner {
  display: flex;
  align-items: center;
  gap: var(--he-space-2);
  padding: var(--he-space-3) var(--he-gutter);
  background: #EDE9FE;
  color: #5B21B6;
  font-size: var(--he-text-sm);
  font-weight: var(--he-font-weight-medium);
}

/* ═══════════════════════════════════════════════════════════════
   22. CONTACT CARD
   ═══════════════════════════════════════════════════════════════ */
.he-contact-card {
  background: var(--he-color-bg-alt);
  border: 1px solid var(--he-color-border-light);
  border-radius: var(--he-radius);
  padding: var(--he-space-5);
  margin-bottom: var(--he-space-6);
}

.he-contact-card__row {
  display: flex;
  align-items: flex-start;
  gap: var(--he-space-3);
  padding-block: var(--he-space-3);
  border-bottom: 1px solid var(--he-color-border-light);
  font-size: var(--he-text-sm);
}
.he-contact-card__row:last-child { border-bottom: none; }
.he-contact-card__icon { font-size: var(--he-text-md); flex-shrink: 0; width: 20px; text-align: center; }

/* ═══════════════════════════════════════════════════════════════
   23. COST COMPONENTS
   ═══════════════════════════════════════════════════════════════ */
.he-cost-range {
  background: var(--he-color-bg-alt);
  border: 1px solid var(--he-color-border-light);
  border-radius: var(--he-radius);
  padding: var(--he-space-5);
}

.he-cost-range__label {
  display: block;
  font-size: var(--he-text-sm);
  color: var(--he-color-text-muted);
  margin-bottom: var(--he-space-2);
}

.he-cost-range__value {
  display: block;
  font-size: var(--he-text-2xl);
  font-weight: var(--he-font-weight-bold);
  color: var(--he-color-text);
  margin-bottom: var(--he-space-2);
}

.he-cost-range__note {
  font-size: var(--he-text-xs);
  color: var(--he-color-text-muted);
  font-style: italic;
  margin: 0;
}

.he-recovery-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--he-space-2);
  padding: var(--he-space-2) var(--he-space-4);
  background: var(--he-color-accent-light);
  border-radius: var(--he-radius-full);
  font-size: var(--he-text-sm);
  margin-top: var(--he-space-4);
}

.he-recovery-badge__label { color: var(--he-color-text-muted); }
.he-recovery-badge__value { font-weight: var(--he-font-weight-bold); color: var(--he-color-accent); }

/* ═══════════════════════════════════════════════════════════════
   24. COVERAGE CHECKLIST
   ═══════════════════════════════════════════════════════════════ */
.he-coverage-checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--he-space-3);
}

.he-coverage-checklist__item {
  display: flex;
  align-items: center;
  gap: var(--he-space-3);
  padding: var(--he-space-3) var(--he-space-4);
  border-radius: var(--he-radius);
  border: 1px solid var(--he-color-border-light);
  font-size: var(--he-text-sm);
}

.he-coverage-checklist__item--yes { background: var(--he-color-success-bg); border-color: #A7F3D0; }
.he-coverage-checklist__item--no  { background: #F3F4F6; color: var(--he-color-text-muted); }

.he-coverage-checklist__icon { font-size: var(--he-text-md); font-weight: var(--he-font-weight-bold); flex-shrink: 0; }
.he-coverage-checklist__item--yes .he-coverage-checklist__icon { color: var(--he-color-success); }
.he-coverage-checklist__item--no  .he-coverage-checklist__icon { color: #EF4444; }

.he-coverage-checklist__status {
  margin-left: auto;
  font-size: var(--he-text-xs);
  font-weight: var(--he-font-weight-medium);
}

/* ═══════════════════════════════════════════════════════════════
   25. PROS / CONS
   ═══════════════════════════════════════════════════════════════ */
.he-pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--he-space-4);
  margin-bottom: var(--he-space-6);
}

.he-pros-cons__col {
  padding: var(--he-space-5);
  border-radius: var(--he-radius);
}

.he-pros-cons__col--pros { background: var(--he-color-success-bg); }
.he-pros-cons__col--cons { background: var(--he-color-urgent-bg); }

.he-pros-cons__heading {
  font-size: var(--he-text-base);
  font-weight: var(--he-font-weight-bold);
  margin-bottom: var(--he-space-4);
}

.he-pros-cons__col--pros .he-pros-cons__heading { color: var(--he-color-success); }
.he-pros-cons__col--cons .he-pros-cons__heading { color: var(--he-color-urgent); }

/* ═══════════════════════════════════════════════════════════════
   26. INSURANCE PLAN CARDS
   ═══════════════════════════════════════════════════════════════ */
.he-plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--he-space-4);
  margin-bottom: var(--he-space-4);
}

.he-plan-card {
  background: var(--he-color-bg);
  border: 1px solid var(--he-color-border-light);
  border-radius: var(--he-radius);
  padding: var(--he-space-4);
  display: flex;
  flex-direction: column;
  gap: var(--he-space-3);
  transition: box-shadow var(--he-transition);
}

.he-plan-card:hover { box-shadow: var(--he-shadow); }
.he-plan-card--bronze   { border-top: 4px solid var(--he-tier-bronze); }
.he-plan-card--silver   { border-top: 4px solid var(--he-tier-silver); }
.he-plan-card--gold     { border-top: 4px solid var(--he-tier-gold); }
.he-plan-card--platinum { border-top: 4px solid var(--he-tier-platinum); }

.he-plan-card__header { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: var(--he-space-2); }

.he-plan-card__title {
  font-size: var(--he-text-base);
  font-weight: var(--he-font-weight-bold);
  margin: 0;
}
.he-plan-card__title a { color: var(--he-color-text); text-decoration: none; }
.he-plan-card__title a:hover { color: var(--he-color-primary); }

.he-plan-card__badges { display: flex; flex-wrap: wrap; gap: var(--he-space-1); }

.he-plan-card__best-for {
  font-size: var(--he-text-xs);
  color: var(--he-color-text-secondary);
  line-height: var(--he-line-height-base);
}

.he-plan-card__premium {
  font-size: var(--he-text-sm);
  font-weight: var(--he-font-weight-medium);
}

.he-plan-card__premium-note {
  display: block;
  font-size: var(--he-text-xs);
  color: var(--he-color-text-muted);
  font-weight: var(--he-font-weight-normal);
}

.he-plan-card__link {
  font-size: var(--he-text-sm);
  color: var(--he-color-primary);
  text-decoration: none;
  font-weight: var(--he-font-weight-medium);
  margin-top: auto;
}

/* ═══════════════════════════════════════════════════════════════
   27. TABLES
   ═══════════════════════════════════════════════════════════════ */
.he-cost-table { overflow-x: auto; }
.he-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--he-text-sm);
}
.he-table th,
.he-table td {
  padding: var(--he-space-3) var(--he-space-4);
  border: 1px solid var(--he-color-border-light);
  text-align: left;
}
.he-table th[scope="row"] {
  background: var(--he-color-bg-alt);
  font-weight: var(--he-font-weight-medium);
  width: 40%;
}

/* ═══════════════════════════════════════════════════════════════
   28. SIDEBAR
   ═══════════════════════════════════════════════════════════════ */
.he-page__sidebar { display: flex; flex-direction: column; gap: var(--he-space-5); }

.he-sidebar-box {
  background: var(--he-color-bg);
  border: 1px solid var(--he-color-border-light);
  border-radius: var(--he-radius);
  padding: var(--he-space-5);
  display: flex;
  flex-direction: column;
  gap: var(--he-space-3);
}

.he-sidebar-box__title {
  font-size: var(--he-text-base);
  font-weight: var(--he-font-weight-bold);
  margin: 0;
  padding-bottom: var(--he-space-3);
  border-bottom: 1px solid var(--he-color-border-light);
}

.he-sidebar-box--facts .he-dl { font-size: var(--he-text-sm); }

.he-sidebar-box--insurance-cta {
  background: var(--he-color-primary-light);
  border-color: var(--he-color-primary);
}

.he-sidebar-box--cta {
  background: var(--he-color-accent-light);
  border-color: var(--he-color-accent);
}

.he-sidebar-box__status { font-size: var(--he-text-sm); }
.he-sidebar-box__status--accepting { color: var(--he-color-success); font-weight: var(--he-font-weight-medium); }

.he-sidebar-box__ext-link {
  font-size: var(--he-text-xs);
  color: var(--he-color-text-muted);
  text-decoration: none;
}
.he-sidebar-box__ext-link:hover { text-decoration: underline; }

.he-sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--he-space-2);
}

.he-sidebar-list li { }

.he-sidebar-list a {
  font-size: var(--he-text-sm);
  color: var(--he-color-primary);
  text-decoration: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.he-sidebar-list a:hover { text-decoration: underline; }

.he-sidebar-list__count {
  font-size: var(--he-text-xs);
  color: var(--he-color-text-muted);
}

/* ═══════════════════════════════════════════════════════════════
   29. FILTER NAVS (A-Z, body system, urgency)
   ═══════════════════════════════════════════════════════════════ */
.he-filter-nav {
  max-width: var(--he-max-width);
  margin-inline: auto;
  padding-inline: var(--he-gutter);
  padding-block: var(--he-space-4);
  border-bottom: 1px solid var(--he-color-border-light);
  overflow-x: auto;
}

.he-filter-nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--he-space-2);
  list-style: none;
  padding: 0;
  margin: 0;
}

.he-filter-nav__item {
  display: inline-flex;
  align-items: center;
  gap: var(--he-space-1);
  padding: var(--he-space-2) var(--he-space-4);
  font-size: var(--he-text-sm);
  font-weight: var(--he-font-weight-medium);
  color: var(--he-color-text-secondary);
  background: var(--he-color-bg);
  border: 1px solid var(--he-color-border);
  border-radius: var(--he-radius-full);
  text-decoration: none;
  transition: all var(--he-transition);
  white-space: nowrap;
}

.he-filter-nav__item:hover,
.he-filter-nav__item--active {
  background: var(--he-color-primary);
  color: #fff;
  border-color: var(--he-color-primary);
  text-decoration: none;
}

.he-filter-nav__count {
  background: rgba(255,255,255,0.2);
  border-radius: var(--he-radius-full);
  padding: 0 6px;
  font-size: var(--he-text-xs);
}
.he-filter-nav__item--active .he-filter-nav__count { background: rgba(255,255,255,0.3); }

/* A-Z filter */
.he-az-filter {
  max-width: var(--he-max-width);
  margin-inline: auto;
  padding-inline: var(--he-gutter);
  padding-block: var(--he-space-3);
  overflow-x: auto;
}

.he-az-filter__list {
  display: flex;
  gap: var(--he-space-1);
  list-style: none;
  padding: 0;
  margin: 0;
}

.he-az-filter__letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-size: var(--he-text-sm);
  font-weight: var(--he-font-weight-bold);
  color: var(--he-color-text-secondary);
  background: var(--he-color-bg);
  border: 1px solid var(--he-color-border-light);
  border-radius: var(--he-radius-sm);
  text-decoration: none;
  transition: all var(--he-transition);
}

.he-az-filter__letter:hover,
.he-az-filter__letter--active {
  background: var(--he-color-primary);
  color: #fff;
  border-color: var(--he-color-primary);
  text-decoration: none;
}

/* ═══════════════════════════════════════════════════════════════
   30. PROVIDER HERO
   ═══════════════════════════════════════════════════════════════ */
.he-provider-hero {
  display: flex;
  gap: var(--he-space-6);
  align-items: flex-start;
}

.he-provider-hero__photo {
  flex-shrink: 0;
}

.he-provider-hero__photo img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--he-color-border-light);
}

.he-provider-hero__photo-placeholder {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--he-color-bg-alt);
  border: 3px solid var(--he-color-border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.he-provider-hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--he-space-3);
  margin-top: var(--he-space-4);
}

/* Hospital list */
.he-hospital-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--he-space-3);
}

.he-hospital-list__item {
  display: flex;
  flex-direction: column;
  gap: var(--he-space-1);
}

.he-hospital-list__link {
  font-weight: var(--he-font-weight-medium);
  color: var(--he-color-primary);
}

.he-hospital-list__address {
  font-size: var(--he-text-xs);
  color: var(--he-color-text-muted);
}

/* ═══════════════════════════════════════════════════════════════
   31. HOMEPAGE SPECIFIC
   ═══════════════════════════════════════════════════════════════ */
.he-hero {
  background: linear-gradient(135deg, var(--he-color-primary) 0%, var(--he-color-primary-dark) 100%);
  color: #fff;
  padding-block: var(--he-space-16) var(--he-space-12);
}

.he-hero__inner { text-align: center; }

.he-hero__title {
  font-size: clamp(var(--he-text-2xl), 5vw, var(--he-text-4xl));
  color: #fff;
  margin-bottom: var(--he-space-4);
}

.he-hero__subtitle {
  font-size: var(--he-text-lg);
  color: rgba(255,255,255,0.85);
  max-width: 60ch;
  margin-inline: auto;
  margin-bottom: var(--he-space-8);
}

.he-hero-search {
  max-width: 640px;
  margin-inline: auto;
}

.he-hero-search__wrapper {
  display: flex;
  background: #fff;
  border-radius: var(--he-radius-lg);
  overflow: hidden;
  box-shadow: var(--he-shadow-lg);
  margin-bottom: var(--he-space-4);
}

.he-hero-search__input {
  flex: 1;
  padding: var(--he-space-4) var(--he-space-5);
  border: none;
  font-size: var(--he-text-md);
  outline: none;
  color: var(--he-color-text);
}

.he-hero-search__btn {
  padding: var(--he-space-4) var(--he-space-6);
  background: var(--he-color-accent);
  color: #fff;
  border: none;
  font-size: var(--he-text-base);
  font-weight: var(--he-font-weight-bold);
  cursor: pointer;
  transition: background var(--he-transition);
  white-space: nowrap;
}
.he-hero-search__btn:hover { background: #008060; }

.he-hero-search__suggestions {
  font-size: var(--he-text-sm);
  color: rgba(255,255,255,0.75);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--he-space-2);
  margin: 0;
}

.he-hero-search__tag {
  color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  padding: var(--he-space-1) var(--he-space-3);
  border-radius: var(--he-radius-full);
  text-decoration: none;
  font-size: var(--he-text-xs);
  transition: background var(--he-transition);
}
.he-hero-search__tag:hover { background: rgba(255,255,255,0.2); text-decoration: none; }

.he-hero-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--he-space-2);
  margin-top: var(--he-space-8);
}

.he-hero-nav__pill {
  display: flex;
  align-items: center;
  gap: var(--he-space-2);
  padding: var(--he-space-3) var(--he-space-5);
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--he-radius-full);
  font-size: var(--he-text-sm);
  font-weight: var(--he-font-weight-medium);
  text-decoration: none;
  transition: background var(--he-transition);
}
.he-hero-nav__pill:hover { background: rgba(255,255,255,0.2); text-decoration: none; color: #fff; }

/* Stats bar */
.he-stats-bar {
  background: var(--he-color-bg-alt);
  border-bottom: 1px solid var(--he-color-border-light);
  padding-block: var(--he-space-5);
}

.he-stats-bar__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--he-space-8);
}

.he-stats-bar__item { text-align: center; }

.he-stats-bar__value {
  display: block;
  font-size: var(--he-text-2xl);
  font-weight: var(--he-font-weight-bold);
  color: var(--he-color-primary);
}

.he-stats-bar__label {
  display: block;
  font-size: var(--he-text-sm);
  color: var(--he-color-text-muted);
}

/* Body systems grid */
.he-section--body-systems { padding-block: var(--he-space-12); background: var(--he-color-bg); }

.he-body-systems-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--he-space-3);
  margin-top: var(--he-space-6);
}

.he-body-system-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--he-space-5) var(--he-space-3);
  background: var(--he-color-bg);
  border: 1px solid var(--he-color-border-light);
  border-radius: var(--he-radius);
  text-decoration: none;
  transition: all var(--he-transition);
  gap: var(--he-space-2);
}

.he-body-system-card:hover {
  border-color: var(--he-color-primary);
  box-shadow: var(--he-shadow);
  transform: translateY(-2px);
  text-decoration: none;
}

.he-body-system-card__icon { font-size: 2rem; }

.he-body-system-card__name {
  font-size: var(--he-text-sm);
  font-weight: var(--he-font-weight-bold);
  color: var(--he-color-text);
}

.he-body-system-card__count {
  font-size: var(--he-text-xs);
  color: var(--he-color-text-muted);
}

/* Featured section */
.he-section--featured { padding-block: var(--he-space-12); background: var(--he-color-bg-alt); }

.he-section__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--he-space-6);
}

.he-card--condition-featured .he-card__inner {
  position: relative;
}

/* Insurance section */
.he-section--insurance { padding-block: var(--he-space-12); background: var(--he-color-bg); }

/* ═══════════════════════════════════════════════════════════════
   32. SEARCH RESULTS
   ═══════════════════════════════════════════════════════════════ */
.he-search-form--full .he-search-form__wrapper {
  display: flex;
  max-width: 640px;
  gap: var(--he-space-2);
  margin-top: var(--he-space-5);
}

.he-search-form--full .he-search-form__input {
  flex: 1;
  padding: var(--he-space-3) var(--he-space-4);
  border: 1px solid var(--he-color-border);
  border-radius: var(--he-radius);
  font-size: var(--he-text-base);
  width: auto;
}

.he-search-form--full .he-search-form__submit {
  padding: var(--he-space-3) var(--he-space-6);
  border-radius: var(--he-radius);
}

.he-search-group { margin-bottom: var(--he-space-8); }

.he-search-group__title {
  font-size: var(--he-text-lg);
  display: flex;
  align-items: center;
  gap: var(--he-space-3);
  margin-bottom: var(--he-space-4);
  padding-bottom: var(--he-space-3);
  border-bottom: 1px solid var(--he-color-border-light);
}

.he-search-group__count {
  font-size: var(--he-text-sm);
  color: var(--he-color-text-muted);
  font-weight: var(--he-font-weight-normal);
}

.he-search-results { display: flex; flex-direction: column; gap: var(--he-space-4); }

.he-search-result { }

.he-search-result__title {
  font-size: var(--he-text-md);
  margin-bottom: var(--he-space-2);
}
.he-search-result__title a { color: var(--he-color-primary); }

.he-search-result__excerpt {
  font-size: var(--he-text-sm);
  color: var(--he-color-text-secondary);
  margin-bottom: var(--he-space-1);
}

.he-search-result__url {
  font-size: var(--he-text-xs);
  color: var(--he-color-text-muted);
}

/* ═══════════════════════════════════════════════════════════════
   33. 404 PAGE
   ═══════════════════════════════════════════════════════════════ */
.he-page--404 .he-page__hero { text-align: center; padding-block: var(--he-space-16); }

.he-404-graphic {
  font-size: 8rem;
  font-weight: var(--he-font-weight-bold);
  color: var(--he-color-border);
  line-height: 1;
  margin-bottom: var(--he-space-4);
}

.he-404-search,
.he-404-nav {
  max-width: 640px;
  margin-inline: auto;
  padding-inline: var(--he-gutter);
  margin-bottom: var(--he-space-10);
}

.he-404-nav__list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--he-space-3);
  list-style: none;
  padding: 0;
  margin-top: var(--he-space-5);
}

.he-404-nav__list a {
  display: flex;
  align-items: center;
  gap: var(--he-space-3);
  padding: var(--he-space-3) var(--he-space-4);
  background: var(--he-color-bg-alt);
  border: 1px solid var(--he-color-border-light);
  border-radius: var(--he-radius);
  font-size: var(--he-text-sm);
  color: var(--he-color-text);
  text-decoration: none;
  transition: all var(--he-transition);
}
.he-404-nav__list a:hover {
  background: var(--he-color-primary-light);
  border-color: var(--he-color-primary);
  color: var(--he-color-primary);
  text-decoration: none;
}

/* ═══════════════════════════════════════════════════════════════
   34. ADSENSE SLOTS
   ═══════════════════════════════════════════════════════════════ */
.he-ad {
  max-width: var(--he-max-width);
  margin-inline: auto;
  padding-inline: var(--he-gutter);
  margin-block: var(--he-space-6);
  text-align: center;
}

.he-ad::before {
  content: 'Advertisement';
  display: block;
  font-size: var(--he-text-xs);
  color: var(--he-color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--he-space-2);
}

/* ═══════════════════════════════════════════════════════════════
   35. PAGINATION
   ═══════════════════════════════════════════════════════════════ */
.he-pagination {
  margin-top: var(--he-space-8);
  padding-top: var(--he-space-6);
  border-top: 1px solid var(--he-color-border-light);
}

.he-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  gap: var(--he-space-1);
}

.he-pagination .page-numbers a,
.he-pagination .page-numbers span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 var(--he-space-3);
  border: 1px solid var(--he-color-border);
  border-radius: var(--he-radius-sm);
  font-size: var(--he-text-sm);
  text-decoration: none;
  color: var(--he-color-text);
  transition: all var(--he-transition);
}

.he-pagination .page-numbers a:hover {
  background: var(--he-color-primary-light);
  border-color: var(--he-color-primary);
  color: var(--he-color-primary);
}

.he-pagination .page-numbers.current {
  background: var(--he-color-primary);
  border-color: var(--he-color-primary);
  color: #fff;
}

/* ═══════════════════════════════════════════════════════════════
   36. UTILITIES
   ═══════════════════════════════════════════════════════════════ */
.he-no-results {
  text-align: center;
  padding: var(--he-space-12);
  color: var(--he-color-text-muted);
}

.he-no-results h2 { color: var(--he-color-text-secondary); margin-bottom: var(--he-space-4); }
.he-no-results__suggestions { list-style: none; padding: 0; display: flex; flex-direction: column; align-items: center; gap: var(--he-space-3); margin-top: var(--he-space-5); }
.he-no-results__suggestions a { color: var(--he-color-primary); font-size: var(--he-text-md); }

/* Tag lists */
.he-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--he-space-2);
  list-style: none;
  padding: 0;
  margin: 0;
}

.he-tag {
  padding: var(--he-space-2) var(--he-space-3);
  background: var(--he-color-bg-alt);
  border: 1px solid var(--he-color-border-light);
  border-radius: var(--he-radius-full);
  font-size: var(--he-text-sm);
  color: var(--he-color-text-secondary);
}

.he-tag--specialty { background: var(--he-color-accent-light); color: #007A58; border-color: #A7F3D0; }
.he-tag--coverage  { background: var(--he-color-primary-light); color: var(--he-color-primary-dark); border-color: var(--he-color-primary); }

/* Symptom list (in condition template) */
.he-symptom-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--he-space-2);
  list-style: none;
  padding: 0;
  margin: 0 0 var(--he-space-4);
}

.he-symptom-list__item { }

.he-symptom-list__link {
  display: flex;
  align-items: center;
  gap: var(--he-space-2);
  padding: var(--he-space-2) var(--he-space-3);
  background: var(--he-color-bg-alt);
  border: 1px solid var(--he-color-border-light);
  border-radius: var(--he-radius);
  font-size: var(--he-text-sm);
  color: var(--he-color-text);
  text-decoration: none;
  transition: all var(--he-transition);
}
.he-symptom-list__link:hover {
  background: var(--he-color-primary-light);
  border-color: var(--he-color-primary);
  color: var(--he-color-primary);
  text-decoration: none;
}
.he-symptom-list__link::before { content: '•'; color: var(--he-color-primary); }

/* Map embed */
.he-map-embed {
  border-radius: var(--he-radius);
  overflow: hidden;
  border: 1px solid var(--he-color-border-light);
}

/* Insurance company list */
.he-ins-company-list {
  list-style: none;
  padding: 0;
  margin: var(--he-space-4) 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--he-space-2);
}

.he-ins-company-list li a {
  font-size: var(--he-text-sm);
  padding: var(--he-space-1) var(--he-space-3);
  background: var(--he-color-primary-light);
  border-radius: var(--he-radius-full);
  color: var(--he-color-primary);
  text-decoration: none;
}

/* Plan summary sidebar box */
.he-sidebar-box--plan-summary { background: var(--he-color-primary-light); border-color: var(--he-color-primary); }

/* Insurance page */
.he-page--insurance-hub .he-filter-nav--insurance { border-bottom: 2px solid var(--he-color-primary-light); }
.he-insurance-hub__sidebar { display: flex; flex-direction: column; gap: var(--he-space-5); }

/* ═══════════════════════════════════════════════════════════════
   37. RESPONSIVE BREAKPOINTS
   ═══════════════════════════════════════════════════════════════ */

/* Large desktop — 1280px+ uses base styles above */

/* Medium desktop — 1024px */
@media (max-width: 1024px) {
  .he-body-systems-grid { grid-template-columns: repeat(4, 1fr); }
  .he-card-grid--4col   { grid-template-columns: repeat(3, 1fr); }
  .he-plans-grid        { grid-template-columns: repeat(2, 1fr); }
}

/* Tablet — 768px */
@media (max-width: 768px) {
  :root { --he-gutter: var(--he-space-4); }

  /* Header */
  .he-nav--primary { display: none; }
  .he-site-header__menu-toggle { display: flex; }
  .he-site-header__search { display: none; }

  /* Navigation expanded */
  .he-nav--primary.is-open {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--he-color-bg);
    z-index: var(--he-z-overlay);
    padding: var(--he-space-16) var(--he-space-6);
  }
  .he-nav--primary.is-open .he-nav__list {
    flex-direction: column;
    font-size: var(--he-text-xl);
  }

  /* Layout */
  .he-page__content-grid { grid-template-columns: 1fr; }
  .he-insurance-hub-grid { grid-template-columns: 1fr; }
  .he-page__sidebar      { order: -1; } /* Sidebar above content on mobile */

  /* Cards */
  .he-card-grid--2col,
  .he-card-grid--3col,
  .he-card-grid--4col { grid-template-columns: 1fr; }
  .he-plans-grid       { grid-template-columns: 1fr; }
  .he-coverage-checklist { grid-template-columns: 1fr; }
  .he-pros-cons         { grid-template-columns: 1fr; }
  .he-body-systems-grid { grid-template-columns: repeat(3, 1fr); }

  /* Footer */
  .he-site-footer__nav-grid { grid-template-columns: 1fr 1fr; }

  /* Provider */
  .he-provider-hero { flex-direction: column; align-items: center; text-align: center; }
  .he-provider-hero__ctas { justify-content: center; }

  /* TOC */
  .he-toc__list { grid-template-columns: 1fr; }

  /* Symptom list */
  .he-symptom-list { grid-template-columns: 1fr 1fr; }

  /* E-E-A-T bar */
  .he-eeat-bar { flex-direction: column; gap: var(--he-space-3); }
  .he-eeat-bar__meta { margin-left: 0; }

  /* Hero search */
  .he-hero-search__wrapper { flex-direction: column; }
  .he-hero-nav { flex-wrap: wrap; }

  /* Stats bar */
  .he-stats-bar__inner { gap: var(--he-space-6); }
}

/* Mobile — 480px */
@media (max-width: 480px) {
  h1 { font-size: var(--he-text-2xl); }
  h2 { font-size: var(--he-text-xl);  }

  .he-body-systems-grid  { grid-template-columns: repeat(2, 1fr); }
  .he-symptom-list       { grid-template-columns: 1fr; }
  .he-site-footer__nav-grid { grid-template-columns: 1fr; }
  .he-404-nav__list      { grid-template-columns: 1fr; }
  .he-stats-bar__inner   { flex-direction: column; align-items: center; }
  .he-az-filter__list    { flex-wrap: wrap; }
  .he-az-filter__letter  { width: 30px; height: 30px; font-size: var(--he-text-xs); }
}

/* ═══════════════════════════════════════════════════════════════
   38. DARK MODE
   ═══════════════════════════════════════════════════════════════ */
@media (prefers-color-scheme: dark) {
  :root {
    --he-color-text:            #F1F5F9;
    --he-color-text-secondary:  #CBD5E1;
    --he-color-text-muted:      #94A3B8;
    --he-color-border:          #334155;
    --he-color-border-light:    #1E293B;
    --he-color-bg:              #0F172A;
    --he-color-bg-alt:          #1E293B;
    --he-color-primary-light:   rgba(0,87,184,0.15);
    --he-color-accent-light:    rgba(0,168,120,0.15);
    --he-color-urgent-bg:       rgba(211,47,47,0.1);
    --he-color-warning-bg:      rgba(230,81,0,0.1);
    --he-color-info-bg:         rgba(2,119,189,0.1);
    --he-color-success-bg:      rgba(46,125,50,0.1);
  }

  .he-site-header { background: #0F172A; border-bottom-color: #1E293B; }
  .he-hero { background: linear-gradient(135deg, #0D3B7A 0%, #081D3E 100%); }
  .he-card { background: #1E293B; border-color: #334155; }
  .he-card__inner { color: var(--he-color-text); }
  .he-contact-card { background: #1E293B; }
  .he-eeat-bar { background: #1E293B; border-color: #334155; }
  .he-sidebar-box { background: #1E293B; border-color: #334155; }
  .he-toc { background: #1E293B; border-color: #334155; }
  .he-faq__question { background: #1E293B; color: var(--he-color-text); }
  .he-faq__question[aria-expanded="true"] { background: rgba(0,87,184,0.2); }
  .he-faq__answer { background: #0F172A; }
  .he-filter-nav__item { background: #1E293B; border-color: #334155; color: var(--he-color-text-secondary); }
  .he-az-filter__letter { background: #1E293B; border-color: #334155; }
  .he-tag { background: #1E293B; border-color: #334155; }
  .he-symptom-list__link { background: #1E293B; border-color: #334155; }
  .he-body-system-card { background: #1E293B; border-color: #334155; }
  .he-he-page__hero--insurance { background: #1E293B; }
  .he-plan-card { background: #1E293B; border-color: #334155; }
  .he-table th[scope="row"] { background: #1E293B; }
}

/* ═══════════════════════════════════════════════════════════════
   39. PRINT STYLES
   ═══════════════════════════════════════════════════════════════ */
@media print {
  .he-site-header,
  .he-site-footer,
  .he-page__sidebar,
  .he-ad,
  .he-coverage-badge,
  .he-hero-nav,
  .he-filter-nav,
  .he-az-filter,
  .he-pagination,
  .he-btn,
  nav { display: none; }

  body { font-size: 12pt; color: #000; }

  .he-page__content-grid { grid-template-columns: 1fr; }
  .he-eeat-bar { border: 1px solid #000; }
  .he-disclaimer { border: 1px solid #000; }

  a::after { content: ' (' attr(href) ')'; font-size: 0.8em; }
}
