/* lulla.net polish, 2026-09-24 (review tasks 12, 22, 23). New filename on purpose:
   the CDN caches theme CSS for a year, so edits in place never reach readers. */

/* 22. Never track Devanagari. Letter-spacing breaks the shirorekha into separate
   letters, and negative tracking collides matras. Triple attribute beats the
   !important heading rules in lulla-skin.css. */
html[lang^="hi"][lang^="hi"][lang^="hi"] body *:not(code):not(pre):not(kbd){letter-spacing:normal!important}

/* 23. Hub heroes: reserve the 340px box before the image arrives (cold-load CLS
   was 0.96 to 1.04 on the Ramayana, Vishnu Purana and Yoga Vasistha hubs). */
.entry-content figure>img[style*="max-height:340px"]{height:340px}

/* 12. Search results page */
.lv-sr{max-width:780px;margin:0 auto;padding:0 1rem 3.5rem}
.lv-sr__form{display:flex;gap:.6rem;margin:0 0 1.4rem}
.lv-sr__input{flex:1;min-width:0;font:inherit;font-size:1.08rem;line-height:1.4;padding:.75rem 1rem;border:1px solid var(--lv-line-strong,var(--lv-line,#D8CFBF));border-radius:999px;background:var(--lv-bg-card,#fff);color:var(--lv-ink,inherit);-webkit-appearance:none;appearance:none}
.lv-sr__input:focus{outline:3px solid color-mix(in srgb,var(--lv-accent,#A05C0C) 45%,transparent);outline-offset:1px;border-color:var(--lv-accent,#A05C0C)}
.lv-sr__btn{font:inherit;font-weight:600;padding:.75rem 1.35rem;border-radius:999px;border:0;background:var(--lv-accent-deep,#8B1A1A);color:var(--lv-bg,#fff);cursor:pointer;min-height:44px}
.lv-sr__btn:hover{filter:brightness(1.08)}
.lv-sr__hint,.lv-sr__count{color:var(--lv-ink-soft,#5A4F45);font-size:.95rem;margin:.2rem 0 1rem}
.lv-sr__list{list-style:none;margin:0;padding:0;border-top:1px solid var(--lv-line,#E2D9C8)}
.lv-sr__list>li{list-style:none;margin:0}
.lv-sr__row{border-bottom:1px solid var(--lv-line,#E2D9C8)}
.lv-sr__link{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.25rem 1rem;align-items:baseline;padding:1rem .25rem;text-decoration:none!important;color:inherit}
.lv-sr__link:hover{background:color-mix(in srgb,var(--lv-accent,#A05C0C) 6%,transparent)}
.lv-sr__title{grid-column:1;font-weight:650;font-size:1.08rem;line-height:1.45;color:var(--lv-ink,inherit)}
.lv-sr__link:hover .lv-sr__title,.lv-sr__link:focus-visible .lv-sr__title{text-decoration:underline;text-underline-offset:.2em}
.lv-sr__chip{grid-column:2;grid-row:1;justify-self:end;font-family:var(--lv-font-ui,inherit);font-size:.78rem;line-height:1.5;padding:.1rem .6rem;border-radius:999px;border:1px solid var(--lv-line-strong,var(--lv-line,#D8CFBF));color:var(--lv-ink-soft,#5A4F45);white-space:nowrap}
.lv-sr__snip{grid-column:1/-1;display:block;font-size:.93rem;color:var(--lv-ink-soft,#5A4F45);line-height:1.6}
.lv-sr mark{background:color-mix(in srgb,var(--lv-accent,#A05C0C) 22%,transparent);color:inherit;padding:0 .12em;border-radius:3px}
.lv-sr__other{font-family:var(--lv-font-ui,inherit);font-size:.82rem;color:var(--lv-ink-soft,#5A4F45);margin:2rem 0 .5rem}
.lv-sr__foot{margin-top:1.8rem;text-align:center}
@media (max-width:560px){.lv-sr__link{grid-template-columns:1fr}.lv-sr__chip{grid-column:1;grid-row:auto;justify-self:start}}

/* Phase 4 A part 2 (2026-09-26): space reserved for the guided hub section until the core bundle swaps
   it in (theme inc/stable-hub.php sets --lv-reserve per hub and language). Collapses after six seconds if
   the script never runs. Desktop only: on narrow screens the section lands below the fold. */
@media (min-width: 1100px) {
  .lv-guided-hub-reserve { min-height: var(--lv-reserve, 0px); animation: lv-reserve-release 0s linear 6s forwards; }
}
@keyframes lv-reserve-release { to { min-height: 0; } }

/* Phase 5 T34 (2026-09-26): the corpus eyebrow above hub titles ("भागवतम् और पुराण") broke one word per
   line: the link is an inline-grid whose first column (36px) was sized for the sigil icon, which
   lib-design hides, so the text landed in it. With icon and subtitle hidden it needs no grid. */
.lib-design .lv-corpus-signature { display: inline-block !important; max-width: 100%; }
/* In a constrained layout group an inline-level eyebrow ignores the auto margins and sits at the group's
   edge (Sukhmani hub: x=50 while its title starts at 390). An explicit left margin puts it on the title's
   column; display is left alone so the rules that hide the eyebrow still win. */
.is-layout-constrained:not(.lib-page-host) > .lv-corpus-signature { margin-left: max(0px, calc((100% - var(--wp--style--global--content-size, 650px)) / 2)) !important; }

/* Phase 4 B part 2 (2026-09-26): the template title on pages whose own styled header carries the title
   (theme inc/title-dedupe.php) stays in the DOM for the scripts but is visually hidden. */
.lv-title-duplicate { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; clip-path: inset(50%) !important; white-space: nowrap !important; margin: 0 !important; padding: 0 !important; border: 0 !important; }

/* Phase 5 T36: stop point between sittings on the long readers (inc/sittings.php). */
.lv-sitting-stop { max-width: 36rem; margin: 3.25rem auto 2.5rem; padding-top: 1rem; border-top: 1px solid var(--lv-line); text-align: center; font: 400 .95rem/1.7 var(--lv-font-ui, system-ui, sans-serif); color: var(--lv-ink-soft); }
.lv-sitting-stop__k { display: block; margin-bottom: .2rem; font-weight: 700; color: var(--lv-accent-deep, #8B1A1A); }

/* Glossary in its final shape from first paint (theme/inc/stable-hub.php): until uplift lookup() marks the
   glossary with data-uplift, hide what it folds or moves and reserve the search form plus the folded intro
   (tuned 2026-09-27 with the server breadcrumb, tools row and TOC in place: Hindi 277 / English 299 at desktop, 265 / 253 at phone width). */
html.lvjs [data-lulla-paired-visual="glossary"]:has(~ :is(.glossary, .englossary):not([data-uplift])) { display: none !important; }
html.lvjs :is(.glossary, .englossary):not([data-uplift]) > :is(.hero, .intro-block) { display: none !important; }
html.lvjs :is(.glossary, .englossary):not([data-uplift])::before { content: ""; display: block; height: 277px; animation: lv-gloss-release 0s linear 6s forwards; }
@keyframes lv-gloss-release { to { height: 0; } }
html.lvjs .englossary:not([data-uplift])::before { height: 299px; }
@media (max-width: 700px) {
  html.lvjs :is(.glossary, .englossary):not([data-uplift])::before { height: 265px; }
  html.lvjs .englossary:not([data-uplift])::before { height: 253px; }
}

/* Editorial pages (Foundations, character pages): the tools row ends 56px tall once the reader-settings
   button moves into its slot; reserve that from first paint (was 48, a 4px shift of the whole page). */
@media (min-width: 901px) { body .lib-editorial-tools { min-height: 56px; } }

/* Game pages: the loading line held 540px, then each game rendered at its own height and the footer moved
   (desktop CLS ~0.1). Reserve each game's first-screen height instead (measured 2026-09-27 at 1280 to 1440). */
@media (min-width: 901px) {
  body.lib-play .play-game .play-loading { min-height: 0; padding: 32px 16px; }
  #sabd-kosh-quiz-root { min-height: 395px; } #cross-text-bridge-root { min-height: 739px; }
  #identify-story-root { min-height: 596px; } #who-said-it-root { min-height: 593px; } #believe-it-or-not-root { min-height: 596px; }
  html[lang^="en"] #sabd-kosh-quiz-root { min-height: 688px; } html[lang^="en"] #cross-text-bridge-root { min-height: 661px; }
  html[lang^="en"] #identify-story-root { min-height: 723px; } html[lang^="en"] #who-said-it-root { min-height: 688px; }
  html[lang^="en"] #believe-it-or-not-root { min-height: 688px; }
}
/* Readers: the tools row ends 56px tall once the settings button moves in (48 before). */
@media (min-width: 901px) { body .lv-reader-tools { min-height: 56px; } }

/* Phase 6 f: IAST of the prose order under the Devanagari anvaya on English Gita chapters (inc/gita-apparatus.php). */
.lv-shlok p.lv-shlok__anvaya-iast { margin: 0 0 .5rem 1.8rem; font-style: italic; font-size: .92rem !important; line-height: 1.6 !important; color: var(--lv-ink-soft); }
@media (max-width: 600px) { .lv-shlok p.lv-shlok__anvaya-iast { margin-left: 0; } }

/* 2026-09-28 glossary unit: the server's where-it-appears line under each gloss (inc/glossary.php). On the Hindi
   page the row is a two-column grid (word | gloss), so the line sits under the gloss; one column on phones. */
.glossary .grow > .lv-term-line { grid-column: 2; }
:is(.glossary, .englossary) .grow > .lv-term-line { margin: .2rem 0 0 !important; font-size: .8rem; line-height: 1.55; color: var(--lv-ink-soft); }
.glossary .grow:has(> .lv-term-line) { row-gap: .15rem; }
.lv-term-line__k { margin-right: .35rem; }
.lv-term-line a:not(:last-child) { margin-right: 1.1em; }   /* the gap separates the links; " · " sits inside titles */
.lv-term-line a { color: inherit; text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 45%, transparent); text-underline-offset: .18em; }
.lv-term-line a:hover, .lv-term-line a:focus-visible { color: var(--lv-accent-deep); text-decoration-color: currentColor; }
.uplift-glossary-results .grow > .lv-term-line { grid-column: auto; }
.grow[id] { scroll-margin-top: 6rem; }
.grow:target { background: color-mix(in srgb, var(--lv-accent) 9%, transparent); }
@media (max-width: 640px) { .glossary .grow > .lv-term-line { grid-column: 1; } }

/* 2026-09-28 plan 6b: the same episode in other texts (inc/also-told.php), at the foot of the reading. */
.lv-also-told { margin: 2.4rem 0 1.2rem; padding: 1.1rem 1.2rem; border: 1px solid var(--lv-line); border-radius: var(--lv-radius, 6px); background: var(--lv-bg-card); }
.lv-also-told .lv-also-told__k { margin: 0 0 .6rem !important; font-family: var(--lv-font-prose); font-weight: 700; font-size: 1.05rem !important; color: var(--lv-accent-text); }
.lv-also-told ul { list-style: none; margin: 0; padding: 0; }
.lv-also-told li { margin: 0 0 .55rem; line-height: 1.6; font-size: .95rem; }
.lv-also-told li:last-child { margin-bottom: 0; }
.lv-also-told__ep { font-weight: 600; color: var(--lv-ink); margin-right: .45rem; }
.lv-also-told__ep::after { content: ":"; }
.lv-also-told a { color: var(--lv-accent-text); text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: .18em; }
.lv-also-told a:not(:last-of-type) { margin-right: 1.1em; }
.lv-also-told__differ { display: block; color: var(--lv-ink-soft); font-size: .88rem; margin-top: .15rem; }

/* 2026-09-28 plan 6c: the character pages' apparatus (inc/patra.php). */
.lv-appear { margin: 2.4rem 0 1.4rem; padding: 1.1rem 1.2rem; border: 1px solid var(--lv-line); border-radius: var(--lv-radius, 6px); background: var(--lv-bg-card); }
.lv-appear .lv-appear__k { margin: 0 0 .25rem !important; font-family: var(--lv-font-prose); font-weight: 700; font-size: 1.05rem !important; color: var(--lv-accent-text); }
.lv-appear .lv-appear__note { margin: 0 0 .8rem !important; font-size: .82rem !important; color: var(--lv-ink-soft); line-height: 1.55; }
.lv-appear ul { list-style: none; margin: 0; padding: 0; }
.lv-appear li { margin: 0 0 .55rem; line-height: 1.6; font-size: .95rem; }
.lv-appear li:last-child { margin-bottom: 0; }
.lv-appear__text { font-weight: 600; color: var(--lv-ink); margin-right: .4rem; }
.lv-appear__n { font-size: .8rem; color: var(--lv-ink-soft); margin-right: .6rem; font-variant-numeric: tabular-nums; }
.lv-appear__n::before { content: "("; } .lv-appear__n::after { content: ")"; }
.lv-appear a { color: var(--lv-accent-text); text-decoration: underline; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); text-underline-offset: .18em; }
.lv-appear a:not(:last-child) { margin-right: 1.1em; }
.lv-vamsha { margin: 1.6rem 0 2rem; padding: .8rem; border: 1px solid var(--lv-line); border-radius: var(--lv-radius, 6px); background: var(--lv-bg-card); overflow-x: auto; }
.lv-vamsha svg { min-width: 640px; }
@media (max-width: 700px) { .lv-vamsha svg { min-width: 1000px; } }
.lv-vamsha figcaption { margin-top: .6rem; font-size: .85rem; color: var(--lv-ink-soft); line-height: 1.55; }
.lv-vamsha figcaption a { color: var(--lv-accent-text); }
/* plan 6h: the English equivalent under a Hindi term (inc/glossary.php, once theme/data/glossary-en-equiv.json exists) */
.glossary .grow > .gen { display: block; font-size: .8rem; line-height: 1.45; color: var(--lv-ink-soft); font-style: italic; }
@media (min-width: 641px) {
  .glossary .grow:has(> .gen) > .gw { grid-column: 1; grid-row: 1; }
  .glossary .grow:has(> .gen) > .gen { grid-column: 1; grid-row: 2; }
  .glossary .grow:has(> .gen) > .gg { grid-column: 2; grid-row: 1; }
  .glossary .grow:has(> .gen) > .lv-term-line { grid-column: 2; grid-row: 2; }
}
