:root {
  --bg: #fff;
  --fg: #000;
  --muted: #555;
  --border: #000;
}

body:has(#theme-toggle:checked) {
  --bg: #111;
  --fg: #eee;
  --muted: #999;
  --border: #eee;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: sans-serif;
  background: var(--bg);
  color: var(--fg);
}

.navbar,
.footer {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
}

.navbar { align-items: center; }

.links,
.footer div {
  display: flex;
  gap: 20px;
  align-items: center;
}

.logo { font-weight: bold; text-decoration: none; }

main { flex: 1; padding: 40px 20px; }

a { color: inherit; }
a:visited { color: var(--muted); }

.theme-toggle { display: none; }
.theme-btn {
  cursor: pointer;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: no-repeat center / 16px 16px url("/static/icons/light.svg");
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

body:has(#theme-toggle:checked) .theme-btn {
  background-image: url("/static/icons/dark.svg");
}

