/* Colours copied from src/theme/tokens.ts (lightColors, darkColors); a test keeps them in step. */
:root {
  color-scheme: light dark;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #111418;
  --muted: #626977;
  --link: #1f3a68;
  --border: #858b97;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121418;
    --surface: #1b1f27;
    --text: #f1f3f7;
    --muted: #b0b6c2;
    --link: #a3bdee;
    --border: #7d8492;
  }
}

* {
  box-sizing: border-box;
}

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

header,
main {
  max-width: 42rem;
  margin: 0 auto;
  padding: 1rem;
}

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

.brand {
  margin: 0 0 0.5rem;
  font-weight: 700;
}

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

a,
a:visited {
  color: var(--link);
  text-decoration: underline;
}

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

nav a[aria-current='page'] {
  font-weight: 700;
}

.skip {
  position: absolute;
  left: -100rem;
  background: var(--bg);
  padding: 0.5rem 1rem;
}

.skip:focus {
  left: 0.5rem;
  top: 0.5rem;
}

h1,
h2,
h3 {
  line-height: 1.25;
}

.notice {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  font-weight: 700;
}

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

pre,
code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

pre {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  background: var(--surface);
  color: var(--text);
}

li {
  margin-bottom: 0.25rem;
}
