:root {
  color-scheme: light dark;
  --bg: #f4f1e9;
  --fg: #1d201e;
  --muted: #5d625e;
  --rule: #d9d4c6;
  --accent: #1f5f4a;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111714;
    --fg: #e6e8e3;
    --muted: #9aa39c;
    --rule: #28322d;
    --accent: #7fcfae;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111714;
  --fg: #e6e8e3;
  --muted: #9aa39c;
  --rule: #28322d;
  --accent: #7fcfae;
}
:root[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 1.0625rem/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -999px; top: 0; padding: 0.5rem 1rem; background: var(--bg); }
.skip:focus { left: 0.5rem; top: 0.5rem; z-index: 1; }

header, main, footer { width: min(42rem, 100% - 2.5rem); margin-inline: auto; }
header {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.5rem;
  padding: 1.5rem 0 1rem;
  border-bottom: 1px solid var(--rule);
}
.brand { font-weight: 650; color: var(--fg); text-decoration: none; margin-right: auto; }
nav { display: flex; gap: 1.25rem; }
nav a { color: var(--muted); text-decoration: none; padding: 0.25rem 0; }
nav a:hover { color: var(--fg); }
nav a[aria-current="page"] { color: var(--fg); border-bottom: 2px solid var(--accent); }
#theme {
  font: inherit; font-size: 0.9rem; color: var(--muted); background: none; cursor: pointer;
  border: 1px solid var(--rule); border-radius: 0.4rem; padding: 0.2rem 0.65rem;
}
#theme:hover { color: var(--fg); }

main { padding: 2.5rem 0 3rem; }
h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 1rem; letter-spacing: -0.01em; }
h2 { font-size: 1.2rem; margin: 2.25rem 0 0.5rem; }
p { margin: 0 0 1rem; }
.empty { color: var(--muted); font-style: italic; }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: 0.9rem 0; border-top: 1px solid var(--rule); }
ul.plain li:last-child { border-bottom: 1px solid var(--rule); }
ul.plain b { display: block; }
.tag { color: var(--muted); font-size: 0.9rem; }
footer { padding: 1.5rem 0 2.5rem; border-top: 1px solid var(--rule); color: var(--muted); font-size: 0.95rem; }
footer a { color: var(--muted); }
footer a:hover { color: var(--fg); }
footer ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; list-style: none; padding: 0; margin: 0 0 0.5rem; }

@media (max-width: 30rem) {
  body { font-size: 1rem; }
  h1 { font-size: 1.65rem; }
  nav { gap: 1rem; }
}
