/* The app host's one stylesheet (Step 4.4b). The pages carry no inline
   style and load nothing from another host (Content-Security-Policy:
   default-src 'self'), so everything visual lives here: system fonts only,
   and no rule that fetches anything (tool/check_legal_pages.dart refuses
   one). Light and dark follow the device. */

:root {
  color-scheme: light dark;
  --ink: #1d1f24;
  --muted: #5b606b;
  --page: #ffffff;
  --surface: #f4f5f7;
  --brand: #0b5cad;
  --hairline: #d9dce1;
  --note-ink: #5c3b00;
  --note-fill: #fff3d6;
  --note-line: #e8c26a;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eceef2;
    --muted: #a7adb8;
    --page: #121417;
    --surface: #1c1f24;
    --brand: #7fb6f2;
    --hairline: #33373f;
    --note-ink: #ffe2a3;
    --note-fill: #3a2e12;
    --note-line: #8a6a26;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0 auto;
  max-width: 46rem;
  padding: 1.25rem 1.25rem 3rem;
  background: var(--page);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

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

.brand {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.languages {
  display: flex;
  gap: 0.75rem;
  font-size: 0.9375rem;
}

.languages a[aria-current="page"] {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.draft {
  margin: 1rem 0 0;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--note-line);
  border-radius: 0.5rem;
  background: var(--note-fill);
  color: var(--note-ink);
  font-weight: 600;
}

h1 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.75rem;
  line-height: 1.25;
}

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

h3 {
  margin: 1.5rem 0 0.25rem;
  font-size: 1.0625rem;
}

p,
ul,
ol {
  margin: 0.5rem 0;
}

li {
  margin: 0.25rem 0;
}

a {
  color: var(--brand);
  overflow-wrap: anywhere;
}

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

footer {
  margin-top: 3rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 0.9375rem;
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}
