/* Buddhaghosa — editorial library and reader. Local fonts; no external assets. */
:root {
  color-scheme: light;
  --ink: #183b34;
  --ink-deep: #102c26;
  --body: #40554c;
  --muted: #64736a;
  --gold: #80602f;
  --gold-soft: #e6d8b8;
  --paper: #f6f3eb;
  --paper-deep: #ebeadd;
  --surface: #fffefa;
  --line: #d9e0d4;
  --line-strong: #bccab9;
  --sage: #edf2e7;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --radius: 4px;
  --shadow: 0 12px 34px rgb(24 59 52 / 5%);
  --reader-font-size: 1.15rem;
  --reader-line-height: 1.95;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
[hidden], .view[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button { color: inherit; }
input, select, textarea { color: var(--ink); max-width: 100%; }
a { color: inherit; text-underline-offset: 4px; }
a:hover { color: #356a54; }
a, button, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #a67c32; outline-offset: 4px; }
::selection { background: #dfdec3; color: var(--ink-deep); }
img { display: block; max-width: 100%; height: auto; }
svg { flex-shrink: 0; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { text-wrap: balance; }
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -.03em;
}
h1 { font-size: clamp(2.8rem, 5.4vw, 5rem); line-height: 1.07; }
h2 { font-size: clamp(2rem, 3.3vw, 2.8rem); }
h3 { font-size: 1.55rem; }
p { text-wrap: pretty; }
button:disabled, .button[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
main { min-height: 65vh; }
section[id], article[id] { scroll-margin-top: 110px; }
.container { width: min(1224px, calc(100% - 80px)); margin-inline: auto; }
.view { animation: view-enter .22s ease-out; }
.muted { color: var(--muted); }
.eyebrow, .section-kicker {
  color: var(--gold);
  font-size: .65rem;
  font-weight: 750;
  line-height: 1.5;
  letter-spacing: .19em;
  text-transform: uppercase;
}
.lede { color: var(--body); font-size: 1.1rem; line-height: 1.85; }

/* Main navigation */
.site-header {
  position: sticky;
  z-index: 30;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: rgb(255 254 250 / 97%);
  backdrop-filter: blur(14px);
}
.site-header > .container,
.site-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  min-height: 90px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; flex-shrink: 0; }
.brand:hover { color: var(--ink); }
.brand-symbol {
  width: 37px;
  height: 37px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #a58a52;
  border-radius: 50%;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 1.7rem;
  line-height: 1;
}
.brand-symbol img { width: 100%; height: 100%; object-fit: contain; }
.brand-name { display: block; font: 400 1.9rem/1.05 var(--serif); letter-spacing: -.04em; }
.brand-subtitle {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: .48rem;
  line-height: 1.3;
  letter-spacing: .2em;
  text-transform: uppercase;
}
.nav { display: flex; align-items: center; justify-content: center; gap: 26px; }
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #435c4e;
  font-size: .77rem;
  font-weight: 550;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
}
.nav-link::after {
  position: absolute;
  content: "";
  height: 1px;
  left: 0;
  right: 0;
  bottom: 5px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .18s ease;
}
.nav-link:hover, .nav-link.active, .nav-link[aria-current="page"] { color: var(--ink); }
.nav-link:hover::after, .nav-link.active::after, .nav-link[aria-current="page"]::after { transform: scaleX(1); }
.header-actions { display: flex; align-items: center; gap: 9px; }
.header-actions .button { font-size: .71rem; min-height: 40px; padding: 10px 15px; }
.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: transparent;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  line-height: 1;
}

/* Controls */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 21px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: .81rem;
  font-weight: 650;
  line-height: 1.45;
  text-align: center;
  text-decoration: none;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.button-primary { background: var(--ink); color: #fffefa; }
.button-primary:hover { background: #2d5848; border-color: #2d5848; color: #fffefa; }
.button-secondary { border-color: var(--line-strong); background: transparent; }
.button-secondary:hover { background: var(--sage); border-color: #91a98b; color: var(--ink); }
.button-quiet { border-color: transparent; background: transparent; padding-inline: 9px; }
.button-quiet:hover { color: var(--ink); background: var(--sage); border-color: transparent; }
.button svg { width: 17px; height: 17px; }
.pill, .tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 5px 9px;
  border: 1px solid #d4dfcd;
  border-radius: 2px;
  background: #f1f5eb;
  color: #496142;
  font-size: .62rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .02em;
}
.tag { background: #f4f0e6; border-color: #e3dbcb; color: #745a32; }
.pill.active, .tag.active, .pill[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
select {
  min-height: 44px;
  padding: 9px 34px 9px 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background-color: var(--surface);
  font-size: .79rem;
}

/* Opening composition: paper, line and rings, with no invented scripture. */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, .85fr);
  align-items: center;
  gap: 70px;
  padding-block: 76px 69px;
}
.hero-copy { max-width: 700px; }
.hero .eyebrow { margin-bottom: 22px; }
.hero h1 { max-width: 800px; margin-bottom: 27px; }
.hero .lede { max-width: 565px; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 13px; margin-top: 30px; }
.hero-note { color: var(--muted); font-size: .72rem; line-height: 1.9; margin-top: 20px; max-width: 570px; }
.hero-art {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 460px;
  padding: 72px 38px 55px;
  overflow: hidden;
  border-radius: 190px 190px 5px 5px;
  border: 1px solid #d7d9ca;
  background:
    radial-gradient(ellipse at 50% 16%, #fffdf5 0, #fffdf500 48%),
    linear-gradient(145deg, #e6e9dc, #efebdc);
  text-align: center;
  box-shadow: 0 17px 40px rgb(24 59 52 / 4%);
}
.hero-art::before {
  position: absolute;
  z-index: -1;
  content: "";
  inset: 19px 19px 22px;
  border: 1px solid #bbbfa6;
  border-radius: 173px 173px 2px 2px;
  background: rgb(255 254 247 / 67%);
  box-shadow: 0 4px 0 #e2e3d4, 0 5px 0 #bfc3b0, 0 8px 0 #eeeee0;
}
.hero-art::after {
  position: absolute;
  z-index: -1;
  content: "";
  width: 220px;
  height: 220px;
  top: 49px;
  left: 50%;
  transform: translateX(-50%);
  border: 1px solid rgb(142 116 58 / 16%);
  border-radius: 50%;
  box-shadow: 0 0 0 13px rgb(142 116 58 / 3%), 0 0 0 26px rgb(142 116 58 / 3%);
}
.hero-art > * { max-width: 100%; }
.hero-art h2, .hero-art .art-title {
  margin: 19px 0 22px;
  color: #284536;
  font: 400 clamp(2.15rem, 3.6vw, 3rem)/1.12 var(--serif);
  letter-spacing: -.035em;
}
.hero-art p { color: #687258; font-size: .69rem; line-height: 1.9; }
.hero-art .eyebrow { color: var(--gold); font-size: .6rem; margin: 0; }
.hero-art hr { width: 68%; border: 0; border-top: 1px solid #c8cfb8; margin: 23px 0; }
.stat-row { display: flex; flex-wrap: wrap; gap: 28px 38px; border-top: 1px solid var(--line); padding-top: 22px; margin-top: 34px; }
.stat { min-width: 95px; color: var(--muted); font-size: .66rem; line-height: 1.7; }
.stat strong { display: block; color: var(--ink); font-size: 1rem; font-weight: 600; line-height: 1.5; }

/* Catalogue and editorial sections */
.section { padding-block: 67px; border-top: 1px solid var(--line); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-bottom: 30px; }
.section-title { margin-top: 10px; }
.section-copy { max-width: 420px; color: var(--muted); font-size: .9rem; line-height: 1.9; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 23px; }
.feature-card {
  position: relative;
  padding: 29px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: border-color .18s ease, background .18s ease;
}
.feature-card:hover { border-color: #a0b498; background: #fcfdf7; color: var(--ink); }
.feature-card h3 { margin: 15px 0 13px; }
.feature-card p { font-size: .86rem; line-height: 1.9; color: var(--muted); }
.feature-card .eyebrow { font-size: .58rem; }
.feature-card .button { margin-top: 23px; }
.book-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 25px; align-items: stretch; }
.book-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  box-shadow: 0 3px 13px rgb(24 59 52 / 2%);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.book-card:hover { border-color: #99b08e; box-shadow: var(--shadow); color: var(--ink); }
.book-cover {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  min-height: 145px;
  overflow: hidden;
  background-color: #e8e9dd;
  background-position: center;
  background-size: cover;
  border-bottom: 1px solid #dde1d3;
  color: #5b694d;
}
.book-cover img { width: 100%; height: 100%; object-fit: cover; }
.book-cover .pill, .book-cover .tag { position: absolute; left: 17px; bottom: 15px; background: rgb(255 254 247 / 95%); }
.book-card > .book-meta,
.book-card > h3,
.book-card > p,
.book-card > .tag,
.book-card > .pill,
.book-card > .button { margin-inline: 25px; }
.book-card > .book-meta { margin-top: 24px; }
.book-card h3 { margin-top: 13px; margin-bottom: 14px; font-size: 1.48rem; line-height: 1.28; overflow-wrap: anywhere; }
.book-card p { color: var(--muted); font-size: .83rem; line-height: 1.85; margin-bottom: 20px; }
.book-card > .button { margin-top: auto; margin-bottom: 24px; align-self: flex-start; }
.book-card .book-body, .book-card .card-body { display: flex; flex: 1; flex-direction: column; padding: 24px 25px; }
.book-card .book-body h3, .book-card .card-body h3 { margin-top: 13px; }
.book-card .book-body .button, .book-card .card-body .button { margin-top: auto; align-self: flex-start; }
.book-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; color: var(--gold); font-size: .62rem; line-height: 1.7; font-weight: 600; }
.book-meta a { text-decoration-thickness: 1px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px 24px; margin: 26px 0 30px; }
.search-field {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 1 1 300px;
  min-width: 0;
  min-height: 49px;
  padding: 0 15px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fffefa;
  color: var(--muted);
}
.search-field:focus-within { border-color: #6c8d61; box-shadow: 0 0 0 2px #e1eadb; }
.search-field input { width: 100%; min-width: 0; min-height: 47px; padding: 10px 0; border: 0; background: transparent; font-size: .84rem; }
.search-field input:focus-visible { outline-offset: 1px; }
input.search-field { padding: 12px 15px; font-size: .84rem; }
.search-field svg { width: 18px; height: 18px; }
input::placeholder { color: #71816e; opacity: 1; }
.filter-group { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.filter-group button, .filter-group .pill { min-height: 40px; padding: 9px 13px; }
.filter-group > label, .filter-group > span { color: var(--muted); font-size: .72rem; }
.empty-state { padding: 55px 28px; border: 1px dashed var(--line-strong); background: #f8f9f2; text-align: center; }
.empty-state h3 { margin-bottom: 13px; }
.empty-state p { max-width: 540px; margin-inline: auto; color: var(--muted); font-size: .9rem; }
.empty-state .button { margin-top: 22px; }

/* About, services and proposed tiers */
.split-panel { display: grid; grid-template-columns: .85fr 1.15fr; align-items: start; gap: 85px; padding-block: 64px; }
.split-panel h2 { margin: 11px 0 22px; }
.split-panel p { color: var(--body); line-height: 1.9; }
.split-panel p + p { margin-top: 19px; }
.step-list { list-style: none; counter-reset: step; padding: 0; margin: 0; }
.step-list > li { display: grid; grid-template-columns: 33px 1fr; column-gap: 17px; padding: 20px 0; border-bottom: 1px solid var(--line); counter-increment: step; }
.step-list > li:first-child { padding-top: 0; }
.step-list > li::before { content: counter(step, decimal-leading-zero); color: var(--gold); font: 400 1.35rem/1.5 var(--serif); }
.step-list strong { display: block; font-size: .9rem; margin-bottom: 6px; }
.step-list p { font-size: .85rem; color: var(--muted); line-height: 1.85; }
.tier-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.tier-card { position: relative; display: flex; flex-direction: column; padding: 28px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: #fffefa; }
.tier-card.tier-featured { border-top: 3px solid #9b7e44; padding-top: 26px; background: #fafbf4; }
.tier-label { margin-bottom: 15px; color: var(--gold); font-size: .6rem; font-weight: 750; line-height: 1.6; letter-spacing: .13em; text-transform: uppercase; }
.tier-card h3 { font-size: 1.6rem; margin-bottom: 14px; }
.tier-card p { color: var(--muted); font-size: .8rem; line-height: 1.85; }
.price { color: var(--ink); font: 400 1.8rem/1.25 var(--serif); letter-spacing: -.02em; margin: 20px 0; }
.price small, .price span { color: var(--muted); font: 400 .71rem/1.6 var(--sans); letter-spacing: 0; }
.tier-card ul { padding-left: 18px; margin: 19px 0 25px; color: var(--body); font-size: .79rem; line-height: 1.85; }
.tier-card li { padding-left: 2px; margin: 9px 0; }
.tier-card .button { margin-top: auto; width: 100%; }
.tier-card .muted { margin-top: 15px; font-size: .69rem; }
.service-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 23px; }
.service-card { padding: 30px; border: 1px solid var(--line); border-radius: var(--radius); background: #fffefa; }
.service-card h3 { font-size: 1.6rem; margin: 13px 0 15px; }
.service-card p { color: var(--muted); font-size: .88rem; line-height: 1.9; }
.service-card .button { margin-top: 23px; }
.page-heading { padding-block: 54px 35px; max-width: 920px; }
.page-heading .eyebrow { margin-bottom: 17px; }
.page-heading h1 { font-size: clamp(2.55rem, 4.5vw, 3.65rem); line-height: 1.14; margin-bottom: 21px; }
.page-heading .lede { max-width: 790px; }
.notice { padding: 19px 23px; margin-block: 22px; border: 1px solid #ddd7c4; border-left: 3px solid #a18749; border-radius: 2px; background: #f6f3e8; color: #645637; font-size: .81rem; line-height: 1.85; }
.notice p + p { margin-top: 10px; }
.notice strong { color: #4d432d; }
.notice .button { margin-top: 13px; }
.preview-banner { padding: 9px 24px; border-bottom: 1px solid #d4ddcb; background: #edf2e6; color: #40593d; font-size: .65rem; line-height: 1.75; text-align: center; }
.preview-banner a { font-weight: 600; }

/* Reader */
.reader-shell { padding-bottom: 70px; }
.reader-header { padding-block: 36px 27px; border-bottom: 1px solid var(--line); }
.reader-header h1 { max-width: 1000px; margin: 13px 0 18px; font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.2; overflow-wrap: anywhere; }
.reader-header .book-meta { color: var(--muted); font-size: .71rem; font-weight: 500; }
.reader-header .lede { max-width: 850px; font-size: 1rem; }
.reader-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 13px 22px;
  padding: 15px 0;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--line);
}
.reader-toolbar .button { min-height: 39px; padding: 8px 12px; font-size: .73rem; }
.reading-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.reading-controls > span, .reading-controls > label { font-size: .69rem; color: var(--muted); margin-right: 3px; }
.reading-controls button { min-width: 39px; min-height: 39px; }
.edition-control { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.edition-control label { color: var(--muted); font-size: .71rem; }
.edition-control select { max-width: 310px; min-height: 39px; font-size: .75rem; }
.reader-layout { display: grid; grid-template-columns: 188px minmax(0, 1fr) 177px; gap: 34px; align-items: start; }
.reader-sidebar {
  position: sticky;
  top: 111px;
  max-height: calc(100vh - 145px);
  padding-right: 15px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #c3d0b8 transparent;
}
.reader-sidebar h2, .reader-sidebar h3, .reader-aside h2, .reader-aside h3 {
  font: 650 .61rem/1.6 var(--sans);
  letter-spacing: .13em;
  text-transform: uppercase;
  margin-bottom: 16px;
  color: var(--muted);
}
.reader-sidebar ul, .reader-sidebar ol { list-style: none; padding: 0; margin: 0; }
.reader-sidebar li { margin: 2px 0; }
.reader-sidebar a, .reader-sidebar button {
  display: block;
  width: 100%;
  min-height: 38px;
  padding: 9px 10px;
  border: 0;
  border-left: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #60705e;
  font-size: .73rem;
  line-height: 1.6;
  text-align: left;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.reader-sidebar a:hover, .reader-sidebar button:hover { background: var(--sage); color: var(--ink); }
.reader-sidebar .active, .reader-sidebar [aria-current="true"], .reader-sidebar [aria-current="location"] { border-left-color: #8d753a; background: #edf2e6; color: var(--ink); }
.reader-sidebar details > summary { min-height: 40px; color: var(--ink); font-size: .75rem; font-weight: 650; cursor: pointer; }
.reader-content { min-width: 0; padding: 30px 34px 45px; border: 1px solid #e1e5d8; border-radius: 3px; background: #fffefa; box-shadow: 0 3px 25px rgb(24 59 52 / 2%); }
.reader-content > .notice:first-child { margin-top: 0; }
.reader-text {
  max-width: 73ch;
  margin-inline: auto;
  color: #2d4438;
  font-family: var(--serif);
  font-size: var(--reader-font-size);
  font-weight: 400;
  line-height: var(--reader-line-height);
  overflow-wrap: break-word;
  text-rendering: optimizeLegibility;
}
.reader-text p { margin: 0 0 1.25em; text-wrap: pretty; }
.reader-text p:last-child { margin-bottom: 0; }
.reader-text p[id], .reader-text [id] { scroll-margin-top: 135px; }
.reader-text h1 { font-size: 1.85em; line-height: 1.25; margin: 1.6em 0 .8em; }
.reader-text h2 { font-size: 1.5em; line-height: 1.3; margin: 1.6em 0 .9em; }
.reader-text h3 { font-size: 1.25em; line-height: 1.4; margin: 1.5em 0 .8em; }
.reader-text h4 { font-family: var(--sans); font-size: .85em; line-height: 1.6; margin: 1.5em 0 .8em; letter-spacing: 0; }
.reader-text a { color: #2d614a; text-decoration-color: #b2c3a5; }
.reader-text strong, .reader-text b { font-weight: 700; }
.reader-text em, .reader-text i { font-style: italic; }
.reader-text ul, .reader-text ol { padding-left: 1.5em; margin: 1.2em 0; }
.reader-text li { padding-left: .2em; margin: .5em 0; }
.reader-text blockquote { padding: .3em 0 .3em 1.1em; margin: 1.5em 0; border-left: 2px solid #b2a075; color: #53624d; }
.reader-text blockquote p:last-child { margin-bottom: 0; }
.reader-text hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.reader-text pre { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; }
.reader-text img { max-height: 650px; object-fit: contain; margin: 1.5em auto; }
.reader-text table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; font-size: .83em; line-height: 1.7; margin: 1.5em 0; }
.reader-text th, .reader-text td { padding: .8em; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.reader-text th { font-family: var(--sans); font-size: .85em; background: var(--sage); }
.reader-text .verse { white-space: pre-line; margin-block: 1.5em; }
.reader-text .passage-active, .reader-text p:target { background: #f2efdb; box-shadow: 0 0 0 7px #f2efdb; border-radius: 1px; }
.reader-aside { position: sticky; top: 111px; font-size: .72rem; line-height: 1.85; color: var(--muted); }
.reader-aside p + p { margin-top: 13px; }
.reader-aside .button { width: 100%; min-height: 40px; font-size: .69rem; padding: 9px; margin-top: 15px; }
.reader-aside .pill, .reader-aside .tag { margin: 0 5px 7px 0; font-size: .56rem; }
.reader-aside audio { display: block; width: 100%; margin-top: 15px; }
.reader-aside video { max-width: 100%; }
.reader-aside .notice { font-size: .68rem; line-height: 1.8; padding: 14px; }
.reader-shell[data-reader-theme="sepia"] .reader-content { background: #f3ecdc; border-color: #dcd2b7; }
.reader-shell[data-reader-theme="sepia"] .reader-text { color: #493f2d; }
.reader-shell[data-reader-theme="night"] .reader-content { background: #1f3029; border-color: #35483a; }
.reader-shell[data-reader-theme="night"] .reader-text { color: #e2e8d6; }
.reader-shell[data-reader-theme="night"] .reader-text a { color: #cad6a7; }
.reader-shell[data-reader-theme="night"] .reader-text blockquote { color: #bdc8ad; }
.reader-shell[data-reader-theme="night"] .reader-text p:target { background: #3b4935; box-shadow: 0 0 0 7px #3b4935; }
.reader-shell[data-reader-theme="night"] .reader-text th { background: #2c3e31; }

/* Footer */
.site-footer { margin-top: 55px; border-top: 1px solid var(--line); background: #f3f5ed; padding: 43px 0 25px; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 50px; padding-bottom: 30px; }
.site-footer .brand-name { color: var(--ink); font-size: 1.65rem; }
.site-footer p { max-width: 385px; margin-top: 15px; font-size: .76rem; line-height: 1.9; }
.site-footer h3, .site-footer h4 { color: #496044; font: 700 .63rem/1.6 var(--sans); letter-spacing: .11em; text-transform: uppercase; margin: 0 0 15px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 7px 0; }
.site-footer a:not(.brand) { display: inline-block; font-size: .75rem; line-height: 1.8; text-decoration: none; }
.site-footer a:not(.brand):hover { text-decoration: underline; }
.site-footer .footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px 28px; border-top: 1px solid var(--line); padding-top: 20px; font-size: .65rem; line-height: 1.8; }

@keyframes view-enter { from { opacity: .65; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

@media (min-width: 1600px) {
  .container { max-width: 1300px; }
  .hero { gap: 100px; }
}
@media (max-width: 1150px) {
  .container { width: calc(100% - 56px); }
  .site-header > .container, .site-header .header-inner { gap: 20px; }
  .nav { gap: 18px; }
  .brand-name { font-size: 1.7rem; }
  .brand-subtitle { font-size: .43rem; letter-spacing: .16em; }
  .header-actions .button { padding-inline: 11px; }
  .hero { gap: 38px; grid-template-columns: 1.2fr .85fr; padding-top: 59px; }
  .hero h1 { font-size: 4rem; }
  .hero-art { min-height: 420px; padding-inline: 27px; }
  .tier-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reader-layout { grid-template-columns: 174px minmax(0, 1fr); gap: 27px; }
  .reader-aside { position: static; grid-column: 2; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 25px; border-top: 1px solid var(--line); padding-top: 23px; }
  .reader-aside .notice { margin-top: 0; }
  .reader-content { padding-inline: 29px; }
  .split-panel { gap: 50px; }
}
@media (max-width: 950px) {
  .site-header > .container, .site-header .header-inner { flex-wrap: wrap; gap: 12px; min-height: 83px; padding-block: 16px; }
  .brand { margin-right: auto; }
  .brand-name { font-size: 1.75rem; }
  .brand-subtitle { font-size: .46rem; }
  .mobile-toggle { display: inline-flex; }
  .nav { display: none; order: 4; width: 100%; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; padding: 11px 0 0; border-top: 1px solid var(--line); }
  .nav.is-open, .nav.open, .nav[data-open="true"], .site-header:has(.mobile-toggle[aria-expanded="true"]) .nav { display: flex; }
  .nav-link { min-height: 44px; padding: 10px 8px; font-size: .84rem; }
  .nav-link::after { left: 8px; right: auto; width: 30px; bottom: 4px; }
  .header-actions { margin-right: 7px; }
  .hero { grid-template-columns: minmax(0, 1fr) minmax(255px, .8fr); gap: 27px; }
  .hero h1 { font-size: 3.5rem; }
  .hero .lede { font-size: 1rem; }
  .hero-art { min-height: 390px; padding-inline: 24px; }
  .hero-art h2, .hero-art .art-title { font-size: 2.4rem; }
  .hero-art::after { width: 185px; height: 185px; }
  .feature-grid, .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .feature-grid > :last-child:nth-child(3) { grid-column: 1 / -1; }
  .section { padding-block: 51px; }
  .feature-card { padding: 25px; }
  .reader-content { padding: 25px 26px 36px; }
  .reader-layout { grid-template-columns: 155px minmax(0, 1fr); gap: 21px; }
  .reader-text { font-size: calc(var(--reader-font-size) * .96); }
  .split-panel { grid-template-columns: 1fr 1.15fr; gap: 35px; }
  .footer-grid { gap: 30px; }
}
@media (max-width: 720px) {
  html { scroll-padding-top: 95px; }
  .container { width: calc(100% - 40px); }
  .site-header > .container, .site-header .header-inner { min-height: 78px; padding-block: 14px; }
  .brand-symbol { width: 33px; height: 33px; font-size: 1.5rem; }
  .brand-name { font-size: 1.65rem; }
  .brand-subtitle { font-size: .42rem; margin-top: 6px; }
  .header-actions .button { min-height: 37px; padding: 9px 10px; font-size: .65rem; }
  .header-actions { gap: 4px; margin-right: 0; }
  .header-actions .button-quiet { display: none; }
  .mobile-toggle { width: 39px; height: 39px; padding: 8px; }
  .button { min-height: 47px; font-size: .77rem; padding: 12px 17px; }
  .hero { grid-template-columns: 1fr; gap: 38px; padding-block: 43px 45px; }
  .hero h1 { font-size: clamp(2.8rem, 8.5vw, 3.8rem); letter-spacing: -.04em; margin-bottom: 23px; }
  .hero .eyebrow { margin-bottom: 18px; font-size: .6rem; }
  .hero .lede { max-width: 560px; font-size: 1rem; }
  .hero-actions { gap: 9px; margin-top: 26px; }
  .hero-art { width: min(100%, 385px); min-height: 390px; padding: 62px 33px 49px; margin-inline: auto; }
  .hero-art h2, .hero-art .art-title { font-size: 2.6rem; }
  .hero-art::after { width: 210px; height: 210px; }
  .hero-note { font-size: .69rem; }
  .stat-row { gap: 21px; margin-top: 26px; padding-top: 20px; }
  .stat { min-width: 80px; font-size: .61rem; }
  .stat strong { font-size: .9rem; }
  .section { padding-block: 42px; }
  .section-heading { display: block; margin-bottom: 25px; }
  .section-title { font-size: 2.1rem; margin-top: 9px; }
  .section-copy { margin-top: 17px; max-width: 520px; font-size: .86rem; }
  .section-heading > .button { margin-top: 20px; }
  .feature-grid, .book-grid, .service-grid { grid-template-columns: 1fr; }
  .feature-grid > :last-child:nth-child(3) { grid-column: auto; }
  .feature-card, .service-card { padding: 26px; }
  .feature-card h3, .service-card h3 { font-size: 1.65rem; }
  .book-grid { gap: 23px; }
  .book-cover { aspect-ratio: 16 / 8; }
  .book-card h3 { font-size: 1.7rem; }
  .book-card > .book-meta, .book-card > h3, .book-card > p, .book-card > .tag, .book-card > .pill, .book-card > .button { margin-inline: 24px; }
  .book-card .book-body, .book-card .card-body { padding: 23px 24px; }
  .toolbar { align-items: stretch; gap: 17px; margin-block: 21px 25px; }
  .search-field { flex-basis: 100%; }
  .filter-group { width: 100%; gap: 7px; }
  .filter-group button { flex: 1 1 auto; font-size: .69rem; padding-inline: 10px; }
  .filter-group select { flex: 1 1 150px; }
  .split-panel { grid-template-columns: 1fr; gap: 30px; padding-block: 43px; }
  .split-panel h2 { margin-bottom: 17px; }
  .tier-grid { grid-template-columns: 1fr; }
  .tier-card { padding: 28px; }
  .tier-card.tier-featured { padding-top: 26px; }
  .tier-card .button { width: auto; align-self: flex-start; min-width: 170px; }
  .page-heading { padding-block: 39px 25px; }
  .page-heading h1 { font-size: 2.6rem; margin-bottom: 19px; }
  .page-heading .lede { font-size: 1rem; }
  .notice { padding: 17px 19px; font-size: .76rem; }
  .preview-banner { padding: 8px 18px; font-size: .6rem; }
  .reader-shell { padding-bottom: 40px; }
  .reader-header { padding-block: 27px 23px; }
  .reader-header h1 { font-size: 2.1rem; margin-top: 14px; }
  .reader-header .book-meta { font-size: .65rem; }
  .reader-header .lede { font-size: .9rem; }
  .reader-toolbar { padding-block: 13px; margin-bottom: 23px; gap: 13px; }
  .edition-control { width: 100%; justify-content: space-between; }
  .edition-control select { max-width: 100%; flex: 1; }
  .reading-controls { gap: 6px; }
  .reading-controls .button { min-width: 40px; min-height: 40px; }
  .reader-layout { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .reader-sidebar { position: static; max-height: 215px; padding: 16px 14px 14px; border: 1px solid var(--line); border-radius: 2px; background: #f7f9f1; }
  .reader-sidebar h2, .reader-sidebar h3 { margin-bottom: 9px; }
  .reader-sidebar a, .reader-sidebar button { font-size: .72rem; }
  .reader-content { padding: 25px 21px 33px; }
  .reader-text { font-size: var(--reader-font-size); line-height: var(--reader-line-height); }
  .reader-aside { grid-column: auto; grid-template-columns: 1fr; gap: 15px; padding-top: 19px; }
  .reader-aside .button { width: auto; align-self: start; justify-self: start; padding-inline: 16px; }
  .reader-aside audio { max-width: 360px; }
  .site-footer { margin-top: 38px; padding-top: 33px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 27px; padding-bottom: 25px; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .site-footer .footer-bottom { display: block; font-size: .61rem; }
  .site-footer .footer-bottom > * + * { margin-top: 9px; }
}
@media (max-width: 390px) {
  .container { width: calc(100% - 32px); }
  .brand { gap: 8px; }
  .brand-symbol { width: 29px; height: 29px; }
  .brand-name { font-size: 1.5rem; }
  .brand-subtitle { font-size: .36rem; letter-spacing: .16em; }
  .site-header > .container, .site-header .header-inner { gap: 8px; }
  .header-actions .button { padding-inline: 8px; font-size: .61rem; }
  .hero h1 { font-size: 2.7rem; }
  .hero-actions .button { width: 100%; }
  .hero-art { min-height: 360px; padding-inline: 27px; }
  .hero-art h2, .hero-art .art-title { font-size: 2.3rem; }
  .reader-content { padding-inline: 17px; }
  .reader-text { font-size: calc(var(--reader-font-size) * .96); }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-grid > :first-child { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .view { animation: none; }
}
@media print {
  body { background: #fff; color: #000; font-size: 11pt; }
  .container { width: 100%; max-width: none; }
  .site-header, .site-footer, .reader-toolbar, .reader-sidebar, .reader-aside, .preview-banner, .mobile-toggle { display: none !important; }
  .reader-layout { display: block; }
  .reader-content { padding: 0; border: 0; box-shadow: none; background: #fff !important; }
  .reader-text { max-width: none; color: #000 !important; font-size: 12pt; line-height: 1.65; }
  .reader-text a { color: inherit; }
  .reader-header { padding-top: 0; margin-bottom: 20px; }
  .book-card, .feature-card, .tier-card, .service-card { break-inside: avoid; }
  .hero-art { display: none; }
  .hero, .split-panel { display: block; }
  .hero { padding: 20px 0; }
}

/* Integration with the current application markup (app.css loads afterward). */
.site-header .mobile-toggle { width: auto; min-width: 55px; padding-inline: 13px; font-size: .73rem; font-weight: 600; }
.hero .hero-art { min-height: 460px; padding: 38px 22px 31px; }
.hero .hero-art::after { display: none; }
.hero .hero-orbit { z-index: -1; width: 270px; height: 270px; top: 40px; left: calc(50% - 135px); }
.hero .hero-manuscript { width: calc(100% - 28px); margin: 60px 0 26px; padding: 29px 24px 24px; border: 1px solid #d3cbb3; border-radius: 2px; background: #fffdf4; box-shadow: 0 15px 32px rgb(44 58 32 / 12%); transform: rotate(-3deg); }
.hero .hero-manuscript h2 { font-size: 2.3rem !important; line-height: 1.15; margin: 20px 0 !important; color: #284536; }
.hero .hero-manuscript p { font-size: .64rem; color: #687258; }
.hero .hero-manuscript small { color: var(--gold); font-size: .57rem; line-height: 1.7; }
.hero .hero-bottom-note { margin: 0 10px; color: #5a6c50; font-size: .59rem; line-height: 1.8; letter-spacing: .09em; }
.container.stat-row { align-items: stretch; justify-content: space-between; gap: 0; padding-block: 23px; margin-top: 0; }
.stat-row .stat { flex: 1 1 0; min-width: 0; min-height: 58px; padding: 0 32px; border-right: 1px solid var(--line); }
.stat-row .stat:first-child { padding-left: 0; }
.stat-row .stat:last-child { border-right: 0; padding-right: 0; }
.stat-row .stat strong { font: 400 1.7rem/1.25 var(--serif); letter-spacing: -.03em; }
.stat-row .stat span { display: block; margin-top: 5px; }
.section > .section-copy { max-width: 720px; margin-bottom: 27px; }
.feature-grid:has(> :nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.feature-card h2 { font-size: 1.8rem; line-height: 1.25; margin: 13px 0 17px; }
.feature-card > a:not(.button) { display: inline-block; margin-top: 22px; font-size: .79rem; font-weight: 600; text-underline-offset: 5px; }
.book-card .book-copy { display: flex; flex: 1; flex-direction: column; padding: 24px; }
.book-card .book-copy h2 { font-size: 1.4rem; line-height: 1.3; margin: 14px 0 13px; }
.book-card .book-copy .book-title { font-size: 1.45rem; line-height: 1.33; overflow-wrap: anywhere; }
.book-card .book-copy .book-link { align-self: flex-start; margin-top: auto; padding-top: 20px; font-size: .77rem; font-weight: 650; text-decoration: none; }
.book-card .book-copy .book-link:hover { text-decoration: underline; }
.book-card .book-copy .book-meta { align-items: start; font-size: .63rem; }
.book-card .book-copy .excerpt { margin-top: 0; margin-bottom: 21px; }
.service-grid:has(> :nth-child(3):last-child),
.tier-grid:has(> :nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.service-card h2 { font-size: 1.65rem; line-height: 1.3; margin: 13px 0 16px; }
.service-card ul { color: var(--body); font-size: .84rem; line-height: 1.8; margin-block: 18px 24px; }
.step-list > div { position: relative; padding: 22px 0 24px 55px; border-bottom: 1px solid var(--line); }
.step-list > div:first-child { padding-top: 0; }
.step-list > div > .feature-number { position: absolute; top: 20px; left: 0; font-size: 1.5rem; line-height: 1.2; }
.step-list > div:first-child > .feature-number { top: 0; }
.step-list > div h3 { font-size: 1.4rem; margin-bottom: 12px; }
.step-list > div p { color: var(--muted); font-size: .84rem; line-height: 1.85; }
.step-list > div:not(:has(> .feature-number)) { padding-left: 0; }
.reader-shell .reader-sidebar { top: 111px; max-height: calc(100vh - 145px); }
.reader-content .reader-text [id] { scroll-margin-top: 135px; }
.reader-progress[aria-hidden="true"] { top: 90px; z-index: 29; }
.reader-content[data-theme="sepia"] .reader-text { color: #493f2d; }
.reader-content[data-theme="night"] .reader-text { color: #e4ead9; }
.reader-content[data-theme="night"] .reader-text * { color: inherit !important; background-color: transparent !important; border-color: #4b5c49 !important; }
.reader-content[data-theme="night"] .reader-text a { color: #e2c88e !important; text-decoration-color: #77866b; }
.reader-content[data-theme="night"] .reader-text blockquote { color: #cbd4bf !important; }
.reader-content[data-theme="night"] .reader-text mark { background: #4b5638 !important; color: #fff8da !important; }
.reader-content[data-theme="night"] .reader-text p:target { background: #3b4935 !important; box-shadow: 0 0 0 7px #3b4935; }
.site-footer .footer-grid { grid-template-columns: 1.35fr .8fr .9fr 1.1fr; gap: 35px; }
.site-footer .footer-label { margin: 0 0 14px; color: #496044; font-size: .61rem; font-weight: 700; line-height: 1.6; letter-spacing: .11em; text-transform: uppercase; }
.site-footer .footer-bottom { margin-top: 0; border-top: 1px solid var(--line); }
@media (max-width: 1150px) {
  .hero .hero-art { min-height: 420px; padding-inline: 18px; }
  .hero .hero-manuscript { width: calc(100% - 20px); margin-top: 53px; padding-inline: 20px; }
  .hero .hero-manuscript h2 { font-size: 2.1rem !important; }
  .service-card { padding-inline: 25px; }
  .site-footer .footer-grid { gap: 25px; }
}
@media (max-width: 950px) {
  .site-header .mobile-toggle { display: inline-flex; }
  .hero .hero-art { min-height: 390px; }
  .hero .hero-manuscript { margin-top: 45px; padding-inline: 15px; }
  .hero .hero-manuscript h2 { font-size: 1.9rem !important; }
  .reader-progress[aria-hidden="true"] { top: 83px; }
  .service-grid:has(> :nth-child(3):last-child) { grid-template-columns: 1fr; }
  .site-footer .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .site-footer .footer-grid > :first-child { grid-column: 1; }
  .reader-shell .reader-sidebar { top: 103px; max-height: calc(100vh - 135px); }
}
@media (max-width: 760px) {
  .reader-shell .reader-sidebar { position: static; top: auto; max-height: 210px; }
  .service-grid:has(> :nth-child(3):last-child),
  .tier-grid:has(> :nth-child(3):last-child),
  .feature-grid:has(> :nth-child(2):last-child) { grid-template-columns: 1fr; }
  .reader-content .reader-text [id] { scroll-margin-top: 110px; }
  .step-list > div { padding-left: 49px; }
}
@media (max-width: 720px) {
  .hero .hero-art { min-height: 380px; padding: 24px 23px 27px; }
  .hero .hero-manuscript { width: calc(100% - 20px); margin-top: 42px; margin-bottom: 23px; padding: 25px 21px 22px; }
  .hero .hero-manuscript h2 { font-size: 2.2rem !important; }
  .stat-row .stat { padding-inline: 13px; min-height: 68px; font-size: .6rem; }
  .stat-row .stat strong { font-size: 1.4rem; }
  .stat-row .stat span { max-width: 18ch; }
  .site-footer .footer-grid > :first-child { grid-column: 1 / -1; }
  .reader-progress[aria-hidden="true"] { top: 78px; }
}
@media (max-width: 390px) {
  .hero .hero-manuscript h2 { font-size: 2rem !important; }
  .hero .hero-bottom-note { font-size: .53rem; }
  .stat-row .stat { padding-inline: 10px; font-size: .57rem; }
  .site-footer .footer-grid { grid-template-columns: 1fr; }
}
@media print {
  .reader-shell .reader-header { display: block !important; }
  .reader-content[data-theme="night"] .reader-text,
  .reader-content[data-theme="night"] .reader-text * { color: #000 !important; background: transparent !important; }
}
/* Small layout adjustments for the rendered catalogue and information routes. */
.container.page-heading { max-width: none; }
.section-title + p { margin-top: 20px; }
.split-panel .button, .compare-grid > div > .button { margin-top: 23px; }
.compare-grid p + p { margin-top: 18px; }
.feature-card > .pill { margin-top: 22px; }
.toolbar .search-field { padding: 0; border: 0; background: transparent; }
.toolbar .search-field input { min-height: 49px; padding: 12px 15px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: #fffefa; font-size: .84rem; }
