:root {
  color-scheme: light dark;
  --bg: #f4f3ee;
  --surface: #ffffff;
  --text: #1b211e;
  --text-muted: #5a6560;
  --line: #d8dcd4;
  --accent: #146647;
  --font-ui: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --measure: 40rem;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121512;
    --surface: #1c201d;
    --text: #eceee9;
    --text-muted: #a7b0aa;
    --line: #333a35;
    --accent: #3ecf8e;
  }
}

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

html {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  color: var(--text);
  background: var(--bg);
  font: 400 17px/1.5 var(--font-ui);
}

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

a:hover {
  text-decoration-thickness: 2px;
}

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

.site-header,
.site-footer {
  width: 100%;
  flex: 0 0 auto;
  background: var(--surface);
}

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

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.45;
}

.bar {
  width: min(var(--measure), 100%);
  margin: 0 auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

.site-header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-top: var(--space-4);
  padding-bottom: var(--space-4);
}

.brand {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.site-header nav {
  display: flex;
  gap: var(--space-4);
  font-size: 15px;
}

.site-header nav a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-header nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

main {
  width: min(var(--measure), 100%);
  margin: 0 auto;
  flex: 1 0 auto;
  padding: var(--space-8) var(--space-4);
}

h1 {
  font-size: 1.75rem;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-3);
}

h2 {
  font-size: 1.05rem;
  line-height: 1.3;
  font-weight: 600;
  margin: var(--space-8) 0 var(--space-2);
}

p {
  margin: var(--space-3) 0;
}

.site-footer .bar {
  padding-top: var(--space-6);
  padding-bottom: var(--space-8);
}

.site-footer p {
  margin: var(--space-2) 0;
}

@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
}
