/* jungle.slopped.site: the field guide's pages (the expedition, /, has its own styles in index.html).
   Hand-written; jungle/scripts/build.mjs doesn't touch it. Brand tokens and type as on slopped.site
   (slopped-brand). The idea: a naturalist's field guide printed on the site's paper. Specimens are mounted
   like herbarium sheets: the picture on a dark canopy-green board, a ruled specimen label beside it. Indexes are
   hairline-ruled lists, not cards. The one colour that isn't the brand's is --canopy, the jungle's own green,
   used only for mounts and the kind tags. */
@font-face { font-family: "Archivo Black"; src: url(/fonts/archivo-black-latin.woff2) format("woff2"); font-weight: 400 1000; font-display: swap; }
@font-face { font-family: "Archivo Black Fallback"; src: local("Arial Bold"), local("Arial-BoldMT"), local("Helvetica Bold"), local("Helvetica-Bold"), local("Roboto Bold"), local("Roboto-Bold"), local("Noto Sans Bold"), local("NotoSans-Bold"); size-adjust: 112%; }
:root {
  color-scheme: light;
  --paper: #f4f1e8;
  --ink: #171815;
  --acid: #e3ff59;
  --muted: #6b6b62;
  --line: #d4d2c9;
  --panel: #ebe7dc;
  --card: #fbf9f3;
  --canopy: #12261b;
  --leaf: #2d5a3f;
  --head: "Archivo Black", "Arial Black", "Archivo Black Fallback", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { overflow-x: clip; }
body { min-width: 320px; margin: 0; background: var(--paper); color: var(--ink); font-family: Arial, Helvetica, sans-serif; line-height: 1.55; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, label:focus-within > span { outline: 3px solid #728600; outline-offset: 5px; }
h1, h2, h3 { margin: 0; font-family: var(--head); font-weight: 1000; letter-spacing: -1.5px; line-height: 1.02; font-synthesis: none; }
img { max-width: 100%; }
code { padding: 1px 5px; border-radius: 4px; background: var(--panel); font-size: .9em; }
.wrap { max-width: 1280px; margin: auto; padding: 0 5%; }
html:not(.can-install) [data-install] { display: none !important; }

/* header: the masthead (slopped-brand, "Subsite header") */
header { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 100px; border-bottom: 1px solid var(--line); }
.masthead { display: flex; align-items: center; min-width: 0; }
.masthead .brand { display: flex; align-items: center; min-height: 42px; flex: none; }
.masthead .brand img { display: block; width: auto; height: 30px; }
.site-name { display: inline-flex; align-items: center; min-height: 42px; margin-left: 16px; padding-left: 17px; background: linear-gradient(var(--line), var(--line)) left center / 1px 22px no-repeat; color: var(--ink); font-size: 16px; font-weight: 700; letter-spacing: -.3px; text-decoration: none; white-space: nowrap; }
.site-name:hover { text-decoration: underline; text-underline-offset: 4px; }
nav { display: flex; align-items: center; gap: 4px 18px; font-size: 14px; }
nav a { display: inline-flex; align-items: center; min-height: 42px; text-decoration: none; white-space: nowrap; }
nav a:hover, nav a[aria-current] { text-decoration: underline; text-underline-offset: 5px; }
nav a[aria-current] { font-weight: 700; }
.pill { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border: 1px solid var(--ink); border-radius: 999px; background: transparent; color: var(--ink); font: 700 14px Arial, Helvetica, sans-serif; text-decoration: none; cursor: pointer; }
.pill.install-icon { display: inline-grid; place-items: center; width: 42px; height: 42px; min-height: 42px; padding: 0; }

.page-head { padding: 52px 0 26px; }
.page-head h1 { max-width: 15ch; font-size: clamp(46px, 7vw, 100px); }
.lede { max-width: 700px; margin: 18px 0; font-size: 21px; line-height: 1.4; letter-spacing: -.3px; }
.small { color: var(--muted); font-size: 13px; }
.prose { max-width: 680px; font-size: 17px; }
.prose p { margin: 0 0 14px; }
.prose a, .lede a, footer a, .node a, .small a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:hover { text-decoration-color: #728600; text-decoration-thickness: 2px; }
.split { padding: 40px 0 10px; border-top: 1px solid var(--line); }
.split > h2 { margin-bottom: 16px; font-size: 32px; }

/* kind tags: the only place colour carries meaning */
.kind { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: .2px; }
.k-possible { background: var(--panel); color: var(--canopy); box-shadow: inset 0 0 0 1px #c5c1b4; }
.k-impossible { background: var(--canopy); color: var(--acid); }
.k-unclassified { border: 1px dashed var(--ink); }
.no { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }

/* the index: a ruled list, small plate + name + tag + field note */
.index { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 0 34px; margin: 0 0 40px; padding: 0; list-style: none; }
.index li { border-top: 1px solid var(--line); }
.index li[hidden] { display: none; }
.index a { display: grid; grid-template-columns: 66px 1fr; gap: 16px; align-items: start; min-height: 100px; padding: 14px 0; text-decoration: none; }
.index a:hover b { text-decoration: underline; text-underline-offset: 4px; }
.tx { display: grid; gap: 5px; min-width: 0; }
.tx b { font-size: 16px; line-height: 1.25; }
.meta { display: flex; align-items: center; gap: 10px; }
.why { color: var(--muted); font-size: 14px; line-height: 1.4; }
.th { display: block; width: 66px; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 7px; background: var(--panel); }
.th img { display: block; width: 100%; height: 100%; object-fit: cover; }
.index li.seen .th { box-shadow: 0 0 0 3px var(--acid), 0 0 0 4px var(--ink); }

/* field guide filters */
.guide-head { padding-bottom: 10px; }
.filters { display: grid; grid-template-columns: minmax(240px, 340px) 1fr; gap: 18px 40px; align-items: start; padding: 24px 0 18px; border-top: 1px solid var(--line); }
.filters .search { grid-row: span 3; }
.search label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 700; }
.search input { width: 100%; min-height: 50px; padding: 0 18px; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--card); color: var(--ink); font: 17px Arial, Helvetica, sans-serif; }
.filter { display: grid; grid-template-columns: 96px 1fr; gap: 10px; align-items: center; margin: 0; padding: 0; border: 0; }
.filter legend { float: left; padding: 0; font-size: 13px; font-weight: 700; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pills label, .life { position: relative; display: inline-flex; }
.pills input, .life input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pills span, .life span { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 15px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 700; cursor: pointer; user-select: none; }
.pills span:hover, .life span:hover { border-color: var(--ink); }
.pills small, .life small { color: var(--muted); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pills input:checked + span, .life input:checked + span { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.pills input:checked + span small, .life input:checked + span small { color: var(--acid); }
.pills input:focus-visible + span, .life input:focus-visible + span { outline: 3px solid #728600; outline-offset: 3px; }
.life { grid-column: 2; }
.status { margin: 0 0 6px; color: var(--muted); font-size: 14px; }
.empty { padding: 30px 0 60px; font-size: 18px; }

/* a specimen: the herbarium sheet */
.sheet { padding: 34px 0 20px; }
.crumbs { margin: 0 0 18px; font-size: 14px; }
.crumbs a { font-weight: 700; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; text-underline-offset: 4px; }
.plate { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 440px); gap: 48px; align-items: start; }
.plate.wide { grid-template-columns: minmax(0, 1.5fr) minmax(300px, 400px); }
.mount { position: sticky; top: 24px; margin: 0; padding: clamp(18px, 4vw, 54px); border-radius: 14px; background: radial-gradient(120% 90% at 30% 10%, #1f3d2b, var(--canopy) 70%); display: grid; place-items: center; }
.mount img { display: block; width: auto; max-width: 100%; max-height: 78vh; height: auto; border: 7px solid var(--paper); border-radius: 3px; box-shadow: 0 22px 40px #00000059, 0 2px 4px #0000004d; transform: rotate(-.6deg); }
/* the pin */
.mount::before { content: ""; position: absolute; z-index: 1; top: calc(clamp(18px, 4vw, 54px) - 6px); left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff6c4, #c9a640 45%, #6e5714 100%); box-shadow: 0 3px 4px #0000008c; }
.notes h1 { font-size: clamp(38px, 4.4vw, 64px); }
.notes .sub { margin: 10px 0 0; color: var(--muted); font-size: 17px; }
.notes .desc { margin: 16px 0 0; font-size: 17px; }
.field-note { margin: 24px 0 0; padding: 16px 18px 16px; border-radius: 10px; background: var(--acid); font-size: 19px; line-height: 1.38; letter-spacing: -.2px; }
.field-note span { display: block; margin-bottom: 4px; font-size: 11px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; }
.field-note.pending { border: 1px dashed var(--ink); background: transparent; }
/* the specimen label: ruled, like the slip in a herbarium's corner */
.label { margin: 24px 0 0; border: 1.5px solid var(--ink); border-radius: 4px; background: var(--card); }
.label div { display: grid; grid-template-columns: 132px 1fr; gap: 14px; padding: 9px 14px; }
.label div + div { border-top: 1px solid var(--line); }
.label dt { color: var(--muted); font-size: 12px; font-weight: 700; line-height: 1.5; }
.label dd { margin: 0; font-size: 15px; line-height: 1.45; }
.label dd small { color: var(--muted); }
.label a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.out { display: grid; gap: 0; margin: 22px 0 0; padding: 0; list-style: none; }
.out li { border-top: 1px solid var(--line); }
.out li:last-child { border-bottom: 1px solid var(--line); }
.out a { display: flex; align-items: center; justify-content: space-between; min-height: 48px; font-size: 15px; font-weight: 700; text-decoration: none; }
.out a:hover { text-decoration: underline; text-underline-offset: 4px; }
.stepper { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 46px 0 0; border-top: 1px solid var(--line); }
.stepper a { display: grid; gap: 2px; min-width: 0; min-height: 64px; padding: 14px 0; font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.stepper a[rel=next] { text-align: right; }
.stepper small { color: var(--muted); font-size: 12px; }
.stepper a:hover { text-decoration: underline; text-underline-offset: 4px; }
.kin { padding-top: 30px; }
.kin h2 { margin-bottom: 14px; font-size: 24px; letter-spacing: -.6px; }

/* the taxonomy: a tree, typeset */
.tree, .tree ol { margin: 0; padding: 0; list-style: none; }
.tree > li { border-top: 1px solid var(--line); padding-top: 34px; }
.tree ol { margin: 34px 0 0 clamp(16px, 6vw, 86px); padding-left: clamp(16px, 3vw, 34px); border-left: 3px solid var(--ink); }
.tree ol > li { position: relative; padding: 0 0 48px; }
.tree ol > li::before { content: ""; position: absolute; left: calc(-1 * clamp(16px, 3vw, 34px) - 3px); top: 34px; width: clamp(12px, 2.4vw, 26px); height: 3px; background: var(--ink); }
.node { max-width: 760px; }
.rank { margin: 0 0 4px; font-size: 11px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; }
.node h2 { display: flex; align-items: flex-start; gap: 10px; font-size: clamp(44px, 6.4vw, 92px); letter-spacing: -2.5px; }
.node h2 sup { margin-top: .45em; padding: 2px 9px; border-radius: 999px; background: var(--acid); font: 800 15px/1.4 Arial, Helvetica, sans-serif; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.node p { max-width: 680px; margin: 12px 0 0; font-size: 17px; }
.node .gloss { font-size: 21px; letter-spacing: -.3px; }
.breaks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 26px; margin: 24px 0 0; padding: 0; list-style: none; }
.breaks li { display: grid; gap: 2px; padding: 12px 0; border-top: 1px solid var(--line); }
.breaks a { display: inline-flex; align-items: flex-start; gap: 6px; min-height: 42px; text-decoration: none; }
.breaks b { font: 1000 30px/1.1 var(--head); letter-spacing: -1px; font-synthesis: none; }
.breaks sup { margin-top: .3em; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.breaks a:hover b { text-decoration: underline; text-underline-offset: 5px; }
.breaks span { color: var(--muted); font-size: 14px; }
.specimen-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; margin: 26px 0 0; padding: 0; list-style: none; }
.specimen-row a { display: grid; gap: 4px; text-decoration: none; }
.specimen-row img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 9px; margin-bottom: 6px; transition: transform .2s; }
.specimen-row a:hover img { transform: translateY(-4px); }
.specimen-row b { font-size: 15px; }
.specimen-row span { color: var(--muted); font-size: 13px; line-height: 1.4; }
.matrix { width: 100%; max-width: 900px; margin: 18px 0 26px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.matrix caption { padding-bottom: 10px; color: var(--muted); font-size: 13px; text-align: left; }
.matrix th, .matrix td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: right; font-size: 15px; }
.matrix th:first-child { text-align: left; }
.matrix thead th { font-size: 12px; color: var(--muted); }
.matrix a { display: inline-block; min-width: 42px; min-height: 26px; text-decoration: underline; text-underline-offset: 3px; }
.rules { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 26px; margin: 0 0 30px; }
.rules div { padding: 10px 0; border-top: 1px solid var(--line); }
.rules dt { font-weight: 700; }
.rules dd { margin: 2px 0 0; color: var(--muted); font-size: 14px; }

/* On the jungle: a long read, with the quotations set large */
.essay .chapter { padding: 40px 0 16px; border-top: 1px solid var(--line); }
.essay .chapter > h2 { max-width: 16ch; margin-bottom: 20px; font-size: clamp(34px, 4.6vw, 60px); }
.pull { max-width: 900px; margin: 26px 0 30px; padding: 0 0 0 clamp(16px, 3vw, 34px); border-left: 6px solid var(--acid); }
.pull p { margin: 0; font: 1000 clamp(22px, 2.5vw, 32px)/1.2 var(--head); letter-spacing: -.8px; font-synthesis: none; }
.pull.long p { font: 700 clamp(19px, 1.9vw, 24px)/1.4 Arial, Helvetica, sans-serif; letter-spacing: -.3px; }
.pull footer { display: block; margin: 12px 0 0; padding: 0; color: var(--muted); font-size: 14px; }
.pull footer::before { content: "— "; }
.refs { max-width: 760px; padding-left: 22px; font-size: 15px; }
.refs li { margin-bottom: 12px; }
.refs a { text-decoration: underline; text-underline-offset: 3px; word-break: break-word; }

footer { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; margin-top: 50px; padding: 30px 0 40px; border-top: 1px solid var(--line); }
footer > a { display: inline-flex; align-items: center; min-height: 42px; }
footer img { display: block; width: 130px; height: auto; }
footer p { margin: 0; color: var(--muted); font-size: 13px; }

@media (max-width: 900px) {
  .plate, .plate.wide { grid-template-columns: 1fr; gap: 26px; }
  .mount { position: relative; top: 0; }
  .filters { grid-template-columns: 1fr; }
  .filters .search { grid-row: auto; }
  .life { grid-column: auto; }
  .specimen-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  header { flex-wrap: wrap; align-content: center; gap: 0 12px; height: auto; min-height: 80px; padding: 10px 0; }
  .masthead .brand img { height: 26px; }
  nav { width: 100%; gap: 0 16px; }
  .page-head { padding: 34px 0 18px; }
  .lede { font-size: 18px; }
  .index { grid-template-columns: 1fr; }
  .filter { grid-template-columns: 1fr; gap: 6px; }
  .label div { grid-template-columns: 1fr; gap: 2px; }
  .matrix th, .matrix td { padding: 8px 3px; font-size: 13px; }
  .matrix thead th { font-size: 10px; }
  .matrix a { min-width: 24px; }
  footer { grid-template-columns: 1fr; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
