/* Keeper's Journal, shared with beastbound.net and store.beastbound.net: walnut cover, parchment, brass and ivy frame. */
:root {
    --ink: #382315;
    --ink-soft: #655338;
    --gold: #a78142;
    --green: #365238;
    --line: #b99c64;
    --ui: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --serif: Georgia, "Times New Roman", serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, ::before, ::after { box-sizing: border-box; }

html { background: #25160c; scroll-behavior: smooth; scroll-padding-top: 24px; }

body {
    max-width: 1680px;
    margin: auto;
    padding: 0 0 26px;
    background: #2b1b12 url("/images/walnut-v1.webp") center top / 650px;
    color: var(--ink);
    font: 16px/1.7 var(--ui);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }
a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: #1f3a22; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.15; letter-spacing: -.02em; margin: 0; }
:is(a, button, input, summary, [tabindex]):focus-visible { outline: 3px solid #ae7e26; outline-offset: 3px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 12px 18px; background: #fffcf5; transform: translateY(-150%); }
.skip-link:focus { transform: none; }

/* The frame sits above the page and never takes clicks. */
.book-frame {
    position: fixed;
    z-index: 80;
    inset: 0;
    max-width: 1680px;
    margin: auto;
    pointer-events: none;
    border: 82px solid transparent;
    border-image: url("/images/book-frame-v1.webp") 110 / 82px / 0 stretch;
}

/* Header: logo over the chapter column, search in the middle, sibling sites at the right. */
.site-header {
    position: relative;
    z-index: 81;
    display: grid;
    grid-template-columns: 25.2% minmax(0, 1fr) auto;
    align-items: center;
    gap: 28px;
    height: 134px;
    padding: 30px 118px 0 105px;
    background:
        repeating-linear-gradient(0deg, #140a0377 0 3px, #b77c3822 4px 5px, transparent 6px 30px),
        linear-gradient(#35211366, #160b04aa),
        url("/images/walnut-v1.webp") center / 950px;
    border-bottom: 4px ridge #77502c;
    box-shadow: 0 3px 6px #29160988;
}
.brand { justify-self: start; width: 218px; }
.brand img { display: block; width: 218px; filter: drop-shadow(0 3px 1px #0007); transform: translateY(14px); }
.site-links { display: flex; }
.site-links a { padding: 8px 20px; color: #fff0cd; font: 700 18px/1.2 var(--serif); text-decoration: none; white-space: nowrap; }
.site-links a + a { border-left: 1px solid #a5864b88; }
.site-links a:hover { color: #ffe5a0; text-decoration: underline; text-underline-offset: 5px; }

.search { position: relative; width: 100%; max-width: 540px; }
.search input {
    width: 100%;
    height: 50px;
    padding: 0 18px 0 50px;
    background: #fbf1d6 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23382315' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='10' cy='10' r='6.5'/%3E%3Cpath d='m15 15 6 6'/%3E%3C/svg%3E") 17px center / 21px no-repeat;
    border: 2px solid #c9a35c;
    border-radius: 4px;
    box-shadow: 0 0 0 2px #2b190c, inset 0 2px 4px #6b4c2433;
    color: var(--ink);
    font: 18px/1 var(--serif);
}
.search input::placeholder { color: #75644a; }
.search input::-webkit-search-cancel-button { cursor: pointer; }
.search-results {
    position: absolute;
    z-index: 90;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    max-height: min(70vh, 520px);
    overflow-y: auto;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: #fbf3df;
    border: 2px solid #a88443;
    border-radius: 6px;
    box-shadow: 0 0 0 1px #6b4c24, 0 14px 30px #1d0f0599;
    text-align: left;
}
.search-results a { display: block; padding: 9px 12px; border-radius: 4px; color: var(--ink); text-decoration: none; }
.search-results a:is(:hover, :focus-visible, [aria-selected="true"]) { background: #e9dbb8; outline: none; }
.search-results strong { display: block; font: 700 17px/1.3 var(--serif); color: #2c1a0e; }
.search-results span { display: block; margin-top: 2px; font-size: 14px; line-height: 1.45; color: var(--ink-soft); }
.search-results mark { background: #f3d98c; color: inherit; border-radius: 2px; }
.search-results .empty { padding: 10px 12px; color: var(--ink-soft); font-size: 15px; }

/* The journal: chapter index on the left leaf, the page on the right. */
.journal {
    position: relative;
    display: grid;
    grid-template-columns: 25.2% minmax(0, 1fr);
    width: calc(100% - 54px);
    min-height: calc(100vh - 160px);
    margin: 0 auto;
    background: linear-gradient(#fff6db22, #fff6db22), url("/images/parchment-v1.webp");
    border: 1px solid #9e7945;
    border-top: 0;
    border-radius: 0 0 12px 12px;
    box-shadow: inset 0 0 30px #78461477, 0 3px 0 #37200d, 0 6px 0 #b0884a, 0 9px 0 #2b190c;
}

.chapters {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 46px 26px 0 48px;
    background: linear-gradient(90deg, #6e41172b, transparent 12%, transparent 87%, #ad8b5466 97%, #69452088 99%, #f0d9a8);
    border-radius: 0 10px 10px 0;
    box-shadow: inset -5px 0 10px -5px #5b381c;
}
.chapters ul { margin: 0; padding: 0; list-style: none; }
.chapter-link {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 58px;
    padding: 6px 30px 6px 10px;
    border-bottom: 1px solid #b7965927;
    color: #4b250f;
    font: 700 clamp(18px, 1.45vw, 23px)/1.2 var(--serif);
    text-decoration: none;
}
.chapter-link img { flex: none; width: 38px; height: 38px; filter: drop-shadow(0 1px 0 #4b2d12); }
.chapter-link::after { content: "›"; position: absolute; right: 12px; color: #886439; font: 400 28px/1 var(--serif); }
.chapter-link::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    clip-path: polygon(0 0, 100% 0, 97% 50%, 100% 100%, 0 100%);
}
.chapter-link:hover { color: #4b250f; }
.chapter-link:hover::before { background: #a3834222; }
/* Cloth ribbon for the current chapter, as on the store's chapter links. */
.chapter-link[aria-current] { color: #fff0c6; text-shadow: 0 1px 2px #172614; }
.chapter-link[aria-current]::before {
    background: linear-gradient(110deg, #315132ed, #425d36e6), url("/images/parchment-v1.webp");
    box-shadow: inset 0 0 0 2px #284226, inset 0 0 0 4px #a5a46699;
}
.chapter-link[aria-current]::after { color: #f0e0b4; transform: rotate(90deg); }
.chapter.open > ul { padding: 8px 0 12px 66px; border-bottom: 1px solid #b7965927; }
.chapter.open > ul a {
    position: relative;
    display: block;
    padding: 5px 0;
    color: #4b3018;
    font: 16px/1.35 var(--serif);
    text-decoration: none;
}
.chapter.open > ul a:hover { color: var(--green); text-decoration: underline; }
.chapter.open > ul a[aria-current] { color: #2a3f22; font-weight: 700; }
.chapter.open > ul a[aria-current]::before {
    content: "";
    position: absolute;
    left: -17px;
    top: 50%;
    width: 7px;
    height: 7px;
    margin-top: -4px;
    background: #a78142;
    transform: rotate(45deg);
}
.chapters-toggle { display: none; }
/* The chapter list stays in view on long pages. */
.chapter-list { position: sticky; top: 46px; max-height: calc(100vh - 92px); overflow-y: auto; scrollbar-width: thin; }
.island { flex: 1; min-height: 340px; margin: 26px -24px 0 -46px; background: url("/images/sidebar-island-v1.webp") left bottom / auto 340px no-repeat; }

.page {
    position: relative;
    min-width: 0;
    padding: 30px clamp(36px, 4.4vw, 70px) 28px;
    background: linear-gradient(90deg, #60411e44, transparent 20px, transparent calc(100% - 22px), #81552522);
    border-left: 1px solid #a88652;
    border-radius: 12px 0 0 12px;
    box-shadow: inset 7px 0 10px -6px #654423;
}
.page::before { content: ""; position: absolute; inset: 16px 20px; pointer-events: none; border: 1px solid #b394574d; border-radius: 5px; }
.page::after { content: "❖"; position: absolute; top: 8px; left: 17px; color: #b29159; font: 20px var(--serif); pointer-events: none; }

.breadcrumb { position: relative; font: 15px/1.4 var(--serif); color: var(--ink-soft); }
.breadcrumb a { color: var(--ink-soft); text-decoration: none; }
.breadcrumb a:hover { color: var(--green); text-decoration: underline; }
.breadcrumb span { margin: 0 6px; }

.page-title { margin: 18px 0 30px; text-align: center; }
.page-title h1 { font-size: clamp(38px, 4.2vw, 62px); letter-spacing: -.035em; color: #2b1509; }
.page-title h1::after {
    content: "◇";
    display: flex;
    align-items: center;
    gap: 12px;
    width: min(460px, 80%);
    margin: 8px auto 10px;
    color: var(--gold);
    font: 700 20px/1 var(--serif);
    background: linear-gradient(90deg, transparent, var(--gold) 46%, transparent 46%, transparent 54%, var(--gold) 54%, transparent) center / 100% 1px no-repeat;
    justify-content: center;
}
.lead { max-width: 640px; margin: 0 auto; font: 21px/1.45 var(--serif); color: var(--ink-soft); }

/* Article body. */
.article { max-width: 940px; margin: 0 auto; }
.article::after { content: ""; display: table; clear: both; }
.article > p, .article > ul, .article > ol { max-width: 72ch; }
.article p { margin: 0 0 14px; }
.article h2 {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 42px 0 14px;
    font-size: clamp(27px, 2.4vw, 36px);
    color: #2b1509;
    scroll-margin-top: 24px;
}
.article h2 img, .article h3 img { flex: none; width: 48px; height: 48px; }
.article h3 { margin: 28px 0 10px; font-size: 22px; letter-spacing: -.01em; color: #33200f; scroll-margin-top: 24px; }
.article h3 img { width: 30px; height: 30px; vertical-align: -6px; margin-right: 8px; }
.article :is(ul, ol) { margin: 0 0 16px; padding-left: 24px; }
.article li { margin-bottom: 6px; padding-left: 4px; }
.article li::marker { color: #806744; font-family: var(--serif); font-weight: 700; }
.article strong { color: #2b1509; }
.article > :first-child:not(.toc), .article > .toc + * { margin-top: 0; }

code, kbd {
    padding: 1px 6px;
    background: #f3e6c4;
    border: 1px solid #cdb27c;
    border-radius: 3px;
    color: #3a220f;
    font: 600 .88em/1.4 var(--mono);
    white-space: nowrap;
}
kbd { box-shadow: 0 2px 0 #b39257; }

/* "On this page" card, floated beside the opening of the article as in design study 01. */
.toc {
    float: right;
    position: relative;
    width: 270px;
    margin: 4px 0 24px 34px;
    padding: 0 22px 16px;
    background: #fff9e533;
    border: 3px double #bc9c61;
    border-radius: 8px;
    box-shadow: inset 0 0 0 5px #fff4d233;
}
.toc::before, .toc::after { content: ""; position: absolute; top: -3px; width: 26px; height: 26px; background: url("/images/card-corner-v1.svg") center / contain no-repeat; }
.toc::before { left: -3px; }
.toc::after { right: -3px; transform: scaleX(-1); }
.toc h2 {
    display: block;
    margin: 14px -30px 10px;
    padding: 8px 18px;
    background: linear-gradient(110deg, #315132, #425d36);
    box-shadow: inset 0 0 0 2px #284226, inset 0 0 0 4px #a5a46699;
    clip-path: polygon(0 0, 100% 0, 96% 50%, 100% 100%, 0 100%, 4% 50%);
    color: #fff0c6;
    font-size: 19px;
    letter-spacing: 0;
    text-align: center;
}
.toc ul { margin: 0; padding: 0; list-style: none; }
.toc li { position: relative; margin: 0; padding: 4px 0 4px 20px; }
.toc li::before { content: ""; position: absolute; left: 2px; top: 14px; width: 7px; height: 7px; border: 1.5px solid #a78142; transform: rotate(45deg); }
.toc a { color: #3d2a17; font: 15.5px/1.35 var(--serif); text-decoration: none; }
.toc a:hover { color: var(--green); text-decoration: underline; }

/* Tables: forest-green header row and ruled rows. The build wraps each one so it can scroll on phones. */
.table-scroll { max-width: 100%; margin: 6px 0 20px; overflow-x: auto; border: 1px solid #a88652; border-radius: 4px; box-shadow: 0 1px 0 #fff6db; }
table { width: 100%; border-collapse: collapse; background: #fff9e526; font-size: 15.5px; line-height: 1.5; }
th { padding: 10px 16px; background: linear-gradient(#3c5a3c, #2f4a31); color: #fff3d0; font: 700 16px/1.3 var(--serif); text-align: left; white-space: nowrap; }
td { padding: 9px 16px; border-top: 1px solid #c9ae7699; vertical-align: top; }
td:first-child { color: #2b1509; }
tbody tr:hover { background: #f6e9c766; }
td.num, th.num { text-align: right; white-space: nowrap; }
td img { width: 28px; height: 28px; margin: -6px 8px -6px 0; vertical-align: middle; }

/* Callouts: a cloth label and one short message. */
.note {
    clear: both;
    position: relative;
    display: flex;
    align-items: stretch;
    margin: 22px 0;
    background: #e6e2bf66;
    border: 1px solid #627750;
    border-radius: 4px;
    box-shadow: inset 0 0 0 3px #f4efd477;
}
.note > b {
    flex: none;
    display: flex;
    align-items: center;
    padding: 8px 30px 8px 18px;
    background: linear-gradient(110deg, #315132, #425d36);
    box-shadow: inset 0 0 0 2px #284226, inset 0 0 0 4px #a5a46699;
    clip-path: polygon(0 0, 88% 0, 100% 50%, 88% 100%, 0 100%);
    color: #fff0c6;
    font: 700 17px/1.2 var(--serif);
}
.note > span { padding: 12px 20px; }
.note.warn { background: #f1d9c766; border-color: #8b4a2e; }
.note.warn > b { background: linear-gradient(110deg, #6b2a1c, #84392a); box-shadow: inset 0 0 0 2px #4e1f14, inset 0 0 0 4px #d6a26a99; }

/* A row of small facts with an icon, for currencies, families and the like. */
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin: 10px 0 22px; padding: 0; list-style: none; }
.facts li { display: flex; gap: 12px; align-items: flex-start; margin: 0; padding: 12px 14px; background: #fff9e533; border: 1px solid #c8ad77; border-radius: 6px; }
.facts img { flex: none; width: 44px; height: 44px; }
.facts strong { display: block; font: 700 17px/1.3 var(--serif); }
.facts span { display: block; font-size: 14.5px; line-height: 1.5; color: var(--ink-soft); }

.portraits { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin: 8px 0 22px; padding: 0; list-style: none; }
.portraits li { margin: 0; padding: 10px 10px 12px; text-align: center; background: #fff9e533; border: 1px solid #c8ad77; border-radius: 6px; }
.portraits img { display: block; width: 110px; height: 110px; margin: 0 auto 6px; object-fit: contain; }
.portraits strong { display: block; font: 700 17px/1.25 var(--serif); }
.portraits span { display: block; font-size: 13.5px; line-height: 1.45; color: var(--ink-soft); }

.pager { clear: both; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 940px; margin: 44px auto 0; }
.pager a { display: block; padding: 12px 18px; border: 1px solid #b99c64; border-radius: 6px; background: #fff9e526; color: #2b1509; font: 700 18px/1.3 var(--serif); text-decoration: none; }
.pager a:hover { background: #fff9e566; border-color: #80662f; }
.pager span { display: block; color: var(--ink-soft); font: 13px/1.4 var(--ui); text-transform: uppercase; letter-spacing: .08em; }
.pager .next { grid-column: 2; text-align: right; }

/* Front page: the Haven plaza with the title card, then one card per chapter. */
.hero { position: relative; display: grid; place-items: end center; min-height: 380px; margin: -6px -10px 0; padding: 0 20px 22px; }
.hero-art img { position: absolute; inset: 0; width: 100%; height: calc(100% - 64px); object-fit: cover; border: 3px double #a88443; border-radius: 6px; background: #5d7c8e; }
.title-card {
    position: relative;
    width: min(620px, 100%);
    padding: 24px 34px 26px;
    text-align: center;
    background: linear-gradient(#fbf1d6f0, #f3e4bff0), url("/images/parchment-v1.webp");
    border: 3px double #a88443;
    border-radius: 6px;
    box-shadow: 0 0 0 1px #6b4c24, 0 10px 26px #2b190c77;
}
.title-card h1 { font-size: clamp(36px, 4vw, 56px); letter-spacing: -.035em; color: #2b1509; }
.title-card .lead { margin-top: 2px; font-size: 19px; }
.title-card .search { max-width: none; margin-top: 18px; }
.layout-home .site-header .search { visibility: hidden; }

.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 28px; }
.card {
    position: relative;
    padding: 14px 12px 16px;
    background: #fff9e518;
    border: 3px double #bc9c61;
    border-radius: 8px;
    box-shadow: inset 0 0 0 5px #fff4d233;
}
.card::before, .card::after { content: ""; position: absolute; top: -3px; width: 26px; height: 26px; background: url("/images/card-corner-v1.svg") center / contain no-repeat; }
.card::before { left: -3px; }
.card::after { right: -3px; transform: scaleX(-1); }
.card h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 -4px 10px;
    padding: 6px 14px 6px 8px;
    background: linear-gradient(110deg, #315132, #425d36);
    box-shadow: inset 0 0 0 2px #284226, inset 0 0 0 4px #a5a46699;
    clip-path: polygon(0 0, 100% 0, 95% 50%, 100% 100%, 0 100%);
    color: #fff0c6;
    font-size: clamp(15px, 1.2vw, 19px);
    letter-spacing: 0;
}
.card h2 img { width: 32px; height: 32px; margin: -4px 0; filter: drop-shadow(0 1px 0 #1c2b16); }
.card ul { margin: 0; padding: 0 0 0 10px; list-style: none; }
.card li { margin: 0; }
.card li a { display: flex; justify-content: space-between; gap: 10px; padding: 4px 4px; color: #3d2a17; font: 16px/1.35 var(--serif); text-decoration: none; }
.card li a::after { content: "›"; color: #886439; }
.card li a:hover { color: var(--green); text-decoration: underline; }

.start { display: grid; grid-template-columns: 1.1fr .9fr; gap: 34px; margin-top: 34px; padding-top: 26px; border-top: 1px solid #b4965b66; }
.start h2 { font-size: 28px; margin-bottom: 12px; }
.start ol { margin: 0; padding-left: 22px; }
.start li { margin-bottom: 6px; padding-left: 4px; }
.start li::marker { color: #806744; font-family: var(--serif); font-weight: 700; }
.start p { margin: 0 0 12px; }

.address {
    position: relative;
    display: block;
    width: min(330px, 100%);
    margin: 10px 0 0;
    padding: 4px 44px;
    border: 8px solid transparent;
    border-image: url("/images/address-frame-v1.svg") 16 fill stretch;
    background: transparent;
    color: #fff0cd;
    font: 700 19px/1.6 var(--serif);
    cursor: pointer;
}
.address::after {
    content: "";
    position: absolute;
    right: 12px;
    top: 50%;
    width: 13px;
    height: 15px;
    margin-top: -6px;
    border: 2px solid #dec38b;
    border-radius: 2px;
    background: #2d1b10;
    box-shadow: 4px -4px 0 -2px #2d1b10, 4px -4px 0 0 #dec38b;
}
.address-copied { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; font: 600 15px/1 var(--ui); }
.address[data-copied] .address-text { opacity: 0; }
.address[data-copied] .address-copied { opacity: 1; }
.address:hover { color: #ffe5a0; }

.site-footer {
    position: relative;
    clear: both;
    max-width: 940px;
    margin: 48px auto 0;
    padding: 24px 0 4px;
    border-top: 1px solid #ad8f55;
    text-align: center;
    font-size: 14px;
    color: #624d33;
}
.site-footer::before { content: "◇"; position: absolute; top: -15px; left: 50%; transform: translateX(-50%); padding: 0 12px; background: #f1e3bf; color: #94713c; font: 23px/28px var(--serif); }
.site-footer nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 26px; font-size: 15px; }
.site-footer p { margin: 10px auto 0; font: 15px/1.4 var(--serif); }
.site-footer .legal { font: 12.5px/1.5 var(--ui); color: #7a6446; }

.layout-plain .page { text-align: center; }
.not-found { padding: 70px 0 30px; }
.not-found h1 { font-size: clamp(32px, 5vw, 54px); }
.not-found .lead { margin: 14px auto 0; }

@media (max-width: 1280px) {
    .toc { float: none; width: auto; margin: 0 0 26px; }
    .toc ul { columns: 2; column-gap: 28px; }
    .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
    .book-frame { border-image-width: 48px; }
    .site-header { grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; gap: 10px 18px; height: auto; padding: 22px 64px 16px; }
    .brand, .brand img { width: 150px; }
    .brand img { transform: none; }
    .site-links { grid-row: 1; grid-column: 2; justify-self: end; }
    .site-links a { padding: 6px 12px; font-size: 16px; }
    .site-header .search { grid-column: 1 / -1; max-width: none; }
    .search input { height: 46px; }
    .layout-home .site-header .search { display: none; }
    .journal { display: block; width: calc(100% - 36px); }
    .chapters { padding: 14px 24px 8px; border-radius: 0; box-shadow: inset 0 -6px 10px -6px #5b381c; background: linear-gradient(#6e41171a, transparent); }
    .chapters-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        min-height: 50px;
        padding: 6px 16px;
        background: linear-gradient(110deg, #315132, #425d36);
        border: 0;
        border-radius: 3px;
        box-shadow: inset 0 0 0 2px #284226, inset 0 0 0 4px #a5a46699;
        color: #fff0c6;
        font: 700 19px/1.2 var(--serif);
        text-decoration: none;
        cursor: pointer;
    }
    .chapters-toggle:hover { color: #fff0c6; }
    .chapters-toggle::after { content: "›"; font-size: 26px; transform: rotate(90deg); transition: transform .15s; }
    .chapters-toggle[aria-expanded="true"]::after { transform: rotate(-90deg); }
    /* Hidden until asked for; :target opens it when the script is off. */
    .chapter-list { display: none; position: static; max-height: none; overflow: visible; padding-top: 6px; }
    .chapter-list:target, .chapter-list.shown { display: block; }
    .chapter-link { min-height: 50px; font-size: 19px; }
    .island { display: none; }
    .page { padding: 26px 34px 22px; border-left: 0; border-radius: 0; box-shadow: none; }
    .page::after { display: none; }
    .hero { min-height: 0; display: block; padding: 0; margin: 0; }
    .hero-art img { position: static; display: block; width: 100%; height: auto; aspect-ratio: 21 / 9; }
    .title-card { margin: -46px auto 0; }
    .start { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
    body { padding-bottom: 20px; font-size: 15.5px; }
    .book-frame { border-image-width: 31px; }
    .site-header { gap: 8px 10px; padding: 14px 30px 10px; }
    .brand, .brand img { width: 92px; }
    .site-links a { padding: 4px 7px; font-size: 13.5px; }
    .journal { width: calc(100% - 24px); }
    .chapters { padding: 12px 14px 6px; }
    .page { padding: 22px 16px 18px; }
    .page::before { inset: 8px; }
    .page-title { margin-bottom: 22px; }
    .lead { font-size: 18px; }
    .article h2 { gap: 10px; margin-top: 34px; }
    .article h2 img { width: 38px; height: 38px; }
    .toc ul { columns: 1; }
    th, td { padding: 8px 11px; }
    .note { flex-direction: column; }
    .note > b { align-self: flex-start; padding-right: 26px; }
    .pager { grid-template-columns: 1fr; }
    .pager .next { grid-column: auto; }
    .hero-art img { aspect-ratio: 16 / 9; }
    .title-card { margin-top: -30px; padding: 18px 16px 20px; }
    .cards { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}
