@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("/fonts/atkinson-hyperlegible-next-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #eef1f5;
  --ink: #1c2536;
  --muted: #4b566b;
  --rule: #c9d1dd;
  --tread: #dbe2eb;
  --link: #2b4c9b;
  --bar: #1c2536;
  --bar-text: #f1f4f8;
  --daylight: #f5c542;

  --measure: 40rem;
  --gutter: 16px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #141a25;
    --ink: #e4e9f0;
    --muted: #a7b1c3;
    --rule: #2e3849;
    --tread: #1f2838;
    --link: #a3b8f2;
    --bar: #253047;
    --bar-text: #eef1f6;
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Atkinson Hyperlegible Next", system-ui, sans-serif;
  font-size: 1.125rem;
  line-height: 1.6;
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Crisis bar: first thing on every page */

.crisis {
  background: var(--bar);
  color: var(--bar-text);
}

.crisis p {
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0.8rem var(--gutter);
  font-size: 1rem;
  line-height: 1.5;
}

.crisis a {
  color: var(--daylight);
  font-weight: 700;
}

.crisis a:focus-visible {
  outline-color: var(--daylight);
}

/* Page frame */

.site-header,
main,
.site-footer {
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.site-header {
  padding-top: 2rem;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-weight: 700;
  font-size: 1.125rem;
}

main > section {
  margin-top: 4rem;
}

main > section:first-child {
  margin-top: 3.5rem;
}

h1,
h2 {
  margin: 0;
  line-height: 1.15;
}

h1 {
  max-width: 13ch;
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

p {
  margin: 0 0 1rem;
}

.lead {
  margin-top: 1.5rem;
  font-size: 1.25rem;
  line-height: 1.55;
}

.status {
  color: var(--muted);
}

/* Staircase of care levels */

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
  margin: 1.5rem 0 1.5rem;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--rule);
}

.steps li {
  padding: 0.6rem 0.75rem 0;
  background: var(--tread);
  border-top: 3px solid var(--ink);
  font-weight: 600;
  line-height: 1.3;
}

.steps li:nth-child(1) { height: 4.5rem; }
.steps li:nth-child(2) { height: 7rem; }
.steps li:nth-child(3) { height: 9.5rem; }
.steps li:nth-child(4) { height: 12rem; }

@media (max-width: 36rem) {
  .steps {
    grid-template-columns: 1fr;
    gap: 0.4rem;
    border-bottom: 0;
  }

  .steps li {
    height: auto !important;
    padding: 0.7rem 0.9rem;
    border-top: 0;
    border-left: 3px solid var(--ink);
  }

  .steps li:nth-child(1) { width: 62%; }
  .steps li:nth-child(2) { width: 74%; }
  .steps li:nth-child(3) { width: 87%; }
  .steps li:nth-child(4) { width: 100%; }
}

/* Commitments */

.commitments {
  margin: 0;
}

.commitments > div {
  display: grid;
  grid-template-columns: 12rem 1fr;
  gap: 0 1.5rem;
  padding: 1rem 0;
  border-top: 1px solid var(--rule);
}

.commitments > div:last-child {
  border-bottom: 1px solid var(--rule);
}

.commitments dt {
  font-weight: 700;
}

.commitments dd {
  margin: 0;
}

@media (max-width: 36rem) {
  .commitments > div {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}

/* Footer */

.site-footer {
  margin-top: 5rem;
  padding-top: 1.5rem;
  padding-bottom: 3rem;
  color: var(--muted);
  font-size: 1rem;
}

.site-footer p {
  margin: 0 0 0.35rem;
}
