/* Lore pages: layered on /assets/wiki/wiki.css. Markup comes from api/_lore/render.js. */
.lore-top-gap { flex: 1; }
.wtop .home-link + .home-link { margin-left: 14px; }

/* contents strip on the hub */
.lore-contents ol { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.lore-contents li { display: flex; }
.lore-contents a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--parchment-2); font: 600 .82rem/1 var(--display); letter-spacing: .06em; }
.lore-contents a:hover { border-color: var(--line-2); color: var(--parchment); }
.lore-contents .count { margin-left: -2px; padding: 3px 6px 0 0; font-size: .72rem; color: var(--parchment-3); }

.card-sum { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font: italic 400 .9rem/1.45 var(--serif); color: var(--parchment-2); }
.lore .cards.scenery .card { align-content: start; }

/* article */
.lore-body { max-width: 68ch; font-size: 1.08rem; line-height: 1.75; }
.lore-body > * + * { margin-top: 1.4em; }
.lb-text p { margin: 0 0 1em; }
.lb-text p:last-child { margin-bottom: 0; }
.lb-text h2 { font-size: 1.5rem; margin: 1.6em 0 .5em; scroll-margin-top: calc(var(--top) + 16px); }
.lb-text h3 { font-size: 1.15rem; margin: 1.4em 0 .4em; scroll-margin-top: calc(var(--top) + 16px); }
.lb-text > :first-child { margin-top: 0; }
.lb-text ul, .lb-text ol { margin: 0 0 1em; padding-left: 1.3em; }
.lb-text ul { list-style: none; padding-left: 0; }
.lb-text ul li { position: relative; padding-left: 20px; }
.lb-text ul li::before { content: ""; position: absolute; left: 3px; top: .72em; width: 5px; height: 5px; rotate: 45deg; background: var(--bronze); }
.lb-text ol { list-style: decimal; }
.lb-text li + li { margin-top: .35em; }
.lb-text blockquote { margin: 1em 0; padding: 2px 0 2px 18px; border-left: 2px solid var(--bronze); font-style: italic; color: var(--parchment-2); }
.lb-text a { color: var(--accent); text-underline-offset: 3px; }
.lb-text code { font-size: .9em; padding: 1px 5px; border-radius: 4px; background: var(--soot-2); }
.lb-text.align-center { text-align: center; }
.lb-text.align-right { text-align: right; }
.lb-text.style-epigraph { font-size: 1.25rem; font-style: italic; line-height: 1.6; color: var(--parchment-2); padding: .4em 0; }
.lb-text.style-inscription { font: 600 1rem/1.9 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.lb-text.style-callout { padding: 18px 22px; border-radius: var(--radius); background: var(--soot); border: 1px solid var(--line); }
.lb-text.style-letter { padding: 24px 26px; border-radius: 4px; background: linear-gradient(180deg, rgba(245, 232, 209, .06), rgba(245, 232, 209, .02)); border: 1px solid var(--line); font-style: italic; }
.lb-text.dropcap > p:first-child::first-letter { float: left; margin: .08em .1em 0 0; font: 600 3.4em/.8 var(--display); color: var(--accent); }

/* photos */
.lb-photo { margin-left: 0; margin-right: 0; }
.lb-photo img { display: block; width: 100%; height: auto; border-radius: 10px; }
.lb-photo figcaption { margin-top: 10px; font-size: .9rem; font-style: italic; color: var(--parchment-3); text-align: center; }
.lb-photo.size-inset { width: min(100%, 360px); }
.lb-photo.size-inset.align-center { margin-left: auto; margin-right: auto; }
.lb-photo.size-wide { width: 100%; }
.lb-photo.size-full { width: auto; margin-left: calc(-1 * clamp(18px, 3.5vw, 56px)); margin-right: calc(-1 * clamp(18px, 3.5vw, 56px)); }
.lb-photo.size-full img { border-radius: 0; }
.lb-photo.size-full figcaption { padding: 0 clamp(18px, 3.5vw, 56px); }
@media (min-width: 700px) {
  .lb-photo.size-inset.align-left { float: left; margin: .3em 26px 14px 0; }
  .lb-photo.size-inset.align-right { float: right; margin: .3em 0 14px 26px; }
  .lb-photo.size-full { margin-right: 0; max-width: none; width: calc(100% + clamp(18px, 3.5vw, 56px)); }
}
.lore-body::after { content: ""; display: block; clear: both; }
.lb-photo.aspect-16x9 img { aspect-ratio: 16 / 9; object-fit: cover; }
.lb-photo.aspect-4x3 img { aspect-ratio: 4 / 3; object-fit: cover; }
.lb-photo.aspect-1x1 img { aspect-ratio: 1; object-fit: cover; }
.lb-photo.aspect-3x4 img { aspect-ratio: 3 / 4; object-fit: cover; }
.lb-photo.frame-border img { padding: 6px; border: 1px solid var(--line-2); background: var(--soot); }
.lb-photo.frame-shadow img { box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .85); }
.lb-photo.frame-vignette { position: relative; }
.lb-photo.frame-vignette img { -webkit-mask-image: radial-gradient(ellipse 75% 75% at 50% 50%, #000 55%, transparent 100%); mask-image: radial-gradient(ellipse 75% 75% at 50% 50%, #000 55%, transparent 100%); }

.toc li.sub a { padding-left: 26px; font-size: .86rem; }
.lore-more { margin-top: 64px; }
.lore-more h2 { font-size: 1.3rem; letter-spacing: .08em; margin-bottom: 16px; }

/* ---------- page templates: one per page (render.js ENUMS.template), set as tpl-* on <main>. chronicle is the base above. */

/* codex: a centered manuscript with ornamented headings */
.tpl-codex .body { grid-template-columns: minmax(0, 1fr); }
.tpl-codex .toc { display: none; }
.tpl-codex .ihead, .tpl-codex .lore-body { margin-left: auto; margin-right: auto; text-align: center; }
.tpl-codex .ihead .lede { margin: 0 auto; }
.tpl-codex .ihead::after { content: "\2726"; display: block; margin-top: 22px; color: var(--bronze); letter-spacing: 1em; text-indent: 1em; }
.tpl-codex .lore-body { max-width: 60ch; text-align: left; }
.tpl-codex .lb-text h2 { text-align: center; }
.tpl-codex .lb-text h2::before, .tpl-codex .lb-text h2::after { content: ""; display: inline-block; vertical-align: middle; width: 2.2em; height: 1px; margin: 0 .6em; background: var(--line-2); }
.tpl-codex .lb-text:first-child > p:first-child::first-letter { float: left; margin: .08em .1em 0 0; font: 600 3.4em/.8 var(--display); color: var(--accent); }

/* vista: the cover photo sits behind the title */
.tpl-vista .ihead.has-cover { position: relative; isolation: isolate; max-width: none; min-height: clamp(280px, 48vh, 520px); display: flex; flex-direction: column; justify-content: flex-end; padding: 40px clamp(18px, 3.5vw, 56px) 32px; margin-left: calc(-1 * clamp(18px, 3.5vw, 56px)); margin-right: calc(-1 * clamp(18px, 3.5vw, 56px)); }
.tpl-vista .ihead-cover { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; -webkit-mask-image: linear-gradient(180deg, #000 40%, transparent); mask-image: linear-gradient(180deg, #000 40%, transparent); }
.tpl-vista .ihead.has-cover::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 30%, rgba(10, 8, 6, .85)); }
.tpl-vista .ihead.has-cover h1 { text-shadow: 0 2px 24px rgba(0, 0, 0, .8); }
.tpl-vista .ihead.has-cover .lede { color: var(--parchment); }

/* rime: the cold palette */
.tpl-rime { --accent: var(--frost); --bronze: #5E9C97; --line: rgba(143, 211, 204, .18); --line-2: rgba(143, 211, 204, .34); --soot: #0E1617; --soot-2: #12201F; background: radial-gradient(ellipse 80% 40% at 50% 0, rgba(27, 58, 60, .55), transparent); }
.tpl-rime .ihead h1 { color: #E6F4F2; }
.tpl-rime .lb-text.style-letter { background: linear-gradient(180deg, rgba(143, 211, 204, .07), rgba(143, 211, 204, .02)); }
