@font-face {
  font-family: "Atkinson Next";
  src: url("fonts/atkinson-hyperlegible-next-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Next";
  src: url("fonts/atkinson-hyperlegible-next-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Next";
  src: url("fonts/atkinson-hyperlegible-next-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Mono";
  src: url("fonts/atkinson-hyperlegible-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Mono";
  src: url("fonts/atkinson-hyperlegible-mono-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

/* Plain zero: the Atkinson fonts only ship a slashed zero, which reads oddly to a lay reader.
   These faces come after the full ones, so they win for U+0030 alone. */
@font-face {
  font-family: "Atkinson Next";
  src: url("fonts/hanken-grotesk-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0030;
}
@font-face {
  font-family: "Atkinson Next";
  src: url("fonts/hanken-grotesk-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0030;
}
@font-face {
  font-family: "Atkinson Mono";
  src: url("fonts/dm-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0030;
}
@font-face {
  font-family: "Atkinson Mono";
  src: url("fonts/dm-mono-latin-500-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0030;
}

:root {
  color-scheme: light;
  --ground: #ecebe6;
  --surface: #f6f5f1;
  --ink: #1d1c1a;
  --ink-muted: #55524c;
  --accent: #234a3c;
  --on-accent: #f3f1ea;
  --rule: #c9c6be;
  --radius: 3px;
  --overhang: 32px;
  --column: 640px;
  --gutter: 20px;
  --font-text: "Atkinson Next", "Atkinson Hyperlegible", Verdana, sans-serif;
  --font-mono: "Atkinson Mono", ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 19px;
  line-height: 1.55;
}

.column {
  max-width: var(--column);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

h1, h2, h3 { line-height: 1.15; margin: 0; font-weight: 700; }
h1 { font-size: 48px; letter-spacing: -0.01em; }
h2 { font-size: 34px; letter-spacing: -0.005em; }
h3 { font-size: 24px; }
p { margin: 0 0 16px; }
strong { font-weight: 700; }

a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* Masthead */
.masthead { padding: 48px 0 24px; }
.masthead h1 { margin-bottom: 24px; }
.intro { font-size: 21px; }
.answer {
  background: var(--accent);
  color: var(--on-accent);
  border-radius: var(--radius);
  padding: 24px var(--gutter);
  margin: 24px calc(-1 * var(--gutter)) 0;
  font-size: 24px;
  line-height: 1.35;
}
.answer strong { font-weight: 700; }

/* Table of contents */
.toc { list-style: none; margin: 32px 0 0; padding: 0; border-top: 1px solid var(--rule); }
.toc li { border-bottom: 1px solid var(--rule); }
.toc a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 8px 0;
  text-decoration: none;
  font-size: 21px;
}
.toc a::after { content: "↓"; font-family: var(--font-mono); color: var(--ink-muted); }

/* Sections */
.section { padding: 64px 0 16px; }
.section > .column > h2 { margin-bottom: 16px; }
.lede { font-size: 21px; color: var(--ink); margin-bottom: 32px; }

/* Breed card */
.breed { margin: 48px 0 0; }
.breed h3 { font-size: 34px; margin: 0 0 4px; }
.breed .subline { color: var(--ink-muted); margin-bottom: 16px; }
.breed figure { margin: 0; position: relative; z-index: 1; }
.breed img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--rule);
}
.band {
  background: var(--accent);
  color: var(--on-accent);
  margin: calc(-1 * var(--overhang)) calc(-1 * var(--gutter)) 0;
  padding: calc(var(--overhang) + 16px) var(--gutter) 20px;
  font-family: var(--font-mono);
}
.band dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 19px; }
.band dt { color: #b9c7bf; }
.band dd { margin: 0; font-weight: 700; }
.breed .text { padding-top: 20px; }
.breed .text h4 { font-size: 19px; margin: 16px 0 4px; }
.breed .text p { margin: 0; }
.breed .text p + p { margin-top: 12px; }
.rank {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin-bottom: 8px;
}

/* Paths */
.path {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 24px var(--gutter);
  margin: 0 calc(-1 * var(--gutter)) 16px;
}
.path h3 { margin-bottom: 12px; }
.path h4 { font-size: 19px; margin: 16px 0 4px; }
.path ul { margin: 0; padding-left: 22px; }
.path li { margin-bottom: 6px; }

/* Lists */
.list { margin: 0 0 24px; padding-left: 22px; }
.list li { margin-bottom: 10px; }
.checklist { list-style: none; padding-left: 0; }
.checklist li { position: relative; padding-left: 36px; }
.checklist li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 7px;
  width: 18px;
  height: 18px;
  border: 2px solid var(--accent);
  border-radius: var(--radius);
}
.warn li::before { content: "!"; border: 0; width: auto; height: auto; top: 0; left: 6px; font-family: var(--font-mono); font-weight: 700; color: var(--ink); }

.box {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px var(--gutter);
  margin: 0 calc(-1 * var(--gutter)) 24px;
}
.box h3 { font-size: 21px; margin-bottom: 8px; }

/* Fact tables */
.facts { width: 100%; border-collapse: collapse; margin: 0 0 24px; border-top: 1px solid var(--rule); }
.facts tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.facts th, .facts td { display: block; text-align: left; padding: 0; }
.facts th { font-weight: 400; color: var(--ink-muted); font-size: 17px; }
.facts td { font-family: var(--font-mono); font-weight: 700; }

/* FAQ */
.faq { padding: 20px 0; border-bottom: 1px solid var(--rule); }
.faq h3 { font-size: 21px; margin-bottom: 8px; }
.faq p:last-child { margin-bottom: 0; }

/* Steps */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 20px 56px; min-height: 44px; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-weight: 700;
}

.back { margin: 32px 0 0; }
.back a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  color: var(--ink-muted);
  font-size: 17px;
}
.back a::after { content: " ↑"; font-family: var(--font-mono); margin-left: 6px; }

/* Colophon */
.colophon { padding: 64px 0 48px; color: var(--ink-muted); font-size: 15px; }
.colophon h2 { font-size: 19px; color: var(--ink); margin-bottom: 8px; }
.colophon ul { padding-left: 18px; margin: 0 0 16px; }
.colophon li { margin-bottom: 6px; overflow-wrap: anywhere; }
