/* The public pages' look: one readable column, light or dark as the reader's system is set. */
:root {
  color-scheme: light dark;
  --text: #172b4d;
  --subtle: #44546f;
  --bg: #ffffff;
  --link: #0c66e4;
  --rule: #dcdfe4;
  --code-bg: #f1f2f4;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #dee4ea;
    --subtle: #9fadbc;
    --bg: #1d2125;
    --link: #579dff;
    --rule: #38414a;
    --code-bg: #2c333a;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font: 1rem/1.6 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* Off screen until a keyboard user tabs to it. */
.skip {
  position: absolute;
  left: -999rem;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 1;
  padding: 0.5rem 1rem;
  background: var(--bg);
}

header,
main,
footer {
  max-width: 48rem;
  margin: 0 auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
}

.brand {
  margin: 0;
  font-weight: 600;
}

.brand a {
  color: var(--text);
  text-decoration: none;
}

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

nav a[aria-current='page'] {
  font-weight: 600;
  text-decoration-thickness: 2px;
}

a {
  color: var(--link);
}

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

main {
  padding-top: 1rem;
  padding-bottom: 2rem;
}

h1 {
  font-size: 2rem;
  line-height: 1.25;
}

h2 {
  margin-top: 2.5rem;
  font-size: 1.5rem;
  line-height: 1.3;
}

h3 {
  margin-top: 2rem;
  font-size: 1.2rem;
}

code {
  padding: 0.1em 0.3em;
  border-radius: 3px;
  background: var(--code-bg);
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

table {
  width: 100%;
  margin: 1rem 0;
  border-collapse: collapse;
}

th,
td {
  padding: 0.5rem 0.75rem 0.5rem 0;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

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