:root {
  color-scheme: light dark;
  --background: #f6f7fb;
  --surface: #ffffff;
  --text: #18202a;
  --muted: #526071;
  --accent: #155eef;
  --accent-dark: #0b3ea8;
  --border: #d7dde7;
  --focus: #ffbf47;
  --max-width: 52rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #10141b;
    --surface: #171d26;
    --text: #f2f5f9;
    --muted: #c1cad6;
    --accent: #8ab4ff;
    --accent-dark: #b8d0ff;
    --border: #394352;
    --focus: #ffd166;
  }
}

* {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.125rem;
  line-height: 1.65;
}

a {
  color: var(--accent-dark);
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 0.18em;
}

a:focus-visible,
button:focus-visible {
  outline: 0.25rem solid var(--focus);
  outline-offset: 0.2rem;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -6rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--surface);
  color: var(--text);
  border: 0.15rem solid var(--text);
  border-radius: 0.4rem;
}

.skip-link:focus {
  top: 1rem;
}

header,
main,
footer {
  width: min(calc(100% - 2rem), var(--max-width));
  margin-inline: auto;
}

header {
  padding-block: 2rem 1rem;
}

.brand {
  margin: 0;
  font-size: clamp(2.3rem, 8vw, 4.6rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.tagline {
  margin: 0.8rem 0 0;
  max-width: 44rem;
  color: var(--muted);
  font-size: 1.25rem;
}

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

nav a[aria-current="page"] {
  font-weight: 700;
  text-decoration-thickness: 0.2em;
}

main {
  padding-block: 1rem 3rem;
}

section,
article {
  background: var(--surface);
  border: 0.08rem solid var(--border);
  border-radius: 0.9rem;
  padding: clamp(1.25rem, 4vw, 2rem);
  box-shadow: 0 0.5rem 1.8rem rgb(0 0 0 / 0.06);
}

section + section,
article + article {
  margin-top: 1.25rem;
}

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

h1 {
  margin-top: 0;
  font-size: clamp(2rem, 5vw, 3rem);
}

h2 {
  margin-top: 0;
  font-size: clamp(1.45rem, 4vw, 2rem);
}

h3 {
  font-size: 1.25rem;
}

ul {
  padding-left: 1.4rem;
}

.notice {
  border-left: 0.35rem solid var(--accent);
  padding-left: 1rem;
}

.meta {
  color: var(--muted);
  font-size: 1rem;
}

footer {
  padding-block: 0 2.5rem;
  color: var(--muted);
  font-size: 1rem;
}

footer p {
  margin: 0.35rem 0;
}

@media (max-width: 32rem) {
  body {
    font-size: 1.05rem;
  }

  nav ul {
    display: block;
  }

  nav li + li {
    margin-top: 0.5rem;
  }
}

@media print {
  body {
    background: white;
    color: black;
  }

  section,
  article {
    box-shadow: none;
  }

  .skip-link,
  nav {
    display: none;
  }
}
