/* catechism.css — module styles. Every class starts with "ct-" (see ARCHITECTURE.md). Shared classes used: oi, cfn, mk, mark/hl-*/ul-*, ui-*. */

/* ---------------------------------------------------------------- library #/cat */
.ct-gowrap { max-width: var(--w-text); margin: 6px auto 0; }
.ct-grid { display: grid; gap: 14px; margin-top: 22px; }
@media (min-width: 820px) { .ct-grid { grid-template-columns: 1fr 1fr; } .ct-grid > .ct-wcard:first-child { grid-column: 1 / -1; } }
.ct-card { display: flex; flex-direction: column; position: relative; }
.ct-card::before { content: ""; position: absolute; inset: 5px; border: 1px solid color-mix(in srgb, var(--gilt) 26%, transparent); border-radius: calc(var(--r-3) - 4px); pointer-events: none; }
.ct-card-h { display: flex; gap: 16px; align-items: center; text-decoration: none; color: inherit; min-width: 0; }
.ct-card-h:hover h2 { color: var(--rubric); }
.ct-card-tt { min-width: 0; }
.ct-card h2 { font-family: var(--display); font-weight: 600; font-size: 26px; line-height: 1.12; margin: 2px 0; overflow-wrap: anywhere; }
.ct-card-sub { color: var(--ink-2); font-size: 16px; line-height: 1.35; }
.ct-card-sub.is-it { font-style: italic; }
.ct-card-ed { color: var(--ink-2); font-size: 15px; line-height: 1.4; margin-top: 10px; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ct-card-f { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 14px; position: relative; }
.ct-count { font-family: var(--sans); font-size: 12.5px; color: var(--muted); }
.ct-home { margin-top: 14px; }
.ct-foot { font-family: var(--sans); font-size: 12.5px; color: var(--muted); text-align: center; max-width: 36rem; margin: 22px auto 0; line-height: 1.5; }
.ct-results { max-width: var(--w-text); margin: 18px auto 0; }
.ct-all { font-family: var(--sans); font-size: 12px; letter-spacing: 0; text-transform: none; color: var(--link); text-decoration: none; font-weight: 600; }
.ct-hits { list-style: none; margin: 0 0 10px; padding: 0; }
.ct-hits li { border-top: 1px solid var(--border); }
.ct-hits li:first-child { border-top: 0; }
.ct-hits a { display: block; padding: 9px 2px; text-decoration: none; color: var(--ink); }
.ct-hits a:hover b { color: var(--rubric); }
.ct-hits b { display: block; font-size: 17px; }
.ct-hitx { display: block; color: var(--ink-2); font-size: 15.5px; line-height: 1.45; overflow-wrap: anywhere; }
.ct-hitx em { font-style: normal; background: var(--hl-yellow); border-radius: 2px; }

/* ---------------------------------------------------------------- contents #/cat/<w> */
.ct-ctop { text-align: center; }
.ct-ctop .ui-ptitle-wrap { text-align: center; }
.ct-cross { display: block; font-size: 30px; color: var(--rubric); margin: 6px auto 0; }
.ct-contents .ui-row { justify-content: center; }
.ct-contents .ui-goto { margin: 14px 0 6px; }
.ct-toc .ct-tr { display: flex; align-items: baseline; gap: 4px; border-top: 1px solid var(--border); padding: 7px 0; min-width: 0; }
.ct-toc > .ct-tn:first-child > .ct-tr { border-top: 0; }
.ct-tg { border: 0; background: none; width: 30px; height: 30px; flex: none; cursor: pointer; color: var(--gold); font-size: 21px; line-height: 1; transition: transform .15s; font-family: var(--sans); padding: 0; align-self: center; border-radius: 8px; }
.ct-tg:hover { background: var(--surface-2); }
.ct-tg[aria-expanded="true"] { transform: rotate(90deg); }
.ct-tg.is-leaf { cursor: default; }
.ct-tt { flex: 1; min-width: 0; text-decoration: none; color: var(--ink); font-size: 17.5px; line-height: 1.3; overflow-wrap: anywhere; }
.ct-tt:hover { color: var(--rubric); }
.ct-tt .cfn { display: none; }
.ct-toc .is-d0 > .ct-tr .ct-tt { font-family: var(--display); font-size: 23px; font-weight: 600; color: var(--rubric); }
.ct-toc .is-d1 > .ct-tr .ct-tt { font-size: 18.5px; font-weight: 600; }
.ct-toc .is-d3 > .ct-tr .ct-tt, .ct-toc .is-d4 > .ct-tr .ct-tt, .ct-toc .is-d5 > .ct-tr .ct-tt { font-size: 16px; color: var(--ink-2); }
.ct-tk { padding-left: 14px; border-left: 1px solid var(--border); margin-left: 14px; }
.ct-tk[hidden] { display: none; }
@media (max-width: 520px) { .ct-tk { padding-left: 8px; margin-left: 10px; } }
.ct-tid { font-family: var(--sans); font-size: 11.5px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- reader #/cat/<w>/<id> */
.ct-reader { max-width: calc(var(--measure) + 32px); margin: 0 auto; padding: 8px 16px 140px; min-width: 0; }
.ct-head { text-align: center; padding: 22px 0 10px; }
.ct-head .ct-cross { font-size: 26px; margin: 0 auto 6px; }
.ct-book { font-variant: small-caps; letter-spacing: .1em; color: var(--muted); font-size: 16px; line-height: 1.35; max-width: 30rem; margin: 0 auto; }
.ct-crumbs { font-variant: small-caps; letter-spacing: .05em; font-size: 15.5px; color: var(--muted); margin-top: 8px; line-height: 1.45; overflow-wrap: anywhere; }
.ct-crumbs a { color: var(--ink-2); text-decoration: none; }
.ct-crumbs a:hover { color: var(--rubric); }
.ct-crumbs .cfn { display: none; }
.ct-csep { color: var(--gold); margin: 0 .4em; }
.ct-more { display: flex; justify-content: center; margin: 14px 0; }
.ct-more:empty { display: none; }
.ct-more.is-top { margin-top: 4px; }

.ct-text { position: relative; }
.ct-unit { scroll-margin-top: calc(var(--nxh, 64px) + 12px); }
.ct-cu { position: relative; margin: 0 0 .75em; border-radius: 4px; }
.ct-text p { text-indent: 0; margin: 0 0 .45em; }
.ct-tx > :last-child { margin-bottom: 0; }
.ct-sp { font-size: .87em; line-height: 1.5; color: var(--ink-2); }
.ct-text p.ct-sp { margin-left: 1.1em; }
.ct-ul { margin: .2em 0 .5em; padding-left: 1.3em; }
.ct-ul li { margin: 0 0 .25em; }
.ct-ul li::marker { color: var(--rubric); }
.ct-n { font-family: var(--sans); font-size: .6em; font-weight: 700; color: var(--rubric); text-decoration: none; margin-right: .45em; vertical-align: .12em; cursor: pointer;
  user-select: none; -webkit-user-select: none; font-variant-numeric: lining-nums; letter-spacing: .01em; }
.ct-n:hover { text-decoration: underline; }
@media (min-width: 760px) { .ct-text .ct-n { position: absolute; left: -3.9em; width: 3.4em; text-align: right; margin: 0; vertical-align: 0; padding-top: .45em; } }
.ct-oip { display: flow-root; text-indent: 0; }
@media (max-width: 759px) { .ct-text p.ct-oip > .ct-n { display: block; margin: 0 0 .3em; vertical-align: 0; } }
.ct-text mark .oi .oi-l, .ct-text .oi mark { background: none; }
.ct-text mark:not([class*="hl-"]) { background: transparent; color: inherit; }
.ct-text .cfn { font-variant-numeric: lining-nums; }
.ct-q { font-weight: 600; }
.ct-ql, .ct-al { font-family: var(--sans); font-size: .64em; font-weight: 800; color: var(--rubric); letter-spacing: .04em; user-select: none; -webkit-user-select: none; }
.is-qa .ct-q .ct-n { margin-right: .3em; }
.ct-pr.ct-verse { text-align: left; }
.ct-refr { font-style: italic; color: var(--ink-2); }
.is-prayer { padding: .1em 0 .2em; }
.ct-meta { font-family: var(--sans); font-size: 12.5px; line-height: 1.5; color: var(--muted); margin-top: .35em; text-align: left; hyphens: none; overflow-wrap: anywhere; }
.ct-meta a { color: var(--link); text-decoration: none; }
.ct-meta a:hover { text-decoration: underline; }
.ct-qt { text-decoration: underline dotted; text-decoration-color: var(--gilt); text-underline-offset: 3px; }
.ct-meta a.ct-qt:hover { text-decoration: underline dotted; }
.ct-sl { font-style: italic; }
.ct-sep { color: var(--faint); }
.ct-cu.is-sel { background: color-mix(in srgb, var(--gold-2) 18%, transparent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--gold-2) 18%, transparent); }
.ct-tx { cursor: pointer; }
.ct-tx a { cursor: pointer; }

/* headings */
.ct-h { text-align: center; text-indent: 0; hyphens: none; line-height: 1.25; overflow-wrap: anywhere; }
.ct-hl { display: block; font-family: var(--serif); font-variant: small-caps; letter-spacing: .18em; color: var(--gold); font-size: .72em; margin-bottom: .25em; }
.ct-ht { display: block; }
.ct-h-k1 { margin: 1.6em 0 .6em; font-family: var(--display); font-weight: 600; font-size: 1.75em; color: var(--rubric); }
.ct-h-k1 .ct-hl { font-size: .5em; }
.ct-h-k1::after { content: "❦"; display: block; color: var(--gold); font-size: .55em; margin-top: .35em; }
.ct-h-k2 { margin: 1.4em 0 .5em; font-family: var(--display); font-weight: 600; font-size: 1.45em; color: var(--ink); }
.ct-h-k2 .ct-hl { font-size: .55em; }
.ct-h-k3 { margin: 1.5em 0 .5em; font-family: var(--display); font-weight: 600; font-size: 1.4em; color: var(--rubric); }
.ct-h-k3 .ct-hl { font-size: .56em; }
.ct-h-k3::after { content: "✠"; display: block; color: var(--gold); font-size: .42em; margin-top: .4em; letter-spacing: 0; }
.ct-h-k4 { margin: 1.3em 0 .45em; font-family: var(--display); font-weight: 600; font-size: 1.18em; color: var(--ink); }
.ct-h-k4 .ct-hl { font-size: .66em; color: var(--rubric); }
.ct-h-k5 { margin: 1.1em 0 .4em; font-size: .95em; font-weight: 600; color: var(--ink-2); }
.ct-h-k5 .ct-hl { font-size: .8em; }
.ct-h-rom { margin: 1.2em 0 .4em; font-variant: small-caps; letter-spacing: .06em; color: var(--rubric); font-size: .95em; font-weight: 500; }
.ct-h-k6 { text-align: left; margin: .9em 0 .25em; font-style: italic; color: var(--ink-2); font-size: .98em; }
.ct-h-brief { margin: 0 0 .5em; font-family: var(--sans); font-size: .62em; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.ct-h-epi { font-style: italic; color: var(--ink-2); font-size: .92em; max-width: 30em; margin: 1em auto .8em; line-height: 1.45; }
.ct-unit:first-child > .ct-hs > .ct-h:first-child { margin-top: .4em; }
.ct-brief { background: var(--surface); border: 1px solid var(--border-2); border-radius: 12px; padding: .9em 1em .4em; margin: 1.1em 0 1.2em;
  box-shadow: inset 0 0 0 4px var(--surface), inset 0 0 0 5px color-mix(in srgb, var(--gilt) 30%, transparent); }
.ct-brief .ct-cu { font-size: .94em; }
@media (min-width: 760px) { .ct-brief .ct-text .ct-n, .ct-brief .ct-n { left: -4.6em; } }
.is-balt .ct-unit + .ct-unit .ct-cu { border-top: 1px dotted color-mix(in srgb, var(--gilt) 30%, transparent); padding-top: .35em; }

.ct-endnav { display: flex; justify-content: space-between; gap: 12px; margin-top: 30px; padding-top: 16px; border-top: 1px solid var(--border); }
.ct-endnav a { text-decoration: none; color: var(--ink); max-width: 48%; min-width: 0; overflow-wrap: anywhere; }
.ct-endnav a:hover b { color: var(--rubric); }
.ct-endnav small { display: block; font-family: var(--sans); font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.ct-endnav b { display: block; font-size: 16.5px; font-weight: 600; line-height: 1.25; }
.ct-endnav .ct-next { text-align: right; margin-left: auto; }

/* ---------------------------------------------------------------- sheets: study, footnotes, lists */
.ct-study .ui-prose .ct-n { display: none; }
.ct-study .ui-prose p { margin: 0 0 .5em; }
.ct-study .ct-ql, .ct-study .ct-al { font-family: var(--sans); font-size: .7em; font-weight: 800; color: var(--rubric); }
.ct-study .ct-q { font-weight: 600; }
.ct-study .ct-sp { font-size: .92em; }
.ct-study .ct-ul { padding-left: 1.2em; margin: .2em 0 .5em; }
.ct-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 4px; }
.ct-tools-br { flex-basis: 100%; height: 0; }
.ct-rlist { list-style: none; margin: 0; padding: 0; }
.ct-rrow { display: flex; align-items: baseline; gap: 8px; border-top: 1px solid var(--border); padding: 7px 0; min-width: 0; }
.ct-rrow:first-child { border-top: 0; }
.ct-rmain { flex: 1; min-width: 0; text-decoration: none; color: var(--ink); line-height: 1.4; }
.ct-rmain b { font-size: 16px; margin-right: 6px; }
.ct-rmain:hover b { color: var(--rubric); }
.ct-pv { color: var(--ink-2); font-size: 15px; overflow-wrap: anywhere; }
.ct-racts { display: flex; gap: 10px; flex: none; font-family: var(--sans); font-size: 12.5px; font-weight: 650; }
.ct-racts a { color: var(--link); text-decoration: none; }
.ct-tag { font-family: var(--sans); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--gold); margin-right: 6px; }
.ct-fntext { font-size: 18px; line-height: 1.5; margin: 0 0 6px; }
.ct-fnote { display: flex; gap: 10px; font-size: 16px; line-height: 1.45; padding: 6px 0; border-top: 1px solid var(--border); overflow-wrap: anywhere; }
.ct-fnote:first-of-type { border-top: 0; }
.ct-fnote b { font-family: var(--sans); font-size: 12px; color: var(--rubric); min-width: 2.2em; padding-top: 3px; flex: none; }
.ct-fnote .cfn { display: none; }
.ct-note { background: var(--surface-2); border-radius: 10px; padding: 9px 12px; margin: 0 0 8px; font-size: 16px; line-height: 1.45; overflow-wrap: anywhere; }
.ct-nq { font-style: italic; color: var(--ink-2); margin-bottom: 4px; }
.ct-nt { white-space: pre-wrap; }
.ct-nref { font-weight: 600; color: var(--link); text-decoration: none; }
.ct-nm { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; font-family: var(--sans); font-size: 12.5px; color: var(--muted); }
.ct-lnk { border: 0; background: none; padding: 0; color: var(--link); font: inherit; font-weight: 650; cursor: pointer; }
.ct-vsec:empty { display: none; }
