/* =====================================================================
   Sanskrit Everywhere — the free resource pages
   The watermark + the reading pages' scope (the frame comes from the
   site's own style.css).
   ===================================================================== */

/* the reading pages sit on white, like the sheets */
body.resource-page { background: #ffffff; }

/* ---------- the watermark ----------
   ONLY on the śloka reading pages (the verse companion pages) — the user's
   correction, 2026-10-11 (`raw_prompts.md` #1065): the generators used to
   carry it on every free page (the hub · the work homes · the T-shirts page ·
   the lessons) — legacy, now removed there.  On the śloka pages it stays,
   a touch lighter (0.06) so the reading stays comfortable.  Centred in the
   middle of the page — not too big, not too small; it stays softly centred
   while the page scrolls. */
.wm {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.wm img {
  width: clamp(190px, 33vw, 420px);
  height: auto;
  opacity: 0.06;
}

/* the sheet content sits above the watermark; the frame above it all */
#sheetpage { position: relative; z-index: 1; }
.resource-page .site-footer { position: relative; z-index: 2; }

/* ---------- copy protection (the reading content) ----------
   The free pages are for reading, not for copying away: the reading content
   is not selectable (so a plain Ctrl+A / Ctrl+C takes nothing), the context
   menu is closed on it (links and controls excepted — see site.js), and
   images cannot be dragged out.  If anything is still copied (a reader mode,
   an extension), site.js keeps the source attached to the clipboard.
   Honest limit (recorded — docs/09 §4D.17): no web format is un-copyable;
   this deters casual copying, nothing more. */
#sheetpage, .lesson {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
#sheetpage input, #sheetpage textarea, .lesson input, .lesson textarea {
  -webkit-user-select: text;
  user-select: text;
}

/* ---------- the companion menu (the sticky companion bar) ----------
   Generated by build_resources.py: the work + verse, the section chips
   (scrollspy-highlighted), the verse navigation, the text-size control
   (it drives the sheet's own A−/A+ engine) and the language chooser
   (English live; Kannada is prepared and switches on with its content).
   Sticky under the site header on desktop; on small screens it scrolls
   away — the sheet's own floating controls carry the in-page navigation. */
.cbar {
  position: relative; z-index: 45;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
@media (min-width: 901px) {
  .cbar { position: sticky; top: var(--hdr, 112px); }
}
.cbar-inner {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 6px 14px; padding: 7px 0; min-height: 52px;
}
.cbar a { text-decoration: none; }
.cbar-work { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.cbar-work .cw-home {
  color: var(--green-700); font-weight: 700; font-size: 1.1rem;
  padding: 4px 8px; border-radius: 8px;
}
.cbar-work .cw-home:hover { background: var(--green-050); }
.cw-deva {
  font-family: var(--font-dv); font-weight: 600; color: var(--green-700);
  font-size: 1.1rem; white-space: nowrap;
}
.cw-meta { color: var(--muted); font-size: 1rem; white-space: nowrap; }
.cbar-sections {
  display: flex; align-items: center; gap: 4px;
  overflow-x: auto; scrollbar-width: none;
  order: 9; flex: 1 1 100%; min-width: 0;
}
.cbar-sections::-webkit-scrollbar { display: none; }
.cbar-sections.is-scroll {
  mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent);
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent);
}
.cbar-sections a {
  white-space: nowrap; font-size: 1rem; font-weight: 600;
  color: var(--green-900); background: #fff;
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line);
}
.cbar-sections a:hover { background: var(--green-050); border-color: var(--green-100); }
.cbar-sections a.on { background: var(--green-700); border-color: var(--green-700); color: #fff; }
.cbar-verses { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.cbar-verses .cv-arrow {
  color: var(--green-700); font-weight: 700; font-size: 1.05rem;
  padding: 6px 10px; border-radius: 8px;
}
.cbar-verses .cv-arrow:hover { background: var(--green-050); }
.cbar-verses .cv-arrow.off { color: #b6c2b8; pointer-events: none; }
.cbar-verses .cv-now { color: var(--muted); font-size: 1rem; font-weight: 600; }
.cbar-verses .cv-pdf {
  font-size: 0.95rem; font-weight: 700; color: var(--green-700);
  padding: 7px 10px; border-radius: 8px; white-space: nowrap;
}
.cbar-verses .cv-pdf:hover { background: var(--green-050); }
.cv-select {
  font-family: var(--font-latin); font-size: 1rem; font-weight: 600;
  color: var(--green-900); background: #fff; cursor: pointer;
  padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line-strong);
}
.cbar-font {
  display: flex; align-items: center; gap: 2px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff; padding: 2px;
}
.cbar-font button {
  border: none; background: transparent; color: var(--green-900);
  font-family: var(--font-latin); font-size: 0.95rem; font-weight: 700;
  padding: 6px 9px; border-radius: 999px; cursor: pointer;
}
.cbar-font button:hover { background: var(--green-050); }
.cbar-font .cf-pct { min-width: 44px; text-align: center; font-size: 0.85rem; font-weight: 700; color: var(--muted); }
.cbar-lang { display: flex; align-items: center; gap: 4px; }
.cbar-lang button, .cbar-lang a {
  font-family: var(--font-latin); font-size: 0.95rem; font-weight: 600;
  color: var(--green-900); background: #fff; cursor: pointer;
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line);
  text-decoration: none;
}
.cbar-lang a:hover { background: var(--green-050); border-color: var(--green-100); }
.cbar-lang button.on { background: var(--green-700); border-color: var(--green-700); color: #fff; }
.cbar-lang button[disabled] { color: #9aa79c; border-style: dashed; cursor: default; }
.cbar-lang .soon {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted); margin-left: 5px;
}
.cbar-lang .lg-short { display: none; }
@media (max-width: 900px) {
  .cw-deva { display: none; }
}
@media (max-width: 640px) {
  .cbar-lang .lg-full { display: none; }
  .cbar-lang .lg-short { display: inline; }
  .cbar-lang .soon { display: none; }
  .cbar-font .cf-pct { min-width: 38px; }
}
@media print { .cbar { display: none !important; } }

/* ---------- the top band: where you are ----------
   Every companion page opens with the path back: the hub (choose another
   grantha) › the work home (all its verses + PDFs) › this page. */
.crumb-band {
  background: linear-gradient(180deg, #f3ecd8 0%, #eee3c8 100%);
  border-bottom: 1px solid var(--line);
}
.crumb-inner {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  padding: 10px 0; font-size: 1rem;
}
.cb-link { color: var(--green-800); text-decoration: none; font-weight: 600; }
.cb-link:hover { text-decoration: underline; }
.cb-sep { color: var(--gold-600); font-weight: 700; }
.cb-now { color: var(--muted); }
.cb-sub { color: var(--muted); font-weight: 400; }

/* ---------- the grantha hub (works with any number of works) ---------- */
.hub-count { margin: 12px 0 0; color: var(--green-800); font-weight: 700; }
.whub-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  margin: 0 0 24px;
}
.whub-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.wchip {
  font-family: var(--font-latin); font-size: 0.98rem; font-weight: 600;
  color: var(--green-900); background: #fffdf4; cursor: pointer;
  padding: 8px 15px; border-radius: 999px; border: 1px solid var(--line-strong);
}
.wchip:hover { border-color: var(--gold-600); color: var(--gold); }
.wchip.on { background: var(--green-700); border-color: var(--green-700); color: #fff; }
.whub-search {
  margin-left: auto; min-width: 220px; flex: 0 1 280px;
  font: inherit; color: inherit; background: #fffdf4;
  padding: 9px 16px; border: 1px solid var(--line-strong); border-radius: 999px;
}
.wgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 18px; }
.wcard {
  display: flex; flex-direction: column; gap: 10px;
  background: linear-gradient(180deg, #fffdf4 0%, #f7efd9 100%);
  border: 1px solid var(--line); border-top: 4px solid var(--gold-600);
  border-radius: 16px; padding: 22px 22px 20px;
  box-shadow: var(--shadow-soft);
}
.wcard[hidden] { display: none; }
.wcard:nth-child(4n+1) { border-top-color: var(--green-600); }
.wcard:nth-child(4n+2) { border-top-color: var(--gold-600); }
.wcard:nth-child(4n+3) { border-top-color: var(--clay); }
.wcard:nth-child(4n+4) { border-top-color: var(--green-800); }
.wc-deva { font-family: var(--font-dv); font-size: 1.4rem; font-weight: 600; color: var(--green-700); margin: 0 0 2px; }
.wcard h3 { margin: 0; font-size: 1.22rem; }
.wc-blurb { margin: 0; font-size: 1.05rem; color: var(--body); }
.wc-meta { margin: 0; font-size: 0.95rem; color: var(--muted); font-weight: 700; }
.wc-note { margin: 0; font-size: 0.98rem; color: var(--gold); }
.wc-links { margin-top: auto; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding-top: 8px; }
.whub-empty { margin: 10px 0 0; color: var(--muted); }
@media (max-width: 620px) {
  .whub-search { margin-left: 0; width: 100%; }
  .wgrid { grid-template-columns: 1fr; }
}

/* ★ The grantha groups + the reading order (the user's, 2026-10-13 —
   raw_prompts.md #1281): one tab per grantha; its pieces in reading order,
   the step badge carrying the number (the two māhātmyam readings share it). */
.wgroup { margin: 0 0 36px; }
.wgroup[hidden] { display: none; }
.wgroup:last-of-type { margin-bottom: 0; }
.wg-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 16px; }
.wg-head h2 { margin: 0; font-size: 1.5rem; color: var(--green-800); }
.wg-deva { margin: 0; font-family: var(--font-dv); font-size: 1.35rem; font-weight: 600; color: var(--green-700); }
.wg-order { margin: 0 0 0 auto; color: var(--gold); font-weight: 700; font-size: 0.98rem; }
.wc-head { display: flex; gap: 12px; align-items: flex-start; }
.wc-head-txt { min-width: 0; }
.wc-step {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 34px; padding: 0 4px; border-radius: 999px;
  background: var(--green-700); color: #fff; font-family: var(--font-latin); font-weight: 700;
}
.wc-part { margin: 2px 0 0; font-weight: 700; color: var(--green-800); }
.wcard.soon { border-top-color: var(--line-strong); }
.wcard.soon .wc-deva, .wcard.soon h3 { color: var(--muted); }
.wcard.soon .wc-step { background: var(--line-strong); }

/* the "read in this order" strip on a multi-piece grantha's piece homes */
.horder { margin: 22px auto 0; max-width: 920px; text-align: center; }
.ho-title { margin: 0 0 10px; color: var(--green-800); font-weight: 700; }
.ho-title .dv { font-family: var(--font-dv); }
.ho-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.ho-link {
  display: inline-flex; align-items: baseline; gap: 6px;
  text-decoration: none; font-weight: 600; color: var(--green-900);
  background: #fffdf4; border: 1px solid var(--line-strong);
  border-radius: 999px; padding: 7px 14px; font-family: var(--font-dv);
}
.ho-link:hover { border-color: var(--gold-600); color: var(--gold); }
.ho-link.on { background: var(--green-700); border-color: var(--green-700); color: #fff; }
.ho-link.off { color: #9aa79c; border-style: dashed; }
.ho-link .ho-n { font-family: var(--font-latin); font-weight: 700; font-size: 0.85rem; opacity: 0.85; }
.ho-link .ho-soon {
  font-family: var(--font-latin); font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.06em; opacity: 0.75;
}

/* ---------- the grantha switcher & the course pill (cbar) ----------
   The switcher lets a reader move freely between the works from any
   companion page.  The course pill stays hidden until the work's product
   is in products.js with its purchase link (site.js reveals it). */
.cbar-works { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; }
.cw-label { color: var(--muted); font-size: 0.95rem; font-weight: 600; margin-right: 2px; }
.cw-label2 { margin-left: 6px; }
.cw-select {
  font-family: var(--font-latin); font-size: 1rem; font-weight: 600;
  color: var(--green-900); background: #fffdf4; cursor: pointer;
  padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line-strong);
  max-width: 220px;
}
.cw-select2 { max-width: 320px; }
@media (max-width: 720px) {
  /* the two-level switcher takes its own row on phones; the visible labels
     fold away (the selects carry aria-labels) and share the width */
  .cbar-works { flex: 1 1 100%; }
  .cw-label { display: none; }
  .cw-select { flex: 1 1 auto; min-width: 0; max-width: none; }
}
.cbar-buy {
  font-family: var(--font-latin); font-size: 0.95rem; font-weight: 700;
  color: #fff; background: var(--gold-600); white-space: nowrap;
  padding: 8px 14px; border-radius: 999px;
}
.cbar-buy:hover { background: var(--gold-400); }

/* ---------- the cross-work strip (every companion page) ---------- */
.more-works {
  margin: 46px 0 8px; padding: 24px 26px;
  background: linear-gradient(180deg, #fffdf4 0%, #f7efd9 100%);
  border: 1px solid var(--line); border-top: 4px solid var(--green-600);
  border-radius: 16px;
}
.mw-title { margin: 0 0 12px; font-weight: 700; color: var(--green-800); font-size: 1.1rem; }
.mw-links { display: flex; flex-wrap: wrap; gap: 10px; }
.mw-link {
  text-decoration: none; font-weight: 600; color: var(--green-900);
  background: #fffdf4; border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 9px 16px; font-family: var(--font-dv);
}
.mw-link .mw-en { font-family: var(--font-latin); }
.mw-link:hover { border-color: var(--gold-600); color: var(--gold); }
.mw-link.on { background: var(--green-700); border-color: var(--green-700); color: #fff; }
.mw-note { margin: 14px 0 0; font-size: 1.04rem; }

/* ---------- the course slot (invisible until the product is on sale) ---------- */
.buy-slot {
  margin: 18px 0 8px; padding: 26px 26px 28px; text-align: center;
  background: linear-gradient(180deg, #164327 0%, #0d2f1a 100%);
  border-top: 3px solid var(--gold-600); border-radius: 16px;
}
.bs-title { margin: 0 0 4px; color: #f7f0dc; font-family: var(--font-serif); font-weight: 700; font-size: 1.22rem; }
.bs-line { margin: 0 auto 16px; color: #c3d4ba; max-width: 46em; }

/* section anchors land below the sticky header + the companion menu */
#sheetpage h2 { scroll-margin-top: calc(var(--hdr, 112px) + var(--cbar, 56px) + 10px); }

/* ---------- the per-work grantha home (every śloka + its PDF) ---------- */
.work-deva {
  font-family: var(--font-dv); font-size: 1.5rem; font-weight: 600;
  color: var(--green-700); margin: -2px 0 12px;
}
.workhome { display: flex; flex-direction: column; gap: 16px; max-width: 880px; }
.vcard {
  display: flex; align-items: center; justify-content: space-between; gap: 14px 18px;
  flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 22px 26px; box-shadow: var(--shadow-soft);
}
/* ★ The action-row rule (the user's, 2026-10-13): a long verse name never
   pushes the row's buttons onto a second line — the name column takes the
   free space and wraps inside; the actions keep their place. */
.vcard-info { flex: 1 1 0; min-width: 0; }
.vcard-num {
  display: block; font-size: 1.05rem; font-weight: 700; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--green-700);
}
.vcard-name { display: block; font-size: 1.6rem; font-weight: 700; color: var(--ink); }
.vcard-links { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.vcard-links .btn { padding: 13px 24px; font-size: 1.12rem; font-weight: 700; }
/* phones (≤620): the actions may drop below the name — full-width, never split */
@media (max-width: 620px) { .vcard-info { flex: 1 1 auto; } }

/* the work-home LANGUAGE SELECTOR (Stage 8): pick a language; every śloka row
   then carries that language's number, short description and HTML/PDF slots —
   unbuilt editions and the Kannada PDFs show the honest "coming" state */
.lhome-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 2px 0 6px;
}
.lhome-label {
  font-size: 1.05rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--green-700); margin-right: 4px;
}
.lhome-btn {
  font: inherit; font-weight: 700; font-size: 1.3rem; cursor: pointer;
  background: var(--card); border: 1.5px solid var(--line);
  border-radius: 999px; padding: 10px 22px; color: var(--ink);
}
.lhome-btn:hover { border-color: var(--gold-600); }
.lhome-btn.on { background: var(--green-700); border-color: var(--green-700); color: #fff; }
.vcard-links .btn-off {
  background: transparent; border: 1.5px dashed var(--line); color: #7b756a;
  cursor: default; pointer-events: none;
}

/* ---------- the resources home ---------- */
.res-work {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-soft);
}
.res-title { margin: 0 0 8px; }
.res-title .rt-deva {
  display: block;
  font-size: 1.45rem;
  color: var(--green-700);
  font-weight: 600;
  line-height: 1.65;
}
.res-title .rt-en {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.3;
}
.res-work > p { color: var(--muted); margin: 0 0 4px; }
.res-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.res-link {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.res-link:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lift);
  border-color: #cfe0d2;
  background: #fff;
}
.res-link .rl-num {
  font-weight: 700;
  color: var(--green-700);
  font-size: 0.95rem;
  white-space: nowrap;
}
.res-link .rl-name { color: var(--body); font-size: 1rem; }
.res-link .rl-note { display: block; font-size: 0.92rem; color: var(--muted); font-weight: 400; }
.res-sub {
  font-family: var(--font-latin);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  margin: 22px 0 2px;
}
.res-work { scroll-margin-top: 146px; }

/* the taller header on small screens pushes anchors down */
@media (max-width: 620px) {
  #sheetpage h2 { scroll-margin-top: calc(var(--hdr, 112px) + 10px); }
  .res-work { scroll-margin-top: 162px; }
  .lesson h2 { scroll-margin-top: 164px; }
}

/* ---------- the pre-requisites chapter list on the resources home ---------- */
.res-chapters { margin: 16px 0 2px; padding: 0; list-style: none; counter-reset: chap; }
.res-chapters li {
  position: relative; padding: 9px 0 9px 42px; border-bottom: 1px dashed var(--line);
  color: var(--body); font-size: 1.03rem; counter-increment: chap;
}
.res-chapters li:last-child { border-bottom: none; }
.res-chapters li::before {
  content: counter(chap); position: absolute; left: 0; top: 10px;
  width: 26px; height: 26px; line-height: 26px; text-align: center; border-radius: 50%;
  background: var(--green-050); color: var(--green-700); font-weight: 700; font-size: 0.9rem;
}
.res-chapters li a { font-weight: 600; }
.res-chapters li .ch-soon { color: var(--muted); }

/* ---------- the authored lesson chapters (mobile-first type) ---------- */
.lesson { max-width: 920px; margin: 0 auto; padding: 36px 0 64px; position: relative; z-index: 1; }
.lesson .lvl {
  font-size: 0.98rem; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--green-700); font-weight: 700;
}
.lesson h1 { font-size: clamp(2.2rem, 4vw, 3rem); margin: 8px 0 6px; }
.lesson .lede { color: var(--muted); font-size: 1.3rem; margin: 0 0 10px; }
.lesson h2 {
  font-size: 1.78rem; margin: 52px 0 14px; padding-bottom: 6px;
  border-bottom: 1px solid var(--line); scroll-margin-top: 148px;
}
.lesson p, .lesson li { font-size: 1.3rem; line-height: 1.9; }
.lesson table { width: 100%; border-collapse: collapse; margin: 18px 0 22px; font-size: 1.2rem; }
/* every table sits in its own scroll box — a wide table scrolls inside it and
   never pushes the page sideways (the readability standard) */
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 18px 0 22px; }
.tablewrap table { margin: 0; }
.lesson th, .lesson td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; vertical-align: top; }
.lesson th { background: var(--green-050); color: var(--ink); font-weight: 700; }
.lesson tr:nth-child(even) td { background: #fbfdfb; }
.lesson blockquote {
  margin: 20px 0; padding: 14px 22px; border-left: 4px solid var(--green-700);
  background: var(--green-050); border-radius: 0 10px 10px 0; color: var(--body);
}
.lesson blockquote p { margin: 0; font-size: 1.3rem; }
.lesson details {
  border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px;
  margin: 14px 0; background: #fff;
}
.lesson summary { cursor: pointer; font-weight: 600; color: var(--green-900); font-size: 1.24rem; }
.lesson details p { margin: 12px 0 2px; font-size: 1.22rem; }
.los {
  background: var(--green-050); border: 1px solid var(--green-100);
  border-radius: 14px; padding: 22px 26px; margin: 24px 0 30px;
}
.los p { margin: 0 0 8px; font-weight: 700; color: var(--green-900); font-size: 1.3rem; }
.los ul { margin: 0; padding-left: 22px; }
.los li { margin: 6px 0; font-size: 1.26rem; }
.takeaway {
  margin: 16px 0 0; padding: 12px 18px; border-left: 4px solid var(--green-600);
  background: #f2f8f2; border-radius: 0 10px 10px 0; color: var(--ink); font-size: 1.24rem;
}
.takeaway strong { color: var(--green-700); }
.lesson-nav {
  display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap;
  margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--line);
}
.lesson-nav a, .lesson-nav .off {
  padding: 10px 20px; border-radius: 999px; font-size: 1.09rem; font-weight: 600;
  text-decoration: none;
}
.lesson-nav a { background: var(--green-050); color: var(--green-700); }
.lesson-nav a:hover { background: var(--green-100); }
.lesson-nav .off { color: #6e7f73; }

/* links inside the lesson prose are underlined — colour alone must not be the
   only signal (WCAG 1.4.1); the nav / format controls keep their clean look */
.lesson p a, .lesson li a, .lesson blockquote a, .lesson details a {
  text-decoration: underline; text-underline-offset: 2px;
}
.lesson .topic-nav a, .lesson .lesson-nav a, .lesson .fmtbar a { text-decoration: none; }
.path-line {
  text-align: center; color: var(--muted); font-size: 1.05rem; margin: 14px 0 0;
}

/* ---------- the topic navigation inside a chapter ---------- */
.topic-nav {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 18px 24px; margin: 22px 0 32px;
}
.topic-nav .tn-title {
  margin: 0 0 10px; font-weight: 700; color: var(--ink); font-size: 1.18rem;
  font-family: var(--font-latin);
}
.topic-nav ol { margin: 0; padding-left: 0; list-style: none; }
.topic-nav li { margin: 6px 0; font-size: 1.16rem; }
.topic-nav li::before { content: "›"; color: var(--green-700); font-weight: 700; margin-right: 8px; }
.topic-nav a { text-decoration: none; }
.topic-nav a:hover { text-decoration: underline; }
.topic-next { margin: 14px 0 0; text-align: right; }
.topic-next a { font-size: 1.12rem; font-weight: 600; text-decoration: none; color: var(--green-700); }
.topic-next a:hover { text-decoration: underline; }

/* small screens: the type stays big (the lessons are read on mobiles) */
@media (max-width: 620px) {
  .lesson p, .lesson li, .lesson blockquote p { font-size: 1.32rem; }
  .lesson table { font-size: 1.22rem; }
  .lesson h2 { font-size: 1.7rem; }
}

/* ---------- the study-format system (script only / +IAST / +ITRANS) ---------- */
.fmtbar {
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
  margin: 0 0 18px; padding: 10px 14px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
}
.fmtbar .fmt-label { font-size: 0.92rem; color: var(--muted); font-weight: 600; margin-right: 4px; }
.fmtbar button {
  font-family: var(--font-latin); font-size: 0.95rem; font-weight: 600;
  padding: 6px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-strong); background: #fff; color: var(--green-900);
}
.fmtbar button:hover { border-color: var(--green-700); }
.fmtbar button.on { background: var(--green-700); border-color: var(--green-700); color: #fff; }

/* the format rules: what each version shows */
body.fmt-dv .iast, body.fmt-dv .itrans { display: none; }
body.fmt-iast .itrans { display: none; }
body.fmt-itrans .iast { display: none; }

/* the format picker on the product cards */
.fmtpick { margin: 4px 0 2px; }
.fmtpick-title { margin: 0 0 6px; font-size: 0.92rem; font-weight: 700; color: var(--muted); letter-spacing: 0.02em; }
.fmtopt {
  display: flex; align-items: center; gap: 8px; padding: 6px 0;
  font-size: 1rem; color: var(--body); cursor: pointer;
}
.fmtopt input { accent-color: var(--green-700); }

/* ---------- the co-branding (the partner programme, 2026-10-04) ----------
   The work home carries the partner's credit line (fed by
   branding/partners/<slug>/partner.json — the same credit the PDFs carry),
   and the hub card names the partner. The reading pages carry the full
   co-brand panel inside the sheet itself. */
.cobrand-line {
  margin: 16px 0 0; padding: 12px 18px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  color: var(--ink); font-size: 1.07rem;
}
.cobrand-line a { color: var(--gold-600); font-weight: 600; }
.wc-partner { margin: 6px 0 0; font-size: 0.95rem; color: var(--muted); font-weight: 600; }
.wc-partner b { color: var(--ink); }

/* ---------- the listening block (जिह्वा-दर्शिनी — the pronunciation aid, 2026-10-06) ----------
   Generated per śloka on the reading pages (the audio slot): the recorded
   voice drives the sagittal face and the syllable strip follows it. The
   engine: assets/js/pronunciation.js; the per-śloka data + the recording:
   the companion's pronunciation/ folder. Prefixed with #sheetpage so the
   sheet's own re-scoped styles never fight the block. */
#sheetpage .pron-block {
  margin: 18px 0 26px; padding: 16px 18px 18px;
  background: #faf8fd; border: 1px solid #ddd6ee; border-radius: 14px;
}
#sheetpage .pron-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
#sheetpage .pron-title { font-size: 17pt; font-weight: 700; color: #3a2d5c; }
#sheetpage .pron-title .dv { font-family: "Noto Serif Devanagari", "Segoe UI", sans-serif; }
#sheetpage .pron-sub { font-size: 10.5pt; color: #6b5b95; }
#sheetpage .pron-main { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
#sheetpage .pron-face { flex: 0 0 200px; max-width: 250px; }
#sheetpage .pron-face svg { width: 100%; height: auto; display: block; }
#sheetpage .pron-side { flex: 1 1 320px; min-width: 270px; }
#sheetpage .pron-now { display: flex; gap: 14px; align-items: center; }
#sheetpage .pron-big { font-family: "Noto Serif Devanagari", "Segoe UI", sans-serif; font-size: 34pt; line-height: 1; min-width: 92px; text-align: center; color: #3a2d5c; }
#sheetpage .pron-iast { font-size: 15pt; color: #4a3a70; font-weight: 600; }
#sheetpage .pron-chips { display: block; margin-top: 3px; }
#sheetpage .pron-tag { display: inline-block; font-size: 10.5pt; border-radius: 10px; padding: 1px 8px; margin: 2px 4px 0 0; background: #efe9f9; border: 1px solid #ddd6ee; color: #4a3a70; }
#sheetpage .pron-strip { margin-top: 10px; padding: 10px 12px; background: #fff; border: 1px solid #e8e2f4; border-radius: 10px; }
#sheetpage .pron-line { font-family: "Noto Serif Devanagari", "Segoe UI", sans-serif; font-size: 21pt; line-height: 2.0; color: #2a223d; }
#sheetpage .pron-line.ia { font-family: "Segoe UI", sans-serif; font-size: 15.5pt; color: #6b5b95; line-height: 1.9; }
/* ★ the block's Kannada edition (the user's, 2026-10-13): the script strip and
   the big display wear the self-hosted Kannada face (the Roman .ia line keeps
   Segoe UI) — and the title's dv span too (ಜಿಹ್ವಾ-ದರ್ಶಿನಿ · ಶ್ರವಣಂ). */
#sheetpage .pron-block[data-lang="kn"] .pron-big,
#sheetpage .pron-block[data-lang="kn"] .pron-line:not(.ia),
#sheetpage .pron-block[data-lang="kn"] .pron-title .dv {
  font-family: "Noto Serif Kannada", "Nirmala UI", "Segoe UI", sans-serif;
}
#sheetpage .pron-syl { padding: 0 1px; border-radius: 4px; }
#sheetpage .pron-syl.cur { background: #e9ddf8; box-shadow: 0 0 0 1px #cbbce8 inset; }
#sheetpage .pron-bar { height: 6px; background: #efe9f9; border-radius: 5px; overflow: hidden; margin-top: 10px; }
#sheetpage .pron-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #9a7fc4, #7a5fa8); }
#sheetpage .pron-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
#sheetpage .pron-btn { font: inherit; font-size: 10.5pt; padding: 6px 16px; border-radius: 9px; border: 1px solid #cbbce8; background: #fff; color: #3a2d5c; cursor: pointer; }
#sheetpage .pron-btn.primary { background: #7a5fa8; border-color: #7a5fa8; color: #fff; }
#sheetpage .pron-clock { font-size: 11pt; color: #6b5b95; }
#sheetpage .pron-note { margin-top: 8px; font-size: 10.5pt; color: #6b5b95; line-height: 1.6; }
@media (max-width: 720px) { #sheetpage .pron-face { flex: 0 0 160px; } }
/* the deep link: land the listening block clear of the sticky header + cbar */
#sheetpage .pron-block { scroll-margin-top: 150px; }
/* ★ The "awaits a voice" call — the doorway to the recording-partner form on
   pages whose recitation is not yet recorded (the user's, 2026-10-11 — #1101 · #1102). */
#sheetpage .voice-call { margin: 16px 0 4px; padding: 12px 16px; border: 1px dashed #cbbce8; border-radius: 12px; background: #faf7ff; }
#sheetpage .voice-call .vc-line { margin: 0; font-size: 11.5pt; line-height: 1.6; color: #4a3a70; }
#sheetpage .voice-call b { color: #3a2d5c; }
#sheetpage .voice-call a { color: #7a5fa8; font-weight: 600; }
/* ★ the Kannada edition keeps both languages (the user's, 2026-10-13 — #1288):
   the Kannada line first in the self-hosted face, the English kept beneath it. */
#sheetpage .voice-call .vc-kn { font-family: "Noto Serif Kannada", "Nirmala UI", "Segoe UI", sans-serif; }
#sheetpage .voice-call .vc-line + .vc-line { margin-top: 6px; }
/* ---------- the §1 reading text — the site's sizes (raised on the user's
   review, 2026-10-06, #830): the companion pages read on screens, so the
   roman transliteration (IAST/ITRANS) gets its full size beside the
   Devanagari.  Site-only: the sheets' own styles (and the print/PDF tuning)
   are untouched — these #sheetpage-scoped rules only win on the website. */
#sheetpage .verse { font-size: 29pt; }
#sheetpage .verse.dv { font-size: 34pt; }
#sheetpage .verse.split { font-size: 25pt; }
#sheetpage .verse.dv.split { font-size: 30pt; }
/* the view chooser of the listening block (side · front · ¾ — the user's #817) */
#sheetpage .pron-views { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
#sheetpage .pron-vlabel { font-size: 10pt; color: #6b5b95; }
#sheetpage .pron-vbtn { font: inherit; font-size: 10pt; padding: 3px 12px; border-radius: 999px; border: 1px solid #cbbce8; background: #fff; color: #3a2d5c; cursor: pointer; }
#sheetpage .pron-vbtn.on { background: #7a5fa8; border-color: #7a5fa8; color: #fff; }

/* ---------- the screen-size pass — the deploy gate's fixes (the user's,
   2026-10-13 — raw_prompts.md #1241 · #1242: no deployment without testing
   smaller screens and all screen sizes; every sheet generates with the
   phone pass at once).  Each rule answers a measured overflow
   (website/check_screens.py — run it before every deploy). ---------- */
/* the row badges sit ~7px past the table and ~24–70px wide (multi-number
   pills wider still); below 1280px the page padding cannot hold them —
   reserve their room by narrowing the tables (a margin cannot shrink a
   width:100% table).  1280px and up keeps the recorded look. */
@media (max-width: 1279px) {
  #sheetpage table { width: calc(100% - 48px); }
}
/* the closing panel's long URL / handle lines wrap instead of pushing the
   page wide (measured 5px at 320px). */
#sheetpage .cb-text, #sheetpage .cb-line, #sheetpage .cb-name { overflow-wrap: anywhere; }
/* the listening block on phones: the side column may shrink, the big
   syllable steps down and the controls wrap (measured 13px at 320px on the
   Pañcaratnam pages). */
@media (max-width: 620px) {
  #sheetpage .pron-side { min-width: 0; }
  #sheetpage .pron-face { flex-basis: 150px; }
  #sheetpage .pron-big { font-size: 26pt; min-width: 64px; }
  #sheetpage .pron-now { flex-wrap: wrap; }
}