/* learn/ramayana/ — the Rāmāyaṇa study (ramayana_pages.py). Colours are styles.css tokens. */
.rm { --rm-q: #2f6f86; --rm-g: #5c7f3c; --rm-gold: #a8742a; --rm-plum: #7a4a78; }
html.dark-mode .rm { --rm-q: #8cc4d8; --rm-g: #a9cf86; --rm-gold: #e2b56a; --rm-plum: #cfa3cd; }
.rm .deva { font-family: 'Noto Serif Devanagari', serif; }
.rm i { font-style: italic; }

/* hero */
.rm-hero { padding: 34px 0 26px; background: linear-gradient(180deg, var(--accent-light), transparent); }
.rm-hero-in { display: grid; gap: 22px; align-items: center; }
.rm-hero.has-img .rm-hero-in { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.rm-kicker { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-light); margin: 0 0 10px; }
.rm-kicker a { color: var(--accent); text-decoration: none; }
.rm-hero-deva { color: var(--accent); font-size: 1.35rem; margin: 0 0 4px; }
.rm-hero h1 { font-family: var(--font-heading); font-size: clamp(1.9rem, 4.5vw, 3rem); line-height: 1.12; margin: 0 0 12px; }
.rm-hero .lede { font-size: 1.05rem; line-height: 1.75; color: var(--text-muted); max-width: 760px; margin: 0; }
.rm-hero-img .rm-fig { margin: 0; }
@media (max-width: 820px) { .rm-hero.has-img .rm-hero-in { grid-template-columns: 1fr; } .rm-hero-img { max-width: 460px; } }

/* page tabs */
.rm-tabs { position: sticky; top: var(--header-h, 64px); z-index: 20; background: var(--bg); border-bottom: 1px solid var(--border-light); }
.rm-tabs .container { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: thin; padding-top: 8px; padding-bottom: 8px; }
.rm-tab { flex: none; padding: 6px 12px; border-radius: 999px; font-size: .86rem; color: var(--text-muted); text-decoration: none; white-space: nowrap; }
.rm-tab:hover { color: var(--accent); background: var(--accent-light); }
.rm-tab.is-on { background: var(--accent); color: #fff; }
.rm-main { padding-top: 22px; padding-bottom: 30px; }

/* boxes and headings */
.rm-gh { font-family: var(--font-heading); font-size: clamp(1.35rem, 3vw, 1.75rem); margin: 34px 0 12px; color: var(--text); }
.rm-h { font-family: var(--font-heading); font-size: 1.12rem; margin: 0 0 8px; color: var(--accent-dark, var(--accent)); }
.rm-sub { color: var(--text-muted); margin: -4px 0 12px; }
.rm-box { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 14px; padding: 16px 18px; margin: 0 0 14px; }
.rm-box p { line-height: 1.75; margin: 0 0 8px; }
.rm-box p:last-child { margin-bottom: 0; }
.rm-inner { border-left: 4px solid var(--rm-plum); }
.rm-deep { border-left: 4px solid var(--rm-gold); }
.rm-ramabox { border-left: 4px solid var(--accent); background: var(--accent-light); }
.rm-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); gap: 14px; }
.rm-lbl { display: block; font-size: .7rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--text-light); margin-bottom: 2px; font-style: normal; }
.rm-note { color: var(--text-light); font-size: .82rem; line-height: 1.6; margin: 10px 0 34px; }
.rm-status { color: var(--text-muted); font-size: .88rem; min-height: 1.2em; margin: 6px 0; }

/* figures (line drawings — kept on white in both themes) */
.rm-fig { margin: 0 0 12px; background: #fff; border: 1px solid var(--border-light); border-radius: 12px; overflow: hidden; }
.rm-fig img { display: block; width: 100%; height: auto; }
.rm-fig figcaption { padding: 7px 11px; font-size: .82rem; color: #5b5146; background: #fbf8f3; line-height: 1.45; }
html.dark-mode .rm-fig img { filter: brightness(.9); }

/* toolbar */
.rm-bar { position: sticky; top: calc(var(--header-h, 64px) + 46px); z-index: 15; background: var(--bg); padding: 10px 0; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; border-bottom: 1px solid var(--border-light); }
.rm-search { flex: 1 1 280px; display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--bg-card); }
.rm-search i { color: var(--text-light); }
.rm-search input { flex: 1; min-width: 0; border: 0; outline: none; background: none; color: var(--text); font: inherit; font-size: 1rem; }
.rm-search-big { margin: 0 0 8px; padding: 13px 16px; }
.rm-btn, .rm-chips button { font: inherit; font-size: .85rem; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text); cursor: pointer; }
.rm-btn[aria-pressed="true"], .rm-chips button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.rm-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.rm-chips small { opacity: .75; }
.rm-sel { font-size: .85rem; color: var(--text-muted); display: inline-flex; gap: 6px; align-items: center; }
.rm-sel select { font: inherit; padding: 5px 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-card); color: var(--text); max-width: 180px; }
.rm-sel input { accent-color: var(--accent); }
.rm-bar-v { position: static; }
@media (max-width: 700px) { .rm-bar { position: static; } }

/* overview */
.rm-hits { display: grid; gap: 6px; margin: 0 0 18px; }
.rm-hit { display: block; padding: 9px 13px; border-radius: 10px; background: var(--bg-card); border: 1px solid var(--border-light); text-decoration: none; color: var(--text); }
.rm-hit b { color: var(--text); } .rm-hit small { color: var(--accent); font-weight: 600; margin-right: 6px; text-transform: uppercase; letter-spacing: .06em; font-size: .68rem; }
.rm-hit span { display: block; color: var(--text-muted); font-size: .88rem; margin-top: 2px; }
.rm-steps { margin: 0; padding-left: 20px; line-height: 1.7; } .rm-steps li { margin-bottom: 6px; }
.rm-kcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 12px; }
.rm-kcard { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 0 0 14px; border-radius: 14px; overflow: hidden; border: 1px solid var(--border-light); background: var(--bg-card); text-decoration: none; color: var(--text); }
.rm-kcard:hover { border-color: var(--accent); }
.rm-kcard img, .rm-kcard-blank { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: #fff; margin-bottom: 8px; }
.rm-kcard-blank { display: grid; place-items: center; font-size: 2.6rem; color: var(--accent); background: var(--accent-light); }
.rm-kcard > b, .rm-kcard > i, .rm-kcard > .rm-kg, .rm-kcard > .rm-km { padding: 0 14px; }
.rm-kcard > b { font-family: var(--font-heading); font-size: 1.2rem; }
.rm-kcard > i { color: var(--text-muted); }
.rm-kn { position: absolute; top: 10px; left: 10px; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; }
.rm-kg { font-size: .88rem; line-height: 1.55; color: var(--text-muted); }
.rm-km { font-size: .76rem; color: var(--text-light); margin-top: 4px; }
.rm-qgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); gap: 8px; }
.rm-q { display: flex; flex-direction: column; gap: 2px; padding: 11px 13px; border-radius: 12px; background: var(--bg-card); border: 1px solid var(--border-light); text-decoration: none; color: var(--text); }
.rm-q:hover { border-color: var(--accent); }
.rm-q b { color: var(--accent-dark, var(--accent)); } .rm-q i { font-size: .8rem; color: var(--text-light); } .rm-q span { font-size: .84rem; color: var(--text-muted); line-height: 1.5; }
.rm-pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 46%), 1fr)); gap: 10px; }
.rm-pc { display: flex; flex-direction: column; border-radius: 12px; overflow: hidden; border: 1px solid var(--border-light); background: var(--bg-card); text-decoration: none; color: var(--text); padding-bottom: 10px; }
.rm-pc img, .rm-pc-blank { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #fff; margin-bottom: 6px; }
.rm-pc-blank { display: grid; place-items: center; font-size: 2rem; color: var(--accent); background: var(--accent-light); }
.rm-pc b, .rm-pc span { padding: 0 10px; } .rm-pc span { font-size: .78rem; color: var(--text-muted); line-height: 1.4; }
.rm-pc-more { justify-content: center; align-items: center; background: var(--accent-light); padding: 16px; }
.rm-catcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 10px; }
.rm-catcard { display: flex; flex-direction: column; gap: 3px; padding: 13px 15px; border-radius: 12px; border: 1px solid var(--border-light); border-top: 4px solid var(--c); background: var(--bg-card); text-decoration: none; color: var(--text); }
.rm-catcard span { font-size: .86rem; color: var(--text-muted); } .rm-catcard small { color: var(--text-light); }
.rm-ixs { columns: 3 260px; column-gap: 12px; }
.rm-ix { break-inside: avoid; margin: 0 0 6px; border: 1px solid var(--border-light); border-radius: 10px; background: var(--bg-card); }
.rm-ix > summary { cursor: pointer; padding: 8px 12px; font-weight: 600; list-style: none; }
.rm-ix > summary::-webkit-details-marker { display: none; }
.rm-ix > summary small { font-weight: 400; color: var(--text-light); font-size: .76rem; margin-left: 4px; }
.rm-ix[open] > summary { color: var(--accent); }
.rm-ix > div { padding: 0 12px 10px; display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: .88rem; }
.rm-ix a { color: var(--text); } .rm-ix a.rm-iv { color: var(--accent); }
.rm-sks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 10px 18px; }
.rm-sk h3 { font-family: var(--font-heading); font-size: 1.05rem; margin: 0 0 4px; } .rm-sk h3 a { color: var(--accent); text-decoration: none; }
.rm-sk ol { margin: 0; padding-left: 20px; font-size: .9rem; line-height: 1.6; } .rm-sk a { color: var(--text); }

/* category colours */
.c-philosophy { --c: #7a4a78; } .c-concept { --c: #2f6f86; } .c-ideal { --c: #a8742a; } .c-spiritual { --c: #b5523b; } .c-subtle { --c: #4f5d8f; } .c-life { --c: #5c7f3c; }
html.dark-mode .c-philosophy { --c: #cfa3cd; } html.dark-mode .c-concept { --c: #8cc4d8; } html.dark-mode .c-ideal { --c: #e2b56a; }
html.dark-mode .c-spiritual { --c: #ef9a83; } html.dark-mode .c-subtle { --c: #a9b6ea; } html.dark-mode .c-life { --c: #a9cf86; }
.rm-cat { display: inline-block; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; color: var(--c); border: 1px solid var(--c); text-decoration: none; }
.rm-legend { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 4px; } .rm-legend b { margin-right: 6px; }

/* kāṇḍa page */
.rm-facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0 0 14px; color: var(--text-muted); }
.rm-facts b { font-family: var(--font-heading); font-size: 1.3rem; color: var(--accent); margin-right: 4px; }
.rm-toc { margin: 4px 0 14px; } .rm-toc ol { columns: 2 280px; margin: 0; padding-left: 22px; line-height: 1.75; }
.rm-toc a { color: var(--text); } .rm-toc small { color: var(--text-light); }
.rm-read { color: var(--text-muted); font-size: .88rem; margin: 8px 0 0; }
.rm-eps { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.rm-ep { border: 1px solid var(--border-light); border-radius: 16px; background: var(--bg-surface); scroll-margin-top: 170px; }
.rm-ep > summary { cursor: pointer; list-style: none; padding: 15px 18px 13px 40px; position: relative; display: flex; flex-direction: column; gap: 2px; }
.rm-ep > summary::-webkit-details-marker { display: none; }
.rm-ep > summary::before { content: "▸"; position: absolute; left: 16px; top: 16px; color: var(--accent); transition: transform .15s; }
.rm-ep[open] > summary::before { transform: rotate(90deg); }
.rm-ep-t { font-family: var(--font-heading); font-size: 1.22rem; color: var(--text); }
.rm-ep-s { color: var(--text-muted); } .rm-ep-m { font-size: .78rem; color: var(--text-light); }
.rm-ep-body { padding: 0 18px 18px; }
.rm-story { background: var(--bg-card); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; overflow: hidden; }
.rm-story p { line-height: 1.8; margin: 0 0 10px; }
.rm-figs { float: right; width: min(380px, 44%); margin: 0 0 8px 18px; }
@media (max-width: 700px) { .rm-figs { float: none; width: 100%; margin: 0 0 10px; } }
.rm-ramabox ul { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 6px; line-height: 1.6; }
.rm-asp { display: inline-block; font-size: .74rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--accent); color: #fff !important; text-decoration: none; margin-right: 4px; }
.rm-ep-foot { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .85rem; }
.rm-foot-l { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-light); margin: 0 2px 0 8px; }
.rm-foot-l:first-child { margin-left: 0; }
.rm-person, .rm-idea { padding: 2px 9px; border-radius: 999px; border: 1px solid var(--border); text-decoration: none; color: var(--text); background: var(--bg-card); }
.rm-idea { border-style: dashed; }
.rm-pn { display: flex; justify-content: space-between; gap: 10px; margin: 26px 0 0; }
.rm-pn a { padding: 10px 16px; border-radius: 12px; border: 1px solid var(--border); text-decoration: none; color: var(--accent); font-weight: 600; }

/* verse cards */
.rm-verses { display: flex; flex-direction: column; gap: 12px; margin: 0 0 14px; }
.rm-verse { background: var(--bg-card); border: 1px solid var(--border-light); border-left: 4px solid var(--accent); border-radius: 14px; padding: 15px 18px; scroll-margin-top: 170px; }
.rm-verse > header { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.rm-vref { font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.rm-vwho { font-size: .82rem; color: var(--text-light); }
.rm-verse h4 { font-family: var(--font-heading); font-size: 1.12rem; margin: 4px 0 10px; }
.rm-dev { font-size: 1.2rem; line-height: 1.95; color: var(--text); }
.rm-iast { font-style: italic; color: var(--text-muted); line-height: 1.7; margin: 6px 0 10px; }
.rm-wbw > summary { cursor: pointer; font-weight: 600; font-size: .86rem; color: var(--accent); }
.rm-wbw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr)); gap: 4px 14px; margin: 8px 0 4px; font-size: .9rem; }
.rm-wbw-grid div { padding: 4px 0; border-bottom: 1px dotted var(--border-light); }
.rm-wbw-grid b { color: var(--rm-q); font-style: italic; font-weight: 600; margin-right: 6px; }
.rm-wbw-grid span { color: var(--text-muted); }
.rm-tr, .rm-expl, .rm-phil { line-height: 1.75; margin: 10px 0 0; }
.rm-tr { font-size: 1.02rem; }
.rm-phil { padding: 8px 12px; border-radius: 0 10px 10px 0; border-left: 3px solid var(--rm-plum); background: color-mix(in srgb, var(--rm-plum) 7%, transparent); }
.rm-verse > footer { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-top: 12px; }
.rm-vlink { margin-left: auto; color: var(--text-light); text-decoration: none; }
body.rm-practice .rm-allverses .rm-tr, body.rm-practice .rm-allverses .rm-wbw, body.rm-practice .rm-allverses .rm-expl, body.rm-practice .rm-allverses .rm-phil { filter: blur(6px); cursor: pointer; }
body.rm-practice .rm-allverses .is-shown .rm-tr, body.rm-practice .rm-allverses .is-shown .rm-wbw, body.rm-practice .rm-allverses .is-shown .rm-expl, body.rm-practice .rm-allverses .is-shown .rm-phil { filter: none; }
body.rm-nowbw .rm-wbw { display: none; }

/* characters */
.rm-who { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 6px 0 4px; font-size: .88rem; } .rm-who a { color: var(--accent); }
.rm-chars { display: grid; gap: 12px; }
.rm-char { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 16px 18px; border-radius: 16px; background: var(--bg-card); border: 1px solid var(--border-light); scroll-margin-top: 170px; }
.rm-char:has(.rm-fig-char) { grid-template-columns: minmax(0, 2fr) minmax(0, 5fr); }
@media (max-width: 700px) { .rm-char:has(.rm-fig-char) { grid-template-columns: 1fr; } }
.rm-char .rm-fig { margin: 0; align-self: start; }
.rm-char h3 { font-family: var(--font-heading); font-size: 1.4rem; margin: 0 0 2px; } .rm-char h3 .deva { font-size: 1rem; color: var(--accent); margin-left: 6px; }
.rm-also { color: var(--text-light); font-size: .86rem; margin: 0 0 6px; }
.rm-role { font-weight: 600; margin: 0 0 8px; }
.rm-char p { line-height: 1.7; margin: 0 0 9px; }
.rm-great { padding: 8px 12px; border-left: 3px solid var(--rm-gold); background: color-mix(in srgb, var(--rm-gold) 8%, transparent); border-radius: 0 10px 10px 0; }
.rm-sym { color: var(--text-muted); }
.rm-links { display: flex; flex-wrap: wrap; gap: 3px 12px; font-size: .88rem; } .rm-links .rm-lbl { width: 100%; } .rm-links a { color: var(--accent); }

/* Rāma page and lists */
.rm-roles { margin: 0 0 8px; padding-left: 18px; line-height: 1.7; }
.rm-qsec { padding: 18px 0 6px; border-top: 1px solid var(--border-light); scroll-margin-top: 130px; }
.rm-qsec h2 { font-family: var(--font-heading); font-size: 1.4rem; margin: 0 0 4px; } .rm-qsec h2 small { font-family: inherit; font-size: .9rem; font-style: italic; color: var(--text-light); font-weight: 400; }
.rm-qbrief { font-size: 1.05rem; color: var(--accent-dark, var(--accent)); font-weight: 600; margin: 0 0 6px; }
.rm-qsec > p { line-height: 1.75; }
.rm-where { margin: 0 0 12px; padding-left: 20px; line-height: 1.7; } .rm-where li { margin-bottom: 4px; } .rm-where a { color: var(--accent); }
.rm-wk { display: inline-block; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-light) !important; text-decoration: none; margin-right: 4px; }

/* inner */
.rm-sym-t { width: 100%; border-collapse: collapse; background: var(--bg-card); border-radius: 12px; overflow: hidden; }
.rm-sym-t th, .rm-sym-t td { padding: 10px 14px; border-bottom: 1px solid var(--border-light); text-align: left; vertical-align: top; line-height: 1.6; }
.rm-sym-t th { width: 28%; font-family: var(--font-heading); color: var(--accent); font-weight: 600; }
@media (max-width: 600px) { .rm-sym-t th, .rm-sym-t td { display: block; width: auto; } .rm-sym-t th { border-bottom: 0; padding-bottom: 0; } }
.rm-kgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 12px; }

/* long compounds must not widen the page on phones */
.rm-dev, .rm-iast, .rm-wbw-grid, .rm-story, .rm-char, .rm-box, .rm-hit { overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) { .rm-ep > summary::before { transition: none; } }

/* ── The study companion (the earlier research page, kept whole) ── */
.rm-comp { margin-top: 30px; padding-top: 6px; border-top: 2px solid var(--border-light); scroll-margin-top: 200px; }
.rm-comp-head { max-width: 900px; margin-bottom: 8px; }
.rm-comp .kanda-index { font-family: var(--font-heading); font-style: italic; font-size: .95rem; color: var(--accent); display: block; margin-bottom: 2px; }
.rm-comp-head h3 { font-family: var(--font-heading); font-size: 1.25rem; margin: 0 0 4px; }
.rm-comp .kanda-meta { font-size: .8rem; color: var(--text-light); margin-bottom: 8px; }
.rm-comp .kanda-essence { color: var(--text-muted); line-height: 1.75; }
.rm-comp-key { font-size: .8rem; color: var(--text-muted); display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.rm-key { font-size: .66rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 2px 8px; border-radius: 6px; }
.rm-key-gold { background: #FBF3D9; color: #8A6D1C; } .rm-key-green { background: #EEF3EA; color: #4A7043; } .rm-key-verse { background: #F0EAF5; color: #6B4E8E; }
.rm-bar-c { position: static; border: 0; padding: 8px 0; }
.rm-ctopics { display: flex; flex-direction: column; gap: 10px; }
.rm-ctopic { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 14px; scroll-margin-top: 200px; }
.rm-ctopic > summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; padding: 14px 18px 14px 38px; position: relative; }
.rm-ctopic > summary::-webkit-details-marker { display: none; }
.rm-ctopic > summary::before { content: "▸"; position: absolute; left: 16px; top: 15px; color: var(--accent); transition: transform .15s; }
.rm-ctopic[open] > summary::before { transform: rotate(90deg); }
.rm-ct-t { flex: 1 1 320px; display: flex; flex-direction: column; }
.rm-ct-t b { font-family: var(--font-heading); font-weight: 500; font-size: 1.06rem; color: var(--text); }
.rm-ct-t small { font-size: .74rem; color: var(--text-light); }
.rm-comp .topic-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.rm-comp .topic-tag { font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 2px 9px; border-radius: 100px; background: var(--accent-light); color: var(--accent); }
.rm-comp .topic-tag.t-kamba { background: #EEF3EA; color: #4A7043; } .rm-comp .topic-tag.t-verse { background: #F0EAF5; color: #6B4E8E; } .rm-comp .topic-tag.t-rama { background: #FBF3D9; color: #8A6D1C; }
.rm-ct-body { padding: 0 20px 18px; }
.rm-ct-body > p { color: var(--text-muted); line-height: 1.75; margin: 0 0 14px; }
.rm-comp .subtopic { margin: 16px 0; padding-left: 16px; border-left: 2px solid var(--border); }
.rm-comp .subtopic h4 { font-size: .98rem; margin: 0 0 6px; color: var(--text); }
.rm-comp .subtopic p { color: var(--text-muted); line-height: 1.7; }
.rm-comp .story-box { background: var(--bg-surface); border-radius: 10px; padding: 14px 16px; margin: 14px 0; }
.rm-comp .story-label, .rm-comp .rama-label, .rm-comp .kamba-label { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; display: block; margin-bottom: 6px; }
.rm-comp .story-label { color: var(--accent); }
.rm-comp .story-box h5 { font-family: var(--font-heading); font-size: 1rem; margin: 0 0 6px; }
.rm-comp .story-box p { color: var(--text-muted); line-height: 1.7; margin: 0; }
.rm-comp .rama-marker { background: linear-gradient(135deg, #FDF8E7 0%, #FBF3D9 100%); border: 1px solid #EBDCA8; border-left: 4px solid #C9A227; border-radius: 10px; padding: 13px 17px; margin: 14px 0; }
.rm-comp .rama-label { color: #8A6D1C; } .rm-comp .rama-label::before { content: '❖ '; }
.rm-comp .rama-marker p { color: #57492A; line-height: 1.7; margin: 0; }
.rm-comp .rama-marker strong, .rm-comp .rama-marker em { color: #3E3115; }
.rm-comp .kamba-note { background: #F3F6F0; border: 1px solid #DDE6D6; border-left: 4px solid #6E9160; border-radius: 10px; padding: 13px 17px; margin: 14px 0; }
.rm-comp .kamba-label { color: #4A7043; } .rm-comp .kamba-note p { color: #44503E; line-height: 1.7; margin: 0; }
html.dark-mode .rm-comp .rama-marker { background: rgba(201,162,39,.12); border-color: rgba(201,162,39,.35); }
html.dark-mode .rm-comp .rama-marker p, html.dark-mode .rm-comp .rama-marker strong, html.dark-mode .rm-comp .rama-marker em { color: #eadfbf; }
html.dark-mode .rm-comp .rama-label, html.dark-mode .rm-key-gold { color: #e2c46a; }
html.dark-mode .rm-comp .kamba-note { background: rgba(110,145,96,.14); border-color: rgba(110,145,96,.4); }
html.dark-mode .rm-comp .kamba-note p { color: #d3e2cc; } html.dark-mode .rm-comp .kamba-label { color: #a9cf86; }
html.dark-mode .rm-key-gold, html.dark-mode .rm-key-green, html.dark-mode .rm-key-verse, html.dark-mode .rm-comp .topic-tag { background: var(--bg-surface); }
.rm-comp .verse-card { border: 1px solid var(--border); border-left: 4px solid var(--rm-plum); border-radius: 14px; padding: 18px 20px; margin: 16px 0; background: var(--bg-card); }
.rm-comp .verse-ref { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); margin-bottom: 10px; display: block; }
.rm-comp .verse-dev { font-family: 'Noto Serif Devanagari', serif; font-size: 1.18rem; line-height: 1.95; color: var(--text); margin-bottom: 8px; }
.rm-comp .verse-iast { font-style: italic; color: var(--text-muted); line-height: 1.75; margin-bottom: 14px; }
.rm-comp .word-meanings { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); gap: 6px 20px; margin-bottom: 14px; padding: 12px 14px; background: var(--bg-surface); border-radius: 10px; }
.rm-comp .word-meanings div { font-size: .85rem; color: var(--text-muted); }
.rm-comp .word-meanings b { color: var(--rm-q); font-style: italic; font-weight: 600; }
.rm-comp .verse-expl { color: var(--text-muted); line-height: 1.75; }
.rm-comp .guna-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 8px; margin: 14px 0; }
.rm-comp .guna-item { background: var(--bg-surface); border-radius: 10px; padding: 11px 13px; font-size: .86rem; color: var(--text-muted); }
.rm-comp .guna-item b { font-family: var(--font-heading); font-style: italic; color: var(--text); display: block; }
.rm-comp .roles-table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: .9rem; }
.rm-comp .roles-table th, .rm-comp .roles-table td { text-align: left; padding: 11px 13px; border-bottom: 1px solid var(--border-light); vertical-align: top; color: var(--text-muted); line-height: 1.65; }
.rm-comp .roles-table th { font-family: var(--font-heading); font-style: italic; color: var(--text); width: 170px; }
@media (max-width: 700px) { .rm-comp .roles-table th, .rm-comp .roles-table td { display: block; width: auto; } .rm-comp .roles-table th { border: 0; padding-bottom: 0; } .rm-comp .topic-tags { display: none; } }
.rm-comp .rm-ct-body, .rm-cindex { overflow-wrap: anywhere; }
/* overview: the companion index */
.rm-cindex { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 10px 18px; }
.rm-cgrp ul { margin: 0; padding-left: 18px; font-size: .9rem; line-height: 1.6; }
.rm-cgrp a { color: var(--text); }
.rm-gold { color: #C9A227; font-size: .8rem; } .rm-green { color: #6E9160; font-size: .68rem; font-weight: 700; border: 1px solid currentColor; border-radius: 4px; padding: 0 3px; }
.rm-comp-note p { font-size: .9rem; color: var(--text-muted); }
.rm-yvbox { border-left: 4px solid var(--rm-q); } .rm-yvbox ul { margin: 0; padding-left: 20px; line-height: 1.8; } .rm-yvbox a { color: var(--rm-q); }
