/* soul: shared style for every page (soul and soul-it use the same file) */
:root {
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --serif: 'Newsreader', Georgia, serif;
  --page-bg: #f6ede2; --card-bg: #fffaf3; --text: #2a1a12; --muted: #7d6a5c; --line: #e8dccd;
  --chip-bg: #2a1a12; --chip-text: #f6ede2; --link: #a8441a; --mark: rgba(253,181,89,.55); --accent: #c4501a;
  --shadow: 0 20px 50px -20px rgba(60,30,10,.28), 0 6px 16px -8px rgba(60,30,10,.14);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --page-bg: #0f1626; --card-bg: #151d2e; --text: #eae3d3; --muted: #9a9384; --line: #263049;
  --chip-bg: #eae3d3; --chip-text: #0f1626; --link: #fdb559; --mark: rgba(253,181,89,.28); --accent: #fdb559;
  --shadow: 0 20px 50px -20px rgba(0,0,0,.6), 0 6px 16px -8px rgba(0,0,0,.4);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page-bg: #0f1626; --card-bg: #151d2e; --text: #eae3d3; --muted: #9a9384; --line: #263049;
    --chip-bg: #eae3d3; --chip-text: #0f1626; --link: #fdb559; --mark: rgba(253,181,89,.28); --accent: #fdb559;
    --shadow: 0 20px 50px -20px rgba(0,0,0,.6), 0 6px 16px -8px rgba(0,0,0,.4);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; }
body { font-family: var(--mono); color: var(--text); background: var(--page-bg); padding: 40px 16px 56px; -webkit-font-smoothing: antialiased; }
@media (max-width: 480px) { body { padding: 16px 10px 40px; } }

/* card */
.card { position: relative; max-width: 640px; margin: 0 auto; background: var(--card-bg); border-radius: 28px; box-shadow: var(--shadow); padding: 24px 28px 28px; }
@media (max-width: 480px) { .card { padding: 20px 18px 22px; border-radius: 22px; } }
.theme-toggle { position: absolute; top: 34px; right: 38px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--card-bg); color: var(--text); font-size: 15px; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
@media (max-width: 480px) { .theme-toggle { top: 28px; right: 26px; } }
.loading { color: var(--muted); font-size: 12px; padding: 40px 0; text-align: center; }

/* banner + palettes (pixel tiles from the landing page) */
.banner { height: 84px; border-radius: 18px; background-size: cover; background-position: center; image-rendering: pixelated; display: flex; align-items: flex-end; padding: 10px; box-shadow: 0 10px 20px -12px rgba(20,20,30,.45); }
.tag { font-size: 12px; padding: 5px 9px; background: var(--l-bg); color: var(--l-fg); }
.tag::before { content: "> "; opacity: .6; }
.p-gull  { background-image: url(assets/tile_gull.png);  --l-bg: #2a1a12; --l-fg: #fdb559; }
.p-tea   { background-image: url(assets/tile_tea.png);   --l-bg: #ece2da; --l-fg: #6a1a12; }
.p-night { background-image: url(assets/tile_night.png); --l-bg: #eae3d3; --l-fg: #0e111a; }
.p-rods  { background-image: url(assets/tile_rods.png);  --l-bg: #e6ecdc; --l-fg: #1c2e3a; }
.p-plum  { background-image: url(assets/tile_plum.png);  --l-bg: #eadff0; --l-fg: #24172c; }
.p-fog   { background-image: url(assets/tile_fog.png);   --l-bg: #1d2630; --l-fg: #dfe4ea; }
.p-dawn  { background-image: url(assets/tile_dawn.png);  --l-bg: #1d2228; --l-fg: #e8ecf0; }
.p-hero  { background-image: url(assets/hero.png);       --l-bg: #2a1a12; --l-fg: #fdb559; }

/* nav chips */
.nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
.chip, .chip:visited { font-size: 12px; padding: 5px 10px; background: var(--chip-bg); color: var(--chip-text); text-decoration: none; }
.chip::before { content: "> "; opacity: .6; }
.chip:hover { text-decoration: none; opacity: .88; }
.chip.ghost, .chip.ghost:visited { background: transparent; color: var(--muted); border: 1px solid var(--line); padding: 4px 9px; }
.chip.ghost::before { content: none; }

/* page heading */
.ref { font-size: 12px; color: var(--muted); margin: 26px 0 6px; }
.ref::before { content: "// "; }
h1.title { font-family: var(--serif); font-weight: 400; font-size: 34px; line-height: 1.1; margin: 0 0 22px; }
h3.gh { font-family: var(--serif); font-weight: 400; font-size: 22px; line-height: 1.25; margin: 26px 0 8px; }
h4.gs { font-family: var(--serif); font-weight: 400; font-size: 17px; line-height: 1.3; margin: 18px 0 4px; }
h4.gs::before { content: "⭢ "; color: var(--accent); font-size: 14px; font-family: var(--mono); }

/* symbols: ¶ has a reflection, ✎ written by me, ☆ favorite; label on hover and on tap */
.sym { position: relative; color: var(--accent); font-size: .9em; cursor: help; outline: none; font-family: var(--mono); }
.sym::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); white-space: nowrap; font: 11px var(--mono); color: var(--chip-text); background: var(--chip-bg); padding: 4px 8px; opacity: 0; pointer-events: none; transition: opacity .12s ease; z-index: 3; }
.sym:hover::after, .sym:focus::after, .sym.show::after { opacity: 1; }
h1 .sym { font-size: 18px; vertical-align: .35em; margin-left: 6px; }
.legend { font-size: 11px; color: var(--muted); margin: 6px 0 4px; }
.legend .sym { margin: 0 2px 0 10px; }
.legend .sym:first-child { margin-left: 0; }

/* text */
.text { font-size: 14px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: break-word; }
.num { font-size: 10px; color: var(--muted); vertical-align: .4em; margin-right: 2px; }
.muted { color: var(--muted); font-size: 12px; }
.alt { font-size: 12px; margin-top: 12px; }
.alt a, .alt a:visited { color: var(--muted); }
mark { background: linear-gradient(transparent 55%, var(--mark) 55%); color: inherit; padding: 0 1px; }
a, a:visited { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
.quote { border-left: 3px solid var(--accent); padding: 4px 0 4px 16px; margin: 4px 0 14px; font-size: 14px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: break-word; }
hr.div { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
.hg { display: block; }
.hg.b { padding-left: 4ch; text-indent: -2ch; }
.hg.c { padding-left: 4ch; }
.hg.s { padding-left: 5ch; text-indent: -2ch; }
.hg.n { padding-left: var(--w); text-indent: calc(-1 * var(--w)); }

/* gospel parallels and the verses of the daily prayers: collapsible */
details.parallel { margin-top: 24px; border: 1px solid var(--line); border-radius: 14px; padding: 0 16px; }
details.parallel summary { cursor: pointer; list-style: none; font-size: 12.5px; color: var(--muted); padding: 12px 0; }
details.parallel summary::-webkit-details-marker { display: none; }
details.parallel summary::before { content: "+ "; color: var(--accent); }
details.parallel[open] summary::before { content: "− "; }
details.parallel .pref { display: inline-block; font-size: 11.5px; color: var(--muted); border: 1px solid var(--line); padding: 2px 8px; margin: 6px 0; }
details.parallel .text { color: var(--muted); font-size: 13.5px; padding-bottom: 14px; }
details.parallel.more .text { color: inherit; font-size: inherit; }

/* reflection and footer lines */
.reflection { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); }
.label { font-size: 11px; color: var(--muted); margin-bottom: 10px; }
.label::before { content: "// "; }
.meta { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 12px; line-height: 1.8; color: var(--muted); }
.meta .group { margin-bottom: 14px; }
.meta .ghead { color: var(--text); }
.meta .row { display: block; }
.next { display: flex; justify-content: flex-end; margin-top: 26px; }
.next a, .next a:visited { font-size: 13px; padding: 8px 14px; background: var(--chip-bg); color: var(--chip-text); }
.next a::after { content: " ⭢"; opacity: .7; }
.next a:hover { text-decoration: none; opacity: .88; }
.footer { text-align: center; font-size: 11px; color: var(--muted); margin-top: 24px; line-height: 1.8; }
.footer a, .footer a:visited { color: var(--muted); text-decoration: underline; }

/* lists, filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 8px; }
select { font: 12.5px var(--mono); color: var(--text); background-color: var(--card-bg); border: 1px solid var(--line); padding: 6px 28px 6px 10px; border-radius: 0; -webkit-appearance: none; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%; background-size: 5px 5px; background-repeat: no-repeat; max-width: 100%; }
.toggle { font: 12px var(--mono); padding: 5px 10px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; }
.toggle.on { background: var(--chip-bg); color: var(--chip-text); border-color: var(--chip-bg); }
.note { font-size: 12px; color: var(--muted); line-height: 1.7; margin: 0 0 16px; }
.sec { margin-top: 28px; scroll-margin-top: 12px; }
.sec h2 { font-family: var(--serif); font-weight: 400; font-size: 24px; margin: 0 0 6px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.sec h2 .chip { font-size: 11px; font-family: var(--mono); }
.subh { font-size: 11px; color: var(--muted); margin: 12px 0 2px; scroll-margin-top: 12px; }
.subh::before { content: "// "; }
.lrow { display: flex; gap: 12px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; line-height: 1.45; }
.lrow .lref { color: var(--muted); font-size: 12px; min-width: 76px; }
.lrow .lref a, .lrow .lref a:visited { color: var(--muted); }
.lrow .ltitle { flex: 1; min-width: 0; }
.lrow .ltitle a, .lrow .ltitle a:visited { color: var(--text); }
.lrow .ldesc { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.lrow .ltopic, .lrow .ltopic:visited { font-size: 11px; color: var(--muted); border: 1px solid var(--line); padding: 1px 7px; white-space: nowrap; }
.top, .top:visited { display: inline-block; font-size: 11px; color: var(--muted); margin-top: 8px; }
.count { color: var(--muted); font-size: 11px; }
.empty { color: var(--muted); font-size: 12px; padding: 14px 0; }

/* index */
.avatar { width: 88px; height: 88px; border-radius: 50%; display: block; padding: 3px; background: #c4501a; image-rendering: pixelated; }
.name { font-family: var(--serif); font-weight: 400; font-size: 40px; line-height: 1; margin: 18px 0 12px; }
.bio { font-size: 13px; line-height: 1.7; margin: 0 0 18px; color: var(--muted); }
.socials { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.search { display: flex; flex-direction: column; gap: 8px; margin: 0 0 22px; }
.search input { font: 12.5px var(--mono); color: var(--text); background: transparent; border: 1px solid var(--line); border-radius: 0; padding: 9px 12px; width: 100%; outline: none; }
.search input:focus { border-color: var(--accent); }
.search input::placeholder { color: var(--muted); }
.results { font-size: 12px; }
.results .status { color: var(--muted); font-size: 11px; display: flex; gap: 10px; }
.results .status a { color: var(--muted); text-decoration: underline; }
.results .lrow { display: block; }
.results .snip { display: block; color: var(--muted); font-size: 11.5px; margin-top: 3px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 104px; gap: 12px; }
.tile { position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; border-radius: 20px; text-decoration: none; padding: 12px; overflow: hidden; background-size: cover; background-position: center; image-rendering: pixelated; box-shadow: 0 10px 20px -12px rgba(20,20,30,.45); transition: transform .18s ease; }
.tile:hover { transform: translateY(-3px) scale(1.02); text-decoration: none; }
.tile-hero { grid-column: span 2; grid-row: span 2; }
.tile .tag { line-height: 1.3; }
.tile .tag .count { color: inherit; opacity: .7; margin-left: 4px; }
.tile-hero .tag { font-family: var(--serif); font-size: 22px; padding: 6px 12px; }
.tile-hero .tag::before { content: none; }
.badge { position: absolute; top: 9px; right: 12px; font-size: 13px; color: var(--l-bg); text-shadow: 0 0 6px var(--l-fg); }
.tile-who { height: 72px; margin: 4px 0 14px; }
.glabel { font-size: 11px; color: var(--muted); margin: 26px 0 10px; }
.glabel::before { content: "// "; }
.main .glabel:first-child { margin-top: 0; }
.guides { border-top: 1px solid var(--line); }
.grow { display: flex; flex-direction: column; gap: 2px; padding: 11px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.grow:hover { text-decoration: none; }
.grow .gname { color: var(--text); font-size: 13.5px; }
.grow .gname::before { content: "⭢ "; color: var(--accent); }
.grow .gdesc { color: var(--muted); font-size: 11.5px; padding-left: 2ch; }
.other { font-size: 11.5px; color: var(--muted); line-height: 1.8; }
.other a, .other a:visited { color: var(--muted); text-decoration: underline; }
.card.home { max-width: 400px; padding: 32px 28px 24px; }
.card.home .theme-toggle { top: 20px; right: 20px; box-shadow: none; border: 1px solid var(--line); }

/* legacy pages (rosary, skeptical, standalone commonplace) */
.legacy pre { font: inherit; font-size: 14px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: break-word; margin: 0; }
.legacy .counter { color: var(--muted); font-size: 11px; }
.legacy details.set { border: 1px solid var(--line); border-radius: 14px; padding: 0 16px; margin: 10px 0; }
.legacy details.set summary { cursor: pointer; list-style: none; padding: 12px 0; font-family: var(--serif); font-size: 18px; }
.legacy details.set summary .counter { font-family: var(--mono); }
.legacy details.set summary::-webkit-details-marker { display: none; }
.legacy details.set summary::before { content: "+ "; color: var(--accent); font-family: var(--mono); font-size: 14px; }
.legacy details.set[open] summary::before { content: "− "; }
.legacy .today { color: var(--accent); }
.legacy .set .body { white-space: pre-wrap; font-size: 14px; line-height: 1.75; padding-bottom: 12px; }
.legacy .mys { margin: 8px 0 18px; }
.legacy .mys .title { display: block; font-family: var(--serif); font-size: 19px; }
.legacy .question { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); }
.legacy .question-title { font-family: var(--serif); font-size: 24px; line-height: 1.2; margin: 0 0 10px; white-space: normal; }
.legacy .q-grid { display: grid; gap: 14px; }
.legacy .explain { font-size: 14px; }
.legacy .verses { display: flex; flex-direction: column; gap: 8px; }
.legacy .verse-item { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 12.5px; }
.legacy .verse-item a, .legacy .verse-item a:visited { color: var(--text); }
.legacy .verse-quote { display: block; color: var(--muted); margin-top: 4px; font-size: 12px; }

/* wider screens */
@media (min-width: 760px) {
  .card.home { max-width: 720px; display: grid; grid-template-columns: 220px 1fr; column-gap: 32px; padding: 36px; }
  .card.home .intro { position: sticky; top: 24px; align-self: start; }
  .card.home .footer { grid-column: 1 / -1; }
  .card.home .theme-toggle { top: 24px; right: 24px; }
}
@media (min-width: 900px) {
  .card { max-width: 760px; padding: 32px 44px 40px; }
  .card.list { max-width: 900px; }
  .banner { height: 110px; }
  h1.title { font-size: 42px; }
  .text { font-size: 15px; }
  .legacy .q-grid { grid-template-columns: 1.3fr 1fr; gap: 28px; }
}
@media (min-width: 1100px) {
  .card.home { max-width: 1040px; grid-template-columns: 260px 1fr; }
  .card.home .grid { grid-template-columns: repeat(3, 1fr); }
  .card.home .guides { columns: 2; column-gap: 28px; }
  .card.home .grow { break-inside: avoid; }
}
