*, *::before, *::after { box-sizing: border-box; }
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-group(root) { animation-duration: var(--duration-fast); }
}
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font: 400 var(--text-md)/1.5 var(--font-ui);
  font-variant-numeric: tabular-nums;
  overflow-wrap: break-word;
  overflow-x: clip;
}
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.vh {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: var(--gutter); top: 0; transform: translateY(-120%); z-index: var(--z-skip); padding: var(--space-3) var(--space-5);
  font-weight: 600; text-decoration: none;
  background: var(--color-action-bg); color: var(--color-action-text); border-radius: var(--radius-pill);
}
.skip:focus { top: var(--space-3); transform: none; }
a { color: inherit; text-decoration-line: underline; text-decoration-thickness: 1px; text-underline-offset: var(--underline-offset);
  text-decoration-color: var(--s-muted, currentColor); }
:focus-visible { outline: 2px solid var(--s-focus, var(--color-focus)); outline-offset: 3px; }
::selection { background: var(--s-selection, var(--color-selection)); color: var(--s-text, var(--color-text)); }
:where(select, input:not([type="checkbox"], [type="radio"], [type="range"]), textarea) {
  color: var(--s-text); background-color: var(--s-raised); border: 1px solid var(--s-border-control); border-radius: var(--radius-control);
}
::placeholder { color: var(--s-faint); opacity: 1; }
:where(select) {
  -webkit-appearance: none; appearance: none; max-width: 100%; height: var(--target); padding: 0 2.25rem 0 var(--space-3); cursor: pointer;
  font-variant-numeric: tabular-nums;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right 1.0625rem center, right 0.75rem center; background-size: 0.3125rem 0.3125rem; background-repeat: no-repeat;
}
@supports (appearance: base-select) {
  @media (pointer: fine) {
    select, select::picker(select) { appearance: base-select; }
    select { display: inline-flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding-right: var(--space-3); background-image: none; }
    select::picker-icon { content: ""; flex: none; width: 0.4375rem; height: 0.4375rem; margin: -0.1875rem 0.125rem 0; color: var(--s-muted); border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; rotate: 45deg; transition: rotate var(--duration-fast) var(--ease-out), margin var(--duration-fast) var(--ease-out); }
    select:open::picker-icon { margin-top: 0.1875rem; rotate: 225deg; }
    select::picker(select) {
      margin-block: var(--space-1); padding: var(--space-1); max-block-size: min(22rem, 60vh); overflow-y: auto; overscroll-behavior: contain;
      font: 500 var(--text-sm)/1.2 var(--font-ui); color: var(--s-text); background: var(--s-raised);
      border: 1px solid var(--s-border-control); border-radius: var(--radius-control); box-shadow: var(--shadow-float);
      scrollbar-width: thin; scrollbar-color: var(--s-border-control) transparent;
    }
    select option {
      display: flex; align-items: center; gap: var(--space-2); min-height: 2.25rem; padding: 0 var(--space-3); border-radius: 8px;
      font-variant-numeric: tabular-nums; cursor: pointer; outline-offset: -2px;
    }
    select option::checkmark { order: 1; margin-left: auto; color: var(--s-text); }
    select option:checked { font-weight: 600; }
    select option:hover, select option:focus-visible { background: color-mix(in oklab, var(--s-text) 9%, transparent); }
    select option:disabled { color: var(--s-faint); cursor: default; background: none; }
  }
}
:where(input[type="checkbox"]) {
  -webkit-appearance: none; appearance: none; flex: none; display: inline-grid; place-content: center; width: 1.25rem; height: 1.25rem; margin: 0;
  background: var(--s-raised); border: 1px solid var(--s-border-control); border-radius: 6px; cursor: pointer;
}
:where(input[type="checkbox"])::before {
  content: ""; width: 0.75rem; height: 0.75rem; background: var(--s-action-text); scale: 0;
  clip-path: polygon(14% 52%, 0 66%, 38% 100%, 100% 22%, 86% 10%, 37% 70%);
}
:where(input[type="checkbox"]):checked { background: var(--s-action-bg); border-color: var(--s-action-bg); }
:where(input[type="checkbox"]):checked::before { scale: 1; }
:where(input[type="checkbox"]):disabled { background: transparent; border-style: dashed; cursor: default; }
input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none; appearance: none; width: 0.875rem; height: 0.875rem; margin-left: var(--space-2); cursor: pointer; background: var(--s-muted);
  clip-path: polygon(12% 0, 50% 38%, 88% 0, 100% 12%, 62% 50%, 100% 88%, 88% 100%, 50% 62%, 12% 100%, 0 88%, 38% 50%, 0 12%);
}
summary { list-style: none; cursor: pointer; }
summary::-webkit-details-marker { display: none; }
:where(summary)::before {
  content: ""; display: inline-block; flex: none; width: 0.4375rem; height: 0.4375rem; margin-right: 0.625rem; vertical-align: 0.1em;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; rotate: -45deg;
  transition: rotate var(--duration-fast) var(--ease-out);
}
:where(details[open] > summary)::before { rotate: 45deg; }
@media (hover: hover) { :where(summary):hover { text-decoration: underline; text-decoration-color: var(--s-thread-line); text-decoration-thickness: 2px; text-underline-offset: var(--underline-offset); } }
:where(kbd) { padding: 0.0625rem 0.375rem; font: 500 var(--text-2xs)/1.4 var(--font-ui); color: var(--s-muted); background: var(--s-raised); border: 1px solid var(--s-border-control); border-radius: 6px; }
:where(mark) { color: inherit; background: var(--s-selection, var(--color-selection)); }
:where(hr) { height: 0; margin: 0; border: 0; border-top: 1px solid var(--s-border); }
:where(abbr[title]) { text-decoration: underline dotted; text-decoration-color: var(--s-muted); cursor: help; }
:where(dialog) { color: var(--s-text); background: var(--s-bg); border: 1px solid var(--s-border-control); border-radius: var(--radius-lg); }
html { scrollbar-color: var(--color-border-control) var(--color-bg); }
:where(input, select, textarea, .btn-quiet, .icon-btn, .pill, .start, .start-all, .btn-text):focus-visible { outline-offset: -1px; }
.surface-cover ::selection { background: var(--color-cover-selection); color: var(--color-cover-text); }
textarea, input { caret-color: var(--s-text, currentColor); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); flex: none;
  min-height: var(--target); padding: 0 var(--space-5);
  font: 600 var(--text-md)/1 var(--font-ui); letter-spacing: 0.005em; text-decoration: none; white-space: nowrap;
  color: var(--s-action-text); background: var(--s-action-bg);
  border: 1px solid var(--s-action-bg); border-radius: var(--radius-pill); cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out);
}
.btn:active, .start:active, .start-all:active, .pill:active { transform: scale(0.97); box-shadow: none; }
.btn[aria-busy="true"] { cursor: progress; background: var(--s-muted); border-color: var(--s-muted); }
.btn-quiet { background: var(--s-raised); color: var(--s-text); border-color: var(--s-border-control); font-weight: 500; }
.icon-btn {
  display: inline-grid; place-items: center; flex: none; width: var(--target); height: var(--target); padding: 0;
  color: var(--s-text); background: var(--s-raised); border: 1px solid var(--s-border-control); border-radius: var(--radius-pill);
  cursor: pointer; text-decoration: none;
}
.ui-ic { flex: none; width: 1.125rem; height: 1.125rem; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.mark { flex: none; }
.mark-thread { stroke: var(--s-thread-line); stroke-width: 2; fill: none; }
.mark-node { fill: var(--s-bg); stroke: var(--s-text); stroke-width: 2; }
[lang="sa"] { font-family: var(--font-read); }
[lang="mr"] { font-family: var(--font-read-mr); }
.danda { color: var(--s-thread); white-space: nowrap; }
.start, .start-all, .pill {
  display: inline-flex; align-items: center; min-height: var(--target); padding: var(--space-2) var(--space-4); text-align: left;
  font: 500 var(--text-md)/1.2 var(--font-ui); color: var(--s-text); text-decoration: none; cursor: pointer;
  background: var(--s-raised); border: 1px solid var(--s-border); border-radius: var(--radius-pill);
  transition: border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}
.start { border-color: var(--s-border-control); }
.start, .pill { max-width: 100%; overflow-wrap: break-word; }
:is(.start, .pill):not([href^="#"]):visited { color: var(--s-muted); }
.pill:not([href^="#"]):visited { border-color: var(--s-border); }
html:not(.js) :is(.copy-quote, .keep-line) { display: none; }
.copy-status[data-error] { font-weight: 600; color: var(--s-text); }
.copy-status[data-error]::before {
  content: "!"; display: inline-grid; place-items: center; width: 1.3em; height: 1.3em; margin-right: var(--space-2);
  font-size: 0.85em; font-weight: 700; border: 2px solid currentColor; border-radius: 50%;
}
.btn-text[aria-busy="true"] { cursor: progress; color: var(--s-muted); }
.start-all { color: var(--s-muted); background: transparent; border-style: dashed; border-color: var(--s-border-control); }
.thread-in { position: relative; padding-left: calc(var(--gutter) + var(--thread-pad)); }
.thread-in::before {
  content: ""; position: absolute; left: calc(var(--gutter) + var(--thread-pad) - var(--thread-off) + 5px); top: 0; bottom: 0; width: 2px;
  background: var(--s-thread-line);
}
.knot { position: relative; }
.knot::before {
  content: ""; position: absolute; left: calc(-1 * var(--thread-off)); top: 0.42em; top: calc(0.5lh - 6px); width: 12px; height: 12px;
  border: 2px solid var(--s-text); border-radius: 50%; background: var(--s-bg);
}
.pig { display: inline-block; flex: none; width: 0.625rem; height: 0.625rem; border-radius: 1px; background: var(--pig); }
.text-tag { display: inline-flex; align-items: center; gap: 0.45em; font-size: var(--text-sm); white-space: nowrap; }
.sep { color: var(--s-muted); }
.btn-text {
  min-height: 2.5rem; padding: 0 var(--space-4); font-weight: 500; font-size: inherit; color: var(--s-text);
  background: var(--s-raised); border: 1px solid var(--s-border-control); border-radius: var(--radius-pill);
}
@media (hover: hover) {
  a:hover { text-decoration-color: var(--s-thread-line, currentColor); text-decoration-thickness: 2px; }
  .btn:hover { background: var(--s-action-hover); border-color: var(--s-action-hover); }
  .btn-quiet:hover { background: var(--s-raised); border-color: var(--s-text); }
  .icon-btn:hover { border-color: var(--s-text); }
  select:hover { border-color: var(--s-muted); }
  .surface-cover .btn:hover, .surface-pig .btn:hover { box-shadow: 0 0 0 2px var(--s-bg), 0 0 0 3px var(--s-action-hover); }
  .start:hover, .btn-text:hover { border-color: var(--s-text); box-shadow: var(--shadow-lift); }
  .pill:hover { border-color: var(--s-border-control); box-shadow: var(--shadow-lift); }
  .start-all:hover { color: var(--s-text); border-color: var(--s-text); }
  .btn-text.btn:hover { background: var(--s-raised); }
}
@media (pointer: fine) {
  .start, .start-all, .pill { min-height: 2.25rem; }
}
@media (pointer: coarse) {
  .btn-text, .leaf-actions .btn-quiet { min-height: var(--target); }
  .advice-about a, .ladder-name a, a.search-name, a.search-jump { display: inline-flex; align-items: center; min-height: var(--target); }
  .glossary summary, .twin summary, .cover-sources summary { min-height: var(--target); display: flex; align-items: center; }
  .rv-num a, .section-bar a, .crumbs a, .brand { min-width: var(--target); }
  select { font-size: max(1rem, 16px); }
  main a, .site-footer a { max-width: 100%; overflow-wrap: anywhere; }
  .chart-scroll a { overflow-wrap: normal; }
}
@media (prefers-reduced-motion: reduce) {
  .btn:active, .start:active, .start-all:active, .pill:active { transform: none; }
}
@media (forced-colors: active) {
  .btn, .icon-btn, .start, .start-all, .pill, .btn-text { border: 1px solid ButtonText; }
  .skip { border: 1px solid LinkText; }
}
.seg { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); min-width: 0; margin: 0; padding: 0; border: 0; }
.seg legend { float: left; margin-right: var(--space-3); padding: 0; line-height: var(--target); }
.seg-in { display: flex; flex-wrap: wrap; max-width: 100%; row-gap: var(--space-1); }
.seg label { position: relative; display: block; cursor: pointer; }
.seg label + label { margin-left: -1px; }
.seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.seg span {
  display: grid; place-items: center; min-width: min(4.5rem, 100%); min-height: var(--target); padding: 0 var(--space-4);
  font: 500 var(--text-sm)/1 var(--font-ui); color: var(--s-muted); background: var(--s-raised); border: 1px solid var(--s-border-control);
  transition: background-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
}
.seg label:first-of-type span { border-radius: var(--radius-pill) 0 0 var(--radius-pill); }
.seg label:last-of-type span { border-radius: 0 var(--radius-pill) var(--radius-pill) 0; }
.seg input:checked + span { position: relative; font-weight: 600; color: var(--s-action-text); background: var(--s-action-bg); border-color: var(--s-action-bg); }
.seg input:focus-visible + span { position: relative; z-index: 1; outline: 2px solid var(--s-focus); outline-offset: -1px; }
@media (hover: hover) { .seg input:not(:checked):hover + span { position: relative; color: var(--s-text); border-color: var(--s-text); } }
@media (forced-colors: active) { .seg input:checked + span { color: HighlightText; background: Highlight; border-color: Highlight; forced-color-adjust: none; } }
.keep-line[aria-pressed="true"]::before { content: "✓ "; content: "✓ " / ""; }
.btn-quiet { max-width: 100%; white-space: normal; padding-block: var(--space-2); line-height: 1.3; text-align: center; }
.continue { margin-bottom: var(--space-5); font-size: var(--text-md); }
.continue a { font-weight: 500; }
@media (pointer: coarse) { .continue a { display: inline-flex; align-items: center; min-height: var(--target); } }
.ic { flex: none; width: 2.5rem; height: 2.5rem; fill: none; stroke: currentColor; stroke-width: 1.5px; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.ic * { vector-effect: non-scaling-stroke; }
.ic-dot { fill: currentColor; stroke: none; }
.ic-node { stroke: var(--s-thread); stroke-width: 2px; fill: var(--s-bg); }
@media (forced-colors: active) { .ic-node { stroke: currentColor; fill: Canvas; } }
@media print {
  :root { --color-bg: #fff; --color-raised: #fff; --color-wash: #fff; }
  .site-header, .section-bar, .site-menu, .site-footer, .skip, .notice, .band-next, .reader-tools, .rail, .to-tools, .pager,
  .copy-quote, .keep-line, .kept-remove, .leaf-pic, .copy-status, .today-head button, .cover-pills, .cover-find, .cover-actions, .ask, .home-wheel,
  .starts, .crisis, .today-week, .today-more, .verse-actions, .leaf-actions, .wall-tools, .wall-more, .jump, .ask-again, .answer-starts, .to-top, .book-foot, .card-foot, .pager-count { display: none !important; }
  .book, .answer-step, .today-card, .cover-card, .cover-book { color: #000; background: #fff !important; box-shadow: none; border: 1px solid #bbb; }
  .book-art, .cover-art { display: none; }
  .surface-cover, .surface-pig, .book, .answer-step { --s-bg: #fff; --s-raised: #fff; --s-text: #000; --s-muted: #444; --s-faint: #555; --s-sanskrit: #000; --s-border: #bbb; --s-thread: var(--lt-thread-text); --s-thread-line: var(--lt-thread); color: #000; background: #fff; }
  body { background: #fff; }
  a { text-decoration: none; }
  .rv, .leaf, .quote, .saying { break-inside: avoid; }
  h1, h2, h3, .counsel-step-label { break-after: avoid; }
  details:not([open]) { display: none; }
}
body { overflow-wrap: break-word; }
@media (max-width: 30rem) {
  .btn, .btn-text { max-width: 100%; white-space: normal; text-align: center; line-height: 1.25; padding-block: var(--space-2); }
}
.band.surface-cover, .site-footer.surface-cover { box-shadow: inset 0 1px 0 var(--color-cover-edge), inset 0 -1px 0 var(--color-cover-edge); }
.tile, .hub-group, .hub-group ul, .hub-group li, .home-card, .wall > li, .leaf, .leaves > li, .line-item { min-width: 0; }
.tile h3 a, .tile h2 a, .hub-group h3 a, .leaf-ref, .leaf-ref a { min-width: 0; overflow-wrap: anywhere; }
.tile h3 a > svg, .tile h2 a > svg, .hub-group h3 a > svg { flex: none; }
.pager { flex-wrap: wrap; max-width: 100%; }
@media (max-width: 30rem) { .text-tag { white-space: normal; } }
@media (max-width: 30rem) { .seg legend { float: none; margin-bottom: var(--space-1); } }
