:root {
  --background: #15171a;
  --paper: #5d6269;
  --text: #e8e8e8;
  --muted: #aeb4bc;
  --line: #747a82;
  --accent: #ffffff;
  --accent-soft: #6c727a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

a {
  color: inherit;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-direction: column;
  width: min(820px, calc(100% - 40px));
  margin: 0 auto;
  padding: 42px 0 28px;
  text-align: center;
}

.brand {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.site-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.45;
}

.email-link {
  color: #1e90ff;
  font-size: 1.05rem;
  font-weight: 700;
}

.email-link:hover {
  color: #63b3ff;
}

.home-main,
.page-main {
  width: min(820px, calc(100% - 40px));
  margin: 0 auto;
}

.home-main {
  padding: 90px 0 120px;
}

.home-section {
  margin-bottom: 58px;
}

.home-section:last-child {
  margin-bottom: 0;
}

.home-section h2 {
  margin: 0 0 18px;
  font-size: 1.45rem;
  line-height: 1.2;
}

.intro {
  margin-bottom: 42px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2.35rem, 6vw, 4.25rem);
  line-height: 1.05;
}

.post-list {
  background: transparent;
}

.post-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 36px;
  align-items: baseline;
  padding: 24px 4px;
  text-decoration: none;
}

.post-row:hover .post-title {
  color: var(--muted);
}

.post-copy {
  display: grid;
  gap: 7px;
}

.post-title {
  font-size: clamp(1.12rem, 2.2vw, 1.45rem);
  font-weight: 400;
  line-height: 1.2;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.post-subtitle {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.45;
}

time {
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.2rem;
  font-weight: 400;
  white-space: nowrap;
}

.page-main {
  padding: 110px 0;
}

.content-page {
  max-width: 680px;
  margin: 0 auto;
  padding: 36px 0;
}

.content-page p:not(.eyebrow) {
  color: var(--text);
  font-size: 1.3rem;
  line-height: 1.72;
}

.content-page a {
  color: var(--text);
  font-weight: 700;
}

.blog-post {
  max-width: 680px;
}

.employment-note {
  margin: 16px 0 30px;
  color: var(--muted);
}

.graph-section {
  display: grid;
  gap: 34px;
  margin-top: 44px;
  width: min(158%, calc(100vw - 40px));
  margin-left: 50%;
  transform: translateX(-50%);
}

.graph-figure {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 18px;
  margin: 0;
  padding: 26px 0 32px;
  border-top: 1px solid var(--line);
  height: 452px;
}

.graph-figure-tall {
  height: 588px;
}

.graph-figure-large {
  height: 735px;
}

.graph-figure-square {
  aspect-ratio: 1 / 1;
  height: auto;
  min-height: 620px;
}

.graph-title {
  width: min(680px, 100%);
  margin: 0 auto;
  color: var(--text);
  font-size: 25px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.chart-frame {
  position: relative;
  min-width: 0;
  min-height: 0;
}

.copyable-label-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  color: var(--muted);
  font-family: Arial, Helvetica, sans-serif;
  pointer-events: none;
}

.copyable-axis-label {
  position: absolute;
  line-height: 1.15;
  pointer-events: auto;
  user-select: text;
}

.copyable-axis-label-y {
  overflow: hidden;
  font-size: 19px;
  text-align: right;
  text-overflow: ellipsis;
  transform: translateY(-50%);
  white-space: nowrap;
}

.copyable-axis-label-x {
  font-size: 14px;
  text-align: center;
  transform: translateX(-50%);
  white-space: nowrap;
}

.graph-copy {
  width: min(680px, 100%);
  margin: -6px auto 8px;
}

.graph-caption {
  width: min(680px, 100%);
  margin: -18px auto 8px;
  color: var(--muted);
  font-size: 1.05rem;
  font-style: italic;
  line-height: 1.5;
  text-align: center;
}

.chart-frame canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.graph-empty {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}

@media (max-width: 640px) {
  .site-header {
    width: min(100% - 28px, 820px);
    padding: 32px 0 24px;
  }

  .home-main,
  .page-main {
    width: min(100% - 28px, 820px);
  }

  .home-main {
    padding: 54px 0 88px;
  }

  .post-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 22px 0;
  }

  .content-page {
    max-width: none;
  }

  .graph-section {
    width: 100%;
    margin-left: 0;
    transform: none;
  }

  .graph-figure,
  .graph-figure-tall {
    height: 480px;
  }

  .graph-figure-large {
    height: 680px;
  }

  .graph-figure-square {
    aspect-ratio: auto;
    height: 520px;
    min-height: 0;
  }

  .copyable-axis-label-y {
    font-size: 14px;
  }

  .copyable-axis-label-x {
    font-size: 12px;
  }
}
