@font-face {
    font-family: Inter;
    src: url("fonts/inter.woff2") format("woff2");
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
}

@font-face {
    font-family: "Source Serif 4";
    src: url("fonts/source-serif.woff2") format("woff2");
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
}

:root {
    color-scheme: light;
    --paper: #faf8f1;
    --forest: #173b31;
    --forest-hover: #255143;
    --ink: #222b24;
    --muted: #535e53;
    --rule: #c9c2b0;
    --control-border: #7c8378;
    --serif: "Source Serif 4", Georgia, serif;
    --sans: Inter, system-ui, sans-serif;
    background: var(--paper);
    color: var(--ink);
    font: 1rem/1.55 var(--sans);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
.wrap { width: min(65rem, calc(100% - 3rem)); margin-inline: auto; }
main { padding-block: 2rem 4rem; min-height: 65vh; }
a { color: var(--forest); text-underline-offset: .18em; }
a:hover { color: var(--forest-hover); }
:focus-visible { outline: 3px solid #9f4a35; outline-offset: 3px; }

.skip-link {
    position: absolute;
    z-index: 1;
    inset: .75rem auto auto .75rem;
    padding: .55rem .75rem;
    background: var(--paper);
    transform: translateY(-150%);
}
.skip-link:focus { transform: none; }
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.masthead {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: .65rem 1.5rem;
    padding-block: 1.15rem 1rem;
    border-bottom: 1px solid var(--rule);
}
.wordmark {
    font: 700 clamp(1.6rem, 3.3vw, 2.25rem)/1.1 var(--serif);
    letter-spacing: -.035em;
    text-decoration: none;
}
.site-nav { display: flex; flex-wrap: wrap; gap: .85rem 1.35rem; }
.site-nav a { text-decoration: none; font-size: .95rem; font-weight: 550; }
.site-nav a:hover, .book-title:hover { text-decoration: underline; }

h1, h2, h3 { color: var(--forest); font-family: var(--serif); line-height: 1.1; margin: 0; }
h1 { font-size: clamp(2.45rem, 6vw, 4.35rem); letter-spacing: -.04em; }
h2 { font-size: clamp(1.65rem, 3.6vw, 2.45rem); letter-spacing: -.025em; }
h3 { font-size: clamp(1.34rem, 2.5vw, 1.68rem); letter-spacing: -.017em; }
p { margin: .45rem 0 0; }
.detail { color: var(--muted); font-size: .88rem; }

.search-panel { padding-block: .65rem 2.7rem; }
.search-panel h1 { max-width: 17ch; }
.search-panel p { font-size: clamp(1.05rem, 2vw, 1.25rem); margin-block: .8rem 1.3rem; }
.search { display: flex; max-width: 49rem; }
input, button, select, .button { font: inherit; min-height: 2.75rem; }
input, select {
    padding: .65rem .85rem;
    background: #fffefa;
    border: 1px solid var(--control-border);
    color: var(--ink);
    border-radius: .2rem;
}
.search input { flex: 1; width: 0; border-radius: .2rem 0 0 .2rem; }
.search input:focus-visible { z-index: 1; }
.search button { border-radius: 0 .2rem .2rem 0; }
button, .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .55rem 1rem;
    background: var(--forest);
    color: #fff;
    border: 1px solid var(--forest);
    border-radius: .2rem;
    font-weight: 650;
    text-decoration: none;
    cursor: pointer;
}
button:hover, .button:hover { background: var(--forest-hover); color: #fff; }
.button-secondary { color: var(--forest); background: transparent; border-color: var(--control-border); }

.catalogue, .reading-lists, .purchase { border-top: 1px solid var(--rule); padding-top: 1.45rem; }
.catalogue { max-width: 54rem; }
.editions { margin: .75rem 0 0; padding: 0; list-style: none; }
.editions li {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: clamp(.9rem, 3vw, 1.65rem);
    align-items: start;
    padding-block: 1rem;
    border-bottom: 1px solid var(--rule);
}
.book-title { text-decoration: none; overflow-wrap: anywhere; }
.catalogue-book p { margin-top: .24rem; }
.catalogue-subtitle, .catalogue-author { font-size: .92rem; }
.cover {
    --cover-paper: #b8c7af;
    --cover-ink: #15392e;
    position: relative;
    width: clamp(3.8rem, 10vw, 5.35rem);
    aspect-ratio: 2 / 3;
    display: grid;
    overflow: hidden;
    background: var(--cover-paper);
    border: 1px solid rgb(0 0 0 / .12);
    border-radius: .15rem .3rem .3rem .15rem;
    box-shadow: 0 2px 5px rgb(28 38 32 / .14);
}
.editions li:nth-child(3n+2) .cover { --cover-paper: #e5d3a7; --cover-ink: #422e20; }
.editions li:nth-child(3n+3) .cover, .cover-large { --cover-paper: #a0422e; --cover-ink: #fff1d8; }
.cover-fallback {
    align-self: start;
    min-width: 0;
    margin: .49rem .4rem;
    padding-block: .3em;
    border-block: 1px solid currentColor;
    color: var(--cover-ink);
    font: 650 clamp(.55rem, 1.6vw, .81rem)/1.15 var(--serif);
    overflow-wrap: anywhere;
}
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--paper); visibility: hidden; }
.cover img.has-cover { visibility: visible; }
.cover-large { width: 100%; }
.cover-large .cover-fallback {
    margin: 1.15rem .85rem;
    font-size: clamp(1.1rem, 3vw, 2.1rem);
}
.pagination { display: flex; flex-wrap: wrap; gap: .7rem 1.15rem; margin-block: 1.4rem 0; }
.reading-lists { margin-top: 2.5rem; max-width: 54rem; }
.reading-lists h3 { margin-top: .75rem; }
.reading-lists ul { padding-left: 1.15rem; margin: .6rem 0; }

.breadcrumb { display: flex; flex-wrap: wrap; gap: .45rem; color: var(--muted); font-size: .9rem; margin-bottom: 1.35rem; }
.edition-heading {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.35fr);
    align-items: start;
    gap: clamp(1.1rem, 4vw, 2.5rem);
    max-width: 54rem;
}
.edition-info { padding-top: .05rem; overflow-wrap: anywhere; }
.edition-info h1 { font-size: clamp(2.2rem, 5.2vw, 3.85rem); }
.edition-subtitle { font-size: clamp(1.05rem, 2.75vw, 1.45rem); line-height: 1.33; margin-top: .65rem; }
.contributor { margin-top: 1.15rem; }
.publisher, .edition-facts { margin-top: .3rem; }
.edition-facts, .isbn, .series { color: var(--muted); }
.isbn { font-variant-numeric: tabular-nums; }
.isbn span { font-size: .85em; font-weight: 650; margin-right: .3rem; }
.purchase { margin-top: 2.15rem; max-width: 54rem; }
.ship-to { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-block: 1.1rem; }
.ship-to label { font-weight: 650; }
.ship-to select { width: min(16rem, 100%); }
.retailer-links { display: grid; gap: .52rem; list-style: none; margin: .85rem 0 0; padding: 0; }
.retailer-links .detail { display: block; }
.retailer-link { font-weight: 550; }
.retail-count:not(:empty) { display: inline-block; margin-inline-start: .45rem; font-size: .9rem; color: var(--muted); }
.site-footer { border-top: 1px solid var(--rule); padding-block: 1rem 1.5rem; display: flex; flex-wrap: wrap; gap: .5rem 1.15rem; font-size: .85rem; }

@media (max-width: 38rem) {
    .wrap { width: calc(100% - 2rem); }
    main { padding-top: 1.55rem; }
    .search-panel { padding-bottom: 1.9rem; }
    .edition-heading { grid-template-columns: 1fr; }
    .cover-large { width: min(53%, 11rem); }
    .edition-info h1 { font-size: clamp(2rem, 8vw, 3rem); }
    .purchase { margin-top: 1.65rem; }
    .ship-to select { flex: 1 1 9rem; min-width: 0; }
}
