/* Scatterize — static document pages (about.html).
   Shared tokens, fonts, and link styles live in base.css, linked before this
   file in about.html (no @import — it serializes CSS and font loading);
   this file only handles document layout and reading typography. */

html {
    font-size: 130%;
}

body {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

/* ─── Masthead ──────────────────────────────────────────────────────────── */

header {
  padding: 0.75rem 1.125rem;
  border-bottom: 1px solid var(--color-border);

  & p {
    margin: 0;
    font-size: 1rem;
    font-weight: normal;
  }

  & a {
    color: var(--color-text-muted);
    text-decoration: none;

    &:hover {
      color: var(--color-text);
      text-decoration: underline;
    }
  }
}

/* ─── Document body ─────────────────────────────────────────────────────── */

main {
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
 /*
 Set horiz padding in px -- mobile screens should have content go
 quite near the edge and that should not scale with font size
 */
  padding: 2.5rem 12px 4rem;
  line-height: 1.6;
}

main h1 {
  font-size: 1.875rem;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 1rem;
}

main section {
  margin-top: 2.5rem;
}

main h2 {
  font-size: 1.2rem;
  font-weight: normal;
  line-height: 1.3;
  margin: 0 0 0.5rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--color-border);
}

main p {
  margin: 0.75rem 0;
}

main ul {
  margin: 0.75rem 0;
  padding-left: 1.4rem;

  & li {
    margin: 0.25rem 0;
  }
}

/* ─── Figures ───────────────────────────────────────────────────────────── */

main figure {
  margin: 1.5rem 0;
}

main figure a {
  display: block;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--color-surface);

  &:hover {
    border-color: var(--color-accent);
  }
}

main figure img {
  display: block;
  width: 100%;
  height: auto;
}

/* Datasaurus grid: 3 columns of the remaining twelve plots. */
main figure div {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

main figcaption {
  margin-top: 0.5rem;
  font-size: 0.857rem;
  color: var(--color-text-muted);
  text-align: center;
}

/* ─── Footer ────────────────────────────────────────────────────────────── */

footer {
  padding: 0.625rem 1.125rem;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}

footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

footer li:not(:last-child)::after {
  content: "·";
  color: var(--color-border-mid);
  margin: 0 0.375rem;
}

footer a {
  font-size: 0.929rem;
  color: var(--color-text-muted);
  text-decoration: none;

  &:hover {
    color: var(--color-text);
    text-decoration: underline;
  }
}

/* ─── Small screens ─────────────────────────────────────────────────────── */

@media (max-width: 600px) {
  main {
    padding: 1.75rem 1rem 3rem;
  }

  main h1 {
    font-size: 1.714rem;
  }

  main figure div {
    grid-template-columns: repeat(2, 1fr);
  }
}
