/* Dated offers: the holiday paperback price and the Kindle Countdown weeks
   (SITE.offers in _src/data/site.js, rendered by templates.js). Its own file, loaded
   only by pages that carry an offer, so no other page's stylesheet hash moves and the
   file simply stops being linked when the last window closes.
   Every offer is rendered [hidden] and shown by script inside its window. */
[data-o-from][hidden],
[data-o-any][hidden],
[data-o-else][hidden] { display: none !important; }

/* ---- above a shelf of books (homepage, /books/) ---- */
.pb-offers {
  max-width: 620px;
  margin: 0 auto;
  padding: 20px 18px 19px;
  border-top: 1px solid var(--gold-soft);
  border-bottom: 1px solid var(--gold-soft);
  text-align: center;
}
.books-heading + .pb-offers { margin-top: -22px; }
.pb-offerline { margin: 0; }
.pb-offerline:not(.pb-offerline--kindle) {
  font-family: var(--display);
  font-size: 1.42rem;
  line-height: 1.3;
  color: var(--ink);
}
.pb-offerline strong { font-weight: 400; white-space: nowrap; }
.pb-offerline--kindle {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
.pb-offerline--kindle strong { font-weight: 500; color: var(--ink); }
.pb-offerline:not([hidden]) + .pb-offerline--kindle { margin-top: 9px; }
.pb-offerline--kindle .text-link { font-size: 1rem; padding-bottom: 1px; }
.pb-offerline--kindle span:not([hidden]) ~ span:not([hidden])::before { content: ' and '; }
/* on /books/ the page is left-aligned under its lede */
.pb-page-head .pb-offers { margin: 30px 0 0; max-width: 58ch; padding-left: 0; padding-right: 0; text-align: left; }

/* ---- on a book card in those shelves ---- */
.pb-card-kweek {
  display: inline-block;
  margin-top: 9px;
  padding: 3px 10px 2px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.5;
  color: var(--ink);
}

/* ---- under the paperback button (book and reading pages) ---- */
.form-note .pb-offer { color: var(--ink); }
.form-note .pb-offer strong { font-weight: 500; }
.pb-kweek { margin: 14px 0 0; }
.pb-kweek .text-link { font-size: 1rem; }
.pb-kweek strong { font-weight: 500; }

@media (max-width: 640px) {
  .pb-offers { padding: 16px 10px 15px; }
  .books-heading + .pb-offers { margin-top: -26px; }
  .pb-offerline:not(.pb-offerline--kindle) { font-size: 1.22rem; }
  .pb-card-kweek { font-size: 0.64rem; padding: 2px 8px 1px; letter-spacing: 0.06em; }
}
