:root {
  --bg: #f6f1e7; --panel: #fffdf8; --sunk: #eee7d8; --line: #e1d7c3; --line2: #d3c7ae;
  --ink: #22180f; --ink2: #5a4c3b; --ink3: #8a7b66;
  --accent: #8b1e2b; --accent-soft: #f4e3df; --accent-ink: #fff;
  --gold: #a87a22; --gold-bright: #e2b45a; --gold-soft: #f6ead0;
  --mark: #ffe29a; --mark-ink: #3a2a00;
  --hero1: #3d0b12; --hero2: #7c1f22; --hero-ink: #fbf3e4; --hero-dim: rgba(251,243,228,.72);
  --ot: #2f7a4e; --violet: #6a3d9a; --white: #b08a1e; --red: #b0281f;
  --shadow: 0 1px 2px rgba(60,40,10,.06), 0 10px 30px rgba(60,40,10,.07);
  --shadow-lg: 0 2px 6px rgba(60,20,10,.10), 0 24px 60px rgba(60,20,10,.18);
  --bar: 58px; --player: 72px; --side: 258px;
  --display: "Sitka Heading", "Sitka Subheading", "Palatino Linotype", Palatino, Georgia, serif;
  --serif: "Sitka Text", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
}
:root[data-theme="dark"], :root:not([data-theme="light"]) { color-scheme: dark; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) { color-scheme: light; }
}
:root[data-theme="dark"] {
  --bg: #131013; --panel: #1c181b; --sunk: #262125; --line: #342e32; --line2: #463e43;
  --ink: #f2ebdf; --ink2: #c7bba9; --ink3: #8f8475;
  --accent: #eba3a0; --accent-soft: #3b2225; --accent-ink: #1b1012;
  --gold: #e2b45a; --gold-bright: #ecc677; --gold-soft: #2f2618;
  --mark: #6a5312; --mark-ink: #ffeec2;
  --hero1: #240b10; --hero2: #4c1a1d;
  --ot: #6cc08f; --violet: #b597e0; --white: #e2c15e; --red: #ef8a80;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.35);
  --shadow-lg: 0 2px 6px rgba(0,0,0,.4), 0 24px 60px rgba(0,0,0,.55);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131013; --panel: #1c181b; --sunk: #262125; --line: #342e32; --line2: #463e43;
    --ink: #f2ebdf; --ink2: #c7bba9; --ink3: #8f8475;
    --accent: #eba3a0; --accent-soft: #3b2225; --accent-ink: #1b1012;
    --gold: #e2b45a; --gold-bright: #ecc677; --gold-soft: #2f2618;
    --mark: #6a5312; --mark-ink: #ffeec2;
    --hero1: #240b10; --hero2: #4c1a1d;
    --ot: #6cc08f; --violet: #b597e0; --white: #e2c15e; --red: #ef8a80;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.35);
    --shadow-lg: 0 2px 6px rgba(0,0,0,.4), 0 24px 60px rgba(0,0,0,.55);
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--serif);
  font-size: 16px; line-height: 1.55; overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
button, input, select, table { font: inherit; color: inherit; }
.sans, button, input, select, kbd, .ui { font-family: var(--sans); }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 2px;
}
mark { background: var(--mark); color: var(--mark-ink); border-radius: 2px; padding: 0 1px; }
kbd {
  font-family: var(--sans); font-size: 11px; border: 1px solid var(--line);
  border-bottom-width: 2px; border-radius: 4px; padding: 1px 5px;
  background: var(--sunk); color: var(--ink3);
}
code { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px;
  background: var(--sunk); border-radius: 4px; padding: 1px 5px; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 6px;
  border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: var(--ink3); background-clip: content-box; }

/* ---------- top bar ---------- */
#bar {
  position: fixed; inset: 0 0 auto 0; height: var(--bar); z-index: 40;
  display: flex; align-items: center; gap: 10px; padding: 0 14px;
  background: var(--panel); border-bottom: 1px solid var(--line);
}
#brand {
  display: flex; align-items: center; gap: 10px; background: none; border: 0;
  cursor: pointer; padding: 4px 8px 4px 4px; border-radius: 999px; text-align: left; flex: 0 0 auto;
}
#brand:hover { background: var(--sunk); }
/* A monogram, burgundy and gold in either theme. */
#brand .mark { width: 38px; height: 38px; flex: 0 0 38px; display: block;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.25)); }
.mark .mk-bg { fill: #7a1a26; }
.mark .mk-ring { fill: none; stroke: #e2b45a; stroke-width: 1; opacity: .85; }
.mark .mk-txt { fill: #f1cf86; font-family: var(--display); font-size: 15.5px; font-weight: 600;
  letter-spacing: -.4px; font-style: italic; }
/* The panel's own header only appears where the panel covers the page. */
#sidehead { display: none; }
#brand .name { font-family: var(--display); font-size: 18px; font-weight: 600; line-height: 1.1; letter-spacing: -.01em; }
#brand small { display: block; font-family: var(--sans); font-weight: 400; font-size: 11px; color: var(--ink3); margin-top: 2px; }

#nav { display: flex; gap: 2px; flex: 0 0 auto; }
#nav button {
  background: none; border: 0; border-radius: 999px; padding: 7px 12px; cursor: pointer;
  font-size: 13px; color: var(--ink2); display: inline-flex; align-items: center; gap: 6px;
}
#nav button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round; }
#nav button:hover { background: var(--sunk); color: var(--ink); }
#nav button.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
/* Phones: the sections live in a menu that slides out from the left. */
#menu, #nav .drawer-only, #scrim { display: none; }
#menu svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; }

.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px;
  background: none; border: 1px solid var(--line); border-radius: 999px; cursor: pointer;
  font-size: 12.5px; color: var(--ink2); flex: 0 0 auto;
}
.pill svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.pill:hover { border-color: var(--ink3); color: var(--ink); }
.pill.on { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
#filtn { background: var(--accent); color: var(--accent-ink); border-radius: 999px;
  font-size: 10.5px; font-weight: 700; min-width: 17px; height: 17px; padding: 0 5px;
  display: inline-grid; place-items: center; }
#filtn[hidden] { display: none; }

#searchwrap {
  flex: 1 1 380px; max-width: 640px; margin: 0 auto; position: relative;
  display: flex; align-items: center; gap: 7px; min-width: 0;
  background: var(--sunk); border: 1px solid var(--line); border-radius: 999px;
  padding: 0 12px; min-height: 38px; transition: border-color .15s, background .15s, box-shadow .15s;
}
#searchwrap:focus-within { border-color: var(--accent); background: var(--panel);
  box-shadow: 0 0 0 4px var(--accent-soft); }
.mag { width: 15px; height: 15px; flex: 0 0 15px; fill: none; stroke: var(--ink3); stroke-width: 1.7; }
#q { flex: 1 1 90px; min-width: 70px; background: none; border: 0; outline: none; font-size: 14px; padding: 7px 0; }
#q::-webkit-search-cancel-button { display: none; }
#qclear { background: none; border: 0; cursor: pointer; color: var(--ink3); font-size: 19px; line-height: 1; padding: 0 2px; }
#qhint { flex: 0 0 auto; }
#searchwrap:focus-within #qhint { visibility: hidden; }

#suggest {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 50;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-lg); padding: 5px; overflow: hidden;
}
.sg {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  background: none; border: 0; border-radius: 9px; padding: 7px 10px; cursor: pointer;
  font-family: var(--sans); font-size: 13.5px; color: var(--ink);
}
.sg:hover, .sg.on { background: var(--sunk); }
.sg .kind {
  flex: 0 0 auto; font-size: 10px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--accent); background: var(--accent-soft); border-radius: 5px; padding: 2px 6px;
}
.sg .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg .n { margin-left: auto; font-size: 11.5px; color: var(--ink3); font-variant-numeric: tabular-nums; }

.icon {
  background: var(--sunk); border: 1px solid var(--line); border-radius: 10px;
  width: 34px; height: 34px; cursor: pointer; color: var(--ink2); flex: 0 0 auto;
  display: inline-grid; place-items: center;
}
.icon:hover { border-color: var(--ink3); color: var(--ink); }
.icon.big { width: 44px; height: 44px; border-radius: 50%; font-size: 15px; background: var(--accent);
  color: var(--accent-ink); border-color: var(--accent); box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent); }
.icon.big:hover { filter: brightness(1.08); }

/* ---------- shell ---------- */
#shell { position: fixed; inset: var(--bar) 0 var(--player) 0; display: flex; }
body:has(#player[hidden]) #shell { bottom: 0; }
#sidebar {
  width: var(--side); flex: 0 0 var(--side); overflow-y: auto; display: none;
  border-right: 1px solid var(--line); padding: 18px 10px 40px; background: var(--panel);
}
body.side-open #sidebar { display: block; }
#main { flex: 1; overflow-y: auto; padding: 28px 36px 90px; scroll-behavior: auto; }
#main > :not(.detail) { max-width: 1100px; margin-left: auto; margin-right: auto; }

/* ---------- section headings ---------- */
.sec { margin: 54px 0 0; }
.sec:first-child { margin-top: 0; }
.eyebrow {
  font-family: var(--sans); font-size: 11px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gold); margin: 0 0 8px;
  display: flex; align-items: center; gap: 10px;
}
.eyebrow::after { content: ""; flex: 0 0 34px; height: 1px; background: currentColor; opacity: .5; }
.sechead { display: flex; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.sechead h2 {
  font-family: var(--display); font-weight: 600; font-size: clamp(26px, 3vw, 36px);
  line-height: 1.12; letter-spacing: -.015em; margin: 0; text-wrap: balance;
}
.sechead p { margin: 8px 0 0; color: var(--ink2); font-size: 16.5px; max-width: 62ch; }
.sechead .go { margin-left: auto; }
.go {
  background: none; border: 1px solid var(--line2); color: var(--ink); border-radius: 999px;
  padding: 8px 16px; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.go:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- home: the rotating quote ---------- */
#hero {
  position: relative; overflow: hidden; border-radius: 28px;
  margin-top: 2px; margin-bottom: 0; padding: 50px 56px 36px;
  display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 40px; align-items: center;
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(255,214,150,.20), transparent 55%),
    radial-gradient(60% 80% at 0% 100%, rgba(0,0,0,.25), transparent 60%),
    linear-gradient(135deg, var(--hero1), var(--hero2));
  color: var(--hero-ink); box-shadow: var(--shadow-lg);
}
#hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .07;
  background-image: radial-gradient(rgba(255,255,255,.9) 1px, transparent 1.2px);
  background-size: 22px 22px;
}
.qmark { position: absolute; top: -30px; left: 26px; font-size: 190px; line-height: 1;
  color: var(--gold-bright); opacity: .30; font-family: Georgia, serif; pointer-events: none; }
.qbody { position: relative; transition: opacity .4s ease, transform .4s ease; }
.qbody.out { opacity: 0; transform: translateY(8px); }
.qtopic {
  font-family: var(--sans); font-size: 11px; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--gold-bright); margin-bottom: 14px;
}
.qtext {
  margin: 0; min-height: 4.2em; display: flex; align-items: center;
  font-family: var(--display); font-size: clamp(24px, 2.7vw, 36px); line-height: 1.28;
  letter-spacing: -.015em; text-wrap: balance;
}
.qsrc { display: flex; align-items: center; gap: 12px; margin-top: 20px;
  font-family: var(--sans); font-size: 13px; color: var(--hero-dim); }
.qsrc b { display: block; color: var(--hero-ink); font-size: 14px; font-weight: 600; }
.qfoot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 26px; position: relative; }
.qfoot button { font-family: var(--sans); font-size: 13px; cursor: pointer; border-radius: 999px; }
.qplay { background: var(--gold-bright); color: #2b1606; border: 0; padding: 10px 18px; font-weight: 700;
  box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.qplay:hover { filter: brightness(1.07); }
.qopen { background: rgba(255,255,255,.06); color: var(--hero-ink); border: 1px solid rgba(255,255,255,.28); padding: 9px 16px; }
.qopen:hover { border-color: rgba(255,255,255,.6); }
.qnav { margin-left: auto; display: flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-size: 12px; color: var(--hero-dim); font-variant-numeric: tabular-nums; }
.qnav button { width: 34px; height: 34px; border-radius: 50%; padding: 0; font-size: 19px; line-height: 1;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); color: var(--hero-ink); }
.qnav button:hover { background: rgba(255,255,255,.18); }
.qbar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.1); }
/* Animated with transform, not width: transform runs on the compositor, so the
   bar stays smooth while the page is still building itself on first open. */
.qbar i { display: block; height: 100%; width: 100%; background: var(--gold-bright);
  transform: scaleX(0); transform-origin: left center; will-change: transform;
  animation: qfill 14s linear forwards; }
#hero:hover .qbar i { animation-play-state: paused; }
@keyframes qfill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.qface { position: relative; justify-self: center; text-align: center; }
.qface .arch {
  width: 190px; height: 240px; border-radius: 95px 95px 18px 18px; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,.25), 0 0 0 7px rgba(226,180,90,.18), 0 20px 50px rgba(0,0,0,.4);
  background: #e9dfcf;
}
.qface img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; display: block; }
.qface .cap { margin-top: 14px; font-family: var(--display); font-size: 17px; color: var(--hero-ink); }
.qface .cap small { display: block; font-family: var(--sans); font-size: 11.5px; color: var(--hero-dim); margin-top: 2px; }
@media (prefers-reduced-motion: reduce) { .qbody { transition: none; } }

.stats { display: flex; gap: 26px; flex-wrap: wrap; margin: 18px 4px 0;
  font-family: var(--sans); font-size: 12.5px; color: var(--ink3); }
.stats b { font-family: var(--display); font-size: 20px; color: var(--ink); font-weight: 600; margin-right: 5px; }

/* ---------- this Sunday ---------- */
/* This Sunday: the first thing on the home page, and the place to start. */
#sundaybox { margin: 0 0 34px; }
#sunday { position: relative; border-radius: 26px; padding: 30px 32px 30px 38px; margin: 0;
  background: linear-gradient(150deg, color-mix(in srgb, var(--season, var(--ot)) 16%, var(--panel)), var(--panel) 70%);
  border: 1px solid color-mix(in srgb, var(--season, var(--ot)) 45%, var(--line)); box-shadow: var(--shadow-lg); overflow: hidden; }
#sunday::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 8px; background: var(--season, var(--ot)); }
#sunday h2 { font-family: var(--display); font-size: clamp(40px, 6vw, 64px); margin: 0; line-height: 1.02;
  font-weight: 700; letter-spacing: -.02em; }
#sunday .day { font-family: var(--sans); font-size: clamp(16px, 1.8vw, 19px); font-weight: 600;
  color: var(--season, var(--ot)); margin: 10px 0 22px; }
#sunday .suncard { background: var(--panel); border: 1px solid var(--line); }
#sunday .suncard .t { font-size: 20px; }
#sunday .suncard .p { font-size: 14px; }
@media (max-width: 560px) {
  #sunday { padding: 24px 18px 22px 24px; border-radius: 20px; }
  #sundaybox { margin-bottom: 24px; }
}
.sungrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.suncard { text-align: left; background: var(--sunk); border: 1px solid transparent; border-radius: 16px;
  padding: 14px 16px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; }
.suncard:hover { border-color: var(--line2); background: var(--panel); box-shadow: var(--shadow); }
.suncard .t { font-family: var(--display); font-size: 17.5px; font-weight: 600; line-height: 1.25; }
.suncard .m { font-family: var(--sans); font-size: 12px; color: var(--ink3); }
.suncard .s { font-size: 14.5px; color: var(--ink2); display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden; }
.suncard .p { margin-top: auto; padding-top: 4px; font-family: var(--sans); font-size: 12.5px; font-weight: 600; color: var(--accent); }

#resume { margin: 34px 0 0; }
#resume h3, .lib {
  font-family: var(--sans); font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink3); margin: 0 0 10px; font-weight: 700;
}
.rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.rrow { position: relative; display: flex; flex-direction: column; gap: 4px; text-align: left;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 14px 16px; cursor: pointer; overflow: hidden; }
.rrow:hover { border-color: var(--accent); }
.rrow .t { font-family: var(--display); font-size: 16px; font-weight: 600; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rrow .w { font-family: var(--sans); font-size: 11.5px; color: var(--accent); font-weight: 600; }
.rrow .pct { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--sunk); }
.rrow .pct i { display: block; height: 100%; background: var(--accent); }

/* ---------- advice ---------- */
.tips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tip {
  position: relative; display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 4px 16px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 22px 24px 20px 18px;
  box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s, border-color .18s;
}
.tip:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--line2); }
.tip .num { font-family: var(--display); font-size: 44px; line-height: .95; color: var(--gold);
  font-weight: 600; text-align: right; font-variant-numeric: lining-nums; }
.tip h3 { font-family: var(--display); font-size: 21px; line-height: 1.2; margin: 2px 0 6px; font-weight: 600; letter-spacing: -.01em; }
.tip .gloss { margin: 0; color: var(--ink2); font-size: 15px; line-height: 1.5; }
.tip blockquote {
  margin: 14px 0 0; padding: 12px 14px 12px 16px; border-left: 3px solid var(--gold);
  background: var(--gold-soft); border-radius: 0 12px 12px 0; font-style: italic; font-size: 16px; line-height: 1.45;
}
.tip .foot { grid-column: 2; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px;
  font-family: var(--sans); font-size: 12px; color: var(--ink3); }
.tip .foot .count b { color: var(--ink); font-weight: 700; }
.tip .body { min-width: 0; }

.say {
  display: inline-flex; align-items: center; gap: 6px; background: var(--accent); color: var(--accent-ink);
  border: 0; border-radius: 999px; padding: 5px 12px 5px 9px; cursor: pointer; font-size: 12px; font-weight: 600;
}
.say::before { content: ""; width: 0; height: 0; border-left: 7px solid currentColor;
  border-top: 4.5px solid transparent; border-bottom: 4.5px solid transparent; margin-left: 2px; }
.say:hover { filter: brightness(1.1); }
.say.ghost { background: none; color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.say.ghost:hover { background: var(--accent-soft); }
.src { background: none; border: 0; padding: 0; cursor: pointer; font-family: var(--sans);
  font-size: 12px; color: var(--ink3); text-align: left; }
.src:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* the advice page */
.page { max-width: 900px; margin: 0 auto; }
.pagehead { text-align: center; padding: 18px 0 30px; }
.pagehead h1 { font-family: var(--display); font-weight: 600; font-size: clamp(32px, 4.4vw, 52px);
  line-height: 1.06; letter-spacing: -.02em; margin: 6px 0 14px; text-wrap: balance; }
.pagehead p { color: var(--ink2); font-size: 18px; max-width: 60ch; margin: 0 auto; }
.pagehead .eyebrow { justify-content: center; }
.pagehead .eyebrow::before { content: ""; flex: 0 0 34px; height: 1px; background: currentColor; opacity: .5; }
.toc { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 22px auto 10px; max-width: 820px; }
.toc button { background: var(--panel); border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 12px; font-size: 12.5px; cursor: pointer; color: var(--ink2); }
.toc button:hover { border-color: var(--accent); color: var(--accent); }
.longtip { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 0 26px;
  padding: 38px 0; border-top: 1px solid var(--line); scroll-margin-top: 10px; }
.longtip .num { font-family: var(--display); font-size: 72px; line-height: .9; color: var(--gold); text-align: right; font-weight: 600; }
.longtip h2 { font-family: var(--display); font-size: clamp(24px, 2.6vw, 32px); line-height: 1.15; margin: 4px 0 10px; font-weight: 600; letter-spacing: -.015em; }
.longtip .gloss { font-size: 18px; color: var(--ink2); margin: 0 0 8px; }
.longtip .count { font-family: var(--sans); font-size: 12.5px; color: var(--ink3); margin-bottom: 18px; }
.longtip .count b { color: var(--gold); }
.qlist { display: grid; gap: 12px; }
.qitem { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.qitem blockquote { margin: 0 0 10px; font-size: 18px; line-height: 1.5; font-style: italic; }
.qitem blockquote::before { content: "\201C"; color: var(--gold); font-size: 1.3em; margin-right: 2px; }
.qitem blockquote::after { content: "\201D"; color: var(--gold); font-size: 1.3em; margin-left: 1px; }
.qitem .row2 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ---------- insights ---------- */
.topics { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; }
.topics button { background: var(--panel); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 14px; font-size: 13px; cursor: pointer; color: var(--ink2); }
.topics button:hover { border-color: var(--ink3); color: var(--ink); }
.topics button.on { background: var(--ink); border-color: var(--ink); color: var(--bg); font-weight: 600; }
.topics button .n { opacity: .6; margin-left: 4px; font-size: 11.5px; }
.masonry { columns: 3 280px; column-gap: 16px; }
.icard {
  break-inside: avoid; margin: 0 0 16px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 18px; padding: 22px 22px 16px; position: relative; box-shadow: var(--shadow);
  animation: rise .45s ease both; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.icard:hover { transform: translateY(-2px); border-color: var(--line2); box-shadow: var(--shadow-lg); }
.icard:nth-child(3n+1) { background: linear-gradient(160deg, var(--gold-soft), var(--panel) 70%); }
.icard .mk { font-family: Georgia, serif; font-size: 54px; line-height: .6; color: var(--gold); opacity: .55; height: 22px; }
.icard blockquote { margin: 0; font-family: var(--display); font-size: 20px; line-height: 1.38; letter-spacing: -.005em; }
.icard .row2 { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding-top: 12px;
  border-top: 1px solid var(--line); }
.icard .row2 .src { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .icard { animation: none; } }

/* ---------- themes cloud ---------- */
.cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.cloud button { background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 8px 14px; cursor: pointer; font-family: var(--serif); color: var(--ink);
  display: inline-flex; align-items: baseline; gap: 7px; }
.cloud button:hover { border-color: var(--accent); color: var(--accent); }
.cloud button .n { font-family: var(--sans); font-size: 11px; color: var(--ink3); }
.cloud .w1 { font-size: 14px; } .cloud .w2 { font-size: 16px; } .cloud .w3 { font-size: 19px; } .cloud .w4 { font-size: 23px; }

/* ---------- facets ---------- */
#sidebar h3, .side h3 {
  font-family: var(--sans); font-size: 10.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink3); margin: 0 0 7px; font-weight: 700;
}
.fgroup { margin-bottom: 15px; }
.fgroup > h3 { display: flex; align-items: center; gap: 6px; cursor: pointer;
  user-select: none; padding: 2px 6px; border-radius: 6px; }
.fgroup > h3:hover { background: var(--sunk); color: var(--ink2); }
.fgroup > h3 .caret { margin-left: auto; font-size: 9px; opacity: .6; transition: transform .12s; }
.fgroup.shut > h3 .caret { transform: rotate(-90deg); }
.fgroup.shut .flist { display: none; }
.fitem {
  display: flex; align-items: center; gap: 7px; width: 100%; text-align: left;
  background: none; border: 0; border-radius: 7px; padding: 3px 7px; cursor: pointer;
  font-family: var(--sans); font-size: 12.5px; color: var(--ink2);
}
.fitem:hover { background: var(--sunk); color: var(--ink); }
.fitem.on { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.fitem.on.neg { background: var(--sunk); color: var(--ink3); text-decoration: line-through; }
.fitem .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fitem .n { margin-left: auto; font-size: 11px; opacity: .65; font-variant-numeric: tabular-nums; }
.fitem.on .n { font-size: 14px; opacity: .9; }
.fclear { display: block; width: 100%; margin: 0 0 14px; padding: 6px 8px;
  background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent);
  border-radius: 8px; cursor: pointer; font-family: var(--sans); font-size: 12.5px; font-weight: 600; }
.fclear:hover { background: var(--accent); color: var(--accent-ink); }
.fmore { background: none; border: 0; color: var(--accent); cursor: pointer;
  font-size: 12px; font-family: var(--sans); padding: 2px 7px; }

/* ---------- result list ---------- */
.headline {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  font-family: var(--sans); font-size: 12.5px; color: var(--ink3);
  margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.home .headline { margin-top: 54px; }
.headline b { color: var(--ink); font-weight: 600; }
.headline .lib { margin: 0 6px 0 0; color: var(--gold); font-size: 11px; }
.headline .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.headline select, .seg {
  background: var(--sunk); border: 1px solid var(--line); border-radius: 9px;
  padding: 5px 8px; font-size: 12px; font-family: var(--sans); color: var(--ink2);
}
.seg { display: inline-flex; padding: 2px; gap: 2px; }
.seg button { background: none; border: 0; border-radius: 7px; padding: 3px 10px;
  cursor: pointer; font-size: 12px; color: var(--ink3); }
.seg button.on { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.didyou { font-family: var(--sans); font-size: 13px; color: var(--ink2); margin-bottom: 12px; }
.didyou button { background: none; border: 0; color: var(--accent); cursor: pointer;
  font: inherit; text-decoration: underline; text-underline-offset: 3px; }

.rlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 470px), 1fr)); gap: 12px; }
.rlist.single { grid-template-columns: minmax(0, 1fr); }
.yr { grid-column: 1 / -1; font-family: var(--display); font-size: 22px; font-weight: 600;
  color: var(--ink); margin: 22px 0 0; display: flex; align-items: center; gap: 14px; }
.yr::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.yr:first-child { margin-top: 0; }

.row {
  display: flex; flex-direction: column; width: 100%; text-align: left; background: var(--panel);
  border: 1px solid var(--line); border-radius: 16px; padding: 16px 20px 16px 22px;
  cursor: pointer; position: relative; overflow: hidden;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.row::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--season, var(--line)); opacity: .9; }
.row:hover { border-color: var(--line2); box-shadow: var(--shadow); transform: translateY(-1px); }
.row.sel { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.row.playing { border-color: var(--accent); }
.row.playing .rlen { color: var(--accent); font-weight: 700; }
.rtop { display: flex; align-items: baseline; gap: 10px; }
.rtitle { font-family: var(--display); font-size: 19px; font-weight: 600; letter-spacing: -.01em; line-height: 1.22; flex: 1; }
.row:hover .rtitle { text-decoration: underline; text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.rlen { font-family: var(--sans); font-size: 11.5px; color: var(--ink3);
  font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.rmeta { font-family: var(--sans); font-size: 12px; color: var(--ink3);
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 4px; }
.rmeta .sep { opacity: .4; }
.tag { background: var(--sunk); border: 1px solid var(--line); border-radius: 999px;
  padding: 0 8px; font-size: 11px; }
.tag.talk { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.tag.hits { background: var(--accent-soft); color: var(--accent); border-color: transparent; font-weight: 600; }
.rsum { color: var(--ink2); margin: 8px 0 0; font-size: 15px; line-height: 1.5; }
.rsum.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.themes { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.theme { font-family: var(--sans); font-size: 11.5px; background: var(--sunk);
  border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; color: var(--ink2); cursor: pointer; }
.theme:hover { border-color: var(--accent); color: var(--ink); }
.hits { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; display: grid; gap: 7px; }
.hit { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; line-height: 1.5; }
.cue {
  flex: 0 0 auto; background: var(--sunk); border: 1px solid var(--line);
  border-radius: 999px; cursor: pointer; font-family: var(--sans); font-size: 11.5px;
  padding: 2px 9px 2px 7px; color: var(--ink2); font-variant-numeric: tabular-nums; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 5px; margin-top: 1px;
}
.cue[data-at]::before { content: ""; width: 0; height: 0; border-left: 6px solid var(--accent);
  border-top: 4px solid transparent; border-bottom: 4px solid transparent; }
.cue:hover, .cue.playing { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.cue:hover::before { border-left-color: var(--accent-ink); }
.more { font-family: var(--sans); font-size: 12px; color: var(--ink3); background: none;
  border: 0; cursor: pointer; padding: 2px 0; text-align: left; }
.more:hover { color: var(--accent); }
#showmore { grid-column: 1 / -1; justify-self: center; margin-top: 10px; border: 1px solid var(--line2);
  border-radius: 999px; padding: 8px 18px; font-size: 13px; color: var(--ink); }
.empty { text-align: center; color: var(--ink3); padding: 60px 20px; font-family: var(--sans); }
.empty b { display: block; font-size: 17px; color: var(--ink2); margin-bottom: 6px; }

/* ---------- detail ---------- */
.detail { max-width: 1180px; margin: 0 auto; }
.back { background: none; border: 0; color: var(--accent); cursor: pointer;
  font-family: var(--sans); font-size: 13px; padding: 0; margin-bottom: 18px; }
.dhead { position: relative; padding: 34px 36px 30px; border-radius: 24px; background: var(--panel);
  border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; }
.dhead::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--season, var(--ot)); }
.dhead .day { font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--season, var(--ot)); }
.detail h1 { margin: 8px 0 8px; font-family: var(--display); font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.1; letter-spacing: -.02em; font-weight: 600; text-wrap: balance; }
.detail .lede { color: var(--ink2); margin: 16px 0 0; font-size: 18px; line-height: 1.55; max-width: 72ch; }
.dhead .actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.playbtn {
  background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 999px;
  padding: 10px 20px 10px 16px; cursor: pointer; font-family: var(--sans); font-size: 13.5px;
  font-weight: 600; display: inline-flex; align-items: center; gap: 8px;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 30%, transparent);
}
.playbtn:hover { filter: brightness(1.08); }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 36px; margin-top: 28px; }
@media (max-width: 1060px) { .cols { grid-template-columns: minmax(0, 1fr); } }
.side section { margin-bottom: 24px; }
.side .card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.pull { margin: 0 0 12px; padding: 14px 16px; border-radius: 14px; background: var(--gold-soft);
  border-left: 3px solid var(--gold); }
.pull blockquote { margin: 0 0 8px; font-family: var(--display); font-size: 17px; line-height: 1.4; }
.rd { margin-bottom: 9px; }
.rd .role { font-family: var(--sans); font-size: 10.5px; text-transform: uppercase;
  letter-spacing: .07em; color: var(--ink3); }
.rd .cit { font-size: 16px; }
.rd button { background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline dotted; text-underline-offset: 3px; font: inherit; text-align: left; }
.rd button:hover { color: var(--accent); }
.note { font-family: var(--sans); font-size: 12px; color: var(--ink3); background: var(--sunk);
  border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 6px; padding: 7px 10px; }
.relrow { display: block; width: 100%; text-align: left; background: none; border: 0;
  border-radius: 10px; padding: 7px 9px; cursor: pointer; }
.relrow:hover { background: var(--sunk); }
.relrow .t { font-family: var(--display); font-size: 16px; line-height: 1.3; }
.relrow .w { font-family: var(--sans); font-size: 11.5px; color: var(--ink3); }
.relrow .w b { color: var(--accent); font-weight: 600; }

.txbar {
  /* Sticks against #main's content box, so it is pulled up over the top
     padding or transcript lines show through the gap above it. */
  position: sticky; top: -28px; z-index: 10; display: flex; align-items: center; gap: 8px;
  background: var(--bg); padding: 10px 0 10px; margin-bottom: 8px;
  border-bottom: 1px solid var(--line); font-family: var(--sans); font-size: 12.5px; color: var(--ink3);
}
.txbar h3 { margin: 0 8px 0 0; font-family: var(--sans); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink3); }
.txbar input { background: var(--sunk); border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 12px; font-size: 12.5px; outline: none; width: 190px; }
.txbar input:focus { border-color: var(--accent); }
.txbar .nav { margin-left: auto; display: flex; align-items: center; gap: 5px; }
.txbar .nav button { background: var(--sunk); border: 1px solid var(--line); border-radius: 8px;
  width: 28px; height: 26px; cursor: pointer; color: var(--ink2); }
.txbar .nav button:hover { border-color: var(--accent); color: var(--ink); }
.tx { font-size: 18.5px; line-height: 1.75; }
.para { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 14px; margin: 0 0 18px; }
.para .pt { font-family: var(--sans); font-size: 11.5px; color: var(--ink3); padding-top: 7px;
  text-align: right; font-variant-numeric: tabular-nums; cursor: pointer; }
.para .pt:hover { color: var(--accent); }
.para p { margin: 0; max-width: 68ch; }
.line { cursor: pointer; border-radius: 4px; padding: 1px 0; transition: background .15s;
  -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.line:hover { background: var(--sunk); }
.line.on { background: var(--mark); color: var(--mark-ink); }
.line.cur { background: color-mix(in srgb, var(--accent) 24%, transparent); box-shadow: 0 2px 0 var(--accent); color: var(--ink); }
.line.on.cur { background: var(--mark); color: var(--mark-ink); }
/* the insight that was opened */
.line.quoted { background: color-mix(in srgb, var(--gold) 26%, transparent);
  box-shadow: inset 3px 0 0 var(--gold); }
.dl { font-family: var(--sans); font-size: 12.5px; color: var(--accent); text-decoration: none; }

/* ---------- player ---------- */
#player {
  position: fixed; inset: auto 0 0 0; height: var(--player); z-index: 40;
  display: flex; align-items: center; gap: 12px; padding: 0 16px;
  background: var(--panel);
  border-top: 1px solid var(--line); box-shadow: 0 -8px 30px rgba(0,0,0,.08);
  animation: slideup .3s ease both;
}
@keyframes slideup { from { transform: translateY(100%); } to { transform: none; } }
#player[hidden] { display: none; }
/* The page is not drawn under the iPhone's status bar or home bar (no
   viewport-fit=cover), so the phone keeps both bars clear by itself: a top
   bar at top: 0 would otherwise sit hidden behind the clock and notch. */
#pface { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; flex: 0 0 46px;
  box-shadow: 0 0 0 1.5px var(--gold); background: var(--sunk); }
#nowwrap { flex: 1; min-width: 0; }
#nowtitle {
  background: none; border: 0; cursor: pointer; padding: 0; font-family: var(--display);
  font-size: 15.5px; font-weight: 600; display: block; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left;
}
#nowtitle:hover { color: var(--accent); }
#scrubwrap { display: flex; align-items: center; gap: 9px; margin-top: 2px; }
#elapsed, #remains { font-family: var(--sans); font-size: 11.5px; color: var(--ink3);
  font-variant-numeric: tabular-nums; flex: 0 0 44px; }
#remains { text-align: right; }
#scrubtrack { position: relative; flex: 1; min-width: 0; height: 16px; cursor: pointer;
  /* a finger drag seeks instead of scrolling the page */
  touch-action: none; }
@media (pointer: coarse) {
  /* a bigger target for a fingertip, drawn the same size */
  #scrubtrack::after { content: ""; position: absolute; inset: -12px 0; }
}
#scrubtrack::before { content: ""; position: absolute; inset: 6px 0; height: 4px;
  border-radius: 3px; background: var(--sunk); }
#scrubfill { position: absolute; left: 0; top: 6px; height: 4px; border-radius: 3px;
  background: linear-gradient(90deg, var(--gold), var(--accent)); width: 0; }
#scrubmarks { position: absolute; inset: 4px 0; pointer-events: none; }
#scrubmarks i { position: absolute; top: 0; width: 2px; height: 8px; border-radius: 1px;
  background: var(--gold-bright); }
#scrubknob { position: absolute; top: 2px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--panel); border: 2.5px solid var(--accent); margin-left: -6px; pointer-events: none; }
#speed { background: var(--sunk); border: 1px solid var(--line); border-radius: 8px;
  padding: 4px 6px; font-size: 12px; }
#followwrap { font-family: var(--sans); font-size: 12px; color: var(--ink3);
  display: flex; align-items: center; gap: 5px; }

@media (max-width: 1100px) {
  .tips { grid-template-columns: 1fr; }
  #hero { grid-template-columns: minmax(0, 1fr) 150px; padding: 40px 36px 30px; gap: 26px; }
  .qface .arch { width: 140px; height: 180px; border-radius: 70px 70px 14px 14px; }
}
@media (max-width: 900px) {
  :root { --side: 0px; }
  #sidebar { display: none; }
  #speedwrap, #followwrap, #brand .name small { display: none; }
  #menu { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
  #nav {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 60; width: min(300px, 84vw);
    flex-direction: column; gap: 4px; padding: 18px 12px;
    background: var(--panel); border-right: 1px solid var(--line); box-shadow: var(--shadow-lg);
    transform: translateX(-105%); transition: transform .22s ease; visibility: hidden;
    overflow-y: auto;
  }
  #nav::before { content: "Fr. Sebastian Homilies"; font-family: var(--display); font-size: 20px;
    font-weight: 600; padding: 4px 12px 14px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
  body.menu-open #nav { transform: none; visibility: visible; }
  #nav button { padding: 13px 14px; font-size: 17px; gap: 14px; border-radius: 12px; justify-content: flex-start; }
  #nav button svg { width: 20px; height: 20px; }
  #nav .drawer-only { display: inline-flex; margin-top: auto; color: var(--ink3); }
  body.menu-open #scrim { display: block; position: fixed; inset: 0; z-index: 55;
    background: rgba(0,0,0,.45); }
  body.menu-open { overflow: hidden; }
  body.menu-open #bar { z-index: 70; }  /* above the player while the menu is out */
  /* On a phone the page itself scrolls, between a pinned top bar and a pinned
     player. A fixed full-height frame that scrolls inside fights the phone
     browser's sliding toolbars: the top bar drifts and gaps open at the bottom. */
  html, body { height: auto; }
  body { overflow: visible; overflow-x: clip; }
  html { scroll-padding-top: calc(var(--bar) + 56px); scroll-padding-bottom: var(--player); }
  #shell, body:has(#player[hidden]) #shell { position: static; display: block; padding-top: var(--bar); }
  #main { overflow: visible; padding: 14px 16px calc(var(--player) + 40px); }
  /* Nothing may be wider than the screen: a page even a few pixels too wide
     slides sideways on a phone and drags the pinned bars with it. */
  html { overflow-x: clip; }
  #main { max-width: 100vw; }
  .txbar { top: var(--bar); }
  .txbar input { width: auto; flex: 1 1 0; min-width: 0; }
  .txbar .nav { flex: 0 0 auto; }
  #txcount { white-space: nowrap; }
  /* The filters cover the whole screen below the top bar, sized for fingers. */
  body.side-open #sidebar {
    display: block; position: fixed; inset: var(--bar) 0 0 0; z-index: 45;
    width: auto; border-right: 0; padding: 0 16px 40px;
    overflow-y: auto; overscroll-behavior: contain;
  }
  body.side-open { overflow: hidden; }
  #sidehead {
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 1; background: var(--panel);
    padding: 14px 0 12px; margin-bottom: 8px; border-bottom: 1px solid var(--line);
    font-family: var(--display); font-size: 20px; font-weight: 600;
  }
  #sidedone { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 999px;
    padding: 8px 18px; font-family: var(--sans); font-size: 15px; font-weight: 600; cursor: pointer; }
  #sidebar h3 { font-size: 12px; padding: 8px 4px; }
  .fgroup { margin-bottom: 18px; }
  .fitem { font-size: 16px; padding: 10px 8px; border-radius: 10px; }
  .fitem .n { font-size: 13px; }
  #hero { grid-template-columns: 1fr; padding: 30px 22px 24px; }
  .qface { display: none; }
  .qnav { margin-left: 0; }
  .longtip { grid-template-columns: 1fr; }
  .longtip .num { text-align: left; font-size: 48px; }
  .tip { grid-template-columns: 1fr; }
  .tip .num { text-align: left; font-size: 34px; }
  .tip .foot { grid-column: 1; }
  .dhead { padding: 24px 20px; }
  .para { grid-template-columns: 1fr; gap: 2px; }
  .para .pt { text-align: left; padding-top: 0; }
  #pface { display: none; }
}
@media (max-width: 560px) {
  #bar { gap: 6px; padding: 0 8px; }
  #brand { padding: 2px; }
  #brand .name, #qhint, #theme, #help { display: none; }
  #searchwrap { flex: 1 1 0; min-width: 0; padding: 0 9px; }
  /* 16px or more, or an iPhone zooms the whole page in when the box is tapped */
  #q, #txfind { min-width: 0; font-size: 16px; }
  #q::placeholder { text-overflow: ellipsis; }
  .pill { padding: 0 9px; }
  .pill .lbl2 { display: none; }
  .stats { gap: 6px 18px; }
  /* Player in two rows: buttons and title, then a full-width slider that a
     thumb can actually drag. */
  :root { --player: 108px; }
  #player { flex-wrap: wrap; align-content: center; gap: 6px 10px; padding: 0 14px; }
  #nowwrap { display: contents; }
  #nowtitle { flex: 1 1 0; min-width: 0; }
  #scrubwrap { order: 9; flex: 1 0 100%; margin-top: 0; }
  .txbar h3 { display: none; }
}

dialog#helpbox {
  border: 1px solid var(--line); border-radius: 18px; background: var(--panel);
  color: var(--ink); max-width: 620px; padding: 24px 28px; box-shadow: var(--shadow-lg);
}
dialog#helpbox::backdrop { background: rgba(0,0,0,.45); }
dialog h2 { font-size: 15px; font-family: var(--sans); margin: 0 0 10px; }
dialog .tips { display: table; border-collapse: collapse; font-size: 13.5px; margin-bottom: 10px; }
dialog .tips td { padding: 4px 10px 4px 0; vertical-align: top; }
dialog .tips td:last-child { color: var(--ink2); font-family: var(--serif); font-size: 15px; }
dialog .dim { font-family: var(--sans); font-size: 12.5px; color: var(--ink3); margin: 0 0 20px; }
dialog dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px;
  font-family: var(--sans); font-size: 13px; margin: 0 0 18px; }
dialog dt { white-space: nowrap; }
dialog dd { margin: 0; color: var(--ink2); }
dialog button { background: var(--accent); color: var(--accent-ink); border: 0;
  border-radius: 8px; padding: 7px 16px; cursor: pointer; font-size: 13px; }

/* ---------- scripture: every chapter he preached on ---------- */
.page.wide { max-width: 1100px; }

/* ---------- about ---------- */
.page.about { max-width: 760px; }
.acard { background: var(--panel); border: 1px solid var(--line); border-radius: 18px;
  padding: 24px 26px; margin: 0 0 18px; box-shadow: var(--shadow); }
.acard h2 { font-family: var(--display); font-size: 24px; font-weight: 600; margin: 0 0 10px; }
.acard p { color: var(--ink2); font-size: 17px; line-height: 1.6; margin: 0 0 12px; }
.acard a { color: var(--accent); }
.acard.give { border-color: color-mix(in srgb, var(--gold) 55%, var(--line));
  background: linear-gradient(160deg, var(--gold-soft), var(--panel) 75%); }
.acard .actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 6px; }
.acard .cta { display: inline-flex; align-items: center; padding: 11px 20px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); text-decoration: none; font-family: var(--sans);
  font-size: 15px; font-weight: 600; }
.acard .cta.ghost { background: none; color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.acard .facts { list-style: none; padding: 0; margin: 14px 0 0; font-family: var(--sans); font-size: 14.5px;
  color: var(--ink2); display: grid; gap: 8px; }
.acard .facts b { color: var(--ink); }
.booklist { list-style: none; padding: 0; margin: 4px 0 0; }
.book { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 13px 0; border-top: 1px solid var(--line); }
.book b { font-family: var(--display); font-size: 18px; display: block; }
.about .fine { text-align: center; font-family: var(--sans); font-size: 12.5px; color: var(--ink3); margin: 22px 0 0; }
.acard .actions { margin-top: 4px; }
.book .sub { display: block; color: var(--ink2); font-size: 14.5px; margin-top: 2px; }
.book .pub { display: block; font-family: var(--sans); font-size: 12px; color: var(--ink3); margin-top: 4px; }
.book a { flex: 0 0 auto; font-family: var(--sans); font-size: 14px; font-weight: 600; text-decoration: none; }
@media (max-width: 560px) {
  .acard { padding: 20px 18px; }
  .acard .cta { flex: 1 1 100%; justify-content: center; }
}
.legend { display: flex; justify-content: center; gap: 22px; margin-top: 18px;
  font-family: var(--sans); font-size: 12.5px; color: var(--ink3); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend .ch { width: 16px; height: 16px; min-width: 0; padding: 0; border-radius: 5px; }
.testament { margin-top: 30px; }
.books { display: grid; gap: 2px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 18px; padding: 8px 10px; box-shadow: var(--shadow); }
.bk { display: grid; grid-template-columns: 170px 1fr; gap: 14px; align-items: start;
  padding: 10px 8px; border-bottom: 1px solid var(--line); }
.bk:last-child { border-bottom: 0; }
.bkname { background: none; border: 0; padding: 4px 0; text-align: left; cursor: pointer;
  font-family: var(--display); font-size: 17px; font-weight: 600; color: var(--ink);
  display: flex; align-items: baseline; gap: 8px; }
.bkname .n { font-family: var(--sans); font-size: 11px; font-weight: 400; color: var(--ink3);
  font-variant-numeric: tabular-nums; }
.bkname:hover { color: var(--accent); }
.chs { display: flex; flex-wrap: wrap; gap: 5px; }
.ch { display: inline-block; min-width: 34px; height: 30px; padding: 0 7px; border-radius: 8px;
  font-family: var(--sans); font-size: 12.5px; font-variant-numeric: tabular-nums; cursor: pointer;
  border: 1px solid transparent; color: var(--ink);
  transition: transform .12s ease, box-shadow .12s ease; }
.ch.h1 { background: color-mix(in srgb, var(--accent) 14%, var(--panel)); }
.ch.h2 { background: color-mix(in srgb, var(--accent) 32%, var(--panel)); }
.ch.h3 { background: color-mix(in srgb, var(--accent) 58%, var(--panel)); color: var(--accent-ink); }
.ch.h4 { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.ch.q { background: var(--gold-soft); border-color: color-mix(in srgb, var(--gold) 70%, transparent);
  color: var(--ink); }
.ch:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(60,20,10,.18); }
@media (max-width: 640px) {
  .bk { grid-template-columns: 1fr; gap: 6px; }
}

/* ---------- scripture he quotes, on a homily page and in verse results ---------- */
.vref { font-family: var(--sans); font-size: 11.5px; font-weight: 600; color: var(--accent);
  letter-spacing: .02em; }
button.vref { background: none; border: 0; padding: 0; cursor: pointer; }
button.vref:hover { text-decoration: underline; }
.vq { margin: 0 0 10px; padding: 10px 12px 12px; border-left: 3px solid var(--gold);
  background: var(--sunk); border-radius: 0 10px 10px 0; }
.vqhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.vq blockquote { margin: 0; font-size: 14.5px; line-height: 1.45; color: var(--ink2); font-style: italic; }
