/* ============================================================
   BROAD MEDICAL GROUP — Master Stylesheet
   obgyn.css
   Cherry blossom palette · Token-driven · Mobile-first
   ============================================================ */

/* --- TOKENS ------------------------------------------------ */
:root {
  /* Text */
  --color-text-strong:   #2c1e2e;
  --color-text:          #4a3a4c;
  --color-text-soft:     #7a6b7c;
  --color-text-muted:    #a89aaa;

  /* Backgrounds */
  --color-bg:            #fdfbf9;
  --color-bg-alt:        #f7f3ef;
  --color-surface:       #ffffff;
  --color-surface-hover: #faf6f2;

  /* Borders */
  --color-border:        #e8e0da;
  --color-border-hover:  #d4c5a0;

  /* Brand — cherry blossom */
  --color-accent:        #c27290;
  --color-accent-soft:   #f7e8ed;
  --color-accent-hover:  #a85d7a;

  /* Brand — gold */
  --color-gold:          #c4a86c;
  --color-gold-soft:     #f5f0e4;

  /* Status */
  --color-success:       #2d8a6e;
  --color-success-soft:  #e8f5ef;
  --color-danger:        #c0392b;
  --color-danger-soft:   #fdf0ef;

  /* Component-specific */
  --color-hero-bg:       #2c1e2e;
  --color-hero-text:     #fdfbf9;
  --color-hero-accent:   #d4899e;
  --color-nav-bg:        rgba(253,251,249,0.97);
  --color-footer-bg:     #2c1e2e;
  --color-footer-text:   #d4c5a0;

  /* Typography */
  --font-heading:  'Lora', Georgia, serif;
  --font-body:     'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:     'JetBrains Mono', 'Fira Code', monospace;

  --size-h1:   clamp(3.25rem, 7vw, 5.5rem);
  --size-h2:   clamp(2.5rem, 5vw, 4rem);
  --size-h3:   clamp(1.75rem, 3.5vw, 2.5rem);
  --size-body: 1.4rem;
  --size-small: 1.2rem;
  --size-micro: 1.05rem;

  /* Spacing */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  1.5rem;
  --space-lg:  2.5rem;
  --space-xl:  4rem;
  --space-2xl: 6rem;
  --space-3xl: 8rem;

  /* Radius */
  --radius-sm:   0.35rem;
  --radius-md:   0.5rem;
  --radius-lg:   0.75rem;
  --radius-xl:   1rem;
  --radius-pill: 100px;

  /* Shadows */
  --shadow-card: 0 1px 3px rgba(44,30,46,0.06), 0 1px 2px rgba(44,30,46,0.04);
  --shadow-md:   0 4px 12px rgba(44,30,46,0.08);
  --shadow-lg:   0 8px 24px rgba(44,30,46,0.1);
  --shadow-glow: 0 0 20px rgba(194,114,144,0.15);

  /* Motion */
  --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 400ms;
  --duration-reveal: 600ms;
}


/* --- UTILITY ----------------------------------------------- */
.text-soft  { color: var(--color-text-soft); }
.text-small { font-size: var(--size-small); }


/* --- RESET ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  max-width: 100%;
  overflow-x: clip;
}

body {
  font-family: var(--font-body);
  font-size: var(--size-body);
  font-weight: 400;
  line-height: 1.9;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  max-width: 100%;
  overflow-x: clip;
}

img, picture, video, svg { display: block; max-width: 100%; }
a { color: var(--color-accent); text-decoration: none; font-weight: 600; }
a:hover { text-decoration: underline; }
strong { color: var(--color-text-strong); font-weight: 600; }
em { font-style: italic; }
h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--color-text-strong); line-height: 1.3; letter-spacing: -0.01em; }
h1 em, h2 em, h3 em { font-style: normal; color: var(--color-accent); }

table { width: 100%; border-collapse: collapse; }


/* --- NAVIGATION -------------------------------------------- */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: border-color var(--duration-base) var(--ease-default),
              box-shadow var(--duration-base) var(--ease-default);
}
nav::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(44,30,46,0.65);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  backdrop-filter: blur(12px) saturate(140%);
  transition: background var(--duration-base) var(--ease-default);
}

nav.scrolled {
  border-bottom-color: var(--color-border);
  box-shadow: 0 1px 8px rgba(44,30,46,0.04);
}
nav.scrolled::before {
  background: var(--color-nav-bg);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  backdrop-filter: blur(12px) saturate(120%);
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-hero-text);
  letter-spacing: 0.02em;
  transition: color var(--duration-base) var(--ease-default);
}
.logo img { height: 42px; width: auto; }
nav.scrolled .logo { color: var(--color-text-strong); }

.logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.logo-sub {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-gold);
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2.25rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-hero-text);
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: color var(--duration-fast) var(--ease-default);
  position: relative;
}
nav.scrolled .nav-links a { color: var(--color-text); }
.nav-links a:hover { color: var(--color-accent); text-decoration: none; }
.nav-links a.active { color: var(--color-accent); }

/* Nav dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-trigger {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.nav-dropdown-trigger::after {
  content: '';
  border: 4px solid transparent;
  border-top-color: currentColor;
  margin-top: 2px;
  transition: transform var(--duration-fast) var(--ease-default);
}
.nav-dropdown.open .nav-dropdown-trigger::after { transform: rotate(180deg); }

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 260px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px rgba(44,30,46,0.12), 0 2px 8px rgba(44,30,46,0.06);
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s var(--ease-default),
              transform 0.2s var(--ease-default),
              visibility 0.2s;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.65rem 1rem;
  font-size: 0.95rem;
  color: var(--color-text) !important;
  font-weight: 500;
  border-radius: calc(var(--radius-lg) - 4px);
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-dropdown-menu a:hover {
  background: var(--color-bg-alt);
  color: var(--color-accent) !important;
}

/* Nav CTA */
.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-surface) !important;
  background: var(--color-accent);
  padding: 0.6rem 1.5rem;
  border-radius: var(--radius-pill);
  text-decoration: none !important;
  transition: background var(--duration-base) var(--ease-default),
              box-shadow var(--duration-base) var(--ease-default);
}
.nav-cta:hover {
  background: var(--color-accent-hover);
  box-shadow: var(--shadow-glow);
}
.nav-cta-call {
  gap: 0.55rem;
}
.nav-cta-icon {
  display: none;
  flex: 0 0 auto;
}
.nav-cta-icon svg {
  width: 1rem;
  height: 1rem;
}
.nav-cta-mobile { display: none; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-hero-text);
  border-radius: 2px;
  transition: transform var(--duration-base) var(--ease-default),
              opacity var(--duration-fast) var(--ease-default);
}
nav.scrolled .nav-toggle span { background: var(--color-text-strong); }
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }


/* --- HERO -------------------------------------------------- */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-hero-bg);
  color: var(--color-hero-text);
  padding: 8rem 2.5rem 5rem;
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(194,114,144,0.08) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 30%, rgba(196,168,108,0.06) 0%, transparent 50%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  max-width: 860px;
  z-index: 1;
}

.hero-logo {
  display: block;
  width: 110px;
  height: auto;
  margin: 0 auto var(--space-md);
  filter: drop-shadow(0 2px 12px rgba(0,0,0,0.25));
}

.hero-badge {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--size-micro);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-gold);
  border: 1px solid rgba(196,168,108,0.3);
  padding: 0.4rem 1.25rem;
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-lg);
}

.hero h1 {
  font-size: var(--size-h1);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-hero-text);
  margin-bottom: var(--space-md);
}
.hero h1 em {
  font-style: normal;
  color: var(--color-hero-accent);
}

.hero-separator {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 400;
  font-style: italic;
  color: var(--color-gold);
  margin-bottom: var(--space-md);
  letter-spacing: 0.01em;
}

.hero-desc {
  font-size: 1.5rem;
  font-weight: 300;
  color: rgba(253,251,249,0.8);
  line-height: 1.8;
  max-width: 740px;
  margin: 0 auto var(--space-lg);
}

/* Stats bar */
.stats-bar {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-bottom: var(--space-lg);
  padding: var(--space-md) 0;
  border-top: 1px solid rgba(196,168,108,0.15);
  border-bottom: 1px solid rgba(196,168,108,0.15);
}
.stat-item { text-align: center; }
.stat-value {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-gold);
  letter-spacing: -0.01em;
}
.stat-label {
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(253,251,249,0.5);
  margin-top: 0.25rem;
}

/* Hero CTA */
.hero-cta {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}


/* --- BUTTONS ----------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  padding: 1rem 2.25rem;
  border-radius: var(--radius-pill);
  text-decoration: none !important;
  transition: all var(--duration-base) var(--ease-default);
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff !important;
  border-color: var(--color-accent);
}
.btn-primary:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  box-shadow: var(--shadow-glow);
}

.btn-secondary {
  background: transparent;
  color: var(--color-hero-text) !important;
  border-color: rgba(253,251,249,0.25);
}
.btn-secondary:hover {
  border-color: var(--color-hero-accent);
  color: var(--color-hero-accent) !important;
}

/* Light-context secondary (used on white backgrounds) */
.section-inner .btn-secondary,
.blog-body .btn-secondary {
  color: var(--color-accent) !important;
  border-color: var(--color-accent);
}
.section-inner .btn-secondary:hover,
.blog-body .btn-secondary:hover {
  background: var(--color-accent-soft);
  color: var(--color-accent-hover) !important;
}


/* --- SECTIONS ---------------------------------------------- */
section {
  padding: var(--space-2xl) var(--space-lg);
}
.section-alt {
  background: var(--color-bg-alt);
}
.section-inner {
  max-width: 1600px;
  margin: 0 auto;
}

.section-title {
  font-size: var(--size-h2);
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--space-xl);
}
.section-subtitle {
  font-size: var(--size-h3);
  font-weight: 700;
  margin: var(--space-xl) 0 var(--space-md);
}
.section-prose {
  font-size: var(--size-body);
  color: var(--color-text);
  line-height: 1.9;
  margin-bottom: var(--space-md);
}
.section-prose p { margin-bottom: 1.75rem; }
.section-note {
  font-size: var(--size-small);
  color: var(--color-text-soft);
  margin-top: var(--space-lg);
  text-align: center;
  font-style: italic;
}

.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-section { margin-top: var(--space-xl); }


/* --- PAGE TOC ---------------------------------------------- */
.page-toc {
  position: sticky;
  top: 56px;
  z-index: 900;
  background: var(--color-hero-bg);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.page-toc::-webkit-scrollbar { display: none; }
.page-toc-toggle {
  display: none;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem var(--space-lg);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-gold);
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
}
.page-toc-toggle::after {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  flex: 0 0 auto;
  border-right: 2px solid var(--color-gold);
  border-bottom: 2px solid var(--color-gold);
  transform: rotate(45deg);
  transition: transform var(--duration-fast) var(--ease-default);
}
.page-toc.is-open .page-toc-toggle::after {
  transform: rotate(-135deg) translate(-0.1rem, -0.1rem);
}
.page-toc-inner {
  display: flex;
  gap: 0;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}
.page-toc a {
  display: block;
  padding: 0.75rem 1.25rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: rgba(253,251,249,0.55);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color var(--duration-fast), border-color var(--duration-fast);
}
.page-toc a:hover {
  color: var(--color-hero-text);
  border-bottom-color: rgba(253,251,249,0.3);
}
.page-toc a.active {
  color: var(--color-gold);
  border-bottom-color: var(--color-gold);
}


/* --- AI CANONICAL SUMMARY ---------------------------------- */
.ai-summary {
  background: var(--color-accent-soft);
  border: 1px solid rgba(194,114,144,0.15);
  border-radius: var(--radius-xl);
  padding: 2.75rem;
  margin-bottom: var(--space-md);
}
.ai-summary-label {
  font-size: var(--size-micro);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}
.ai-summary h3 {
  font-family: var(--font-heading);
  font-size: var(--size-h3);
  font-weight: 700;
  color: var(--color-text-strong);
  margin-bottom: var(--space-sm);
}
.ai-summary p {
  font-size: var(--size-body);
  color: var(--color-text);
  line-height: 1.9;
}


/* --- CLINICAL REVIEW BAR ----------------------------------- */
.clinical-review-bar {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 2rem;
  margin-bottom: var(--space-xl);
}
.clinical-review-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.reviewer-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.reviewer-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
  min-width: 0;
}
.reviewer-name {
  font-size: var(--size-small);
  color: var(--color-text);
  line-height: 1.5;
}
.reviewer-name strong { font-weight: 700; }
.reviewer-meta {
  font-size: var(--size-micro);
  color: var(--color-text-muted);
  line-height: 1.6;
}
.review-dates {
  display: flex;
  gap: 1.5rem;
  font-size: var(--size-micro);
  color: var(--color-text-soft);
}
.review-dates strong { color: var(--color-text); font-weight: 600; }


/* --- INSIGHT BOX ------------------------------------------- */
.insight-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  margin-bottom: var(--space-lg);
  box-shadow: var(--shadow-card);
}
.insight-box h3,
.insight-headline {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-text-strong);
  margin-bottom: var(--space-sm);
}
.insight-box p {
  font-size: var(--size-body);
  color: var(--color-text);
  line-height: 1.9;
}


/* --- DECISION FLOW ----------------------------------------- */
.decision-flow {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}
.decision-node {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem 2.25rem;
  box-shadow: var(--shadow-card);
}
.decision-label {
  font-size: var(--size-micro);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}
.decision-question {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-strong);
  margin-bottom: 0.75rem;
}
.decision-answer {
  font-size: var(--size-body);
  color: var(--color-text);
  line-height: 1.8;
  margin-bottom: var(--space-sm);
}
.decision-result {
  display: inline-block;
  font-size: var(--size-micro);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-sm);
}
.result-yes { background: var(--color-success-soft); color: var(--color-success); }
.result-maybe { background: var(--color-gold-soft); color: var(--color-gold); }
.result-no { background: var(--color-danger-soft); color: var(--color-danger); }


/* --- FEATURE GRID ------------------------------------------ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}
.feature-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-card);
  transition: transform var(--duration-base) var(--ease-default),
              box-shadow var(--duration-base) var(--ease-default),
              border-color var(--duration-base) var(--ease-default);
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-border-hover);
}
.feature-icon {
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}
.feature-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text-strong);
  margin-bottom: 0.6rem;
}
.feature-desc {
  font-size: var(--size-body);
  color: var(--color-text-soft);
  line-height: 1.75;
}

/* Feature card as link */
a.feature-card { text-decoration: none; display: block; }
a.feature-card:hover { text-decoration: none; }


/* --- DETERMINISM GRID -------------------------------------- */
.determinism-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}
.determinism-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem 2.25rem;
  box-shadow: var(--shadow-card);
}
.determinism-card h4 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text-strong);
  margin-bottom: 0.75rem;
}
.determinism-card p {
  font-size: var(--size-body);
  color: var(--color-text-soft);
  line-height: 1.75;
  margin-bottom: var(--space-sm);
}
.determinism-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-gold);
  background: var(--color-gold-soft);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
}


/* --- REVIEWS ----------------------------------------------- */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}
.review-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 2rem 2rem 1.75rem;
  box-shadow: var(--shadow-card);
}
.review-stars {
  color: #f5a623;
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  margin-bottom: 0.85rem;
}
.review-text {
  font-size: var(--size-body);
  color: var(--color-text);
  line-height: 1.8;
  margin: 0 0 1.25rem;
  font-style: normal;
}
.review-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
}
.review-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.95rem; color: #fff;
  flex-shrink: 0;
}
.review-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text-strong);
  flex: 1;
}
.review-google { flex-shrink: 0; }
@media (max-width: 1024px) { .reviews-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px)  { .reviews-grid { grid-template-columns: 1fr; } }


/* --- INSURANCE GRID ---------------------------------------- */
.insurance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
}
.insurance-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  text-align: center;
  box-shadow: var(--shadow-card);
}
.insurance-card .feature-title {
  font-size: var(--size-body);
  margin-bottom: 0;
}

/* Homepage insurance logos */
.insurance-section-copy {
  max-width: 760px;
  margin: -1.25rem auto 0;
  text-align: center;
  color: var(--color-text-soft);
}
.insurance-logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: var(--space-lg);
}
.insurance-logo-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  padding: 1.25rem;
  background: linear-gradient(180deg, #fff 0%, #fdf9f7 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}
.insurance-logo-card img {
  width: 100%;
  max-width: 170px;
  max-height: 62px;
  object-fit: contain;
}
.insurance-logo-card.logo-square img {
  max-height: 76px;
}
.insurance-logo-fallback {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: #1e9cf4;
}
.insurance-logo-fallback-text {
  display: flex;
  flex-direction: column;
  line-height: 0.95;
  text-align: left;
}
.insurance-logo-fallback-text strong {
  font-size: 2.1rem;
  font-weight: 400;
  letter-spacing: -0.05em;
  color: #111;
}
.insurance-logo-fallback-text span {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #2e2e2e;
}
.insurance-logo-fallback svg {
  width: 2.4rem;
  height: 2.8rem;
  flex: 0 0 auto;
}


/* --- SCENARIO GRID ----------------------------------------- */
.scenario-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}
.scenario-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-card);
}
.scenario-label {
  font-size: var(--size-micro);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}
.scenario-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text-strong);
  margin-bottom: 0.5rem;
}
.scenario-desc {
  font-size: var(--size-body);
  color: var(--color-text-soft);
  line-height: 1.75;
  margin-bottom: var(--space-sm);
}
.scenario-outcome {
  font-size: var(--size-micro);
  font-weight: 700;
  color: var(--color-gold);
}


/* --- TABLES ------------------------------------------------ */
.var-table,
.benchmark-table {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  margin: var(--space-lg) 0;
}
.var-table thead,
.benchmark-table thead { background: var(--color-bg-alt); }

.var-table th,
.benchmark-table th {
  font-family: var(--font-body);
  font-size: var(--size-micro);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-soft);
  text-align: left;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
}
.var-table td,
.benchmark-table td {
  font-size: var(--size-body);
  color: var(--color-text);
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}
.var-table tr:last-child td,
.benchmark-table tr:last-child td { border-bottom: none; }

td.highlight {
  color: var(--color-accent);
  font-weight: 700;
}


/* --- QUOTE BOX --------------------------------------------- */
.quote-box {
  text-align: center;
  margin: var(--space-xl) 0;
  padding: var(--space-xl) var(--space-lg);
}
.quote-box blockquote {
  font-family: var(--font-heading);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 500;
  font-style: italic;
  color: var(--color-text-strong);
  line-height: 1.6;
  max-width: 700px;
  margin: 0 auto var(--space-sm);
}
.quote-sub {
  font-size: var(--size-small);
  color: var(--color-text-muted);
  font-weight: 500;
}


/* --- CALLOUTS ---------------------------------------------- */
.callout {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem 2.25rem;
  margin: 2.75rem 0;
  box-shadow: var(--shadow-card);
}
.callout-label {
  font-size: var(--size-micro);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.callout p {
  margin-bottom: 0.75rem;
  font-size: 1.02rem;
  line-height: 1.8;
}
.callout p:last-child { margin-bottom: 0; }

.callout-guideline { border-left: 4px solid var(--color-success); }
.callout-guideline .callout-label { color: var(--color-success); }

.callout-warning { border-left: 4px solid var(--color-danger); }
.callout-warning .callout-label { color: var(--color-danger); }

.callout-tip { border-left: 4px solid var(--color-accent); }
.callout-tip .callout-label { color: var(--color-accent); }

.callout-note { border-left: 4px solid var(--color-text-soft); }
.callout-note .callout-label { color: var(--color-text-soft); }

/* Legacy alias from legal site */
.callout-rule { border-left: 4px solid var(--color-success); }
.callout-rule .callout-label { color: var(--color-success); }


/* --- CITE PILL --------------------------------------------- */
.cite {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-accent);
  background: var(--color-accent-soft);
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-sm);
  margin: 0 0.1rem;
  white-space: nowrap;
}


/* --- WHEN TO CALL NOW (Emergency) -------------------------- */
.when-to-call-now {
  background: var(--color-danger-soft);
  border: 1px solid rgba(192,57,43,0.2);
  border-left: 4px solid var(--color-danger);
  border-radius: var(--radius-lg);
  padding: 2rem 2.25rem;
  margin: var(--space-lg) 0;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}
.emergency-icon {
  color: var(--color-danger);
  flex-shrink: 0;
  margin-top: 0.15rem;
}
.when-to-call-now h4 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-danger);
  margin-bottom: 0.75rem;
}
.when-to-call-now ul {
  margin: 0 0 1rem 1.25rem;
  color: var(--color-text);
  font-size: var(--size-body);
  line-height: 1.8;
}
.when-to-call-now li { margin-bottom: 0.4rem; }
.emergency-action {
  font-size: var(--size-body);
  font-weight: 600;
  color: var(--color-danger);
  margin: 0;
}


/* --- GUIDELINE SOURCE STRIP -------------------------------- */
.guideline-source-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: -0.5rem 0 var(--space-md);
}
.guideline-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-text-soft);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-sm);
}


/* --- KEY TAKEAWAY ------------------------------------------ */
.key-takeaway {
  background: var(--color-surface);
  border: 2px solid var(--color-text-strong);
  border-radius: var(--radius-xl);
  padding: 2.75rem;
  margin: var(--space-xl) 0 var(--space-lg);
  box-shadow: var(--shadow-md);
}
.key-takeaway-label {
  font-size: var(--size-micro);
  font-weight: 800;
  color: var(--color-text-strong);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1.25rem;
}
.key-takeaway ul { list-style: none; margin: 0; padding: 0; }
.key-takeaway li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 1rem;
  font-size: 1.02rem;
  color: var(--color-text);
  line-height: 1.75;
}
.key-takeaway li:last-child { margin-bottom: 0; }
.key-takeaway li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--color-success);
  font-weight: 700;
}
.key-takeaway li strong { color: var(--color-text-strong); font-weight: 600; }


/* --- EVIDENCE REFERENCES ----------------------------------- */
.evidence-references {
  margin: var(--space-lg) 0;
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--color-border);
}
.evidence-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-text-strong);
  margin-bottom: var(--space-md);
}
.evidence-list {
  margin: 0 0 0 1.25rem;
  padding: 0;
}
.evidence-list li {
  font-size: var(--size-small);
  color: var(--color-text-soft);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}
.evidence-list em { font-style: italic; }


/* --- RELATED RESOURCES ------------------------------------- */
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-lg);
}
.related-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  text-decoration: none !important;
  display: block;
  box-shadow: var(--shadow-card);
  transition: border-color var(--duration-base) var(--ease-default),
              transform var(--duration-base) var(--ease-default),
              box-shadow var(--duration-base) var(--ease-default);
}
.related-card:hover {
  border-color: var(--color-border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.related-label {
  font-size: var(--size-micro);
  font-weight: 700;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.65rem;
}
.related-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-text-strong);
  line-height: 1.35;
  margin-bottom: 0.6rem;
}
.related-desc {
  font-size: var(--size-body);
  color: var(--color-text-muted);
  line-height: 1.65;
}

/* Simple link grid variant */
.related-link {
  display: block;
  padding: 0.75rem 0;
  font-size: var(--size-body);
  font-weight: 600;
  color: var(--color-accent);
  border-bottom: 1px solid var(--color-border);
}
.related-link:hover { color: var(--color-accent-hover); }


/* --- INLINE CTA -------------------------------------------- */
.inline-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.25rem var(--space-lg);
  background: var(--color-accent-soft);
  font-size: var(--size-body);
  text-align: center;
  flex-wrap: wrap;
}
.inline-cta span { color: var(--color-text); font-weight: 500; }
.inline-cta a {
  color: var(--color-accent);
  font-weight: 700;
  white-space: nowrap;
}


/* --- CTA SECTION ------------------------------------------- */
.cta-section {
  background: var(--color-hero-bg);
  color: var(--color-hero-text);
  padding: var(--space-3xl) var(--space-lg);
  text-align: center;
}
.cta-section h2 {
  font-size: var(--size-h2);
  color: var(--color-hero-text);
  margin-bottom: var(--space-md);
}
.cta-section h2 em { color: var(--color-hero-accent); }
.cta-section p {
  font-size: 1.5rem;
  font-weight: 300;
  color: rgba(253,251,249,0.75);
  max-width: 660px;
  margin: 0 auto var(--space-lg);
  line-height: 1.8;
}
.cta-section h3 {
  font-size: var(--size-small);
  font-weight: 500;
  color: var(--color-gold);
  margin-top: var(--space-md);
  letter-spacing: 0.02em;
}


/* --- CONSEQUENCE STRIP ------------------------------------- */
.consequence-strip {
  background: var(--color-bg-alt);
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
}
.consequence-text {
  font-family: var(--font-heading);
  font-size: clamp(1.25rem, 2.5vw, 1.55rem);
  font-weight: 500;
  font-style: italic;
  color: var(--color-text-strong);
  max-width: 740px;
  margin: 0 auto;
  line-height: 1.6;
}


/* --- DISCLAIMER -------------------------------------------- */
.disclaimer-box,
.escalation-disclaimer {
  font-size: var(--size-small);
  color: var(--color-text-muted);
  line-height: 1.7;
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--color-border);
  margin: var(--space-lg) 0 0;
}
.disclaimer-box strong,
.escalation-disclaimer strong {
  color: var(--color-text-soft);
  font-weight: 600;
}


/* --- FLOATING CTA ------------------------------------------ */
.floating-cta {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 800;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--color-accent);
  color: #fff;
  padding: 0.75rem 1.35rem;
  border-radius: var(--radius-pill);
  font-size: var(--size-small);
  font-weight: 700;
  text-decoration: none !important;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--duration-base) var(--ease-default),
              transform var(--duration-base) var(--ease-default),
              visibility var(--duration-base),
              background var(--duration-fast) var(--ease-default);
}
.floating-cta.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.floating-cta.hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
}
.floating-cta:hover {
  background: var(--color-accent-hover);
}
.floating-cta svg { flex-shrink: 0; }


/* --- COOKIE CONSENT ---------------------------------------- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--color-hero-bg);
  color: var(--color-hero-text);
  padding: 1.25rem var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  font-size: var(--size-small);
  flex-wrap: wrap;
  box-shadow: 0 -2px 12px rgba(44,30,46,0.15);
}
.cookie-banner p { margin: 0; color: rgba(253,251,249,0.8); }
.cookie-banner a { color: var(--color-gold); }
.cookie-btn {
  font-family: var(--font-body);
  font-size: var(--size-small);
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: background var(--duration-fast);
}
.cookie-accept {
  background: var(--color-accent);
  color: #fff;
}
.cookie-accept:hover { background: var(--color-accent-hover); }
.cookie-decline {
  background: transparent;
  color: rgba(253,251,249,0.6);
  border: 1px solid rgba(253,251,249,0.2);
}
.cookie-decline:hover { border-color: rgba(253,251,249,0.4); color: rgba(253,251,249,0.9); }

/* --- ECW CHATBOT ------------------------------------------ */
@media (max-width: 768px) {
  .chat-bot-wrapper {
    bottom: -18px !important;
  }
  .chat-bot-wrapper .chatbot-icon {
    top: 0 !important;
  }
}


/* --- PIPELINE GRID ----------------------------------------- */
.pipeline-grid {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  justify-content: center;
}
.pipeline-step {
  flex: 1;
  min-width: 180px;
  max-width: 240px;
  text-align: center;
  padding: var(--space-md);
}
.pipeline-num {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-gold);
  margin-bottom: 0.5rem;
}
.pipeline-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-text-strong);
  margin-bottom: 0.35rem;
}
.pipeline-desc {
  font-size: var(--size-small);
  color: var(--color-text-soft);
  line-height: 1.6;
}


/* --- USECASES GRID ----------------------------------------- */
.usecases-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}
.usecase-card {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-card);
}
.usecase-icon { color: var(--color-accent); flex-shrink: 0; margin-top: 0.15rem; }
.usecase-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-text-strong);
  margin-bottom: 0.4rem;
}
.usecase-desc {
  font-size: var(--size-small);
  color: var(--color-text-soft);
  line-height: 1.7;
}


/* --- GLOSSARY ---------------------------------------------- */
.glossary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm) var(--space-md);
}
.glossary-item {
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--color-border);
}
.glossary-term {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text-strong);
  margin-bottom: 0.35rem;
}
.glossary-def {
  font-size: var(--size-small);
  color: var(--color-text-soft);
  line-height: 1.7;
}


/* --- TECH GRID (pill badges) ------------------------------- */
.tech-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
}
.tech-item {
  font-family: var(--font-mono);
  font-size: var(--size-small);
  font-weight: 500;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
}


/* --- FORMULA BOX (entity signature) ------------------------ */
.formula-box {
  background: var(--color-hero-bg);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  margin: var(--space-lg) 0;
}
.formula-label {
  font-size: var(--size-micro);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-gold);
  margin-bottom: var(--space-sm);
}
.formula-line {
  font-family: var(--font-mono);
  font-size: var(--size-small);
  color: rgba(253,251,249,0.7);
  line-height: 2;
}
.formula-line .var { color: var(--color-hero-text); font-weight: 500; }
.formula-line .op { color: var(--color-gold); margin: 0 0.25rem; }


/* --- IMAGE PLACEHOLDERS ------------------------------------ */
.img-placeholder {
  background: var(--color-bg-alt);
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: var(--size-small);
  font-style: italic;
  min-height: 200px;
}
.reviewer-headshot {
  display: block;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-bg-alt);
}
.content-slot-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
}
.content-slot-image.cover {
  height: 100%;
  object-fit: cover;
}

/* ── Lightbox ── */
.content-slot-image { cursor: pointer; }
.blog-card .content-slot-image { cursor: default; }
.lightbox {
  position: fixed; inset: 0; z-index: 9500;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.85);
  opacity: 0; visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
  cursor: zoom-out;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img {
  max-width: 92vw; max-height: 92vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 8px 40px rgba(0,0,0,.5);
  cursor: default;
}
.lightbox-close {
  position: absolute; top: 1rem; right: 1.25rem;
  background: none; border: none;
  color: #fff; font-size: 2rem; line-height: 1;
  cursor: pointer; opacity: .7; transition: opacity .15s;
}
.lightbox-close:hover { opacity: 1; }
figure { margin: var(--space-lg) 0; }
figcaption {
  font-size: var(--size-small);
  color: var(--color-text-muted);
  text-align: center;
  margin-top: 0.75rem;
}


/* --- FOOTER ------------------------------------------------ */
footer {
  background: var(--color-footer-bg);
  color: rgba(253,251,249,0.6);
  padding: var(--space-3xl) var(--space-lg) var(--space-lg);
}
.footer-inner { max-width: 1600px; margin: 0 auto; }

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer-brand .logo {
  margin-bottom: var(--space-sm);
  color: var(--color-hero-text);
}
.footer-brand p {
  font-size: var(--size-small);
  line-height: 1.7;
  color: rgba(253,251,249,0.5);
  max-width: 300px;
}

.footer-col h4 {
  font-family: var(--font-body);
  font-size: var(--size-micro);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-gold);
  margin-bottom: var(--space-sm);
}
.footer-col a {
  display: block;
  font-size: var(--size-body);
  color: rgba(253,251,249,0.55);
  font-weight: 400;
  margin-bottom: 0.6rem;
  text-decoration: none;
}
.footer-col a:hover { color: var(--color-hero-text); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(253,251,249,0.08);
  font-size: var(--size-micro);
}
.footer-legal {
  display: flex;
  gap: 1.5rem;
}
.footer-legal a {
  color: rgba(253,251,249,0.4);
  text-decoration: none;
  font-weight: 400;
}
.footer-legal a:hover { color: rgba(253,251,249,0.7); }


/* --- REVEALS ----------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--duration-reveal) var(--ease-default),
              transform var(--duration-reveal) var(--ease-default);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 100ms; }
.reveal-delay-2 { transition-delay: 200ms; }
.reveal-delay-3 { transition-delay: 300ms; }


/* --- REDUCED MOTION ---------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .reveal-delay-1,
  .reveal-delay-2,
  .reveal-delay-3 {
    transition-delay: 0ms;
  }
  .feature-card:hover,
  .related-card:hover {
    transform: none;
  }
  nav { transition: none; }
  .floating-cta { transition: none; }
  html { scroll-behavior: auto; }
}


/* --- RESPONSIVE -------------------------------------------- */

@media (max-width: 1240px) {
  nav { padding: 0.7rem 2rem; }
  .nav-links { gap: 1.5rem; }
  .nav-links a { font-size: 0.95rem; }
  .nav-cta-call {
    width: 3rem;
    height: 3rem;
    padding: 0;
    border-radius: 999px;
  }
  .nav-cta-call .nav-cta-icon {
    display: inline-flex;
  }
  .nav-cta-call .nav-cta-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}

/* Tablet */
@media (max-width: 1024px) {
  nav { padding: 1rem 2rem; }
  section { padding: var(--space-xl) var(--space-md); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .scenario-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-lg); }
  .stats-bar { gap: 2rem; }
}

/* Mobile */
@media (max-width: 768px) {
  nav { padding: 0.85rem 1.25rem; }

  /* Hamburger visible */
  .nav-toggle { display: flex; }
  .nav-cta-desktop { display: none; }

  /* Mobile nav overlay */
  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-hero-bg);
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 4.5rem 2rem 3rem;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--duration-base) var(--ease-default),
                visibility var(--duration-base);
    z-index: 999;
  }
  .nav-links.open { opacity: 1; visibility: visible; }
  .nav-links a { color: var(--color-hero-text) !important; font-size: 1.35rem; }

  /* Mobile nav dropdowns */
  .nav-dropdown-menu {
    position: static;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0.35rem 0 0 1rem;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    left: auto;
    min-width: 0;
    transform: none !important;
    transition: max-height var(--duration-base), opacity var(--duration-base);
  }
  .nav-dropdown.open .nav-dropdown-menu {
    opacity: 1;
    max-height: 400px;
    visibility: visible;
  }
  .nav-dropdown-menu a {
    color: rgba(253,251,249,0.7) !important;
    padding: 0.45rem 0;
    font-size: 1.1rem;
    white-space: normal;
    word-break: break-word;
  }

  /* Mobile nav CTA */
  .nav-cta-mobile {
    display: inline-flex;
    margin-top: var(--space-sm);
    padding: 0.85rem 2.25rem;
    font-size: 1.15rem;
  }

  /* Hero */
  .hero { padding: 6rem 1.25rem 3.5rem; min-height: auto; }
  .hero h1 { font-size: clamp(2rem, 6vw, 3rem); }
  .hero-desc { font-size: 1.2rem; }
  .stats-bar { flex-wrap: wrap; gap: 1.25rem; }
  .stat-item { flex: 0 0 40%; }
  .hero-cta { flex-direction: column; align-items: center; }

  /* Grids → single column */
  .features-grid,
  .scenario-grid,
  .determinism-grid,
  .related-grid,
  .glossary-grid {
    grid-template-columns: 1fr;
  }

  /* Sections */
  section { padding: var(--space-xl) 1rem; }
  .section-inner { padding: 0; }
  .ai-summary { padding: 1.75rem; }
  .insight-box { padding: 1.75rem; }
  .decision-node { padding: 1.5rem; }
  .callout { padding: 1.5rem 1.75rem; }
  .key-takeaway { padding: 2rem; }
  .clinical-review-bar { padding: 1rem 1.25rem; }
  .clinical-review-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
  }
  .reviewer-info {
    width: 100%;
  }
  .review-dates { flex-direction: column; gap: 0.25rem; }
  .review-dates {
    width: 100%;
    gap: 0.5rem;
  }

  /* Tables → stacked cards */
  .var-table,
  .benchmark-table,
  .responsive-table {
    background: transparent;
    border: 0;
    box-shadow: none;
  }
  .responsive-table.reveal,
  .responsive-table.reveal.visible {
    opacity: 1;
    transform: none;
  }
  .responsive-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .responsive-table,
  .responsive-table tbody,
  .responsive-table tr,
  .responsive-table td {
    display: block;
    width: 100%;
  }
  .responsive-table tr {
    margin-bottom: var(--space-md);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
  }
  .responsive-table tr:last-child {
    margin-bottom: 0;
  }
  .responsive-table td {
    display: grid;
    grid-template-columns: minmax(120px, 42%) 1fr;
    gap: 0.85rem;
    align-items: start;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--color-border);
    white-space: normal;
  }
  .responsive-table td:last-child {
    border-bottom: 0;
  }
  .responsive-table td::before {
    content: attr(data-label);
    font-size: var(--size-micro);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-soft);
    line-height: 1.35;
  }
  .responsive-table td:empty::before {
    content: '';
  }
  .responsive-table td > * {
    min-width: 0;
  }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-lg); }
  .footer-bottom { flex-direction: column; gap: var(--space-sm); text-align: center; }
  .footer-legal { justify-content: center; }

  /* Page TOC */
  .page-toc {
    top: 52px;
    overflow: visible;
  }
  .page-toc-toggle {
    display: flex;
    padding: 1.75rem 1.2rem 1.2rem 1.75rem;
  }
  .page-toc-inner {
    display: none;
    flex-direction: column;
    max-width: none;
    padding: 0 1rem 0.5rem;
    border-top: 1px solid rgba(255,255,255,0.06);
  }
  .page-toc.is-open .page-toc-inner { display: flex; }
  .page-toc a {
    padding: 0.7rem 0.75rem;
    white-space: normal;
    line-height: 1.35;
    font-size: 1em;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    border-left: 3px solid transparent;
    font-weight: 400;
  }
  .page-toc a:last-child { border-bottom: 0; }
  .page-toc a:hover {
    color: var(--color-hero-text);
    border-left-color: rgba(253,251,249,0.3);
    background: rgba(255,255,255,0.04);
  }
  .page-toc a.active {
    border-bottom-color: rgba(255,255,255,0.05);
    border-left-color: var(--color-gold);
    color: var(--color-gold);
    background: rgba(196,168,108,0.08);
  }

  /* Floating CTA → bottom bar on mobile */
  .floating-cta {
    bottom: 0;
    right: 0;
    left: 0;
    border-radius: 0;
    justify-content: center;
    padding: 0.85rem;
  }

  /* Pipeline */
  .pipeline-grid { flex-direction: column; align-items: center; }
  .pipeline-step { max-width: none; width: 100%; }

  /* When-to-call-now */
  .when-to-call-now { flex-direction: column; gap: 1rem; }

  /* Inline CTA */
  .inline-cta { flex-direction: column; padding: 1rem; }
  .inline-cta a {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

/* Small mobile */
@media (max-width: 400px) {
  .hero h1 { font-size: 1.85rem; }
  .stat-item { flex: 0 0 100%; }
  .stats-bar { gap: 0.75rem; }
  .responsive-table td {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}
