/* The Longbourn Years: the shared stylesheet of tawelham.com and ludgatebooks.com.
   Colours and type follow the covers (production/covers/build_wrap.py): the navy ground, gold, cream, EB Garamond. */

@font-face { font-family: "EB Garamond"; src: url("/assets/fonts/EBGaramond-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("/assets/fonts/EBGaramond-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("/assets/fonts/EBGaramond-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  --navy: #1F2933;
  --navy-deep: #161D25;
  --gold: #C8A96E;
  --gold-ink: #85692C; /* gold for small text on the light paper: 4.8:1 against --paper */
  --cream: #F4EFE6;
  --paper: #FAF7F1;
  --body-light: #EAE3D5;
  --ink: #1F2933;
  --ink-soft: #4A5560;
  --rule: #D9CFBD;
  --seal: #6B2529;
  --measure: 36rem;
  --wide: 70rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: "EB Garamond", Garamond, "Times New Roman", serif;
  font-size: clamp(1.08rem, 1rem + 0.35vw, 1.22rem); line-height: 1.6;
  font-variant-numeric: oldstyle-nums proportional-nums;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1 0 auto; }
p, li { text-wrap: pretty; }
h1, h2, .lede { text-wrap: balance; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--seal); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.site-header :focus-visible, .hero :focus-visible, .site-footer :focus-visible { outline-color: var(--gold); }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; background: var(--cream); color: var(--ink); padding: 0.4rem 0.8rem; z-index: 10; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header and footer: the dark ground of the covers. */
.site-header { background: var(--navy); color: var(--cream); border-bottom: 1px solid #2E3A46; }
.site-header .inner, .site-footer .inner { max-width: var(--wide); margin: 0 auto; padding: 0.9rem 1.25rem; display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem; align-items: baseline; justify-content: space-between; }
.brand { display: inline-block; padding: 0.25rem 0; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.92rem; color: var(--gold); text-decoration: none; }
.brand:hover { color: var(--cream); }
.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.2rem 1.3rem; margin: 0; padding: 0; }
.site-nav a { display: inline-block; padding: 0.2rem 0; color: var(--body-light); text-decoration: none; font-size: 1rem; } /* 24 px targets */
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--gold); }
.site-footer { background: var(--navy-deep); color: var(--body-light); margin-top: 4rem; font-size: 0.95rem; }
.site-footer .inner { padding: 1.6rem 1.25rem 2rem; }
.site-footer a { color: var(--body-light); }
.site-footer a:hover { color: var(--gold); }
.site-footer ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; margin: 0; padding: 0; }

/* The opening band of a page. */
.hero { background: var(--navy); color: var(--cream); text-align: center; padding: clamp(2.6rem, 6vw, 4.6rem) 1.25rem clamp(2.4rem, 5vw, 3.6rem); }
.hero .kicker { color: var(--gold); }
.hero h1 { font-weight: 400; font-size: clamp(2.3rem, 1.6rem + 3.2vw, 3.9rem); line-height: 1.08; margin: 0.35rem 0 0.6rem; letter-spacing: 0.01em; }
.hero .lede { font-size: clamp(1.18rem, 1.05rem + 0.6vw, 1.45rem); color: var(--body-light); margin: 0 auto 0.4rem; max-width: 34rem; }
.hero p { max-width: 34rem; margin-left: auto; margin-right: auto; text-wrap: balance; }
.hero .mark { margin: 0 auto 0.6rem; }
.hero .mark .seal { width: 1.5rem; height: 1.5rem; margin: 0; vertical-align: middle; border-width: 2px; }
.rule { width: 5.5rem; height: 1px; background: var(--gold); margin: 1.2rem auto; border: 0; }
.kicker { font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; font-size: 0.82rem; margin: 0; }
.button { display: inline-block; margin-top: 1rem; padding: 0.55rem 1.3rem; border: 1px solid var(--gold); color: var(--gold); text-decoration: none; letter-spacing: 0.06em; }
.button:hover { background: var(--gold); color: var(--navy); }

/* Sections and text. */
.section { max-width: var(--wide); margin: 0 auto; padding: clamp(2rem, 4vw, 3.2rem) 1.25rem 0; }
.section > h2, .prose h2 { font-weight: 500; font-size: 1.35rem; letter-spacing: 0.02em; margin: 0 0 1rem; }
.prose { max-width: var(--measure); margin: 0 auto; padding: clamp(2rem, 4vw, 3rem) 1.25rem 0; }
.prose p { margin: 0 0 1em; }
.prose h1 { font-weight: 400; font-size: clamp(2rem, 1.5rem + 2vw, 2.8rem); line-height: 1.12; margin: 0 0 1.2rem; }
.prose h2 { margin-top: 2rem; }

/* The four volumes in a row. */
.volumes { list-style: none; margin: 0; padding: 0; display: grid; gap: 2.2rem 1.6rem; grid-template-columns: repeat(auto-fill, minmax(min(15rem, 100%), 1fr)); }
.volumes li { display: flex; flex-direction: column; }
.volumes a.cover-link { display: block; text-decoration: none; }
.volumes img { box-shadow: 0 0.35rem 1.2rem rgba(22, 29, 37, 0.28); aspect-ratio: 2 / 3; width: 100%; background: var(--navy); }
.volumes .vol { display: block; margin-top: 0.9rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.78rem; color: var(--gold-ink); }
.volumes .title { display: block; font-size: 1.45rem; line-height: 1.2; margin-top: 0.1rem; }
.volumes p { margin: 0.6rem 0 0; font-size: 1rem; color: var(--ink-soft); }
/* On a phone: the cover small at the left, the volume and title beside it, the text below. */
@media (max-width: 33.99rem) {
  .volumes { gap: 2.4rem; }
  .volumes a.cover-link { display: grid; grid-template-columns: 7.5rem 1fr; grid-template-rows: 1fr auto auto; column-gap: 1.1rem; }
  .volumes a.cover-link img { grid-row: 1 / 4; }
  .volumes .vol { grid-column: 2; grid-row: 2; margin-top: 0; }
  .volumes .title { grid-column: 2; grid-row: 3; }
  .volumes p { margin-top: 0.9rem; }
}

/* A book's page. */
.book { max-width: var(--wide); margin: 0 auto; padding: clamp(2rem, 4vw, 3.2rem) 1.25rem 0; display: grid; gap: 2rem 3rem; grid-template-columns: 1fr; }
@media (min-width: 52rem) { .book { grid-template-columns: minmax(16rem, 23rem) minmax(0, 1fr); align-items: start; } .book-cover { position: sticky; top: 1.5rem; } }
.book-cover img { box-shadow: 0 0.5rem 1.6rem rgba(22, 29, 37, 0.3); width: 100%; max-width: 23rem; margin: 0 auto; aspect-ratio: 2 / 3; background: var(--navy); }
@media (max-width: 51.99rem) { .book-cover img { max-width: 15rem; } }
.book-text { max-width: var(--measure); }
.book-text .kicker { color: var(--gold-ink); }
.book-text h1 { font-weight: 400; font-size: clamp(2.2rem, 1.6rem + 2.4vw, 3.2rem); line-height: 1.08; margin: 0.3rem 0 0.2rem; }
.byline { font-size: 1.15rem; color: var(--ink-soft); margin: 0 0 1.6rem; }
.copy p { margin: 0 0 1em; }
.copy .frame { font-style: italic; }
.copy .frame .roman, .copy .series .roman { font-style: normal; }
.copy .series { font-style: italic; color: var(--ink-soft); }
.book-text h2 { font-weight: 500; font-size: 1.15rem; letter-spacing: 0.04em; margin: 2rem 0 0.6rem; padding-top: 1.2rem; border-top: 1px solid var(--rule); }
.editions { margin: 0; display: grid; gap: 0.35rem; }
.editions div { display: grid; grid-template-columns: 6.5rem 1fr; gap: 0.6rem; }
.editions dt { color: var(--ink-soft); }
.editions dd { margin: 0; }
.isbn { font-variant-numeric: lining-nums tabular-nums; letter-spacing: 0.01em; white-space: nowrap; }
.retailers { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.retailers a { display: inline-block; padding: 0.4rem 1rem; border: 1px solid var(--ink); text-decoration: none; }
.retailers a:hover { background: var(--ink); color: var(--cream); }
.note { color: var(--ink-soft); }
.book-nav { width: calc(100% - 2.5rem); max-width: calc(var(--wide) - 2.5rem); margin: 3rem auto 0; padding: 1.2rem 0 0; display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--rule); font-size: 1rem; }
.book-nav a { text-decoration: none; }
.book-nav .next { margin-left: auto; text-align: right; }
.book-nav .label { display: block; color: var(--ink-soft); font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; }

/* The publisher's authors. */
.authors { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.8rem 3rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 44rem) { .authors { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.authors li { border-top: 1px solid var(--gold); padding-top: 1rem; scroll-margin-top: 1rem; }
.authors h3 { font-weight: 400; font-size: 1.55rem; line-height: 1.15; margin: 0 0 0.5rem; }
.authors p { margin: 0 0 0.7rem; color: var(--ink-soft); font-size: 1rem; }
.authors .status { margin: 0; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.76rem; color: var(--gold-ink); }
.authors .status a { color: inherit; }

/* The publisher's catalogue. */
.table-wrap { overflow-x: auto; }
.catalogue { border-collapse: collapse; width: 100%; font-size: 1rem; min-width: 34rem; }
.catalogue th, .catalogue td { text-align: left; padding: 0.55rem 0.8rem 0.55rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.catalogue th { font-weight: 500; color: var(--ink-soft); font-size: 0.9rem; letter-spacing: 0.04em; }
/* On a phone, each book's row becomes a small card, each value with its label. */
@media (max-width: 39.99rem) {
  .catalogue { min-width: 0; }
  .catalogue thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .catalogue tr { display: block; padding: 0.7rem 0; border-bottom: 1px solid var(--rule); }
  .catalogue td { display: grid; grid-template-columns: 8.5rem 1fr; gap: 0.6rem; padding: 0.1rem 0; border: 0; }
  .catalogue td::before { content: attr(data-label); color: var(--ink-soft); font-size: 0.9rem; }
}
.seal { display: inline-block; width: 0.9em; height: 0.9em; border-radius: 50%; background: var(--seal); border: 1px solid #A96F58; vertical-align: -0.05em; margin-right: 0.45em; }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.contact-list strong { display: block; font-weight: 500; }

/* PUBLICATION_BUY_LINKS_20261115 */
/* Matches the live Cloudflare overlay; keep on future rebuilds. */
.publication-status { margin: .85rem 0 0; color: var(--ink-soft); font-size: .98em; }
.hero .publication-status { color: var(--body-light); } /* on the navy hero: 12:1, not --ink-soft's 1.9:1 */
.buy-links { margin: .7rem 0 .1rem; font-size: .91em; line-height: 1.55; color: var(--ink-soft); }
.buy-links p { margin: 0; }
.buy-links .buy-label { font-weight: 500; color: var(--ink); }
.buy-links .buy-store { margin-top: .2em; }
.buy-links .store { display: block; font-size: .92em; color: var(--ink-soft); }
.buy-links .formats { display: flex; flex-wrap: wrap; gap: 0 1em; }
.buy-links--detail .buy-store { display: grid; grid-template-columns: 7.2em 1fr; align-items: baseline; }
.buy-links--detail .store { font-size: 1em; }
.buy-links a { display: inline-block; padding: .2em 0; white-space: nowrap; color: var(--ink); } /* targets at least 24 px high (WCAG 2.2, 2.5.8) */
.buy-links--detail { margin-top: .25rem; font-size: 1.02em; }

/* REVIEW_COPIES_20261119: the Booksprout review-copy notices; remove together with them */
.hero .review-call { margin: .6rem auto 0; color: var(--body-light); font-size: .98em; }
.hero .review-call a { display: inline-block; padding: .2em 0; color: var(--gold); white-space: nowrap; } /* targets at least 24 px high */
.hero .review-call a:hover { color: var(--cream); }
.review-copies { max-width: var(--measure); }
.review-copies p { margin: 0 0 .9em; }
.review-list { list-style: none; margin: 1.1rem 0 1.2rem; padding: 0; border-top: 1px solid var(--gold); }
.review-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1em .9em; padding: .55rem 0; border-bottom: 1px solid rgba(31, 41, 51, .14); }
.review-list .vol { flex: 0 0 auto; width: 8.6em; white-space: nowrap; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; font-size: .78rem; color: var(--gold-ink); }
.review-list .title { flex: 1 1 11em; }
.review-list a { display: inline-block; padding: .2em 0; white-space: nowrap; color: var(--ink); }
.review-copy { margin: 0 0 .2rem; }
.review-note { margin: 0 0 1.4rem; color: var(--ink-soft); font-size: .98em; }

/* Publisher catalogue and local reader preview. */
.publisher-hero { padding-block: clamp(1.8rem, 4vw, 3.4rem); }
.publisher-series > h2 { font-size: clamp(1.8rem, 1.45rem + 1.3vw, 2.6rem); line-height: 1.1; margin-bottom: 0.55rem; }
.publisher-series > p { margin-block: 0.35rem; }
.publisher-series .review-note { margin-block: 0.5rem 1.4rem; }
.publisher-series .volumes { margin-top: 1.5rem; }
.publisher-series .buy-links { margin-top: auto; padding-top: 0.35rem; }
.publisher-series .sample-link { margin-top: 0.8rem; }
.projects .status { margin-bottom: 0.5rem; }
.projects .project-author { margin-bottom: 0; }
.project-books img { width: min(100%, 13.5rem); height: auto; margin-bottom: 0.9rem; box-shadow: 0 0.3rem 1rem rgb(22 29 37 / 20%); }
.project-books .project-author { margin-bottom: 0.45rem; }
@media (min-width: 24rem) and (max-width: 43.99rem) {
  .project-books { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem 1rem; }
}
@media (min-width: 58rem) {
  .publisher-series .volumes { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .projects { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 33.99rem) {
  .publisher-series .volumes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.8rem 1rem; }
  .publisher-series .volumes .cover-link { display: block; }
  .publisher-series .volumes .vol { margin-top: 0.65rem; }
  .publisher-series .volumes .title { font-size: 1.3rem; }
  .publisher-series .buy-links .formats { gap: 0 0.55em; }
}

.sample-link { display: inline-block; padding: 0.3rem 0; color: var(--seal); }
.reader { padding-bottom: 2rem; }
.reader .reader-note { border-left: 2px solid var(--gold); padding-left: 0.85rem; color: var(--ink-soft); }
.reader-contents { padding-inline-start: 1.5rem; }
.reader-contents a, .reader-links a { display: inline-block; padding-block: 0.25rem; }
.reader-links { display: flex; flex-wrap: wrap; gap: 0.3rem 1.4rem; margin-block: 1.5rem; }
.reader .break { text-align: center; margin-block: 1.4rem; }

/* SAMPLES_AND_EXPIRY_20261122: the free samples, pull-quotes, and notices that hide themselves after requests close */
[data-expires][hidden] { display: none !important; }
.pull-quote { margin: 1.6rem 0 1.2rem; padding: 0 0 0 1.1rem; border-left: 2px solid var(--gold); }
.pull-quote blockquote { margin: 0; font-style: italic; font-size: 1.1em; line-height: 1.5; color: var(--ink); }
.pull-quote blockquote p { margin: 0; }
.pull-quote figcaption { margin-top: .45rem; font-size: .9em; color: var(--ink-soft); }
.volumes .pull-quote { margin: .9rem 0 .6rem; font-size: .92em; }
.sample-call { margin: 1rem 0 1.8rem; }
.sample-link { margin: .4rem 0 .8rem; }
.sample-link a, .sample-back a { display: inline-block; padding: .25em 0; }
.sample { max-width: var(--measure); margin: 0 auto; padding: 2.5rem 1rem 3rem; }
.sample-head { text-align: center; margin-bottom: 2.6rem; }
.sample-note { color: var(--ink-soft); font-size: .95em; }
.sample-text { font-size: 1.1em; line-height: 1.62; hyphens: auto; }
.sample-text section.chapter + section.chapter { margin-top: 3.6rem; }
.sample-text h2 { text-align: center; font-weight: 400; margin: 0 0 1.7rem; line-height: 1.2; }
.sample-text h2 .label { display: block; font-size: .62em; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-ink); }
.sample-text h2 .num { font-size: 1.5em; }
.sample-text p { margin: 0; text-indent: 1.4em; text-align: justify; }
.sample-text p.first, .sample-text p.after-break { text-indent: 0; }
.sample-text p.break { text-indent: 0; text-align: center; margin: 1em 0; color: var(--ink-soft); }
.sample-end { margin-top: 3rem; padding-top: 1.6rem; border-top: 1px solid var(--rule); }
.sample-continue { font-style: italic; text-align: center; margin-bottom: 1.6rem; }
@media (max-width: 34rem) { .sample-text p { text-align: left; } }
.sample-call .button { color: var(--gold-ink); border-color: var(--gold-ink); } /* on the light paper: 4.8:1, not the hero's gold */

/* IMPRINT_SERIES_20261127: The Centaur on ludgatebooks.com; its samples' headings and datelines */
.sample-text h2 .title { display: block; font-style: italic; margin-top: .3rem; }
.sample-text p.dateline { text-indent: 0; text-align: center; font-style: italic; color: var(--ink-soft); margin: 0 0 1.4rem; }
.publisher-series .buy { margin: .2rem 0 0; }

/* LEO_20261128: leomarchant.com, dark like the covers of The Centaur (deep navy, gold, cream). Scoped to body.leo. */
body.leo { background: var(--navy-deep); color: var(--body-light); }
body.leo a { color: var(--cream); }
body.leo a:hover { color: var(--gold); }
body.leo :focus-visible { outline-color: var(--gold); }
body.leo .site-header { background: #10161D; border-bottom-color: #2A3542; }
body.leo .site-footer { background: #10161D; }
body.leo .leo-hero { background: radial-gradient(ellipse at 50% 0%, #26323F 0%, var(--navy-deep) 70%); border-bottom: 1px solid #2A3542; }
body.leo .leo-hero h1 { color: var(--cream); letter-spacing: 0.06em; text-transform: uppercase; font-weight: 500; }
body.leo .leo-hero .lede { color: var(--gold); font-style: italic; }
body.leo h1, body.leo h2, body.leo h3 { color: var(--cream); }
body.leo .section > h2, body.leo .prose h2 { color: var(--gold); letter-spacing: 0.08em; text-transform: uppercase; font-size: 1.05rem; }
body.leo .volumes img { box-shadow: 0 0.5rem 1.6rem rgba(0, 0, 0, 0.55); }
body.leo .volumes .vol { color: var(--gold); }
body.leo .volumes .title { color: var(--cream); }
body.leo .volumes p { color: #CFC7B8; }
body.leo .sample-link a, body.leo .sample-back a, body.leo .buy a { color: var(--gold); }
body.leo .buy { margin: 0.35rem 0 0; }
body.leo .review-note { color: #CFC7B8; font-size: 0.95em; }
body.leo .reading-order { margin: 0 0 1rem; padding-left: 1.4rem; }
body.leo .reading-order li { margin: 0.2rem 0; }
body.leo .kicker { color: var(--gold); }
body.leo .byline, body.leo .sample-note { color: #B9B2A4; }
body.leo .sample-text h2 .label { color: var(--gold); }
body.leo .sample-text p.break { color: #8E96A0; }
body.leo .sample-text p.dateline { color: #B9B2A4; }
body.leo .sample-end { border-top-color: #2A3542; }
body.leo .contact-list strong { color: var(--cream); }
.heat-line { font-size: 0.95em; color: var(--ink-soft); font-style: italic; margin: 0.8rem 0 1rem; }
.leo-background p { max-width: 46rem; }
