:root {
  --text: #1a1a1a;
  --muted: #4a4a4a;
  --background: #ffffff;
  --link: #0b4f9c;
  --rule: #d4d4d4;
  --space: 1rem;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family:
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    'Helvetica Neue',
    Arial,
    sans-serif;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

header,
main,
footer {
  max-width: 40rem;
  margin: 0 auto;
  padding: var(--space);
}

header {
  border-bottom: 1px solid var(--rule);
}

footer {
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9rem;
}

nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

nav a {
  display: inline-block;
  padding: 0.5rem 0;
  font-weight: 600;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

a:focus-visible {
  outline: 0.1875rem solid var(--link);
  outline-offset: 0.125rem;
}

h1 {
  margin: 0 0 var(--space);
  font-size: 1.75rem;
  line-height: 1.25;
}

h2 {
  margin: 2rem 0 0.5rem;
  font-size: 1.25rem;
  line-height: 1.3;
}

p {
  margin: 0 0 var(--space);
}

.updated {
  color: var(--muted);
  font-size: 0.9rem;
}

@media (min-width: 48rem) {
  h1 {
    font-size: 2.25rem;
  }

  header,
  main,
  footer {
    padding-inline: 1.5rem;
  }
}

@media print {
  :root {
    --text: #000000;
    --muted: #000000;
    --link: #000000;
  }

  body {
    font-size: 11pt;
    line-height: 1.4;
  }

  header,
  footer {
    display: none;
  }

  main {
    max-width: none;
    padding: 0;
  }

  h1 {
    font-size: 18pt;
    margin-bottom: 0.5rem;
  }

  h2 {
    margin-top: 1rem;
    font-size: 13pt;
  }

  h1,
  h2 {
    break-after: avoid;
    break-inside: avoid;
  }

  p {
    margin-bottom: 0.5rem;
    orphans: 3;
    widows: 3;
  }

  a {
    text-decoration: underline;
  }

  main a[href^='/']::after {
    content: ' (https://athleticassist.app' attr(href) ')';
    font-size: 0.9em;
  }

  @page {
    margin: 1.5cm;
  }
}
