:root {
  --pine: #164c37;
  --ink: #22332b;
  --muted: #58675f;
  --rule: #d8e1da;
  --canvas: #e7eee8;
  --rail-width: clamp(15rem, 19vw, 19rem);
  font: 16px/1.5 "Nirmala UI", "Noto Sans Devanagari", system-ui, sans-serif;
  background: var(--canvas);
  color: var(--ink);
}
.learning-layout {display:grid;grid-template-columns:var(--rail-width) minmax(0,1fr);align-items:start}
.learning-layout .reading-desk {padding:0;margin:0;width:100%;max-width:none;min-width:0}
.learning-layout #free-flipbook, body.paid-reader {--book-ink:var(--ink);--book-line:var(--rule);background:var(--canvas);color:var(--ink)}
.learning-layout #free-flipbook {padding:0;margin:0;border-radius:0}
.learning-layout select,.learning-layout button {color:var(--ink);border-color:#b8c7bc}
.learning-layout :is(button,a,select,summary):focus-visible {outline:3px solid #437659;outline-offset:2px}
#library-rail {position:sticky;top:0;height:100dvh;border-right:1px solid var(--rule);background:white}
#library-content {display:flex;flex-direction:column;height:100%;background:white;min-height:0}
.library-brand,.desk-bar {display:flex;align-items:center;min-height:3.75rem;background:white;border-bottom:1px solid var(--rule)}
.library-brand {padding:0 1.15rem;justify-content:space-between}
.library-brand a {display:inline-flex;align-items:center;gap:.5rem;font-size:1.2rem;font-weight:750;letter-spacing:-.03em;text-decoration:none;color:var(--pine)}
.library-brand .star {font-size:1.5rem;color:#ae7920;line-height:1}
.library-book {display:flex;align-items:center;gap:.85rem;padding:1.1rem 1.15rem;border-bottom:1px solid var(--rule)}
.library-book img {width:3.25rem;height:auto;border:1px solid var(--rule);border-radius:3px}
.library-book h1 {font-size:1.4rem;line-height:1.35}
.library-book p {font-size:.87rem;color:var(--muted)}
#chapters-title {margin:0;padding:1rem 1.15rem .5rem;font-size:1.05rem;color:var(--pine)}
#chapters-title span {margin-left:.3rem;font-size:.84rem;color:var(--muted);font-weight:500}
#chapter-list {display:flex;flex:1;flex-direction:column;align-items:stretch;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:0 .6rem .8rem;scrollbar-width:thin;scrollbar-color:#b9c9bc transparent}
#chapter-list .chapter-link {flex:none;display:grid;grid-template-columns:1.6rem 1fr;align-items:baseline;gap:.35rem;min-height:40px;padding:.45rem .55rem;border:0;border-radius:.35rem;text-align:start;background:white;line-height:1.4;font-size:.94rem}
#chapter-list .chapter-link:hover {background:#f0f5f0}
#chapter-list .chapter-link[aria-current] {background:#dfeee2;color:var(--pine);font-weight:700}
.chapter-number {color:var(--muted);font:500 .77rem/1.5 system-ui,sans-serif;font-variant-numeric:tabular-nums}
#library-activities {padding:.82rem 1.2rem;color:var(--pine);font-weight:650;text-decoration:none;border-top:1px solid var(--rule)}
#library-activities span {margin-right:.45rem}
.desk-bar {position:sticky;top:0;z-index:15;gap:.75rem;padding:.5rem clamp(.7rem,2vw,1.8rem)}
.desk-title {display:flex;align-items:center;gap:.65rem;font-size:1.13rem;font-weight:650;margin-right:auto}
.desk-title svg,#narrator-choice svg {color:var(--pine);flex:none}
.desk-bar #narrator-choice {display:flex;flex-wrap:nowrap;gap:.45rem;margin:0;min-width:0}
.desk-bar select,.desk-bar button,.reader-pagination select,.reader-pagination button {min-height:38px;border-radius:.45rem;background:white}
.desk-bar select {width:100%;padding:.35rem .45rem;font-size:.91rem}
.desk-bar #focus-mode {display:inline-flex;align-items:center;justify-content:center;gap:.5rem;border:1px solid var(--pine);color:var(--pine);padding:.35rem .75rem;font:650 .9rem/1.3 system-ui,sans-serif;white-space:nowrap}
.desk-bar #focus-mode[aria-pressed=true] {color:white;background:var(--pine)}
.focus-icon {width:15px;height:15px;display:inline-block;background:
  linear-gradient(currentColor 0 0) 0 0,linear-gradient(currentColor 0 0) 100% 0,
  linear-gradient(currentColor 0 0) 0 100%,linear-gradient(currentColor 0 0) 100% 100%;
  background-size:5px 2px;background-repeat:no-repeat;position:relative}
.focus-icon::after {content:"";position:absolute;inset:0;background:inherit;transform:rotate(90deg)}
.menu-icon {display:block;width:17px;height:12px;border-block:2px solid currentColor;position:relative}
.menu-icon::after {content:"";position:absolute;top:3px;left:0;right:0;border-top:2px solid currentColor}
#contents-open {padding:0 .65rem;color:var(--pine)}
#library-rail #contents-close {display:none}
#contents-close {border:0;background:transparent;font:1.5rem/1 system-ui;padding:.5rem}
#contents-dialog {position:fixed;inset:0 auto 0 0;width:min(20rem,88vw);max-width:none;max-height:none;height:100dvh;margin:0;padding:0;border:0;color:var(--ink)}
#contents-dialog::backdrop {background:rgb(19 37 28 / 38%)}
html:has(#contents-dialog[open]) {overflow:hidden}
.reader-page-controls,.paid-panel > .book-chapter {min-height:3.4rem;padding:.38rem clamp(.7rem,2vw,1.8rem);margin:0;background:#f8faf8;border-bottom:1px solid var(--rule);gap:.5rem;flex-wrap:nowrap}
.reader-page-controls .book-chapter,.book-chapter label {min-width:0;flex:1}
.book-chapter label {display:flex;flex-wrap:nowrap}
.compact-book-name {display:none}
.book-chapter select {max-width:100%;min-width:0;border:0;color:var(--ink);background:transparent;font:650 clamp(.98rem,1.5vw,1.25rem)/1.45 "Nirmala UI",system-ui,sans-serif;padding:.3rem .2rem;text-overflow:ellipsis}
.reader-pagination {flex:none;flex-wrap:nowrap;gap:.35rem}
.reader-pagination button {padding:0;width:2.4rem;color:var(--pine);font:1.55rem/1 system-ui,sans-serif}
.reader-pagination select {font:550 .92rem/1.4 system-ui,sans-serif;padding:.28rem .35rem;font-variant-numeric:tabular-nums}
.spread {width:min(calc(100% - 2.25rem),max(49rem,calc((100dvh - 210px) * 1.565)));margin:1.1rem auto 0;overflow:clip;border-radius:.45rem;background:white;box-shadow:0 2px 5px #263e3018,0 12px 32px #263e3014}
.spread::after {width:18px;left:calc(50% - 9px);background:linear-gradient(90deg,transparent,#283b3021,transparent)}
.book-leaf {background:white;display:flex;flex-direction:column}
.book-leaf .selectable-paper {order:0}
.leaf-audio {order:2;padding:.4rem .65rem;gap:.6rem;flex-wrap:nowrap;background:#f9fbf9;color:var(--pine);border-top:1px solid var(--rule)}
.leaf-audio span {font-size:.8rem}
.leaf-audio audio {height:32px}
.book-leaf .selectable-transcript {order:3}
.book-leaf .leaf-tools {order:4}
.book-leaf .page-selection-actions {order:1;position:sticky;bottom:.4rem;z-index:6;border:1px solid #b5cbb9;border-radius:.45rem;margin:.3rem .45rem;background:#f1f7ef;box-shadow:0 2px 9px #23482e19}
.selectable-transcript,#activities .book-leaf details.selectable-transcript {padding:.45rem .8rem;margin:0;font-size:.85rem;color:#394d40;border-top:1px solid var(--rule)}
.reading-position {display:flex;align-items:center;justify-content:center;gap:.8rem;margin:.6rem 1rem .3rem;color:var(--muted);font-size:.81rem}
.selection-hint {border-right:1px solid #b3c4b7;padding-right:.8rem}
.reader-progress-track {width:min(14rem,75%);height:3px;accent-color:var(--pine)}
.learning-layout #activities:not(:has(#paid-root .paid-panel)),.learning-layout .reader {width:min(48rem,calc(100% - 2rem));margin:1.5rem auto;padding:clamp(1rem,2.2vw,1.6rem);border-color:var(--rule);border-radius:.6rem}
.learning-layout #activities:not(:has(#paid-root .paid-panel)) {width:min(55rem,calc(100% - 2rem));padding:0;overflow:clip;border-radius:1rem;box-shadow:0 5px 18px #2845320c}
.flipbook {scroll-margin-top:4rem}
.offer-intro {display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:1.2rem;padding:1.35rem clamp(1.15rem,4vw,2.7rem);background:#fff1cb}
.offer-intro h2 {display:flex;align-items:baseline;flex-wrap:wrap;gap:0 .32em;margin:0 0 .55rem;color:#193e2a;font-size:clamp(1.6rem,3vw,2.4rem);line-height:1.45;letter-spacing:normal;word-spacing:.04em}
.offer-intro p {max-width:32rem;color:#38463a;font-size:clamp(.98rem,1.4vw,1.12rem)}
.offer-intro img {display:block;width:clamp(4rem,8vw,6.5rem);height:auto;border-radius:2px 5px 5px 2px;border:1px solid #344e3226;box-shadow:3px 4px 0 #d8cda9,5px 7px 10px #483a191c;transform:rotate(5deg)}
.offer-body {padding:0 clamp(.95rem,3vw,2rem) 1.05rem}
.practice-counts {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:0;padding:1.05rem 0;list-style:none;border-bottom:1px solid var(--rule)}
.practice-counts li {display:flex;align-items:baseline;justify-content:center;column-gap:.45rem;flex-wrap:wrap;padding:0 .35rem;font-size:.95rem;text-align:center}
.practice-counts li+li {border-left:1px solid var(--rule)}
.practice-counts strong {color:var(--pine);font:750 1.5rem/1.2 system-ui,sans-serif;font-variant-numeric:tabular-nums}
.offer-body #prices {display:block;border:0;padding:0;margin:1.15rem 0;min-inline-size:0}
#prices legend {display:block;float:none;padding:0;width:100%;margin-bottom:.7rem;font-size:1.28rem;font-weight:700;color:var(--pine);text-align:center}
.edition-choices {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem}
.edition-card {display:flex;gap:.7rem;align-items:flex-start;border:1px solid #b7c6bb;border-radius:.65rem;background:white;padding:1rem 1.05rem;cursor:pointer}
.edition-card:has(input:checked) {background:#eef7ee;border-color:#347348;box-shadow:inset 0 0 0 1px #347348}
.edition-card:hover {border-color:#347348}
.edition-card:has(input:focus-visible) {outline:3px solid #396b9a;outline-offset:3px}
.edition-card input {margin:.22rem 0 0;width:1rem;height:1rem;flex:none;accent-color:#23623e}
.offer-body #prices span {background:none;padding:0;border-radius:0}
.edition-copy {display:grid;gap:.28rem;min-width:0}
.edition-copy strong[lang=en] {font:650 1.05rem/1.4 system-ui,sans-serif}
.edition-price {color:var(--pine);font:750 1.72rem/1.15 system-ui,sans-serif;font-variant-numeric:tabular-nums}
.edition-copy span {font-size:.92rem;line-height:1.55;color:#45534a}
#delivery-panel {margin-bottom:1rem;padding:.65rem .9rem;background:#f5f7f4;border-left:3px solid #a8bcae}
#delivery-note {font-size:.93rem}
#offer #bundle-delivery {border:0;padding:0;margin:0;border-radius:0}
#offer #delivery-note:not([hidden]) + details {margin-top:.3rem}
#bundle-delivery summary {font-weight:650;color:var(--pine);font-size:.94rem}
#offer #bundle-delivery dl {margin:.55rem 0 .2rem;display:grid;grid-template-columns:minmax(8rem,.8fr) minmax(0,1.6fr);gap:.3rem .7rem;font-size:.92rem}
.offer-footer {display:flex;align-items:center;justify-content:space-between;gap:.6rem 1rem;flex-wrap:wrap;border-top:1px solid var(--rule);padding-top:.85rem}
.offer-footer #checkout-state {margin:0;color:var(--muted);font-size:.91rem}
.offer-actions {display:flex;align-items:center;gap:.8rem;flex-wrap:wrap}
#order-action:empty {display:none}
.offer-actions a,#offer #signin {text-underline-offset:3px;color:var(--pine)}
#continue-reading {font-size:.95rem;font-weight:650}
#offer #signin {display:inline-block;font-size:.85rem;margin-top:.5rem}
.offer-actions .order-cta {display:inline-block;border:1px solid var(--pine);background:var(--pine);color:white;border-radius:.45rem;text-decoration:none;font-weight:650;padding:.5rem .85rem}
@media(max-width:560px){
  .learning-layout #activities:not(:has(#paid-root .paid-panel)) {width:calc(100% - .9rem)}
  .offer-intro {gap:.6rem;padding:1.2rem .95rem}
  .offer-intro h2 {display:block;font-size:1.52rem}
  .offer-intro h2 span {display:block}
  .offer-intro img {width:3.6rem}
  .practice-counts {padding:.85rem 0}
  .practice-counts li {flex-direction:column;align-items:center;font-size:.8rem;line-height:1.35}
  .practice-counts strong {font-size:1.3rem}
  .edition-choices {grid-template-columns:1fr;gap:.5rem}
  .edition-card {padding:.75rem}
  .edition-copy {width:100%;grid-template-columns:minmax(0,1fr) auto;align-items:center}
  .edition-copy span {grid-column:1/-1}
  .edition-price {font-size:1.35rem}
  #offer #bundle-delivery dl {grid-template-columns:minmax(5.7rem,.8fr) minmax(0,1.2fr)}
}
.learning-layout #activities,.learning-layout #paid-root {scroll-margin-top:4.2rem}
.paid-reader .learning-layout #activities {margin:0}
.book-views {padding:.45rem clamp(.7rem,2vw,1.8rem);background:white;gap:.35rem;flex-wrap:nowrap;overflow-x:auto}
.book-views button {white-space:nowrap;flex:none;border:1px solid transparent;color:var(--ink);border-radius:.38rem}
.book-views button[aria-pressed=true] {background:#dfede2;color:var(--pine);border-color:#b9d1bd}
.chapter-work,.paid-actions,.paid-panel>p[role=status]:not(:empty) {max-width:62rem;margin:1rem auto;width:calc(100% - 2rem)}
.chapter-work h2 {font-size:1.3rem}
.revision-summary {max-width:46rem}
.learning-layout footer {font-size:.8rem;padding:1rem;color:var(--muted)}
.focus-reading .learning-layout {grid-template-columns:minmax(0,1fr)}
.focus-reading .spread {width:min(calc(100% - 1rem),max(58rem,calc((100dvh - 125px) * 1.565)));margin-top:.55rem}
.focus-reading .desk-bar {min-height:3rem}
.focus-reading .reader-page-controls {min-height:2.8rem}
.focus-reading .learning-layout footer {display:none}
.focus-reading body:not(.paid-reader) #activities {display:none}
@media(max-width:960px){
  .learning-layout {grid-template-columns:minmax(0,1fr)}
  #library-rail {display:none}
  .desk-title {font-size:1rem}
}
@media(max-width:740px){
  .spread,.focus-reading .spread {grid-template-columns:minmax(0,1fr);width:min(calc(100% - 1rem),38rem);margin-top:.6rem}
  .spread::after {display:none}
  .desk-bar {gap:.45rem;min-height:3.35rem;justify-content:space-between;padding:.4rem .55rem}
  .desk-title {display:none}
  .desk-bar #narrator-choice {margin-right:auto}
  .desk-bar #narrator-choice svg {width:16px}
  .desk-bar #focus-mode {padding:.3rem .55rem;font-size:.83rem}
  .reader-page-controls {padding:.35rem .5rem;min-height:3rem;gap:.3rem}
  .book-chapter,.reader-page-controls .book-chapter {display:block}
  .book-chapter .compact-book-name {display:block;margin-left:.2rem;color:var(--muted);font-size:.76rem}
  .book-chapter select {width:100%;padding-block:.12rem}
  .reader-pagination {gap:.22rem}
  .reader-pagination button {width:2rem}
  .reader-pagination select {font-size:.82rem;max-width:5.8rem}
  .focus-reading .spread {width:min(100%,46rem);border-radius:0;margin-top:0}
  .focus-reading .reader-page-controls {justify-content:center}
  .focus-reading .reader-page-controls .book-chapter {display:none}
  .book-views {padding-inline:.5rem}
  .chapter-work {width:calc(100% - .85rem);padding:.8rem}
}
@media(max-width:365px){
  .desk-bar #narrator-choice svg {display:none}
  .desk-bar select {font-size:.8rem}
  .desk-bar #focus-mode {gap:.3rem}
}
