/* Independent Press Publications - design system
   Paper, ink, one accent. Serif for reading, quiet sans for interface. */

@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-opsz.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-opsz-italic.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/source-sans-3.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f6f0e5;
  --paper-2: #eee4d3;
  --paper-3: #e4d7c2;
  --card: #fbf8f2;
  --ink: #1f1a15;
  --ink-2: #4d443a;
  --ink-3: #6b6054;
  --rule: #d6c8b2;
  --accent: #8a2e1f;
  --accent-2: #6d2418;
  --accent-tint: #f1ddd4;
  --on-accent: #fbf6ee;
  --focus: #1d4f7a;
  --ph-bg: #fff1bf;
  --ph-line: #9a7400;
  --ph-ink: #4a3800;

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;

  --step--1: clamp(0.86rem, 0.83rem + 0.12vw, 0.94rem);
  --step-0: clamp(1.06rem, 1.01rem + 0.25vw, 1.2rem);
  --step-1: clamp(1.25rem, 1.15rem + 0.45vw, 1.5rem);
  --step-2: clamp(1.5rem, 1.32rem + 0.85vw, 2rem);
  --step-3: clamp(1.85rem, 1.5rem + 1.6vw, 2.85rem);
  --step-4: clamp(2.3rem, 1.75rem + 2.6vw, 4rem);
  --step-5: clamp(4.5rem, 3rem + 7vw, 9rem);

  --gutter: clamp(1rem, 0.5rem + 3vw, 2.5rem);
  --space-s: 0.75rem;
  --space-m: 1.5rem;
  --space-l: clamp(2.5rem, 2rem + 2.5vw, 4rem);
  --space-xl: clamp(3.5rem, 2.5rem + 5vw, 7rem);
  --radius: 4px;
  --shadow-book: 0 1px 1px rgba(31, 26, 21, 0.12), 0 6px 14px -4px rgba(31, 26, 21, 0.28), 0 18px 40px -18px rgba(31, 26, 21, 0.35);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--paper);
  background-image: var(--texture, none);
  background-size: 512px 512px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--step-0);
  line-height: 1.6;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }

img, svg, picture { display: block; max-width: 100%; height: auto; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); font-weight: 600; }
p { margin: 0 0 1em; text-wrap: pretty; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
/* Long addresses (the email domain) must wrap on the narrowest phones */
a[href^="mailto:"], address, .footer-grid a { overflow-wrap: anywhere; }
main { overflow-wrap: break-word; }
a:hover { color: var(--accent-2); text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
  font-family: var(--sans);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; color: var(--paper); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ---------- Layout ---------- */

.wrap {
  width: 100%;
  max-width: 74rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.measure { max-width: 38rem; }
.section { padding-block: var(--space-xl); }
.section--tight { padding-block: var(--space-l); }
.section--band { background: var(--paper-2); border-block: 1px solid var(--rule); }
.rule { border: 0; border-top: 1px solid var(--rule); margin: var(--space-l) 0; }

.eyebrow {
  font-family: var(--sans);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 0.9rem;
}
.lede { font-size: var(--step-1); line-height: 1.45; color: var(--ink-2); }
.muted { color: var(--ink-2); }
.small { font-size: var(--step--1); }
.sans { font-family: var(--sans); }

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--rule);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
}
.brand:hover { color: var(--ink); }
.brand__logo { height: 3rem; width: 3rem; }
.brand__name {
  font-family: var(--serif);
  font-size: clamp(1.02rem, 0.9rem + 0.6vw, 1.3rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: 0.01em;
}
.brand__name small {
  display: block;
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 0.2rem;
}

.nav-toggle {
  display: none;
  font: 600 0.95rem/1 var(--sans);
  background: none;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  color: var(--ink);
  padding: 0.6rem 0.8rem;
  cursor: pointer;
}
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.25rem 1.4rem;
  align-items: center;
}
.site-nav a {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  padding: 0.5rem 0;
  display: inline-block;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--accent); }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); }
.cart-link__count {
  display: inline-grid;
  place-items: center;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 0.35rem;
  margin-left: 0.3rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.78rem;
  font-weight: 700;
}
.cart-link__count[hidden] { display: none; }

@media (max-width: 47.99rem) {
  .js .nav-toggle { display: inline-block; }
  .js .site-nav { display: none; }
  .js .site-nav.is-open {
    display: block;
    position: absolute;
    left: 0; right: 0;
    top: 4.5rem;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    padding: 0.5rem var(--gutter) 1rem;
    z-index: 5;
  }
  .site-header { position: relative; }
  .site-nav ul { flex-direction: column; align-items: stretch; }
  .site-nav a { display: block; padding: 0.8rem 0; border-bottom: 1px solid var(--rule); }
  .site-nav li:last-child a { border-bottom: 0; }
  .site-nav a[aria-current="page"] { box-shadow: none; }
  .no-js .site-nav ul { flex-direction: row; flex-wrap: wrap; }
  .no-js .site-header__inner { flex-wrap: wrap; padding-block: 0.75rem; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--sans);
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.85rem 1.4rem;
  min-height: 3rem;
  border-radius: var(--radius);
  border: 1.5px solid var(--accent);
  background: var(--accent);
  color: var(--on-accent);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { background: var(--accent-2); border-color: var(--accent-2); color: var(--on-accent); text-decoration: none; }
.btn--ghost { background: transparent; color: var(--accent); }
.btn--ghost:hover { background: var(--accent-tint); color: var(--accent-2); }
.btn--quiet { background: transparent; color: var(--ink); border-color: var(--ink-3); }
.btn--quiet:hover { background: var(--paper-2); color: var(--ink); border-color: var(--ink); }
.btn[disabled], .btn[aria-disabled="true"] {
  background: var(--paper-3);
  border-color: var(--paper-3);
  color: var(--ink-3);
  cursor: not-allowed;
}
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.text-link {
  font-family: var(--sans);
  font-weight: 600;
  text-decoration: none;
}
.text-link::after { content: " \2192"; }
.text-link:hover { text-decoration: underline; }

/* ---------- Placeholders (visible on purpose) ---------- */

.ph {
  background: var(--ph-bg);
  color: var(--ph-ink);
  outline: 1.5px dashed var(--ph-line);
  outline-offset: 1px;
  font-family: var(--sans);
  font-size: 0.9em;
  font-weight: 600;
  padding: 0.05em 0.4em;
  border-radius: 2px;
}
.ph-block {
  display: grid;
  place-items: center;
  text-align: center;
  background: repeating-linear-gradient(135deg, var(--ph-bg) 0 14px, #fbe7a1 14px 28px);
  color: var(--ph-ink);
  border: 2px dashed var(--ph-line);
  font-family: var(--sans);
  font-weight: 600;
  font-size: var(--step--1);
  padding: 1rem;
}
.logo-ph {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  flex: none;
  border: 1.5px dashed var(--ph-line);
  background: var(--ph-bg);
  color: var(--ph-ink);
  font: 700 0.6rem/1 var(--sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- Media ---------- */

.figure { margin: 0; }
.figure img { width: 100%; height: 100%; object-fit: cover; }
.frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--paper-3);
}

/* ---------- Home hero ---------- */

.hero { padding-block: clamp(2rem, 1rem + 4vw, 5rem) var(--space-l); }
.hero__grid {
  display: grid;
  gap: var(--space-l);
  align-items: center;
}
.hero h1 { font-size: var(--step-4); font-weight: 450; max-width: 13ch; margin-bottom: 0.4em; }
.hero__lede { font-size: var(--step-1); line-height: 1.45; color: var(--ink-2); max-width: 34rem; }
.hero__media { aspect-ratio: 4 / 3; }
.hero__media .ph-block { height: 100%; }

.facts {
  list-style: none;
  margin: var(--space-m) 0 var(--space-m);
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
}
.facts li {
  padding: 0.85rem 0.75rem 0.85rem 0;
  border-bottom: 1px solid var(--rule);
}
.facts strong {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 1.2rem + 0.7vw, 1.85rem);
  font-weight: 500;
  line-height: 1.05;
  color: var(--accent);
  white-space: nowrap;
}
.facts span {
  display: block;
  font-family: var(--sans);
  font-size: var(--step--1);
  color: var(--ink-2);
  margin-top: 0.2rem;
}

@media (min-width: 56rem) {
  .hero__grid { grid-template-columns: 1.05fr 1fr; }
  .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .facts li { padding-right: 1rem; }
  .hero__media { aspect-ratio: 4 / 5; }
}

/* ---------- Two paths ---------- */

.paths {
  display: grid;
  gap: var(--space-m);
}
.path {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: var(--space-m) var(--space-m) calc(var(--space-m) + 0.25rem);
  background: var(--card);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--ink);
  border-radius: 0 0 var(--radius) var(--radius);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.path:hover { border-top-color: var(--accent); background: #fffdf8; color: var(--ink); }
.path h3 { font-size: var(--step-2); font-weight: 500; margin: 0; }
.path p { margin: 0; color: var(--ink-2); }
.path .text-link { margin-top: auto; padding-top: 0.75rem; color: var(--accent); }
@media (min-width: 44rem) { .paths { grid-template-columns: 1fr 1fr; } }

/* ---------- The 60% callout ---------- */

.callout {
  display: grid;
  gap: var(--space-l);
  align-items: start;
}
.callout__figure {
  font-family: var(--serif);
  font-size: var(--step-5);
  font-weight: 400;
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: var(--accent);
  margin: 0 0 0.15em;
  font-variant-numeric: lining-nums;
}
.callout__figure span { font-size: 0.55em; letter-spacing: 0; vertical-align: 0.55em; margin-left: 0.04em; }
.callout__core { font-size: var(--step-2); line-height: 1.25; max-width: 22ch; margin-bottom: 0.6em; }
.callout__support { color: var(--ink-2); max-width: 34rem; }

.compare {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: var(--space-m);
}
.compare__label {
  font-family: var(--sans);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 0.25rem;
}
.compare__note { font-family: var(--sans); font-size: var(--step--1); color: var(--ink-3); margin: 0 0 1.25rem; }
.compare__rows { display: grid; gap: 1.25rem; }
.compare__row h3 {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.15rem;
}
.compare__row p { font-family: var(--sans); font-size: var(--step--1); color: var(--ink-2); margin: 0 0 0.5rem; }
.compare__amount {
  font-family: var(--serif);
  font-size: var(--step-3);
  line-height: 1;
  font-variant-numeric: lining-nums tabular-nums;
}
.compare__amount small { font-family: var(--sans); font-size: 0.95rem; color: var(--ink-2); margin-left: 0.3rem; letter-spacing: 0; }
.compare__row--ipp .compare__amount { color: var(--accent); }
.bar {
  height: 0.65rem;
  margin-top: 0.55rem;
  background: var(--paper-2);
  border-radius: 999px;
  overflow: hidden;
}
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--ink-3); }
.compare__row--ipp .bar i { background: var(--accent); }

.math {
  margin: 1.5rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: var(--step--1);
  color: var(--ink-2);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.3rem 1rem;
  font-variant-numeric: tabular-nums;
}
.math dt, .math dd { margin: 0; }
.math dd { text-align: right; }
.math .total { font-weight: 700; color: var(--ink); border-top: 1px solid var(--rule); padding-top: 0.35rem; }

@media (min-width: 56rem) {
  .callout { grid-template-columns: 1fr 1.05fr; gap: var(--space-xl); }
}

/* ---------- Books ---------- */

.book-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-l) var(--space-m);
}
@media (min-width: 40rem) { .book-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .book-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.book-card { display: flex; flex-direction: column; }
.book-card a { color: var(--ink); text-decoration: none; }
.book-card a:hover h3 { color: var(--accent); }
.book-card .cover { margin-bottom: 1rem; transition: transform 0.2s ease; }
.book-card a:hover .cover { transform: translateY(-3px); }
.book-card h3 { font-size: var(--step-1); font-weight: 500; margin: 0 0 0.2rem; transition: color 0.15s ease; }
.book-card__meta { font-family: var(--sans); font-size: var(--step--1); color: var(--ink-2); margin: 0; }
.tag {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
  background: var(--ink);
  color: var(--paper);
}
.tag--soft { background: var(--paper-3); color: var(--ink); }

/* Covers: real cover image, or a typeset placeholder that says so */
.cover {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 2px 4px 4px 2px;
  box-shadow: var(--shadow-book);
  overflow: hidden;
  background: var(--paper-3);
}
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6%;
  background: linear-gradient(90deg, rgba(0,0,0,0.18), rgba(255,255,255,0.08) 60%, transparent);
  pointer-events: none;
}
.cover--ph {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12% 10% 9% 14%;
  color: #f4ecdd;
  background: var(--cloth, #4a3b2f);
}
.cover--ph .cover__title {
  font-family: var(--serif);
  font-size: clamp(1rem, 0.6rem + 1.5vw, 1.6rem);
  line-height: 1.1;
  font-weight: 500;
}
.cover--large.cover--ph .cover__title { font-size: clamp(1.6rem, 1rem + 2.2vw, 2.6rem); }
.cover--ph .cover__author {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.85;
}
.cover--ph .cover__flag {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font: 700 0.62rem/1 var(--sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--ph-bg);
  color: var(--ph-ink);
  border: 1px dashed var(--ph-line);
  padding: 0.3rem 0.4rem;
}

/* ---------- Book page ---------- */

.book {
  display: grid;
  gap: var(--space-l);
  padding-block: var(--space-l) var(--space-xl);
}
.book__cover { max-width: 22rem; width: 72%; margin-inline: auto; }
.book h1 { font-size: var(--step-4); margin-bottom: 0.15em; }
.book__subtitle { font-size: var(--step-1); font-style: italic; color: var(--ink-2); margin: 0 0 0.6rem; }
.book__byline { font-family: var(--sans); font-size: 1.05rem; margin: 0 0 1.25rem; }
.book__byline a { font-weight: 600; }
.book__tags { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
@media (min-width: 52rem) {
  .book { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr); gap: var(--space-xl); align-items: start; }
  .book__cover { width: 100%; position: sticky; top: 2rem; }
}

.buy {
  margin: var(--space-m) 0;
  padding: var(--space-m);
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}
.buy fieldset { border: 0; margin: 0 0 1rem; padding: 0; }
.buy legend { font-family: var(--sans); font-weight: 700; font-size: 1rem; margin-bottom: 0.6rem; }
.formats { display: grid; gap: 0.6rem; }
.format {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.25rem 0.85rem;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--rule);
  border-radius: var(--radius);
  background: var(--paper);
  cursor: pointer;
  font-family: var(--sans);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.format:hover { border-color: var(--ink-3); }
.format:has(input:checked) { border-color: var(--accent); background: #fffaf3; box-shadow: inset 0 0 0 1px var(--accent); }
.format:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.format input { width: 1.5rem; height: 1.5rem; margin: 0; accent-color: var(--accent); }
.format__name { font-weight: 600; font-size: 1.02rem; }
.format__price { font-weight: 700; font-size: 1.1rem; font-variant-numeric: tabular-nums; text-align: right; }
.format__isbn { grid-column: 2 / -1; font-size: 0.85rem; color: var(--ink-2); }
.format--out { opacity: 0.7; }
.qty-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: end; }
.field label, .qty-row label { display: block; font-family: var(--sans); font-weight: 600; font-size: 0.95rem; margin-bottom: 0.35rem; }
.input, .qty-row input, select.input, textarea.input {
  font: 400 1.02rem/1.3 var(--sans);
  color: var(--ink);
  background: #fffdf9;
  border: 1.5px solid var(--ink-3);
  border-radius: var(--radius);
  padding: 0.7rem 0.75rem;
  min-height: 3rem;
}
.qty-row input { width: 5rem; }
.buy__status { font-family: var(--sans); font-size: 0.95rem; margin: 0.75rem 0 0; min-height: 1.4em; }
.buy__or { font-family: var(--sans); font-size: 0.9rem; color: var(--ink-2); margin: 1rem 0 0.5rem; }

.details {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.5rem 1.5rem;
  margin: 0;
  font-family: var(--sans);
  font-size: 0.98rem;
}
.details dt { color: var(--ink-3); }
.details dd { margin: 0; }
.prose { max-width: 38rem; }
.prose p { margin-bottom: 1.05em; }

/* ---------- Author page ---------- */

.author-head {
  display: grid;
  gap: var(--space-l);
  align-items: start;
  padding-block: var(--space-l);
}
.author-head__photo { width: min(100%, 18rem); aspect-ratio: 4 / 5; }
.author-head__photo img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }
.author-head__photo .ph-block { height: 100%; }
@media (min-width: 48rem) {
  .author-head { grid-template-columns: 18rem 1fr; gap: var(--space-xl); }
  .author-head--text { grid-template-columns: minmax(0, 46rem); }
}
.author-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; list-style: none; padding: 0; margin: 0 0 var(--space-m); }

/* ---------- Title page sections ---------- */

.book-section h2 { margin-bottom: var(--space-m); }

/* Header: heading, then cover (with price and one button) beside the slideshow */
.book-page { padding-block: var(--space-l) var(--space-l); }
.book-head { max-width: 52rem; margin-bottom: var(--space-m); }
.book-head h1 { font-size: var(--step-4); margin-bottom: 0.15em; }
.book-head__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin: 0 0 0.75rem; }
.book-head__category { font-family: var(--sans); font-size: 0.85rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.book-head .book__byline { margin-bottom: 0; }

.book-top { --cw: min(18rem, 72vw); display: grid; gap: var(--space-m); align-items: start; }
.book-top__cover { width: var(--cw); margin-inline: auto; }
.book-top__intro .book-blurb { margin-top: 0; }
@media (min-width: 48rem) {
  .book-top { --cw: clamp(13rem, 28vw, 21rem); grid-template-columns: var(--cw) minmax(0, 1fr); gap: clamp(1.5rem, 3vw, 3rem); }
  .book-top__cover { margin-inline: 0; }
}
.book-blurb { max-width: 46rem; margin: var(--space-m) 0 0; }
.book-page > .notify { margin-top: var(--space-m); }

.buy-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1rem; margin-top: 1.1rem; }
.buy-line__price { margin: 0; font-family: var(--sans); font-weight: 700; font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.buy-line__price--status { font-size: 1rem; font-weight: 600; color: var(--ink-2); }
.buy-line__form { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0; }
.buy-line__form .buy__status { flex-basis: 100%; margin: 0; min-height: 0; }
.format-lines { list-style: none; padding: 0; margin: 0 0 1.25rem; display: grid; gap: 0.35rem; font-size: 1.02rem; }
#details .buy { margin-top: 0; max-width: 36rem; }

/* Slideshow: one page at a time, images only */
.slides { min-width: 0; }
.slides__stage {
  --stage-h: min(125vw, 34rem);
  position: relative;
  height: var(--stage-h);
  border-radius: var(--radius);
  overflow: hidden;
  outline-offset: 3px;
}
@media (min-width: 48rem) { .slides__stage { --stage-h: calc(var(--cw) * 1.5); } }
.slides--dark .slides__stage { background: #2b2420; }
.slides__track { position: absolute; inset: 0; list-style: none; margin: 0; padding: 0; }
.slides__slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.75rem, 2vw, 1.5rem);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0s linear 0.6s;
}
.slides--light .slides__slide { padding: 0.75rem 0.5rem; }
.slides__slide.is-current { opacity: 1; visibility: visible; transition: opacity 0.6s ease; }
/* Grid, not flex: a flex row would shrink a page's width to fit and distort it. */
.slides__open { display: grid; place-items: center; width: 100%; height: 100%; min-width: 0; min-height: 0; cursor: zoom-in; }
.slides__open picture { display: contents; }
.slides__open img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; min-width: 0; min-height: 0; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); }
.slides--light .slides__open img { border: 1px solid rgba(31, 26, 21, 0.18); box-shadow: 0 6px 18px rgba(31, 26, 21, 0.18); }
.slides__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 0;
  font: 400 1.9rem/1 var(--serif);
  padding-bottom: 0.2rem;
  color: var(--ink);
  background: rgba(251, 248, 242, 0.88);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.slides__arrow--prev { left: 0.6rem; }
.slides__arrow--next { right: 0.6rem; }
.slides__stage:hover .slides__arrow, .slides__arrow:focus-visible, .slides__stage:focus-within .slides__arrow { opacity: 1; }
@media (hover: none) { .slides__arrow { opacity: 1; } }
.slides__pause {
  position: absolute;
  right: 0.6rem;
  bottom: 0.6rem;
  font: 600 0.85rem/1 var(--sans);
  padding: 0.55rem 0.75rem;
  border: 0;
  border-radius: var(--radius);
  background: rgba(251, 248, 242, 0.92);
  color: var(--ink);
  cursor: pointer;
}
/* The pause control is there for keyboard and screen reader users; it shows only on focus. */
.slides__pause:not(:focus-visible) { clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; padding: 0; white-space: nowrap; }
.slides__thumbs {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0.75rem 0.1rem 0.25rem;
  overflow-x: auto;
  scrollbar-width: thin;
}
.slides__thumbs li { flex: none; }
.slides__thumb {
  display: block;
  height: 3.75rem;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 3px;
  background: none;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}
.slides__thumb picture { display: contents; }
.slides__thumb img { display: block; height: 100%; width: auto; border-radius: 1px; }
.slides__thumb:hover, .slides__thumb[aria-current="true"] { opacity: 1; }
.slides__thumb[aria-current="true"] { border-color: var(--accent); }
.no-js .slides__thumbs, .no-js .slides__arrow, .no-js .slides__pause { display: none; }

/* Artwork: the pictures themselves, two to a row, captioned */
.gallery {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-l) var(--space-m);
  max-width: 56rem;
}
@media (min-width: 40rem) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.gallery figure { margin: 0; }
.gallery .gallery__link { display: block; cursor: zoom-in; }
.gallery .gallery__link img { display: block; width: 100%; height: auto; box-shadow: 0 6px 18px rgba(31, 26, 21, 0.18); }
.gallery figcaption { font-family: var(--sans); font-size: var(--step--1); color: var(--ink-2); margin-top: 0.6rem; line-height: 1.35; }

.contents-heading { font-size: var(--step-1); margin: 1.5em 0 0.5em; }
.contents { padding-left: 1.4rem; margin: 0; }
.contents li { margin-bottom: 0.2rem; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  background: rgba(20, 16, 12, 0.94);
  color: #f6f0e5;
}
.lightbox[hidden] { display: none; }
.lightbox-open, .lightbox-open body { overflow: hidden; }
.lightbox__bar { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 1rem; font-family: var(--sans); }
.lightbox__count { margin: 0; font-size: 0.95rem; }
.lightbox__close, .lightbox__nav {
  font: 600 1rem/1 var(--sans);
  color: #f6f0e5;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius);
  min-height: 2.75rem;
  min-width: 2.75rem;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
}
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255, 255, 255, 0.18); }
.lightbox__close:focus-visible, .lightbox__nav:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.lightbox__stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0 0.5rem 1rem; }
.lightbox__nav { font-size: 2rem; padding: 0.25rem 0.6rem; flex: none; }
.lightbox__nav[hidden] { display: none; }
.lightbox__figure { margin: 0; flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.lightbox__figure picture { display: contents; }
.lightbox__figure img { max-width: 100%; max-height: calc(100% - 3.5rem); width: auto; height: auto; object-fit: contain; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5); }
.lightbox__caption { font-family: var(--sans); font-size: 0.95rem; text-align: center; margin-top: 0.75rem; max-width: 46rem; }
@media (max-width: 39.99rem) {
  .lightbox__stage { position: relative; padding-inline: 0; }
  .lightbox__nav { position: absolute; bottom: 0.25rem; }
  .lightbox__nav--prev { left: 1rem; }
  .lightbox__nav--next { right: 1rem; }
  .lightbox__figure img { max-height: calc(100% - 6rem); }
  .lightbox__caption { padding-inline: 4.5rem; }
}

/* Praise */
.praise { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-m); max-width: 46rem; }
.praise figure { margin: 0; }
.praise blockquote { margin: 0; font-size: var(--step-1); font-style: italic; line-height: 1.45; }
.praise blockquote p { margin: 0; }
.praise figcaption { font-family: var(--sans); margin-top: 0.5rem; }
.praise figcaption::before { content: "- "; }

/* Excerpts: a comfortable book page */
.excerpt {
  max-width: 36rem;
  margin-inline: auto;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 1rem + 3vw, 3.5rem) clamp(1.25rem, 0.5rem + 4vw, 3.5rem);
  box-shadow: 0 1px 2px rgba(31, 26, 21, 0.06);
}
.excerpt__title { font-size: var(--step-2); font-weight: 500; text-align: center; margin: 0 0 1.5rem; }
.excerpt__text { font-size: 1.12rem; line-height: 1.75; hyphens: auto; }
.excerpt__text p { margin: 0; text-indent: 1.5em; }
.excerpt__text p:first-child, .excerpt__text h3 + p, .excerpt__text h4 + p, .excerpt__text hr + p { text-indent: 0; }
.excerpt__text h3, .excerpt__text h4 { font-size: 1.05rem; font-weight: 600; font-variant: small-caps; letter-spacing: 0.03em; margin: 1.6em 0 0.4em; }
.excerpt__text hr { border: 0; text-align: center; margin: 1.2em 0; }
.excerpt__text hr::after { content: "* * *"; letter-spacing: 0.5em; color: var(--ink-3); }
.excerpt__text--verse { hyphens: manual; }
.excerpt__text--verse p { text-indent: 0; margin-bottom: 1em; }
.excerpt__text ul, .excerpt__text ol { padding-left: 1.25rem; }
.keep-reading {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  text-align: center;
}
.keep-reading__label { font-family: var(--sans); font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.8rem; color: var(--ink-3); margin: 0 0 0.75rem; }
.excerpt-others { max-width: 36rem; margin: var(--space-m) auto 0; }
.excerpt-more { margin-top: 0.5rem; }
.excerpt-more > summary { display: inline-block; cursor: pointer; padding: 0.4rem 0; font-family: var(--sans); color: var(--accent); text-decoration: underline; text-underline-offset: 0.2em; list-style: none; }
.excerpt-more > summary::-webkit-details-marker { display: none; }
.excerpt-more > summary:hover { color: var(--accent-2); }
.excerpt-more[open] > summary { margin-bottom: 0.75rem; }
.keep-reading { max-width: 36rem; margin: var(--space-m) auto 0; padding-top: 0; border-top: 0; }

/* Compact buy control */
.buy-inline { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; justify-content: inherit; }
.keep-reading .buy-inline { justify-content: center; }
.buy-inline .buy__status { flex-basis: 100%; margin: 0; min-height: 0; }
.input--small { min-height: 2.75rem; padding: 0.5rem 0.6rem; }

/* From the jacket */
.jacket {
  margin: 0;
  max-width: 40rem;
  padding: var(--space-m) var(--space-m) var(--space-m) clamp(1.25rem, 1rem + 2vw, 2.25rem);
  border-left: 3px solid var(--accent);
  background: var(--card);
  font-style: italic;
  font-size: var(--step-1);
  line-height: 1.5;
}
.jacket p { margin: 0 0 0.8em; }
.jacket p:last-child { margin-bottom: 0; }

/* About the author block */
.author-blurb { display: grid; gap: var(--space-m); align-items: start; max-width: 46rem; }
.author-blurb__photo { width: 8rem; aspect-ratio: 4 / 5; }
.author-blurb__photo img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }
.author-blurb__name { font-size: var(--step-1); font-weight: 600; margin: 0 0 0.25rem; }
.author-blurb p { margin: 0 0 0.6rem; }
@media (min-width: 36rem) { .author-blurb { grid-template-columns: 8rem 1fr; } .author-blurb--text { grid-template-columns: 1fr; } }

/* Events */
.events { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; max-width: 52rem; }
.event {
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 1rem 1.25rem;
  padding: 1.1rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}
.event__date { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 4rem; border-radius: var(--radius); background: var(--accent); color: var(--on-accent); font-family: var(--sans); line-height: 1.1; }
.event__date span:first-child { text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.08em; }
.event__date span:last-child { font-size: 1.6rem; font-weight: 700; }
.event__body h3 { font-size: var(--step-1); margin: 0 0 0.25rem; }
.event__body p { margin: 0 0 0.35rem; }
.event__when, .event__where { font-family: var(--sans); font-size: 0.98rem; }
.event__book { grid-column: 2; display: flex; gap: 0.75rem; align-items: center; font-family: var(--sans); font-size: 0.95rem; }
.event__book .cover { width: 3.5rem; flex: none; }
@media (min-width: 40rem) {
  .event { grid-template-columns: 4.5rem 1fr auto; }
  .event__book { grid-column: auto; flex-direction: column; align-items: center; width: 6rem; text-align: center; }
  .event__book .cover { width: 4.5rem; }
}

/* Author page: books with their actions */
.shelf { list-style: none; padding: 0; margin: var(--space-m) 0 0; display: grid; gap: var(--space-m); }
@media (min-width: 48rem) { .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.shelf__item { display: grid; grid-template-columns: 7rem 1fr; gap: 1.25rem; align-items: start; }
@media (min-width: 30rem) { .shelf__item { grid-template-columns: 9rem 1fr; } }
.shelf__body h3 { font-size: var(--step-1); margin: 0 0 0.15rem; }
.shelf__body h3 a { color: var(--ink); text-decoration: none; }
.shelf__body h3 a:hover { color: var(--accent); }
.shelf .cover--ph .cover__title, .event__book .cover--ph .cover__title { font-size: 0.95rem; }
.shelf .cover--ph .cover__author, .event__book .cover--ph .cover__author { font-size: 0.7rem; }
.shelf__sub { font-style: italic; color: var(--ink-2); margin: 0 0 0.4rem; }
.shelf__body .buy-inline { margin: 0.6rem 0; justify-content: flex-start; }
.shelf__body > p { margin: 0 0 0.3rem; }

/* Reader sign-up */
.notify { display: grid; gap: 0.75rem; }
.notify--boxed { margin-top: var(--space-m); padding: var(--space-m); background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); max-width: 40rem; }
.notify__heading { font-family: var(--sans); font-weight: 700; margin: 0; }
.notify__lead { margin: 0; font-size: 1rem; color: var(--ink-2); }
.notify__row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: end; }
.notify__row .field { flex: 1 1 14rem; }
.notify .form__status:empty { display: none; }

/* Posts */
.posts { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-m); max-width: 44rem; }
.post-item h3 { font-size: var(--step-1); margin: 0 0 0.3rem; }
.post-item p { margin: 0; }
.post-item__date { font-family: var(--sans); font-size: var(--step--1); color: var(--ink-3); margin-bottom: 0.25rem !important; }
.post h1 { font-size: var(--step-3); margin-bottom: 0.25rem; }
.post__date { margin: 0 0 var(--space-m); }
.post__image { margin: 0 0 var(--space-m); }
.post__image img { width: 100%; height: auto; border-radius: var(--radius); }
.post__back { margin-top: var(--space-l); }
.prose img { max-width: 100%; height: auto; }

/* Press kit */
.press-kit { list-style: none; padding: 0; margin: var(--space-m) 0 0; display: grid; gap: 0.6rem; }

/* Phone action bar: the title's primary action, always in reach */
.action-bar { display: none; }
@media (max-width: 47.99rem) {
  .action-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom));
    background: var(--card);
    border-top: 1px solid var(--rule);
    box-shadow: 0 -4px 16px rgba(31, 26, 21, 0.12);
    transition: transform 0.2s ease;
  }
  .action-bar.is-hidden { transform: translateY(110%); }
  .action-bar__text { margin: 0; min-width: 0; font-family: var(--sans); line-height: 1.2; }
  .action-bar__text strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 0.95rem; }
  .action-bar__text span { font-size: 0.85rem; color: var(--ink-2); }
  .action-bar .btn { flex: none; min-height: 2.75rem; padding-block: 0.5rem; }
  body.has-action-bar { padding-bottom: 4.5rem; }
}

/* ---------- Publish page ---------- */

.page-hero { padding-block: clamp(2rem, 1rem + 4vw, 4.5rem) var(--space-l); }
.page-hero__grid { display: grid; gap: var(--space-l); align-items: end; }
.page-hero h1 { max-width: 16ch; }
.page-hero__media { aspect-ratio: 3 / 2; }
.page-hero__media .ph-block { height: 100%; }
@media (min-width: 56rem) {
  .page-hero__grid { grid-template-columns: 1.1fr 1fr; }
  .page-hero__media { aspect-ratio: 4 / 5; }
}

.offer {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--ink);
}
.offer li {
  display: grid;
  grid-template-columns: minmax(7.5rem, 11rem) 1fr;
  gap: 1rem;
  align-items: baseline;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--rule);
}
.offer strong {
  font-family: var(--serif);
  font-size: var(--step-3);
  font-weight: 450;
  line-height: 1;
  color: var(--accent);
  white-space: nowrap;
}
.offer span { font-size: var(--step-1); line-height: 1.35; }

.includes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0 var(--space-l);
  columns: 1;
}
.includes li {
  display: grid;
  grid-template-columns: 1.25rem 1fr;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--rule);
  break-inside: avoid;
}
.includes li::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  margin-top: 0.62em;
  background: var(--accent);
  transform: rotate(45deg);
}
@media (min-width: 40rem) and (max-width: 55.99rem) { .includes { grid-template-columns: 1fr 1fr; } }

.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 3.25rem 1fr;
  gap: 1rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--rule);
}
.steps li::before {
  content: counter(step);
  font-family: var(--serif);
  font-size: var(--step-3);
  line-height: 0.9;
  color: var(--accent);
}
.steps h3 { margin: 0 0 0.25rem; }
.steps p { margin: 0; color: var(--ink-2); }

.terms {
  background: var(--card);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--accent);
  padding: var(--space-m);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.terms ul { margin: 0 0 1rem; padding-left: 1.2rem; }
.terms li { margin-bottom: 0.45rem; }
.terms__fine { font-family: var(--sans); font-size: var(--step--1); color: var(--ink-2); margin: 0; }

.cta {
  text-align: left;
  display: grid;
  gap: 1rem;
  justify-items: start;
}

.split { display: grid; gap: var(--space-l); }
@media (min-width: 56rem) { .split { grid-template-columns: 1fr 1.6fr; gap: var(--space-xl); } }

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 0;
  background: var(--ink);
  color: #e9e0d1;
  padding-block: var(--space-l) var(--space-m);
  font-family: var(--sans);
  font-size: 0.98rem;
}
.site-footer a { color: #f3e9da; text-decoration-color: rgba(243, 233, 218, 0.4); }
.site-footer a:hover { color: #fff; }
.site-footer :focus-visible { outline-color: #9cc6ea; }
.footer-grid { display: grid; gap: var(--space-m); }
.footer-grid h2 {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #bfb3a2;
  margin: 0 0 0.75rem;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.footer-brand { font-family: var(--serif); font-size: 1.35rem; color: #f6efe3; margin: 0 0 0.35rem; }
.footer-tagline { font-family: var(--serif); font-style: italic; font-size: 1.1rem; color: #d9cebd; margin: 0 0 1rem; }
.footer-grid address { font-style: normal; line-height: 1.6; }
.footer-base {
  margin-top: var(--space-l);
  padding-top: var(--space-m);
  border-top: 1px solid rgba(233, 224, 209, 0.2);
  color: #bfb3a2;
  font-size: 0.9rem;
}
@media (min-width: 48rem) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }

/* ---------- Page intro ---------- */

.page-intro { padding-block: clamp(2rem, 1rem + 4vw, 4rem) 0; }
.page-intro h1 { margin-bottom: 0.3em; }
.h3 { font-size: var(--step-1); font-weight: 600; }
.page-hero__media--wide { aspect-ratio: 3 / 2; }
@media (min-width: 56rem) { .page-hero__media--wide { aspect-ratio: 3 / 2; } }
.pull {
  font-family: var(--serif);
  font-style: italic;
  font-size: var(--step-2);
  line-height: 1.3;
  text-align: center;
  margin: 0 auto;
  max-width: 30ch;
  color: var(--ink-2);
}

/* ---------- Catalog ---------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  align-items: end;
  margin-bottom: var(--space-l);
  padding-bottom: var(--space-m);
  border-bottom: 1px solid var(--rule);
}
.filters .field { margin: 0; min-width: 12rem; }
.filters select { width: 100%; }
.filters__count { margin: 0 0 0.8rem auto; color: var(--ink-2); }
.book-card__title { font-size: var(--step-1); font-weight: 500; margin: 0 0 0.2rem; transition: color 0.15s ease; }
.book-card a:hover .book-card__title { color: var(--accent); }
.book-card__sub { font-style: italic; color: var(--ink-2); margin: 0 0 0.25rem; font-size: var(--step--1); }
.book-card[hidden] { display: none; }

/* ---------- Authors ---------- */

.author-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-l);
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
}
.author-card a { color: var(--ink); text-decoration: none; }
.author-card a:hover h2 { color: var(--accent); }
.author-card h2 { font-size: var(--step-2); margin: 1rem 0 0.4rem; }
.author-card__photo { aspect-ratio: 4 / 5; }
.author-card__photo img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }
.author-card__photo .ph-block { height: 100%; }

/* ---------- What we do: icon groups ---------- */

.groups { display: grid; gap: 0; border-top: 1px solid var(--ink); }
.group {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--rule);
}
.group h3 { margin: 0.35rem 0 0.4rem; }
.group .includes li { padding: 0.35rem 0; border: 0; }
.icon img { width: 3rem; height: 3rem; }

/* ---------- Forms ---------- */

.form { display: grid; gap: 1.1rem; align-content: start; }
.form fieldset {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 0;
  padding: 1rem 0 0;
  display: grid;
  gap: 1.1rem;
}
.form legend {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0 0.5rem 0 0;
}
.field { display: grid; gap: 0.1rem; }
.field .input { width: 100%; }
.field__hint { font-family: var(--sans); font-size: 0.9rem; color: var(--ink-2); margin: 0 0 0.3rem; }
textarea.input { min-height: 8rem; resize: vertical; line-height: 1.5; }
.input:focus-visible { outline-offset: 1px; }
.input[aria-invalid="true"] { border-color: #a1261a; box-shadow: inset 0 0 0 1px #a1261a; }
.input[readonly] { background: var(--paper-2); color: var(--ink-2); }
.input--file { padding: 0.6rem; background: var(--card); }
.field-row { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 30rem) { .field-row { grid-template-columns: 1.3fr 1fr; } }
.check { display: flex; gap: 0.7rem; align-items: center; font-family: var(--sans); }
.check input { width: 1.5rem; height: 1.5rem; margin: 0; flex: none; accent-color: var(--accent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__errors {
  font-family: var(--sans);
  background: #fbe9e4;
  border: 1px solid #c9887c;
  border-left: 4px solid #a1261a;
  color: #5c140c;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
}
.form__errors ul { margin: 0.35rem 0 0; padding-left: 1.2rem; }
.form__errors a { color: #5c140c; }
.form__status { margin: 0; min-height: 1.4em; }
.form__status.is-ok {
  background: #e7efe3;
  border: 1px solid #9db58f;
  border-left: 4px solid #3f6b2f;
  color: #203a16;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
}

.reqs { margin: 0 0 1rem; padding-left: 1.4rem; }
.reqs li { margin-bottom: 0.45rem; padding-left: 0.2rem; }
.contact-info address { font-style: normal; }

/* ---------- Cart and checkout ---------- */

.cart-lines { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.cart-line {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0.5rem 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}
.cart-line .cover { width: 4.5rem; box-shadow: 0 2px 6px rgba(31, 26, 21, 0.25); }
.cart-line .cover--ph { padding: 0.4rem; }
.cart-line .cover--ph .cover__title { font-size: 0.6rem; }
.cart-line .cover--ph .cover__author, .cart-line .cover--ph .cover__flag { display: none; }
.cart-line h2 { font-size: var(--step-1); margin: 0 0 0.15rem; }
.cart-line__meta { font-family: var(--sans); font-size: 0.95rem; color: var(--ink-2); margin: 0 0 0.6rem; }
.cart-line__controls { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; font-family: var(--sans); }
.cart-line__controls input { width: 4.5rem; }
.cart-line__total { font-family: var(--sans); font-weight: 700; font-variant-numeric: tabular-nums; margin-left: auto; }
.link-btn {
  background: none;
  border: 0;
  padding: 0.5rem 0;
  font: 600 0.95rem var(--sans);
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}
.cart-foot {
  display: grid;
  gap: 1rem;
  justify-items: end;
  padding-top: var(--space-m);
  font-family: var(--sans);
}
.cart-foot__sub { font-size: var(--step-1); }
.cart-foot__sub strong { font-variant-numeric: tabular-nums; }
.cart-note { font-size: 0.92rem; color: var(--ink-2); margin: 0; text-align: right; max-width: 30rem; }
.notice {
  font-family: var(--sans);
  background: var(--card);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--ink-3);
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
}

.checkout { display: grid; gap: var(--space-l); align-items: start; }
@media (min-width: 56rem) { .checkout { grid-template-columns: 1.4fr 1fr; gap: var(--space-xl); } }
.summary {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: var(--space-m);
  font-family: var(--sans);
}
.summary h2 { font-family: var(--serif); }
.summary ul { list-style: none; margin: 0 0 1rem; padding: 0; }
.summary li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.45rem 0; border-bottom: 1px solid var(--rule); font-size: 0.95rem; }
.summary dl { display: grid; grid-template-columns: 1fr auto; gap: 0.35rem 1rem; margin: 0 0 1rem; font-variant-numeric: tabular-nums; }
.summary dd { margin: 0; text-align: right; }
.summary .total { font-weight: 700; border-top: 1px solid var(--rule); padding-top: 0.4rem; }

.policy h2 { font-size: var(--step-2); margin-top: 1.6em; }
.policy h2:first-child { margin-top: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  /* The slideshow keeps its fade: it changes brightness only, nothing moves across the screen. */
  .slides__slide.is-current { transition: opacity 0.6s ease !important; }
}
