/* Calm, readable base styles. Contrast meets WCAG 2.2 AA in light and dark mode. */

:root {
  color-scheme: light dark;
  --bg: #fbf8f2;
  --fg: #1d1d1b;
  --muted: #5b5a55;
  --accent: #1f5f4a;
  --accent-contrast: #ffffff;
  --focus: #b3541e;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* 18px: easy to read in a moving car and for older players. */
  font-size: 112.5%;
  line-height: 1.5;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151a17;
    --fg: #f2efe8;
    --muted: #b9b5ab;
    --accent: #7fc8a9;
    --accent-contrast: #0d1310;
    --focus: #f0a46b;
  }
}

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: var(--accent-contrast);
}

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

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

.site-header,
main,
.site-footer {
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
  padding: 1rem 1.25rem;
}

main {
  flex: 1;
}

.brand {
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--accent);
}

h1 {
  font-size: 2rem;
  line-height: 1.2;
  margin: 0.5rem 0 1rem;
}

.lead {
  font-size: 1.2rem;
}

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

.muted,
.site-footer {
  color: var(--muted);
}

.site-footer {
  font-size: 0.875rem;
}

code {
  font-size: 0.95em;
  overflow-wrap: anywhere;
}
