:root {
  --ink: #171610;
  --black: #0d0e0c;
  --paper: #f5efe1;
  --paper-deep: #e8dcc4;
  --gold: #b68638;
  --gold-light: #d8bb7a;
  --rust: #8c3c24;
  --sage: #5b6655;
  --line: rgba(29, 27, 20, .18);
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Avenir Next", Avenir, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--serif); line-height: 1.62; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 100; background: white; padding: .7rem 1rem; }
.skip-link:focus { top: 1rem; }

.site-header { position: sticky; top: 0; z-index: 50; min-height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(1rem, 4vw, 5rem); background: rgba(13, 14, 12, .96); color: white; border-bottom: 1px solid rgba(216, 187, 122, .35); backdrop-filter: blur(12px); }
.wordmark, .footer-mark { font: 700 1.3rem/1 var(--serif); letter-spacing: .12em; text-decoration: none; white-space: nowrap; }
.wordmark span, .footer-mark span { color: var(--gold-light); font-style: italic; }
.site-nav { display: flex; align-items: center; gap: clamp(.8rem, 2vw, 1.8rem); font: 600 .79rem/1 var(--sans); letter-spacing: .06em; }
.site-nav a { text-decoration: none; padding: .65rem 0; border-bottom: 1px solid transparent; }
.site-nav a:hover, .site-nav a:focus { border-color: var(--gold-light); }
.site-nav .nav-buy { padding: .75rem 1rem; background: var(--gold); color: var(--black); border: 0; }
.menu-button { display: none; border: 1px solid rgba(255,255,255,.4); background: transparent; color: white; padding: .45rem .7rem; }

.hero { min-height: calc(100vh - 76px); position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(340px, .84fr); gap: clamp(2rem, 4vw, 5rem); align-items: center; padding: clamp(4rem, 8vw, 8rem) clamp(1.25rem, 7vw, 8rem) 6rem; overflow: hidden; background: #16150f; color: white; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(13,14,12,.96) 0%, rgba(13,14,12,.82) 50%, rgba(13,14,12,.45) 100%); pointer-events: none; }
.hero-map { position: absolute; inset: 0; background: url("assets/endpaper-map.jpg") center/cover no-repeat; filter: grayscale(.4) sepia(.25); opacity: .42; transform: scale(1.03); }
.hero-copy, .hero-cover, .hero-fact { position: relative; z-index: 2; }
.hero-copy { max-width: 800px; }
.eyebrow { margin: 0 0 1rem; font: 700 .76rem/1.2 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--rust); }
.hero .eyebrow, .buy .eyebrow { color: var(--gold-light); }
.hero h1 { margin: 0; max-width: 19ch; font-size: clamp(2.7rem, 5.5vw, 6.2rem); line-height: .98; font-weight: 500; letter-spacing: -.035em; text-wrap: balance; }
.hero-deck { max-width: 660px; margin: 2rem 0 0; color: rgba(255,255,255,.82); font-size: clamp(1.05rem, 1.6vw, 1.35rem); }
.hero-actions { display: flex; gap: .85rem; flex-wrap: wrap; margin-top: 2rem; }
.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; padding: .78rem 1.15rem; text-decoration: none; font: 700 .8rem/1 var(--sans); letter-spacing: .06em; }
.button-primary { background: var(--gold); color: var(--black); }
.button-quiet { border: 1px solid rgba(255,255,255,.5); }
.hero-cover { justify-self: center; width: 100%; max-width: 500px; box-shadow: 0 28px 70px rgba(0,0,0,.52); transform: rotate(.4deg); }
.hero-cover img, .book-cover-small img { width: 100%; height: auto; object-fit: contain; }
.hero-fact { position: absolute; left: clamp(1.25rem, 7vw, 8rem); bottom: 1.5rem; display: flex; gap: 1.1rem; font: 600 .7rem/1 var(--sans); letter-spacing: .08em; color: rgba(255,255,255,.65); text-transform: uppercase; }
.hero-fact span + span::before { content: "·"; margin-right: 1.1rem; color: var(--gold-light); }

.review-ribbon { display: grid; grid-template-columns: 1.5fr 1fr; gap: 2rem; align-items: center; padding: 2rem clamp(1.25rem, 7vw, 8rem); background: var(--gold); color: var(--black); }
.review-ribbon blockquote { margin: 0; font-size: clamp(1.2rem, 2.1vw, 1.85rem); line-height: 1.32; }
.review-ribbon p { margin: 0; font: 650 .8rem/1.6 var(--sans); }

.section { padding: clamp(5rem, 10vw, 10rem) clamp(1.25rem, 7vw, 8rem); }
.section-heading { max-width: 760px; margin-bottom: 3.5rem; }
.section-heading.compact { margin-bottom: 2.5rem; }
.section h2 { margin: 0 0 1rem; font-size: clamp(2.5rem, 5vw, 5.5rem); line-height: 1; font-weight: 500; letter-spacing: -.035em; }
.section-heading > p:last-child { max-width: 620px; margin: 0; font-size: 1.18rem; }

.story { background: var(--paper); }
.story-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.story-grid article { padding: 2rem clamp(1rem, 2vw, 2rem) 2.4rem; border-right: 1px solid var(--line); }
.story-grid article:first-child { padding-left: 0; }
.story-grid article:last-child { border-right: 0; }
.story-number { font: 500 2.2rem/1 var(--serif); color: var(--gold); }
.story-era { margin: 2rem 0 .7rem; font: 700 .68rem/1.2 var(--sans); text-transform: uppercase; letter-spacing: .13em; color: var(--rust); }
.story-grid h3 { margin: 0 0 .9rem; font-size: 1.35rem; line-height: 1.2; }
.story-grid article > p:last-child { margin: 0; font-size: .96rem; color: #4b473e; }
.map-figure { margin: 5rem 0 0; position: relative; }
.map-figure img { width: 100%; max-height: 650px; object-fit: cover; object-position: center; filter: saturate(.82); }
.map-figure figcaption { position: absolute; right: 1rem; bottom: 1rem; padding: .6rem .8rem; background: rgba(13,14,12,.85); color: white; font: .72rem/1.4 var(--sans); }

.book { display: grid; grid-template-columns: minmax(260px, .75fr) 1.25fr; gap: clamp(3rem, 8vw, 9rem); align-items: center; background: var(--black); color: white; }
.book-cover-small { width: 100%; max-width: 480px; justify-self: end; box-shadow: 0 25px 65px rgba(0,0,0,.6); }
.book-copy { max-width: 760px; }
.book-copy .eyebrow { color: var(--gold-light); }
.book-subtitle { margin: 0 0 1.7rem; color: var(--gold-light); font-size: 1.25rem; }
.book-copy > p:not(.eyebrow):not(.book-subtitle) { font-size: 1.12rem; color: rgba(255,255,255,.76); }
.publication-data { margin: 2.2rem 0; border-top: 1px solid rgba(255,255,255,.22); }
.publication-data div { display: grid; grid-template-columns: 150px 1fr; gap: 1.5rem; padding: .8rem 0; border-bottom: 1px solid rgba(255,255,255,.22); }
.publication-data dt { font: 700 .68rem/1.5 var(--sans); text-transform: uppercase; letter-spacing: .1em; color: var(--gold-light); }
.publication-data dd { margin: 0; }
.inline-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.inline-links a, .text-link { color: var(--gold-light); text-decoration-thickness: 1px; text-underline-offset: 4px; }

.reviews { background: #ded2bb; }
.review-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 4rem; }
.featured-review { margin: 0; padding: clamp(2rem, 4vw, 4rem); background: var(--paper); border-left: 6px solid var(--rust); }
.featured-review blockquote { margin: 0 0 2rem; font-size: clamp(1.55rem, 2.8vw, 2.5rem); line-height: 1.25; }
.featured-review figcaption, .review-notes figcaption { font: .82rem/1.6 var(--sans); color: #514c43; }
.featured-review .text-link { display: inline-block; margin-top: 1.6rem; color: var(--rust); font: 700 .78rem/1.4 var(--sans); }
.review-notes { border-top: 1px solid var(--line); }
.review-notes figure { margin: 0; padding: 1.6rem 0; border-bottom: 1px solid var(--line); }
.review-notes blockquote { margin: 0 0 .7rem; font-size: 1.15rem; }

.research { background: var(--paper); }
.research-intro { max-width: 780px; }
.research-intro > p:last-child { font-size: 1.15rem; }
.search-panel { margin-top: 3rem; padding: clamp(1.25rem, 3vw, 2.5rem); background: #fffdf7; border: 1px solid var(--line); box-shadow: 0 15px 45px rgba(48,38,23,.08); }
.search-panel > label { display: block; margin-bottom: .5rem; font: 700 .74rem/1.4 var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.search-box { display: grid; grid-template-columns: 1fr auto; border-bottom: 2px solid var(--ink); }
.search-box input { width: 100%; border: 0; background: transparent; padding: .85rem .2rem; font-size: clamp(1.1rem, 2vw, 1.45rem); color: var(--ink); outline: none; }
.search-box button { border: 0; background: transparent; padding: .8rem; color: var(--rust); font: 700 .72rem/1 var(--sans); text-transform: uppercase; letter-spacing: .06em; }
.search-status { margin: .9rem 0 1rem; font: .74rem/1.4 var(--sans); color: #625c51; }
.alphabet { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: 1rem; }
.alphabet button { min-width: 30px; border: 1px solid var(--line); background: transparent; padding: .32rem .42rem; font: 700 .68rem/1 var(--sans); cursor: pointer; }
.alphabet button:hover, .alphabet button:focus, .alphabet button.active { background: var(--ink); color: white; }
.index-scroll { max-height: 560px; overflow: auto; padding-right: 1rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.index-list { list-style: none; margin: 0; padding: 0; }
.index-row { display: grid; grid-template-columns: auto 1fr auto; gap: .65rem; align-items: baseline; padding: .52rem 0; border-bottom: 1px solid rgba(29,27,20,.08); }
.index-row[hidden] { display: none; }
.index-term { font-weight: 600; }
.index-dots { border-bottom: 1px dotted rgba(29,27,20,.32); }
.index-pages { color: var(--rust); font-variant-numeric: tabular-nums; }
.no-results { padding: 2rem 0; }
.research-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1.5rem; }
.research-links a { display: flex; flex-direction: column; padding: 1.3rem; border: 1px solid var(--line); text-decoration: none; background: var(--paper-deep); }
.research-links strong { font-size: 1.1rem; }
.research-links span { font: .78rem/1.5 var(--sans); color: #625c51; }

.author { display: grid; grid-template-columns: minmax(260px, .75fr) 1.25fr; gap: clamp(3rem, 8vw, 8rem); align-items: center; background: #263028; color: white; }
.author-portrait { margin: 0; max-width: 500px; justify-self: end; overflow: hidden; background: #171b18; }
.author-portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 24%; }
.author-copy { max-width: 700px; }
.author-copy .eyebrow, .author-copy .text-link { color: var(--gold-light); }
.author-copy p:not(.eyebrow) { color: rgba(255,255,255,.78); font-size: 1.08rem; }

.buy { background: var(--black); color: white; }
.buy > div:first-child { max-width: 760px; }
.buy > div:first-child > p:last-child { color: rgba(255,255,255,.7); font-size: 1.12rem; }
.buy-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 3rem; border-top: 1px solid rgba(255,255,255,.2); border-left: 1px solid rgba(255,255,255,.2); }
.buy-card { min-height: 160px; display: flex; flex-direction: column; justify-content: space-between; padding: 1.4rem; text-decoration: none; border-right: 1px solid rgba(255,255,255,.2); border-bottom: 1px solid rgba(255,255,255,.2); }
.buy-card:hover, .buy-card:focus { background: var(--gold); color: var(--black); }
.buy-card span { font: 700 .7rem/1 var(--sans); text-transform: uppercase; letter-spacing: .12em; color: var(--gold-light); }
.buy-card:hover span, .buy-card:focus span { color: var(--black); }
.buy-card strong { font-size: 1.25rem; }
.buy-card.signed { background: #26291f; }
.buy-card.signed:hover, .buy-card.signed:focus { background: var(--gold); }

.site-footer { display: grid; grid-template-columns: auto 1fr auto; gap: 2rem; align-items: center; padding: 2rem clamp(1.25rem, 7vw, 8rem); background: #070806; color: rgba(255,255,255,.65); font-size: .78rem; }
.site-footer p { margin: 0; }
.site-footer .footer-mark { color: white; }
.site-footer p:nth-child(2) { text-align: center; }

.subpage { background: var(--paper); }
.subpage-hero { position: relative; min-height: 390px; display: flex; align-items: end; padding: clamp(5rem, 10vw, 9rem) clamp(1.25rem, 12vw, 13rem) 4rem; overflow: hidden; background: #171711 url("assets/endpaper-map.jpg") center 43% / cover no-repeat; color: white; }
.subpage-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(13,14,12,.94), rgba(13,14,12,.60)); }
.subpage-hero > div { position: relative; z-index: 1; max-width: 900px; }
.subpage-hero .eyebrow { color: var(--gold-light); }
.subpage-hero h1 { max-width: 16ch; margin: 0 0 1rem; font-size: clamp(3rem, 7vw, 6.7rem); line-height: .95; font-weight: 500; letter-spacing: -.045em; }
.subpage-hero > div > p:last-child { max-width: 700px; margin: 0; color: rgba(255,255,255,.82); font-size: 1.16rem; }
.subpage-content { max-width: 1180px; min-height: 360px; margin: 0 auto; padding: clamp(4rem, 8vw, 8rem) clamp(1.25rem, 5vw, 4rem); }
.subpage-return { display: flex; justify-content: space-between; gap: 1rem; max-width: 1180px; margin: 0 auto; padding: 0 clamp(1.25rem, 5vw, 4rem) 5rem; font: 700 .78rem/1.4 var(--sans); }
.subpage-return a { color: var(--rust); text-underline-offset: 4px; }
.chapter-list { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(2rem, 6vw, 6rem); margin: 0; padding: 0; border-top: 1px solid var(--line); }
.chapter-list li { display: grid; grid-template-columns: 62px 1fr auto; gap: .8rem; align-items: baseline; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.chapter-number { font: 700 .68rem/1 var(--sans); letter-spacing: .08em; color: var(--rust); }
.chapter-name { font-size: 1.08rem; }
.chapter-page { color: #756b5b; font-variant-numeric: tabular-nums; }
.reading-column { max-width: 760px; margin: 0 auto; font-size: 1.08rem; }
.reading-column p { margin: 0 0 1.25rem; }
.reading-column .byline { margin-bottom: 2.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); font: 700 .78rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--rust); }
.reading-column p:not(.byline):first-of-type::first-letter { float: left; margin: .07em .12em 0 0; font-size: 4.5rem; line-height: .8; color: var(--gold); }
.appendix-intro { max-width: 780px; margin-bottom: 3rem; padding-left: 1.4rem; border-left: 4px solid var(--gold); font-size: 1.06rem; }
.timeline-list { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 4rem; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.timeline-list li { display: grid; grid-template-columns: 70px 1fr; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.timeline-list time { font: 700 .76rem/1.8 var(--sans); color: var(--rust); }
.bib-section + .bib-section { margin-top: 4.5rem; }
.bib-section h2 { margin: 0 0 1.5rem; font-size: clamp(2rem, 4vw, 3.7rem); font-weight: 500; }
.bibliography-list { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 4rem; }
.bibliography-list li { break-inside: avoid; margin: 0 0 1rem; padding: 0 0 1rem; border-bottom: 1px solid var(--line); font-size: .94rem; }

@media (max-width: 980px) {
  .menu-button { display: block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 76px; flex-direction: column; align-items: stretch; gap: 0; padding: 1rem 1.25rem 1.5rem; background: var(--black); }
  .site-nav.open { display: flex; }
  .site-nav a { padding: .9rem 0; }
  .site-nav .nav-buy { margin-top: .5rem; text-align: center; }
  .hero { grid-template-columns: 1fr minmax(220px, .58fr); gap: 2rem; padding-inline: 2rem; }
  .hero h1 { font-size: clamp(2.7rem, 7vw, 5rem); }
  .story-grid { grid-template-columns: repeat(2, 1fr); }
  .story-grid article:nth-child(2) { border-right: 0; }
  .story-grid article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .story-grid article:first-child { padding-left: 1rem; }
  .book, .author { grid-template-columns: minmax(240px, .7fr) 1.3fr; gap: 3rem; }
  .buy-options { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .site-header { min-height: 64px; }
  .site-nav { top: 64px; }
  .hero { min-height: auto; grid-template-columns: 1fr; padding: 4.5rem 1.25rem 5rem; }
  .hero::after { background: rgba(13,14,12,.82); }
  .hero-copy { order: 1; }
  .hero-cover { order: 2; width: min(78%, 330px); justify-self: start; transform: none; }
  .hero-fact { left: 1.25rem; bottom: 1rem; }
  .review-ribbon { grid-template-columns: 1fr; gap: .7rem; }
  .section { padding: 4.5rem 1.25rem; }
  .section h2 { font-size: clamp(2.4rem, 12vw, 4rem); }
  .story-grid { grid-template-columns: 1fr; }
  .story-grid article { border-right: 0; border-bottom: 1px solid var(--line); padding-inline: 0; }
  .story-grid article:first-child { padding-left: 0; }
  .map-figure { margin-top: 3rem; }
  .map-figure figcaption { position: static; background: var(--black); }
  .book, .author { grid-template-columns: 1fr; }
  .book-cover-small, .author-portrait { justify-self: start; width: min(78%, 360px); }
  .review-grid { grid-template-columns: 1fr; gap: 2rem; }
  .research-links { grid-template-columns: 1fr; }
  .index-scroll { max-height: 520px; padding-right: .4rem; }
  .index-row { grid-template-columns: 1fr auto; }
  .index-dots { display: none; }
  .buy-options { grid-template-columns: 1fr; }
  .site-footer { grid-template-columns: 1fr; gap: .7rem; text-align: center; }
  .site-footer p:nth-child(2) { text-align: center; }
  .subpage-hero { min-height: 340px; padding: 5rem 1.25rem 3rem; }
  .subpage-content { padding: 3.5rem 1.25rem; }
  .subpage-return { flex-direction: column; padding: 0 1.25rem 4rem; }
  .chapter-list, .timeline-list { grid-template-columns: 1fr; }
  .chapter-list li { grid-template-columns: 54px 1fr auto; }
  .bibliography-list { columns: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
