:root {
  color-scheme: light;
  --paper: #faf7f1;
  --ink: #202a39;
  --muted: #566173;
  --line: #e4dfd5;
  --white: #fffefa;
  --accent: #a53d2a;
  --display: Fraunces, Georgia, serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.65 "DM Sans", system-ui, sans-serif; }
.shell { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
a { color: var(--accent); text-underline-offset: .2em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid #758bb2; outline-offset: 3px; border-radius: 3px; }
.skip-link { position: absolute; z-index: 1; top: 8px; left: 8px; padding: 8px 12px; background: var(--white); transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.brand { color: var(--ink); }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 9px; align-items: baseline; margin: 28px 0 32px; color: var(--muted); font-size: 13px; }
h1, h2, h3, caption { font-family: var(--display); font-weight: 500; line-height: 1.13; }
h1 { margin: 0; font-size: clamp(38px, 6vw, 72px); letter-spacing: -.055em; }
h2 { margin: 0 0 12px; font-size: clamp(26px, 3.4vw, 37px); letter-spacing: -.035em; }
h3 { margin: 0 0 10px; font-size: 28px; }
.intro { max-width: 68ch; margin: 16px 0 26px; color: var(--muted); font-size: 17px; }
.group-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.group-link { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 14px; padding: 15px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); text-decoration: none; }
.group-link:hover { border-color: var(--accent); }
.group-link strong { font: 500 24px/1.3 var(--display); }
.group-link span { color: var(--muted); font-size: 13px; }
.directory-section { margin: 36px 0; padding-top: 24px; border-top: 1px solid var(--line); }
.directory-section section + section { margin-top: 24px; }
.letters, .contents { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 26px; }
.letters a, .contents a { display: inline-flex; align-items: center; min-height: 40px; min-width: 40px; justify-content: center; padding: 4px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); font-size: 14px; }
.species-list { margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 24px; list-style: none; }
.species-list li { border-bottom: 1px solid var(--line); padding: 8px 0; overflow-wrap: anywhere; }
.species-list i { display: block; color: var(--muted); font-size: 13px; }
.species-hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.field-photo { margin: 0; padding: 10px; border: 1px solid var(--line); border-radius: 18px; background: var(--white); }
.field-photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; border-radius: 10px; background: #f0eee8; }
.field-photo figcaption { padding: 10px 4px 3px; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.facts { width: 100%; border-collapse: collapse; background: var(--white); font-size: 15px; }
.facts caption { text-align: left; background: var(--paper); padding: 0 0 12px; font-size: 28px; }
.facts th, .facts td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.facts th { width: 35%; font-weight: 600; }
.contents { margin-top: 24px; }
.reading { max-width: 72ch; }
.reading section { margin: 26px 0; padding-top: 22px; border-top: 1px solid var(--line); scroll-margin-top: 16px; }
.reading p { margin: 0 0 12px; }
.reading li + li { margin-top: 6px; }
.reading ol, .reading ul { padding-inline-start: 23px; }
.reading details { border-bottom: 1px solid var(--line); }
.reading details:last-of-type { margin-bottom: 12px; }
.reading summary { cursor: pointer; font-weight: 600; padding: 10px 2px; }
.directory-footer { border-top: 1px solid var(--line); margin-top: 48px; padding: 20px 0 32px; font-size: 14px; }
.directory-footer .shell, .directory-footer nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 18px; }
@media (max-width: 760px) {
  .species-hero { grid-template-columns: 1fr; }
  .group-links, .species-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .shell { width: calc(100% - 32px); }
  .breadcrumbs { margin: 16px 0 18px; }
  .intro { font-size: 16px; margin-bottom: 20px; }
  .field-photo img { aspect-ratio: 16 / 10; }
  .group-link { padding: 12px; }
  .group-link strong { font-size: 20px; }
  .facts th, .facts td { padding: 8px; }
  .species-list { column-gap: 14px; }
}
