:root {
  --paper: #efe7d6;
  --paper-2: #e7dcc6;
  --ink: #1b1813;
  --ink-2: #5d5548;
  --rule: rgba(27, 24, 19, .18);
  --hot: #e5421f;
  --blue: #204f79;
  --green: #486b36;
  --neg: #1b1813;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --serif: "Newsreader", Georgia, serif;
  --display: "Bricolage Grotesque", Inter, system-ui, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.55;
}
a { color: var(--hot); text-underline-offset: .15em; }
.mast, .section, footer { padding-inline: clamp(1.25rem, 5vw, 5rem); }
.mast {
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-bottom: 1px solid var(--rule);
  background:
    radial-gradient(circle at 86% 12%, rgba(229,66,31,.08), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.24), transparent 45%);
}
.rule {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1180px;
  font-family: var(--mono);
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--ink-2);
  border-block: 1px solid var(--rule);
  padding: .7rem 0;
}
.rule span:first-child { color: var(--hot); font-weight: 600; }
h1 {
  max-width: 980px;
  margin: 2.2rem 0 0;
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -.055em;
  line-height: .88;
  font-size: clamp(4rem, 12vw, 10.5rem);
}
h1 span { color: var(--hot); }
.dek {
  margin: 1.3rem 0 .8rem;
  max-width: 720px;
  font-size: clamp(1.3rem, 3vw, 2.15rem);
  color: var(--ink-2);
}
.abstract {
  max-width: 980px;
  margin: 1rem 0 1.4rem;
  color: var(--ink-2);
  font-size: 1.02rem;
  border-left: 4px solid var(--hot);
  padding-left: 1rem;
}
nav { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1rem; }
nav a {
  font-family: var(--mono);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink);
  border: 1px solid var(--rule);
  padding: .48rem .65rem;
  text-decoration: none;
}
nav a:hover { background: var(--ink); color: var(--paper); }
.section {
  max-width: 1220px;
  margin: 0 auto;
  padding-block: clamp(3rem, 7vw, 5.5rem);
}
.section.alt {
  max-width: none;
  background: var(--paper-2);
  border-block: 1px solid var(--rule);
}
.section.alt > * { max-width: 1220px; margin-inline: auto; }
.section-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: baseline;
  margin-bottom: 1.4rem;
}
.section-head span {
  font-family: var(--mono);
  color: var(--hot);
  font-size: .78rem;
  letter-spacing: .12em;
}
h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2rem, 4.8vw, 4rem);
  line-height: .95;
  letter-spacing: -.04em;
}
.lead, .callout { max-width: 78ch; color: var(--ink-2); }
.callout {
  color: var(--ink);
  background: rgba(229,66,31,.08);
  border: 1px solid rgba(229,66,31,.25);
  padding: 1.1rem 1.2rem;
  margin-top: 1.3rem;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 1.6rem 0 2rem;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.stats div {
  background: var(--paper);
  padding: 1.1rem;
}
.stats span, figcaption, .note {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .68rem;
  color: var(--ink-2);
}
.stats b {
  display: block;
  margin-top: .5rem;
  font-family: var(--display);
  font-size: clamp(1.5rem, 3.2vw, 2.45rem);
  line-height: 1;
  letter-spacing: -.035em;
}
.stats small {
  display: block;
  margin-top: .45rem;
  font-family: var(--mono);
  font-size: .62rem;
  line-height: 1.35;
  color: var(--ink-2);
}
figure { margin: 2rem 0 3rem; }
figcaption { margin-bottom: .9rem; color: var(--ink); }
.scatter {
  position: relative;
  height: 560px;
  background:
    linear-gradient(90deg, var(--rule) 1px, transparent 1px) 0 0 / 20% 100%,
    linear-gradient(0deg, var(--rule) 1px, transparent 1px) 0 0 / 100% 20%,
    rgba(255,255,255,.28);
  border: 1px solid var(--rule);
}
.pt {
  position: absolute;
  width: 2.05rem;
  height: 2.05rem;
  transform: translate(-50%, 50%);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: .52rem;
  border: 2px solid var(--paper);
  box-shadow: 0 4px 14px rgba(27,24,19,.18);
}
.pt.acro { background: var(--hot); }
.pt.het { background: var(--blue); }
.axis {
  position: absolute;
  font-family: var(--mono);
  font-size: .68rem;
  color: var(--ink-2);
}
.axis.x { right: .8rem; bottom: .5rem; }
.axis.y { left: .8rem; top: .5rem; }
.bars, .density { display: grid; gap: .42rem; }
.barrow {
  display: grid;
  grid-template-columns: 4.2rem 1fr 1fr 9.5rem;
  gap: .7rem;
  align-items: center;
}
.barrow .name, .barrow .val, .density .name, .density .val {
  font-family: var(--mono);
  font-size: .74rem;
  color: var(--ink-2);
}
.barrow.head span {
  font-family: var(--mono);
  font-size: .64rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-2);
}
.val .neg { color: var(--neg); font-weight: 600; }
.track {
  height: .85rem;
  background: rgba(27,24,19,.08);
  position: relative;
  overflow: hidden;
}
.fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--x, 0);
  width: max(2px, var(--w));
  background: var(--blue);
}
.fill.hot { background: var(--hot); }
.fill.green { background: var(--green); }
/* losses (negative deltas): drawn leftward from the zero line, hatched */
.fill.neg {
  background: repeating-linear-gradient(135deg, var(--neg) 0 2px, transparent 2px 4px);
  box-shadow: inset 0 0 0 1px var(--neg);
}
.zero {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 1px;
  background: var(--ink);
}
.density-row {
  display: grid;
  grid-template-columns: 4.2rem 1fr 5.5rem;
  gap: .75rem;
  align-items: center;
}
.slope {
  height: 1.35rem;
  position: relative;
  border-bottom: 1px solid var(--rule);
}
.slope i {
  position: absolute;
  top: .45rem;
  left: var(--a);
  width: max(2px, calc(var(--b) - var(--a)));
  height: 3px;
  background: var(--hot);
}
.slope i.down {
  background: var(--blue);
  left: var(--b);
  width: max(2px, calc(var(--a) - var(--b)));
}
.slope:before, .slope:after {
  content: "";
  position: absolute;
  top: .28rem;
  width: .6rem;
  height: .6rem;
  border-radius: 50%;
  background: var(--ink);
}
.slope:before { left: var(--a); }
.slope:after { left: var(--b); background: var(--hot); }
.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 1.6rem 0;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.timeline div {
  background: var(--paper);
  padding: 1rem;
}
.timeline span {
  display: block;
  font-family: var(--mono);
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-2);
}
.timeline b {
  display: block;
  font-family: var(--display);
  font-size: 1.8rem;
  margin-top: .35rem;
}
pre {
  max-width: 980px;
  overflow: auto;
  background: var(--ink);
  color: #efe7d6;
  padding: 1rem;
  border-left: 5px solid var(--hot);
}
code { font-family: var(--mono); font-size: .84em; }
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.grid p {
  margin: 0;
  background: var(--paper-2);
  padding: 1.2rem;
}
.refs ol { max-width: 88ch; color: var(--ink-2); }
footer {
  background: var(--ink);
  color: #cec4b2;
  padding-block: 2rem;
  font-family: var(--mono);
  font-size: .78rem;
}
footer p { max-width: 1220px; margin: .35rem auto; }
footer a { color: var(--hot); }
body.data-error #figures::before {
  content: "data/compare.json could not be loaded, so the figures are empty. The numbers in the text are static copies of it.";
  display: block;
  max-width: 1220px;
  margin: 0 auto 1.5rem;
  padding: .9rem 1rem;
  border: 1px solid var(--hot);
  color: var(--hot);
  font-family: var(--mono);
  font-size: .78rem;
}
@media (max-width: 760px) {
  .rule { display: grid; }
  .stats, .timeline, .grid { grid-template-columns: 1fr; }
  .barrow { grid-template-columns: 3.2rem 1fr 1fr; }
  .barrow .val { display: none; }
  .scatter { height: 430px; }
}
