/* =============================================================================
   pages.css — leafle's script-free public pages (static/shared/page.html): the
   archive of daily finds, the directory of libraries, and each library's page.
   ============================================================================= */
* { box-sizing: border-box; }
body {
  margin: 0; color: var(--ink); background: var(--bg);
  font-family: var(--font-ui); line-height: 1.5;
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  overflow-wrap: break-word;
}
a { color: var(--accent); }
.hero-band { background: var(--chip); border-bottom: 1px solid var(--border); }
.hero-inner, .page { max-width: 880px; margin: auto; padding: 28px 24px 40px; }
.page { padding-bottom: 72px; }
.top-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.brand { margin-bottom: 0; }
.brand-words { display: flex; flex-direction: column; }
.header-cta, .cta {
  background: var(--accent); border-radius: var(--r-control); color: var(--accent-ink);
  font-weight: 700; text-decoration: none;
}
.header-cta { font-size: .95rem; padding: 10px 16px; }
.cta { display: inline-block; margin-top: 22px; padding: 13px 20px; }
h1 {
  font: 600 clamp(2.4rem, 6vw, 4rem)/.95 var(--font-body);
  letter-spacing: -.04em; margin: 48px 0 16px; text-wrap: balance;
}
.lede { font: 400 1.2rem/1.45 var(--font-body); margin: 0; max-width: 46ch; text-wrap: pretty; }
.page h2 { font: 600 1.55rem/1.15 var(--font-body); margin: 40px 0 10px; text-wrap: balance; }
.page > h2:first-child, .page > section:first-child > h2 { margin-top: 0; }
.page p { margin: 0 0 12px; max-width: 62ch; text-wrap: pretty; }
.note { color: var(--muted); font-size: .9rem; }
.header-cta:focus-visible, .cta:focus-visible, .cards a:hover, .cards a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* Book cards: the archive, and the finds on a library's page. */
.cards {
  margin: 0; padding: 0; list-style: none;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
}
.cards a {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card);
  color: var(--ink); display: flex; gap: 16px; height: 100%; padding: 16px;
  text-decoration: none;
}
.cards img, .cards .no-cover {
  border-radius: var(--r-cover); flex: 0 0 72px; height: 108px; object-fit: cover; width: 72px;
}
.cards .no-cover { background: var(--chip); }
.cards .copy { display: flex; flex-direction: column; min-width: 0; }
.cards time, .cards .when {
  color: var(--muted); font-size: .74rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
}
.cards h2, .cards h3 { font: 600 1.25rem/1.15 var(--font-body); margin: 4px 0 2px; text-wrap: balance; }
.cards .author { color: var(--muted); font: 500 .95rem var(--font-body); }
.cards .line { font: italic 400 1rem/1.35 var(--font-body); margin-top: 8px; text-wrap: pretty; }
.cards .shelf { color: var(--avail); font-size: .82rem; font-weight: 600; margin-top: 8px; }

/* Plain name lists: a library's branches, the libraries near it, the directory. */
.names { columns: 14rem; column-gap: 28px; margin: 0; padding-left: 1.2rem; font-size: .95rem; }
.names li { break-inside: avoid; margin-bottom: 3px; }
.names small { color: var(--muted); }

@media (max-width: 600px) {
  .hero-inner, .page { padding: 22px 18px 32px; }
  .page { padding-bottom: 56px; }
  .brand-mark { width: 32px; height: 32px; border-radius: 8px; }
  .brand-name { font-size: 1.05rem; }
  .brand-tag { font-size: .74rem; }
  .header-cta { display: none; }
  h1 { margin-top: 34px; }
  .cards { grid-template-columns: minmax(0, 1fr); }
}
