/* Black and safety orange, one theme on purpose: this is a street campaign,
   not an app, and the trail-camera footage it opens on is black anyway.

   Big Shoulders was drawn for Chicago's own design system. Libre Franklin is
   a Franklin Gothic revival, the old American newspaper and signage face.
   Plex Mono is for anything that came out of a spreadsheet. */
:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --raise: #151515;
  --ink: #efede8;
  --ink-2: #b4b2ab;
  --muted: #85837c;
  --rule: #2b2b29;
  --orange: #ff6a13;
  --orange-soft: #ff8c4a;
  --bar: #3b3a37;
  --display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --body: "Libre Franklin", "Franklin Gothic Book", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.62 var(--body);
}
a { color: var(--orange-soft); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--orange); }
strong { font-weight: 600; color: var(--ink); }
.wrap { max-width: 46rem; margin: 0 auto; padding: 0 16px; }

/* Masthead */
header.site { border-bottom: 3px solid var(--orange); }
header.site .wrap {
  max-width: 64rem;
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 0.4rem 1.5rem; padding-top: 0.8rem; padding-bottom: 0.7rem;
}
.brand {
  font: 900 1.65rem/1 var(--display); text-transform: uppercase; letter-spacing: 0.01em;
  color: var(--ink); text-decoration: none;
}
.brand span { color: var(--orange); }
.brand:hover { color: var(--ink); }
nav.site { display: flex; flex-wrap: wrap; gap: 0.2rem 1.3rem; font-size: 0.95rem; }
nav.site a { color: var(--ink-2); text-decoration: none; padding-bottom: 2px; }
nav.site a:hover { color: var(--ink); }
nav.site a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--orange); }

/* Type */
main.wrap { padding-top: 2.5rem; padding-bottom: 4rem; }
h1, h2 { font-family: var(--display); font-weight: 800; line-height: 1.02; letter-spacing: -0.005em; }
h1 { font-size: clamp(2.5rem, 7vw, 4rem); margin: 0 0 1.1rem; }
h2 { font-size: 2rem; margin: 3.25rem 0 0.75rem; }
h3 { font-size: 1.1rem; font-weight: 700; margin: 1.75rem 0 0.35rem; }
.lede { font-size: 1.2rem; color: var(--ink-2); margin-top: 0; }
.small { font-size: 0.88rem; color: var(--ink-2); }
p.next { margin-top: 2.5rem; font: 700 1.5rem/1.2 var(--display); }
p.next a { color: var(--orange); text-decoration: none; }
p.next a:hover { text-decoration: underline; }

/* The big number */
.big {
  display: grid; grid-template-columns: auto 1fr; gap: 0.5rem 1.5rem; align-items: center;
  margin: 2.25rem 0; padding: 1.5rem 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.big .n { font: 900 clamp(5.5rem, 20vw, 10rem)/0.82 var(--display); color: var(--orange); letter-spacing: -0.02em; }
.big .t { font-size: 1.2rem; line-height: 1.45; margin: 0; }
@media (max-width: 560px) { .big { grid-template-columns: 1fr; } }

/* Supporting numbers: a ruled list, not tiles */
dl.figures { margin: 2rem 0; }
dl.figures > div {
  display: grid; grid-template-columns: 5.5rem 1fr; gap: 1.25rem; align-items: baseline;
  padding: 0.85rem 0; border-bottom: 1px solid var(--rule);
}
dl.figures > div:first-child { border-top: 1px solid var(--rule); }
dl.figures dt { font: 800 2.3rem/1 var(--display); color: var(--orange); text-align: right; white-space: nowrap; }
dl.figures dd { margin: 0; color: var(--ink-2); }
@media (max-width: 480px) {
  dl.figures > div { grid-template-columns: 1fr; gap: 0.2rem; }
  dl.figures dt { text-align: left; }
}

/* The four changes, with big hanging letters */
.change { position: relative; padding: 1.25rem 0 0.5rem 4.25rem; border-top: 1px solid var(--rule); margin-top: 1.5rem; }
.change .letter {
  position: absolute; left: 0; top: 0.95rem;
  font: 900 3.6rem/1 var(--display); color: var(--orange);
}
.change h3 { margin: 0 0 0.15rem; font-size: 1.3rem; }
.change .who { font: 0.8rem/1.4 var(--mono); color: var(--muted); margin: 0 0 0.6rem; }
.change .who.now { color: var(--orange-soft); }
@media (max-width: 480px) {
  .change { padding-left: 0; }
  .change .letter { position: static; display: block; font-size: 2.6rem; margin-bottom: 0.3rem; }
}

/* Numbered how-to */
ol.howto { list-style: none; counter-reset: step; padding: 0; margin: 1.5rem 0; }
ol.howto > li {
  counter-increment: step; position: relative;
  padding: 0.9rem 0 0.9rem 3.25rem; border-top: 1px solid var(--rule);
}
ol.howto > li::before {
  content: counter(step); position: absolute; left: 0; top: 0.55rem;
  font: 900 2.4rem/1 var(--display); color: var(--orange);
}
ol.howto ul { margin: 0.5rem 0; }
ol.plain > li { margin-bottom: 0.9rem; }
ul { padding-left: 1.2rem; }
li::marker { color: var(--muted); }

/* Pre-launch notes. Every one has to be gone before the domains go live. */
.draft {
  border: 1px dashed var(--orange); color: var(--orange-soft);
  font: 0.82rem/1.5 var(--mono); padding: 0.5rem 0.75rem; margin: 0.9rem 0;
}
.draft::before { content: "DRAFT: "; font-weight: 600; }

/* Charts */
figure.chart { margin: 2.25rem 0; padding: 1rem 0 0; border-top: 3px solid var(--ink); }
figure.chart figcaption { font-size: 0.9rem; color: var(--muted); margin-bottom: 0.75rem; }
figure.chart figcaption strong { display: block; color: var(--ink); font: 800 1.45rem/1.15 var(--display); margin-bottom: 0.2rem; }
.chart-svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-svg text { font: 11.5px var(--mono); fill: var(--muted); }
.chart-svg .lbl { fill: var(--orange-soft); font-weight: 600; font-size: 13px; }
.chart-svg .bar { fill: var(--bar); }
.chart-svg .bar.hi { fill: var(--orange); }
.chart-svg .hit { fill: transparent; cursor: default; }
.chart-svg .hit:hover + .bar, .chart-svg .hit:focus + .bar { opacity: 0.8; }
.chart-svg .grid { stroke: var(--rule); stroke-width: 1; }
.chart-svg .base { stroke: var(--ink-2); stroke-width: 1; }
.tip {
  position: fixed; pointer-events: none; z-index: 10;
  background: var(--ink); color: var(--bg);
  padding: 0.3rem 0.55rem; font: 0.8rem var(--mono); display: none; white-space: nowrap;
}
details.table { margin-top: 0.6rem; font-size: 0.88rem; }
details.table summary { cursor: pointer; color: var(--muted); }

/* Tables */
table { border-collapse: collapse; width: 100%; font-size: 0.92rem; margin: 0.75rem 0; }
th, td { text-align: left; padding: 0.45rem 0.5rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
thead th { font-weight: 600; color: var(--muted); font-size: 0.82rem; border-bottom: 1px solid var(--ink-2); }
td.n, th.n { text-align: right; font-family: var(--mono); font-size: 0.86rem; white-space: nowrap; }
.scroll { overflow-x: auto; }

code, pre { font: 0.84rem/1.55 var(--mono); }
pre { background: var(--raise); border-left: 3px solid var(--bar); padding: 0.75rem 0.9rem; overflow-x: auto; white-space: pre-wrap; word-break: break-word; }

/* Hero footage */
.hero-video { background: #000; }
.hero-video video {
  display: block; width: 100%; max-width: 56rem; margin: 0 auto;
  aspect-ratio: 426 / 344; max-height: 70vh; object-fit: contain; background: #000;
}
.hero-video p { color: var(--ink-2); font: 0.78rem/1.5 var(--mono); margin: 0 auto; padding-top: 0.6rem; padding-bottom: 0.8rem; }
.hero-video p span { color: var(--muted); }

footer.site { border-top: 1px solid var(--rule); padding: 1.75rem 0 3rem; font-size: 0.88rem; color: var(--muted); }
footer.site p { margin: 0.3rem 0; }
footer.site a { color: var(--ink-2); }
