/* ============================================================
   VITAMINS & MINERALS — COMPLETE DESIGN SYSTEM
   Self-contained: no Tailwind dependency required.
   ============================================================ */

/* ── Design tokens ─────────────────────────────────────────── */
:root {
  /* Palette */
  --c-primary:    #0F172A;
  --c-secondary:  #10B981;
  --c-accent:     #14B8A6;
  --c-text:       #334155;
  --c-muted:      #64748B;
  --c-faint:      #94A3B8;
  --c-bg:         #F8FAFC;
  --c-surface:    #ffffff;
  --c-elevated:   #F1F5F9;
  --c-border:     rgba(15, 23, 42, 0.08);
  --c-border-h:   rgba(16, 185, 129, 0.35);

  /* Gradients */
  --grad-hero:    linear-gradient(135deg, #0F172A 0%, #1a3a4a 50%, #0F172A 100%);
  --grad-accent:  linear-gradient(135deg, #10B981 0%, #14B8A6 100%);
  --grad-dark:    linear-gradient(135deg, #0F172A 0%, #1E293B 100%);

  /* Shadows */
  --shadow-sm:    0 1px 3px rgba(0,0,0,.04), 0 1px 2px rgba(0,0,0,.03);
  --shadow-md:    0 4px 16px rgba(0,0,0,.07);
  --shadow-lg:    0 12px 40px rgba(0,0,0,.09);
  --shadow-xl:    0 20px 40px -8px rgba(16,185,129,.22);
  --shadow-glow:  0 0 0 3px rgba(16,185,129,.18);

  /* Radii */
  --r-sm:   8px;
  --r-md:   12px;
  --r-lg:   16px;
  --r-xl:   24px;
  --r-2xl:  32px;
  --r-full: 9999px;

  /* Typography */
  --font-display: 'Outfit', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;

  /* Layout */
  --nav-h:        68px;
  --container-w:  1200px;
  --section-pad:  96px;

  /* Animation */
  --ease:         cubic-bezier(.16, 1, .3, 1);
  --tr:           all .38s cubic-bezier(.16, 1, .3, 1);
  --tr-fast:      all .18s ease;
}

/* ── Dark mode ─────────────────────────────────────────────── */
[data-theme="dark"] {
  --c-primary:   #F1F5F9;
  --c-secondary: #34D399;
  --c-accent:    #2DD4BF;
  --c-text:      #CBD5E1;
  --c-muted:     #94A3B8;
  --c-faint:     #64748B;
  --c-bg:        #0B1120;
  --c-surface:   #131B2E;
  --c-elevated:  #1A2332;
  --c-border:    rgba(255,255,255,.07);
  --c-border-h:  rgba(52,211,153,.4);
  --shadow-sm:   0 1px 3px rgba(0,0,0,.25);
  --shadow-md:   0 4px 16px rgba(0,0,0,.35);
  --shadow-lg:   0 12px 40px rgba(0,0,0,.45);
  --shadow-xl:   0 20px 40px -8px rgba(52,211,153,.18);
  --grad-hero:   linear-gradient(135deg, #0B1120 0%, #0e1e2e 50%, #0B1120 100%);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  line-height: 1.7;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background .4s ease, color .4s ease;
  overflow-x: clip;
}
html { overflow-x: clip; }
h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-display);
  color: var(--c-primary);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.18;
}
a { text-decoration: none; color: inherit; transition: var(--tr-fast); }
a:focus-visible { outline: 2px solid var(--c-secondary); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; height: auto; }
::selection { background: rgba(16,185,129,.2); color: var(--c-primary); }
:target { scroll-margin-top: calc(var(--nav-h) + 24px); }

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-track { background: var(--c-bg); }
::-webkit-scrollbar-thumb { background: var(--c-faint); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--c-muted); }

/* ── Layout ────────────────────────────────────────────────── */
.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}
main { min-height: calc(100vh - 200px); }

/* ── Skip link ─────────────────────────────────────────────── */
.skip-link {
  position: absolute; top: -100%; left: 16px;
  background: var(--c-secondary); color: #fff;
  padding: 8px 16px; border-radius: 6px;
  z-index: 10000; font-weight: 600; font-size: .9rem;
}
.skip-link:focus { top: 16px; }

/* ── Reading progress ──────────────────────────────────────── */
.reading-progress {
  position: fixed; top: 0; left: 0;
  height: 3px; width: 0%;
  background: var(--grad-accent);
  z-index: 9999;
  transition: width .1s linear;
  border-radius: 0 2px 2px 0;
}

/* ── Reveal animation ──────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .65s var(--ease), transform .65s var(--ease);
}
.reveal.revealed { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }

/* ============================================================
   SITE HEADER & NAVBAR
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  height: var(--nav-h);
  background: rgba(248,250,252,.88);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--c-border);
  transition: var(--tr);
}
[data-theme="dark"] .site-header { background: rgba(11,17,32,.88); }
.site-header--scrolled { box-shadow: var(--shadow-md); }

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  gap: 16px;
}

/* Logo */
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.45rem; font-weight: 900;
  letter-spacing: -.04em;
  color: var(--c-primary);
  display: flex; align-items: center; gap: 4px;
  flex-shrink: 0;
}
.nav-logo em { font-style: normal; color: var(--c-secondary); }

/* Desktop links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  flex: 1;
  justify-content: center;
}

.nav-link {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .88rem; font-weight: 600;
  color: var(--c-text);
  padding: 7px 13px;
  border-radius: var(--r-sm);
  background: none; border: none;
  cursor: pointer; font-family: var(--font-body);
  transition: var(--tr-fast);
  white-space: nowrap;
}
.nav-link:hover { background: rgba(16,185,129,.07); color: var(--c-secondary); }
.nav-link--active { color: var(--c-secondary); }

.nav-chevron {
  width: 14px; height: 14px;
  opacity: .5;
  transition: transform .25s ease;
}
.nav-dropdown--open .nav-chevron { transform: rotate(180deg); }

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown__panel {
  position: absolute; top: calc(100% + 6px); left: 0;
  min-width: 220px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 6px;
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden;
  transform: translateY(-6px) scale(.97);
  transition: opacity .2s ease, transform .22s var(--ease), visibility .2s;
  z-index: 100;
}
.nav-dropdown--open .nav-dropdown__panel {
  opacity: 1; visibility: visible;
  transform: translateY(0) scale(1);
}
.nav-dropdown__link {
  display: block;
  padding: 9px 14px;
  font-size: .87rem; font-weight: 500;
  border-radius: 6px;
  color: var(--c-text);
  transition: var(--tr-fast);
}
.nav-dropdown__link:hover { background: var(--c-elevated); color: var(--c-secondary); }
.nav-dropdown__link--featured { font-weight: 700; color: var(--c-secondary); }
.nav-dropdown__link--featured:hover { background: rgba(16,185,129,.06); }

/* Controls */
.nav-controls { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* Theme toggle */
.theme-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: 9px;
  border: 1px solid var(--c-border);
  background: none; cursor: pointer;
  color: var(--c-muted);
  transition: var(--tr-fast);
}
.theme-toggle:hover { border-color: var(--c-secondary); color: var(--c-secondary); }
.icon-sun, .icon-moon { display: none; }
[data-theme="dark"]   .icon-sun  { display: block; }
[data-theme="light"]  .icon-moon { display: block; }
:root:not([data-theme]) .icon-moon { display: block; }

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column; justify-content: center; align-items: center;
  gap: 5px;
  width: 38px; height: 38px;
  border-radius: 9px;
  border: 1px solid var(--c-border);
  background: none; cursor: pointer;
  transition: var(--tr-fast);
}
.nav-hamburger span {
  display: block; width: 18px; height: 2px;
  background: var(--c-text);
  border-radius: 2px;
  transition: var(--tr);
}
.nav-hamburger--open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-hamburger--open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger--open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile nav */
@media (max-width: 768px) {
  .nav-hamburger { display: flex; }
  .nav-links {
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    height: calc(100dvh - var(--nav-h));
    background: var(--c-surface);
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 20px 16px;
    gap: 4px;
    overflow-y: auto;
    opacity: 0; visibility: hidden;
    transform: translateY(-10px);
    transition: opacity .3s ease, transform .3s var(--ease), visibility .3s;
  }
  .nav-links--open {
    opacity: 1; visibility: visible;
    transform: translateY(0);
  }
  .nav-link { font-size: 1rem; padding: 12px 16px; border-radius: var(--r-md); }
  .nav-dropdown__panel {
    position: static; opacity: 1; visibility: visible;
    transform: none; box-shadow: none;
    border: none; background: var(--c-elevated);
    border-radius: var(--r-md);
    margin-top: 4px; display: none;
    padding: 6px;
  }
  .nav-dropdown--open .nav-dropdown__panel { display: block; }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 30px;
  font-family: var(--font-body);
  font-size: .88rem; font-weight: 700;
  border-radius: var(--r-md);
  border: none; cursor: pointer;
  text-decoration: none;
  transition: var(--tr);
  white-space: nowrap;
}
.btn--primary {
  background: var(--c-secondary);
  color: #0F172A;
  box-shadow: 0 4px 24px rgba(16,185,129,.35);
}
.btn--primary:hover {
  background: #34D399;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 32px rgba(16,185,129,.5);
}
.btn--ghost {
  background: rgba(255,255,255,.07);
  color: #fff;
  border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover {
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.28);
  transform: translateY(-2px);
}
.btn--white {
  background: #fff; color: #0F172A;
  box-shadow: 0 4px 24px rgba(255,255,255,.15);
  padding: 16px 38px; font-size: .95rem;
}
.btn--white:hover {
  background: var(--c-secondary);
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 0 40px rgba(16,185,129,.45);
}

/* ── Shared section label ──────────────────────────────────── */
.section-label {
  font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .15em;
  color: var(--c-secondary);
  margin-bottom: 14px;
}
.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 800; letter-spacing: -.04em;
  color: var(--c-primary);
}

/* ============================================================
   SITE FOOTER
   ============================================================ */
.site-footer {
  margin-top: 80px;
  border-top: 1px solid var(--c-border);
  background: var(--c-surface);
  padding: 72px 0 40px;
}
[data-theme="dark"] .site-footer { background: rgba(11,17,32,.5); }

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 52px;
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 1.35rem; font-weight: 900;
  letter-spacing: -.04em;
  color: var(--c-primary);
  display: block; margin-bottom: 16px;
}
.footer-logo span { color: var(--c-secondary); }
.footer-brand p { font-size: .88rem; line-height: 1.7; color: var(--c-muted); margin-bottom: 20px; }
.footer-brand address { 
  font-style: normal; 
  font-size: .84rem; 
  line-height: 1.6; 
  color: var(--c-muted); 
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.footer-brand address a { color: var(--c-secondary); font-weight: 600; width: fit-content; }
.footer-brand address a:hover { text-decoration: underline; }
.footer-col h4 {
  font-family: var(--font-display);
  font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--c-primary);
  margin-bottom: 20px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { font-size: .85rem; color: var(--c-muted); transition: var(--tr-fast); }
.footer-col ul li a:hover { color: var(--c-secondary); }
.footer-link--accent { color: var(--c-secondary) !important; font-weight: 600; }
.footer-disclaimer {
  font-size: .78rem; line-height: 1.75; color: var(--c-muted);
  text-align: center;
  max-width: 900px; margin: 0 auto 28px;
  padding-top: 28px;
  border-top: 1px solid var(--c-border);
}
.footer-disclaimer strong { color: var(--c-text); font-weight: 600; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--c-border);
}
.footer-bottom p { font-size: .78rem; color: var(--c-muted); }


@media (max-width: 1024px) {
  .site-footer { padding: 60px 0 32px; }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .footer-grid { gap: 32px; }
  .footer-brand { grid-column: 1 / -1; margin-bottom: 8px; }
  .footer-col h4 { margin-bottom: 16px; }
}

@media (max-width: 500px) {
  .site-footer { padding: 48px 0 80px; text-align: center; }
  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-logo { display: inline-block; margin-inline: auto; }
  .footer-brand address { display: flex; flex-direction: column; gap: 4px; align-items: center; }
  .footer-brand address a { margin-inline: auto; }
  .footer-col ul li a { font-size: .9rem; display: block; padding: 4px 0; }
  .footer-disclaimer { font-size: .75rem; padding-inline: 16px; }
  .footer-bottom { 
    flex-direction: column; 
    align-items: center;
    gap: 16px; 
    padding-bottom: 24px; /* Space for mobile share bar if exists */
  }
}

/* ============================================================
   SCROLL TO TOP
   ============================================================ */
.scroll-top {
  position: fixed; bottom: 28px; right: 28px;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  color: var(--c-primary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: var(--tr); z-index: 900;
}
.scroll-top--visible { opacity: 1; visibility: visible; transform: translateY(0); }
.scroll-top:hover { background: var(--c-secondary); color: #fff; border-color: var(--c-secondary); box-shadow: var(--shadow-glow); }

@media (max-width: 768px) {
  .scroll-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
  }
}

/* ============================================================
   ARTICLE CONTENT TYPOGRAPHY (markdown output)
   ============================================================ */
.prose-content {
  font-size: 1.04rem;
  line-height: 1.82;
  color: var(--c-text);
}
.prose-content h2 {
  font-size: 1.75rem; font-weight: 800; letter-spacing: -.04em;
  margin: 3rem 0 1.25rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--c-border);
  color: var(--c-primary);
}
.prose-content h3 {
  font-size: 1.3rem; font-weight: 700; letter-spacing: -.03em;
  margin: 2rem 0 .9rem;
  color: var(--c-secondary);
}
.prose-content h4 { font-size: 1.1rem; font-weight: 700; margin: 1.5rem 0 .75rem; }
.prose-content p { margin-bottom: 1.5rem; }
.prose-content > p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-size: 3.2em; float: left;
  line-height: .8; margin-right: 12px; margin-top: 6px;
  color: var(--c-secondary); font-weight: 900;
}
.prose-content a { color: var(--c-secondary); font-weight: 500; }
.prose-content a:hover { text-decoration: underline; }
.prose-content ul,
.prose-content ol { padding-left: 1.5rem; margin-bottom: 1.75rem; }
.prose-content li { margin-bottom: .5rem; }
.prose-content ul li::marker { color: var(--c-secondary); }
.prose-content strong { color: var(--c-primary); font-weight: 700; }
.prose-content em { font-style: italic; }
.prose-content blockquote {
  margin: 2.5rem 0; padding: 1.5rem 2rem;
  background: var(--c-elevated);
  border-left: 4px solid var(--c-secondary);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-style: italic; font-size: 1.1rem; color: var(--c-muted);
}
.prose-content blockquote p { margin-bottom: 0; }
.prose-content code {
  background: var(--c-elevated); color: var(--c-secondary);
  padding: .15em .4em; border-radius: .3em;
  font-size: .88em; font-weight: 500;
}
.prose-content pre { background: #0F172A; border-radius: var(--r-md); padding: 1.5rem; overflow-x: auto; margin-bottom: 2rem; }
.prose-content pre code { background: none; color: #e2e8f0; padding: 0; font-size: .92rem; }
.prose-content img { border-radius: var(--r-xl); box-shadow: var(--shadow-lg); margin: 2rem 0; width: 100%; }
.prose-content table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  margin: 2.5rem 0;
  border-radius: var(--r-md); overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--c-border);
}
.prose-content th {
  background: #0F172A; color: #fff;
  font-weight: 600; text-align: left;
  padding: .875rem 1.25rem;
  font-family: var(--font-display);
  font-size: .78rem; text-transform: uppercase; letter-spacing: .06em;
}
[data-theme="dark"] .prose-content th { background: #1E293B; }
.prose-content td { padding: .875rem 1.25rem; border-bottom: 1px solid var(--c-border); font-size: .95rem; }
.prose-content tr:last-child td { border-bottom: none; }
.prose-content tr:hover td { background: var(--c-elevated); }

/* Alert boxes */
.alert { padding: 1.25rem 1.5rem; margin: 2rem 0; border-left: 4px solid; border-radius: var(--r-md); font-size: 1rem; }
.alert-title { display: flex; align-items: center; gap: 10px; font-weight: 700; font-family: var(--font-display); font-size: 1rem; margin-bottom: .6rem; }
.alert-note      { border-left-color: #3B82F6; background: rgba(59,130,246,.04); }
.alert-note      .alert-title { color: #3B82F6; }
.alert-tip       { border-left-color: var(--c-secondary); background: rgba(16,185,129,.04); }
.alert-tip       .alert-title { color: #059669; }
.alert-important { border-left-color: #8B5CF6; background: rgba(139,92,246,.04); }
.alert-important .alert-title { color: #7C3AED; }
.alert-warning   { border-left-color: #F59E0B; background: rgba(245,158,11,.04); }
.alert-warning   .alert-title { color: #D97706; }
.alert-caution   { border-left-color: #EF4444; background: rgba(239,68,68,.04); }
.alert-caution   .alert-title { color: #DC2626; }

/* Badge */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; font-size: .78rem; font-weight: 600;
  letter-spacing: .03em; border-radius: var(--r-full);
  background: rgba(16,185,129,.08); color: var(--c-secondary);
}
/* ============================================================
   HOMEPAGE — All sections
   ============================================================ */

/* ── HERO ──────────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  background: #0F172A;
  background-image: 
    linear-gradient(to right, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.6) 100%),
    url('/images/hero-bg.avif');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  padding: clamp(120px, 16vh, 200px) 0;
}

@media (max-width: 768px) {
  .hero {
    background-attachment: scroll;
    background-image: 
      linear-gradient(to bottom, rgba(15, 23, 42, 0.88) 0%, rgba(15, 23, 42, 0.4) 100%),
      url('/images/hero-bg.avif');
  }
}
.hero__blobs { position: absolute; inset: 0; pointer-events: none; }
.hero__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  animation: blobFloat 14s ease-in-out infinite alternate;
}
.hero__blob--1 {
  top: -10%; left: -8%;
  width: 52%; height: 52%;
  background: rgba(16,185,129,.2);
}
.hero__blob--2 {
  bottom: -10%; right: -8%;
  width: 48%; height: 48%;
  background: rgba(20,184,166,.18);
  animation-duration: 18s;
  animation-direction: alternate-reverse;
}
@keyframes blobFloat {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-30px, 20px) scale(1.04); }
}

.hero__inner { 
  position: relative; z-index: 1; 
  max-width: 840px; 
  margin: 0 auto;
  text-align: center;
}

.hero__eyebrow {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .2em;
  color: rgba(16,185,129,.85);
  margin-bottom: 28px;
}
.hero__pulse {
  display: inline-block;
  width: 8px; height: 8px; border-radius: 50%;
  background: #10B981;
  animation: heroHeartbeat 2s ease-in-out infinite;
}
@keyframes heroHeartbeat {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .5; transform: scale(.75); }
}

.hero__h1 {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: clamp(2.8rem, 6vw, 5.2rem);
  font-weight: 900; letter-spacing: -.05em; line-height: 1.03;
  color: #fff; margin-bottom: 28px;
  text-shadow: 0 4px 32px rgba(0,0,0,0.25);
}
.hero__grad {
  background: linear-gradient(135deg, #10B981, #14B8A6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero__sub {
  font-size: 1.15rem; line-height: 1.7;
  color: rgba(255,255,255,0.75);
  max-width: 680px; margin: 0 auto 48px;
  text-wrap: balance;
}
.hero__ctas { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

/* ── STATS BAR ─────────────────────────────────────────────── */
.stats-bar {
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
  background: var(--c-surface);
  padding: 52px 0;
}
.stats-bar__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.stat { text-align: center; transition: transform .3s var(--ease); }
.stat:hover { transform: translateY(-4px); }
.stat__num {
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 900; letter-spacing: -.04em;
  color: var(--c-primary); line-height: 1;
}
.stat__accent { color: var(--c-secondary); }
.stat__label {
  margin-top: 7px;
  font-size: .78rem; font-weight: 600;
  color: var(--c-muted);
  text-transform: uppercase; letter-spacing: .08em;
}

/* ── BENTO GRID ─────────────────────────────────────────────── */
.bento-section {
  padding: 96px 0;
  background: var(--c-elevated);
}
[data-theme="dark"] .bento-section { background: rgba(19,27,46,.5); }

.bento-header { max-width: 720px; margin: 0 auto 56px; text-align: center; }

.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.bento-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 32px;
  padding: 40px;
  transition: var(--tr);
  position: relative; overflow: hidden;
  display: flex;
  flex-direction: column;
}
.bento-card:hover {
  border-color: var(--c-border-h);
  box-shadow: 0 20px 50px rgba(0,0,0,.1);
  transform: translateY(-5px);
}
.bento-card--wide { grid-column: span 2; }
.bento-card__bg {
  position: absolute; top: -24px; right: -24px;
  width: 96px; height: 96px; border-radius: 50%;
  background: rgba(16,185,129,.06);
  transition: transform .5s var(--ease);
  pointer-events: none;
}
.bento-card:hover .bento-card__bg { transform: scale(2.8); }

.bento-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: rgba(16,185,129,.1);
  color: var(--c-secondary);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 22px;
}
.bento-icon svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.5; fill: none; }
.bento-icon--muted {
  background: var(--c-elevated);
  color: var(--c-primary);
}
[data-theme="dark"] .bento-icon--muted { background: rgba(255,255,255,.06); color: var(--c-primary); }

.bento-card h3 {
  font-size: 1.25rem; font-weight: 700;
  color: var(--c-primary); margin-bottom: 14px;
}
.bento-card--wide h3 { font-size: 1.55rem; }
.bento-card p { font-size: .92rem; line-height: 1.72; color: var(--c-muted); }

/* ── CATEGORIES ─────────────────────────────────────────────── */
.categories-section {
  padding: 80px 0;
  background: var(--c-surface);
}
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.cat-card {
  position: relative; overflow: hidden;
  border-radius: 32px;
  padding: 100px 40px 40px;
  background: #0F172A;
  color: #fff;
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 300px;
  transition: var(--tr);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.05);
}
.cat-card:hover { transform: translateY(-5px); box-shadow: 0 24px 48px rgba(0,0,0,.3); }
.cat-card:hover .cat-card__inner { transform: translateY(-8px); }
.cat-card__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.72) 0%, transparent 60%);
  pointer-events: none;
}
.cat-card__glow {
  position: absolute; top: -40px; right: -40px;
  width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(16,185,129,.12), transparent 70%);
  pointer-events: none;
}
.cat-card--accent { background: var(--c-secondary); color: #0F172A; }
.cat-card--accent .cat-card__overlay {
  background: linear-gradient(to top, rgba(20,184,166,.35) 0%, transparent 60%);
}
.cat-card__inner {
  position: relative; z-index: 1;
  transition: transform .4s var(--ease);
}
.cat-card__label {
  font-size: .68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .15em;
  color: rgba(16,185,129,.85);
  margin-bottom: 9px;
}
.cat-card__label--dark { color: rgba(15,23,42,.6); }
.cat-card h3 {
  font-size: 1.75rem; font-weight: 800; letter-spacing: -.04em;
  color: inherit; margin-bottom: 7px;
}
.cat-card p { font-size: .88rem; color: rgba(255,255,255,.6); }
.cat-card--accent p { color: rgba(15,23,42,.6); }

/* ── CTA ────────────────────────────────────────────────────── */
.cta-section {
  padding: 80px 0 96px;
  background: var(--c-elevated);
}
[data-theme="dark"] .cta-section { background: rgba(19,27,46,.5); }

.cta-block {
  position: relative; overflow: hidden;
  background: #0F172A;
  border-radius: 40px;
  padding: 80px 56px;
  text-align: center;
}
.cta-block__blob {
  position: absolute; top: -30%; left: -15%;
  width: 50%; height: 80%; border-radius: 50%;
  background: rgba(16,185,129,.08);
  filter: blur(80px);
  pointer-events: none;
}
.cta-block h2 {
  font-size: clamp(2rem, 4.5vw, 3.6rem);
  font-weight: 900; letter-spacing: -.05em;
  color: #fff; line-height: 1.04;
  margin-bottom: 24px; position: relative; z-index: 1;
}
.cta-block p {
  font-size: 1.05rem; line-height: 1.75;
  color: rgba(255,255,255,.5);
  max-width: 480px; margin: 0 auto 44px;
  position: relative; z-index: 1;
}

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .bento-grid { grid-template-columns: repeat(2, 1fr); }
  .bento-card--wide { grid-column: span 2; }
}
@media (max-width: 768px) {
  .hero { padding: 80px 0 96px; }
  .stats-bar__grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .bento-grid { grid-template-columns: 1fr; }
  .bento-card--wide { grid-column: span 1; }
  .cat-grid { grid-template-columns: 1fr; }
  .cta-block { padding: 56px 28px; }
  .cta-section { padding: 56px 0 72px; }
  .bento-section { padding: 72px 0; }
  .categories-section { padding: 60px 0; }
}
/* ============================================================
   LIST PAGE
   ============================================================ */

.list-page { padding: 56px 0 96px; }

/* ── Header ─────────────────────────────────────────────────── */
.list-header { margin-bottom: 56px; }

.list-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 9999px;
  font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em;
  background: rgba(16,185,129,.1); color: var(--c-secondary);
  margin-bottom: 20px;
}
.list-header h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 900; letter-spacing: -.05em;
  margin-bottom: 16px;
}
.list-header p {
  font-size: 1.05rem; line-height: 1.7;
  color: var(--c-muted); max-width: 640px;
  margin-bottom: 28px;
}
.count-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 18px; border-radius: 10px;
  border: 1px solid var(--c-border);
  background: var(--c-surface);
  font-size: .82rem; font-weight: 600; color: var(--c-text);
  box-shadow: var(--shadow-sm);
}
.count-pill svg {
  width: 16px; height: 16px;
  stroke: currentColor; fill: none; stroke-width: 2;
}

/* ── Card Grid ──────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.card {
  display: flex; flex-direction: column;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 28px;
  padding: 36px;
  transition: var(--tr);
  position: relative; overflow: hidden;
  text-decoration: none;
  cursor: pointer;
}
.card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(135deg, #10B981, #14B8A6);
  transform: scaleX(0); transform-origin: left;
  transition: transform .45s var(--ease);
}
.card:hover::before { transform: scaleX(1); }
.card:hover {
  transform: translateY(-6px);
  border-color: var(--c-border-h);
  box-shadow: var(--shadow-xl);
}
.card__icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: #0F172A; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 1.35rem; font-weight: 800;
  margin-bottom: 24px;
  transition: var(--tr-fast);
}
.card:hover .card__icon {
  background: linear-gradient(135deg, #10B981, #14B8A6);
  color: #0F172A;
}
.card h2 {
  font-size: 1.3rem; font-weight: 800; letter-spacing: -.03em;
  color: var(--c-primary); margin-bottom: 12px;
  transition: color .2s ease;
}
.card:hover h2 { color: var(--c-secondary); }
.card p {
  font-size: .88rem; line-height: 1.72;
  color: var(--c-muted); flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card__cta {
  display: flex; align-items: center; gap: 8px;
  margin-top: 24px;
  font-size: .85rem; font-weight: 700;
  color: var(--c-primary);
}
.card__cta-text {
  background: linear-gradient(135deg, #10B981, #14B8A6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.card__cta svg {
  width: 16px; height: 16px;
  stroke: var(--c-secondary); fill: none; stroke-width: 2.5;
  transition: transform .25s var(--ease);
}
.card:hover .card__cta svg { transform: translateX(5px); }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .card-grid { grid-template-columns: 1fr; } .list-page { padding: 40px 0 72px; } }
/* ============================================================
   SINGLE ARTICLE PAGE
   ============================================================ */

.single-page { padding: 52px 0 96px; }

/* ── Article Header ─────────────────────────────────────────── */
.article-header {
  border-bottom: 1px solid var(--c-border);
  padding-bottom: 48px;
  margin-bottom: 48px;
}
.article-header__title {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 900; letter-spacing: -.05em;
  margin-bottom: 28px; max-width: 820px;
}

/* ── Author Profiles (Header) ─────────────────────────────── */
.article-authors {
  display: flex; gap: 20px; flex-wrap: wrap;
  margin-bottom: 28px;
}
.author-profile {
  display: flex; align-items: center; gap: 10px;
}
.author-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(0,0,0,0.05);
  background: var(--c-elevated);
  opacity: 0.9;
}
[data-theme="dark"] .author-avatar { border-color: rgba(255,255,255,0.1); }

.author-info { display: flex; flex-direction: column; }
.author-name { font-size: 0.88rem; font-weight: 600; color: var(--c-primary); line-height: 1.2; }
.author-name a { text-decoration: none; color: inherit; }
.author-name a:hover { color: var(--c-secondary); }
.author-title { font-size: 0.68rem; font-weight: 600; color: var(--c-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 1px; opacity: 0.8; }

/* ── Author Bio Box (Footer) ──────────────────────────────── */
.author-bio-box {
  margin: 4rem 0 3rem;
  padding: 2rem;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 28px;
  display: flex; gap: 1.5rem;
  align-items: flex-start;
  position: relative;
  overflow: hidden;
}
.author-bio-box__content { flex: 1; }
.author-bio-box h3 { font-size: 1.1rem; font-weight: 700; color: var(--c-primary); margin-bottom: 0.75rem; letter-spacing: -0.01em; }
.author-bio-box p { font-size: 0.9rem; line-height: 1.65; color: var(--c-muted); margin: 0; opacity: 0.9; }
.author-bio-box a { color: var(--c-secondary); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }

.disclaimer-box {
  padding: 1.25rem;
  background: rgba(var(--c-primary-rgb), 0.02);
  border-left: 2px solid var(--c-border);
  border-radius: 0 12px 12px 0;
  margin-top: 1.5rem;
}
.disclaimer-box p { font-size: 0.82rem; color: var(--c-muted); line-height: 1.6; margin: 0; opacity: 0.8; }
.disclaimer-box strong { color: var(--c-primary); font-weight: 600; }

@media (max-width: 768px) {
  .author-bio-box { padding: 2rem; flex-direction: column; gap: 1.5rem; }
  .article-authors { gap: 16px; }
}


/* Breadcrumb */
.breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: .82rem; color: var(--c-muted);
  margin-bottom: 28px; flex-wrap: wrap;
}
.breadcrumb__link { color: var(--c-muted); font-weight: 500; transition: color .2s ease; }
.breadcrumb__link:hover { color: var(--c-secondary); }
.breadcrumb__sep { width: 16px; height: 16px; opacity: .3; fill: currentColor; flex-shrink: 0; }
.breadcrumb__current { font-weight: 600; color: var(--c-primary); }

/* Meta */
.article-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
}
.meta-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 9999px;
  font-size: .75rem; font-weight: 600;
  background: var(--c-elevated); color: var(--c-text);
}
.meta-pill svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }
.meta-pill--accent { background: rgba(16,185,129,.1); color: var(--c-secondary); }
.meta-date { font-size: .8rem; color: var(--c-muted); }

/* ── Mobile TOC toggle ──────────────────────────────────────── */
.toc-mobile-btn {
  display: none;
  width: 100%; padding: 14px 20px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  cursor: pointer; font-family: 'Inter', system-ui, sans-serif;
  font-weight: 600; font-size: .9rem; color: var(--c-primary);
  margin-bottom: 24px;
  align-items: center; justify-content: space-between;
  transition: var(--tr-fast);
}
.toc-mobile-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; transition: transform .3s ease; }
.toc-mobile-btn:hover { background: var(--c-elevated); }

/* ── Article Layout ─────────────────────────────────────────── */
.article-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 52px;
  align-items: start;
}

/* ── TOC Sidebar ────────────────────────────────────────────── */
.toc-sidebar {
  position: sticky;
  top: calc(68px + 28px);
  max-height: calc(100vh - 68px - 56px);
  overflow-y: auto;
}
.toc-box {
  background: rgba(248,250,252,.7);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 24px;
}
[data-theme="dark"] .toc-box { background: rgba(19,27,46,.5); }
.toc-box__heading {
  font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--c-muted); margin-bottom: 16px;
}
.toc-nav ul {
  list-style: none; padding: 0; margin: 0;
  border-left: 2px solid var(--c-border);
}
.toc-nav ul li a {
  display: block;
  padding: 5px 0 5px 14px;
  font-size: .8rem; line-height: 1.45;
  color: var(--c-muted);
  border-left: 2px solid transparent;
  margin-left: -2px;
  transition: var(--tr-fast);
}
.toc-nav ul li a:hover,
.toc-nav ul li a.active {
  color: var(--c-secondary);
  border-left-color: var(--c-secondary);
}
.toc-nav ul ul { border-left: none; padding-left: 10px; }
.toc-nav ul ul li a { font-size: .76rem; }

/* ── Content Area ───────────────────────────────────────────── */
.content-area { min-width: 0; }

/* ── Related Articles ───────────────────────────────────────── */
.related-section {
  margin-top: 72px;
  padding-top: 56px;
  border-top: 1px solid var(--c-border);
}
.related-section__title {
  font-size: 1.5rem; font-weight: 800; letter-spacing: -.04em;
  margin-bottom: 28px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.related-card {
  display: block;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 24px;
  transition: var(--tr);
  text-decoration: none;
}
.related-card:hover {
  border-color: var(--c-border-h);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}
.related-card__tag {
  display: inline-block;
  font-size: .68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  background: var(--c-elevated); color: var(--c-muted);
  padding: 3px 9px; border-radius: 9999px;
  margin-bottom: 12px;
}
.related-card h4 {
  font-size: 1.04rem; font-weight: 700;
  color: var(--c-primary); margin-bottom: 8px;
  line-height: 1.35;
  transition: color .2s ease;
}
.related-card:hover h4 { color: var(--c-secondary); }
.related-card p {
  font-size: .83rem; color: var(--c-muted); line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .article-layout { grid-template-columns: 200px 1fr; gap: 36px; }
}
@media (max-width: 768px) {
  .article-layout { grid-template-columns: 1fr; }
  .toc-mobile-btn { display: flex; }
  .toc-sidebar {
    position: static; max-height: none;
    margin-bottom: 24px;
  }
  .toc-sidebar--hidden { display: none; }
  .related-grid { grid-template-columns: 1fr; }
  .single-page { padding: 36px 0 72px; }
}
@media (max-width: 640px) {
  .article-header__title { font-size: 1.9rem; }
}

/* ── Calculator Crosslink CTA (on article pages) ──────────── */
.calc-crosslink {
  margin: 56px 0 40px;
}
.calc-crosslink__inner {
  position: relative;
  padding: 28px 32px;
  border-radius: var(--r-xl);
  background: var(--grad-dark);
  border: 1px solid rgba(16,185,129,.15);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  transition: var(--tr);
}
.calc-crosslink__inner::before {
  content: '';
  position: absolute;
  top: -60%;
  right: -10%;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(16,185,129,.12) 0%, transparent 70%);
  pointer-events: none;
}
.calc-crosslink__inner:hover {
  border-color: rgba(16,185,129,.35);
  box-shadow: 0 8px 40px rgba(16,185,129,.12);
  transform: translateY(-3px);
}
.calc-crosslink__text {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  flex: 1;
  min-width: 0;
}
.calc-crosslink__icon {
  font-size: 2rem;
  flex-shrink: 0;
  margin-top: 2px;
}
.calc-crosslink__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  color: #F1F5F9;
  line-height: 1.3;
  margin-bottom: 6px;
}
.calc-crosslink__title em {
  color: var(--c-secondary);
  font-style: italic;
  margin-right: 0.15em;
}
.calc-crosslink__desc {
  font-size: .82rem;
  color: #94A3B8;
  line-height: 1.6;
}
.calc-crosslink__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 24px;
  font-family: var(--font-body);
  font-size: .85rem;
  font-weight: 700;
  color: #0F172A;
  background: var(--c-secondary);
  border-radius: var(--r-md);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: var(--tr);
  box-shadow: 0 4px 20px rgba(16,185,129,.3);
}
.calc-crosslink__btn:hover {
  background: #34D399;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(16,185,129,.45);
}
@media (max-width: 640px) {
  .calc-crosslink__inner {
    flex-direction: column;
    padding: 24px;
    text-align: center;
  }
  .calc-crosslink__text { flex-direction: column; align-items: center; }
  .calc-crosslink__btn { width: 100%; justify-content: center; }
}


/* Mermaid Rendering Optimization */
.mermaid {
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    background: transparent !important;
}
.mermaid[data-processed=true] {
    opacity: 1;
}

/* ============================================================
   SHARE WIDGET V3 (ULTRA PREMIUM)
   ============================================================ */

.share-container {
  display: contents; /* For accessibility/structure */
}

/* Base Bar (Frosted Glass Pill) */
.share-bar {
  position: fixed;
  z-index: 2000;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .share-bar {
  background: rgba(15, 23, 42, 0.85);
  border-color: rgba(255, 255, 255, 0.05);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Mobile: Bottom Floating Pill */
@media (max-width: 1199px) {
  .share-bar {
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    border-radius: 24px;
    padding: 8px 16px;
    width: auto;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.15));
  }
}

/* Desktop: Sidebar Floating */
@media (min-width: 1200px) {
  .share-bar {
    top: 50%;
    left: 32px;
    flex-direction: column;
    padding: 12px 6px;
    border-radius: 100px;
    transform: translateY(-50%) translateX(-120px);
    opacity: 0;
  }
  .share-bar--visible {
    transform: translateY(-50%) translateX(0);
    opacity: 1;
  }
  .share-bar__divider {
    width: 20px;
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 4px 0;
  }
}

/* Actions */
.share-action {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: transparent;
  border: none;
  color: var(--c-primary);
  transition: all 0.3s var(--ease);
  position: relative;
  border-radius: 50%;
  width: 44px;
  height: 44px;
}

[data-theme="dark"] .share-action {
  color: #fff;
}

.share-action:hover {
  background: rgba(16, 185, 129, 0.1);
  color: var(--c-secondary);
  transform: scale(1.1);
}

.share-action--native {
  background: var(--c-primary);
  color: #fff !important;
  width: auto;
  padding: 0 20px;
  border-radius: 100px;
  gap: 8px;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: -0.01em;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

[data-theme="dark"] .share-action--native {
  background: var(--c-secondary);
  color: #0F172A !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.share-action--native svg { width: 18px; height: 18px; stroke-width: 3; }

.share-action svg { width: 22px; height: 22px; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1)); }

/* Tooltips (Desktop) */
@media (min-width: 1200px) {
  .share-action__tooltip {
    position: absolute;
    left: calc(100% + 12px);
    background: var(--c-primary);
    color: #fff;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s var(--ease);
    pointer-events: none;
    white-space: nowrap;
  }
  .share-action--native { width: 44px; height: 44px; padding: 0; border-radius: 50%; }
  .share-action__text, .share-action__tooltip { display: none; }
  .share-action:hover .share-action__tooltip {
    display: block;
    opacity: 1;
    transform: translateX(0);
  }
}

.share-action__text,
.share-action__tooltip {
  display: none;
}

/* Divider */
.share-bar__divider {
  width: 1px;
  height: 24px;
  background: rgba(0,0,0,0.06);
  margin: 0 8px;
}
[data-theme="dark"] .share-bar__divider {
  background: rgba(255,255,255,0.05);
}

/* Confirm Ripple */
.share-confirm {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--c-secondary);
  color: #0F172A;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 900;
  text-transform: uppercase;
  opacity: 0;
  transition: all 0.3s var(--ease);
  pointer-events: none;
}
.share-confirm--show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Section Navigation (Next/Prev) ─────────────────────────── */
.section-nav {
  margin: 48px auto 24px;
  max-width: var(--container-w);
}
.section-nav__container {
  display: flex;
  gap: 16px;
  justify-content: space-between;
}
.section-nav__link {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 14px 20px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  text-decoration: none;
  transition: var(--tr-fast);
  min-width: 0;
}
.section-nav__link:hover {
  border-color: var(--c-secondary);
  background: var(--c-elevated);
  transform: translateY(-1px);
}
.section-nav__link--prev { align-items: flex-start; text-align: left; }
.section-nav__link--next { align-items: flex-end; text-align: right; }

.section-nav__label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--c-muted);
  margin-bottom: 6px;
}
.section-nav__label svg { 
  width: 14px !important; 
  height: 14px !important; 
  flex-shrink: 0;
  opacity: 0.7; 
}
.section-nav__title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--c-primary);
  line-height: 1.3;
  transition: color .2s ease;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
}
.section-nav__link:hover .section-nav__title { color: var(--c-secondary); }

.section-nav__placeholder {
  flex: 1;
}

@media (max-width: 640px) {
  .section-nav__container { flex-direction: column; gap: 12px; }
  .section-nav__placeholder { display: none; }
}

/* -- Cookie Consent ------------------------------------------ */
.cookie-consent {
  position: fixed; bottom: 0; left: 0; width: 100%;
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  padding: 16px 24px;
  box-shadow: var(--shadow-xl);
  z-index: 10000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  transform: translateY(100%);
  transition: transform 0.4s var(--ease);
}
.cookie-consent--visible {
  transform: translateY(0);
}
.cookie-text { font-size: 0.85rem; color: var(--c-text); flex: 1; margin: 0; }
.cookie-text a { color: var(--c-secondary); text-decoration: underline; font-weight: 500; }
.cookie-btns { display: flex; gap: 10px; }
.cookie-btn {
  padding: 8px 16px; font-size: 0.85rem; font-weight: 600; border-radius: var(--r-sm); cursor: pointer; border: none;
}
.cookie-btn--accept { background: var(--c-secondary); color: #fff; }
.cookie-btn--decline { background: var(--c-elevated); color: var(--c-text); border: 1px solid var(--c-border); }
@media (max-width: 640px) {
  .cookie-consent { flex-direction: column; text-align: center; }
  .cookie-btns { width: 100%; justify-content: stretch; }
  .cookie-btn { flex: 1; }
}

/* ── Clinical FAQ & Protocol Blocks ───────────────────────── */
.clinical-faq {
  margin: 3rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.faq-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 1.5rem 1.75rem;
  transition: var(--tr);
}
.faq-card:hover {
  border-color: var(--c-border-h);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.faq-card__q {
  font-weight: 800;
  color: var(--c-primary);
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  font-size: 1.05rem;
  line-height: 1.4;
  letter-spacing: -0.01em;
}
.faq-card__q::before {
  content: "Q";
  color: var(--c-secondary);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.1rem;
  line-height: 1;
  background: rgba(16, 185, 129, 0.08);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  flex-shrink: 0;
  margin-top: 1px;
}
.faq-card__a {
  color: var(--c-text);
  font-size: 0.94rem;
  line-height: 1.7;
  padding-left: 42px;
  opacity: 0.95;
}
.faq-card__a p:last-child { margin-bottom: 0; }

[data-theme="dark"] .faq-card__q::before {
  background: rgba(52, 211, 153, 0.15);
  color: var(--c-secondary);
}

@media (max-width: 640px) {
  .faq-card { padding: 1.25rem; }
  .faq-card__q { font-size: 1rem; gap: 10px; }
  .faq-card__q::before { width: 24px; height: 24px; font-size: 0.9rem; }
  .faq-card__a { padding-left: 34px; font-size: 0.9rem; }
}

/* SEO & FAQ SECTION MASTERY */

/* ── Mermaid Diagram Optimization ────────────────────────── */
.mermaid {
  margin: 2.5rem auto;
  max-width: 850px;
  display: flex;
  justify-content: center;
  overflow: visible;
}
.mermaid svg {
  max-width: 100% !important;
  height: auto !important;
  max-height: 70vh;
  filter: drop-shadow(var(--shadow-sm));
}

[data-theme="dark"] .mermaid svg {
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
}

@media (max-width: 850px) {
  .mermaid {
    margin: 2rem 0;
    max-width: 100%;
  }
}
.seo-section {
  padding: var(--section-pad) 0;
  background: var(--c-surface);
}
.seo-section__inner {
  max-width: 800px;
  margin: 0 auto;
}
.seo-section h2 { font-size: 2.25rem; margin-bottom: 1.5rem; text-align: center; }
.seo-section h3 { font-size: 1.5rem; margin-top: 2.5rem; margin-bottom: 1rem; color: var(--c-primary); }
.seo-section p { opacity: 0.9; line-height: 1.8; margin-bottom: 1.5rem; }

.faq-section {
  padding: var(--section-pad) 0;
  background: var(--c-elevated);
}
[data-theme="dark"] .faq-section { background: rgba(19,27,46,.4); }

.faq-grid {
  max-width: 840px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.faq-item {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 20px;
  padding: 24px 32px;
  cursor: pointer;
  transition: var(--tr);
}
.faq-item:hover { border-color: var(--c-border-h); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.faq-item summary {
  font-weight: 700;
  font-size: 1.15rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--c-primary);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary svg { transition: transform .3s ease; color: var(--c-secondary); flex-shrink: 0; margin-left: 12px; }
.faq-item[open] summary svg { transform: rotate(180deg); }
.faq-content {
  margin-top: 16px;
  opacity: 0.85;
  line-height: 1.75;
  font-size: 1rem;
}

