/* Meta-Siddur · design tokens
   Same family as the Contemplative Siddur: white ground, warm ink, the siddur's world colors
   (Assiyah earth-green, Yetzirah water-blue, B'riah air-gold, Atzilut fire-red), Frank Ruhl / Cormorant / Manrope.
   Every color lives here. --wc is a world/section color; --wct is its darker twin for text. */
:root {
  --ground: #FFFFFF; --wash: #F6F5F2; --wash-2: #EEECE7; --rail: #FBFAF8;
  --ink: #1E1C1A; --ink-soft: #3D3A36; --muted: #5F656C; --line: rgba(30, 28, 26, .12);
  --act: #1F5AA6;
  --c-assiyah: #2E7D4A; --c-yetzirah: #3E78BE; --c-briah: #C2A53A; --c-atzilut: #C4553A; --c-four: #8C7FA6;
  --c-intro: #7A7F85; --c-hassidut: #3F6E6A; --c-torah: #8A5A3B; --c-kaddish: #6E7378; --c-sefirot: #B0477A;
  --c-hatzot: #3A4A78; --c-kheshbon: #786A2C; --c-songs: #A3162F; --c-gold: #A8862A;
  --wc: var(--c-briah);
  --wct: color-mix(in srgb, var(--wc) 72%, #000);
  --tint: color-mix(in srgb, var(--wc) 8%, var(--ground));
  --he-font: 'Frank Ruhl Libre', 'Noto Serif Hebrew', serif;
  --en-font: 'Cormorant Garamond', Georgia, serif;
  --ui-font: 'Manrope', system-ui, sans-serif;
  --r: 14px; --top: 56px; --lw: 272px; --rw: 360px;
  --shadow: 0 12px 40px rgba(20, 18, 16, .12), 0 1px 3px rgba(20, 18, 16, .08);
  --paper: 0 1px 2px rgba(20, 18, 16, .10), 0 8px 28px rgba(20, 18, 16, .08);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #171615; --wash: #1F1E1C; --wash-2: #282624; --rail: #1B1A19; --ink: #EDEAE4; --ink-soft: #CFCAC2; --muted: #A3A8AE; --line: rgba(237, 234, 228, .13);
    --act: #8DB3E8; --c-assiyah: #6FBF8A; --c-yetzirah: #8DB3E8; --c-briah: #D9B65E; --c-atzilut: #E58A6E; --c-four: #B5A8D6;
    --c-intro: #A3A8AE; --c-hassidut: #7FB5AF; --c-torah: #D29A74; --c-kaddish: #AEB3B9; --c-sefirot: #E58AB3; --c-hatzot: #9DAAD0;
    --c-kheshbon: #CDBE7C; --c-songs: #EE8090; --c-gold: #D9B65E;
    --wct: color-mix(in srgb, var(--wc) 80%, #fff);
    --shadow: 0 12px 40px rgba(0, 0, 0, .5); --paper: 0 1px 2px rgba(0,0,0,.4), 0 8px 28px rgba(0,0,0,.35); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #171615; --wash: #1F1E1C; --wash-2: #282624; --rail: #1B1A19; --ink: #EDEAE4; --ink-soft: #CFCAC2; --muted: #A3A8AE; --line: rgba(237, 234, 228, .13);
  --act: #8DB3E8; --c-assiyah: #6FBF8A; --c-yetzirah: #8DB3E8; --c-briah: #D9B65E; --c-atzilut: #E58A6E; --c-four: #B5A8D6;
  --c-intro: #A3A8AE; --c-hassidut: #7FB5AF; --c-torah: #D29A74; --c-kaddish: #AEB3B9; --c-sefirot: #E58AB3; --c-hatzot: #9DAAD0;
  --c-kheshbon: #CDBE7C; --c-songs: #EE8090; --c-gold: #D9B65E;
  --wct: color-mix(in srgb, var(--wc) 80%, #fff);
  --shadow: 0 12px 40px rgba(0, 0, 0, .5); --paper: 0 1px 2px rgba(0,0,0,.4), 0 8px 28px rgba(0,0,0,.35); color-scheme: dark;
}
* { box-sizing: border-box; }
/* every element recomputes its tints from its own --wc */
* { --wct: color-mix(in srgb, var(--wc) 72%, #000); --tint: color-mix(in srgb, var(--wc) 8%, var(--ground)); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) * { --wct: color-mix(in srgb, var(--wc) 80%, #fff); } }
:root[data-theme="dark"] * { --wct: color-mix(in srgb, var(--wc) 80%, #fff); }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top) + 12px); }
body { margin: 0; background: var(--ground); color: var(--ink); font: 16px/1.6 var(--ui-font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
[hidden] { display: none !important; }
.he { font-family: var(--he-font); direction: rtl; unicode-bidi: isolate; font-weight: 400; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--wc); outline-offset: 3px; border-radius: 4px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--wc); flex: none; display: inline-block; }
kbd { font: 11px var(--ui-font); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; color: var(--muted); }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 30; height: var(--top); display: flex; align-items: center; gap: 14px; padding: 0 18px;
  background: color-mix(in srgb, var(--ground) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { text-decoration: none; font-family: var(--en-font); font-size: 22px; font-weight: 600; white-space: nowrap; }
.brand .he { font-size: 17px; color: var(--muted); margin-inline-start: 6px; font-weight: 300; }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); min-width: 0; overflow: hidden; white-space: nowrap; }
.crumbs a { text-decoration: none; } .crumbs a:hover { color: var(--ink); } .crumbs b { color: var(--ink); font-weight: 600; }
.crumbs span { opacity: .6; }
.topnav { margin-inline-start: auto; display: flex; align-items: center; gap: 18px; font-size: 14px; }
.topnav a, .searchbtn { color: var(--ink-soft); text-decoration: none; }
.topnav a:hover, .searchbtn:hover { color: var(--ink); }
.mapbtn { display: none; width: 34px; height: 34px; border-radius: 10px; flex-direction: column; justify-content: center; align-items: center; gap: 4px; }
.mapbtn span { width: 16px; height: 1.5px; background: var(--ink); border-radius: 2px; }
.mapbtn:hover { background: var(--wash); }
@media (max-width: 900px) { .crumbs { display: none; } }
@media (max-width: 520px) { .brand .he, kbd { display: none; } .topnav { gap: 12px; font-size: 13px; } .topnav a[href="/contents/"] { display: none; } .top { padding: 0 12px; gap: 8px; } }

/* ---------- three-column shell ---------- */
.shell { display: grid; grid-template-columns: var(--lw) minmax(0, 1fr) var(--rw); align-items: start; }
.lrail { position: sticky; top: var(--top); height: calc(100vh - var(--top)); overflow-y: auto; overscroll-behavior: contain;
  padding: 16px 14px 40px; border-inline-end: 1px solid var(--line); background: var(--rail); font-size: 14px; }
.center { min-width: 0; padding: 26px clamp(16px, 3vw, 40px) 40px; }
.rrail { padding: 22px 18px 40px; border-inline-start: 1px solid var(--line); min-height: calc(100vh - var(--top)); display: grid; gap: 14px; align-content: start; }
body.focus .shell { grid-template-columns: 0 minmax(0, 1fr) 0; }
body.focus .lrail, body.focus .rrail { visibility: hidden; width: 0; padding: 0; border: 0; overflow: hidden; }
@media (max-width: 1279px) {
  .shell { grid-template-columns: minmax(0, 1fr) var(--rw); }
  .mapbtn { display: flex; }
  .lrail { position: fixed; z-index: 40; left: 0; top: var(--top); width: min(340px, 88vw); transform: translateX(-102%); transition: transform .25s ease; box-shadow: var(--shadow); }
  body.map-open .lrail { transform: none; }
  .scrim { position: fixed; inset: var(--top) 0 0 0; z-index: 35; background: rgba(0,0,0,.25); }
  body.focus .shell { grid-template-columns: minmax(0, 1fr) 0; }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rrail { border: 0; border-top: 1px solid var(--line); min-height: 0; padding: 20px 16px 30px; max-width: 760px; margin: 0 auto; width: 100%; }
  body.focus .shell { grid-template-columns: minmax(0, 1fr); }
  body.focus .rrail { visibility: visible; width: auto; padding: 20px 16px 30px; }
}
@media (min-width: 1280px) { .scrim { display: none !important; } }

/* ---------- left rail ---------- */
.lsec { margin: 0 0 22px; }
.lsec h2, .card h3, .lab { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin: 0 0 10px; }
.lsearch { position: relative; margin: 0 0 18px; }
.lsearch input { width: 100%; font: 14px var(--ui-font); padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--ground); color: var(--ink); }
.lres { list-style: none; margin: 6px 0 0; padding: 0; max-height: 50vh; overflow: auto; }
.lres:empty { display: none; }
.lres a { display: block; padding: 7px 8px; border-radius: 8px; text-decoration: none; }
.lres a:hover, .lres a.sel { background: var(--wash-2); }
.lres .snip { display: block; font-size: 12px; color: var(--muted); line-height: 1.4; }
.bfilter { display: flex; flex-wrap: wrap; gap: 5px; margin: 0 0 10px; }
.bfilter button { font-size: 12px; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-soft); }
.bfilter button[aria-pressed="true"] { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.bsecs, .bres { list-style: none; margin: 0; padding: 0; }
.bsec summary { list-style: none; display: flex; align-items: baseline; gap: 8px; padding: 6px 6px; border-radius: 8px; cursor: pointer; }
.bsec summary::-webkit-details-marker { display: none; }
.bsec summary:hover { background: var(--wash-2); }
.bsec .sn { width: 1.5em; font-size: 11px; font-weight: 700; color: var(--wct); }
.bsec .st { flex: 1; font-weight: 600; font-size: 13.5px; }
.bsec .sc { font-size: 11px; color: var(--muted); }
.bsec summary { border-inline-start: 3px solid var(--wc); }
.bres { margin: 2px 0 8px 10px; border-inline-start: 1px solid var(--line); }
.bres a { display: flex; gap: 8px; align-items: baseline; padding: 4px 8px; text-decoration: none; border-radius: 6px; font-size: 13px; line-height: 1.35; color: var(--ink-soft); }
.bres a:hover { background: var(--wash-2); color: var(--ink); }
.bres a[aria-current="page"] { background: var(--tint); color: var(--ink); font-weight: 600; box-shadow: inset 3px 0 0 var(--wc); }
.bres .pn { flex: none; width: 4.4em; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 600; }
.bres i { font-style: normal; color: var(--wct); font-size: 10px; }
.bres li.off { display: none; }
.lnote { font-size: 12px; color: var(--muted); margin: 0; text-align: center; }
.sitelinks { list-style: none; margin: 0; padding: 0; }
.sitelinks a { display: block; padding: 4px 6px; border-radius: 6px; text-decoration: none; color: var(--ink-soft); }
.sitelinks a:hover { background: var(--wash-2); color: var(--ink); }
.sitelinks.ext a::after { content: " ↗"; color: var(--muted); font-size: 11px; }
.sub { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 14px 0 4px; }

/* ---------- center: Reb David's page ---------- */
.rhead { max-width: 900px; margin: 0 auto 18px; }
.eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0 0 10px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.chip { display: inline-flex; align-items: center; gap: 7px; color: var(--wct); font-weight: 700; }
.pnum { margin-inline-start: auto; color: var(--wct); font-weight: 700; letter-spacing: .04em; }
.rhead h1 { font-family: var(--en-font); font-weight: 500; font-size: clamp(30px, 4.2vw, 46px); line-height: 1.08; margin: 0 0 8px; }
.essence { color: var(--ink-soft); font-size: 16px; margin: 6px 0 0; max-width: 46rem; }
.ctools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.views { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.views button, .focusbtn { font-size: 13px; padding: 5px 12px; color: var(--ink-soft); }
.views button[aria-pressed="true"] { background: var(--ink); color: var(--ground); }
.focusbtn { border: 1px solid var(--line); border-radius: 999px; }
.focusbtn[aria-pressed="true"] { background: var(--ink); color: var(--ground); }
@media (max-width: 960px) { .focusbtn { display: none; } }
.pstrip { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 12px 0 0; }
.pstrip a { display: block; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 6px; text-decoration: none; color: var(--muted); border: 1px solid var(--line); }
.pstrip a.here { color: var(--ground); background: var(--wc); border-color: var(--wc); }
.folios { display: grid; gap: 22px; max-width: 900px; margin: 0 auto; }
.folios[data-view="spread"] { grid-template-columns: 1fr 1fr; max-width: 1500px; gap: 16px; }
.folios[data-view="spread"] .folio.landscape { grid-column: 1 / -1; }
.folio { margin: 0; scroll-margin-top: calc(var(--top) + 12px); }
.folio.portrait { max-width: 820px; width: 100%; justify-self: center; }
.folios[data-view="spread"] .folio.portrait { max-width: none; }
.fz { display: block; width: 100%; background: #fff; border-radius: 3px; box-shadow: var(--paper); overflow: hidden; cursor: zoom-in; line-height: 0; }
.fz img { display: block; width: 100%; height: auto; }
.folio figcaption { font-size: 12px; color: var(--muted); text-align: center; margin-top: 6px; letter-spacing: .04em; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .fz img, :root:not([data-theme="light"]) .zimg img { filter: invert(.9) hue-rotate(180deg); } }
:root[data-theme="dark"] .fz img, :root[data-theme="dark"] .zimg img { filter: invert(.9) hue-rotate(180deg); }
.typed { max-width: 720px; margin: 36px auto 0; padding-top: 26px; border-top: 1px solid var(--line); }
.ocr { max-width: 720px; margin: 26px auto 0; font-size: 13px; color: var(--muted); }
.ocr summary { cursor: pointer; }
.ocr p { line-height: 1.6; max-height: 300px; overflow: auto; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 900px; margin: 40px auto 0; padding-top: 18px; border-top: 1px solid var(--line); }
.pager a { text-decoration: none; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; }
.pager a:hover { background: var(--wash); }
.pager .next { text-align: end; }
.pager span { font-size: 12px; font-weight: 700; color: var(--wct); letter-spacing: .04em; }
.pager em { font-family: var(--en-font); font-style: normal; font-size: 18px; color: var(--ink-soft); line-height: 1.25; }

/* ---------- right rail cards ---------- */
.card { background: var(--wash); border-radius: var(--r); padding: 14px 15px 12px; font-size: 14px; color: var(--ink-soft); }
.card p { margin: 0 0 8px; }
.card h3 { color: var(--wct); }
.card .fine { font-size: 12px; color: var(--muted); margin: 6px 0 0; }
.dnote { margin: 0 0 10px; padding: 0 0 0 12px; border-inline-start: 2px solid var(--wc); }
.dnote p { font-family: var(--en-font); font-size: 17px; line-height: 1.5; color: var(--ink); margin: 0 0 4px; }
.dnote footer { font-size: 12px; color: var(--muted); }
.sefaria { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sf { width: 100%; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; text-align: start; padding: 8px 10px; border-radius: 10px; background: var(--ground); border: 1px solid var(--line); }
.sf span { font-weight: 600; color: var(--ink); }
.sf small { font-size: 11px; color: var(--muted); white-space: nowrap; }
.sf[aria-expanded="true"] { border-color: var(--wc); }
.sftext { padding: 10px 4px 4px; }
.sftext .he { display: block; font-size: 19px; line-height: 1.7; text-align: right; color: var(--ink); margin-bottom: 8px; }
.sftext .en { font-family: var(--en-font); font-size: 17px; line-height: 1.5; color: var(--ink); }
.sftext .seg { padding: 6px 0; border-bottom: 1px solid var(--line); }
.sftext .open { font-size: 12px; display: inline-block; margin-top: 6px; }
.srcs { margin: 0; padding-inline-start: 1.1em; }
.people a { color: var(--ink); }
.xlinks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.xlinks a { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 10px; background: var(--ground); border: 1px solid var(--line); text-decoration: none; }
.xlinks a:hover { border-color: var(--ink-soft); }
.xlinks span { font-weight: 600; color: var(--ink); }
.xlinks small { font-size: 11px; color: var(--muted); }
.xlinks li { position: relative; }
.xlinks li::after { content: "↗"; position: absolute; right: 10px; top: 9px; color: var(--muted); font-size: 12px; }
.x-siddur a { box-shadow: inset 3px 0 0 var(--c-assiyah); } .x-psalms a { box-shadow: inset 3px 0 0 var(--c-yetzirah); } .x-blessings a { box-shadow: inset 3px 0 0 var(--c-briah); }
.term { border-top: 1px solid var(--line); padding: 7px 0; }
.term summary { cursor: pointer; font-weight: 600; color: var(--ink); display: flex; justify-content: space-between; gap: 8px; list-style: none; }
.term summary::-webkit-details-marker { display: none; }
.term summary .he { font-weight: 400; color: var(--muted); }
.term p { margin: 6px 0 2px; }
.plist { list-style: none; margin: 0; padding: 0; }
.plist a { display: flex; gap: 10px; padding: 6px 4px; border-top: 1px solid var(--line); text-decoration: none; font-size: 13px; line-height: 1.4; }
.plist .pn { flex: none; width: 4.2em; font-weight: 700; color: var(--wct); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--ground); border: 1px solid var(--line); text-decoration: none; color: var(--ink-soft); }
.tag:hover { border-color: var(--ink-soft); color: var(--ink); }
.tag.pr { border-color: color-mix(in srgb, var(--c-briah) 50%, transparent); }
.tag.oc { border-color: color-mix(in srgb, var(--c-sefirot) 50%, transparent); }
.tag.pe { font-style: italic; }
.slot .slotbody { font-family: var(--en-font); font-size: 18px; line-height: 1.55; color: var(--ink); }
.slot.empty .slotbody { font-family: var(--ui-font); font-size: 13px; color: var(--muted); border: 1px dashed var(--line); border-radius: 10px; padding: 12px; }
.slot audio { width: 100%; } .slot iframe { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: 10px; } .slot video { width: 100%; border-radius: 10px; }
.rrail .w { margin: 0; padding: 14px 14px 12px; }

/* ---------- page links ---------- */
.pl { display: flex; align-items: flex-start; gap: 10px; text-decoration: none; padding: 6px 4px; border-radius: 8px; color: var(--ink); }
.pl:hover { background: var(--tint); }
.pl .dot { margin-top: .55em; width: 7px; height: 7px; }
.pn { font-size: 12px; color: var(--muted); font-weight: 600; min-width: 3.6em; font-variant-numeric: tabular-nums; padding-top: .12em; }
.pt { font-family: var(--en-font); font-size: 17px; line-height: 1.3; }
.star { color: var(--wct); font-size: 11px; }

/* ---------- zoom ---------- */
.zoom { position: fixed; inset: 0; z-index: 70; background: #f4f2ee; display: flex; flex-direction: column; }
:root[data-theme="dark"] .zoom { background: #101010; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .zoom { background: #101010; } }
.zbar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--ground); }
.zlab { flex: 1; font-size: 13px; font-weight: 600; }
.zbar button { min-width: 38px; height: 34px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); font-size: 15px; }
.zimg { flex: 1; overflow: auto; display: flex; justify-content: center; align-items: flex-start; padding: 16px; cursor: zoom-out; }
.zimg img { max-width: none; width: min(100%, 1100px); background: #fff; box-shadow: var(--paper); }
.zoom.big .zimg img { width: auto; }

/* ---------- Reb David's words ---------- */
.dwbwrap { position: relative; }

.dwb { font-family: var(--en-font); font-size: 21px; line-height: 1.55; color: var(--ink); margin: 0 0 34px; }
.dwb p { margin: 0 0 .8em; }
.dwb h2 { font-family: var(--en-font); font-weight: 500; font-size: 1.45em; line-height: 1.2; margin: .2em 0 .5em; }
.dwb cite { display: block; font-size: 16px; color: var(--muted); font-style: italic; text-align: end; margin-top: -.2em; }
.dwb .he { font-size: 1.15em; }
.dwb .big { font-size: 1.5em; line-height: 1.25; }
.dwb .huge { font-size: clamp(44px, 9vw, 76px); line-height: 1.1; margin: .1em 0; }
.dwb .he.huge { font-size: clamp(56px, 13vw, 110px); }
.dwb .caps { letter-spacing: .14em; font-size: .95em; }
.dwb .small { font-size: 17px; color: var(--ink-soft); }
.dwb.center, .dwb.sign, .dwb.unity, .dwb.pairs, .dwb.enjoy, .dwb.meet, .dwb.stack { text-align: center; }
.dwb.sign { padding: 34px 0; }
.dwb.sign p { margin: .25em 0; }
.dwb.sign:not(:has(p > .he, .caps, .huge)) { font-size: clamp(34px, 7vw, 56px); line-height: 1.15; font-weight: 500; color: var(--wct); letter-spacing: .02em; }
.dwb .name { font-size: clamp(90px, 22vw, 190px) !important; line-height: 1.2; color: var(--ink); }
.dwb.cols2 ul { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 28px; }
.dwb.cols2 li { break-inside: avoid; padding: 6px 0; border-bottom: 1px solid var(--line); }
.dwb.list ol { padding-inline-start: 1.3em; }
.dwb.list li { margin-bottom: .9em; padding-inline-start: .2em; }
.dwb.list li::marker { color: var(--wct); font-family: var(--ui-font); font-size: .7em; font-weight: 600; }
.dwb.era { border-inline-start: 2px solid color-mix(in srgb, var(--wc) 45%, transparent); padding-inline-start: 22px; }
.era { font-family: var(--ui-font); font-size: 13px; color: var(--muted); margin-bottom: 4px !important; }
.era span { color: var(--wct); font-weight: 700; letter-spacing: .06em; }
.era em { font-family: var(--en-font); font-size: 19px; color: var(--ink-soft); }
.pair { display: flex; justify-content: space-between; gap: 18px; margin: .6em 0; }
.pair small { font-size: .4em; vertical-align: middle; color: var(--muted); letter-spacing: .05em; }
.dwb.unity { padding: 18px; border-radius: var(--r); background: var(--tint); }
.dwb.unity p { margin: .2em 0; }
.dwb.poem { font-style: italic; font-size: 19px; text-align: center; color: var(--ink-soft); }
.dwb.poem cite { text-align: center; }
.dwb.liturgy .lit { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.dwb.liturgy .lit .he { text-align: right; }
.dwb.liturgy .lit p:last-child { font-size: 18px; }
.translit { font-family: var(--ui-font); font-size: 14px; color: var(--muted); }
@media (max-width: 600px) { .dwb.liturgy .lit { grid-template-columns: 1fr; } }
.wordhead { display: flex; align-items: baseline; justify-content: center; gap: 22px; font-size: 1.9em; margin: .4em 0 .3em !important; }
.wordhead .he { font-size: 1.15em; color: var(--wct); }
.dwb.word { text-align: center; }
.pairline { display: flex; align-items: center; justify-content: center; gap: 26px; text-align: start; }
.pairline .he.huge { color: var(--wct); width: 1.1em; text-align: center; }
.dwb hr, .dwb.stack hr { border: 0; border-top: 1px solid var(--line); margin: 1.2em auto; width: 60%; }
.dwb.twocol { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.dwb.twocol .he { color: var(--wct); margin: 0; }
.dwb.twocol .big { margin: 0 0 .3em; }
@media (max-width: 600px) { .dwb.twocol { grid-template-columns: 1fr; } }
.dwb.scale table { width: 100%; border-collapse: collapse; font-size: 17px; }
.dwb.scale th, .dwb.scale td { padding: 10px 8px; border-top: 1px solid var(--line); vertical-align: top; text-align: start; }
.dwb.scale th { font-weight: 600; font-size: 18px; }
@media (max-width: 600px) { .dwb.scale { overflow-x: auto; } .dwb.scale table { min-width: 560px; } }
.dwb.foot { font-size: 17px; color: var(--ink-soft); text-align: center; }
.breathline { font-size: 15px; letter-spacing: .1em; color: var(--muted); overflow-wrap: anywhere; }
.corners { display: flex; justify-content: space-between; font-size: 26px; color: var(--wct); }
.corners.top { margin-bottom: -.4em; }
.poemc { font-size: 22px; line-height: 1.5; }
.dwb.enjoy { border: 1px solid color-mix(in srgb, var(--wc) 35%, transparent); border-radius: 22px; padding: clamp(24px, 6vw, 56px) clamp(18px, 6vw, 48px); background: var(--tint); }
.enjoyword { font-size: clamp(54px, 13vw, 104px); line-height: .98; color: var(--wct); margin: .45em 0 .1em !important; font-weight: 500; }


/* ---------- widgets: the meta-meta layer ---------- */
.w { margin: 0 0 38px; padding: 22px 22px 18px; border-radius: var(--r); background: var(--wash); border: 1px solid var(--line); font-family: var(--ui-font); }
.wlabel { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--wct); font-weight: 600; margin-bottom: 14px; }
.wnote { font-size: 13px; color: var(--muted); margin: 12px 0 0; }
.vctl { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; margin-top: 16px; }
.vctl button { padding: 8px 16px; border-radius: 999px; background: var(--wc); color: #fff; font-weight: 600; font-size: 14px; min-width: 44px; }
.vctl button.ghost { background: transparent; color: var(--ink-soft); border: 1px solid var(--line); font-weight: 500; }
:root[data-theme="dark"] .vctl button:not(.ghost) { color: #151413; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .vctl button:not(.ghost) { color: #151413; } }
.vctl select { font: inherit; font-size: 13px; background: var(--ground); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; }
.pace { font-size: 13px; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }

.verbs { text-align: center; }
.vhe { font-size: 34px; margin: 0; color: var(--ink); }
.vword { font-family: var(--en-font); font-size: clamp(32px, 7vw, 50px); line-height: 1.15; margin: 6px 0 0; color: var(--wct); min-height: 1.2em; transition: opacity .25s; }
.vword.fade { opacity: 0; }
.vcount { font-size: 13px; color: var(--muted); min-width: 56px; text-align: center; }

.triad { display: flex; align-items: center; justify-content: center; gap: 0; text-align: center; }
.tnode { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; max-width: 200px; }
.tnode b { font-family: var(--en-font); font-size: 26px; font-weight: 500; }
.tnode.mid b { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; background: var(--wc); color: var(--ground); font-size: 24px; }
.tnode small { font-size: 12px; color: var(--muted); line-height: 1.4; min-height: 3em; }
.tw { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.tline { height: 1px; flex: 0 0 24px; background: var(--wc); opacity: .5; }

.weave { text-align: center; }
.wrow { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 6px 0; }
.wl { font-size: 12px; color: var(--muted); }
.wletters { font-family: var(--en-font); font-size: clamp(26px, 6vw, 40px); letter-spacing: .18em; }
.weave.he .wletters { font-family: var(--he-font); letter-spacing: .12em; }
.wa .wletters { color: var(--wct); }
.wb .wletters { color: var(--c-gold); }
.woven { min-height: 1.4em; font-size: clamp(34px, 8vw, 58px) !important; }
.woven i { font-style: normal; display: inline-block; animation: drop .45s ease both; }
.woven i.fa { color: var(--wct); } .woven i.fb { color: var(--c-gold); }
.wletters span.used { opacity: .25; transition: opacity .3s; }
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.pend { text-align: center; }
.pend svg { width: min(260px, 70vw); height: auto; }
.pend line { stroke: var(--ink-soft); stroke-width: 1.2; }
.pend circle { fill: var(--wc); }
.pend .pv { fill: var(--ink-soft); }
.pg { transform-origin: 100px 6px; animation: swing 6s ease-in-out infinite alternate; }
.pend.paused .pg { animation-play-state: paused; }
@keyframes swing { 0% { transform: rotate(-24deg); } 100% { transform: rotate(23deg); } }

.turn { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.turnrow { width: 100%; text-align: center; padding: 14px; border-radius: 12px; background: var(--ground); border: 1px solid var(--line); font-family: var(--en-font); font-size: 21px; display: grid; }
.turnrow > span { grid-area: 1 / 1; transition: opacity .5s, transform .5s; }
.turnrow .t1 { opacity: 0; transform: translateY(6px); color: var(--wct); }
.turnrow[aria-pressed="true"] .t0 { opacity: 0; transform: translateY(-6px); }
.turnrow[aria-pressed="true"] .t1 { opacity: 1; transform: none; }

.qual { list-style: none; padding: 0; margin: 0; }
.qual li { border-top: 1px solid var(--line); }
.qual li:last-child { border-bottom: 1px solid var(--line); }
.qual summary { list-style: none; display: grid; grid-template-columns: 4.2em 6.5em 1fr; align-items: baseline; gap: 10px; padding: 10px 4px; cursor: pointer; }
.qual summary::-webkit-details-marker { display: none; }
.qh { font-size: 24px; color: var(--wct); text-align: right; }
.qt { font-style: italic; color: var(--muted); font-size: 14px; }
.qe { font-family: var(--en-font); font-size: 22px; }
.qual details p { margin: 0 0 14px; padding-inline-start: calc(4.2em + 10px); font-family: var(--en-font); font-size: 19px; color: var(--ink-soft); }
@media (max-width: 520px) { .qual summary { grid-template-columns: 3.4em 1fr; } .qt { display: none; } .qual details p { padding-inline-start: calc(3.4em + 10px); } }
.qual.one li { display: none; } .qual.one li.today { display: block; border: 0; }

.stoc { display: grid; gap: 2px; }

.breath { text-align: center; }
.bcircle { position: relative; width: 190px; height: 190px; margin: 6px auto; border-radius: 50%; background: color-mix(in srgb, var(--wc) 16%, transparent); border: 1px solid color-mix(in srgb, var(--wc) 40%, transparent); transform: scale(.42); transition: transform 6s ease-in-out; display: grid; place-items: center; }
.breath.open .bcircle { transform: scale(1); }
.bl { grid-area: 1 / 1; font-size: 82px; color: var(--wct); transition: opacity 1.2s; line-height: 1; }
.bl.bb { opacity: 0; } .breath.open .bl.ba { opacity: 0; } .breath.open .bl.bb { opacity: 1; }
.bstate { position: relative; height: 1.6em; font-size: 15px; color: var(--ink-soft); margin: 4px 0 0; }
.bstate span { position: absolute; inset: 0; transition: opacity 1s; }
.bstate .bb { opacity: 0; } .breath.open .bstate .ba { opacity: 0; } .breath.open .bstate .bb { opacity: 1; }

.gazebox { text-align: center; }
.gazeov { position: fixed; inset: 0; z-index: 60; background: #0D0C0B; display: grid; place-items: center; cursor: pointer; animation: fadein 1.6s ease; }
.gazeov .he { font-size: min(34vw, 46vh); color: #EDEAE4; line-height: 1; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

.wtabs { display: flex; gap: 4px; margin-bottom: 10px; flex-wrap: wrap; }
.wtabs button { font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--wct); background: var(--ground); }
.wtabs button[aria-selected="true"] { background: var(--wc); color: #fff; border-color: var(--wct); }
.wcol { background: var(--ground); border-radius: 12px; border-top: 4px solid var(--wc); padding: 14px 12px; font-size: 14px; }
.wcol h3 { margin: 0; font-family: var(--en-font); font-size: 24px; font-weight: 600; color: var(--wct); display: flex; justify-content: space-between; align-items: baseline; gap: 4px; flex-wrap: wrap; }
.wcol h3 .he { font-size: 16px; font-weight: 400; color: var(--muted); }
.wg { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 2px 0 10px; }
.wd { font-family: var(--en-font); font-size: 17px; line-height: 1.45; }
.wv { font-family: var(--en-font); font-size: 21px; font-weight: 600; color: var(--wct); border-top: 1px solid var(--line); padding-top: 8px; }
.wh { color: var(--ink-soft); font-size: 13px; }


.flow { text-align: center; }
.ftitle { font-family: var(--en-font); font-size: 22px; margin: 0 0 10px; }
.fcols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fcols ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; align-content: start; }
.fcols li { font-family: var(--en-font); font-style: italic; font-size: 20px; padding: 6px 10px; border-radius: 999px; background: var(--ground); border: 1px solid var(--line); transition: opacity .5s, transform .5s; }
.fcols li.fh { font-style: normal; font-family: var(--ui-font); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--wct); background: none; border: 0; }
.flow.pouring li:not(.fh), .flow.pouring .fend, .flow.pouring .fendt { opacity: .12; transform: translateY(-4px); }
.flow li.lit, .flow .lit { opacity: 1 !important; transform: none !important; }
.fend { font-size: 44px; margin: 14px 0 0; color: var(--wct); transition: opacity .6s; }
.fendt { font-family: var(--en-font); font-size: 19px; margin: 0; transition: opacity .6s; }

.alefbet { text-align: center; }
.ab { font-size: clamp(20px, 4.4vw, 30px); letter-spacing: .08em; margin: 0; line-height: 1.6; }
.ab span { display: inline-block; transition: color .3s, transform .3s; }
.ab span.lit { color: var(--wct); transform: translateY(-3px); }
.abh { font-size: 60px; margin: 4px 0 0; color: var(--muted); transition: color .8s, transform 1.2s; }
.abh.lit { color: var(--wct); transform: scale(1.12); }

.letters { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.letters li { display: flex; align-items: center; gap: 22px; padding: 12px 16px; border-radius: 12px; background: var(--ground); border-inline-start: 4px solid var(--wc); font-family: var(--en-font); font-size: 22px; line-height: 1.25; }
.letters .he { font-size: 54px; color: var(--wct); width: 1em; text-align: center; line-height: 1; }
.letters b { font-weight: 500; }

.pool { text-align: center; }
.ptitle { font-family: var(--en-font); font-size: 22px; margin: 0 0 16px; }
.pcenter { display: inline-flex; flex-direction: column; align-items: center; padding: 22px 34px; border-radius: 50%; background: var(--wc); color: var(--ground); margin-bottom: 18px; }
.pcenter .he { font-size: 34px; }
.pcenter em { font-family: var(--en-font); font-size: 18px; }
.pitems { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pitems li { font-family: var(--en-font); font-size: 18px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--ground); }
.pitems li:nth-child(3n) { font-style: italic; }


/* ---------- home / contents / about ---------- */
.hmain { max-width: 64rem; margin: 0 auto; padding: 36px 20px 60px; }
.hero { display: grid; grid-template-columns: 220px 1fr; gap: 40px; align-items: center; padding: 20px 0 30px; }
.cover img { display: block; width: 100%; border-radius: 3px; box-shadow: var(--paper); background: #fff; }
.hero h1 { font-family: var(--en-font); font-weight: 500; font-size: clamp(46px, 8vw, 80px); line-height: 1; margin: 4px 0 8px; }
.hero h1 .he { display: block; font-size: .42em; color: var(--muted); font-weight: 300; margin-top: 8px; }
.hero .sub { font-family: var(--en-font); font-size: 22px; color: var(--ink-soft); margin: 0; }
.hero .by { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 12px 0 18px; }
.dwbq { font-family: var(--en-font); font-size: 19px; font-style: italic; color: var(--ink-soft); margin: 0 0 22px; line-height: 1.55; padding-inline-start: 16px; border-inline-start: 2px solid var(--c-gold); }
@media (max-width: 720px) { .hero { grid-template-columns: 1fr; gap: 20px; } .cover { width: 150px; } }
.goto { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; }
.goto label { font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.goto input { width: 7.5em; font: 600 18px var(--ui-font); padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--ground); color: var(--ink); text-align: center; }
.goto button { padding: 9px 16px; border-radius: 10px; background: var(--ink); color: var(--ground); font-weight: 600; }
.heroLinks { display: flex; flex-wrap: wrap; gap: 8px; }
.pillb { display: inline-block; font-size: 14px; padding: 9px 16px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); }
.pillb:hover { border-color: var(--ink-soft); }
.worldsmap { max-width: 34rem; margin: 10px auto 40px; text-align: center; font-size: 14px; color: var(--muted); }
.trail { list-style: none; display: flex; padding: 0; margin: 4px 0 10px; }
.ts { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); position: relative; text-align: center; }
.ts::before { content: ""; position: absolute; top: 6px; left: 0; right: 0; height: 1px; background: var(--line); }
.ts:first-child::before { left: 50%; } .ts:last-child::before { right: 50%; }
.tdot { width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--wc); background: var(--ground); position: relative; z-index: 1; }
.ts.on .tdot { background: var(--wc); } .ts.on { color: var(--ink); font-weight: 600; }
.start h2, .allsec > h2 { font-family: var(--en-font); font-weight: 500; font-size: 34px; margin: 0 0 14px; }
.startgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-bottom: 50px; }
.sg { background: var(--wash); border-radius: 18px; padding: 18px; border-top: 4px solid var(--wc); }
.sg h3 { font-family: var(--en-font); font-size: 26px; font-weight: 500; margin: 0; color: var(--wct); }
.sg > p { margin: 2px 0 10px; color: var(--muted); font-size: 14px; }
.lede { color: var(--muted); margin: 0 0 22px; }
.secrows { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.secrows a { display: flex; align-items: baseline; gap: 14px; padding: 12px 8px; text-decoration: none; border-bottom: 1px solid var(--line); border-inline-start: 3px solid var(--wc); }
.secrows a:hover { background: var(--tint); }
.secrows .sn { width: 1.6em; font-size: 13px; font-weight: 700; color: var(--wct); }
.secrows .st { font-family: var(--en-font); font-size: 22px; flex: 1; }
.secrows .sc { font-size: 12px; color: var(--muted); }
.csec { margin: 0 0 30px; }
.csec h2 { display: flex; align-items: baseline; gap: 12px; font-family: var(--en-font); font-weight: 500; font-size: 26px; margin: 0 0 6px; padding-bottom: 6px; border-bottom: 2px solid var(--wc); }
.csec .sn { font-family: var(--ui-font); font-size: 13px; font-weight: 700; color: var(--wct); }
.csec .cnt { margin-inline-start: auto; font-family: var(--ui-font); font-size: 12px; color: var(--muted); }
.clist { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); column-gap: 18px; }
.cfilter { width: 100%; font: 16px var(--ui-font); padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--wash); color: var(--ink); margin-bottom: 26px; }
.about .hmain { max-width: 42rem; }
.about h1 { font-family: var(--en-font); font-weight: 500; font-size: 48px; margin: 0 0 10px; }
.about h2 { font-family: var(--en-font); font-weight: 500; font-size: 28px; margin: 36px 0 8px; }
.about p, .about li { font-size: 16px; color: var(--ink-soft); }
.about blockquote { font-family: var(--en-font); font-size: 20px; font-style: italic; margin: 14px 0; padding-inline-start: 18px; border-inline-start: 2px solid var(--c-gold); color: var(--ink); }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; padding: 0; list-style: none; }
.swatches li { display: flex; align-items: center; gap: 8px; font-size: 14px; }

/* ---------- subjects ---------- */
.smain { max-width: 1400px; margin: 0 auto; padding: 30px 20px 60px; }
.shead h1 { font-family: var(--en-font); font-weight: 500; font-size: 46px; margin: 0 0 4px; }
.sbar { display: flex; gap: 8px; align-items: center; margin: 4px 0 10px; }
.sq { flex: 1; max-width: 520px; font: 16px var(--ui-font); padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--wash); color: var(--ink); }
.sclear, .sfacets-btn { font-size: 13px; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line); }
.sfacets-btn { display: none; }
.fdone { display: none; }
.active { display: flex; flex-wrap: wrap; gap: 6px; min-height: 8px; margin-bottom: 14px; }
.active button { font-size: 12px; padding: 5px 10px; border-radius: 999px; background: var(--ink); color: var(--ground); }
.active button::after { content: "  ✕"; opacity: .7; }
.sgrid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 28px; align-items: start; }
.facets { position: sticky; top: calc(var(--top) + 12px); max-height: calc(100vh - var(--top) - 24px); overflow: auto; padding-inline-end: 6px; }
.facet { border-top: 1px solid var(--line); padding: 10px 0; }
.facet summary { list-style: none; display: flex; justify-content: space-between; cursor: pointer; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--ink-soft); }
.facet summary::-webkit-details-marker { display: none; }
.facet summary::after { content: "+"; font-size: 14px; color: var(--muted); }
.facet[open] summary::after { content: "–"; }
.fchips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.fchips .grp { width: 100%; font-size: 11px; color: var(--muted); margin: 6px 0 0; }
.fc { font-size: 12.5px; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--ground); color: var(--ink-soft); }
.fc b { font-weight: 600; color: var(--muted); font-size: 11px; margin-inline-start: 4px; }
.fc[aria-pressed="true"] { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.fc[aria-pressed="true"] b { color: var(--ground); opacity: .7; }
.fc:disabled { opacity: .35; cursor: default; }
.fmore { font-size: 12px; color: var(--act); margin-top: 6px; }
.rcount { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.rlist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 12px; }
.rcard a { display: grid; grid-template-columns: 76px 1fr; gap: 12px; padding: 10px; border-radius: 14px; background: var(--wash); text-decoration: none; height: 100%; border-inline-start: 3px solid var(--wc); }
.rcard a:hover { background: var(--wash-2); }
.rcard img { width: 76px; height: 98px; object-fit: cover; object-position: top; border-radius: 3px; background: #fff; box-shadow: var(--paper); }
.rcard .rt { font-family: var(--en-font); font-size: 19px; line-height: 1.2; color: var(--ink); display: block; margin: 2px 0 4px; }
.rcard .rn { font-size: 11px; font-weight: 700; color: var(--wct); letter-spacing: .04em; }
.rcard .rd { font-size: 13px; color: var(--ink-soft); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rcard .rm { font-size: 11px; color: var(--muted); margin-top: 4px; display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rcard img { filter: invert(.9) hue-rotate(180deg); } }
:root[data-theme="dark"] .rcard img { filter: invert(.9) hue-rotate(180deg); }
@media (max-width: 900px) {
  .sgrid { grid-template-columns: 1fr; }
  .sfacets-btn { display: inline-block; }
  .facets { position: fixed; z-index: 45; inset: var(--top) 0 0 auto; width: min(360px, 92vw); max-height: none; background: var(--ground); padding: 16px; box-shadow: var(--shadow); transform: translateX(102%); transition: transform .25s; }
  body.facets-open .facets { transform: none; }
  body.facets-open .fdone { display: block; position: fixed; z-index: 46; right: 16px; bottom: 16px; padding: 12px 18px; border-radius: 999px; background: var(--ink); color: var(--ground); font-weight: 600; box-shadow: var(--shadow); }
  .facets { padding-bottom: 80px; }
}

/* ---------- search overlay ---------- */
.search { position: fixed; inset: 0; z-index: 60; background: color-mix(in srgb, var(--ground) 70%, transparent); backdrop-filter: blur(6px); display: flex; justify-content: center; align-items: flex-start; padding: 10vh 16px 16px; }
.sbox { width: min(640px, 100%); background: var(--ground); border-radius: 18px; box-shadow: var(--shadow); border: 1px solid var(--line); overflow: hidden; }
.sbox input { width: 100%; border: 0; border-bottom: 1px solid var(--line); padding: 18px 20px; font: 18px var(--ui-font); background: transparent; color: var(--ink); outline: none; }
.sres { list-style: none; margin: 0; padding: 6px; max-height: 60vh; overflow: auto; }
.sres li a { display: block; padding: 10px 12px; border-radius: 10px; text-decoration: none; }
.sres li a:hover, .sres li a.sel { background: var(--wash); }
.sres .pl { padding: 0; }
.sres .snip, .lres .snip { display: block; font-size: 13px; color: var(--muted); line-height: 1.45; margin-top: 2px; }
.sres mark, .lres mark { background: color-mix(in srgb, var(--c-gold) 30%, transparent); color: inherit; border-radius: 2px; }
.shint { font-size: 12px; color: var(--muted); padding: 8px 20px 12px; margin: 0; border-top: 1px solid var(--line); }

.foot { max-width: 64rem; margin: 0 auto; padding: 28px 20px 70px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); }
.foot a { color: var(--muted); }
.res .foot { max-width: none; padding-inline: clamp(16px, 3vw, 40px); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print { .top, .lrail, .rrail, .pager, .foot, .ctools { display: none !important; } .shell { display: block; } }

/* ---------- v2.1: colored, collapsible margin cards ---------- */
:root {
  --s0: #C4553A; --s1: #3E78BE; --s2: #2E7D4A; --s3: #B0477A; --s4: #A8862A; --s5: #3F6E6A; --s6: #8C5AB8; --s7: #8A5A3B;
  --k-try: var(--c-atzilut); --k-listen: var(--c-songs); --k-shir: var(--c-gold); --k-note: var(--c-briah); --k-src: var(--c-yetzirah);
  --k-x: var(--c-assiyah); --k-words: var(--c-hassidut); --k-threads: var(--c-four); --k-pages: var(--c-kaddish); --k-subj: var(--c-intro);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --s0: #E58A6E; --s1: #8DB3E8; --s2: #6FBF8A; --s3: #E58AB3; --s4: #D9B65E; --s5: #7FB5AF; --s6: #C3A2E6; --s7: #D29A74; } }
:root[data-theme="dark"] { --s0: #E58A6E; --s1: #8DB3E8; --s2: #6FBF8A; --s3: #E58AB3; --s4: #D9B65E; --s5: #7FB5AF; --s6: #C3A2E6; --s7: #D29A74; }

.rtools { display: flex; justify-content: flex-end; gap: 6px; margin-bottom: -4px; }
.rall { font-size: 11.5px; color: var(--muted); padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); background: none; cursor: pointer; }
.rall:hover { color: var(--ink); border-color: var(--ink-soft); }

details.card { --kc: var(--muted); padding: 0; overflow: hidden; border-inline-start: 3px solid var(--kc);
  background: color-mix(in srgb, var(--kc) 4%, var(--wash)); }
details.card > summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 11px 14px; cursor: pointer;
  background: color-mix(in srgb, var(--kc) 9%, transparent); }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary h3 { margin: 0; flex: 1; color: color-mix(in srgb, var(--kc) 78%, var(--ink)); }
details.card > summary::after { content: ""; width: 7px; height: 7px; border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted);
  transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
details.card:not([open]) > summary::after { transform: rotate(-45deg); }
details.card > summary:hover { background: color-mix(in srgb, var(--kc) 15%, transparent); }
details.card > summary:focus-visible { outline: 2px solid var(--kc); outline-offset: -2px; }
details.card .cbody { padding: 12px 15px 12px; }
details.card[hidden] { display: none; }
.card.k-try { --kc: var(--k-try); } .card.k-listen { --kc: var(--k-listen); } .card.k-shir { --kc: var(--k-shir); } .card.k-note { --kc: var(--k-note); }
.card.k-src { --kc: var(--k-src); } .card.k-x { --kc: var(--k-x); } .card.k-words { --kc: var(--k-words); } .card.k-threads { --kc: var(--k-threads); }
.card.k-pages { --kc: var(--k-pages); } .card.k-subj { --kc: var(--k-subj); }
.card .sub { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin: 12px 0 6px; }

/* sources list + swatches */
.srclist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.srclist .sf { justify-content: flex-start; align-items: center; }
.srclist .sf > span:not(.sw) { flex: 1; }
.sf.plain { text-decoration: none; cursor: default; }
a.sf.plain { cursor: pointer; }
.sw { flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--sc); }
.sw.off { background: none; border: 1.5px dashed var(--line); }
li.src { border-radius: 11px; transition: box-shadow .15s, background .15s; }
li.src.lit .sf { border-color: var(--sc); background: color-mix(in srgb, var(--sc) 12%, var(--ground)); box-shadow: 0 0 0 1px var(--sc); }

/* hotspots on the page */
.fwrap { position: relative; }
.hsl { position: absolute; inset: 0; pointer-events: none; }
.hs { position: absolute; pointer-events: auto; border-radius: 6px; cursor: pointer; transition: background .15s, box-shadow .15s; }
.folio:hover .hs, body.hs-on .hs { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sc) 45%, transparent); }
body.hs-on .hs { background: color-mix(in srgb, var(--sc) 7%, transparent); }
.hs.lit, .hs:focus-visible { background: color-mix(in srgb, var(--sc) 20%, transparent); box-shadow: inset 0 0 0 2px var(--sc); outline: none; }
.hs.lit::after { content: attr(data-lab); position: absolute; left: 0; bottom: 100%; margin-bottom: 4px; white-space: nowrap; font: 600 11.5px var(--ui-font);
  color: #fff; background: var(--sc); padding: 3px 8px; border-radius: 6px; pointer-events: none; z-index: 2; }
.hs.lit.first::after { display: block; } .hs.lit:not(.first)::after { display: none; }
@media (hover: none) { .folio:hover .hs { box-shadow: none; } }
.hsbtn, .slbtn { font-size: 12.5px; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; color: var(--ink-soft); background: none; text-decoration: none; }
.hsbtn[aria-pressed="true"] { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.slbtn { color: var(--wct); border-color: color-mix(in srgb, var(--wc) 50%, transparent); font-weight: 600; }
.slbtn:hover { background: var(--tint); }

/* read-through link */
.slidelink { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; background: var(--ground); border: 1px solid var(--line);
  text-decoration: none; box-shadow: inset 3px 0 0 var(--kc); }
.slidelink span { font-weight: 600; color: var(--ink); }
.slidelink small { font-size: 11.5px; color: var(--muted); }
.slidelink:hover { border-color: var(--kc); }

/* audio */
.alist { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.at { margin: 0 0 4px !important; font-weight: 600; color: var(--ink); }
.at small { font-weight: 400; color: var(--muted); font-size: 12px; margin-inline-start: 4px; }
.am { margin: 4px 0 0 !important; font-size: 12px; color: var(--muted); }
.alist audio, .arow audio { width: 100%; height: 36px; }
.listen .hmain, main.hmain.listen { max-width: 860px; }
.acoll { margin: 28px 0 0; }
.acoll h2 { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin: 0 0 10px; }
.arows { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.arow { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 16px; padding: 12px 14px; border-radius: var(--r); background: var(--wash);
  border-inline-start: 3px solid var(--c-songs); scroll-margin-top: 80px; }
.arow:target { box-shadow: 0 0 0 2px var(--c-songs); }
.apages { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-content: start; }
.apages a { padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--ink-soft); background: var(--ground); }
.apages a:hover { border-color: var(--ink-soft); }
@media (max-width: 640px) { .arow { grid-template-columns: 1fr; } }
.srclist .sf { flex-wrap: wrap; row-gap: 1px; }
.srclist .sf small { flex-basis: 100%; padding-inline-start: 18px; white-space: normal; }
.apages { flex-direction: column; flex-wrap: nowrap; gap: 4px; }
.apages a.pl { border-radius: 10px; padding: 6px 10px; }
.arow { grid-template-columns: minmax(0, 1fr) 260px; }
@media (max-width: 640px) { .arow { grid-template-columns: 1fr; } }
