:root {
  --paper: #eef0ea;
  --paper-deep: #e2e6dd;
  --ink: #1f2a33;
  --graphite: #56616a;
  --rule: #c3cabf;
  --moss: #3e6b4f;
  --rust: #a24a33;
  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --measure: 40rem;
  --wide: 66rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.125rem/1.65 var(--serif);
  font-feature-settings: "kern", "liga", "onum";
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--moss); }
:focus-visible { outline: 2px solid var(--moss); outline-offset: 3px; border-radius: 2px; }
code, .ua { font-family: var(--mono); font-size: 0.86em; }
code { background: var(--paper-deep); padding: 0.08em 0.3em; border-radius: 3px; }
pre { margin: 0; }

.skip { position: absolute; left: -999px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { left: 1rem; top: 1rem; background: var(--ink); color: var(--paper); padding: 0.5rem 0.8rem; }

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 1.5rem; }
.prose { max-width: var(--measure); }

/* Header */
.site-head { padding: 1.6rem 0 0; }
.site-head .wrap { display: flex; align-items: baseline; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.wordmark { display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none; font-style: italic; font-weight: 500; font-size: 1.45rem; letter-spacing: -0.01em; }
.wordmark svg { width: 1.6rem; height: 1.6rem; position: relative; top: 0.12rem; }
.site-nav { display: flex; gap: 1.4rem; font-size: 1rem; }
.site-nav a { text-decoration: none; color: var(--graphite); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; }

main { padding-bottom: 5rem; }

/* Type */
h1, h2, h3 { font-weight: 400; line-height: 1.15; letter-spacing: -0.012em; margin: 0; }
h1 { font-size: clamp(2.3rem, 5.4vw, 3.9rem); font-weight: 300; letter-spacing: -0.022em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 300; }
h3 { font-size: 1.25rem; font-weight: 500; }
p { margin: 0 0 1em; }
.lede { font-size: 1.3rem; line-height: 1.55; color: var(--ink); max-width: 36rem; }
.quiet { color: var(--graphite); }
.small { font-size: 0.95rem; }
.species { font-style: italic; }

section { margin-top: 5.5rem; }
section > h2 { margin-bottom: 1.1rem; }

/* Hero */
.hero { padding-top: 4.5rem; }
.hero h1 { max-width: 17ch; margin-bottom: 1.6rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.4rem; margin-top: 2rem; }
.button { display: inline-block; background: var(--ink); color: var(--paper); text-decoration: none; padding: 0.7rem 1.25rem; border-radius: 4px; font-size: 1.05rem; }
.button:hover { background: var(--moss); color: var(--paper); }

/* Tally: the one bold element */
.tally { margin-top: 4.5rem; }
.tally-head { display: grid; gap: 0.6rem; max-width: var(--measure); margin-bottom: 1.6rem; }
.tally table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums lining-nums; }
.tally caption { text-align: left; caption-side: bottom; padding-top: 1rem; font-size: 0.95rem; color: var(--graphite); }
.tally th, .tally td { text-align: left; padding: 0.55rem 0.9rem 0.55rem 0; border-bottom: 1px solid var(--rule); vertical-align: baseline; }
.tally thead th { font-weight: 500; font-size: 0.95rem; color: var(--graphite); border-bottom-color: var(--ink); }
.tally td.num, .tally th.num { text-align: right; white-space: nowrap; }
.tally .who { white-space: nowrap; font-weight: 400; }
.tally .who a, .guide-table th a { text-decoration: none; }
.tally .who a:hover, .guide-table th a:hover { text-decoration: underline; }
.guide-table tbody th { font-weight: 400; }
.tally .who .species { font-size: 1.12rem; }
.tally .op { color: var(--graphite); font-size: 0.95rem; }
.tally .kind { color: var(--graphite); font-size: 0.95rem; white-space: nowrap; }
.tally td.bar { width: 42%; padding-right: 0; }
.track { display: flex; height: 0.9rem; align-items: stretch; }
.seg { min-width: 2px; }
.seg-ok { background: var(--moss); }
.seg-unknown { background: repeating-linear-gradient(135deg, var(--ink) 0 1.5px, transparent 1.5px 5px); box-shadow: inset 0 0 0 1px var(--ink); }
.seg-fail { background: var(--rust); }
.legend { display: flex; flex-wrap: wrap; gap: 0.5rem 1.6rem; margin: 1.1rem 0 0; padding: 0; list-style: none; font-size: 0.95rem; color: var(--graphite); }
.legend li { display: inline-flex; align-items: center; gap: 0.5rem; }
.legend .seg { display: inline-block; width: 1.5rem; height: 0.8rem; }
.findings { margin-top: 2.4rem; display: grid; gap: 1.2rem 3rem; grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr)); max-width: 56rem; }
.findings p { margin: 0; }
.findings strong { font-weight: 500; }

/* Definition lists */
.defs { display: grid; grid-template-columns: minmax(9rem, 13rem) 1fr; gap: 0.9rem 2rem; margin: 0; max-width: 46rem; }
.defs dt { font-weight: 500; }
.defs dd { margin: 0; }
@media (max-width: 40rem) {
  .defs { grid-template-columns: 1fr; gap: 0.2rem; }
  .defs dd { margin-bottom: 0.9rem; }
  .tally .kind, .tally thead .kind { display: none; }
  .tally td.bar { width: 34%; }
}

/* Kinds of visitor */
.kinds { display: grid; gap: 2rem 2.4rem; grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr)); max-width: var(--wide); margin-top: 1.6rem; }
.kinds h3 { margin-bottom: 0.4rem; }
.kinds p { margin: 0 0 0.5rem; }
.kinds .eg { font-size: 0.95rem; color: var(--graphite); }

/* Code sample */
.code { background: var(--ink); color: #e6ebe4; border-radius: 6px; padding: 1.2rem 1.3rem; overflow-x: auto; font: 0.86rem/1.6 var(--mono); max-width: 46rem; margin-top: 1.6rem; }
.code code { background: none; padding: 0; border-radius: 0; color: inherit; font-size: inherit; }
.code .c { color: #9fb3a6; }
.code-note { font-size: 0.95rem; color: var(--graphite); margin-top: 0.7rem; max-width: 46rem; }

/* Founder and CTA */
.note { max-width: var(--measure); }
.cta { max-width: var(--measure); }

/* Field guide */
.page-head { padding-top: 3.8rem; max-width: var(--measure); }
.page-head h1 { margin-bottom: 1.2rem; }
.crumbs { font-size: 0.95rem; color: var(--graphite); margin-bottom: 1.4rem; }
.crumbs a { color: var(--graphite); }
.guide-table { width: 100%; min-width: 34rem; table-layout: fixed; border-collapse: collapse; margin-top: 1.2rem; font-variant-numeric: tabular-nums lining-nums; }
.guide-table th:nth-child(1) { width: 34%; }
.guide-table th:nth-child(2) { width: 20%; }
.guide-table th:nth-child(3) { width: 26%; }
.guide-table th, .guide-table td { text-align: left; padding: 0.6rem 1rem 0.6rem 0; border-bottom: 1px solid var(--rule); vertical-align: baseline; }
.guide-table thead th { font-weight: 500; font-size: 0.95rem; color: var(--graphite); border-bottom-color: var(--ink); }
.guide-table td.num, .guide-table th.num { text-align: right; padding-right: 0; }
.guide-table .species { font-size: 1.1rem; }
.kind-intro { max-width: var(--measure); color: var(--graphite); }
.table-scroll { overflow-x: auto; }

.entry-title { font-style: italic; font-weight: 400; }
.entry-sub { font-size: 1.3rem; color: var(--graphite); margin: 0.5rem 0 0; }
.entry { margin-top: 2.8rem; }
.sighting { margin-top: 3rem; padding-left: 1.2rem; border-left: 3px solid var(--moss); max-width: var(--measure); }
.sighting.fail { border-left-color: var(--rust); }
.sighting.none { border-left-color: var(--rule); }
.sighting.unknown { border-left-style: dashed; border-left-color: var(--ink); }
.sighting h2 { font-size: 1.25rem; font-weight: 500; margin-bottom: 0.4rem; }
.related { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; }

/* Articles */
.article { max-width: var(--measure); }
.article h2 { margin: 2.6rem 0 0.9rem; font-size: 1.6rem; }
.article h3 { margin: 1.8rem 0 0.6rem; }
.article ul, .article ol { padding-left: 1.2rem; }
.article li { margin-bottom: 0.45rem; }
.dates { font-size: 0.95rem; color: var(--graphite); margin-bottom: 2.2rem; }
.article table { border-collapse: collapse; width: 100%; margin: 1rem 0 1.4rem; font-size: 1rem; font-variant-numeric: tabular-nums lining-nums; }
.article tbody th { font-weight: 400; }
.article th, .article td { text-align: left; padding: 0.45rem 0.8rem 0.45rem 0; border-bottom: 1px solid var(--rule); vertical-align: baseline; }
.article .num { text-align: right; padding-right: 0; padding-left: 1rem; }
.article thead th { font-weight: 500; color: var(--graphite); border-bottom-color: var(--ink); }

.guides-list { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 2rem; max-width: var(--measure); }
.guides-list h2 { font-size: 1.5rem; margin-bottom: 0.4rem; }

/* Footer */
.site-foot { border-top: 1px solid var(--rule); padding: 2.2rem 0 3rem; font-size: 0.95rem; color: var(--graphite); }
.site-foot .wrap { display: grid; gap: 1rem; }
.site-foot ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; }
.site-foot a { color: var(--graphite); }
.site-foot p { margin: 0; max-width: 46rem; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print { .site-head nav, .actions, .site-foot ul { display: none; } body { background: #fff; } }
