/* The Zoo. One stylesheet, no scripts, no outside fonts.
   The page's security policy forbids inline styles, so bar lengths are set with the
   .w-N / .h-N classes that the renderer appends to this file.
   The chart colours were checked for contrast in both light and dark mode; if you change
   --series or --surface, check the pair again. */

:root {
  --page: #f9f9f9;
  --surface: #ffffff;
  --ink: #191919;
  --ink-2: #666666;
  --rule: #e7e7e7;
  --axis: #c2c2c2;
  --series: #257de0;
  --wash: rgba(0, 0, 0, 0.045);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #0b0b0b;
    --surface: #191919;
    --ink: #efefef;
    --ink-2: #9c9c9c;
    --rule: #303030;
    --axis: #474747;
    --series: #338ced;
    --wash: rgba(255, 255, 255, 0.07);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 1rem/1.5 var(--sans); }
a { color: inherit; text-decoration-color: var(--axis); text-underline-offset: 0.18em; }
a:hover { text-decoration-color: currentColor; }

.mast, main, footer { max-width: 50rem; margin: 0 auto; padding-left: 1.25rem; padding-right: 1.25rem; }

/* Masthead */
.mast { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-top: 1.4rem; padding-bottom: 0.9rem; }
.brand { font: 600 1.15rem/1.2 var(--serif); letter-spacing: 0.01em; text-decoration: none; }
.mast nav { display: flex; gap: 1.1rem; font-size: 0.85rem; }
.mast nav a { color: var(--ink-2); text-decoration: none; }
.mast nav a:hover { color: var(--ink); }

/* The day's entry */
main { padding-top: 2.2rem; padding-bottom: 1rem; border-top: 1px solid var(--rule); }
.eyebrow { margin: 0 0 0.6rem; font-size: 0.78rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ink-2); }
h1 { margin: 0 0 1.1rem; font: 600 2.15rem/1.14 var(--serif); letter-spacing: -0.012em; text-wrap: balance; }
h2 { margin: 2.8rem 0 0.3rem; font: 600 1.3rem/1.25 var(--serif); }
h3 { margin: 0; font: 600 0.95rem/1.3 var(--sans); }
.lede { margin: 0.2rem 0 1rem; color: var(--ink-2); font-size: 0.9rem; max-width: 40rem; }
.flag { margin: 0 0 1.2rem; padding: 0.55rem 0.8rem; border: 1px solid var(--rule); border-radius: 8px; background: var(--surface); font-size: 0.85rem; color: var(--ink-2); }
.notes p { margin: 0 0 1em; font: 1.14rem/1.62 var(--serif); max-width: 40rem; overflow-wrap: break-word; }
.byline { margin: 1.2rem 0 0; font-size: 0.8rem; color: var(--ink-2); }

/* Numbers of the day */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.6rem, 1fr)); gap: 0.75rem; margin: 1rem 0; }
.tile, .panel { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; }
.tile { padding: 0.85rem 1rem 0.9rem; }
.tile .k { margin: 0; font-size: 0.78rem; color: var(--ink-2); }
.tile .v { margin: 0.1rem 0 0.15rem; font: 600 1.95rem/1.15 var(--sans); letter-spacing: -0.015em; }
.tile .s { margin: 0; font-size: 0.78rem; line-height: 1.35; color: var(--ink-2); }

/* Charts: plain boxes sized by class, so they need neither scripts nor inline styles. */
.panel { padding: 1rem 1.2rem 0.8rem; margin: 0.75rem 0; min-width: 0; }
.panel .sub { margin: 0.15rem 0 0; font-size: 0.8rem; color: var(--ink-2); }
.cols { margin: 2.9rem 0.4rem 0 2.9rem; }
/* z-index 0 makes the plot its own layer, so the gridlines (z-index -1) sit behind the bars. */
.plot { position: relative; z-index: 0; display: flex; align-items: stretch; justify-content: space-between; height: 10rem; border-bottom: 1px solid var(--axis); }
.gridline { position: absolute; z-index: -1; left: 0; right: 0; border-top: 1px solid var(--rule); pointer-events: none; }
.tick { position: absolute; right: 100%; margin-right: 0.55rem; transform: translateY(50%); font-size: 0.72rem; line-height: 1; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.at-0 { bottom: 0; }
.at-20 { bottom: 20%; }
.at-25 { bottom: 25%; }
.at-33 { bottom: 33.333%; }
.at-40 { bottom: 40%; }
.at-50 { bottom: 50%; }
.at-60 { bottom: 60%; }
.at-67 { bottom: 66.667%; }
.at-75 { bottom: 75%; }
.at-80 { bottom: 80%; }
.at-100 { bottom: 100%; }
.col { flex: 1 1 0; min-width: 0; max-width: 26px; display: flex; align-items: flex-end; justify-content: center; text-decoration: none; }
.col:hover, .col:focus-visible { background: var(--wash); outline: none; }
.bar { position: relative; display: block; width: calc(100% - 2px); max-width: 24px; background: var(--series); border-radius: 4px 4px 0 0; }
.val { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: 3px; font-size: 0.72rem; font-weight: 600; line-height: 1; color: var(--ink); white-space: nowrap; }
/* The readout for the column under the pointer, in a band kept free above the plot. */
.tip { visibility: hidden; position: absolute; left: 0; bottom: 100%; margin-bottom: 1.35rem; font-size: 0.8rem; line-height: 1; color: var(--ink); white-space: nowrap; }
.col:hover .tip, .col:focus-visible .tip { visibility: visible; }
.xaxis { display: flex; justify-content: space-between; height: 1.5rem; padding-top: 0.4rem; }
.xaxis span { flex: 1 1 0; min-width: 0; max-width: 26px; position: relative; }
.xaxis b { position: absolute; left: 50%; transform: translateX(-50%); font-size: 0.72rem; font-weight: 400; line-height: 1; color: var(--ink-2); white-space: nowrap; }
details { margin-top: 0.5rem; font-size: 0.8rem; }
summary { cursor: pointer; color: var(--ink-2); width: fit-content; }
summary:hover { color: var(--ink); }

/* Tables: the ranked lists are tables whose second column is a bar. */
table { width: 100%; border-collapse: collapse; font-size: 0.85rem; line-height: 1.3; }
th, td { padding: 0.3rem 0; text-align: left; vertical-align: middle; font-weight: 400; }
thead th, thead td { font-size: 0.72rem; color: var(--ink-2); border-bottom: 1px solid var(--rule); padding-bottom: 0.35rem; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dim { color: var(--ink-2); }
.ranked { table-layout: fixed; margin-top: 0.7rem; }
.ranked .c-label { width: 34%; }
.ranked .c-num { width: 4.1rem; }
.ranked.names .c-label { width: 50%; }
.ranked tbody th { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 0.7rem; }
.ranked tbody tr:hover { background: var(--wash); }
.fill { display: block; height: 0.62rem; min-width: 2px; background: var(--series); border-radius: 0 4px 4px 0; }
.twin table { max-width: 24rem; margin-top: 0.4rem; }
.twin td, .twin th { padding: 0.18rem 0; }
.pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(17.5rem, 1fr)); gap: 0.75rem; }
.pair .panel { margin: 0; }
.mono, .steps, .odd dt { font-family: var(--mono); font-size: 0.92em; }

/* Species */
.cards { list-style: none; margin: 1rem 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(17.5rem, 1fr)); gap: 0.75rem; }
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 0.9rem 1.1rem 0.85rem; min-width: 0; }
.card:target { border-color: var(--ink-2); }
.kind { margin: 0 0 0.3rem; font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.card h3 { font: 600 1.12rem/1.25 var(--serif); }
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.blurb { margin: 0.35rem 0 0.5rem; font-size: 0.9rem; overflow-wrap: anywhere; }
.meta { margin: 0; font-size: 0.78rem; color: var(--ink-2); }
.steps { margin: 0.5rem 0 0.3rem; padding-left: 1.6rem; color: var(--ink); overflow-wrap: anywhere; }
.steps li { margin: 0.12rem 0; }
.fine { font-size: 0.78rem; color: var(--ink-2); margin: 0.3rem 0 0; }

/* Oddities */
.odd { margin: 1rem 0; display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr); gap: 0.5rem 1.2rem; align-items: baseline; }
.odd dt { padding: 0.08rem 0.4rem; border: 1px solid var(--rule); border-radius: 5px; background: var(--surface); overflow-wrap: anywhere; }
.odd dd { margin: 0; font-size: 0.92rem; }

/* Earlier days, paging, footer */
.archive { list-style: none; margin: 0.8rem 0; padding: 0; columns: 3 11rem; column-gap: 1.5rem; font-size: 0.88rem; }
.archive li { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.16rem 0; break-inside: avoid; }
.pager { display: flex; justify-content: space-between; gap: 1rem; margin: 2.6rem 0 0.5rem; font-size: 0.88rem; }
footer { margin-top: 3rem; padding-top: 0.4rem; padding-bottom: 3rem; border-top: 1px solid var(--rule); }
footer h2 { margin-top: 1.6rem; font-size: 1.05rem; }
footer p { margin: 0.6rem 0; font-size: 0.86rem; color: var(--ink-2); max-width: 40rem; }

@media (max-width: 30rem) {
  h1 { font-size: 1.7rem; }
  .notes p { font-size: 1.06rem; }
  .cols { margin-left: 2.5rem; }
  .odd { grid-template-columns: 1fr; gap: 0.2rem; }
  .odd dd { margin-bottom: 0.6rem; }
  .odd dt { width: fit-content; max-width: 100%; }
}

/* Bar sizes, added by the renderer. */
.w-0{width:0%}.h-0{height:0%}
.w-1{width:1%}.h-1{height:1%}
.w-2{width:2%}.h-2{height:2%}
.w-3{width:3%}.h-3{height:3%}
.w-4{width:4%}.h-4{height:4%}
.w-5{width:5%}.h-5{height:5%}
.w-6{width:6%}.h-6{height:6%}
.w-7{width:7%}.h-7{height:7%}
.w-8{width:8%}.h-8{height:8%}
.w-9{width:9%}.h-9{height:9%}
.w-10{width:10%}.h-10{height:10%}
.w-11{width:11%}.h-11{height:11%}
.w-12{width:12%}.h-12{height:12%}
.w-13{width:13%}.h-13{height:13%}
.w-14{width:14%}.h-14{height:14%}
.w-15{width:15%}.h-15{height:15%}
.w-16{width:16%}.h-16{height:16%}
.w-17{width:17%}.h-17{height:17%}
.w-18{width:18%}.h-18{height:18%}
.w-19{width:19%}.h-19{height:19%}
.w-20{width:20%}.h-20{height:20%}
.w-21{width:21%}.h-21{height:21%}
.w-22{width:22%}.h-22{height:22%}
.w-23{width:23%}.h-23{height:23%}
.w-24{width:24%}.h-24{height:24%}
.w-25{width:25%}.h-25{height:25%}
.w-26{width:26%}.h-26{height:26%}
.w-27{width:27%}.h-27{height:27%}
.w-28{width:28%}.h-28{height:28%}
.w-29{width:29%}.h-29{height:29%}
.w-30{width:30%}.h-30{height:30%}
.w-31{width:31%}.h-31{height:31%}
.w-32{width:32%}.h-32{height:32%}
.w-33{width:33%}.h-33{height:33%}
.w-34{width:34%}.h-34{height:34%}
.w-35{width:35%}.h-35{height:35%}
.w-36{width:36%}.h-36{height:36%}
.w-37{width:37%}.h-37{height:37%}
.w-38{width:38%}.h-38{height:38%}
.w-39{width:39%}.h-39{height:39%}
.w-40{width:40%}.h-40{height:40%}
.w-41{width:41%}.h-41{height:41%}
.w-42{width:42%}.h-42{height:42%}
.w-43{width:43%}.h-43{height:43%}
.w-44{width:44%}.h-44{height:44%}
.w-45{width:45%}.h-45{height:45%}
.w-46{width:46%}.h-46{height:46%}
.w-47{width:47%}.h-47{height:47%}
.w-48{width:48%}.h-48{height:48%}
.w-49{width:49%}.h-49{height:49%}
.w-50{width:50%}.h-50{height:50%}
.w-51{width:51%}.h-51{height:51%}
.w-52{width:52%}.h-52{height:52%}
.w-53{width:53%}.h-53{height:53%}
.w-54{width:54%}.h-54{height:54%}
.w-55{width:55%}.h-55{height:55%}
.w-56{width:56%}.h-56{height:56%}
.w-57{width:57%}.h-57{height:57%}
.w-58{width:58%}.h-58{height:58%}
.w-59{width:59%}.h-59{height:59%}
.w-60{width:60%}.h-60{height:60%}
.w-61{width:61%}.h-61{height:61%}
.w-62{width:62%}.h-62{height:62%}
.w-63{width:63%}.h-63{height:63%}
.w-64{width:64%}.h-64{height:64%}
.w-65{width:65%}.h-65{height:65%}
.w-66{width:66%}.h-66{height:66%}
.w-67{width:67%}.h-67{height:67%}
.w-68{width:68%}.h-68{height:68%}
.w-69{width:69%}.h-69{height:69%}
.w-70{width:70%}.h-70{height:70%}
.w-71{width:71%}.h-71{height:71%}
.w-72{width:72%}.h-72{height:72%}
.w-73{width:73%}.h-73{height:73%}
.w-74{width:74%}.h-74{height:74%}
.w-75{width:75%}.h-75{height:75%}
.w-76{width:76%}.h-76{height:76%}
.w-77{width:77%}.h-77{height:77%}
.w-78{width:78%}.h-78{height:78%}
.w-79{width:79%}.h-79{height:79%}
.w-80{width:80%}.h-80{height:80%}
.w-81{width:81%}.h-81{height:81%}
.w-82{width:82%}.h-82{height:82%}
.w-83{width:83%}.h-83{height:83%}
.w-84{width:84%}.h-84{height:84%}
.w-85{width:85%}.h-85{height:85%}
.w-86{width:86%}.h-86{height:86%}
.w-87{width:87%}.h-87{height:87%}
.w-88{width:88%}.h-88{height:88%}
.w-89{width:89%}.h-89{height:89%}
.w-90{width:90%}.h-90{height:90%}
.w-91{width:91%}.h-91{height:91%}
.w-92{width:92%}.h-92{height:92%}
.w-93{width:93%}.h-93{height:93%}
.w-94{width:94%}.h-94{height:94%}
.w-95{width:95%}.h-95{height:95%}
.w-96{width:96%}.h-96{height:96%}
.w-97{width:97%}.h-97{height:97%}
.w-98{width:98%}.h-98{height:98%}
.w-99{width:99%}.h-99{height:99%}
.w-100{width:100%}.h-100{height:100%}
