/* Apocrypha.com — the reading room. Static, accessible, and self-contained. */
:root {
    color-scheme: light;
    --ink: #232a26;
    --ink-soft: #50594e;
    --forest: #18251f;
    --forest-deep: #101914;
    --forest-light: #2b3b31;
    --paper: #f7f3e9;
    --paper-light: #fffdf8;
    --paper-deep: #ece5d5;
    --gold: #c4a06a;
    --gold-light: #e1c798;
    --gold-dark: #806039;
    --line: #d9d0be;
    --muted: #6b6b5e;
    --serif: 'Apocrypha Serif', 'Palatino Linotype', 'Book Antiqua', Palatino, Georgia, serif;
    --sans: 'Apocrypha Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --container: 1260px;
    --header-height: 90px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 116px; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 18px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}
body::selection, ::selection { background: #d8bd84; color: #17231d; }
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; display: block; }
svg { display: block; }
a { color: #485f3c; text-underline-offset: .2em; }
a:hover { color: #8d6130; }
button, input, select, textarea { font: inherit; }
button, summary, select { cursor: pointer; }
button { color: inherit; }
button:disabled { cursor: wait; }
input[type='search'] { -webkit-appearance: none; appearance: none; }
:focus-visible { outline: 3px solid #a77837; outline-offset: 4px; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.2; text-wrap: balance; }
h1, h2, h3, h4, p { margin-top: 0; }
h1 { font-size: clamp(2.5rem, 4.6vw, 4.8rem); letter-spacing: -.035em; }
h2 { font-size: clamp(2rem, 3.1vw, 3.2rem); letter-spacing: -.025em; }
h3 { font-size: 1.55rem; }
.container { width: min(var(--container), calc(100% - 80px)); margin-inline: auto; }
.section { padding-block: 88px; }
.section + .section { border-top: 1px solid var(--line); }
.section-heading { margin-bottom: 34px; max-width: 850px; }
.section-heading h2 { margin-bottom: 20px; }
.section-heading.centered { text-align: center; margin-inline: auto; }
.section-intro { color: var(--ink-soft); max-width: 730px; }
.eyebrow, .card-kicker, .category-label {
    font: 600 .78rem/1.5 var(--sans);
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--gold-dark);
    margin-bottom: 16px;
}
.muted { color: var(--muted); }
.visually-hidden {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
    position: fixed; top: -100px; left: 20px; z-index: 1000;
    padding: 12px 22px; background: var(--paper-light); color: var(--forest);
}
.skip-link:focus { top: 10px; }

/* The compact masthead keeps navigation and search in one stable place. */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: var(--forest-deep); color: var(--paper);
    border-bottom: 1px solid #c4a06a45;
}
.header-inner {
    min-height: var(--header-height);
    width: min(1440px, calc(100% - 64px)); margin-inline: auto;
    display: flex; align-items: center; gap: 30px;
    position: relative;
}
.brand { display: inline-flex; flex-shrink: 0; align-items: center; gap: 12px; color: #f6ead4; text-decoration: none; }
.brand:hover { color: var(--gold-light); }
.brand-mark { width: 34px; color: var(--gold); }
.brand-mark svg { width: 100%; height: auto; }
.brand-name { font: 400 1.52rem/1.12 var(--serif); letter-spacing: .16em; }
.brand-tagline { display: block; font: 400 .62rem/1.4 var(--sans); letter-spacing: .105em; color: #c0bcae; margin-top: 7px; }
.site-nav { display: flex; align-items: center; justify-content: flex-end; gap: 25px; flex: 1; }
.site-nav > a, .nav-dropdown > summary { color: #e7e1d5; font-size: .86rem; font-weight: 500; white-space: nowrap; text-decoration: none; }
.site-nav > a:hover, .nav-dropdown > summary:hover { color: var(--gold-light); }
.nav-dropdown { position: relative; }
.nav-dropdown > summary { list-style: none; padding: 30px 16px 30px 0; position: relative; }
.nav-dropdown > summary::-webkit-details-marker { display: none; }
.nav-dropdown > summary::after { content: ''; position: absolute; right: 0; top: calc(50% - 3px); width: 5px; height: 5px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg); }
.nav-dropdown[open] > summary::after { transform: rotate(225deg); top: calc(50% - 1px); }
.dropdown-panel {
    position: absolute; top: 100%; left: -22px;
    min-width: 270px; max-width: 360px; width: max-content;
    padding: 12px; background: var(--paper-light); color: var(--ink);
    border: 1px solid var(--line); border-top: 2px solid var(--gold);
    box-shadow: 0 18px 36px #0d171c26;
}
.nav-dropdown:last-child .dropdown-panel { left: auto; right: -20px; }
.dropdown-panel a { display: block; padding: 10px 13px; color: var(--ink); text-decoration: none; font-size: .94rem; line-height: 1.45; white-space: normal; }
.dropdown-panel a:hover, .dropdown-panel a[aria-current='page'] { color: #68491f; background: #f0e8d9; }
.dropdown-panel a + a { border-top: 1px solid #e2d9c754; }
.icon-button {
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0; width: 44px; height: 44px;
    padding: 10px; border: 1px solid transparent; background: transparent;
    color: var(--paper); border-radius: 0;
}
.icon-button svg { width: 22px; height: 22px; }
.icon-button:hover, .icon-button[aria-expanded='true'] { color: var(--gold-light); border-color: #c4a06a65; background: #ffffff06; }
.nav-toggle { display: none; }
.header-search { position: relative; flex-shrink: 0; }
.search-popover {
    position: absolute; top: calc(100% + 23px); right: 0;
    width: 420px; max-width: calc(100vw - 32px); padding: 26px;
    background: var(--paper-light); color: var(--ink);
    border: 1px solid var(--line); border-top: 2px solid var(--gold);
    box-shadow: 0 18px 40px #0d171c30;
}
.search-popover label { display: block; font-family: var(--serif); font-size: 1.25rem; margin-bottom: 14px; }
.search-popover p { font-size: .85rem; margin: 12px 0 0; color: var(--muted); }
.search-field { display: flex; width: 100%; }
.search-field input {
    min-width: 0; width: 100%; padding: 13px 15px;
    color: var(--ink); background: var(--paper-light);
    border: 1px solid #aaa18c; border-radius: 0; font-size: 1rem;
}
.search-field input::placeholder { color: #7a7c70; }
.search-field button { background: var(--forest); color: var(--paper); border: 1px solid var(--forest); padding: 12px 20px; font-size: .9rem; font-weight: 600; }
.search-field button:hover { background: #314333; }

/* A broad, atmospheric entry to the ancient collection. */
.hero {
    position: relative; overflow: hidden; isolation: isolate;
    min-height: 660px; display: flex; flex-direction: column; justify-content: center;
    background: var(--forest); color: #f7f1e4;
}
.hero::before {
    content: ''; position: absolute; z-index: -1; inset: 0;
    background: linear-gradient(90deg, #111c18f7 0%, #15201be8 30%, #1a251db0 54%, #131d1733 100%);
}
.hero::after { content: ''; position: absolute; z-index: -1; inset: 20px; border: 1px solid #d1b27a2b; pointer-events: none; }
.hero-image { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-inner { width: min(var(--container), calc(100% - 80px)); margin-inline: auto; padding-block: 94px 100px; position: relative; }
.hero .eyebrow { color: var(--gold-light); margin-bottom: 24px; }
.hero h1 { max-width: 760px; font-size: clamp(3.25rem, 5.5vw, 5.7rem); line-height: 1.03; margin-bottom: 28px; letter-spacing: -.035em; }
.hero h1 em { color: var(--gold-light); font-style: italic; }
.hero-copy { max-width: 570px; color: #e0dfd2; font-size: 1.12rem; line-height: 1.75; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-bottom { position: relative; background: #0c171ba6; border-top: 1px solid #d1b27a3b; padding: 20px 40px; color: #d7d2c3; display: flex; justify-content: center; flex-wrap: wrap; gap: 20px 60px; font-size: .87rem; }
.hero-bottom a { color: #e9dcc0; text-decoration: none; }
.hero-bottom a:hover { color: #fff; }
.button {
    display: inline-flex; justify-content: center; align-items: center;
    min-height: 48px; padding: 13px 24px;
    background: var(--forest); color: #f9f5e9; border: 1px solid var(--forest);
    text-decoration: none; border-radius: 0;
    font: 600 .87rem/1.4 var(--sans); letter-spacing: .025em;
    transition: background .2s, color .2s, border-color .2s;
}
.button:hover { color: #fff; background: #354637; border-color: #354637; }
.hero .button, .feature-band .button { background: var(--gold-light); border-color: var(--gold-light); color: #263022; }
.hero .button:hover, .feature-band .button:hover { background: #f2dcaf; border-color: #f2dcaf; color: #162019; }
.button-secondary { background: transparent; border: 1px solid #8c9180; color: var(--forest); }
.button-secondary:hover { background: #e8e2d4; color: var(--forest); border-color: #65715c; }
.hero .button-secondary, .feature-band .button-secondary { background: transparent; border-color: #c3bda278; color: #f1e6d3; }
.hero .button-secondary:hover, .feature-band .button-secondary:hover { background: #ffffff0c; border-color: var(--gold-light); }
.button-light { background: var(--paper-light); color: var(--forest); border-color: var(--paper-light); }
.button-small { padding: 9px 16px; min-height: 40px; }
.text-link { font-size: .87rem; font-weight: 600; text-decoration-thickness: 1px; }

/* Quiet spacing and thin rules keep the scholarly directory browsable. */
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.card {
    background: #fffdf8; border: 1px solid var(--line); padding: 32px 30px;
    position: relative; transition: border-color .2s, background .2s;
}
.card:hover { border-color: #aa8b5b; background: #fffefa; }
.card h3 { font-size: 1.6rem; margin-bottom: 16px; }
.card h3 a { color: var(--forest); text-decoration: none; }
.card h3 a:hover { color: var(--gold-dark); }
.card p { font-size: .98rem; line-height: 1.7; color: var(--ink-soft); }
.card .card-kicker { font-size: .73rem; color: var(--gold-dark); }
.card-icon { width: 42px; height: 42px; color: var(--gold-dark); margin-bottom: 24px; }
.card-icon svg { width: 100%; height: 100%; }
.wide-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card ul { padding-left: 20px; font-size: .95rem; }
.card li + li { margin-top: 5px; }
.feature-band { background: var(--forest); color: var(--paper); padding-block: 72px; }
.feature-band .eyebrow { color: var(--gold-light); }
.feature-band h2 { color: #f7ecda; }
.feature-band p { color: #d6d6c8; }
.feature-band a:not(.button) { color: #e2c999; }
.split-section { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; }
.split-image { width: 100%; max-height: 520px; object-fit: cover; border: 1px solid #ae9b75; padding: 8px; }
.intro-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 60px; align-items: start; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-block: 32px; }
.stat-row > * { text-align: center; padding: 25px 15px; }
.stat-row > * + * { border-left: 1px solid var(--line); }
.stat-row strong { display: block; color: var(--gold-dark); font: 400 2rem/1.1 var(--serif); }
.stat-row span { display: block; font-size: .82rem; margin-top: 8px; color: var(--muted); }
.book-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.book-promotion { display: grid; grid-template-columns: minmax(125px, 180px) 1fr; gap: 30px; align-items: center; padding: 34px; background: #ece5d5; border: 1px solid #d9cdb6; }
.book-promotion.reverse { direction: rtl; }
.book-promotion.reverse > * { direction: ltr; }
.book-cover { max-height: 290px; width: auto; margin-inline: auto; box-shadow: 7px 10px 20px #28201335; }
.book-details h3 { font-size: 1.7rem; margin-bottom: 14px; }
.book-details p { font-size: .94rem; color: var(--ink-soft); }
.book-details .button { margin: 3px 8px 3px 0; }
.link-columns { columns: 2; column-gap: 45px; padding-left: 22px; }
.link-columns li { break-inside: avoid; margin-bottom: 9px; }
.alphabet-index { display: flex; flex-wrap: wrap; gap: 8px; padding: 20px 0; }
.alphabet-index a { min-width: 36px; text-align: center; padding: 4px 9px; border: 1px solid var(--line); text-decoration: none; }
.alphabet-index a:hover { background: var(--forest); color: var(--paper); }
.archive-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.archive-card { border: 1px solid var(--line); padding: 22px 24px; background: var(--paper-light); }
.archive-card h3 { font-size: 1.35rem; margin-bottom: 10px; }
.archive-card p { font-size: .9rem; color: var(--muted); margin-bottom: 0; }
.archive-card a { text-decoration: none; }
.archive-letter { color: var(--gold-dark); border-bottom: 1px solid var(--line); padding-bottom: 15px; margin-top: 40px; }
.pill { display: inline-block; font-size: .75rem; padding: 2px 9px; border: 1px solid var(--line); color: var(--muted); }

/* Reading pages: the article remains the visual center of the site. */
.page-header { background: var(--paper-deep); border-bottom: 1px solid var(--line); padding: 66px 0 54px; }
.page-header .container { max-width: 1150px; }
.page-header h1 { max-width: 1000px; margin-bottom: 23px; }
.page-deck { font: 400 1.25rem/1.65 var(--serif); color: var(--ink-soft); max-width: 900px; margin-bottom: 22px; }
.article-meta { display: flex; gap: 6px 20px; flex-wrap: wrap; color: var(--muted); font-size: .8rem; }
.reading-layout { display: grid; grid-template-columns: 225px minmax(0, 820px); gap: 70px; justify-content: center; padding-block: 58px 78px; }
.article-sidebar { position: relative; min-width: 0; }
.toc { position: sticky; top: 120px; max-height: calc(100vh - 150px); overflow-y: auto; border-left: 1px solid var(--line); padding-left: 20px; }
.toc-title { font: 600 .76rem/1.5 var(--sans); letter-spacing: .09em; text-transform: uppercase; color: var(--gold-dark); margin-bottom: 15px; }
.toc a { display: block; font-size: .83rem; text-decoration: none; line-height: 1.5; color: var(--muted); padding-block: 7px; }
.toc a:hover, .toc a[aria-current='location'] { color: var(--forest); }
.toc a[aria-current='location'] { font-weight: 650; }
.article-content { min-width: 0; overflow-wrap: break-word; }
.article-content > :first-child { margin-top: 0; }
.article-content p, .article-content li { font-family: var(--serif); font-size: 1.13rem; line-height: 1.88; }
.article-content p { margin-bottom: 24px; }
.article-content h2 { margin: 48px 0 23px; font-size: 2.15rem; padding-top: 8px; }
.article-content h3 { margin: 32px 0 15px; font-size: 1.55rem; }
.article-content h4 { margin: 26px 0 12px; font-size: 1.25rem; }
.article-content ul, .article-content ol { padding-left: 26px; margin-block: 20px 28px; }
.article-content li { margin-bottom: 10px; }
.article-content li::marker { color: #8c6c3e; }
.article-content a { text-decoration-thickness: 1px; }
.article-content a:hover { text-decoration-thickness: 2px; }
.article-content hr { border: 0; border-top: 1px solid var(--line); margin-block: 40px; }
.article-content figure { margin: 32px 0; }
.article-content figcaption { color: var(--muted); font-size: .82rem; margin-top: 10px; }
.article-content blockquote { border-left: 2px solid var(--gold); margin: 30px 0; padding: 10px 0 10px 28px; color: #5b5645; font-style: italic; }
.article-content blockquote p:last-child { margin-bottom: 0; }
.article-content table { width: 100%; border-collapse: collapse; margin-block: 26px; font-size: .94rem; line-height: 1.6; }
.article-content th { background: #e9e3d3; text-align: left; font-weight: 600; color: var(--forest); }
.article-content th, .article-content td { padding: 13px 16px; border: 1px solid var(--line); vertical-align: top; }
.article-content td { background: #fffdf75c; }
.article-content td p, .article-content td li { font-size: 1rem; }
.table-wrap { overflow-x: auto; max-width: 100%; }
.answer-summary { padding: 26px 30px; background: #ebe7d9; border-left: 3px solid #a78b59; margin-bottom: 32px; }
.answer-summary p { font-family: var(--serif); font-size: 1.18rem; line-height: 1.75; margin-bottom: 0; }
.quick-facts { display: grid; grid-template-columns: repeat(2, 1fr); margin: 24px 0 35px; border: 1px solid var(--line); background: #fffdf75c; }
.quick-facts > div { padding: 16px 20px; border-bottom: 1px solid var(--line); }
.quick-facts > div:nth-child(odd) { border-right: 1px solid var(--line); }
.quick-facts > div:nth-last-child(-n + 2) { border-bottom: 0; }
.quick-facts dt { color: var(--gold-dark); font-size: .73rem; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.quick-facts dd { margin: 0; font-size: .94rem; line-height: 1.55; }
.callout, .reading-note { padding: 22px 26px; border: 1px solid var(--line); margin: 30px 0; }
.callout p, .reading-note p { font-size: 1.05rem; }
.callout p:last-child, .reading-note p:last-child { margin-bottom: 0; }
.article-image { margin: 28px auto; max-height: 650px; object-fit: contain; }
.note-ref { line-height: 0; font: 600 .7em var(--sans); vertical-align: super; padding-left: 2px; }
.note-ref a { text-decoration: none; }
.footnotes { margin-top: 50px; border-top: 1px solid var(--line); padding-top: 8px; }
.article-content .footnotes h2 { font-size: 1.65rem; margin-top: 24px; }
.article-content .footnotes ol { padding-left: 23px; }
.article-content .footnotes li { font-size: .92rem; line-height: 1.75; padding-left: 5px; margin-bottom: 14px; color: var(--ink-soft); }
.footnotes li:target { background: #eee3cb; box-shadow: 0 0 0 8px #eee3cb; }
.related-reading { border-top: 1px solid var(--line); margin-top: 40px; padding-top: 8px; }
.article-content .related-reading .card { padding: 22px; }
.article-content .related-reading .card h3 { font-size: 1.3rem; margin: 0 0 10px; }
.article-content .related-reading .card p { font: 400 .9rem/1.6 var(--sans); margin-bottom: 0; }
.faq-list details { padding: 18px 0; border-top: 1px solid var(--line); }
.faq-list details:last-child { border-bottom: 1px solid var(--line); }
.faq-list summary { font: 400 1.2rem/1.45 var(--serif); padding-right: 20px; }
.faq-list details p { margin: 18px 0 0; font-size: 1.08rem; }
.breadcrumbs { padding: 22px 0; border-top: 1px solid var(--line); }
.article-content .breadcrumbs ol { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 7px; }
.article-content .breadcrumbs li { margin: 0; font: 400 .82rem/1.6 var(--sans); color: var(--muted); }
.breadcrumbs li + li::before { content: '›'; margin-right: 8px; color: #9d9177; }
.breadcrumbs a { text-decoration: none; }
.share-tools { display: flex; gap: 9px 15px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 24px; font: 400 .82rem/1.5 var(--sans); color: var(--muted); }
.share-tools > span:first-child { font-weight: 600; color: var(--ink); margin-right: 8px; }
.share-tools button, .share-tools a { font: inherit; border: 1px solid #c4bcaa; background: transparent; padding: 7px 13px; color: var(--ink); text-decoration: none; }
.share-tools button:hover, .share-tools a:hover { background: var(--paper-deep); }
.share-status { flex-basis: 100%; }

/* Search stays local: a small text index is the only data request. */
.search-page { max-width: 1000px; padding-block: 55px 85px; min-height: 65vh; }
#library-search > label { display: block; font-family: var(--serif); font-size: 1.5rem; margin-bottom: 14px; }
#library-search .search-field input { padding: 17px 20px; font-size: 1.08rem; }
#library-search .search-field button { padding-inline: 30px; }
.search-filter { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 22px; font-size: .9rem; }
.search-filter select { min-width: 230px; max-width: 100%; border: 1px solid #aaa18c; background: var(--paper-light); padding: 10px 35px 10px 12px; color: var(--ink); appearance: none; background-image: linear-gradient(45deg, transparent 50%, #59664f 50%), linear-gradient(135deg, #59664f 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
#search-status { padding: 28px 0 18px; color: var(--muted); font-size: .92rem; }
.search-result { border-top: 1px solid var(--line); padding: 25px 0 23px; }
.search-result h2 { font-size: 1.65rem; margin-bottom: 12px; }
.search-result h2 a { color: var(--forest); text-decoration: none; }
.search-result h2 a:hover { color: var(--gold-dark); text-decoration: underline; text-decoration-thickness: 1px; }
.search-result p { font: 400 1.04rem/1.75 var(--serif); color: var(--ink-soft); margin-bottom: 10px; }
.search-result .search-result-category { font: 600 .71rem/1.4 var(--sans); color: var(--gold-dark); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 8px; }
.search-result .search-result-url { font-size: .76rem; color: var(--muted); overflow-wrap: anywhere; }
mark { background: #ead9ad; color: inherit; padding: 0 1px; }
#search-more { margin-top: 25px; }
#search-suggestions { display: flex; flex-wrap: wrap; gap: 8px; }
#search-suggestions:empty { display: none; }
#search-suggestions > p { flex-basis: 100%; margin-bottom: 2px; color: var(--muted); }
#search-suggestions button { background: var(--paper-light); color: var(--forest); border: 1px solid var(--line); padding: 7px 12px; font-size: .9rem; }
#search-suggestions button:hover { border-color: var(--gold-dark); }
.empty-state, .error-state { padding: 28px; border: 1px solid var(--line); background: #fffdf76e; }
.empty-state h2, .error-state h2 { font-size: 1.65rem; }
.empty-state p:last-child, .error-state p:last-child { margin-bottom: 0; }

.site-footer { background: var(--forest-deep); color: #c4c7b8; padding: 60px 0 24px; border-top: 3px solid #9c7a49; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 50px; padding-bottom: 40px; }
.footer-brand .brand { margin-bottom: 20px; }
.footer-brand p { max-width: 310px; font-size: .88rem; line-height: 1.75; }
.footer-links h3 { font: 600 .76rem/1.5 var(--sans); letter-spacing: .09em; text-transform: uppercase; color: var(--gold-light); margin-bottom: 17px; }
.footer-links ul { margin: 0; padding: 0; list-style: none; }
.footer-links a { display: inline-block; padding-block: 4px; font-size: .85rem; color: #cdd0c2; text-decoration: none; }
.footer-links a:hover { color: var(--gold-light); text-decoration: underline; }
.footer-bottom { border-top: 1px solid #c4a06a30; padding-top: 23px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px 25px; font-size: .76rem; color: #a4aa99; }
.footer-bottom p { margin: 0; }
.footer-bottom a { color: #c2c6b7; text-decoration: none; }
.footer-bottom a:hover { color: var(--gold-light); }

@media (min-width: 1121px) and (max-width: 1300px) {
    .header-inner { gap: 20px; width: calc(100% - 40px); }
    .site-nav { gap: 17px; }
    .site-nav > a, .nav-dropdown > summary { font-size: .8rem; }
    .brand-name { font-size: 1.35rem; }
    .brand-mark { width: 28px; }
}
@media (max-width: 1120px) {
    :root { --header-height: 78px; }
    .header-inner { width: calc(100% - 48px); gap: 12px; }
    .brand { margin-right: auto; }
    .nav-toggle { display: inline-flex; order: 2; }
    .header-search { order: 3; }
    .site-nav { display: none; position: absolute; top: 100%; left: -24px; right: -24px; padding: 15px 24px 22px; max-height: calc(100dvh - 78px); overflow-y: auto; background: var(--forest-deep); border-bottom: 1px solid #c4a06a66; box-shadow: 0 20px 30px #10201525; }
    .site-nav.is-open { display: block; }
    .site-nav > a { display: block; padding-block: 14px; border-bottom: 1px solid #d4c39824; }
    .site-nav > a, .nav-dropdown > summary { font-size: .96rem; }
    .nav-dropdown > summary { padding: 14px 22px 14px 0; border-bottom: 1px solid #d4c39824; }
    .dropdown-panel { position: static; max-width: none; min-width: 0; width: auto; margin: 0; padding: 9px 0 9px 14px; border: 0; box-shadow: none; background: #ffffff04; }
    .dropdown-panel a { color: #d8d4c7; padding: 10px 12px; font-size: .9rem; }
    .dropdown-panel a:hover, .dropdown-panel a[aria-current='page'] { background: #ffffff09; color: var(--gold-light); }
    .dropdown-panel a + a { border-color: #d4c39812; }
    .search-popover { top: calc(100% + 17px); }
    .reading-layout { grid-template-columns: 185px minmax(0, 1fr); gap: 40px; }
    .book-promotion { grid-template-columns: 130px 1fr; padding: 26px; gap: 22px; }
    .book-pair { gap: 22px; }
    .footer-inner { gap: 30px; }
}
@media (max-width: 900px) {
    .container { width: calc(100% - 48px); }
    .section { padding-block: 65px; }
    .hero { min-height: 600px; }
    .hero-inner { width: calc(100% - 64px); padding-block: 80px; }
    .hero::before { background: linear-gradient(90deg, #111c18f0, #15201bc9 60%, #131d1780); }
    .hero h1 { max-width: 650px; }
    .card-grid { gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .card { padding: 26px; }
    .split-section, .intro-grid { gap: 35px; }
    .book-pair { grid-template-columns: 1fr; }
    .book-promotion { grid-template-columns: 170px 1fr; }
    .book-cover { max-height: 255px; }
    .archive-grid { grid-template-columns: 1fr 1fr; }
    .reading-layout { display: block; max-width: 820px; padding-top: 32px; }
    .article-sidebar { margin-bottom: 32px; }
    .toc { position: static; max-height: none; padding: 16px 20px; border: 1px solid var(--line); background: #efe9dc; display: flex; flex-wrap: wrap; gap: 0 18px; }
    .toc-title { flex-basis: 100%; margin-bottom: 8px; }
    .toc a { display: inline-block; padding-block: 4px; }
    .footer-inner { grid-template-columns: repeat(3, 1fr); }
    .footer-brand { grid-column: 1 / -1; }
    .footer-brand p { max-width: 600px; }
}
@media (max-width: 600px) {
    :root { --header-height: 72px; }
    body { font-size: 17px; }
    html { scroll-padding-top: 90px; }
    .container { width: calc(100% - 36px); }
    .header-inner { width: calc(100% - 30px); gap: 4px; }
    .brand { gap: 8px; }
    .brand-name { font-size: 1.23rem; letter-spacing: .12em; }
    .brand-mark { width: 26px; }
    .brand-tagline { font-size: .51rem; letter-spacing: .05em; margin-top: 5px; }
    .site-nav { left: -15px; right: -15px; padding-inline: 22px; max-height: calc(100dvh - 72px); }
    .icon-button { width: 40px; height: 40px; padding: 9px; }
    .search-popover { top: calc(100% + 16px); right: 0; width: calc(100vw - 30px); max-width: 420px; padding: 22px; }
    .search-popover .search-field button { padding-inline: 14px; }
    .hero { min-height: 590px; }
    .hero::after { inset: 12px; }
    .hero-inner { width: calc(100% - 48px); padding: 67px 0 70px; }
    .hero::before { background: linear-gradient(90deg, #101a16ed, #15201bba), linear-gradient(0deg, #101a16b0, transparent); }
    .hero .eyebrow { font-size: .7rem; margin-bottom: 20px; }
    .hero h1 { font-size: clamp(2.9rem, 10vw, 4rem); margin-bottom: 22px; }
    .hero-copy { font-size: 1rem; }
    .hero-actions { gap: 12px; }
    .hero-actions .button { padding-inline: 18px; }
    .hero-bottom { padding: 18px 24px; gap: 12px 25px; font-size: .79rem; justify-content: flex-start; }
    .section { padding-block: 50px; }
    .section-heading { margin-bottom: 26px; }
    .section-intro { font-size: .98rem; }
    h2 { font-size: 2rem; }
    .eyebrow { font-size: .73rem; }
    .card-grid, .wide-cards, .archive-grid { grid-template-columns: 1fr; }
    .card { padding: 26px; }
    .card h3 { font-size: 1.5rem; }
    .split-section, .intro-grid { grid-template-columns: 1fr; gap: 30px; }
    .feature-band { padding-block: 50px; }
    .stat-row strong { font-size: 1.7rem; }
    .stat-row span { font-size: .73rem; }
    .stat-row > * { padding: 20px 9px; }
    .book-promotion { grid-template-columns: 110px 1fr; gap: 22px; padding: 24px 20px; }
    .book-details h3 { font-size: 1.4rem; }
    .book-details p { font-size: .88rem; }
    .book-details .button { padding: 10px 14px; font-size: .78rem; }
    .link-columns { columns: 1; }
    .page-header { padding: 40px 0 34px; }
    .page-header h1 { font-size: clamp(2.35rem, 8vw, 3.2rem); overflow-wrap: break-word; }
    .page-deck { font-size: 1.14rem; }
    .article-meta { font-size: .75rem; gap: 5px 15px; }
    .reading-layout { padding-block: 28px 50px; }
    .article-content p, .article-content li { font-size: 1.09rem; line-height: 1.85; }
    .article-content h2 { font-size: 1.8rem; margin-top: 36px; }
    .article-content h3 { font-size: 1.4rem; }
    .article-content ul, .article-content ol { padding-left: 22px; }
    .answer-summary { padding: 22px; }
    .answer-summary p { font-size: 1.1rem; }
    .quick-facts { grid-template-columns: 1fr; }
    .quick-facts > div { padding: 13px 17px; border-right: 0 !important; }
    .quick-facts > div:nth-last-child(-n + 2) { border-bottom: 1px solid var(--line); }
    .quick-facts > div:last-child { border-bottom: 0; }
    .article-content table { font-size: .85rem; }
    .article-content th, .article-content td { padding: 10px; }
    .article-content .footnotes li { font-size: .88rem; }
    .search-page { padding-block: 35px 60px; }
    #library-search .search-field input { padding: 15px 13px; font-size: 1rem; }
    #library-search .search-field button { padding-inline: 18px; }
    .search-filter { gap: 8px; }
    .search-filter label { flex-basis: 100%; }
    .search-filter select { width: 100%; }
    .search-result h2 { font-size: 1.5rem; }
    .footer-inner { grid-template-columns: 1fr 1fr; gap: 28px; }
    .footer-links:last-child { grid-column: 1 / -1; }
    .footer-links:last-child ul { display: flex; flex-wrap: wrap; gap: 0 22px; }
    .site-footer { padding-top: 42px; }
    .footer-bottom { font-size: .74rem; }
}
@media (max-width: 370px) {
    .brand-mark { display: none; }
    .brand-name { font-size: 1.18rem; }
    .hero h1 { font-size: 2.7rem; }
    .hero-actions { flex-direction: column; align-items: flex-start; }
    .book-promotion { grid-template-columns: 1fr; }
    .book-cover { max-height: 220px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media print {
    .site-header, .site-footer, .article-sidebar, .share-tools, .hero-actions, .search-popover, .skip-link { display: none !important; }
    body { background: #fff; color: #111; font-size: 11pt; }
    .container { width: 100%; max-width: none; }
    .page-header { background: none; padding: 0 0 20px; }
    .page-header h1 { font-size: 28pt; }
    .reading-layout { display: block; padding: 20px 0; }
    .article-content p, .article-content li { font-size: 11pt; line-height: 1.6; }
    .article-content h2 { font-size: 20pt; break-after: avoid; }
    .article-content h3 { font-size: 15pt; break-after: avoid; }
    a { color: #111; }
    .answer-summary, .quick-facts { background: none; }
    .footnotes { break-inside: auto; }
}

/* Collection directories and publisher illustrations. */

.hero .button-light { background: transparent; border-color: #d3c2a4; color: #f7f1e4; }
.hero .button-light:hover { background: #f7f1e414; color: #fff; }
.section-more { text-align: center; margin: 34px 0 0; }
.card-link { display: block; margin-top: auto; padding-top: 20px; color: var(--gold-dark); font: 600 .84rem/1.5 var(--sans); }
.card { display: flex; flex-direction: column; text-decoration: none; }
.card:hover .card-link { text-decoration: underline; text-underline-offset: 4px; }
.collections-section { background: #eae3d3; border-top: 1px solid var(--line); }
.book-promotion { grid-template-columns: 1.15fr 1fr; padding: 0; gap: 0; margin-bottom: 30px; background: #f6f1e6; }
.book-promotion .book-cover { width: 100%; max-width: none; height: 100%; min-height: 320px; object-fit: cover; box-shadow: none; }
.book-promotion .book-details { padding: 40px; }
.book-promotion h3 { font-size: clamp(1.8rem, 2.8vw, 2.6rem); }
.directory-list { display: grid; gap: 0; margin: 22px 0 38px; border-top: 1px solid var(--line); }
.directory-entry { display: grid; gap: 8px; padding: 22px 4px; border-bottom: 1px solid var(--line); text-decoration: none; }
.directory-entry > span { font: 1.3rem/1.35 var(--serif); color: var(--forest); }
.directory-entry > small { font: .88rem/1.65 var(--sans); color: var(--muted); }
.directory-entry:hover > span { color: var(--gold-dark); text-decoration: underline; text-underline-offset: 4px; }
.toc h2 { font: 600 .8rem/1.5 var(--sans); letter-spacing: .08em; text-transform: uppercase; margin: 0 0 16px; }
.collection-callout { margin-top: 42px; padding: 30px; background: #eae3d3; border: 1px solid var(--line); }
.collection-callout h2 { margin-top: 0; font-size: 1.7rem; }
.collection-callout p { font-size: 1rem; }
.collection-callout .hero-actions { gap: 10px 24px; font-size: .9rem; font-family: var(--sans); }
.article-content figure { margin: 25px 0; }
.article-content figure img { display: block; width: 100%; height: auto; }
.footnote-back { font-size: .78rem; white-space: nowrap; }
.footer-links h2 { font: 600 .8rem/1.5 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--gold-light); margin-bottom: 17px; }
.footer-links a { display: block; }
.footer-brand > .brand-mark { width: 44px; height: 50px; color: var(--gold-light); }
.footer-brand > p:first-of-type { font: 1.6rem/1.2 var(--serif); letter-spacing: .12em; color: var(--paper); margin-top: 12px; }
.video-frame { width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; }
.search-page > form > select { max-width: 100%; margin-top: 8px; }
#search-more { margin-top: 22px; padding: 12px 24px; background: var(--forest); color: var(--paper); border: 1px solid var(--forest); }
@media (max-width: 900px) {
    .book-promotion .book-details { padding: 28px; }
    .book-promotion .book-cover { min-height: 280px; }
}
@media (max-width: 600px) {
    .book-promotion { grid-template-columns: 1fr; padding: 0; }
    .book-promotion .book-cover { min-height: 0; height: auto; }
    .book-promotion .book-details { padding: 26px; }
    .collection-callout { padding: 23px; }
    .directory-entry { padding-block: 20px; }
    .directory-entry > span { font-size: 1.2rem; }
}
@media print {
    .collection-callout { display: none; }
}
@media (min-width: 1121px) {
    .dropdown-panel { max-height: calc(100dvh - var(--header-height) - 16px); overflow-y: auto; overscroll-behavior: contain; }
}
@media (max-width: 1120px) {
    .dropdown-panel { max-height: none; overflow: visible; }
}
.section > .search-page { padding-block: 0; margin-inline: auto; }
.search-popover { max-height: calc(100dvh - var(--header-height) - 12px); overflow-y: auto; }
.restored-videos .video-frame { display: block; margin-block: 24px; }
.note-separator { padding-right: .08em; }

/* Keep the search input and action visibly separate at every screen width. */
.search-popover {
    width: min(460px, calc(100vw - 32px));
    max-width: none;
}
.search-popover form { min-width: 0; }
.search-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 10px;
    min-width: 0;
    max-width: 100%;
}
.search-field input {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    border-radius: 2px;
}
.search-field button {
    position: static;
    min-width: 0;
    min-height: 48px;
    border-radius: 2px;
    line-height: 1.25;
    white-space: nowrap;
}
.search-popover .search-field input { padding: 12px 14px; }
.search-popover .search-field button { padding: 12px 18px; }
.search-field input:focus-visible,
.search-field button:focus-visible {
    outline: 3px solid var(--gold-dark);
    outline-offset: 3px;
}

/* Match the existing JavaScript breakpoint while making room for longer labels. */
@media (min-width: 1121px) and (max-width: 1400px) {
    .header-inner { gap: 18px; }
    .site-nav { gap: 16px; }
    .site-nav > a, .nav-dropdown > summary { font-size: .8rem; }
}
@media (max-width: 1120px) {
    .nav-dropdown > summary { white-space: normal; overflow-wrap: break-word; }
}
@media (max-width: 480px) {
    .search-field { grid-template-columns: minmax(0, 1fr); }
    .search-field button { width: 100%; }
}

/* Preserve the complete tagline on one line at every header size. */
.brand-name { min-width: 0; }
.brand-mark { flex-shrink: 0; }
.brand-tagline {
    max-width: none;
    font-size: .6875rem;
    line-height: 1.35;
    letter-spacing: 0;
    white-space: nowrap;
}
@media (min-width: 1121px) and (max-width: 1400px) {
    .header-inner { gap: 16px; }
    .brand-tagline { font-size: .625rem; }
}
@media (max-width: 1120px) {
    .brand { min-width: 0; }
    .nav-toggle, .header-search { flex-shrink: 0; }
    .site-nav { max-height: calc(100dvh - var(--header-height)); }
}
@media (max-width: 600px) {
    :root { --header-height: 80px; }
    html { scroll-padding-top: calc(var(--header-height) + 18px); }
    .header-inner { padding-block: 6px 26px; }
    .brand-tagline {
        position: absolute;
        left: 0;
        bottom: 10px;
        margin: 0;
        font-size: min(.6875rem, calc((100vw - 30px) / 35));
    }
    .header-search { position: static; }
    .search-popover { top: calc(100% + 8px); }
    .hero-bottom {
        flex-wrap: nowrap;
        justify-content: space-between;
        padding-inline: 12px;
        gap: 6px;
        font-size: clamp(.72rem, 3.2vw, .75rem);
    }
    .hero-bottom > span { white-space: nowrap; }
}

/* Homepage portrait framing, paired actions, and footer refinements. */
.hero .hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(100%, 460px);
    gap: 14px;
    align-items: stretch;
}
.hero .hero-actions .button { min-width: 0; text-align: center; }
.hero-bottom { font-style: italic; }
@media (min-width: 901px) {
    .hero-image {
        top: calc(12px - 7.5vw);
        height: calc(100% + 7.5vw);
        object-position: center top;
    }
}
@media (max-width: 900px) {
    .hero-image {
        left: 85%;
        right: auto;
        width: auto;
        min-width: 200%;
        max-width: none;
        object-position: center top;
        transform: translateX(-45.6%);
    }
}
@media (max-width: 600px) {
    .hero-image {
        top: calc(12px - max(12.7%, 15vw));
        height: calc(100% + max(12.7%, 15vw));
    }
    .hero .eyebrow { max-width: 70%; }
    .hero .hero-actions { gap: 8px; }
    .hero .hero-actions .button {
        min-height: 52px;
        padding: 10px 6px;
        font-size: .78rem;
        line-height: 1.3;
        letter-spacing: 0;
        white-space: normal;
    }
}

/* Complete site name, intentional phrase wrapping, and the expanded footer. */
.hero .eyebrow > span { display: inline-block; white-space: nowrap; }
.feature-band a:not(.button) {
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: .22em;
    text-decoration-thickness: 1px;
    transition: color .18s, text-decoration-color .18s;
}
.feature-band a:not(.button):hover,
.feature-band a:not(.button):focus-visible {
    color: #fff0cf;
    text-decoration-color: currentColor;
}
.feature-band a:not(.button):focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: 5px;
}
.footer-brand .footer-description {
    font-size: .88rem;
    white-space: normal;
}
@media (max-width: 600px) {
    .brand-name { font-size: clamp(1.05rem, 4.8vw, 1.23rem); letter-spacing: .1em; }
    .footer-inner > .footer-links { text-align: center; }
    .footer-about { justify-self: center; text-align: center; }
}

/* The compact contents panel gives its heading a complete first row. */
@media (max-width: 900px) {
    .toc { justify-content: center; gap: 4px 18px; }
    .toc h2 {
        flex: 0 0 100%;
        margin: 0 0 8px;
        text-align: center;
    }
    .toc > a {
        max-width: 100%;
        text-align: center;
        overflow-wrap: anywhere;
    }
}

/* The publisher's comparison, rebuilt as a searchable, accessible HTML table. */
.canon-comparison {
    --comparison-border: var(--line, #d9d0be);
    margin-block: 3.5rem;
    color: var(--ink, #232a26);
}
.comparison-intro { max-width: 52rem; }
.comparison-intro .comparison-kicker {
    margin-bottom: .75rem;
    color: var(--gold-dark, #806039);
    font: 600 .73rem/1.5 var(--sans, sans-serif);
    letter-spacing: .16em;
    text-transform: uppercase;
}
.comparison-intro h2 { margin-bottom: 1.25rem; }
.comparison-intro p { font-size: 1rem; }
.comparison-key {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem 1.5rem;
    margin-block: 1.5rem .8rem;
    padding: 1rem 1.2rem;
    border: 1px solid var(--comparison-border);
    background: var(--paper-deep, #ece5d5);
    font: .75rem/1.5 var(--sans, sans-serif);
}
.comparison-key > span { display: inline-flex; align-items: center; gap: .5rem; }
.canon-comparison .comparison-scroll-hint {
    margin-bottom: .9rem;
    color: var(--muted, #6b6b5e);
    font: .76rem/1.65 var(--sans, sans-serif);
}
.comparison-table-wrap {
    position: relative;
    max-height: min(78vh, 53rem);
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--comparison-border);
    background: var(--paper-light, #fffdf8);
    scrollbar-color: var(--gold, #c4a06a) var(--paper-deep, #ece5d5);
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}
.comparison-table-wrap:focus-visible {
    outline: 3px solid var(--gold-dark, #806039);
    outline-offset: 5px;
}
.canon-comparison .comparison-table {
    width: 100%;
    min-width: 1060px;
    margin: 0;
    border-spacing: 0;
    border-collapse: separate;
    table-layout: fixed;
    font: .77rem/1.45 var(--sans, sans-serif);
}
.comparison-table caption {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}
.comparison-book-column { width: 29%; }
.comparison-featured-column { width: 15%; }
.canon-comparison .comparison-table th,
.canon-comparison .comparison-table td {
    padding: .58rem .65rem;
    border: 0;
    border-right: 1px solid var(--comparison-border);
    border-bottom: 1px solid var(--comparison-border);
    vertical-align: middle;
    text-align: center;
    overflow-wrap: normal;
}
.comparison-table tr > :last-child { border-right: 0; }
.comparison-table tbody tr:last-child > * { border-bottom: 0; }
.canon-comparison .comparison-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    padding: 1rem .65rem;
    background: var(--forest, #18251f);
    color: var(--paper-light, #fffdf8);
    border-color: #415044;
    font: 400 1rem/1.25 var(--serif, Georgia, serif);
}
.comparison-table thead th > span {
    display: block;
    margin-top: .45rem;
    color: var(--gold-light, #e1c798);
    font: 400 .6rem/1.4 var(--sans, sans-serif);
}
.canon-comparison .comparison-table thead th:first-child {
    left: 0;
    z-index: 5;
    padding-left: 1rem;
    text-align: left;
}
.canon-comparison .comparison-table tbody th[scope="row"] {
    position: sticky;
    left: 0;
    z-index: 1;
    padding-left: 1rem;
    background: var(--paper-light, #fffdf8);
    text-align: left;
    font-weight: 500;
    box-shadow: 3px 0 0 #18251f06;
}
.canon-comparison .comparison-table tbody tr:nth-child(even) > * {
    background-color: #f4efe4;
}
.canon-comparison .comparison-table tbody tr > .comparison-featured {
    background-color: #e8eee2;
}
.canon-comparison .comparison-table tbody tr:nth-child(even) > .comparison-featured {
    background-color: #e0e8d9;
}
.canon-comparison .comparison-table thead .comparison-featured {
    background: #344635;
    box-shadow: inset 0 3px 0 var(--gold, #c4a06a);
}
.canon-comparison .comparison-table .comparison-section th {
    padding: .8rem 1rem;
    background: var(--paper-deep, #ece5d5);
    color: var(--gold-dark, #806039);
    border-block: 1px solid #bfa679;
    font: 600 .66rem/1.4 var(--sans, sans-serif);
    letter-spacing: .1em;
    text-align: left;
    text-transform: uppercase;
}
.canon-comparison .comparison-table tbody th.comparison-subwork {
    padding-left: 2rem;
    font-weight: 400;
}
.comparison-check {
    display: inline-block;
    color: #36533a;
    font: 600 1.15rem/1 var(--sans, sans-serif);
}
.comparison-empty { color: #9a9b8d; font-weight: 400; }
.comparison-related {
    color: var(--gold-dark, #806039);
    font: 500 .64rem/1.35 var(--sans, sans-serif);
}
.comparison-digital {
    display: inline-block;
    padding: .14rem .35rem;
    border: 1px solid #acbda4;
    color: #36533a;
    background: #f2f5ed;
    font: 500 .56rem/1.3 var(--sans, sans-serif);
    letter-spacing: .025em;
}
.comparison-table td > .comparison-digital { display: table; margin: .25rem auto 0; }
.comparison-table sup { margin-left: .15rem; font-size: .62rem; }
.comparison-table sup a { color: #735122; text-decoration-thickness: 1px; }
.canon-comparison .comparison-table .comparison-library-row > * {
    padding-block: 1rem;
    border-top: 2px solid var(--gold, #c4a06a);
}
.canon-comparison .comparison-table .comparison-library-row th[scope="row"] {
    background: var(--paper-deep, #ece5d5);
    font-family: var(--serif, Georgia, serif);
    font-size: .95rem;
}
.comparison-notes {
    padding: 1.7rem 1.4rem 1rem;
    border: 1px solid var(--comparison-border);
    border-top: 0;
    background: var(--paper-deep, #ece5d5);
}
.comparison-notes h3 { margin: 0 0 1rem; font-size: 1.45rem; }
.comparison-notes p,
.comparison-notes li { font: .8rem/1.75 var(--sans, sans-serif); }
.comparison-notes ol { margin: 1rem 0 1.2rem; padding-left: 1.5rem; }
.comparison-notes li { margin-bottom: .6rem; padding-left: .25rem; }
.comparison-notes li::marker { color: var(--gold-dark, #806039); font-weight: 600; }
.comparison-notes li:target { outline: 2px solid var(--gold, #c4a06a); outline-offset: 5px; }
.comparison-notes .comparison-source { color: var(--muted, #6b6b5e); font-size: .72rem; }
@media (max-width: 600px) {
    .canon-comparison { margin-block: 2.5rem; }
    .comparison-key { padding: .9rem; gap: .7rem; }
    .comparison-key > span { width: 100%; }
    .comparison-table-wrap { max-height: 70vh; }
    .canon-comparison .comparison-table { min-width: 960px; font-size: .73rem; }
    .comparison-book-column { width: 25%; }
    .canon-comparison .comparison-table tbody th[scope="row"] { padding-left: .7rem; }
    .canon-comparison .comparison-table tbody th.comparison-subwork { padding-left: 1.35rem; }
    .comparison-notes { padding: 1.3rem 1rem .8rem; }
}
@media print {
    .comparison-table-wrap { max-height: none; overflow: visible; border: 0; }
    .canon-comparison .comparison-table { min-width: 0; font-size: 7pt; }
    .canon-comparison .comparison-table thead th,
    .canon-comparison .comparison-table tbody th[scope="row"] { position: static; }
    .canon-comparison .comparison-table thead th { font-size: 8pt; }
    .canon-comparison .comparison-table th,
    .canon-comparison .comparison-table td { padding: 3pt; }
    .comparison-table tr { break-inside: avoid; }
    .comparison-scroll-hint { display: none; }
    .comparison-notes { break-before: auto; }
}

/* Reference illustrations remain modest in the article and enlarge on demand. */
.article-content figure.reference-image {
    width: min(100%, 560px);
    margin: 30px auto 36px;
    text-align: center;
}
.reference-image .image-expand {
    display: inline-flex;
    max-width: 100%;
    padding: 10px;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    background: var(--paper-light);
    color: var(--gold-dark);
    text-decoration: none;
    cursor: zoom-in;
    transition: border-color .18s, box-shadow .18s;
}
.article-content figure.reference-image img {
    width: auto;
    height: auto;
    max-width: min(100%, 400px);
    max-height: 300px;
    object-fit: contain;
}
.reference-image .image-expand:hover {
    border-color: var(--gold-dark);
    box-shadow: 0 4px 18px #18251f12;
}
.reference-image .image-expand:focus-visible {
    outline: 3px solid var(--gold-dark);
    outline-offset: 4px;
}
.reference-image .image-zoom {
    font: 600 .875rem/1.4 var(--sans);
    letter-spacing: .025em;
}
.reference-image figcaption {
    margin-top: 12px;
    font: .94rem/1.6 var(--serif);
    color: var(--ink-soft);
    text-align: left;
    overflow-wrap: anywhere;
}
.reference-image .image-caption,
.reference-image .image-credit,
.image-viewer .image-caption,
.image-viewer .image-credit {
    display: block;
}
.reference-image .image-credit {
    margin-top: 7px;
    font: .875rem/1.6 var(--sans);
    color: var(--muted);
}

/* Native dialog supplies modal focus containment and Escape dismissal. */
.image-viewer {
    width: min(1100px, calc(100vw - 32px));
    max-width: none;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 0;
    border: 1px solid var(--gold);
    background: var(--paper);
    color: var(--ink);
    box-shadow: 0 20px 90px #0008;
}
.image-viewer::backdrop { background: #07100de3; }
.image-viewer[open] { display: flex; flex-direction: column; }
.image-viewer .image-viewer-bar {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--line);
}
.image-viewer .image-viewer-title {
    margin: 0;
    font: 400 1.2rem/1.4 var(--serif);
    letter-spacing: 0;
}
.image-viewer .image-viewer-close {
    min-width: 44px;
    min-height: 44px;
    padding: 7px 15px;
    border: 1px solid var(--forest);
    background: var(--forest);
    color: var(--paper-light);
    font: 600 .9rem/1.4 var(--sans);
}
.image-viewer .image-viewer-close:hover { background: var(--forest-light); }
.image-viewer .image-viewer-close:focus-visible {
    outline: 3px solid var(--gold-dark);
    outline-offset: 3px;
}
.image-viewer .image-viewer-content {
    min-height: 0;
    padding: 18px;
    overflow: auto;
    overscroll-behavior: contain;
}
.image-viewer .image-viewer-figure { margin: 0; }
.image-viewer .image-viewer-image {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: min(72vh, 1000px);
    max-height: min(72dvh, 1000px);
    margin-inline: auto;
    object-fit: contain;
}
.image-viewer .image-viewer-caption {
    margin: 18px auto 0;
    max-width: 900px;
    font: 1rem/1.6 var(--serif);
    overflow-wrap: anywhere;
}
.image-viewer .image-credit {
    margin-top: 8px;
    color: var(--ink-soft);
    font: .875rem/1.6 var(--sans);
}
@media (max-width: 600px) {
    .article-content figure.reference-image { margin-block: 24px 30px; }
    .reference-image .image-expand { padding: 8px; }
    .article-content figure.reference-image img { max-height: 270px; }
    .image-viewer { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); }
    .image-viewer .image-viewer-bar { padding: 8px 12px; }
    .image-viewer .image-viewer-content { padding: 12px; }
    .image-viewer .image-viewer-image { max-height: 65dvh; }
}
@media (prefers-reduced-motion: reduce) {
    .reference-image .image-expand { transition: none; }
}
