html {
  background: #f7f7f4;
}

body {
  margin: 0 auto;
  max-width: 880px;
  padding: 48px 24px 72px;
  color: #1f2933;
  background: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
}

h1,
h2,
h3 {
  color: #111827;
  line-height: 1.25;
}

h1 {
  margin-top: 0;
  font-size: 2.1rem;
}

h2 {
  margin-top: 2.4rem;
  padding-top: 0.35rem;
  border-top: 1px solid #e5e7eb;
  font-size: 1.45rem;
}

h3 {
  margin-top: 1.8rem;
  font-size: 1.15rem;
}

p {
  margin: 1rem 0;
}

blockquote {
  margin: 1.4rem 0;
  padding: 0.8rem 1rem;
  border-left: 4px solid #b45309;
  background: #fffbeb;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.5rem auto 0.75rem;
}

/*
 * The plots were exported with different canvas and font-size ratios. Keeping
 * every bitmap at the same width therefore makes their embedded axis labels
 * look inconsistent. These calibrated widths normalize the apparent axis-label
 * size while still allowing every figure to shrink on narrow screens.
 */
figure img[src$="fig_phase_map.png"] {
  width: min(680px, 100%);
}

figure img[src$="homo_demo.png"] {
  width: min(500px, 100%);
}

figure img[src$="fig_congestion_comparative_statics.png"],
figure img[src$="fig_empirical_validation.png"] {
  width: min(880px, 100%);
}

figure img[src$="hetero_R_grad_p10.png"] {
  width: min(450px, 100%);
}

ul {
  padding-left: 1.35rem;
}

li {
  margin: 0.55rem 0;
}

pre,
code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

pre {
  overflow-x: auto;
  padding: 1rem;
  background: #f3f4f6;
  border-radius: 8px;
}

a {
  color: #2563eb;
}

.math {
  overflow-x: auto;
}

@media (max-width: 640px) {
  body {
    padding: 28px 16px 56px;
    font-size: 16px;
  }

  h1 {
    font-size: 1.65rem;
  }
}
