/* Cardinal pages: a printed book page on top of card.css. Scarlet is the one accent,
   used only here and sparingly (the rule, the elector line). */
.cardinal-page { --scarlet: #9e1b32; --rule-ink: var(--scarlet); }
.cardinal-page.memorial { --rule-ink: var(--ink); }

.cardinal { padding-top: 2rem; }
.portrait { margin: 0; display: flex; justify-content: center; }
.arch { width: min(68%, 17rem); aspect-ratio: 4 / 5; border-radius: 50% 50% 0.4rem 0.4rem / 40% 40% 0.4rem 0.4rem; overflow: hidden;
  background: var(--pencil-soft); outline: 1.5px solid var(--gold); outline-offset: 6px; }
.arch img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.arch.empty { display: grid; place-items: center; font: 400 3rem/1 var(--display); color: var(--gold); }
.memorial .arch img { filter: grayscale(1) contrast(1.02); }
.memorial .arch { outline-color: var(--ink); }

.cardinal .body { padding: 1.75rem 1.5rem 1.75rem; text-align: center; }
.cardinal h1 { font-weight: 500; font-size: clamp(1.9rem, 7vw, 2.5rem); }
.draft { margin: 0 0 0.9rem; display: inline-block; padding: 0.2rem 0.65rem; border-radius: 99px; background: var(--pencil-soft); color: var(--gold); font-size: 0.72rem; font-weight: 600; }
.role { margin: 0.55rem 0 0; font: 500 0.95rem/1.35 var(--display); font-variant: all-small-caps; letter-spacing: 0.08em; color: var(--muted); text-wrap: balance; }
.rip { margin: 0.9rem 0 0; font: italic 400 1.05rem/1.3 var(--display); }
.rip span { display: block; margin-top: 0.15rem; font: 500 0.8rem/1 var(--text); letter-spacing: 0.12em; color: var(--muted); font-style: normal; }

/* Thin scarlet-and-gold rule: gold hairlines either side of a short scarlet bar. */
hr.rule { border: 0; height: 3px; width: 9rem; margin: 1.4rem auto 1.5rem;
  background: linear-gradient(90deg, transparent, var(--gold) 15% 38%, var(--rule-ink) 38% 62%, var(--gold) 62% 85%, transparent); }
.memorial hr.rule { height: 1px; background: var(--ink); width: 7rem; }

/* The essentials as a two-column ledger. */
.ledger { margin: 0; text-align: left; border-top: 1px solid var(--rule); }
.ledger > div { display: grid; grid-template-columns: 9.5rem 1fr; gap: 1rem; padding: 0.6rem 0; border-bottom: 1px solid var(--rule); }
.ledger dt { font: 500 0.78rem/1.5 var(--text); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.ledger dd { margin: 0; font: 400 1rem/1.45 var(--display); }
.ledger .elector dt { color: var(--scarlet); }
.memorial .ledger .elector dt { color: var(--muted); }
@media (max-width: 30rem) {
  .ledger > div { grid-template-columns: 1fr; gap: 0.05rem; }
}

.bio { margin-top: 1.6rem; text-align: left; font: 400 1.06rem/1.62 var(--display); hyphens: auto; }
.bio p { margin: 0 0 0.9rem; }
.bio p:first-child::first-line { font-size: 1.12em; font-weight: 500; }

details.offices { margin-top: 0.4rem; text-align: left; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
details.offices summary { cursor: pointer; padding: 0.65rem 0; font: 500 1rem/1.3 var(--display); list-style: none; display: flex; justify-content: space-between; }
details.offices summary::-webkit-details-marker { display: none; }
details.offices summary span { font: 500 0.78rem/1.6 var(--text); color: var(--muted); }
details.offices ul { margin: 0 0 0.8rem; padding-left: 1.1rem; font-size: 0.88rem; color: var(--ink); }
details.offices li { margin: 0.2rem 0; }

.xfeed { margin-top: 1.5rem; text-align: left; }
.xfeed h2 { margin: 0 0 0.6rem; font: 500 1.1rem/1.2 var(--display); }
.xload { font: 500 0.9rem/1 var(--text); padding: 0.65rem 1rem; border-radius: 0.6rem; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); cursor: pointer; }
.fine { margin: 0.5rem 0 0; font-size: 0.75rem; color: var(--muted); }

a.diocese { display: block; margin-top: 1.5rem; padding: 0.85rem 1rem; border: 1px solid var(--rule); border-radius: 0.7rem; text-align: left; text-decoration: none; color: var(--ink); font: 500 1rem/1.3 var(--display); }
a.diocese span { color: var(--gold); float: right; }

footer.sources { margin-top: 1.8rem; text-align: left; font-size: 0.72rem; color: var(--muted); }
footer.sources p { margin: 0 0 0.3rem; }
footer.sources ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.15rem 0.8rem; }
footer.sources a { color: inherit; }

/* Religious-order initials after the name ("O.F.M. Cap."), set small so the name leads. */
.cardinal h1 .post { display: block; margin-top: 0.3rem; font: 500 0.95rem/1.2 var(--text); letter-spacing: 0.06em; color: var(--muted); }

/* The index at /cardinals: a roster in the same book-page style. */
.college { max-width: 40rem; margin: 0 auto; padding: 1.5rem 1rem 3rem; text-align: center; }
.college h1 { font: 500 clamp(2rem, 8vw, 2.6rem)/1.1 var(--display); margin: 0.2rem 0 0; }
.college .count { margin: 0.5rem 0 0; font: 500 0.95rem/1.35 var(--display); font-variant: all-small-caps; letter-spacing: 0.08em; color: var(--muted); }
.filters { display: grid; grid-template-columns: 1fr; gap: 0.6rem; margin: 0 0 1rem; text-align: left; }
.filters input, .filters select { font: 400 1rem/1.2 var(--text); padding: 0.6rem 0.75rem; border: 1px solid var(--rule); border-radius: 0.6rem; background: var(--paper); color: var(--ink); min-width: 0; }
.chips { display: flex; gap: 0.35rem; }
.chips button { flex: 1; white-space: nowrap; padding-left: 0.4rem; padding-right: 0.4rem; }
.chips button { font: 500 0.85rem/1 var(--text); padding: 0.55rem 0.8rem; border-radius: 99px; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); cursor: pointer; }
.chips button[aria-pressed="true"] { border-color: var(--scarlet); color: var(--scarlet); background: var(--card); }
ol.roster { list-style: none; margin: 0; padding: 0; text-align: left; border-top: 1px solid var(--rule); }
ol.roster li a { display: flex; align-items: center; gap: 0.85rem; padding: 0.6rem 0.2rem; border-bottom: 1px solid var(--rule); color: var(--ink); text-decoration: none; }
ol.roster li a:hover .nm { color: var(--scarlet); }
.thumb { flex: none; width: 3rem; height: 3.75rem; border-radius: 50% 50% 0.25rem 0.25rem / 40% 40% 0.25rem 0.25rem; overflow: hidden; background: var(--pencil-soft); outline: 1px solid var(--gold); outline-offset: 2px; }
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.thumb.empty { display: grid; place-items: center; color: var(--gold); font: 400 1.2rem/1 var(--display); }
.who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.who .nm { font: 500 1.05rem/1.25 var(--display); }
.who .meta { font: 400 0.82rem/1.35 var(--text); color: var(--muted); }
.tag { flex: none; font: 600 0.68rem/1 var(--text); letter-spacing: 0.06em; text-transform: uppercase; color: var(--scarlet); border: 1px solid currentColor; border-radius: 99px; padding: 0.25rem 0.5rem; }
.college .none { margin: 1.5rem 0; color: var(--muted); }
.college footer.sources { margin-top: 1.5rem; }
