Jump to content

MediaWiki:Common.css: Difference between revisions

From Anandamakaranda
Undo revision 5341 by Chandrashekars (talk)
Tags: Undo Reverted
No edit summary
 
(36 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* ═══════════════════════════════════════════════════════════════════
/* ═══════════════════════════════════════════════════════════════════
   MediaWiki:Common.css  —  grantha.io  (v7 — complete replacement)
   MediaWiki:Common.css  —  grantha.io  (v6 additions)
   Replace your entire Common.css with this file.
   Paste this entire block INTO your existing Common.css, replacing
  or appending as appropriate. Sections marked NEW are net additions.
   ═══════════════════════════════════════════════════════════════════ */
   ═══════════════════════════════════════════════════════════════════ */
 
/* Common Colors */
/* ── Fonts ──────────────────────────────────────────────────────── */
:root {
    --maroon: #be100e;
    --orange: #e65100;
    --light-orange: #f57c00;
    --dark-gray: #555;
    --light-gray: #eee;
    --muted-gray: #888;
    --text: #1a1a1a;
    --brown: #a07040;
    --light-brown: #e8d4a0;
}
/* ── Fonts ────────────────────────────────────────────────────── */
@font-face {
@font-face {
   font-family: "Adishila";
   font-family: "Adishila";
Line 16: Line 28:
}
}
@font-face {
@font-face {
   font-family: "AdishilaVedic";
   font-family: "AdishilaDev";
   src: url("/resources/fonts/adishila/AdishilaVedic.ttf") format("truetype");
   src: url("/resources/fonts/AdishilaDev.ttf") format("truetype");
   font-weight: normal; font-style: normal;
   font-weight: normal; font-style: normal;
}
}
 
@font-face {
/* ── CSS custom properties ──────────────────────────────────────── */
   font-family: "AdishilaDev";
:root {
   src: url("/resources/fonts/AdishilaDeBv.ttf") format("truetype");
   --gr-maroon:     #800000;
   font-weight: bold; font-style: normal;
   --gr-orange:     #f57c00;
}
   --gr-black:       #222222;
@font-face {
  --gr-red:         #be100e;
   font-family: "AdishilaDevGuru";
  --gr-i2mm:  20px;
   src: url("/resources/fonts/AdishilaDevGuru.ttf") format("truetype");
  --gr-i5mm:  20px;
   font-weight: bold; font-style: normal;
   --gr-i7mm: 24px;
   --gr-i10mm: 32px;
   --gr-font:    'Adishila', 'Noto Serif Devanagari', serif;
  --gr-vedic:   'AdishilaVedic', 'Adishila', 'Noto Serif Devanagari', serif;
  --gr-system: system-ui, -apple-system, sans-serif;
}
}


/* ── Global parser output ───────────────────────────────────────── */
.mw-parser-output,
.mw-parser-output,
.mw-parser-output * {
.mw-parser-output *,
   font-family: var(--gr-font) !important;
.mw-parser-output pre,
.mw-parser-output code,
.mw-parser-output tt,
.mw-parser-output kbd {
   font-family: 'Adishila', 'Noto Serif Devanagari', serif !important;
}
}
.mw-parser-output {
.mw-parser-output {
   font-size: 20px;
   font-size: 22px;
   line-height: 1.7;
   line-height: 1.6;
   color: var(--gr-black);
   color: #555;
   max-width: 100%; width: 100%;
   max-width: 100%;
   margin: 0; padding: 0; box-sizing: border-box;
  width: 100%;
   margin: 0; padding: 0;
  box-sizing: border-box;
}
}
h1.firstHeading, #firstHeading, .mw-page-title-main { display: none !important; }
h1.firstHeading, #firstHeading, .mw-page-title-main { display: none !important; }
.mw-parser-output p { margin: 0 0 0.4em; }
.mw-parser-output p:empty { display: none !important; margin: 0 !important; }
.mw-heading .mw-editsection { display: none !important; }


/* ── Document title ─────────────────────────────────────────────── */
.mw-parser-output h1,
.gr-doc-title {
.mw-parser-output h2,
   font-size: 32px !important; font-weight: 500 !important;
.mw-parser-output h3,
   color: var(--gr-maroon) !important;
.mw-parser-output h4,
  text-align: center !important;
.mw-parser-output .mw-heading h1,
   margin: 0 0 18px !important; border: none !important; line-height: 1.5;
.mw-parser-output .mw-heading h2,
.mw-parser-output .mw-heading h3 {
   font-family: 'Adishila', 'Noto Serif Devanagari', serif !important;
   border: none !important; border-bottom: none !important;
   padding: 0 !important; background: none !important;
}
}
.gr-doc-title[data-has-moola], .gr-doc-title[data-has-ullekha] {
 
   border-bottom: 1px dotted var(--gr-maroon) !important;
.mw-parser-output .mw-heading {
  padding-bottom: 8px !important; margin-bottom: 20px !important;
   border: none !important; border-bottom: none !important;
  margin: 0; padding: 0;
}
}


/* ── Chapter headings (== h2 ==) ────────────────────────────────── */
.gr-doc-title {
.mw-parser-output h1.chapter-heading,
   font-size: 1.6em; font-weight: 500; color: #1a1a1a;
.mw-parser-output .chapter-heading {
   line-height: 1.4; margin: 0 0 16px; border: none !important;
   font-size: 20px !important; font-weight: 600 !important;
  color: var(--gr-maroon) !important;
   text-align: center !important;
  border-bottom: 2px dotted var(--gr-maroon) !important;
  margin: 28px auto 8px !important; padding: 0 !important; width: 80%;
}
}
.mw-parser-output h2,
 
.mw-parser-output .mw-heading2 h2 {
/* ── Chapter / section headings ──────────────────────────────── */
   font-size: 28px !important; font-weight: 600 !important;
.adhyaya-block h2,
   color: var(--gr-maroon) !important;
.adhyaya-heading,
   text-align: center !important;
.mw-parser-output .mw-heading2 h2,
   border: none !important; border-bottom: 2px dotted var(--gr-maroon) !important;
.mw-parser-output h2 {
   margin: 28px auto 8px !important; padding: 0 !important; width: 80%; line-height: 1.6;
   font-size: 1.2em !important; font-weight: 500 !important;
   color: var(--light-orange) !important; line-height: 1.8;
   margin: 24px 0 4px !important; padding: 0 !important;
   border: none !important;
  border-bottom: 2px dotted var(--light-orange) !important;
   width: 75%;
}
}
/* Section headings (=== h3 ===) */
 
.mw-parser-output h3.adhikarana-heading,
.mw-parser-output .mw-heading3 h3,
.mw-parser-output .adhikarana-heading,
.mw-parser-output h3 {
.mw-parser-output h3,
   font-size: 1em !important; font-weight: 500 !important;
.mw-parser-output .mw-heading3 h3 {
   color: var(--orange) !important; line-height: 1.5;
   font-size: 24px !important; font-weight: 600 !important;
   margin: 24px 0 8px !important; padding: 0 !important;
   color: var(--gr-orange) !important;
   border: none !important;
   text-align: center !important;
  border-bottom: 1px dotted var(--orange) !important;
   border: none !important; border-bottom: 1px dotted var(--gr-orange) !important;
   width: 55%;
   margin: 22px auto 6px !important; padding: 0 !important; width: 70%; line-height: 1.5;
}
}
/* Sub-headings (h4) */
 
.gr-section-head, .gr-gadya-head,
.mw-heading .mw-editsection,
h4.gr-section-head, h4.gr-gadya-head {
.adhyaya-block .mw-editsection { display: none !important; }
  font-size: 24px !important; font-weight: 600 !important;
 
  color: var(--gr-orange) !important;
.mw-parser-output p { margin: 0 0 0.6rem; }      /* REDUCED */
  text-align: center !important;
.mw-parser-output p:empty,
   margin: 16px 0 6px !important; padding: 0 !important; border: none !important;
.mw-parser-output > div > p:empty,
.mw-heading + p:empty,
.mw-heading2 + p:empty,
.adhyaya-block + p:empty,
.verse-block + p:empty {
   display: none !important; margin: 0 !important;
}
}
/* Adhyaya block (section label below heading) */
.adhyaya-block { margin: 2px 0 6px; }
.adhyaya-trans { font-size: 24px; color: #777; margin: 0; display: none; }


/* ── Verse block (XSL: div.verse > div.verse-text > div.shloka) ── */
/* ── Verse blocks — tightened spacing ────────────────────────── */
.mw-parser-output .verse { margin: 10px 0 6px; }
.shloka-block {
.mw-parser-output .verse-text { margin: 0; }
.mw-parser-output .shloka { margin: 0; padding: 0; }
.mw-parser-output .shloka-line {
   display: block;
   display: block;
   font-size: 24px; font-weight: 600; font-style: normal;
   text-align: left;
  color: var(--gr-orange);
   margin: 3px 0 0;
   padding-left: var(--gr-i5mm); line-height: 1.6; margin: 0;
}
/* Sutra type */
.mw-parser-output .verse[type="sutra"] .shloka-line {
  color: var(--gr-maroon) !important; font-style: normal !important;
}
/* Mantra/Vedic type */
.mw-parser-output .verse[type="mantra"] .shloka-line,
.mw-parser-output .verse[type="sutramantra"] .shloka-line {
  font-family: var(--gr-vedic) !important;
  color: var(--gr-maroon) !important; font-weight: 700 !important;
}
/* Shloka (verse) type */
.mw-parser-output .verse[type="shloka"] .shloka-line {
  color: var(--gr-orange) !important; font-style: italic;
}
}


/* ── Introduction (XSL: div.introduction) ──────────────────────── */
.shloka-line {
.mw-parser-output .introduction {
  display: block;
   font-size: 24px; color: var(--gr-black);
   font-style: normal;
   text-align: justify; text-indent: var(--gr-i7mm);
  color: #333;
   padding-left: var(--gr-i2mm); margin: 0.6em 0 0.4em; line-height: 1.7;
   line-height: 1.35;
   margin: 0;
}
}
.mw-parser-output .introduction p { display: inline; margin: 0; }


/* ── Bhashya prose (XSL: div.bhashya) ──────────────────────────── */
.verse-block {
.mw-parser-output .bhashya {
   display: block;
   font-size: 24px; color: var(--gr-black);
   margin: 6px 0 0;          
  text-align: justify; text-indent: var(--gr-i7mm);
   text-align: left;
   padding-left: var(--gr-i2mm); margin: 0.2em 0 0.4em; line-height: 1.7;
}
.mw-parser-output .bhashya p { display: inline; margin: 0; }
.mw-parser-output .bhashya.footnote {
   font-size: 24px; padding-left: 40px; padding-top: 10px; padding-bottom: 10px;
  border-top: 1px solid #007bff; border-bottom: 1px solid #007bff;
  text-indent: 0;
}
}


/* ── Leading bhashya (XSL: div.leading-bhashya) ────────────────── */
.verse-block .shloka-block { text-align: left; margin: 0; }
.mw-parser-output .leading-bhashya {
  font-style: italic; color: var(--gr-black);
  margin: 0.5em 0 0.4em; line-height: 1.6; font-size: 24px;
}


/* ── Inline para run ────────────────────────────────────────────── */
.verse-block .shloka-line {
.mw-parser-output .gr-inlinepara-run {
  display: block;
   font-size: 16px; color: var(--gr-black);
   font-style: italic;
   text-align: justify; line-height: 1.7; margin: 0.2em 0;
  color: #c65;
   font-weight: 500;
  line-height: 1.35;
  margin: 0;
}
}


/* ── Pramana (XSL: div.pramana > div.padya / div.gadya) ─────────── */
.verse-block + p { display: none !important; margin: 0 !important; }
.mw-parser-output .pramana {
  font-style: italic; color: var(--gr-red); margin: 0.5em 0;
}
.mw-parser-output .pramana .padya {
  margin-bottom: 1.2em; text-align: left;
  padding-left: var(--gr-i5mm); line-height: 1.6;
}
.mw-parser-output .pramana .gadya {
  margin-bottom: 0.8em; text-align: justify;
  text-indent: var(--gr-i7mm); padding-left: var(--gr-i2mm);
}


/* ── Uvaaca (XSL: blockquote.uvaaca) ───────────────────────────── */
/* ── Uvacha ───────────────────────────────────────────────────── */
.mw-parser-output blockquote.uvaaca,
.uvacha-block {
.mw-parser-output .uvaaca {
  display: block;
   color: #BF360C; padding: 8px 40px;
   font-weight: bold; color: #c65;
   border-left: 3px solid #BF360C; margin: 16px 0 20px;
  margin: 0.5rem 0 0;
   background-color: #FFF4F3; font-style: normal; font-weight: 500;
  padding: 2px 0 2px 12px;
  font-size: 24px;
   border-left: 3px solid #c65;
   text-align: left; font-style: normal;
}
}
.uvacha-block + .verse-block { margin-top: 2px; }


/* ── Author note ────────────────────────────────────────────────── */
/* ── Bhashyam ─────────────────────────────────────────────────── */
.mw-parser-output .author-note,
.bhashyam-block {
.mw-parser-output .gr-author-note {
  display: block;
   font-size: 24px !important; font-weight: 700 !important;
   font-size: 1em; line-height: 1.6;
   color: var(--gr-maroon) !important;
   color: #555;
   text-align: center !important;
   margin: 0.25em 0 0.35em 48px;
   margin: 16px 0 !important; padding: 0 !important;
   padding: 0; border: none; background: transparent;
  border: none !important; background: none !important; line-height: 1.6;
}
}


/* ── Prateeka inline (XSL: span.prateeka) ───────────────────────── */
/* ── Padya ────────────────────────────────────────────────────── */
.mw-parser-output .prateeka,
.padya-block {
.mw-parser-output .gr-prateeka {
   display: block; font-size: 1em; line-height: 1.75;
   font-weight: bold !important; font-style: normal !important;
   color: #c65 !important; font-style: italic; font-weight: 500;
  color: var(--gr-orange) !important; display: inline-block; margin: 0 0.1em;
   margin: 0.4em 0 0.6em 60px; padding: 0; border: none; background: transparent;
}
/* Moola inline (XSL: em.Moola) */
.mw-parser-output .Moola,
.mw-parser-output .gr-moola {
   font-weight: bold !important; font-style: italic !important;
  color: var(--gr-maroon) !important; display: inline-block; margin: 0 0.1em;
}
/* Mulaprateeka block */
.mw-parser-output .mulaprateeka,
.mw-parser-output .gr-mulaprateeka-block {
  font-weight: bold !important; font-style: italic !important;
  color: var(--gr-maroon) !important; text-align: center !important;
   margin: 0.7em 0 0.3em !important; line-height: 1.5; display: block;
}
}


/* ── Reference / quote links (XSL: a.qt) ───────────────────────── */
/* ── Prateeka (inline bold lemma) ────────────────────────────── */
.mw-parser-output a.qt,
.gr-prateeka { font-weight: bold; font-style: normal; color: #333; }
.mw-parser-output .gr-reference {
  color: var(--gr-orange) !important; font-style: italic; text-decoration: none !important;
}
.mw-parser-output a.qt:hover,
.mw-parser-output .gr-reference:hover { text-decoration: underline dotted !important; }


/* ── Avataranika ────────────────────────────────────────────────── */
/* ── Mulaprateeka (block-level centered bold) ────────────────── */
.mw-parser-output .avataranika {
.gr-mulaprateeka-block {
   font-style: italic; color: #444; margin: 0.3em 0 0.5em 0.5em;
   display: block; font-weight: bold; font-style: normal;
  padding-left: 0.6em; border-left: 2px solid #c9a96e; line-height: 1.6;
  text-align: center; color: #333;
  margin: 0.7em 0 0.3em; line-height: 1.5;
}
}


/* ── Gadya topichead (hidden per ref site) ──────────────────────── */
/* ── Moola (inline highlighted source text) ──────────────────── */
.mw-parser-output h2.topichead { display: none !important; }
.gr-moola { font-weight: bold; font-style: italic; color: #c65; }


/* ── Teeka block (vyakhya embedded commentary) ──────────────────── */
/* ── Teeka ────────────────────────────────────────────────────── */
/* NEW — teeka now has a subtle warm background (was unstyled) */
.teeka-block {
.teeka-block {
   border-radius: 5px; padding: 6px 10px 8px; margin: 0.3em 0;
   border-radius: 5px;
   font-size: 24px; line-height: 1.65; color: var(--gr-black);
  padding: 6px 10px 8px;
   background: #fffdf5; border: 1px solid #f0e0b0;
  margin: 0.3em 0;
   font-size: 0.92em;
  line-height: 1.6;
  color: #555;
   background: #fffdf5;
  border: 1px solid #f0e0b0;
}
}
.teeka-title {
.teeka-title {
   font-family: var(--gr-system) !important;
   font-family: system-ui, -apple-system, sans-serif !important;
   font-size: 24px; font-weight: 700; letter-spacing: 0.06em;
   font-size: 0.75em; font-weight: 700;
  text-transform: uppercase; color: #a07040;
  letter-spacing: 0.06em; text-transform: uppercase;
  margin-bottom: 4px; padding-bottom: 3px; border-bottom: 1px solid #e8d4a0;
  color: var(--brown); margin-bottom: 4px; padding-bottom: 3px;
  border-bottom: 1px solid var(--light-brown);
}
}
.teeka-body { font-family: inherit; margin: 0; }
.teeka-body { font-family: inherit; margin: 0; }
.teeka-body .bhashya,
.teeka-block .shloka-block {
.teeka-body .introduction {
  margin: 0 0 0.35em;
   font-size: 24px !important; text-indent: var(--gr-i7mm); padding-left: var(--gr-i2mm);
  text-align: left;
  padding: 0;
}
.teeka-block .shloka-line {
   display: block; font-style: italic; color: var(--maroon);
  line-height: 1.4; font-size: 0.97em; margin: 0;
}
}
.teeka-body .shloka-line {
/* Vyakhya sub-headings rendered as h4 (wikitext === not parsed inside divs) */
   font-size: 24px !important; color: var(--gr-red) !important; font-style: italic;
.gr-vyakhya-head, .gr-section-head {
   padding-left: var(--gr-i10mm) !important;
   font-size: 0.88em; font-weight: 700;
  color: #6a3e00; margin: 0.4em 0 0.2em;
  font-family: inherit;
   border: none;
}
}


/* Moola reference above teeka entries */
/* ── Adhyaya block ────────────────────────────────────────────── */
.gr-moola-ref {
.adhyaya-block { margin: 0 0 4px; }
  display: block; margin: 0 0 6px; padding: 4px 0 4px var(--gr-i5mm);
.adhyaya-trans { font-size: 0.9em; color: #666; margin: 2px 0 0; }
   border-left: 3px solid var(--gr-orange);
.adhyaya-intro { margin-top: 8px; line-height: 1.75; color: #555; }
 
/* ── Nyaya ────────────────────────────────────────────────────── */
.nyaya-block { margin: 32px 0; padding-top: 12px; border-top: 1px solid #eee; }
.nyaya-title {
  font-size: 1em; font-weight: 500; color: var(--orange);
   margin-bottom: 0.4rem; border-bottom: 1px dotted var(--orange); width: 50%;
}
}
.gr-moola-ref .shloka-line {
.nyaya-title span { display: block; font-size: 0.85em; color: #666; }
   font-size: 24px !important; color: var(--gr-orange) !important; padding-left: 0 !important;
.nyaya-body { color: #555; line-height: 1.75; margin-top: 0.5rem; }
 
/* ── Prasna ───────────────────────────────────────────────────── */
.prasna-block { margin: 32px 0; padding-top: 12px; border-top: 1px solid #eee; }
.prasna-title {
   font-size: 1em; font-weight: 500; color: var(--orange);
  margin-bottom: 0.4rem; border-bottom: 1px dotted var(--orange); width: 50%;
}
}
.prasna-title span { display: block; font-size: 0.85em; color: #666; }
.prasna-question, .prasna-answer { color: #555; line-height: 1.75; margin-top: 0.5rem; }
.prasna-answer { margin-left: 60px; }
/* ── Introduction ───────────────────────────────────────────────── */


/* ── Vyakhya descriptor headings ────────────────────────────────── */
.introduction  p {
.gr-vyakhya-head, .gr-section-head {
  color: var(--dark-gray);
   font-size: 24px; font-weight: 700; color: #6a3e00;
   font-weight:400;
   margin: 0.4em 0 0.2em; border: none; padding: 0; font-family: inherit;
   margin: 0 !important;
  padding: 0 !important;
}
}


/* ── Nyaya / Prasna ─────────────────────────────────────────────── */
/* ── Verse action buttons ─────────────────────────────────────── */
.nyaya-block, .prasna-block {
.verse-actions {
   margin: 28px 0; padding-top: 10px; border-top: 1px solid #eee;
  display: flex; flex-direction: row;
   align-items: center; gap: 6px; margin-top: 4px;
  padding-left: 2px; justify-content: center;
}
}
.nyaya-title, .prasna-title {
.verse-action-btn {
   font-size: 1em; font-weight: 500; color: #e65100;
   display: inline-flex; align-items: center; justify-content: center;
   margin-bottom: 0.4rem; border-bottom: 1px dotted #e65100; width: 50%;
  padding: 4px; border-radius: 6px; cursor: pointer;
   opacity: 0.75; transition: all 0.2s ease;
}
.verse-action-btn:hover { opacity: 1; background-color: rgba(0,0,0,0.05); }
 
.icon {
  display: inline-block; width: 18px; height: 18px;
  background-repeat: no-repeat; background-position: center;
  background-size: contain; transform: translateY(2px);
  pointer-events: none;
}
}
.nyaya-title span, .prasna-title span { display: block; font-size: 0.85em; color: #666; }
.icon-copy      { background-image: url('/images/copy.svg'); }
.nyaya-body, .prasna-question, .prasna-answer { color: var(--gr-black); line-height: 1.75; }
.icon-commentary { background-image: url('/images/commentary.svg'); }
.prasna-answer { margin-left: 50px; }


/* ── Padapatha / devatachandas / vargikarana ────────────────────── */
.copy-tooltip {
.mw-parser-output .padapatha, .mw-parser-output .rgdevatachandas {
  position: absolute; bottom: calc(100% + 8px); left: 50%;
   font-size: 1.05em; color: #E07C6E; font-weight: 400; margin-top: 8px;
  transform: translateX(-50%) translateY(4px);
  white-space: nowrap; pointer-events: none; z-index: 9999;
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 999px;
   font-size: 0.75rem; font-weight: 500;
  background: rgba(30,30,30,0.82); color: #fff;
  backdrop-filter: blur(6px); opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.copy-tooltip.copy-tooltip-visible {
  opacity: 1; transform: translateX(-50%) translateY(0);
}
}
.mw-parser-output .rgvargikarana {
 
   font-size: 1.4em; color: #F77628; font-weight: 500; margin-top: 8px; text-align: center;
/* ── Code / pre ───────────────────────────────────────────────── */
pre, code, .mw-code, tt, kbd {
   font-family: 'Adishila', 'Noto Serif Devanagari', serif !important;
  background-color: transparent !important; border: none !important;
  padding: 0.3em 0 !important; line-height: 1.65;
}
}


/* ── Vyakhya descriptor (level-2 sub-commentary) ───────────────── */
.mw-collapsible, .mw-collapsible-content, blockquote, .quotebox {
.gr-vyakhya-para { margin: 0 0 0.5em; line-height: 1.65; color: #444; }
   background-color: transparent !important; border: none !important;
.gr-vyakhya-gadya { font-weight: bold; font-size: 0.95em; text-align: center;
   font-style: normal !important; padding: 0 !important; margin-left: 0 !important;
  color: #8b1a1a; margin: 0.8em 0 0.3em; letter-spacing: 0.03em; }
.gr-vyakhya-pada {
   font-size: 0.88em; color: #555; background: #fafafa;
   border: 1px solid #e8e0d0; border-radius: 4px; padding: 0.5em 0.8em;
  margin: 0.5em 0; line-height: 1.5; white-space: pre-wrap;
}
}
.gr-embedded-bhashya { margin: 0.2em 0 0.2em 1em; line-height: 1.6; }
.gr-bhashya-anchor { /* inline anchor, no visual */ }


/* ── TOC (inline box on pages without sidebar) ──────────────────── */
.cargo-store-only { display: none !important; }
 
/* ── TOC inline box ─────────────────────────────────────────── */
.toc {
.toc {
   display: block !important; background: #fffdf5;
   display: block !important; background: #fffdf5;
   border: 1px solid #e8c88a; border-radius: 8px;
   border: 1px solid #e8c88a; border-radius: 8px;
   padding: 12px 16px; margin: 0 0 24px;
   padding: 12px 16px; margin: 0 0 24px 0;
   width: fit-content; min-width: 220px; max-width: 420px;
   width: fit-content; min-width: 220px; max-width: 420px;
   font-size: 0.88em; line-height: 2; font-family: var(--gr-font) !important;
   font-size: 0.9em; line-height: 2;
  font-family: 'Adishila', 'Noto Serif Devanagari', serif !important;
}
}
.toc h2, .toc .toctitle {
.toc h2, .toc .toctitle {
   font-size: 0.85em !important; font-weight: 600 !important; color: #5a3a00 !important;
   font-size: 0.85em !important; font-weight: 600 !important;
   border: none !important; margin: 0 0 6px !important; text-transform: uppercase;
  color: var(--text) !important; border: none !important;
   border-bottom: none !important; width: auto !important;
  margin: 0 0 6px !important; text-transform: uppercase; letter-spacing: 0.05em;
}
}
.toc ul { margin: 0 !important; padding-left: 1.2em !important; list-style: none !important; }
.toc ul { margin: 0 !important; padding-left: 1.2em !important; list-style: none !important; }
.toc a { color: #7a4a10 !important; text-decoration: none !important; }
.toc li { margin: 0; padding: 0; }
.toc a:hover { color: var(--gr-orange) !important; }
.toc a { color: var(--text) !important; text-decoration: none !important; }
.tocnumber { color: #aaa; margin-right: 4px; font-size: 0.85em; }
.toc a:hover { color: var(--light-orange) !important; }
.toc .toclevel-1 > a { font-weight: 600; color: var(--text) !important; }
.toc .toclevel-2 > a { color: var(--text) !important; }
.toc .toclevel-3 > a { color: var(--text) !important; font-size: 0.95em; }
.tocnumber { display: none; }


/* ── Vector 2022 sidebar TOC ────────────────────────────────────── */
/* ── Vector 2022 sidebar TOC ──────────────────────────────────── */
.vector-toc { font-size: 0.93em !important; line-height: 1.55 !important; }
/* Only override colours, sizes, and chevron styling.
* Never override display/flex/layout — Vector 2022 manages its own
* TOC layout and overriding it breaks multi-script rendering. */
 
/* "Contents" heading */
.vector-toc .vector-toc-title {
.vector-toc .vector-toc-title {
   font-size: 0.72em !important; font-weight: 700 !important;
   font-size: 0.72em !important;
   text-transform: uppercase; letter-spacing: 0.08em;
  font-weight: 700 !important;
   color: #b07040 !important; font-family: var(--gr-system) !important; margin-bottom: 2px !important;
   text-transform: uppercase;
  letter-spacing: 0.08em;
   color: var(--text) !important;
  font-family: 'Adishila', 'Noto Serif Devanagari', system-ui, sans-serif !important;
  margin-bottom: 2px !important;
}
}
/* Chevron toggle button — colour and size only, no layout override */
.vector-toc .cdx-button.vector-toc-toggle {
.vector-toc .cdx-button.vector-toc-toggle {
   background: none !important; border: none !important; box-shadow: none !important;
   background: none !important;
   color: #9a6030 !important; opacity: 1 !important; transition: color 0.15s !important;
  border: none !important;
  box-shadow: none !important;
   color: var(--text) !important;
  opacity: 1 !important;
  transition: color 0.15s !important;
}
.vector-toc .cdx-button.vector-toc-toggle:hover {
  color: var(--light-orange) !important;
  background: none !important;
}
.vector-toc .cdx-button.vector-toc-toggle svg {
  fill: currentColor !important;
}
 
/* Hide section numbers in TOC — consistent across all scripts */
.vector-toc .vector-toc-numb {
  display: none !important;
}
}
.vector-toc .cdx-button.vector-toc-toggle:hover { color: var(--gr-orange) !important; background: none !important; }
 
.vector-toc .cdx-button.vector-toc-toggle svg { fill: currentColor !important; }
/* Allow long section names (Kannada, Tamil, etc.) to wrap rather than
.vector-toc .vector-toc-numb { display: none !important; }
* overflow or overlap. Vector sets nowrap by default which causes
* multi-script long titles to bleed out of the sidebar column. */
.vector-toc .vector-toc-text {
.vector-toc .vector-toc-text {
   white-space: normal !important; word-break: break-word !important;
   white-space: normal !important;
   overflow-wrap: anywhere !important; line-height: 1.35 !important; display: inline !important;
  word-break: break-word !important;
   overflow-wrap: anywhere !important;
  display: inline !important;
  padding: 2px 0;
  font-family: 'Adishila', 'Noto Serif Devanagari', system-ui, sans-serif !important;
}
}
.vector-toc a,
.vector-toc a,
.vector-toc .vector-toc-link { color: #5a3a00 !important; text-decoration: none !important; font-weight: 400 !important; }
.vector-toc .vector-toc-link {  
    font-size: 1.2rem;
    font-family: 'Adishila', 'Noto Serif Devanagari', system-ui, sans-serif !important;
    color: var(--text) !important;  
    text-decoration: none !important;  
}
.vector-toc a:hover,
.vector-toc a:hover,
.vector-toc .vector-toc-link:hover { color: var(--gr-orange) !important; }
.vector-toc .vector-toc-link:hover { color: var(--light-orange) !important; }
/* Active item: only the LEAF active item (no active child below) */
 
/* ── TOC ACTIVE ITEM — fixed for Vector 2022 + Common.js span wrapping ─
*
* Common.js wraps every text node (including TOC link text) inside a
* <span data-deva="…"> for transliteration. This means the direct >a
* child selector fails — we need descendant selectors that reach into
* the link regardless of span nesting.
*
* We also target BOTH the <a> element AND any [data-deva] span inside
* it to ensure the colour propagates regardless of how deep the span is.
* ──────────────────────────────────────────────────────────────────── */
.vector-toc .vector-toc-list-item-active .vector-toc-link,
.vector-toc .vector-toc-list-item-active .vector-toc-link,
.vector-toc .vector-toc-list-item-active .vector-toc-link * {
.vector-toc .vector-toc-list-item-active .vector-toc-link *,
   color: var(--gr-orange) !important; font-weight: 700 !important;
.vector-toc .vector-toc-list-item-active > a,
.vector-toc .vector-toc-list-item-active > a *,
.vector-toc .vector-toc-level-1-active .vector-toc-link,
.vector-toc .vector-toc-level-1-active .vector-toc-link * {
   color: var(--light-orange) !important;
  font-weight: 700 !important;
  padding: 2px 0;
}
}
/* TOC doc-nav (मूल / उल्लेख buttons) */
#gr-toc-doc-nav { font-family: var(--gr-font); }
#gr-toc-doc-nav a:focus { outline: 2px solid var(--gr-orange); outline-offset: 1px; }


/* ── About / Main_Page: hide sidebar TOC ───────────────────────── */
.vector-toc .vector-toc-level-1 > .vector-toc-link,
body.page-My_wiki-About .vector-sidebar,
.vector-toc .vector-toc-level-1 > .vector-toc-link * {
body.page-My_wiki-About .vector-sticky-pinned-container,
    font-size: 1.2rem !important;
body.page-My_wiki-About #vector-toc-pinned-container { display: none !important; }
  font-weight: 600 !important; color: var(--text) !important;
  font-family: 'Adishila', 'Noto Serif Devanagari', system-ui, sans-serif !important;
}
.vector-toc .vector-toc-level-2 > .vector-toc-link,
.vector-toc .vector-toc-level-2 > .vector-toc-link * {  font-size: 1.2rem !important; font-family: 'Adishila', 'Noto Serif Devanagari', system-ui, sans-serif !important;
color: var(--text) !important; }
.vector-toc .vector-toc-level-3 > .vector-toc-link,
.vector-toc .vector-toc-level-3 > .vector-toc-link * {
      font-family: 'Adishila', 'Noto Serif Devanagari', system-ui, sans-serif !important;
  color: var(--text) !important;
}
/* Override for active: must come AFTER level rules */
.vector-toc .vector-toc-list-item-active .vector-toc-level-1 > .vector-toc-link,
.vector-toc .vector-toc-list-item-active .vector-toc-level-2 > .vector-toc-link,
.vector-toc .vector-toc-list-item-active .vector-toc-level-3 > .vector-toc-link {
      font-family: 'Adishila', 'Noto Serif Devanagari', system-ui, sans-serif !important;
  color: var(--light-orange) !important; font-weight: 700 !important;
}


/* ── Moola page title ───────────────────────────────────────────── */
.toc-main-links {
.gr-doc-title[data-moola="1"] {
    display: flex; gap: 6px; padding: 5px; align-items: center; margin-bottom: 4px;
  border-bottom: 2px solid var(--gr-orange) !important;
  padding-bottom: 8px !important; margin-bottom: 20px !important;
}
}


/* ── Ullekha (references index) ────────────────────────────────── */
.toc-main-link-item {
.gr-ullekha-title {
    font-size: 0.9em; color: var(--text); text-decoration: none; padding: 4px 8px;
  color: var(--gr-maroon) !important; font-size: 24px !important;
    border-radius: 6px; background: rgba(0,0,0,0.05); transition: background 0.15s;
  border-bottom: 1.5px dotted var(--gr-maroon) !important;
  padding-bottom: 6px !important; margin-bottom: 20px !important; text-align: left !important;
}
}
.gr-ullekha-list { margin: 0.5em 0 1.2em !important; padding-left: 1.6em !important; list-style: decimal !important; }
.gr-ullekha-list li { margin: 0.3em 0; line-height: 1.6; }
.gr-ullekha-ref-link a, .gr-ullekha-list li a {
  color: var(--gr-orange) !important; font-style: italic; text-decoration: none !important;
}
.gr-ullekha-ref-link a:hover, .gr-ullekha-list li a:hover { text-decoration: underline dotted !important; }
.gr-ullekha-highlight { background: #fff176 !important; border-radius: 2px; padding: 0 2px; }
/* ── Teeka view modes ───────────────────────────────────────────── */
body.gr-standalone .gr-page-nav { display: block; }
body.gr-standalone .teeka-block { background: none !important; border: none !important; padding: 0 !important; border-radius: 0 !important; }
body.gr-standalone .teeka-title { display: none !important; }
body.gr-standalone .gr-teeka-entry { border-bottom: 1px solid #f0e8d8; padding-bottom: 0.8em; margin-bottom: 0.8em; }
body.gr-standalone .gr-teeka-entry:last-of-type { border-bottom: none; }
body.gr-ref-mode .teeka-block { background: #fffdf5 !important; border: 1px solid #f0e0b0 !important; padding: 6px 10px 8px !important; border-radius: 5px !important; }
body.gr-ref-mode .teeka-title { display: block !important; }
body.gr-ref-mode .gr-page-nav { display: none; }
.gr-teeka-page .teeka-block { background: #fffdf5; border: 1px solid #f0e0b0; }


/* ── Doc teekas list ────────────────────────────────────────────── */
/* ── Doc teekas ───────────────────────────────────────────────── */
.gr-doc-teekas { margin-bottom: 1em; }
.gr-doc-teekas { margin-bottom: 1em; }
.gr-doc-teekas + p:empty { display: none !important; margin: 0 !important; height: 0 !important; }
.gr-doc-teekas + p:empty { display: none !important; margin: 0 !important; height: 0 !important; }


/* ── Main page ──────────────────────────────────────────────────── */
/* ── Main page ────────────────────────────────────────────────── */
.gr-home { max-width: 1080px; margin: 0 auto; padding: 0; }
.gr-home { max-width: 1080px; margin: 0 auto; padding: 0; }
.gr-home-page-title { text-align: center; font-size: 1.8em; font-weight: 500; color: #1a2e40; margin: 24px 0 32px; }
.gr-home-page-title {
  font-family: 'Adishila', 'Noto Serif Devanagari', serif !important;
  text-align: center; font-size: 1.8em; font-weight: 500;
  color: #1a2e40; margin: 24px 0 32px;
}
.gr-home-grid { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 32px; }
.gr-home-grid { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 32px; }
.gr-home-card { background: #fff; border: 1px solid #e8e4df; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.07); padding: 18px 20px 20px; flex: 1 1 280px; min-width: 240px; max-width: 360px; }
.gr-home-card {
.gr-home-card-title { font-size: 1em; font-weight: 600; color: #1a2e40; text-align: center; padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1.5px solid #c0392b; }
  background: #fff; border: 1px solid #e8e4df; border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  padding: 18px 20px 20px; flex: 1 1 280px; min-width: 240px; max-width: 360px;
}
.gr-home-card-title {
  font-family: 'Adishila', 'Noto Serif Devanagari', serif !important;
  font-size: 1em; font-weight: 600; color: #1a2e40;
  text-align: center; padding-bottom: 10px; margin-bottom: 12px;
  border-bottom: 1.5px solid #c0392b;
}
.gr-home-card ol { margin: 0; padding-left: 1.4em; list-style: decimal; }
.gr-home-card ol { margin: 0; padding-left: 1.4em; list-style: decimal; }
.gr-home-card li { font-size: 0.95em; line-height: 1.85; color: #333; }
.gr-home-card li { font-size: 0.95em; line-height: 1.85; color: #333; }
Line 400: Line 483:
.gr-home-card li a:hover { text-decoration: underline; }
.gr-home-card li a:hover { text-decoration: underline; }
.gr-home-card li a.new { color: #c08080; }
.gr-home-card li a.new { color: #c08080; }
.gr-home-group-label { font-size: 1.1em; font-weight: 600; color: #1a2e40; text-align: center; margin: 36px 0 16px; padding-bottom: 8px; border-bottom: 2px solid #c0392b; }
.gr-home-note { font-size: 0.82em; color: #888; }
.gr-home-group-label {
  font-family: 'Adishila', 'Noto Serif Devanagari', serif !important;
  font-size: 1.1em; font-weight: 600; color: #1a2e40;
  text-align: center; margin: 36px 0 16px; padding-bottom: 8px;
  border-bottom: 2px solid #c0392b;
}
 
/* ── Modals ───────────────────────────────────────────────────── */
.grantha-new-btn {
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.3);
  color: white; padding: 6px 14px; border-radius: 20px; cursor: pointer; margin-right: 10px;
}
.grantha-modal {
  position: fixed; inset: 0; background: rgba(0,0,0,0.35);
  display: flex; align-items: center; justify-content: center; z-index: 10000;
}
.grantha-modal-box { background: white; padding: 20px; border-radius: 10px; width: 300px; }
.gm-title { font-weight: bold; margin-bottom: 10px; }
.gm-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; }
 
/* ── Main page sidebar hide ───────────────────────────────────── */
body.page-Main_Page #mw-panel,
body.page-Main_Page .vector-sidebar-container { display: none !important; }
body.page-Main_Page #footer { display: none !important; }
 
/* ── Main page view toggle ────────────────────────────────────── */
.gr-home-toggle { display: flex; gap: 8px; margin: 0 0 24px; justify-content: center; }
.gr-home-toggle { display: flex; gap: 8px; margin: 0 0 24px; justify-content: center; }
.gr-toggle-btn { font-size: 0.88em; padding: 6px 20px; border: 1.5px solid #c0392b; border-radius: 20px; background: transparent; color: #c0392b; cursor: pointer; user-select: none; transition: background 0.15s, color 0.15s; }
.gr-toggle-btn {
  font-family: 'Adishila', 'Noto Serif Devanagari', serif;
  font-size: 0.88em; padding: 6px 20px;
  border: 1.5px solid #c0392b; border-radius: 20px;
  background: transparent; color: #c0392b;
  cursor: pointer; user-select: none; transition: background 0.15s, color 0.15s;
}
.gr-toggle-btn:hover { background: #fdf0ed; }
.gr-toggle-btn:hover { background: #fdf0ed; }
.gr-toggle-btn.gr-toggle-active { background: #c0392b; color: #fff; }
.gr-toggle-btn.gr-toggle-active { background: #c0392b; color: #fff; }
body.page-Main_Page #mw-panel, body.page-Main_Page .vector-sidebar-container { display: none !important; }
body.page-Main_Page #footer { display: none !important; }


/* ── Script switcher bar ────────────────────────────────────────── */
/* ── Script switcher bar ──────────────────────────────────────── */
.gr-script-bar { margin: 0 0 20px; font-size: 0.8em; color: #888; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.gr-script-bar {
.gr-script-label { font-family: var(--gr-system); color: #aaa; }
  margin: 0 0 20px; font-size: 0.8em; color: #888;
.gr-script-btn { color: #c0392b !important; text-decoration: underline dotted !important; cursor: pointer; }
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.gr-script-label { font-family: system-ui, sans-serif; color: #aaa; }
.gr-script-btn {
  font-family: 'Adishila', 'Noto Serif Devanagari', serif;
  color: #c0392b !important; text-decoration: underline dotted !important; cursor: pointer;
}
.gr-script-btn.active { color: #888 !important; text-decoration: none !important; cursor: default; }
.gr-script-btn.active { color: #888 !important; text-decoration: none !important; cursor: default; }


/* ── Vector 2022 header ─────────────────────────────────────────── */
/* ── Vector 2022 header ───────────────────────────────────────── */
.vector-header-container { background: #b5451b !important; border-bottom: 1px solid rgba(255,255,255,0.12); }
.vector-header-container {
.vector-header { background: transparent !important; max-width: 100% !important; display: flex !important; align-items: center !important; justify-content: space-between !important; padding-left: 20px !important; padding-right: 20px !important; }
  background: #b5451b !important;
.vector-header-start { flex: 0 0 auto !important; display: flex !important; align-items: center !important; gap: 12px; }
  border-bottom: 1px solid rgba(255,255,255,0.12);
.vector-header-end { flex: 0 0 auto !important; display: flex !important; align-items: center !important; gap: 16px; margin-left: auto; }
}
.vector-header {
  background: transparent !important; max-width: 100% !important;
  display: flex !important; align-items: center !important;
  justify-content: space-between !important;
  padding-left: 20px !important; padding-right: 20px !important;
}
.vector-header-start {
  flex: 0 0 auto !important; display: flex !important;
  align-items: center !important; gap: 12px;
}
.vector-header-end {
  flex: 0 0 auto !important; display: flex !important;
  align-items: center !important; gap: 16px; margin-left: auto;
}
.mw-logo { display: flex !important; align-items: center; opacity: 1 !important; }
.mw-logo { display: flex !important; align-items: center; opacity: 1 !important; }
.mw-logo-wordmark { color: #fff !important; font-weight: 700; font-size: 18px; }
.mw-logo-wordmark { color: #ffffff !important; font-weight: 700; font-size: 18px; }
.mw-logo-icon { content: url('/favicon.ico'); width: 24px; height: 24px; }
.mw-logo-icon { content: url('/favicon.png'); width: 24px; height: 24px; }
.vector-header .vector-icon:not(.vector-user-links .vector-icon):not(#vector-user-links-dropdown .vector-icon) { filter: invert(1); opacity: 0.9; }
/* Invert header icons to white — but NOT the user-links area icons
.vector-user-links .vector-icon, #vector-user-links-dropdown .vector-icon, .vector-user-menu-container .vector-icon { filter: none !important; opacity: 1 !important; }
* (user menu chevron, login button) which need to remain visible) */
.cdx-search-input .vector-icon, .cdx-search-input svg, .cdx-search-input path, .cdx-search-input__end-button .vector-icon, .cdx-search-input__end-button svg, .cdx-search-input__end-button path { filter: none !important; fill: #202124 !important; opacity: 1 !important; }
.vector-header .vector-icon:not(.vector-icon):not(#vector-user-links-dropdown .vector-icon) {
  filter: invert(1);
  opacity: 0.9;
}
/* Keep user-links icons visible at full opacity */
.vector-user-links .vector-icon,
#vector-user-links-dropdown .vector-icon,
.vector-user-menu-container .vector-icon {
  filter: none !important;
  opacity: 1 !important;
}
.cdx-search-input .vector-icon, .cdx-search-input svg, .cdx-search-input path,
.cdx-search-input__end-button .vector-icon, .cdx-search-input__end-button svg,
.cdx-search-input__end-button path { filter: none !important; fill: #202124 !important; opacity: 1 !important; }
.vector-header-end > *:not(#p-search) { color: rgba(255,255,255,0.9) !important; }
.vector-header-end > *:not(#p-search) { color: rgba(255,255,255,0.9) !important; }
.vector-user-links a { color: rgba(255,255,255,0.9) !important; }
.vector-user-links a { color: rgba(255,255,255,0.9) !important; }
li#pt-watchlist, li#pt-watchlist-kbd { display: none !important; }
 
#vector-appearance, #vector-appearance-pinned-container, #vector-appearance-unpinned-container, .mw-portlet-appearance, #p-appearance, .vector-appearance-pinnable-element, .vector-page-tools [aria-controls="vector-appearance"], .vector-sticky-header [aria-controls="vector-appearance"] { display: none !important; }
/* ── Hide: Watchlist, Appearance, fix user-menu dropdown text ──
.vector-user-menu .mw-list-item a, .vector-user-menu .vector-menu-content-list a, #p-personal .vector-menu-content a, .mw-portlet-personal .vector-menu-content a, #vector-user-menu-overflow .vector-menu-content a, .vector-user-menu .vector-menu-content a, #pt-userpage, #pt-userpage a, .cdx-menu__listbox .cdx-menu-item__content, .cdx-menu__listbox a { color: #202122 !important; }
*
.vector-user-menu .mw-list-item a:hover, .vector-user-menu .vector-menu-content-list a:hover, .vector-user-menu .vector-menu-content a:hover, .mw-portlet-personal .vector-menu-content a:hover { color: var(--gr-orange) !important; background: #fdf3ed !important; }
* Vector 2022 header (right side, between username and chevron):
*  .mw-portlet-vector-user-menu-overflow  — overflow strip (watchlist ≡★)
*  #vector-appearance / pinned/unpinned containers — appearance panel
*
* The user-menu dropdown text must be dark (not inherit the white
* header colour) because it renders on a white card background.
* ──────────────────────────────────────────────────────────────── */
 
/* 1. Watchlist icon — hide by specific item ID only.
* Do NOT hide .mw-portlet-vector-user-menu-overflow by class — on some
* Vector versions that portlet contains the profile/logout links too. */
li#pt-watchlist,
li#pt-watchlist-kbd { display: none !important; }
 
/* 2. Appearance panel — every container Vector 2022 might use */
#vector-appearance,
#vector-appearance-pinned-container,
#vector-appearance-unpinned-container,
.mw-portlet-appearance,
#p-appearance,
.vector-appearance-pinnable-element,
/* The toggle BUTTON that opens the appearance panel (page-tools area) */
.vector-page-tools [aria-controls="vector-appearance"],
/* Appearance inside the right-side sticky header overflow */
.vector-sticky-header [aria-controls="vector-appearance"] { display: none !important; }
 
/* 3. User-menu dropdown card — force dark text on white background */
/* The chevron (▾) opens .vector-user-menu which has a white card;
* the inherited header color: white must be overridden here. */
.vector-user-menu .mw-list-item a,
.vector-user-menu .vector-menu-content-list a,
#p-personal .vector-menu-content a,
.mw-portlet-personal .vector-menu-content a,
#vector-user-menu-overflow .vector-menu-content a { color: #202122 !important; }
.vector-user-menu .mw-list-item a:hover,
.vector-user-menu .vector-menu-content-list a:hover { color: var(--light-orange) !important; }
 
/* ── User dropdown — fix white text inside the menu ───────────── */
/* The dropdown card itself has a white/light background so links
  must be dark, not the header-inherited white. */
.vector-user-menu .vector-menu-content,
.vector-user-menu .vector-menu-content a,
.vector-user-menu .vector-menu-content .mw-list-item a,
#pt-userpage, #pt-userpage a,
.mw-portlet-personal .vector-menu-content a,
/* OOUI dropdown items */
.oo-ui-menuSelectWidget a,
.oo-ui-menuOptionWidget,
/* Codex menu */
.cdx-menu__listbox .cdx-menu-item__content,
.cdx-menu__listbox a {
  color: #202122 !important;
}
.vector-user-menu .vector-menu-content a:hover,
.mw-portlet-personal .vector-menu-content a:hover {
  color: var(--light-orange) !important;
  background: var(--light-light-orange) !important;
}
 
#p-search { margin-left: 8px; }
#p-search { margin-left: 8px; }
.vector-search-box, .vector-search-box-expanded, .vector-search-box-auto-expand-width { min-width: 0 !important; flex-grow: 0 !important; position: relative !important; margin: 0 !important; }
.vector-search-box, .vector-search-box-expanded, .vector-search-box-auto-expand-width {
.cdx-search-input__input, .cdx-text-input__input { background: #fff !important; border: none !important; border-radius: 8px !important; color: #202124 !important; padding: 6px 10px !important; font-family: var(--gr-system) !important; }
  min-width: 0 !important; flex-grow: 0 !important;
.cdx-search-input__input::placeholder, .cdx-text-input__input::placeholder { color: rgba(32,33,36,.5) !important; }
  position: relative !important; margin: 0 !important;
}
.cdx-search-input__input, .cdx-text-input__input {
  background: #ffffff !important; border: none !important;
  border-radius: 8px !important; color: #202124 !important;
  padding: 6px 10px !important; font-family: system-ui, sans-serif !important;
}
.cdx-search-input__input::placeholder,
.cdx-text-input__input::placeholder { color: rgba(32,33,36,0.5) !important; }
.cdx-search-input__end-button { background: transparent !important; border: none !important; }
.cdx-search-input__end-button { background: transparent !important; border: none !important; }
.cdx-typeahead-search, .cdx-typeahead-search__menu, .cdx-menu { background: #fff !important; color: #202124 !important; border-radius: 10px !important; box-shadow: 0 6px 24px rgba(0,0,0,.2) !important; filter: none !important; }
.cdx-typeahead-search, .cdx-typeahead-search__menu, .cdx-menu {
  background: #ffffff !important; color: #202124 !important;
  border-radius: 10px !important; box-shadow: 0 6px 24px rgba(0,0,0,0.2) !important;
  filter: none !important;
}
.cdx-menu-item, .cdx-menu-item * { color: #202124 !important; filter: none !important; }
.cdx-menu-item, .cdx-menu-item * { color: #202124 !important; filter: none !important; }
.cdx-menu-item:hover, .cdx-menu-item--active, .cdx-menu-item--selected { background: #f1f3f4 !important; }
.cdx-menu-item:hover, .cdx-menu-item--active, .cdx-menu-item--selected { background: #f1f3f4 !important; }
.cdx-menu-item__icon, .cdx-menu-item__icon svg, .cdx-menu-item__icon path { fill: #202124 !important; filter: none !important; }
.cdx-menu-item__icon, .cdx-menu-item__icon svg,
.cdx-menu-item__icon path { fill: #202124 !important; filter: none !important; }
 
/* ── Gadya — styled as a sub-subheading (NOT adhyaya-title level) ─
*
* Previously gadya used adhyaya-title styles which was too prominent.
* Now it renders as a modest bold sub-heading, similar to h3 but
* without the dotted border, clearly below chapter level.
* ──────────────────────────────────────────────────────────────── */
.gr-gadya,
.verse-line.gr-gadya,
.gr-verse-text.gr-gadya {
  display: block !important;
  font-size: 0.96em !important;
  font-weight: 600 !important;
  font-style: normal !important;
  color: #555 !important;        /* muted — not as loud as orange heading */
  margin: 16px 0 4px !important;
  border-bottom: 1px solid #ddd !important;
  width: 60%;
  line-height: 1.5 !important;
  letter-spacing: 0.01em;
}
 
/* ── Avataranika ──────────────────────────────────────────────── */
.gr-avataranika {
  font-style: italic; color: #444;
  margin: 0 0 0.5em 0.5em; padding-left: 0.6em;
  border-left: 2px solid #c9a96e; line-height: 1.6;
}
 
/* ── Vyakhya-pada ─────────────────────────────────────────────── */
.gr-vyakhya-pada {
  font-size: 0.88em; color: #555;
  background: #fafafa; border: 1px solid #e8e0d0;
  border-radius: 4px; padding: 0.5em 0.8em;
  margin: 0.5em 0; line-height: 1.5; white-space: pre-wrap;
}
 
/* ── Vyakhya-gadya ────────────────────────────────────────────── */
.gr-vyakhya-gadya {
  font-weight: bold; font-size: 0.95em; text-align: center;
  color: #8b1a1a; margin: 0.8em 0 0.3em 0; letter-spacing: 0.03em;
}
 
/* ── Author note ──────────────────────────────────────────────── */
.gr-author-note {
  font-style: italic; color: #666; text-align: center;
  font-size: 0.9em; margin: 0.8em 0 0.4em 0;
  border-top: 1px solid #ddd; padding-top: 0.4em;
}
 
/* ── Leading bhashya ──────────────────────────────────────────── */
.gr-leading-bhashya { font-style: italic; color: #555; margin: 0.4em 0 0.5em 0; }
 
/* ── Verse text (general) ─────────────────────────────────────── */
.gr-verse-text, .verse-line, .verse-text {
  color: #b5451b; font-style: italic; line-height: 1.5;  /* REDUCED */
  display: block; margin: 0.1em 0;
}
.gr-verse-type-mantra .gr-verse-text,
.verse-block[data-type="mantra"] .verse-line { font-size: 1.05em; }
.gr-verse-type-sutra .gr-verse-text,
.verse-block[data-type="sutra"] .verse-line { font-style: normal; font-weight: 600; color: #b5451b; }
 
/* ── Bhashyam / commentary prose ─────────────────────────────── */
.gr-bhashyam, .commentary-bhashyam {
  color: #222; font-style: normal; line-height: 1.75; margin: 0.3em 0 0.5em 0;
}
 
/* ── Padapatha ────────────────────────────────────────────────── */
.gr-padapatha { font-size: 0.9em; color: #555; margin: 0.2em 0 0.3em 0.8em; font-style: normal; }


/* ── Modals ─────────────────────────────────────────────────────── */
/* ── Devatachandas / vargikarana ─────────────────────────────── */
.grantha-modal { position: fixed; inset: 0; background: rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center; z-index: 10000; }
.gr-devatachandas { font-size: 0.82em; color: #777; font-style: normal; margin: 0.4em 0 0.2em 0; }
.grantha-modal-box { background: white; padding: 20px; border-radius: 10px; width: 300px; }
.gr-vargikarana  { font-size: 0.82em; color: #888; font-style: normal; margin: 0.5em 0 0.1em 0; }
.gm-title { font-weight: bold; margin-bottom: 10px; }
.gm-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; }


/* ── Code / pre ─────────────────────────────────────────────────── */
/* ── Uvaaca ───────────────────────────────────────────────────── */
pre, code, .mw-code, tt, kbd { font-family: var(--gr-font) !important; background-color: transparent !important; border: none !important; padding: 0.3em 0 !important; line-height: 1.65; }
.gr-uvaaca, .uvaaca {
.mw-collapsible, .mw-collapsible-content, blockquote, .quotebox { background-color: transparent !important; border: none !important; font-style: normal !important; padding: 0 !important; margin-left: 0 !important; }
  color: #b5451b; font-weight: 600; font-size: 0.92em;
.mw-heading .mw-editsection, .adhyaya-block .mw-editsection { display: none !important; }
  margin: 0.5em 0 0.2em 0; display: block;
.cargo-store-only { display: none !important; }
}


/* ── Responsive ─────────────────────────────────────────────────── */
/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 600px) {
@media (max-width: 600px) {
   .mw-parser-output { font-size: 16px; }
   .mw-parser-output { font-size: 16px; }
   .mw-parser-output h2 { width: 100% !important; }
   .mw-parser-output h2, .mw-parser-output .mw-heading2 h2 { width: 100% !important; }
   .mw-parser-output h3 { width: 100% !important; }
   .mw-parser-output h3, .mw-parser-output .mw-heading3 h3 { width: 100% !important; }
   .mw-parser-output .bhashya { text-indent: 12px !important; padding-left: 4px !important; }
   .nyaya-title, .prasna-title { width: 100%; }
   .mw-parser-output .shloka-line { padding-left: 8px !important; }
   .bhashyam-block, .teeka-block { margin-left: 10px; }
   .toc { max-width: 100%; }
   .toc { max-width: 100%; }
  .gr-gadya { width: 90%; }
}
/* ── Global spacing tightening ────────────────────────────────── */
.mw-parser-output p { margin-bottom: 0.35rem !important; }
.mw-parser-output .verse-block,
.mw-parser-output .shloka-block { margin-top: 2px !important; margin-bottom: 2px !important; }
/* ── Vyakhya sub-headings (h4 replaces === which breaks inside divs) */
.gr-vyakhya-head, .gr-section-head {
  font-size: 0.9em;
  font-weight: 700;
  color: #6a3e00;
  margin: 0.35em 0 0.15em;
  font-family: inherit;
  border: none;
  padding: 0;
}
/* ── Vyakhya page layout ──────────────────────────────────────── */
.gr-vyakhya-gadya { margin: 0.2em 0; line-height: 1.6; }
.gr-avataranika  { margin: 0.2em 0; line-height: 1.6; color: #555; }
.gr-embedded-bhashya { margin: 0.2em 0 0.2em 1em; line-height: 1.6; }
/* ── Individual vyakhya prose paragraphs ─────────────────────── */
.gr-vyakhya-para {
  margin: 0 0 0.5em 0;
  line-height: 1.65;
  color: #444;
}
.gr-vyakhya-para:last-child { margin-bottom: 0; }
/* Shloka-lines inside teeka-block (quoted verses within commentary) */
.teeka-body .shloka-block {
  margin: 0.4em 0;
  padding: 0.3em 0.6em;
  border-left: 3px solid #e8c88a;
  background: transparent;
}
.teeka-body .shloka-line {
  color: #8a4a00;
  font-style: italic;
  font-size: 0.97em;
}
/* ══════════════════════════════════════════════════════════════════
  TEEKA VIEW MODES
  Applied to <body> by Common.js based on referrer / ?ref= param.
  gr-standalone  — direct URL access: plain reading view
  gr-ref-mode    — navigated from main doc: styled embedded view
  ══════════════════════════════════════════════════════════════════ */
/* ── Standalone mode: strip all container chrome ──────────────── */
/* The gr-page-nav back-link is useful in standalone, keep it */
body.gr-standalone .gr-page-nav {
  display: block;
}
/* Remove coloured box — show as plain flowing text */
body.gr-standalone .teeka-block {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
}
body.gr-standalone .teeka-title {
  display: none !important;
}
/* Each entry flows naturally, small separator between descriptors */
body.gr-standalone .gr-teeka-entry {
  border-bottom: 1px solid #f0e8d8;
  padding-bottom: 0.8em;
  margin-bottom: 0.8em;
}
body.gr-standalone .gr-teeka-entry:last-of-type {
  border-bottom: none;
}
/* Shlokas in standalone get the normal verse color, no extra indent */
body.gr-standalone .teeka-body .shloka-block {
  border-left: none;
  padding-left: 0;
  background: none;
}
body.gr-standalone .teeka-body .shloka-line {
  color: var(--maroon);
  font-style: italic;
}
/* Vyakhya headings still show, but lighter */
body.gr-standalone .gr-vyakhya-head {
  color: #a07040;
  font-size: 0.95em;
  margin-top: 0.8em;
}
/* ── Ref mode: full styled embedded view (default teeka-block look) ── */
/* This is already the default from .teeka-block rules above.
  Explicit declarations here for clarity and override safety. */
body.gr-ref-mode .teeka-block {
  background: #fffdf5 !important;
  border: 1px solid #f0e0b0 !important;
  padding: 6px 10px 8px !important;
  border-radius: 5px !important;
}
body.gr-ref-mode .teeka-title {
  display: block !important;
}
/* The page-nav back-link is redundant when embedded in main doc */
body.gr-ref-mode .gr-page-nav {
  display: none;
}
/* ── Default (no body class yet — JS may not have run) ────────── */
/* Show styled until JS classifies */
.gr-teeka-page .teeka-block {
  background: #fffdf5;
  border: 1px solid #f0e0b0;
}
/* ═══════════════════════════════════════════════════════════════════
  Common.css — targeted additions  (append to your existing file)
  These are the ONLY new rules — nothing above is changed.
  ═══════════════════════════════════════════════════════════════════ */
/* ── 1. Hide footer ─────────────────────────────────────────────── */
#footer,
.mw-footer,
.vector-footer,
.vector-footer-container { display: none !important; }
/* ── 2. Hide category links bar ─────────────────────────────────── */
.catlinks,
#catlinks,
.mw-normal-catlinks,
.mw-hidden-catlinks { display: none !important; }
/* ── 3. Hide Appearance panel + Watchlist icons ─────────────────── */
/* Appearance */
#vector-appearance,
#vector-appearance-pinned-container,
#vector-appearance-unpinned-container,
.mw-portlet-appearance,
#p-appearance,
.vector-page-tools [aria-controls="vector-appearance"],
.vector-sticky-header [aria-controls="vector-appearance"] { display: none !important; }
/* Watchlist */
li#pt-watchlist,
li#pt-watchlist-kbd,
.mw-portlet-vector-user-menu-overflow { display: none !important; }
/* ── 4. Make user/account icon white to match header theme ──────── */
/* The user avatar SVG and person icon in the top-right */
.vector-user-menu-container .vector-icon svg,
.vector-user-menu-container .vector-icon svg path,
.vector-user-menu-container .vector-icon svg circle,
#pt-user-interface-preferences .vector-icon svg,
#pt-user-interface-preferences .vector-icon svg path,
.mw-portlet-vector-user-menu-overflow .vector-icon svg,
.vector-header .mw-ui-button .vector-icon svg,
.vector-header-end .vector-menu-content .vector-icon svg {
  fill: #ffffff !important;
  stroke: #ffffff !important;
  color: #ffffff !important;
}
/* The dropdown chevron arrow next to user name */
.vector-user-links .vector-user-menu-chevron .vector-icon svg,
.vector-user-links .vector-user-menu-chevron .vector-icon svg path {
  fill: rgba(255,255,255,0.9) !important;
}
/* ── 5. Replace header site name "Grantha" → "Anandamakaranda" ──── */
/* The .mw-logo-wordmark contains the site name text.
* We hide the original text node via font-size:0, then inject the
* new name via ::before pseudo-element. */
.mw-logo-wordmark {
  font-size: 0 !important;      /* hide original text */
  white-space: nowrap;
}
.mw-logo-wordmark::before {
  content: 'Anandamakaranda';
  font-size: 17px;              /* restore readable size */
  font-weight: 700;
  color: #ffffff;
  font-family: system-ui, -apple-system, sans-serif;
  letter-spacing: -0.01em;
}
/* Also handle the <a> wrapper text if the logo is text-only */
#p-logo .mw-wiki-logo,
.mw-logo a[title] {
  /* no change needed — title attr tooltip stays as-is */
}
/* ── 6. TOC मूल / मूलम् / उल्लेख button hover state ────────────── */
.toc-main-link-item:hover {
  background: rgba(0,0,0,0.10) !important;
  opacity: 1 !important;
}
/* ===== HEADER CLEANUP ===== */
/* Hamburger */
.vector-main-menu,
#mw-sidebar-button,
.vector-header-start .vector-main-menu-container {
    display: none !important;
}
/* Search */
#p-search,
.vector-search-box,
.vector-search-box-vue,
.vector-search-box-collapses {
  display: none !important;
}
/* hamburger */
#mw-sidebar-button,
.vector-main-menu,
.vector-main-menu-container {
    display:none !important;
}
/* appearance */
#vector-appearance,
#p-appearance,
[aria-controls="vector-appearance"] {
    display:none !important;
}
/* Watchlist */
#pt-watchlist,
#pt-watchlist-2,
li#pt-watchlist {
    display: none !important;
}
/* ===== SPECIAL PAGES CLEAN ===== */
body.ns-special #footer,
body.ns-special .mw-footer,
body.ns-special .vector-footer,
body.ns-special .mw-footer-container,
body.ns-special #footer-icons,
body.ns-special #footer-places {
    display: none !important;
}
body.ns-special #vector-page-toolbar,
body.ns-special .vector-page-toolbar,
body.ns-special #p-views,
body.ns-special #p-namespaces,
body.ns-special .vector-page-tools {
    display: none !important;
}
.vector-toc .vector-pinnable-header-label,
.vector-toc .vector-toc-title{
    font-size: 1.25rem;
    font-weight: 700;
}
#siteNotice {
    display:none !important;
}
/* ── Tighten spacing on renderer wrapper divs ───────────────────────
* .section/.adhikarana wrappers removed from renderer (caused MW to inject
* blank paragraphs between them). Only .bhashya-collection remains.
* Keep :empty rules for defensive cleanup. */
.mw-parser-output .bhashya-collection {
  margin: 0;
  padding: 0;
}
/* Empty data-attribute divs — zero height */
.adhyaya-block:empty,
.mw-parser-output div:empty { display: none !important; }
/* MW wraps raw HTML in <p> tags - prevent double spacing after block divs */
.mw-parser-output .bhashya + p:empty,
.mw-parser-output .verse + p:empty,
.mw-parser-output .bhashya-collection + p:empty,
.mw-parser-output .pramana + p:empty,
.mw-parser-output .author-note + p:empty {
  display: none !important;
  margin: 0 !important;
  height: 0 !important;
}
}

Latest revision as of 05:23, 30 April 2026

/* ═══════════════════════════════════════════════════════════════════
   MediaWiki:Common.css  —  grantha.io  (v6 additions)
   Paste this entire block INTO your existing Common.css, replacing
   or appending as appropriate. Sections marked NEW are net additions.
   ═══════════════════════════════════════════════════════════════════ */
/* Common Colors */
:root { 
    --maroon: #be100e;
    --orange: #e65100;
    --light-orange: #f57c00;
    --dark-gray: #555;
    --light-gray: #eee;
    --muted-gray: #888;
    --text: #1a1a1a;
    --brown: #a07040;
    --light-brown: #e8d4a0;
}
/* ── Fonts ────────────────────────────────────────────────────── */
@font-face {
  font-family: "Adishila";
  src: url("/resources/fonts/adishila/Adishila.ttf") format("truetype");
  font-weight: normal; font-style: normal;
}
@font-face {
  font-family: "Adishila";
  src: url("/resources/fonts/adishila/AdishilaBold.ttf") format("truetype");
  font-weight: bold; font-style: normal;
}
@font-face {
  font-family: "AdishilaDev";
  src: url("/resources/fonts/AdishilaDev.ttf") format("truetype");
  font-weight: normal; font-style: normal;
}
@font-face {
  font-family: "AdishilaDev";
  src: url("/resources/fonts/AdishilaDeBv.ttf") format("truetype");
  font-weight: bold; font-style: normal;
}
@font-face {
  font-family: "AdishilaDevGuru";
  src: url("/resources/fonts/AdishilaDevGuru.ttf") format("truetype");
  font-weight: bold; font-style: normal;
}

.mw-parser-output,
.mw-parser-output *,
.mw-parser-output pre,
.mw-parser-output code,
.mw-parser-output tt,
.mw-parser-output kbd {
  font-family: 'Adishila', 'Noto Serif Devanagari', serif !important;
}

.mw-parser-output {
  font-size: 22px;
  line-height: 1.6;
  color: #555;
  max-width: 100%;
  width: 100%;
  margin: 0; padding: 0;
  box-sizing: border-box;
}

h1.firstHeading, #firstHeading, .mw-page-title-main { display: none !important; }

.mw-parser-output h1,
.mw-parser-output h2,
.mw-parser-output h3,
.mw-parser-output h4,
.mw-parser-output .mw-heading h1,
.mw-parser-output .mw-heading h2,
.mw-parser-output .mw-heading h3 {
  font-family: 'Adishila', 'Noto Serif Devanagari', serif !important;
  border: none !important; border-bottom: none !important;
  padding: 0 !important; background: none !important;
}

.mw-parser-output .mw-heading {
  border: none !important; border-bottom: none !important;
  margin: 0; padding: 0;
}

.gr-doc-title {
  font-size: 1.6em; font-weight: 500; color: #1a1a1a;
  line-height: 1.4; margin: 0 0 16px; border: none !important;
}

/* ── Chapter / section headings ──────────────────────────────── */
.adhyaya-block h2,
.adhyaya-heading,
.mw-parser-output .mw-heading2 h2,
.mw-parser-output h2 {
  font-size: 1.2em !important; font-weight: 500 !important;
  color: var(--light-orange) !important; line-height: 1.8;
  margin: 24px 0 4px !important; padding: 0 !important;
  border: none !important;
  border-bottom: 2px dotted var(--light-orange) !important;
  width: 75%;
}

.mw-parser-output .mw-heading3 h3,
.mw-parser-output h3 {
  font-size: 1em !important; font-weight: 500 !important;
  color: var(--orange) !important; line-height: 1.5;
  margin: 24px 0 8px !important; padding: 0 !important;
  border: none !important;
  border-bottom: 1px dotted var(--orange) !important;
  width: 55%;
}

.mw-heading .mw-editsection,
.adhyaya-block .mw-editsection { display: none !important; }

.mw-parser-output p { margin: 0 0 0.6rem; }       /* REDUCED */
.mw-parser-output p:empty,
.mw-parser-output > div > p:empty,
.mw-heading + p:empty,
.mw-heading2 + p:empty,
.adhyaya-block + p:empty,
.verse-block + p:empty {
  display: none !important; margin: 0 !important;
}

/* ── Verse blocks — tightened spacing ────────────────────────── */
.shloka-block {
  display: block;
  text-align: left;
  margin: 3px 0 0;
}

.shloka-line {
  display: block;
  font-style: normal;
  color: #333;
  line-height: 1.35;
  margin: 0;
}

.verse-block {
  display: block;
  margin: 6px 0 0;            
  text-align: left;
}

.verse-block .shloka-block { text-align: left; margin: 0; }

.verse-block .shloka-line {
  display: block;
  font-style: italic;
  color: #c65;
  font-weight: 500;
  line-height: 1.35;
  margin: 0;
}

.verse-block + p { display: none !important; margin: 0 !important; }

/* ── Uvacha ───────────────────────────────────────────────────── */
.uvacha-block {
  display: block;
  font-weight: bold; color: #c65;
  margin: 0.5rem 0 0;
  padding: 2px 0 2px 12px;
  border-left: 3px solid #c65;
  text-align: left; font-style: normal;
}
.uvacha-block + .verse-block { margin-top: 2px; }

/* ── Bhashyam ─────────────────────────────────────────────────── */
.bhashyam-block {
  display: block;
  font-size: 1em; line-height: 1.6;
  color: #555;
  margin: 0.25em 0 0.35em 48px;
  padding: 0; border: none; background: transparent;
}

/* ── Padya ────────────────────────────────────────────────────── */
.padya-block {
  display: block; font-size: 1em; line-height: 1.75;
  color: #c65 !important; font-style: italic; font-weight: 500;
  margin: 0.4em 0 0.6em 60px; padding: 0; border: none; background: transparent;
}

/* ── Prateeka (inline bold lemma) ────────────────────────────── */
.gr-prateeka { font-weight: bold; font-style: normal; color: #333; }

/* ── Mulaprateeka (block-level centered bold) ────────────────── */
.gr-mulaprateeka-block {
  display: block; font-weight: bold; font-style: normal;
  text-align: center; color: #333;
  margin: 0.7em 0 0.3em; line-height: 1.5;
}

/* ── Moola (inline highlighted source text) ──────────────────── */
.gr-moola { font-weight: bold; font-style: italic; color: #c65; }

/* ── Teeka ────────────────────────────────────────────────────── */
/* NEW — teeka now has a subtle warm background (was unstyled) */
.teeka-block {
  border-radius: 5px;
  padding: 6px 10px 8px;
  margin: 0.3em 0;
  font-size: 0.92em;
  line-height: 1.6;
  color: #555;
  background: #fffdf5;
  border: 1px solid #f0e0b0;
}
.teeka-title {
  font-family: system-ui, -apple-system, sans-serif !important;
  font-size: 0.75em; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--brown); margin-bottom: 4px; padding-bottom: 3px;
  border-bottom: 1px solid var(--light-brown);
}
.teeka-body { font-family: inherit; margin: 0; }
.teeka-block .shloka-block {
  margin: 0 0 0.35em;
  text-align: left;
  padding: 0;
}
.teeka-block .shloka-line {
  display: block; font-style: italic; color: var(--maroon);
  line-height: 1.4; font-size: 0.97em; margin: 0;
}
/* Vyakhya sub-headings rendered as h4 (wikitext === not parsed inside divs) */
.gr-vyakhya-head, .gr-section-head {
  font-size: 0.88em; font-weight: 700;
  color: #6a3e00; margin: 0.4em 0 0.2em;
  font-family: inherit;
  border: none;
}

/* ── Adhyaya block ────────────────────────────────────────────── */
.adhyaya-block { margin: 0 0 4px; }
.adhyaya-trans { font-size: 0.9em; color: #666; margin: 2px 0 0; }
.adhyaya-intro { margin-top: 8px; line-height: 1.75; color: #555; }

/* ── Nyaya ────────────────────────────────────────────────────── */
.nyaya-block { margin: 32px 0; padding-top: 12px; border-top: 1px solid #eee; }
.nyaya-title {
  font-size: 1em; font-weight: 500; color: var(--orange);
  margin-bottom: 0.4rem; border-bottom: 1px dotted var(--orange); width: 50%;
}
.nyaya-title span { display: block; font-size: 0.85em; color: #666; }
.nyaya-body { color: #555; line-height: 1.75; margin-top: 0.5rem; }

/* ── Prasna ───────────────────────────────────────────────────── */
.prasna-block { margin: 32px 0; padding-top: 12px; border-top: 1px solid #eee; }
.prasna-title {
  font-size: 1em; font-weight: 500; color: var(--orange);
  margin-bottom: 0.4rem; border-bottom: 1px dotted var(--orange); width: 50%;
}
.prasna-title span { display: block; font-size: 0.85em; color: #666; }
.prasna-question, .prasna-answer { color: #555; line-height: 1.75; margin-top: 0.5rem; }
.prasna-answer { margin-left: 60px; }

/* ── Introduction ───────────────────────────────────────────────── */

.introduction  p {
  color: var(--dark-gray);
  font-weight:400;
  margin: 0 !important;
  padding: 0 !important;
}

/* ── Verse action buttons ─────────────────────────────────────── */
.verse-actions {
  display: flex; flex-direction: row;
  align-items: center; gap: 6px; margin-top: 4px;
  padding-left: 2px; justify-content: center;
}
.verse-action-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 4px; border-radius: 6px; cursor: pointer;
  opacity: 0.75; transition: all 0.2s ease;
}
.verse-action-btn:hover { opacity: 1; background-color: rgba(0,0,0,0.05); }

.icon {
  display: inline-block; width: 18px; height: 18px;
  background-repeat: no-repeat; background-position: center;
  background-size: contain; transform: translateY(2px);
  pointer-events: none;
}
.icon-copy       { background-image: url('/images/copy.svg'); }
.icon-commentary { background-image: url('/images/commentary.svg'); }

.copy-tooltip {
  position: absolute; bottom: calc(100% + 8px); left: 50%;
  transform: translateX(-50%) translateY(4px);
  white-space: nowrap; pointer-events: none; z-index: 9999;
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: 999px;
  font-size: 0.75rem; font-weight: 500;
  background: rgba(30,30,30,0.82); color: #fff;
  backdrop-filter: blur(6px); opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.copy-tooltip.copy-tooltip-visible {
  opacity: 1; transform: translateX(-50%) translateY(0);
}

/* ── Code / pre ───────────────────────────────────────────────── */
pre, code, .mw-code, tt, kbd {
  font-family: 'Adishila', 'Noto Serif Devanagari', serif !important;
  background-color: transparent !important; border: none !important;
  padding: 0.3em 0 !important; line-height: 1.65;
}

.mw-collapsible, .mw-collapsible-content, blockquote, .quotebox {
  background-color: transparent !important; border: none !important;
  font-style: normal !important; padding: 0 !important; margin-left: 0 !important;
}

.cargo-store-only { display: none !important; }

/* ── TOC — inline box ─────────────────────────────────────────── */
.toc {
  display: block !important; background: #fffdf5;
  border: 1px solid #e8c88a; border-radius: 8px;
  padding: 12px 16px; margin: 0 0 24px 0;
  width: fit-content; min-width: 220px; max-width: 420px;
  font-size: 0.9em; line-height: 2;
  font-family: 'Adishila', 'Noto Serif Devanagari', serif !important;
}
.toc h2, .toc .toctitle {
  font-size: 0.85em !important; font-weight: 600 !important;
  color: var(--text) !important; border: none !important;
  border-bottom: none !important; width: auto !important;
  margin: 0 0 6px !important; text-transform: uppercase; letter-spacing: 0.05em;
}
.toc ul { margin: 0 !important; padding-left: 1.2em !important; list-style: none !important; }
.toc li { margin: 0; padding: 0; }
.toc a { color: var(--text) !important; text-decoration: none !important; }
.toc a:hover { color: var(--light-orange) !important; }
.toc .toclevel-1 > a { font-weight: 600; color: var(--text) !important; }
.toc .toclevel-2 > a { color: var(--text) !important; }
.toc .toclevel-3 > a { color: var(--text) !important; font-size: 0.95em; }
.tocnumber { display: none; }

/* ── Vector 2022 sidebar TOC ──────────────────────────────────── */
/* Only override colours, sizes, and chevron styling.
 * Never override display/flex/layout — Vector 2022 manages its own
 * TOC layout and overriding it breaks multi-script rendering. */

/* "Contents" heading */
.vector-toc .vector-toc-title {
  font-size: 0.72em !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text) !important;
  font-family: 'Adishila', 'Noto Serif Devanagari', system-ui, sans-serif !important;
  margin-bottom: 2px !important;
}

/* Chevron toggle button — colour and size only, no layout override */
.vector-toc .cdx-button.vector-toc-toggle {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  color: var(--text) !important;
  opacity: 1 !important;
  transition: color 0.15s !important;
}
.vector-toc .cdx-button.vector-toc-toggle:hover {
  color: var(--light-orange) !important;
  background: none !important;
}
.vector-toc .cdx-button.vector-toc-toggle svg {
  fill: currentColor !important;
}

/* Hide section numbers in TOC — consistent across all scripts */
.vector-toc .vector-toc-numb {
  display: none !important;
}

/* Allow long section names (Kannada, Tamil, etc.) to wrap rather than
 * overflow or overlap. Vector sets nowrap by default which causes
 * multi-script long titles to bleed out of the sidebar column. */
.vector-toc .vector-toc-text {
  white-space: normal !important;
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
  display: inline !important;
  padding: 2px 0;
  font-family: 'Adishila', 'Noto Serif Devanagari', system-ui, sans-serif !important;
}



.vector-toc a,
.vector-toc .vector-toc-link { 
    font-size: 1.2rem;
    font-family: 'Adishila', 'Noto Serif Devanagari', system-ui, sans-serif !important;
    color: var(--text) !important; 
    text-decoration: none !important; 
}
.vector-toc a:hover,
.vector-toc .vector-toc-link:hover { color: var(--light-orange) !important; }

/* ── TOC ACTIVE ITEM — fixed for Vector 2022 + Common.js span wrapping ─
 *
 * Common.js wraps every text node (including TOC link text) inside a
 * <span data-deva="…"> for transliteration. This means the direct >a
 * child selector fails — we need descendant selectors that reach into
 * the link regardless of span nesting.
 *
 * We also target BOTH the <a> element AND any [data-deva] span inside
 * it to ensure the colour propagates regardless of how deep the span is.
 * ──────────────────────────────────────────────────────────────────── */
.vector-toc .vector-toc-list-item-active .vector-toc-link,
.vector-toc .vector-toc-list-item-active .vector-toc-link *,
.vector-toc .vector-toc-list-item-active > a,
.vector-toc .vector-toc-list-item-active > a *,
.vector-toc .vector-toc-level-1-active .vector-toc-link,
.vector-toc .vector-toc-level-1-active .vector-toc-link * {
  color: var(--light-orange) !important;
  font-weight: 700 !important;
  padding: 2px 0;
}

.vector-toc .vector-toc-level-1 > .vector-toc-link,
.vector-toc .vector-toc-level-1 > .vector-toc-link * {
    font-size: 1.2rem !important;
  font-weight: 600 !important; color: var(--text) !important;
  font-family: 'Adishila', 'Noto Serif Devanagari', system-ui, sans-serif !important;
}
.vector-toc .vector-toc-level-2 > .vector-toc-link,
.vector-toc .vector-toc-level-2 > .vector-toc-link * {   font-size: 1.2rem !important; font-family: 'Adishila', 'Noto Serif Devanagari', system-ui, sans-serif !important;
color: var(--text) !important; }
.vector-toc .vector-toc-level-3 > .vector-toc-link,
.vector-toc .vector-toc-level-3 > .vector-toc-link * {
      font-family: 'Adishila', 'Noto Serif Devanagari', system-ui, sans-serif !important;
  color: var(--text) !important;
}
/* Override for active: must come AFTER level rules */
.vector-toc .vector-toc-list-item-active .vector-toc-level-1 > .vector-toc-link,
.vector-toc .vector-toc-list-item-active .vector-toc-level-2 > .vector-toc-link,
.vector-toc .vector-toc-list-item-active .vector-toc-level-3 > .vector-toc-link {
      font-family: 'Adishila', 'Noto Serif Devanagari', system-ui, sans-serif !important;
  color: var(--light-orange) !important; font-weight: 700 !important;
}

.toc-main-links {
    display: flex; gap: 6px; padding: 5px; align-items: center; margin-bottom: 4px;
}

.toc-main-link-item {
    font-size: 0.9em; color: var(--text); text-decoration: none; padding: 4px 8px;
    border-radius: 6px; background: rgba(0,0,0,0.05); transition: background 0.15s;
}

/* ── Doc teekas ───────────────────────────────────────────────── */
.gr-doc-teekas { margin-bottom: 1em; }
.gr-doc-teekas + p:empty { display: none !important; margin: 0 !important; height: 0 !important; }

/* ── Main page ────────────────────────────────────────────────── */
.gr-home { max-width: 1080px; margin: 0 auto; padding: 0; }
.gr-home-page-title {
  font-family: 'Adishila', 'Noto Serif Devanagari', serif !important;
  text-align: center; font-size: 1.8em; font-weight: 500;
  color: #1a2e40; margin: 24px 0 32px;
}
.gr-home-grid { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 32px; }
.gr-home-card {
  background: #fff; border: 1px solid #e8e4df; border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  padding: 18px 20px 20px; flex: 1 1 280px; min-width: 240px; max-width: 360px;
}
.gr-home-card-title {
  font-family: 'Adishila', 'Noto Serif Devanagari', serif !important;
  font-size: 1em; font-weight: 600; color: #1a2e40;
  text-align: center; padding-bottom: 10px; margin-bottom: 12px;
  border-bottom: 1.5px solid #c0392b;
}
.gr-home-card ol { margin: 0; padding-left: 1.4em; list-style: decimal; }
.gr-home-card li { font-size: 0.95em; line-height: 1.85; color: #333; }
.gr-home-card li a { color: #c0392b; text-decoration: none; }
.gr-home-card li a:hover { text-decoration: underline; }
.gr-home-card li a.new { color: #c08080; }
.gr-home-note { font-size: 0.82em; color: #888; }
.gr-home-group-label {
  font-family: 'Adishila', 'Noto Serif Devanagari', serif !important;
  font-size: 1.1em; font-weight: 600; color: #1a2e40;
  text-align: center; margin: 36px 0 16px; padding-bottom: 8px;
  border-bottom: 2px solid #c0392b;
}

/* ── Modals ───────────────────────────────────────────────────── */
.grantha-new-btn {
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.3);
  color: white; padding: 6px 14px; border-radius: 20px; cursor: pointer; margin-right: 10px;
}
.grantha-modal {
  position: fixed; inset: 0; background: rgba(0,0,0,0.35);
  display: flex; align-items: center; justify-content: center; z-index: 10000;
}
.grantha-modal-box { background: white; padding: 20px; border-radius: 10px; width: 300px; }
.gm-title { font-weight: bold; margin-bottom: 10px; }
.gm-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; }

/* ── Main page sidebar hide ───────────────────────────────────── */
body.page-Main_Page #mw-panel,
body.page-Main_Page .vector-sidebar-container { display: none !important; }
body.page-Main_Page #footer { display: none !important; }

/* ── Main page view toggle ────────────────────────────────────── */
.gr-home-toggle { display: flex; gap: 8px; margin: 0 0 24px; justify-content: center; }
.gr-toggle-btn {
  font-family: 'Adishila', 'Noto Serif Devanagari', serif;
  font-size: 0.88em; padding: 6px 20px;
  border: 1.5px solid #c0392b; border-radius: 20px;
  background: transparent; color: #c0392b;
  cursor: pointer; user-select: none; transition: background 0.15s, color 0.15s;
}
.gr-toggle-btn:hover { background: #fdf0ed; }
.gr-toggle-btn.gr-toggle-active { background: #c0392b; color: #fff; }

/* ── Script switcher bar ──────────────────────────────────────── */
.gr-script-bar {
  margin: 0 0 20px; font-size: 0.8em; color: #888;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.gr-script-label { font-family: system-ui, sans-serif; color: #aaa; }
.gr-script-btn {
  font-family: 'Adishila', 'Noto Serif Devanagari', serif;
  color: #c0392b !important; text-decoration: underline dotted !important; cursor: pointer;
}
.gr-script-btn.active { color: #888 !important; text-decoration: none !important; cursor: default; }

/* ── Vector 2022 header ───────────────────────────────────────── */
.vector-header-container {
  background: #b5451b !important;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.vector-header {
  background: transparent !important; max-width: 100% !important;
  display: flex !important; align-items: center !important;
  justify-content: space-between !important;
  padding-left: 20px !important; padding-right: 20px !important;
}
.vector-header-start {
  flex: 0 0 auto !important; display: flex !important;
  align-items: center !important; gap: 12px;
}
.vector-header-end {
  flex: 0 0 auto !important; display: flex !important;
  align-items: center !important; gap: 16px; margin-left: auto;
}
.mw-logo { display: flex !important; align-items: center; opacity: 1 !important; }
.mw-logo-wordmark { color: #ffffff !important; font-weight: 700; font-size: 18px; }
.mw-logo-icon { content: url('/favicon.png'); width: 24px; height: 24px; }
/* Invert header icons to white — but NOT the user-links area icons
 * (user menu chevron, login button) which need to remain visible) */
.vector-header .vector-icon:not(.vector-icon):not(#vector-user-links-dropdown .vector-icon) {
  filter: invert(1);
  opacity: 0.9;
}
/* Keep user-links icons visible at full opacity */
.vector-user-links .vector-icon,
#vector-user-links-dropdown .vector-icon,
.vector-user-menu-container .vector-icon {
  filter: none !important;
  opacity: 1 !important;
}
.cdx-search-input .vector-icon, .cdx-search-input svg, .cdx-search-input path,
.cdx-search-input__end-button .vector-icon, .cdx-search-input__end-button svg,
.cdx-search-input__end-button path { filter: none !important; fill: #202124 !important; opacity: 1 !important; }
.vector-header-end > *:not(#p-search) { color: rgba(255,255,255,0.9) !important; }
.vector-user-links a { color: rgba(255,255,255,0.9) !important; }

/* ── Hide: Watchlist, Appearance, fix user-menu dropdown text ──
 *
 * Vector 2022 header (right side, between username and chevron):
 *   .mw-portlet-vector-user-menu-overflow  — overflow strip (watchlist ≡★)
 *   #vector-appearance / pinned/unpinned containers — appearance panel
 *
 * The user-menu dropdown text must be dark (not inherit the white
 * header colour) because it renders on a white card background.
 * ──────────────────────────────────────────────────────────────── */

/* 1. Watchlist icon — hide by specific item ID only.
 * Do NOT hide .mw-portlet-vector-user-menu-overflow by class — on some
 * Vector versions that portlet contains the profile/logout links too. */
li#pt-watchlist,
li#pt-watchlist-kbd { display: none !important; }

/* 2. Appearance panel — every container Vector 2022 might use */
#vector-appearance,
#vector-appearance-pinned-container,
#vector-appearance-unpinned-container,
.mw-portlet-appearance,
#p-appearance,
.vector-appearance-pinnable-element,
/* The toggle BUTTON that opens the appearance panel (page-tools area) */
.vector-page-tools [aria-controls="vector-appearance"],
/* Appearance inside the right-side sticky header overflow */
.vector-sticky-header [aria-controls="vector-appearance"] { display: none !important; }

/* 3. User-menu dropdown card — force dark text on white background */
/* The chevron (▾) opens .vector-user-menu which has a white card;
 * the inherited header color: white must be overridden here. */
.vector-user-menu .mw-list-item a,
.vector-user-menu .vector-menu-content-list a,
#p-personal .vector-menu-content a,
.mw-portlet-personal .vector-menu-content a,
#vector-user-menu-overflow .vector-menu-content a { color: #202122 !important; }
.vector-user-menu .mw-list-item a:hover,
.vector-user-menu .vector-menu-content-list a:hover { color: var(--light-orange) !important; }

/* ── User dropdown — fix white text inside the menu ───────────── */
/* The dropdown card itself has a white/light background so links
   must be dark, not the header-inherited white. */
.vector-user-menu .vector-menu-content,
.vector-user-menu .vector-menu-content a,
.vector-user-menu .vector-menu-content .mw-list-item a,
#pt-userpage, #pt-userpage a,
.mw-portlet-personal .vector-menu-content a,
/* OOUI dropdown items */
.oo-ui-menuSelectWidget a,
.oo-ui-menuOptionWidget,
/* Codex menu */
.cdx-menu__listbox .cdx-menu-item__content,
.cdx-menu__listbox a {
  color: #202122 !important;
}
.vector-user-menu .vector-menu-content a:hover,
.mw-portlet-personal .vector-menu-content a:hover {
  color: var(--light-orange) !important;
  background: var(--light-light-orange) !important;
}

#p-search { margin-left: 8px; }
.vector-search-box, .vector-search-box-expanded, .vector-search-box-auto-expand-width {
  min-width: 0 !important; flex-grow: 0 !important;
  position: relative !important; margin: 0 !important;
}
.cdx-search-input__input, .cdx-text-input__input {
  background: #ffffff !important; border: none !important;
  border-radius: 8px !important; color: #202124 !important;
  padding: 6px 10px !important; font-family: system-ui, sans-serif !important;
}
.cdx-search-input__input::placeholder,
.cdx-text-input__input::placeholder { color: rgba(32,33,36,0.5) !important; }
.cdx-search-input__end-button { background: transparent !important; border: none !important; }
.cdx-typeahead-search, .cdx-typeahead-search__menu, .cdx-menu {
  background: #ffffff !important; color: #202124 !important;
  border-radius: 10px !important; box-shadow: 0 6px 24px rgba(0,0,0,0.2) !important;
  filter: none !important;
}
.cdx-menu-item, .cdx-menu-item * { color: #202124 !important; filter: none !important; }
.cdx-menu-item:hover, .cdx-menu-item--active, .cdx-menu-item--selected { background: #f1f3f4 !important; }
.cdx-menu-item__icon, .cdx-menu-item__icon svg,
.cdx-menu-item__icon path { fill: #202124 !important; filter: none !important; }

/* ── Gadya — styled as a sub-subheading (NOT adhyaya-title level) ─
 *
 * Previously gadya used adhyaya-title styles which was too prominent.
 * Now it renders as a modest bold sub-heading, similar to h3 but
 * without the dotted border, clearly below chapter level.
 * ──────────────────────────────────────────────────────────────── */
.gr-gadya,
.verse-line.gr-gadya,
.gr-verse-text.gr-gadya {
  display: block !important;
  font-size: 0.96em !important;
  font-weight: 600 !important;
  font-style: normal !important;
  color: #555 !important;        /* muted — not as loud as orange heading */
  margin: 16px 0 4px !important;
  border-bottom: 1px solid #ddd !important;
  width: 60%;
  line-height: 1.5 !important;
  letter-spacing: 0.01em;
}

/* ── Avataranika ──────────────────────────────────────────────── */
.gr-avataranika {
  font-style: italic; color: #444;
  margin: 0 0 0.5em 0.5em; padding-left: 0.6em;
  border-left: 2px solid #c9a96e; line-height: 1.6;
}

/* ── Vyakhya-pada ─────────────────────────────────────────────── */
.gr-vyakhya-pada {
  font-size: 0.88em; color: #555;
  background: #fafafa; border: 1px solid #e8e0d0;
  border-radius: 4px; padding: 0.5em 0.8em;
  margin: 0.5em 0; line-height: 1.5; white-space: pre-wrap;
}

/* ── Vyakhya-gadya ────────────────────────────────────────────── */
.gr-vyakhya-gadya {
  font-weight: bold; font-size: 0.95em; text-align: center;
  color: #8b1a1a; margin: 0.8em 0 0.3em 0; letter-spacing: 0.03em;
}

/* ── Author note ──────────────────────────────────────────────── */
.gr-author-note {
  font-style: italic; color: #666; text-align: center;
  font-size: 0.9em; margin: 0.8em 0 0.4em 0;
  border-top: 1px solid #ddd; padding-top: 0.4em;
}

/* ── Leading bhashya ──────────────────────────────────────────── */
.gr-leading-bhashya { font-style: italic; color: #555; margin: 0.4em 0 0.5em 0; }

/* ── Verse text (general) ─────────────────────────────────────── */
.gr-verse-text, .verse-line, .verse-text {
  color: #b5451b; font-style: italic; line-height: 1.5;  /* REDUCED */
  display: block; margin: 0.1em 0;
}
.gr-verse-type-mantra .gr-verse-text,
.verse-block[data-type="mantra"] .verse-line { font-size: 1.05em; }
.gr-verse-type-sutra .gr-verse-text,
.verse-block[data-type="sutra"] .verse-line { font-style: normal; font-weight: 600; color: #b5451b; }

/* ── Bhashyam / commentary prose ─────────────────────────────── */
.gr-bhashyam, .commentary-bhashyam {
  color: #222; font-style: normal; line-height: 1.75; margin: 0.3em 0 0.5em 0;
}

/* ── Padapatha ────────────────────────────────────────────────── */
.gr-padapatha { font-size: 0.9em; color: #555; margin: 0.2em 0 0.3em 0.8em; font-style: normal; }

/* ── Devatachandas / vargikarana ─────────────────────────────── */
.gr-devatachandas { font-size: 0.82em; color: #777; font-style: normal; margin: 0.4em 0 0.2em 0; }
.gr-vargikarana   { font-size: 0.82em; color: #888; font-style: normal; margin: 0.5em 0 0.1em 0; }

/* ── Uvaaca ───────────────────────────────────────────────────── */
.gr-uvaaca, .uvaaca {
  color: #b5451b; font-weight: 600; font-size: 0.92em;
  margin: 0.5em 0 0.2em 0; display: block;
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 600px) {
  .mw-parser-output { font-size: 16px; }
  .mw-parser-output h2, .mw-parser-output .mw-heading2 h2 { width: 100% !important; }
  .mw-parser-output h3, .mw-parser-output .mw-heading3 h3 { width: 100% !important; }
  .nyaya-title, .prasna-title { width: 100%; }
  .bhashyam-block, .teeka-block { margin-left: 10px; }
  .toc { max-width: 100%; }
  .gr-gadya { width: 90%; }
}




/* ── Global spacing tightening ────────────────────────────────── */
.mw-parser-output p { margin-bottom: 0.35rem !important; }
.mw-parser-output .verse-block,
.mw-parser-output .shloka-block { margin-top: 2px !important; margin-bottom: 2px !important; }

/* ── Vyakhya sub-headings (h4 replaces === which breaks inside divs) */
.gr-vyakhya-head, .gr-section-head {
  font-size: 0.9em;
  font-weight: 700;
  color: #6a3e00;
  margin: 0.35em 0 0.15em;
  font-family: inherit;
  border: none;
  padding: 0;
}

/* ── Vyakhya page layout ──────────────────────────────────────── */
.gr-vyakhya-gadya { margin: 0.2em 0; line-height: 1.6; }
.gr-avataranika   { margin: 0.2em 0; line-height: 1.6; color: #555; }
.gr-embedded-bhashya { margin: 0.2em 0 0.2em 1em; line-height: 1.6; }

/* ── Individual vyakhya prose paragraphs ─────────────────────── */
.gr-vyakhya-para {
  margin: 0 0 0.5em 0;
  line-height: 1.65;
  color: #444;
}
.gr-vyakhya-para:last-child { margin-bottom: 0; }

/* Shloka-lines inside teeka-block (quoted verses within commentary) */
.teeka-body .shloka-block {
  margin: 0.4em 0;
  padding: 0.3em 0.6em;
  border-left: 3px solid #e8c88a;
  background: transparent;
}
.teeka-body .shloka-line {
  color: #8a4a00;
  font-style: italic;
  font-size: 0.97em;
}

/* ══════════════════════════════════════════════════════════════════
   TEEKA VIEW MODES
   Applied to <body> by Common.js based on referrer / ?ref= param.

   gr-standalone  — direct URL access: plain reading view
   gr-ref-mode    — navigated from main doc: styled embedded view
   ══════════════════════════════════════════════════════════════════ */

/* ── Standalone mode: strip all container chrome ──────────────── */
/* The gr-page-nav back-link is useful in standalone, keep it */
body.gr-standalone .gr-page-nav {
  display: block;
}
/* Remove coloured box — show as plain flowing text */
body.gr-standalone .teeka-block {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
}
body.gr-standalone .teeka-title {
  display: none !important;
}
/* Each entry flows naturally, small separator between descriptors */
body.gr-standalone .gr-teeka-entry {
  border-bottom: 1px solid #f0e8d8;
  padding-bottom: 0.8em;
  margin-bottom: 0.8em;
}
body.gr-standalone .gr-teeka-entry:last-of-type {
  border-bottom: none;
}
/* Shlokas in standalone get the normal verse color, no extra indent */
body.gr-standalone .teeka-body .shloka-block {
  border-left: none;
  padding-left: 0;
  background: none;
}
body.gr-standalone .teeka-body .shloka-line {
  color: var(--maroon);
  font-style: italic;
}
/* Vyakhya headings still show, but lighter */
body.gr-standalone .gr-vyakhya-head {
  color: #a07040;
  font-size: 0.95em;
  margin-top: 0.8em;
}

/* ── Ref mode: full styled embedded view (default teeka-block look) ── */
/* This is already the default from .teeka-block rules above.
   Explicit declarations here for clarity and override safety. */
body.gr-ref-mode .teeka-block {
  background: #fffdf5 !important;
  border: 1px solid #f0e0b0 !important;
  padding: 6px 10px 8px !important;
  border-radius: 5px !important;
}
body.gr-ref-mode .teeka-title {
  display: block !important;
}
/* The page-nav back-link is redundant when embedded in main doc */
body.gr-ref-mode .gr-page-nav {
  display: none;
}

/* ── Default (no body class yet — JS may not have run) ────────── */
/* Show styled until JS classifies */
.gr-teeka-page .teeka-block {
  background: #fffdf5;
  border: 1px solid #f0e0b0;
}
/* ═══════════════════════════════════════════════════════════════════
   Common.css — targeted additions  (append to your existing file)
   These are the ONLY new rules — nothing above is changed.
   ═══════════════════════════════════════════════════════════════════ */

/* ── 1. Hide footer ─────────────────────────────────────────────── */
#footer,
.mw-footer,
.vector-footer,
.vector-footer-container { display: none !important; }

/* ── 2. Hide category links bar ─────────────────────────────────── */
.catlinks,
#catlinks,
.mw-normal-catlinks,
.mw-hidden-catlinks { display: none !important; }

/* ── 3. Hide Appearance panel + Watchlist icons ─────────────────── */
/* Appearance */
#vector-appearance,
#vector-appearance-pinned-container,
#vector-appearance-unpinned-container,
.mw-portlet-appearance,
#p-appearance,
.vector-page-tools [aria-controls="vector-appearance"],
.vector-sticky-header [aria-controls="vector-appearance"] { display: none !important; }
/* Watchlist */
li#pt-watchlist,
li#pt-watchlist-kbd,
.mw-portlet-vector-user-menu-overflow { display: none !important; }

/* ── 4. Make user/account icon white to match header theme ──────── */
/* The user avatar SVG and person icon in the top-right */
.vector-user-menu-container .vector-icon svg,
.vector-user-menu-container .vector-icon svg path,
.vector-user-menu-container .vector-icon svg circle,
#pt-user-interface-preferences .vector-icon svg,
#pt-user-interface-preferences .vector-icon svg path,
.mw-portlet-vector-user-menu-overflow .vector-icon svg,
.vector-header .mw-ui-button .vector-icon svg,
.vector-header-end .vector-menu-content .vector-icon svg {
  fill: #ffffff !important;
  stroke: #ffffff !important;
  color: #ffffff !important;
}
/* The dropdown chevron arrow next to user name */
.vector-user-links .vector-user-menu-chevron .vector-icon svg,
.vector-user-links .vector-user-menu-chevron .vector-icon svg path {
  fill: rgba(255,255,255,0.9) !important;
}

/* ── 5. Replace header site name "Grantha" → "Anandamakaranda" ──── */
/* The .mw-logo-wordmark contains the site name text.
 * We hide the original text node via font-size:0, then inject the
 * new name via ::before pseudo-element. */
.mw-logo-wordmark {
  font-size: 0 !important;       /* hide original text */
  white-space: nowrap;
}
.mw-logo-wordmark::before {
  content: 'Anandamakaranda';
  font-size: 17px;               /* restore readable size */
  font-weight: 700;
  color: #ffffff;
  font-family: system-ui, -apple-system, sans-serif;
  letter-spacing: -0.01em;
}
/* Also handle the <a> wrapper text if the logo is text-only */
#p-logo .mw-wiki-logo,
.mw-logo a[title] {
  /* no change needed — title attr tooltip stays as-is */
}

/* ── 6. TOC मूल / मूलम् / उल्लेख button hover state ────────────── */
.toc-main-link-item:hover {
  background: rgba(0,0,0,0.10) !important;
  opacity: 1 !important;
}


/* ===== HEADER CLEANUP ===== */

/* Hamburger */
.vector-main-menu,
#mw-sidebar-button,
.vector-header-start .vector-main-menu-container {
    display: none !important;
}

/* Search */
#p-search,
.vector-search-box,
.vector-search-box-vue,
.vector-search-box-collapses {
   display: none !important;
}


/* hamburger */
#mw-sidebar-button,
.vector-main-menu,
.vector-main-menu-container {
    display:none !important;
}

/* appearance */
#vector-appearance,
#p-appearance,
[aria-controls="vector-appearance"] {
    display:none !important;
}

/* Watchlist */
#pt-watchlist,
#pt-watchlist-2,
li#pt-watchlist {
    display: none !important;
}
/* ===== SPECIAL PAGES CLEAN ===== */

body.ns-special #footer,
body.ns-special .mw-footer,
body.ns-special .vector-footer,
body.ns-special .mw-footer-container,
body.ns-special #footer-icons,
body.ns-special #footer-places {
    display: none !important;
}
body.ns-special #vector-page-toolbar,
body.ns-special .vector-page-toolbar,
body.ns-special #p-views,
body.ns-special #p-namespaces,
body.ns-special .vector-page-tools {
    display: none !important;
}
.vector-toc .vector-pinnable-header-label,
.vector-toc .vector-toc-title{
    font-size: 1.25rem;
    font-weight: 700;
}
#siteNotice {
    display:none !important;
}
/* ── Tighten spacing on renderer wrapper divs ───────────────────────
 * .section/.adhikarana wrappers removed from renderer (caused MW to inject
 * blank paragraphs between them). Only .bhashya-collection remains.
 * Keep :empty rules for defensive cleanup. */
.mw-parser-output .bhashya-collection {
  margin: 0;
  padding: 0;
}
/* Empty data-attribute divs — zero height */
.adhyaya-block:empty,
.mw-parser-output div:empty { display: none !important; }
/* MW wraps raw HTML in <p> tags - prevent double spacing after block divs */
.mw-parser-output .bhashya + p:empty,
.mw-parser-output .verse + p:empty,
.mw-parser-output .bhashya-collection + p:empty,
.mw-parser-output .pramana + p:empty,
.mw-parser-output .author-note + p:empty {
  display: none !important;
  margin: 0 !important;
  height: 0 !important;
}