/* The public site's one stylesheet (brief 005 S2): system fonts only, light
   and dark from the reader's preference, styled by element and id (the pages
   carry no class or style attribute). */

:root {
  color-scheme: light dark;
  --text: #1e293b;
  --muted: #475569;
  --line: #e2e8f0;
  --back: #ffffff;
  --code: #f1f5f9;
  --link: #1d4ed8;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #e2e8f0;
    --muted: #94a3b8;
    --line: #334155;
    --back: #0f172a;
    --code: #1e293b;
    --link: #93c5fd;
  }
}

html {
  background: var(--back);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

body {
  margin: 0;
}

header,
main {
  box-sizing: border-box;
  max-width: 60rem;
  margin: 0 auto;
  padding: 0 1rem;
}

header {
  padding-top: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}

main {
  padding-bottom: 4rem;
}

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

h1 {
  font-size: 1.75rem;
  margin: 2rem 0 1rem;
}

h2 {
  font-size: 1.35rem;
  margin: 2.5rem 0 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--line);
}

h3 {
  font-size: 1.1rem;
  margin: 2rem 0 0.5rem;
}

nav h2 {
  border-top: 0;
  margin-top: 1rem;
}

code,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
  background: var(--code);
  border-radius: 4px;
}

code {
  padding: 0.05em 0.3em;
  overflow-wrap: anywhere;
}

pre {
  padding: 0.75rem 1rem;
  overflow-x: auto;
}

pre code {
  padding: 0;
  background: none;
  overflow-wrap: normal;
}

table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 0.75rem 0;
  font-size: 0.92rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--muted);
  font-weight: 600;
}

dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.25rem 1rem;
  margin: 0.75rem 0;
}

dt {
  color: var(--muted);
}

dd {
  margin: 0;
}

nav ul {
  padding-left: 1.25rem;
}
