/* ==========================================================================
   SnehVeda (स्नेहवेद) - Chapter 12: बालों के लिए उपयोगी Ayurvedic Herbs
   Luxury Dark Botanical Night Design System | Ayurvedic Herbs Explorer
   ========================================================================== */

:root {
  /* Deep Luxury Botanical Slate & Night Surfaces */
  --bg-body: #0E1512;
  --bg-surface: #15201A;
  --bg-surface-alt: #1A2821;
  --bg-surface-soft: #1E2E26;
  --bg-card-subtle: #17241E;
  --bg-highlight: #23342B;
  --bg-quote: #1D2C24;

  /* Typography Colors */
  --text-primary: #EDE8DF;
  --text-secondary: #BAC8BF;
  --text-muted: #83978D;
  --text-light: #64796F;

  /* Ayurvedic Botanical Accents */
  --accent-forest: #4A8366;
  --accent-forest-hover: #5B9B7A;
  --accent-forest-soft: rgba(74, 131, 102, 0.18);

  --accent-sage: #6E9F88;
  --accent-sage-soft: #1B2B23;
  --accent-sage-border: rgba(110, 159, 136, 0.28);

  --accent-gold: #CFA664;
  --accent-gold-hover: #E5B874;
  --accent-gold-soft: #292419;
  --accent-gold-border: rgba(207, 166, 100, 0.32);

  --accent-amber: #E5A84B;
  --accent-amber-soft: #2E2211;
  --accent-amber-border: rgba(229, 168, 75, 0.35);

  --accent-terracotta: #E27B4D;
  --accent-terracotta-soft: #2B1E17;
  --accent-terracotta-border: rgba(226, 123, 77, 0.32);

  --accent-hibiscus: #D15675;
  --accent-hibiscus-soft: #2D1B22;
  --accent-hibiscus-border: rgba(209, 86, 117, 0.35);

  /* Borders & Shadows */
  --border-subtle: rgba(237, 232, 223, 0.08);
  --border-medium: rgba(237, 232, 223, 0.15);
  --border-card: rgba(237, 232, 223, 0.1);

  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.55);

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  --font-serif: 'Rozha One', 'Playfair Display', Georgia, serif;
  --font-display: 'Playfair Display', 'Rozha One', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', 'Noto Sans Devanagari', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --header-height: 72px;
  --article-max: 880px;

  --base-font-size: 1.125rem;
  --line-height-body: 1.85;
}

body.font-sm { --base-font-size: 1rem; }
body.font-md { --base-font-size: 1.125rem; }
body.font-lg { --base-font-size: 1.25rem; }
body.font-xl { --base-font-size: 1.4rem; }

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  background-color: var(--bg-body);
  overflow-x: hidden;
}

body {
  background-color: var(--bg-body);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--base-font-size);
  line-height: var(--line-height-body);
  overflow-x: hidden;
  position: relative;
  width: 100%;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent-gold);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--accent-gold-hover);
}

button, input {
  font-family: inherit;
  font-size: inherit;
}

/* Reading Progress Bar */
#readingProgressBar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-forest), var(--accent-gold), var(--accent-amber));
  z-index: 1100;
  transition: width 0.1s ease-out;
  box-shadow: 0 0 12px rgba(207, 166, 100, 0.5);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  height: var(--header-height);
  background-color: rgba(14, 21, 18, 0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 1000;
}

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

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #1F3C2C, #2E5640);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #EDE8DF;
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.15;
}

.brand-tagline {
  font-size: 0.725rem;
  color: var(--accent-gold);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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

.font-size-btn-group {
  display: inline-flex;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 3px;
}

.font-size-btn {
  border: none;
  background: transparent;
  padding: 0.25rem 0.65rem;
  font-size: 0.825rem;
  font-weight: 700;
  color: var(--text-secondary);
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.15s ease;
}

.font-size-btn.active, .font-size-btn:hover {
  background: var(--accent-forest);
  color: #FFFFFF;
}

.toc-toggle-btn {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  padding: 0.45rem 0.95rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.toc-toggle-btn:hover {
  background: var(--bg-surface-alt);
  border-color: var(--accent-gold);
}

/* Centered Article Layout */
.main-wrapper {
  max-width: var(--article-max);
  margin: 2.5rem auto 6rem auto;
  padding: 0 1.5rem;
  width: 100%;
}

.article-container {
  width: 100%;
}

/* Hero Section */
.hero-section {
  margin-bottom: 3.5rem;
}

.hero-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.badge-chapter {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.95rem;
  background: var(--accent-forest);
  color: #FFFFFF;
  border-radius: var(--radius-full);
  font-size: 0.825rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.badge-reading-time, .badge-verified {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-full);
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.badge-verified {
  background: var(--accent-gold-soft);
  color: var(--accent-gold);
  border-color: var(--accent-gold-border);
}

.hero-title-main {
  font-family: var(--font-serif);
  font-size: clamp(2.3rem, 4.8vw, 3.6rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.hero-subtitle {
  font-family: var(--font-sans);
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-weight: 600;
  line-height: 1.6;
  color: var(--accent-gold);
  margin-bottom: 2.25rem;
  padding-left: 1.4rem;
  border-left: 4px solid var(--accent-gold);
}

/* Image Cards */
.hero-image-card {
  position: relative;
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-lg);
  margin-bottom: 2.5rem;
}

.image-zoom-container {
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
  background: var(--bg-surface-soft);
}

.image-zoom-container img {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.image-zoom-container:hover img {
  transform: scale(1.015);
}

.image-zoom-overlay {
  position: absolute;
  bottom: 1.15rem;
  right: 1.15rem;
  background: rgba(14, 21, 18, 0.85);
  backdrop-filter: blur(8px);
  color: #EDE8DF;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.775rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  opacity: 0.9;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.image-caption-bar {
  padding: 1rem 1.6rem;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.image-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.6rem;
  background: var(--bg-surface-alt);
  border-radius: var(--radius-xs);
  color: var(--text-muted);
}

/* Content Rhythm */
.content-section {
  margin-bottom: 4.5rem;
  scroll-margin-top: calc(var(--header-height) + 1.5rem);
}

.section-divider {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-medium), transparent);
  margin: 4rem 0;
}

.section-badge-pill {
  display: inline-block;
  padding: 0.3rem 0.9rem;
  background: var(--accent-gold-soft);
  color: var(--accent-gold);
  border: 1px solid var(--accent-gold-border);
  border-radius: var(--radius-full);
  font-size: 0.775rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, 3.4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.lead-paragraph {
  font-size: 1.2rem;
  line-height: 1.85;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

p {
  margin-bottom: 1.35rem;
  color: var(--text-secondary);
  font-size: var(--base-font-size);
  line-height: var(--line-height-body);
}

strong {
  color: var(--text-primary);
  font-weight: 700;
}

/* Quotes */
.philosophical-quote-box {
  background: var(--bg-surface);
  border: 1px solid var(--accent-gold-border);
  border-left: 5px solid var(--accent-gold);
  border-radius: var(--radius-md);
  padding: 2rem 2.25rem;
  margin: 2.5rem 0;
  position: relative;
  box-shadow: var(--shadow-md);
}

.quote-icon-decor {
  position: absolute;
  top: 1rem;
  right: 1.75rem;
  font-size: 4rem;
  line-height: 1;
  color: var(--accent-gold);
  opacity: 0.18;
  font-family: var(--font-serif);
  pointer-events: none;
}

.philosophical-quote-box .quote-content {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2.4vw, 1.55rem);
  font-weight: 600;
  line-height: 1.6;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
}

.quote-action-row {
  margin-top: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-copy-quote {
  background: var(--bg-surface-soft);
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.btn-copy-quote:hover {
  background: var(--accent-forest);
  color: #FFFFFF;
}

/* Herb Filter Bar */
.herb-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding: 0.75rem;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-medium);
}

.herb-filter-btn {
  padding: 0.4rem 0.9rem;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.herb-filter-btn:hover {
  background: var(--bg-surface-soft);
  color: var(--text-primary);
}

.herb-filter-btn.active {
  background: var(--accent-forest);
  color: #FFFFFF;
  border-color: var(--accent-forest);
}

/* Herb Cards */
.herb-detail-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
  border-left: 5px solid var(--accent-forest);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.herb-detail-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-gold-border);
}

.herb-detail-card.accent-gold {
  border-left-color: var(--accent-gold);
}

.herb-detail-card.accent-amber {
  border-left-color: var(--accent-amber);
}

.herb-detail-card.accent-hibiscus {
  border-left-color: var(--accent-hibiscus);
}

.herb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
}

.herb-title-group {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.herb-number-badge {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--accent-gold);
  background: var(--accent-gold-soft);
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent-gold-border);
}

.herb-name {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
}

.herb-role-badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: var(--bg-surface-soft);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
}

.herb-body p {
  margin-bottom: 1.15rem;
}

.herb-body ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 1.25rem 0;
}

.herb-form-chip {
  padding: 0.4rem 0.85rem;
  background: var(--bg-surface-soft);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-primary);
}

.simple-takeaway-box {
  background: var(--bg-surface-soft);
  border-left: 4px solid var(--accent-gold);
  padding: 1.15rem 1.4rem;
  border-radius: var(--radius-sm);
  margin-top: 1.25rem;
}

.simple-takeaway-box p {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Comparison Table */
.herb-table-wrapper {
  overflow-x: auto;
  margin: 2rem 0;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
}

.herb-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.herb-table th {
  background: var(--bg-surface-soft);
  color: var(--accent-gold);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  padding: 1rem 1.25rem;
  border-bottom: 2px solid var(--border-medium);
}

.herb-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 1rem;
}

.herb-table tr:hover td {
  background: var(--bg-surface-alt);
  color: var(--text-primary);
}

/* Bhringraj Focus Card */
.bhringraj-spotlight-card {
  background: linear-gradient(135deg, #17291F, #122118);
  border: 2px solid var(--accent-gold-border);
  border-radius: var(--radius-xl);
  padding: 3rem 2.25rem;
  margin: 3.5rem 0;
  box-shadow: var(--shadow-md);
  text-align: center;
}

.bhringraj-spotlight-card .spotlight-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 1.5rem;
}

/* Climax Formula Card */
.climax-lesson-card {
  background: var(--bg-surface);
  border: 2px solid var(--accent-gold);
  border-radius: var(--radius-xl);
  padding: 3.5rem 2.5rem;
  margin: 4rem 0;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.climax-badge {
  display: inline-block;
  padding: 0.4rem 1.2rem;
  background: var(--accent-forest);
  color: #FFFFFF;
  border-radius: var(--radius-full);
  font-size: 0.825rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.5rem;
}

.climax-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
  text-align: left;
}

.climax-herb-item {
  background: var(--bg-surface-soft);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
}

.climax-herb-item .herb-item-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 0.25rem;
}

.climax-herb-item .herb-item-desc {
  font-size: 0.925rem;
  color: var(--text-secondary);
}

/* Next Chapter Teaser Card */
.next-chapter-teaser-card {
  background: linear-gradient(135deg, #182B21, #13241C);
  border: 1px solid var(--accent-gold-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  margin: 4rem 0 2rem 0;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.teaser-badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  background: var(--accent-gold-soft);
  color: var(--accent-gold);
  border: 1px solid var(--accent-gold-border);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.25rem;
}

.teaser-title {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 1rem;
}

/* Floating Actions */
.floating-actions {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 999;
}

.floating-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all 0.25s ease;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
}

.floating-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.floating-btn:hover {
  background: var(--accent-gold);
  color: #0E1512;
}

/* Image Lightbox */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(14, 21, 18, 0.95);
  backdrop-filter: blur(12px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox-modal.active {
  display: flex;
  opacity: 1;
}

.lightbox-content {
  position: relative;
  max-width: 92vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.lightbox-caption {
  margin-top: 1.15rem;
  color: #EDE8DF;
  font-size: 1rem;
  text-align: center;
}

.lightbox-close-btn {
  position: absolute;
  top: -48px;
  right: 0;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #FFFFFF;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  cursor: pointer;
}

.lightbox-close-btn:hover {
  background: var(--accent-terracotta);
}

/* Slide-in Drawer TOC */
.mobile-toc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1500;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.mobile-toc-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-toc-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 360px;
  max-width: 88vw;
  height: 100%;
  background: var(--bg-surface);
  z-index: 1501;
  padding: 2.25rem 1.75rem;
  box-shadow: -6px 0 30px rgba(0, 0, 0, 0.4);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.mobile-toc-drawer.active {
  transform: translateX(0);
}

.mobile-toc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
}

.mobile-toc-header .toc-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.drawer-close-btn {
  background: transparent;
  border: none;
  font-size: 1.6rem;
  color: var(--text-primary);
  cursor: pointer;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 80vh;
  overflow-y: auto;
}

.toc-item a {
  display: block;
  padding: 0.6rem 0.85rem;
  font-size: 0.925rem;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  line-height: 1.45;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.toc-item a:hover {
  background: var(--bg-surface-soft);
  color: var(--accent-gold);
  padding-left: 1rem;
}

.toc-item.active a {
  background: var(--accent-gold-soft);
  color: var(--accent-gold);
  font-weight: 700;
  border-left: 3px solid var(--accent-gold);
  padding-left: 1rem;
}

/* Toast */
.toast-notification {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #1C2C23;
  color: #EDE8DF;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid var(--accent-sage-border);
  box-shadow: var(--shadow-lg);
  z-index: 3000;
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  pointer-events: none;
}

.toast-notification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Footer */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 4rem 1.5rem 3rem 1.5rem;
  margin-top: 6rem;
  width: 100%;
}

.footer-container {
  max-width: var(--article-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
  text-align: center;
}

.footer-brand-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-primary);
}

.footer-brand-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 580px;
  line-height: 1.7;
}

.footer-copyright {
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.75rem;
  width: 100%;
}

/* Responsive */
@media (max-width: 768px) {
  .main-wrapper {
    margin: 1.5rem auto 3.5rem auto;
    padding: 0 1.15rem;
  }

  .herb-detail-card, .bhringraj-spotlight-card, .climax-lesson-card {
    padding: 1.5rem 1.25rem;
  }
}


.brand-icon-img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  background-color: #FAF7F0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
  display: block;
}


/* ==========================================================================
   Brand Header: Live Color Transition, Floral Glow Aura & Flying Petals
   ========================================================================== */
.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  position: relative;
  text-decoration: none;
  cursor: pointer;
}

.brand-logo-container {
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-icon-img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  background-color: #FAF7F0;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6), 0 0 14px rgba(110, 189, 142, 0.35);
  flex-shrink: 0;
  display: block;
  position: relative;
  z-index: 2;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.brand-wrapper:hover .brand-icon-img {
  transform: scale(1.08) rotate(-2deg);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7), 0 0 20px rgba(110, 189, 142, 0.55);
}

.flower-glow-ring {
  position: absolute;
  inset: -4px;
  border-radius: 15px;
  background: linear-gradient(135deg, #4A9E72, #FCD47E, #FFA578, #80ED99, #4A9E72);
  background-size: 300% 300%;
  animation: liveFlowerRingFlow 5s linear infinite;
  z-index: 1;
  opacity: 0.75;
  filter: blur(4px);
  transition: opacity 0.3s ease, filter 0.3s ease, inset 0.3s ease;
}

.brand-wrapper:hover .flower-glow-ring {
  opacity: 1;
  filter: blur(6px);
  inset: -6px;
}

@keyframes liveFlowerRingFlow {
  0% {
    background-position: 0% 50%;
    transform: rotate(0deg);
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
    transform: rotate(360deg);
  }
}

.brand-text {
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, #FFFFFF 0%, #A8E6CF 28%, #FCD47E 55%, #FFA578 80%, #FFFFFF 100%);
  background-size: 250% 250%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  animation: brandLiveColorShimmer 5s ease-in-out infinite alternate;
  filter: drop-shadow(0 2px 8px rgba(110, 189, 142, 0.3));
}

@keyframes brandLiveColorShimmer {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.brand-tagline {
  font-size: 0.725rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  background: linear-gradient(90deg, #FFA578, #FCD47E, #8BE4B2, #FFA578);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  animation: brandTaglineFlow 6s linear infinite;
}

@keyframes brandTaglineFlow {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

.flying-petals-container {
  position: absolute;
  top: 50%;
  left: 22px;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 99;
}

.flying-petal {
  position: absolute;
  width: 20px;
  height: 20px;
  pointer-events: none;
  user-select: none;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: flyAndFade 2.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
}

@keyframes flyAndFade {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.3) rotate(0deg);
  }
  18% {
    opacity: 1;
    transform: translate(calc(var(--fly-x) * 0.3), calc(var(--fly-y) * 0.3)) scale(1.15) rotate(45deg);
  }
  60% {
    opacity: 0.85;
    transform: translate(calc(var(--fly-x) * 0.75), calc(var(--fly-y) * 0.75)) scale(0.95) rotate(calc(var(--fly-rot) * 0.7));
  }
  100% {
    opacity: 0;
    transform: translate(var(--fly-x), var(--fly-y)) scale(0.4) rotate(var(--fly-rot));
  }
}


/* ==========================================================================
   Chapter Pure Black & Live Border Section Themes (5 Harmonic Pillars)
   ========================================================================== */

:root {
  --bg-body: #000000 !important;
  --bg-surface: #000000 !important;
  --bg-surface-alt: #050505 !important;
  --bg-surface-soft: #080808 !important;
  --bg-card-subtle: #000000 !important;
  --bg-highlight: #0A0A0A !important;
  --bg-quote: #000000 !important;
}

html, body {
  background-color: #000000 !important;
}

.site-header {
  background-color: rgba(0, 0, 0, 0.94) !important;
}

.main-wrapper, .article-container, .site-footer, .toc-drawer-content {
  background-color: #000000 !important;
}

/* Hero Section Live Running Border & Pure Black Interior */
.hero-section {
  position: relative !important;
  border-radius: var(--radius-lg) !important;
  padding: 2.25rem 2rem !important;
  margin-bottom: 2.75rem !important;
  background: #000000 !important;
  border: 2px solid transparent !important;
  background-clip: padding-box !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.8) !important;
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--radius-lg) + 2px);
  background: linear-gradient(125deg, #1E4D33 0%, #4E9168 30%, #D8A44E 70%, #1E4D33 100%);
  background-size: 250% 250%;
  animation: liveSectionBorderFlow 7s ease-in-out infinite alternate;
  z-index: -1;
  box-shadow: 0 8px 32px rgba(78, 145, 104, 0.35);
}

/* Headline Live Color Animation */
.hero-title-main {
  font-family: var(--font-serif) !important;
  font-size: clamp(2.1rem, 4.5vw, 3.2rem) !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  margin-bottom: 1.25rem !important;
  background: linear-gradient(135deg, #FBF8F2 0%, #D8A44E 28%, #4F9168 62%, #FBF8F2 100%) !important;
  background-size: 260% 260% !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  color: transparent !important;
  animation: chapterTitleLiveShimmer 6s ease-in-out infinite alternate !important;
  text-shadow: 0 0 30px rgba(79, 145, 104, 0.2) !important;
}

@keyframes chapterTitleLiveShimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* All Content Sections: Live Running Borders & Pure Black */
.content-section {
  position: relative !important;
  border-radius: var(--radius-lg) !important;
  padding: 2.25rem 2rem !important;
  margin-bottom: 2.75rem !important;
  background: #000000 !important;
  border: 2px solid transparent !important;
  background-clip: padding-box !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.8) !important;
}

.content-section::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--radius-lg) + 2px);
  background: linear-gradient(125deg, var(--sec-glow-1, #1E4D33) 0%, var(--sec-glow-2, #4E9168) 35%, var(--sec-glow-3, #8DCFA7) 65%, var(--sec-glow-1, #1E4D33) 100%);
  background-size: 250% 250%;
  animation: liveSectionBorderFlow 8s ease-in-out infinite alternate;
  z-index: -1;
  box-shadow: 0 6px 28px var(--sec-shadow, rgba(0, 0, 0, 0.8));
}

@keyframes liveSectionBorderFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Section Title Live Color Animation */
.section-title {
  font-family: var(--font-serif) !important;
  font-size: clamp(1.5rem, 3vw, 2.1rem) !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  margin-bottom: 1.25rem !important;
  background: linear-gradient(135deg, #FBF8F2 0%, var(--sec-accent, #8DCFA7) 60%, #FBF8F2 100%) !important;
  background-size: 200% 200% !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  color: transparent !important;
  animation: sectionTitleShimmer 7s ease-in-out infinite alternate !important;
}

@keyframes sectionTitleShimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

/* 5 Distinct Harmonic Section Border Themes */
.content-section:nth-of-type(5n + 1) {
  --sec-glow-1: #1E4D33;
  --sec-glow-2: #4E9168;
  --sec-glow-3: #8DCFA7;
  --sec-accent: #65B383;
  --sec-shadow: rgba(56, 118, 82, 0.4);
}

.content-section:nth-of-type(5n + 2) {
  --sec-glow-1: #853716;
  --sec-glow-2: #C85E32;
  --sec-glow-3: #F5976D;
  --sec-accent: #DF7142;
  --sec-shadow: rgba(200, 94, 50, 0.4);
}

.content-section:nth-of-type(5n + 3) {
  --sec-glow-1: #785014;
  --sec-glow-2: #BD872E;
  --sec-glow-3: #F0C975;
  --sec-accent: #D69E3D;
  --sec-shadow: rgba(189, 135, 46, 0.4);
}

.content-section:nth-of-type(5n + 4) {
  --sec-glow-1: #153D47;
  --sec-glow-2: #2E6C7D;
  --sec-glow-3: #72B2C2;
  --sec-accent: #4B9EB0;
  --sec-shadow: rgba(46, 108, 125, 0.4);
}

.content-section:nth-of-type(5n + 5) {
  --sec-glow-1: #692237;
  --sec-glow-2: #A64761;
  --sec-glow-3: #E28FA4;
  --sec-accent: #C95F7B;
  --sec-shadow: rgba(166, 71, 97, 0.4);
}

/* Callout, Quote Boxes & Cards on Pure Black */
.philosophical-quote-box, .hook-card, .takeaway-card, .comparison-table-wrapper, .insight-grid-card, .factor-card, .myth-card, .quiz-card {
  background: #000000 !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
}

/* 50% Milestone Celebration & Floating Petals */
.milestone-petals-celebration {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99999;
  overflow: hidden;
}

.milestone-flying-petal {
  position: absolute;
  font-size: 24px;
  user-select: none;
  pointer-events: none;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.7));
  animation: milestoneFlyUpward 3.5s cubic-bezier(0.2, 0.8, 0.4, 1) forwards;
}

@keyframes milestoneFlyUpward {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.4) rotate(0deg);
  }
  15% {
    opacity: 1;
    transform: translate(calc(var(--m-end-x) * 0.25), calc(var(--m-end-y) * 0.25)) scale(var(--m-scale)) rotate(45deg);
  }
  70% {
    opacity: 0.9;
    transform: translate(calc(var(--m-end-x) * 0.75), calc(var(--m-end-y) * 0.75)) scale(var(--m-scale)) rotate(calc(var(--m-rot) * 0.75));
  }
  100% {
    opacity: 0;
    transform: translate(var(--m-end-x), var(--m-end-y)) scale(0.3) rotate(var(--m-rot));
  }
}

.milestone-toast-card {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #000000;
  border: 2px solid #4E9168;
  border-radius: var(--radius-full);
  padding: 0.9rem 1.8rem;
  color: #FBF8F2;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.9), 0 0 25px rgba(78, 145, 104, 0.5);
  z-index: 99998;
  pointer-events: none;
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-align: center;
  max-width: 90vw;
}

.milestone-toast-card.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
