/* ლოცვანი — design v3 (our own look).
   The five decisions:
   1 Reference: a printed Georgian prayer book — warm print with manuscript rubrics. Not an "app".
   2 Palette seed: oxblood red. Warm neutral ramp (paper / ink). Gold is for hairlines and small ornaments only.
   3 Type: Noto Serif Georgian (titles, reading text, numerals) + Noto Sans Georgian (interface). Scale 1.25: 12.5 · 14 · 16 · 20 · 25 · 31 · 39 · 49.
   4 Density: airy in the reader, medium in lists and indexes.
   5 Signature: ruled pages and framed plates instead of generic cards — hairlines, the double "book rule", red rubrics and the red initial.
     The oxblood "today" panel is the one strong colour block; index pages sit on quiet parchment plates (tonal fill + hairline),
     with the real icons in arched gold frames as the only pictures. The only curved shape is the arch.
   Depth: flat — tonal fills + hairlines. No shadows (the lightbox backdrop is the single floating layer). Corners: 4px, 6px plates, 10px header plates. */
:root {
  --paper: #f4f5f7; --paper-2: #eef0f3; --card: #fff; --ink: #2b2f36; --ink-2: #555b66; --ink-3: #6b717c;
  --line: #e5e7eb; --red: #b8402c; --gold: #c9973a; --gold-ink: #8a6416; --gold-soft: rgba(224, 169, 59, .16);
  --accent: #4a1d12; --on-accent: #fff; --cream-gold: #e8c478; --btn: #2b2f36; --amber: #e0a93b; --amber-soft: #f6e8c8;
  --serif: "Noto Serif Georgian", "Sylfaen", Georgia, serif; --sans: "Noto Sans Georgian", "Segoe UI", system-ui, sans-serif;
  --read: 20px; --r: 10px; --rl: 18px; --bar-h: 64px; --gut: clamp(16px, 3vw, 48px);
  --shadow: 0 1px 2px rgba(20, 24, 32, .04), 0 6px 22px rgba(20, 24, 32, .05);
  --st-feast: #c9973a; --st-easter: #b0161b; --st-fast: #7c5cd6; --st-free: #3ea060; --st-cheese: #e29232; --st-mem: #6e687a;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --paper: #121316; --paper-2: #1b1d21; --card: #1a1c20; --ink: #eceae6; --ink-2: #b7b4ae; --ink-3: #8b8984; --line: #2c2f35;
  --red: #ec8b75; --gold: #d9ad5a; --gold-ink: #e3b766; --gold-soft: rgba(224, 169, 59, .14); --accent: #8a2a22; --btn: #eceae6; --amber-soft: rgba(224, 169, 59, .18);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3); } }
:root[data-theme="dark"] {
  --paper: #121316; --paper-2: #1b1d21; --card: #1a1c20; --ink: #eceae6; --ink-2: #b7b4ae; --ink-3: #8b8984; --line: #2c2f35;
  --red: #ec8b75; --gold: #d9ad5a; --gold-ink: #e3b766; --gold-soft: rgba(224, 169, 59, .14); --accent: #8a2a22; --btn: #eceae6; --amber-soft: rgba(224, 169, 59, .18);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--bar-h) + 20px); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 var(--sans); min-height: 100vh; display: flex; flex-direction: column; overflow-x: clip; }
a { color: inherit; }
::selection { background: color-mix(in srgb, var(--gold) 35%, transparent); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
svg.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
main { flex: 1; width: 100%; max-width: 1480px; margin: 0 auto; padding: 0 var(--gut) 88px; outline: none; }
.muted { color: var(--ink-3); }

/* ——— top bar: one line, closed by the double book rule ——— */
.bar { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--paper) 96%, transparent); border-bottom: 1px solid var(--line); }
.bar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: color-mix(in srgb, var(--gold) 38%, transparent); pointer-events: none; }
.bar-in { max-width: 1480px; height: var(--bar-h); margin: 0 auto; padding: 0 var(--gut); display: flex; align-items: center; gap: 12px; }
.brand { flex: none; display: flex; align-items: center; gap: 11px; text-decoration: none; font: 700 20px var(--serif); letter-spacing: -.01em; margin-right: 10px; }
.mark { width: 26px; height: 34px; border-radius: 999px 999px 3px 3px; background: var(--accent); display: grid; place-items: center; padding-top: 3px; }
.mark svg { width: 12px; height: 17px; stroke: var(--cream-gold); stroke-width: 1.8; fill: none; stroke-linecap: round; }
.nav { display: flex; align-self: stretch; min-width: 0; }
.nav > a { display: flex; align-items: center; gap: 7px; text-decoration: none; color: var(--ink-2); padding: 0 11px; font-size: 14.5px; white-space: nowrap; position: relative; transition: color .15s ease-out; }
.nav > a svg.i { width: 17px; height: 17px; color: var(--ink-3); transition: color .15s ease-out; }
.nav > a:hover, .nav > a:hover svg.i { color: var(--ink); }
.nav > a[aria-current] { color: var(--ink); font-weight: 600; }
.nav > a[aria-current] svg.i { color: var(--red); }
.nav > a[aria-current]::after { content: ""; position: absolute; left: 11px; right: 11px; bottom: -1px; height: 2px; background: var(--red); }
.find { margin-left: auto; display: flex; align-items: center; gap: 10px; min-width: 200px; height: 38px; padding: 0 8px 0 12px; border: 1px solid var(--line); border-radius: var(--r);
  color: var(--ink-3); font: 14px var(--sans); cursor: pointer; text-decoration: none; transition: border-color .15s ease-out, color .15s ease-out; }
.find svg.i { width: 17px; height: 17px; }
.find:hover { border-color: var(--ink-3); color: var(--ink); }
.find kbd { margin-left: auto; font: 11px var(--sans); border: 1px solid var(--line); border-radius: 3px; padding: 1px 6px; color: var(--ink-3); }
.mode { width: 38px; height: 38px; flex: none; border-radius: var(--r); border: 1px solid var(--line); background: none; color: var(--ink-2); cursor: pointer; display: grid; place-items: center; transition: border-color .15s ease-out, color .15s ease-out; }
.mode:hover { border-color: var(--ink-3); color: var(--ink); }
.mode svg.i { width: 18px; height: 18px; }
/* eight nav items: labels only where there is room; the current one keeps its label */
@media (max-width: 1560px) and (min-width: 1161px) { .nav > a svg.i { display: none; } }
@media (max-width: 1340px) { .find { min-width: 0; width: 38px; padding: 0; justify-content: center; } .find span, .find kbd { display: none; } }
@media (max-width: 1160px) { .nav > a span { display: none; } .nav > a { padding: 0 10px; } .nav > a svg.i { width: 19px; height: 19px; } .nav > a[aria-current] span { display: inline; }
  .nav > a[aria-current]::after { left: 10px; right: 10px; } }
@media (max-width: 900px) { .nav > a[aria-current] span { display: none; } }
@media (max-width: 680px) { .nav { display: none; } .bar .tabbar, body > .tabbar { display: flex; } main { padding-bottom: 56px; } .foot { padding-bottom: 100px; } }

/* phone tab bar */
.tabbar { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--paper); border-top: 1px solid var(--line);
  padding: 0 4px env(safe-area-inset-bottom); justify-content: space-around; }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; text-decoration: none; color: var(--ink-3); font-size: 11px; padding: 9px 2px 8px; position: relative; min-height: 56px; }
.tabbar a svg.i { width: 21px; height: 21px; }
.tabbar a[aria-current] { color: var(--ink); font-weight: 600; }
.tabbar a[aria-current] svg.i { color: var(--red); }
.tabbar a[aria-current]::before { content: ""; position: absolute; top: -1px; left: 26%; right: 26%; height: 2px; background: var(--red); }

/* ——— shared page furniture ——— */
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; font-size: 13.5px; color: var(--ink-3); padding: 22px 0 0; }
.crumbs a { text-decoration: none; color: var(--ink-2); }
.crumbs a:hover { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }
.eyebrow { font: 600 12.5px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--gold-ink); margin: 0; }
.phead { padding: 28px 0 30px; max-width: 760px; }
.phead h1 { font: 700 clamp(31px, 4.6vw, 49px)/1.1 var(--serif); letter-spacing: -.02em; margin: 10px 0 12px; text-wrap: balance; }
.phead h1 .yr { color: var(--ink-3); font-weight: 400; }
.phead p.lede { margin: 0; color: var(--ink-2); font: 17px/1.65 var(--serif); max-width: 62ch; }
.phead.with-art { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; max-width: none; }
.phead.with-art > div { max-width: 760px; }
.h2 { display: flex; align-items: baseline; gap: 14px; margin: 56px 0 4px; padding-bottom: 10px; border-bottom: 1px solid var(--line); position: relative; }
.h2::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: color-mix(in srgb, var(--gold) 38%, transparent); }
.h2 h2 { font: 700 25px/1.2 var(--serif); letter-spacing: -.01em; margin: 0; }
.h2 span { color: var(--ink-3); font-size: 14px; }
.h2 a { margin-left: auto; font-size: 14px; color: var(--red); text-decoration: none; }
.srcnote { font-size: 13px; color: var(--ink-3); margin-top: 18px; }
.srcnote a:hover, .src a:hover, .foot a:hover { color: var(--red); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chips a, .chips button { min-height: 38px; display: inline-flex; align-items: center; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r); background: none; color: var(--ink); font: 14px var(--sans);
  text-decoration: none; cursor: pointer; transition: border-color .15s ease-out, color .15s ease-out, background .15s ease-out; }
.chips a:hover, .chips button:hover { border-color: var(--red); color: var(--red); }
.chips [aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chips [aria-pressed="true"]:hover { color: var(--paper); border-color: var(--ink); }
.chips .primary, .btn { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 600; }
.chips .primary:hover, .btn:hover { background: #631616; border-color: #631616; color: var(--on-accent); }
.btn { padding: 11px 18px; border-radius: var(--r); border: 1px solid var(--accent); font: 600 15px var(--sans); cursor: pointer; text-decoration: none; display: inline-block; }

.loading, .empty { text-align: center; padding: 96px 0; color: var(--ink-3); font: 16px var(--serif); }
.loading::before, .empty::before { content: ""; display: block; width: 14px; height: 22px; margin: 0 auto 18px;
  background: linear-gradient(var(--gold), var(--gold)) center / 1.5px 100% no-repeat, linear-gradient(var(--gold), var(--gold)) 50% 28% / 100% 1.5px no-repeat, linear-gradient(var(--gold), var(--gold)) 50% 66% / 64% 1.5px no-repeat; }
.loading::before { animation: breathe 1.6s ease-in-out infinite alternate; }
.loading a, .empty a { color: var(--red); }
@keyframes breathe { from { opacity: .35; } to { opacity: 1; } }

.foot { text-align: center; font-size: 12.5px; color: var(--ink-3); padding: 30px 16px 44px; border-top: 1px solid var(--line); position: relative; }
.foot::before { content: ""; position: absolute; left: 0; right: 0; top: 3px; height: 1px; background: color-mix(in srgb, var(--gold) 38%, transparent); }
.foot a { color: var(--ink-2); text-underline-offset: 3px; }

/* ——— icon pictures: arched frames (church-window shape) with a thin gold rule ——— */
.arch { margin: 0; position: relative; border-radius: 999px 999px 4px 4px; overflow: hidden; background: var(--paper-2);
  outline: 1px solid color-mix(in srgb, var(--gold) 55%, transparent); outline-offset: 4px; }
.arch img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.arch.mini { width: 42px; height: 56px; flex: none; outline-offset: 2px; }
.arch.head { width: 150px; height: 200px; flex: none; margin: 0 6px 6px 0; }
.arch.read { width: 150px; height: 196px; margin: 40px auto 0; }
.arch.read + h1.t { margin-top: 26px; }
@media (max-width: 640px) { .arch.head { width: 96px; height: 128px; } .phead.with-art { align-items: flex-start; } }
.strip { display: flex; gap: 16px; overflow-x: auto; padding: 6px 6px 14px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.sfig { flex: none; width: 150px; text-decoration: none; scroll-snap-align: start; }
.sfig .arch { height: 196px; }
.sfig span { display: block; margin-top: 10px; font: 600 13.5px/1.35 var(--serif); }

/* ——— home: title, the day, the sections. Nothing else. ——— */
.mhome { max-width: 700px; margin: 0 auto; padding: clamp(36px, 8vh, 92px) 0 24px; display: flex; flex-direction: column; gap: 38px; position: relative; }
/* candlelight: one soft warm glow behind the title */
.mhome::before { content: ""; position: absolute; z-index: -1; left: 50%; top: -40px; width: min(900px, 120vw); height: 520px; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(214, 168, 84, .16), rgba(214, 168, 84, .05) 55%, transparent); pointer-events: none; }
.mhead { text-align: center; }
.mtitle { font: 700 clamp(56px, 8vw, 96px)/1 var(--serif); letter-spacing: -.025em; margin: 0; }
.morn { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 20px auto 0; color: var(--gold); }
.morn i { height: 1px; width: 96px; background: linear-gradient(90deg, transparent, currentColor); }
.morn i:last-child { transform: scaleX(-1); }
.morn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.mpray { margin: 16px auto 0; max-width: 34ch; font: italic 400 17px/1.6 var(--serif); color: var(--ink-2); text-wrap: balance; }

/* the day panel: deep oxblood with a thin gold inner frame, like a book cover. One colour in both themes. */
.today { --tc: #fbefe0; background: #6b1a1a; color: var(--tc); border-radius: 10px; display: flex; flex-direction: column; position: relative; }
:root[data-theme="dark"] .today { background: #581515; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .today { background: #581515; } }
.mbox { padding: 30px; gap: 18px; }
.mbox::after { content: ""; position: absolute; inset: 8px; border: 1px solid rgba(232, 196, 120, .36); border-radius: 5px; pointer-events: none; }
.mbox > * { position: relative; z-index: 1; }
.mday { display: flex; gap: 28px; align-items: center; text-decoration: none; padding: 4px 4px 2px; }
.ticon { margin: 0; width: 104px; flex: none; aspect-ratio: 3 / 4; border-radius: 999px 999px 4px 4px; overflow: hidden; outline: 1px solid rgba(232, 196, 120, .75); outline-offset: 4px; background: #2a0d0d; }
.ticon img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.mday .ticon { width: 156px; }
.mday > div { min-width: 0; flex: 1; }
.today .d { display: flex; align-items: flex-end; gap: 14px; }
.today .d b { font: 700 68px/.82 var(--serif); color: var(--cream-gold); letter-spacing: -.02em; }
.today .d span { font-size: 14.5px; line-height: 1.35; opacity: .86; }
.today .d span strong { display: block; font: 600 20px/1.2 var(--serif); opacity: 1; margin-bottom: 2px; }
.mfl { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid rgba(251, 239, 224, .2); font: 600 11.5px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--cream-gold); }
.mfeast { margin: 5px 0 0; font: 700 clamp(25px, 3.2vw, 31px)/1.15 var(--serif); letter-spacing: -.01em; text-wrap: balance; }
.mfeast.quiet { font-size: 20px; font-weight: 600; letter-spacing: 0; }
.mcomm { margin: 10px 0 0; font: 14.5px/1.55 var(--serif); opacity: .84; }
.mmeta { margin: 8px 0 0; font-size: 12.5px; opacity: .74; } .mmeta:empty { display: none; }
.mday:hover .mfeast { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; text-decoration-color: rgba(232, 196, 120, .7); }
.today .now { display: flex; align-items: center; gap: 14px; padding: 13px 16px; border-radius: var(--r); border: 1px solid rgba(232, 196, 120, .42); text-decoration: none; transition: background .15s ease-out, border-color .15s ease-out; }
.today .now:hover { background: rgba(0, 0, 0, .2); border-color: rgba(232, 196, 120, .8); }
.today .now svg.i { color: var(--cream-gold); width: 22px; height: 22px; }
.today .now small { display: block; font-size: 11.5px; opacity: .76; letter-spacing: .1em; text-transform: uppercase; }
.today .now b { font: 600 18px/1.3 var(--serif); }
.today .now .arr { margin-left: auto; font-size: 22px; line-height: 1; color: var(--cream-gold); transition: transform .15s ease-out; }
.today .now:hover .arr { transform: translateX(3px); }
.today :focus-visible { outline-color: var(--cream-gold); }

/* fasting line: in the red panel (cream on dark) and on the calendar card (light variant) */
.fastbox { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: var(--r); background: rgba(0, 0, 0, .2); }
.fastbox svg.i { width: 22px; height: 22px; margin-top: 2px; color: var(--cream-gold); }
.fastbox .ft { margin: 0; display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; }
.fastbox .ft b { font: 700 16.5px/1.35 var(--serif); } .fastbox .ft span { font-size: 12.5px; opacity: .76; }
.fastbox .fw { margin: 3px 0 0; font-size: 13.5px; line-height: 1.5; opacity: .88; }
.fastbox.is-free svg.i { color: #d9d4a8; }
.fastbox.light { background: none; border: 0; border-left: 2px solid var(--gold); border-radius: 0; padding: 4px 0 4px 14px; margin-top: 18px; }
.fastbox.light svg.i { color: var(--gold-ink); } .fastbox.light.is-fast .ft b { color: var(--red); }
.fastbox.light .ft span, .fastbox.light .fw { opacity: 1; color: var(--ink-2); }
.fnote { margin: 16px 0 0; font-size: 12px; color: var(--ink-3); }

/* the sections: a ruled 3 × 2 index, not six cards */
.msect { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.msect a { text-decoration: none; color: var(--ink-2); font: 500 15px/1.3 var(--serif); padding: 20px 4px 18px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
  border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); transition: background .15s ease-out, color .15s ease-out; min-width: 0; }
.msect a:nth-child(3n) { border-right: 0; }
.msect a svg.i { width: 26px; height: 26px; stroke-width: 1.2; color: var(--gold); transition: transform .2s ease-out; }
.msect a:hover { color: var(--ink); background: var(--gold-soft); }
.msect a:hover svg.i { transform: translateY(-2px); }
@media (max-width: 560px) {
  .mhome { gap: 30px; }
  .mbox { padding: 24px 22px; } .mday { flex-direction: column; text-align: center; gap: 20px; } .mday .ticon { width: 150px; } .mday .d { justify-content: center; text-align: left; }
  .msect a { font: 500 11.5px/1.3 var(--sans); padding: 16px 1px 14px; }
}

/* ——— group pages: a table of contents in columns ——— */

/* ——— category page: numbered rows + a quiet side index ——— */
.cat-layout { display: grid; grid-template-columns: minmax(0, 880px) 270px; justify-content: space-between; gap: 48px; align-items: start; }
.cat-layout > :only-child { grid-column: 1 / -1; max-width: 880px; }
@media (max-width: 980px) { .cat-layout { grid-template-columns: minmax(0, 1fr); } .side { display: none; } }
.side { position: sticky; top: calc(var(--bar-h) + 24px); border-left: 1px solid var(--line); padding: 2px 0 2px 24px; }
.side b { display: block; font: 600 12px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--gold-ink); margin-bottom: 10px; }
.side a { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; text-decoration: none; font-size: 14.5px; color: var(--ink-2); transition: color .15s ease-out; }
.side a:hover { color: var(--red); }
.side a i { font-style: normal; color: var(--ink-3); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.side a[aria-current] { color: var(--ink); font-weight: 600; position: relative; }
.side a[aria-current]::before { content: ""; position: absolute; left: -25px; top: 6px; bottom: 6px; width: 2px; background: var(--red); }

/* ——— reader ——— */
.reader { max-width: 720px; margin: 0 auto; }
.rtools { position: sticky; top: var(--bar-h); z-index: 5; display: flex; align-items: center; gap: 8px; padding: 12px 0 10px; background: var(--paper); border-bottom: 1px solid var(--line); }
.rtools .rub { margin-right: auto; font: 600 13px var(--sans); color: var(--ink-2); text-decoration: none; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rtools .rub:hover { color: var(--red); }
.rtools button, .rtools a.tb { min-width: 38px; height: 36px; padding: 0 10px; border-radius: var(--r); border: 1px solid var(--line); background: none; color: var(--ink); cursor: pointer;
  font: 600 14px var(--serif); display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; flex: none; transition: border-color .15s ease-out, color .15s ease-out; }
.rtools a.tb { font: 500 13.5px var(--sans); }
.rtools a.tb svg.i { width: 17px; height: 17px; }
.rtools button:hover, .rtools a.tb:hover { border-color: var(--red); color: var(--red); }
@media (max-width: 520px) { .rtools a.tb { font-size: 0; gap: 0; padding: 0; width: 38px; } }
.reader h1.t { font: 700 clamp(28px, 4.4vw, 39px)/1.2 var(--serif); letter-spacing: -.015em; text-align: center; margin: 48px 0 0; text-wrap: balance; }
.reader .orn { display: flex; justify-content: center; align-items: center; gap: 12px; color: var(--gold); margin: 20px 0 34px; }
.reader .orn::before, .reader .orn::after { content: ""; width: 72px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.reader .orn::after { transform: scaleX(-1); }
.reader .orn i { width: 7px; height: 7px; border: 1px solid var(--gold); transform: rotate(45deg); }
.note { font: 13.5px/1.6 var(--sans); color: var(--ink-2); border-left: 2px solid var(--line); padding: 2px 0 2px 14px; margin: 0 0 30px; }
.text { font: var(--read)/1.85 var(--serif); overflow-wrap: break-word; hanging-punctuation: first; }
.text p { margin: 0 0 1em; }
.text p.intro { font: italic calc(var(--read) * .84)/1.7 var(--serif); color: var(--ink-2); border-left: 2px solid var(--gold); padding-left: 16px; margin-bottom: 1.5em; }
.text p.rb, .text .r { color: var(--red); }
.text p.rb { font-size: .86em; line-height: 1.6; margin: 1.5em 0 .7em; }
.text .amen { color: var(--red); font-weight: 600; }
.text h2, .text h3, .text h4 { font-family: var(--serif); color: var(--red); text-align: center; line-height: 1.35; margin: 2em 0 .9em; font-size: 1.08em; font-weight: 700; text-wrap: balance; }
.text h2:first-child { display: none; }
.text i { color: var(--ink-2); }
.text .c { text-align: center; }
.text a { color: var(--red); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.text img { display: block; max-width: min(100%, 340px); height: auto; margin: 1.3em auto; border-radius: 2px; }
.text p.v { margin: 0 0 .6em; }
.text p.v sup { font: 600 .58em var(--sans); color: var(--red); margin-right: .5em; vertical-align: .6em; font-variant-numeric: tabular-nums; }
.text p.v:target { background: var(--gold-soft); box-shadow: -8px 0 0 var(--gold-soft), 8px 0 0 var(--gold-soft); }
.text .first::first-letter { float: left; font: 700 3.3em/.84 var(--serif); color: var(--red); padding: .06em .12em 0 0; }
.pager { display: grid; grid-template-columns: 1fr 1fr; margin-top: 56px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pager a { padding: 16px 20px 18px 0; text-decoration: none; font: 600 16px/1.4 var(--serif); transition: color .15s ease-out; min-width: 0; }
.pager a:hover { color: var(--red); }
.pager a small { display: block; font: 600 12px var(--sans); letter-spacing: .06em; color: var(--ink-3); margin-bottom: 4px; }
.pager a.nx { text-align: right; grid-column: 2; padding: 16px 0 18px 20px; border-left: 1px solid var(--line); }
.pager:empty { display: none; }
.src { text-align: center; font-size: 12.5px; color: var(--ink-3); margin: 28px 0 0; }
.src a { color: inherit; }

/* ——— search ——— */
.sbox { position: relative; margin: 6px 0 10px; max-width: 880px; }
.sbox input { width: 100%; padding: 14px 8px 14px 40px; border: 0; border-bottom: 2px solid var(--ink); border-radius: 0; background: none; color: var(--ink); font: 20px var(--serif); }
.sbox input::placeholder { color: var(--ink-3); opacity: 1; }
.sbox input:focus { outline: none; border-bottom-color: var(--red); }
.sbox input:focus-visible { outline: none; }
.sbox svg.i { position: absolute; left: 4px; top: 50%; transform: translateY(-50%); color: var(--ink-3); width: 22px; height: 22px; }
.sbox:focus-within svg.i { color: var(--red); }
#sinfo { font-size: 13.5px; margin: 14px 0 0; min-height: 1.6em; }

/* ——— icon gallery + lightbox ——— */
.gallery { columns: 5 220px; column-gap: 28px; }
.gfig { display: block; width: 100%; margin: 0 0 26px; padding: 0; border: 0; background: none; cursor: zoom-in; break-inside: avoid; text-align: center; color: var(--ink); font: inherit; }
.gfig img { display: block; width: 100%; height: auto; border-radius: 2px; outline: 1px solid color-mix(in srgb, var(--gold) 55%, transparent); outline-offset: 4px; }
.gfig span { display: block; padding: 14px 4px 0; font: 600 14px/1.35 var(--serif); transition: color .15s ease-out; }
.gfig:hover span { color: var(--red); }
.lb { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh; }
.lb::backdrop { background: rgba(10, 8, 6, .9); }
.lb img { display: block; max-width: 94vw; max-height: 84vh; margin: 0 auto; border-radius: 2px; }
.lb p { color: #eadfcb; text-align: center; font: 14px var(--serif); margin: 14px 0 0; }
.lb p a { color: var(--cream-gold); }
.lbx { position: fixed; top: 14px; right: 18px; width: 44px; height: 44px; border-radius: var(--r); border: 1px solid rgba(232, 196, 120, .5); background: rgba(0, 0, 0, .4); color: #fbefe0; font-size: 26px; line-height: 1; cursor: pointer; }
.lbx:hover { border-color: var(--cream-gold); }

/* ——— Bible ——— */
.chgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 6px; max-width: 980px; }
.chgrid a { text-align: center; padding: 11px 0; border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; font: 600 16px var(--serif); color: var(--ink-2); font-variant-numeric: tabular-nums;
  transition: border-color .15s ease-out, color .15s ease-out; }
.chgrid a:hover { border-color: var(--red); color: var(--red); }
.chgrid a[aria-current] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chgrid.small { grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); margin-top: 28px; }
.chgrid.small a { padding: 7px 0; font-size: 13.5px; }
.chgrid + .pager { max-width: 980px; }
.tabs { display: flex; justify-content: center; gap: 4px; margin: -8px 0 34px; border-bottom: 1px solid var(--line); }
.tabs button { border: 0; background: none; padding: 10px 16px 11px; font: 14.5px var(--sans); color: var(--ink-2); cursor: pointer; position: relative; transition: color .15s ease-out; }
.tabs button:hover:not(:disabled) { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); font-weight: 600; }
.tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: -1px; height: 2px; background: var(--red); }
.tabs button:disabled { opacity: .45; cursor: default; }

/* ——— calendar ——— */
.st-easterFeast { --st: var(--st-easter); } .st-feast { --st: var(--st-feast); } .st-fasting { --st: var(--st-fast); }
.st-fastFree { --st: var(--st-free); } .st-cheesefare { --st: var(--st-cheese); } .st-memorial { --st: var(--st-mem); } .st-none { --st: transparent; }
.calm { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
@media (max-width: 900px) { .calm { grid-template-columns: minmax(0, 1fr); gap: 28px; } }
.cal { border-top: 1px solid var(--line); padding-top: 14px; }
.calnav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.calnav b { font: 600 20px var(--serif); }
.calnav a, .calnav > span { width: 38px; height: 38px; }
.calnav a { display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; font: 22px/1 var(--serif); padding-bottom: 3px; transition: border-color .15s ease-out, color .15s ease-out; }
.calnav a:hover { border-color: var(--red); color: var(--red); }
.wd, .days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.wd span { text-align: center; font: 600 11.5px var(--sans); color: var(--ink-3); letter-spacing: .06em; padding-bottom: 6px; }
.wd span:nth-child(n+6) { color: var(--red); }
.cd { position: relative; aspect-ratio: 1; display: grid; place-items: center; border-radius: var(--r); text-decoration: none; font: 600 17px var(--serif); color: var(--ink); font-variant-numeric: tabular-nums; }
.days { max-height: none; }
.days .cd { aspect-ratio: 1.18; }
.days .cd:not(.out) { background: color-mix(in srgb, var(--st) 30%, var(--card)); border: 1px solid color-mix(in srgb, var(--st) 60%, var(--line)); transition: border-color .15s ease-out; }
.days .cd:not(.out)::after { content: ""; position: absolute; left: 18%; right: 18%; bottom: 6px; height: 3px; border-radius: 2px; background: var(--st); }
.days .cd.st-feast, .days .cd.st-easterFeast { background: var(--st); border-color: var(--st); color: #fbefe0; }
.days .cd.st-feast::after, .days .cd.st-easterFeast::after { background: var(--cream-gold); }
.days .cd.st-none, .gdays .cd.st-none { background: var(--card); border-color: var(--line); } .days .cd.st-none::after { display: none; }
.days a.cd:hover { border-color: var(--ink-2); }
.cd.sel { outline: 2px solid var(--ink); outline-offset: 2px; }
.cd.now span { box-shadow: 0 2px 0 currentColor; padding: 0 2px; }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 0; margin: 18px 0 0; font-size: 12.5px; color: var(--ink-2); }
.legend li { display: flex; align-items: center; gap: 7px; }
.dot { width: 10px; height: 10px; border-radius: 2px; background: var(--st); display: inline-block; }
.calcard { border-top: 3px solid var(--accent); padding: 22px 0 0; position: sticky; top: calc(var(--bar-h) + 24px); }
.calcard.has-icon { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 30px; align-items: start; }
.calcard .ticon { width: 150px; outline-color: var(--gold); background: var(--paper-2); margin: 5px 0 0 5px; }
.calcard .ticon figcaption { display: none; }
.calcard .fl { margin: 14px 0 0; font: 600 11.5px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--red); }
.calcard h3 { font: 700 clamp(25px, 2.6vw, 31px)/1.18 var(--serif); letter-spacing: -.01em; margin: 4px 0 0; text-wrap: balance; }
.calcard h3 a { text-decoration: none; color: var(--red); }
.calcard h3 a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.calcard .comm { font: 17px/1.7 var(--serif); margin: 18px 0 0; }
.calcard p.muted { margin: 18px 0 0; }
@media (max-width: 900px) { .calcard { position: static; } }
@media (max-width: 520px) { .calcard.has-icon { grid-template-columns: 96px minmax(0, 1fr); gap: 20px; } .calcard .ticon { width: 96px; } .cd { font-size: 15px; } .days, .wd { gap: 3px; } }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; } .tags:empty { display: none; }
.tag { display: inline-block; padding: 3px 9px; border-radius: 3px; font: 600 12px/1.5 var(--sans); border: 1px solid var(--line); color: var(--ink-2); }
.tag[class*="st-"] { border-color: color-mix(in srgb, var(--st) 60%, var(--line)); color: var(--ink); background: color-mix(in srgb, var(--st) 14%, transparent); }
.tag.st-none, .tag.st-undefined { background: none; border-color: var(--line); }
.gicon { width: 34px; height: 44px; object-fit: cover; object-position: top; border-radius: 99px 99px 2px 2px; flex: none; outline: 1px solid var(--gold); outline-offset: 2px; margin: 2px 3px 0; }

/* ——— churches ——— */
.chtools { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 28px; }
.chtools .sbox { flex: 1 1 320px; margin: 0; max-width: 560px; } .chtools .sbox input { font-size: 18px; padding-block: 10px; }
.chtools .chips { margin-top: 0; }
.chmap { height: clamp(320px, 52vh, 520px); margin: 24px 0 14px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--paper-2); display: grid; place-items: center; z-index: 0; position: relative; }
.chmap.small { height: 320px; margin: 26px 0 14px; }
.chmap .leaflet-tile-pane { filter: sepia(.28) saturate(.85); }
:root[data-theme="dark"] .chmap .leaflet-tile-pane { filter: sepia(.4) saturate(.7) brightness(.72) contrast(1.08); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chmap .leaflet-tile-pane { filter: sepia(.4) saturate(.7) brightness(.72) contrast(1.08); } }
.chmap .leaflet-container { font-family: var(--sans); background: var(--paper-2); }
.chmap .leaflet-popup-content-wrapper { border-radius: var(--r); font: 13.5px/1.5 var(--sans); color: #271f17; background: #fbf8f1; }
.chmap .leaflet-popup-content b { font: 600 15px var(--serif); }
.leaflet-popup-content a { color: #8b2222; }
#chn { font-size: 13.5px; margin: 0 0 10px; }
.prose { font: 18px/1.75 var(--serif); max-width: 68ch; margin: 0 0 1em; }

/* ═══ second pass: index pages as crafted plates (parchment panels, icons in arched frames, rubrics, red numerals) ═══ */
/* the header plate: a parchment panel with a thin gold inner frame (the light sibling of the oxblood day panel), title left, icon right */
.phead.band { max-width: none; margin: 16px 0 34px; padding: clamp(26px, 3.4vw, 46px) clamp(22px, 4vw, 60px); background: var(--paper-2); border-radius: 10px; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: clamp(20px, 4vw, 64px); }
.phead.band::before { content: ""; position: absolute; inset: 8px; border: 1px solid color-mix(in srgb, var(--gold) 42%, transparent); border-radius: 5px; pointer-events: none; }
.phead.band.has-art::after { content: ""; position: absolute; right: -80px; top: 50%; width: 560px; height: 560px; transform: translateY(-50%); pointer-events: none;
  background: radial-gradient(closest-side, rgba(214, 168, 84, .2), rgba(214, 168, 84, .06) 55%, transparent); }
.phead.band > * { position: relative; z-index: 1; }
.band-t { min-width: 0; max-width: 820px; flex: 1; }
.phead.band h1 { margin-top: 12px; }
.phead.band .eyebrow { display: flex; align-items: center; gap: 12px; }
.phead.band .eyebrow::before, .rubric::before { content: ""; width: 9px; height: 14px; flex: none;
  background: linear-gradient(var(--gold), var(--gold)) center / 1.5px 100% no-repeat, linear-gradient(var(--gold), var(--gold)) 50% 28% / 100% 1.5px no-repeat, linear-gradient(var(--gold), var(--gold)) 50% 66% / 60% 1.5px no-repeat; }
.phead.band .chips a:not(.primary), .phead.band .chips button { background: var(--paper); }
.phead.band .arch.head { width: clamp(132px, 13vw, 176px); height: auto; aspect-ratio: 3 / 4; margin: 6px clamp(6px, 2vw, 30px) 6px 0; outline-color: var(--gold); outline-offset: 5px; background: #2a0d0d; }
.phead.band .arch.head img { object-position: center top; }
@media (max-width: 640px) { .phead.band { flex-direction: column-reverse; align-items: flex-start; gap: 20px; margin: 14px 0 26px; padding: 26px 24px 24px; }
  .phead.band .arch.head { width: 92px; margin: 4px 0 0 4px; } .phead.band.has-art::after { right: auto; left: -200px; top: -180px; transform: none; width: 480px; height: 480px; } }
/* a rubric line: red serif heading with a small gold cross and a larger initial; the rule runs out to the margin */
.rubric { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; font: 700 15.5px/1.3 var(--serif); color: var(--red); }
.rubric::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); order: 2; }
.rubric span::first-letter { font-size: 1.5em; line-height: 1; }
.rubric i { order: 3; font: 600 13px var(--serif); color: var(--gold-ink); font-style: normal; font-variant-numeric: tabular-nums; }
.mstats { display: flex; flex-wrap: wrap; gap: 10px 34px; margin: 20px 0 0; }
.mstats span { display: flex; align-items: baseline; gap: 9px; font-size: 14px; color: var(--ink-2); }
.mstats b { font: 700 31px/1 var(--serif); color: var(--red); font-variant-numeric: tabular-nums; }

/* group pages: one plate per theme — icon, title, what it is, how many */
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 390px), 1fr)); gap: 14px; }
.cat { display: flex; gap: 20px; align-items: center; padding: 18px 22px 18px 24px; background: var(--card); border: 1px solid var(--line); border-radius: 6px; text-decoration: none; min-width: 0;
  transition: border-color .18s ease-out, background .18s ease-out; }
.cat .arch.mini { width: 60px; height: 80px; outline-offset: 3px; background: #2a0d0d; transition: transform .2s ease-out; }
.cat .arch.mini img, .results .arch.mini img, .thead .arch.mini img { object-position: center top; }
.cat .ic, .results .ic { color: var(--gold); display: grid; place-items: center; flex: none; border: 1px solid color-mix(in srgb, var(--gold) 55%, transparent); border-radius: 999px 999px 4px 4px; }
.cat .ic { width: 60px; height: 80px; }
.cat .ic svg.i { width: 26px; height: 26px; stroke-width: 1.2; }
.cat .ct { min-width: 0; flex: 1; }
.cat .ct b { display: block; font: 700 19px/1.3 var(--serif); letter-spacing: -.005em; transition: color .15s ease-out; }
.cat .ct small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--ink-2); font: 14px/1.5 var(--serif); margin-top: 4px; }
.cat .cn { flex: none; display: flex; flex-direction: column; align-items: center; min-width: 54px; padding-left: 18px; border-left: 1px solid var(--line); font-size: 11.5px; color: var(--ink-3); }
.cat .cn b { font: 700 25px/1.1 var(--serif); color: var(--red); font-variant-numeric: tabular-nums; }
.cat:hover, .results a:hover, .chrow:hover { border-color: color-mix(in srgb, var(--gold) 70%, var(--line)); background: color-mix(in srgb, var(--gold) 7%, var(--card)); }
.cat:hover .ct b { color: var(--red); }
.cat:hover .arch.mini { transform: translateY(-3px); }
.cat:active, .results a:active, .chrow:active { background: color-mix(in srgb, var(--gold) 13%, var(--card)); }
@media (max-width: 520px) { .cat { padding: 14px 14px 14px 18px; gap: 16px; } .cat .arch.mini, .cat .ic { width: 48px; height: 64px; } .cat .ct b { font-size: 17px; } .cat .cn { min-width: 44px; padding-left: 12px; } .cat .cn b { font-size: 20px; } }

/* category page: a contents plate with red numerals */
.rows { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 4px 0; }
.rowi { display: flex; align-items: center; gap: 20px; padding: 15px 22px 15px 16px; text-decoration: none; position: relative; transition: background .15s ease-out; }
.rowi + .rowi::before { content: ""; position: absolute; left: 76px; right: 22px; top: 0; height: 1px; background: var(--line); }
.rowi .num { width: 40px; text-align: center; font: 700 22px/1 var(--serif); color: var(--red); flex: none; font-variant-numeric: tabular-nums; }
.rowi > span:nth-child(2) { min-width: 0; flex: 1; }
.rowi .rt { display: block; font: 600 18px/1.35 var(--serif); transition: color .15s ease-out; }
.rowi .rd { display: block; color: var(--ink-2); font: italic 14.5px/1.5 var(--serif); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rowi .min { color: var(--ink-3); font-size: 12.5px; flex: none; display: flex; align-items: center; gap: 12px; }
.rowi .min::after { content: "›"; font: 20px/1 var(--serif); color: var(--gold); transition: transform .15s ease-out; }
.rowi:hover { background: color-mix(in srgb, var(--gold) 9%, transparent); }
.rowi:hover .rt { color: var(--red); }
.rowi:hover .min::after { transform: translateX(4px); }
@media (max-width: 520px) { .rowi { gap: 12px; padding: 14px 14px 14px 8px; } .rowi .num { width: 34px; font-size: 19px; } .rowi + .rowi::before { left: 54px; right: 14px; } .rowi .rt { font-size: 17px; } }

/* search */
.sband .band-t { max-width: 900px; } .sband .sbox { max-width: none; margin-top: 8px; } .sband .chips { margin-top: 14px; }
.sband:has(#sinfo:not(:empty)) #stry { display: none; }
.results { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); gap: 12px; }
.results li.empty { grid-column: 1 / -1; }
.results a { display: flex; gap: 20px; align-items: flex-start; height: 100%; padding: 18px 22px; background: var(--card); border: 1px solid var(--line); border-radius: 6px; text-decoration: none; transition: border-color .18s ease-out, background .18s ease-out; }
.results .arch.mini, .results .ic { width: 46px; height: 62px; margin: 4px 0 0 3px; }
.results .arch.mini { outline-offset: 3px; background: #2a0d0d; }
.results .rs { min-width: 0; flex: 1; }
.results small { display: block; color: var(--gold-ink); font: 600 11.5px var(--sans); letter-spacing: .1em; text-transform: uppercase; }
.results b { font: 700 18.5px/1.35 var(--serif); display: block; margin-top: 3px; transition: color .15s ease-out; }
.results a:hover b { color: var(--red); }
.results .rs span { display: block; font: 15px/1.6 var(--serif); color: var(--ink-2); margin-top: 5px; }
.results mark { background: color-mix(in srgb, var(--gold) 30%, transparent); color: inherit; border-radius: 2px; padding: 0 2px; }
@media (max-width: 520px) { .results a { padding: 14px 16px; gap: 14px; } }

/* the contents page of a printed Bible: each Testament a plate, groups as rubrics, book … chapters with dotted leaders */
.testament { margin: 0 0 22px; background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: clamp(20px, 2.6vw, 36px) clamp(18px, 3.2vw, 48px) clamp(14px, 2vw, 26px); }
.thead { display: flex; align-items: center; gap: 22px; padding-bottom: 20px; margin-bottom: 4px; border-bottom: 1px solid var(--line); position: relative; }
.thead::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: color-mix(in srgb, var(--gold) 45%, transparent); }
.thead .arch.mini { width: 54px; height: 72px; margin: 3px 0 3px 3px; outline-offset: 3px; background: #2a0d0d; }
.thead h2 { font: 700 clamp(25px, 3vw, 34px)/1.15 var(--serif); letter-spacing: -.015em; margin: 0; }
.thead p { margin: 5px 0 0; font-size: 13.5px; color: var(--ink-3); }
.bgroup { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 4px 40px; padding: 22px 0 16px; border-bottom: 1px solid var(--line); align-items: start; }
.bgroup:last-child { border-bottom: 0; }
.bgroup .rubric { margin: 9px 0 0; font-size: 16.5px; }
.bgroup .rubric::after { display: none; } .bgroup .rubric i { order: 0; margin-left: auto; }
.books { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 0 36px; }
.book { display: flex; align-items: baseline; gap: 8px; padding: 9px 10px; margin: 0 -10px; border-radius: var(--r); text-decoration: none; transition: background .15s ease-out; min-width: 0; }
.book b { font: 600 17px/1.35 var(--serif); transition: color .15s ease-out; }
.book i { flex: 1; min-width: 16px; border-bottom: 1px dotted color-mix(in srgb, var(--ink-3) 70%, transparent); transform: translateY(-4px); }
.book span { font: 700 16px/1 var(--serif); color: var(--red); white-space: nowrap; font-variant-numeric: tabular-nums; }
.book span.soon { font: 12px var(--sans); color: var(--ink-3); }
.book:hover { background: color-mix(in srgb, var(--gold) 12%, transparent); } .book:hover b { color: var(--red); } .book:hover i { border-bottom-color: var(--gold); }
@media (max-width: 860px) { .bgroup { grid-template-columns: minmax(0, 1fr); padding: 18px 0 12px; } .bgroup .rubric { margin: 0 0 4px; } .bgroup .rubric i { margin-left: 0; } }

/* calendar day list: one plate per day, status colour on the edge */
/* one column, in date order — two flowing columns made 1–18 and 19–31 read side by side */
.gdays { list-style: none; padding: 0; margin: 22px 0 0; max-width: 1000px; }
.gdays li { display: flex; gap: 18px; padding: 16px 20px 16px 0; margin: 0 0 10px; background: var(--card); border: 1px solid var(--line); border-radius: 6px; scroll-margin-top: 90px; break-inside: avoid; position: relative; overflow: hidden; }
.gdays li::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--st); }
.gdays li.st-none::before { background: var(--line); }
.gdays li.is-feast { background: color-mix(in srgb, var(--st-feast) 9%, var(--card)); border-color: color-mix(in srgb, var(--st-feast) 40%, var(--line)); }
.gdays li.now { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.gdays li > div { min-width: 0; flex: 1; }
.gd { flex: none; width: 66px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; padding: 2px 0 0 8px; }
.gd b { font: 700 31px/1 var(--serif); letter-spacing: -.02em; font-variant-numeric: tabular-nums; transition: color .15s ease-out; }
.gd small { font: 600 11px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.gdays li.sun .gd b, .gdays li.is-feast .gd b, .gdays li.sun .gd small { color: var(--red); }
.gd:hover b { color: var(--red); }
.gf { margin: 0 0 6px; } .gf a { color: var(--red); font: 700 20px/1.25 var(--serif); letter-spacing: -.005em; text-decoration: none; }
.gf a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.gc { margin: 0; color: var(--ink); font: 15px/1.6 var(--serif); }
.gm { margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 4px 0; font-size: 12.5px; color: var(--ink-3); }
.gm:first-child { margin-top: 10px; }
.gm span + span::before { content: "·"; margin: 0 9px; color: var(--gold); }
.gm .fast { color: var(--ink-2); font-weight: 600; } .gm .free { color: var(--gold-ink); font-weight: 600; }
@media (max-width: 520px) { .gdays li { gap: 10px; padding: 14px 14px 14px 0; } .gd { width: 54px; } .gd b { font-size: 25px; } .gdays .gicon { display: none; } }

/* churches */
.chlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 10px; }
.chlist > p { grid-column: 1 / -1; }
.chrow { display: flex; align-items: center; gap: 16px; padding: 13px 18px 13px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 6px; text-decoration: none; min-width: 0; transition: border-color .18s ease-out, background .18s ease-out; }
.chrow svg.i { width: 26px; height: 26px; stroke-width: 1.2; color: var(--gold); transition: transform .2s ease-out; }
.chrow > span { min-width: 0; flex: 1; }
.chrow b { display: block; font: 600 17px/1.35 var(--serif); transition: color .15s ease-out; overflow-wrap: anywhere; } .chrow small { display: block; color: var(--ink-3); font-size: 13px; margin-top: 1px; }
.chrow > i { flex: none; font: 700 15px var(--serif); font-style: normal; color: var(--red); white-space: nowrap; padding-left: 14px; border-left: 1px solid var(--line); }
.chrow:hover b { color: var(--red); } .chrow:hover svg.i { transform: translateY(-2px); }
/* church photo thumbnails in the list */
.chrow.has-img { padding: 10px 18px 10px 10px; }
.chthumb { width: 76px; height: 76px; flex: none; object-fit: cover; border-radius: 4px; background: var(--paper-2); outline: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); outline-offset: 2px; transition: transform .25s ease-out; }
.chrow:hover .chthumb { transform: scale(1.04); }
/* church detail: the photo as a wide banner with the title on it */
.chhero { position: relative; margin: 18px 0 30px; border-radius: 10px; overflow: hidden; min-height: clamp(260px, 38vw, 460px); display: flex; align-items: flex-end; background: #1a1410; }
.chhero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.chhero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15, 10, 6, 0) 35%, rgba(15, 10, 6, .82)); }
.chhero-t { position: relative; z-index: 1; padding: clamp(20px, 3vw, 40px); max-width: 820px; color: #fbefe0; }
.chhero-t .eyebrow { color: #e8c478; }
.chhero-t h1 { font: 700 clamp(32px, 4.6vw, 56px)/1.08 var(--serif); margin: 8px 0 0; letter-spacing: -.015em; color: #fbefe0; }
.chhero-t .lede { color: rgba(251, 239, 224, .86); margin: 10px 0 0; max-width: 60ch; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 0 0 30px; }
.prose + .facts { margin-top: 26px; }
.facts div { padding: 16px 20px 18px; background: var(--card); border: 1px solid var(--line); border-top: 2px solid var(--gold); border-radius: 0 0 6px 6px; }
.facts dt { font: 600 11.5px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--gold-ink); } .facts dd { margin: 6px 0 0; font: 700 20px/1.3 var(--serif); }
.rubric + .chmap.small { margin-top: 14px; }
.chgrid { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 18px; max-width: none; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 8px; }
.chgrid + .pager { max-width: none; } .chgrid:empty { display: none; }
.reader .chgrid { background: none; border: 0; padding: 0; gap: 6px; }

/* churches: the whole page is the map, with floating search, filter chips, buttons and a strip of famous churches */
body.mapmode main { max-width: none; padding: 0; }
body.mapmode .foot { display: none; }
.chx { position: relative; height: calc(100dvh - var(--bar-h) - 1px); min-height: 480px; overflow: hidden; background: #ece7dc; }
.chx-map { position: absolute; inset: 0; z-index: 0; display: grid; place-items: center; }
.chx-map .leaflet-container, .chx-map.leaflet-container { font-family: var(--sans); background: #ece7dc; }
.chx-map .leaflet-tile-pane { filter: saturate(.42) sepia(.18) brightness(1.05) contrast(.9); }
:root[data-theme="dark"] .chx-map .leaflet-tile-pane { filter: invert(.92) hue-rotate(180deg) saturate(.35) brightness(.9) contrast(.9); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chx-map .leaflet-tile-pane { filter: invert(.92) hue-rotate(180deg) saturate(.35) brightness(.9) contrast(.9); } }
.chx-top { position: absolute; z-index: 3; top: 14px; left: 16px; right: 70px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; pointer-events: none; }
.chx-top > * { pointer-events: auto; }
.chx-search { display: flex; align-items: center; gap: 10px; width: min(250px, 100%); height: 40px; padding: 0 16px; background: #fff; border-radius: 99px; box-shadow: 0 2px 10px rgba(40, 30, 15, .14); color: #6b6150; }
.chx-search svg.i { width: 16px; height: 16px; flex: none; }
.chx-search input { border: 0; outline: 0; background: none; font: 14px var(--sans); color: #271f17; width: 100%; min-width: 0; }
.chx-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chx-chips button { height: 32px; padding: 0 12px; border: 0; border-radius: 99px; background: #fff; color: #271f17; font: 500 13px var(--sans); cursor: pointer; box-shadow: 0 2px 8px rgba(40, 30, 15, .12); white-space: nowrap; }
.chx-chips button b { color: #b07a16; font-weight: 700; margin-left: 3px; }
.chx-chips button[aria-pressed="true"] { background: #e0a93b; color: #2a1d08; font-weight: 700; }
.chx-chips button[aria-pressed="true"] b { color: #2a1d08; }
.chx .leaflet-top.leaflet-right { top: 6px; right: 6px; }
.chx .leaflet-control-zoom { border: 0 !important; box-shadow: 0 2px 10px rgba(40, 30, 15, .16); border-radius: 10px; overflow: hidden; }
.chx .leaflet-control-zoom a { width: 30px; height: 30px; line-height: 30px; color: #271f17; border-color: #eee !important; }
.chx-actions { position: absolute; z-index: 3; left: 16px; bottom: 100px; display: flex; gap: 8px; }
.chx-actions button { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 16px; border: 0; border-radius: 99px; font: 700 13.5px var(--sans); cursor: pointer; box-shadow: 0 3px 12px rgba(40, 30, 15, .2); }
.chx-actions svg.i { width: 15px; height: 15px; }
.chx-near { background: #e0a93b; color: #2a1d08; }
.chx-all { background: #1f1d1b; color: #fff; }
.chx-panel { position: absolute; z-index: 4; left: 16px; top: 64px; bottom: 160px; width: min(380px, calc(100% - 32px)); display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 12px 36px rgba(30, 20, 10, .22); overflow: hidden; }
.chx-panel[hidden] { display: none; }
.chx-ph { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px 12px 18px; border-bottom: 1px solid var(--line); }
.chx-ph b { font: 600 15px var(--sans); }
.chx-ph button { width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--paper-2); color: var(--ink); font: 22px/1 var(--sans); cursor: pointer; }
.chx-list { overflow-y: auto; padding: 10px; display: grid; gap: 8px; align-content: start; }
.chx-list .chrow { padding: 8px 12px 8px 8px; } .chx-list .chthumb { width: 56px; height: 56px; } .chx-list .chrow b { font-size: 15.5px; }
.chx-strip { position: absolute; z-index: 3; left: 16px; right: 16px; bottom: 14px; }
.chx-cards { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 2px 52px 4px 0; }
.chx-cards::-webkit-scrollbar { display: none; }
.chx-card { flex: 0 0 206px; height: 62px; box-sizing: border-box; scroll-snap-align: start; display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; background: #fff; border-radius: 10px; text-decoration: none; color: #271f17; box-shadow: 0 2px 10px rgba(40, 30, 15, .14); transition: transform .15s ease-out; }
.chx-card:hover { transform: translateY(-2px); }
.chx-card img { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; flex: none; }
.chx-card span { min-width: 0; flex: 1; } .chx-card b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font: 700 13px/1.3 var(--sans); }
.chx-card small { display: block; font-size: 12px; color: #7a6f5e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chx-card i { font-style: normal; color: #b07a16; }
.chx-next { position: absolute; right: 4px; top: 50%; translate: 0 -50%; width: 38px; height: 38px; border-radius: 50%; border: 0; background: #fff; font: 22px/1 var(--sans); cursor: pointer; box-shadow: 0 2px 10px rgba(40, 30, 15, .22); padding-bottom: 3px; }
/* map markers */
.chcl { display: grid; place-items: center; border-radius: 50%; background: #fbf1d6; border: 1.5px solid #d7a443; color: #5a3d0c; font: 700 11.5px/1 var(--sans); box-shadow: 0 1px 3px rgba(60, 40, 10, .25); cursor: pointer; transition: transform .12s ease-out; }
.chcl:hover { transform: scale(1.12); background: #f6e2a8; }
.chcl span { transform: translateY(.5px); }
.chpin { border-radius: 50%; background: #d7a443; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(60, 40, 10, .35); }
.chpin.has-img { background: #8b2222; }
.chx .leaflet-popup-content-wrapper { border-radius: 12px; padding: 0; overflow: hidden; }
.chx .leaflet-popup-content { margin: 0; width: auto !important; }
.chx .leaflet-container a.chpop { display: block; width: 230px; text-decoration: none; color: #271f17; padding-bottom: 12px; }
.chx .leaflet-container a.leaflet-popup-close-button { color: #fff; text-shadow: 0 0 4px rgba(0, 0, 0, .6); width: 26px; height: 26px; font-size: 20px; }
.chpop img { display: block; width: 100%; height: 120px; object-fit: cover; }
.chpop b { display: block; font: 700 15px/1.3 var(--serif); padding: 10px 14px 0; }
.chpop small { display: block; color: #7a6f5e; font-size: 12.5px; padding: 3px 14px 0; }
.chpop span { display: block; color: #8b2222; font: 600 13px var(--sans); padding: 8px 14px 0; }
:root[data-theme="dark"] .chx, :root[data-theme="dark"] .chx-map .leaflet-container { background: #1b1a18; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chx, :root:not([data-theme="light"]) .chx-map .leaflet-container { background: #1b1a18; } }
@media (max-width: 680px) {
  .chx { height: calc(100dvh - var(--bar-h) - 58px); }
  .chx-top { right: 56px; left: 10px; top: 10px; } .chx-search { width: 100%; }
  .chx-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; } .chx-chips::-webkit-scrollbar { display: none; }
  .chx-actions { left: 10px; bottom: 88px; } .chx-strip { left: 10px; right: 10px; bottom: 10px; }
  .chx-card { flex-basis: 190px; } .chx-next { display: none; } .chx-cards { padding-right: 0; }
  .chx-panel { left: 10px; right: 10px; width: auto; top: 104px; bottom: 140px; }
}

/* calendar: round day dots, a day card beside the month, a day list with a month sidebar */
.kal, .klist { --k-fast-bg: rgba(124, 92, 214, .2); --k-fast: #5b3fb0; --k-free-bg: rgba(62, 160, 96, .2); --k-free: #2b7a45;
  --k-feast-bg: rgba(214, 170, 72, .28); --k-feast: #8a6416; --k-easter-bg: rgba(190, 30, 36, .16); --k-easter: #b0161b;
  --k-cheese-bg: rgba(226, 146, 50, .22); --k-cheese: #a8621a; --k-mem-bg: rgba(110, 104, 122, .2); --k-mem: #5a5466; --k-sel: #4a1d12; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .kal, :root:not([data-theme="light"]) .klist { --k-fast: #b9a5f2; --k-free: #84d39c; --k-feast: #e5c278; --k-easter: #ff8a80; --k-cheese: #f0b468; --k-mem: #bdb5ca; --k-sel: #8a2a22; } }
:root[data-theme="dark"] .kal, :root[data-theme="dark"] .klist { --k-fast: #b9a5f2; --k-free: #84d39c; --k-feast: #e5c278; --k-easter: #ff8a80; --k-cheese: #f0b468; --k-mem: #bdb5ca; --k-sel: #8a2a22; }
.s-fasting { --kb: var(--k-fast-bg); --kc: var(--k-fast); } .s-fastFree { --kb: var(--k-free-bg); --kc: var(--k-free); }
.s-feast { --kb: var(--k-feast-bg); --kc: var(--k-feast); } .s-easterFeast { --kb: var(--k-easter-bg); --kc: var(--k-easter); }
.s-cheesefare { --kb: var(--k-cheese-bg); --kc: var(--k-cheese); } .s-memorial { --kb: var(--k-mem-bg); --kc: var(--k-mem); }
.s-ordinary { --kb: transparent; --kc: var(--ink); }
.crumbs .cur { color: var(--gold-ink); font-weight: 600; }
.kal { display: grid; grid-template-columns: minmax(0, 640px) minmax(0, 550px); gap: clamp(28px, 4vw, 52px); align-items: start; margin-top: 6px; }
.khead { display: flex; justify-content: space-between; align-items: flex-start; }
.khead h1 { font: 700 clamp(34px, 3.4vw, 44px)/1.1 var(--serif); margin: 0; letter-spacing: -.01em; }
.kyr { margin: 2px 0 0; font: 600 14px var(--sans); color: var(--ink-3); }
.knav { display: flex; gap: 8px; margin-top: 6px; } .knav > * { width: 46px; height: 46px; }
.knav a { display: grid; place-items: center; border-radius: 50%; background: var(--card); border: 1px solid var(--line); text-decoration: none; font: 24px/1 var(--sans); padding-bottom: 3px; transition: border-color .15s ease-out, color .15s ease-out; }
.knav a:hover { border-color: var(--red); color: var(--red); }
.klegend { margin: 14px 0 22px; position: relative; width: max-content; max-width: 100%; }
.klegend summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; border: 1px solid var(--line); border-radius: 99px; background: var(--card); font: 600 14px var(--sans); }
.klegend summary::-webkit-details-marker { display: none; }
.klegend summary::after { content: ""; width: 7px; height: 7px; border: solid currentColor; border-width: 0 1.6px 1.6px 0; transform: rotate(45deg) translateY(-3px); transition: transform .15s ease-out; }
.klegend[open] summary::after { transform: rotate(-135deg) translateY(-1px); }
.klegend ul { list-style: none; margin: 8px 0 0; padding: 12px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 8px; font-size: 13.5px; position: absolute; z-index: 5; min-width: 260px; box-shadow: 0 10px 30px rgba(0, 0, 0, .12); }
.klegend li { display: flex; align-items: center; gap: 10px; }
.klegend i { width: 16px; height: 16px; border-radius: 50%; background: var(--kb); border: 1px solid color-mix(in srgb, var(--kc) 35%, transparent); }
.kwd, .kdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); justify-items: center; }
.kwd span { font: 500 13px var(--sans); color: var(--ink-3); padding-bottom: 14px; }
.kdays { row-gap: 14px; }
.kd { width: min(48px, 100%); aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; text-decoration: none; font: 600 17px var(--sans); font-variant-numeric: tabular-nums; background: var(--kb, transparent); color: var(--kc, var(--ink)); transition: transform .12s ease-out, box-shadow .12s ease-out; }
.kd.s-ordinary { font-weight: 400; }
.kd.out { color: var(--ink-3); font-weight: 400; opacity: .7; }
a.kd:hover { box-shadow: 0 0 0 2px color-mix(in srgb, var(--kc, var(--ink)) 40%, transparent); }
.kd.now { box-shadow: 0 0 0 2px var(--gold); }
.kd.sel, .kd.sel:hover { background: var(--k-sel); color: #fff; box-shadow: none; }
.kcard { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 34px 28px 30px; box-shadow: 0 8px 28px rgba(60, 40, 20, .06); }
.kcard p { margin: 0; }
.kc-date { font: 500 13.5px var(--sans); color: var(--ink-3); margin-bottom: 18px !important; }
.kpill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 99px; font: 600 13px var(--sans); margin-bottom: 14px; }
.kpill.tone { background: var(--paper-2); color: var(--ink-2); } .kpill.tone svg.i { width: 15px; height: 15px; }
.kpill.st { background: var(--kb); color: var(--kc); border: 1px solid color-mix(in srgb, var(--kc) 25%, transparent); font-size: 12.5px; padding: 3px 10px; }
.kc-t { font: 700 clamp(24px, 2.2vw, 28px)/1.25 var(--serif); margin: 0; }
.kc-t a { text-decoration: none; } .kc-t a:hover { color: var(--red); }
.kcard hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0 20px; }
.kc-l { font: 600 13px var(--sans); color: var(--ink-2); margin-bottom: 12px !important; }
.kc-c { display: flex; gap: 12px; font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.kc-c > span { color: var(--gold); flex: none; }
.kfast { display: inline-flex; align-items: center; gap: 7px; margin-top: 18px !important; padding: 6px 14px; border-radius: 99px; font: 600 13px var(--sans); }
.kfast i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.kfast.is-free { background: var(--k-free-bg); color: var(--k-free); } .kfast.is-fast { background: var(--k-fast-bg); color: var(--k-fast); }
.kc-what { font-size: 13.5px; color: var(--ink-3); margin-top: 8px !important; }
.klist { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; margin-top: clamp(40px, 5vw, 64px); }
.klist h2 { font: 700 clamp(26px, 2.4vw, 32px)/1.2 var(--serif); margin: 0; }
.klede { color: var(--ink-2); max-width: 66ch; margin: 8px 0 22px; line-height: 1.6; }
.krows { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.krows li { display: flex; gap: 18px; padding: 20px 22px; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.krows li:first-child { border-top: 0; }
.krows li.sel { background: color-mix(in srgb, var(--gold) 7%, var(--card)); }
.krows li > div { min-width: 0; flex: 1; }
.kn { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; text-decoration: none; font: 600 15px var(--sans); background: var(--kb); color: var(--kc); }
.kn.s-ordinary { background: var(--paper-2); }
.krows li.now .kn { box-shadow: 0 0 0 2px var(--gold); }
.krows p { margin: 0; }
.kr-d { font-size: 13px; color: var(--ink-3); }
.kr-f a, .kr-s { font: 700 15.5px/1.4 var(--sans); }
.kr-f { margin-top: 2px !important; } .kr-f a { color: var(--k-feast); text-decoration: none; } .kr-f a:hover { text-decoration: underline; }
.kr-s { color: var(--kc); margin-top: 2px !important; }
.kr-c { margin-top: 6px !important; font-size: 14.5px; line-height: 1.65; color: var(--ink-2); }
.kr-c b { color: var(--gold-ink); font-weight: 700; }
.kside { position: sticky; top: calc(var(--bar-h) + 20px); }
.ks-l { font: 600 13px var(--sans); color: var(--ink-2); margin: 0 0 10px; }
.ks-l:not(:first-child) { margin-top: 26px; }
.kmonths { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.kmonths > * { display: block; text-align: center; padding: 10px 4px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); font-size: 14px; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kmonths span { color: var(--ink-3); opacity: .55; }
.kmonths a:hover { border-color: var(--ink-3); }
.kmonths a.on { background: var(--k-sel); border-color: var(--k-sel); color: #fff; font-weight: 700; }
.kbox { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.kbox li + li { border-top: 1px solid var(--line); }
.kbox a { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 14px 16px; text-decoration: none; font-size: 15px; }
.kbox a:hover { background: var(--paper-2); }
.kbox small { color: var(--ink-3); font-size: 12.5px; white-space: nowrap; }
@media (max-width: 1100px) { .kal { grid-template-columns: minmax(0, 1fr); } .kal .kmain { max-width: 640px; } .klist { grid-template-columns: minmax(0, 1fr); } .kside { position: static; } }
@media (max-width: 520px) { .knav > * { width: 40px; height: 40px; } .kd { font-size: 15px; } .kdays { row-gap: 8px; } .kcard { padding: 24px 18px; border-radius: 14px; } .krows li { gap: 12px; padding: 16px 14px; } .kn { width: 34px; height: 34px; font-size: 14px; } }

/* ═══ v4 presets: light grey page, white rounded cards, pill buttons, charcoal + amber ═══ */
.bar { background: color-mix(in srgb, var(--card) 94%, transparent); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.bar::after, .h2::after, .foot::before, .thead::after { display: none; }
.brand { font: 700 19px var(--serif); }
.mark { width: 32px; height: 32px; border-radius: 9px; background: #1f1a12; padding: 0; }
.mark svg { stroke: var(--amber); }
.nav { align-self: center; background: var(--paper-2); border-radius: 99px; padding: 4px; gap: 2px; }
.nav > a, .more summary { height: 38px; padding: 0 16px; border-radius: 99px; font: 600 14px var(--sans); color: var(--ink-2); display: flex; align-items: center; gap: 8px; cursor: pointer; transition: background .15s ease-out, color .15s ease-out; }
.nav > a::after { display: none; }
.nav > a:hover, .more summary:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); }
.nav > a[aria-current], .more summary[data-on] { background: var(--btn); color: var(--paper); }
.nav > a[aria-current] svg.i, .more summary[data-on] svg.i { color: var(--amber); }
.more { position: relative; }
.more summary { list-style: none; } .more summary::-webkit-details-marker { display: none; }
.more summary::after { content: ""; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg) translateY(-2px); opacity: .6; margin-left: 2px; }
.more-menu { position: absolute; top: calc(100% + 12px); left: 50%; translate: -50% 0; width: min(620px, 92vw); background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 18px 14px 14px; box-shadow: 0 18px 50px rgba(20, 24, 32, .16); z-index: 30; }
.more-l { margin: 0 12px 8px; font: 700 12.5px var(--sans); color: var(--gold-ink); }
.more-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; }
.more-grid a { display: flex; gap: 14px; align-items: center; padding: 11px 12px; border-radius: 12px; text-decoration: none; color: var(--ink); transition: background .15s ease-out; }
.more-grid a svg.i { width: 22px; height: 22px; color: var(--gold-ink); stroke-width: 1.4; }
.more-grid b { display: block; font: 700 14.5px/1.3 var(--sans); } .more-grid small { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 1px; }
.more-grid a:hover { background: var(--paper-2); } .more-grid a[aria-current] { background: var(--amber-soft); }
.find { border-radius: 12px; background: var(--card); }
@media (min-width: 1341px) { .find { min-width: 190px; } }
.mode { border-radius: 12px; background: var(--card); }
@media (max-width: 1160px) { .nav > a span, .more summary span { display: none; } .nav > a, .more summary { padding: 0 12px; } .nav > a[aria-current] span { display: inline; } }
@media (max-width: 900px) { .nav > a[aria-current] span { display: none; } }
.tabbar { background: var(--card); }
.tabbar a[aria-current] svg.i { color: var(--gold-ink); } .tabbar a[aria-current]::before { background: var(--amber); height: 3px; border-radius: 0 0 3px 3px; }

.crumbs { font-size: 13px; padding-top: 20px; }
.crumbs > span:last-child { color: var(--gold-ink); font-weight: 600; }
.crumbs a:hover { color: var(--gold-ink); }
.eyebrow { letter-spacing: .02em; text-transform: none; font-weight: 700; font-size: 13px; }
.chips a, .chips button { border-radius: 99px; background: var(--card); border-color: var(--line); font-weight: 500; }
.chips a:hover, .chips button:hover { border-color: var(--ink-3); color: var(--ink); }
.chips [aria-pressed="true"], .chips [aria-pressed="true"]:hover { background: var(--btn); color: var(--paper); border-color: var(--btn); }
.chips .primary, .btn { background: var(--btn); border-color: var(--btn); color: var(--paper); border-radius: 99px; }
.chips .primary:hover, .btn:hover { background: color-mix(in srgb, var(--btn) 86%, var(--paper)); border-color: transparent; color: var(--paper); }
.btn { padding: 12px 24px; font-weight: 700; }
.btn.amber { background: var(--amber); border-color: var(--amber); color: #2a1d08; }

/* page header: a white rounded card, the icon in a gold-edged arch on the right */
.phead.band { background: var(--card); border: 1px solid var(--line); border-radius: 26px; box-shadow: var(--shadow); padding: clamp(28px, 4vw, 60px) clamp(22px, 4.4vw, 64px); }
.phead.band::before, .phead.band.has-art::after { display: none; }
.phead.band .eyebrow::before, .rubric::before { display: none; }
.phead h1 { font-weight: 700; letter-spacing: -.01em; }
.phead.band .lede, .phead p.lede { font: 17px/1.7 var(--sans); color: var(--ink-2); }
.phead.band .arch.head { outline: 0; border: 1.5px solid color-mix(in srgb, var(--gold) 60%, transparent); padding: 4px; background: var(--card); border-radius: 999px 999px 12px 12px; box-shadow: 0 10px 30px rgba(60, 40, 10, .12); }
.phead.band .arch.head img { border-radius: 999px 999px 9px 9px; }
.phead.band .chips a:not(.primary), .phead.band .chips button { background: var(--paper-2); border-color: transparent; }
.rubric { color: var(--gold-ink); font: 700 13.5px var(--sans); }
.rubric span::first-letter { font-size: 1em; }
.h2 { border-bottom: 0; margin-top: 52px; } .h2 h2 { font-size: 28px; } .h2 a { color: var(--gold-ink); font-weight: 700; }
.mstats b { color: var(--gold-ink); }
.side { border-left-color: var(--line); } .side a:hover { color: var(--gold-ink); } .side a[aria-current]::before { background: var(--amber); }
.side b { text-transform: none; letter-spacing: .02em; }
.rtools .rub:hover, .loading a, .empty a, .kc-t a:hover, .gfig:hover span, .srcnote a:hover, .foot a:hover { color: var(--gold-ink); }
.knav a:hover { border-color: var(--gold); color: var(--gold-ink); }
.sbox:focus-within svg.i { color: var(--gold-ink); }
.empty a, .loading a { font-weight: 600; }
.more-page { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 10px; }
.more-page a { display: flex; align-items: center; gap: 16px; padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; text-decoration: none; box-shadow: var(--shadow); }
.more-page svg.i { width: 24px; height: 24px; color: var(--gold-ink); stroke-width: 1.4; }
.more-page span { flex: 1; min-width: 0; } .more-page b { display: block; font: 700 16px/1.3 var(--sans); } .more-page small { display: block; color: var(--ink-3); font-size: 13px; margin-top: 2px; }
.more-page em { font: 20px/1 var(--sans); font-style: normal; color: var(--ink-3); }
.more-page a:hover { border-color: var(--gold); }

/* cards and lists */
.cat, .results a, .chrow, .testament, .facts div { background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.cat:hover, .results a:hover, .chrow:hover { border-color: color-mix(in srgb, var(--gold) 55%, var(--line)); background: var(--card); }
.cat:hover .ct b, .results a:hover b, .chrow:hover b { color: var(--gold-ink); }
.cat .ct b, .results b, .chrow b { font-family: var(--sans); font-weight: 700; }
.cat .ct small, .results .rs span { font-family: var(--sans); }
.cat .cn { border-left: 0; } .cat .cn b { color: var(--gold-ink); font-family: var(--sans); }
.cat .ic { border-radius: 14px; border-color: var(--line); background: var(--paper-2); color: var(--gold-ink); }
.rows { border-radius: 20px; padding: 0; overflow: hidden; box-shadow: var(--shadow); }
.rowi { padding: 18px 24px 18px 18px; }
.rowi + .rowi::before { left: 0; right: 0; }
.rowi .num { font: 700 16px var(--sans); color: var(--gold-ink); }
.rowi .rt { font: 700 16.5px/1.4 var(--sans); }
.rowi .rd { font: 14px/1.5 var(--sans); font-style: normal; color: var(--ink-3); }
.rowi .min { color: var(--gold-ink); }
.rowi .min > *:first-child, .rowi .min:not(:empty) { font-weight: 600; }
.rowi:hover { background: var(--paper-2); } .rowi:hover .rt { color: var(--gold-ink); }
.rowi .min::after { color: var(--ink-3); }
.facts div { border-top: 1px solid var(--line); }
.facts dt { text-transform: none; letter-spacing: .02em; font-weight: 700; } .facts dd { font-family: var(--sans); }
.thead h2 { font-family: var(--serif); }
.book span { color: var(--gold-ink); font-family: var(--sans); } .book b { font-family: var(--sans); font-weight: 600; } .book:hover b { color: var(--gold-ink); }
.chgrid a { border-radius: 12px; background: var(--card); font-family: var(--sans); color: var(--ink); box-shadow: var(--shadow); }
.chgrid a:hover { border-color: var(--gold); color: var(--gold-ink); }
.chgrid a[aria-current] { background: var(--accent); border-color: var(--accent); color: #fff; }
.chgrid { background: none; border: 0; padding: 0; }
.chrow > i { border-left: 0; color: var(--gold-ink); }
.sbox input { border: 1px solid var(--line); border-radius: 14px; background: var(--card); padding-left: 48px; font: 18px var(--sans); box-shadow: var(--shadow); }
.sbox input:focus { border-color: var(--gold); outline: 3px solid var(--gold-soft); }
.sbox svg.i { left: 16px; }
.results small { text-transform: none; letter-spacing: .02em; }
.rtools { background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(6px); }
.rtools button, .rtools a.tb { border-radius: 99px; background: var(--card); }
.rtools button:hover, .rtools a.tb:hover { border-color: var(--gold); color: var(--gold-ink); }
.pager { border: 0; gap: 12px; }
.pager a, .pager a.nx { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 20px; box-shadow: var(--shadow); font-family: var(--sans); }
.pager a:hover { color: var(--gold-ink); border-color: var(--gold); }
.tabs { border-bottom: 0; background: var(--paper-2); border-radius: 99px; padding: 4px; width: max-content; max-width: 100%; margin-inline: auto; }
.tabs button { border-radius: 99px; padding: 8px 18px; } .tabs button[aria-selected="true"] { background: var(--card); box-shadow: var(--shadow); } .tabs button[aria-selected="true"]::after { display: none; }
.text p.rb, .text .r, .text .amen, .text h2, .text h3, .text h4, .text .first::first-letter, .text p.v sup { color: var(--red); }
.text a { color: var(--gold-ink); }
.foot { border-top: 1px solid var(--line); background: var(--card); }
.chhero { border-radius: 24px; }

/* ——— home (v4): today in church, upcoming feasts, the prayer book, all churches on the map, the Bible ——— */
.hm { padding-bottom: 20px; }
.hm-top { text-align: center; padding: clamp(34px, 6vw, 72px) 0 10px; }
.hm-top h1 { font: 700 clamp(46px, 6.5vw, 76px)/1.05 var(--serif); margin: 0; letter-spacing: -.02em; }
.hm-top p { margin: 14px auto 0; max-width: 38ch; color: var(--ink-2); font: 17px/1.6 var(--sans); }
.hm-sec { margin-top: clamp(48px, 7vw, 96px); }
.hm-today { display: grid; grid-template-columns: minmax(0, 620px) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.dcard { background: color-mix(in srgb, var(--amber) 4%, var(--card)); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 20px 50px rgba(40, 30, 10, .1); overflow: hidden; }
.dc-head { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid color-mix(in srgb, var(--gold) 22%, var(--line)); text-align: center; }
.dc-head small { display: block; font-size: 12.5px; color: var(--ink-3); }
.dc-head b { display: block; font: 700 18px/1.3 var(--sans); }
.dc-head button { width: 40px; height: 40px; border-radius: 50%; border: 0; background: color-mix(in srgb, var(--gold) 16%, var(--card)); color: var(--ink); font: 20px/1 var(--sans); cursor: pointer; padding-bottom: 2px; }
.dc-head button:hover { background: color-mix(in srgb, var(--gold) 28%, var(--card)); }
.dc-head button:disabled { opacity: .35; cursor: default; }
.dc-body { display: grid; grid-template-columns: minmax(0, 1fr) 112px; gap: 22px; padding: 22px 24px 8px; min-height: 196px; }
.dc-body h3 { font: 700 clamp(24px, 2.4vw, 30px)/1.2 var(--serif); color: var(--red); margin: 0; }
.dc-body h3 a { text-decoration: none; } .dc-body h3 a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.dc-pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 99px; background: color-mix(in srgb, var(--gold) 15%, var(--card)); font: 600 12.5px var(--sans); color: var(--ink-2); }
.pill svg.i { width: 14px; height: 14px; }
.pill.fast { background: rgba(124, 92, 214, .16); color: #5b3fb0; } .pill.free { background: rgba(62, 160, 96, .16); color: #2b7a45; }
:root[data-theme="dark"] .pill.fast { color: #b9a5f2; } :root[data-theme="dark"] .pill.free { color: #84d39c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill.fast { color: #b9a5f2; } :root:not([data-theme="light"]) .pill.free { color: #84d39c; } }
.dc-comm { margin: 14px 0 0; font-size: 14px; line-height: 1.6; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.dc-what { margin: 10px 0 0; font-size: 13px; color: var(--ink-3); }
.dc-img { width: 112px; height: 144px; border-radius: 12px; object-fit: cover; object-position: top; background: var(--paper-2); }
.dc-foot { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 24px 22px; }
.dc-foot a { padding: 8px 16px; border-radius: 99px; background: color-mix(in srgb, var(--gold) 15%, var(--card)); text-decoration: none; font: 700 13.5px var(--sans); transition: background .15s ease-out; }
.dc-foot a:hover { background: color-mix(in srgb, var(--gold) 28%, var(--card)); }
.hm-copy h2 { font: 700 clamp(32px, 3.6vw, 46px)/1.15 var(--serif); margin: 0; letter-spacing: -.01em; }
.hm-copy p { margin: 14px 0 22px; color: var(--ink-2); font-size: 17px; line-height: 1.7; max-width: 42ch; }
.hm-links { display: grid; gap: 12px; justify-items: start; }
.hm-links a { font: 700 15px var(--sans); color: var(--gold-ink); text-decoration: none; display: inline-flex; gap: 10px; align-items: center; }
.hm-links a::after { content: "→"; transition: transform .15s ease-out; } .hm-links a:hover::after { transform: translateX(3px); }
.hm-feasts { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 1fr); gap: 14px; overflow-x: auto; scrollbar-width: thin; padding: 4px 2px 12px; }
.fcard { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; text-decoration: none; box-shadow: var(--shadow); transition: transform .15s ease-out, border-color .15s ease-out; }
.fcard:hover { transform: translateY(-3px); border-color: var(--gold); }
.fcard img { display: block; width: 100%; height: 120px; object-fit: cover; object-position: center 25%; background: var(--paper-2); }
.fcard b { display: block; padding: 12px 14px 0; font: 700 15px/1.35 var(--sans); }
.fcard small { display: block; padding: 3px 14px 14px; font: 600 13px var(--sans); color: var(--gold-ink); }
.hm-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; flex-wrap: wrap; }
.hm-head h2 { font: 700 clamp(30px, 3.4vw, 44px)/1.15 var(--serif); margin: 0; }
.hm-head p { margin: 0; color: var(--ink-2); font-size: 16px; max-width: 36ch; }
.hm-head a { color: var(--gold-ink); font-weight: 700; text-decoration: none; }
.pcats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.pcat { display: flex; flex-direction: column; justify-content: space-between; min-height: 186px; padding: 22px 22px 20px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; text-decoration: none; box-shadow: var(--shadow); transition: border-color .15s ease-out, transform .15s ease-out; }
.pcat:hover { border-color: var(--gold); transform: translateY(-2px); }
.pcat .pn { font: 700 40px/1 var(--serif); color: var(--gold-ink); } .pcat .pn small { font: 600 13px var(--sans); margin-left: 6px; }
.pcat b { display: block; font: 700 17px/1.3 var(--sans); margin-top: 28px; } .pcat span span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13.5px; line-height: 1.5; color: var(--ink-3); margin-top: 4px; }
.pcat.wide { grid-column: span 2; }
.hm-map { background: var(--paper-2); border-radius: 30px; padding: clamp(28px, 4vw, 56px); }
.hm-map-top { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 40px; align-items: center; }
.hm-map-top h2 { font: 700 clamp(32px, 3.6vw, 46px)/1.15 var(--serif); margin: 0; }
.hm-map-top p { color: var(--ink-2); font-size: 17px; line-height: 1.7; margin: 14px 0 24px; }
.dotmap { width: 100%; height: auto; display: block; }
.dotmap circle { fill: var(--amber); opacity: .85; } .dotmap circle.dim { fill: var(--ink-3); opacity: .35; }
.chphotos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 30px; }
.chphoto { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden; text-decoration: none; color: #fff; background: #222; }
.chphoto img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease-out; }
.chphoto:hover img { transform: scale(1.04); }
.chphoto::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, .72)); }
.chphoto span { position: absolute; z-index: 1; left: 16px; right: 16px; bottom: 14px; }
.chphoto b { display: block; font: 700 16px/1.3 var(--sans); } .chphoto small { display: block; font: 600 12.5px var(--sans); opacity: .85; margin-top: 2px; }
.hm-bible { text-align: center; padding: clamp(30px, 5vw, 60px) 0 10px; }
.hm-bible h2 { font: 700 clamp(32px, 3.6vw, 46px)/1.15 var(--serif); margin: 0; }
.hm-bible p { color: var(--ink-3); margin: 10px 0 22px; }
@media (max-width: 1000px) { .hm-today, .hm-map-top { grid-template-columns: minmax(0, 1fr); } .pcats, .chphotos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .dc-body { grid-template-columns: minmax(0, 1fr) 84px; padding: 18px 18px 6px; gap: 14px; } .dc-img { width: 84px; height: 110px; } .dc-foot { padding: 12px 18px 18px; }
  .pcat { min-height: 150px; padding: 18px; } .pcat .pn { font-size: 32px; } .pcat b { margin-top: 18px; font-size: 15.5px; } .chphotos { gap: 10px; } .chphoto b { font-size: 14px; } }

/* ——— critique pass (v41): fixes from CRITIQUE.md ——— */
/* focus ring follows the control's own shape (the base rule no longer forces a 2px radius) */

/* map markers: leaflet.css loads after this file and sets .leaflet-marker-icon{display:block}; win on specificity */
.leaflet-marker-icon.chcl { display: grid; place-items: center; text-align: center; line-height: 1; background: #fff7e0; border: 1.5px solid var(--amber); color: #4a3408; }
.leaflet-marker-icon.chcl span { display: block; transform: none; }
.leaflet-marker-icon.chcl:hover { background: var(--amber-soft); }
.leaflet-marker-icon.chpin { display: block; box-sizing: border-box; background: var(--amber); border: 2px solid #fff; }
.leaflet-marker-icon.chpin.has-img { background: #2b2f36; }
/* map chrome uses the theme's card and ink, so dark mode is dark */
.chx-search, .chx-chips button, .chx-card, .chx-next { background: var(--card); color: var(--ink); box-shadow: 0 2px 10px rgba(0, 0, 0, .16); }
.chx-search { color: var(--ink-3); } .chx-search input { color: var(--ink); }
.chx-search:focus-within { outline: 2px solid var(--amber); outline-offset: 1px; }
.chx-chips button b, .chx-card i { color: var(--gold-ink); }
.chx-chips button[aria-pressed="true"] { background: var(--amber); color: #2a1d08; } .chx-chips button[aria-pressed="true"] b { color: #2a1d08; }
.chx-card { border-radius: 14px; } .chx-card img { border-radius: 9px; } .chx-card small { color: var(--ink-3); }
.chx-all { background: var(--btn); color: var(--paper); }
.chx-near { background: var(--amber); color: #2a1d08; }
.chx .leaflet-control-zoom { border-radius: 14px; box-shadow: 0 2px 10px rgba(0, 0, 0, .16); }
.chx .leaflet-control-zoom a { background: var(--card); color: var(--ink); border-color: var(--line) !important; }
.chx .leaflet-control-zoom a:hover { background: var(--paper-2); }
.chx-panel { background: var(--paper); border-radius: 18px; }
.chx-list { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.chrow { border-radius: 14px; } .chrow b { font: 700 15.5px/1.35 var(--sans); } .chrow:hover b { color: var(--gold-ink); } .chrow:hover { border-color: var(--gold); }
.chrow svg.i { color: var(--gold-ink); } .chthumb { border-radius: 10px; }
.chx .leaflet-popup-content-wrapper { border-radius: 16px; }
.chx .leaflet-container a.chpop { color: #2b2f36; }
.chpop b { font: 700 15px/1.3 var(--sans); } .chpop small { color: #6b717c; } .chpop span { color: #8a6416; font-weight: 700; }
.leaflet-popup-content a { color: #8a6416; }
.chmap .leaflet-popup-content-wrapper { background: #fff; color: #2b2f36; border-radius: 14px; } .chmap .leaflet-popup-content b { font-family: var(--sans); }
.chmap.small { border-radius: var(--rl); overflow: hidden; }
.chmap .leaflet-control-zoom { border: 0 !important; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.leaflet-bar a { border-radius: 0; }
/* church facts: plain rounded tiles */
.facts { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.facts div { border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }

/* home */
.hm-feasts { grid-auto-flow: row; grid-template-columns: repeat(8, minmax(0, 1fr)); overflow: visible; padding: 0; }
.fcard { display: flex; flex-direction: column; } .fcard b { flex: 1; overflow-wrap: anywhere; }
@media (max-width: 1240px) { .hm-feasts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 680px) { .hm-feasts { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 46%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 calc(var(--gut) * -1); padding: 4px var(--gut) 8px; }
  .hm-feasts::-webkit-scrollbar { display: none; } .fcard { scroll-snap-align: start; } }
.pcat span span { -webkit-line-clamp: 3; color: var(--ink-2); }
@media (max-width: 520px) { .pcat span span { -webkit-line-clamp: 2; font-size: 12.5px; }
  .chphoto { aspect-ratio: 1 / 1; border-radius: 14px; } .chphoto span { left: 10px; right: 10px; bottom: 9px; } .chphoto b { font-size: 13px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .chphoto small { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .chphoto::after { background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, .8)); } }
.dotmap circle { opacity: 1; } .dotmap circle.dim { fill: var(--gold); opacity: .45; }

/* footer: name + the main sections */
.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 28px; text-align: left; padding: 26px var(--gut) 34px; font-size: 13.5px; }
.foot::before { display: none; }
.foot b { font: 700 17px var(--serif); color: var(--ink); }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 22px; } .foot a { text-decoration: none; color: var(--ink-2); font-weight: 500; }
@media (max-width: 680px) { .foot { padding-bottom: calc(86px + env(safe-area-inset-bottom)); justify-content: center; text-align: center; } .foot nav { justify-content: center; } }

/* index pages */
.rubric { font: 700 15px/1.3 var(--sans); color: var(--ink); margin-bottom: 14px; }
.rubric::after { background: var(--line); }
.rubric i { font: 600 12.5px var(--sans); color: var(--ink-2); background: var(--paper-2); border-radius: 99px; padding: 3px 10px; }
.results a { border-radius: 16px; box-shadow: var(--shadow); } .results a:hover { border-color: var(--gold); }
.results b { font: 700 17px/1.35 var(--sans); } .results a:hover b { color: var(--gold-ink); } .results .rs span { font: 14px/1.6 var(--sans); }
.results mark, mark { background: var(--amber-soft); color: #2b2f36; border-radius: 5px; padding: 0 3px; }
.results li.nores { grid-column: 1 / -1; display: grid; justify-items: center; gap: 8px; text-align: center; padding: 56px 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--rl); box-shadow: var(--shadow); }
.results li.nores b { font: 700 19px/1.35 var(--sans); margin: 0; overflow-wrap: anywhere; } .results li.nores > span { color: var(--ink-2); font-size: 14.5px; } .results li.nores .chips { justify-content: center; margin-top: 8px; }
.results li.nores a { display: inline-flex; height: auto; padding: 0 14px; border-radius: 99px; box-shadow: none; gap: 0; align-items: center; }
/* 404 */
.nf { max-width: 560px; margin: clamp(40px, 9vh, 110px) auto; padding: 48px 28px 44px; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--rl); box-shadow: var(--shadow); }
.nf-n { margin: 0; font: 700 64px/1 var(--serif); color: var(--amber); letter-spacing: .02em; }
.nf h1 { font: 700 26px/1.3 var(--serif); margin: 14px 0 8px; } .nf > p:not(.nf-n) { color: var(--ink-2); margin: 0 0 22px; } .nf .chips { justify-content: center; }

/* readers */
.rtools button { font: 700 14px var(--sans); }
.text.brief { min-height: 0; } .text p.daylink { color: var(--ink-2); font-size: calc(var(--read) * .86); }
.text p.daylink a { display: inline-block; margin-left: 8px; padding: 2px 12px; border-radius: 99px; border: 1px solid var(--gold); color: var(--gold-ink); font: 600 .82em var(--sans); text-decoration: none; }
.text p.daylink a:hover { background: var(--amber); border-color: var(--amber); color: #2a1d08; }
.reader h1.t { margin-bottom: .9em; }

/* bible */
.chgrid a[aria-current] { background: var(--btn); border-color: var(--btn); color: var(--paper); }
.book { align-items: flex-end; } .book b { min-width: 0; } .book i { transform: translateY(-7px); }
.chgrid + .pager { margin-top: 28px; }

/* calendar */
.khead { align-items: center; } .khead h1 .kyr { font: 500 .5em var(--sans); color: var(--ink-3); margin-left: 6px; letter-spacing: 0; }
.kcard hr:last-of-type + .kfast { margin-top: 0; }
@media (max-width: 680px) { .kr-c { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; } .krows li.sel .kr-c { display: block; } }

/* ═══ home top, after the user's phone mock-up: today card with the icon, share button, big tiles, photo banner ═══ */
.hx { --brown: #5a2414; --brown-2: #4a1d12; --cream: #f7efe4; max-width: 1180px; margin: 0 auto; padding-top: clamp(14px, 3vw, 34px); display: grid; gap: 14px; }
:root[data-theme="dark"] .hx { --brown: #8a3a22; --brown-2: #a5452a; --cream: #241b15; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hx { --brown: #8a3a22; --brown-2: #a5452a; --cream: #241b15; } }
.hx-today { position: relative; overflow: hidden; border-radius: 26px; background: var(--cream); border: 1px solid color-mix(in srgb, var(--gold) 25%, var(--line)); min-height: clamp(250px, 34vw, 400px); display: flex; align-items: center; box-shadow: var(--shadow); }
.hx-img { position: absolute; top: 0; right: 0; height: 100%; width: 58%; object-fit: cover; object-position: center 18%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 34%); mask-image: linear-gradient(90deg, transparent, #000 34%); }
.hx-t { position: relative; z-index: 1; padding: clamp(18px, 4vw, 52px); max-width: 60%; }
.hx-t p { margin: 0; }
.hx-y { font: 600 clamp(13px, 1.3vw, 16px) var(--sans); color: var(--ink-2); }
.hx-d { font: 700 clamp(22px, 3vw, 40px)/1.05 var(--serif); color: var(--ink); margin-top: 2px !important; }
.hx-d b { font-size: 2.1em; letter-spacing: -.03em; margin-right: 4px; vertical-align: -.08em; }
.hx-w { font: 600 clamp(14px, 1.5vw, 18px) var(--serif); color: var(--brown); margin-top: 8px !important; }
.hx-g { font: 700 clamp(14px, 1.6vw, 20px)/1.4 var(--serif); color: var(--brown); margin-top: 6px !important; max-width: 22ch; }
.hx-cal { display: inline-block; margin-top: clamp(14px, 2vw, 24px); padding: 9px 22px; border: 1.5px solid var(--brown); border-radius: 99px; color: var(--brown); text-decoration: none; font: 700 14px var(--serif); transition: background .15s ease-out, color .15s ease-out; }
.hx-cal:hover { background: var(--brown); color: #fff; }
.hx-share { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; border: 0; border-radius: 18px; background: var(--brown); color: #fff; font: 700 16px var(--serif); cursor: pointer; box-shadow: 0 6px 18px rgba(74, 29, 18, .25); transition: background .15s ease-out, transform .15s ease-out; }
.hx-share:hover { background: var(--brown-2); } .hx-share:active { transform: scale(.99); }
.hx-share svg.i { width: 20px; height: 20px; }
.hx-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.hx-tile { grid-column: span 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 16px 10px; min-height: 120px; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: 20px; text-decoration: none; box-shadow: var(--shadow); transition: border-color .15s ease-out, transform .15s ease-out; }
.hx-tile:hover { border-color: var(--gold); transform: translateY(-2px); }
.hx-tile svg.i { width: 30px; height: 30px; color: var(--brown); stroke-width: 1.4; }
.hx-tile small { font: 700 12.5px var(--serif); color: var(--ink); }
.hx-tile span { font-size: 11.5px; line-height: 1.35; color: var(--ink-3); }
.hx-tile.big { grid-column: span 3; min-height: 150px; gap: 12px; }
.hx-tile.big svg.i { width: 40px; height: 40px; }
.hx-tile.big b { font: 600 20px var(--serif); }
.hx-tile.wide-only { display: none; }
.hx-banner { grid-column: 1 / -1; position: relative; min-height: 130px; border-radius: 20px; overflow: hidden; background: #2a1a10; display: flex; align-items: flex-end; text-decoration: none; color: #fff; box-shadow: var(--shadow); }
.hx-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease-out; }
.hx-banner:hover img { transform: scale(1.04); }
.hx-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 10, 4, .05) 20%, rgba(20, 10, 4, .78)); }
.hx-banner span { position: relative; z-index: 1; padding: 16px 20px; }
.hx-banner b { display: block; font: 700 clamp(20px, 2.2vw, 28px)/1.2 var(--serif); }
.hx-banner small { display: block; font: 600 12.5px var(--sans); opacity: .88; margin-top: 3px; }
@media (min-width: 900px) {
  .hx-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 14px; }
  .hx-tile.big { grid-column: span 2; min-height: 190px; } .hx-banner { grid-column: span 4; min-height: 190px; }
  .hx-tile { grid-column: span 2; min-height: 140px; } .hx-tile.wide-only { display: flex; }
  .hx-tile small { font-size: 15px; } .hx-tile span { font-size: 13px; }
  .hx-share { max-width: 520px; width: 100%; justify-self: center; }
}
@media (max-width: 420px) { .hx-t { max-width: 64%; } .hx-img { width: 62%; } .hx-tile { min-height: 108px; padding: 12px 6px; } }

/* phone tab bar: a floating pill; the current section is a brown pill with its name, the rest are icons */
@media (max-width: 680px) {
  body > .tabbar { left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); padding: 6px; border: 1px solid var(--line); border-radius: 99px; box-shadow: 0 10px 30px rgba(20, 24, 32, .16); background: color-mix(in srgb, var(--card) 94%, transparent); backdrop-filter: blur(10px); align-items: center; gap: 2px; }
  .tabbar a { flex: 1 1 0; min-height: 48px; padding: 0; flex-direction: row; justify-content: center; gap: 8px; border-radius: 99px; color: var(--ink-2); transition: flex-grow .2s ease-out, background .2s ease-out; }
  .tabbar a span { display: none; font: 700 13px var(--serif); white-space: nowrap; }
  .tabbar a[aria-current] { flex-grow: 2.4; background: #5a2414; color: #fff; }
  .tabbar a[aria-current] span { display: inline; }
  .tabbar a[aria-current] svg.i { color: #fff; }
  .tabbar a[aria-current]::before { display: none; }
  main { padding-bottom: 96px; } .foot { padding-bottom: 110px; }
  .chx { height: calc(100dvh - var(--bar-h) - 1px); } .chx-strip { bottom: 84px; } .chx-actions { bottom: 160px; } .chx-panel { bottom: 214px; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
