/* Inter and Source Serif 4, served from this site (SIL Open Font License: fonts/OFL-*.txt) */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(../fonts/inter-latin-wght-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Source Serif 4'; font-style: normal; font-weight: 200 900; font-display: swap; src: url(../fonts/source-serif-4-latin-opsz-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Source Serif 4'; font-style: italic; font-weight: 200 900; font-display: swap; src: url(../fonts/source-serif-4-latin-opsz-italic.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(../fonts/inter-latin-ext-wght-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Source Serif 4'; font-style: normal; font-weight: 200 900; font-display: swap; src: url(../fonts/source-serif-4-latin-ext-opsz-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Source Serif 4'; font-style: italic; font-weight: 200 900; font-display: swap; src: url(../fonts/source-serif-4-latin-ext-opsz-italic.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF; }

/* =====================================================================
   Glossa – design tokens
   Themes: light (default), sepia, Dominican (black, white and gold), dark; "auto" follows the system.
   Text size: --scale set from reader settings.
   ===================================================================== */
:root {
  --scale: 1;
  --bg: #f7f6f3;
  --surface: #ffffff;
  --surface-2: #f0eee9;
  --ink: #1d1c1a;
  --ink-2: #45423d;
  --ink-3: #6b665e;
  --line: #e4e0d8;
  --line-2: #d6d1c6;
  --accent: #2c4a72;
  --accent-2: #3d6296;
  --accent-ink: #ffffff;
  --accent-soft: #e9eff7;
  --gold: #83652a;
  --select: #fbefc6;
  --mark: #fbe7a1;
  --focus: #7aa2d6;
  --shadow-sm: 0 1px 2px rgba(20, 18, 15, .05);
  --shadow-lg: 0 12px 40px rgba(20, 18, 15, .14);
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --lc-purple: #6d4c9f; --lc-white: #d8cfb2; --lc-red: #b33a3a; --lc-green: #3f7d52; --lc-rose: #d48aa0; --lc-black: #2b2b2b; --lc-gold: #c9a227;
  --radius: 12px;
  color-scheme: light;
}
:root[data-theme="sepia"] {
  --bg: #f3ead8; --surface: #f8f1e3; --surface-2: #ebe0c9; --ink: #33291d; --ink-2: #54473a; --ink-3: #75685a;
  --line: #e0d3b9; --line-2: #d2c3a5; --accent: #6b4a24; --accent-2: #855d2f; --accent-soft: #efe2c8; --gold: #7a5a1c;
  --select: #f1dea6; --mark: #efd98f;
}
:root[data-theme="dominican"] {
  /* the habit: a white tunic under a black cappa, with gold. The page is white; the header and the tabs are black. */
  --bg: #fbf9f4; --surface: #ffffff; --surface-2: #f1ede4; --ink: #141416; --ink-2: #38373a; --ink-3: #64615b;
  --line: #e4ded2; --line-2: #d3cbbb; --accent: #7a5a1c; --accent-2: #5c4313; --accent-ink: #ffffff; --accent-soft: #f1e7d0;
  --gold: #85641f; --select: #f3e3b5; --mark: #efd98f; --focus: #b08a3e;
}
:root[data-theme="dominican"] .site-header, :root[data-theme="dominican"] .main-nav {
  --bg: #141416; --surface: #141416; --surface-2: #26262a; --ink: #f4efe4; --ink-2: #d8d1c2; --ink-3: #a49e91;
  --line: #2c2c31; --line-2: #3b3b41; --accent: #d9b766; --accent-2: #ecd08e; --accent-ink: #141416; --accent-soft: #2b261c;
  color-scheme: dark; color: var(--ink);
}
:root[data-theme="dominican"] .site-header { background: #141416; border-bottom: 2px solid var(--gold); }
:root[data-theme="dominican"] .main-nav { background: #141416; }
:root[data-theme="dark"] {
  --bg: #16181b; --surface: #1d2024; --surface-2: #24282d; --ink: #e8e5df; --ink-2: #bfbab1; --ink-3: #959088;
  --line: #2d3136; --line-2: #3a3f45; --accent: #9dbbe3; --accent-2: #b5cdee; --accent-ink: #16181b; --accent-soft: #23303f;
  --gold: #d4b26a; --select: #3c3520; --mark: #5a4a1c; --focus: #9dbbe3; --lc-white: #e6dfc7;
  --shadow-sm: none; --shadow-lg: 0 12px 40px rgba(0, 0, 0, .5);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #16181b; --surface: #1d2024; --surface-2: #24282d; --ink: #e8e5df; --ink-2: #bfbab1; --ink-3: #959088;
    --line: #2d3136; --line-2: #3a3f45; --accent: #9dbbe3; --accent-2: #b5cdee; --accent-ink: #16181b; --accent-soft: #23303f;
    --gold: #d4b26a; --select: #3c3520; --mark: #5a4a1c; --focus: #9dbbe3; --lc-white: #e6dfc7;
    --shadow-sm: none; --shadow-lg: 0 12px 40px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; font-size: calc(16px * var(--scale)); }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 1rem; line-height: 1.55; min-height: 100vh; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-2); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0; letter-spacing: -.005em; }
.muted { color: var(--ink-3); }
.small { font-size: .875rem; }
mark { background: var(--mark); color: inherit; padding: 0 2px; border-radius: 3px; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: saturate(1.2) blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1180px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 20px; }
@media (max-width: 1100px) and (min-width: 821px) { .brand-text { display: none; } }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.brand-mark { display: block; width: 30px; height: 30px; border-radius: 8px; }
.brand-text { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; }
.brand:hover { color: var(--ink); }
.main-nav { display: flex; gap: 2px; }
.main-nav a { white-space: nowrap; text-decoration: none; color: var(--ink-2); padding: 8px 11px; border-radius: 8px; font-weight: 500; font-size: .95rem; }
.main-nav a:hover { color: var(--ink); background: var(--surface-2); }
.main-nav a.active { color: var(--accent); background: var(--accent-soft); }
.header-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: 0 1 420px; min-width: 0; }
.search { display: flex; align-items: center; background: var(--surface-2); border: 1px solid transparent; border-radius: 10px; padding: 0 4px 0 12px; flex: 1; min-width: 0; transition: border-color .15s, background .15s; }
.search:focus-within { background: var(--surface); border-color: var(--line-2); box-shadow: 0 0 0 3px var(--accent-soft); }
.search svg { color: var(--ink-3); flex-shrink: 0; }
.search input { border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: .95rem; flex: 1; min-width: 0; padding: 9px 8px; }
.search input::placeholder { color: var(--ink-3); }
.search button { border: 0; background: transparent; color: var(--ink-3); padding: 6px; cursor: pointer; border-radius: 8px; display: none; }
.icon-btn { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); width: 38px; height: 38px; border-radius: 10px; cursor: pointer; display: grid; place-items: center; flex-shrink: 0; font-family: var(--serif); font-weight: 600; }
.icon-btn:hover { color: var(--ink); border-color: var(--line-2); }
@media (max-width: 820px) {
  .header-inner { flex-wrap: wrap; gap: 8px 12px; padding: 10px 16px; }
  .header-tools { order: 3; flex: 1 1 100%; }
  .main-nav { margin-left: auto; }
  .main-nav a { padding: 6px 8px; font-size: .9rem; }
  .brand-text { font-size: 1.05rem; }
}
@media (max-width: 420px) { .brand-text { display: none; } }

/* reader settings popover */
.settings { position: fixed; max-height: calc(100vh - 140px); overflow: auto; right: 20px; top: 58px; width: 280px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 16px; z-index: 60; }
.settings h3 { font-family: var(--sans); font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 8px; }
.settings .row { margin-bottom: 16px; }
.settings .row:last-child { margin-bottom: 0; }
.opt-group { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; background: var(--surface-2); padding: 3px; border-radius: 9px; }
.opt-group.themes { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); }
.opt-group.themes button { white-space: nowrap; font-size: .82rem; padding: 7px 2px; }
.opt-group button { border: 0; background: transparent; padding: 7px 4px; border-radius: 7px; cursor: pointer; color: var(--ink-2); font-size: .88rem; }
.opt-group button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); font-weight: 600; }
.theme-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; border: 1px solid var(--line-2); }

/* ---------- layout ---------- */
.view { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 36px 20px 80px; outline: none; }
.view.wide { max-width: 1180px; }
.site-footer { border-top: 1px solid var(--line); color: var(--ink-3); font-size: .8rem; padding: 20px; text-align: center; }
.site-footer p { max-width: 900px; margin: 0 auto; }
.loading { color: var(--ink-3); padding: 32px 0; text-align: center; font-size: .95rem; }
.error { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 8px; padding: 14px 16px; color: var(--ink-2); }

/* ---------- controls ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; justify-content: space-between; margin-bottom: 28px; }
.segmented { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; }
.segmented button { border: 0; background: transparent; padding: 7px 14px; border-radius: 8px; cursor: pointer; color: var(--ink-2); font-weight: 500; font-size: .92rem; white-space: nowrap; }
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.datenav { display: inline-flex; align-items: center; gap: 6px; }
.datenav input[type="date"] { font: inherit; font-size: .92rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; }
.btn { border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 7px 13px; border-radius: 8px; cursor: pointer; font-weight: 500; font-size: .92rem; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { border-color: var(--line-2); background: var(--surface-2); color: var(--ink); }
.btn.icon { padding: 7px 11px; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn:disabled { opacity: .45; cursor: default; }

/* ---------- day header ---------- */
.day-head { margin-bottom: 28px; }
.day-date { font-size: .8rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .1em; font-weight: 600; }
.day-title { font-size: 2.25rem; margin: 8px 0 12px; }
.day-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--ink-2); font-size: .9rem; }
.meta-pill { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px; }
.color-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.also { margin-top: 12px; color: var(--ink-3); font-size: .9rem; }
.note { font-size: .875rem; color: var(--ink-3); margin: 0 0 24px; line-height: 1.5; }

/* ---------- readings ---------- */
.reading { padding: 28px 0; border-top: 1px solid var(--line); }
.reading:first-child { border-top: 0; padding-top: 4px; }
.reading-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.reading-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gold); font-weight: 600; margin-bottom: 4px; }
.reading-cite { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; }
.reading-cite a { color: var(--ink); text-decoration: none; }
.reading-cite a:hover { color: var(--accent); }
.alt-cite { font-size: .9rem; color: var(--ink-3); margin: -6px 0 12px; }
.scripture { font-family: var(--serif); font-size: 1.1875rem; line-height: 1.75; color: var(--ink); max-width: 68ch; }
.scripture p { margin: 0 0 .7em; }
.scripture .vn { font-family: var(--sans); font-size: .6em; color: var(--ink-3); vertical-align: .55em; margin: 0 3px 0 2px; font-weight: 600; }
.reading-foot { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.comm-btn { border: 1px solid var(--line); background: var(--surface); color: var(--accent); padding: 7px 14px 7px 11px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: .875rem; display: inline-flex; gap: 7px; align-items: center; white-space: nowrap; box-shadow: var(--shadow-sm); }
.comm-btn::before { content: ""; width: 16px; height: 16px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E") center/contain no-repeat; }
.comm-btn:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.comm-btn .count { font-weight: 500; color: var(--ink-3); }
.comm-btn:hover .count { color: inherit; opacity: .8; }
.collapsible { border-top: 1px solid var(--line); }
.collapsible > summary { cursor: pointer; color: var(--ink-2); font-weight: 500; padding: 14px 0; list-style: none; font-size: .95rem; }
.collapsible > summary::-webkit-details-marker { display: none; }
.collapsible > summary::before { content: "+"; display: inline-block; width: 1.2em; color: var(--ink-3); font-weight: 600; }
.collapsible[open] > summary::before { content: "–"; }
.subhead { font-size: 1.35rem; margin: 36px 0 14px; }

/* 1962 propers */
.proper { padding: 22px 0; border-top: 1px solid var(--line); }
.proper:first-child { border-top: 0; }
.proper.major .proper-text { font-size: 1.1875rem; }
.proper-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.show-latin .proper-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.proper .la { display: none; font-style: italic; color: var(--ink-2); }
.show-latin .proper .la { display: block; }
.proper-text { font-family: var(--serif); font-size: 1.0625rem; line-height: 1.7; white-space: pre-line; max-width: 68ch; }
.proper-text em { font-family: var(--sans); font-style: normal; color: var(--ink-3); font-size: .8em; font-weight: 600; letter-spacing: .02em; }
@media (max-width: 720px) { .show-latin .proper-cols { grid-template-columns: minmax(0, 1fr); } }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.tabs button { border: 1px solid var(--line); background: var(--surface); padding: 6px 12px; border-radius: 8px; cursor: pointer; color: var(--ink-2); font-size: .9rem; }
.tabs button[aria-selected="true"] { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); font-weight: 600; }

/* ---------- bible ---------- */
.page-title { font-size: 2.25rem; margin-bottom: 8px; }
.crumbs { font-size: .85rem; color: var(--ink-3); margin-bottom: 10px; }
.crumbs a { color: var(--ink-3); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.book-section { margin: 32px 0; }
.book-section h2 { font-family: var(--sans); font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px; }
.chapter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 6px; margin-top: 20px; }
.chapter-grid a { text-align: center; padding: 11px 0; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--ink); font-weight: 500; font-size: .95rem; }
.chapter-grid a:hover { border-color: var(--accent); color: var(--accent); }
.chapter-grid a small { display: block; font-size: .68rem; color: var(--ink-3); font-weight: 400; }
.chapter-nav { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 12px 0 24px; }
.hint { font-size: .9rem; color: var(--ink-3); margin: 0 0 18px; line-height: 1.55; }
.verses { font-family: var(--serif); font-size: 1.1875rem; line-height: 1.8; max-width: 68ch; }
.verse { cursor: pointer; border-radius: 3px; padding: 2px 0; transition: background .12s; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.verse:hover { background: color-mix(in srgb, var(--select) 60%, transparent); }
.verse.sel { background: var(--select); }
.verse .vn { font-family: var(--sans); font-size: .6em; color: var(--ink-3); vertical-align: .55em; margin: 0 3px 0 5px; font-weight: 600; }
.verse .vn.has { color: var(--accent); }
.hide-counts .verse .vn.has { color: var(--ink-3); }
.selbar[hidden] { display: none; }
.selbar { position: sticky; bottom: 16px; margin-top: 24px; display: flex; justify-content: center; pointer-events: none; }
.selbar .inner { pointer-events: auto; background: var(--ink); color: var(--bg); border-radius: 12px; padding: 6px 6px 6px 16px; display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow-lg); font-size: .92rem; }
.selbar .inner button { border: 0; border-radius: 8px; padding: 7px 14px; background: var(--bg); color: var(--ink); font-weight: 600; cursor: pointer; }
.selbar .inner .x { background: transparent; color: var(--bg); padding: 6px 8px; }

/* ---------- passage view ---------- */
.passage-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 48px; align-items: start; margin-top: 20px; }
.passage-layout .scripture-col { position: sticky; top: 84px; max-height: calc(100vh - 104px); overflow: auto; padding-right: 8px; }
.passage-layout .reading { border: 0; padding-top: 0; }
@media (max-width: 920px) { .passage-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; } .passage-layout .scripture-col { position: static; max-height: none; } }

/* ---------- commentary panel ---------- */
.panel { position: fixed; top: 0; right: 0; height: 100%; width: min(600px, 100%); background: var(--bg); border-left: 1px solid var(--line); box-shadow: var(--shadow-lg); transform: translateX(102%); transition: transform .24s cubic-bezier(.2, .8, .2, 1); z-index: 50; display: flex; flex-direction: column; }
.panel.open { transform: translateX(0); }
.panel-inner { overflow-y: auto; flex: 1; padding-bottom: 48px; }
.scrim { position: fixed; inset: 0; background: rgba(15, 14, 12, .32); z-index: 40; }
.comm-head { position: sticky; top: 0; background: color-mix(in srgb, var(--bg) 96%, transparent); backdrop-filter: blur(8px); padding: 20px 24px 14px; border-bottom: 1px solid var(--line); z-index: 2; }
.comm-title { font-size: 1.5rem; }
.comm-sub { color: var(--ink-3); font-size: .85rem; margin-top: 4px; }
.filters { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.chip-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.chip-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 600; width: 40px; flex-shrink: 0; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; min-width: 0; }
.chips::-webkit-scrollbar { display: none; }
.chip { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); padding: 5px 11px; border-radius: 8px; cursor: pointer; font-size: .84rem; white-space: nowrap; flex-shrink: 0; }
.chip:hover:not(:disabled) { border-color: var(--line-2); color: var(--ink); }
.chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.chip .n { color: var(--ink-3); margin-left: 5px; font-weight: 400; font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] .n { color: inherit; opacity: .75; }
.chip:disabled { opacity: .4; cursor: default; }
.toggle { display: inline-flex; gap: 8px; align-items: center; font-size: .84rem; color: var(--ink-3); cursor: pointer; margin-top: 2px; }
.toggle input { accent-color: var(--accent); }
.comm-body { padding: 4px 24px; }
.inline-comm .comm-head { position: static; padding: 0 0 14px; background: transparent; backdrop-filter: none; }
.inline-comm .comm-body { padding: 4px 0; }
.author { border-bottom: 1px solid var(--line); padding: 22px 0; }
.author:last-child { border-bottom: 0; }
.author-head { display: flex; align-items: baseline; gap: 4px 10px; flex-wrap: wrap; margin-bottom: 10px; }
.author-name { font-family: var(--sans); font-size: 1rem; font-weight: 600; color: var(--ink); }
.author-name a { color: inherit; text-decoration: none; }
.author-name a:hover { color: var(--accent); }
.author-year { color: var(--ink-3); font-size: .82rem; }
.badge { font-size: .78rem; font-weight: 500; color: var(--ink-3); }
.badge::before { content: "·"; margin-right: 8px; color: var(--line-2); }
.badge.doctor { color: var(--gold); font-weight: 600; }
.badge.order { color: var(--ink-2); font-style: italic; }
.badge.pope { color: var(--accent); font-weight: 600; }
.badge.caution { cursor: help; text-decoration: underline dotted; text-underline-offset: 3px; }
.entry { margin: 0 0 20px; }
.entry:last-child { margin-bottom: 0; }
.entry-meta { font-size: .8rem; color: var(--ink-3); margin-bottom: 6px; display: flex; flex-wrap: wrap; gap: 2px 12px; align-items: baseline; }
.entry-meta .kind { text-transform: uppercase; letter-spacing: .07em; font-weight: 600; font-size: .7rem; color: var(--ink-3); }
.entry-meta a { color: var(--ink-3); }
.entry-meta a:hover { color: var(--accent); }
.quote { font-family: var(--serif); font-size: 1.0625rem; line-height: 1.7; color: var(--ink); }
.quote p { margin: 0 0 .7em; }
.quote p:last-child { margin-bottom: 0; }
.quote.clamped { display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; }
.quote.clamped p { display: inline; }
.quote.clamped p + p::before { content: " ¶ "; color: var(--ink-3); }
.more { border: 0; background: none; color: var(--accent); cursor: pointer; padding: 10px 0 8px; min-height: 36px; font-weight: 600; font-size: .85rem; }
.more:hover { text-decoration: underline; }
.more-btn { display: inline-block; margin-top: 8px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.more-btn:hover { border-color: var(--accent); text-decoration: none; }
.quote .cites { background: var(--select); border-radius: 3px; box-decoration-break: clone; -webkit-box-decoration-break: clone; padding: 0 2px; }
.quote.focused { position: relative; }
.quote.focused::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2.2em; background: linear-gradient(to bottom, transparent, var(--bg)); pointer-events: none; }
.panel .quote.focused::after { background: linear-gradient(to bottom, transparent, var(--surface)); }
.empty { color: var(--ink-3); padding: 28px 0; }
.result-count { font-size: .85rem; color: var(--ink-3); margin: 8px 0 0; }

/* ---------- teachings & search ---------- */
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.topic-card { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
.topic-card:hover { border-color: var(--accent); color: var(--ink); }
.topic-title { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; }
.topic-card:hover .topic-title { color: var(--accent); }
.topic-sum { font-size: .875rem; line-height: 1.5; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.topic-lead { font-family: var(--serif); font-size: 1.25rem; line-height: 1.6; color: var(--ink-2); max-width: 62ch; margin: 6px 0 12px; }
.topic-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.topic-side { position: sticky; top: 84px; max-height: calc(100vh - 104px); overflow: auto; padding-right: 6px; }
.topic-side .subhead { font-family: var(--sans); font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin: 36px 0 12px; }
@media (max-width: 920px) { .topic-layout { grid-template-columns: minmax(0, 1fr); gap: 0; } .topic-side { position: static; max-height: none; order: -1; } }
.ccc-block { margin-bottom: 14px; }
.ccc-range { font-weight: 600; color: var(--ink); font-size: .9rem; margin-bottom: 4px; }
.ccc-list { margin: 0; padding: 0; list-style: none; }
.ccc-list li { margin: 0; padding: 5px 0; font-size: .9rem; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; }
.ccc-list li:last-child { border-bottom: 0; }
.ccc-list a { text-decoration: none; color: var(--ink-2); }
.ccc-list a:hover { color: var(--accent); }
.scripture-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-bottom: 10px; }
.sc-ref { font-family: var(--serif); font-size: 1.05rem; font-weight: 600; color: var(--ink); text-decoration: none; }
.sc-ref:hover { color: var(--accent); }
.sc-text { font-family: var(--serif); color: var(--ink-2); font-size: .95rem; line-height: 1.55; margin: 6px 0 10px; }
.small-btn { padding: 5px 11px 5px 9px; font-size: .8rem; }

/* ---------- about ---------- */
.prose { font-size: 1rem; line-height: 1.65; }
.prose h2 { font-size: 1.4rem; margin: 32px 0 10px; }
.prose li { margin: 6px 0; }

/* ---------- study refinements ---------- */
.settings .btn { margin-top: 8px; }
.settings-hint { font-size: .78rem; color: var(--ink-3); margin: 6px 2px 0; line-height: 1.4; }
.settings { width: 320px; }
.panel-text { font-family: var(--serif); font-size: 1rem; line-height: 1.6; color: var(--ink-2); margin-top: 12px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; max-height: 40vh; overflow: auto; }
.panel-text.clamped { max-height: calc(1.6em * 3 + 10px); padding-bottom: 0; overflow: hidden; position: relative; border-bottom-width: 1px; }
.panel-text.clamped { -webkit-mask-image: linear-gradient(#000 75%, transparent); mask-image: linear-gradient(#000 75%, transparent); }
.panel-inner:focus { outline: none; }
@media (hover: none) { .desk-only { display: none; } }
.sort-row { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 10px; font-size: .84rem; color: var(--ink-3); }
.sort-row label { display: inline-flex; align-items: center; gap: 8px; }
.sort-row select, .jump select { font: inherit; font-size: .86rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; max-width: 230px; }
.entry-meta .via { font-style: italic; }
.quote.clamped { -webkit-line-clamp: unset; display: block; }
.continue { display: flex; flex-direction: column; gap: 2px; padding: 14px 18px; margin: 4px 0 8px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 10px; text-decoration: none; color: var(--ink); max-width: 420px; }
.continue:hover { border-color: var(--accent); color: var(--ink); }
.chapter-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.chapter-head .page-title { margin: 0; }
.jump { display: flex; gap: 6px; }
.has-key { color: var(--accent); font-weight: 600; }
.hide-counts .has-key { color: inherit; font-weight: inherit; }
.empty-help { color: var(--ink-2); padding: 8px 0; }
.empty-help ul { padding-left: 20px; }
.empty-help li { margin: 6px 0; }
.matins { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 10px; padding: 20px 22px; margin: 8px 0 12px; }
.matins + .proper { border-top: 0; }
.matins-meta { font-size: .85rem; color: var(--ink-3); margin-top: 2px; }
.matins-text { white-space: normal; }
.matins-text p { margin: 0 0 .8em; }
.brev-tag { font-size: .7rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--gold); border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent); border-radius: 4px; padding: 1px 6px; }

/* Latin Vulgate in parallel */
.verses.parallel, .parallel-passage { max-width: none; }
.vrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; padding: 6px 0; border-bottom: 1px solid var(--line); line-height: 1.65; }
.vrow:last-child { border-bottom: 0; }
.la-verse { font-style: italic; color: var(--ink-2); }
.la-verse .vn { font-style: normal; }
.parallel-passage .vrow { font-size: 1.05rem; gap: 18px; }
@media (max-width: 720px) { .vrow { grid-template-columns: minmax(0, 1fr); gap: 4px; } .la-verse { padding-left: 12px; border-left: 2px solid var(--line); } }
.la-verse .vn, .parallel-passage .vn { font-family: var(--sans); font-style: normal; font-size: .6em; color: var(--ink-3); vertical-align: .55em; margin: 0 4px 0 0; font-weight: 600; }

/* cross-references */
.xrefs { margin-top: 12px; font-size: .88rem; }
.xrefs > summary { cursor: pointer; color: var(--ink-2); font-weight: 600; list-style: none; }
.xrefs > summary::-webkit-details-marker { display: none; }
.xrefs > summary::before { content: "▸ "; color: var(--ink-3); }
.xrefs[open] > summary::before { content: "▾ "; }
.xrefs > summary .n { color: var(--ink-3); font-weight: 400; margin-left: 4px; }
.xrefs ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.xrefs li { display: contents; }
.xref { border: 1px solid var(--line); background: var(--surface); color: var(--accent); padding: 3px 9px; border-radius: 6px; cursor: pointer; font-size: .84rem; }
.xref:hover { border-color: var(--accent); }
.xref-text { flex-basis: 100%; font-family: var(--serif); font-size: .98rem; line-height: 1.55; color: var(--ink-2); background: var(--surface); border-left: 2px solid var(--accent); padding: 8px 12px; border-radius: 0 6px 6px 0; }
.xref-text a { font-family: var(--sans); font-size: .8rem; font-weight: 600; }

/* writers */
.writer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.writer-grid a { display: flex; flex-direction: column; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); }
.writer-grid a:hover { border-color: var(--accent); }
.w-name { font-weight: 600; font-size: .95rem; }
.writer-grid a:hover .w-name { color: var(--accent); }
.w-meta { font-size: .8rem; color: var(--ink-3); }
.author-intro { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; color: var(--ink-3); font-size: .9rem; margin-bottom: 12px; }
@media (max-width: 820px) { .main-nav { flex-wrap: wrap; } }

/* study tools */
.study-btn { position: relative; text-decoration: none; font-size: 1.1rem; font-family: var(--sans); }
.study-count { position: absolute; top: -6px; right: -6px; background: var(--accent); color: var(--accent-ink); font-size: .65rem; font-weight: 700; border-radius: 999px; padding: 1px 5px; min-width: 16px; text-align: center; }
.study-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.act { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); padding: 3px 10px; border-radius: 6px; cursor: pointer; font-size: .8rem; }
.act:hover { border-color: var(--line-2); color: var(--ink); }
.act[aria-pressed="true"] { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 45%, transparent); }
.entry-actions { display: flex; gap: 6px; margin-top: 8px; opacity: .75; }
.entry:hover .entry-actions, .entry-actions:focus-within { opacity: 1; }
.note-box { flex-basis: 100%; min-height: 90px; font: inherit; font-family: var(--serif); font-size: 1rem; line-height: 1.5; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; resize: vertical; }
.note-box:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.note-card { margin-bottom: 16px; }
.note-card .study-tools { margin-top: 4px; }

/* print: just the reading and the commentary */
/* My daily reading */
.daily-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px 20px; }
.daily-head .page-title { margin: 0; }
.daily-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.daily-custom, .lectio { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin: 14px 0; }
.custom-list { list-style: none; margin: 0; padding: 0; }
.custom-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.custom-list li:last-child { border-bottom: 0; }
.custom-list label { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; cursor: pointer; }
.custom-move { display: flex; gap: 4px; flex-shrink: 0; }
.d-day { margin: 10px 0 0; font-size: .9rem; }
#d-body { max-width: 760px; }
.d-sec { margin: 22px 0 0; padding-top: 16px; border-top: 1px solid var(--line); }
.d-title { font-size: 1.3rem; margin: 0 0 10px; }
.d-sub { font-family: var(--serif); font-size: 1.05rem; margin: 14px 0 6px; }
.d-text { font-family: var(--serif); font-size: 1.05rem; line-height: 1.7; }
.d-text p { margin: 0 0 10px; }
.d-cite { font-size: .8rem; color: var(--ink-3); margin-top: 6px; }
.d-foot { font-size: .86rem; margin-top: 10px; color: var(--ink-3); }
.d-voice + .d-voice { margin-top: 14px; }
.d-journal { width: 100%; font: inherit; font-family: var(--serif); font-size: 1rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; resize: vertical; }
.lectio-steps { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.lectio-steps span { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); }
.lectio-steps span.on { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.lectio-in { width: 100%; font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); margin-top: 8px; }
.lectio-nav { display: flex; justify-content: space-between; margin-top: 14px; }

/* Go deeper */
.deeper { margin: 26px 0 10px; }
.dp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 10px; }
.dp-card { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.dp-link { text-decoration: none; color: var(--ink); }
.dp-link:hover { border-color: var(--accent); }
.dp-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.dp-title { font-family: var(--serif); font-weight: 600; font-size: 1.05rem; }
.dp-count { font-size: .8rem; color: var(--ink-3); font-variant-numeric: tabular-nums; background: var(--surface-2); border-radius: 999px; padding: 1px 8px; }
.dp-quote { font-family: var(--serif); font-size: .95rem; line-height: 1.55; color: var(--ink-2); margin: 4px 0 6px; flex: 1; }
.dp-quote cite { display: block; font-family: var(--sans); font-style: normal; font-size: .76rem; color: var(--ink-3); margin-top: 6px; }
.dp-card .btn { align-self: flex-start; }
.dp-more { margin: 10px 0 0; font-size: .9rem; }

/* The Imitation of Christ */
.im-page { max-width: 1080px; margin: 0 auto; }
.im-latin-title { font-style: italic; color: var(--ink-3); margin: -4px 0 14px; }
.im-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.im-text p { font-family: var(--serif); font-size: 1.08rem; line-height: 1.75; margin: 0 0 14px; }
.im-latin p { font-family: var(--serif); font-style: italic; color: var(--ink-2); line-height: 1.65; }
.im-side { position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow: auto; }
.im-side .scripture-card { margin-bottom: 10px; }
.im-phrase { font-style: italic; margin: -4px 0 8px; }
.im-today { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); margin: 14px 0 6px; }
@media (max-width: 920px) { .im-layout { grid-template-columns: minmax(0, 1fr); } .im-side { position: static; max-height: none; } }

/* Guéranger */
.gueranger { margin: 8px 0 18px; }
.gu-card { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 10px; padding: 14px 16px; margin-bottom: 10px; }
.gu-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin-bottom: 6px; }
.gu-title { font-family: var(--serif); font-weight: 600; font-size: 1.05rem; }
.gu-preview { font-family: var(--serif); line-height: 1.65; margin: 0 0 10px; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.gu-page { max-width: 760px; margin: 0 auto; }
.gu-body p { font-family: var(--serif); font-size: 1.05rem; line-height: 1.7; margin: 0 0 14px; }
.gu-h { font-family: var(--sans); font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); margin: 22px 0 8px; }

/* Goffine */
.goffine { margin-top: 18px; }
.goffine-part summary { font-weight: 600; }
.goffine-text { font-family: var(--serif); font-size: 1.02rem; line-height: 1.65; padding: 6px 2px 4px; }
.goffine-text p { margin: 0 0 10px; }
.goffine-text .g-q, .bs-goffine .g-q { font-weight: 600; font-style: italic; margin-top: 14px; }
.goffine-text h3, .bs-goffine h3 { font-family: var(--sans); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); margin: 14px 0 6px; }
.bs-goffine p { margin: 0 0 4px; }
.bs-goffine h4 { color: #7a5d1d; margin: 6px 0 2px; }

/* Printable brief */
.day-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.brief-layout { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 28px; align-items: start; margin-top: 16px; }
.brief-choose { position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow: auto; padding-right: 6px; }
.b-group { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.b-group h2 { font-family: var(--sans); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 8px; }
.b-sub { font-size: .78rem; font-weight: 600; color: var(--ink-2); margin: 10px 0 2px; }
.b-opt { display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; font-size: .9rem; line-height: 1.35; cursor: pointer; }
.b-opt input { margin-top: 3px; flex-shrink: 0; }
.b-group input[type=text], .b-group textarea { width: 100%; font: inherit; font-size: .92rem; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; margin-bottom: 8px; }
.b-group textarea { resize: vertical; }
.b-seg { display: flex; gap: 4px; background: var(--surface-2); padding: 3px; border-radius: 8px; margin-top: 8px; }
.b-seg button { flex: 1; border: 0; background: transparent; padding: 5px; border-radius: 6px; font-size: .8rem; color: var(--ink-2); cursor: pointer; }
.b-seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-sm); }
.toolbar input[type=date] { font: inherit; font-size: .9rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.brief-sheet-wrap { min-width: 0; }
.brief-sheet { background: #fff; color: #111; border: 1px solid var(--line); box-shadow: var(--shadow-lg); padding: 40px 46px; font-family: var(--serif); font-size: .82rem; line-height: 1.45; max-width: 816px; }
.brief-sheet h1 { font-size: 1.45rem; margin: 2px 0 2px; color: #111; }
.brief-sheet h2 { font-family: var(--sans); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: #7a5d1d; margin: 12px 0 4px; border-bottom: 1px solid #ddd; padding-bottom: 2px; }
.brief-sheet h2 span { text-transform: none; letter-spacing: 0; color: #333; font-family: var(--serif); font-size: .8rem; margin-left: 6px; }
.bs-date, .bs-sub { font-family: var(--sans); font-size: .72rem; color: #555; }
.bs-text p, .bs-quote p, .bs-notes p { margin: 0 0 4px; }
.bs-text .vn { font-family: var(--sans); font-size: .62rem; color: #666; margin-right: 2px; vertical-align: super; }
.bs-text .ps-head { font-family: var(--sans); font-size: .7rem; color: #555; }
.bs-cites, .bs-ccc { margin: 0; padding-left: 16px; }
.bs-ccc span { font-family: var(--sans); font-size: .7rem; color: #555; margin-left: 4px; }
.bs-quote { margin: 4px 0 8px; padding-left: 10px; border-left: 2px solid #c9a227; }
.bs-quote cite { display: block; font-style: normal; font-family: var(--sans); font-size: .68rem; color: #555; margin-top: 2px; }
.bs-quote cite span { color: #666; }
.bs-saint { margin-bottom: 6px; }
.bs-foot { margin-top: 14px; font-family: var(--sans); font-size: .62rem; color: #666; border-top: 1px solid #eee; padding-top: 4px; }
@media (max-width: 920px) { .brief-layout { grid-template-columns: minmax(0, 1fr); } .brief-choose { position: static; max-height: none; } .brief-sheet { padding: 22px 20px; } }
@media print {
  @page { size: letter; margin: 0.5in; }
  .no-print, nav.main-nav { display: none !important; }
  .brief-layout { display: block; margin: 0; }
  .brief-sheet { border: 0; box-shadow: none; padding: 0; max-width: none; font-size: 9.5pt; }
}

/* Catechism for the Sunday */
.ccc-sunday { margin-top: 8px; }
.ccc-themes { list-style: none; margin: 0; padding: 0; }
.ccc-themes li { padding: 8px 0; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; }
.ccc-themes li:last-child { border-bottom: 0; }
.ccc-theme { font-family: var(--serif); font-size: 1.02rem; }
.ccc-theme::first-letter { text-transform: uppercase; }
.ccc-nums { font-size: .84rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ccc-nums a { color: var(--accent); }

/* Citations */
.cite-box { margin: 8px 0 4px; padding: 10px 12px; background: var(--surface-2); border-radius: 8px; font-size: .86rem; }
.cite-row { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 4px 0; }
.cite-label { font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding-top: 2px; }
.cite-text { line-height: 1.5; overflow-wrap: anywhere; }
.cite-box p { margin: 6px 0 0; }
@media (max-width: 600px) { .cite-row { grid-template-columns: minmax(0, 1fr) auto; } .cite-label { grid-column: 1 / -1; } }

/* Teachings */
.part-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.part-nav .n { margin: 0 4px 0 0; font-family: var(--serif); font-weight: 600; color: var(--gold); }
.part-section { margin-top: 34px; scroll-margin-top: 80px; }
.part-title { font-size: 1.55rem; margin: 0 0 2px; }
.part-num { display: block; font-family: var(--sans); font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); margin-bottom: 2px; }
.section-label { font-family: var(--sans); font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 22px 0 10px; }
.topic-sum { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.topic-meta { font-size: .76rem; color: var(--ink-3); margin-top: auto; padding-top: 4px; }
.topic-nav { margin: 4px 0 8px; flex-wrap: wrap; }
.topic-layout .subhead[id], .topic-side .subhead[id] { scroll-margin-top: 80px; }
.scripture-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.scripture-grid .scripture-card { margin: 0; display: flex; flex-direction: column; }
.scripture-grid .sc-text { flex: 1; }
.scripture-grid .comm-btn { align-self: flex-start; }
.topic-areas { grid-template-areas: "scripture side" "writings side"; grid-template-rows: auto 1fr; }
.area-scripture { grid-area: scripture; } .area-writings { grid-area: writings; } .area-side { grid-area: side; }
@media (max-width: 920px) { .topic-areas { grid-template-areas: "scripture" "side" "writings"; } .topic-areas .topic-side { order: 0; } }
.related-list { margin: 0; padding: 0; list-style: none; }
.related-list li { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.related-list li:last-child { border-bottom: 0; }
.related-list a { text-decoration: none; }

/* Writers */
.writer-tools { margin: 14px 0 6px; }
.writer-search { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; max-width: 520px; }
.writer-search:focus-within { border-color: var(--accent); }
.writer-search svg { width: 18px; height: 18px; fill: none; stroke: var(--ink-3); stroke-width: 2; flex-shrink: 0; }
.writer-search input { border: 0; outline: 0; background: transparent; font: inherit; color: var(--ink); width: 100%; }
.writer-tools .chip-label { width: 58px; }
.more-filters { display: flex; flex-direction: column; gap: 8px; }
.more-filters > summary { cursor: pointer; font-size: .84rem; color: var(--accent); font-weight: 500; list-style: none; width: fit-content; }
.more-filters > summary::-webkit-details-marker { display: none; }
.more-filters > summary::before { content: "▸ "; }
.more-filters[open] > summary::before { content: "▾ "; }
.more-filters[open] { gap: 8px; }
.more-filters[open] > .chip-row:first-of-type { margin-top: 8px; }
@media (min-width: 721px) { .more-filters > summary { display: none; } }
.w-card { gap: 2px; }
.w-badges { font-size: .78rem; line-height: 1.4; }
.w-badges .badge:first-child::before { content: none; margin: 0; }
.w-count { display: flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--ink-3); margin-top: 6px; font-variant-numeric: tabular-nums; }
.w-bar { flex: 0 0 56px; height: 4px; border-radius: 2px; background: var(--surface-2); overflow: hidden; }
.w-bar i { display: block; height: 100%; background: var(--gold); opacity: .7; }
.writer-head .author-intro .badge:first-of-type::before { content: "·"; }
.writer-profile { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: 10px; padding: 12px 16px; margin: 14px 0 6px; max-width: 760px; }
.writer-profile p { margin: 0 0 4px; font-family: var(--serif); font-size: 1.02rem; line-height: 1.6; }
.writer-profile p.small { font-family: var(--sans); font-size: .82rem; margin: 6px 0 0; }
.writer-stats { display: flex; gap: 28px; margin: 18px 0 6px; flex-wrap: wrap; }
.writer-stats div { display: flex; flex-direction: column; }
.writer-stats strong { font-family: var(--serif); font-size: 1.6rem; line-height: 1.1; font-weight: 600; }
.writer-stats span { font-size: .78rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
.most-books { margin: 10px 0 0; }
.linklike { border: 0; background: none; padding: 4px 0; min-height: 28px; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.writer-filters { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 16px 0 0; font-size: .86rem; color: var(--ink-3); }
.writer-filters label { display: inline-flex; align-items: center; gap: 8px; }
.writer-filters select { font: inherit; font-size: .88rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; max-width: min(320px, 78vw); }

/* Summa Theologica */
.summa-page { max-width: 760px; margin: 0 auto; }
.st-part { margin-top: 8px; }
.st-treatise { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin: 0 0 10px; }
.st-treatise summary { cursor: pointer; padding: 12px 16px; font-weight: 600; list-style-position: inside; }
.st-qs { margin: 0; padding: 4px 16px 14px 52px; line-height: 1.5; }
.st-qs li { margin: 4px 0; }
.st-qs a, .st-toc a { text-decoration: none; }
.st-qs a:hover, .st-toc a:hover { text-decoration: underline; }
.st-intro { color: var(--ink-2); font-family: var(--serif); }
.st-toc { margin: 18px 0 8px; padding-left: 22px; line-height: 1.5; }
.st-article { margin: 36px 0 0; padding-top: 18px; border-top: 1px solid var(--line); scroll-margin-top: 80px; }
.st-article.target h2 { background: var(--hl, rgba(214, 170, 60, .18)); border-radius: 6px; }
.st-article h2 { font-size: 1.3rem; line-height: 1.3; margin: 0 0 14px; }
.st-num { display: block; font-family: var(--sans); font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-2, var(--ink-3)); margin-bottom: 4px; }
.st-para { font-family: var(--serif); font-size: 1.05rem; line-height: 1.7; margin: 0 0 14px; }
.st-para p { display: inline; margin: 0; }
.st-para p + p { display: block; margin-top: 10px; }
.st-label { font-family: var(--sans); font-size: .78rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.st-para.obj { color: var(--ink-2); }
.st-para.resp { padding-left: 14px; border-left: 3px solid var(--accent, var(--line-2)); }
.st-para .fn { font-size: .85em; color: var(--ink-3); }
a.scrip { white-space: nowrap; }

@media print {
  :root { --bg: #fff; --surface: #fff; --ink: #000; --ink-2: #222; --ink-3: #555; --line: #ccc; }
  .site-header, .site-footer, .settings, .scrim, .filters, .toggle, .sort-row, .entry-actions, .study-tools button, .chapter-nav, .jump, .toolbar, .selbar, .more, .xrefs, .comm-btn, .btn, .hint, .note { display: none !important; }
  body { background: #fff; }
  .view { max-width: none; padding: 0; }
  .passage-layout, .topic-layout { display: block; }
  .passage-layout .scripture-col, .topic-side { position: static; max-height: none; overflow: visible; }
  .panel { position: static; transform: none; width: auto; box-shadow: none; border: 0; }
  .panel:not(.open) { display: none; }
  .panel.open ~ * , body:has(.panel.open) .view { display: none; }
  .panel-inner { overflow: visible; }
  .comm-head { position: static; }
  .panel-text.clamped { max-height: none; -webkit-mask-image: none; mask-image: none; }
  .note-box { border: 0; padding: 0; min-height: 0; }
  .author { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}

/* Sunday preparation */
.prep-reading { padding: 28px 0; border-top: 1px solid var(--line); }
.prep-text > summary { cursor: pointer; color: var(--ink-3); font-size: .88rem; margin: 2px 0 8px; }
.prep-text .scripture { margin: 8px 0 12px; }
.prep-picks .author:first-child { padding-top: 10px; }
.prep-date { font-weight: 600; font-size: .95rem; padding: 0 6px; }
#prep-matins .matins { margin-bottom: 8px; }

/* saints of the day */
.saints { margin-top: 20px; padding-top: 4px; border-top: 1px solid var(--line); }
.saint { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin-bottom: 12px; }
.saint-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 6px; }
.saint-head h3 { font-size: 1.3rem; }
.saint-bio { margin: 0 0 8px; color: var(--ink-2); line-height: 1.6; }
.saint-patron { margin: 0 0 10px; font-size: .88rem; color: var(--ink-2); }
.saint-quote { font-family: var(--serif); font-size: 1.1rem; line-height: 1.6; margin: 12px 0; padding-left: 14px; border-left: 3px solid var(--gold); color: var(--ink); }
.saint-quote cite { display: block; font-family: var(--sans); font-style: normal; font-size: .78rem; color: var(--ink-3); margin-top: 6px; }
.saint-links { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-top: 8px; }
.saint-more { flex-basis: 100%; }
.saint-more > summary, .martyrology > summary { cursor: pointer; color: var(--ink-2); font-size: .9rem; font-weight: 500; }
.martyrology { margin: 12px 0; }
.martyrology p { font-family: var(--serif); line-height: 1.6; color: var(--ink-2); }

/* Latin on the left, English on the right (and Latin first when stacked) */
.vrow .la-verse { order: -1; }
.show-latin .proper-cols .la { order: -1; }
@media (max-width: 720px) { .la-verse { padding-left: 0; border-left: 0; } .vrow > span:not(.la-verse) { padding-left: 12px; border-left: 2px solid var(--line); } }

/* ---------- navigation: desktop top bar, phone bottom tab bar ---------- */
.nav-ico { display: none; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-short { display: none; }
@media (max-width: 720px) {
  .header-inner { flex-wrap: nowrap; gap: 8px; padding: 8px 12px; }
  .brand-text { display: none; }
  .header-tools { order: 0; flex: 1 1 auto; margin-left: 0; }
  .search input { padding: 8px 6px; }
  .main-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; margin: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 0;
    background: color-mix(in srgb, var(--surface) 96%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); }
  .main-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; font-size: .66rem; letter-spacing: -.01em; font-weight: 600; border-radius: 10px; color: var(--ink-3); }
  .main-nav a.active { background: transparent; color: var(--accent); }
  .main-nav a:hover { background: transparent; }
  .nav-ico { display: block; }
  .nav-full { display: none !important; }
  .nav-short { display: inline; }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .selbar { bottom: calc(76px + env(safe-area-inset-bottom)); }
}

/* ---------- QA round 2 ---------- */
.comm-top { position: sticky; top: 0; z-index: 3; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 24px 12px; background: color-mix(in srgb, var(--bg) 96%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.comm-head { position: static; padding: 12px 24px 14px; background: transparent; backdrop-filter: none; }
.inline-comm .comm-top { position: static; padding: 0 0 10px; background: transparent; backdrop-filter: none; }
.inline-comm .comm-head { padding: 8px 0 14px; }
.study-tools { margin-top: 0; }
.sort-row { flex-wrap: nowrap; }
.sort-row label { min-width: 0; flex: 1 1 0; }
.sort-row select { width: 100%; max-width: none; min-width: 0; }
.badge::before { content: none; }
.author-head { gap: 4px 12px; }
.badge { white-space: nowrap; }
mark { background: color-mix(in srgb, var(--mark) 45%, transparent); box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--gold) 55%, transparent); border-radius: 2px; padding: 0 1px; }
.results { max-width: 780px; }
.ref-head { font-family: var(--serif); font-weight: 600; font-size: 1.1rem; margin-bottom: 6px; }
.ref-head a { color: var(--ink); text-decoration: none; }
.ref-head a:hover { color: var(--accent); }
.prep-link { display: inline-block; margin-top: 14px; font-weight: 600; font-size: .92rem; text-decoration: none; }
.prep-link:hover { text-decoration: underline; }
.ps-head { font-family: var(--sans); font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin: 4px 0 6px; }
.ps-head span { text-transform: none; letter-spacing: 0; font-weight: 400; }
@media (max-width: 720px) {
  .comm-top { padding: 12px 16px 10px; }
  .comm-head { padding: 10px 16px 12px; }
  .comm-body { padding: 4px 16px; }
  .comm-title { font-size: 1.3rem; }
  .toolbar { gap: 10px; }
  .datenav { width: 100%; }
  .datenav input[type="date"] { flex: 1; }
}
@media (max-width: 720px) {
  /* a blurred (backdrop-filter) header would trap the fixed tab bar inside it */
  .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--surface); }
}
.results .ref-head + .entry .entry-meta > span:nth-of-type(2) { display: none; }

/* brand: name with tagline */
.brand-text { display: flex; flex-direction: column; line-height: 1.05; font-size: 1.3rem; letter-spacing: .01em; }
.brand-tag { font-family: var(--sans); font-size: .66rem; font-weight: 500; letter-spacing: .04em; color: var(--ink-3); margin-top: 2px; }
@media (max-width: 1100px) { .brand-tag { display: none; } }
.wider-head { font-size: 1rem; margin: 1.6rem 0 .4rem; padding-top: .8rem; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: .15rem; }

/* Library */
.lede { font-size: 1.05rem; color: var(--ink-2); max-width: 62ch; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.lib-card { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); box-shadow: var(--shadow-sm); transition: border-color .15s; }
.lib-card:hover { border-color: var(--accent); }
.lib-name { font-family: var(--serif); font-size: 1.12rem; font-weight: 600; color: var(--accent); }
.lib-sub { font-size: .82rem; color: var(--ink-3); }
.lib-text { font-size: .9rem; color: var(--ink-2); margin-top: 4px; }
.toc-list { list-style: none; padding: 0; margin: 8px 0 14px; display: grid; gap: 4px; }
.toc-list.cols { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.toc-list li[hidden] { display: none; }
.toc-filter { width: 100%; max-width: 360px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; margin: 6px 0; }

/* Search suggestions */
.suggest { position: absolute; top: calc(100% + 4px); left: 0; right: 0; min-width: min(420px, 92vw); z-index: 60; background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 4px; max-height: 70vh; overflow: auto; }
.suggest .sg { display: grid; grid-template-columns: 64px 1fr; column-gap: 8px; align-items: baseline; width: 100%; text-align: left; padding: 7px 9px; border-radius: 7px; text-decoration: none; color: var(--ink); background: none; border: 0; font: inherit; cursor: pointer; }
.suggest .sg.on, .suggest .sg:hover { background: var(--accent-soft); }
.sg-kind { font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); grid-row: span 2; }
.sg-name { font-weight: 600; }
.sg-sub { font-size: .8rem; color: var(--ink-3); grid-column: 2; }
.sg-all { border-top: 1px solid var(--line) !important; border-radius: 0 0 7px 7px !important; margin-top: 2px; }
@media (max-width: 720px) { .suggest { position: fixed; top: 56px; left: 8px; right: 8px; min-width: 0; max-height: 60vh; } }

/* Design preview switcher (A/B/C/D) */
.ds-switch { position: fixed; left: 12px; bottom: 12px; z-index: 80; display: flex; align-items: center; gap: 4px; padding: 5px 6px; background: var(--ink); color: var(--bg); border-radius: 999px; box-shadow: var(--shadow-lg); font: 600 .8rem var(--sans); }
.ds-switch .ds-label { padding: 0 6px; opacity: .7; }
.ds-switch button { border: 0; background: transparent; color: inherit; font: inherit; width: 28px; height: 28px; border-radius: 999px; cursor: pointer; }
.ds-switch button[aria-pressed="true"] { background: var(--bg); color: var(--ink); }
@media (max-width: 720px) { .ds-switch { bottom: calc(72px + env(safe-area-inset-bottom)); } }

/* ============ Preview designs (html[data-ui]) – A is the plain stylesheet above ============ */
.fold-btn, .datestrip, .lbl-short { display: none; }
.filt-wrap > summary { cursor: pointer; font-weight: 600; font-size: .92rem; padding: 8px 0; list-style: none; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.filt-wrap > summary::before { content: '⚙'; color: var(--ink-3); }
.filt-wrap[open] > summary { margin-bottom: 4px; }

/* lit-colour accents */
#day { --lc: var(--lc-green); }
#day[data-lc="purple"] { --lc: var(--lc-purple); } #day[data-lc="white"] { --lc: var(--lc-gold); } #day[data-lc="red"] { --lc: var(--lc-red); }
#day[data-lc="rose"] { --lc: var(--lc-rose); } #day[data-lc="black"] { --lc: var(--lc-black); } #day[data-lc="gold"] { --lc: var(--lc-gold); }

/* folded readings (B, D): the first lines, then "Read it all" */
[data-ui="b"] #day .reading:not(.unfolded) .scripture, [data-ui="b"] #day .proper.major:not(.unfolded):not(.matins) .proper-cols,
[data-ui="d"] #day .reading:not(.unfolded) .scripture, [data-ui="d"] #day .proper.major:not(.unfolded):not(.matins) .proper-cols {
  max-height: 7.2em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 40%, transparent); mask-image: linear-gradient(#000 40%, transparent); }
[data-ui="b"] .fold-btn, [data-ui="d"] .fold-btn { display: inline-block; margin-top: 6px; background: none; border: 0; padding: 4px 0; color: var(--accent); font: 600 .92rem var(--sans); cursor: pointer; }
.unfolded .fold-btn { display: none !important; }

/* ---- B: Daily habit ---- */
[data-ui="b"] .main-nav a[data-nav="topics"], [data-ui="b"] .main-nav a[data-nav="authors"] { display: none; }
[data-ui="b"] .main-nav a.nav-me { display: flex; }
@media (min-width: 721px) { [data-ui="b"] .main-nav a.nav-me { display: inline-block; } }
@media (max-width: 720px) { [data-ui="b"] .main-nav { grid-template-columns: repeat(5, 1fr); } }
[data-ui="b"] #day .day-head { display: none; }
[data-ui="b"] #day > .note { font-size: .8rem; }
.hero { border-radius: 18px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); margin-bottom: 14px; }
.hero-band { height: 8px; background: var(--lc); }
.hero-body { padding: 18px 20px 20px; }
.hero-date { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 600; }
.hero-title { font-family: var(--serif); font-size: clamp(1.6rem, 5vw, 2.2rem); line-height: 1.15; margin: 4px 0 14px; }
.hero-label { font-size: .85rem; font-weight: 600; color: var(--lc); filter: saturate(1.2) brightness(.85); }
.hero-text { font-family: var(--serif); font-size: 1.15rem; line-height: 1.6; color: var(--ink-2); margin: 6px 0 16px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.continue-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); gap: 10px; overflow-x: auto; margin-bottom: 18px; scrollbar-width: none; }
.continue-card { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); text-decoration: none; color: var(--ink); }
[data-ui="b"] #day { display: flex; flex-direction: column; }
[data-ui="b"] #day > .hero { order: -3; } [data-ui="b"] #day > .continue-row { order: -2; } [data-ui="b"] #day > #deeper { order: -1; }
[data-ui="b"] .dp-grid { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: minmax(270px, 82%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
@media (min-width: 900px) { [data-ui="b"] .dp-grid { grid-auto-columns: minmax(280px, 34%); } }
[data-ui="b"] .dp-card { scroll-snap-align: start; }
[data-ui="b"] .reading { border-top: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; margin-bottom: 12px; }
@media (max-width: 720px) {
  /* commentary as a bottom sheet */
  [data-ui="b"] .panel { top: auto; bottom: 0; height: 88vh; width: 100%; border-left: 0; border-radius: 18px 18px 0 0; transform: translateY(102%); }
  [data-ui="b"] .panel.open { transform: translateY(0); }
  [data-ui="b"] .panel::before { content: ''; display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 8px auto 0; flex: none; }
}

/* ---- C: Study desk ---- */
[data-ui="c"] .datestrip { display: flex; gap: 4px; overflow-x: auto; margin: -14px 0 18px; padding-bottom: 4px; scrollbar-width: thin; }
.datestrip a { flex: none; display: flex; flex-direction: column; align-items: center; width: 46px; padding: 6px 0; border-radius: 10px; text-decoration: none; color: var(--ink-2); font-size: .72rem; border: 1px solid transparent; }
.datestrip a b { font-size: 1.05rem; color: var(--ink); }
.datestrip a.is-today { border-color: var(--line-2); }
.datestrip a.on { background: var(--accent); color: var(--accent-ink); } .datestrip a.on b { color: var(--accent-ink); }
[data-ui="c"] #day .day-head { border-left: 6px solid var(--lc); padding: 4px 0 4px 16px; }
[data-ui="c"] .reading-label, [data-ui="c"] .proper .reading-label { color: var(--lc-red); }
[data-ui="c"] .day-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
@media (min-width: 1000px) {
  [data-ui="c"] .day-cols { grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); align-items: start; }
  [data-ui="c"] .day-side { position: sticky; top: 76px; max-height: calc(100vh - 90px); overflow-y: auto; padding: 4px 6px 20px 22px; border-left: 1px solid var(--line); }
  [data-ui="c"] .day-side .dp-grid { grid-template-columns: 1fr; }
  /* commentary docked beside the text, not over it */
  [data-ui="c"] body.panel-open { overflow: auto !important; }
  [data-ui="c"] body.panel-open .scrim { display: none; }
  [data-ui="c"] body.panel-open > main, [data-ui="c"] body.panel-open .site-footer { margin-right: min(560px, 44vw); width: auto; max-width: none; }
  [data-ui="c"] .panel { width: min(560px, 44vw); top: 61px; height: calc(100% - 61px); box-shadow: none; }
  /* a rail of sections on the left */
  [data-ui="c"] .main-nav { position: fixed; left: 0; top: 61px; bottom: 0; width: 150px; flex-direction: column; padding: 16px 8px; gap: 2px; border-right: 1px solid var(--line); background: var(--bg); }
  [data-ui="c"] .main-nav .nav-ico { display: inline-block; width: 18px; height: 18px; vertical-align: -4px; margin-right: 8px; }
  [data-ui="c"] .main-nav a { padding: 8px 10px; }
  /* the page sits in the room the rail leaves, centred there, never under it or past the edge */
  [data-ui="c"] body > main { --mw: 760px; width: calc(100% - 150px); max-width: var(--mw); margin-left: calc(150px + max(0px, (100% - 150px - var(--mw)) / 2)); margin-right: 0; }
  [data-ui="c"] body > main.wide { --mw: 1180px; }
  [data-ui="c"] .site-footer { margin-left: 150px; width: calc(100% - 150px); }
  [data-ui="c"] body.panel-open > main { margin-left: 150px; }
  /* with the commentary docked there is no room for two columns: the side material goes under the readings */
  [data-ui="c"] body.panel-open .day-cols { grid-template-columns: minmax(0, 1fr); }
  [data-ui="c"] body.panel-open .day-side { position: static; max-height: none; overflow: visible; padding: 0; border-left: 0; }
}
.side-title { font: 600 .78rem var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin: 0 0 6px; }
@media (max-width: 999px) { [data-ui="c"] .side-title { display: none; } }

/* ---- D: Calm reader ---- */
[data-ui="d"] #day .day-head { text-align: center; margin-bottom: 18px; }
[data-ui="d"] #day .day-meta, [data-ui="d"] #day .day-links, [data-ui="d"] #day > .note { justify-content: center; }
[data-ui="d"] #day .day-title { font-size: clamp(1.5rem, 4vw, 2.1rem); }
[data-ui="d"] #day > .note { font-size: .78rem; text-align: center; }
[data-ui="d"] #day .is-gospel .scripture, [data-ui="d"] #day .is-gospel .proper-text { font-size: 1.32rem; line-height: 1.85; }
[data-ui="d"] #day .is-gospel { border-top: 0; }
[data-ui="d"] #day .reading:not(.is-gospel), [data-ui="d"] #day .proper:not(.is-gospel):not(.matins) { opacity: .9; }
[data-ui="d"] .toolbar { justify-content: center; margin-bottom: 16px; }
[data-ui="d"] .scripture .vn, [data-ui="d"] .verse .vn { font-size: 0; margin: 0; }
[data-ui="d"] .verse .vn::after { content: ' '; font-size: 1.28rem; }
[data-ui="d"] .verses { font-size: 1.28rem; line-height: 1.95; max-width: 62ch; margin-inline: auto; }
[data-ui="d"] .site-header, [data-ui="d"] .main-nav { transition: transform .25s ease; }
[data-ui="d"].chrome-away .site-header { transform: translateY(-100%); }
@media (max-width: 720px) { [data-ui="d"].chrome-away .main-nav { transform: translateY(110%); } }
@media (min-width: 1000px) { [data-ui="c"] .site-header { backdrop-filter: none; background: var(--surface); } }

/* B, C, D on phones: the date controls in one slim row */
@media (max-width: 720px) {
  :is([data-ui="b"], [data-ui="c"], [data-ui="d"]) .view > .toolbar { flex-wrap: nowrap; gap: 6px; margin-bottom: 14px; justify-content: space-between; }
  :is([data-ui="b"], [data-ui="c"], [data-ui="d"]) .view > .toolbar .segmented button { padding: 6px 10px; font-size: .82rem; }
  :is([data-ui="b"], [data-ui="c"], [data-ui="d"]) .view > .toolbar .lbl-long { display: none; }
  :is([data-ui="b"], [data-ui="c"], [data-ui="d"]) .view > .toolbar .lbl-short { display: inline; }
  :is([data-ui="b"], [data-ui="c"], [data-ui="d"]) .view > .toolbar .datenav { gap: 4px; flex-wrap: nowrap; }
  :is([data-ui="b"], [data-ui="c"], [data-ui="d"]) .view > .toolbar input[type=date] { flex: none; width: 40px; padding: 5px 4px; color: transparent; }
  :is([data-ui="b"], [data-ui="c"], [data-ui="d"]) .view > .toolbar [data-today] { padding: 6px 8px; font-size: .8rem; }
  :is([data-ui="b"], [data-ui="c"], [data-ui="d"]) .view > .toolbar .btn.icon { width: 32px; height: 32px; }
  [data-ui="c"] .datestrip { margin-top: -4px; }
  .ds-switch { left: auto; right: 8px; padding: 3px; font-size: .72rem; }
  .ds-switch .ds-label { display: none; }
  .ds-switch button { width: 24px; height: 24px; }
}
/* D: a quiet heading */
[data-ui="d"] #day .day-meta .meta-pill:not(:first-child) { display: none; }
[data-ui="d"] #day .day-meta .meta-pill { border: 0; background: none; padding: 0; font-size: .85rem; color: var(--ink-3); }
[data-ui="d"] #day .day-links { font-size: .85rem; gap: 14px; }
[data-ui="d"] #day > .note { display: none; }

/* C: the day's next steps (from B) */
.day-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 10px; }
.day-actions .muted-inv { opacity: .75; font-weight: 400; margin-left: 4px; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--accent); }
[data-ui="c"] #day .day-links { font-size: .88rem; }
@media (max-width: 720px) { .day-actions .btn { flex: 1 1 auto; justify-content: center; } .day-actions .btn.ghost { flex-basis: 100%; } }
@media (max-width: 720px) {
  [data-ui="c"] #day .day-title { font-size: 1.7rem; margin: 2px 0 8px; }
  [data-ui="c"] #day .day-meta { gap: 4px; }
  [data-ui="c"] #day .day-meta .meta-pill { font-size: .75rem; padding: 2px 8px; }
  [data-ui="c"] #day .day-head { padding-left: 12px; margin-bottom: 16px; }
  [data-ui="c"] #day .day-links { font-size: .8rem; gap: 4px 14px; }
  [data-ui="c"] .datestrip { margin-bottom: 12px; }
  [data-ui="c"] .datestrip a { width: 42px; padding: 4px 0; }
}

/* ============ The Story of Salvation ============ */
.story-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 6px 0 12px; font-size: .88rem; }
.sb-label { font: 600 .72rem var(--sans); text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); }
.sb-era, .sb-thread { text-decoration: none; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-2); background: var(--surface); }
.sb-era b { color: var(--accent); margin-right: 2px; }
.sb-thread { border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); color: var(--ink); }
.sb-era:hover, .sb-thread:hover { border-color: var(--accent); }
.era-line { list-style: none; padding: 0 0 8px; margin: 10px 0 14px; display: flex; gap: 0; overflow-x: auto; counter-reset: era; scrollbar-width: thin; }
.era-line li { flex: 1 0 118px; position: relative; }
.era-line li::before { content: ''; position: absolute; left: 0; right: 0; top: 17px; height: 2px; background: var(--line-2); }
.era-line li:first-child::before { left: 50%; } .era-line li:last-child::before { right: 50%; }
.era-line a { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px; text-decoration: none; color: var(--ink-2); padding: 0 4px; }
.era-line a b { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--line-2); color: var(--ink); font-size: .9rem; }
.era-line a span { font-size: .8rem; font-weight: 600; line-height: 1.2; }
.era-line a small { font-size: .7rem; color: var(--ink-3); }
.era-line a:hover b { border-color: var(--accent); }
.era-line a.on b { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.era-line a.on span { color: var(--accent); }
.era-card { display: grid; grid-template-columns: auto 1fr; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 18px; }
.era-card h3 { font-family: var(--serif); font-size: 1.4rem; margin: 0 0 6px; }
.era-card h4 { margin: 14px 0 4px; font-size: .9rem; }
.era-card p { margin: 6px 0; }
.era-num { width: 46px; height: 46px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font: 600 1.2rem var(--serif); }
.era-events { margin: 4px 0; padding-left: 18px; columns: 2 260px; }
.era-events li { margin: 3px 0; break-inside: avoid; }
.era-nav { display: flex; justify-content: space-between; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
@media (max-width: 600px) { .era-card { grid-template-columns: 1fr; } .era-num { display: none; } }
.thread-grid, .st-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.day-side .st-list { grid-template-columns: 1fr; }
.thread-card { display: flex; flex-direction: column; gap: 5px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); box-shadow: var(--shadow-sm); }
.thread-card:hover { border-color: var(--accent); }
.tc-title { font: 600 1.08rem var(--serif); color: var(--accent); }
.tc-path { font-size: .78rem; color: var(--gold); font-weight: 600; }
.tc-path i { font-style: normal; color: var(--ink-3); margin: 0 2px; }
.tc-sum { font-size: .9rem; color: var(--ink-2); }
.tc-meta { font-size: .78rem; color: var(--ink-3); }
.thread-card.small .tc-title { font-size: 1rem; }
.story-today { margin: 22px 0; }
.thread-page { max-width: 820px; }
.thread-path { list-style: none; padding: 0; margin: 20px 0; }
.ts { display: grid; grid-template-columns: 40px 1fr; gap: 14px; position: relative; padding-bottom: 26px; }
.ts::before { content: ''; position: absolute; left: 19px; top: 40px; bottom: 0; width: 2px; background: linear-gradient(var(--gold), var(--line-2)); }
.ts.last::before { display: none; }
.ts-dot { width: 40px; height: 40px; border-radius: 50%; background: var(--surface); border: 2px solid var(--gold); display: grid; place-items: center; font: 600 1rem var(--serif); color: var(--gold); }
.ts.last .ts-dot { background: var(--gold); color: #fff; }
.ts.focus .ts-body { background: var(--accent-soft); border-radius: var(--radius); padding: 10px 14px; margin: -10px -14px 0; }
.ts-top { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; font-size: .82rem; }
.ts-era { color: var(--ink-3); text-decoration: none; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; font-size: .72rem; }
.ts-ref { font-weight: 600; }
.ts h3 { font-family: var(--serif); font-size: 1.25rem; margin: 4px 0 2px; }
.ts-note { margin: 2px 0 8px; color: var(--ink-2); }
.ts-text { margin: 0 0 8px; padding: 8px 12px; border-left: 3px solid var(--line-2); font-family: var(--serif); font-size: 1.02rem; line-height: 1.6; color: var(--ink-2); }
.ts-links { margin-top: 8px; }
.ts-links > summary { cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--accent); }
.ts-links .n { font-size: .75rem; background: var(--accent-soft); border-radius: 999px; padding: 1px 7px; margin-left: 4px; }
.tl-group { margin: 10px 0 0 4px; }
.tl-to { font-weight: 600; font-size: .85rem; margin-bottom: 4px; }
.tl-quote { margin: 0 0 10px; }
.tl-quote blockquote { margin: 0; font-family: var(--serif); font-size: .98rem; line-height: 1.55; }
.tl-quote figcaption { font-size: .82rem; margin-top: 3px; }

/* ============ The Bible: contents and book pages ============ */
.bh .lede { margin-bottom: 18px; }
.bh-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 14px; margin-bottom: 28px; }
@media (max-width: 860px) { .bh-hero { grid-template-columns: minmax(0, 1fr); } }
.bh-continue { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border-radius: 16px; text-decoration: none; color: var(--accent-ink); background: linear-gradient(140deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #000)); box-shadow: var(--shadow-sm); }
.bh-continue .bh-kicker { color: color-mix(in srgb, var(--accent-ink) 75%, transparent); }
.bh-ref { font: 600 1.7rem/1.15 var(--serif); }
.bh-snip { font-family: var(--serif); font-size: 1.02rem; line-height: 1.5; opacity: .92; }
.bh-prog { display: flex; flex-direction: column; gap: 4px; margin-top: auto; padding-top: 8px; }
.bh-continue .br-prog { background: rgba(255, 255, 255, .25); } .bh-continue .br-prog i { background: #fff; }
.bh-continue .muted { color: color-mix(in srgb, var(--accent-ink) 80%, transparent); }
.bh-kicker { font: 600 .72rem var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.bh-go { padding: 16px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.bh-form { display: flex; flex-direction: column; gap: 6px; }
.bh-input { display: flex; gap: 8px; }
.bh-input input { flex: 1; min-width: 0; font: inherit; font-size: 1rem; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg); color: var(--ink); }
.bh-quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.bh-quick a { display: flex; flex-direction: column; padding: 7px 10px; border-radius: 10px; background: var(--surface-2); text-decoration: none; color: var(--ink); }
.bh-quick a:hover { background: var(--accent-soft); }
.bh-quick b { font-size: .86rem; } .bh-quick span { font-size: .76rem; color: var(--ink-3); }
.bh-body { display: grid; grid-template-columns: 210px minmax(0, 1fr); min-width: 0; gap: 28px; align-items: start; }
.bh-index { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 12px; }
.bh-index ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.bh-index ol a { display: block; padding: 6px 10px; border-radius: 8px; text-decoration: none; color: var(--ink-2); font-size: .92rem; }
.bh-index ol a:hover { background: var(--surface-2); color: var(--ink); }
.bh-total { display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 860px) {
  .bh-body { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .bh-index { position: sticky; top: 56px; z-index: 5; background: var(--bg); padding: 6px 0; min-width: 0; gap: 8px; }
  .bh-index .segmented { align-self: flex-start; }
  .bh-index .segmented button { padding: 5px 12px; font-size: .82rem; }
  .bh-index ol { flex-direction: row; overflow-x: auto; gap: 4px; scrollbar-width: none; }
  .bh-index ol a { white-space: nowrap; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: .82rem; }
  .bh-total { display: none; }
}
.bh-sec { scroll-margin-top: 90px; margin-bottom: 26px; }
.bh-sec-head h2 { font: 600 1.35rem var(--serif); margin: 0; }
.bh-sec-head p { margin: 2px 0 10px; font-size: .92rem; }
.book-rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 8px; }
.book-row { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 11px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.book-row:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.book-row.along { background: transparent; border-style: dashed; }
.br-name { font: 600 1.06rem var(--serif); color: var(--accent); display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.br-name .dr { font: 500 .75rem var(--sans); color: var(--ink-3); }
.br-intro { font-size: .86rem; color: var(--ink-2); line-height: 1.4; }
.br-meta { font-size: .74rem; color: var(--ink-3); margin-top: 2px; }
.br-prog { display: block; height: 4px; border-radius: 2px; background: var(--surface-2); overflow: hidden; margin-top: 4px; }
.br-prog i { display: block; height: 100%; background: var(--gold); border-radius: 2px; }
/* a book */
.bk-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 18px; }
.bk-head .lede { margin: 4px 0 10px; }
.bk-dr { font: 500 .5em var(--sans); color: var(--ink-3); vertical-align: middle; }
.bk-tags { display: flex; flex-wrap: wrap; gap: 6px; } .bk-tags a.meta-pill { text-decoration: none; color: var(--accent); }
.bk-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.bk-grid-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px 16px; margin-bottom: 22px; }
.bk-legend { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; font-weight: 600; margin-bottom: 10px; }
.chapter-grid.heat a { position: relative; background: color-mix(in srgb, var(--accent) calc(var(--d) * 92%), var(--accent-soft)); border-color: transparent; }
.chapter-grid.heat a.dark, .chapter-grid.heat a.dark small { color: #fff; }
.chapter-grid.heat a.read::after { content: '✓'; position: absolute; top: 1px; right: 4px; font-size: .62rem; color: var(--gold); font-weight: 700; }
.chapter-grid.heat a.dark.read::after { color: #ffe9b0; }
.chapter-grid.heat a.cont { outline: 2px solid var(--gold); outline-offset: 1px; }
.chapter-grid.heat a:hover { outline: 2px solid var(--accent); outline-offset: 1px; }
.bk-cols { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px; }
@media (max-width: 860px) { .bk-cols { grid-template-columns: minmax(0, 1fr); } .bk-head { align-items: flex-start; } }
.bk-moments { margin: 6px 0 12px; padding-left: 18px; } .bk-moments li { margin: 4px 0; }
.bk-h3 { font-size: .95rem; margin: 14px 0 4px; }
.bk-writers { list-style: none; padding: 0; margin: 6px 0; display: flex; flex-direction: column; gap: 2px; }
.bk-writers li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 2px; border-bottom: 1px solid var(--line); }
.bk-th-note { font-family: var(--serif); font-style: italic; color: var(--ink-3); margin: 0 0 8px; font-size: .92rem; }
.bk-threads { margin: 0 0 12px; }
.bk-threads dt { font: 600 1.02rem var(--serif); margin-top: 10px; }
.bk-threads dt a { text-decoration: none; color: var(--accent); }
.bk-threads dt a:hover { text-decoration: underline; text-underline-offset: 3px; }
.bk-threads dd { margin: 2px 0 0; padding: 0 0 10px; border-bottom: 1px solid var(--line); font-family: var(--serif); font-style: italic; font-size: .95rem; line-height: 1.6; }
.bk-threads dd a { color: var(--ink-2); text-decoration: none; }
.bk-threads dd a:hover { color: var(--accent); text-decoration: underline; }
.bk-ref { font: 400 .78rem var(--sans); font-style: normal; color: var(--ink-3); }
.bk-sep { color: var(--line-2); font-style: normal; }

/* ============ The Bible pages' look: html[data-bible] (set in designs.js; the cards above are the base) ============ */
.br-top { display: contents; }
.br-lead, .br-n, .br-chev, .chapter-grid .cbar { display: none; }
:is([data-bible="b"], [data-bible="c"], [data-bible="d"]) .chapter-grid.heat a.dark,
:is([data-bible="b"], [data-bible="c"], [data-bible="d"]) .chapter-grid.heat a.dark small { color: inherit; }
:is([data-bible="b"], [data-bible="c"], [data-bible="d"]) .chapter-grid.heat a::after { content: none; }
:is([data-bible="b"], [data-bible="c"], [data-bible="d"]) .chapter-grid .cbar { display: block; }

/* ---- B: Printed contents ---- */
[data-bible="b"] .bh-hero { gap: 40px; padding: 18px 0 22px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
[data-bible="b"] .bh-continue { background: none; color: var(--ink); padding: 0; border-radius: 0; box-shadow: none; }
[data-bible="b"] .bh-continue .bh-kicker, [data-bible="b"] .bh-kicker { color: var(--gold); }
[data-bible="b"] .bh-ref { font-size: 2.1rem; color: var(--accent); }
[data-bible="b"] .bh-snip { font-style: italic; color: var(--ink-2); }
[data-bible="b"] .bh-continue .muted { color: var(--ink-3); }
[data-bible="b"] .bh-continue .br-prog { background: var(--line); } [data-bible="b"] .bh-continue .br-prog i { background: var(--gold); }
[data-bible="b"] .bh-go { background: none; border: 0; padding: 0; }
[data-bible="b"] .bh-input input { border: 0; border-bottom: 1px solid var(--line-2); border-radius: 0; background: transparent; font-family: var(--serif); font-size: 1.2rem; padding: 6px 2px; }
[data-bible="b"] .bh-input .btn { background: none; color: var(--accent); border: 0; }
[data-bible="b"] .bh-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
[data-bible="b"] .bh-quick a { background: none; flex-direction: row; align-items: baseline; gap: 8px; padding: 4px 0; border-radius: 0; }
[data-bible="b"] .bh-quick b { font: 600 .95rem var(--serif); color: var(--accent); white-space: nowrap; }
[data-bible="b"] .bh-quick span { font-style: italic; }
[data-bible="b"] .bh-index .segmented { background: none; padding: 0; gap: 14px; }
[data-bible="b"] .bh-index .segmented button { background: none; box-shadow: none; border-radius: 0; padding: 4px 0; border-bottom: 2px solid transparent; }
[data-bible="b"] .bh-index .segmented button[aria-pressed="true"] { border-bottom-color: var(--gold); color: var(--ink); }
[data-bible="b"] .bh-index ol a { font-family: var(--serif); font-size: 1rem; padding: 4px 0; background: none !important; border: 0 !important; }
[data-bible="b"] .bh-sec-head { text-align: center; margin-bottom: 10px; }
[data-bible="b"] .bh-sec-head h2 { display: flex; align-items: center; gap: 16px; font-size: .9rem; font-family: var(--sans); text-transform: uppercase; letter-spacing: .14em; color: var(--ink-2); }
[data-bible="b"] .bh-sec-head h2::before, [data-bible="b"] .bh-sec-head h2::after { content: ''; flex: 1; height: 1px; background: var(--line-2); }
[data-bible="b"] .bh-sec-head h2 .muted { display: none; }
[data-bible="b"] .bh-sec-head p { font-family: var(--serif); font-style: italic; }
[data-bible="b"] .book-rows { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 2px 44px; }
[data-bible="b"] .book-row { background: none; border: 0; border-radius: 0; padding: 7px 0; box-shadow: none !important; }
[data-bible="b"] .book-row.along { opacity: .7; }
[data-bible="b"] .br-top { display: flex; align-items: baseline; gap: 6px; }
[data-bible="b"] .br-name { font-size: 1.12rem; }
[data-bible="b"] .book-row:hover .br-name { text-decoration: underline; text-underline-offset: 3px; }
[data-bible="b"] .br-lead { display: block; flex: 1; border-bottom: 1px dotted var(--ink-3); opacity: .5; transform: translateY(-4px); min-width: 20px; }
[data-bible="b"] .br-n { display: inline; font-family: var(--serif); color: var(--ink-3); }
[data-bible="b"] .br-intro { font-family: var(--serif); font-style: italic; font-size: .93rem; }
[data-bible="b"] .br-meta { display: none; }
[data-bible="b"] .bk-grid-wrap { background: none; border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0; padding: 14px 0 18px; }
[data-bible="b"] .chapter-grid.heat { display: flex; flex-wrap: wrap; gap: 2px 6px; }
[data-bible="b"] .chapter-grid.heat a { background: none; border: 0; border-radius: 0; padding: 4px 6px 14px; min-width: 2.1em; font: 500 1.08rem var(--serif); outline: none; }
[data-bible="b"] .chapter-grid.heat a small { font-size: .62rem; }
[data-bible="b"] .chapter-grid.heat a:hover { color: var(--accent); }
[data-bible="b"] .chapter-grid .cbar { position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%); width: calc(3px + var(--d) * 7px); height: calc(3px + var(--d) * 7px); border-radius: 50%; background: var(--accent); opacity: calc(.3 + var(--d) * .7); }
[data-bible="b"] .chapter-grid.heat a.read .cn { color: var(--gold); }
[data-bible="b"] .chapter-grid.heat a.cont .cn { text-decoration: underline 2px var(--gold); text-underline-offset: 4px; }

/* ---- C: Story line ---- */
[data-bible="c"] .bh-continue { background: none; color: var(--ink); padding: 4px 0 4px 20px; border-left: 3px solid var(--gold); border-radius: 0; box-shadow: none; }
[data-bible="c"] .bh-continue .bh-kicker { color: var(--gold); }
[data-bible="c"] .bh-ref { color: var(--accent); }
[data-bible="c"] .bh-snip { color: var(--ink-2); }
[data-bible="c"] .bh-continue .muted { color: var(--ink-3); }
[data-bible="c"] .bh-continue .br-prog { background: var(--line); } [data-bible="c"] .bh-continue .br-prog i { background: var(--gold); }
[data-bible="c"] .bh-go { background: none; border: 0; padding: 0; }
[data-bible="c"] .bh-input input { border-radius: 999px; padding: 10px 16px; background: var(--surface); }
[data-bible="c"] .bh-input .btn { border-radius: 999px; }
[data-bible="c"] .bh-quick { display: flex; flex-wrap: wrap; gap: 4px 16px; }
[data-bible="c"] .bh-quick a { background: none; padding: 2px 0; }
[data-bible="c"] .bh-quick b { color: var(--accent); }
[data-bible="c"] .bh-list { position: relative; padding-left: 34px; }
[data-bible="c"] .bh-list::before { content: ''; position: absolute; left: 10px; top: 10px; bottom: 0; width: 2px; background: linear-gradient(var(--gold), var(--line-2) 70%, transparent); }
[data-bible="c"] .bh-sec { position: relative; }
[data-bible="c"] .bh-sec-head h2::before { content: ''; position: absolute; left: -31px; top: 9px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 3px solid var(--gold); }
[data-bible="c"] .book-rows { display: block; columns: 2 300px; column-gap: 40px; }
[data-bible="c"] .book-row { display: block; break-inside: avoid; background: none; border: 0; border-radius: 0; padding: 6px 0 8px; box-shadow: none !important; }
[data-bible="c"] .book-row.along { opacity: .7; }
[data-bible="c"] .br-top, [data-bible="c"] .br-name { display: inline; }
[data-bible="c"] .br-name .dr { margin-left: 6px; }
[data-bible="c"] .br-intro { display: block; }
[data-bible="c"] .br-meta { display: none; }
[data-bible="c"] .book-row:hover .br-name { color: var(--gold); }
[data-bible="c"] .bk-grid-wrap { background: none; border: 0; border-radius: 0; padding: 0; }
[data-bible="c"] .chapter-grid.heat { display: grid; grid-template-columns: repeat(var(--n), minmax(14px, 1fr)); gap: 3px; align-items: end; overflow-x: auto; padding: 8px 0 4px; border-bottom: 1px solid var(--line-2); }
[data-bible="c"] .chapter-grid.heat a { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-end; height: 130px; background: none; border: 0; border-radius: 0; padding: 0; outline: none; }
[data-bible="c"] .chapter-grid .cbar { height: calc(6px + var(--d) * 96px); border-radius: 5px 5px 1px 1px; background: linear-gradient(var(--accent-2), var(--accent)); opacity: calc(.35 + var(--d) * .65); transition: opacity .15s; }
[data-bible="c"] .chapter-grid.heat a:hover .cbar { opacity: 1; }
[data-bible="c"] .chapter-grid.heat a.read .cbar { background: linear-gradient(#d9b35c, var(--gold)); }
[data-bible="c"] .chapter-grid.heat a .cn { font-size: .68rem; font-weight: 500; color: var(--ink-3); text-align: center; margin-top: 4px; }
[data-bible="c"] .chapter-grid.heat a.cont .cn { color: var(--gold); font-weight: 700; }
[data-bible="c"] .chapter-grid.heat a small { display: none; }

/* ---- D: Quiet index ---- */
[data-bible="d"] .bh-continue { background: var(--accent-soft); color: var(--ink); border-radius: 22px; box-shadow: none; }
[data-bible="d"] .bh-continue .bh-kicker { color: var(--ink-3); }
[data-bible="d"] .bh-ref { color: var(--accent); }
[data-bible="d"] .bh-snip { color: var(--ink-2); }
[data-bible="d"] .bh-continue .muted { color: var(--ink-3); }
[data-bible="d"] .bh-continue .br-prog { background: rgba(0, 0, 0, .08); } [data-bible="d"] .bh-continue .br-prog i { background: var(--accent); }
[data-bible="d"] .bh-go { background: var(--surface-2); border: 0; border-radius: 22px; }
[data-bible="d"] .bh-input input { border: 0; border-radius: 12px; background: var(--surface); }
[data-bible="d"] .bh-quick a { background: none; padding: 6px 8px; }
[data-bible="d"] .bh-quick a:hover { background: var(--surface); }
[data-bible="d"] .book-rows { display: block; background: var(--surface); border-radius: 18px; overflow: hidden; }
[data-bible="d"] .book-row { display: grid; grid-template-columns: minmax(130px, 200px) minmax(0, 1fr) auto auto; align-items: center; gap: 4px 16px; padding: 12px 18px; background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none !important; }
[data-bible="d"] .book-row:last-child { border-bottom: 0; }
[data-bible="d"] .book-row:hover { background: var(--surface-2); }
[data-bible="d"] .book-row.along .br-name { color: var(--ink-2); }
[data-bible="d"] .br-name { grid-column: 1; grid-row: 1; flex-direction: column; gap: 0; }
[data-bible="d"] .br-intro { grid-column: 2; grid-row: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-3); }
[data-bible="d"] .br-n { display: block; grid-column: 3; grid-row: 1; font-size: .82rem; color: var(--ink-3); }
[data-bible="d"] .br-chev { display: block; grid-column: 4; grid-row: 1; color: var(--line-2); font-size: 1.3rem; line-height: 1; }
[data-bible="d"] .br-meta { display: none; }
[data-bible="d"] .book-row .br-prog { grid-column: 1 / -1; grid-row: 2; margin: 0; }
@media (max-width: 720px) {
  [data-bible="d"] .book-row { grid-template-columns: minmax(0, 1fr) auto auto; }
  [data-bible="d"] .br-intro { grid-column: 1 / 2; grid-row: 2; white-space: normal; font-size: .84rem; }
  [data-bible="d"] .book-row .br-prog { grid-row: 3; }
}
[data-bible="d"] .bk-grid-wrap { border: 0; border-radius: 22px; }
[data-bible="d"] .chapter-grid.heat { grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 10px 2px; }
[data-bible="d"] .chapter-grid.heat a { background: none; border: 0; border-radius: 0; padding: 0; outline: none; display: flex; flex-direction: column; align-items: stretch; }
[data-bible] .chapter-grid.heat a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[data-bible="d"] .chapter-grid .cbar { height: 28px; border-radius: 3px; background: color-mix(in srgb, var(--accent) calc(var(--d) * 92%), var(--accent-soft)); transition: transform .15s; }
[data-bible="d"] .chapter-grid.heat a:hover .cbar { transform: scaleY(1.12); }
[data-bible="d"] .chapter-grid.heat a.cont .cbar { box-shadow: inset 0 0 0 2px var(--gold); }
[data-bible="d"] .chapter-grid.heat a .cn { font-size: .72rem; font-weight: 500; color: var(--ink-3); text-align: center; margin-top: 4px; }
[data-bible="d"] .chapter-grid.heat a.read .cn { color: var(--gold); font-weight: 700; }
[data-bible="d"] .chapter-grid.heat a small { font-size: .6rem; text-align: center; }
@media (max-width: 860px) { [data-bible="b"] .bh-index ol { gap: 18px; } [data-bible="b"] .bh-index ol a { font-size: .92rem; } }
@media (max-width: 600px) { [data-bible="b"] .bh-quick { grid-template-columns: 1fr; } }
[data-bible="b"] .bk-moments { list-style: none; padding: 0; }
[data-bible="b"] .bk-moments li { font-family: var(--serif); font-size: 1.02rem; padding: 3px 0; }
[data-bible="b"] .bk-moments a { text-decoration: none; color: var(--accent); }
[data-bible="b"] .bk-moments a:hover { text-decoration: underline; text-underline-offset: 3px; }
[data-bible="b"] .bk-h3 { font: 600 .78rem var(--sans); text-transform: uppercase; letter-spacing: .12em; color: var(--ink-3); margin-top: 18px; }
[data-bible="b"] .bk-writers li { border-bottom: 1px dotted var(--line-2); align-items: baseline; }
[data-bible="b"] .bk-writers a { font-family: var(--serif); font-size: 1.02rem; text-decoration: none; color: var(--accent); }
[data-bible="b"] .bk-writers a:hover { text-decoration: underline; text-underline-offset: 3px; }
[data-bible="b"] .bk-cols .subhead { font-size: 1.2rem; }

/* ============ The printed look, across the site (as chosen for the Bible pages): text, not boxes ============
   Serif names, italic descriptions, hairline rules and gold accents; on a computer, things in time order run
   along a gold line. Today's page keeps its own look. */
.lib-grid, .thread-grid, .topic-grid, .writer-grid { gap: 0 40px; }
.lib-card, .thread-grid .thread-card, .topic-card, .writer-grid a {
  background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; padding: 12px 0 14px;
}
.lib-card:hover, .thread-grid .thread-card:hover, .topic-card:hover, .writer-grid a:hover { border-color: var(--line); background: none; }
.lib-name, .thread-grid .tc-title, .topic-title, .writer-grid .w-name { font: 600 1.12rem var(--serif); color: var(--accent); }
.lib-card:hover .lib-name, .thread-grid .thread-card:hover .tc-title, .topic-card:hover .topic-title, .writer-grid a:hover .w-name { text-decoration: underline; text-underline-offset: 3px; color: var(--accent); }
.lib-sub { font-family: var(--serif); font-style: italic; font-size: .9rem; }
.lib-text { font-size: .9rem; }
.thread-grid .tc-sum, .topic-sum { font-family: var(--serif); font-style: italic; font-size: .96rem; color: var(--ink-2); }
.thread-grid .tc-path { font: 600 .72rem var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--gold); }
.tc-meta, .topic-meta { font-size: .76rem; }
/* "How it connects": three short notes under a gold rule */
/* writers: name, dates and region, then the count */
.writer-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.writer-grid a { padding: 9px 0 10px; }
.writer-grid .w-name { font-size: 1.04rem; }
.writer-grid .w-bar { display: none; }
.writer-grid .w-count { margin-top: 2px; }
/* the boxes that held a passage of Scripture, a profile or today's chapter become text set off by a rule */
.scripture-card, .writer-profile, .im-today, .era-card { background: none; border: 0; border-left: 3px solid var(--gold); border-radius: 0; box-shadow: none; padding: 4px 0 4px 18px; }
.scripture-card { margin-bottom: 16px; }
.scripture-card, .writer-profile p { font-family: var(--serif); }
.era-card { grid-template-columns: 1fr; }
.era-card .era-num { display: none; }
/* the Summa's contents: a printed table of contents */
.st-treatise { background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; margin: 0; }
.st-treatise summary { padding: 11px 0; font: 600 1.06rem var(--serif); }
.st-treatise summary:hover { color: var(--accent); }
/* on a computer, the ages of the Church run along a gold line */
@media (min-width: 861px) {
  .w-line { position: relative; padding-left: 34px; }
  .w-line::before { content: ''; position: absolute; left: 10px; top: 12px; bottom: 0; width: 2px; background: linear-gradient(var(--gold), var(--line-2) 80%, transparent); }
  .w-era { position: relative; }
  .w-era > h2::before { content: ''; position: absolute; left: -31px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 3px solid var(--gold); }
}

/* The Catechism of Trent */
.trent { margin: 22px 0; }
.trent-part > summary { font-family: var(--serif); font-size: 1.05rem; }
.trent-textline { font-family: var(--serif); font-style: italic; color: var(--ink-2); border-left: 3px solid var(--gold); padding: 2px 0 2px 14px; margin: 10px 0; }
.trent-outline { margin: 8px 0 12px; } .trent-outline > summary { cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--accent); }
.trent-outline p { font-size: .93rem; }
.trent-cat p { font-family: var(--serif); font-size: 1.04rem; line-height: 1.7; }
.trent-cat h4 { font: 600 .78rem var(--sans); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); margin: 18px 0 4px; }
.trent-toc li { padding: 3px 0; } .trent-toc a { font-family: var(--serif); font-size: 1.02rem; }

/* Homily workbench */
.wb-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.wb-nav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.wb-cols { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 32px; align-items: start; }
@media (max-width: 900px) { .wb-cols { grid-template-columns: minmax(0, 1fr); } }
.wb-src { position: sticky; top: 76px; max-height: calc(100vh - 90px); overflow-y: auto; padding-right: 6px; }
@media (max-width: 900px) { .wb-src { position: static; max-height: none; } }
.wb-reading { border-top: 1px solid var(--line); padding: 12px 0 14px; }
.wb-cite { font: 600 1.05rem var(--serif); margin: 2px 0 4px; }
.wb-text { font-family: var(--serif); color: var(--ink-2); margin: 4px 0; }
.wb-acts { font-size: .86rem; margin-bottom: 6px; }
.wb-pick { border-left: 3px solid var(--line-2); padding: 2px 0 2px 12px; margin: 8px 0; }
.wb-pick p { margin: 0 0 3px; font-family: var(--serif); font-size: .95rem; }
.wb-title { width: 100%; font: 600 1.5rem var(--serif); border: 0; border-bottom: 1px solid var(--line-2); background: transparent; color: var(--ink); padding: 6px 2px; margin-bottom: 10px; }
.wb-blocks { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 6px; }
.wb-b { position: relative; padding: 4px 70px 4px 0; }
.wb-b textarea, .wb-b input { width: 100%; font: inherit; color: var(--ink); background: transparent; border: 1px solid transparent; border-radius: 6px; padding: 4px 6px; resize: vertical; }
.wb-b textarea:focus, .wb-b input:focus { border-color: var(--line-2); background: var(--surface); outline: none; }
.wb-h { font: 600 .82rem var(--sans) !important; text-transform: uppercase; letter-spacing: .1em; color: var(--accent) !important; margin-top: 12px; }
.wb-note { font-family: var(--sans); }
.wb-t-quote blockquote, .wb-scripture { margin: 0; border-left: 3px solid var(--gold); padding-left: 10px; }
.wb-q { font-family: var(--serif) !important; font-size: 1.02rem !important; line-height: 1.55; }
.wb-b footer { font-size: .85rem; color: var(--ink-2); padding-left: 6px; }
.wb-cite-note { display: block; font-size: .74rem; color: var(--ink-3); padding-left: 6px; }
.wb-ctl { position: absolute; right: 0; top: 4px; display: flex; gap: 2px; opacity: .45; }
.wb-b:hover .wb-ctl, .wb-b:focus-within .wb-ctl { opacity: 1; }
.icon-mini { border: 0; background: var(--surface-2); border-radius: 6px; width: 22px; height: 22px; cursor: pointer; font-size: .75rem; color: var(--ink-2); }
.wb-empty { color: var(--ink-3); padding: 14px 0; }
.wb-add { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.wb-spacer { flex: 1; }
.wb-toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; z-index: 90; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: .9rem; box-shadow: var(--shadow-lg); }
.wb-toast a { color: #ffe9b0; }
@media (max-width: 720px) { .wb-toast { bottom: calc(76px + env(safe-area-inset-bottom)); width: calc(100% - 32px); } }
.wb-print { display: none; }
@media print {
  .wb-cols { display: block; } .wb-src, .wb-add, .wb-nav, .wb-blocks, .wb-title, .wb-head .muted { display: none !important; }
  .wb-print { display: block; font-family: var(--serif); font-size: 11.5pt; line-height: 1.5; }
  .wb-print h3 { font: 600 9pt var(--sans); text-transform: uppercase; letter-spacing: .1em; margin: 14pt 0 4pt; }
  .wb-print blockquote { margin: 6pt 0 6pt 0; padding-left: 10pt; border-left: 2pt solid #999; }
  .wb-print footer { font-size: 9.5pt; } .wb-print small { font-size: 8pt; color: #555; }
}

/* Imitation with the Gospel */
.im-gospel { display: flex; flex-direction: column; gap: 2px; margin-bottom: 18px; }
.im-g { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 7px 0; cursor: pointer; color: var(--accent); font: 600 1rem var(--serif); }
.im-g:hover .im-g-ref { text-decoration: underline; text-underline-offset: 3px; }
.im-med { border-left: 3px solid var(--gold); padding: 4px 0 8px 18px; margin: 0 0 24px; }
.im-med-head { display: flex; justify-content: space-between; align-items: baseline; }
.im-med-gospel { margin: 8px 0; font-family: var(--serif); font-size: 1.12rem; line-height: 1.65; }
.im-med-gospel footer { font: .85rem var(--sans); color: var(--ink-3); }
.im-med-steps { padding-left: 20px; color: var(--ink-2); font-size: .94rem; }

/* Highlights */
:root { --hl-gold: #f6e3a1; --hl-green: #cfe8c9; --hl-blue: #cfe0f4; --hl-rose: #f4d4dc; }
:root[data-theme="dark"], :root[data-theme="night"] { --hl-gold: #5c4c1c; --hl-green: #29452a; --hl-blue: #22384f; --hl-rose: #4c2a33; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]):not([data-theme="sepia"]):not([data-theme="dominican"]) { --hl-gold: #5c4c1c; --hl-green: #29452a; --hl-blue: #22384f; --hl-rose: #4c2a33; } }
.verse.hl-gold { background: var(--hl-gold); } .verse.hl-green { background: var(--hl-green); } .verse.hl-blue { background: var(--hl-blue); } .verse.hl-rose { background: var(--hl-rose); }
.verse.sel { background: var(--select); }
.hl-pick { display: inline-flex; align-items: center; gap: 5px; margin-left: 4px; }
.hl-dot { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line-2); cursor: pointer; padding: 0; }
.hl-dot.hl-gold { background: var(--hl-gold); } .hl-dot.hl-green { background: var(--hl-green); } .hl-dot.hl-blue { background: var(--hl-blue); } .hl-dot.hl-rose { background: var(--hl-rose); }
.hl-dot[aria-pressed="true"] { outline: 2px solid var(--accent); outline-offset: 2px; }
.hl-off { border: 0; background: none; color: var(--ink-3); cursor: pointer; font-size: .85rem; }
.hl-tags { width: 100%; margin-top: 6px; font: inherit; font-size: .88rem; padding: 6px 8px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); color: var(--ink); }
.hl-list { list-style: none; padding: 0; margin: 8px 0 18px; }
.hl-list li { position: relative; padding: 8px 0 8px 16px; border-bottom: 1px solid var(--line); }
.hl-list li[hidden] { display: none; }
.hl-list a { font: 600 1.02rem var(--serif); text-decoration: none; }
.hl-bar { position: absolute; left: 0; top: 10px; bottom: 10px; width: 5px; border-radius: 3px; }
.hl-bar.hl-gold { background: #d9b84a; } .hl-bar.hl-green { background: #6aa865; } .hl-bar.hl-blue { background: #5b8fc9; } .hl-bar.hl-rose { background: #c97a8f; }
.hl-text { margin: 3px 0 0; font-family: var(--serif); color: var(--ink-2); font-size: .95rem; }
.hl-filter { margin: 4px 0 6px; }

/* First-visit tour */
.tour { position: fixed; right: 20px; bottom: 20px; z-index: 95; width: min(360px, calc(100% - 32px)); background: var(--surface); border: 1px solid var(--line-2); border-top: 3px solid var(--gold); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 14px 16px 12px; }
.tour h3 { font: 600 1.15rem var(--serif); margin: 2px 0 4px; }
.tour p { margin: 0 0 10px; font-size: .93rem; color: var(--ink-2); }
.tour-step { font: 600 .7rem var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--gold); }
.tour-btns { display: flex; justify-content: space-between; align-items: center; }
.tour-ring { position: fixed; z-index: 94; border: 2px solid var(--gold); border-radius: 12px; pointer-events: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 25%, transparent); transition: all .25s ease; }
@media (max-width: 720px) { .tour { left: 16px; right: 16px; width: auto; bottom: calc(76px + env(safe-area-inset-bottom)); } }

/* Modes: what each mode puts away (html[data-hide]) */
.main-nav a.nav-me { display: revert; }
.main-nav a[hidden] { display: none !important; }
@media (max-width: 720px) { .main-nav { grid-template-columns: repeat(var(--tabs, 6), 1fr); } .main-nav a.nav-me:not([hidden]) { display: flex; } }
[data-hide~="ccc"] #day #ccc-day, [data-hide~="trent"] #day #trent-day, [data-hide~="deeper"] #day #deeper, [data-hide~="story"] #day #story-day,
[data-hide~="saints"] #day #saints, [data-hide~="gueranger"] #day #gueranger, [data-hide~="goffine"] #day #goffine, [data-hide~="matins"] #day .matins { display: none !important; }
[data-hide~="t-save"] .entry-actions [data-star], [data-hide~="t-copy"] .entry-actions [data-copy], [data-hide~="t-cite"] .entry-actions [data-cite], [data-hide~="t-homily"] .entry-actions [data-homily] { display: none; }
[data-hide~="storybar"] .story-bar { display: none; }
[data-hide~="vn"] .verse .vn, [data-hide~="vn"] #day .scripture .vn { font-size: 0; margin: 0; }
[data-hide~="vn"] .verse .vn::after { content: ' '; font-size: 1rem; }
/* the mode page */
.mode-list { list-style: none; padding: 0; margin: 14px 0 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 0 36px; }
.mode-list li { border-top: 1px solid var(--line); padding: 12px 0 14px; }
.mode-list li.on { border-top: 3px solid var(--gold); }
.mode-pick { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.mode-name { font: 600 1.25rem var(--serif); color: var(--accent); }
.mode-list li.on .mode-name::after { content: ' ✓'; color: var(--gold); }
.mode-sub { font-family: var(--serif); font-style: italic; color: var(--ink-3); }
.mode-text { margin: 6px 0 8px; font-size: .92rem; color: var(--ink-2); }
.mode-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.mode-kinds button { border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: 4px 12px; font: inherit; font-size: .85rem; cursor: pointer; color: var(--ink-2); }
.mode-kinds button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.pref-list { display: grid; grid-template-columns: minmax(160px, 240px) minmax(0, 1fr); gap: 10px 24px; align-items: start; margin: 10px 0 16px; }
.pref-list dt { font-weight: 600; padding-top: 6px; }
.pref-list dd { margin: 0; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.pref-seg { flex-wrap: wrap; }
.pref-multi { display: flex; flex-wrap: wrap; gap: 6px 16px; padding-top: 6px; }
.pref-multi label { display: inline-flex; gap: 6px; align-items: center; font-size: .92rem; }
@media (max-width: 720px) { .pref-list { grid-template-columns: minmax(0, 1fr); gap: 4px; } .pref-list dt { padding-top: 10px; } }
.tour-modes { display: flex; flex-direction: column; gap: 4px; margin: 0 0 10px; }
.tour-modes button { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; text-align: left; background: none; border: 0; border-top: 1px solid var(--line); padding: 7px 2px; cursor: pointer; font: inherit; color: var(--ink); }
.tour-modes button b { font: 600 1rem var(--serif); color: var(--accent); }
.tour-modes button span { font-size: .8rem; color: var(--ink-3); }
.tour-modes button:hover b { text-decoration: underline; }

.other-form { font-size: .88rem; margin: 2px 0 6px; color: var(--ink-3); }
.lead-note { font-size: .82rem; color: var(--ink-3); margin: 6px 0 2px; }
.lead-note a { color: var(--ink-3); }

/* The Mysteries of the Rosary */
.ros-set { border-top: 1px solid var(--line); padding: 14px 0 6px; }
.ros-switch { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; margin: 4px 0 18px; }
.ros-switch > span:first-child { font: 600 .95rem var(--serif); }
.ros-switch .muted { flex-basis: 100%; }
.ros-optional { opacity: .72; }
.ros-set.today { border-top: 3px solid var(--gold); }
.ros-set-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ros-set-head h2 { font: 600 1.3rem var(--serif); margin: 0; }
.ros-set p { margin: 2px 0 8px; }
.ros-list { list-style: none; padding: 0; margin: 0 0 8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 2px 36px; }
.ros-list li { padding: 6px 0; border-bottom: 1px dotted var(--line-2); display: flex; flex-direction: column; gap: 1px; }
.ros-list a { text-decoration: none; display: flex; gap: 10px; align-items: baseline; }
.ros-n { font: 600 .85rem var(--serif); color: var(--gold); min-width: 1em; }
.ros-title { font: 600 1.06rem var(--serif); color: var(--accent); }
.ros-list a:hover .ros-title { text-decoration: underline; text-underline-offset: 3px; }
.ros-refs { font-size: .78rem; color: var(--ink-3); padding-left: calc(1em + 10px); }
.ros-learn { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 8px 36px; }
.ros-learn section { border-top: 2px solid var(--gold); padding-top: 8px; }
.ros-learn h3 { font: 600 1.05rem var(--serif); margin: 0 0 6px; }
.ros-learn dt { font-weight: 600; margin-top: 6px; } .ros-learn dd { margin: 0 0 4px; font-size: .92rem; color: var(--ink-2); }
.ros-learn p { font-size: .94rem; }
.ros-cols { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 36px; align-items: start; }
@media (max-width: 900px) { .ros-cols { grid-template-columns: minmax(0, 1fr); } }
.ros-text { margin: 10px 0 16px; border-left: 3px solid var(--gold); padding: 2px 0 2px 16px; }
.ros-text p { font-family: var(--serif); font-size: 1.08rem; line-height: 1.7; margin: 0 0 4px; }
.ros-text footer { font-size: .85rem; color: var(--ink-3); }
.ros-fore { list-style: none; padding: 0; margin: 4px 0 12px; } .ros-fore li { padding: 3px 0; font-family: var(--serif); }
.ros-fore a { text-decoration: none; }
.ros-contemplate { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 8px; max-width: 760px; }
.ros-ponder { font-family: var(--serif); font-style: italic; font-size: 1.12rem; color: var(--ink-2); }

/* backup and restore */
.backup { margin: 4px 0 24px; }
.backup > p { margin: 0 0 10px; }
.backup-btns { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
[data-restore-ask] { border-left: 3px solid var(--gold); padding: 6px 0 6px 14px; margin-top: 12px; }
[data-restore-ask] p { margin: 0 0 6px; }

/* words of Scripture in the original */
.kw { all: unset; cursor: pointer; text-decoration: underline dotted var(--gold); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.kw:hover, .kw:focus-visible { background: var(--select); border-radius: 2px; }
[data-hide~="kw"] .kw { text-decoration: none; cursor: inherit; pointer-events: none; }
.kw-sample { cursor: default; }
.kw-card { position: fixed; z-index: 60; width: min(420px, calc(100vw - 32px)); max-height: min(70vh, 560px); overflow: auto; background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); border-top: 3px solid var(--gold); box-shadow: var(--shadow-lg); padding: 14px 18px 12px; }
.kw-card.sheet { left: 0; right: 0; bottom: 0; top: auto; width: auto; max-height: 75vh; border-left: 0; border-right: 0; padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
.kw-head { display: flex; justify-content: space-between; align-items: center; }
.kw-lang { font: 600 .72rem var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.kw-x { border: 0; background: none; color: var(--ink-3); cursor: pointer; font-size: 1rem; padding: 4px; }
.kw-word { font: 500 2rem/1.2 "SBL Greek", "Gentium Plus", "Noto Serif", "Times New Roman", var(--serif); margin: 2px 0 0; }
.kw-word[dir="rtl"] { font-family: "SBL Hebrew", "Ezra SIL", "Noto Serif Hebrew", "Times New Roman", serif; text-align: left; }
.kw-tr { font: italic 1.05rem var(--serif); color: var(--ink-2); }
.kw-sense { font: 600 .98rem var(--serif); margin: 10px 0 4px; }
.kw-note { margin: 0 0 8px; font-family: var(--serif); line-height: 1.55; }
.kw-differ { border-left: 2px solid var(--gold); padding-left: 10px; font-size: .93rem; color: var(--ink-2); }
.kw-sub { font: 600 .78rem var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin: 14px 0 6px; border-top: 1px solid var(--line); padding-top: 10px; }
.kw-voice { margin: 0 0 12px; }
.kw-voice blockquote { margin: 0; font: .95rem/1.5 var(--serif); }
.kw-voice figcaption { font-size: .82rem; margin-top: 3px; }
.kw-voice figcaption a { text-decoration: none; }
.kw-more { margin: 4px 0 0; font-weight: 600; font-size: .9rem; }
.kw-page { max-width: 760px; }
.kw-page .kw-head .kw-x { display: none; }
.kw-page .kw-word { font-size: 2.8rem; }
.kw-refs { padding-left: 18px; }
.kw-refs li { margin: 4px 0; }
.kw-list { list-style: none; padding: 0; margin: 0 0 8px; columns: 2 340px; column-gap: 40px; }
.kw-list li { break-inside: avoid; padding: 8px 0 10px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 1px; }
.kw-list a { text-decoration: none; color: var(--ink); }
.kw-list-word { font: 500 1.35rem "Noto Serif", "Times New Roman", var(--serif); }
.kw-list-tr { font: italic 1rem var(--serif); color: var(--accent); }
.kw-list-sense { font-size: .9rem; color: var(--ink-2); }
@media print { .kw { text-decoration: none; } .kw-card { display: none; } }

/* The Didache: printed, a single column */
.didache { max-width: 46rem; }
.dd-contents { columns: 2 16rem; column-gap: 2rem; margin: 18px 0 8px; font-size: .92rem; }
.dd-contents a { display: block; padding: 3px 0; break-inside: avoid; text-decoration: none; color: var(--ink); }
.dd-contents a:hover { color: var(--accent); }
.dd-n { display: inline-block; min-width: 1.6em; color: var(--accent); font-variant-numeric: oldstyle-nums; }
.dd-ch { margin-top: 34px; scroll-margin-top: 80px; }
.dd-ch h2 { font-size: 1.25rem; font-weight: 500; margin: 0 0 8px; }
.dd-note { font-style: italic; color: var(--ink-3); margin: 0 0 10px; }
.dd-text { font-family: var(--serif); font-size: 1.0625rem; color: var(--ink); }
.dd-text p { margin: 0 0 .8em; line-height: 1.7; }
.dd-scr { font-size: .9rem; border-top: 1px solid var(--line); padding-top: 8px; }

/* commentary: a few chosen voices */
.chosen-note { color: var(--ink-3); font-style: italic; margin: 4px 0 14px; }
.see-all { margin: 22px 0 10px; }
.lib-more > summary { cursor: pointer; font-size: 1.05rem; margin: 26px 0 6px; color: var(--ink-2); }

/* ---- Quieter Today: totals hidden with chosen voices; on a phone, the readings before the Gospel and
   the "Go deeper" voices open on tap */
[data-hide~="counts"] .comm-btn .count, [data-hide~="counts"] .dp-count, [data-hide~="counts"] .n-all { display: none; }
.n-word { display: none; }
[data-hide~="counts"] .n-word { display: inline; }
.r-unfold, .dp-unfold { display: none; }
@media (max-width: 700px) {
  .reading.r-folded .scripture { max-height: 8.6em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
  .reading.r-folded .r-unfold { display: inline-block; margin-top: 4px; font-size: .95rem; }
  .deeper.dp-folded .dp-grid > :nth-child(n+2), .deeper.dp-folded .hint { display: none; }
  .deeper.dp-folded .dp-unfold { display: inline-block; margin: 12px 0 4px; }
}

/* ---- My Study: "What would you like to study?" and the study paths (printed look: rules, not boxes) */
.st-start { margin: 6px 0 28px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.st-continue { display: flex; flex-direction: column; gap: 4px; margin-bottom: 18px; }
.st-continue a { font-family: var(--serif); font-size: 1.05rem; text-decoration: none; color: var(--accent); border-left: 3px solid var(--gold); padding: 4px 0 4px 12px; }
.st-q { font-size: 1.6rem; margin-bottom: 4px; }
.st-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.st-ask { display: flex; gap: 8px; max-width: 560px; }
.st-ask input { flex: 1; min-width: 0; font: inherit; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--ink); }
.st-recs:empty { display: none; }
.st-recs { margin-top: 18px; }
.st-rec { margin: 0 0 18px; }
.st-rec h3 { font-size: 1.15rem; margin-bottom: 6px; }
.st-path { display: block; text-decoration: none; color: inherit; padding: 8px 0 10px; border-top: 1px solid var(--line); }
.st-paths .st-path:last-child { border-bottom: 1px solid var(--line); }
.st-path-title { display: block; font-family: var(--serif); font-size: 1.2rem; font-weight: 600; color: var(--accent); }
.st-path-blurb { display: block; color: var(--ink-2); }
.st-path-meta { display: block; font-size: .85rem; color: var(--ink-3); margin-top: 2px; }
.st-steps-preview { margin: 8px 0 12px; padding-left: 1.4em; font-family: var(--serif); }
.st-steps-preview li { margin: 2px 0; }
.st-list { list-style: none; padding: 0; margin: 0; }
.st-list li { padding: 5px 0; border-bottom: 1px solid var(--line); }
.st-empty { margin: -8px 0 24px; }
.st-mine.is-empty { display: none; }

.path-page { max-width: 760px; }
.path-blurb { font-family: var(--serif); font-size: 1.15rem; color: var(--ink-2); margin: 6px 0; }
.path-bar { height: 3px; background: var(--line); border-radius: 2px; margin: 14px 0 6px; overflow: hidden; }
.path-bar span { display: block; height: 100%; background: var(--gold); }
.path-steps { list-style: none; padding: 0; margin: 0; }
.path-step { border-bottom: 1px solid var(--line); }
.path-step summary { display: flex; align-items: baseline; gap: 12px; padding: 14px 0; cursor: pointer; list-style: none; }
.path-step summary::-webkit-details-marker { display: none; }
.ps-n { font-family: var(--serif); color: var(--gold); font-weight: 600; min-width: 1.2em; }
.ps-t { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; flex: 1; }
.ps-ref { font-size: .9rem; color: var(--ink-3); white-space: nowrap; }
.ps-done { color: var(--gold); font-weight: 700; }
.path-step.is-done .ps-t { color: var(--ink-2); }
.ps-note { margin: 0 0 12px 2.2em; color: var(--ink-2); font-style: italic; }
.ps-text { margin-left: 2.2em; }
.ps-go { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px 2.2em; }
.path-step details > p:last-child { margin-left: 2.2em; }
.path-others { margin-top: 24px; line-height: 1.9; }
@media (max-width: 600px) {
  .ps-note, .ps-text, .ps-go, .path-step details > p:last-child { margin-left: 0; }
  .path-step summary { flex-wrap: wrap; row-gap: 0; }
  .ps-ref { flex-basis: 100%; padding-left: calc(1.2em + 12px); }
}

/* ---- Journeys for a struggle */
.st-struggle { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.st-q2 { font-size: 1.25rem; margin-bottom: 2px; }
.jn-line { display: block; margin: 10px 0 4px; padding: 6px 0 6px 12px; border-left: 3px solid var(--gold); color: var(--ink-2); text-decoration: none; font-size: .95rem; }
.jn-line span { color: var(--accent); font-weight: 600; }
.jn-h { font-family: var(--sans); font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin: 20px 0 6px 2.2em; }
.jn-h .muted { text-transform: none; letter-spacing: 0; font-weight: 400; }
.jn-quote, .jn-im, .jn-im-title, .jn-body .d-cite, .jn-body > a.small, .jn-try, .jn-body .more-btn { margin-left: 2.2em; }
.jn-quote { font-family: var(--serif); }
.jn-im-title { font-family: var(--serif); font-weight: 600; margin-bottom: 4px; }
.jn-im { font-family: var(--serif); color: var(--ink-2); }
.jn-try { margin-top: 20px; padding: 10px 0 10px 14px; border-left: 3px solid var(--gold); font-family: var(--serif); font-size: 1.08rem; }
.jn-try-h { display: block; font-family: var(--sans); font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); margin-bottom: 2px; }
.jn-body .ps-go, .jn-body > p:last-child { margin-left: 2.2em; }
.jn-end { margin: 16px 0; font-family: var(--serif); font-size: 1.05rem; }
@media (max-width: 600px) {
  .jn-h, .jn-quote, .jn-im, .jn-im-title, .jn-body .d-cite, .jn-body > a.small, .jn-try, .jn-body .more-btn, .jn-body .ps-go, .jn-body > p:last-child { margin-left: 0; }
}

/* ---- Go deeper, printed: entries divided by rules, links not buttons, no boxes */
[data-ui="c"] .dp-grid { gap: 0; }
[data-ui="c"] .dp-card { background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 14px 0 12px; box-shadow: none; }
[data-ui="c"] .dp-grid > .dp-card:first-child { border-top: 0; padding-top: 4px; }
[data-ui="c"] .dp-link:hover { border-color: var(--line); }
[data-ui="c"] .dp-link:hover .dp-title { color: var(--accent); }
[data-ui="c"] .dp-card .btn { background: none; border: 0; padding: 0; min-height: 0; color: var(--accent); font-size: .92rem; font-weight: 500; box-shadow: none; }
[data-ui="c"] .dp-card .btn::after { content: ' ›'; }
[data-ui="c"] .dp-card .btn:hover { text-decoration: underline; }
[data-ui="c"] .dp-count { background: none; padding: 0; }

/* ---- audit fixes: print, overflow, contrast, keyboard, tap targets ---- */
/* print is black on white whatever the theme */
@media print {
  :root, :root[data-theme] {
    --bg: #fff; --surface: #fff; --surface-2: #fff; --ink: #000; --ink-2: #222; --ink-3: #555; --line: #ccc; --line-2: #bbb;
    --accent: #000; --accent-2: #000; --accent-soft: #eee; --lc-red: #8a1f1f; --gold: #8a6d1f;
    color-scheme: light;
  }
  [data-ui="c"] body > main, [data-ui="c"] .site-footer { margin: 0 !important; width: auto !important; max-width: none !important; }
  .datestrip, .prep-link, .day-links, .jn-line, .day-actions, .r-unfold, .dp-more, .st-start { display: none !important; }
  [data-ui="c"] .day-cols { display: block; }
  [data-ui="c"] .day-side { position: static; max-height: none; overflow: visible; border: 0; padding: 0; }
}
/* a closed panel is out of the keyboard's way too */
.panel:not(.open) { visibility: hidden; transition: transform .24s cubic-bezier(.2, .8, .2, 1), visibility 0s .24s; }
/* the date row may wrap where it holds more than arrows (Prepare for Sunday, Print a brief) */
@media (max-width: 720px) {
  :is([data-ui="b"], [data-ui="c"], [data-ui="d"]) .view .toolbar:has(.prep-date, [data-sunday]) { flex-wrap: wrap; }
  :is([data-ui="b"], [data-ui="c"], [data-ui="d"]) .view .toolbar:has([data-sunday]) .datenav { flex-wrap: wrap; }
  .prep-date { white-space: normal; }
  :is([data-ui="b"], [data-ui="c"], [data-ui="d"]) .view > .toolbar .btn.icon { width: 40px; height: 40px; }
  .hl-dot { width: 28px; height: 28px; }
  .act, .sc-ref, .prep-link { min-height: 40px; display: inline-flex; align-items: center; }
  input[type=checkbox] { width: 20px; height: 20px; }
}
/* the Writers badges wrap instead of running out of their column */
.w-badges { display: flex; flex-wrap: wrap; gap: 0 .6em; }
.w-badges .badge { white-space: normal; }
/* with commentary docked, the passage page takes one column */
@media (min-width: 1000px) {
  [data-ui="c"] body.panel-open .passage-layout { grid-template-columns: minmax(0, 1fr); }
  [data-ui="c"] body.panel-open .passage-layout .scripture-col { position: static; max-height: none; }
  /* the rail's labels may wrap at the largest text size rather than cross its edge */
  [data-ui="c"] .main-nav a { white-space: normal; overflow-wrap: anywhere; line-height: 1.25; }
}
/* the liturgical red, readable on dark */
:root[data-theme="dark"] { --lc-red: #e07a6e; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) { --lc-red: #e07a6e; } }
/* a focused link never hides under the header or the bottom tabs */
html { scroll-padding-top: 76px; }
@media (max-width: 720px) { html { scroll-padding-bottom: calc(72px + env(safe-area-inset-bottom)); } }
/* printed, not boxed: the homily, the saint, the brief's choices and the verses in the panel */
[data-ui="c"] .matins { background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 18px 0 4px; }
[data-ui="c"] .matins::before { content: ''; display: block; width: 36px; border-top: 2px solid var(--gold); margin: -19px 0 16px; }
[data-ui="c"] .saint { background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 16px 0 4px; }
[data-ui="c"] .b-group { background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 12px 0 6px; margin-bottom: 4px; }
[data-ui="c"] .panel-text { background: none; border: 0; border-left: 2px solid var(--line-2); border-radius: 0; padding: 2px 0 2px 14px; }

/* the three pages for preparing a Sunday, linked to one another */
.prep-nav { font-size: .85rem; color: var(--ink-3); margin-bottom: 12px; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: baseline; }
.prep-nav a { color: var(--ink-3); text-decoration: none; padding: 4px 0; }
.prep-nav a:hover { color: var(--accent); }
.prep-nav [aria-current] { color: var(--ink); font-weight: 600; }

/* Settings, in folded groups */
.pref-group { border-top: 1px solid var(--line); }
.pref-group:last-of-type { border-bottom: 1px solid var(--line); }
.pref-group > summary { cursor: pointer; list-style: none; padding: 12px 0; font: 600 1.05rem var(--serif); }
.pref-group > summary::-webkit-details-marker { display: none; }
.pref-group > summary::before { content: "▸ "; color: var(--ink-3); }
.pref-group[open] > summary::before { content: "▾ "; }
.pref-group .pref-list { margin-top: 0; }
.settings .row .toggle { display: flex; margin-top: 6px; }
/* on a phone the My Study tab is right below: the header star would repeat it */
@media (max-width: 720px) { .study-btn { display: none; } }
/* the 1962 page's jump links */
.day-jumps { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-top: 8px; font-size: .85rem; }
.day-jumps a { padding: 4px 0; text-decoration: none; }
.day-jumps a:hover { text-decoration: underline; }
.day-jumps:not(:has(a:not([hidden]))) { display: none; }
#gueranger, #goffine, #saints, .matins, .proper[data-gospel] { scroll-margin-top: 80px; }

/* index pages folded into their parts (Teachings) and ages (Writers) */
details.fold > summary { cursor: pointer; list-style: none; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary h2 { display: inline; }
details.fold > summary h2::after { content: " ▸"; color: var(--ink-3); font-size: .8em; }
details.fold[open] > summary h2::after { content: " ▾"; }
details.part-section.fold > summary .hint { margin: 4px 0 0; }
details.part-section.fold { border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.w-era-names { display: block; color: var(--ink-3); font-size: .88rem; margin-top: 2px; }
details.w-era.fold { margin: 18px 0; }
details.w-era.fold[open] .writer-grid { margin-top: 12px; }
@media (min-width: 861px) { .w-era > summary > h2::before { content: ''; position: absolute; left: -31px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 3px solid var(--gold); } }

/* ---- Round 3 polish: contrast, focus, steadiness, tap sizes, fewer boxes */
.search:focus-within { box-shadow: 0 0 0 2px var(--focus); }
.writer-search:focus-within, .toc-filter:focus { outline: 2px solid var(--focus); outline-offset: 1px; }
/* the footer stays below the fold while a page is drawn, instead of jumping down */
.view { min-height: calc(100vh - 58px); }
/* comfortable line lengths for prose on a wide screen */
.quote p, .gu-body p { max-width: 38em; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}
/* tap targets of at least 24px */
.crumbs a, .entry-meta a { display: inline-block; padding-block: 4px; }
.toc-list a, .st-qs a { display: inline-block; min-height: 24px; line-height: 24px; }
details > summary { min-height: 24px; }
/* verse numbers no smaller than 12px */
.scripture .vn, .verse .vn, .la-verse .vn, .parallel-passage .vn { font-size: max(.6em, 12px); }
[data-ui="d"] .scripture .vn, [data-ui="d"] .verse .vn, [data-hide~="vn"] .verse .vn, [data-hide~="vn"] #day .scripture .vn { font-size: 0; }
/* the last boxes: a gold rule at the side instead */
.gu-card { background: none; border: 0; border-left: 3px solid var(--gold); border-radius: 0; padding: 4px 0 4px 18px; }
.error { background: none; border: 0; padding: 0; font-family: var(--serif); font-size: 1.1rem; color: var(--ink-2); }
.dp-grid { gap: 0; }
.dp-card { background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 14px 0 12px; box-shadow: none; }
.dp-grid > .dp-card:first-child { border-top: 0; padding-top: 4px; }
/* filters and small actions read as words, the chosen one underlined */
.chips { flex-wrap: wrap; overflow: visible; row-gap: 2px; column-gap: 14px; }
.chip { border: 0; background: none; padding: 4px 0; border-radius: 0; color: var(--ink-2); }
.chip:hover:not(:disabled) { color: var(--accent); }
.chip[aria-pressed="true"] { background: none; color: var(--accent); text-decoration: underline 2px; text-underline-offset: 5px; }
.act { border: 0; background: none; padding: 4px 2px; border-radius: 0; color: var(--ink-2); }
.act:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.segmented { background: none; padding: 0; gap: 16px; border-radius: 0; }
.segmented button { padding: 6px 0; border-radius: 0; }
.segmented button[aria-pressed="true"] { background: none; color: var(--ink); box-shadow: inset 0 -2px var(--accent); }
.chip .n { display: inline-block; }

/* a pope's paragraph, summarised (the text itself is © Libreria Editrice Vaticana and is read on vatican.va) */
.sum { margin: 0; font-family: var(--sans); font-size: .9375rem; line-height: 1.6; color: var(--ink-2); font-style: normal; }
.sum-tag { font-family: var(--sans); font-size: .6875rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-right: .35em; font-style: normal; }
.sum-link { white-space: nowrap; }
.dp-quote.dp-sum { font-family: var(--sans); font-style: normal; font-size: .9375rem; }
.legal h2 { scroll-margin-top: 80px; }
.legal ul ul { margin-top: 6px; }
