/* ==========================================================================
   components.css — Sprint 1 component library for courtney-thomas-books
   Loaded after styles.css (tokens) and before hero.css. Nothing in here
   touches the .bk-* hero. Every colour is a token from styles.css :root.
   Contrast (WCAG AA, checked): ink/ink-soft/leather on paper ≥ 7:1,
   paper on leather 11:1, gold-warm on leather 5.4:1, ink on gold-warm 7.7:1.
   Small text never uses --gold on paper (4.2:1); it uses --gold-deep.
   ========================================================================== */

:root {
  /* one added colour: a darker gold for SMALL text on paper (5.6:1). --gold itself is unchanged. */
  --gold-deep: #6b5238;
  /* alpha tokens: paper / ink at the opacities the components use (no new hues) */
  --paper-a10: rgba(246, 237, 215, 0.10);
  --paper-a16: rgba(246, 237, 215, 0.16);
  --paper-a18: rgba(246, 237, 215, 0.18);
  --paper-a35: rgba(246, 237, 215, 0.35);
  --paper-a40: rgba(246, 237, 215, 0.40);
  --paper-a60: rgba(246, 237, 215, 0.60);
  --paper-a70: rgba(246, 237, 215, 0.70);
  --paper-a78: rgba(246, 237, 215, 0.78);
  --paper-a86: rgba(246, 237, 215, 0.86);
  --ink-a06: rgba(28, 20, 16, 0.06);
  --ink-a08: rgba(28, 20, 16, 0.08);
  --ink-a10: rgba(28, 20, 16, 0.10);
}

/* Small letter-spaced caps never use --gold on paper (4.2:1); every eyebrow uses --gold-deep (5.8:1). */
.eyebrow { color: var(--gold-deep); }

/* --------------------------------------------------------------------------
   Focus ring — one visible ring for every new control
   -------------------------------------------------------------------------- */
.btn:focus-visible,
.pill-link:focus-visible,
.chips a:focus-visible,
.rail__btn:focus-visible,
.rail__track:focus-visible,
.book-card a:focus-visible,
.nav-toggle:focus-visible,
.nav-menu a:focus-visible,
.nav-menu button:focus-visible,
.site-footer a:focus-visible,
.site-footer button:focus-visible,
.buy-bar a:focus-visible {
  outline: var(--focus);
  outline-offset: var(--focus-offset);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--target);
  min-width: var(--target);
  padding: 0.85rem 1.35rem;
  border: 1px solid transparent;
  border-radius: var(--radius-s);
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1.2;
  cursor: pointer;
  transition: background var(--dur-base) var(--ease), color var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease), transform var(--dur-fast) var(--ease);
}
.btn:active, .btn.is-active { transform: translateY(1px); }
.btn.is-focus { outline: var(--focus); outline-offset: var(--focus-offset); }
.btn[aria-disabled="true"],
.btn:disabled,
.btn.is-disabled {
  background: var(--paper-sunk);
  color: var(--ink-soft); /* 6.5:1 on paper-sunk: readable even when the disabled state is shown to everyone */
  border-color: var(--line-firm);
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: inset 0 1px 2px var(--ink-a08);
}
.btn--primary {
  background: var(--leather);
  color: var(--paper);
  border-color: var(--leather);
}
.btn--primary:hover, .btn--primary.is-hover { background: var(--leather-lo); border-color: var(--leather-lo); }
.btn--secondary {
  background: transparent;
  color: var(--leather);
  border-color: var(--gold);
}
.btn--secondary:hover, .btn--secondary.is-hover { background: var(--paper-lift); border-color: var(--leather); }
.btn--quiet {
  background: transparent;
  color: var(--ink-soft);
  padding-inline: var(--space-2);
  border-radius: 0;
  border-bottom: 1px solid var(--line-firm);
}
.btn--quiet:hover, .btn--quiet.is-hover { color: var(--leather); border-bottom-color: var(--leather); }
.btn--small { padding: 0.6rem 0.95rem; font-size: 0.68rem; }
.btn--block { display: flex; width: 100%; }
/* on leather backgrounds */
.panel--leather .btn--primary { background: var(--gold-warm); color: var(--ink); border-color: var(--gold-warm); }
.panel--leather .btn--primary:hover { background: var(--paper); border-color: var(--paper); }
.panel--leather .btn--secondary { color: var(--paper); border-color: var(--gold-warm); }
.panel--leather .btn--secondary:hover { background: var(--paper-a10); border-color: var(--paper); }
.panel--leather .btn--quiet { color: var(--paper); border-bottom-color: var(--paper-a40); }
.panel--leather .btn--quiet:hover { color: var(--gold-warm); border-bottom-color: var(--gold-warm); }

/* --------------------------------------------------------------------------
   Pills (status / series labels)
   -------------------------------------------------------------------------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  padding: 0.28em 0.75em;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-firm);
  background: var(--paper-lift);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.4;
  white-space: nowrap;
}
.pill--gold { background: var(--gold-warm); border-color: var(--gold-warm); color: var(--ink); }
.pill--leather { background: var(--leather); border-color: var(--leather); color: var(--paper); }
.pill--outline { background: transparent; border-color: var(--gold); color: var(--gold-deep); }
.panel--leather .pill { background: var(--paper-a10); border-color: var(--paper-a35); color: var(--paper); }
.panel--leather .pill--gold { background: var(--gold-warm); border-color: var(--gold-warm); color: var(--ink); }

/* --------------------------------------------------------------------------
   Section header
   -------------------------------------------------------------------------- */
.section-head {
  max-width: var(--measure);
  margin: 0 0 var(--space-6);
}
.section-head .eyebrow { color: var(--gold-deep); }
.section-head h1 {
  margin: 0 0 var(--space-3);
  font-size: var(--step-4);
  font-weight: 500;
  line-height: 1.02;
  text-indent: 0;
}
.section-head h2 {
  margin: 0 0 var(--space-3);
  font-size: var(--step-3);
  font-weight: 500;
  line-height: 1.05;
  text-indent: 0;
}
.section-head--compact h2 { font-size: var(--step-2); }
.section-head .lede { margin: 0; font-size: var(--step-1); }
.section-head--rule { border-top: 1px solid var(--line-firm); padding-top: var(--space-5); }
.section-head__actions { margin-top: var(--space-4); display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* --------------------------------------------------------------------------
   Panels
   -------------------------------------------------------------------------- */
.panel {
  position: relative;
  padding: clamp(1.4rem, 3vw, 2.4rem) clamp(1.2rem, 3.5vw, 2.8rem);
  background: var(--paper-lift);
  border: 1px solid var(--ink-a08);
  border-radius: var(--radius-s) var(--radius-m) var(--radius-m) var(--radius-s);
  box-shadow: var(--lift-1);
}
.panel .eyebrow { color: var(--gold-deep); }
.panel > :first-child { margin-top: 0; }
.panel > :last-child { margin-bottom: 0; }
.panel--sunk {
  background: var(--paper-sunk);
  box-shadow: inset 0 1px 3px var(--ink-a08);
  border-color: var(--ink-a06);
}
.panel--leather {
  background: linear-gradient(160deg, var(--leather) 0%, var(--leather-lo) 100%);
  color: var(--paper);
  border-color: rgba(201, 163, 103, 0.35);
  box-shadow: var(--lift-2), inset 0 1px 0 rgba(255, 228, 190, 0.18);
}
.panel--leather .eyebrow { color: var(--gold-warm); }
.panel--leather h2, .panel--leather h3 { color: var(--paper); }
.panel--leather a { color: var(--paper); }
.panel--leather cite { color: var(--gold-warm); }
.panel--spine::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  border-radius: var(--radius-s) 0 0 var(--radius-s);
  background: linear-gradient(180deg, var(--leather), var(--leather-lo));
}
.panel--leather.panel--spine::before { background: linear-gradient(180deg, var(--gold-warm), var(--gold)); }
.panel--quote blockquote {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.45rem, 2.6vw, 2.1rem);
  line-height: 1.3;
  max-width: 30ch;
}
.panel--quote cite {
  display: block;
  margin-top: var(--space-4);
  font-style: normal;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.panel--quote cite a { text-decoration: none; border-bottom: 1px solid currentColor; }

/* --------------------------------------------------------------------------
   Book card (new component; the home page keeps its original .card until Sprint 2)
   -------------------------------------------------------------------------- */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-7) var(--space-6);
  align-items: stretch;
  list-style: none;
  margin: 0;
  padding: 0;
}
.book-grid > li { display: flex; }
.book-card {
  position: relative; /* containing block for the visually-hidden spans in its links (keeps them inside the rail's scroll clip) */
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: var(--space-3);
  width: 100%;
  max-width: 260px;
}
.book-card .jacket { max-width: 100%; margin-bottom: var(--space-2); }
.book-card__cover { display: block; text-decoration: none; }
.book-card__cover:hover .jacket,
.book-card__cover:focus-visible .jacket {
  transform: translateY(-4px);
  box-shadow: var(--lift-3);
}
.book-card__label {
  margin: 0;
  min-height: 1.4em; /* always rendered (empty when no series/label) so titles and action rows align across cards */
  font-size: var(--step--1);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--gold-deep);
}
.book-card h3 {
  margin: 0;
  font-size: var(--step-1);
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: 0;
}
.book-card h3 a { text-decoration: none; transition: color var(--dur-base) var(--ease); }
.book-card h3 a:hover { color: var(--leather); }
.book-card__meta {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.book-card__tagline {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.93rem;
  line-height: 1.55;
}
.book-card__actions {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  align-items: center;
  padding-top: var(--space-2);
}

/* --------------------------------------------------------------------------
   Retailer groups + chips
   -------------------------------------------------------------------------- */
.retailer-groups { display: grid; gap: var(--space-5); }
.retailer-group__label {
  margin: 0 0 var(--space-3);
  font-family: var(--sans);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  list-style: none;
  margin: 0;
  padding: 0;
}
.chips a,
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  min-height: var(--target);
  padding: 0.7rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--paper-lift);
  color: var(--ink);
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: border-color var(--dur-base) var(--ease), background var(--dur-base) var(--ease);
}
.chips a:hover,
.chip:hover { border-color: var(--ink); background: var(--paper); }
.chips a[data-track]::after { content: "↗"; font-size: 0.8em; color: var(--ink-faint); }

/* --------------------------------------------------------------------------
   Rail — horizontal scroll-snap strip with keyboard-operable buttons, no auto-rotate
   -------------------------------------------------------------------------- */
.rail {
  position: relative;
  --rail-gap: var(--space-5);
}
.rail__track {
  position: relative; /* absolute descendants resolve here, inside the scroll clip, never against .rail */
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--space-4);
  padding: var(--space-2) var(--space-4) var(--space-4);
  margin: 0 calc(-1 * var(--space-4));
  scrollbar-width: thin;
  scrollbar-color: var(--line-firm) transparent;
}
.rail__list {
  display: flex;
  gap: var(--rail-gap);
  list-style: none;
  margin: 0;
  padding: 0;
}
.rail__item {
  display: flex;
  flex: 0 0 auto;
  width: clamp(150px, 42vw, 210px);
  scroll-snap-align: start;
}
.rail__item .book-card { max-width: none; }
.rail__controls {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.rail__btn {
  width: var(--target);
  height: var(--target);
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line-firm);
  border-radius: var(--radius-pill);
  background: var(--paper-lift);
  color: var(--ink);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: background var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease), opacity var(--dur-base) var(--ease);
}
.rail__btn:hover { background: var(--paper); border-color: var(--ink); }
.rail__btn:disabled { opacity: 0.35; cursor: default; }
.rail__status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* --------------------------------------------------------------------------
   Generic page copy wrapper (privacy / accessibility)
   -------------------------------------------------------------------------- */
.page-copy { padding: 3rem 0 5rem; max-width: 40rem; }

/* --------------------------------------------------------------------------
   Reduced motion — new components only (styles.css and hero.css handle their own)
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .btn, .chips a, .chip, .rail__btn, .book-card h3 a,
  .nav-menu, .nav-menu a, .nav-toggle, .nav-toggle span,
  .site-footer a, .buy-bar, .buy-bar.is-visible {
    transition-duration: 0ms !important;
    animation-duration: 0ms !important;
  }
  .rail__track { scroll-behavior: auto; }
  .book-card__cover:hover .jacket,
  .book-card__cover:focus-visible .jacket { transform: none; }
  /* Catch-all reset for every non-hero hover/focus transition (.jacket, .nav-skip, reveal icons …).
     The hero (.bk-hero subtree) is excluded: hero.css owns its own reduced-motion behaviour. */
  :where(body *:not(.bk-hero, .bk-hero *)) {
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
}

/* --------------------------------------------------------------------------
   Global navigation (Sprint 1 step 12). Base .site-nav / .brand / .site-nav nav a
   rules live in styles.css; these extend them.
   -------------------------------------------------------------------------- */
.site-nav { flex-wrap: nowrap; }
/* brand link: 44px hit area without changing the header's height */
.site-nav .brand { display: inline-flex; align-items: center; min-height: var(--target); padding-block: 0.35em; margin-block: -0.35em; }
.nav-list {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-item { position: relative; display: flex; align-items: center; gap: 0; }
.site-nav nav a[aria-current="page"],
.site-nav nav a[aria-current="true"] {
  color: var(--ink);
  box-shadow: inset 0 -1px 0 var(--gold);
}
.site-nav nav .nav-item--cta a {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--paper);
  padding: 0.6rem 0.95rem;
  min-height: var(--target);
}
.site-nav nav .nav-item--cta a:hover { color: var(--paper); }
.nav-drop__btn {
  width: var(--target); /* 44px hit area; the glyph sits in the left 24px so the visual gap to "Books" is unchanged */
  margin-left: -0.2rem;
  margin-right: calc(24px - var(--target));
  padding: 0 0 0 8px; /* keeps the glyph centred in that left 24px */
  text-align: left;
  min-height: var(--target);
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.8rem;
  cursor: pointer;
  border-radius: var(--radius-s);
}
.nav-drop__btn:hover { color: var(--ink); }
.nav-drop__btn[aria-expanded="true"] span[aria-hidden] { display: inline-block; transform: rotate(180deg); }
.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.6rem;
  min-height: var(--target);
  min-width: var(--target);
  padding: 0.4rem 0.2rem 0.4rem 0.6rem;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
}
.nav-toggle__bars { display: inline-flex; flex-direction: column; gap: 4px; width: 20px; }
.nav-toggle__bars i { display: block; height: 2px; background: currentColor; border-radius: 2px; transition: transform var(--dur-base) var(--ease), opacity var(--dur-base) var(--ease); }
.is-open .nav-toggle__bars i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.is-open .nav-toggle__bars i:nth-child(2) { opacity: 0; }
.is-open .nav-toggle__bars i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Books dropdown (desktop): opened by the button (JS) or by hover / focus-within (no JS) */
.nav-drop {
  display: none;
  position: absolute;
  top: calc(100% + 0.35rem);
  left: -1rem;
  z-index: 30;
  min-width: 40rem;
  padding: 1.4rem 1.6rem 1.5rem;
  background: var(--paper-lift);
  border: 1px solid var(--ink-a10);
  border-radius: var(--radius-s) var(--radius-m) var(--radius-m) var(--radius-s);
  box-shadow: var(--lift-2);
  grid-template-columns: max-content max-content;
  gap: 1.5rem 2.75rem;
}
.nav-drop::before { content: ""; position: absolute; inset: -0.5rem 0 auto 0; height: 0.5rem; }
.drop-open .nav-drop,
.nav-item--books:hover .nav-drop,
html:not(.has-nav-js) .nav-item--books:focus-within .nav-drop { display: grid; }
/* With nav.js present the panel opens only from the button (aria-expanded stays in sync); without JS, focus-within keeps it keyboard-reachable. */
.nav-drop__group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.1rem; }
.nav-drop__label {
  margin: 0 0 0.5rem;
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--gold-deep);
  white-space: nowrap;
}
.site-nav nav .nav-drop a {
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--ink);
  padding: 0.35rem 0;
  min-height: var(--target);
  box-shadow: none;
  white-space: nowrap;
}
.site-nav nav .nav-drop a:hover { color: var(--leather); }
.site-nav nav .nav-drop a[aria-current="page"] { color: var(--leather); box-shadow: none; }
.nav-drop__label a { color: inherit; text-decoration: none; }
.nav-drop__label a:hover { color: var(--leather); }
.nav-drop__series-name { margin: 0 0 0.35rem; }
.site-nav nav .nav-drop .nav-drop__series-name a { font-weight: 600; }
.nav-drop__sub { padding-left: 0.9rem !important; border-left: 1px solid var(--line); }
.nav-drop__series { font-family: var(--sans); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); margin-left: 0.25rem; }
.retailer--direct { font-weight: 600; }
.nav-drop__num {
  display: inline-grid;
  place-items: center;
  width: 1.3rem;
  height: 1.3rem;
  margin-right: 0.35rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--gold);
  font-family: var(--sans);
  font-size: 0.66rem;
  color: var(--gold-deep);
}

@media (max-width: 900px) {
  .site-nav { padding: 0.65rem 4vw; }
  .nav-toggle { display: inline-flex; margin-left: auto; }
  .nav-toggle[hidden] { display: none; }
  /* JS present (class set inline in <head>, before first paint): show the toggle at once so the header never reflows */
  .has-nav-js .nav-toggle[hidden] { display: inline-flex; }
  /* No JS: links stay visible and wrap. With JS: collapsed behind the toggle. */
  .has-nav-js .nav-menu { display: none; }
  .has-nav-js .is-open .nav-menu {
    display: block;
    /* absolute, not fixed: the header's backdrop-filter makes it the containing block */
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: calc(100vh - var(--nav-h));
    height: calc(100dvh - var(--nav-h));
    z-index: 25;
    overflow-y: auto;
    padding: 1rem 6vw 3rem;
    background: var(--paper);
    border-top: 1px solid var(--line);
  }
  .nav-open { overflow: hidden; }
  .is-open .nav-list,
  .nav-list { flex-wrap: wrap; }
  .is-open .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .is-open .nav-item { flex-wrap: wrap; border-bottom: 1px solid var(--line); }
  .is-open .site-nav nav a,
  .site-nav.is-open nav a {
    font-size: 0.86rem;
    letter-spacing: 0.14em;
    padding: 0.9rem 0;
    min-height: 52px;
    flex: 1 1 auto;
  }
  .is-open .nav-item--cta { border-bottom: 0; padding-top: 1.2rem; }
  .site-nav.is-open nav .nav-item--cta a { flex: 1 1 100%; width: 100%; min-height: var(--target); padding: 0.85rem 1.35rem; }
  .is-open .nav-drop__btn { display: none; }
  .is-open .nav-drop,
  .is-open .nav-item--books:hover .nav-drop {
    display: grid;
    position: static;
    min-width: 0;
    width: 100%;
    padding: 0.2rem 0 1rem 0.25rem;
    background: transparent;
    border: 0;
    box-shadow: none;
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .is-open .site-nav nav .nav-drop a,
  .site-nav.is-open nav .nav-drop a { font-size: 1.15rem; letter-spacing: 0; text-transform: none; min-height: var(--target); padding: 0.45rem 0; }
  .nav-skip { margin-left: 0.5rem; }
}
/* Home only: keep the Skip slot in the flow while it is hidden so the header never reflows when the hero ends. */
.site-nav .nav-skip[hidden] { display: inline-block; visibility: hidden; pointer-events: none; }
@media (max-width: 480px) {
  .brand { font-size: 1.1rem; }
}

/* --------------------------------------------------------------------------
   Footer (Sprint 1 step 13). Base leather gradient / colours come from styles.css .site-footer.
   -------------------------------------------------------------------------- */
.site-footer {
  display: block;
  padding: var(--space-8) 6vw 2rem; /* Sprint 2: footer rhythm on the section scale (was 3.4rem) */
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 0.8fr 1.3fr;
  gap: 2.5rem 2.5rem;
  align-items: start;
  max-width: var(--wide);
  margin: 0 auto;
}
.footer-brand .footer-note { text-align: left; margin-top: var(--space-4); }
.site-footer .footer-brand .brand { display: inline-flex; align-items: center; min-height: var(--target); }
.footer-col__h {
  margin: 0 0 var(--space-3);
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-warm);
}
.footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.1rem;
}
.footer-list a {
  display: inline-flex;
  align-items: center;
  min-height: var(--target);
  padding: 0.3rem 0;
  font-size: 0.92rem;
  text-decoration: none;
  color: var(--paper-a86);
  border-bottom: 1px solid transparent;
  transition: color var(--dur-base) var(--ease), border-color var(--dur-base) var(--ease);
}
.footer-list a:hover { color: var(--gold-warm); border-bottom-color: var(--gold-warm); }
.footer-list--inline { display: flex; flex-wrap: wrap; gap: 0 1.2rem; margin-top: var(--space-4); }
.footer-col__lede { margin: 0 0 var(--space-3); font-size: 0.92rem; color: var(--paper-a78); }
.site-footer .newsletter-form { margin-top: 0; max-width: 24rem; flex-wrap: nowrap; }
.site-footer .newsletter-form input[type="email"] { flex: 1 1 8rem; min-width: 0; }
.site-footer .newsletter-form input[type="email"] {
  background: var(--paper-a10);
  border-color: var(--paper-a35);
  color: var(--paper);
  box-shadow: none;
}
.site-footer .newsletter-form input[type="email"]::placeholder { color: var(--paper-a60); }
.site-footer .newsletter-form input[type="email"]:focus { background: var(--paper-a16); border-color: var(--gold-warm); }
.site-footer .newsletter-form button[type="submit"] { background: var(--gold-warm); color: var(--ink); }
.site-footer .newsletter-form button[type="submit"]:hover { background: var(--paper); }
.footer-legal {
  max-width: var(--wide);
  margin: var(--space-7) auto 0;
  padding-top: 1.2rem;
  border-top: 1px solid var(--paper-a18);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1.6rem;
  font-size: 0.8rem;
  color: var(--paper-a70);
}
.footer-legal p { margin: 0; }
.footer-legal__nav { display: flex; flex-wrap: wrap; gap: 0 1.2rem; }
.footer-legal__nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--target);
  text-decoration: none;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--paper-a78);
}
.footer-legal__nav a:hover { color: var(--gold-warm); }
.footer-legal__disclosure { flex-basis: 100%; }
.footer-legal__credit { margin-left: auto; }
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-col--connect { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-legal__credit { margin-left: 0; }
}

/* --------------------------------------------------------------------------
   Book detail spine (Sprint 1 step 14). Extends .book-detail from styles.css.
   -------------------------------------------------------------------------- */
.book-spine { padding-bottom: 0; }
.book-detail--spine {
  width: min(var(--wide), calc(100% - 10vw));
  margin: 2.5rem auto 1rem;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 3rem;
}
.book-detail__cover .jacket { max-width: 280px; }
.book-detail--spine .book-detail__cover .jacket { position: static; }
.book-detail__head h1 { margin: 0.2rem 0 0.6rem; }
.book-detail__tagline {
  margin: 0 0 var(--space-4);
  font-family: var(--serif);
  font-style: italic;
  font-size: var(--step-1);
  line-height: 1.4;
  color: var(--ink-soft);
  max-width: 34rem;
}
.book-detail__pills { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0 0 var(--space-5); }
.book-detail__cta { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.book-detail__facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-6);
  margin: var(--space-6) 0 0;
  padding: var(--space-4) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.book-detail__facts div { display: grid; gap: 0.15rem; }
.book-detail__facts dt {
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.book-detail__facts dd { margin: 0; font-size: 0.95rem; color: var(--ink); }
.book-section { margin-top: var(--space-6); }
.book-section h2 { margin: 0 0 var(--space-3); font-size: var(--step-2); font-weight: 500; }
.book-detail--spine .blurb { margin: 0; max-width: 34rem; } /* ≈ 65–70 characters of 1.08rem Cormorant */
.book-detail--spine .excerpt { margin-top: var(--space-6); }
.book-detail--spine .excerpt .eyebrow { margin-bottom: var(--space-2); }
.book-detail--spine blockquote { max-width: 34rem; }
.book-detail--spine .where { margin-top: var(--space-6); scroll-margin-top: calc(var(--nav-h) + 1rem); }
.book-detail--spine .where .dist { max-width: 34rem; }
#excerpt, #synopsis { scroll-margin-top: calc(var(--nav-h) + 1rem); }
.praise { margin: 0 0 var(--space-4); }
.praise cite { display: block; margin-top: var(--space-2); font-style: normal; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); }
.book-related { padding: var(--space-7) 0 var(--space-4); }
.book-related .section-head { margin-bottom: var(--space-4); }
.book-related .rail__item { width: clamp(150px, 42vw, 190px); }
.book-spine .newsletter { padding-bottom: var(--space-8); }

/* sticky mobile buy bar */
.buy-bar {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 15;
  transition: transform var(--dur-base) var(--ease), visibility 0s linear var(--dur-base);
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 0.6rem 4vw calc(0.6rem + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line-firm);
  box-shadow: 0 -6px 20px rgba(50, 30, 18, 0.10);
}
.buy-bar .btn { flex: 0 0 auto; min-width: 8.5rem; }
/* With JS: slid away until the in-page "Buy the book" button has scrolled out of view (buy-bar.js) */
.has-nav-js .buy-bar:not(.is-visible) { transform: translateY(110%); visibility: hidden; }
.buy-bar.is-visible { transition: transform var(--dur-base) var(--ease), visibility 0s; }
.buy-bar__title {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.05rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 1024px) {
  .book-detail--spine .book-detail__cover { position: sticky; top: calc(var(--nav-h) + 1.5rem); }
}
@media (min-width: 1200px) {
  .book-detail--spine { grid-template-columns: 340px minmax(0, 1fr); gap: 3.5rem; }
  .book-detail--spine .book-detail__cover .jacket { max-width: 340px; }
}
@media (max-width: 1023px) {
  .book-detail--spine { grid-template-columns: 240px minmax(0, 1fr); gap: 2.2rem; }
}
@media (max-width: 900px) {
  .buy-bar { display: flex; }
  .book-spine .newsletter { padding-bottom: 7rem; }
  .book-page .site-footer { padding-bottom: calc(2rem + 5rem + env(safe-area-inset-bottom)); }
}
@media (max-width: 800px) {
  .book-detail--spine { grid-template-columns: 1fr; margin-top: 1.5rem; }
  .book-detail--spine .book-detail__cover .jacket { max-width: 220px; margin: 0 auto; }
  .book-detail__head { text-align: left; }
}

/* Book cards in a grid/rail: reserve the tallest cover ratio so titles line up across cards. */
.book-grid .book-card__cover,
.rail .book-card__cover {
  display: flex;
  align-items: flex-end;
  aspect-ratio: 600 / 1000; /* tallest current cover (the new set is ~1.66:1); was 600/1213 for the old What We Keep */
}
/* The jacket's bottom margin lives on the slot, not inside it, so the tallest jacket cannot overflow the
   aspect-ratio box and push its label down (Sprint 2 fix: What We Keep sat 8px lower than its neighbours). */
.book-grid .book-card__cover .jacket,
.rail .book-card__cover .jacket { margin-bottom: 0; }
.book-grid .book-card__cover,
.rail .book-card__cover { margin-bottom: var(--space-2); }

/* --------------------------------------------------------------------------
   Awards (render only when books.json awards[] / author.honor are filled)
   -------------------------------------------------------------------------- */
.honor {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: var(--space-5);
  align-items: center;
  margin-top: var(--space-6);
  padding: var(--space-5) clamp(1.2rem, 3vw, 2rem);
  background: var(--paper-lift);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold-warm);
  border-radius: var(--radius-s);
  box-shadow: var(--lift-1);
}
.honor__seal { width: 96px; height: 96px; filter: drop-shadow(0 4px 10px rgba(50, 30, 18, 0.25)); }
.honor .eyebrow { margin-bottom: var(--space-1); font-size: 0.72rem; letter-spacing: 0.14em; }
.honor__title { margin: 0 0 var(--space-2); font-family: var(--serif); font-size: var(--step-2); line-height: 1.1; color: var(--ink); }
.honor__text { margin: 0 0 var(--space-4); color: var(--ink-soft); }
.about-home__text .honor .btn--primary { padding-inline: 1.2rem; }
@media (max-width: 520px) {
  .honor { grid-template-columns: 1fr; justify-items: start; }
}
.book-awards { list-style: none; margin: var(--space-4) 0 0; padding: 0; display: grid; gap: var(--space-3); }
.book-award { display: flex; align-items: center; gap: var(--space-4); }
.book-award__seal { width: 72px; height: 72px; flex: none; filter: drop-shadow(0 3px 8px rgba(50, 30, 18, 0.25)); }
.book-award__honor { margin: 0; font-family: var(--serif); font-size: var(--step-1); line-height: 1.15; color: var(--ink); }
.book-award__meta { margin: 0.15rem 0 0; font-size: var(--step--1); letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }
.book-card__award { margin: 0.35rem 0 0; }
.pill--gold { background: var(--gold-warm); border-color: var(--gold-warm); color: var(--ink); }

/* Mobile pass (≤ 600px): award pill wraps; the related rail on book pages shows ~1.4 cards. */
@media (max-width: 600px) {
  .pill { white-space: normal; text-align: left; line-height: 1.25; font-size: 0.62rem; max-width: 100%; }
  .book-card__award { margin-top: 0.25rem; }
  .book-related .rail__item { width: 62vw; }
}
