
/* Layout: a small library of one argument. Each book is a solid colour slab (its cover);
   the main book leads, the essential article sits in a saffron-marked band, videos are cards in the book's colour. */
:root {
  --paper: #f5f5f1;
  --surface: #ecece6;
  --ink: #191c21;
  --muted: #5b6068;
  --rule: #d8d8d0;
  --indigo: #2c3b6b;      /* The Logical Necessity of a Substrateless World */
  --moss: #4b5a37;        /* The Transition from Anatta to Emptiness */
  --clay: #7a4a32;        /* Nagarjuna's Middle Way */
  --plum: #5a3d5c;        /* The Observer and the Taste of Presence */
  --saffron: #b8841f;     /* the essential article */
  --link: #2c3b6b;
  --on-slab: #f3f1ea;
  --display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --text: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --ui: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121418; --surface: #1b1e24; --ink: #e8e6e0; --muted: #a2a6ad; --rule: #2c3038;
    --indigo: #34477f; --moss: #4f5f39; --clay: #8a5639; --plum: #6b4a6d; --saffron: #d9a646; --link: #a9b8ea; --on-slab: #f3f1ea;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
body { background: var(--paper); color: var(--ink); font-family: var(--text); font-size: 1.0625rem; line-height: 1.7; }
a { color: var(--link); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--saffron); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.08; text-wrap: balance; margin: 0; letter-spacing: -.005em; }
p { margin: 0; }
.wrap { max-width: 72rem; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.label { font-family: var(--ui); font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.label.saffron { color: var(--saffron); }

/* Header */
.top { border-bottom: 1px solid var(--rule); }
.top .wrap { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 2rem; padding-block: 1.1rem; }
.mark { font-family: var(--display); font-size: 1.45rem; font-weight: 600; color: var(--ink); text-decoration: none; }
.mark span { color: var(--muted); font-weight: 500; }
.mark { display: inline-flex; align-items: center; gap: .55rem; }
.mark .seal { flex: none; width: 1.9rem; height: 1.9rem; border-radius: .4rem; background: #9b2c22; color: #f6e7d8; display: grid; place-items: center;
  font-family: "Songti SC", "Noto Serif CJK SC", "Noto Serif SC", "Source Han Serif SC", serif; font-size: 1.15rem; font-weight: 700; line-height: 1;
  box-shadow: inset 0 0 0 2px rgba(246, 231, 216, .35); }
.nav { display: flex; flex-wrap: wrap; gap: .3rem 1.4rem; font-family: var(--ui); font-size: .95rem; }
.nav a { color: var(--ink); text-decoration: none; padding: .2rem 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--saffron); }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.btn { font-family: var(--ui); font-size: .95rem; font-weight: 600; display: inline-flex; align-items: center; gap: .5rem; padding: .7rem 1.2rem; border-radius: 3px; text-decoration: none; border: 1.5px solid var(--ink); color: var(--ink); }
.btn:hover { background: var(--ink); color: var(--paper); }
.btn.solid { background: var(--ink); color: var(--paper); }
.btn.solid:hover { background: transparent; color: var(--ink); }
.btn .tri { width: 0; height: 0; border-left: 8px solid currentColor; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }

/* Cover slabs */
.cover { position: relative; aspect-ratio: 2 / 3; max-width: 100%; color: var(--on-slab); border-radius: 2px 6px 6px 2px; overflow: hidden; padding: 9% 9% 8%; display: flex; flex-direction: column; justify-content: space-between; box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 18px 40px -22px rgba(0,0,0,.55); }
.cover.indigo { background: var(--indigo); }
.cover.moss { background: var(--moss); }
.cover::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3.5%; background: linear-gradient(90deg, rgba(0,0,0,.28), transparent); }
.cover svg.net { position: absolute; inset: 0; width: 100%; height: 100%; }
.cover .ct { position: relative; font-family: var(--display); font-weight: 600; line-height: 1.02; font-size: clamp(1.4rem, 3.4vw, 2.5rem); text-wrap: balance; }
.cover .ct small { display: block; font-size: .5em; font-weight: 500; font-style: italic; opacity: .85; margin-bottom: .4em; }
.cover .ca { position: relative; font-family: var(--ui); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; opacity: .9; }
.cover.sm .ct { font-size: clamp(1.1rem, 2vw, 1.45rem); }

/* Home hero */
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 3rem 4rem; align-items: center; padding-block: 3.5rem 3rem; }
.hero h1 { font-size: clamp(2.5rem, 5.6vw, 4.6rem); margin: .6rem 0 1.2rem; }
.hero .dek { font-size: 1.2rem; color: var(--muted); max-width: 34rem; margin-bottom: 1.6rem; }
.hero .quote { font-family: var(--display); font-style: italic; font-size: 1.5rem; line-height: 1.3; border-left: 2px solid var(--saffron); padding-left: 1rem; margin: 0 0 1.8rem; max-width: 30rem; }
.hero .cover { width: min(100%, 22rem); justify-self: center; }

/* Essential band */
.essential { background: var(--surface); border-top: 3px solid var(--saffron); }
.essential .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 2rem 4rem; padding-block: 3rem; align-items: start; }
.essential h2 { font-size: clamp(2rem, 4vw, 3rem); margin: .5rem 0 .8rem; }
.essential .lead { font-size: 1.1rem; color: var(--muted); }
.essential .excerpt p + p { margin-top: 1rem; }
.essential .excerpt { max-width: 38rem; }
.essential .actions { margin-top: 1.5rem; }

/* Sections */
.section { padding-block: 3.2rem; }
.section + .section { border-top: 1px solid var(--rule); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 2rem; margin-bottom: 1.6rem; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }

/* Video cards */
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1.6rem 1.25rem; }
.vcard { display: flex; flex-direction: column; gap: .55rem; text-decoration: none; color: var(--ink); min-width: 0; }
.thumb { text-decoration: none; position: relative; aspect-ratio: 16 / 9; max-width: 100%; border-radius: 4px; overflow: hidden; color: var(--on-slab); padding: .8rem 1rem; display: flex; flex-direction: column; justify-content: space-between; }
.thumb.indigo { background: var(--indigo); } .thumb.moss { background: var(--moss); } .thumb.clay { background: var(--clay); } .thumb.plum { background: var(--plum); }
.thumb.key { box-shadow: inset 0 0 0 3px var(--saffron); }
.thumb .num { font-family: var(--display); font-size: 2.6rem; font-weight: 600; line-height: 1; font-variant-numeric: lining-nums; }
.thumb .tt { font-family: var(--display); font-size: 1.15rem; line-height: 1.15; font-weight: 600; text-wrap: balance; }
.thumb .play { position: absolute; right: .9rem; top: .9rem; width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 1.5px solid rgba(243,241,234,.7); display: grid; place-items: center; }
.thumb .play::after { content: ""; margin-left: 3px; border-left: 10px solid var(--on-slab); border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.vcard:hover .play { background: rgba(243,241,234,.15); }
.vcard .vt { font-family: var(--ui); font-size: .9rem; color: var(--muted); }
.vcard .vt b { color: var(--ink); font-weight: 600; }

/* Companion */
.companion { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: 2rem; align-items: center; max-width: 52rem; }
.companion h3 { font-size: 2rem; margin: .4rem 0 .6rem; }
.companion p { color: var(--muted); }
.companion .actions { margin-top: 1.1rem; }

/* Book page */
.bookhead .wrap { display: grid; grid-template-columns: minmax(0, 17rem) minmax(0, 1fr); gap: 2.5rem 4rem; align-items: end; padding-block: 3rem 2.5rem; }
.bookhead h1 { font-size: clamp(2.2rem, 4.6vw, 3.8rem); margin: .5rem 0 .8rem; }
.bookhead .sub { font-family: var(--display); font-style: italic; font-size: 1.35rem; color: var(--muted); margin-bottom: 1rem; }
.bookhead .desc { max-width: 38rem; margin-bottom: 1.5rem; }
.meta-row { font-family: var(--ui); font-size: .9rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .3rem 1.4rem; margin-bottom: 1.4rem; }

.toc { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); max-width: 52rem; }
.toc li { display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto; gap: .3rem 1rem; align-items: baseline; padding: .95rem 0; border-bottom: 1px solid var(--rule); }
.toc .n { font-family: var(--display); font-size: 1.35rem; font-weight: 600; color: var(--muted); font-variant-numeric: lining-nums tabular-nums; }
.toc .t { font-family: var(--display); font-size: 1.3rem; font-weight: 600; line-height: 1.2; }
.toc .t a { color: var(--ink); text-decoration: none; }
.toc .t a:hover { color: var(--link); text-decoration: underline; }
.toc .t .note { display: block; font-family: var(--text); font-weight: 400; font-size: .95rem; color: var(--muted); margin-top: .2rem; }
.toc .go { font-family: var(--ui); font-size: .9rem; display: flex; gap: 1rem; white-space: nowrap; }
.toc .go .soft { color: var(--muted); }
.toc li.key .n { color: var(--saffron); }
.pill { display: inline-block; font-family: var(--ui); font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--saffron); border: 1px solid var(--saffron); border-radius: 99px; padding: .05rem .55rem; margin-left: .5rem; vertical-align: .25em; }

/* Reading pages */
.reading { padding-block: 3rem 4rem; }
.reading .head { max-width: 42rem; margin: 0 auto 2.2rem; }
.reading .head h1 { font-size: clamp(2.3rem, 5vw, 3.8rem); margin: .6rem 0 .9rem; }
.reading .head .dek { font-size: 1.2rem; color: var(--muted); }
.watchbox { max-width: 42rem; margin: 0 auto 2.5rem; display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; background: var(--surface); border-radius: 4px; padding: 1rem 1.2rem; font-family: var(--ui); font-size: .95rem; }
.watchbox .thumb { width: 9rem; padding: .5rem .7rem; }
.watchbox .thumb .num { font-size: 1.5rem; }
.watchbox > div:last-child { flex: 1 1 14rem; min-width: 0; }
.contents { max-width: 42rem; margin: 0 auto 2.8rem; font-family: var(--ui); font-size: .95rem; }
.contents ol { margin: .6rem 0 0; padding-left: 1.3rem; columns: 2 16rem; column-gap: 2rem; }
.contents li { margin-bottom: .25rem; break-inside: avoid; }
.contents button { all: unset; cursor: pointer; color: var(--link); text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }
.contents button:focus-visible { outline: 2px solid var(--saffron); outline-offset: 2px; }
.prose { max-width: 42rem; margin: 0 auto; }
.prose p { margin: 0 0 1.15em; hanging-punctuation: first; }
.prose h2 { font-size: 2rem; margin: 2.6rem 0 1rem; scroll-margin-top: 1rem; }
.prose h3 { font-size: 1.5rem; margin: 2.2rem 0 .8rem; }
.prose ol { padding-left: 1.4rem; margin: 0 0 1.2em; }
.prose li { margin-bottom: .8em; }
.prose strong { font-weight: 600; }
.tablewrap { overflow-x: auto; margin: 1.6rem 0 2rem; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule); }
.tablewrap table { border-collapse: collapse; width: 100%; min-width: 34rem; font-family: var(--ui); font-size: .92rem; line-height: 1.45; }
.tablewrap th, .tablewrap td { text-align: left; vertical-align: top; padding: .65rem .8rem .65rem 0; border-bottom: 1px solid var(--rule); }
.tablewrap th { font-weight: 600; }
.tablewrap td:first-child { font-weight: 600; white-space: nowrap; }
.endnav { max-width: 42rem; margin: 3rem auto 0; padding-top: 1.2rem; border-top: 2px solid var(--rule); display: flex; flex-wrap: wrap; gap: .8rem; justify-content: space-between; font-family: var(--ui); }

/* About */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 2rem 4rem; }
.about h2 { font-size: clamp(2rem, 4vw, 3rem); }
.about .prose { margin: 0; }

.foot { border-top: 1px solid var(--rule); margin-top: 2rem; }
.foot .wrap { padding-block: 1.6rem 2.2rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem 2rem; font-family: var(--ui); font-size: .88rem; color: var(--muted); }
.foot .foot-note { flex-basis: 100%; font-size: .82rem; }
.head .disclaimer, .prose .disclaimer { font-size: .92rem; color: var(--muted); }

.page { display: none; }
.page.on { display: block; }

@media (max-width: 760px) {
  .hero .wrap, .essential .wrap, .bookhead .wrap, .about { grid-template-columns: minmax(0, 1fr); }
  .hero .wrap { padding-block: 2rem; gap: 2rem; }
  .hero .cover { width: min(70%, 15rem); order: -1; justify-self: start; }
  .bookhead .cover { width: min(60%, 13rem); }
  .companion { grid-template-columns: minmax(0, 7rem) minmax(0, 1fr); gap: 1.2rem; }
  .toc li { grid-template-columns: 2.2rem minmax(0, 1fr); }
  .toc .go { grid-column: 2; }
}
@media (prefers-reduced-motion: no-preference) {
  .page.on { animation: in .35s ease-out; }
  @keyframes in { from { opacity: .4; transform: translateY(4px); } to { opacity: 1; transform: none; } }
}

.herothumb { width: min(100%, 26rem); justify-self: center; padding: 1.2rem 1.4rem; }
.herothumb .num { font-size: 4rem; }
.herothumb .tt { font-size: 1.6rem; }
.herothumb .play { width: 3.2rem; height: 3.2rem; right: 1.2rem; top: 1.2rem; }
.lead-article { border-bottom: 3px solid var(--saffron); background: var(--surface); }
.books { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem 3rem; }
.book { display: grid; grid-template-columns: minmax(0, 9.5rem) minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.book h3 { font-size: 1.75rem; margin: .4rem 0 .6rem; }
.book p:not(.label) { color: var(--muted); }
.book .actions { margin-top: 1.1rem; }
@media (max-width: 900px) { .books { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .lead-article .herothumb { order: 0; width: 100%; } .book { grid-template-columns: minmax(0, 6.5rem) minmax(0, 1fr); } }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.2rem; }
.chip { font-family: var(--ui); font-size: .92rem; font-weight: 600; padding: .45rem .95rem; border-radius: 99px; border: 1.5px solid var(--rule); background: transparent; color: var(--ink); cursor: pointer; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.topic-intro { font-size: 1.1rem; color: var(--muted); max-width: 40rem; min-height: 1.5em; margin-bottom: 1.2rem; }
.xlist { list-style: none; margin: 0 0 3rem; padding: 0; border-top: 1px solid var(--rule); max-width: 52rem; }
.xlist li { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: .3rem 1rem; padding: 1rem 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.xlist li.none { display: block; color: var(--muted); font-style: italic; }
.kind { font-family: var(--ui); font-size: .75rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.kind.article { color: var(--saffron); }
.xt { font-family: var(--display); font-size: 1.35rem; font-weight: 600; line-height: 1.2; }
.xt a { color: var(--ink); text-decoration: none; } .xt a:hover { color: var(--link); text-decoration: underline; }
.xd { display: block; font-family: var(--text); font-weight: 400; font-size: .97rem; color: var(--muted); margin-top: .2rem; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .45rem; }
.tags span { font-family: var(--ui); font-size: .75rem; color: var(--muted); border: 1px solid var(--rule); border-radius: 99px; padding: 0 .55rem; }
.topics { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1rem; }
.topic { display: flex; flex-direction: column; gap: .5rem; padding: 1.2rem 1.2rem 1.4rem; border: 1px solid var(--rule); border-radius: 4px; text-decoration: none; color: var(--ink); min-width: 0; }
.topic b { font-family: var(--display); font-size: 1.3rem; font-weight: 600; line-height: 1.2; }
.topic:hover { border-color: var(--ink); }
@media (max-width: 760px) { .xlist li { grid-template-columns: minmax(0, 1fr); } }

.mmk { list-style: none; margin: 0 0 3rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.mmk li { border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: var(--paper); padding: 1rem 1.1rem 1.15rem; display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.mmk li.has { background: var(--surface); }
.mn { font-family: var(--display); font-size: 1.9rem; font-weight: 600; line-height: 1; color: var(--muted); font-variant-numeric: lining-nums; }
.mmk li.has .mn { color: var(--saffron); }
.mt { font-family: var(--display); font-size: 1.25rem; font-weight: 600; line-height: 1.2; }
.mc { font-family: var(--ui); font-size: .85rem; color: var(--muted); }
.mc .refs { white-space: normal; }
.mc.soon { font-style: italic; }
.mt a { color: var(--ink); text-decoration: none; } .mt a:hover { color: var(--link); text-decoration: underline; }
.mc.mread { font-weight: 600; }

.mv { display: flex; gap: .5rem; align-items: baseline; font-family: var(--ui); font-size: .9rem; font-weight: 600; color: var(--link); text-decoration: none; margin-top: .2rem; }
.mmk-note { font-family: var(--ui); font-size: .95rem; color: var(--muted); margin: -.4rem 0 1.2rem; }
.mv .tri { flex: none; width: 0; height: 0; border-left: 7px solid var(--saffron); border-top: 4.5px solid transparent; border-bottom: 4.5px solid transparent; }
.mv:hover { text-decoration: underline; }
.mmk-intro { margin-bottom: 2rem; }
.mmk-start { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; margin-top: .7rem; }
.kind.youtube { color: var(--link); }

/* Book chapters */
.prose ul { padding-left: 1.4rem; margin: 0 0 1.2em; }
.prose h4 { font-family: var(--ui); font-size: 1rem; font-weight: 600; margin: 1.8rem 0 .6rem; }
.prose blockquote { margin: 0 0 1.2em; padding-left: 1rem; border-left: 2px solid var(--rule); color: var(--muted); }
.callout { background: var(--surface); border-left: 3px solid var(--saffron); border-radius: 2px; padding: 1rem 1.2rem .1rem; margin: 0 0 1.8rem; }
.callout-label { font-family: var(--ui); font-size: .75rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--saffron); margin-bottom: .4rem !important; }
.prose .figure { margin: 2rem 0 .6rem; }
.prose .figure img { display: block; width: 100%; height: auto; background: #fff; border-radius: 4px; }
.prose .caption { font-family: var(--ui); font-size: .9rem; line-height: 1.5; color: var(--muted); margin-bottom: 2rem; }
.prose .tablewrap td:first-child { white-space: normal; min-width: 7rem; }
.prose .tablewrap.plain td:first-child { font-weight: 400; }
.watchbox .vids { display: flex; flex-wrap: wrap; gap: .2rem 1rem; margin-top: .2rem; }
.toc .n:empty::before { content: "·"; }

/* Listen: the browser reads the page aloud */
.listen { max-width: 42rem; margin: 0 auto 2.5rem; display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; font-family: var(--ui); font-size: .92rem; color: var(--muted); }
.listen button { font: inherit; font-weight: 600; padding: .5rem 1.1rem; border-radius: 3px; border: 1.5px solid var(--ink); background: var(--ink); color: var(--paper); cursor: pointer; }
.listen button.ghost { background: transparent; color: var(--ink); }
.listen select { font: inherit; padding: .3rem .4rem; border: 1px solid var(--rule); border-radius: 3px; background: var(--paper); color: var(--ink); }
.listen .lbtns { display: inline-flex; flex-wrap: wrap; gap: .4rem; }
.listen button.lstep { padding: .5rem .8rem; min-width: 2.6rem; }
.listen .lpick { max-width: 15rem; }
.listen .lvoice { flex: 1 1 100%; font-size: .85rem; }
.listen.on { position: sticky; top: 0; z-index: 5; background: var(--paper); padding: .7rem 0; border-bottom: 1px solid var(--rule); }
.listen.on .lvoice { display: none; }
::highlight(listen-now) { background-color: rgba(217, 166, 70, .5); }
.speaking { background: rgba(184, 132, 31, .16); box-shadow: -.5rem 0 0 rgba(184, 132, 31, .16), .5rem 0 0 rgba(184, 132, 31, .16); border-radius: 2px; }

/* MMK videos play on the page */
.watchbox video { display: block; width: 100%; aspect-ratio: 16 / 9; max-width: 100%; border-radius: 4px; background: #000; }
.watchbox .vcap { flex: 1 1 100%; }
/* MMK chapters: verses and diagrams */
.verses { margin: 0 0 2rem; border-top: 1px solid var(--rule); }
.verse { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: .3rem 1rem; padding: 1rem 0; border-bottom: 1px solid var(--rule); }
.verse .vn { font-family: var(--ui); font-size: .85rem; font-weight: 600; color: var(--saffron); padding-top: .2rem; }
.verse .sa { overflow-wrap: anywhere; font-style: italic; font-size: .92rem; line-height: 1.55; color: var(--muted); margin-bottom: .5rem; }
.verse p { margin: 0; }
@media (max-width: 560px) { .verse { grid-template-columns: minmax(0, 1fr); } }
.dg { margin: 2rem 0; overflow-x: auto; }
.dg svg { display: block; width: 100%; min-width: 34rem; height: auto; color: var(--ink); font-family: var(--ui); }
.dg figcaption { font-family: var(--ui); font-size: .9rem; line-height: 1.5; color: var(--muted); margin-top: .6rem; }
.dg .h { font-size: 15px; font-weight: 600; fill: currentColor; }
.dg .t { font-size: 13px; fill: currentColor; }
.dg .muted { fill: var(--muted); }
.dg .on { font-size: 13px; font-weight: 600; fill: #fff; }
.dg .strike { text-decoration: line-through; }
.dg .box rect, .dg rect.box, .dg circle.box, .dg .box circle { fill: none; stroke: currentColor; stroke-width: 1.3; }
.dg rect.acc { stroke: var(--saffron); stroke-width: 2; }
.dg .acc-fill { fill: var(--saffron); }
.dg .dash { fill: none; stroke: var(--muted); stroke-width: 1.3; stroke-dasharray: 5 4; }
.dg .ln, .dg .ln line { stroke: currentColor; stroke-width: 1.3; fill: none; }
.dg .rule { stroke: var(--rule); stroke-width: 1; }
.dg .x path { stroke: var(--saffron); stroke-width: 2.5; stroke-linecap: round; }

/* Slimmer layout (2026-10-21): menu button on phones, three books, short Watch rows */
.menu-btn { display: none; font-family: var(--ui); font-size: .95rem; font-weight: 600; color: var(--ink); background: transparent; border: 1.5px solid var(--rule); border-radius: 3px; padding: .35rem .85rem; cursor: pointer; }
.cover.clay { background: var(--clay); }
.cover.plum { background: var(--plum); }
.draft-note { font-family: var(--ui); font-size: .92rem; color: var(--muted); border-left: 3px solid var(--plum); padding: .2rem 0 .2rem .9rem; margin: 0 0 1.4rem; max-width: 38rem; }
.prose .loading { font-family: var(--ui); color: var(--muted); }
/* Reading guide (#guide) */
#p-guide .section { margin-block: 2.5rem; }
.guide-books .t .note b { color: var(--ink); font-weight: 600; }
.paths { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.8rem 2.5rem; }
.path { border-top: 3px solid var(--rule); padding-top: .9rem; }
.path.p1 { border-color: var(--saffron); } .path.p2 { border-color: var(--indigo); } .path.p3 { border-color: var(--moss); } .path.p4 { border-color: var(--clay); }
.path h3 { font-size: 1.45rem; margin: 0 0 .2rem; }
.path > p { color: var(--muted); margin: 0 0 .6rem; }
.path ol { margin: 0; padding-left: 1.3rem; line-height: 1.5; }
.path li { margin-bottom: .4rem; }
@media (max-width: 760px) { .paths { grid-template-columns: minmax(0, 1fr); } }
.toc-part { font-family: var(--ui); font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 2rem 0 .5rem; }
a.cover { text-decoration: none; }
.intro { padding-block: 3rem 1rem; max-width: 46rem; }
.intro h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin: .5rem 0 .9rem; }
.intro .dek { font-size: 1.15rem; color: var(--muted); margin-bottom: 1.4rem; }
.books3 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 2.5rem; }
.books3 .book { grid-template-columns: minmax(0, 7rem) minmax(0, 1fr); gap: 1.1rem; }
.books3 .book h3 { font-size: 1.45rem; }
.books3 .cover .ct { font-size: 1.05rem; }
.booklist .cover .ct { font-size: 1.2rem; }
.books3 .book p:not(.label) { font-size: .97rem; }
.booklist { display: grid; gap: 2.5rem; max-width: 52rem; }
.booklist .book { grid-template-columns: minmax(0, 8rem) minmax(0, 1fr); }
.vgrid.short > .vcard:nth-child(n+5) { display: none; }
.more { margin-top: 1.4rem; }
@media (max-width: 700px) { .books3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .top .wrap { align-items: center; }
  .menu-btn { display: inline-block; }
  .top .nav { display: none; flex-basis: 100%; flex-direction: column; gap: 0; padding-top: .3rem; }
  .top.open .nav { display: flex; }
  .top .nav a { padding: .55rem 0; border-bottom: 1px solid var(--rule); }
  .top .nav a[aria-current="page"] { border-bottom-color: var(--saffron); }
  .intro { padding-block: 2rem .5rem; }
  .books3 .book, .booklist .book { grid-template-columns: minmax(0, 5.5rem) minmax(0, 1fr); }
  .books3 .cover .ct, .booklist .cover .ct { font-size: .88rem; }
}
@media (max-width: 560px) {
  .vgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem .75rem; }
  .vgrid .thumb { padding: .55rem .65rem; }
  .vgrid .thumb .num { font-size: 1.5rem; }
  .vgrid .thumb .tt { font-size: .92rem; }
  .vgrid .thumb .play { width: 1.7rem; height: 1.7rem; right: .5rem; top: .5rem; }
  .vgrid .thumb .play::after { border-left-width: 7px; border-top-width: 4.5px; border-bottom-width: 4.5px; margin-left: 2px; }
  .vcard .vt { font-size: .8rem; line-height: 1.35; }
}

/* Ask the books */
.ask { max-width: 42rem; margin: 0 auto; }
.ask-log { display: flex; flex-direction: column; gap: 1.4rem; margin-bottom: 1.6rem; }
.ask-log:empty { display: none; }
.ask-you { align-self: flex-end; max-width: 85%; background: var(--surface); padding: .7rem 1rem; border-radius: 12px 12px 3px 12px; font-family: var(--ui); white-space: pre-wrap; overflow-wrap: anywhere; }
.ask-a p { margin: 0 0 .9em; }
.ask-a.wait { color: var(--muted); font-style: italic; }
.ask-a .cite { font-family: var(--ui); font-size: .72em; font-weight: 600; vertical-align: super; line-height: 0; text-decoration: none; padding: 0 .12em; }
.ask-src { font-family: var(--ui); font-size: .9rem; color: var(--muted); border-top: 1px solid var(--rule); padding-top: .6rem; }
.ask-src ol { margin: .3rem 0 0; padding-left: 1.4rem; }
.ask-src li { margin-bottom: .2rem; }
.ask-msg { font-family: var(--ui); font-size: .95rem; color: var(--muted); border-left: 2px solid var(--saffron); padding-left: .8rem; }
.ask-form textarea { display: block; width: 100%; font: inherit; color: var(--ink); background: var(--paper); border: 1.5px solid var(--rule); border-radius: 4px; padding: .7rem .9rem; resize: vertical; margin: .45rem 0 .8rem; }
.ask-form textarea:focus { border-color: var(--ink); outline: none; }
.ask-bar { display: flex; flex-wrap: wrap; gap: .75rem; }
button.btn { background: transparent; cursor: pointer; }
button.btn:disabled { opacity: .5; cursor: default; }
.btn[hidden], .chips[hidden] { display: none; }
.ask .chip { text-align: left; white-space: normal; }
.ask-note { font-family: var(--ui); font-size: .9rem; color: var(--muted); margin-top: 1.3rem; }
.ask-own .actions { margin: .2rem 0 .8rem; }
.ask-own .ask-tip { font-family: var(--ui); font-size: .92rem; color: var(--muted); border-left: 2px solid var(--saffron); padding-left: .8rem; }
.ask-own details { font-family: var(--ui); font-size: .9rem; margin-bottom: .8rem; }
.ask-own summary { cursor: pointer; color: var(--link); }
.ask-own textarea { width: 100%; margin-top: .5rem; font: .82rem/1.45 var(--ui); color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-radius: 4px; padding: .5rem; }
/* After Anatta */
.aa-phases { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .5rem; }
.aa-phases li { border: 1px solid var(--rule); border-radius: 4px; padding: .7rem .8rem; font-family: var(--ui); font-size: .9rem; line-height: 1.35; }
.aa-phases li b { display: block; font-family: var(--display); font-size: 1.5rem; font-weight: 600; line-height: 1; margin-bottom: .2rem; color: var(--muted); }
.aa-phases li.on { border: 2px solid var(--saffron); }
.aa-phases li.on b { color: var(--saffron); }
@media (max-width: 760px) { .aa-phases { grid-template-columns: minmax(0, 1fr); } .aa-phases li { display: flex; gap: .8rem; align-items: baseline; } .aa-phases li b { margin: 0; min-width: 1.2rem; } }
.aa-note { color: var(--muted); max-width: 44rem; margin-top: 1rem; }
.aa-time { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); max-width: 52rem; }
.aa-time li { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: .3rem 1.5rem; padding: 1rem 0; border-bottom: 1px solid var(--rule); }
.aa-time b { font-family: var(--display); font-size: 1.35rem; font-weight: 600; line-height: 1.3; font-variant-numeric: lining-nums; }
@media (max-width: 560px) { .aa-time li { grid-template-columns: minmax(0, 1fr); } }
.aa-four { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 1rem; max-width: 60rem; }
.aa-four li { background: var(--surface); border-radius: 4px; padding: 1rem 1.1rem; }
.aa-four b { display: block; font-family: var(--display); font-size: 2rem; line-height: 1; color: var(--saffron); margin-bottom: .4rem; }
.aa-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; max-width: 60rem; }
.aa-card { display: flex; flex-direction: column; gap: .35rem; padding: 1.1rem 1.2rem 1.2rem; border: 1px solid var(--rule); border-radius: 4px; color: var(--ink); }
.aa-card b { font-family: var(--display); font-size: 1.45rem; font-weight: 600; line-height: 1.15; }
.aa-card b a { color: var(--ink); text-decoration: none; }
.aa-card b a:hover { color: var(--link); text-decoration: underline; }
.aa-card .q { color: var(--muted); font-size: .98rem; line-height: 1.5; }
.aa-card .go { font-family: var(--ui); font-size: .9rem; display: flex; gap: 1rem; margin-top: auto; padding-top: .3rem; }
.aa-card.ready { border-color: var(--clay); border-width: 1.5px; }
.aa-card.soon { border-style: dashed; }
.aa-card.lent { border-color: var(--rule); border-width: 1px; }
.soon-tag { font-family: var(--ui); font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.toc li.soon .t { color: var(--muted); }
.home-aa { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem 2rem; align-items: center; max-width: 60rem; padding: 1.4rem 1.6rem; border: 1.5px solid var(--ink); border-radius: 4px; }
.home-aa h3 { font-size: 2rem; margin: .3rem 0 .4rem; }
.home-aa p { color: var(--muted); }
@media (max-width: 760px) { .home-aa { grid-template-columns: minmax(0, 1fr); } }
/* After Anatta: inside the step and question pages */
.prose blockquote.key { border: 0; border-block: 1px solid var(--rule); padding: .9rem 0; color: var(--ink); font-family: var(--display); font-size: 1.6rem; font-weight: 600; line-height: 1.25; }
.prose blockquote.key p { margin: 0; }
.prose .aa-q { font-family: var(--display); font-size: 1.8rem; font-weight: 600; line-height: 1.2; }
/* The Post-Anatta Pathway (aa-pathway): band and six cards; wider than the reading column on a wide screen */
.pw-before,.pw-grid{margin-inline:calc(50% - min(50vw - 16px,36rem))}
.pw-before{display:flex;flex-direction:column;gap:.6rem 1.8rem;margin-block:1.4rem 1.4rem;padding:1rem 1.3rem;border:1.5px dashed var(--saffron);border-radius:4px;background:var(--surface)}
.prose .pw-before h3{margin:0;font-size:1.3rem;color:var(--saffron)}
.prose .pw-before p,.prose .pw-before ul{margin:0}
.prose .pw-before li{margin-bottom:.2em}
.pw-before-txt{color:var(--muted);flex:1}
.pw-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:1.2rem}
.pw-stage{min-width:0;padding:1rem 1.2rem .9rem;background:var(--surface);border:1px solid var(--rule);border-top:4px solid var(--pw,var(--saffron));border-radius:4px;font-size:.95rem;line-height:1.45}
.pw-s1,.pw-s6{--pw:var(--saffron)}.pw-s2{--pw:var(--clay)}.pw-s3{--pw:var(--plum)}.pw-s4{--pw:var(--indigo)}.pw-s5{--pw:var(--moss)}
.prose .pw-stage h3{margin:.15rem 0 .1rem;font-size:1.4rem;line-height:1.2}
.prose .pw-stage p{margin:0 0 .2rem}
.prose .pw-stage p.label{margin:.85rem 0 .15rem}
.prose .pw-stage p.pw-num{margin:0;color:var(--saffron)}
.prose .pw-stage p.pw-tag{color:var(--muted);font-style:italic}
.prose .pw-stage ul{margin:0;padding-left:1.1rem}
.prose .pw-stage li{margin-bottom:.15em}
.pw-step{color:var(--saffron)}
.prose .pw-flow{text-align:center;color:var(--muted);margin:1.6rem 0 0}
@media (min-width:640px){.pw-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (min-width:1000px){.pw-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.pw-before{flex-direction:row;align-items:center}}
.zoombox{margin:.4rem 0 1.4rem;font-family:var(--ui)}
.zoombox>summary{display:inline-flex;align-items:center;gap:.35rem;cursor:pointer;list-style:none;padding:.4rem .9rem;border:1.5px solid var(--saffron);border-radius:999px;font-size:.9rem;font-weight:600;color:var(--ink)}
.zoombox>summary::-webkit-details-marker{display:none}
.zoombox>summary span{color:var(--muted);font-weight:400}
.zoombox[open]>summary{background:color-mix(in srgb,var(--saffron) 14%,transparent)}
.zoombox[open]{background:var(--surface);border-left:3px solid var(--saffron);padding:.8rem 1rem .2rem;border-radius:2px}
.prose blockquote.src { border: 1px solid var(--rule); border-radius: 4px; padding: 1rem 1.2rem; color: var(--ink); }
.prose blockquote.src p { font-style: italic; margin: 0 0 .4rem; }
.prose blockquote.src cite { font-family: var(--ui); font-size: .88rem; font-style: normal; color: var(--muted); }
.prose table.fourq { width: 100%; border-collapse: collapse; margin: 1rem 0 1.6rem; border-bottom: 1px solid var(--rule); }
.prose .fourq th, .prose .fourq td { text-align: left; vertical-align: top; padding: .8rem .9rem; border-top: 1px solid var(--rule); }
.prose .fourq th { width: 38%; font-family: var(--ui); font-size: .95rem; font-weight: 600; background: var(--surface); }
@media (max-width: 560px) { .prose .fourq th, .prose .fourq td { display: block; width: auto; } .prose .fourq td { border-top: 0; } }
.prose .traps { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; margin: 1rem 0 1.6rem; }
.prose .traps > div { border: 1px solid var(--rule); border-radius: 4px; padding: 1rem 1.2rem; }
.prose .traps p { margin: 0; }
.prose .traps p.label { margin-bottom: .4rem; }
.prose dl.words { margin: 0 0 1.2em; }
.prose dl.words dt { font-weight: 600; margin-top: .8rem; }
.prose dl.words dd { margin: .1rem 0 0; color: var(--muted); }
/* Floating bar (owner, 2026-10-30, after the Awakening to Reality blog; two rows and Minimise, 2026-10-31):
   New, Must read, E-books, Next / Pathway, Top, Minimise (Pathway for Text + and Night, owner, 2026-11-03) */
body { padding-bottom: calc(9rem + env(safe-area-inset-bottom, 0px)); }
:root[data-dock-min] body { padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px)); }
:root { --dock-glow: rgba(44, 59, 107, .75); }   /* indigo shadow under the gold outline (owner, 2026-10-30) */
@media (prefers-color-scheme: dark) { :root { --dock-glow: rgba(169, 184, 234, .6); } }
.dock { position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 40; display: grid; grid-template-columns: repeat(12, 1fr); gap: .15rem; width: max-content; padding: .35rem; border-radius: 18px; background: var(--ink); color: var(--paper); border: 2px solid var(--saffron); box-shadow: 0 8px 30px -2px var(--dock-glow); font-family: var(--ui); animation: dock-in .45s ease-out both; transition: transform .25s ease, opacity .25s ease; }
.dock.hide { transform: translate(-50%, 140%); opacity: 0; pointer-events: none; }
:root[data-dock-min] .dock { display: none; }
.dock-tools { all: unset; box-sizing: border-box; cursor: pointer; position: fixed; right: max(14px, env(safe-area-inset-right, 0px)); bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 40; display: none; align-items: center; gap: .3rem; padding: .45rem .8rem .45rem .6rem; border-radius: 14px; background: var(--ink); color: var(--paper); border: 2px solid var(--saffron); box-shadow: 0 8px 30px -2px var(--dock-glow); font-family: var(--ui); font-size: .78rem; font-weight: 600; line-height: 1.1; transition: transform .25s ease, opacity .25s ease; }
:root[data-dock-min] .dock-tools { display: flex; }
.dock-tools.hide { transform: translateY(140%); opacity: 0; pointer-events: none; }
.dock-tools:hover { background: color-mix(in srgb, var(--ink) 84%, var(--paper)); }
.dock-tools:focus-visible { outline: 2px solid var(--saffron); outline-offset: 1px; }
.dock-tools svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.dock-tools.has-new::after { content: ""; position: absolute; top: -.2rem; right: -.2rem; width: .55rem; height: .55rem; border-radius: 50%; background: var(--saffron); }
@keyframes dock-in { from { transform: translate(-50%, 140%); opacity: 0; } }
.dock button, .dock a { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: .15rem; min-width: 4.6rem; padding: .45rem .7rem .4rem; border-radius: 13px; font-size: .78rem; font-weight: 600; line-height: 1.1; white-space: nowrap; color: inherit; text-align: center; }
.dock > :nth-child(-n+4) { grid-column: span 3; }   /* four above */
.dock > :nth-child(n+5) { grid-column: span 4; }   /* three below, filling the same width */
.dock button:hover, .dock a:hover, .dock [aria-expanded="true"] { background: color-mix(in srgb, var(--paper) 16%, transparent); }
.dock :focus-visible { outline: 2px solid var(--saffron); outline-offset: 1px; }
.dock button.has-new { position: relative; }
.dock button.has-new::after { content: ""; position: absolute; top: .3rem; left: calc(50% + .45rem); width: .5rem; height: .5rem; border-radius: 50%; background: var(--saffron); }
.dock svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.dock-sheet { position: fixed; left: 50%; bottom: calc(8.7rem + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 41; width: min(26rem, calc(100vw - 32px)); max-height: min(70vh, 34rem, calc(100vh - 9.5rem - env(safe-area-inset-bottom, 0px))); overflow-y: auto; background: var(--paper); color: var(--ink); border: 2px solid var(--saffron); border-radius: 12px; padding: 1rem 1.1rem .6rem; box-shadow: 0 14px 36px -8px var(--dock-glow); font-family: var(--ui); }
.dock-sheet[hidden] { display: none; }
.dock-sheet .label { display: block; margin-bottom: .4rem; }
.dock-sheet ol + .label, .dock-sheet p + .label { margin-top: .9rem; }
.dock-sheet p { margin: 0 0 .5rem; line-height: 1.35; }
.dock-sheet p b { font-weight: 600; }
.dock-sheet p small { margin-left: .35rem; font-size: .8em; color: var(--muted); }
.dock-sheet ol { list-style: none; margin: 0 0 .6rem; padding: 0; }
.dock-sheet li a { display: block; padding: .55rem 0; border-bottom: 1px solid var(--rule); color: var(--ink); text-decoration: none; line-height: 1.3; }
.dock-sheet li:last-child a { border-bottom: 0; }
.dock-sheet li a:hover b { text-decoration: underline; }
.dock-sheet li a b { font-weight: 600; display: block; }
.dock-sheet li a span { font-size: .8em; color: var(--muted); }
@media (max-width: 400px) { .dock button, .dock a { min-width: 4.1rem; padding-inline: .45rem; } }
@media print { .dock, .dock-sheet, .dock-tools { display: none !important; } body, :root[data-dock-min] body { padding-bottom: 0; } }
/* Videos on claude.ai open on YouTube (owner, 2026-10-30): claude.ai cannot embed a YouTube player, so the script swaps each stored player for this card */
.ytcard { flex: 1 1 100%; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem; width: 100%; aspect-ratio: 16 / 9; border-radius: 4px; background: #111318; color: #f3f1ea; text-decoration: none; font-family: var(--ui); text-align: center; padding: 1rem; }
.ytcard .play { width: 4rem; height: 4rem; border-radius: 50%; background: #c4302b; display: grid; place-items: center; margin-bottom: .4rem; }
.ytcard .play::after { content: ""; margin-left: 5px; border-left: 18px solid #fff; border-top: 11px solid transparent; border-bottom: 11px solid transparent; }
.ytcard.drive .play { background: var(--saffron); }
.ytcard b { font-size: 1.1rem; font-weight: 600; }
.ytcard span:last-child { font-size: .85rem; opacity: .75; }
.ytcard:hover .play { transform: scale(1.06); }
.ytcard:hover b { text-decoration: underline; text-underline-offset: .2em; }
/* Home page tabs (server/TASK-home-tabs.md) */
.home-tabs { margin: 0 0 3rem; scroll-margin-top: .5rem; }
/* Folder tabs (server/TASK-folder-tabs.md) */
.tab-bar { display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none; box-shadow: inset 0 -1px 0 var(--rule); }
.tab-bar::-webkit-scrollbar { display: none; }
.tab-bar [role=tab] { flex: 1 1 0; min-width: max-content; max-width: 10rem; min-height: 44px; padding: .6rem .95rem; font-family: var(--ui); font-size: 1rem; font-weight: 500; text-align: center; color: var(--muted); background: var(--surface); background: color-mix(in srgb, var(--rule) 30%, var(--paper)); border: 1px solid var(--rule); border-radius: 5px 5px 0 0; cursor: pointer; }
.tab-bar [role=tab]:hover { color: var(--ink); }
.tab-bar [role=tab]:focus-visible { outline: 2px solid var(--saffron); outline-offset: -2px; }
.tab-bar [role=tab][aria-selected=true] { color: var(--ink); font-weight: 600; background: var(--paper); border-top-color: var(--saffron); border-bottom-color: var(--paper); box-shadow: inset 0 1px 0 var(--saffron); }
.home-panel { padding-top: 1.8rem; }
.home-panel:focus { outline: none; }
.home-panel:focus-visible { outline: 2px solid var(--saffron); outline-offset: 4px; }
.home-panel > h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin: 0 0 .5rem; }
.home-desc { color: var(--muted); max-width: 44rem; margin: 0 0 1.4rem; }
.home-panel .prose { max-width: none; }
.home-panel .pw-before, .home-panel .pw-grid { margin-inline: 0; }
.home-canon { max-width: 44rem; }
.home-canon p { margin: 0 0 .9rem; }
.home-sub { margin-top: 2.6rem; }
/* the bonus articles table: Books page and My Books (owner, 2026-11-03) */
.bonus-table { width: 100%; max-width: 52rem; border-collapse: collapse; border-top: 1px solid var(--rule); font-family: var(--ui); }
.bonus-table th { font-size: .82rem; font-weight: 600; color: var(--muted); text-align: left; padding: .55rem .5rem .55rem 0; border-bottom: 1px solid var(--rule); }
.bonus-table td { padding: .7rem .5rem .7rem 0; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.bonus-table th:last-child, .bonus-table td:last-child { padding-right: 0; }
.bonus-table .art a { font-family: var(--display); font-size: 1.2rem; font-weight: 600; line-height: 1.2; color: var(--ink); text-decoration: none; }
.bonus-table .art a:hover { color: var(--link); text-decoration: underline; }
.bonus-table .art .note { display: block; font-family: var(--text); font-size: .95rem; color: var(--muted); margin-top: .2rem; }
.bonus-table .act, .bonus-table .acth { width: 1%; white-space: nowrap; text-align: center; }
.bonus-table .act a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; box-sizing: border-box; padding: 0 .8rem; border: 1px solid var(--rule); border-radius: 3px; font-size: .88rem; font-weight: 600; color: var(--ink); text-decoration: none; }
.bonus-table .act a:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.bonus-table .act a:focus-visible { outline: 2px solid var(--saffron); outline-offset: 2px; }
.bonus-table .dash { color: var(--muted); }
@media (max-width: 560px) {
  .bonus-table th, .bonus-table td { padding-right: .3rem; }
  .bonus-table .art a { font-size: 1.05rem; }
  .bonus-table .art .note { font-size: .86rem; }
  .bonus-table .act a { padding: 0 .35rem; font-size: .8rem; }
}
/* Finer type (owner, 2026-11-07: "Reduce the size of fonts for the whole website ... more refined style") */
html { font-size: 93.75%; }
.hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.6rem); }
.intro h1, .reading .head h1, .bookhead h1 { font-size: clamp(1.9rem, 3.8vw, 2.9rem); }
.essential h2, .about h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
.section-head h2, .home-panel > h2 { font-size: clamp(1.45rem, 2.4vw, 1.9rem); }
.prose h2 { font-size: 1.75rem; }
.prose h3 { font-size: 1.32rem; }
.hero .dek, .reading .head .dek, .intro .dek { font-size: 1.08rem; }
/* Living-texts note under the After Anatta intro (owner, 2026-11-07) */
.refine-note { border: 1.5px solid var(--saffron); border-radius: 14px; background: color-mix(in srgb, var(--saffron) 9%, var(--paper)); padding: .85rem 1.15rem; margin: 0 0 1.5rem; max-width: 40rem; }
.refine-note p { margin: 0; font-family: var(--ui); font-size: .95rem; font-weight: 600; line-height: 1.5; color: var(--ink); }
/* REDESIGN:START */
/* Redesign (owner, 2026-11-29: "Go ahead and build it into the website"; design/redesign-proposal-2026-11-29.html).
   scripts/redesign.py puts this file into index.html at build time, between the REDESIGN markers of the first
   <style>, so every page (scripts/vm_pages.py, /app.css) carries it. Edit this file, never the copy in index.html.
   Cluster 1: the spectrum palette (day and night), the type pairing and the brand seal. */
:root {
  /* the spectrum: one colour per turn of seeing, reused by the seven doors */
  --c1: #6E7891; --c2: #F58F00; --c3: #F0386B; --c4: #00A396; --c5: #6C5CFF; --c6: #1F8BF0; --c7: #E8A800;
  --stone: var(--c1); --amber: var(--c2); --rose: var(--c3); --lagoon: var(--c4); --violet: var(--c5); --sky: var(--c6); --sun: var(--c7);
  /* the night stage of the meditator */
  --stage: #0B0A26; --stage-ink: #EEEBFF; --stage-muted: #A9A4D6; --stage-line: #2B2766;
  /* the page */
  --bg: #FBFCFF; --paper: var(--bg); --surface: #FFFFFF; --chip: #F1F2FB;
  --ink: #1B1838; --muted: #5A5878; --rule: #E3E4F2; --line: var(--rule);
  --link: #1A6FCB;
  --dock-glow: rgba(108, 92, 255, .45);
  --r: 18px;
  /* type: a display face with character, an open body face, a mono for small labels */
  --display: "Bricolage Grotesque", "Trebuchet MS", system-ui, sans-serif;
  --text: "Figtree", "Segoe UI", system-ui, sans-serif;
  --ui: "Figtree", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}
/* Night: every colour kept, a little brighter, on deep indigo. The device's setting, or data-theme on <html>. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --c1: #9AA4BF; --c2: #FFAE3D; --c3: #FF5E8E; --c4: #22D3C2; --c5: #8C80FF; --c6: #4FA9FF; --c7: #FFD34D;
    --bg: #0F0D2B; --paper: var(--bg); --surface: #181540; --chip: #201C4E;
    --ink: #F3F1FF; --muted: #ABA7D3; --rule: #2C2865; --line: var(--rule);
    --link: #7DBEFF; --dock-glow: rgba(140, 128, 255, .55);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --c1: #9AA4BF; --c2: #FFAE3D; --c3: #FF5E8E; --c4: #22D3C2; --c5: #8C80FF; --c6: #4FA9FF; --c7: #FFD34D;
  --bg: #0F0D2B; --paper: var(--bg); --surface: #181540; --chip: #201C4E;
  --ink: #F3F1FF; --muted: #ABA7D3; --rule: #2C2865; --line: var(--rule);
  --link: #7DBEFF; --dock-glow: rgba(140, 128, 255, .55);
  color-scheme: dark;
}
/* Type */
h1, h2, h3 { font-weight: 700; letter-spacing: -.015em; }
.label { font-family: var(--mono); font-weight: 500; font-size: .72rem; letter-spacing: .12em; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 6px; }
/* The brand seal: 如 on the turning spectrum */
.mark .seal { background: conic-gradient(from 200deg, var(--c2), var(--c3), var(--c5), var(--c4), var(--c2)); color: #fff;
  border-radius: .55rem; box-shadow: 0 6px 18px -6px var(--c3); }
/* Cluster 2: Five turns of seeing, the meditator on the home page (7 Phases tab; design/site/meditator.html, .js).
   The stage is always night. Without script the plain home page lists the five turns (meditator-still.html). */
.turns { margin: 2.6rem 0 0; }
.turns-stage { background: var(--stage); color: var(--stage-ink); border-radius: 28px; overflow: hidden; display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); box-shadow: 0 30px 80px -40px #2a1f8a; font-family: var(--ui); }
.turns-canvas { position: relative; min-width: 0; aspect-ratio: 1 / 1; max-width: 100%; background: var(--stage); }
.turns-canvas canvas { display: block; width: 100%; height: 100%; }
.turns-still { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: .3rem; padding: 1.2rem; }
.turns.js .turns-still { display: none; }
.turns-still p { margin: 0; font-size: .95rem; line-height: 1.5; }
.turns-still-num { font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--stage-muted); }
.turns-still-name { font-family: var(--display); font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; color: #D6DCEC; }
.turns-panel { padding: 1.7rem 1.6rem; display: flex; flex-direction: column; gap: 1.1rem; min-width: 0; border-left: 1px solid var(--stage-line); }
.turns-panel .label { color: var(--stage-muted); margin: 0; }
.turns-name { font-family: var(--display); font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin: .2rem 0 0; transition: color .6s; }
.turns-map { font-family: var(--mono); font-size: .78rem; color: var(--stage-muted); margin: .3rem 0 0; }
.turns-desc { color: var(--stage-ink); opacity: .92; margin: 0; font-size: .98rem; line-height: 1.55; }
.turns-cues { display: grid; gap: .5rem; padding: 0; margin: 0; list-style: none; font-size: .9rem; color: var(--stage-muted); }
.turns-cues li { display: flex; gap: .6rem; }
.turns-cues b { color: var(--stage-ink); font-weight: 600; min-width: 6.2em; }
.turns-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: .4rem; }
.turns-steps button { font: 600 .82rem var(--ui); color: var(--stage-ink); background: #ffffff0d; border: 1px solid var(--stage-line);
  border-radius: 12px; min-height: 44px; padding: .6rem .25rem; cursor: pointer; transition: background .3s, border-color .3s, transform .2s; }
.turns-steps button:hover { transform: translateY(-2px); }
.turns-steps button[aria-pressed="true"] { background: var(--pc); border-color: var(--pc); color: #0B0A26; }
.turns-steps button:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.turns-meter { display: grid; gap: .4rem; }
.turns-meter .bar { height: 8px; border-radius: 99px; background: #ffffff14; overflow: hidden; }
.turns-meter .fill { height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--c3), var(--c5), var(--c4)); }
.turns-meter .row { display: flex; justify-content: space-between; gap: 1rem; font-size: .8rem; color: var(--stage-muted); }
.turns-ctrl { display: flex; gap: .5rem; flex-wrap: wrap; }
.turns-btn { font: 600 .9rem var(--ui); border-radius: 999px; min-height: 44px; padding: .6rem 1.15rem; cursor: pointer; border: 1px solid var(--stage-line);
  background: transparent; color: var(--stage-ink); }
.turns-btn:hover { border-color: var(--stage-ink); }
.turns-btn.primary { background: var(--stage-ink); color: var(--stage); border-color: var(--stage-ink); }
.turns-btn:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
.turns-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; font-family: var(--ui); }
.turns-list li { border-left: 5px solid var(--pc); border-radius: 6px; background: var(--surface); padding: .8rem 1rem; }
.turns-list b { display: block; font-family: var(--display); font-size: 1.2rem; font-weight: 700; }
.turns-list i { display: block; font-style: normal; font-family: var(--mono); font-size: .74rem; letter-spacing: .06em; color: var(--muted); margin: .15rem 0 .35rem; }
.turns-list span { display: block; font-size: .95rem; color: var(--muted); line-height: 1.5; }
@media (max-width: 860px) {
  .turns-stage { grid-template-columns: 1fr; }
  .turns-panel { border-left: 0; border-top: 1px solid var(--stage-line); padding: 1.3rem 1.1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .turns-steps button, .turns-name { transition: none; }
  .turns-steps button:hover { transform: none; }
}
/* Cluster 3: seven doors. The home tabs are coloured, one colour each (the spectrum); the chosen door's panel and
   every page under it carry that colour (html[data-door], set by design/site/doors.js after each show()). */
:root { --door: var(--sky); }
html[data-door="phases"] { --door: var(--sun); }
html[data-door="pathway"] { --door: var(--amber); }
html[data-door="logic"] { --door: var(--rose); }
html[data-door="questions"] { --door: var(--lagoon); }
html[data-door="canon"] { --door: var(--violet); }
html[data-door="my-books"] { --door: var(--sky); }
html[data-door="ask"] { --door: var(--stone); }
#tab-phases, #panel-phases { --dc: var(--sun); }
#tab-pathway, #panel-pathway { --dc: var(--amber); }
#tab-logic, #panel-logic { --dc: var(--rose); }
#tab-questions, #panel-questions { --dc: var(--lagoon); }
#tab-canon, #panel-canon { --dc: var(--violet); }
#tab-my-books, #panel-my-books { --dc: var(--sky); }
#tab-ask, #panel-ask { --dc: var(--stone); }
/* The tab strip stays as it was (owner, 2026-11-29: "I still prefer the scrollable tabs but with colored tabs"):
   each tab in its door colour, a thin coloured top edge at rest, a tinted fill on hover, the underline and the
   label in the colour when active. The door-card grid of the proposal is dropped (it was live 11:52 am to now). */
.tab-bar [role=tab] { --tab-ink: color-mix(in srgb, var(--dc) 72%, var(--ink)); border-top: 3px solid var(--dc); border-top-color: var(--dc);
  transition: background .25s, color .25s, box-shadow .25s; }
.tab-bar [role=tab]:hover { color: var(--tab-ink); background: color-mix(in srgb, var(--dc) 14%, var(--paper)); }
.tab-bar [role=tab][aria-selected=true] { color: var(--tab-ink); border-top-color: var(--dc); background: color-mix(in srgb, var(--dc) 8%, var(--paper));
  box-shadow: inset 0 -3px 0 var(--dc); }
.tab-bar [role=tab]:focus-visible { outline: 2px solid var(--dc); outline-offset: -2px; }
.home-panel > h2::after { content: ""; display: block; width: 3.2rem; height: 4px; border-radius: 2px; background: var(--dc); margin-top: .55rem; }
.home-panel .section-head h2::after, .home-panel .section-head h3::after { content: none; }
@media (prefers-reduced-motion: reduce) { .tab-bar [role=tab] { transition: none; } }
/* the door's colour inside: the page's label, the title's rule, the section rules, the Zoom in buttons, the reading bar */
.reading .head .label, .contents > .label { color: var(--door); }
.reading .head h1::after { content: ""; display: block; width: 3.2rem; height: 4px; border-radius: 2px; background: var(--door); margin-top: .7rem; }
.reading .prose > h2::before { content: ""; display: block; width: 2.2rem; height: 3px; border-radius: 2px; background: var(--door); margin-bottom: .5rem; }
.zoombox > summary { border-color: var(--door); }
.zoombox[open] > summary { background: color-mix(in srgb, var(--door) 14%, transparent); }
.zoombox[open] { border-left-color: var(--door); }
.listen button { border-color: var(--door); background: color-mix(in srgb, var(--door) 18%, var(--paper)); color: var(--ink); border-radius: 999px; }
.listen button:hover { background: color-mix(in srgb, var(--door) 32%, var(--paper)); }
.listen button.ghost { background: transparent; }
.listen.on { border-bottom: 3px solid var(--door); }
.endnav { border-top-color: color-mix(in srgb, var(--door) 55%, var(--rule)); }
@media (prefers-reduced-motion: reduce) {
  .tab-bar [role=tab], .tab-bar [role=tab]::after { transition: none; }
  .tab-bar [role=tab]:hover { transform: none; }
}
/* Cluster 4: motion (design/site/motion.js) and the floating bar (design/site/dock.html). Still under reduced motion. */
/* New things glow: the dot on New pulses */
.dock button.has-new::after, .dock-tools.has-new::after { background: var(--rose); animation: glow 2.4s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--rose) 0%, transparent), 0 0 14px var(--rose); } }
/* The New strip above the seven doors */
.ticker { display: flex; align-items: center; margin: 0 0 1.1rem; border: 1px solid var(--rule); border-radius: 999px; background: var(--surface); overflow: hidden; font-family: var(--ui); font-size: .9rem; }
.ticker .lab { position: relative; z-index: 1; flex: none; font-weight: 700; font-size: .78rem; padding: .55rem 1rem; color: #fff; background: linear-gradient(90deg, var(--rose), var(--amber)); }
.ticker .track { display: flex; gap: 2.4rem; white-space: nowrap; padding-inline: 1.2rem; animation: roll 70s linear infinite; }
.ticker .track a { color: var(--ink); text-decoration: none; }
.ticker .track a:hover { text-decoration: underline; text-underline-offset: .2em; }
.ticker .track b { font-weight: 600; color: var(--muted); }
.ticker:hover .track, .ticker:focus-within .track { animation-play-state: paused; }
@keyframes roll { to { transform: translateX(-50%); } }
/* The reading light */
.readlight { position: fixed; left: 0; top: 0; width: 100%; height: 4px; z-index: 45; pointer-events: none; transform-origin: left; transform: scaleX(0);
  background: linear-gradient(90deg, var(--amber), var(--rose), var(--violet), var(--lagoon)); opacity: 0; transition: opacity .3s; }
.readlight.on { opacity: 1; }
/* Sections arrive */
html.motion [data-rise] { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }
html.motion [data-rise].in { opacity: 1; transform: none; }
/* Cards lift */
.thumb, .cover, .aa-phases li, .turns-list li, .toc li { transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s; }
.vcard:hover .thumb, a.cover:hover, .aa-phases li:hover, .turns-list li:hover { transform: translateY(-4px); box-shadow: 0 16px 28px -18px var(--door); }
/* The floating bar: one row of six (New, Pathway, Must read, E-books, Next, Top) inside a slowly turning spectrum ring;
   Minimise keeps its function (owner, 2026-10-31) as a small button on the bar's corner; Tools brings the bar back. */
body { padding-bottom: calc(6.4rem + env(safe-area-inset-bottom, 0px)); }
.dock { display: flex; gap: .1rem; padding: .35rem; border-radius: 22px; border: 2px solid transparent; background: var(--ink); background-clip: padding-box; box-shadow: 0 10px 34px -4px var(--dock-glow); }
.dock::before { content: ""; position: absolute; inset: -2px; border-radius: inherit; padding: 2px; pointer-events: none;
  background: conic-gradient(from var(--ring, 0deg), var(--amber), var(--rose), var(--violet), var(--lagoon), var(--amber));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
  animation: ring 9s linear infinite; }
@property --ring { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes ring { to { --ring: 360deg; } }
.dock > * { grid-column: auto; }
.dock button, .dock a { min-width: 4.4rem; padding: .45rem .55rem .4rem; border-radius: 16px; }
.dock #dock-min { position: absolute; top: -.6rem; right: -.6rem; min-width: 0; width: 1.7rem; height: 1.7rem; padding: 0; border-radius: 50%; background: var(--ink); border: 2px solid var(--paper); box-shadow: 0 4px 12px -4px var(--dock-glow); }
.dock #dock-min svg { width: 16px; height: 16px; }
.dock #dock-min:hover { background: color-mix(in srgb, var(--ink) 80%, var(--paper)); }
.dock-tools { border-color: transparent; background-clip: padding-box; }
.dock-tools::before { content: ""; position: absolute; inset: -2px; border-radius: inherit; padding: 2px; pointer-events: none;
  background: conic-gradient(from 0deg, var(--amber), var(--rose), var(--violet), var(--lagoon), var(--amber));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; }
.dock-sheet { bottom: calc(5.7rem + env(safe-area-inset-bottom, 0px)); border-color: var(--violet); border-radius: 18px; }
@media (max-width: 440px) { .dock { padding: .3rem; gap: 0; } .dock button, .dock a { min-width: 3.55rem; padding: .4rem .25rem .35rem; font-size: .7rem; } .dock svg { width: 20px; height: 20px; } }
@media (prefers-reduced-motion: reduce) {
  .dock button.has-new::after, .dock-tools.has-new::after, .dock::before { animation: none; }
  .ticker { overflow-x: auto; } .ticker .track { animation: none; }
  .thumb, .cover, .aa-phases li, .turns-list li, .toc li { transition: none; }
  .vcard:hover .thumb, a.cover:hover, .aa-phases li:hover, .turns-list li:hover { transform: none; }
  .readlight { transition: none; }
}
@media print { [data-rise] { opacity: 1 !important; transform: none !important; } .readlight, .ticker { display: none; } }
/* Cluster 5: the Glossary tab and menu link (owner, 2026-11-29: "glossary must be more prominent, in menu and in tabs").
   An eighth tab, leaf green; its pages (the three glossaries) carry it. */
:root { --c8: #4F9A2A; --leaf: var(--c8); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --c8: #86D65A; } }
:root[data-theme="dark"] { --c8: #86D65A; }
html[data-door="glossary"] { --door: var(--leaf); }
#tab-glossary, #panel-glossary { --dc: var(--leaf); }
/* Cluster 6: the 7 Phases tab's swap switch (design/site/phases-swap.html, swap.js). Animation by default, or the
   seven phases with their intro and "How these notes came about"; nothing is removed. Without script all shows. */
.phases-swap { display: inline-flex; gap: .2rem; padding: .2rem; margin: 0 0 1.2rem; border: 1px solid var(--rule); border-radius: 999px; background: var(--surface); font-family: var(--ui); }
.phases-swap button { font: 600 .88rem var(--ui); color: var(--muted); background: transparent; border: 0; border-radius: 999px; min-height: 40px; padding: .45rem 1rem; cursor: pointer; transition: background .3s, color .3s; }
.phases-swap button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.phases-swap button:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; }
/* "How these notes came about" (.home-sub) stays in both views (owner, 2026-11-29: "The above remains in both toggle") */
#panel-phases[data-view="turns"] > :not(.phases-swap):not(.turns):not(.home-sub) { display: none; }
#panel-phases[data-view="phases"] > .turns { display: none; }
#panel-phases[data-view="turns"] > .turns { margin-top: 0; }
@media (prefers-reduced-motion: reduce) { .phases-swap button { transition: none; } }
/* the panel without the turn texts (owner, 2026-11-29): its buttons, meter and legend sit in the middle */
.turns-panel { justify-content: center; }
/* the animation and its seven buttons at phone width on every screen, centred (owner, 2026-11-29) */
.turns-stage { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; }
.turns-panel { border-left: 0; border-top: 1px solid var(--stage-line); padding: 1.3rem 1.1rem; }
.turns .section-head { max-width: 420px; margin-inline: auto; }
/* REDESIGN:END */

.watchbox:empty{display:none}
.page-watch{font-family:var(--ui);margin:0 auto 1.5rem;max-width:42rem}
.page-list{font-family:var(--ui);list-style:none;padding:0;margin:0 0 1.5rem}
.page-list li{margin-bottom:.45em}
