/* Same cream page as Learn Sanskrit and the personal home. No music chrome. */
:root { color-scheme: light; }
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Devanagari", "Nirmala UI", sans-serif;
  background: #fdf6e9;
  color: #2c221a;
  font-size: 1.125rem;
  line-height: 1.6;
}
main {
  max-width: 48rem;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 3.5rem;
  overflow-wrap: anywhere;
}
h1 {
  margin: 0 0 0.8rem;
  font-size: clamp(1.7rem, 5vw, 2.2rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
h2 {
  margin: 1.6rem 0 0.5rem;
  font-size: 1.25rem;
  line-height: 1.3;
}
h2 > span.deva {
  display: block;
  line-height: 1.55;
}
h2 > span.deva + em {
  display: block;
  margin-top: 0.45rem;
  line-height: 1.45;
}
p { margin: 0 0 0.9rem; }
a { color: #b5451d; font-weight: 600; }
a:hover, a:focus-visible { color: #8a3414; }
ol, ul { margin: 0 0 0.9rem; padding-left: 1.4rem; }
li { margin: 0.35rem 0; }
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 1rem;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 1rem;
}
table.wide { min-width: 42rem; }
th, td {
  border: 1px solid rgba(44, 34, 26, 0.18);
  padding: 0.45rem 0.6rem;
  vertical-align: top;
  text-align: left;
}
th {
  background: #f3e6d0;
  font-weight: 650;
}
th { white-space: nowrap; }
.table-scroll:has(td:first-child > a:only-child) th:first-child,
.table-scroll td:first-child:has(> a:only-child),
table.label th:first-child,
table.label td:first-child {
  white-space: nowrap;
  width: 1%;
}
.deva {
  font-weight: 400;
  font-style: normal;
  font-synthesis: none;
  font-family: "Noto Sans Devanagari", "Nirmala UI", sans-serif;
  color: #5a4638;
}
h1 .deva,
h2 .deva,
h3 .deva {
  font-weight: 500;
  color: inherit;
}
.bar {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  min-height: 3.1rem;
  padding: 0.45rem 1rem;
  background: rgba(253, 246, 233, 0.96);
  border-bottom: 1px solid rgba(44, 34, 26, 0.12);
  font-size: 0.98rem;
}
.bar-home, .bar-books, .bar-book { text-decoration: none; white-space: nowrap; }
.bar-home, .bar-books { color: #6d5646; font-weight: 650; }
.bar-sep { color: rgba(44, 34, 26, 0.35); }
.bar-book {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #2c221a;
  font-weight: 750;
}
.bar-menu { position: relative; flex: 0 0 auto; }
.bar-menu > summary {
  cursor: pointer;
  list-style: none;
  max-width: 11rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0.32rem 0.75rem;
  border: 1px solid rgba(181, 69, 29, 0.35);
  border-radius: 999px;
  background: #fffaf3;
  color: #b5451d;
  font-weight: 700;
}
.bar-menu > summary::-webkit-details-marker { display: none; }
.bar-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  width: min(20rem, 86vw);
  max-height: min(70vh, 26rem);
  overflow: auto;
  padding: 0.3rem;
  background: #fffaf3;
  border: 1px solid rgba(44, 34, 26, 0.14);
  border-radius: 0.7rem;
  box-shadow: 0 14px 36px rgba(44, 34, 26, 0.12);
}
.bar-panel a {
  display: block;
  padding: 0.48rem 0.65rem;
  border-radius: 0.4rem;
  color: #2c221a;
  font-weight: 600;
  text-decoration: none;
}
.bar-panel a:hover, .bar-panel a:focus-visible { background: rgba(181, 69, 29, 0.08); }
.bar-panel a[aria-current="true"] { background: #ead9bf; color: #8a3414; }
@media (min-width: 880px) {
  .bar { padding: 0.5rem 1.4rem; }
  .bar-menu > summary { max-width: 18rem; }
}
.step {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin: 0.15rem 0 1.15rem;
  font-size: 0.98rem;
}
.step a { text-decoration: none; }
.step-next { margin-left: auto; }
.side-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.side-open,
.side-shade { display: none; }
.book-index {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 4;
  width: 18rem;
  overflow: auto;
  padding: 0.4rem 0 2rem;
  background: #f6edd9;
  border-right: 1px solid rgba(44, 34, 26, 0.18);
}
.book-index > a {
  display: block;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid rgba(44, 34, 26, 0.12);
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.3;
  text-decoration: none;
}
.book-index > a.here {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}
.book-index details {
  border-bottom: 1px solid rgba(44, 34, 26, 0.12);
}
.book-index summary {
  cursor: pointer;
  padding: 0.7rem 1rem;
  font-weight: 700;
  line-height: 1.35;
  list-style: none;
}
.book-index summary::-webkit-details-marker { display: none; }
.book-index summary::before {
  content: "▸";
  display: inline-block;
  width: 1.1rem;
  color: #b5451d;
}
.book-index details[open] > summary::before { content: "▾"; }
.book-index summary.here { text-decoration: underline; text-underline-offset: 0.18em; }
.book-index .drawer a {
  display: block;
  padding: 0.38rem 1rem 0.38rem 1.7rem;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.35;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.book-index .drawer a.here {
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.book-index .num {
  display: inline-block;
  min-width: 2.4rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
@media (max-width: 800px) {
  .book-index {
    width: min(18rem, 86vw);
    transform: translateX(-105%);
    transition: transform 0.18s ease;
  }
  .side-toggle:checked ~ .book-index { transform: none; }
  .side-open {
    display: block;
    position: sticky;
    top: 0;
    z-index: 2;
    margin: 0;
    padding: 0.75rem 1rem;
    background: #f6edd9;
    border-bottom: 1px solid rgba(44, 34, 26, 0.18);
    color: #b5451d;
    font-weight: 700;
  }
  .side-toggle:checked ~ .side-shade {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 3;
    background: rgba(44, 34, 26, 0.35);
  }
  main {
    margin: 0 auto;
    padding: 1rem 1rem 3rem;
  }
}
section.summary {
  margin: 0.2rem 0 1.25rem;
  padding: 0.15rem 0 0.15rem 0.85rem;
  border-left: 3px solid rgba(181, 69, 29, 0.45);
}
section.summary h2 { margin-top: 0.7rem; }
section.summary > h2:first-of-type { margin-top: 0; }
main details.depth {
  margin: 1.35rem 0 1.1rem;
  border: 1px solid rgba(44, 34, 26, 0.18);
  border-top: 3px solid #b5451d;
  border-radius: 0.35rem;
  background: #fffaf3;
  overflow-wrap: anywhere;
}
main details.depth > summary {
  cursor: pointer;
  padding: 0.7rem 0.9rem;
  font-weight: 700;
  list-style: none;
}
main details.depth > summary::-webkit-details-marker { display: none; }
main details.depth > summary::before { content: "▸ "; }
main details.depth[open] > summary::before { content: "▾ "; }
main details.depth > h2:first-of-type { margin-top: 0.35rem; }
main details.depth > :last-child { margin-bottom: 0.8rem; }
