/* Things To Carry: Pilgrim's Pack warmth, Quiet Library rigour. */

/* Literata (book serif) and Caveat (hand accent), both SIL Open Font License; see /fonts/LICENSE-*.txt. */
@font-face {
  font-family: "Literata"; font-style: normal; font-display: swap; font-weight: 200 900;
  src: url(/fonts/literata-latin-opsz-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Literata"; font-style: normal; font-display: swap; font-weight: 200 900;
  src: url(/fonts/literata-latin-ext-opsz-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Literata"; font-style: italic; font-display: swap; font-weight: 200 900;
  src: url(/fonts/literata-latin-opsz-italic.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Literata"; font-style: italic; font-display: swap; font-weight: 200 900;
  src: url(/fonts/literata-latin-ext-opsz-italic.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Caveat"; font-style: normal; font-display: swap; font-weight: 400 700;
  src: url(/fonts/caveat-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Caveat"; font-style: normal; font-display: swap; font-weight: 400 700;
  src: url(/fonts/caveat-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --paper: #f7f2e8;
  --kraft: #eadfca;
  --kraft-soft: #f0e7d6;
  --ink: #2a2420;
  --ink-soft: #5e544b;
  --rule: #d8cbb3;
  --accent: #9e4a2c;
  --accent-ink: #8a3f22;
  --notice-bg: #fbecd9;
  --notice-rule: #d9a066;
  --draft-bg: #3b3a6b;
  --draft-ink: #ffffff;
  --plate-blend: multiply;
  --serif: "Literata", "Iowan Old Style", Palatino, Georgia, serif;
  --hand: "Caveat", "Bradley Hand", cursive;
  --measure: 40rem;
  --wide: 78rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1d1916; --kraft: #2a241f; --kraft-soft: #241f1b; --ink: #ece4d8; --ink-soft: #b5a998; --rule: #463c33;
    --accent: #e08a62; --accent-ink: #eda283; --notice-bg: #33261a; --notice-rule: #8a5a2e;
    --draft-bg: #514f8f; --plate-blend: normal; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #1d1916; --kraft: #2a241f; --kraft-soft: #241f1b; --ink: #ece4d8; --ink-soft: #b5a998; --rule: #463c33;
  --accent: #e08a62; --accent-ink: #eda283; --notice-bg: #33261a; --notice-rule: #8a5a2e;
  --draft-bg: #514f8f; --plate-blend: normal; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 1.125rem/1.7 var(--serif); font-optical-sizing: auto;
  overflow-wrap: break-word;
}
main, .site-head, .site-foot { max-width: var(--measure); margin: 0 auto; padding: 0 16px; }
/* Browsing pages (home, library, courses, editions) use the full width; reading text stays at book width. */
.site-head, .site-foot, main.wide { max-width: var(--wide); }
main.wide > * { max-width: var(--measure); }
main.wide > .shelf, main.wide > .shelf-nav, main.wide > .card-grid, main.wide > .editions,
main.wide > .course-top, main.wide > .modules, main.wide > .hero, main.wide > .library-teaser,
main.wide > .start-here, main.wide > .whole-course, main.wide > .toolkit { max-width: none; }
.library-teaser > p, .hero-text { max-width: var(--measure); }
.site-foot p:not(.foot-brand) { max-width: var(--measure); }
a { color: var(--accent-ink); text-underline-offset: 0.15em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; font-weight: 600; }
h1 { font-size: clamp(1.9rem, 6vw, 2.5rem); margin: 0.25rem 0 0.5rem; letter-spacing: -0.01em; }
h2 { font-size: 0.95rem; margin: 2.75rem 0 0.75rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-soft); font-weight: 600; }
h3 { font-size: 1.1rem; margin: 2rem 0 0.5rem; }
blockquote { margin: 1.25rem 0; padding: 0.25rem 0 0.25rem 1rem; border-left: 3px solid var(--rule); color: var(--ink-soft); }
code { font-size: 0.85em; }
img { max-width: 100%; height: auto; }

.kicker { margin: 0; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent-ink); }
.lede { font-size: 1.2rem; color: var(--ink-soft); }
.subtitle { margin: 0 0 1rem; font-style: italic; color: var(--ink-soft); }
.meta { color: var(--ink-soft); font-size: 0.9rem; margin: 0.25rem 0; }
.crumb { margin: 1.5rem 0 0; font-size: 0.95rem; }

/* Header and footer */
.draft-bar { background: var(--draft-bg); color: var(--draft-ink); font: 600 0.85rem/1.4 system-ui, sans-serif; padding: 8px 16px; text-align: center; position: sticky; top: 0; z-index: 2; }
.site-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1rem; padding-top: 1.5rem; padding-bottom: 0.9rem; border-bottom: 1px solid var(--rule); }
.brand { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 1.25rem; font-weight: 650; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark { width: 2rem; height: 2rem; flex: none; align-self: center; }
.tagline { font-family: var(--hand); color: var(--accent); font-size: 1.3rem; line-height: 1; }
.site-foot { margin-top: 5rem; padding-top: 1.25rem; padding-bottom: 3rem; border-top: 1px solid var(--rule); color: var(--ink-soft); font-size: 0.88rem; }
.foot-brand { font-family: var(--hand); font-size: 1.4rem; color: var(--accent); margin: 0 0 0.25rem; }

/* Home */
.hero { padding: 3rem 0 1.5rem; }
.hero h1 { font-size: clamp(2.1rem, 8vw, 3rem); font-weight: 500; max-width: 16ch; }
.edition-card { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1.25rem; background: var(--kraft); border-radius: 4px; padding: 1.25rem; margin: 1.5rem 0; border-top: 4px solid var(--accent); }
.edition-cover { display: block; background: var(--paper); border: 1px solid var(--rule); padding: 6px; align-self: start; }
.edition-cover img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: contain; mix-blend-mode: var(--plate-blend); }
.edition-body h2 { text-transform: none; letter-spacing: 0; color: var(--ink); font-size: 1.45rem; margin: 0 0 0.25rem; }
.edition-body h2 a { color: inherit; text-decoration: none; }
.edition-body h2 a:hover { color: var(--accent); }
.edition-body p { margin: 0.5rem 0; }
@media (max-width: 34rem) {
  .edition-card { grid-template-columns: 1fr; }
  .edition-cover { width: 9rem; }
}
.how ul { list-style: none; padding: 0; }
.how li { padding: 0.6rem 0 0.6rem 1.75rem; border-bottom: 1px solid var(--rule); position: relative; }
.how li::before { content: "❦"; position: absolute; left: 0; color: var(--accent); }
.why p { font-size: 1.15rem; }

/* Images */
.plate { margin: 1.75rem 0; }
.plate img { display: block; margin: 0 auto; max-height: 70vh; width: auto; background: var(--kraft-soft); padding: 10px; border: 1px solid var(--rule); mix-blend-mode: var(--plate-blend); }
.plate figcaption { margin-top: 0.6rem; font-size: 0.88rem; line-height: 1.5; color: var(--ink-soft); font-style: italic; }
.plate figcaption em { font-style: normal; }
.plate .credit { display: block; font-style: normal; font-size: 0.78rem; margin-top: 0.2rem; }
.plate-cover img { max-height: 24rem; }

/* Edition page */
.edition-head { margin-top: 0.5rem; }
.lesson-list { list-style: none; padding: 0; margin: 2rem 0; border-top: 1px solid var(--rule); }
.lesson-list li { border-bottom: 1px solid var(--rule); }
.lesson-link { display: flex; gap: 1rem; align-items: center; padding: 0.85rem 0; text-decoration: none; color: var(--ink); }
.lesson-link:hover .lesson-title { color: var(--accent); }
.lesson-thumb { flex: none; width: 3.5rem; height: 3.5rem; object-fit: cover; border: 1px solid var(--rule); background: var(--kraft); mix-blend-mode: var(--plate-blend); }
.lesson-thumb-empty { display: block; background: repeating-linear-gradient(135deg, var(--kraft) 0 6px, var(--kraft-soft) 6px 12px); }
.lesson-text { display: grid; grid-template-columns: 2rem 1fr; column-gap: 0.25rem; }
.lesson-num { grid-row: span 3; font-family: var(--hand); font-size: 1.5rem; line-height: 1.1; color: var(--accent); }
.lesson-title { font-weight: 600; line-height: 1.3; }
.lesson-text .meta, .lesson-text .draft-tag { grid-column: 2; margin: 0.15rem 0 0; }

/* Notices and draft-only furniture */
.notice { background: var(--notice-bg); border-left: 4px solid var(--notice-rule); padding: 0.5rem 1rem; margin: 1.25rem 0; font-size: 0.92rem; }
.notice p { margin: 0.4rem 0; }
.draft-notes { border: 1px dashed var(--draft-bg); padding: 0.5rem 1rem; margin: 1rem 0; font: 0.85rem/1.5 system-ui, sans-serif; font-style: normal; color: var(--ink-soft); }
.draft-notes ul, .draft-notes ol { padding-left: 1.25rem; }
.draft-tag { font: 600 0.8rem/1.4 system-ui, sans-serif; color: var(--draft-bg); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .draft-tag { color: #b9b7f0; } }
:root[data-theme="dark"] .draft-tag { color: #b9b7f0; }

/* Lesson */
.lesson-head { margin: 1rem 0 0.5rem; }
.sec-story { background: var(--kraft-soft); border-radius: 4px; padding: 0.25rem 1.25rem 0.75rem; margin: 2rem 0; border-left: 3px solid var(--accent); }
.seed-title { text-transform: none; letter-spacing: 0; color: var(--ink); font-size: 1.2rem; margin: 0.25rem 0 0.5rem; }
.sec-glossary dl { margin: 0; border-top: 1px solid var(--rule); }
.sec-glossary dt { font-weight: 600; margin-top: 0.7rem; }
.sec-glossary dd { margin: 0.15rem 0 0.7rem; padding-bottom: 0.7rem; border-bottom: 1px solid var(--rule); color: var(--ink-soft); }
.story-label { font-family: var(--hand); color: var(--accent); font-size: 1.5rem; line-height: 1.2; margin: 1rem 0 0.25rem; }
.sec-key-points ul { list-style: none; padding: 0; border-top: 1px solid var(--rule); }
.sec-key-points li { padding: 0.55rem 0; border-bottom: 1px solid var(--rule); }
.sec-sources { font-size: 0.9rem; line-height: 1.55; color: var(--ink-soft); }
.sec-sources ul { list-style: none; padding: 0; counter-reset: src; }
.sec-sources li { counter-increment: src; position: relative; padding-left: 2rem; margin: 0.7rem 0; }
.sec-sources li::before { content: counter(src) "."; position: absolute; left: 0; width: 1.5rem; text-align: right; color: var(--accent-ink); }
.sec-reflection { text-align: center; padding: 0.5rem 0; }
.sec-reflection h2 { margin-bottom: 0.5rem; }
.sec-reflection p { font-style: italic; }
.sec-reflection strong { font-weight: 600; }
.carry { background: var(--kraft); border-radius: 4px; padding: 0.5rem 1.5rem 1rem; margin-top: 3rem; border-top: 4px solid var(--accent); }
.carry h2 { font-family: var(--hand); text-transform: none; letter-spacing: 0; font-size: 1.8rem; font-weight: 600; color: var(--accent); margin: 0.75rem 0 0.25rem; }
.carry-line { font-size: 1.35rem; line-height: 1.45; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 3rem 0 0; font-size: 0.95rem; }
.pager a { display: block; padding: 0.75rem 1rem; border: 1px solid var(--rule); border-radius: 4px; text-decoration: none; line-height: 1.35; }
.pager a[rel="next"] { text-align: right; grid-column: 2; }
.pager-dir { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-soft); margin-bottom: 0.2rem; }
@media (max-width: 30rem) {
  .pager { grid-template-columns: 1fr; }
  .pager a[rel="next"] { grid-column: 1; }
}

/* Navigation */
.site-head { align-items: center; }
.site-nav { display: flex; gap: 1.25rem; font-size: 0.95rem; }
.site-nav a { color: var(--ink-soft); text-decoration: none; }
.site-nav a:hover { color: var(--accent); }
.button { display: inline-block; padding: 0.55rem 1.1rem; border-radius: 4px; background: var(--accent); color: #fff; text-decoration: none; font-size: 0.95rem; }
.button:hover { background: var(--accent-ink); color: #fff; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .button { color: #1d1916; } }
:root[data-theme="dark"] .button { color: #1d1916; }

/* Library */
.intro { padding: 2rem 0 0.5rem; }
.shelf h2 { border-bottom: 1px solid var(--rule); padding-bottom: 0.4rem; }
.course-description { margin: 1rem 0 2rem; }
.module h2 { margin-top: 2.25rem; }
.lesson-list.compact { margin: 0.5rem 0; }
.lesson-list.compact .lesson-link { padding: 0.55rem 0; }
.library-teaser { margin: 2.5rem 0; }

/* Lesson extras from the full courses */
.sec-callouts blockquote, .sec-pull-quote blockquote { border-left: 3px solid var(--accent); background: var(--kraft-soft); color: var(--ink); padding: 0.5rem 1rem; }
.sec-pull-quote blockquote { font-size: 1.2rem; font-style: italic; }
.sec-content-advisory { background: var(--notice-bg); border-left: 4px solid var(--notice-rule); padding: 0.25rem 1rem; }
.sec-exercise, .sec-in-plain-terms { background: var(--kraft-soft); border-radius: 4px; padding: 0.25rem 1.25rem 0.75rem; }
.sec-quiz ol > li { margin: 1rem 0; }
.answers { margin: 1rem 0; padding: 0.5rem 1rem; border: 1px solid var(--rule); border-radius: 4px; }
.answers summary { cursor: pointer; color: var(--accent-ink); font-weight: 600; }

/* Card grid (library courses, edition lessons): 4–5 across on a desktop, 2–3 on a tablet, rows on a phone. */
.shelf { scroll-margin-top: 1rem; }
.shelf h2 { margin-top: 3rem; }
.shelf-nav { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.5rem 0 0.5rem; }
.shelf-nav a { padding: 0.3rem 0.8rem; border: 1px solid var(--rule); border-radius: 999px; background: var(--kraft-soft); color: var(--ink); text-decoration: none; font-size: 0.88rem; line-height: 1.4; }
.shelf-nav a:hover { border-color: var(--accent); color: var(--accent-ink); }
.shelf-nav .count { color: var(--ink-soft); font-size: 0.8rem; margin-left: 0.15rem; }
.card-grid { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); gap: 1.5rem 1.25rem; }
.card { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--ink); background: var(--kraft-soft); border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease; }
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgb(60 40 20 / 0.14); border-color: var(--accent); color: var(--ink); }
.card:hover .card-title { color: var(--accent-ink); }
.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.card-img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--kraft); border-bottom: 1px solid var(--rule); }
.card-img-empty { background: repeating-linear-gradient(135deg, var(--kraft) 0 6px, var(--kraft-soft) 6px 12px); }
.card-text { display: flex; flex-direction: column; gap: 0.3rem; padding: 0.8rem 1rem 1rem; flex: 1; }
.card-kicker { font-family: var(--hand); color: var(--accent); font-size: 1.25rem; line-height: 1; }
.card-title { font-weight: 600; line-height: 1.3; font-size: 1.05rem; }
.card-summary { font-size: 0.9rem; color: var(--ink-soft); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { margin-top: auto; padding-top: 0.25rem; font-size: 0.82rem; }
@media (prefers-reduced-motion: reduce) { .card, .card:hover { transition: none; transform: none; } }
@media (max-width: 36rem) {
  .card-grid { grid-template-columns: 1fr; gap: 0.75rem; }
  .card { flex-direction: row; }
  .card-img { width: 5.5rem; aspect-ratio: 1; flex: none; border-bottom: 0; border-right: 1px solid var(--rule); align-self: stretch; height: auto; min-height: 5.5rem; }
  .card-text { padding: 0.65rem 0.85rem; }
  .card-summary { -webkit-line-clamp: 2; }
}

/* Home: editions side by side on wide screens. */
@media (min-width: 60rem) {
  .editions { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .editions .edition-card { margin: 0; }
  /* The flagship spans the row, with a larger cover. */
  .editions .edition-card.flagship { grid-column: 1 / -1; grid-template-columns: 12rem 1fr; gap: 2rem; padding: 1.75rem; }
}
.edition-card.flagship .edition-body h2 { font-size: 1.9rem; }
.edition-card.flagship .edition-body > p:not(.meta):not(.kicker) { max-width: var(--measure); }
.flagship-ends { font-size: 0.95rem; color: var(--ink-soft); }
/* Locked courses come after the open ones under one "Coming soon" heading (home and library). */
.editions-soon { grid-column: 1 / -1; margin: 2.5rem 0 0.5rem; border-bottom: 1px solid var(--rule); padding-bottom: 0.4rem; }
.shelf-soon > p { color: var(--ink-soft); max-width: var(--measure); }

/* Full-course page: "Start here", then the modules, then the toolkit. */
.start-here, .whole-course, .toolkit { margin-top: 2.5rem; }
.start-here > p, .whole-course > p { max-width: var(--measure); }
.module h3 { margin: 2.25rem 0 0.25rem; font-size: 1.25rem; }
.module-sub { margin: 0; color: var(--ink-soft); font-style: italic; max-width: var(--measure); }
.module-intro { margin: 0.5rem 0; max-width: var(--measure); }
.tag { display: inline-block; font-family: var(--hand); color: var(--accent); font-size: 1.05rem; line-height: 1; margin-left: 0.3rem; white-space: nowrap; }
.toolkit-grid { display: grid; gap: 0 2.5rem; }
@media (min-width: 60rem) { .toolkit-grid { grid-template-columns: 1fr 1fr; } }
.toolkit h3 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; }
.toolkit ul { margin: 0; padding-left: 1.2rem; }
.toolkit li { margin: 0.45rem 0; }

/* Contents list on long lessons. */
.toc { background: var(--kraft-soft); border-radius: 4px; padding: 0.75rem 1.25rem; margin: 1.5rem 0; }
.toc-head { margin: 0 0 0.25rem; font-weight: 600; }
.toc ol { margin: 0; padding-left: 1.3rem; columns: 2; column-gap: 2rem; }
.toc li { margin: 0.15rem 0; break-inside: avoid; }
@media (max-width: 30rem) { .toc ol { columns: 1; } }

/* The Gospel ledger (last lesson of First Words — Jesus). */
.ledger-nav { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0 1.5rem; }
.ledger-nav a { padding: 0.3rem 0.8rem; border: 1px solid var(--rule); border-radius: 999px; background: var(--kraft-soft); color: var(--ink); text-decoration: none; font-size: 0.88rem; line-height: 1.4; }
.ledger-nav a:hover { border-color: var(--accent); color: var(--accent-ink); }
.ledger .count { color: var(--ink-soft); font-size: 0.8em; font-weight: 400; margin-left: 0.15rem; }
.ledger-group h3 { margin: 2rem 0 0.5rem; }
.ledger-entry { border-bottom: 1px solid var(--rule); }
.ledger-group h3 + .ledger-entry { border-top: 1px solid var(--rule); }
.ledger-entry summary { cursor: pointer; padding: 0.55rem 0; }
.ledger-entry summary:hover .ledger-title { color: var(--accent-ink); }
.ledger-title { font-weight: 600; }
.ledger-refs { color: var(--ink-soft); font-size: 0.88rem; }
.ledger-entry[open] { padding-bottom: 0.5rem; }
.ledger-entry p { margin: 0.4rem 0; }
.ledger-notes { color: var(--ink-soft); font-size: 0.95rem; }

/* Course page: cover beside the description, lessons in two columns on wide screens. */
@media (min-width: 60rem) {
  .course-top.has-cover { display: grid; grid-template-columns: minmax(0, var(--measure)) minmax(16rem, 1fr); gap: 3rem; align-items: start; }
  .course-top.has-cover .plate-cover { margin-top: 1.5rem; position: sticky; top: 1.5rem; }
  .course-top.has-cover .plate-cover img { max-height: 32rem; }
  .modules .lesson-list.compact { column-count: 2; column-gap: 2.5rem; border-top: 0; }
  .modules .lesson-list.compact li { break-inside: avoid; }
}

/* Lesson pages on large screens: a little more room. */
@media (min-width: 75rem) {
  body { font-size: 1.1875rem; }
  :root { --measure: 42rem; }
}

/* Print: just the lesson. */
/* ---- Sayings pages: one saying and its evidence */
.saying-head { margin: 1rem 0 1.5rem; }
.saying-head h1 { font-size: clamp(2rem, 7vw, 3rem); line-height: 1.1; margin: 0.4rem 0 1rem; }
.confidence { display: flex; gap: 0.9rem; align-items: flex-start; margin: 0; padding: 0.9rem 1rem; background: var(--kraft-soft); border-radius: 10px; }
.confidence b { color: var(--accent-ink); }
.cairn-mark { flex: none; width: 2.4rem; height: 2.4rem; }
.cairn-mark .on { fill: var(--accent); }
.cairn-mark .off { fill: none; stroke: var(--rule); stroke-width: 1.1; stroke-dasharray: 2 1.6; }
.compare { display: grid; grid-template-columns: 1fr; gap: 0.75rem; }
@media (min-width: 40rem) { .compare { grid-template-columns: 1fr 1fr; } }
.compare figure { margin: 0; padding: 0.9rem 1rem; border: 1px solid var(--rule); border-radius: 10px; background: var(--paper); }
.compare figcaption { display: flex; justify-content: space-between; font-weight: 600; margin-bottom: 0.4rem; }
.compare figcaption span { font-weight: 400; font-size: 0.85rem; color: var(--ink-soft); }
.compare blockquote { margin: 0; padding: 0; border: 0; color: var(--ink); font-size: 1.15rem; line-height: 1.6; }
mark { background: color-mix(in srgb, var(--accent) 22%, transparent); color: inherit; padding: 0 0.1em; border-radius: 3px; }
.moved { text-decoration: underline dotted var(--accent); text-underline-offset: 0.2em; }
.compare-key { font-size: 0.85rem; color: var(--ink-soft); margin: 0.5rem 0 0.75rem; }
.layers { list-style: none; margin: 0; padding: 0; position: relative; }
.layers::before { content: ""; position: absolute; left: 0.45rem; top: 0.6rem; bottom: 0.6rem; width: 2px; background: var(--rule); }
.layer { position: relative; padding: 0 0 1.25rem 1.9rem; }
.layer::before { content: ""; position: absolute; left: 0; top: 0.45rem; width: 0.95rem; height: 0.6rem; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink-soft); }
.l-jesus::before { background: var(--accent); border-color: var(--accent); width: 1.1rem; height: 0.75rem; left: -0.08rem; }
.l-gospel::before, .l-source::before { background: var(--ink); border-color: var(--ink); }
.layer-when { margin: 0; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent-ink); }
.layer h3 { margin: 0.1rem 0 0.3rem; font-size: 1.1rem; }
.layer blockquote { margin: 0.4rem 0; }
.layer blockquote p { margin: 0; }
.layer cite { display: block; font-size: 0.8rem; font-style: normal; margin-top: 0.25rem; }
.layer-body > p { margin: 0.3rem 0 0; font-size: 1rem; color: var(--ink-soft); }
.l-source h3::after { content: " (reconstructed)"; font-weight: 400; font-size: 0.85rem; color: var(--ink-soft); }
.confidence-key { margin: 2.5rem 0 1rem; padding: 1rem; border-top: 1px solid var(--rule); font-size: 0.95rem; }
.confidence-key h2 { font-size: 1rem; margin: 0 0 0.5rem; }
.confidence-key dl { margin: 0; display: grid; gap: 0.5rem; }
.confidence-key dt { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; }
.confidence-key .cairn-mark { width: 1.6rem; height: 1.6rem; }
.confidence-key dd { margin: 0 0 0 2.1rem; color: var(--ink-soft); }
.small { font-size: 0.85rem; color: var(--ink-soft); }

@media print {
  :root { --paper: #fff; --kraft-soft: #fff; --kraft: #fff; }
  .site-head, .site-nav, .pager, .shelf-nav, .button, .site-foot p:not(.foot-brand), .toc, .ledger-nav { display: none; }
  .ledger-entry > * { display: block; }
  body { font-size: 11pt; }
  .card { break-inside: avoid; }
  .answers:not([open]) { display: none; }
  a { color: inherit; text-decoration: none; }
}

/* Home: the opening image beside the words on wide screens, below them on a phone. */
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0 0.5rem; }
.button-quiet { background: transparent; color: var(--accent-ink); border: 1px solid var(--accent); }
.button-quiet:hover { background: var(--kraft-soft); color: var(--accent-ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .button-quiet { color: var(--accent-ink); } }
:root[data-theme="dark"] .button-quiet { color: var(--accent-ink); }
.plate-hero img { max-height: 26rem; }
@media (min-width: 60rem) {
  .hero.has-art { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 3.5rem; align-items: center; padding-top: 2.5rem; }
  .hero.has-art h1 { font-size: clamp(2.6rem, 4.2vw, 3.6rem); }
  .plate-hero { margin: 0; }
  .plate-hero img { max-height: 36rem; }
}

/* "You were here": filled in by /js/progress.js from this browser's own storage; nothing without JavaScript. */
.resume { margin: 1rem 0 0; padding: 0.6rem 0.9rem; background: var(--kraft-soft); border-left: 3px solid var(--accent); border-radius: 4px; font-size: 0.95rem; }
.resume-label { display: block; font-family: var(--hand); color: var(--accent); font-size: 1.25rem; line-height: 1.1; }
.lesson-link.seen .lesson-num::after, .card.seen .card-kicker::after { content: " ✓"; font-family: var(--serif); font-size: 0.8em; color: var(--ink-soft); }
.lesson-link.seen .lesson-title { color: var(--ink-soft); font-weight: 500; }
.card-progress { display: block; font-size: 0.8rem; color: var(--accent-ink); }

/* Search (Pagefind; the index is built after Eleventy by `npm run build`). */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.search-form { display: flex; gap: 0.5rem; margin: 1.5rem 0 0.5rem; max-width: var(--measure); }
.search-form input { flex: 1; min-width: 0; font: inherit; font-size: 1rem; padding: 0.5rem 0.8rem; border: 1px solid var(--rule); border-radius: 4px; background: var(--paper); color: var(--ink); }
.search-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.search-form .button { border: 0; font: inherit; font-size: 0.95rem; cursor: pointer; }
.search {
  --pagefind-ui-scale: 0.9; --pagefind-ui-primary: var(--accent); --pagefind-ui-text: var(--ink);
  --pagefind-ui-background: var(--paper); --pagefind-ui-border: var(--rule); --pagefind-ui-tag: var(--kraft);
  --pagefind-ui-border-width: 1px; --pagefind-ui-border-radius: 4px; --pagefind-ui-font: var(--serif);
  margin: 1.5rem 0;
}
.search .pagefind-ui__result-link { color: var(--accent-ink); }
.search .pagefind-ui__result-thumb { mix-blend-mode: var(--plate-blend); }
.search mark { background: var(--notice-bg); color: inherit; box-shadow: inset 0 -2px 0 var(--notice-rule); }
.search .pagefind-ui__search-clear { font-family: var(--serif); color: var(--accent-ink); background: transparent; }
.search .pagefind-ui__filter-panel { border-radius: 4px; }

/* Locked courses (live.yml): "Coming soon" instead of lesson links. */
p.tag-soon { margin-left: 0; font-size: 1.3rem; }
.coming-soon { margin: 2rem 0; padding: 1.25rem 1.5rem; border: 1px dashed var(--accent); border-radius: 8px; max-width: 40rem; }
.coming-soon h2 { margin-top: 0; }

/* AI-assisted instructional diagrams: plain, and always labelled. */
.plate-diagram img { background: var(--paper, #fff); }
.diagram-label { display: block; font-size: 0.85rem; color: var(--ink-soft); font-style: italic; margin-top: 0.25rem; }

/* Course outline (old app's modules), shown on locked courses too. */
.module-sub { color: var(--ink-soft); max-width: var(--measure); margin: 0.2rem 0 0.6rem; }
.outline > .module { margin-top: 1.5rem; }
.lesson-list.locked .lesson-text { display: flex; gap: 0.6rem; padding: 0.35rem 0; color: var(--ink-soft); }
