/* ==========================================================================
   OHH AFib Cornerstone Page
   Design: OHH brand (white/black/red) with dark hero accent
   Typography: inherits OHH site font (museo-sans, sans-serif)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Design Tokens
   -------------------------------------------------------------------------- */
:root {
  /* OHH Brand */
  --ohh-crimson: #A80532;
  --ohh-crimson-glow: rgba(168, 5, 50, 0.1);
  --ohh-crimson-soft: #C43860;
  --ohh-crimson-dark: #8a042a;
  /* WCAG AA-safe crimson for text on dark backgrounds (≥4.5:1 on --deep-navy) */
  --ohh-crimson-on-dark: #F06B85;

  /* Dark (hero + accent sections only) */
  --deep-navy: #0D0D1A;
  --dark-charcoal: #1A1A2E;
  --card-dark: #1E1E32;
  --card-dark-hover: #25253D;

  /* Light — primary page palette */
  --white: #ffffff;
  --off-white: #F9F9FB;
  --ohh-gray: #EFF2F6;
  --border-light: #E2E6EB;
  --bg-warm: #F7F5F2;

  /* EKG / Accent */
  --ekg-cyan: #5EC4C8;
  --ekg-cyan-glow: rgba(94, 196, 200, 0.15);
  --ekg-blue: #4A90D9;
  --ekg-afib-red: #e8475a;

  /* Text */
  --text-dark: #1a1a2e;
  --text-body: #3a3a48;            /* darkened for AA on white */
  --text-muted: #444;
  --text-on-dark: #F2EEE9;
  /* Brightened for stronger AA contrast on dark backgrounds */
  --text-on-dark-muted: rgba(242, 238, 233, 0.92);
  --text-on-dark-faint: rgba(242, 238, 233, 0.78);

  /* Utility */
  --success-green: #4CAF82;
  --caution-amber: #D4A843;

  /* Type scale — bumped one step for readability */
  --type-hero: clamp(2.4rem, 5vw, 3.5rem);
  --type-section: clamp(1.8rem, 3.5vw, 2.6rem);
  --type-subsection: clamp(1.4rem, 2.4vw, 1.85rem);
  --type-stat: clamp(3rem, 7vw, 5rem);
  --type-body: clamp(1.0625rem, 1.2vw, 1.2rem);
  --type-caption: 0.95rem;
  --type-overline: 0.8rem;

  /* Spacing */
  --leading-tight: 1.15;
  --leading-body: 1.75;
  --leading-relaxed: 1.85;
  --tracking-overline: 0.16em;

  /* Layout */
  --max-content: 1200px;
  --max-narrow: 780px;
  --max-wide: 1400px;
  --section-gap: clamp(64px, 8vh, 120px);
  --gutter: clamp(24px, 3vw, 48px);

  /* Motion */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-reveal: 0.9s;
  --duration-fast: 0.3s;
}

/* --------------------------------------------------------------------------
   Page Base
   -------------------------------------------------------------------------- */
.afib-page {
  background: var(--white);
  color: var(--text-body);
  
  font-weight: 400;
  font-size: var(--type-body);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.afib-page *,
.afib-page *::before,
.afib-page *::after {
  box-sizing: border-box;
}

.afib-page img { max-width: 100%; height: auto; }

/* --------------------------------------------------------------------------
   Typography Utilities
   -------------------------------------------------------------------------- */
.afib-heading {
  
  font-weight: 700;
  line-height: var(--leading-tight);
  color: var(--text-dark);
  margin: 0;
}

.afib-overline {
  
  font-size: var(--type-overline);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--tracking-overline);
  color: var(--ohh-crimson);
  margin: 0 0 1rem 0;
}

.afib-overline--with-line {
  display: flex;
  align-items: center;
  gap: 12px;
}
.afib-overline--with-line::before {
  content: '';
  width: 32px;
  height: 2px;
  background: var(--ohh-crimson);
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Layout Utilities
   -------------------------------------------------------------------------- */
.afib-container {
  width: 100%;
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.afib-container--narrow { max-width: var(--max-narrow); }
.afib-container--wide { max-width: var(--max-wide); }

.afib-section {
  padding: var(--section-gap) 0;
  position: relative;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.afib-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 35px;
  
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all var(--duration-fast) ease;
  border: 2px solid transparent;
  text-decoration: none;
}

.afib-btn--primary {
  background: var(--ohh-crimson);
  color: #fff;
  border-color: var(--ohh-crimson);
}
.afib-btn--primary:hover {
  background: var(--ohh-crimson-dark);
  border-color: var(--ohh-crimson-dark);
}

.afib-btn--ghost {
  background: transparent;
  color: var(--text-on-dark);
  border-color: rgba(255, 255, 255, 0.3);
}
.afib-btn--ghost:hover {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.08);
}

.afib-btn--outline {
  background: transparent;
  color: var(--ohh-crimson);
  border-color: var(--ohh-crimson);
}
.afib-btn--outline:hover {
  background: var(--ohh-crimson);
  color: #fff;
}

/* --------------------------------------------------------------------------
   Scroll Reveal
   -------------------------------------------------------------------------- */
.afib-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--duration-reveal) var(--ease-out-expo),
              transform var(--duration-reveal) var(--ease-out-expo);
}
.afib-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .afib-reveal { opacity: 1; transform: none; transition: none; }
}

.afib-reveal[data-delay="1"] { transition-delay: 0.1s; }
.afib-reveal[data-delay="2"] { transition-delay: 0.2s; }
.afib-reveal[data-delay="3"] { transition-delay: 0.3s; }
.afib-reveal[data-delay="4"] { transition-delay: 0.4s; }
.afib-reveal[data-delay="5"] { transition-delay: 0.5s; }
.afib-reveal[data-delay="6"] { transition-delay: 0.6s; }
.afib-reveal[data-delay="7"] { transition-delay: 0.7s; }
.afib-reveal[data-delay="8"] { transition-delay: 0.8s; }

/* --------------------------------------------------------------------------
   Focus States
   -------------------------------------------------------------------------- */
.afib-page *:focus-visible {
  outline: 2px solid var(--ohh-crimson);
  outline-offset: 2px;
}

/* ==========================================================================
   SECTION 1: Hero (dark reversed, two-column with stats)
   ========================================================================== */
.afib-hero {
  /* Header height offset — set by JS from #masthead's actual height.
     Fallback values used until JS runs or if measurement fails. */
  --afib-hero-header-offset: 100px;
  position: relative;
  background:
    radial-gradient(ellipse 70% 60% at 85% 20%, rgba(168, 5, 50, 0.18), transparent 60%),
    radial-gradient(ellipse 60% 50% at 10% 90%, rgba(168, 5, 50, 0.10), transparent 65%),
    var(--deep-navy);
  overflow: hidden;
  padding: 56px 0 96px;
  /* Cap at viewport-minus-header so the floating chevron is always visible.
     dvh handles mobile browser chrome (address bar collapse). */
  min-height: 560px;
  height: calc(100vh - var(--afib-hero-header-offset));
  height: calc(100dvh - var(--afib-hero-header-offset));
  display: flex;
  align-items: center;
}

.afib-hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(168, 5, 50, 0.35), transparent);
  pointer-events: none;
}

.afib-hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
  max-width: var(--max-content);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.afib-hero__content {
  max-width: 560px;
  text-align: left;
}

.afib-hero__overline {
  font-size: 13.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ohh-crimson-on-dark);
  margin-bottom: 1rem;
}

.afib-hero__headline {
  font-size: clamp(2.2rem, 4.4vw, 3.1rem);
  font-weight: 700;
  line-height: 1.08;
  color: var(--text-on-dark);
  margin: 0 0 1.25rem 0;
}

.afib-hero__headline em {
  font-style: italic;
  font-weight: 700;
  color: var(--ohh-crimson-on-dark);
}

.afib-hero__subhead {
  font-weight: 300;
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--text-on-dark-muted);
  margin: 0 0 1.75rem 0;
  max-width: 80%;
}

@media (max-width: 450px) {
  .afib-hero__subhead { max-width: 100%; }
}

.afib-hero__ctas {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Hero stats (right column) */
.afib-hero__stats {
  background: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 28px 28px 24px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.afib-hero__stat-big {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}

.afib-hero__stat-number {
  font-weight: 100;
  font-size: clamp(2.2rem, 5.5vw, 4.8rem);
  color: var(--ohh-crimson-on-dark);
  line-height: 1;
  letter-spacing: -0.02em;
}

.afib-hero__stat-unit {
  font-weight: 300;
  font-size: clamp(1.4rem, 3.2vw, 3rem);
  color: var(--ohh-crimson-on-dark);
  line-height: 1;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.afib-hero__stat-caption {
  font-size: clamp(1.05rem, 1.3vw, 1.2rem);
  color: var(--text-on-dark-muted);
  margin: 0 0 20px;
  line-height: 1.5;
}

.afib-hero__stat-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin-bottom: 16px;
}

.afib-hero__stat-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.afib-hero__stat-item {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.afib-hero__stat-value {
  
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--text-on-dark);
  flex-shrink: 0;
  min-width: 60px;
}

/* --ekg-blue lightened to #7AB6E8 — ≥4.5:1 on --deep-navy */
.afib-hero__stat-value--cyan { color: #7AB6E8; }
.afib-hero__stat-value--crimson { color: var(--ohh-crimson-on-dark); }

.afib-hero__stat-label {
  font-size: 14.5px;
  color: var(--text-on-dark-muted);
  line-height: 1.4;
}

@media (max-width: 900px) {
  .afib-hero {
    --afib-hero-header-offset: 80px;
    padding: 60px 0 84px;
    /* Stacked mobile layout: let content drive height, but keep hero scale */
    height: auto;
    min-height: 60vh;
    min-height: 60dvh;
  }
  .afib-hero__inner { grid-template-columns: 1fr; gap: 25px; }
  .afib-hero__content { text-align: center; max-width: 100%; margin-left: auto; margin-right: auto; }
  .afib-hero__ctas { justify-content: center; }
  .afib-hero__subhead { max-width: 100%; }
  .afib-hero__ctas { flex-direction: column; width: 100%; }
  .afib-hero__ctas .afib-btn { width: 100%; }
  .afib-hero__stats { max-width: 480px; margin: 0 auto; }
}


/* (Section 2 stats moved into hero) */

/* ==========================================================================
   SECTION 2: Just Diagnosed
   ========================================================================== */
.afib-diagnosed {
  background: var(--ohh-gray);
  padding: var(--section-gap) 0;
}
.afib-diagnosed__grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: start;
}
.afib-diagnosed__headline {
  font-size: var(--type-section);
  color: var(--text-dark);
  margin-bottom: 28px;
}
.afib-diagnosed__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.afib-diagnosed__list li {
  padding-left: 24px;
  position: relative;
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--text-body);
}
.afib-diagnosed__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ohh-crimson);
}
.afib-diagnosed__card {
  position: sticky;
  top: 100px;
  background: var(--white);
}
.afib-diagnosed__subheading {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ohh-crimson);
}
.afib-diagnosed__questions {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.afib-diagnosed__questions li {
  padding-left: 20px;
  position: relative;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--text-body);
}
.afib-diagnosed__questions li::before {
  content: '?';
  position: absolute;
  left: 0;
  font-weight: 700;
  color: var(--ohh-crimson);
  font-size: 15px;
  top: 0px;
}
@media (max-width: 768px) {
  .afib-diagnosed__grid { grid-template-columns: 1fr; gap: 32px; }
  .afib-diagnosed__card { position: static; }
}

/* ==========================================================================
   SECTION 3: What Is AFib (light)
   ========================================================================== */
.afib-explain {
  background: var(--off-white);
  padding: var(--section-gap) 0;
}

.afib-explain__grid {
  display: grid;
  grid-template-columns: 55% 45%;
  gap: 48px;
  align-items: start;
  margin-bottom: 72px;
}

.afib-explain__headline {
  font-size: var(--type-section);
  margin-bottom: 1.5rem;
}

.afib-explain__headline em {
  color: var(--ohh-crimson);
  font-style: italic;
}

.afib-explain__body { font-size: 16.5px; line-height: var(--leading-relaxed); }
.afib-explain__body p { margin: 0 0 1.2em; }

/* Featured pull quote (right column of explain section) */
.afib-explain__pullquote {
  position: relative;
  margin: 0;
  padding: 48px 40px 44px;
  background: var(--dark-charcoal);
  color: var(--text-on-dark);
  border-radius: 20px;
  overflow: hidden;
  isolation: isolate;
}

.afib-explain__pullquote::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 15%, rgba(168, 5, 50, 0.35), transparent 55%),
    radial-gradient(circle at 10% 90%, rgba(168, 5, 50, 0.15), transparent 60%);
  z-index: -1;
}

.afib-explain__pullquote::after {
  content: none;
  position: absolute;
  left: 40px;
  right: 40px;
  bottom: 28px;
  height: 2px;
  background: var(--ohh-crimson);
  border-radius: 2px;
}

.afib-explain__pullquote-mark {
  display: block;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 140px;
  line-height: 0.8;
  color: var(--ohh-crimson);
  margin: -10px 0 -20px -6px;
  opacity: 0.9;
}

.afib-explain__pullquote-text {
  margin: 0;
  font-size: clamp(1.3rem, 1.9vw, 1.6rem);
  line-height: 1.4;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #aaa;
}

.afib-explain__pullquote-text p { margin: 0; }

.afib-explain__pullquote-text em {
  font-style: normal;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(transparent 62%, rgba(168, 5, 50, 0.55) 62%);
  padding: 0 2px;
}

@media (max-width: 900px) {
  .afib-explain__grid { grid-template-columns: 1fr; }
  .afib-explain__pullquote { padding: 36px 28px 36px; }
  .afib-explain__pullquote-mark { font-size: 100px; }
}

/* Type cards */
.afib-types { margin-top: 20px; }
.afib-types__headline { font-size: var(--type-subsection); margin-bottom: 28px; }

.afib-types__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* --------------------------------------------------------------------------
   Card — shared base for all card variants (.afib-types__card,
   .afib-symptoms__card, .afib-risk__card add only their differences)
   -------------------------------------------------------------------------- */
.afib-card {
  background: var(--white);
  border-radius: 12px;
  padding: 28px 24px;
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
  transition: opacity var(--duration-reveal) var(--ease-out-expo),
              transform var(--duration-reveal) var(--ease-out-expo),
              box-shadow 0.15s ease;
}
.afib-card:hover {
  box-shadow: 0 6px 18px rgba(0,0,0,0.10), 0 1px 4px rgba(0,0,0,0.06);
  transition-delay: 0s;
}

.afib-types__label {
  font-size: 11.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--ohh-crimson); display: block; margin-bottom: 8px;
}

.afib-types__title {
   font-weight: 700;
  font-size: 1.05rem; margin: 0 0 10px; color: var(--text-dark);
}

.afib-types__card p { font-size: 15px; line-height: 1.65; color: var(--text-muted); margin: 0; }

.afib-types__footnote { font-size: 13.5px; color: var(--text-muted); margin-top: 20px; font-style: italic; }

@media (max-width: 900px) { .afib-types__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .afib-types__grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   SECTION 4: Symptoms (light gray)
   ========================================================================== */
.afib-symptoms {
  background: var(--ohh-gray);
  padding: var(--section-gap) 0;
}

.afib-symptoms__headline { font-size: var(--type-section); margin-bottom: 16px; }

.afib-symptoms__subhead {
  font-size: 16.5px; color: var(--text-body); max-width: 720px;
  line-height: var(--leading-relaxed); margin-bottom: 48px;
}

.afib-symptoms__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* Symptoms-specific: adds a thin border on top of the shared card base */
.afib-symptoms__card { border: 1px solid var(--border-light); }

.afib-symptoms__icon { color: var(--ohh-crimson); margin-bottom: 16px; }
.afib-symptoms__icon--alert { color: var(--ohh-crimson); }

.afib-symptoms__card h4 {
   font-weight: 700;
  font-size: 1rem; color: var(--text-dark); margin: 0 0 8px;
}
.afib-symptoms__card p { font-size: 15px; line-height: 1.65; color: var(--text-muted); margin: 0; }

.afib-symptoms__card--alert { grid-column: 1 / -1; border-color: var(--ohh-crimson); background: rgba(168, 5, 50, 0.03); }
.afib-symptoms__card--alert h4 { color: var(--ohh-crimson); }
.afib-symptoms__card--alert p { color: var(--text-dark); }

.afib-symptoms__closing {
  text-align: center; font-style: italic; font-size: 15.5px;
  color: var(--text-muted); margin-top: 40px;
}

@media (max-width: 1024px) { .afib-symptoms__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .afib-symptoms__grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   SECTION 5: Risk Factors (white)
   ========================================================================== */
.afib-risk {
  background: var(--off-white);
  padding: var(--section-gap) 0;
}

.afib-risk__headline { font-size: var(--type-section); margin-bottom: 16px; }

.afib-risk__subhead {
  font-size: 16.5px; color: var(--text-body); max-width: 680px;
  line-height: var(--leading-body); margin-bottom: 48px;
}

.afib-risk__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* Risk-specific: flex column on top of the shared card base */
.afib-risk__card { display: flex; flex-direction: column; }

.afib-risk__card-header {
  display: flex; align-items: center; gap: 10px;
  padding: 0;
  margin: 0 0 10px;
  background: none !important;
  color: var(--ohh-crimson);
}

.afib-risk__card-header svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--ohh-crimson);
}

.afib-risk__card-header h4 {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ohh-crimson);
  margin: 0;
  line-height: 1;
}

/* Neutralize old color-variant classes */
.afib-risk__card-header--green,
.afib-risk__card-header--blue,
.afib-risk__card-header--red,
.afib-risk__card-header--amber,
.afib-risk__card-header--purple,
.afib-risk__card-header--teal { background: none; }

.afib-risk__card > p {
  padding: 0; font-size: 15px; line-height: 1.65;
  color: var(--text-muted); margin: 0 0 16px;
  flex: 1;
}

.afib-risk__callout {
  margin: 0; padding: 10px 14px;
  background: var(--off-white);
  border-top: 2px solid var(--ohh-crimson);
  border-radius: 6px;
  font-size: 14px; font-weight: 600; color: var(--text-dark);
  line-height: 1.45;
}

.afib-risk__also {
  margin-top: 40px; padding: 28px 32px;
  background: var(--ohh-gray); border-radius: 14px;
}
.afib-risk__also h4 {
   font-weight: 700;
  font-size: 1.05rem; margin: 0 0 8px;
}
.afib-risk__also p { font-size: 15.5px; color: var(--text-body); margin: 0; line-height: 1.7; }

.afib-risk__transition { text-align: center; margin-top: 56px; }
.afib-risk__transition p {
   font-weight: 600;
  font-size: 1.1rem; color: var(--text-dark); margin: 0 0 12px;
}
.afib-risk__chevron {
  display: inline-flex; color: var(--ohh-crimson);
  animation: afib-bounce 2s ease-in-out infinite;
}
.afib-page a.afib-hero__chevron {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-on-dark);
  z-index: 3;
  padding: 6px;
  transition: color 0.2s ease;
}
.afib-page a.afib-hero__chevron:hover { color: var(--ohh-crimson-on-dark); }
.afib-hero__chevron > svg { animation: afib-bounce 2s ease-in-out infinite; }
@keyframes afib-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

@media (max-width: 900px) { .afib-risk__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px) { .afib-risk__grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   SECTION 6: Calculator (dark accent section)
   ========================================================================== */
.afib-calc {
  background: var(--dark-charcoal);
  color: var(--text-on-dark);
  padding: var(--section-gap) 0;
}

.afib-calc__headline {
  font-size: var(--type-section); color: var(--text-on-dark); margin-bottom: 12px;
}
.afib-calc__headline sub { font-size: 0.6em; vertical-align: baseline; position: relative; top: 0.3em; }

.afib-calc__subhead {
  font-size: 16.5px; color: var(--text-on-dark-muted); max-width: 680px;
  line-height: var(--leading-body); margin-bottom: 48px;
}

.afib-calc__grid {
  display: grid; grid-template-columns: 1fr 360px; gap: 40px; align-items: start;
}

.afib-calc__factors { display: flex; flex-direction: column; gap: 8px; }

.afib-calc__factor {
  display: flex; align-items: center; gap: 16px; width: 100%;
  padding: 16px 20px; background: var(--card-dark);
  border: 1px solid rgba(255,255,255,0.06); border-radius: 10px;
  color: var(--text-on-dark); 
  font-size: 16.5px; cursor: pointer; transition: all var(--duration-fast) ease; text-align: left;
}
.afib-calc__factor:hover { border-color: rgba(255,255,255,0.15); background: var(--card-dark-hover); }
.afib-calc__factor.is-selected { border-color: var(--ohh-crimson); background: rgba(168,5,50,0.12); }
.afib-calc__factor[disabled],
.afib-calc__factor[aria-disabled="true"] {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.afib-calc__check {
  width: 22px; height: 22px; border-radius: 6px;
  border: 2px solid rgba(255,255,255,0.2); flex-shrink: 0;
  position: relative; transition: all var(--duration-fast) ease;
}
.afib-calc__factor.is-selected .afib-calc__check {
  background: var(--ohh-crimson); border-color: var(--ohh-crimson);
}
.afib-calc__factor.is-selected .afib-calc__check::after {
  content: ''; position: absolute; left: 6px; top: 2px;
  width: 6px; height: 11px; border: solid #fff;
  border-width: 0 2px 2px 0; transform: rotate(45deg);
}

.afib-calc__factor-name { flex: 1; }
.afib-calc__factor-pts { font-weight: 700; font-size: 14.5px; color: var(--text-on-dark-faint); flex-shrink: 0; }
.afib-calc__factor.is-selected .afib-calc__factor-pts { color: var(--ohh-crimson-soft); }

/* Score card */
.afib-calc__score-card {
  background: var(--card-dark); border-radius: 16px; padding: 32px;
  border: 1px solid rgba(255,255,255,0.06); text-align: center;
  position: sticky; top: 100px;
}
.afib-calc__score-overline {
  font-size: 11.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--text-on-dark-faint); margin: 0 0 8px;
}
.afib-calc__score-number {
   font-weight: 700;
  font-size: clamp(3rem, 6vw, 4.5rem); line-height: 1;
  color: var(--success-green); margin-bottom: 16px; transition: color var(--duration-fast) ease;
}
.afib-calc__risk-label {
   font-weight: 600;
  font-size: 1.1rem; color: var(--success-green); margin-bottom: 4px;
  transition: color var(--duration-fast) ease;
}

.afib-calc__risk-bar { margin-bottom: 12px; }
.afib-calc__risk-bar-track {
  height: 8px; border-radius: 4px; position: relative;
  background: linear-gradient(90deg, var(--success-green) 0%, var(--caution-amber) 40%, var(--ohh-crimson) 100%);
}
.afib-calc__risk-bar-fill { display: none; }
.afib-calc__risk-bar-marker {
  width: 16px; height: 16px; background: #fff; border-radius: 50%;
  position: absolute; top: 50%; left: 0%;
  transform: translate(-50%, -50%); box-shadow: 0 1px 4px rgba(0,0,0,0.3);
  transition: left var(--duration-fast) var(--ease-out-expo);
}
.afib-calc__risk-bar-labels {
  display: flex; justify-content: space-between;
  font-size: 12.5px; color: var(--text-on-dark-faint); margin-top: 6px;
}

.afib-calc__guidance { font-size: 15.5px; color: var(--text-on-dark-muted); line-height: 1.65; margin: 0 0 16px; min-height: 66px; }

.afib-calc__stroke-risk {
  font-size: 15.5px;
  color: var(--text-on-dark-muted);
  line-height: 1.65;
  margin: 0 0 16px;
}
.afib-calc__stroke-risk em {
  font-style: normal;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(transparent 62%, rgba(168, 5, 50, 0.55) 62%);
  padding: 0 2px;
}

.afib-calc__cta { width: 100%; }
.afib-calc__disclaimer { font-size: 13.5px; color: var(--text-on-dark-faint); margin-top: 48px; line-height: 1.6; max-width: 720px; }

.afib-calc__noscript {
  margin-top: 40px;
  padding: 28px 32px;
  background: rgba(255,255,255,0.06);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
}
.afib-calc__noscript h4 {
  font-size: 1.1rem;
  color: var(--text-on-dark);
  margin: 0 0 8px;
}
.afib-calc__noscript > p {
  font-size: 14.5px;
  color: var(--text-on-dark-muted);
  margin: 0 0 20px;
}
.afib-calc__noscript-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  margin-bottom: 24px;
}
.afib-calc__noscript-table th {
  text-align: left;
  padding: 8px 12px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-on-dark-faint);
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.afib-calc__noscript-table td {
  padding: 10px 12px;
  color: var(--text-on-dark-muted);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  line-height: 1.5;
}
.afib-calc__noscript-table td:last-child,
.afib-calc__noscript-table th:last-child { text-align: right; white-space: nowrap; }
.afib-calc__noscript-table tfoot td { color: var(--text-on-dark); border-top: 1px solid rgba(255,255,255,0.2); border-bottom: none; }
/* Row-header score cell (uses <th scope="row">) — reset uppercase header styling */
.afib-calc__noscript-table--bands th[scope="row"] {
  text-align: left;
  font-size: 15px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 700;
  color: var(--text-on-dark);
  white-space: nowrap;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.afib-calc__noscript-table--bands td:first-of-type { color: var(--text-on-dark); white-space: nowrap; }
.afib-calc__noscript-table--bands td,
.afib-calc__noscript-table--bands th { text-align: left; white-space: normal; }
/* Override the generic .afib-calc__noscript-table last-child right-align rule */
.afib-calc__noscript-table--bands td:last-child,
.afib-calc__noscript-table--bands th:last-child { text-align: left; white-space: normal; }

.afib-calc__noscript-footnote {
  font-size: 13.5px;
  color: var(--text-on-dark-muted);
  font-style: italic;
  margin: 0;
  line-height: 1.6;
}

@media (max-width: 640px) {
  .afib-calc__noscript-table--bands { font-size: 14px; }
  .afib-calc__noscript-table--bands th,
  .afib-calc__noscript-table--bands td { padding: 8px 8px; }
}

@media (max-width: 800px) {
  .afib-calc__grid { grid-template-columns: 1fr; }
  .afib-calc__score-card { position: static; }
}

/* ==========================================================================
   SECTION 7: Treatment Framework (light)
   ========================================================================== */
.afib-treatment {
  background: var(--white);
  padding: var(--section-gap) 0;
}

.afib-treatment__headline { font-size: var(--type-section); margin-bottom: 12px; }

.afib-treatment__subhead {
  font-size: 16.5px; color: var(--text-body); max-width: 680px;
  line-height: var(--leading-body); margin-bottom: 40px;
}

/* Tabs */
.afib-tabs {
  display: flex; gap: 4px; margin-bottom: 40px;
  border-bottom: 1px solid var(--border-light);
}

.afib-tabs__tab {
  padding: 14px 24px; background: none; border: none;
  border-bottom: 2px solid transparent; color: var(--text-muted);
   font-size: 15.5px;
  font-weight: 600; cursor: pointer; transition: all var(--duration-fast) ease; white-space: nowrap;
}
.afib-tabs__tab:hover { color: var(--text-dark); }
.afib-tabs__tab.is-active { color: var(--text-dark); border-bottom-color: var(--ohh-crimson); }

.afib-tabs__letter {
   font-weight: 700;
  font-size: 17.5px; color: var(--ohh-crimson); margin-right: 6px;
}

.afib-tabs__panel { display: none; animation: afib-fadeIn 0.4s ease; }
.afib-tabs__panel.is-active { display: block; }

@keyframes afib-fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.afib-tabs__panel-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start;
}

.afib-tabs__panel h4 {
   font-weight: 700;
  font-size: 1.2rem; color: var(--text-dark); margin: 0 0 16px;
}
.afib-tabs__panel h4 {
   font-weight: 700;
  font-size: 1rem; color: var(--text-dark); margin: 24px 0 12px;
}
.afib-tabs__panel p { font-size: 16px; line-height: 1.7; color: var(--text-body); margin: 0 0 12px; }
.afib-tabs__panel ul { padding-left: 20px; margin: 0 0 16px; }
.afib-tabs__panel li { font-size: 15.5px; line-height: 1.65; color: var(--text-body); margin-bottom: 8px; }
.afib-tabs__panel li strong { color: var(--text-dark); }

.afib-treatment__note {
  padding: 12px 16px; background: rgba(168,5,50,0.05);
  border: 1px solid var(--ohh-crimson); border-radius: 6px; font-size: 15px;
}

.afib-treatment__stat-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--ohh-gray); border-radius: 16px; padding: 40px; text-align: center;
}
.afib-treatment__stat-value {
  display: block;
  font-weight: 100;
  font-size: clamp(3rem, 6.5vw, 4.8rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ohh-crimson);
  margin-bottom: 12px;
}
.afib-tabs__panel .afib-treatment__stat-title {
  font-weight: 600;
  font-size: 18px;
  line-height: 1.25;
  color: var(--ohh-crimson);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.afib-treatment__stat-label { font-size: 14.5px; color: var(--text-muted); line-height: 1.5; margin: 0; }

.afib-treatment__decision,
.afib-treatment__holistic {
  background: var(--ohh-gray); border-radius: 14px; padding: 28px;
}

.afib-link { color: var(--ohh-crimson); text-decoration: underline; text-underline-offset: 3px; }

/* Desktop: hide the mobile accordion headers */
.afib-tabs__mobile-header { display: none; }

@media (max-width: 768px) {
  .afib-tabs__panel-grid { grid-template-columns: 1fr; }

  /* Hide the desktop tab bar */
  .afib-tabs { display: none; }

  /* Each panel becomes an accordion card — always visible regardless of [hidden] */
  .afib-tabs__panel,
  .afib-tabs__panel[hidden] {
    display: block;
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    animation: none;
  }

  /* Accordion header (the button) */
  .afib-tabs__mobile-header {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-dark);
    transition: background 0.15s ease;
  }
  .afib-tabs__mobile-header:hover,
  .afib-tabs__mobile-header[aria-expanded="true"] { background: var(--off-white); }
  .afib-tabs__mobile-header .afib-tabs__letter { margin: 0; }
  .afib-tabs__mobile-title { flex: 1; }
  .afib-tabs__mobile-chevron {
    flex-shrink: 0;
    color: var(--text-muted);
    transition: transform 0.25s ease;
  }
  .afib-tabs__mobile-header[aria-expanded="true"] .afib-tabs__mobile-chevron {
    transform: rotate(180deg);
  }

  /* Body collapses by default; expands when its header is open */
  .afib-tabs__panel-grid {
    display: none;
    padding: 18px 20px 24px;
    gap: 24px;
  }
  .afib-tabs__panel.is-mobile-open .afib-tabs__panel-grid { display: grid; }

  /* Ensure inner content blocks don't bleed and last elements don't add extra space */
  .afib-tabs__panel-grid > * { min-width: 0; }
  .afib-tabs__panel-grid > * > *:last-child { margin-bottom: 0; }
}

/* ==========================================================================
   SECTION 8: Ablation (light gray)
   ========================================================================== */
.afib-ablation {
  background: var(--ohh-gray);
  padding: var(--section-gap) 0;
}

.afib-ablation__headline { font-size: var(--type-section); margin-bottom: 16px; }

.afib-ablation__body {
  font-size: 16.5px; color: var(--text-body); max-width: 720px;
  line-height: var(--leading-body); margin-bottom: 48px;
}

.afib-ablation__steps {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 56px;
}

.afib-ablation__step {
  border: 1px solid var(--border-light);
}
.afib-ablation__step h4 {
  font-weight: 700;
  font-size: 1.05rem; color: var(--text-dark); margin: 0 0 10px;
}
.afib-ablation__step p { font-size: 15px; line-height: 1.65; color: var(--text-muted); margin: 0; }

.afib-ablation__sub-headline {
   font-weight: 700;
  font-size: var(--type-subsection); margin-bottom: 24px;
}

.afib-ablation__energy-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 48px;
}
.afib-ablation__energy {
  padding: 24px;
  border: 1px solid var(--border-light);
}
.afib-ablation__energy h4 {
   font-weight: 700;
  font-size: 1rem; color: var(--text-dark); margin: 0 0 10px;
}
.afib-ablation__energy p { font-size: 15px; line-height: 1.65; color: var(--text-muted); margin: 0; }

.afib-ablation__outcomes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.afib-ablation__outcome {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
  align-items: center;
  justify-content: center;
}
.afib-ablation__outcome-num {
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2rem);
  color: var(--ohh-crimson);
  line-height: 1.1;
}
.afib-ablation__outcome-text { font-size: 14.5px; color: var(--text-muted); line-height: 1.5; }
.afib-ablation__outcomes-note {
  margin-top: 20px;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text-body);
}
.afib-ablation__attribution { font-size: 13.5px; color: var(--text-muted); margin-top: 16px; font-style: italic; }

@media (max-width: 900px) {
  .afib-ablation__steps { grid-template-columns: repeat(2, 1fr); }
  .afib-ablation__energy-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) { .afib-ablation__steps { grid-template-columns: 1fr; } }

/* ==========================================================================
   SECTION 9: Patient Journey (white)
   ========================================================================== */
.afib-journey {
  background: var(--white);
  padding: var(--section-gap) 0;
}

.afib-journey__headline { font-size: var(--type-section); margin-bottom: 12px; }
.afib-journey__subhead {
  font-size: 16.5px; color: var(--text-body);
  line-height: var(--leading-body); margin-bottom: 48px;
}

.afib-timeline { position: relative; padding-left: 40px; }
.afib-timeline::before {
  content: ''; position: absolute; left: 11px; top: 8px; bottom: 8px;
  width: 2px; background: var(--ohh-crimson); opacity: 0.25;
}

.afib-timeline__item { position: relative; padding-bottom: 48px; }
.afib-timeline__item:last-child { padding-bottom: 0; }

.afib-timeline__marker {
  position: absolute; left: -40px; top: 4px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--white); border: 3px solid var(--ohh-crimson); z-index: 1;
}

.afib-timeline__time {
  display: inline-block; 
  font-weight: 700; font-size: 14.5px; color: var(--ohh-crimson); margin-bottom: 6px;
}

.afib-timeline__title {
   font-weight: 700;
  font-size: 1.1rem; color: var(--text-dark); margin: 0 0 8px;
}

.afib-timeline__item p { font-size: 15.5px; line-height: 1.7; color: var(--text-body); margin: 0; }

/* ==========================================================================
   SECTION 10: FAQ (light gray)
   ========================================================================== */
.afib-faq {
  background: var(--ohh-gray);
  padding: var(--section-gap) 0;
}

.afib-faq__headline { font-size: var(--type-section); margin-bottom: 40px; }

.afib-accordion__item { border-bottom: 1px solid var(--border-light); }

.afib-accordion__trigger {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 20px 0; background: none; border: none;
   font-weight: 700;
  font-size: 1.05rem; color: var(--text-dark); cursor: pointer;
  text-align: left; gap: 16px;
}
.afib-accordion__trigger:hover { color: var(--ohh-crimson); }

.afib-accordion__chevron {
  flex-shrink: 0; transition: transform var(--duration-fast) ease; color: var(--text-muted);
}
.afib-accordion__trigger[aria-expanded="true"] .afib-accordion__chevron { transform: rotate(180deg); }

.afib-accordion__content {
  overflow: hidden;
  transition: max-height var(--duration-fast) ease, padding var(--duration-fast) ease;
}
.afib-accordion__content[hidden] {
  display: block; max-height: 0; padding-top: 0; padding-bottom: 0; visibility: hidden;
}
.afib-accordion__content:not([hidden]) { max-height: 300px; padding-bottom: 20px; visibility: visible; }
.afib-accordion__content p { font-size: 16px; line-height: 1.75; color: var(--text-body); margin: 0; }

/* Dark FAQ variant */
.afib-faq--dark {
  background: var(--dark-charcoal);
}
.afib-faq--dark .afib-overline,
.afib-faq--dark .afib-faq__headline { color: var(--text-on-dark); }
.afib-faq--dark .afib-accordion__item { border-bottom-color: rgba(242, 238, 233, 0.12); }
.afib-faq--dark .afib-accordion__trigger { color: var(--text-on-dark); }
.afib-faq--dark .afib-accordion__trigger:hover { color: var(--ohh-crimson-on-dark, #e8475a); }
.afib-faq--dark .afib-accordion__chevron { color: var(--text-on-dark-faint); }
.afib-faq--dark .afib-accordion__content p { color: var(--text-on-dark-muted); }

/* ==========================================================================
   SECTION 12: CTA (crimson)
   ========================================================================== */
.afib-cta {
  background: var(--ohh-crimson);
  color: #fff;
  padding: 80px 0 100px;
  text-align: center;
}

.afib-cta__headline { font-size: var(--type-section); color: #fff; margin-bottom: 16px; }
.afib-cta__subhead { font-size: 16.5px; line-height: var(--leading-body); opacity: 0.85; max-width: 600px; margin: 0 auto 40px; }

.afib-cta__buttons { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; margin-bottom: 0; }

.afib-btn.afib-btn--cta-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 16px 36px; background: #fff; color: var(--ohh-crimson);
  border: 2px solid #fff; border-radius: 35px;
  font-size: 0.95rem; font-weight: 700;
  cursor: pointer; transition: all var(--duration-fast) ease; text-decoration: none;
}
.afib-btn.afib-btn--cta-primary:hover { background: transparent; color: #fff; }

.afib-cta__address { font-size: 14.5px; opacity: 0.65; margin: 0; }

/* ==========================================================================
   Disclaimer
   ========================================================================== */
.afib-disclaimer {
  background: var(--off-white);
  padding: 40px 0;
  border-top: 1px solid var(--border-light);
}
.afib-disclaimer p {
  font-size: 13.5px; line-height: 1.7; color: var(--text-muted); margin: 0 0 4px;
}
.afib-disclaimer p:last-child { margin-bottom: 0; }

/* ==========================================================================
   Tooltips
   ========================================================================== */
.afib-tooltip {
  position: relative;
  border-bottom: 1px dashed var(--ohh-crimson);
  cursor: help;
}
.afib-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-dark);
  color: #fff;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  padding: 7px 11px;
  border-radius: 6px;
  white-space: nowrap;
  min-width: 125px;
  max-width: 320px;
  white-space: normal;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 100;
}
.afib-tooltip::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--text-dark);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 100;
}
.afib-tooltip:hover::after,
.afib-tooltip:hover::before,
.afib-tooltip:focus::after,
.afib-tooltip:focus::before { opacity: 1; }
