/* ==========================================================================
   Healing Beyond Medicine — companion website
   Ayurveda-inspired theme: turmeric gold, tulsi green, terracotta clay,
   sandalwood cream. Warm, earthy, deliberately unclinical.
   ========================================================================== */

:root {
  --font-heading: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --font-body: 'Karla', 'Segoe UI', system-ui, -apple-system, sans-serif;

  /* Sandalwood — backgrounds */
  --bg: #FBF3E7;
  --bg-alt: #F3E7D3;
  --surface: #FFFDF8;
  --surface-soft: #FBF4E9;
  --border: #E9D7B6;
  --border-soft: #F0E3C8;

  --text: #3B2E22;
  --text-soft: #6E5C48;
  --text-faint: #9C8A72;

  /* Turmeric — primary brand color */
  --turmeric: #C6862A;
  --turmeric-dark: #9C6512;
  --turmeric-light: #F3DFAE;
  --turmeric-pale: #FBF0DA;

  /* Terracotta — secondary accent */
  --clay: #BC6C3A;
  --clay-dark: #954F26;
  --clay-light: #F0DAC3;

  /* Vata / ether — balance callouts */
  --lavender: #7C6A93;
  --lavender-light: #E7E1EF;

  /* Tulsi & jal (water) — tips, "should follow" */
  --tulsi: #4F7A63;
  --tulsi-light: #DEEAE1;

  /* Turmeric-dark — caution */
  --amber: #A8701E;
  --amber-light: #F3E2BC;

  /* Kumkum / saffron-red — must-follow, emergency */
  --rose: #A1432F;
  --rose-light: #F1DACE;

  --shadow-sm: 0 1px 3px rgba(59, 42, 22, 0.08);
  --shadow-md: 0 6px 20px rgba(59, 42, 22, 0.10);
  --shadow-lg: 0 14px 40px rgba(59, 42, 22, 0.14);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* Respect the OS-level motion preference: neutralize every animation/transition
   on this site (the .view fade, part-card entrance, watermark drift, hover lifts)
   for anyone who has asked their system to reduce motion. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--turmeric-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-body);
  color: var(--text);
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 0.6em;
}

/* Serif display type reserved for the handful of big, warm "brand" moments —
   everything else (chapter titles, card headings, section labels) uses the
   cleaner sans-serif so the site reads as a website, not a printed page. */
h1,
.part-hero h2,
.section-intro h2,
.movement-banner h2,
.home-hero h1 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

button { font-family: inherit; cursor: pointer; }

/* Decorative soft background blobs (pure CSS, no imagery) */
.bg-decor {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.bg-decor span {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
}
.bg-decor .b1 { width: 420px; height: 420px; background: var(--turmeric-light); top: -120px; left: -100px; }
.bg-decor .b2 { width: 380px; height: 380px; background: var(--clay-light); top: 20%; right: -140px; }
.bg-decor .b3 { width: 340px; height: 340px; background: var(--lavender-light); bottom: -100px; left: 30%; }

/* ==========================================================================
   Top bar — two rows: brand + Donate/Community (top-right) on row one,
   the main section tabs on row two below.
   ========================================================================== */

.site-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem 0.7rem;
  background: rgba(251, 243, 231, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-soft);
}

.topbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}

.topbar-cta { display: flex; gap: 0.5rem; flex-shrink: 0; }

.cta-mini {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  border: 1px dashed var(--border);
  background: transparent;
  color: var(--text-faint);
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: default;
  white-space: nowrap;
}

.leaf-mark {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  color: var(--turmeric);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name {
  font-family: var(--font-heading);
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--text);
}
.brand-tagline {
  font-size: 0.72rem;
  color: var(--text-faint);
  max-width: 260px;
}

/* ==========================================================================
   Top-level tab navigation
   ========================================================================== */

.main-tabs {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  scrollbar-width: thin;
}

.main-tabs::-webkit-scrollbar { height: 6px; }
.main-tabs::-webkit-scrollbar-thumb { background: var(--border); border-radius: 6px; }

.tab-btn {
  flex: 0 0 auto;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-soft);
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.tab-btn:hover:not(.is-disabled) { background: var(--turmeric-pale); color: var(--turmeric-dark); }

.tab-btn.is-active {
  background: var(--turmeric);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.tab-btn.is-disabled {
  color: var(--text-faint);
  cursor: default;
  border-style: dashed;
  border-color: var(--border);
}

.tab-btn .badge-soon, .cta-mini .badge-soon {
  display: inline-block;
  margin-left: 0.4em;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--clay-dark);
  background: var(--clay-light);
  border-radius: 999px;
  padding: 0.12em 0.55em;
  vertical-align: middle;
}

/* ==========================================================================
   Layout shell
   ========================================================================== */

main { max-width: 1180px; margin: 0 auto; padding: 0 1.25rem 4rem; }

.lang-note {
  margin: 1rem 0 0;
  padding: 0.6rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--turmeric-dark);
  border-radius: 8px;
  font-size: 0.92rem;
  color: var(--text);
}
.lang-note p { margin: 0.25rem 0; }
.lang-note a { text-decoration: underline; }

.view { display: none; animation: fadeIn 0.25s ease; }
.view.is-active { display: block; }

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

/* ==========================================================================
   Cards & generic content components
   ========================================================================== */

.card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.card > *:last-child { margin-bottom: 0; }

.memory-photo-wrap {
  width: 152px;
  height: 152px;
  margin: 0.2rem auto 1.3rem;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--turmeric-light);
  box-shadow: var(--shadow-md);
  background: var(--turmeric-pale);
  position: relative;
}
.memory-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.memory-photo-fallback {
  display: none;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
}
.memory-photo-wrap.is-placeholder .memory-photo-fallback { display: flex; }

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--turmeric-dark);
  margin-bottom: 0.8rem;
}

.emergency-card {
  background: linear-gradient(155deg, #FBEDE7, #F6E2DA);
  border: 1px solid #E7BFAE;
  border-radius: var(--radius-lg);
  padding: 1.8rem 2rem;
  margin: 1.6rem 0;
  box-shadow: var(--shadow-md);
}
.emergency-card h3 { color: var(--rose); margin-bottom: 0.5rem; }
.emergency-card ul { margin: 0.7rem 0 0.4rem; }
.emergency-card li { margin-bottom: 0.35rem; }
.emergency-note { font-weight: 700; color: var(--rose); }

.quote-block {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.18rem;
  color: var(--turmeric-dark);
  border-left: 3px solid var(--turmeric);
  padding-left: 1.2rem;
  margin: 1.5rem 0;
}

.dashed-note {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 1.3rem 1.5rem;
  color: var(--text-faint);
  font-style: italic;
  background: var(--surface-soft);
}

/* ==========================================================================
   Home hero + trust strip
   ========================================================================== */

.home-hero {
  position: relative;
  text-align: center;
  padding: 2.4rem 2rem 3rem;
  margin-bottom: 1.8rem;
  border-radius: var(--radius-lg);
  background: radial-gradient(ellipse at top, var(--turmeric-pale) 0%, transparent 60%), var(--surface);
  border: 1px solid var(--border-soft);
  overflow: hidden;
}
.home-hero .mandala-decor {
  position: absolute;
  top: -60px;
  right: -60px;
  width: 260px;
  height: 260px;
  opacity: 0.08;
  color: var(--clay);
  transform: rotate(8deg);
}
.home-hero h1 {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  max-width: 620px;
  margin: 0 auto 0.7rem;
  position: relative;
}
.home-hero p.lead {
  max-width: 560px;
  margin: 0 auto 1.6rem;
  color: var(--text-soft);
  font-size: 1.02rem;
  position: relative;
}
.cta-row {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  margin-bottom: 1.6rem;
}
.trust-strip {
  display: flex;
  gap: 1.6rem;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--text-faint);
  position: relative;
}
.trust-strip span { display: inline-flex; align-items: center; gap: 0.4em; }

.movement-banner {
  background: linear-gradient(155deg, var(--tulsi-light), var(--turmeric-pale));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 2rem 2.2rem;
  margin: 2.2rem 0;
  text-align: center;
}
.movement-banner h2 { margin-bottom: 0.6rem; }
.movement-banner p { max-width: 620px; margin: 0 auto 1.3rem; color: var(--text-soft); }
.movement-banner .cta-row { margin-bottom: 0; }

/* ==========================================================================
   Explore grid (website-style section cards, not a book TOC)
   ========================================================================== */

.section-intro {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 1.6rem;
}
.section-intro h2 { margin-bottom: 0.4rem; }
.section-intro p { color: var(--text-soft); }

.part-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.9rem;
  margin: 1.5rem 0 2rem;
}
/* All five explore cards (four sections + Supporting Tools) fit on one
   row from tablet width up, instead of one card wrapping onto its own line. */
@media (min-width: 860px) {
  .part-grid { grid-template-columns: repeat(5, 1fr); }
}

@keyframes part-card-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.part-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-top: 3px solid var(--turmeric);
  border-radius: var(--radius-lg);
  padding: 1.3rem 1.2rem 1.15rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s;
  display: flex;
  flex-direction: column;
  animation: part-card-in 0.4s ease-out backwards;
}
.part-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.part-card.is-resource { border-top-color: var(--clay); }
.part-grid .part-card:nth-child(1) { animation-delay: 0ms; }
.part-grid .part-card:nth-child(2) { animation-delay: 60ms; }
.part-grid .part-card:nth-child(3) { animation-delay: 120ms; }
.part-grid .part-card:nth-child(4) { animation-delay: 180ms; }
.part-grid .part-card:nth-child(5) { animation-delay: 240ms; }
.part-grid .part-card:nth-child(n+6) { animation-delay: 280ms; }

.part-card .part-icon { font-size: 1.5rem; margin-bottom: 0.5rem; }
.part-card h3 { font-size: 1.05rem; margin-bottom: 0.3rem; }
.part-card .part-sub { color: var(--text-soft); font-size: 0.82rem; margin-bottom: 0; flex-grow: 1; }
.part-card .chapter-count { font-size: 0.72rem; color: var(--text-faint); margin: 0.6rem 0 0.75rem; }
.part-card .enter-btn { align-self: flex-start; padding: 0.4rem 0.85rem; font-size: 0.76rem; }

/* ==========================================================================
   Collapsible "read more" sections (details/summary, no JS needed)
   ========================================================================== */

.reveal {
  border-top: 1px solid var(--border-soft);
  margin-top: 1.2rem;
  padding-top: 1rem;
}
.reveal summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--turmeric-dark);
  font-size: 0.88rem;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.4em;
}
.reveal summary::-webkit-details-marker { display: none; }
.reveal summary::before { content: '＋'; font-size: 0.95em; transition: transform 0.15s; }
.reveal[open] summary::before { content: '－'; }
.reveal .reveal-body { padding-top: 1rem; }
.reveal .reveal-body > .card { box-shadow: none; border-style: dashed; }

.appendix-list {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.6rem;
}
.appendix-list a {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 0.8rem 1rem;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
}
.appendix-list a:hover { border-color: var(--turmeric); text-decoration: none; }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  border-radius: 999px;
  padding: 0.65rem 1.3rem;
  font-weight: 700;
  font-size: 0.9rem;
  border: 1px solid transparent;
  transition: transform 0.12s, box-shadow 0.12s, background 0.15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--turmeric); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--turmeric-dark); }
.btn-outline { background: transparent; border-color: var(--turmeric); color: var(--turmeric-dark); }
.btn-outline:hover { background: var(--turmeric-pale); }
.btn-clay { background: var(--clay); color: #fff; }
.btn-clay:hover { background: var(--clay-dark); }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.8rem; }

/* ==========================================================================
   Part view: sidebar + chapter content
   ========================================================================== */

.part-hero {
  position: relative;
  overflow: hidden;
  padding: 2rem 0 1.4rem;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 1.6rem;
}
.part-hero h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 0.3rem 0 0.3rem; }
.part-hero .part-sub { color: var(--text-soft); }

/* Per-section watermark: a large, faint version of the same icon already used
   on that section's home-page .part-card, so no new iconography is introduced. */
.part-hero::before {
  content: "";
  position: absolute;
  right: -0.3rem;
  top: -1.1rem;
  font-size: 5.5rem;
  line-height: 1;
  opacity: 0.1;
  pointer-events: none;
  z-index: 0;
}
#view-about .part-hero::before { content: "\1F338"; }
#view-part-1 .part-hero::before { content: "\1F9ED"; }
#view-part-2 .part-hero::before { content: "\1F3E1"; }
#view-part-3 .part-hero::before { content: "\1F33F"; }
#view-part-4 .part-hero::before { content: "\1F9F3"; }
#view-resources .part-hero::before { content: "\1F4AB"; }
.part-hero h2, .part-hero .part-sub { position: relative; z-index: 1; }

@media (max-width: 540px) {
  .part-hero::before { font-size: 3.6rem; }
}

.part-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1.8rem;
  align-items: start;
}

.chapter-sidebar {
  position: sticky;
  top: 70px;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 0.9rem;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

.sidebar-filter {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  font-size: 0.85rem;
  margin-bottom: 0.7rem;
  background: var(--surface-soft);
  color: var(--text);
}
.sidebar-filter:focus { outline: 2px solid var(--turmeric-light); border-color: var(--turmeric); }

.chapter-list { list-style: none; margin: 0; padding: 0; }
.chapter-list li { margin-bottom: 0.15rem; }

.chapter-link {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.7rem;
  font-size: 0.87rem;
  color: var(--text-soft);
  line-height: 1.35;
}
.chapter-link:hover { background: var(--turmeric-pale); color: var(--turmeric-dark); }
.chapter-link.is-active {
  background: var(--turmeric-light);
  color: var(--turmeric-dark);
  font-weight: 700;
}
.chapter-link.is-appendix { color: var(--clay-dark); }

.chapter-divider {
  margin: 0.7rem 0.6rem 0.4rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.chapter-content { min-width: 0; }
.chapter-panel { display: none; }
.chapter-panel.is-active { display: block; animation: fadeIn 0.2s ease; }

.chapter-header {
  margin-bottom: 1.3rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-soft);
}
.chapter-header h2 { font-size: clamp(1.5rem, 3.6vw, 2rem); }

.chapter-body h3 {
  font-size: 1.18rem;
  color: var(--turmeric-dark);
  margin-top: 1.9rem;
}
.chapter-body h3:first-child { margin-top: 0; }

.chapter-body ul, .chapter-body ol { padding-left: 1.35rem; }
.chapter-body li { margin-bottom: 0.5rem; }

.chapter-nav-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--border-soft);
}
.chapter-nav-footer .nav-stub { flex: 1; }
.chapter-nav-footer .nav-stub.next { text-align: right; }
.chapter-nav-footer a {
  display: block;
  font-size: 0.82rem;
  color: var(--text-faint);
}
.chapter-nav-footer a strong { display: block; color: var(--text); font-size: 0.95rem; font-weight: 700; }

/* ==========================================================================
   Tables
   ========================================================================== */

.table-wrap { overflow-x: auto; margin: 1.2rem 0; border-radius: var(--radius-md); border: 1px solid var(--border-soft); }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; background: var(--surface); }
table th, table td { text-align: left; padding: 0.65rem 0.9rem; border-bottom: 1px solid var(--border-soft); vertical-align: top; }
table th { background: var(--turmeric-pale); color: var(--turmeric-dark); font-weight: 700; }
table tr:last-child td { border-bottom: none; }
table tr:hover td { background: var(--surface-soft); }

.level-badge { display: inline-block; padding: 0.1em 0.55em; border-radius: 999px; font-weight: 700; font-size: 0.85em; }
.level-green { background: var(--turmeric-light); color: var(--turmeric-dark); }
.level-yellow { background: var(--amber-light); color: var(--amber); }
.level-red { background: var(--rose-light); color: var(--rose); }

/* Evidence-rating stars (⭐ How This Guide Rates Evidence) */
.stars {
  color: var(--turmeric);
  letter-spacing: 0.1em;
  text-shadow: 0 1px 0 var(--turmeric-light);
  white-space: nowrap;
}

/* ==========================================================================
   Callout boxes (from single-cell highlight tables in the source book)
   ========================================================================== */

.callout {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  border-radius: var(--radius-md);
  padding: 1rem 1.2rem;
  margin: 1.1rem 0;
  font-size: 0.94rem;
  border: 1px solid transparent;
}
.callout .callout-icon { font-size: 1.2rem; line-height: 1.5; }
.callout p { margin: 0; }

.callout-should { background: var(--turmeric-pale); border-color: var(--turmeric-light); color: var(--turmeric-dark); }
.callout-must { background: var(--rose-light); border-color: #E7C1B5; color: var(--rose); }
.callout-dont { background: var(--rose-light); border-color: #E7C1B5; color: var(--rose); }
.callout-caution { background: var(--amber-light); border-color: #EAD3A0; color: #8A611E; }
.callout-tip { background: var(--tulsi-light); border-color: #C9E0DB; color: #3E6B62; }
.callout-balance { background: var(--lavender-light); border-color: #D6CCE6; color: #5C4E79; }

.callout-should.callout-tag, .callout-must.callout-tag {
  display: inline-flex;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.4rem 0.9rem;
  margin: 1rem 0 0.2rem;
}

/* ==========================================================================
   Checklists (from ☐ items in the book)
   ========================================================================== */

.checklist { list-style: none; margin: 1rem 0 1.4rem; padding: 0; display: grid; gap: 0.5rem; }
.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  background: var(--surface-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.9rem;
}
.checklist-item input[type="checkbox"] {
  margin-top: 0.2rem;
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--turmeric);
  flex-shrink: 0;
}
.checklist-item label { cursor: pointer; font-size: 0.93rem; }
.checklist-item.is-checked { opacity: 0.55; }
.checklist-item.is-checked label { text-decoration: line-through; }

/* ==========================================================================
   Resources / Affirmations & Downloads view
   ========================================================================== */

.resource-toolbar { display: flex; gap: 0.7rem; flex-wrap: wrap; margin: 1rem 0 1.8rem; }

/* Four categories side by side as parallel columns, each one a single
   card listing all five of its affirmations together (not five separate
   cards), with one "listen" button per column that reads all five. */
.affirmation-segments {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin-bottom: 0;
}
@media (min-width: 760px) {
  .affirmation-segments { grid-template-columns: repeat(4, 1fr); }
}

.affirmation-segment {
  background: linear-gradient(160deg, var(--surface), var(--turmeric-pale));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 1.3rem 1.4rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}
.affirmation-segment h4 { color: var(--turmeric-dark); margin-bottom: 0.7rem; }

.affirmation-list {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
  flex-grow: 1;
}
.affirmation-list li {
  font-family: var(--font-heading);
  font-size: 0.92rem;
  color: var(--turmeric-dark);
  margin-bottom: 0.6rem;
  line-height: 1.4;
}
.affirmation-list li:last-child { margin-bottom: 0; }

.play-category-btn { align-self: flex-start; }
.play-category-btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* Four meditation categories side by side as parallel columns (same grid
   as the affirmations above), each card listing its two audio tracks
   with an individual play/pause button per track. */
.meditation-segments {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin-bottom: 0;
}
@media (min-width: 760px) {
  .meditation-segments { grid-template-columns: repeat(4, 1fr); }
}

.meditation-segment {
  background: linear-gradient(160deg, var(--surface), var(--tulsi-light));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 1.3rem 1.4rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}
.meditation-segment h4 { color: var(--tulsi); margin-bottom: 0.9rem; }

.meditation-list { margin: 0; padding: 0; list-style: none; flex-grow: 1; }
.meditation-track {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.6rem 0;
  border-bottom: 1px dashed var(--border-soft);
}
.meditation-track:last-child { border-bottom: none; padding-bottom: 0; }
.meditation-track .track-name {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.3;
}
.play-audio-btn { flex-shrink: 0; }
.play-audio-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.download-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow-sm);
}
.download-card h4 { margin-bottom: 0.4rem; }
.download-card p { color: var(--text-soft); font-size: 0.88rem; margin-bottom: 1rem; }

/* ==========================================================================
   Interactive Symptom Diary & My Notes tool (Resources tab)
   ========================================================================== */

.diary-table-wrap { overflow-x: auto; margin: 1rem 0; }
.diary-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.diary-table th, .diary-table td { border: 1px solid var(--border-soft); padding: 0.5rem 0.6rem; text-align: left; }
.diary-table th { background: var(--turmeric-pale); color: var(--turmeric-dark); font-weight: 700; }
.diary-table input {
  width: 100%;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.86rem;
  color: var(--text);
  padding: 0.2rem;
}
.diary-table input:focus { outline: 1px solid var(--turmeric-light); border-radius: 4px; }
.diary-table td.diary-remove { text-align: center; width: 2.2rem; }
.diary-table td.diary-remove button {
  border: none; background: none; color: var(--rose); font-size: 1rem; opacity: 0.6;
}
.diary-table td.diary-remove button:hover { opacity: 1; }
.diary-empty-hint { color: var(--text-faint); font-size: 0.85rem; font-style: italic; margin: 0.6rem 0; }

.notes-textarea {
  width: 100%;
  min-height: 160px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--surface-soft);
  resize: vertical;
}
.notes-textarea:focus { outline: 2px solid var(--turmeric-light); border-color: var(--turmeric); }
.notes-save-hint { font-size: 0.78rem; color: var(--text-faint); margin-top: 0.5rem; }

.quote-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
  margin: 1rem 0;
}
.quote-strip .quote-pill {
  background: var(--turmeric-pale);
  border-radius: var(--radius-md);
  padding: 1rem 1.2rem;
  font-family: var(--font-heading);
  font-style: italic;
  color: var(--turmeric-dark);
  font-size: 0.95rem;
}

/* ==========================================================================
   Disabled views (Donate / Community)
   ========================================================================== */

.coming-soon {
  text-align: center;
  padding: 4rem 1.5rem;
}
.coming-soon .icon-circle {
  width: 70px; height: 70px;
  border-radius: 50%;
  background: var(--turmeric-light);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.2rem;
  font-size: 1.8rem;
}
.coming-soon h2 { margin-bottom: 0.5rem; }
.coming-soon p { color: var(--text-soft); max-width: 460px; margin: 0 auto; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 2.4rem 1.5rem 3rem;
  text-align: center;
  color: var(--text-faint);
  font-size: 0.85rem;
}
.site-footer p { max-width: 560px; margin: 0 auto 0.5rem; }

/* ==========================================================================
   Mobile nav toggle
   ========================================================================== */

.sidebar-toggle {
  display: none;
  margin-bottom: 1rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 860px) {
  .part-layout { grid-template-columns: 1fr; }
  .chapter-sidebar {
    position: static;
    max-height: none;
    display: none;
  }
  .chapter-sidebar.is-open { display: block; }
  .sidebar-toggle { display: inline-flex; }
}

@media (max-width: 560px) {
  .site-topbar { padding: 0.8rem 1rem 0.6rem; }
  .brand-tagline { display: none; }
  .topbar-cta { display: none; }
  main { padding: 0 0.9rem 3rem; }
  .card { padding: 1.3rem; }
}

/* ==========================================================================
   Print styles (for the Supporting Tools / affirmations view)
   ========================================================================== */

@media print {
  .site-topbar, .sidebar-toggle, .resource-toolbar,
  .site-footer, .chapter-sidebar, .card:not(.print-me) { display: none !important; }
  body { background: #fff; }
  .affirmation-segments { grid-template-columns: 1fr; }
  .affirmation-segment { break-inside: avoid; border: 1px solid #ccc; }
}
