/* Static spectacle, month and country pages (written by tools/build.py).
   Same look as soundingwild.com and the calendar: Brandbook palette, Bricolage Grotesque, the website header and footer. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../vendor/bricolage-grotesque-latin-standard-normal.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap;
}

:root {
  --bg: #FFF1E8;
  --panel: #FFFFFF;
  --ink: #1F1819;
  --ink-soft: #5a4540;
  --brown: #581806;
  --muted: #89563F;
  --link: #0946E2;
  --heading: #0946E2;
  --rule: rgba(88, 24, 6, .22);
  --btn: #EE5212;
  --btn-ink: #FFF1E8;
  --font: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

/* Same look as soundingwild.com (20 Oct 2026): off-white page, light overlapping title in brown, headings in blue, pill buttons. */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: #581806; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 18px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
.wrap { max-width: 920px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 760px) { .wrap { padding: 0 20px; } body { font-size: 17px; } }
a { color: var(--link); text-underline-offset: 2px; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; }

main { padding-bottom: 40px; }
h1 { color: var(--brown); font-size: clamp(34px, 4.6vw, 56px); font-weight: 400; line-height: 1.06; margin: 36px 0 18px; text-wrap: balance; }  /* as the site's FAQ title: long spectacle names stay readable */
h2 { font-size: clamp(26px, 2.8vw, 34px); font-weight: 400; line-height: 1.15; color: var(--heading); margin: 40px 0 12px; }
h3 { font-size: 20px; font-weight: 600; color: var(--brown); margin: 24px 0 6px; }
.lede { font-size: clamp(19px, 1.8vw, 22px); line-height: 1.45; color: var(--ink-soft); margin: 0 0 18px; }
.small { font-size: 14px; color: var(--muted); }
.crumbs { font-size: 14px; color: var(--muted); margin-top: 16px; }
.crumbs a { color: inherit; }

.badges { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.badges li { background: var(--panel); border: 1px solid var(--rule); border-radius: 999px; padding: 4px 12px; font-size: 14px; }
.btn { display: inline-flex; align-items: center; background: var(--btn); color: var(--btn-ink); text-decoration: none; padding: 12px 28px; border-radius: 999px; font-weight: 600; font-size: 17px; min-height: 44px; }
.btn:hover { background: var(--brown); }

ul { padding-left: 20px; }
.sites li, .sources li { margin-bottom: 8px; }
.sources { font-size: 15px; word-break: break-word; }
.more { margin-top: 34px; padding-top: 14px; border-top: 1px solid var(--rule); }

.months { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 16px; font-size: 15px; }
.months a { color: var(--ink); text-decoration: none; padding: 6px 0; }
.months a[aria-current] { color: var(--heading); font-weight: 700; text-decoration: underline; }

.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.card { background: var(--panel); border: 1px solid var(--rule); padding: 12px 14px; display: grid; gap: 3px; }
.card a { font-size: 18px; text-decoration: none; }
.card a:hover { text-decoration: underline; }
.card .meta { font-size: 14px; color: var(--muted); }
.card .sum { font-size: 15px; }
.cards.compact .sum { display: none; }
.plain li { margin-bottom: 4px; }

.cta { display: grid; gap: 6px; justify-items: start; margin: 0 0 8px; }

/* Quick answer under the title, peak tables and link columns (animal, kind and country-by-month pages, 21 Oct 2026) */
.answer { background: var(--panel); border-left: 4px solid var(--btn); padding: 12px 16px; margin: 0 0 18px; font-size: 17px; }
.table { overflow-x: auto; margin: 0 0 8px; }
.peaks { border-collapse: collapse; width: 100%; font-size: 15px; background: var(--panel); }
.peaks th, .peaks td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.peaks th { color: var(--brown); font-weight: 600; }
.peaks td:nth-child(3) { white-space: nowrap; }
.cols { columns: 3 200px; column-gap: 24px; list-style: none; padding: 0; }
.cols li { break-inside: avoid; }
.sw-link { margin-top: 28px; font-size: 16px; color: var(--ink-soft); }
@media (max-width: 640px) {  /* phones: each row becomes a small block, so the table never pushes the page wider than the screen */
  .peaks thead { display: none; }
  .peaks tr { display: block; padding: 10px 12px; border-bottom: 1px solid var(--rule); }
  .peaks td { display: inline; padding: 0; border: 0; white-space: normal !important; color: var(--muted); font-size: 14px; }
  .peaks td:first-child { display: block; font-size: 16px; margin-bottom: 2px; }
  .peaks td + td:not(:last-child)::after { content: " · "; }
}

/* Spectacle photo (data/photos.json) and list thumbnails */
.photo { margin: 0 0 18px; max-width: 760px; }
.photo img { display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; background: var(--rule); }
.photo figcaption { font-size: 13px; color: var(--ink-soft); margin-top: 6px; }
.photo figcaption a { color: inherit; }
.card.has-ph { grid-template-columns: 96px minmax(0, 1fr); column-gap: 14px; align-items: start; }
.card.has-ph > :not(.th) { grid-column: 2; }
.card .th { grid-row: 1 / span 3; width: 96px; height: 72px; object-fit: cover; display: block; background: var(--rule); }
@media (max-width: 480px) { .card.has-ph { grid-template-columns: 72px minmax(0, 1fr); } .card .th { width: 72px; height: 54px; } }
