/* Cream page, same family as the Yoga Sūtra book. The menu is a vertical side list. */
: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.0625rem;
  line-height: 1.55;
}
main {
  max-width: 48rem;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 3.5rem;
  overflow-wrap: anywhere;
}
h1 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
}
h2 { margin: 1.5rem 0 0.45rem; font-size: 1.2rem; line-height: 1.35; }
h2 .speakers { font-weight: 550; }
h2.verse { font-weight: 650; }
p { margin: 0 0 0.85rem; }
a { color: #b5451d; font-weight: 600; }
a:hover, a:focus-visible { color: #8a3414; }
.deva {
  font-family: "Noto Sans Devanagari", "Nirmala UI", sans-serif;
  font-weight: 400;
  font-style: normal;
  font-synthesis: none;
  color: #5a4638;
}
h1 .deva,
h2 .deva,
h3 .deva {
  font-weight: 500;
  color: inherit;
}
.title-line { font-size: 1.25rem; }
.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.6rem;
  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; }
}
.entries {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
  gap: 0.7rem;
  margin: 0.4rem 0 1.2rem;
}
.entry {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(44, 34, 26, 0.18);
  border-top: 3px solid #b5451d;
  background: #fffaf3;
  color: inherit;
  text-decoration: none;
  font-weight: 500;
}
.entry:hover, .entry:focus-visible { border-color: #b5451d; background: #fff; }
.entry strong { color: #b5451d; font-size: 1.02rem; }
.entry span, .entry em { color: #2c221a; font-weight: 500; }
.entry .count { color: rgba(44, 34, 26, 0.62); font-size: 0.88rem; }
.turn { font-size: 1rem; }
.table-scroll { overflow-x: auto; margin: 0 0 1rem; }
table { border-collapse: collapse; width: 100%; font-size: 1rem; }
table.wide { min-width: 40rem; }
th, td {
  border: 1px solid rgba(44, 34, 26, 0.18);
  padding: 0.4rem 0.55rem;
  vertical-align: top;
  text-align: left;
}
th { background: #f3e6d0; }
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%;
}
ol, ul { margin: 0 0 0.9rem; padding-left: 1.3rem; }
li { margin: 0.3rem 0; }
main details.answer {
  margin: 0 0 1.1rem;
  border: 1px solid rgba(44, 34, 26, 0.18);
  border-top: 3px solid #b5451d;
  background: #fffaf3;
}
main details.answer summary {
  cursor: pointer;
  padding: 0.55rem 0.8rem;
  font-weight: 700;
}
main details.answer .answer-body { padding: 0 0.8rem 0.2rem; }
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; }
