:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #f3f5f4;
  --text: #1a1d1c;
  --muted: #4a5250;
  --accent: #0b5d4a;
  --accent-hover: #07483a;
  --on-accent: #ffffff;
  --border: #c9d0cd;
  --s1: 0.25rem;
  --s2: 0.5rem;
  --s3: 0.75rem;
  --s4: 1rem;
  --s5: 1.5rem;
  --s6: 2rem;
  --s7: 3rem;
  --s8: 4rem;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121514;
    --surface: #1c2120;
    --text: #e8ecea;
    --muted: #aab3b0;
    --accent: #6fd3b5;
    --accent-hover: #9ee6d0;
    --on-accent: #0a1512;
    --border: #36403d;
  }
}

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

html {
  scroll-padding-top: 8.5rem;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

h1,
h2,
h3 {
  line-height: 1.25;
  font-weight: 600;
  margin: 0 0 var(--s4);
}

h1 {
  font-size: clamp(1.75rem, 1.5rem + 1.25vw, 2.25rem);
}

h2 {
  font-size: 1.5rem;
  margin-top: var(--s6);
}

h3 {
  font-size: 1.25rem;
}

p,
ul {
  max-width: 65ch;
  margin: 0 0 var(--s4);
}

ul {
  padding-inline-start: 1.25rem;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--accent-hover);
  text-decoration-thickness: 0.15em;
}

.wrap {
  width: 100%;
  max-width: 60rem;
  margin-inline: auto;
  padding-inline: var(--s4);
}

main.wrap {
  max-width: 42rem;
  flex: 1;
  padding-block: var(--s6);
}

main > :first-child {
  margin-top: 0;
}

.lead {
  font-size: 1.125rem;
  color: var(--text);
}

.skip {
  position: absolute;
  left: -999rem;
  top: 0;
  z-index: 20;
  padding: var(--s3) var(--s4);
  background: var(--accent);
  color: var(--on-accent);
}

.skip:focus {
  left: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2) var(--s4);
  padding-block: var(--s2);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  color: var(--text);
  text-decoration: underline;
}

.site-header nav {
  order: 3;
  flex-basis: 100%;
}

.site-header nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin: 0;
  padding: 0;
  max-width: none;
  list-style: none;
}

.site-header nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: var(--s2) var(--s3);
  border-radius: 0.25rem;
  text-decoration: none;
}

.site-header nav a:hover {
  text-decoration: underline;
}

.site-header nav a[aria-current="page"],
.site-header nav a[aria-current="page"]:hover {
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
}

.lang {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  margin-inline-start: auto;
  padding: var(--s2) var(--s4);
  border: 1px solid var(--accent);
  border-radius: 0.25rem;
  text-decoration: none;
}

.lang:hover {
  color: var(--accent-hover);
  border-color: var(--accent-hover);
  text-decoration: none;
}

.card {
  margin-bottom: var(--s4);
  padding: var(--s5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.25rem;
}

.card h2 {
  margin-top: 0;
}

.card p:last-child {
  margin-bottom: 0;
}

ul.plain {
  padding: 0;
  list-style: none;
}

ul.plain li {
  margin-bottom: var(--s3);
}

.site-footer {
  padding-block: var(--s5);
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3) var(--s5);
  max-width: none;
  margin: 0 0 var(--s4);
  padding: 0;
  list-style: none;
}

.site-footer .copy {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
}

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

@media (min-width: 48rem) {
  html {
    scroll-padding-top: 4.5rem;
  }

  .site-header nav {
    order: 0;
    flex-basis: auto;
  }
}

@media (prefers-reduced-motion: no-preference) {
  a {
    transition: color 0.15s, border-color 0.15s;
  }
}
