/* Saints Encyclopedia: light "illuminated manuscript" theme.
   Ivory and parchment grounds, navy headings, crimson links, gold ornament. */
:root {
  color-scheme: light;
  --bg: #fbf8f1;
  --surface: #ffffff;
  --parchment: #f6f0e3;
  --ink: #24211c;
  --muted: #6d6456;
  --navy: #1e2d48;
  --navy-deep: #16223a;
  --crimson: #7d2621;
  --gold: #a88434;
  --gold-bright: #c9a54f;
  --gold-soft: #e8dcbc;
  --line: #e7dfcd;
  --measure: 42rem;
  --display: "Cormorant Garamond", Garamond, "Times New Roman", serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 1.0625rem/1.75 var(--serif);
  font-optical-sizing: auto;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--crimson); text-decoration-color: var(--gold-soft); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--navy); text-decoration-color: var(--gold); }
.wrap { max-width: 66rem; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; border: 1px solid var(--gold); }

/* ---------- Header ---------- */
.site-header {
  position: relative;
  z-index: 2;
  background: var(--surface);
  border-bottom: 1px solid var(--gold-soft);
  box-shadow: 0 3px 0 -2px var(--gold-soft), 0 4px 0 -2px var(--surface), 0 5px 0 -2px var(--gold);
}
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 28px; padding-top: 16px; padding-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand-name { font-family: var(--display); font-size: 1.65rem; font-weight: 600; letter-spacing: .02em; line-height: 1; }
.brand-name span { color: var(--gold); font-style: italic; font-weight: 500; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 4px 22px; font-family: var(--sans); font-size: .82rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.site-header nav a { color: var(--navy); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.site-header nav a:hover { color: var(--crimson); border-bottom-color: var(--gold-bright); }
@media (max-width: 480px) {
  .site-header nav { gap: 2px 16px; font-size: .74rem; letter-spacing: .1em; }
  .brand-name { font-size: 1.45rem; }
}

/* ---------- Type ---------- */
main { padding-top: 28px; padding-bottom: 56px; }
h1, h2, h3 { font-family: var(--display); color: var(--navy); font-weight: 600; letter-spacing: .005em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); line-height: 1.1; margin: .25em 0 .3em; }
h2 { font-size: clamp(1.6rem, 3vw, 2rem); line-height: 1.2; margin: 2.2em 0 .6em; padding-bottom: .3em; border-bottom: 1px solid var(--gold-soft); max-width: var(--measure); }
h2::before { content: ""; display: inline-block; width: .55em; height: .55em; margin: 0 .45em .12em 0; background: var(--gold); transform: rotate(45deg); vertical-align: middle; }
h3 { font-size: 1.4rem; margin: 1.7em 0 .3em; color: var(--crimson); }
p, ul, ol, dl, blockquote { max-width: var(--measure); }
.crumbs { font-family: var(--sans); font-size: .8rem; letter-spacing: .04em; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--crimson); }
.byline { font-family: var(--sans); font-size: .88rem; color: var(--muted); margin-top: 0; }
.byline a { font-weight: 600; }

/* ---------- Saint entry ---------- */
.saint-head { border-bottom: 1px solid var(--gold-soft); padding-bottom: 6px; max-width: none; }
.saint-top { display: grid; gap: 24px; margin: 26px 0; }
@media (min-width: 720px) { .saint-top { grid-template-columns: 270px 1fr; align-items: start; } }
.portrait { margin: 0; }
.portrait img {
  width: 100%;
  padding: 6px;
  background: linear-gradient(135deg, #d9bd74, #a88434 45%, #e6cf8f 70%, #a88434);
  border-radius: 4px;
  box-shadow: 0 6px 18px rgba(30, 45, 72, .14);
}
.portrait figcaption { font-family: var(--sans); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 8px; text-align: center; }
.facts {
  background: var(--parchment);
  border: 1px solid var(--gold);
  outline: 1px solid var(--gold-soft);
  outline-offset: -6px;
  border-radius: 3px;
  padding: 18px 22px;
  font-family: var(--sans);
  font-size: .95rem;
}
.facts h2 { font-family: var(--sans); font-size: .78rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); border: 0; margin: 0 0 12px; padding: 0; }
.facts h2::before { display: none; }
.facts dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; }
.facts dt { font-weight: 700; color: var(--navy); }
.facts dd { margin: 0; }
.facts .note { color: var(--muted); font-size: .85em; }

.answer {
  position: relative;
  font-size: 1.15rem;
  line-height: 1.7;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  padding: 34px 24px 18px;
  border-radius: 0 4px 4px 0;
  box-shadow: 0 2px 10px rgba(30, 45, 72, .05);
}
.answer::before { content: "In brief"; position: absolute; top: 12px; left: 24px; font-family: var(--sans); font-size: .72rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }

.toc { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 14px 22px; max-width: var(--measure); font-family: var(--sans); font-size: .95rem; }
.toc h2 { font-family: var(--sans); font-size: .78rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); border: 0; margin: 4px 0 8px; padding: 0; }
.toc h2::before { display: none; }
.toc ol { margin: 0 0 4px; padding-left: 1.4em; columns: 2 16rem; column-gap: 2rem; }
.toc li { margin: 3px 0; break-inside: avoid; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* Drop cap on the first paragraph of an entry */
.body > p:first-of-type::first-letter {
  float: left;
  font-family: var(--display);
  font-size: 4.1em;
  line-height: .82;
  font-weight: 600;
  color: var(--crimson);
  margin: .06em .1em 0 0;
  padding: 2px 6px 0 0;
}

.scene { margin: 1.8em 0; max-width: var(--measure); }
.scene img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  padding: 5px;
  background: linear-gradient(135deg, #d9bd74, #a88434 45%, #e6cf8f 70%, #a88434);
  border-radius: 4px;
  box-shadow: 0 6px 18px rgba(30, 45, 72, .12);
}
.scene figcaption { font-family: var(--sans); font-size: .85rem; color: var(--muted); margin-top: 8px; padding-left: 10px; border-left: 2px solid var(--gold-soft); }

blockquote {
  margin: 1.6em 0;
  padding: 22px 28px;
  background: var(--parchment);
  border-top: 1px solid var(--gold-soft);
  border-bottom: 1px solid var(--gold-soft);
  font-family: var(--display);
  font-size: 1.3rem;
  line-height: 1.55;
  font-style: italic;
  color: var(--navy);
  text-align: center;
}
blockquote::before { content: "\2720"; display: block; color: var(--gold); font-style: normal; font-size: 1.1rem; margin-bottom: 6px; }
blockquote p { margin: .35em auto; max-width: 36rem; }

.faq details { border-bottom: 1px solid var(--line); padding: 12px 0; max-width: var(--measure); }
.faq summary { cursor: pointer; font-family: var(--display); font-size: 1.25rem; font-weight: 600; color: var(--navy); list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+"; display: inline-block; width: 1.1em; color: var(--gold); font-family: var(--sans); font-weight: 700; }
.faq details[open] summary::before { content: "\2212"; }
.faq details p { margin: .5em 0 .2em 1.1em; }

.related ul, .sources ol { font-family: var(--sans); font-size: .95rem; }
.related li, .sources li { margin: 5px 0; }
.sources { color: var(--muted); }
.curator-box {
  margin-top: 40px;
  padding: 18px 22px;
  background: var(--parchment);
  border: 1px solid var(--gold-soft);
  border-radius: 4px;
  max-width: var(--measure);
  font-family: var(--sans);
  font-size: .9rem;
}
.curator-box p { margin: 0; }

/* ---------- Home and index pages ---------- */
.hero {
  text-align: center;
  padding: 40px 16px 30px;
  margin: 0 -16px 10px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(201, 165, 79, .22), transparent 60%),
    linear-gradient(var(--bg), var(--bg));
  border-bottom: 1px solid var(--gold-soft);
}
.hero h1 { max-width: 40rem; margin: 0 auto .3em; }
.hero p { font-size: 1.15rem; max-width: 40rem; margin: 0 auto; color: #3d3830; }
.ornament { display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--gold); margin: 6px 0 16px; }
.ornament::before, .ornament::after { content: ""; height: 1px; width: 70px; background: linear-gradient(90deg, transparent, var(--gold)); }
.ornament::after { transform: scaleX(-1); }

.cards { list-style: none; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); max-width: none; }
.cards a {
  display: block;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  border-radius: 3px;
  padding: 16px 18px;
  text-decoration: none;
  color: var(--ink);
  transition: box-shadow .15s, border-color .15s;
}
.cards a:hover { border-color: var(--gold); box-shadow: 0 6px 18px rgba(30, 45, 72, .1); }
.cards strong { display: block; font-family: var(--display); font-size: 1.35rem; font-weight: 600; color: var(--navy); line-height: 1.2; }
.cards span { font-family: var(--sans); font-size: .88rem; color: var(--muted); }
.index { padding-left: 1.2em; }
.index li { margin: 8px 0; }
.index li::marker { color: var(--gold); }
.index .meta { font-family: var(--sans); font-size: .85rem; color: var(--muted); }
.patrons dt { font-family: var(--display); font-size: 1.25rem; font-weight: 600; color: var(--navy); margin-top: 14px; }
.patrons dd { margin: 0 0 0 1em; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-deep);
  color: #d8d2c4;
  border-top: 4px solid var(--gold);
  font-family: var(--sans);
  font-size: .9rem;
  padding: 30px 0 26px;
}
.site-footer strong { font-family: var(--display); font-size: 1.15rem; color: #fff; font-weight: 600; }
.site-footer a { color: var(--gold-soft); text-decoration-color: rgba(232, 220, 188, .4); }
.site-footer a:hover { color: #fff; }
.site-footer .fine { font-size: .8rem; color: #a59f92; }
