:root {
  --bg: #f7f3eb;
  --text: #111111;
  --muted: #4b5563;
  --line: #d9d2c8;
  --accent: #b23a2a;
  --link: #1459d9;
  --code-bg: #f1ece4;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration-color: rgba(17, 17, 17, 0.2);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

a:hover {
  text-decoration-color: var(--link);
}

.site-shell {
  width: min(860px, calc(100vw - 32px));
  margin: 26px auto 60px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-bottom: 22px;
}

.site-title {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 18px;
}

.site-nav a {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.site-nav a:hover,
.site-title:hover {
  color: var(--text);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
}

h1 {
  font-size: clamp(42px, 6vw, 58px);
  margin-bottom: 14px;
}

h2 {
  font-size: 28px;
}

h3 {
  font-size: 32px;
}

p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.6;
}

.simple-home {
  margin-top: 0;
}

.single-story {
  max-width: 44rem;
}

.single-story .lead-head {
  margin-bottom: 10px;
}

.simple-note {
  max-width: 44rem;
}

.simple-note p {
  margin-bottom: 0;
  font-size: 16px;
  line-height: 1.55;
}

.simple-about {
  max-width: 44rem;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(240px, 0.9fr);
  gap: 38px;
  align-items: start;
}

.hero-copy-block .dek {
  max-width: 26em;
}

.hero-rail {
  display: grid;
  gap: 14px;
}

.rail-module {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.rail-label,
.module-title {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.rail-copy {
  font-size: 16px;
  line-height: 1.55;
}

.topic-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.topic-list li {
  padding: 9px 0;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-size: 16px;
  line-height: 1.4;
}

.topic-list li:first-child {
  border-top: 0;
  padding-top: 0;
}

.kicker,
.story-kicker {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.dek,
.story-dek {
  color: var(--text);
  font-size: 23px;
  line-height: 1.5;
  max-width: 32em;
}

.meta,
.story-row-date {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.section {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.section-head {
  margin-bottom: 14px;
}

.front-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.9fr);
  gap: 38px;
  align-items: start;
}

.lead-story {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.lead-story h3 {
  font-size: 44px;
  margin-bottom: 12px;
}

.lead-story-feature {
  padding-bottom: 0;
  border-bottom: 0;
}

.lead-head {
  margin-bottom: 12px;
  font-size: clamp(46px, 6vw, 64px);
}

.lead-head a {
  text-decoration: none;
}

.lead-story h3 a,
.story-row h3 a {
  text-decoration: none;
}

.read-more {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.read-more a {
  color: var(--text);
  text-decoration: none;
}

.front-grid-side {
  min-width: 0;
}

.side-module {
  padding-top: 2px;
}

.compact-story {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.compact-story:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.compact-story h3 {
  margin-bottom: 6px;
  font-size: 31px;
}

.compact-story h3 a {
  text-decoration: none;
}

.compact-story .story-kicker {
  margin-bottom: 8px;
}

.compact-story p:last-child {
  margin-bottom: 0;
}

.story-list {
  margin-top: 2px;
}

.story-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.story-row:last-child {
  border-bottom: 0;
}

.story-row-date {
  padding-top: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.story-row h3 {
  margin-bottom: 6px;
}

.project-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: 38px;
  align-items: start;
}

.project-copy h2 {
  margin-bottom: 12px;
  font-size: 42px;
}

.project-copy p {
  max-width: 31em;
}

.chart-module {
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
}

.chart-module h3 {
  margin-bottom: 6px;
  font-size: 34px;
}

.chart-dek {
  margin-bottom: 16px;
  font-size: 16px;
  line-height: 1.45;
}

.chart-rows {
  display: grid;
  gap: 18px;
  margin: 0 0 16px;
}

.chart-row {
  display: grid;
  gap: 8px;
}

.chart-row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.bar-label {
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
}

.bar-value {
  color: var(--accent);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}

.bar-track {
  height: 16px;
  border-radius: 999px;
  background: #e7e2da;
  overflow: hidden;
}

.bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.92fr);
  gap: 38px;
  align-items: start;
}

.about-side {
  padding-top: 2px;
}

.article-page {
  margin-top: 0;
}

.article-header {
  margin-top: 0;
}

.article-section {
  max-width: 100%;
}

.article-section p,
.article-header .dek {
  max-width: 38em;
}

.return-link {
  margin-top: 4px;
}

.return-link a {
  color: var(--text);
}

figure {
  margin: 24px 0 18px;
}

.viz {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--line);
  padding: 8px;
}

.viz img {
  display: block;
  width: 100%;
  height: auto;
}

code {
  background: var(--code-bg);
  padding: 1px 6px;
  border-radius: 2px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.95em;
}

@media (max-width: 980px) {
  .site-shell {
    width: min(100vw - 24px, 860px);
    margin-top: 16px;
  }

  h1 {
    font-size: 40px;
  }

  .home-hero,
  .front-grid,
  .project-band,
  .about-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .lead-story h3 {
    font-size: 38px;
  }

  .lead-head {
    font-size: 44px;
  }

  .project-copy h2 {
    font-size: 36px;
  }

  p {
    font-size: 18px;
  }

  .dek,
  .story-dek {
    font-size: 21px;
  }
}

@media (max-width: 720px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    flex-wrap: wrap;
  }

  .story-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .compact-story h3,
  .chart-module h3 {
    font-size: 28px;
  }

  .lead-head,
  .project-copy h2 {
    font-size: 34px;
  }

  .chart-row-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
}
