/* The Four Yogas.
   Layout idea: the hour before dawn. Deep indigo bands with saffron light rising from one corner,
   calm paper for reading, and one colour and emblem for each of the four yogas. */
:root {
  --bg: #f5f4f0; --surface: #ffffff; --ink: #1b1736; --muted: #6a6782; --line: #e3e1ea; --soft: #ecebf5;
  --accent: #e0620d; --accent-2: #f59e0b; --accent-ink: #ffffff;
  --night: #15122e; --night-2: #2c1d55; --on-night: #f6f1e7; --on-night-muted: #bdb7da;
  --mark: #ffe28a; --mark-note: #ffc56e;
  --karma: #e0620d; --karma-2: #a12f04; --bhakti: #d6336c; --bhakti-2: #8a1543;
  --raja: #5b47e0; --raja-2: #2c1d96; --jnana: #0e9488; --jnana-2: #065a55;
  --book: var(--accent); --book-2: var(--karma-2);
  --display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --serif: "Literata", "Iowan Old Style", Georgia, serif;
  --deva: "Tiro Devanagari Sanskrit", "Kohinoor Devanagari", "Noto Serif Devanagari", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --read: 1.15rem; --radius: 18px;
  --shadow: 0 1px 2px rgba(27, 23, 54, .05), 0 6px 20px rgba(27, 23, 54, .06);
  --shadow-up: 0 2px 4px rgba(27, 23, 54, .06), 0 16px 36px rgba(27, 23, 54, .13);
}
[data-theme="sepia"] { --bg: #f2e8d0; --surface: #faf3df; --ink: #33291a; --muted: #7a6b52; --line: #decfa9; --soft: #eadcb8; --mark: #f3cf63; --mark-note: #eeb055; }
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e0c1d; --surface: #181530; --ink: #ece9f8; --muted: #a09bbd; --line: #2c2852; --soft: #231f47;
  --accent: #ff9838; --accent-2: #ffbe5c; --accent-ink: #1c1205; --night: #0a0818; --night-2: #23174a;
  --mark: #6a5312; --mark-note: #86531a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3); --shadow-up: 0 2px 4px rgba(0, 0, 0, .5), 0 18px 40px rgba(0, 0, 0, .45);
}
[data-book="karma"] { --book: var(--karma); --book-2: var(--karma-2); }
[data-book="bhakti"] { --book: var(--bhakti); --book-2: var(--bhakti-2); }
[data-book="raja"] { --book: var(--raja); --book-2: var(--raja-2); }
[data-book="jnana"] { --book: var(--jnana); --book-2: var(--jnana-2); }
[data-theme="dark"] [data-book="raja"], [data-theme="dark"][data-book="raja"], [data-theme="dark"] body[data-book="raja"] { --book: #8f7ff5; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.12; margin: 0 0 .5rem; text-wrap: balance; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 2.7rem); font-variation-settings: "opsz" 120; }
h2 { font-size: 1.45rem; margin-top: 2.6rem; margin-bottom: .9rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 .8rem; }
.muted { color: var(--muted); } .small { font-size: .85rem; }
.eyebrow { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Buttons and inputs */
button, .btn { cursor: pointer; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: .55rem 1.1rem; display: inline-block; font-weight: 600; transition: transform .12s, box-shadow .15s, border-color .15s, background .15s; }
button:hover, .btn:hover { border-color: var(--accent); text-decoration: none; }
button:active, .btn:active { transform: scale(.97); }
button.primary, .btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--accent-ink); border-color: transparent; box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 35%, transparent); }
button.primary:hover, .btn.primary:hover { box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 50%, transparent); }
.btn.light { background: #fff; color: #1b1736; border-color: transparent; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.btn.ghost { background: rgba(255, 255, 255, .1); color: inherit; border-color: rgba(255, 255, 255, .35); }
.btn.ghost:hover { background: rgba(255, 255, 255, .2); border-color: #fff; }
button.link { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 500; }
button.danger { color: #c0352b; }
.btn.small, button.small { padding: .32rem .75rem; font-size: .86rem; }
input, select, textarea { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: .65rem .85rem; width: 100%; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
textarea { min-height: 4.5rem; resize: vertical; }

/* Top bar */
#top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: .8rem; padding: .6rem 1.2rem; border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); flex-wrap: wrap; }
/* The blur sits on a layer behind the bar: on the bar itself it would trap the phone tab bar inside it. */
#top::before { content: ""; position: absolute; inset: 0; z-index: -1; background: color-mix(in srgb, var(--bg) 82%, transparent); -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4); }
.brand { display: flex; align-items: center; gap: .55rem; font-family: var(--display); font-weight: 650; font-size: 1.12rem; color: var(--ink); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand .face { width: 2.25rem; height: 2.25rem; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--accent); }
.brand .names { display: flex; flex-direction: column; line-height: 1.1; }
.brand small { font: 700 .6rem var(--sans); letter-spacing: .13em; text-transform: uppercase; color: var(--accent); }
.hero h1 em { display: block; font-style: italic; font-weight: 400; font-size: .5em; line-height: 1.2; margin-top: .5rem; color: #ffd08a; letter-spacing: 0; }
.portrait { margin: 0 0 -4rem; justify-self: end; align-self: end; width: min(100%, 17.5rem); text-align: center; }
.portrait img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 12%; border-radius: 999px 999px 0 0; filter: sepia(.22) contrast(1.04); box-shadow: 0 0 0 1px rgba(255, 255, 255, .3), 0 0 0 12px rgba(255, 255, 255, .07), 0 -20px 70px rgba(245, 158, 11, .25); }
.portrait figcaption { position: absolute; left: -9999px; }
.om { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: linear-gradient(135deg, var(--karma), #f59e0b); color: #fff; font-family: var(--deva); font-size: 1.05rem; line-height: 1; padding-top: .1rem; box-shadow: 0 3px 10px rgba(224, 98, 13, .4); }
#nav { display: flex; gap: .1rem; flex: 1; }
#nav a { display: flex; align-items: center; gap: .35rem; padding: .4rem .7rem; border-radius: 999px; color: var(--muted); white-space: nowrap; font-weight: 500; font-size: .95rem; }
#nav a:hover { color: var(--ink); text-decoration: none; }
#nav a.on { color: var(--ink); background: var(--soft); font-weight: 650; }
#nav svg { width: 1.3rem; height: 1.3rem; display: none; }
#searchform { flex: 0 1 15rem; } #searchbox { padding: .45rem .9rem; border-radius: 999px; background: var(--soft); border-color: transparent; }
.icon { padding: .38rem .7rem; font-family: var(--display); }
#account { padding: .38rem .9rem; font-size: .9rem; }
#account.me { padding: 0; border: 0; background: none; box-shadow: none; }
.avatar { display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--night); color: var(--on-night); font-weight: 700; font-size: .95rem; }
[data-theme="dark"] .avatar { background: var(--soft); }
#settings { position: fixed; right: 1rem; top: 3.6rem; z-index: 30; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow-up); width: 20rem; max-width: calc(100vw - 2rem); }
#settings .row { display: flex; align-items: center; gap: .35rem; margin-bottom: .6rem; } #settings .row span { flex: 1; font-size: .9rem; }
#settings .row button { padding: .3rem .65rem; font-size: .85rem; }
#settings button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
#readbar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; pointer-events: none; }
#readbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--book), var(--accent-2)); border-radius: 0 3px 3px 0; }

/* Page frame */
main { max-width: 46rem; margin: 0 auto; padding: 1.5rem 1.2rem 6rem; outline: none; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
main.enter > * { animation: rise .4s cubic-bezier(.2, .7, .2, 1) both; }
main.enter > *:nth-child(2) { animation-delay: .04s; } main.enter > *:nth-child(3) { animation-delay: .08s; }
main.enter > *:nth-child(4) { animation-delay: .12s; } main.enter > *:nth-child(n+5) { animation-delay: .16s; }

/* Night bands: full-width openers for home and book pages */
.band { position: relative; overflow: hidden; margin: -1.5rem calc(50% - 50vw) 0; padding: 3rem max(1.2rem, calc(50vw - 21.8rem)) 3.4rem; color: var(--on-night);
  background: radial-gradient(38rem 22rem at 96% 118%, rgba(245, 158, 11, .7), transparent 62%), radial-gradient(56rem 30rem at 88% 125%, rgba(224, 98, 13, .55), transparent 60%), linear-gradient(165deg, var(--night) 20%, var(--night-2)); }
.band::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-radial-gradient(circle at 96% 118%, transparent 0 3.4rem, rgba(255, 255, 255, .07) 3.4rem calc(3.4rem + 1px)); }
.band > * { position: relative; z-index: 1; }
.band h1 { color: #fff; }
.band .lede { color: var(--on-night-muted); font-size: 1.1rem; max-width: 34rem; }
.band .eyebrow { color: #ffc56e; margin-bottom: .7rem; }
.band a:not(.btn) { color: #ffd08a; }
.band[data-book] { background: radial-gradient(34rem 20rem at 100% 0%, rgba(255, 255, 255, .22), transparent 60%), linear-gradient(150deg, var(--book), var(--book-2)); }
.band[data-book]::after { background: repeating-radial-gradient(circle at 100% 0%, transparent 0 3.4rem, rgba(255, 255, 255, .09) 3.4rem calc(3.4rem + 1px)); }
.band[data-book] .lede, .band[data-book] .crumbs, .band[data-book] .crumbs a { color: rgba(255, 255, 255, .85); }
.band .emblem.big { position: absolute; right: max(1rem, calc(50vw - 22rem)); bottom: -2.2rem; width: 13rem; height: 13rem; opacity: .22; z-index: 0; }

.hero { display: grid; grid-template-columns: 1.25fr 1fr; gap: 2.5rem; align-items: end; padding-top: 4rem; padding-bottom: 4rem; }
.hero h1 { font-size: clamp(2.6rem, 7vw, 4.2rem); line-height: 1; margin-bottom: 1rem; font-variation-settings: "opsz" 144; }
.thought { display: flex; flex-direction: column; gap: .7rem; border-radius: var(--radius); padding: 1.3rem 1.4rem; color: inherit; }
.thought:hover { text-decoration: none; }
.thought blockquote { margin: 0; font-family: var(--serif); font-style: italic; font-size: 1.22rem; line-height: 1.5; text-wrap: pretty; }
.thought .src { font-size: .85rem; font-weight: 600; }
.thought.glass { background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .2); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: var(--on-night); }
.thought.glass .eyebrow { margin: 0; } .thought.glass .src { color: #ffd08a; }
.thought.paper { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); margin-top: 2rem; padding: 1.5rem 1.6rem; border-left: 4px solid var(--book); color: var(--ink); transition: transform .18s, box-shadow .18s; }
.thought.paper:hover { transform: translateY(-2px); box-shadow: var(--shadow-up); }
.thought.paper .eyebrow { color: var(--book); margin: 0; } .thought.paper .src { color: var(--book); }
.thought.paper blockquote { font-size: 1.35rem; }

.today { display: flex; justify-content: space-between; align-items: end; gap: 1.5rem; flex-wrap: wrap; padding-bottom: 5.2rem; }
.today h1 { margin-bottom: .3rem; }
.week { display: flex; gap: .5rem; }
.week .d { display: flex; flex-direction: column; align-items: center; gap: .3rem; font-size: .72rem; color: var(--on-night-muted); font-weight: 600; }
.week .d i { width: 1.7rem; height: 1.7rem; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .28); display: grid; place-items: center; }
.week .d.on i { background: linear-gradient(135deg, #ffb347, #ff7a1a); border-color: transparent; box-shadow: 0 0 14px rgba(255, 150, 50, .65); }
.week .d.on i::after { content: ""; width: .5rem; height: .28rem; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translateY(-1px); }
.week .d.now { color: #fff; } .week .d.now i { border-color: #fff; }

/* Covers: anything that carries a yoga's colour */
.cover { position: relative; overflow: hidden; display: flex; flex-direction: column; color: #fff; border-radius: var(--radius); padding: 1.15rem 1.2rem 1.2rem; background: linear-gradient(155deg, var(--book), var(--book-2)); box-shadow: 0 10px 26px color-mix(in srgb, var(--book-2) 38%, transparent); transition: transform .2s cubic-bezier(.2, .7, .2, 1), box-shadow .2s; }
.cover::before { content: ""; position: absolute; inset: 0; background: radial-gradient(14rem 10rem at 100% 0%, rgba(255, 255, 255, .28), transparent 65%); pointer-events: none; }
.cover > * { position: relative; }
a.cover:hover { text-decoration: none; transform: translateY(-4px) rotate(-.4deg); box-shadow: 0 18px 38px color-mix(in srgb, var(--book-2) 50%, transparent); }
.cover:not([data-book]) { background: linear-gradient(155deg, #4a35a0, #1d1645); --book-2: #1d1645; }
.cover h3 { color: #fff; font-size: 1.35rem; margin: 0 0 .15rem; }
.cover .tag { font-size: .9rem; opacity: .9; line-height: 1.35; }
.cover .meta { font-size: .78rem; opacity: .85; margin-top: .7rem; font-weight: 600; }
.cover .emblem { width: 2.6rem; height: 2.6rem; opacity: .95; }
.cover .emblem.ghost { position: absolute; right: -1.6rem; bottom: -1.8rem; width: 8.5rem; height: 8.5rem; opacity: .16; }
.shelf { display: grid; grid-template-columns: repeat(4, 1fr); gap: .9rem; }
.shelf .cover { min-height: 14.5rem; } .shelf .cover h3 { margin-top: auto; padding-top: 2.2rem; }
.bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; } .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--book), var(--accent-2)); border-radius: 3px; }
.cover .bar, .band .bar { background: rgba(255, 255, 255, .28); margin-top: .7rem; } .cover .bar i, .band .bar i { background: #fff; }

.lead { flex-direction: row; align-items: center; gap: 1.4rem; padding: 1.6rem 1.7rem; margin-top: -3.6rem; z-index: 2; }
.lead .lead-text { flex: 1; display: flex; flex-direction: column; gap: .35rem; align-items: flex-start; min-width: 0; }
.lead .kicker { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; opacity: .9; }
.lead .title { font-family: var(--display); font-size: clamp(1.45rem, 3.4vw, 1.9rem); font-weight: 600; line-height: 1.15; text-wrap: balance; }
.lead .sub { opacity: .9; }
.lead .btn { margin-top: .8rem; }
.ring { width: 5.6rem; height: 5.6rem; flex: none; }
.ring .track { fill: none; stroke: rgba(255, 255, 255, .28); stroke-width: 6; }
.ring .fill { fill: none; stroke: #fff; stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset .9s cubic-bezier(.2, .7, .2, 1); }
.ring text { fill: #fff; font: 700 13px var(--sans); }
.ring.ink .track { stroke: var(--line); } .ring.ink .fill { stroke: var(--book); } .ring.ink text { fill: var(--ink); }

.emblem { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.shelf.two { grid-template-columns: 1fr 1fr; } .shelf.two .cover { min-height: 13rem; }
.band[data-book] .eyebrow { color: #fff; opacity: .85; }
.band[data-book] .btn.light { color: var(--book-2); }
@keyframes ringin { from { stroke-dashoffset: 169.65; } }
.ring .fill { animation: ringin 1s cubic-bezier(.2, .7, .2, 1) both; }
a.week:hover { text-decoration: none; }

/* Cards, lists, chips */
.grid { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; color: var(--ink); box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s, border-color .18s; }
a.card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-up); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.card h3 { margin-bottom: .25rem; }
.card.stat { display: flex; flex-direction: column; gap: .25rem; }
.card.go { display: flex; align-items: center; gap: .8rem; } .card.go::after { content: "→"; margin-left: auto; color: var(--accent); font-size: 1.2rem; transition: transform .18s; } a.card.go:hover::after { transform: translateX(4px); }
.card.plan { display: flex; align-items: center; gap: 1rem; } .card.plan .ring { width: 3.9rem; height: 3.9rem; } .card.plan .emblem { width: 2.4rem; height: 2.4rem; color: var(--book); flex: none; }
.list { list-style: none; padding: 0; margin: 0; }
.list li > a { display: flex; gap: .9rem; padding: .7rem .6rem; color: var(--ink); align-items: center; border-radius: 12px; transition: background .12s; }
.list li + li > a { margin-top: 1px; }
.list li > a:hover { background: var(--soft); text-decoration: none; }
.list .num { color: var(--muted); min-width: 1.6rem; font-variant-numeric: tabular-nums; text-align: center; }
.list .grow { flex: 1; font-weight: 550; line-height: 1.3; } .list .grow .small { font-weight: 400; }
.list .meta { color: var(--muted); font-size: .84rem; white-space: nowrap; }
.dial { --p: 0; flex: none; width: 2.3rem; height: 2.3rem; border-radius: 50%; background: conic-gradient(var(--book) calc(var(--p) * 1%), var(--line) 0); display: grid; place-items: center; }
.dial > span { width: 1.95rem; height: 1.95rem; border-radius: 50%; background: var(--bg); display: grid; place-items: center; font-size: .82rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.dial.done { background: var(--book); } .dial.done > span { background: var(--book); color: #fff; }
.part { text-transform: uppercase; letter-spacing: .12em; font-size: .74rem; color: var(--muted); margin: 2rem 0 .5rem .6rem; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: .28rem .8rem; font-size: .88rem; color: var(--ink); transition: border-color .15s, background .15s; }
.chip:hover { border-color: var(--accent); background: var(--soft); text-decoration: none; } .chip b { color: var(--muted); font-weight: 400; }
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: .8rem; } .crumbs a { color: inherit; } .crumbs a:hover { color: var(--accent); }
.notice { background: var(--soft); border-radius: 14px; padding: .85rem 1.1rem; margin: 1rem 0; }
.rowflex { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; } .spacer { flex: 1; }
.stackv { display: flex; flex-direction: column; gap: .55rem; align-items: flex-start; }
form.stack { display: grid; gap: .8rem; max-width: 24rem; } form.stack label { display: grid; gap: .3rem; font-size: .9rem; font-weight: 600; }
.error { color: #c0352b; }
.askbox { display: flex; gap: .5rem; } .askbox input { border-radius: 999px; padding: .8rem 1.2rem; box-shadow: var(--shadow); }

/* Reader */
.chapter-head { margin: 1.2rem 0 2.2rem; padding-bottom: 1.4rem; position: relative; }
.chapter-head::after { content: ""; position: absolute; left: 0; bottom: 0; width: 3.5rem; height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--book), var(--accent-2)); }
.chapter-head .kicker { display: flex; align-items: center; gap: .5rem; text-transform: uppercase; letter-spacing: .12em; font-size: .76rem; font-weight: 700; color: var(--book); margin-bottom: .7rem; }
.chapter-head .kicker .emblem { width: 1.5rem; height: 1.5rem; }
.chapter-head h1 { font-size: clamp(2.1rem, 5.5vw, 3.1rem); margin: 0 0 .6rem; font-variation-settings: "opsz" 144; }
.chapter-head .byline { color: var(--muted); font-size: .92rem; }
.para { display: grid; grid-template-columns: 2.2rem 1fr; gap: .2rem; margin-bottom: 1.15rem; scroll-margin-top: 5rem; border-radius: 10px; cursor: pointer; transition: background .15s, box-shadow .15s; }
.para.target, .para.active { background: var(--soft); box-shadow: 0 0 0 .55rem var(--soft); }
.pn { align-self: start; font-size: .7rem; color: color-mix(in srgb, var(--muted) 70%, transparent); padding: .55rem .55rem 0 0; text-align: right; border: 0; background: none; border-radius: 4px; font-variant-numeric: tabular-nums; font-weight: 500; }
.pn:hover { color: var(--book); border: 0; }
.pt { font-family: var(--serif); font-size: var(--read); line-height: 1.75; white-space: pre-wrap; overflow-wrap: break-word; font-variation-settings: "opsz" 14; }
.para.dropcap .pt::first-letter { font-family: var(--display); font-weight: 600; float: left; font-size: 3.9em; line-height: .82; padding: .09em .1em 0 0; color: var(--book); }
.t-heading .pt { font-family: var(--display); font-weight: 600; font-size: calc(var(--read) * 1.15); margin-top: 1.4rem; }
.t-verse .pt { font-style: italic; padding-left: 1.2rem; border-left: 2px solid color-mix(in srgb, var(--book) 40%, transparent); }
.t-sanskrit { margin-top: 2.2rem; margin-bottom: .5rem; }
.t-sanskrit .pt { font-family: var(--deva); font-size: calc(var(--read) * 1.3); text-align: center; color: var(--book); line-height: 1.7; }
.t-sutra .pt { font-weight: 600; font-size: calc(var(--read) * 1.06); background: color-mix(in srgb, var(--book) 9%, var(--surface)); border-left: 4px solid var(--book); border-radius: 0 12px 12px 0; padding: .7rem 1rem; }
.eop { grid-column: 1 / -1; height: 1px; }
mark { background: linear-gradient(transparent 8%, var(--mark) 8% 92%, transparent 92%); color: inherit; border-radius: 3px; cursor: pointer; padding: .05em .12em; margin: 0 -.12em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
mark.noted { background: linear-gradient(transparent 8%, var(--mark-note) 8% 92%, transparent 92%); border-bottom: 2px solid var(--accent); }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 3rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.pager a { max-width: 48%; }
.daybreak { font-family: var(--display); font-weight: 600; margin: 2.2rem 0 1.2rem 2.4rem; font-size: .95rem; } .daybreak a { color: var(--book); }

.pactions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: -.3rem 0 1.4rem 2.4rem; position: sticky; bottom: 1rem; z-index: 15; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .4rem .5rem .4rem 1rem; box-shadow: var(--shadow-up); width: fit-content; max-width: 100%; animation: rise .22s both; }
.pactions .addr { font-size: .78rem; color: var(--muted); margin-right: .3rem; font-weight: 600; }
.pactions button, .pactions .btn { padding: .36rem .85rem; font-size: .88rem; }
.pactions [data-pa="hl"] { background: var(--mark); border-color: var(--mark); color: #2b2206; }
#selbar { position: fixed; z-index: 40; left: 50%; bottom: 1.2rem; transform: translateX(-50%); background: var(--night); color: var(--on-night); border-radius: 999px; padding: .35rem; display: flex; gap: .25rem; box-shadow: var(--shadow-up); }
#selbar[hidden], #panel[hidden], #toast[hidden], #settings[hidden], #readbar[hidden] { display: none; }
#selbar button, #selbar a { background: none; border: 0; color: inherit; padding: .5rem 1rem; border-radius: 999px; font-weight: 650; box-shadow: none; }
#selbar button:hover, #selbar a:hover { background: rgba(255, 255, 255, .16); text-decoration: none; }
#toast { position: fixed; z-index: 70; left: 50%; bottom: 4.6rem; transform: translateX(-50%); background: var(--night); color: var(--on-night); padding: .6rem 1.2rem; border-radius: 999px; max-width: 90vw; box-shadow: var(--shadow-up); font-weight: 550; animation: rise .25s both; }
[data-theme="dark"] #toast, [data-theme="dark"] #selbar { background: #2c2760; }

#panel { position: fixed; z-index: 25; right: 0; top: 3.5rem; bottom: 0; width: 23rem; max-width: 100vw; background: var(--surface); border-left: 1px solid var(--line); padding: 1.1rem 1.2rem 3rem; overflow-y: auto; box-shadow: -10px 0 40px rgba(27, 23, 54, .1); animation: slide .25s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
#panel h3 { margin-top: 1.6rem; font-family: var(--sans); font-size: .74rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 700; }
#panel .head { display: flex; align-items: center; gap: .5rem; } #panel .head strong { flex: 1; font-family: var(--display); font-size: 1.2rem; }
.hl { border: 1px solid var(--line); border-radius: 14px; padding: .7rem .8rem; margin-bottom: .6rem; }
.hl.focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.quote { font-family: var(--serif); border-left: 3px solid var(--mark-note); padding-left: .7rem; margin: 0 0 .5rem; white-space: pre-wrap; }
.rel { display: block; padding: .65rem .5rem; margin: 0 -.5rem; border-radius: 10px; color: var(--ink); font-size: .92rem; font-family: var(--serif); line-height: 1.5; }
.rel + .rel { border-top: 1px solid var(--line); }
.rel b { display: block; color: var(--accent); font: 650 .78rem var(--sans); margin-bottom: .15rem; }
.rel:hover { text-decoration: none; background: var(--soft); }
@media (min-width: 761px) { body.panel-open main { margin-right: 24rem; } }

/* Search, notebook, ask, circles, plans, context */
.result { display: block; padding: .95rem .7rem; margin: 0 -.7rem; border-radius: 12px; color: var(--ink); }
.result + .result { border-top: 1px solid var(--line); }
.result:hover { text-decoration: none; background: var(--soft); }
.result .where { font-size: .78rem; color: var(--accent); font-weight: 650; margin-bottom: .2rem; }
.result .snip { font-family: var(--serif); line-height: 1.6; }
.result mark { cursor: inherit; }
.note-item { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 1rem 1.2rem; margin-bottom: .8rem; box-shadow: var(--shadow); }
.note-item .mynote { margin: .2rem 0 .4rem; white-space: pre-wrap; }
.review-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem 1.7rem; box-shadow: var(--shadow-up); }
.answer { font-family: var(--serif); font-size: 1.12rem; line-height: 1.75; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.5rem; white-space: pre-wrap; box-shadow: var(--shadow); border-top: 4px solid var(--accent); }
.answer a { font-family: var(--sans); font-size: .78rem; white-space: nowrap; background: var(--soft); padding: .1rem .5rem; border-radius: 999px; font-weight: 600; }
.post { border-left: 3px solid var(--line); padding: .3rem 0 .3rem .9rem; margin: 1rem 0; } .post .reply { margin: .6rem 0 0 1rem; }
.post .by { font-size: .82rem; color: var(--muted); } .post .body { white-space: pre-wrap; }
.days { display: grid; grid-template-columns: repeat(auto-fill, minmax(2.6rem, 1fr)); gap: .45rem; margin: 1.4rem 0; }
.days a { display: grid; place-items: center; aspect-ratio: 1; border: 1.5px solid var(--line); border-radius: 50%; color: var(--ink); background: var(--surface); font-variant-numeric: tabular-nums; font-size: .9rem; font-weight: 600; transition: transform .12s; }
.days a:hover { text-decoration: none; transform: scale(1.1); border-color: var(--book); }
.days a.done { background: var(--book); color: #fff; border-color: var(--book); } .days a.next { border-color: var(--book); box-shadow: 0 0 0 3px color-mix(in srgb, var(--book) 25%, transparent); }
.planhead { display: flex; align-items: center; gap: 1.2rem; } .planhead .ring { width: 5rem; height: 5rem; }
.timeline { border-left: 2px solid var(--line); margin-left: .5rem; padding-left: 1.3rem; }
.timeline .ev { position: relative; margin-bottom: 1.1rem; } .timeline .ev::before { content: ""; position: absolute; left: -1.75rem; top: .4rem; width: .7rem; height: .7rem; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--bg); }
#map { height: 20rem; border-radius: var(--radius); border: 1px solid var(--line); margin: 1rem 0; background: var(--soft); z-index: 0; }
.code { font-family: ui-monospace, Menlo, monospace; letter-spacing: .14em; font-size: 1.1rem; background: var(--soft); padding: .25rem .7rem; border-radius: 8px; user-select: all; }

/* Signing in: a sheet over the page (a card on wide screens, rising from the bottom on phones) */
#authsheet { border: 0; border-radius: 24px; padding: 2rem 2rem 1.6rem; width: min(26rem, calc(100vw - 2rem)); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-up); }
#authsheet[open] { animation: rise .28s cubic-bezier(.2, .7, .2, 1) both; }
#authsheet::backdrop { background: rgba(14, 12, 29, .55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
#authsheet .close { position: absolute; top: .8rem; right: .8rem; font-size: 1.2rem; line-height: 1; padding: .3rem .65rem; }
#authsheet h2, .authpage h2 { margin-top: 0; font-size: 1.7rem; }
#authsheet form.stack, .authpage form.stack { max-width: none; }
.authpage { max-width: 24rem; margin-top: 2rem; }
.who { display: flex; align-items: center; gap: .6rem; background: var(--soft); border-radius: 12px; padding: .2rem .9rem .2rem .2rem; }
.who input { border: 0; background: none; box-shadow: none; font-weight: 600; padding-left: .7rem; }
.passwrap { position: relative; display: block; } .passwrap input { padding-right: 4rem; }
.passwrap button { position: absolute; right: .9rem; top: 50%; transform: translateY(-50%); }
button:disabled { opacity: .55; cursor: default; }
@media (max-width: 760px) { #authsheet { margin: auto 0 0; width: 100vw; max-width: 100vw; border-radius: 24px 24px 0 0; padding-bottom: calc(1.6rem + env(safe-area-inset-bottom)); } }

/* A small burst when a day's reading is finished */
.burst { position: fixed; left: 50%; top: 45%; z-index: 80; pointer-events: none; }
.burst i { position: absolute; width: .7rem; height: 1.1rem; border-radius: 60% 60% 60% 60% / 80% 80% 40% 40%; background: var(--c); animation: petal 1.2s cubic-bezier(.15, .7, .3, 1) both; }
@keyframes petal { from { transform: translate(0, 0) rotate(0) scale(.4); opacity: 1; } to { transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(1); opacity: 0; } }

@media (min-width: 1000px) { .shelf:not(.two) { margin-inline: -4.5rem; } }
@media (max-width: 760px) {
  /* Phones: section links become a tab bar along the bottom. */
  #nav { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-top: 1px solid var(--line); justify-content: space-around; padding: .35rem .2rem calc(.35rem + env(safe-area-inset-bottom)); gap: 0; }
  #nav a { flex-direction: column; gap: .1rem; padding: .25rem .35rem; font-size: .68rem; border-radius: 12px; min-width: 3.2rem; }
  #nav a.on { background: none; color: var(--accent); }
  #nav svg { display: block; }
  .brand { flex: 1; }
  #searchform { flex: 1 1 100%; order: 5; }
  main { padding-bottom: 8rem; }
  #selbar { bottom: 4.8rem; } #toast { bottom: 8rem; }
  #panel { top: auto; left: 0; width: auto; max-height: 72vh; border-left: 0; border-top: 1px solid var(--line); border-radius: 22px 22px 0 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, .22); z-index: 26; animation-name: rise; }
  .para { grid-template-columns: 1.6rem 1fr; }
  .pactions { margin-left: 0; bottom: 4.8rem; border-radius: 20px; padding: .5rem .6rem; }
  .daybreak { margin-left: 1.8rem; }
  .hero { grid-template-columns: 1fr; gap: 2.2rem; padding-top: 2.6rem; padding-bottom: 2.6rem; }
  .portrait { justify-self: center; width: 13rem; margin-bottom: -2.6rem; }
  .shelf { grid-template-columns: 1fr 1fr; } .shelf .cover { min-height: 12rem; }
  .band .emblem.big { width: 9rem; height: 9rem; right: -1rem; }
  .lead { padding: 1.3rem; gap: .9rem; } .ring { width: 4.4rem; height: 4.4rem; }
  .week { gap: .35rem; } .week .d i { width: 1.5rem; height: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print { #top, #panel, #selbar, .pager, .pactions, #readbar { display: none; } }
