:root {
  color-scheme: light dark;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #eef2f6;
  --surface2: var(--surface-2);
  --border: #d9e0e8;
  --accent: #087d68;
  --on-accent: #ffffff;
  --accent-2: #1f6fbe;
  --accent2: #c65323;
  --accent3: #2f7d32;
  --accent4: #6d4fb5;
  --warn: #b76a00;
  --error: #c83a3a;
  --success: #2f7d32;
  --text: #101820;
  --muted: #556270;
  --dim: #7b8794;
  --text-dim: var(--muted);
  --text-muted: var(--dim);
  --code-bg: #eef2f6;
  --shadow: 0 16px 38px rgba(28, 40, 55, 0.08);
  --focus: 0 0 0 3px rgba(8, 125, 104, 0.18);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d10;
    --surface: #141820;
    --surface-2: #1b202a;
    --surface2: var(--surface-2);
    --border: #28313d;
    --accent: #31c6a4;
    --on-accent: #07110e;
    --accent-2: #6fb7ff;
    --accent2: #ff8a5c;
    --accent3: #a8ff3e;
    --accent4: #c084fc;
    --warn: #ffbe5c;
    --error: #ff6b6b;
    --success: #a8ff3e;
    --text: #edf2f7;
    --muted: #9aa7b5;
    --dim: #657282;
    --text-dim: var(--muted);
    --text-muted: var(--dim);
    --code-bg: #0d1117;
    --shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
    --focus: 0 0 0 3px rgba(49, 198, 164, 0.22);
  }
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  background: var(--bg);
  color: var(--text);
}

a {
  color: inherit;
}

button,
input,
textarea,
select {
  font: inherit;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 999;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 7px 10px;
  border-radius: 6px;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
  background: var(--surface);
}

.site-nav .nav-home {
  color: var(--text);
  font-weight: 800;
  margin-right: auto;
}

@media (max-width: 680px) {
  .site-nav {
    overflow-x: auto;
    align-items: stretch;
  }

  .site-nav .nav-home {
    margin-right: 4px;
  }
}
