/* ==========================================================================
   Comentora.com - Luxury Editorial & Clinical Publication Design System
   ========================================================================== */

:root {
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-serif: 'Playfair Display', 'Newsreader', Georgia, serif;
  --font-mono: 'JetBrains Mono', Menlo, Consolas, monospace;

  /* Color Palette - Refined Light Luxury */
  --bg-primary: #fafbfc;
  --bg-secondary: #f1f5f9;
  --bg-tertiary: #e2e8f0;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;
  --border-focus: #0284c7;

  --text-main: #090e17;
  --text-muted: #475569;
  --text-faint: #94a3b8;

  --brand-primary: #0284c7;
  --brand-primary-hover: #0369a1;
  --brand-surface: #f0f9ff;
  --brand-accent: #059669;
  --brand-accent-surface: #ecfdf5;

  /* Status / Clinical Badges */
  --badge-bg: #e0f2fe;
  --badge-text: #0369a1;
  --alert-info-bg: #eff6ff;
  --alert-info-border: #bfdbfe;
  --alert-warn-bg: #fffbeb;
  --alert-warn-border: #fde68a;
  --alert-error-bg: #fef2f2;
  --alert-error-border: #fecaca;
  --alert-success-bg: #f0fdf4;
  --alert-success-border: #bbf7d0;

  /* Elevation */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 12px 24px -4px rgba(0, 0, 0, 0.08), 0 4px 8px -2px rgba(0, 0, 0, 0.03);
  --shadow-xl: 0 24px 48px -12px rgba(0, 0, 0, 0.14);

  --max-w-content: 780px;
  --max-w-page: 1200px;
  --header-height: 74px;
}

[data-theme="dark"] {
  --bg-primary: #090d16;
  --bg-secondary: #0f172a;
  --bg-tertiary: #1e293b;
  --bg-card: #111a2e;
  --bg-card-hover: #16223b;
  --border-subtle: #1e293b;
  --border-strong: #334155;
  --border-focus: #38bdf8;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-faint: #64748b;

  --brand-primary: #38bdf8;
  --brand-primary-hover: #7dd3fc;
  --brand-surface: rgba(56, 189, 248, 0.1);
  --brand-accent: #34d399;
  --brand-accent-surface: rgba(52, 211, 153, 0.1);

  --badge-bg: rgba(56, 189, 248, 0.15);
  --badge-text: #7dd3fc;
  --alert-info-bg: #0c2038;
  --alert-info-border: #1e4068;
  --alert-warn-bg: #291b08;
  --alert-warn-border: #52350a;
  --alert-error-bg: #2d1115;
  --alert-error-border: #5c1e26;
  --alert-success-bg: #0a2919;
  --alert-success-border: #165330;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 12px 24px -4px rgba(0, 0, 0, 0.55);
  --shadow-xl: 0 24px 48px -12px rgba(0, 0, 0, 0.7);
}

/* Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top Announcement Strip */
.top-announcement-bar {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.785rem;
  color: var(--text-muted);
  padding: 0.45rem 1rem;
}

.top-announcement-container {
  max-width: var(--max-w-page);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-announcement-text {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.live-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--brand-accent);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
  display: inline-block;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.9); }
}

/* Reading Progress Bar */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-accent));
  width: 0%;
  z-index: 10000;
  transition: width 0.1s ease;
}

/* Header & Navigation */
header.site-header {
  position: sticky;
  top: 0;
  height: var(--header-height);
  background-color: rgba(250, 251, 252, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 1000;
  display: flex;
  align-items: center;
  transition: background-color 0.25s, border-color 0.25s;
}

[data-theme="dark"] header.site-header {
  background-color: rgba(9, 13, 22, 0.88);
}

.header-container {
  width: 100%;
  max-width: var(--max-w-page);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
}

.logo-symbol {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #0284c7 0%, #0f766e 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 800;
  font-size: 1.25rem;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

.logo-text {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.75px;
}

.logo-dot {
  color: var(--brand-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.925rem;
  transition: color 0.2s;
  position: relative;
  padding: 0.25rem 0;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--text-main);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--brand-primary);
  border-radius: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Premium Language Selector Pill Trigger */
.lang-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-strong);
  color: var(--text-main);
  padding: 0.45rem 0.95rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-sm);
  outline: none;
}

.lang-trigger-btn:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.15);
}

.lang-trigger-btn .globe-icon {
  color: var(--brand-primary);
}

.lang-trigger-btn .lang-label {
  letter-spacing: 0.3px;
}

.lang-trigger-btn .chevron-icon {
  color: var(--text-faint);
  transition: transform 0.2s;
}

.lang-trigger-btn:hover .chevron-icon {
  color: var(--brand-primary);
}

.theme-toggle-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
  padding: 0.55rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}

.theme-toggle-btn:hover {
  background: var(--bg-secondary);
  color: var(--text-main);
  border-color: var(--brand-primary);
}

/* ==========================================================================
   Ultra-Reliable, Beautiful Language Modal Overlay
   ========================================================================== */
.lang-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(9, 13, 22, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.lang-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.lang-modal-card-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  width: 100%;
  max-width: 680px;
  padding: 2.25rem;
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  transform: translateY(20px) scale(0.96);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.lang-modal-overlay.is-open .lang-modal-card-box {
  transform: translateY(0) scale(1);
}

[data-theme="dark"] .lang-modal-card-box {
  background: #111a2e;
  border-color: #243550;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.lang-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.lang-modal-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.lang-modal-title {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.lang-modal-subtitle {
  font-size: 0.925rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.lang-modal-close-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.lang-modal-close-btn:hover {
  background: var(--brand-surface);
  color: var(--brand-primary);
  border-color: var(--brand-primary);
  transform: rotate(90deg);
}

/* Language Cards Grid */
.lang-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (max-width: 620px) {
  .lang-modal-grid {
    grid-template-columns: 1fr;
  }
  .lang-modal-card-box {
    padding: 1.5rem;
  }
}

.lang-item-card {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  padding: 1.15rem 1.25rem;
  border-radius: 16px;
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-secondary);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
}

.lang-item-card:hover {
  border-color: var(--brand-primary);
  background: var(--brand-surface);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -4px rgba(2, 132, 199, 0.15);
}

.lang-item-card.active {
  border-color: var(--brand-primary);
  background: var(--brand-surface);
  box-shadow: 0 0 0 1px var(--brand-primary);
}

.lang-flag-box {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.lang-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.lang-native-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.25;
}

.lang-region-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.lang-check-bubble {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 800;
  transition: all 0.2s;
  flex-shrink: 0;
}

.lang-item-card.active .lang-check-bubble {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
}

.lang-modal-footer {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.lang-modal-hint {
  font-size: 0.825rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-confirm-action-btn {
  background: var(--brand-primary);
  color: #ffffff;
  border: none;
  padding: 0.7rem 1.6rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.925rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.lang-confirm-action-btn:hover {
  background: var(--brand-primary-hover);
  transform: translateY(-1px);
}

/* ==========================================================================
   Editorial Layout & Homepage Overhaul
   ========================================================================== */
.main-wrapper {
  flex: 1;
  width: 100%;
  max-width: var(--max-w-page);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

/* Editorial Hero */
.editorial-hero {
  text-align: center;
  max-width: 880px;
  margin: 1.5rem auto 3.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.editorial-edition-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--brand-surface);
  border: 1px solid var(--border-subtle);
  color: var(--brand-primary);
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.75px;
  text-transform: uppercase;
}

.editorial-hero-headline {
  font-size: 3.25rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1.5px;
  color: var(--text-main);
}

@media (max-width: 768px) {
  .editorial-hero-headline {
    font-size: 2.25rem;
    letter-spacing: -0.75px;
  }
}

.editorial-hero-sub {
  font-size: 1.2rem;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 740px;
}

/* Featured Master Article Card */
.featured-card-wrapper {
  margin-bottom: 4rem;
}

.featured-editorial-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  border-radius: 24px;
  padding: 2.75rem;
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.featured-editorial-card:hover {
  transform: translateY(-3px);
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-xl);
}

.featured-editorial-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-accent));
}

.featured-card-meta-top {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.9rem;
  border-radius: 9999px;
  background-color: var(--badge-bg);
  color: var(--badge-text);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.featured-reading-time {
  font-size: 0.85rem;
  color: var(--text-faint);
  font-weight: 600;
}

.featured-article-heading {
  font-size: 2.25rem;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.75px;
}

.featured-article-heading a {
  text-decoration: none;
  color: var(--text-main);
  transition: color 0.2s;
}

.featured-article-heading a:hover {
  color: var(--brand-primary);
}

.featured-article-excerpt {
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--text-muted);
  max-width: 940px;
}

.featured-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.author-chip {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.author-chip-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7, #0d9488);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 800;
  font-size: 1.05rem;
  box-shadow: var(--shadow-sm);
}

.author-chip-name {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.author-chip-title {
  font-size: 0.825rem;
  color: var(--text-faint);
}

.featured-cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--brand-primary);
  color: #ffffff;
  padding: 0.85rem 1.75rem;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.975rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

.featured-cta-button:hover {
  background: var(--brand-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(2, 132, 199, 0.45);
}

/* Three Pillars of Trust */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.75rem;
  margin-bottom: 4rem;
}

.pillar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 2rem;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  box-shadow: var(--shadow-sm);
}

.pillar-card:hover {
  transform: translateY(-3px);
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-md);
}

.pillar-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--brand-surface);
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.pillar-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.65rem;
  color: var(--text-main);
  letter-spacing: -0.3px;
}

.pillar-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* Article Reading View */
.article-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 3.5rem;
  align-items: start;
}

.article-header {
  margin-bottom: 2.5rem;
}

.article-title {
  font-size: 2.65rem;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text-main);
  margin-bottom: 1.25rem;
}

.article-lead {
  font-size: 1.25rem;
  line-height: 1.65;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.author-review-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  padding: 1.35rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  margin-bottom: 2.25rem;
  box-shadow: var(--shadow-sm);
}

.author-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7, #0d9488);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 800;
  font-size: 1.2rem;
}

.author-details {
  flex: 1;
}

.author-name {
  font-weight: 800;
  font-size: 1rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.verified-icon {
  color: var(--brand-primary);
  display: inline-flex;
}

.author-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.review-timestamp {
  font-size: 0.8rem;
  color: var(--text-faint);
  margin-top: 2px;
}

/* Quick 30s Protocol Box */
.quick-protocol-box {
  background-color: var(--brand-surface);
  border: 1.5px solid var(--border-subtle);
  border-left: 5px solid var(--brand-primary);
  border-radius: 14px;
  padding: 1.75rem 2rem;
  margin-bottom: 2.75rem;
}

.quick-protocol-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 1rem;
}

.quick-protocol-box ol {
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.quick-protocol-box li {
  color: var(--text-main);
  font-size: 1rem;
}

.quick-protocol-box strong {
  color: var(--brand-primary-hover);
}

/* Content Body Typography */
.content-body {
  font-size: 1.125rem;
  line-height: 1.85;
  color: var(--text-main);
}

.content-body p {
  margin-bottom: 1.65rem;
}

.content-body h2 {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.3;
  margin-top: 3.25rem;
  margin-bottom: 1.15rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border-subtle);
  letter-spacing: -0.5px;
  color: var(--text-main);
}

.content-body h3 {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.4;
  margin-top: 2.25rem;
  margin-bottom: 0.85rem;
  color: var(--text-main);
}

.content-body ul, .content-body ol {
  margin-bottom: 1.65rem;
  padding-left: 1.65rem;
}

.content-body li {
  margin-bottom: 0.6rem;
}

/* Diagnostic Quiz Tool */
.interactive-tool-box {
  background: var(--bg-card);
  border: 2px solid var(--brand-primary);
  border-radius: 18px;
  padding: 2rem;
  margin: 3rem 0;
  box-shadow: var(--shadow-md);
}

.tool-title {
  font-size: 1.35rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

.tool-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.quiz-option-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.4rem;
  border-radius: 12px;
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-secondary);
  color: var(--text-main);
  font-size: 0.975rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
}

.quiz-option-btn:hover {
  border-color: var(--brand-primary);
  background: var(--brand-surface);
  transform: translateX(3px);
}

.quiz-option-btn.active {
  border-color: var(--brand-primary);
  background: var(--brand-surface);
  font-weight: 800;
}

.tool-result {
  display: none;
  padding: 1.4rem;
  border-radius: 12px;
  background-color: var(--bg-secondary);
  border-left: 4px solid var(--brand-primary);
  animation: fadeIn 0.3s ease;
}

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

/* Clinical Comparison Tables */
.table-container {
  width: 100%;
  overflow-x: auto;
  margin: 2.25rem 0;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

table.clinical-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  text-align: left;
  background: var(--bg-card);
}

table.clinical-table th {
  background-color: var(--bg-secondary);
  color: var(--text-main);
  padding: 1rem 1.25rem;
  font-weight: 800;
  border-bottom: 2px solid var(--border-subtle);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

table.clinical-table td {
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-muted);
  vertical-align: top;
}

table.clinical-table tr:last-child td {
  border-bottom: none;
}

table.clinical-table td strong {
  color: var(--text-main);
}

/* Routine Timeline Cards */
.routine-schedule-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem;
  margin: 2.5rem 0;
}

@media (max-width: 768px) {
  .routine-schedule-container {
    grid-template-columns: 1fr;
  }
}

.routine-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.routine-card-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 1.15rem;
  margin-bottom: 1.25rem;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.75rem;
}

.routine-step {
  margin-bottom: 1.15rem;
}

.routine-step-num {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--brand-primary);
  text-transform: uppercase;
}

.routine-step-title {
  font-weight: 700;
  color: var(--text-main);
  font-size: 0.975rem;
}

.routine-step-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Callouts / Warnings */
.callout {
  padding: 1.4rem 1.65rem;
  border-radius: 14px;
  margin: 2rem 0;
  border-left: 5px solid;
}

.callout-warning {
  background-color: var(--alert-warn-bg);
  border-color: var(--alert-warn-border);
}

.callout-error {
  background-color: var(--alert-error-bg);
  border-color: var(--alert-error-border);
}

.callout-info {
  background-color: var(--alert-info-bg);
  border-color: var(--alert-info-border);
}

.callout h4 {
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

/* FAQ Accordion */
.faq-section {
  margin-top: 4rem;
}

.faq-item {
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  margin-bottom: 1rem;
  background-color: var(--bg-card);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.faq-item:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 1.35rem 1.65rem;
  font-size: 1.075rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-chevron {
  transition: transform 0.25s ease;
  color: var(--brand-primary);
  flex-shrink: 0;
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  padding: 0 1.65rem 1.35rem;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.75;
}

.faq-item.open .faq-answer {
  display: block;
}

/* Sidebar / Table of Contents */
.article-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 2rem);
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 1.65rem;
  box-shadow: var(--shadow-sm);
}

.toc-title {
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  color: var(--text-main);
  margin-bottom: 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.875rem;
}

.toc-list a {
  text-decoration: none;
  color: var(--text-muted);
  line-height: 1.45;
  display: block;
  padding-left: 0.85rem;
  border-left: 2px solid transparent;
  transition: all 0.2s;
}

.toc-list a:hover {
  color: var(--brand-primary);
  border-left-color: var(--brand-primary);
}

.toc-list a.active {
  color: var(--brand-primary);
  font-weight: 800;
  border-left-color: var(--brand-primary);
}

/* Footer */
footer.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: 4.5rem 1.5rem 2.5rem;
  margin-top: 6rem;
}

.footer-container {
  max-width: var(--max-w-page);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3.5rem;
}

.footer-col-brand p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 0.85rem;
  max-width: 400px;
  line-height: 1.7;
}

.footer-col-title {
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  color: var(--text-main);
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--brand-primary);
}

.footer-bottom {
  max-width: var(--max-w-page);
  margin: 3.5rem auto 0;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-faint);
}

/* Responsive */
@media (max-width: 980px) {
  .article-grid {
    grid-template-columns: 1fr;
  }
  .article-sidebar {
    display: none;
  }
  .footer-container {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }
  .nav-links {
    display: none;
  }
}
