/* Static species and country pages: the globe panel's field-guide look (forest, ochre, light paper), no JavaScript. */
@font-face { font-family: 'Bricolage Grotesque'; src: url(bricolage.woff2) format('woff2'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'Source Serif 4'; src: url(serif-italic.woff2) format('woff2'); font-style: italic; font-weight: 200 900; font-display: swap; }
:root {
  --forest: #14261c; --deep: #22402f; --ochre: #e9b44c; --paper: #f3f6f1; --ink: #1b2a20; --muted: #5b6e60;
  --line: #d6e0d3; --link: #2d6a3e; --sans: 'Bricolage Grotesque', system-ui, sans-serif; --serif: 'Source Serif 4', Georgia, serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-underline-offset: 2px; }
:focus-visible { outline: 3px solid var(--ochre); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(32px, 5vw, 48px); margin: 0 0 6px; }
h2 { font-size: 24px; margin: 40px 0 14px; }
h3 { font-size: 18px; margin: 24px 0 8px; }
.n { font-size: 15px; font-weight: 500; color: var(--muted); }
.fine { font-size: 14px; color: var(--muted); }
.lede { font-size: 19px; max-width: 46rem; }

.bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px clamp(16px, 4vw, 40px); background: var(--forest); color: var(--paper); }
.bar a { color: var(--paper); text-decoration: none; }
.brand img { display: block; height: 32px; width: auto; }
.bar nav { display: flex; align-items: center; gap: 18px; font-size: 15px; }
.bar nav a:hover { text-decoration: underline; }
.bar .cta { background: var(--ochre); color: var(--forest); padding: 7px 14px; border-radius: 999px; font-weight: 600; }
.bar .cta:hover { text-decoration: none; filter: brightness(1.05); }

main { max-width: 1040px; margin: 0 auto; padding: 18px clamp(16px, 4vw, 40px) 40px; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 22px; }
.crumbs a { color: var(--muted); }

.btn { display: inline-block; background: var(--forest); color: var(--paper); text-decoration: none; padding: 11px 20px;
  border-radius: 999px; font-weight: 600; }
.btn:hover { background: var(--deep); }

.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.photo { margin: 0; border-radius: 16px; overflow: hidden; background: var(--deep); }
.photo img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.photo figcaption { font-size: 12px; padding: 6px 10px; background: #fff; color: var(--muted); }
.photo figcaption a { color: var(--muted); }
.latin, .sci { font-family: var(--serif); font-style: italic; }
.latin { font-size: 22px; margin: 0 0 10px; color: var(--muted); }
.lineage { margin: 0 0 12px; color: var(--muted); }
.uz { color: var(--muted); }
.iucn { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 14px; font-weight: 600; background: #dde7da; }
.iucn-CR, .iucn-EN { background: #f2c3b5; } .iucn-VU { background: #f6dc8a; } .iucn-NT { background: #e9e6b6; }
.iucn-EX, .iucn-EW { background: #3a3a3a; color: #fff; }
.extract { font-family: var(--serif); font-style: italic; font-size: 19px; max-width: 46rem; }

.map { position: relative; margin: 0; aspect-ratio: 1 / 0.71; max-width: 760px; border-radius: 14px; overflow: hidden; background: #0b2233; }
/* the map is cut at 60° S: the tiles keep their square and overflow the box */
.map > span { position: absolute; left: 0; right: 0; top: 0; aspect-ratio: 1; display: grid; grid-template-columns: 1fr 1fr; }
.map img { width: 100%; height: 100%; display: block; }
.facts { display: flex; flex-wrap: wrap; gap: 12px 40px; margin: 18px 0; }
.facts dt { font-size: 13px; color: var(--muted); }
.facts dd { margin: 0; font-size: 22px; font-weight: 600; }
.countries { columns: 2 220px; padding-left: 1.4em; margin: 0; }
.countries span { color: var(--muted); font-size: 14px; }

.cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); }
.card .ph { display: block; aspect-ratio: 3 / 2; border-radius: 10px; overflow: hidden; }
.card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .nm { font-weight: 600; margin-top: 6px; line-height: 1.25; }
.card .sci { font-size: 14px; color: var(--muted); }
.card .nt { font-size: 13px; color: var(--muted); }
.card:hover .nm { text-decoration: underline; }
.also { font-size: 15px; }

.bars { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; max-width: 46rem; }
.bars li { display: grid; grid-template-columns: 15rem 1fr 7rem; gap: 12px; align-items: center; font-size: 15px; }
.bars .br { height: 12px; background: #e4ece2; border-radius: 6px; overflow: hidden; }
.bars .br span { display: block; height: 100%; border-radius: 6px; }
.bars .v { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

.names { list-style: none; padding: 0; columns: 4 200px; column-gap: 24px; }
.names li { break-inside: avoid; padding: 2px 0; }
.names span { color: var(--muted); font-size: 13px; }
.jump { font-size: 15px; }

.g-mammals { background: #6b5440; } .g-birds { background: #3d5a73; } .g-reptiles { background: #5a6b3d; }
.g-amphibians { background: #3d6b4f; } .g-fish { background: #1d5a6c; } .g-sharks { background: #234a63; }
.g-insects { background: #6b603d; } .g-spiders { background: #4f4a4a; } .g-crustaceans { background: #6b4f3d; }
.g-molluscs { background: #4f4a6b; } .g-corals { background: #6b4a5e; } .g-echinoderms { background: #6b3d3d; }
.g-worms { background: #6b4b52; } .g-other { background: #3d4f4a; }

footer { border-top: 1px solid var(--line); margin-top: 48px; padding: 20px clamp(16px, 4vw, 40px) 36px; font-size: 14px; color: var(--muted); }
footer p { max-width: 1040px; margin: 0 auto; }
footer .powered { display: flex; align-items: center; gap: 8px; width: fit-content; max-width: 1040px; margin: 0 auto 12px; color: var(--ink); text-decoration: none; font-size: 13px; }
footer .powered img { border-radius: 4px; }
footer .powered:hover b { text-decoration: underline; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 18px; }
  .bar nav a:not(.cta) { display: none; }
  .bars li { grid-template-columns: 9rem 1fr 5.5rem; font-size: 14px; }
}

/* jump links (#mammals) land below the sticky bar, not under it */
section[id] { scroll-margin-top: 76px; }
