@font-face {
  font-family: "Raleway";
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/raleway-latin.woff2") format("woff2");
}
:root {
  --background: #111111;
  --section: #1a1a1a;
  --text: #ffffff;
  --muted: #b5b5b5;
  --border: #3c3c3c;
  --font: "Raleway", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --heat: #f0803c;
  --space: #9db4ff;
  --economy: #6fcf97;
  --health: #f2a6c0;
  --habitat: #d6c36a;
  --tools: #d9d9d9;
  --tone: var(--text);
}
[data-subject="health"] { --tone: var(--health); }
[data-subject="heat"] { --tone: var(--heat); }
[data-subject="habitat"] { --tone: var(--habitat); }
[data-subject="economy"] { --tone: var(--economy); }
[data-subject="space"] { --tone: var(--space); }
[data-subject="tools"] { --tone: var(--tools); }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 48px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--text); outline-offset: 4px; }
.container { width: min(100%, 1200px); margin-inline: auto; padding-inline: 24px; }

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  padding: 8px 16px;
  background: var(--text);
  color: var(--background);
  font-weight: 600;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.site-header { padding: 24px 0; }
.wordmark { font-weight: 700; letter-spacing: 0.16em; text-decoration: none; }
.wordmark span { color: var(--muted); font-weight: 400; }

.intro { padding: 64px 0 48px; }
.intro h1 {
  font-size: clamp(36px, 7vw, 80px);
  line-height: 1.05;
  margin: 0 0 24px;
  max-width: 14ch;
  text-wrap: balance;
}
.intro p { font-size: 18px; color: var(--muted); max-width: 54ch; margin: 0; }

.ruler {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--background);
  border-block: 1px solid var(--border);
}
.ruler ol {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 12px 0;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 12px;
  white-space: nowrap;
}
.ruler a { text-decoration: none; color: var(--muted); }
.ruler a:hover { color: var(--text); }
.ruler a[aria-current="page"] {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.stop { border-bottom: 1px solid var(--border); padding: 64px 0; scroll-margin-top: 48px; }
.stop-grid { display: grid; grid-template-columns: 1fr; gap: 32px; }
.scale { font-family: var(--mono); margin: 0 0 24px; }
.scale strong {
  display: block;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
  font-weight: 400;
  color: var(--tone);
  font-variant-numeric: tabular-nums;
}
.scale span {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.stop h2 {
  font-size: clamp(30px, 5vw, 58px);
  line-height: 1.08;
  margin: 0;
  max-width: 16ch;
  text-wrap: balance;
}
.answer { border-left: 2px solid var(--tone); padding-left: 24px; align-self: end; }
.answer h3 { font-size: 20px; margin: 0 0 4px; }
.answer h3 a { text-underline-offset: 4px; }
.answer p { margin: 0 0 12px; color: var(--muted); max-width: 52ch; }
.figure { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; margin: 0 0 12px; }
.figure strong {
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--tone);
  white-space: nowrap;
}
.figure span { font-size: 14px; color: var(--muted); max-width: 22ch; line-height: 1.3; }
.answer-meta { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; }
.kind { letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.answer-meta a { font-weight: 600; text-underline-offset: 4px; }

.workbench { background: var(--section); border-bottom: 0; }

.project-page { padding: 48px 0 64px; }
.project-page h1 {
  font-size: clamp(32px, 6vw, 64px);
  line-height: 1.08;
  margin: 0 0 16px;
  max-width: 18ch;
  text-wrap: balance;
}
.project-name { margin: 0 0 40px; font-size: 20px; font-weight: 600; color: var(--muted); }
.project-page h2 { font-size: 24px; margin: 48px 0 16px; }
.project-page p,
.project-page li { max-width: 64ch; }
.project-page p { margin: 0 0 16px; }
.project-page ol { margin: 0; padding-left: 24px; }
.project-page ol li { margin-bottom: 8px; }
.project-page .kind { font-size: 13px; }

ul.figures {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 48px;
  list-style: none;
  margin: 0;
  padding: 0;
}
ul.figures li {
  flex: 1 1 200px;
  border-left: 2px solid var(--tone);
  padding-left: 16px;
}
ul.figures strong {
  display: block;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--tone);
}
ul.figures span {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.3;
  color: var(--muted);
}

.table-scroll { overflow-x: auto; }
.project-page table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  text-align: left;
}
.project-page th,
.project-page td {
  padding: 8px 16px 8px 0;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.project-page th { color: var(--muted); font-weight: 600; }
.project-page ul:not(.figures) { margin: 0; padding-left: 24px; }
.project-page ul:not(.figures) a { font-weight: 600; text-underline-offset: 4px; }

.pager {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 14px;
}
.pager a { text-underline-offset: 4px; }
.pager-cue {
  display: block;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.pager a[rel="next"] { margin-left: auto; text-align: right; }

.site-footer { padding: 32px 0; font-size: 13px; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.site-footer p { margin: 0; }
.social-links { display: flex; gap: 24px; }
.social-links a { color: var(--text); text-underline-offset: 4px; }

@media (max-width: 479px) {
  .project-page th,
  .project-page td { min-width: 144px; }
}

@media (min-width: 860px) {
  .stop { padding: 96px 0; }
  .stop-grid { grid-template-columns: 1fr 1fr; gap: 64px; }
  .project-page { padding: 64px 0 96px; }
}
