/* ============================================================
   FolioCorpus — Bhagavad-gītā static site
   Adapted from prototype/app.py CUSTOM_CSS; Streamlit-only
   selectors removed; site-chrome (header/breadcrumbs/nav) added.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:wght@400;700&family=Lora:ital,wght@0,400;0,600;1,400&family=Noto+Sans+Devanagari:wght@400;600&family=Noto+Sans+Telugu:wght@400;600&family=Noto+Serif:ital,wght@0,400;0,600;1,400&display=swap');

/* RM Devanagari — Roger Moser, © 2002, "for non-commercial use only".
   Self-hosted Devanāgarī fallback for users without Noto Sans Devanagari. */
@font-face {
    font-family: 'RM Devanagari';
    src: url('../fonts/RMDevanagari.woff2') format('woff2'),
         url('../fonts/RMDevanagari.ttf') format('truetype');
    font-display: swap;
    font-weight: 400;
    font-style: normal;
}

:root {
    --fc-gold: #B8860B;
    --fc-maroon: #6B1D2A;
    --fc-cream: #FFF8F0;
    --fc-warm-gray: #5C5347;
    --fc-light-tan: #F5EDE0;
    --fc-accent: #C47D2B;
    --fc-text: #3B2F20;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background-color: #FAF6E8;
    color: var(--fc-text);
    font-family: 'Lora', Georgia, serif;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

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

hr { border: none; border-top: 1px solid #DCD0B0; margin: 1.4rem 0; }

/* ───────── Site chrome: header / nav / footer ───────── */
.fc-site-header {
    background: linear-gradient(135deg, #6B1D2A 0%, #8B3A4A 50%, #B8860B 100%);
    padding: 1.1rem 2rem;
    color: var(--fc-cream);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.8rem;
}
.fc-site-header .fc-brand {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #FFF8F0;
    text-decoration: none;
    letter-spacing: 0.04em;
}
.fc-site-header .fc-brand span.fc-sub {
    font-weight: 400;
    font-size: 0.9rem;
    font-style: italic;
    color: #F5DEB3;
    margin-left: 0.6rem;
}
.fc-site-nav a {
    color: #F5DEB3;
    text-decoration: none;
    margin-left: 1.2rem;
    font-size: 0.95rem;
}
.fc-site-nav a:hover { color: #FFF; text-decoration: underline; }
.fc-nav-btn {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #F5DEB3;
    padding: 0.3rem 0.7rem;
    border-radius: 14px;
    cursor: pointer;
    margin-left: 1rem;
    font-family: 'Lora', Georgia, serif;
    font-size: 0.92rem;
    transition: background 0.12s, color 0.12s;
}
.fc-nav-btn:hover { background: rgba(255, 255, 255, 0.25); color: #FFF; }

/* Language / script switcher in the site header */
.fc-lang-switch {
    display: inline-flex;
    gap: 0;
    margin-left: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 14px;
    overflow: hidden;
}
.fc-lang-switch a {
    color: #F5DEB3;
    padding: 0.18rem 0.7rem;
    font-size: 0.88rem;
    text-decoration: none;
    transition: background 0.12s, color 0.12s;
    font-family: 'Lora', 'Noto Sans Telugu', Georgia, serif;
}
.fc-lang-switch a:hover { color: #FFF; background: rgba(255,255,255,0.18); }
.fc-lang-switch a.active {
    background: rgba(255,255,255,0.22);
    color: #FFF;
    cursor: default;
}

/* Mobile-only trigger buttons in the site header that open the sidebars as drawers. */
.fc-mobile-trigger {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.32);
    color: #FFF8F0;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    transition: background 0.12s;
}
.fc-mobile-trigger:hover { background: rgba(255,255,255,0.28); }
@media (max-width: 1100px) { .fc-mobile-trigger-left { display: inline-flex; } }
@media (max-width: 820px)  { .fc-mobile-trigger-right { display: inline-flex; } }

/* Drawer overlay state — left or right sidebar floats above content. */
.fc-overlay-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 99994;
    display: none;
}
body[data-overlay-left="1"] .fc-overlay-backdrop,
body[data-overlay-right="1"] .fc-overlay-backdrop { display: block; }

body[data-overlay-left="1"] .fc-left-sidebar,
body[data-overlay-right="1"] .fc-sidebar {
    display: block !important;
    position: fixed;
    top: 0;
    bottom: 0;
    width: 300px;
    max-width: 88vw;
    z-index: 99995;
    background: #FAF6E8;
    box-shadow: 0 0 32px rgba(0,0,0,0.4);
    overflow-y: auto;
    padding: 1.2rem 1rem 2rem;
    max-height: 100vh;
    border: none;
}
body[data-overlay-left="1"] .fc-left-sidebar { left: 0; }
body[data-overlay-right="1"] .fc-sidebar { right: 0; }
html[data-theme="sepia"] body[data-overlay-left="1"] .fc-left-sidebar,
html[data-theme="sepia"] body[data-overlay-right="1"] .fc-sidebar { background: #F4E4C5; }
html[data-theme="cream"] body[data-overlay-left="1"] .fc-left-sidebar,
html[data-theme="cream"] body[data-overlay-right="1"] .fc-sidebar { background: #FAF1DD; }
html[data-theme="dark"]  body[data-overlay-left="1"] .fc-left-sidebar,
html[data-theme="dark"]  body[data-overlay-right="1"] .fc-sidebar { background: #1a1612; }

.fc-container {
    max-width: 980px;
    margin: 0 auto;
    padding: 1.8rem 1.6rem 3rem;
    min-width: 0; /* allow grid items with wide content to shrink */
}

/* Three-column layout when sidebars are present (chapter + verse pages).
   Landing/BG home/404 stay single-column. Columns shrink to a thin "rail"
   when the user collapses a sidebar via its collapse toggle. */
.fc-layout {
    display: block;
}
:root {
    --fc-left-col: 260px;
    --fc-right-col: 260px;
    --fc-rail: 34px;
}
html[data-left-collapsed="1"] { --fc-left-col: var(--fc-rail); }
html[data-right-collapsed="1"] { --fc-right-col: var(--fc-rail); }

body.has-sidebar .fc-layout {
    display: grid;
    grid-template-columns: var(--fc-left-col) minmax(0, 1fr) var(--fc-right-col);
    gap: 0;
    max-width: none;
    margin: 0;
    padding: 0;
}
/* On chapter/verse pages, the middle column fills available width.
   Inner content is centred within the column and capped for comfortable
   line length, so very wide monitors don't produce 200-char lines. */
body.has-sidebar .fc-container {
    margin: 0 auto;
    max-width: 1080px;
    padding: 1.6rem 1.8rem 3rem;
    width: 100%;
}
@media (max-width: 1100px) {
    body.has-sidebar .fc-layout {
        grid-template-columns: minmax(0, 1fr) var(--fc-right-col);
    }
    .fc-left-sidebar { display: none; }
}
@media (max-width: 820px) {
    body.has-sidebar .fc-layout {
        grid-template-columns: 1fr;
    }
    .fc-sidebar { display: none; }
}

.fc-site-footer {
    border-top: 1px solid #DCD0B0;
    padding: 1.4rem 1.6rem;
    text-align: center;
    color: #8B7D6B;
    font-size: 0.85rem;
    margin-top: 2rem;
}
.fc-site-footer a { color: #6B5025; }

/* ───────── Breadcrumbs ───────── */
.fc-breadcrumbs {
    font-family: 'Lora', Georgia, serif;
    font-size: 0.88rem;
    color: #8B7D6B;
    margin: 0 0 0.4rem;
}
.fc-breadcrumbs a {
    color: #6B5025;
    text-decoration: none;
}
.fc-breadcrumbs a:hover { text-decoration: underline; }
.fc-breadcrumbs .sep { margin: 0 0.45rem; color: #C8B47A; }

/* ───────── Verse heading ───────── */
.fc-verse-heading {
    font-family: 'Lora', Georgia, serif;
    color: #6B1D2A;
    font-size: 1.4rem;
    margin: 0.4rem 0 1.1rem;
    letter-spacing: 0.02em;
}

/* Page section divider */
.fc-section {
    margin: 1.3rem 0;
}
.fc-section-label {
    font-family: 'Lora', Georgia, serif;
    font-weight: 700;
    color: #6B5025;
    font-size: 0.92rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 1.0rem 0 0.45rem;
    border-bottom: 2px solid #C8B47A;
    padding-bottom: 0.22rem;
    width: fit-content;
}

/* ───────── Devanagari & IAST (verse text) ───────── */
.cr-devanagari {
    font-family: 'Noto Sans Devanagari', 'Sanskrit 2003', 'RM Devanagari', serif;
    font-size: 1.32rem;
    line-height: 1.95;
    text-align: center;
    color: #3a2f1a;
    margin: 0.7rem auto;
    max-width: 60ch;
    white-space: pre-line;
}
/* Telugu lipi rendering when the Telugu edition is active. */
.cr-devanagari.cr-telugu {
    font-family: 'Noto Sans Telugu', 'Mallanna', 'Pothana2000', 'Lohit Telugu', serif;
    font-size: 1.36rem;
    line-height: 2.0;
}
html[data-theme="dark"] .cr-devanagari.cr-telugu { color: #f0e0c0; }

/* Word-level hover tooltips on Devanāgarī (built by the generator when
   Devanāgarī word count matches IAST). Faint dotted underline hints that
   the word is interactive; hover reveals IAST + English gloss. */
.fc-hover-word {
    position: relative;
    cursor: help;
    border-bottom: 1px dotted rgba(184, 134, 11, 0.32);
    transition: background 0.12s, border-color 0.12s;
}
.fc-hover-word:hover {
    background: rgba(252, 239, 161, 0.4);
    border-bottom-color: rgba(184, 134, 11, 0.75);
    z-index: 10;
}
.fc-hover-word::after {
    content: attr(data-iast);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translate(-50%, -8px);
    background: rgba(58, 47, 26, 0.97);
    color: #FAF6E8;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-family: 'Lora', Georgia, serif;
    font-size: 0.86rem;
    font-style: italic;
    line-height: 1.4;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 999;
    white-space: normal;
    max-width: 280px;
    width: max-content;
    box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}
.fc-hover-word[data-en]::after {
    content: attr(data-iast) " — " attr(data-en);
}
.fc-hover-word:hover::after { opacity: 1; }
html[data-theme="dark"] .fc-hover-word { border-bottom-color: rgba(212, 160, 96, 0.4); }
html[data-theme="dark"] .fc-hover-word:hover { background: rgba(212, 160, 96, 0.2); border-bottom-color: rgba(212, 160, 96, 0.9); }
html[data-theme="dark"] .fc-hover-word::after { background: rgba(232, 200, 168, 0.97); color: #1a1612; }

.cr-iast {
    font-family: 'Noto Serif', 'Charis SIL', Georgia, serif;
    font-style: italic;
    font-size: 1.05rem;
    text-align: center;
    line-height: 1.8;
    color: #5a4a2a;
    margin: 0.25rem auto 0.85rem;
    max-width: 56ch;
    letter-spacing: 0.01em;
    white-space: pre-line;
}

/* IAST block: one verse-line at a time, with an optional English reading guide
   interleaved below each line. Toggle controls `data-sec="pronunciation"`. */
.cr-iast-block {
    text-align: center;
    margin: 0.25rem auto 0.85rem;
    max-width: 60ch;
    line-height: 1.75;
}
.cr-iast-line {
    font-family: 'Noto Serif', 'Charis SIL', Georgia, serif;
    font-style: italic;
    font-size: 1.05rem;
    color: #5a4a2a;
    letter-spacing: 0.01em;
}
.cr-pron-line {
    font-family: 'Lora', Georgia, serif;
    font-style: normal;
    font-size: 0.82rem;
    color: #A89B82;
    letter-spacing: 0.02em;
    margin-bottom: 0.18rem;
}

/* ───────── Word-to-word synonyms ───────── */
.cr-synonyms-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.9rem;
    line-height: 1.85;
    margin: 0.3rem 0 0.6rem;
}
.cr-syn-item {
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
    padding: 0.05rem 0.4rem 0.05rem 0;
    border-right: 1px solid #DCD0B0;
}
.cr-syn-item:last-child { border-right: none; }
.cr-syn-iast {
    font-family: 'Noto Serif', Georgia, serif;
    font-style: italic;
    font-weight: 600;
    color: #6B1D2A;
    font-size: 1.0rem;
}
.cr-syn-sep { color: #B8A878; font-weight: 300; }
.cr-syn-en {
    font-family: 'Lora', Georgia, serif;
    color: #3a2f1a;
    font-size: 0.95rem;
}

/* ───────── Blended reading (Sanskrit + English inline) ───────── */
.cr-blend-details {
    margin: 0.4rem 0 0.9rem;
}
.cr-blend-details > summary {
    font-family: 'Lora', Georgia, serif;
    font-weight: 700;
    color: #6B5025;
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    cursor: pointer;
    padding: 0.3rem 0.4rem;
    text-transform: uppercase;
}
.cr-blend-grid {
    background: #FCF8E8;
    border-left: 4px solid #C8B47A;
    border-radius: 4px;
    padding: 0.9rem 1.2rem;
    margin-top: 0.4rem;
}
.cr-blend-block {
    padding: 0.7rem 0;
    border-bottom: 1px dashed rgba(200, 180, 122, 0.45);
}
.cr-blend-block:last-child { border-bottom: none; }
.cr-blend-iast-line {
    font-family: 'Noto Serif', Georgia, serif;
    font-style: italic;
    font-weight: 600;
    color: #6B1D2A;
    font-size: 1.14rem;
    text-align: center;
    line-height: 1.7;
    margin-bottom: 0.5rem;
    letter-spacing: 0.015em;
}
.cr-blend-line {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.0rem;
    padding: 0.2rem 0;
    justify-content: center;
}
.cr-blend-pair {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0.15rem 0.35rem;
    border-radius: 3px;
    transition: background 0.12s;
    line-height: 1.3;
}
.cr-blend-pair:hover { background: #FAE07A; }
.cr-blend-pair .cr-blend-iast {
    font-family: 'Noto Serif', Georgia, serif;
    font-style: italic;
    font-weight: 600;
    color: #6B1D2A;
    font-size: 1.05rem;
    line-height: 1.4;
    white-space: nowrap;
}
.cr-blend-pair .cr-blend-en {
    color: #5a4a2a;
    font-size: 0.82rem;
    line-height: 1.3;
    margin-top: 0.05rem;
    white-space: nowrap;
    font-family: 'Lora', Georgia, serif;
    letter-spacing: 0.005em;
}

/* ───────── Translation call-out ───────── */
.fc-translation {
    background: #FCF8E8;
    border-left: 4px solid var(--fc-gold);
    border-radius: 3px;
    padding: 0.9rem 1.2rem;
    margin: 0.6rem 0 1rem;
    font-family: 'Lora', Georgia, serif;
    font-size: 1.1rem;
    line-height: 1.7;
    color: #3a2f1a;
    font-weight: 500;
}
.fc-translation::before {
    content: "Translation";
    display: block;
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    color: #6B5025;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

/* ───────── Purport ───────── */
.cr-purport-body {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.04rem;
    line-height: 1.78;
    color: #3a2f1a;
}
.cr-purport-body p {
    margin: 0 0 0.85rem;
}
.cr-purport-body p:last-child { margin-bottom: 0; }
.cr-purport-attrib {
    font-style: italic;
    font-size: 0.85rem;
    color: #8B7D6B;
    margin-top: 0.4rem;
}

/* ───────── Ācārya cards (Gauḍīya & classical) ───────── */
.cr-acarya-card {
    border-radius: 5px;
    padding: 0.7rem 1rem;
    margin: 0.55rem 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    background: #FCFAF0;
}
.cr-acarya-card.gaudiya {
    border-left: 5px solid #6B1D2A;
    background: #FBF1F1;
}
.cr-acarya-card.classical {
    border-left: 5px solid #B8860B;
    background: #FBF6E4;
}
.cr-acarya-card.study {
    border-left: 5px solid #2E5F46;
    background: #F0F6F2;
}
.cr-acarya-name {
    font-family: 'Lora', Georgia, serif;
    font-weight: 700;
    font-size: 1.12rem;
    margin-bottom: 0.45rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.cr-acarya-card.gaudiya .cr-acarya-name { color: #6B1D2A; }
.cr-acarya-card.classical .cr-acarya-name { color: #6B5025; }
.cr-samp-badge {
    color: white;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
}
.cr-acarya-card.gaudiya .cr-samp-badge { background: #6B1D2A; }
.cr-acarya-card.classical .cr-samp-badge { background: #B8860B; }
.cr-acarya-card.study .cr-samp-badge.study-badge { background: #2E5F46; }
.cr-acarya-card.study .cr-acarya-name { color: #1F4632; }
.cr-acarya-card.study .cr-acarya-work { color: #2E5F46; }
.cr-acarya-card.study .cr-acarya-trans { border-left-color: #2E5F46; }
.cr-acarya-card.study .cr-samp-badge.key-verse-badge { background: #B8860B; }

/* ───────── Chapter Overview & Section Banner (Gauranga Priya study layer) ───────── */
.fc-chapter-overview {
    background: #F0F6F2;
    border-left: 5px solid #2E5F46;
    border-radius: 4px;
    padding: 1rem 1.2rem;
    margin: 1rem 0 1.6rem;
}
.fc-chapter-overview-label {
    font-family: 'Lora', Georgia, serif;
    font-size: 0.86rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #1F4632;
    font-weight: 600;
    margin-bottom: 0.6rem;
}
.fc-chapter-overview-body {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.02rem;
    line-height: 1.7;
    color: #3a2f1a;
}
.fc-chapter-overview-body p { margin: 0.5rem 0; }
.fc-chapter-overview-attrib {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-size: 0.86rem;
    color: #5C7A6A;
    margin-top: 0.6rem;
    text-align: right;
}
.fc-section-banner {
    background: linear-gradient(90deg, #E6F0E9 0%, #F4F9F5 100%);
    border-top: 2px solid #2E5F46;
    border-bottom: 1px solid #C7D9CE;
    padding: 0.8rem 1.1rem;
    margin: 1.4rem 0 1rem;
    border-radius: 2px;
}
.fc-section-banner-label {
    font-family: 'Lora', Georgia, serif;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #1F4632;
    font-weight: 700;
}
.fc-section-banner-range {
    margin-left: 0.45rem;
    font-weight: 500;
    color: #5C7A6A;
    letter-spacing: 0.04em;
    text-transform: none;
}
.fc-section-banner-heading {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.18rem;
    font-weight: 700;
    color: #1F4632;
    margin-top: 0.2rem;
}
.fc-section-banner-overview { margin-top: 0.5rem; }
.fc-section-banner-overview > summary {
    cursor: pointer;
    font-family: 'Lora', Georgia, serif;
    font-size: 0.86rem;
    color: #2E5F46;
    font-weight: 600;
}
.fc-section-banner-body {
    font-family: 'Lora', Georgia, serif;
    font-size: 0.98rem;
    line-height: 1.7;
    color: #3a2f1a;
    margin-top: 0.5rem;
}
.fc-section-banner-body p { margin: 0.4rem 0; }
html[data-theme="dark"] .cr-acarya-card.study { background: #1d2a23; border-left-color: #5fa07e; }
html[data-theme="dark"] .cr-acarya-card.study .cr-acarya-name { color: #b8e0c8; }
html[data-theme="dark"] .cr-acarya-card.study .cr-acarya-work { color: #94c4a8; }
html[data-theme="dark"] .fc-chapter-overview { background: #1d2a23; border-left-color: #5fa07e; }
html[data-theme="dark"] .fc-chapter-overview-label { color: #b8e0c8; }
html[data-theme="dark"] .fc-section-banner {
    background: linear-gradient(90deg, #1d2a23 0%, #243b30 100%);
    border-top-color: #5fa07e;
    border-bottom-color: #335946;
}
html[data-theme="dark"] .fc-section-banner-label,
html[data-theme="dark"] .fc-section-banner-heading { color: #b8e0c8; }

/* ───────── Breakdown of Chapter — framed card with all sections summarised ───────── */
.fc-breakdown-card {
    border: 2px solid #2E5F46;
    border-radius: 4px;
    padding: 1.4rem 1.6rem 1rem;
    margin: 1.2rem 0 1.8rem;
    background: #FCFCF8;
    position: relative;
}
.fc-breakdown-card-label {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1F4632;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 1.2rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px dashed #C7D9CE;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}
.fc-breakdown-card-label::before {
    /* override default-left chevron position for centered title */
    order: -1;
}
.fc-chapter-overview-label {
    /* already has flex / chevron support from .fc-section-label base */
}
.fc-breakdown-card-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.fc-breakdown-section {
    padding: 0.4rem 0;
}
.fc-breakdown-section-head {
    display: block;
    text-decoration: none;
    color: #1F4632;
    font-family: 'Lora', Georgia, serif;
    font-weight: 700;
    font-size: 1.02rem;
    margin-bottom: 0.4rem;
    line-height: 1.45;
}
.fc-breakdown-section-head:hover {
    color: #6B1D2A;
}
.fc-breakdown-roman {
    font-weight: 700;
}
.fc-breakdown-range {
    font-weight: 500;
    color: #5C7A6A;
    margin-left: 0.3rem;
}
.fc-breakdown-dash {
    margin: 0 0.35rem;
    color: #5C7A6A;
    font-weight: 500;
}
.fc-breakdown-heading {
    font-weight: 700;
    font-style: italic;
}
.fc-breakdown-bullets {
    margin-left: 0.4rem;
}
.fc-breakdown-card-attrib {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-size: 0.84rem;
    color: #5C7A6A;
    text-align: right;
    margin-top: 0.6rem;
    padding-top: 0.5rem;
    border-top: 1px dashed #C7D9CE;
}
html[data-theme="dark"] .fc-breakdown-card {
    background: #1a2620;
    border-color: #5fa07e;
}
html[data-theme="dark"] .fc-breakdown-card-label,
html[data-theme="dark"] .fc-breakdown-section-head { color: #b8e0c8; }
html[data-theme="dark"] .fc-breakdown-section-head:hover { color: #f0a8b8; }
html[data-theme="dark"] .fc-breakdown-range,
html[data-theme="dark"] .fc-breakdown-dash,
html[data-theme="dark"] .fc-breakdown-card-attrib { color: #94c4a8; }

/* ───────── Structured Gauranga-Priya blocks (heading / bullet / paragraph) ───────── */
.fc-gpd-blocks { line-height: 1.55; }
.fc-gpd-heading {
    font-family: 'Lora', Georgia, serif;
    font-weight: 700;
    font-size: 1.02rem;
    color: #1F4632;
    margin: 0.85rem 0 0.35rem;
}
.fc-gpd-para {
    margin: 0.35rem 0;
    color: #2a2a2a;
}
.fc-gpd-bullet {
    position: relative;
    padding-left: 1.4rem;
    margin: 0.18rem 0;
    color: #2a2a2a;
}
.fc-gpd-bullet::before {
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 600;
    color: #2E5F46;
}
.fc-gpd-bullet-l1 { padding-left: 1.5rem; }
.fc-gpd-bullet-l1::before { content: "❖"; }
.fc-gpd-bullet-l2 { padding-left: 1.6rem; }
.fc-gpd-bullet-l2::before { content: "•"; font-size: 1.3rem; line-height: 0.9; }
.fc-gpd-bullet-l3 { padding-left: 2.6rem; }
.fc-gpd-bullet-l3::before { content: "◦"; left: 1.2rem; font-size: 1.1rem; line-height: 1; }
.fc-gpd-italic { font-style: italic; }
.fc-gpd-bold { font-weight: 600; }

/* Slightly tighter spacing inside the verse-level Study Notes card */
.cr-acarya-card.study .fc-gpd-blocks .fc-gpd-heading { font-size: 0.96rem; margin-top: 0.55rem; }
.cr-acarya-card.study .fc-gpd-blocks .fc-gpd-bullet,
.cr-acarya-card.study .fc-gpd-blocks .fc-gpd-para { font-size: 0.98rem; }

/* Dark mode */
html[data-theme="dark"] .fc-gpd-heading { color: #b8e0c8; }
html[data-theme="dark"] .fc-gpd-para,
html[data-theme="dark"] .fc-gpd-bullet { color: #ddd; }
html[data-theme="dark"] .fc-gpd-bullet::before { color: #5fa07e; }

/* ───────── Study Q&A (Book of Life) ───────── */
.fc-qa-ref-list { list-style: none; margin: 0.3rem 0; padding: 0; }
.fc-qa-ref-item {
    padding: 0.45rem 0.6rem;
    margin: 0.25rem 0;
    border-left: 3px solid #4A6E89;
    background: #F0F4F7;
    border-radius: 2px;
    font-family: 'Lora', Georgia, serif;
    font-size: 0.96rem;
}
.fc-qa-ref-item a { color: #1F3C57; text-decoration: none; font-weight: 500; }
.fc-qa-ref-item a:hover { text-decoration: underline; }
.fc-qa-audience-badge {
    display: inline-block;
    margin-left: 0.4rem;
    padding: 1px 7px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    vertical-align: middle;
}
.fc-qa-audience-badge.adult { background: #8B2C39; color: white; }

/* Q&A index + Q page */
.fc-qa-intro {
    background: #F4F8FB;
    border-left: 4px solid #4A6E89;
    padding: 0.8rem 1.1rem;
    margin: 0.8rem 0 1.4rem;
    font-family: 'Lora', Georgia, serif;
    color: #2a2a2a;
    border-radius: 3px;
}
.fc-qa-audience-note {
    margin: 0.6rem 0 0;
    font-size: 0.92rem;
    color: #555;
}
.fc-qa-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.fc-qa-li {
    padding: 0.6rem 0.4rem;
    border-bottom: 1px solid #ECDFC4;
}
.fc-qa-link {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.04rem;
    color: #2a2a2a;
    text-decoration: none;
    font-weight: 500;
}
.fc-qa-link:hover { color: #6B1D2A; text-decoration: underline; }
.fc-qa-cited {
    margin-top: 0.3rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.fc-qa-cited-link {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 10px;
    background: #ECDFC4;
    color: #6B5025;
    font-size: 0.78rem;
    text-decoration: none;
    font-weight: 500;
}
.fc-qa-cited-link:hover { background: #C8B47A; color: #fff; }
.fc-qa-page { max-width: 56rem; }
.fc-qa-h1 {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.6rem;
    color: #2a2a2a;
    margin-bottom: 1rem;
}
.fc-qa-audience-warn {
    background: #FBEFEF;
    border-left: 4px solid #8B2C39;
    padding: 0.6rem 1rem;
    margin-bottom: 1.2rem;
    border-radius: 3px;
    font-size: 0.94rem;
}
.fc-qa-body {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.04rem;
    line-height: 1.72;
    color: #2a2a2a;
}
.fc-qa-body p { margin: 0.55rem 0; }
.fc-qa-cited-section { margin-top: 1.6rem; }
.fc-qa-cited-list {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}
.fc-qa-cited-list li a {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 14px;
    background: #ECDFC4;
    color: #6B5025;
    font-size: 0.94rem;
    text-decoration: none;
    font-weight: 500;
}
.fc-qa-cited-list li a:hover { background: #C8B47A; color: #fff; }
html[data-theme="dark"] .fc-qa-ref-item { background: #1c2832; border-left-color: #6892b2; }
html[data-theme="dark"] .fc-qa-ref-item a { color: #b8d4ec; }
html[data-theme="dark"] .fc-qa-intro { background: #1c2832; border-left-color: #6892b2; color: #ddd; }
html[data-theme="dark"] .fc-qa-link { color: #ddd; }
html[data-theme="dark"] .fc-qa-body { color: #ddd; }
html[data-theme="dark"] .fc-qa-cited-link { background: #4a3f2a; color: #d4c595; }
.cr-acarya-work {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-size: 0.92rem;
    color: #6B5025;
    margin: -0.25rem 0 0.45rem;
}
.cr-acarya-card.gaudiya .cr-acarya-work { color: #6B1D2A; }
.cr-acarya-label {
    font-family: 'Lora', Georgia, serif;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #6B5025;
    margin: 0.55rem 0 0.25rem;
    font-weight: 600;
}
.cr-acarya-trans {
    background: rgba(255,255,255,0.55);
    border-left: 3px solid #C8B47A;
    padding: 0.6rem 1rem;
    margin: 0.2rem 0 0.5rem;
    color: #3a2f1a;
    font-style: italic;
    font-size: 1.08rem;
    line-height: 1.7;
    border-radius: 2px;
}
.cr-acarya-card.gaudiya .cr-acarya-trans { border-left-color: #6B1D2A; }
.cr-acarya-card.classical .cr-acarya-trans { border-left-color: #B8860B; }
.cr-acarya-purp {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.0rem;
    line-height: 1.72;
    color: #3a2f1a;
}
.cr-acarya-purp p { margin: 0.45rem 0; }

/* ───────── Personal Guidance ───────── */
.fc-pg-essence {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.05rem;
    line-height: 1.7;
    color: #3a2f1a;
    background: #FCF8E8;
    border-left: 3px solid #C8B47A;
    padding: 0.7rem 1rem;
    border-radius: 2px;
    margin: 0.4rem 0 0.9rem;
}
.fc-pg-sub {
    font-family: 'Lora', Georgia, serif;
    font-weight: 700;
    color: #6B5025;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin: 0.9rem 0 0.35rem;
}
.fc-pg-list {
    margin: 0.2rem 0 0.5rem 1.1rem;
    padding: 0;
}
.fc-pg-list li {
    margin: 0.25rem 0;
    line-height: 1.6;
    color: #3a2f1a;
}
.fc-pg-age {
    background: #FBF6E4;
    border: 1px solid #E8DCB8;
    border-radius: 4px;
    padding: 0.7rem 1rem;
    margin: 0.5rem 0;
}
.fc-pg-age-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.6rem;
}
.fc-pg-age-filter {
    display: inline-flex;
    border: 1px solid #D4C4A8;
    border-radius: 5px;
    overflow: hidden;
    background: #FBF6E4;
}
.fc-pg-age-filter button {
    background: transparent;
    border: none;
    border-right: 1px solid #DCD0B0;
    color: #6B5025;
    padding: 0.2rem 0.6rem;
    font-size: 0.8rem;
    font-family: 'Lora', Georgia, serif;
    cursor: pointer;
}
.fc-pg-age-filter button:last-child { border-right: none; }
.fc-pg-age-filter button:hover { background: #F0E8D2; }
.fc-pg-age-filter button.active { background: var(--fc-maroon); color: #FFF8F0; font-weight: 600; }
html[data-theme="dark"] .fc-pg-age-filter { background: #211a13; border-color: #3a3128; }
html[data-theme="dark"] .fc-pg-age-filter button { color: #d4a060; border-right-color: #3a3128; }
html[data-theme="dark"] .fc-pg-age-filter button:hover { background: #2a2218; }
html[data-theme="dark"] .fc-pg-age-filter button.active { background: #c84a64; color: #1a1612; }

html[data-pg-filter="youth"] .fc-pg-age:not(.fc-pg-age-youth),
html[data-pg-filter="householder"] .fc-pg-age:not(.fc-pg-age-householder),
html[data-pg-filter="senior"] .fc-pg-age:not(.fc-pg-age-senior) {
    display: none !important;
}
.fc-pg-age-label {
    font-family: 'Lora', Georgia, serif;
    font-weight: 700;
    font-size: 0.9rem;
    color: #6B1D2A;
    margin-bottom: 0.3rem;
    text-transform: capitalize;
}

/* ───────── Analogy / Stories / Important Words ───────── */
.fc-analogy-body { font-style: italic; line-height: 1.7; margin: 0.4rem 0 0; }

.fc-story-card {
    margin: 0.6rem 0 0.8rem;
    padding: 0.6rem 0.8rem;
    background: rgba(212, 196, 168, 0.12);
    border-left: 3px solid #B8860B;
    border-radius: 0 6px 6px 0;
}
.fc-story-title { font-weight: 600; margin-bottom: 0.3rem; }
.fc-story-body p { margin: 0.35rem 0; }

.fc-iw-list { list-style: none; padding: 0; margin: 0.4rem 0 0; }
.fc-iw-item {
    margin: 0.4rem 0;
    padding: 0.4rem 0;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.08);
}
.fc-iw-item:last-child { border-bottom: none; }
.fc-iw-iast { font-weight: 600; font-style: italic; }
.fc-iw-sep { margin: 0 0.4rem; opacity: 0.6; }
.fc-iw-why { margin-top: 0.25rem; font-size: 0.92em; opacity: 0.85; }

html[data-theme="dark"] .fc-story-card {
    background: rgba(184, 134, 11, 0.10);
    border-left-color: #d4a060;
}
html[data-theme="dark"] .fc-iw-item {
    border-bottom-color: rgba(255, 255, 255, 0.10);
}

/* ───────── Prev / Next nav ───────── */
.fc-prevnext {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 0.8rem;
    margin: 2.2rem 0 0.6rem;
    border-top: 1px solid #DCD0B0;
    padding-top: 1rem;
}
.fc-prevnext a {
    flex: 1;
    background: #F0E8D2;
    border: 1px solid #D4C4A8;
    border-radius: 6px;
    padding: 0.7rem 1rem;
    text-decoration: none;
    color: #6B5025;
    transition: background 0.12s;
    font-family: 'Lora', Georgia, serif;
    line-height: 1.4;
}
.fc-prevnext a:hover { background: #E8DCB8; color: #3a2f1a; }
.fc-prevnext a.next { text-align: right; }
.fc-prevnext a span.dir {
    display: block;
    font-size: 0.74rem;
    letter-spacing: 0.12em;
    color: #8B7D6B;
    text-transform: uppercase;
    margin-bottom: 0.18rem;
}
.fc-prevnext a span.label {
    font-weight: 600;
    color: #6B1D2A;
    font-size: 1rem;
}
.fc-prevnext .placeholder {
    flex: 1;
    visibility: hidden;
}

/* ───────── Chapter cards (BG home & landing) ───────── */
.fc-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.9rem;
    margin: 1.2rem 0;
}
.fc-chapter-card {
    background: #FCFAF0;
    border: 1px solid #E8DCC8;
    border-left: 4px solid var(--fc-gold);
    border-radius: 6px;
    padding: 0.9rem 1rem;
    text-decoration: none;
    color: #3a2f1a;
    transition: transform 0.12s, box-shadow 0.12s;
    display: block;
}
.fc-chapter-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(107,29,42,0.10);
}
.fc-chapter-card .ch-num {
    font-family: 'Lora', Georgia, serif;
    color: #6B1D2A;
    font-weight: 700;
    font-size: 1.05rem;
    margin: 0;
}
.fc-chapter-card .ch-title {
    color: #3a2f1a;
    font-size: 0.92rem;
    margin: 0.25rem 0 0;
    line-height: 1.35;
}
.fc-chapter-card .ch-meta {
    color: #8B7D6B;
    font-size: 0.78rem;
    margin-top: 0.4rem;
}

/* Explore links row on BG home */
.fc-explore-row {
    display: flex;
    gap: 0.7rem;
    margin: 1.4rem 0 0.4rem;
    flex-wrap: wrap;
}
.fc-explore-link {
    background: #FBF6E4;
    border: 1px solid #D4C4A8;
    color: #6B5025;
    padding: 0.55rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-family: 'Lora', Georgia, serif;
    transition: background 0.12s, color 0.12s;
}
.fc-explore-link:hover { background: #F0E8D2; color: var(--fc-maroon); }
html[data-theme="dark"] .fc-explore-link { background: #211a13; border-color: #3a3128; color: #d4a060; }
html[data-theme="dark"] .fc-explore-link:hover { background: #2a2218; color: #f0a8b8; }

/* ───────── Reading paths ───────── */
.fc-paths-list {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    margin: 1rem 0 2rem;
}
.fc-path-card {
    background: #FCFAF0;
    border: 1px solid #E8DCC8;
    border-left: 4px solid var(--fc-gold);
    border-radius: 6px;
    padding: 0.9rem 1.1rem;
    text-decoration: none;
    color: #3a2f1a;
    transition: transform 0.12s, box-shadow 0.12s;
}
.fc-path-card:hover { transform: translateY(-1px); box-shadow: 0 3px 12px rgba(107,29,42,0.10); }
.fc-path-card-name {
    font-family: 'Lora', Georgia, serif;
    color: var(--fc-maroon);
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 0.3rem;
}
.fc-path-card-desc {
    color: #5a4a2a;
    font-size: 0.93rem;
    line-height: 1.55;
    margin-bottom: 0.4rem;
}
.fc-path-card-meta {
    color: #8B7D6B;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.fc-path-verse-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 2rem;
}
.fc-path-verse-list li { border-bottom: 1px solid #E8DCC8; }
.fc-path-verse-list li:last-child { border-bottom: none; }
.fc-path-verse-list a {
    display: grid;
    grid-template-columns: 2.5rem 5rem 1fr;
    gap: 0.7rem;
    align-items: baseline;
    padding: 0.55rem 0.4rem;
    color: #3a2f1a;
    text-decoration: none;
}
.fc-path-verse-list a:hover { background: #FBF1F1; }
.fc-path-step {
    color: #B8A878;
    font-size: 0.82rem;
    text-align: center;
    font-family: 'Lora', Georgia, serif;
}
.fc-path-ref {
    color: var(--fc-maroon);
    font-weight: 700;
    font-family: 'Lora', Georgia, serif;
}
.fc-path-snippet { color: #5a4a2a; font-size: 0.92rem; }

/* Banner shown on verse pages when navigating via a path */
.fc-path-banner {
    background: linear-gradient(135deg, #FBF1F1 0%, #FCFAF0 100%);
    border: 1px solid #E8DCB8;
    border-left: 4px solid var(--fc-maroon);
    border-radius: 6px;
    padding: 0.55rem 0.9rem;
    margin: 0.4rem 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    flex-wrap: wrap;
    font-family: 'Lora', Georgia, serif;
    font-size: 0.92rem;
}
.fc-path-banner a { color: var(--fc-maroon); text-decoration: none; }
.fc-path-banner a:hover { text-decoration: underline; }
.fc-path-banner-step { color: #8B7D6B; font-size: 0.84rem; margin-left: 0.4rem; }
.fc-path-banner-right { display: flex; gap: 0.9rem; }
.fc-path-banner-right .fc-path-done { color: #6B5025; font-style: italic; }
html[data-theme="dark"] .fc-path-card { background: #211a13; border-color: #3a3128; border-left-color: #d4a040; color: #e6d6b8; }
html[data-theme="dark"] .fc-path-card-name { color: #f0a8b8; }
html[data-theme="dark"] .fc-path-card-desc { color: #d4b78a; }
html[data-theme="dark"] .fc-path-card-meta { color: #a8946a; }
html[data-theme="dark"] .fc-path-verse-list li { border-bottom-color: #3a3128; }
html[data-theme="dark"] .fc-path-verse-list a { color: #e6d6b8; }
html[data-theme="dark"] .fc-path-verse-list a:hover { background: #2a2218; }
html[data-theme="dark"] .fc-path-ref { color: #f0a8b8; }
html[data-theme="dark"] .fc-path-snippet { color: #d4b78a; }
html[data-theme="dark"] .fc-path-banner { background: linear-gradient(135deg, #2a181b, #211a13); border-color: #3a3128; border-left-color: #c84a64; }
html[data-theme="dark"] .fc-path-banner a { color: #f0a8b8; }
html[data-theme="dark"] .fc-path-banner-step { color: #a8946a; }

/* ───────── Compare two verses ───────── */
.fc-compare-row {
    display: flex;
    gap: 0.6rem;
    margin: 1rem 0 0.4rem;
    align-items: center;
    flex-wrap: wrap;
    color: #6B5025;
    font-family: 'Lora', Georgia, serif;
}
.fc-compare-select {
    background: white;
    border: 1px solid #D4C4A8;
    border-radius: 4px;
    padding: 0.3rem 0.5rem;
    font-family: 'Lora', Georgia, serif;
    color: #3a2f1a;
    min-width: 9rem;
}
.fc-compare-vs { color: #8B7D6B; font-style: italic; }
.fc-compare-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.2rem;
    margin: 1rem 0 2rem;
}
@media (max-width: 800px) {
    .fc-compare-grid { grid-template-columns: 1fr; }
}
.fc-compare-side {
    background: #FCFAF0;
    border: 1px solid #E8DCC8;
    border-left: 4px solid var(--fc-gold);
    border-radius: 6px;
    padding: 1rem 1.2rem;
}
.fc-compare-ref {
    font-family: 'Lora', Georgia, serif;
    color: var(--fc-maroon);
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 0.6rem;
    letter-spacing: 0.02em;
}
.fc-compare-translation {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.05rem;
    line-height: 1.7;
    color: #3a2f1a;
    margin-bottom: 0.8rem;
}
.fc-compare-purport-label {
    font-family: 'Lora', Georgia, serif;
    font-size: 0.74rem;
    color: #6B5025;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    margin: 0.5rem 0 0.3rem;
}
.fc-compare-purport {
    font-family: 'Lora', Georgia, serif;
    font-size: 0.92rem;
    line-height: 1.6;
    color: #5a4a2a;
}
.fc-compare-link {
    display: inline-block;
    margin-top: 0.8rem;
    color: #6B5025;
    text-decoration: none;
    font-size: 0.9rem;
}
.fc-compare-link:hover { color: var(--fc-maroon); text-decoration: underline; }
html[data-theme="dark"] .fc-compare-select { background: #211a13; border-color: #3a3128; color: #e6d6b8; }
html[data-theme="dark"] .fc-compare-side { background: #211a13; border-color: #3a3128; border-left-color: #d4a040; }
html[data-theme="dark"] .fc-compare-ref { color: #f0a8b8; }
html[data-theme="dark"] .fc-compare-translation { color: #e6d6b8; }
html[data-theme="dark"] .fc-compare-purport-label { color: #d4a060; }
html[data-theme="dark"] .fc-compare-purport { color: #d4b78a; }
html[data-theme="dark"] .fc-compare-link { color: #d4a060; }
html[data-theme="dark"] .fc-compare-link:hover { color: #f0a8b8; }

/* ───────── Flashcards ───────── */
.fc-deck-controls {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin: 0.6rem 0 0.5rem;
    flex-wrap: wrap;
    font-family: 'Lora', Georgia, serif;
    color: #6B5025;
}
.fc-deck-controls label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.fc-deck-controls select {
    background: white;
    border: 1px solid #D4C4A8;
    border-radius: 4px;
    padding: 0.25rem 0.45rem;
    font-family: 'Lora', Georgia, serif;
    color: #3a2f1a;
}
html[data-theme="dark"] .fc-deck-controls select { background: #211a13; border-color: #3a3128; color: #e6d6b8; }

.fc-card-area {
    margin: 1.4rem auto;
    max-width: 660px;
    min-height: 360px;
}
.fc-card {
    position: relative;
    perspective: 1500px;
    cursor: pointer;
    height: 380px;
    user-select: none;
    outline: none;
}
.fc-card-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    background: #FCF8E8;
    border: 1px solid #C8B47A;
    border-radius: 14px;
    padding: 1.6rem 1.8rem;
    transition: transform 0.55s cubic-bezier(0.4, 0.0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.fc-card-back { transform: rotateY(180deg); }
.fc-card.flipped .fc-card-front { transform: rotateY(-180deg); }
.fc-card.flipped .fc-card-back { transform: rotateY(0); }
.fc-card .fc-card-ref {
    font-family: 'Lora', Georgia, serif;
    color: var(--fc-maroon);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.7rem;
    letter-spacing: 0.02em;
}
.fc-card .fc-card-devanagari {
    font-family: 'Noto Sans Devanagari', 'Sanskrit 2003', 'RM Devanagari', serif;
    font-size: 1.3rem;
    line-height: 1.85;
    color: #3a2f1a;
    margin-bottom: 0.55rem;
    white-space: pre-line;
}
.fc-card .fc-card-iast {
    font-family: 'Noto Serif', Georgia, serif;
    font-style: italic;
    font-size: 1rem;
    color: #5a4a2a;
    line-height: 1.7;
    white-space: pre-line;
}
.fc-card .fc-card-translation {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.08rem;
    line-height: 1.65;
    color: #3a2f1a;
    margin-bottom: 0.8rem;
}
.fc-card .fc-card-link {
    font-size: 0.85rem;
    color: #6B5025;
    text-decoration: none;
}
.fc-card .fc-card-link:hover { color: var(--fc-maroon); text-decoration: underline; }
.fc-card .fc-card-hint {
    color: #8B7D6B;
    font-size: 0.8rem;
    font-style: italic;
    margin-top: 1.4rem;
}
.fc-fc-empty {
    background: #FCF8E8;
    border: 1px dashed #C8B47A;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    color: #6B5025;
}
.fc-fc-nav {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    justify-content: center;
    margin: 1rem 0 2rem;
}
.fc-fc-progress {
    font-family: 'Lora', Georgia, serif;
    color: #6B5025;
    font-size: 0.95rem;
    min-width: 6rem;
    text-align: center;
}
html[data-theme="dark"] .fc-card-face { background: #211a13; border-color: #3a3128; }
html[data-theme="dark"] .fc-card .fc-card-ref { color: #f0a8b8; }
html[data-theme="dark"] .fc-card .fc-card-devanagari { color: #f0e0c0; }
html[data-theme="dark"] .fc-card .fc-card-iast { color: #d4b78a; }
html[data-theme="dark"] .fc-card .fc-card-translation { color: #e6d6b8; }
html[data-theme="dark"] .fc-card .fc-card-link { color: #d4a060; }
html[data-theme="dark"] .fc-card .fc-card-link:hover { color: #f0a8b8; }
html[data-theme="dark"] .fc-fc-empty { background: #211a13; border-color: #3a3128; color: #d4a060; }
html[data-theme="dark"] .fc-fc-progress { color: #d4a060; }

/* Cloze flashcard styling */
.fc-cloze-answer {
    color: var(--fc-maroon);
    font-family: 'Lora', Georgia, serif;
    font-size: 0.92rem;
    background: #FBF1F1;
    border-left: 3px solid var(--fc-maroon);
    padding: 0.45rem 0.8rem;
    border-radius: 4px;
    margin-bottom: 0.7rem;
    text-align: left;
}
.fc-cloze-answer strong {
    font-family: 'Noto Serif', Georgia, serif;
    font-style: italic;
    font-size: 1rem;
}
.fc-cloze-revealed {
    background: #FCEFA1;
    color: #6B1D2A;
    padding: 0 3px;
    border-radius: 2px;
    font-weight: 600;
}
html[data-theme="dark"] .fc-cloze-answer { background: #2a181b; border-left-color: #c84a64; color: #f0a8b8; }
html[data-theme="dark"] .fc-cloze-revealed { background: #5a4419; color: #f0e0c0; }

/* ───────── Class prep handout ───────── */
.fc-prep-intro {
    color: #5a4a2a;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 0.6rem;
}
.fc-prep-toolbar {
    display: flex;
    gap: 0.5rem;
    margin: 0 0 1.5rem;
}
.fc-prep-verse {
    padding: 0.8rem 0 1.2rem;
    border-bottom: 1px solid #E8DCC8;
    page-break-inside: avoid;
    break-inside: avoid;
}
.fc-prep-ref {
    font-family: 'Lora', Georgia, serif;
    color: var(--fc-maroon);
    font-size: 1.2rem;
    margin: 0 0 0.4rem;
}
.fc-prep-translation {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.04rem;
    line-height: 1.65;
    color: #3a2f1a;
    margin: 0 0 0.6rem;
}
.fc-prep-essence {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-size: 0.96rem;
    line-height: 1.6;
    color: #5a4a2a;
    background: #FCF8E8;
    border-left: 3px solid #C8B47A;
    padding: 0.45rem 0.8rem;
    border-radius: 3px;
    margin: 0 0 0.6rem;
}
.fc-prep-essence-label { font-style: normal; font-weight: 700; color: var(--fc-maroon); }
.fc-prep-section-label {
    font-family: 'Lora', Georgia, serif;
    font-size: 0.78rem;
    color: #6B5025;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    margin: 0.55rem 0 0.25rem;
}
.fc-prep-list {
    margin: 0 0 0.5rem 1.2rem;
    padding: 0;
    color: #3a2f1a;
}
.fc-prep-list li { margin: 0.15rem 0; line-height: 1.55; }
.fc-prep-discussion {
    color: #3a2f1a;
    font-style: italic;
    margin: 0 0 0.4rem;
}
html[data-theme="dark"] .fc-prep-intro { color: #d4b78a; }
html[data-theme="dark"] .fc-prep-verse { border-bottom-color: #3a3128; }
html[data-theme="dark"] .fc-prep-ref { color: #f0a8b8; }
html[data-theme="dark"] .fc-prep-translation { color: #e6d6b8; }
html[data-theme="dark"] .fc-prep-essence { background: #2a2218; color: #d4b78a; border-left-color: #8B6F2D; }
html[data-theme="dark"] .fc-prep-essence-label { color: #f0a8b8; }
html[data-theme="dark"] .fc-prep-section-label { color: #d4a060; }
html[data-theme="dark"] .fc-prep-list { color: #e6d6b8; }
html[data-theme="dark"] .fc-prep-discussion { color: #e6d6b8; }
@media print {
    .fc-prep-toolbar, .fc-prep-intro { display: none !important; }
    .fc-prep-verse { padding: 0.4rem 0 0.8rem; }
}

/* ───────── Word-for-word index ───────── */
.fc-words-search {
    width: 100%;
    background: white;
    border: 1px solid #D4C4A8;
    border-radius: 6px;
    padding: 0.5rem 0.9rem;
    font-family: 'Lora', Georgia, serif;
    font-size: 1rem;
    color: #3a2f1a;
    margin-bottom: 0.5rem;
    box-sizing: border-box;
}
.fc-words-search:focus { outline: none; border-color: var(--fc-maroon); box-shadow: 0 0 0 2px rgba(107,29,42,0.12); }
html[data-theme="dark"] .fc-words-search { background: #211a13; border-color: #3a3128; color: #e6d6b8; }
html[data-theme="dark"] .fc-words-search:focus { border-color: #c84a64; box-shadow: 0 0 0 2px rgba(200,74,100,0.2); }

.fc-words-meta {
    color: #8B7D6B;
    font-size: 0.85rem;
    margin: 0 0 0.7rem;
    font-family: 'Lora', Georgia, serif;
}

.fc-words-list { margin: 0 0 2rem; }
.fc-word-entry {
    border-bottom: 1px solid #E8DCC8;
}
.fc-word-summary {
    list-style: none;
    padding: 0.6rem 0.3rem;
    cursor: pointer;
    display: grid;
    grid-template-columns: minmax(10rem, 14rem) 1fr 4rem;
    gap: 0.8rem;
    align-items: baseline;
    font-family: 'Lora', Georgia, serif;
    color: #3a2f1a;
    transition: background 0.1s;
}
.fc-word-summary:hover { background: #FBF1F1; }
.fc-word-summary::-webkit-details-marker { display: none; }
.fc-word-iast {
    color: var(--fc-maroon);
    font-family: 'Noto Serif', Georgia, serif;
    font-style: italic;
    font-weight: 600;
    font-size: 1rem;
}
.fc-word-gloss {
    color: #5a4a2a;
    font-size: 0.93rem;
}
.fc-word-count {
    color: #8B7D6B;
    font-size: 0.82rem;
    text-align: right;
}
.fc-word-detail {
    padding: 0.2rem 0.5rem 0.8rem 1.2rem;
    border-left: 2px solid #ECDFC4;
    margin: 0 0 0.5rem 0.6rem;
}
.fc-word-other-glosses {
    color: #8B7D6B;
    font-size: 0.82rem;
    font-style: italic;
    margin-bottom: 0.35rem;
}
.fc-word-verses {
    list-style: none;
    padding: 0;
    margin: 0;
}
.fc-word-verses li { padding: 0.18rem 0; }
.fc-word-verses a {
    color: var(--fc-maroon);
    text-decoration: none;
    font-family: 'Lora', Georgia, serif;
    font-size: 0.9rem;
}
.fc-word-verses a:hover { text-decoration: underline; }
.fc-word-verse-gloss { color: #5a4a2a; font-size: 0.88rem; margin-left: 0.4rem; }

html[data-theme="dark"] .fc-word-entry { border-bottom-color: #3a3128; }
html[data-theme="dark"] .fc-word-summary { color: #e6d6b8; }
html[data-theme="dark"] .fc-word-summary:hover { background: #2a2218; }
html[data-theme="dark"] .fc-word-iast { color: #f0a8b8; }
html[data-theme="dark"] .fc-word-gloss { color: #d4b78a; }
html[data-theme="dark"] .fc-word-count { color: #a8946a; }
html[data-theme="dark"] .fc-word-detail { border-left-color: #3a3128; }
html[data-theme="dark"] .fc-word-other-glosses { color: #a8946a; }
html[data-theme="dark"] .fc-word-verses a { color: #f0a8b8; }
html[data-theme="dark"] .fc-word-verse-gloss { color: #d4b78a; }
html[data-theme="dark"] .fc-words-meta { color: #a8946a; }

/* ───────── Theme browser ───────── */
.fc-themes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.7rem;
    margin: 1rem 0 2rem;
}
.fc-theme-card {
    background: #FCFAF0;
    border: 1px solid #E8DCC8;
    border-left: 4px solid var(--fc-gold);
    border-radius: 6px;
    padding: 0.7rem 0.9rem;
    text-decoration: none;
    color: #3a2f1a;
    transition: transform 0.12s, box-shadow 0.12s;
    display: block;
}
.fc-theme-card:hover { transform: translateY(-1px); box-shadow: 0 3px 12px rgba(107,29,42,0.10); }
.fc-theme-name {
    font-family: 'Lora', Georgia, serif;
    color: var(--fc-maroon);
    font-weight: 700;
    font-size: 1rem;
    margin: 0 0 0.3rem;
}
.fc-theme-counts {
    display: flex;
    gap: 0.6rem;
    font-size: 0.78rem;
    color: #8B7D6B;
    flex-wrap: wrap;
}
.fc-theme-pri { color: var(--fc-maroon); font-weight: 600; }
.fc-theme-rel { color: #6B5025; }

.fc-theme-verse-list {
    list-style: none;
    padding: 0;
    margin: 0.4rem 0 1rem;
}
.fc-theme-verse-list li { border-bottom: 1px solid #E8DCC8; }
.fc-theme-verse-list li:last-child { border-bottom: none; }
.fc-theme-verse-list a {
    display: block;
    padding: 0.5rem 0.4rem;
    color: #3a2f1a;
    text-decoration: none;
}
.fc-theme-verse-list a:hover { background: #FBF1F1; }
.fc-theme-verse-list .vlabel {
    color: var(--fc-maroon);
    font-weight: 700;
    font-family: 'Lora', Georgia, serif;
    margin-right: 0.6rem;
    display: inline-block;
    min-width: 5.5rem;
}
.fc-theme-verse-list .vpreview { color: #5a4a2a; font-size: 0.93rem; }

html[data-theme="dark"] .fc-theme-card { background: #211a13; border-color: #3a3128; border-left-color: #d4a040; color: #e6d6b8; }
html[data-theme="dark"] .fc-theme-name { color: #f0a8b8; }
html[data-theme="dark"] .fc-theme-pri { color: #f0a8b8; }
html[data-theme="dark"] .fc-theme-rel { color: #d4a060; }
html[data-theme="dark"] .fc-theme-verse-list li { border-bottom-color: #3a3128; }
html[data-theme="dark"] .fc-theme-verse-list a { color: #e6d6b8; }
html[data-theme="dark"] .fc-theme-verse-list a:hover { background: #2a2218; }
html[data-theme="dark"] .fc-theme-verse-list .vlabel { color: #f0a8b8; }
html[data-theme="dark"] .fc-theme-verse-list .vpreview { color: #d4b78a; }

/* ───────── Chapter index (verse list) ───────── */
.fc-verse-list {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
}
.fc-verse-list li {
    border-bottom: 1px solid #E8DCC8;
    margin: 0;
}
.fc-verse-list li:last-child { border-bottom: none; }
.fc-verse-list a {
    display: block;
    padding: 0.7rem 0.4rem;
    color: #3a2f1a;
    text-decoration: none;
    transition: background 0.1s;
}
.fc-verse-list a:hover {
    background: #FBF1F1;
}
.fc-verse-list .vlabel {
    color: #6B1D2A;
    font-weight: 700;
    font-family: 'Lora', Georgia, serif;
    margin-right: 0.6rem;
    display: inline-block;
    min-width: 4ch;
}
.fc-verse-list .vpreview {
    color: #5a4a2a;
    font-size: 0.95rem;
}

/* ───────── Vedabase outbound link (subtle) ───────── */
.fc-source-link {
    font-size: 0.82rem;
    color: #8B7D6B;
    margin-top: 1.4rem;
    text-align: right;
}
.fc-source-link a { color: #6B5025; }

/* ───────── Landing page ───────── */
.fc-hero {
    text-align: center;
    margin: 1.5rem 0 2rem;
}
.fc-hero h1 {
    font-family: 'Lora', Georgia, serif;
    color: #6B1D2A;
    font-size: 2.1rem;
    margin: 0 0 0.5rem;
    letter-spacing: 0.03em;
}
.fc-hero p {
    color: #5a4a2a;
    font-size: 1.05rem;
    max-width: 60ch;
    margin: 0 auto;
    line-height: 1.7;
}

.fc-votd-card {
    background: #FCF8E8;
    border-left: 4px solid var(--fc-gold);
    border-radius: 4px;
    padding: 1.1rem 1.4rem;
    max-width: 700px;
    margin: 0.5rem auto;
}
.fc-votd-ref {
    font-family: 'Lora', Georgia, serif;
    color: var(--fc-maroon);
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}
.fc-votd-text {
    font-family: 'Lora', Georgia, serif;
    color: #3a2f1a;
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 0.7rem;
}
.fc-votd-link {
    color: #6B5025;
    font-size: 0.92rem;
    text-decoration: none;
    font-family: 'Lora', Georgia, serif;
}
.fc-votd-link:hover { color: var(--fc-maroon); text-decoration: underline; }
html[data-theme="dark"] .fc-votd-card { background: #2a2218; border-left-color: #d4a040; }
html[data-theme="dark"] .fc-votd-ref { color: #f0a8b8; }
html[data-theme="dark"] .fc-votd-text { color: #e6d6b8; }
html[data-theme="dark"] .fc-votd-link { color: #d4a060; }

.fc-votd-reflect {
    max-width: 700px;
    margin: 1.2rem auto 0;
    padding: 1rem 1.2rem;
    background: #FCF8E8;
    border: 1px solid #E8DCB8;
    border-left: 4px solid var(--fc-maroon);
    border-radius: 6px;
}
.fc-votd-reflect-label {
    font-family: 'Lora', Georgia, serif;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--fc-maroon);
    font-weight: 700;
    margin-bottom: 0.4rem;
}
.fc-votd-reflect-q {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.02rem;
    line-height: 1.55;
    color: #3a2f1a;
    font-style: italic;
    margin-bottom: 0.55rem;
}
.fc-votd-reflect-answer {
    width: 100%;
    background: white;
    border: 1px solid #D4C4A8;
    border-radius: 4px;
    padding: 0.6rem 0.8rem;
    font-family: 'Lora', Georgia, serif;
    font-size: 0.98rem;
    line-height: 1.55;
    color: #3a2f1a;
    resize: vertical;
    min-height: 80px;
    box-sizing: border-box;
}
.fc-votd-reflect-answer:focus { outline: none; border-color: var(--fc-maroon); box-shadow: 0 0 0 2px rgba(107, 29, 42, 0.12); }
.fc-votd-reflect-status {
    margin-top: 0.4rem;
    font-size: 0.78rem;
    font-style: italic;
    color: #8B7D6B;
    min-height: 1rem;
}
html[data-theme="dark"] .fc-votd-reflect { background: #2a181b; border-color: #3a3128; border-left-color: #c84a64; }
html[data-theme="dark"] .fc-votd-reflect-label { color: #f0a8b8; }
html[data-theme="dark"] .fc-votd-reflect-q { color: #e6d6b8; }
html[data-theme="dark"] .fc-votd-reflect-answer { background: #1a1612; border-color: #3a3128; color: #e6d6b8; }
html[data-theme="dark"] .fc-votd-reflect-answer:focus { border-color: #c84a64; box-shadow: 0 0 0 2px rgba(200, 74, 100, 0.2); }
html[data-theme="dark"] .fc-votd-reflect-status { color: #d4a060; }

/* ───────── 404 page ───────── */
.fc-404 {
    text-align: center;
    margin: 4rem auto;
    color: #6B5025;
}
.fc-404 h1 {
    font-size: 3rem;
    color: #6B1D2A;
    margin: 0 0 0.5rem;
}

/* ───────── Section-toggle hide rules (driven by toggle.js + localStorage) ───────── */
html[data-hide-devanagari="1"] [data-sec="devanagari"],
html[data-hide-iast="1"] [data-sec="iast"],
html[data-hide-pronunciation="1"] [data-sec="pronunciation"],
html[data-hide-synonyms="1"] [data-sec="synonyms"],
html[data-hide-blended="1"] [data-sec="blended"],
html[data-hide-purport="1"] [data-sec="purport"],
html[data-hide-gaudiya="1"] [data-sec="gaudiya"],
html[data-hide-classical="1"] [data-sec="classical"],
html[data-hide-personal_guidance="1"] [data-sec="personal_guidance"],
html[data-hide-related="1"] [data-sec="related"],
html[data-hide-lectures="1"] [data-sec="lectures"],
html[data-hide-analogy="1"] [data-sec="analogy"],
html[data-hide-stories-full="1"] [data-sec="stories-full"],
html[data-hide-important_words="1"] [data-sec="important_words"],
html[data-hide-note="1"] [data-sec="note"],
html[data-hide-study="1"] [data-sec="study"],
html[data-hide-study_qa="1"] [data-sec="study_qa"],
html[data-hide-study_essays="1"] [data-sec="study_essays"],
html[data-hide-chapter_overview="1"] [data-sec="chapter_overview"],
html[data-hide-breakdown="1"] [data-sec="breakdown"],
html[data-hide-section_banner="1"] [data-sec="section_banner"],
html[data-hide-bb_view="1"] [data-sec="bb_view"],
html[data-hide-audio_player="1"] [data-sec="audio_player"],
html[data-hide-recitation_slokas="1"] [data-sec="recitation_slokas"],
html[data-hide-quiz="1"] [data-sec="quiz"] {
    display: none !important;
}

/* ───────── Recitation reading-along view (2-column, 4 slokas in view) ───────── */
.fc-bg-recitation {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.fc-bg-audio-wrap { width: 100%; }
.fc-bg-slokas {
    overflow-y: auto;
    background: #FCFAF0;
    border: 1px solid #ECDFC4;
    border-radius: 4px;
    padding: 0 1rem;
    scroll-behavior: smooth;
    /* Default before audio play kicks in dynamic sizing (~4 rows = 8 slokas)
       Once playback starts, JS sets inline max-height to fit exactly 2 rows. */
    max-height: 24rem;
}
.fc-bg-slokas-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 1.2rem;
    row-gap: 0.4rem;
}
@media (max-width: 599px) {
    .fc-bg-slokas-inner { grid-template-columns: 1fr; }
}
.fc-bg-slokas-header {
    font-family: 'Lora', Georgia, serif;
    font-weight: 700;
    color: #6B5025;
    border-bottom: 1px solid #ECDFC4;
    padding: 0.4rem 0;
    margin-bottom: 0.4rem;
    position: sticky;
    top: 0;
    background: #FCFAF0;
    z-index: 1;
    grid-column: 1 / -1;
}
.fc-bg-slokas-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    flex-wrap: wrap;
}
.fc-bg-slokas-title { flex: 1; }
.fc-bg-slokas-hint {
    font-weight: 400;
    font-size: 0.84rem;
    color: #8B7D6B;
    font-style: italic;
}
.fc-bg-slokas-cal {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.fc-bg-cal-select {
    font-family: inherit;
    font-size: 0.86rem;
    padding: 0.2rem 0.5rem;
    border: 1px solid #ECDFC4;
    border-radius: 3px;
    background: #fff;
    color: #6B5025;
    cursor: pointer;
    min-width: 8rem;
}
.fc-bg-cal-select:hover { border-color: #B8860B; }
.fc-bg-sloka {
    padding: 0.6rem 0.4rem;
    border-bottom: 1px dashed #ECDFC4;
}
.fc-bg-sloka-num {
    font-family: 'Lora', Georgia, serif;
    color: #B8860B;
    font-weight: 700;
    font-size: 0.92rem;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

/* Audio Recitation collapsible header (same pattern as MCQ details) */
.fc-bg-audio-details > summary.fc-bg-audio-summary {
    cursor: pointer;
    list-style: none;
    user-select: none;
    /* visual style — copied from .fc-section-label so we can drop that class
       and avoid the global section-collapse click handler that interferes
       with native <details> toggling. */
    font-family: 'Lora', Georgia, serif;
    font-weight: 700;
    color: #6B5025;
    font-size: 0.92rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 1.0rem 0 0.45rem;
    border-bottom: 2px solid #C8B47A;
    padding-bottom: 0.22rem;
    width: fit-content;
}
.fc-bg-audio-details > summary.fc-bg-audio-summary::-webkit-details-marker { display: none; }
.fc-bg-audio-details > summary.fc-bg-audio-summary::before {
    content: "▾";
    color: #B8860B;
    display: inline-block;
    margin-right: 0.45rem;
    transition: transform 0.15s;
}
.fc-bg-audio-details:not([open]) > summary.fc-bg-audio-summary::before { transform: rotate(-90deg); }

/* ───────── MCQ quiz panel ───────── */
.fc-mcq-chapter, .fc-mcq-section {
    background: #F4F9F5;
    border-left: 4px solid #4A7C59;
    padding: 0.9rem 1.2rem;
    margin: 0.8rem 0 1.4rem;
    border-radius: 4px;
}
.fc-mcq-meta {
    font-size: 0.86rem;
    color: #5C7060;
    font-style: italic;
    margin-bottom: 0.6rem;
}
.fc-mcq-question {
    margin: 0.9rem 0;
    padding: 0.6rem 0.8rem;
    background: #fff;
    border: 1px solid #DAE5DC;
    border-radius: 3px;
}
.fc-mcq-question.fc-mcq-correct {
    border-left: 4px solid #4A7C59;
    background: #ECF6EE;
}
.fc-mcq-question.fc-mcq-wrong {
    border-left: 4px solid #B0413E;
    background: #FBEDEC;
}
.fc-mcq-q-text {
    font-family: 'Lora', Georgia, serif;
    font-weight: 600;
    color: #2a2a2a;
    margin-bottom: 0.4rem;
}
.fc-mcq-choices { list-style: none; padding-left: 0; margin: 0.3rem 0; }
.fc-mcq-choices label {
    display: block;
    padding: 0.25rem 0.4rem;
    cursor: pointer;
    border-radius: 3px;
}
.fc-mcq-choices label:hover { background: #F4F9F5; }
.fc-mcq-choices input[type="radio"] { margin-right: 0.5rem; }
.fc-mcq-rationale {
    margin-top: 0.5rem;
    padding: 0.4rem 0.7rem;
    background: #F8F8E8;
    border-left: 3px solid #B8860B;
    font-size: 0.9rem;
    color: #5C5040;
    font-style: italic;
    display: none;
}
.fc-mcq-question.fc-mcq-correct .fc-mcq-rationale,
.fc-mcq-question.fc-mcq-wrong .fc-mcq-rationale { display: block; }
.fc-mcq-actions {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    margin-top: 0.8rem;
    flex-wrap: wrap;
}
.fc-mcq-btn {
    padding: 0.45rem 1rem;
    border: 1px solid #4A7C59;
    background: #4A7C59;
    color: #fff;
    border-radius: 3px;
    cursor: pointer;
    font-family: inherit;
}
.fc-mcq-btn:hover { background: #6B9E78; }
.fc-mcq-btn-secondary {
    background: #fff;
    color: #4A7C59;
}
.fc-mcq-btn-secondary:hover { background: #ECF6EE; color: #4A7C59; }
.fc-mcq-score {
    font-family: 'Lora', Georgia, serif;
    font-weight: 700;
    color: #4A7C59;
}
.fc-mcq-refs {
    font-size: 0.82rem;
    color: #8B7D6B;
    margin-top: 0.3rem;
}
.fc-mcq-details > summary.fc-mcq-summary {
    cursor: pointer;
    list-style: none;
    user-select: none;
    /* visual style — copied from .fc-section-label (see fc-bg-audio-summary) */
    font-family: 'Lora', Georgia, serif;
    font-weight: 700;
    color: #6B5025;
    font-size: 0.92rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 1.0rem 0 0.45rem;
    border-bottom: 2px solid #C8B47A;
    padding-bottom: 0.22rem;
    width: fit-content;
}
.fc-mcq-details > summary.fc-mcq-summary::-webkit-details-marker { display: none; }
.fc-mcq-details > summary.fc-mcq-summary::before {
    content: "▾";
    color: #4A7C59;
    display: inline-block;
    margin-right: 0.45rem;
    transition: transform 0.15s;
}
.fc-mcq-details:not([open]) > summary.fc-mcq-summary::before { transform: rotate(-90deg); }

/* Auto-scroll highlight: the active sloka during recitation */
.fc-bg-sloka.fc-bg-sloka-active {
    background: #FBF6E4;
    border-left: 3px solid #B8860B;
    padding-left: 0.6rem;
    transition: background 0.3s;
}

/* BG chapter audio player */
.fc-bg-audio {
    background: #FCF8E8;
    border-left: 4px solid #B8860B;
    padding: 0.8rem 1.1rem;
    margin: 0.8rem 0 1.4rem;
    border-radius: 4px;
}
.fc-bg-audio-picker {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 0.6rem;
    font-family: 'Lora', Georgia, serif;
}
.fc-bg-audio-picker label {
    font-weight: 700;
    color: #6B5025;
}
.fc-bg-audio-picker select {
    flex: 1;
    min-width: 18rem;
    max-width: 28rem;
    padding: 0.35rem 0.6rem;
    font-family: inherit;
    font-size: 0.95rem;
    border: 1px solid #ECDFC4;
    border-radius: 4px;
    background: #fff;
    color: #2a2a2a;
}
.fc-bg-audio-coverage {
    font-size: 0.82rem;
    color: #8B7D6B;
    font-style: italic;
}
.fc-bg-audio audio {
    width: 100%;
    max-width: 42rem;
    margin: 0.3rem 0;
}
/* Master toggle: when unchecked, hides ALL Gauranga-Priya-derived sections at once. */
html[data-hide-gpd_all="1"] [data-sec="study"],
html[data-hide-gpd_all="1"] [data-sec="chapter_overview"],
html[data-hide-gpd_all="1"] [data-sec="breakdown"],
html[data-hide-gpd_all="1"] [data-sec="section_banner"] {
    display: none !important;
}

/* BG 6-layer master cascades — each layer master hides all its members. */
html[data-hide-layer_prabhupada="1"] [data-sec="devanagari"],
html[data-hide-layer_prabhupada="1"] [data-sec="iast"],
html[data-hide-layer_prabhupada="1"] [data-sec="pronunciation"],
html[data-hide-layer_prabhupada="1"] [data-sec="synonyms"],
html[data-hide-layer_prabhupada="1"] [data-sec="blended"],
html[data-hide-layer_prabhupada="1"] [data-sec="purport"] {
    display: none !important;
}
html[data-hide-layer_gaudiya="1"] [data-sec="gaudiya"],
html[data-hide-layer_gaudiya="1"] [data-sec="classical"] {
    display: none !important;
}
html[data-hide-layer_recitation_pg="1"] [data-sec="audio_player"],
html[data-hide-layer_recitation_pg="1"] [data-sec="recitation_slokas"],
html[data-hide-layer_recitation_pg="1"] [data-sec="personal_guidance"] {
    display: none !important;
}
html[data-hide-layer_sanskrit_analysis="1"] [data-sec="classical_analysis"] {
    display: none !important;
}
html[data-hide-layer_study_aids="1"] [data-sec="quiz"],
html[data-hide-layer_study_aids="1"] [data-sec="study_qa"],
html[data-hide-layer_study_aids="1"] [data-sec="study_essays"],
html[data-hide-layer_study_aids="1"] [data-sec="study"],
html[data-hide-layer_study_aids="1"] [data-sec="chapter_overview"],
html[data-hide-layer_study_aids="1"] [data-sec="breakdown"],
html[data-hide-layer_study_aids="1"] [data-sec="section_banner"] {
    display: none !important;
}
html[data-hide-layer_connections="1"] [data-sec="related"],
html[data-hide-layer_connections="1"] [data-sec="lectures"],
html[data-hide-layer_connections="1"] [data-sec="stories-full"],
html[data-hide-layer_connections="1"] [data-sec="analogy"],
html[data-hide-layer_connections="1"] [data-sec="important_words"] {
    display: none !important;
}

.fc-toggle-master {
    grid-column: 1 / -1;
    padding: 0.25rem 0;
    border-bottom: 1px dashed #C8B47A;
    margin-bottom: 0.25rem;
    color: #6B1D2A;
}

/* BG 6-layer sidebar — collapsible layer panels + preset chips */

/* Preset chip row */
.fc-display-presets {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
    margin: 0 0 0.6rem;
    padding: 0.3rem 0.4rem;
    background: #fff8e6;
    border: 1px solid #e0c890;
    border-radius: 4px;
}
.fc-preset-chip {
    flex: 1;
    min-width: 0;
    padding: 5px 2px;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border: 1px solid #d4b78a;
    background: #fff;
    color: #5a4520;
    border-radius: 3px;
    cursor: pointer;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.fc-preset-chip:hover { background: #fdf3d8; }
.fc-preset-chip:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    background: #f0e4c8;
}
.fc-preset-chip.fc-preset-active {
    background: #6B1D2A;
    color: #fff;
    border-color: #6B1D2A;
}
.fc-preset-chip.fc-preset-active:disabled {
    background: #b89a6a;
    color: #fff;
    border-color: #b89a6a;
    opacity: 1;
}

/* Layered display — block layout, not grid */
.fc-sb-layers {
    display: block;
}

/* Each layer is a <details> panel */
.fc-layer-panel {
    border-top: 1px solid #d4b78a;
    margin: 0;
    padding: 0;
}
.fc-layer-panel:first-of-type {
    border-top: none;
}
.fc-layer-summary {
    cursor: pointer;
    list-style: none;
    padding: 0.45rem 0 0.35rem;
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    user-select: none;
}
.fc-layer-summary::-webkit-details-marker { display: none; }
.fc-layer-summary::before {
    content: "▸";
    color: #b89a6a;
    transition: transform 0.15s;
    display: inline-block;
    font-size: 0.8rem;
    width: 0.7rem;
    line-height: 1.4;
    flex-shrink: 0;
}
.fc-layer-panel[open] > .fc-layer-summary::before {
    transform: rotate(90deg);
}
.fc-layer-master-label {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex: 1;
    min-width: 0;
    color: #4a3a20;
    font-size: 13px;
    line-height: 1.3;
}
.fc-layer-master-label strong {
    color: #6B1D2A;
    font-weight: 700;
    font-size: 13.5px;
    line-height: 1.25;
}
.fc-layer-master-label input[type="checkbox"] {
    flex-shrink: 0;
    margin: 0;
}
.fc-layer-count {
    font-size: 10.5px;
    color: #7a5a3a;
    font-variant-numeric: tabular-nums;
    background: #f0e4c8;
    padding: 1px 6px;
    border-radius: 8px;
    min-width: 28px;
    text-align: center;
    flex-shrink: 0;
    align-self: center;
}
.fc-layer-count.fc-count-all-off {
    background: #f5dada;
    color: #8a3030;
}
.fc-layer-count.fc-count-all-on {
    background: #d8eddc;
    color: #2e5f46;
}

/* Children inside a layer */
.fc-layer-children {
    padding: 0.1rem 0 0.5rem 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.fc-layer-child {
    font-size: 0.88rem;
    color: #4a3a20;
}
.fc-layer-child-master {
    border-top: 1px dotted #d4b78a;
    margin-top: 0.3rem;
    padding-top: 0.35rem;
    font-weight: 600;
    color: #5a4520;
}
.fc-layer-grandchild {
    padding-left: 1.1rem;
    font-size: 0.85rem;
    color: #5a4520;
}

.fc-sb-layer-divider {
    margin: 0.8rem 0 0.3rem;
    padding-top: 0.5rem;
    border-top: 1px solid #d4b78a;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #7a5a3a;
    font-weight: 700;
}
.fc-layer-personal {
    font-size: 0.88rem;
    color: #4a3a20;
}

/* Reset button in action row */
.fc-sb-actions [data-action="reset-display"] {
    margin-left: auto;
    color: #6B1D2A;
}

/* Dark theme */
html[data-theme="dark"] .fc-display-presets {
    background: #1f1a12; border-color: #4a3a20;
}
html[data-theme="dark"] .fc-preset-chip {
    background: #2a2218; color: #d4b78a; border-color: #4a3a20;
}
html[data-theme="dark"] .fc-preset-chip:hover { background: #3a3128; }
html[data-theme="dark"] .fc-preset-chip:disabled {
    background: #1a1612; color: #7a5a3a;
}
html[data-theme="dark"] .fc-preset-chip.fc-preset-active {
    background: #e08aa0; color: #1f1a12; border-color: #e08aa0;
}
html[data-theme="dark"] .fc-preset-chip.fc-preset-active:disabled {
    background: #6a5a3a; color: #1f1a12; border-color: #6a5a3a;
}
html[data-theme="dark"] .fc-layer-panel { border-top-color: #4a3a20; }
html[data-theme="dark"] .fc-layer-master-label { color: #d4b78a; }
html[data-theme="dark"] .fc-layer-master-label strong { color: #e08aa0; }
html[data-theme="dark"] .fc-layer-count {
    background: #2a2218; color: #b89a6a;
}
html[data-theme="dark"] .fc-layer-count.fc-count-all-off {
    background: #3a1a1a; color: #f0a8b8;
}
html[data-theme="dark"] .fc-layer-count.fc-count-all-on {
    background: #1a2a20; color: #8fd0a8;
}
html[data-theme="dark"] .fc-layer-child { color: #c8b48a; }
html[data-theme="dark"] .fc-layer-child-master {
    border-top-color: #4a3a20; color: #d4b78a;
}
html[data-theme="dark"] .fc-layer-grandchild { color: #b89a6a; }
html[data-theme="dark"] .fc-sb-layer-divider {
    border-top-color: #4a3a20; color: #b89a6a;
}
html[data-theme="dark"] .fc-layer-personal { color: #c8b48a; }
html[data-theme="dark"] .fc-sb-actions [data-action="reset-display"] { color: #e08aa0; }

/* ───────── Toggle panel (Display options) ───────── */
.fc-toggle-panel {
    background: #FBF6E4;
    border: 1px solid #E8DCB8;
    border-radius: 6px;
    padding: 0.5rem 0.9rem;
    margin: 0.6rem 0 1.2rem;
}
.fc-toggle-panel > summary {
    cursor: pointer;
    list-style: none;
    font-family: 'Lora', Georgia, serif;
    font-size: 0.92rem;
    color: #6B5025;
    font-weight: 600;
    user-select: none;
    padding: 0.15rem 0;
}
.fc-toggle-panel > summary::-webkit-details-marker { display: none; }
.fc-toggle-panel > summary::after {
    content: " ▾";
    font-size: 0.75rem;
    color: #8B7D6B;
}
.fc-toggle-panel[open] > summary::after { content: " ▴"; }
.fc-toggle-icon {
    display: inline-block;
    margin-right: 0.35rem;
    opacity: 0.8;
}
.fc-toggle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.35rem 1rem;
    margin-top: 0.7rem;
    padding-top: 0.55rem;
    border-top: 1px dashed #E8DCB8;
}
.fc-toggle-grid label {
    font-family: 'Lora', Georgia, serif;
    font-size: 0.92rem;
    color: #3a2f1a;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    user-select: none;
}
.fc-toggle-grid input[type="checkbox"] {
    accent-color: var(--fc-maroon);
    width: 1rem;
    height: 1rem;
    cursor: pointer;
}

/* ───────── Chapter view: verse blocks + jump strip + dividers ───────── */
.fc-ribbon {
    position: sticky;
    top: 0;
    z-index: 80;
    margin: -1.6rem -1.8rem 1rem;
    padding: 0.55rem 1.4rem 0.55rem;
    background: #FAF6E8;
    border-bottom: 1px solid #DCD0B0;
}
html[data-theme="sepia"] .fc-ribbon { background: #F4E4C5; }
html[data-theme="cream"] .fc-ribbon { background: #FAF1DD; }
html[data-theme="dark"] .fc-ribbon { background: #1a1612; border-bottom-color: #3a3128; }
.fc-ribbon-row {
    display: flex;
    align-items: baseline;
    gap: 0.8rem;
    flex-wrap: wrap;
}
.fc-ribbon-row .fc-verse-heading {
    margin: 0;
    font-size: 1.15rem;
}
.fc-ribbon-meta {
    color: #8B7D6B;
    font-size: 0.85rem;
}
.fc-ribbon-link { color: #6B5025; text-decoration: none; }
.fc-ribbon-link:hover { color: var(--fc-maroon); text-decoration: underline; }
html[data-theme="dark"] .fc-ribbon-link { color: #d4a060; }
html[data-theme="dark"] .fc-ribbon-link:hover { color: #f0a8b8; }
.fc-ribbon-current {
    margin-left: auto;
    font-family: 'Lora', Georgia, serif;
    color: var(--fc-maroon);
    font-weight: 700;
    font-size: 0.95rem;
    min-width: 5rem;
    text-align: right;
}
html[data-theme="dark"] .fc-ribbon-current { color: #f0a8b8; }

.fc-search {
    flex: 1 1 220px;
    max-width: 360px;
    background: white;
    border: 1px solid #D4C4A8;
    border-radius: 16px;
    padding: 0.25rem 0.8rem;
    font-family: 'Lora', Georgia, serif;
    font-size: 0.9rem;
    color: #3a2f1a;
}
.fc-search:focus { outline: none; border-color: var(--fc-maroon); box-shadow: 0 0 0 2px rgba(107, 29, 42, 0.15); }
html[data-theme="dark"] .fc-search { background: #211a13; border-color: #3a3128; color: #e6d6b8; }
html[data-theme="dark"] .fc-search:focus { border-color: #c84a64; box-shadow: 0 0 0 2px rgba(200, 74, 100, 0.25); }

.fc-hidden-by-search { display: none !important; }
.fc-jump-pill.fc-search-dim { opacity: 0.28; }
.fc-verse-divider.fc-hidden-by-search { display: none !important; }

/* Inline match highlight (CSS Custom Highlight API). Falls back silently
   to no highlight on browsers that don't support it; search still works. */
::highlight(fc-search) {
    background-color: rgba(252, 239, 161, 0.75);
    color: inherit;
}
html[data-theme="dark"] ::highlight(fc-search) {
    background-color: rgba(212, 160, 96, 0.45);
}

/* Cross-chapter search results */
.fc-search-global {
    background: white;
    border: 1px solid #D4C4A8;
    border-radius: 6px;
    margin: 0.45rem 0 0;
    padding: 0.4rem 0.6rem 0.5rem;
    max-height: 360px;
    overflow-y: auto;
}
.fc-search-global-header {
    font-family: 'Lora', Georgia, serif;
    font-size: 0.82rem;
    color: #6B5025;
    padding: 0.25rem 0.15rem;
    border-bottom: 1px solid #DCD0B0;
    margin-bottom: 0.35rem;
}
.fc-search-global-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.fc-search-global-list li {
    border-bottom: 1px solid #f0e8d2;
}
.fc-search-global-list li:last-child { border-bottom: none; }
.fc-search-global-list a {
    color: #3a2f1a;
    text-decoration: none;
    display: block;
    padding: 0.45rem 0.3rem;
    border-radius: 3px;
}
.fc-search-global-list a:hover { background: #FBF1F1; }
.fc-search-ref {
    color: var(--fc-maroon);
    font-weight: 700;
    font-family: 'Lora', Georgia, serif;
    font-size: 0.9rem;
    margin-bottom: 0.15rem;
}
.fc-search-preview {
    color: #5a4a2a;
    font-size: 0.88rem;
    line-height: 1.5;
}
.fc-search-preview mark {
    background: #FCEFA1;
    color: inherit;
    padding: 0 1px;
    border-radius: 2px;
}
.fc-search-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #fff;
    background: var(--fc-maroon);
    padding: 1px 5px;
    border-radius: 3px;
    vertical-align: 2px;
    margin-right: 0.35rem;
}
html[data-theme="dark"] .fc-search-badge { background: #b04050; color: #fff; }
html[data-theme="dark"] .fc-search-global { background: #211a13; border-color: #3a3128; }
html[data-theme="dark"] .fc-search-global-header { color: #d4a060; border-bottom-color: #3a3128; }
html[data-theme="dark"] .fc-search-global-list li { border-bottom-color: #3a3128; }
html[data-theme="dark"] .fc-search-global-list a { color: #e6d6b8; }
html[data-theme="dark"] .fc-search-global-list a:hover { background: #2a2218; }
html[data-theme="dark"] .fc-search-ref { color: #f0a8b8; }
html[data-theme="dark"] .fc-search-preview { color: #d4b78a; }
html[data-theme="dark"] .fc-search-preview mark { background: #5a4419; color: #f0e0c0; }

.fc-jump-strip {
    display: flex;
    gap: 0.3rem 0.35rem;
    margin: 0.4rem 0 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
    scrollbar-width: thin;
    scrollbar-color: #C8B47A transparent;
}
.fc-jump-strip::-webkit-scrollbar { height: 6px; }
.fc-jump-strip::-webkit-scrollbar-thumb { background: #C8B47A; border-radius: 3px; }
.fc-jump-pill.active {
    background: var(--fc-maroon);
    color: #FFF8F0 !important;
    border-color: var(--fc-maroon);
}
html[data-theme="dark"] .fc-jump-pill.active { background: #c84a64; color: #1a1612 !important; border-color: #c84a64; }
.fc-jump-pill {
    display: inline-block;
    background: #F0E8D2;
    border: 1px solid #D4C4A8;
    border-radius: 12px;
    padding: 0.1rem 0.55rem;
    font-size: 0.82rem;
    color: #6B5025 !important;
    text-decoration: none !important;
    line-height: 1.6;
    transition: background 0.12s;
    font-family: 'Lora', Georgia, serif;
}
.fc-jump-pill:hover { background: #E8DCB8; color: #3a2f1a !important; }

.fc-verse-block {
    scroll-margin-top: 130px;
    padding: 0.4rem 0 0.8rem;
}
.fc-verse-block-header {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    margin: 0.4rem 0 0.8rem;
}
.fc-verse-block-label {
    font-family: 'Lora', Georgia, serif;
    color: #6B1D2A;
    font-size: 1.25rem;
    margin: 0;
    letter-spacing: 0.02em;
}
.fc-verse-permalink {
    font-size: 0.95rem;
    color: #8B7D6B;
    text-decoration: none;
    padding: 0 0.3rem;
    border-radius: 3px;
    transition: background 0.12s, color 0.12s;
}
.fc-verse-permalink:hover {
    background: #F0E8D2;
    color: #6B1D2A;
}
.fc-verse-divider {
    border: none;
    border-top: 1px dashed #DCD0B0;
    margin: 1.6rem 0;
}

.fc-back-to-chapter {
    font-family: 'Lora', Georgia, serif;
    color: #6B5025;
    text-decoration: none;
    font-size: 0.92rem;
}
.fc-back-to-chapter:hover {
    color: var(--fc-maroon);
    text-decoration: underline;
}

/* ───────── Left sidebar (display options, tools, bookmarks) ───────── */
.fc-left-sidebar {
    position: sticky;
    top: 0;
    align-self: start;
    max-height: 100vh;
    overflow-y: auto;
    border-right: 1px solid #E8DCC8;
    padding: 1rem 0.5rem 2rem 0.4rem;
    font-family: 'Lora', Georgia, serif;
    scrollbar-width: thin;
    scrollbar-color: #C8B47A transparent;
}
.fc-left-sidebar::-webkit-scrollbar { width: 8px; }
.fc-left-sidebar::-webkit-scrollbar-thumb { background: #C8B47A; border-radius: 4px; }

.fc-sb-collapse {
    background: #F0E8D2;
    border: 1px solid #D4C4A8;
    color: #6B5025;
    width: 26px;
    height: 26px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.6rem;
    transition: background 0.12s;
}
.fc-sb-collapse:hover { background: #E8DCB8; }
.fc-left-sidebar .fc-sb-collapse::before { content: "‹"; font-size: 1rem; line-height: 1; }
.fc-sidebar .fc-sb-collapse::before { content: "›"; font-size: 1rem; line-height: 1; }
html[data-left-collapsed="1"] .fc-left-sidebar .fc-sb-collapse::before { content: "›"; }
html[data-right-collapsed="1"] .fc-sidebar .fc-sb-collapse::before { content: "‹"; }
html[data-left-collapsed="1"] .fc-left-sidebar .fc-sb-body,
html[data-right-collapsed="1"] .fc-sidebar .fc-sb-body { display: none; }
html[data-left-collapsed="1"] .fc-left-sidebar { padding: 0.6rem 0.3rem; border-right-color: transparent; }
html[data-right-collapsed="1"] .fc-sidebar { padding: 0.6rem 0.3rem; border-left-color: transparent; }

.fc-sb-section {
    margin-bottom: 1.2rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px dashed #DCD0B0;
}
.fc-sb-section:last-child { border-bottom: none; }
.fc-sb-title {
    font-family: 'Lora', Georgia, serif;
    font-weight: 700;
    color: #6B1D2A;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 0 0 0.5rem;
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    user-select: none;
}
/* When a section is a <details>, make summary clickable with a chevron */
details.fc-sb-section > summary.fc-sb-title {
    cursor: pointer;
    list-style: none;
    padding: 0.2rem 0;
    margin: 0 0 0.4rem;
    align-items: center;
}
details.fc-sb-section > summary.fc-sb-title::-webkit-details-marker { display: none; }
details.fc-sb-section > summary.fc-sb-title::before {
    content: "▸";
    color: #C8B47A;
    transition: transform 0.15s;
    display: inline-block;
    width: 0.9rem;
    font-size: 0.85rem;
}
details.fc-sb-section[open] > summary.fc-sb-title::before {
    transform: rotate(90deg);
}
details.fc-sb-section[open] > summary.fc-sb-title {
    margin-bottom: 0.6rem;
    border-bottom: 1px dotted #DCD0B0;
    padding-bottom: 0.4rem;
}
html[data-theme="dark"] details.fc-sb-section > summary.fc-sb-title::before { color: #b89a6a; }
html[data-theme="dark"] details.fc-sb-section[open] > summary.fc-sb-title { border-bottom-color: #3a3128; }
.fc-sb-sub { user-select: none; }
.fc-sb-count {
    background: var(--fc-gold);
    color: white;
    border-radius: 10px;
    padding: 0 0.45rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0;
}
.fc-sb-sub {
    font-family: 'Lora', Georgia, serif;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #8B7D6B;
    margin: 0.55rem 0 0.3rem;
    font-weight: 600;
}
.fc-segmented {
    display: flex;
    gap: 0;
    margin-bottom: 0.5rem;
    border: 1px solid #D4C4A8;
    border-radius: 5px;
    overflow: hidden;
    background: #FBF6E4;
}
.fc-segmented button {
    flex: 1;
    background: transparent;
    border: none;
    border-right: 1px solid #DCD0B0;
    color: #6B5025;
    padding: 0.35rem 0.4rem;
    font-size: 0.82rem;
    font-family: 'Lora', Georgia, serif;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
    white-space: nowrap;
}
.fc-segmented button:last-child { border-right: none; }
.fc-segmented button:hover { background: #F0E8D2; }
.fc-segmented button.active {
    background: var(--fc-maroon);
    color: #FFF8F0;
    font-weight: 600;
}

.fc-sb-grid {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.86rem;
    color: #3a2f1a;
}
.fc-sb-grid label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
    user-select: none;
}
.fc-sb-grid input[type="checkbox"] {
    accent-color: var(--fc-maroon);
    width: 0.95rem;
    height: 0.95rem;
    cursor: pointer;
}
.fc-sb-actions {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.6rem;
}
.fc-sb-actions button {
    flex: 1;
    background: #FBF6E4;
    border: 1px solid #D4C4A8;
    color: #6B5025;
    padding: 0.3rem 0.4rem;
    border-radius: 4px;
    font-size: 0.78rem;
    cursor: pointer;
    font-family: 'Lora', Georgia, serif;
    transition: background 0.12s;
}
.fc-sb-actions button:hover { background: #F0E8D2; }

.fc-sb-tools {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.fc-tool-btn {
    background: #FBF6E4;
    border: 1px solid #D4C4A8;
    color: #6B5025;
    padding: 0.4rem 0.6rem;
    border-radius: 5px;
    font-size: 0.86rem;
    cursor: pointer;
    text-align: left;
    font-family: 'Lora', Georgia, serif;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.fc-tool-btn:hover { background: #F0E8D2; border-color: #8B6F2D; }
.fc-tool-btn.active {
    background: #6B5025;
    color: #FAF6E8;
    border-color: #6B5025;
}
.fc-tool-btn-tiny {
    background: white;
    border: 1px solid #C8B47A;
    color: #6B5025;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    font-size: 0.74rem;
    cursor: pointer;
    margin-left: auto;
}
.fc-pen-palette {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.4rem;
    background: #FBF6E4;
    border: 1px solid #D4C4A8;
    border-radius: 5px;
}
.fc-pen-swatch {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #ccc;
    cursor: pointer;
    transition: transform 0.1s, border-color 0.12s;
}
.fc-pen-swatch:hover { transform: scale(1.12); }
.fc-pen-swatch.active {
    border-color: #3a2f1a;
    box-shadow: 0 0 0 2px white, 0 0 0 4px #3a2f1a;
}

/* ───────── Per-verse notes ───────── */
.fc-note-block {
    margin: 1.2rem 0 0.4rem;
    background: #FBF6E4;
    border: 1px solid #E8DCB8;
    border-left: 4px solid var(--fc-gold);
    border-radius: 5px;
    padding: 0.55rem 0.9rem;
}
.fc-note-block > summary {
    list-style: none;
    cursor: pointer;
    font-family: 'Lora', Georgia, serif;
    font-size: 0.92rem;
    color: #6B5025;
    font-weight: 600;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.fc-note-block > summary::-webkit-details-marker { display: none; }
.fc-note-block > summary::after {
    content: "▾";
    color: #B8A878;
    font-size: 0.78rem;
    margin-left: auto;
    transition: transform 0.15s;
}
.fc-note-block[open] > summary::after { transform: rotate(180deg); }
.fc-note-block.has-content > summary {
    color: var(--fc-maroon);
}
.fc-note-block.has-content > summary .fc-note-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--fc-gold);
    display: inline-block;
}
.fc-note-textarea {
    width: 100%;
    margin-top: 0.55rem;
    background: white;
    border: 1px solid #D4C4A8;
    border-radius: 4px;
    padding: 0.6rem 0.8rem;
    font-family: 'Lora', Georgia, serif;
    font-size: 0.98rem;
    line-height: 1.55;
    color: #3a2f1a;
    resize: vertical;
    min-height: 80px;
}
.fc-note-textarea:focus { outline: none; border-color: var(--fc-maroon); box-shadow: 0 0 0 2px rgba(107, 29, 42, 0.12); }
.fc-note-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.4rem;
    font-size: 0.78rem;
}
.fc-note-status { color: #8B7D6B; font-style: italic; flex: 1; }
.fc-note-delete {
    background: transparent;
    border: 1px solid #D4C4A8;
    color: #8B5520;
    padding: 0.15rem 0.6rem;
    border-radius: 4px;
    font-size: 0.78rem;
    cursor: pointer;
    font-family: 'Lora', Georgia, serif;
}
.fc-note-delete:hover { background: #F0E8D2; color: var(--fc-maroon); }

html[data-theme="dark"] .fc-note-block { background: #211a13; border-color: #3a3128; border-left-color: #d4a040; }
html[data-theme="dark"] .fc-note-block > summary { color: #d4a060; }
html[data-theme="dark"] .fc-note-block.has-content > summary { color: #f0a8b8; }
html[data-theme="dark"] .fc-note-textarea { background: #2a2218; border-color: #3a3128; color: #e6d6b8; }
html[data-theme="dark"] .fc-note-textarea:focus { border-color: #c84a64; box-shadow: 0 0 0 2px rgba(200, 74, 100, 0.2); }
html[data-theme="dark"] .fc-note-delete { color: #e89868; border-color: #3a3128; }
html[data-theme="dark"] .fc-note-delete:hover { background: #2a2218; }

/* ───────── My annotations modal ───────── */
.fc-notes-modal {
    position: fixed;
    inset: 0;
    z-index: 99998;
}
.fc-notes-modal[hidden] { display: none; }
.fc-notes-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.55); }
.fc-notes-modal-content {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: #FAF6E8;
    border-radius: 12px;
    padding: 1.3rem 1.5rem 1.1rem;
    max-width: 700px;
    width: 92vw;
    max-height: 88vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 70px rgba(0,0,0,0.45);
    font-family: 'Lora', Georgia, serif;
    color: #3a2f1a;
}
.fc-notes-modal-content h2 {
    margin: 0 0 0.5rem;
    color: var(--fc-maroon);
    font-size: 1.2rem;
}
.fc-notes-modal-scope {
    color: #8B7D6B;
    font-size: 0.85rem;
    margin-bottom: 0.7rem;
}
.fc-notes-modal-tabs {
    display: flex;
    gap: 0.3rem;
    border-bottom: 1px solid #DCD0B0;
    margin-bottom: 0.5rem;
}
.fc-notes-tab {
    background: transparent;
    border: none;
    color: #6B5025;
    padding: 0.45rem 0.8rem;
    font-family: 'Lora', Georgia, serif;
    font-size: 0.92rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.fc-notes-tab.active {
    color: var(--fc-maroon);
    font-weight: 600;
    border-bottom-color: var(--fc-maroon);
}
.fc-notes-tab-count {
    color: #B8A878;
    font-size: 0.8rem;
    margin-left: 0.25rem;
}
.fc-notes-tab.active .fc-notes-tab-count { color: var(--fc-maroon); }
.fc-notes-modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 0.3rem 0.1rem 0.4rem;
    margin-bottom: 0.8rem;
}
.fc-notes-item {
    padding: 0.55rem 0.4rem;
    border-bottom: 1px solid #f0e8d2;
}
.fc-notes-item:last-child { border-bottom: none; }
.fc-notes-item a.fc-notes-ref {
    color: var(--fc-maroon);
    font-weight: 700;
    font-family: 'Lora', Georgia, serif;
    text-decoration: none;
}
.fc-notes-item a.fc-notes-ref:hover { text-decoration: underline; }
.fc-notes-item-text {
    color: #5a4a2a;
    font-size: 0.92rem;
    line-height: 1.5;
    margin: 0.2rem 0 0;
    white-space: pre-wrap;
}
.fc-notes-item-hl {
    background: #FCEFA1;
    padding: 0 2px;
    border-radius: 2px;
}
.fc-notes-modal-empty {
    color: #8B7D6B;
    font-style: italic;
    padding: 1rem 0;
    text-align: center;
}
.fc-notes-modal-close { width: 100%; text-align: center; }
html[data-theme="dark"] .fc-notes-modal-content { background: #1a1612; color: #e6d6b8; }
html[data-theme="dark"] .fc-notes-modal-content h2 { color: #f0a8b8; }
html[data-theme="dark"] .fc-notes-modal-scope { color: #a8946a; }
html[data-theme="dark"] .fc-notes-modal-tabs { border-bottom-color: #3a3128; }
html[data-theme="dark"] .fc-notes-tab { color: #d4a060; }
html[data-theme="dark"] .fc-notes-tab.active { color: #f0a8b8; border-bottom-color: #c84a64; }
html[data-theme="dark"] .fc-notes-tab-count { color: #a8946a; }
html[data-theme="dark"] .fc-notes-tab.active .fc-notes-tab-count { color: #f0a8b8; }
html[data-theme="dark"] .fc-notes-item { border-bottom-color: #3a3128; }
html[data-theme="dark"] .fc-notes-item a.fc-notes-ref { color: #f0a8b8; }
html[data-theme="dark"] .fc-notes-item-text { color: #d4b78a; }
html[data-theme="dark"] .fc-notes-item-hl { background: #5a4419; color: #f0e0c0; }

/* ───────── Share-as-image modal ───────── */
.fc-share-modal {
    position: fixed;
    inset: 0;
    z-index: 99998;
}
.fc-share-modal[hidden] { display: none; }
.fc-share-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
}
.fc-share-content {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: #FAF6E8;
    border-radius: 12px;
    padding: 1.4rem 1.6rem;
    max-width: 580px;
    width: 92vw;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 24px 70px rgba(0,0,0,0.45);
    font-family: 'Lora', Georgia, serif;
    color: #3a2f1a;
}
.fc-share-content h2 {
    margin: 0 0 0.8rem;
    color: var(--fc-maroon);
    font-size: 1.15rem;
}
.fc-share-canvas {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    background: #FAF6E8;
    border: 1px solid #D4C4A8;
    border-radius: 6px;
    margin-bottom: 0.85rem;
}
.fc-share-actions {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
}
.fc-share-actions .fc-tool-btn { flex: 1 1 auto; text-align: center; }
.fc-share-status {
    margin-top: 0.5rem;
    color: #6B5025;
    font-size: 0.85rem;
    min-height: 1.2rem;
}
html[data-theme="dark"] .fc-share-content { background: #1a1612; color: #e6d6b8; }
html[data-theme="dark"] .fc-share-content h2 { color: #f0a8b8; }
html[data-theme="dark"] .fc-share-canvas { background: #1a1612; border-color: #3a3128; }
html[data-theme="dark"] .fc-share-status { color: #d4a060; }

/* ───────── Keyboard shortcuts modal ───────── */
.fc-shortcuts-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99997;
}
body[data-shortcuts="1"] .fc-shortcuts-modal { display: block; }
.fc-shortcuts-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
}
.fc-shortcuts-content {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: #FAF6E8;
    border-radius: 12px;
    padding: 1.6rem 2rem;
    max-width: 480px;
    width: 92vw;
    box-shadow: 0 20px 60px rgba(0,0,0,0.45);
    font-family: 'Lora', Georgia, serif;
    color: #3a2f1a;
}
.fc-shortcuts-content h2 {
    margin: 0 0 1.1rem;
    color: var(--fc-maroon);
    font-size: 1.2rem;
    letter-spacing: 0.02em;
}
.fc-shortcuts-list {
    display: grid;
    grid-template-columns: max-content 1fr;
    column-gap: 1.3rem;
    row-gap: 0.55rem;
    margin: 0 0 1.4rem;
}
.fc-shortcuts-list dt {
    margin: 0;
    white-space: nowrap;
}
.fc-shortcuts-list dd {
    margin: 0;
    color: #3a2f1a;
    line-height: 1.5;
}
.fc-shortcuts-list kbd {
    background: white;
    border: 1px solid #D4C4A8;
    border-bottom-width: 2px;
    border-radius: 4px;
    padding: 0.1rem 0.55rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.85rem;
    color: #6B5025;
    margin-right: 0.2rem;
    display: inline-block;
}
#fc-shortcuts-close { width: 100%; text-align: center; }
html[data-theme="dark"] .fc-shortcuts-content { background: #1a1612; color: #e6d6b8; }
html[data-theme="dark"] .fc-shortcuts-content h2 { color: #f0a8b8; }
html[data-theme="dark"] .fc-shortcuts-list dd { color: #e6d6b8; }
html[data-theme="dark"] .fc-shortcuts-list kbd { background: #2a2218; border-color: #3a3128; color: #d4a060; }

/* ───────── TTS master toggle ───────── */
#fc-tts-controls .fc-sb-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
}
.fc-tts-master {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    user-select: none;
    font-size: 0.78rem;
    color: #6B5025;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 600;
}
.fc-tts-master input[type="checkbox"] {
    accent-color: var(--fc-maroon);
    width: 0.95rem;
    height: 0.95rem;
    cursor: pointer;
}
/* When TTS master is off, hide read-aloud buttons + dim the inner controls. */
html[data-tts-off="1"] .fc-readout-btn { display: none !important; }
html[data-tts-off="1"] #fc-tts-controls .fc-tts-inner { display: none; }

/* ───────── TTS voice + rate ───────── */
.fc-tts-select {
    width: 100%;
    background: white;
    border: 1px solid #D4C4A8;
    border-radius: 4px;
    padding: 0.3rem 0.4rem;
    font-family: 'Lora', Georgia, serif;
    font-size: 0.82rem;
    color: #3a2f1a;
    margin-bottom: 0.4rem;
}
.fc-tts-rate {
    width: 100%;
    accent-color: var(--fc-maroon);
}
.fc-tts-rate-val {
    color: #6B5025;
    font-weight: 700;
    font-size: 0.78rem;
    margin-left: 0.4rem;
}
html[data-theme="dark"] .fc-tts-select { background: #211a13; border-color: #3a3128; color: #e6d6b8; }
html[data-theme="dark"] .fc-tts-rate-val { color: #d4a060; }

/* ───────── Reading progress + streak ───────── */
.fc-progress-row {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    color: #3a2f1a;
    font-family: 'Lora', Georgia, serif;
}
.fc-progress-num {
    color: var(--fc-maroon);
    font-weight: 700;
    font-size: 1.3rem;
}
.fc-progress-divider, .fc-progress-total {
    color: #8B7D6B;
    font-size: 1rem;
}
.fc-progress-label {
    color: #6B5025;
    font-size: 0.78rem;
    margin-left: 0.3rem;
}
.fc-progress-bar {
    background: #E8DCB8;
    height: 6px;
    border-radius: 3px;
    margin: 0.45rem 0 0.45rem;
    overflow: hidden;
}
.fc-progress-bar-fill {
    background: linear-gradient(90deg, var(--fc-gold), var(--fc-maroon));
    height: 100%;
    width: 0%;
    transition: width 0.4s ease;
}
.fc-progress-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: #6B5025;
}
.fc-progress-spacer { flex: 1; }
.fc-progress-reset {
    background: transparent;
    border: 1px solid #D4C4A8;
    color: #6B5025;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    font-size: 0.9rem;
    line-height: 1;
}
.fc-progress-reset:hover { background: #F0E8D2; color: var(--fc-maroon); }
html[data-theme="dark"] .fc-progress-num { color: #f0a8b8; }
html[data-theme="dark"] .fc-progress-bar { background: #2a2218; }
html[data-theme="dark"] .fc-progress-meta { color: #d4a060; }
html[data-theme="dark"] .fc-progress-reset { border-color: #3a3128; color: #d4a060; }

/* ───────── Bookmark star + list ───────── */
.fc-bookmark-btn {
    background: none;
    border: none;
    color: #C8B47A;
    cursor: pointer;
    font-size: 1.05rem;
    padding: 0 0.3rem;
    line-height: 1;
    transition: color 0.12s, transform 0.12s;
}
.fc-share-btn {
    background: none;
    border: none;
    color: #8B7D6B;
    cursor: pointer;
    font-size: 0.95rem;
    padding: 0 0.3rem;
    line-height: 1;
    transition: color 0.12s, transform 0.12s, filter 0.12s;
    opacity: 0.65;
}
.fc-share-btn:hover { color: var(--fc-maroon); transform: scale(1.15); opacity: 1; }
.fc-bookmark-btn:hover { color: var(--fc-maroon); transform: scale(1.15); }
.fc-bookmark-btn.active { color: var(--fc-gold); }
.fc-bookmark-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.fc-bookmark-list li {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0;
}
.fc-bookmark-list a {
    color: #6B5025;
    text-decoration: none;
    font-size: 0.88rem;
    flex: 1;
}
.fc-bookmark-list a:hover { color: var(--fc-maroon); text-decoration: underline; }
.fc-bm-remove {
    background: none;
    border: none;
    color: #B8A878;
    cursor: pointer;
    font-size: 0.95rem;
    padding: 0 0.2rem;
    line-height: 1;
}
.fc-bm-remove:hover { color: var(--fc-maroon); }
.fc-sb-empty {
    color: #8B7D6B;
    font-size: 0.84rem;
    font-style: italic;
    padding: 0.3rem 0;
}

/* ───────── Per-section expand/collapse ───────── */
.fc-section-label {
    cursor: pointer;
    user-select: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.fc-section-label::before {
    content: "▾";
    font-size: 0.72rem;
    color: #B8A878;
    transition: transform 0.15s;
    display: inline-block;
}
/* Hidden via collapse: rule emitted per-section based on html[data-collapsed-{name}] */
html[data-collapsed-synonyms="1"] section[data-sec="synonyms"] > :not(.fc-section-label),
html[data-collapsed-purport="1"] section[data-sec="purport"] > :not(.fc-section-label),
html[data-collapsed-gaudiya="1"] section[data-sec="gaudiya"] > :not(.fc-section-label),
html[data-collapsed-classical="1"] section[data-sec="classical"] > :not(.fc-section-label),
html[data-collapsed-personal_guidance="1"] section[data-sec="personal_guidance"] > :not(.fc-section-label),
html[data-collapsed-related="1"] section[data-sec="related"] > :not(.fc-section-label),
html[data-collapsed-lectures="1"] section[data-sec="lectures"] > :not(.fc-section-label),
html[data-collapsed-analogy="1"] section[data-sec="analogy"] > :not(.fc-section-label),
html[data-collapsed-stories-full="1"] section[data-sec="stories-full"] > :not(.fc-section-label),
html[data-collapsed-important_words="1"] section[data-sec="important_words"] > :not(.fc-section-label),
html[data-collapsed-study="1"] section[data-sec="study"] > :not(.fc-section-label),
html[data-collapsed-study_qa="1"] section[data-sec="study_qa"] > :not(.fc-section-label),
html[data-collapsed-study_essays="1"] section[data-sec="study_essays"] > :not(.fc-section-label),
html[data-collapsed-chapter_overview="1"] section[data-sec="chapter_overview"] > :not(.fc-section-label),
html[data-collapsed-breakdown="1"] section[data-sec="breakdown"] > :not(.fc-section-label),
html[data-collapsed-bb_view="1"] section[data-sec="bb_view"] > :not(.fc-section-label) {
    display: none !important;
}
html[data-collapsed-synonyms="1"] section[data-sec="synonyms"] > .fc-section-label::before,
html[data-collapsed-purport="1"] section[data-sec="purport"] > .fc-section-label::before,
html[data-collapsed-gaudiya="1"] section[data-sec="gaudiya"] > .fc-section-label::before,
html[data-collapsed-classical="1"] section[data-sec="classical"] > .fc-section-label::before,
html[data-collapsed-personal_guidance="1"] section[data-sec="personal_guidance"] > .fc-section-label::before,
html[data-collapsed-related="1"] section[data-sec="related"] > .fc-section-label::before,
html[data-collapsed-lectures="1"] section[data-sec="lectures"] > .fc-section-label::before,
html[data-collapsed-analogy="1"] section[data-sec="analogy"] > .fc-section-label::before,
html[data-collapsed-stories-full="1"] section[data-sec="stories-full"] > .fc-section-label::before,
html[data-collapsed-important_words="1"] section[data-sec="important_words"] > .fc-section-label::before,
html[data-collapsed-study="1"] section[data-sec="study"] > .fc-section-label::before,
html[data-collapsed-study_qa="1"] section[data-sec="study_qa"] > .fc-section-label::before,
html[data-collapsed-study_essays="1"] section[data-sec="study_essays"] > .fc-section-label::before,
html[data-collapsed-chapter_overview="1"] section[data-sec="chapter_overview"] > .fc-section-label::before,
html[data-collapsed-breakdown="1"] section[data-sec="breakdown"] > .fc-section-label::before,
html[data-collapsed-bb_view="1"] section[data-sec="bb_view"] > .fc-section-label::before {
    transform: rotate(-90deg);
}

/* ───────── Book Bhagavata blended view on SB canto pages ───────── */
.fc-bb-blend {
    background: #FCF8E8;
    border-left: 4px solid #B8860B;
    padding: 0.9rem 1.2rem;
    margin: 1rem 0 1.4rem;
    border-radius: 4px;
}
.fc-bb-blend-body {
    font-family: 'Lora', Georgia, serif;
    line-height: 1.65;
    color: #2a2a2a;
}
.fc-bb-blend-body p { margin: 0.5rem 0; }
.fc-bb-blend-cta {
    margin-top: 0.6rem !important;
}
.fc-bb-blend-cta a {
    color: #B8860B;
    font-weight: 600;
    text-decoration: none;
}
.fc-bb-blend-cta a:hover { text-decoration: underline; }
.fc-bb-blend-attrib {
    font-size: 0.86rem;
    color: #8B7D6B;
    font-style: italic;
    margin-top: 0.4rem !important;
}

/* ───────── Text highlights (6-color) ───────── */
.cr-highlight {
    border-radius: 2px;
    padding: 0 1px;
    cursor: pointer;
    transition: filter 0.15s;
}
.cr-highlight:hover { filter: brightness(0.95); }
.cr-highlight-yellow { background-color: #FCEFA1; }
.cr-highlight-green  { background-color: #C8E6C9; }
.cr-highlight-blue   { background-color: #BBDEFB; }
.cr-highlight-pink   { background-color: #F8BBD0; }
.cr-highlight-orange { background-color: #FFCC80; }
.cr-highlight-purple { background-color: #D1C4E9; }

/* Read-aloud play button (per-section) */
.fc-readout-btn {
    background: transparent;
    border: 1px solid #D4C4A8;
    color: #6B5025;
    border-radius: 12px;
    padding: 1px 8px;
    font-size: 0.7rem;
    cursor: pointer;
    line-height: 1.3;
    margin-left: 0.55rem;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
    vertical-align: middle;
}
.fc-readout-btn:hover { background: #F0E8D2; border-color: #8B6F2D; }
.fc-readout-btn.playing { background: #6B5025; color: #FAF6E8; border-color: #6B5025; }
html[data-theme="dark"] .fc-readout-btn { border-color: #3a3128; color: #d4a060; }
html[data-theme="dark"] .fc-readout-btn:hover { background: #2a2218; }
html[data-theme="dark"] .fc-readout-btn.playing { background: #d4a060; color: #1a1612; border-color: #d4a060; }

.fc-translation { position: relative; }
.fc-translation > .fc-readout-btn {
    position: absolute;
    top: 0.45rem;
    right: 0.7rem;
    margin-left: 0;
}

/* Floating highlight pill */
#fc-hl-pill {
    position: absolute;
    background: white;
    border: 1px solid #C8B47A;
    border-radius: 18px;
    padding: 5px 7px;
    box-shadow: 0 3px 14px rgba(0,0,0,0.18);
    z-index: 99999;
    display: none;
    gap: 3px;
    align-items: center;
    font-size: 14px;
    user-select: none;
}
#fc-hl-pill .hl-btn {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-block;
    transition: transform 0.1s;
}
#fc-hl-pill .hl-btn:hover { transform: scale(1.18); }
#fc-hl-pill .hl-yellow { background: #FCEFA1; }
#fc-hl-pill .hl-green  { background: #C8E6C9; }
#fc-hl-pill .hl-blue   { background: #BBDEFB; }
#fc-hl-pill .hl-pink   { background: #F8BBD0; }
#fc-hl-pill .hl-orange { background: #FFCC80; }
#fc-hl-pill .hl-purple { background: #D1C4E9; }
#fc-hl-pill .hl-cancel {
    background: transparent;
    border: 1px solid #DCD0B0;
    color: #8B7D6B;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#fc-hl-eraser {
    position: absolute;
    background: white;
    border: 1px solid #D4C4A8;
    border-radius: 14px;
    padding: 3px 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    z-index: 99999;
    display: none;
    font-size: 12px;
    cursor: pointer;
    user-select: none;
    color: #6B1D2A;
    font-family: 'Lora', Georgia, serif;
}
#fc-hl-eraser:hover { background: #FBF1F1; }

/* ───────── Pen tool overlay ───────── */
#fc-pen-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 99990;
    display: none;
    touch-action: none;
}
body.pen-active #fc-pen-canvas {
    display: block;
    pointer-events: auto;
    cursor: crosshair;
}
body.pen-active { user-select: none; }

/* Floating pen toggle (FAB) — always visible bottom-right, quick on/off. */
.fc-pen-fab {
    position: fixed;
    bottom: 22px;
    right: 22px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid #C8B47A;
    background: white;
    box-shadow: 0 4px 14px rgba(0,0,0,0.18);
    cursor: pointer;
    font-size: 1.35rem;
    z-index: 99992;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, transform 0.1s, border-color 0.15s, box-shadow 0.15s;
    user-select: none;
}
.fc-pen-fab:hover { transform: scale(1.06); border-color: #8B6F2D; }
body.pen-active .fc-pen-fab {
    background: #6B5025;
    color: white;
    border-color: #6B5025;
    box-shadow: 0 4px 20px rgba(107, 80, 37, 0.45), 0 0 0 4px rgba(107, 80, 37, 0.15);
}
body.pen-active .fc-pen-fab::after {
    content: "";
    position: absolute;
    bottom: 6px;
    right: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #FF5252;
    box-shadow: 0 0 0 2px white;
}

/* "P" shortcut hint inside pen-mode button */
.fc-kbd {
    background: white;
    border: 1px solid #D4C4A8;
    border-bottom-width: 2px;
    border-radius: 3px;
    padding: 0 0.35rem;
    font-family: monospace;
    font-size: 0.75rem;
    color: #6B5025;
    margin-left: auto;
}
#fc-pen-toggle.active .fc-kbd { background: #5a4419; color: #FAF6E8; border-color: #4a3712; }
#fc-pen-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ───────── Right-side tree navigation ───────── */
.fc-sidebar {
    border-left: 1px solid #E8DCC8;
    padding: 1.5rem 0.6rem 2rem 1rem;
    font-family: 'Lora', Georgia, serif;
    position: sticky;
    top: 0;
    align-self: start;
    max-height: 100vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #C8B47A transparent;
}
.fc-sidebar::-webkit-scrollbar { width: 8px; }
.fc-sidebar::-webkit-scrollbar-thumb { background: #C8B47A; border-radius: 4px; }
@media (max-width: 900px) {
    .fc-sidebar {
        position: static;
        max-height: none;
        border-left: none;
        border-top: 1px solid #E8DCC8;
        margin: 1.4rem 0.6rem 0;
        padding: 1rem 0.4rem 2rem;
    }
}
.fc-tree-title {
    font-family: 'Lora', Georgia, serif;
    font-weight: 700;
    color: #6B1D2A;
    font-size: 0.92rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin: 0 0 0.6rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid #DCD0B0;
}
.fc-tree-chapter {
    margin: 0;
}
.fc-tree-chapter > summary {
    list-style: none;
    cursor: pointer;
    padding: 0.32rem 0.4rem;
    border-radius: 4px;
    color: #6B5025;
    font-weight: 600;
    font-size: 0.93rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    user-select: none;
    transition: background 0.1s;
}
.fc-tree-chapter > summary:hover { background: #FBF1F1; color: var(--fc-maroon); }
.fc-tree-chapter > summary::-webkit-details-marker { display: none; }
.fc-tree-chapter > summary::before {
    content: "▸";
    font-size: 0.72rem;
    color: #B8A878;
    margin-right: 0.3rem;
    transition: transform 0.15s;
    display: inline-block;
}
.fc-tree-chapter[open] > summary::before { transform: rotate(90deg); }
.fc-tree-ch-num { flex: 0 0 auto; font-weight: 600; }
.fc-tree-ch-title {
    flex: 1;
    min-width: 0;
    margin-left: 0.4rem;
    font-size: 0.82rem;
    font-weight: 400;
    color: #6E5A3C;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.fc-tree-ch-meta {
    color: #A89B82;
    font-size: 0.78rem;
    font-weight: 500;
    flex: 0 0 auto;
}
html[data-theme="dark"] .fc-tree-ch-title { color: #c4b08b; }
.fc-tree-verses {
    list-style: none;
    margin: 0.2rem 0 0.5rem 0.6rem;
    padding: 0 0 0 0.4rem;
    border-left: 1px solid #ECDFC4;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(2.4rem, 1fr));
    gap: 0.15rem;
}
.fc-tree-verses li { margin: 0; }
.fc-tree-verses a {
    display: block;
    text-align: center;
    padding: 0.2rem 0.3rem;
    border-radius: 3px;
    text-decoration: none;
    color: #5a4a2a;
    font-size: 0.82rem;
    line-height: 1.3;
    transition: background 0.1s;
}
.fc-tree-verses a:hover { background: #F0E8D2; color: #3a2f1a; }
.fc-tree-verses a.active {
    background: var(--fc-maroon);
    color: #FFF8F0;
    font-weight: 700;
}

/* ───────── Related lectures list ───────── */
.fc-lecture-list {
    list-style: none;
    margin: 0.3rem 0;
    padding: 0;
}
.fc-lecture-item {
    background: #FCFAF0;
    border-left: 3px solid #C8B47A;
    padding: 0.55rem 0.85rem;
    margin: 0.4rem 0;
    border-radius: 3px;
}
.fc-lecture-title {
    font-family: 'Lora', Georgia, serif;
    color: #6B1D2A;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.97rem;
    line-height: 1.4;
}
.fc-lecture-title:hover { text-decoration: underline; }
.fc-lecture-meta {
    color: #8B7D6B;
    font-size: 0.8rem;
    margin-top: 0.18rem;
    line-height: 1.4;
}

/* ═══════════════════════════════════════════════════════════════
   Layout — single-column (default) vs side-by-side (Sanskrit / English)
   ═══════════════════════════════════════════════════════════════ */
html[data-layout="side"] .fc-verse-block {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 1.6rem;
    align-items: start;
}
html[data-layout="side"] .fc-verse-block > .fc-verse-block-header { grid-column: 1 / -1; }
html[data-layout="side"] .fc-verse-block > [data-sec="devanagari"],
html[data-layout="side"] .fc-verse-block > [data-sec="iast"],
html[data-layout="side"] .fc-verse-block > [data-sec="synonyms"],
html[data-layout="side"] .fc-verse-block > [data-sec="blended"] { grid-column: 1; }
html[data-layout="side"] .fc-verse-block > [data-sec="translation"],
html[data-layout="side"] .fc-verse-block > [data-sec="purport"],
html[data-layout="side"] .fc-verse-block > [data-sec="gaudiya"],
html[data-layout="side"] .fc-verse-block > [data-sec="classical"],
html[data-layout="side"] .fc-verse-block > [data-sec="personal_guidance"],
html[data-layout="side"] .fc-verse-block > [data-sec="related"],
html[data-layout="side"] .fc-verse-block > [data-sec="lectures"],
html[data-layout="side"] .fc-verse-block > .fc-note-block,
html[data-layout="side"] .fc-verse-block > .fc-source-link { grid-column: 2; }
@media (max-width: 1000px) {
    html[data-layout="side"] .fc-verse-block {
        grid-template-columns: 1fr;
    }
    html[data-layout="side"] .fc-verse-block > * { grid-column: 1 !important; }
}

/* ═══════════════════════════════════════════════════════════════
   Reading preferences — theme, font, size
   ═══════════════════════════════════════════════════════════════ */

/* Size: scales the rem-based UI (everything that uses rem grows/shrinks). */
html[data-size="small"]  { font-size: 15px; }
html[data-size="normal"] { font-size: 16px; }
html[data-size="large"]  { font-size: 18px; }
html[data-size="xl"]     { font-size: 20px; }

/* Font: applies to body prose. Devanāgarī always uses Noto Sans Devanagari. */
html[data-font="sans"] body,
html[data-font="sans"] .fc-container,
html[data-font="sans"] .cr-purport-body,
html[data-font="sans"] .fc-translation,
html[data-font="sans"] .cr-acarya-purp,
html[data-font="sans"] .cr-acarya-purp p,
html[data-font="sans"] .fc-pg-essence,
html[data-font="sans"] .fc-pg-list,
html[data-font="sans"] .cr-synonyms-grid .cr-syn-en {
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", system-ui, sans-serif !important;
}
html[data-font="dyslexic"] body,
html[data-font="dyslexic"] .fc-container,
html[data-font="dyslexic"] .cr-purport-body,
html[data-font="dyslexic"] .fc-translation,
html[data-font="dyslexic"] .cr-acarya-purp,
html[data-font="dyslexic"] .cr-acarya-purp p,
html[data-font="dyslexic"] .fc-pg-essence,
html[data-font="dyslexic"] .fc-pg-list,
html[data-font="dyslexic"] .cr-synonyms-grid .cr-syn-en {
    font-family: "Atkinson Hyperlegible", system-ui, sans-serif !important;
}

/* Theme: Sepia */
html[data-theme="sepia"] body { background: #F4E4C5; color: #3a2a14; }
html[data-theme="sepia"] .fc-verse-block-label { color: #6B1D2A; }

/* Theme: Cream (slight warmer) */
html[data-theme="cream"] body { background: #FAF1DD; color: #3a2f1a; }

/* Theme: Light (default — explicit so toggling back works cleanly) */
html[data-theme="light"] body { background: #FAF6E8; color: #3b2f20; }

/* Theme: Dark */
html[data-theme="dark"] body { background: #1a1612; color: #d8c8a8; }
html[data-theme="dark"] .fc-container,
html[data-theme="dark"] .fc-verse-block,
html[data-theme="dark"] .cr-purport-body,
html[data-theme="dark"] .cr-purport-body p,
html[data-theme="dark"] .cr-acarya-purp,
html[data-theme="dark"] .cr-acarya-purp p,
html[data-theme="dark"] .fc-pg-essence,
html[data-theme="dark"] .fc-pg-list li,
html[data-theme="dark"] .cr-syn-en {
    color: #e6d6b8;
}
html[data-theme="dark"] .cr-devanagari { color: #f0e0c0; }
html[data-theme="dark"] .cr-iast,
html[data-theme="dark"] .cr-iast-line { color: #d4b78a; }
html[data-theme="dark"] .cr-syn-iast { color: #f0b896; }
html[data-theme="dark"] .fc-translation,
html[data-theme="dark"] .fc-pg-essence,
html[data-theme="dark"] .cr-blend-grid { background: #2a2218; border-left-color: #8B6F2D; color: #f0e0c0; }
html[data-theme="dark"] .fc-translation::before { color: #c89858; }
html[data-theme="dark"] .cr-blend-iast-line,
html[data-theme="dark"] .cr-blend-pair .cr-blend-iast { color: #f0b896; }
html[data-theme="dark"] .cr-blend-pair .cr-blend-en { color: #d4b78a; }
html[data-theme="dark"] .cr-blend-pair:hover { background: #3a2a14; }
html[data-theme="dark"] .cr-acarya-card { background: #211a13; box-shadow: none; }
html[data-theme="dark"] .cr-acarya-card.gaudiya { background: #2a181b; border-left-color: #c84a64; }
html[data-theme="dark"] .cr-acarya-card.classical { background: #2a2310; border-left-color: #d4a040; }
html[data-theme="dark"] .cr-acarya-card.gaudiya .cr-acarya-name { color: #f0a8b8; }
html[data-theme="dark"] .cr-acarya-card.classical .cr-acarya-name { color: #f0c878; }
html[data-theme="dark"] .cr-acarya-trans { background: rgba(255,255,255,0.04); color: #e6d6b8; }
html[data-theme="dark"] .cr-acarya-label { color: #c89858; }
html[data-theme="dark"] .fc-pg-age { background: #1f1812; border-color: #3a3128; }
html[data-theme="dark"] .fc-pg-age-label,
html[data-theme="dark"] .fc-pg-sub { color: #d4a060; }
html[data-theme="dark"] .fc-left-sidebar,
html[data-theme="dark"] .fc-sidebar { border-color: #3a3128; }
html[data-theme="dark"] .fc-sb-title { color: #f0a8b8; }
html[data-theme="dark"] .fc-tree-title { color: #f0a8b8; border-bottom-color: #3a3128; }
html[data-theme="dark"] .fc-tree-chapter > summary { color: #d4a060; }
html[data-theme="dark"] .fc-tree-chapter > summary:hover { background: #2a2218; color: #f0a8b8; }
html[data-theme="dark"] .fc-tree-verses { border-left-color: #3a3128; }
html[data-theme="dark"] .fc-tree-verses a { color: #d4b78a; }
html[data-theme="dark"] .fc-tree-verses a:hover { background: #3a3128; color: #f0e0c0; }
html[data-theme="dark"] .fc-tree-verses a.active { background: #c84a64; color: #1a1612; }
html[data-theme="dark"] .fc-breadcrumbs { color: #c89858; }
html[data-theme="dark"] .fc-breadcrumbs a { color: #d4a060; }
html[data-theme="dark"] .fc-breadcrumbs .sep { color: #6a5a3a; }
html[data-theme="dark"] .fc-section-label { color: #d4a060; border-bottom-color: #5a4419; }
html[data-theme="dark"] .fc-verse-block-label { color: #f0a8b8; }
html[data-theme="dark"] .cr-purport-attrib { color: #a8946a; }
html[data-theme="dark"] hr,
html[data-theme="dark"] .fc-verse-divider { border-color: #3a3128; }
html[data-theme="dark"] .fc-prevnext a { background: #211a13; border-color: #3a3128; color: #d4a060; }
html[data-theme="dark"] .fc-prevnext a:hover { background: #2a2218; color: #f0e0c0; }
html[data-theme="dark"] .fc-prevnext a span.label { color: #f0a8b8; }
html[data-theme="dark"] .fc-jump-pill { background: #211a13; border-color: #3a3128; color: #d4a060 !important; }
html[data-theme="dark"] .fc-jump-pill:hover { background: #3a3128; color: #f0e0c0 !important; }
html[data-theme="dark"] .fc-chapter-card { background: #211a13; color: #e6d6b8; border-color: #3a3128; border-left-color: #d4a040; }
html[data-theme="dark"] .fc-chapter-card .ch-num { color: #f0a8b8; }
html[data-theme="dark"] .fc-chapter-card .ch-title { color: #d4b78a; }
html[data-theme="dark"] .fc-chapter-card .ch-meta { color: #a8946a; }
html[data-theme="dark"] .fc-sb-section { border-bottom-color: #3a3128; }
html[data-theme="dark"] .fc-segmented { background: #211a13; border-color: #3a3128; }
html[data-theme="dark"] .fc-segmented button { color: #d4a060; border-right-color: #3a3128; }
html[data-theme="dark"] .fc-segmented button:hover { background: #2a2218; }
html[data-theme="dark"] .fc-segmented button.active { background: #c84a64; color: #1a1612; }
html[data-theme="dark"] .fc-tool-btn { background: #211a13; border-color: #3a3128; color: #d4a060; }
html[data-theme="dark"] .fc-tool-btn:hover { background: #2a2218; color: #f0e0c0; }
html[data-theme="dark"] .fc-tool-btn.active { background: #d4a060; color: #1a1612; border-color: #d4a060; }
html[data-theme="dark"] .fc-sb-actions button { background: #211a13; border-color: #3a3128; color: #d4a060; }
html[data-theme="dark"] .fc-sb-actions button:hover { background: #2a2218; }
html[data-theme="dark"] .fc-sb-collapse { background: #211a13; border-color: #3a3128; color: #d4a060; }
html[data-theme="dark"] .fc-sb-collapse:hover { background: #2a2218; }
html[data-theme="dark"] .fc-bookmark-list a { color: #d4a060; }
html[data-theme="dark"] .fc-bookmark-list a:hover { color: #f0a8b8; }
html[data-theme="dark"] .fc-bookmark-btn { color: #5a4419; }
html[data-theme="dark"] .fc-bookmark-btn.active { color: #f0c878; }
html[data-theme="dark"] .fc-pen-fab { background: #2a2218; color: #d4a060; border-color: #4a4128; }
html[data-theme="dark"] .fc-pen-fab:hover { border-color: #d4a060; }
html[data-theme="dark"] .fc-sb-empty { color: #a8946a; }
html[data-theme="dark"] .fc-kbd { background: #2a2218; border-color: #4a4128; color: #d4a060; }
html[data-theme="dark"] .cr-pron-line { color: #8a7a5a; }
html[data-theme="dark"] .fc-source-link a { color: #d4a060; }
html[data-theme="dark"] .fc-lecture-item { background: #211a13; border-left-color: #d4a040; }
html[data-theme="dark"] .fc-lecture-title { color: #f0a8b8; }
html[data-theme="dark"] .fc-lecture-meta { color: #a8946a; }
html[data-theme="dark"] .cr-related-pv { background: #d4a040; color: #1a1612; }
html[data-theme="dark"] .cr-value-pill { background: #1f3144; border-color: #2a4258; color: #b8d8f0; }
html[data-theme="dark"] .cr-verse-link { background: #2a2010; border-color: #4a3812; color: #e8c39a !important; }
html[data-theme="dark"] .cr-verse-link:hover { background: #3a2a12; color: #f0c878 !important; }
html[data-theme="dark"] .fc-site-footer { color: #8a7a5a; border-color: #3a3128; }

/* ═══════════════════════════════════════════════════════════════
   Presentation mode — full-screen, one verse at a time.
   ═══════════════════════════════════════════════════════════════ */
body.presentation .fc-site-header,
body.presentation .fc-site-footer,
body.presentation .fc-left-sidebar,
body.presentation .fc-sidebar,
body.presentation .fc-ribbon,
body.presentation .fc-prevnext,
body.presentation .fc-source-link,
body.presentation .fc-breadcrumbs,
body.presentation .fc-back-to-chapter,
body.presentation .fc-overlay-backdrop,
body.presentation .fc-mobile-trigger,
body.presentation .fc-chapter-overview,
body.presentation .fc-breakdown-card,
body.presentation .fc-section-banner,
body.presentation .fc-toggle-panel {
    display: none !important;
}
body.presentation .fc-layout {
    display: block !important;
    grid-template-columns: none !important;
    max-width: none !important;
    padding: 0 !important;
}
body.presentation .fc-container {
    max-width: 1200px !important;
    padding: 3rem 2.4rem 4rem !important;
    margin: 0 auto !important;
}
body.presentation article.fc-verse-block:not(.fc-presentation-current) {
    display: none !important;
}
body.presentation .fc-verse-divider { display: none !important; }
body.presentation article.fc-verse-block {
    padding: 0;
}
body.presentation .cr-devanagari { font-size: 1.7rem; }
body.presentation .cr-iast-line { font-size: 1.3rem; }
body.presentation .cr-pron-line { font-size: 1.0rem; }
body.presentation .fc-translation { font-size: 1.32rem; line-height: 1.75; padding: 1.1rem 1.5rem; }
body.presentation .cr-purport-body { font-size: 1.18rem; line-height: 1.85; }
body.presentation .cr-acarya-trans { font-size: 1.2rem !important; line-height: 1.8 !important; }
body.presentation .cr-acarya-purp p { font-size: 1.12rem !important; line-height: 1.78 !important; }
body.presentation .fc-verse-block-label { font-size: 1.6rem; }
body.presentation .fc-section-label { font-size: 1rem; }

body.presentation::after {
    content: "← Prev   Next →   ·   ESC to exit   ·   P pen";
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.72);
    color: white;
    padding: 0.45rem 1.3rem;
    border-radius: 18px;
    font-family: 'Lora', Georgia, serif;
    font-size: 0.85rem;
    pointer-events: none;
    z-index: 99996;
    white-space: nowrap;
}
body.presentation.pen-active::after { opacity: 0.35; }

/* Presentation-mode counter (e.g., 23 / 46) shown top-right */
body.presentation::before {
    content: attr(data-presentation-counter);
    position: fixed;
    top: 1rem;
    right: 1.4rem;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 0.3rem 0.85rem;
    border-radius: 14px;
    font-family: 'Lora', Georgia, serif;
    font-size: 0.85rem;
    z-index: 99996;
    pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════
   Print stylesheet — clean, classical, B/W-friendly.
   ═══════════════════════════════════════════════════════════════ */
@media print {
    html { font-size: 12pt; }
    body { background: white !important; color: #111 !important; }

    /* Hide all chrome / interactive elements. */
    .fc-site-header,
    .fc-site-footer,
    .fc-left-sidebar,
    .fc-sidebar,
    .fc-ribbon,
    .fc-prevnext,
    .fc-source-link,
    .fc-breadcrumbs,
    .fc-back-to-chapter,
    .fc-overlay-backdrop,
    .fc-mobile-trigger,
    .fc-pen-fab,
    .fc-shortcuts-modal,
    .fc-readout-btn,
    .fc-bookmark-btn,
    .fc-verse-permalink,
    .fc-note-block,
    .fc-pg-age-filter,
    .cr-samp-badge,
    .cr-blend-details,
    #fc-pen-canvas {
        display: none !important;
    }

    /* Layout: single column, full width. */
    .fc-layout { display: block !important; grid-template-columns: none !important; }
    .fc-container { max-width: none !important; margin: 0 !important; padding: 0 !important; }
    body.has-sidebar .fc-container { padding: 0 !important; }

    /* Force every collapsed section back to visible for printing. */
    [data-sec] > :not(.fc-section-label) { display: revert !important; }
    [data-hide-pronunciation="1"] [data-sec="pronunciation"],
    [data-hide-blended="1"] [data-sec="blended"] { display: none !important; }

    /* Typography. */
    .fc-verse-block { page-break-after: always; break-after: page; padding: 0; }
    .fc-verse-block:last-of-type { page-break-after: auto; break-after: auto; }
    .fc-verse-block-label { color: #111 !important; font-size: 14pt; border-bottom: 1px solid #ccc; padding-bottom: 0.2rem; }
    .cr-devanagari { color: #111 !important; font-size: 13pt; }
    .cr-iast, .cr-iast-line { color: #333 !important; font-style: italic; font-size: 11pt; }
    .cr-syn-iast { color: #111 !important; font-style: italic; }
    .cr-syn-en { color: #333 !important; }
    .fc-translation {
        background: #f7f1e1 !important;
        border-left: 3pt solid #888 !important;
        color: #111 !important;
        padding: 0.6rem 1rem !important;
    }
    .fc-translation::before { color: #555 !important; font-size: 9pt; }
    .cr-purport-body, .cr-purport-body p { color: #111 !important; font-size: 11pt; line-height: 1.5; }
    .cr-purport-attrib { color: #555 !important; font-size: 9pt; font-style: italic; }
    .cr-acarya-card { border: 1px solid #ccc !important; border-left: 3pt solid #888 !important; box-shadow: none !important; background: white !important; page-break-inside: avoid; break-inside: avoid; }
    .cr-acarya-name { color: #111 !important; border-bottom: 1px solid #ccc !important; }
    .cr-acarya-trans { background: #f9f5e8 !important; color: #111 !important; font-size: 11pt !important; }
    .cr-acarya-purp p { color: #111 !important; font-size: 10.5pt !important; }
    .cr-acarya-label { color: #555 !important; font-size: 8.5pt; }
    .fc-section-label { color: #111 !important; border-bottom-color: #888 !important; }
    .fc-section-label::before { display: none !important; }

    a, a:visited { color: #111 !important; text-decoration: underline; }

    /* Avoid awkward page breaks inside short sections. */
    .fc-section, .fc-pg-essence, .fc-pg-age {
        page-break-inside: avoid;
        break-inside: avoid;
    }
}

/* ───────── Responsive ───────── */
@media (max-width: 640px) {
    .fc-container { padding: 1.2rem 1rem 2rem; }
    .fc-site-header { padding: 0.9rem 1rem; flex-direction: column; align-items: flex-start; }
    .fc-site-nav a { margin-left: 0; margin-right: 1rem; }
    .cr-devanagari { font-size: 1.18rem; }
    .cr-iast { font-size: 0.98rem; }
    .fc-prevnext { flex-direction: column; }
    .fc-prevnext a.next { text-align: left; }
}

/* ═════════════════════════════════════════════════════════════════════
   Theme / Value detail pages (enhanced — Phase 1 of theme rebuild)
   ═════════════════════════════════════════════════════════════════════ */
.fc-theme-hero {
    margin-bottom: 1.4rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #ECDFC4;
}
.fc-theme-name {
    font-family: 'Lora', Georgia, serif;
    font-size: 2rem;
    color: #6B1D2A;
    margin: 0 0 0.4rem;
    line-height: 1.2;
}
.fc-theme-sanskrit {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    align-items: baseline;
    font-family: 'Lora', Georgia, serif;
    margin: 0.4rem 0 0.6rem;
    color: #6B5025;
}
.fc-theme-sk-deva { font-size: 1.3rem; font-weight: 600; }
.fc-theme-sk-iast { font-size: 1.1rem; font-style: italic; }
.fc-theme-sk-pron { font-size: 0.95rem; color: #8B7D6B; }
.fc-theme-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin: 0.4rem 0;
}
.fc-theme-branch-badge {
    background: #6B1D2A;
    color: #fff;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.fc-theme-position-badge {
    background: #B8860B;
    color: #fff;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 600;
}
.fc-theme-equiv-list { display: inline-flex; flex-wrap: wrap; gap: 0.3rem; }
.fc-theme-equiv-chip {
    background: #FBF6E4;
    color: #6B5025;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.84rem;
    font-style: italic;
}
.fc-theme-definition {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.08rem;
    line-height: 1.65;
    color: #2a2a2a;
    margin: 0.8rem 0 0;
}

/* Definition layers */
.fc-theme-defn-layers { display: flex; flex-direction: column; gap: 0.7rem; }
.fc-theme-defn-layer {
    padding: 0.6rem 0.9rem;
    background: #FCF8E8;
    border-left: 3px solid #C8B47A;
    border-radius: 3px;
}
.fc-theme-defn-layer-label {
    font-family: 'Lora', Georgia, serif;
    font-weight: 700;
    color: #6B5025;
    margin-bottom: 0.25rem;
    text-transform: capitalize;
    font-size: 0.92rem;
}
.fc-theme-defn-layer-text {
    font-family: 'Lora', Georgia, serif;
    color: #2a2a2a;
    line-height: 1.6;
}

/* Developmental specs */
.fc-theme-hint {
    color: #8B7D6B;
    font-size: 0.88rem;
    margin: 0 0 0.8rem;
    font-style: italic;
}
.fc-theme-devspec {
    background: #F0F6F2;
    border-left: 4px solid #2E5F46;
    padding: 0.8rem 1.1rem;
    margin: 0.7rem 0;
    border-radius: 3px;
}
.fc-theme-devspec-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px dashed #C7D9CE;
}
.fc-theme-devspec-stage {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    color: #1F4632;
    font-size: 0.94rem;
}
.fc-theme-level-badge {
    display: inline-block;
    color: #fff;
    padding: 2px 9px;
    border-radius: 11px;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.fc-theme-level-primary { background: #4A90E2; }
.fc-theme-level-middle { background: #7B68EE; }
.fc-theme-level-senior { background: #B8860B; }
.fc-theme-level-college { background: #6B1D2A; }
.fc-theme-devspec-row { margin: 0.45rem 0; font-family: 'Lora', Georgia, serif; color: #2a2a2a; }
.fc-theme-devspec-key {
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #5C7A6A;
    font-weight: 600;
    margin-bottom: 0.2rem;
}
.fc-theme-devspec-list { margin: 0.15rem 0 0.35rem 1.1rem; padding: 0; }
.fc-theme-devspec-list li { margin: 0.18rem 0; line-height: 1.55; }
.fc-theme-devspec-anti {
    background: #FBEFEF;
    border-left: 2px solid #8B2C39;
    padding: 0.35rem 0.6rem;
    border-radius: 2px;
    font-style: italic;
    color: #5a1a1f;
}
.fc-theme-devspec-meta {
    font-size: 0.85rem;
    color: #5C7A6A;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 0.4rem;
    border-top: 1px dashed #C7D9CE;
}

/* Anti-patterns */
.fc-theme-antipatterns { display: flex; flex-direction: column; gap: 0.6rem; }
.fc-theme-antipattern {
    background: #FBEFEF;
    border-left: 4px solid #8B2C39;
    padding: 0.7rem 1rem;
    border-radius: 3px;
}
.fc-theme-antipattern-name {
    font-family: 'Lora', Georgia, serif;
    font-weight: 700;
    color: #5a1a1f;
    font-size: 1.02rem;
}
.fc-theme-antipattern-source {
    font-size: 0.82rem;
    color: #8B7D6B;
    margin-top: 0.15rem;
    font-style: italic;
}
.fc-theme-antipattern-desc { margin: 0.35rem 0; color: #2a2a2a; line-height: 1.55; }
.fc-theme-antipattern-key { margin-top: 0.35rem; color: #5a1a1f; font-size: 0.94rem; }

/* Relationships */
.fc-theme-rel-group { margin: 0.6rem 0; }
.fc-theme-rel-type-label {
    font-family: 'Lora', Georgia, serif;
    font-weight: 700;
    font-size: 0.86rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.3rem;
}
.fc-theme-rel-pills { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.fc-theme-rel-pill {
    padding: 4px 12px;
    border-radius: 14px;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    border: 1.5px solid;
    background: #fff;
    transition: background 0.15s;
}
.fc-theme-rel-pill:hover { background: rgba(0,0,0,0.04); }
.fc-theme-rel-prerequisite .fc-theme-rel-type-label { color: #2E5F46; }
.fc-theme-rel-prerequisite .fc-theme-rel-pill { border-color: #2E5F46; color: #1F4632; }
.fc-theme-rel-enables .fc-theme-rel-type-label { color: #4A90E2; }
.fc-theme-rel-enables .fc-theme-rel-pill { border-color: #4A90E2; color: #1c4a80; }
.fc-theme-rel-complementary .fc-theme-rel-type-label { color: #B8860B; }
.fc-theme-rel-complementary .fc-theme-rel-pill { border-color: #B8860B; color: #6B5025; }
.fc-theme-rel-tension .fc-theme-rel-type-label { color: #8B2C39; }
.fc-theme-rel-tension .fc-theme-rel-pill { border-color: #8B2C39; color: #5a1a1f; }
.fc-theme-rel-counterpart .fc-theme-rel-type-label { color: #6B1D2A; }
.fc-theme-rel-counterpart .fc-theme-rel-pill { border-color: #6B1D2A; color: #6B1D2A; }

/* Verse lists (re-use of existing styles + level badges) */
.fc-theme-verse-note { color: #6B5025; font-size: 0.88rem; margin-left: 0.4rem; font-style: italic; }
.fc-theme-verse-levels { display: inline-flex; gap: 0.2rem; margin-left: 0.4rem; }

/* Stories */
.fc-theme-stories { display: flex; flex-direction: column; gap: 0.7rem; }
.fc-theme-story-card {
    background: #FBF6E4;
    border-left: 4px solid #B8860B;
    padding: 0.8rem 1.1rem;
    border-radius: 3px;
}
.fc-theme-story-head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.3rem;
    flex-wrap: wrap;
}
.fc-theme-story-title {
    font-family: 'Lora', Georgia, serif;
    font-weight: 700;
    font-size: 1.04rem;
    color: #6B5025;
}
.fc-theme-story-meta {
    font-size: 0.88rem;
    color: #5C5040;
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin: 0.3rem 0;
}
.fc-theme-story-sloka {
    background: rgba(255,255,255,0.5);
    border-left: 2px solid #C8B47A;
    padding: 0.5rem 0.9rem;
    margin: 0.4rem 0 0;
    font-family: 'Lora', Georgia, serif;
    color: #3a2f1a;
    border-radius: 2px;
}
.fc-theme-story-sloka-iast { font-style: italic; }
.fc-theme-story-sloka-trans { margin-top: 0.3rem; }
.fc-theme-story-sloka-ref { font-size: 0.84rem; color: #8B7D6B; margin-top: 0.25rem; text-align: right; }

/* Footer */
.fc-theme-footer { margin-top: 2rem; padding-top: 0.8rem; border-top: 1px dashed #ECDFC4; color: #8B7D6B; font-size: 0.86rem; }
.fc-theme-approved { color: #2E5F46; font-weight: 600; }

/* ───────── Global audience filter (Phase 1.b) ───────── */
.fc-audience-filter {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.92rem;
}
.fc-audience-filter label {
    cursor: pointer;
    padding: 0.18rem 0.3rem;
    border-radius: 3px;
}
.fc-audience-filter label:hover { background: rgba(0,0,0,0.04); }
.fc-audience-filter input { margin-right: 0.4rem; }

/* When audience filter is set, hide elements tagged with non-matching data-level.
   Elements with data-level="all" or no data-level attribute are unaffected. */
html[data-audience-primary] [data-level]:not([data-level="primary"]):not([data-level="all"]) { display: none !important; }
html[data-audience-middle]  [data-level]:not([data-level="middle"]):not([data-level="all"])  { display: none !important; }
html[data-audience-senior]  [data-level]:not([data-level="senior"]):not([data-level="all"])  { display: none !important; }
html[data-audience-college] [data-level]:not([data-level="college"]):not([data-level="all"]) { display: none !important; }

/* Dark mode hints for theme pages */
html[data-theme="dark"] .fc-theme-defn-layer { background: #2a2218; }
html[data-theme="dark"] .fc-theme-defn-layer-text { color: #ddd; }
html[data-theme="dark"] .fc-theme-devspec { background: #1d2a23; }
html[data-theme="dark"] .fc-theme-antipattern { background: #2a1a1d; }
html[data-theme="dark"] .fc-theme-story-card { background: #2a2218; }
html[data-theme="dark"] .fc-theme-equiv-chip { background: #2a2218; color: #d4c595; }

/* ───────── Themes home (Phase 2 redesign) ───────── */
.fc-themes-intro {
    font-family: 'Lora', Georgia, serif;
    color: #5C5040;
    line-height: 1.65;
    margin: 0.4rem 0 1.4rem;
    max-width: 50em;
}
.fc-themes-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: center;
    margin-bottom: 1.6rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed #ECDFC4;
}
.fc-themes-search-input {
    flex: 1;
    min-width: 16rem;
    padding: 0.55rem 0.9rem;
    font-family: 'Lora', Georgia, serif;
    font-size: 0.96rem;
    border: 1px solid #C8B47A;
    border-radius: 22px;
    background: #FCFAF0;
    color: #2a2a2a;
}
.fc-themes-search-input:focus {
    outline: none;
    border-color: #6B1D2A;
    box-shadow: 0 0 0 3px rgba(107, 29, 42, 0.12);
}
.fc-themes-branch-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.fc-themes-branch-chip {
    padding: 0.35rem 0.85rem;
    border-radius: 14px;
    background: #FBF6E4;
    color: #6B5025;
    border: 1px solid #ECDFC4;
    font-size: 0.86rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.fc-themes-branch-chip:hover { background: #ECDFC4; }
.fc-themes-branch-chip.active {
    background: #6B1D2A;
    color: #fff;
    border-color: #6B1D2A;
}
.fc-themes-branch-group { margin: 1.6rem 0; }
.fc-themes-branch-heading {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.45rem;
    color: #1F4632;
    margin: 0 0 0.8rem;
    padding-bottom: 0.35rem;
    border-bottom: 2px solid #2E5F46;
}
.fc-themes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
    gap: 0.8rem;
}
.fc-theme-card {
    display: block;
    padding: 0.9rem 1rem 0.8rem;
    background: #FCFAF0;
    border: 1px solid #ECDFC4;
    border-radius: 5px;
    text-decoration: none;
    color: #2a2a2a;
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.fc-theme-card:hover {
    background: #FBF1F1;
    border-color: #6B1D2A;
    transform: translateY(-1px);
}
.fc-theme-card-name {
    font-family: 'Lora', Georgia, serif;
    font-weight: 700;
    font-size: 1.04rem;
    color: #6B1D2A;
    margin-bottom: 0.2rem;
}
.fc-theme-card-sk {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    color: #6B5025;
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}
.fc-theme-card-position {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #B8860B;
    font-weight: 600;
    margin-bottom: 0.3rem;
}
.fc-theme-card-defn {
    font-family: 'Lora', Georgia, serif;
    color: #5C5040;
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 0.4rem;
    max-height: 4.2em;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fc-theme-card-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: #8B7D6B;
}
.fc-theme-pri { color: #6B1D2A; font-weight: 600; }
.fc-theme-rel { color: #6B5025; }
.fc-theme-stry { color: #2E5F46; font-weight: 600; }
html[data-theme="dark"] .fc-theme-card { background: #1c1814; border-color: #3a2f1a; color: #ddd; }
html[data-theme="dark"] .fc-theme-card:hover { background: #2a1a1d; border-color: #f0a8b8; }
html[data-theme="dark"] .fc-theme-card-name { color: #f0a8b8; }
html[data-theme="dark"] .fc-theme-card-sk { color: #d4c595; }
html[data-theme="dark"] .fc-theme-card-defn { color: #c7c0b0; }
html[data-theme="dark"] .fc-themes-search-input { background: #1c1814; border-color: #3a2f1a; color: #ddd; }
html[data-theme="dark"] .fc-themes-branch-chip { background: #1c1814; color: #d4c595; border-color: #3a2f1a; }
html[data-theme="dark"] .fc-themes-branch-chip.active { background: #6B1D2A; color: #fff; }

/* ───────── Persona landing pages (Phase 4) ───────── */
.fc-persona-links {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.fc-persona-link {
    padding: 0.4rem 0.5rem;
    background: #FCFAF0;
    border-left: 3px solid #2E5F46;
    border-radius: 2px;
    text-decoration: none;
    color: #1F4632;
    font-family: 'Lora', Georgia, serif;
    font-size: 0.94rem;
    transition: background 0.15s;
}
.fc-persona-link:hover {
    background: #F0F6F2;
    color: #6B1D2A;
}
.fc-persona-weeks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
    gap: 0.7rem;
}
.fc-persona-week-card {
    display: block;
    padding: 0.8rem 0.95rem;
    background: #FCFAF0;
    border: 1px solid #ECDFC4;
    border-radius: 5px;
    text-decoration: none;
    color: #2a2a2a;
    transition: background 0.15s, transform 0.15s;
}
.fc-persona-week-card:hover {
    background: #FBF1F1;
    border-color: #6B1D2A;
    transform: translateY(-1px);
}
.fc-persona-week-num {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #B8860B;
    font-weight: 700;
    margin-bottom: 0.25rem;
}
.fc-persona-week-name {
    font-family: 'Lora', Georgia, serif;
    font-weight: 700;
    color: #6B1D2A;
    font-size: 1rem;
    margin-bottom: 0.2rem;
}
.fc-persona-week-sk {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    color: #6B5025;
    font-size: 0.88rem;
    margin-bottom: 0.3rem;
}
.fc-persona-week-defn {
    color: #5C5040;
    font-size: 0.85rem;
    line-height: 1.45;
    max-height: 3.2em;
    overflow: hidden;
    margin-bottom: 0.4rem;
}
.fc-persona-week-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    font-size: 0.76rem;
}
.fc-persona-value-pill {
    background: #ECDFC4;
    color: #6B5025;
    padding: 2px 9px;
    border-radius: 10px;
    font-size: 0.78rem;
    font-style: italic;
}
html[data-theme="dark"] .fc-persona-link { background: #1c1814; color: #b8e0c8; border-left-color: #5fa07e; }
html[data-theme="dark"] .fc-persona-link:hover { background: #2a2218; color: #f0a8b8; }
html[data-theme="dark"] .fc-persona-week-card { background: #1c1814; border-color: #3a2f1a; color: #ddd; }
html[data-theme="dark"] .fc-persona-week-name { color: #f0a8b8; }

/* Landing-page persona trio */
.fc-landing-persona-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 1rem;
    margin: 1.6rem 0;
}
.fc-landing-persona-card {
    padding: 1.1rem 1.2rem;
    background: linear-gradient(135deg, #FCFAF0 0%, #FBF6E4 100%);
    border: 1px solid #C8B47A;
    border-radius: 6px;
    text-decoration: none;
    color: #2a2a2a;
    transition: transform 0.15s, border-color 0.15s;
}
.fc-landing-persona-card:hover {
    border-color: #6B1D2A;
    transform: translateY(-2px);
}
.fc-landing-persona-icon { font-size: 1.6rem; }
.fc-landing-persona-title {
    font-family: 'Lora', Georgia, serif;
    font-weight: 700;
    color: #6B1D2A;
    font-size: 1.12rem;
    margin: 0.3rem 0 0.2rem;
}
.fc-landing-persona-desc {
    font-family: 'Lora', Georgia, serif;
    color: #5C5040;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ═════════════════════════════════════════════════════════════════════
   Landing-page microsite launching cards (Vedic Value System + Vidyā Karaṇa)
   ═════════════════════════════════════════════════════════════════════ */
.fc-launch-section { margin-bottom: 2.2rem; }
.fc-launch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
    gap: 1.2rem;
    margin-top: 0.6rem;
}
.fc-launch-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 1.8rem 1.7rem 1.6rem;
    border-radius: 10px;
    text-decoration: none;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.18s, box-shadow 0.18s;
    min-height: 16rem;
    overflow: hidden;
}
.fc-launch-card::before {
    content: "";
    position: absolute;
    top: -40px;
    right: -40px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    pointer-events: none;
}
.fc-launch-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(0,0,0,0.16);
}
.fc-launch-values {
    background: linear-gradient(135deg, #1F4632 0%, #2E5F46 60%, #3a7558 100%);
}
.fc-launch-vidya {
    background: linear-gradient(135deg, #6B1D2A 0%, #8B2C39 50%, #C8860B 100%);
}
.fc-launch-eyebrow {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 600;
    color: rgba(255,255,255,0.78);
    margin-bottom: 0.5rem;
}
.fc-launch-icon {
    font-size: 2.4rem;
    line-height: 1;
    margin-bottom: 0.5rem;
    color: #E6C77E;
}
.fc-launch-title {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.6rem;
    line-height: 1.2;
}
.fc-launch-desc {
    font-family: 'Lora', Georgia, serif;
    font-size: 0.98rem;
    line-height: 1.55;
    color: rgba(255,255,255,0.92);
    margin: 0 0 1rem;
}
.fc-launch-meta {
    font-size: 0.84rem;
    color: rgba(255,255,255,0.78);
    margin: 0 0 1rem;
    font-family: 'Lora', Georgia, serif;
}
.fc-launch-cta {
    margin-top: auto;
    align-self: flex-start;
    background: rgba(255,255,255,0.18);
    color: #fff;
    padding: 0.5rem 1.1rem;
    border-radius: 22px;
    font-weight: 600;
    font-size: 0.94rem;
    backdrop-filter: blur(2px);
    transition: background 0.15s;
}
.fc-launch-card:hover .fc-launch-cta {
    background: rgba(255,255,255,0.28);
}

@media (max-width: 720px) {
    .fc-launch-card { padding: 1.4rem 1.3rem; min-height: 14rem; }
    .fc-launch-title { font-size: 1.45rem; }
}

/* ───────── Book Bhagavata (S.B. Keshava Swami) ───────── */
.fc-bb-tagline {
    font-family: 'Lora', Georgia, serif;
    color: #8B7D6B;
    font-size: 1.05rem;
    margin: 0 0 1rem;
}
.fc-bb-intro {
    background: #FCF8E8;
    border-left: 4px solid #C8B47A;
    padding: 0.9rem 1.2rem;
    margin: 0 0 1.5rem;
    border-radius: 3px;
    font-family: 'Lora', Georgia, serif;
    line-height: 1.6;
}
.fc-bb-intro p { margin: 0.5rem 0; }
.fc-bb-attribution {
    font-size: 0.88rem;
    color: #5C5040;
    font-style: italic;
    margin-top: 0.6rem !important;
}
.fc-bb-canto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
    gap: 0.7rem;
}
.fc-bb-canto-card {
    display: block;
    padding: 1rem 1.1rem;
    background: #FCFAF0;
    border: 1px solid #ECDFC4;
    border-left: 4px solid #6B1D2A;
    border-radius: 4px;
    text-decoration: none;
    color: #2a2a2a;
    transition: transform 0.15s, border-color 0.15s;
}
.fc-bb-canto-card:hover {
    transform: translateY(-2px);
    border-color: #B8860B;
}
.fc-bb-canto-num {
    font-family: 'Lora', Georgia, serif;
    font-weight: 700;
    color: #6B1D2A;
    font-size: 1.05rem;
}
.fc-bb-canto-mnemonic {
    font-family: 'Lora', Georgia, serif;
    color: #B8860B;
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: 0.04em;
    margin: 0.2rem 0;
}
.fc-bb-canto-meta {
    color: #8B7D6B;
    font-size: 0.84rem;
}
.fc-bb-page-list {
    list-style: none;
    padding-left: 0;
    margin: 0.4rem 0;
}
.fc-bb-page-list li {
    padding: 0.3rem 0;
    border-bottom: 1px solid #F0E8D8;
}
.fc-bb-page-list a {
    color: #6B1D2A;
    text-decoration: none;
    font-family: 'Lora', Georgia, serif;
}
.fc-bb-page-list a:hover { text-decoration: underline; }
.fc-bb-part { color: #8B7D6B; font-size: 0.84rem; }
.fc-bb-canto-intro {
    font-family: 'Lora', Georgia, serif;
    color: #2a2a2a;
    line-height: 1.7;
    margin: 0.6rem 0 1.4rem;
}
.fc-bb-canto-intro p { margin: 0.5rem 0; }
.fc-bb-page { max-width: 56rem; }
.fc-bb-page-title {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.7rem;
    color: #2a2a2a;
    margin: 0.4rem 0 1rem;
}
.fc-bb-body {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.04rem;
    line-height: 1.72;
    color: #2a2a2a;
}
.fc-bb-body p { margin: 0.55rem 0; }

/* SB chapter card title (Prabhupada's chapter names) */
.ch-title {
    font-family: 'Lora', Georgia, serif;
    font-size: 0.92rem;
    font-style: italic;
    color: #6B5025;
    margin: 0.15rem 0 0.25rem;
    line-height: 1.35;
}

/* Book Bhagavata acronym blend on SB chapter pages */
.fc-bb-section-blend { margin: 0.8rem 0 1.4rem; }
.fc-bb-mnemonic-tag {
    margin-left: 0.5rem;
    background: #FBF6E4;
    color: #6B5025;
    padding: 1px 9px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: none;
}
.fc-bb-section-pill {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(90deg, #FCF8E8 0%, #F4F9F5 100%);
    border-left: 4px solid #B8860B;
    padding: 0.7rem 1rem;
    border-radius: 4px;
    flex-wrap: wrap;
}
.fc-bb-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    background: #B8860B;
    color: #fff;
    border-radius: 50%;
    font-family: 'Lora', Georgia, serif;
    font-weight: 700;
    font-size: 1.4rem;
    flex-shrink: 0;
}
.fc-bb-section-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}
.fc-bb-section-name {
    font-family: 'Lora', Georgia, serif;
    font-weight: 700;
    color: #6B5025;
    font-size: 1.04rem;
}
.fc-bb-section-range {
    font-size: 0.82rem;
    color: #8B7D6B;
    margin-top: 0.1rem;
}
.fc-bb-section-link {
    color: #B8860B;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.92rem;
}
.fc-bb-section-link:hover { text-decoration: underline; }

/* BB acronym letter badge on canto-page chapter cards */
.fc-bb-card-letter {
    display: inline-block;
    margin-left: 0.4rem;
    background: #B8860B;
    color: #fff;
    width: 1.3rem;
    height: 1.3rem;
    line-height: 1.3rem;
    text-align: center;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    vertical-align: middle;
}

/* Book Bhagavata embedded summary on SB chapter pages */
.fc-bb-summary {
    margin-top: 0.7rem;
    border: 1px solid #ECDFC4;
    border-radius: 4px;
    background: #FCFAF0;
}
.fc-bb-summary[open] { background: #FCFAF0; }
.fc-bb-summary-toggle {
    cursor: pointer;
    padding: 0.55rem 0.9rem;
    font-family: 'Lora', Georgia, serif;
    font-weight: 600;
    color: #6B5025;
    font-size: 0.94rem;
    list-style: none;
}
.fc-bb-summary-toggle::-webkit-details-marker { display: none; }
.fc-bb-summary-toggle::before {
    content: "▾";
    color: #B8860B;
    margin-right: 0.4rem;
    display: inline-block;
    transition: transform 0.15s;
}
.fc-bb-summary:not([open]) .fc-bb-summary-toggle::before { transform: rotate(-90deg); }
.fc-bb-summary-body {
    padding: 0 1.1rem 0.9rem;
    border-top: 1px dashed #ECDFC4;
    margin-top: 0.4rem;
    padding-top: 0.6rem;
    font-family: 'Lora', Georgia, serif;
    line-height: 1.7;
    color: #2a2a2a;
    max-height: 36rem;
    overflow-y: auto;
}
.fc-bb-summary-body p { margin: 0.55rem 0; }
.fc-bb-sub-h {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.05rem;
    color: #6B1D2A;
    margin: 1rem 0 0.3rem;
    padding-top: 0.4rem;
    border-top: 1px solid #ECDFC4;
}
.fc-bb-summary-attrib {
    margin-top: 0.8rem !important;
    text-align: right;
    color: #8B7D6B;
    font-size: 0.86rem;
    font-style: italic;
}

/* iskcondesiretree (Gaudiya Books) work landings + book download buttons */
.fc-idt-action-row {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
    margin: 0.4rem 0 1rem;
}
.fc-idt-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.6rem 1.1rem;
    border-radius: 4px;
    text-decoration: none;
    font-family: 'Lora', Georgia, serif;
    font-weight: 600;
    color: #6B5025;
    background: #FCFAF0;
    border: 1px solid #ECDFC4;
    transition: transform 0.12s, background 0.12s;
}
.fc-idt-btn:hover {
    transform: translateY(-1px);
    background: #FAF3D9;
}
.fc-idt-btn-primary {
    color: #fff;
    background: #6B5025;
    border-color: #6B5025;
}
.fc-idt-btn-primary:hover {
    background: #8A6638;
    color: #fff;
}

/* ───────── /search/ page ───────── */
.fc-search-page-title { margin: 0.5rem 0 1rem; }
.fc-search-form {
    display: flex;
    gap: 0.6rem;
    margin: 0.5rem 0 1rem;
}
.fc-search-q {
    flex: 1;
    padding: 0.7rem 1rem;
    font-size: 1.05rem;
    font-family: inherit;
    border: 1px solid #ECDFC4;
    border-radius: 4px;
    background: #fff;
}
.fc-search-q:focus { outline: 2px solid #B8860B; border-color: #B8860B; }
.fc-search-submit {
    padding: 0.7rem 1.4rem;
    font-size: 1rem;
    font-family: inherit;
    font-weight: 600;
    background: #4A7C59;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.fc-search-submit:hover { background: #5C9974; }
.fc-search-status {
    font-family: 'Lora', Georgia, serif;
    color: #6B5025;
    margin: 0.4rem 0 1rem;
    font-size: 0.95rem;
}
.fc-search-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 16rem;
    gap: 2rem;
    align-items: flex-start;
}
@media (max-width: 800px) {
    .fc-search-layout { grid-template-columns: 1fr; gap: 0.8rem; }
    .fc-search-facets {
        order: -1;
        position: static;          /* drop sticky — no longer eats the viewport */
        max-height: none;           /* let the details element control height */
        padding: 0.3rem 0.7rem;
    }
    /* On phones default the facet groups to closed so they don't crowd
       the results. Tap the heading to reveal options. */
    .fc-search-facet:not([data-user-toggled]) { /* keyed by JS later if needed */ }
    .fc-search-form { flex-wrap: wrap; gap: 0.5rem; }
    .fc-search-q { width: 100%; max-width: none; flex: 1 1 100%; }
    .fc-search-submit { width: 100%; padding: 0.8rem; }
    .fc-search-row { padding: 0.7rem 0; }
    .fc-search-row-ref { font-size: 1rem; display: inline-block; }
    .fc-search-row-snippet { font-size: 0.95rem; }
}
@media (max-width: 540px) {
    .fc-search-page-title { font-size: 1.4rem; margin: 0.3rem 0 0.6rem; }
    .fc-search-row-context { font-size: 0.78rem; }
}
.fc-search-results { min-height: 12rem; }
.fc-search-row {
    padding: 0.9rem 0;
    border-bottom: 1px solid #ECDFC4;
}
.fc-search-row:last-child { border-bottom: none; }
.fc-search-row-ref {
    font-family: 'Lora', Georgia, serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: #6B1D2A;
    text-decoration: none;
}
.fc-search-row-ref:hover { text-decoration: underline; color: #B8860B; }
.fc-search-row-context {
    font-size: 0.82rem;
    color: #8B7D6B;
    margin: 0.15rem 0 0.35rem;
}
.fc-search-row-field {
    font-style: italic;
    color: #B8860B;
}
.fc-search-row-snippet {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.0rem;
    line-height: 1.55;
    color: #2a2a2a;
}
.fc-search-row-snippet mark {
    background: #FCEFA1;
    color: #2a2a2a;
    padding: 0 0.15rem;
    border-radius: 2px;
}
.fc-search-empty {
    color: #8B7D6B;
    font-style: italic;
    padding: 1.5rem 0;
}
.fc-search-more-btn {
    margin: 1rem 0;
    padding: 0.5rem 1rem;
    background: #fff;
    border: 1px solid #4A7C59;
    color: #4A7C59;
    border-radius: 3px;
    cursor: pointer;
    font-family: inherit;
}
.fc-search-more-btn:hover { background: #ECF6EE; }
.fc-search-facets {
    position: sticky;
    top: 1rem;
    background: #FCFAF0;
    border: 1px solid #ECDFC4;
    border-radius: 4px;
    padding: 0.4rem 0.9rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
}
.fc-search-facet { margin: 0.5rem 0; }
.fc-search-facet > summary {
    cursor: pointer;
    font-family: 'Lora', Georgia, serif;
    font-weight: 700;
    color: #6B5025;
    font-size: 0.92rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.3rem 0;
    border-bottom: 1px solid #ECDFC4;
    list-style: none;
}
.fc-search-facet > summary::-webkit-details-marker { display: none; }
.fc-search-facet > summary::before {
    content: "▾";
    color: #B8860B;
    margin-right: 0.3rem;
    display: inline-block;
    transition: transform 0.15s;
}
.fc-search-facet:not([open]) > summary::before { transform: rotate(-90deg); }
.fc-facet-list {
    list-style: none;
    padding: 0.4rem 0;
    margin: 0;
}
.fc-facet-list li { margin: 0.15rem 0; }
.fc-facet-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.18rem 0.4rem;
    color: #2a2a2a;
    text-decoration: none;
    border-radius: 3px;
    font-size: 0.9rem;
}
.fc-facet-link:hover { background: #FBF6E4; }
.fc-facet-link.is-active {
    background: #4A7C59;
    color: #fff;
}
.fc-facet-link.is-active .fc-facet-count { color: #fff; }
.fc-facet-count {
    color: #8B7D6B;
    font-size: 0.84rem;
    margin-left: 0.5rem;
}

/* ───────── Landing page (paradigms 3+4+5) ───────── */

/* Hero */
.fc-landing-hero {
    text-align: center;
    margin: 1.2rem 0 1.8rem;
    padding: 1.2rem 1rem 1.4rem;
    background: linear-gradient(180deg, rgba(107,29,42,0.04) 0%, transparent 100%);
    border-radius: 8px;
}
.fc-landing-h1 {
    font-family: 'Lora', Georgia, serif;
    font-size: 2.2rem;
    color: var(--fc-maroon, #6B1D2A);
    margin: 0 0 0.4rem;
    letter-spacing: 0.015em;
    line-height: 1.15;
}
.fc-landing-h1-sub {
    display: block;
    font-family: 'Lora', Georgia, serif;
    font-weight: 400;
    font-style: italic;
    font-size: 1.05rem;
    color: #8a6a4a;
    margin-top: 0.2rem;
    letter-spacing: 0.02em;
}
.fc-landing-tagline {
    font-family: 'Lora', Georgia, serif;
    font-size: 0.98rem;
    color: #4a3a2a;
    max-width: 680px;
    margin: 0 auto 1rem;
    line-height: 1.55;
}
.fc-landing-chips {
    list-style: none;
    padding: 0;
    margin: 0.6rem auto 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem 0.5rem;
    max-width: 760px;
    font-size: 0.82rem;
}
.fc-landing-chips li {
    background: #fff;
    border: 1px solid #d4b78a;
    color: #5a4a2a;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    line-height: 1.4;
}
.fc-landing-chips li strong {
    color: var(--fc-maroon, #6B1D2A);
    font-weight: 700;
    margin-right: 0.15rem;
}
.fc-landing-chips li span {
    background: var(--fc-maroon, #6B1D2A);
    color: #fff;
    padding: 0 0.4rem;
    border-radius: 3px;
    font-size: 0.7rem;
    margin-left: 0.2rem;
    letter-spacing: 0.04em;
    vertical-align: 1px;
}
.fc-landing-chip-meta {
    background: transparent !important;
    border-color: transparent !important;
    color: #8B7D6B !important;
    font-style: italic;
}
@media (max-width: 540px) {
    .fc-landing-h1 { font-size: 1.7rem; }
    .fc-landing-h1-sub { font-size: 0.95rem; }
    .fc-landing-tagline { font-size: 0.95rem; }
    .fc-landing-chips { font-size: 0.78rem; }
}

html[data-theme="dark"] .fc-landing-hero {
    background: linear-gradient(180deg, rgba(176,64,80,0.10) 0%, transparent 100%);
}
html[data-theme="dark"] .fc-landing-h1 { color: #f0a8b8; }
html[data-theme="dark"] .fc-landing-h1-sub { color: #b8a078; }
html[data-theme="dark"] .fc-landing-tagline { color: #d4b78a; }
html[data-theme="dark"] .fc-landing-chips li {
    background: #211a13; border-color: #3a3128; color: #d4b78a;
}
html[data-theme="dark"] .fc-landing-chips li strong { color: #f0a8b8; }
html[data-theme="dark"] .fc-landing-chips li span { background: #b04050; }
html[data-theme="dark"] .fc-landing-chip-meta { color: #8B7D6B !important; }

/* Persona cards — 3-up grid */
.fc-landing-personas {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 0 0 2.4rem;
}
.fc-persona-card {
    display: flex;
    flex-direction: column;
    background: #fff8e6;
    border: 1px solid #d4b78a;
    border-radius: 6px;
    padding: 1.2rem 1rem 1rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
}
.fc-persona-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(107, 29, 42, 0.12);
    border-color: var(--fc-maroon, #6B1D2A);
}
.fc-persona-icon { font-size: 1.6rem; margin-bottom: 0.4rem; }
.fc-persona-card h3 {
    font-family: 'Lora', Georgia, serif;
    color: var(--fc-maroon, #6B1D2A);
    margin: 0 0 0.4rem;
    font-size: 1.1rem;
}
.fc-persona-card p {
    color: #4a3a2a;
    font-size: 0.92rem;
    line-height: 1.45;
    margin: 0 0 0.7rem;
    flex: 1;
}
.fc-persona-cta {
    color: var(--fc-maroon, #6B1D2A);
    font-weight: 700;
    font-size: 0.88rem;
}
.fc-persona-newcomer { background: #F4F9F5; border-color: #B5D6C0; }
.fc-persona-newcomer .fc-persona-cta,
.fc-persona-newcomer h3 { color: #2E5F46; }
.fc-persona-returning { background: #FCEFA1; border-color: #C8A847; }
.fc-persona-returning .fc-persona-cta,
.fc-persona-returning h3 { color: #6B5025; }

/* Language entry cards */
.fc-landing-langs { margin: 0 0 2.4rem; }
.fc-lang-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
    margin-top: 0.6rem;
}
.fc-lang-card-big {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #fff8e6;
    border: 1px solid #d4b78a;
    border-radius: 6px;
    padding: 1rem 0.8rem;
    text-decoration: none;
    color: inherit;
    transition: background 0.12s, border-color 0.12s;
}
.fc-lang-card-big:hover {
    background: #FCEFA1;
    border-color: var(--fc-maroon, #6B1D2A);
}
.fc-lang-card-flag {
    font-family: 'Lora', Georgia, serif;
    font-size: 2rem;
    color: var(--fc-maroon, #6B1D2A);
    line-height: 1;
    margin-bottom: 0.3rem;
}
.fc-lang-card-title {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.1rem;
    color: var(--fc-maroon, #6B1D2A);
    margin-bottom: 0.2rem;
}
.fc-lang-card-note {
    font-size: 0.78rem;
    color: #7a5a3a;
}

/* Curated reading paths */
.fc-landing-paths { margin: 0 0 2.4rem; }
.fc-path-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
    margin-top: 0.6rem;
}
.fc-path-card {
    position: relative;
    display: block;
    background: #fff;
    border: 1px solid #ECDFC4;
    border-radius: 5px;
    padding: 0.9rem 1rem;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.12s, box-shadow 0.12s;
}
.fc-path-card:hover {
    border-color: var(--fc-maroon, #6B1D2A);
    box-shadow: 0 2px 8px rgba(107, 29, 42, 0.08);
}
.fc-path-badge {
    position: absolute;
    top: 0.7rem;
    right: 0.9rem;
    background: var(--fc-maroon, #6B1D2A);
    color: #fff;
    font-size: 0.7rem;
    padding: 0.1rem 0.5rem;
    border-radius: 3px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.fc-path-card h3 {
    font-family: 'Lora', Georgia, serif;
    color: var(--fc-maroon, #6B1D2A);
    margin: 0 3rem 0.3rem 0;
    font-size: 1rem;
}
.fc-path-card p {
    color: #5a4a2a;
    font-size: 0.88rem;
    line-height: 1.45;
    margin: 0;
}
.fc-path-card-all { background: #FAEEBC; border-style: dashed; }
.fc-path-card-all h3 { color: #6B5025; }

/* Library shelf — grouped */
.fc-landing-library { margin: 0 0 2.4rem; }
.fc-shelf-heading {
    font-family: 'Lora', Georgia, serif;
    color: var(--fc-maroon, #6B1D2A);
    font-size: 1rem;
    letter-spacing: 0.04em;
    margin: 1.4rem 0 0.5rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid #d4b78a;
}
.fc-shelf {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.5rem;
}
.fc-shelf-card {
    display: flex;
    flex-direction: column;
    padding: 0.55rem 0.8rem;
    background: #fff8e6;
    border: 1px solid #ECDFC4;
    border-radius: 4px;
    text-decoration: none;
    color: inherit;
    font-size: 0.88rem;
    transition: background 0.12s, border-color 0.12s;
}
.fc-shelf-card:hover {
    background: #FCEFA1;
    border-color: var(--fc-maroon, #6B1D2A);
}
.fc-shelf-card strong {
    font-family: 'Lora', Georgia, serif;
    color: var(--fc-maroon, #6B1D2A);
    font-weight: 700;
    margin-bottom: 0.15rem;
}
.fc-shelf-card span {
    color: #7a5a3a;
    font-size: 0.78rem;
}

/* Mobile — single column from 720px */
@media (max-width: 720px) {
    .fc-landing-hero { margin: 1rem 0 1.6rem; padding: 0.8rem 0.5rem; }
    .fc-landing-hero h1 { font-size: 2rem; }
    .fc-landing-tagline { font-size: 1rem; }
    .fc-landing-personas,
    .fc-lang-grid,
    .fc-path-grid {
        grid-template-columns: 1fr;
    }
    .fc-shelf { grid-template-columns: 1fr; }
}

/* Dark theme */
html[data-theme="dark"] .fc-persona-card { background: #211a13; border-color: #3a3128; }
html[data-theme="dark"] .fc-persona-card:hover { border-color: #b04050; }
html[data-theme="dark"] .fc-persona-card p { color: #d4b78a; }
html[data-theme="dark"] .fc-persona-newcomer { background: #1a2520; border-color: #3a5546; }
html[data-theme="dark"] .fc-persona-returning { background: #2a2218; border-color: #5a4419; }
html[data-theme="dark"] .fc-lang-card-big,
html[data-theme="dark"] .fc-shelf-card { background: #211a13; border-color: #3a3128; }
html[data-theme="dark"] .fc-lang-card-big:hover,
html[data-theme="dark"] .fc-shelf-card:hover { background: #2a2218; border-color: #b04050; }
html[data-theme="dark"] .fc-path-card { background: #1d1611; border-color: #3a3128; }
html[data-theme="dark"] .fc-shelf-heading { color: #f0a8b8; border-bottom-color: #3a3128; }

/* ───────── Radhe-source body typography (HV / AVC / GC / GS) ───────── */
.rd-body { font-family: 'Lora', Georgia, serif; line-height: 1.7; }
.rd-body .rd-block { margin: 0.7rem 0; }
.rd-body .rd-shloka {
    font-style: italic;
    color: #5a3618;
    background: #FCF8EE;
    border-left: 3px solid #B8860B;
    padding: 0.6rem 0.9rem;
    margin: 0.9rem 0;
    border-radius: 0 4px 4px 0;
    font-size: 1rem;
}
.rd-body .rd-pada {
    font-size: 0.85rem;
    color: #7a6044;
    background: #FAF5E5;
    border-left: 2px solid #d4b78a;
    padding: 0.4rem 0.8rem;
    margin: -0.5rem 0 0.9rem 1rem;
    border-radius: 0 3px 3px 0;
}
.rd-body .rd-pada::before {
    content: "pada-vibhāga: ";
    font-weight: 700;
    color: var(--fc-maroon, #6B1D2A);
    text-transform: lowercase;
    font-size: 0.75rem;
    letter-spacing: 0.04em;
}
.rd-body .rd-pada { /* hide redundant inline label if it exists in text */ }
.rd-body .rd-deva {
    font-family: 'Sanskrit 2003', 'Noto Sans Devanagari', serif;
    font-size: 1.15rem;
    color: #3a2a1a;
    line-height: 1.55;
    margin: 0.8rem 0;
    padding: 0.5rem 0.8rem;
    background: #FCF8EE;
    border-left: 3px solid #B8860B;
    border-radius: 0 4px 4px 0;
}
.rd-body .rd-heading {
    font-family: 'Lora', Georgia, serif;
    color: var(--fc-maroon, #6B1D2A);
    font-size: 1.02rem;
    font-weight: 700;
    margin: 1.6rem 0 0.4rem;
    padding-bottom: 0.2rem;
    border-bottom: 1px solid #ECDFC4;
}
.rd-body .rd-divider {
    border: none;
    border-top: 1px solid #d4b78a;
    width: 60%;
    margin: 1.8rem auto;
}
.rd-body .rd-prose { margin: 0.7rem 0; color: #2a2a2a; }

html[data-theme="dark"] .rd-body .rd-shloka { background: #211a13; color: #d4b78a; border-left-color: #b8860b; }
html[data-theme="dark"] .rd-body .rd-pada   { background: #1d1611; color: #a89378; border-left-color: #5a4419; }
html[data-theme="dark"] .rd-body .rd-deva   { background: #211a13; color: #e6d6b8; border-left-color: #b8860b; }
html[data-theme="dark"] .rd-body .rd-heading { color: #f0a8b8; border-bottom-color: #3a3128; }
html[data-theme="dark"] .rd-body .rd-prose  { color: #d4b78a; }

/* ───────── /search/help/ page ───────── */
.fc-search-help-link {
    margin-left: 0.8rem;
    font-size: 0.85rem;
    color: var(--fc-gold, #B8860B);
    text-decoration: none;
    border-bottom: 1px dotted currentColor;
}
.fc-search-help-link:hover { color: var(--fc-maroon, #6B1D2A); border-bottom-style: solid; }

.fc-search-help-lead {
    font-family: 'Lora', Georgia, serif;
    font-size: 1.02rem;
    color: #4a3a2a;
    max-width: 760px;
    margin: 0.5rem 0 1.4rem;
    line-height: 1.55;
}
.fc-container h2 {
    font-family: 'Lora', Georgia, serif;
    color: var(--fc-maroon, #6B1D2A);
    font-size: 1.2rem;
    margin: 1.6rem 0 0.5rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #ECDFC4;
    letter-spacing: 0.02em;
}
.fc-search-help-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.5rem 0 0.8rem;
    font-size: 0.92rem;
    border: 1px solid #ECDFC4;
    border-radius: 4px;
    overflow: hidden;
}
.fc-search-help-table thead {
    background: #FCF8EE;
    color: #6B5025;
}
.fc-search-help-table th,
.fc-search-help-table td {
    text-align: left;
    padding: 0.45rem 0.7rem;
    border-bottom: 1px solid #ECDFC4;
    vertical-align: top;
}
.fc-search-help-table tr:last-child td { border-bottom: none; }
.fc-search-help-table th {
    font-family: 'Lora', Georgia, serif;
    font-weight: 700;
    letter-spacing: 0.04em;
    font-size: 0.85rem;
    text-transform: uppercase;
}
.fc-search-help-table td:first-child { width: 32%; }
.fc-search-help-table code {
    background: #FFF8E6;
    border: 1px solid #ECDFC4;
    padding: 0.05rem 0.35rem;
    border-radius: 3px;
    font-family: 'SF Mono', Menlo, monospace;
    font-size: 0.88em;
    color: var(--fc-maroon, #6B1D2A);
    white-space: nowrap;
}
.fc-search-help-table em { color: #5a4a2a; font-style: italic; }

.fc-search-help-list {
    line-height: 1.6;
    padding-left: 1.3rem;
    margin: 0.4rem 0 0.8rem;
}
.fc-search-help-list code {
    background: #FFF8E6;
    border: 1px solid #ECDFC4;
    padding: 0.05rem 0.3rem;
    border-radius: 3px;
    font-family: 'SF Mono', Menlo, monospace;
    font-size: 0.88em;
    color: var(--fc-maroon, #6B1D2A);
}
.fc-search-help-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #ECDFC4;
}
.fc-search-help-back {
    color: var(--fc-maroon, #6B1D2A);
    font-family: 'Lora', Georgia, serif;
    text-decoration: none;
    font-weight: 600;
}
.fc-search-help-back:hover { color: var(--fc-gold, #B8860B); }

@media (max-width: 600px) {
    .fc-search-help-table { font-size: 0.85rem; }
    .fc-search-help-table th, .fc-search-help-table td { padding: 0.35rem 0.5rem; }
    .fc-search-help-table td:first-child { width: 38%; }
}

html[data-theme="dark"] .fc-search-help-table { border-color: #3a3128; }
html[data-theme="dark"] .fc-search-help-table thead { background: #211a13; color: #f0a8b8; }
html[data-theme="dark"] .fc-search-help-table th,
html[data-theme="dark"] .fc-search-help-table td { border-bottom-color: #3a3128; color: #d4b78a; }
html[data-theme="dark"] .fc-search-help-table code,
html[data-theme="dark"] .fc-search-help-list code {
    background: #2a2218; border-color: #3a3128; color: #f0a8b8;
}
html[data-theme="dark"] .fc-search-help-lead { color: #d4b78a; }

/* ============================================================
   Classical Sanskrit analysis section (BG)
   पदच्छेद · अन्वय · व्याकरण · तात्पर्य · विवरण
   ============================================================ */
body[data-hide-classical_analysis] section[data-sec="classical_analysis"] { display: none; }

.fc-classical-analysis {
    background: #fbf6e9;
    border-left: 3px solid #d4b78a;
    padding: 0.9rem 1.1rem;
    margin: 0.9rem 0;
    border-radius: 4px;
}
.fc-classical-analysis .fc-section-label {
    color: #6a5a3a;
    font-weight: 700;
    margin-bottom: 0.3rem;
}
.cr-classical-note {
    font-size: 0.8rem;
    font-style: italic;
    color: #7a5a3a;
    margin-bottom: 0.7rem;
    opacity: 0.85;
}
.cr-cl-layer {
    margin: 0.45rem 0;
    border-top: 1px dotted #d4b78a;
    padding-top: 0.45rem;
}
.cr-cl-layer:first-of-type { border-top: 0; padding-top: 0.2rem; }
.cr-cl-layer summary {
    cursor: pointer;
    list-style: none;
    padding: 0.25rem 0;
    user-select: none;
    color: #5a4520;
}
.cr-cl-layer summary::-webkit-details-marker { display: none; }
.cr-cl-layer summary::before {
    content: "▸";
    margin-right: 0.5rem;
    color: #b89a6a;
    display: inline-block;
    transition: transform 0.15s;
}
.cr-cl-layer[open] > summary::before { transform: rotate(90deg); }
.cr-cl-sa {
    font-family: 'RM Devanagari', 'Sanskrit 2003', 'Noto Sans Devanagari', serif;
    color: #5a4520;
    font-weight: 700;
    margin-right: 0.6rem;
}
.cr-cl-en {
    color: #7a5a3a;
    font-size: 0.9rem;
    font-style: italic;
}
.cr-cl-padaccheda,
.cr-cl-anvaya {
    font-family: 'RM Devanagari', 'Sanskrit 2003', 'Noto Sans Devanagari', serif;
    font-size: 1.1rem;
    line-height: 1.75;
    padding: 0.5rem 0.9rem;
    background: #fff8e6;
    border-radius: 3px;
    margin: 0.4rem 0;
    color: #2a2218;
}
.cr-cl-padaccheda > div { margin: 0.2rem 0; }
.cr-cl-vyakarana {
    margin: 0.4rem 0;
    padding-left: 1.5rem;
    list-style: disc;
}
.cr-cl-vyakarana li {
    margin: 0.25rem 0;
    color: #4a3a20;
    font-size: 0.95rem;
    line-height: 1.55;
}
.cr-cl-tatparya {
    background: #f4f9f5;
    border-left: 3px solid #2e5f46;
    padding: 0.65rem 0.95rem;
    margin: 0.4rem 0;
    font-family: 'Lora', Georgia, serif;
    line-height: 1.6;
    border-radius: 3px;
    color: #1f3a2e;
}
.cr-cl-vivarana {
    color: #5a4520;
    font-size: 0.92rem;
    font-style: italic;
    padding: 0.5rem 0.9rem;
    background: #fffaf0;
    border-radius: 3px;
    margin: 0.4rem 0;
    line-height: 1.6;
}

/* Dark theme */
html[data-theme="dark"] .fc-classical-analysis {
    background: #1f1a12; border-left-color: #6a5a3a;
}
html[data-theme="dark"] .fc-classical-analysis .fc-section-label { color: #d4b78a; }
html[data-theme="dark"] .cr-classical-note { color: #b89a6a; }
html[data-theme="dark"] .cr-cl-layer { border-top-color: #3a3128; }
html[data-theme="dark"] .cr-cl-layer summary { color: #e8d5a8; }
html[data-theme="dark"] .cr-cl-sa { color: #f0c878; }
html[data-theme="dark"] .cr-cl-en { color: #b89a6a; }
html[data-theme="dark"] .cr-cl-padaccheda,
html[data-theme="dark"] .cr-cl-anvaya {
    background: #2a2218; color: #e8d5a8;
}
html[data-theme="dark"] .cr-cl-vyakarana li { color: #d4b78a; }
html[data-theme="dark"] .cr-cl-tatparya {
    background: #15201a; border-left-color: #5a8f6a; color: #c8e0d0;
}
html[data-theme="dark"] .cr-cl-vivarana {
    background: #2a2218; color: #d4b78a;
}

/* ============================================================
   Classical analysis v2 — English-first labels, IAST sub-lines,
   vyākaraṇa table.
   ============================================================ */
.cr-classical-intro {
    background: #fff;
    border: 1px dashed #d4b78a;
    color: #5a4520;
    font-size: 0.88rem;
    line-height: 1.55;
    padding: 0.55rem 0.85rem;
    margin: 0.4rem 0 0.7rem;
    border-radius: 3px;
}
.cr-classical-intro strong { color: #2e5f46; }

.fc-classical-analysis .fc-section-label .cr-cl-sa-side {
    font-family: 'RM Devanagari', 'Sanskrit 2003', 'Noto Sans Devanagari', serif;
    color: #7a5a3a;
    font-weight: 500;
    font-size: 0.92rem;
    margin-left: 0.5rem;
}
.cr-cl-layer summary strong {
    font-weight: 700;
    color: #2a2218;
}
.cr-cl-sa-side {
    color: #7a5a3a;
    font-size: 0.85rem;
    font-weight: 400;
    margin-left: 0.3rem;
}

/* Promote tātparya + vivaraṇa visually */
.cr-cl-elevated {
    background: #fff;
    border: 1px solid #c8a86a;
    box-shadow: 0 1px 0 rgba(190, 160, 100, 0.15);
    border-radius: 4px;
    padding: 0.2rem 0.7rem;
    margin: 0.5rem 0;
}
.cr-cl-elevated > summary { padding: 0.4rem 0; }
.cr-cl-elevated[open] > summary {
    border-bottom: 1px dotted #d4b78a;
    margin-bottom: 0.4rem;
}

/* Padaccheda / Anvaya blocks: paired Devanāgarī + IAST lines */
.cr-cl-padaccheda-block,
.cr-cl-anvaya-block {
    background: #fff8e6;
    padding: 0.6rem 0.95rem;
    border-radius: 3px;
    margin: 0.4rem 0;
}
.cr-cl-dev {
    font-family: 'RM Devanagari', 'Sanskrit 2003', 'Noto Sans Devanagari', serif;
    font-size: 1.1rem;
    line-height: 1.55;
    color: #2a2218;
    margin-top: 0.35rem;
}
.cr-cl-dev:first-child { margin-top: 0; }
.cr-cl-iast {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    font-size: 0.95rem;
    color: #7a5a3a;
    line-height: 1.45;
    margin-bottom: 0.15rem;
}
.cr-cl-gloss {
    margin-top: 0.55rem;
    padding-top: 0.45rem;
    border-top: 1px dotted #d4b78a;
    color: #4a3a20;
    font-size: 0.95rem;
    line-height: 1.55;
    font-style: italic;
}

/* Vyākaraṇa — 4-column table */
.cr-cl-vyakarana-tablewrap {
    overflow-x: auto;
    margin: 0.4rem 0;
}
.cr-cl-vyakarana-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    background: #fff;
    border-radius: 3px;
    overflow: hidden;
}
.cr-cl-vyakarana-table thead th {
    background: #f0e4c8;
    color: #5a4520;
    text-align: left;
    font-weight: 700;
    padding: 0.35rem 0.6rem;
    border-bottom: 2px solid #d4b78a;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.cr-cl-vyakarana-table tbody td {
    padding: 0.4rem 0.6rem;
    border-bottom: 1px dotted #e6d3a8;
    vertical-align: top;
}
.cr-cl-vyakarana-table tbody tr:last-child td { border-bottom: none; }
.cr-cl-vyakarana-table tbody tr:nth-child(even) { background: #fdfaf0; }
.cr-cl-vk-dev {
    font-family: 'RM Devanagari', 'Sanskrit 2003', 'Noto Sans Devanagari', serif;
    color: #2a2218;
    font-size: 1.02rem;
    white-space: nowrap;
}
.cr-cl-vk-iast {
    font-family: 'Lora', Georgia, serif;
    font-style: italic;
    color: #5a4520;
    white-space: nowrap;
}
.cr-cl-vk-gram {
    color: #4a3a20;
    font-size: 0.88rem;
    line-height: 1.45;
}
.cr-cl-vk-gram abbr[title] {
    text-decoration: underline dotted #b89a6a;
    cursor: help;
}
.cr-cl-vk-en {
    color: #2a2218;
    font-style: italic;
}

/* Mobile: stack the 4 cells vertically per row */
@media (max-width: 640px) {
    .cr-cl-vyakarana-table thead { display: none; }
    .cr-cl-vyakarana-table,
    .cr-cl-vyakarana-table tbody,
    .cr-cl-vyakarana-table tr,
    .cr-cl-vyakarana-table td { display: block; width: 100%; }
    .cr-cl-vyakarana-table tr {
        border-bottom: 1px solid #e6d3a8;
        padding: 0.4rem 0;
    }
    .cr-cl-vyakarana-table td {
        border: none;
        padding: 0.15rem 0;
        white-space: normal;
    }
    .cr-cl-vk-dev { font-size: 1.1rem; font-weight: 700; }
    .cr-cl-vk-iast::before { content: "IAST: "; color: #b89a6a; font-style: normal; }
    .cr-cl-vk-gram::before { content: "Grammar: "; color: #b89a6a; font-weight: 700; }
    .cr-cl-vk-en::before { content: "Meaning: "; color: #b89a6a; font-style: normal; font-weight: 700; }
}

/* Dark theme overrides */
html[data-theme="dark"] .cr-classical-intro {
    background: #1f1a12; border-color: #6a5a3a; color: #d4b78a;
}
html[data-theme="dark"] .cr-classical-intro strong { color: #8fd0a8; }
html[data-theme="dark"] .cr-cl-elevated {
    background: #1a1612; border-color: #8a7050; box-shadow: none;
}
html[data-theme="dark"] .cr-cl-padaccheda-block,
html[data-theme="dark"] .cr-cl-anvaya-block {
    background: #2a2218; color: #e8d5a8;
}
html[data-theme="dark"] .cr-cl-dev { color: #e8d5a8; }
html[data-theme="dark"] .cr-cl-iast { color: #b89a6a; }
html[data-theme="dark"] .cr-cl-gloss { color: #d4b78a; border-top-color: #4a3a20; }
html[data-theme="dark"] .cr-cl-vyakarana-table { background: #1f1a12; }
html[data-theme="dark"] .cr-cl-vyakarana-table thead th {
    background: #2a2218; color: #d4b78a; border-bottom-color: #6a5a3a;
}
html[data-theme="dark"] .cr-cl-vyakarana-table tbody td { border-bottom-color: #3a3128; }
html[data-theme="dark"] .cr-cl-vyakarana-table tbody tr:nth-child(even) { background: #1a1612; }
html[data-theme="dark"] .cr-cl-vk-dev { color: #e8d5a8; }
html[data-theme="dark"] .cr-cl-vk-iast { color: #b89a6a; }
html[data-theme="dark"] .cr-cl-vk-gram { color: #d4b78a; }
html[data-theme="dark"] .cr-cl-vk-en { color: #e8d5a8; }
