:root {
  --bg: #f8fafc;
  --fg: #0f172a;
  --muted: #475569;
  --border: #cbd5e1;
  --accent: #1e3a8a;
  --card: #ffffff;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1120;
    --fg: #e2e8f0;
    --muted: #94a3b8;
    --border: #1e293b;
    --accent: #93c5fd;
    --card: #111827;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1120;
  --fg: #e2e8f0;
  --muted: #94a3b8;
  --border: #1e293b;
  --accent: #93c5fd;
  --card: #111827;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 1rem/1.65 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.wrap { max-width: 44rem; margin: 0 auto; padding: 2.5rem 1rem 4rem; }
header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-bottom: 1.25rem; border-bottom: 1px solid var(--border); margin-bottom: 2rem;
}
.brand { font-weight: 700; letter-spacing: -0.01em; }
nav { display: flex; gap: 1rem; flex-wrap: wrap; }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1 { font-size: clamp(1.75rem, 4vw, 2.25rem); line-height: 1.2; margin: 0 0 0.5rem; letter-spacing: -0.02em; text-wrap: balance; }
.meta { color: var(--muted); margin: 0 0 2rem; }
h2 { font-size: 1.15rem; margin: 2.25rem 0 0.5rem; }
p, li { max-width: 68ch; }
ul { padding-left: 1.25rem; }
.lang {
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  padding: 1rem 1.25rem; margin: 2.5rem 0 0;
}
.lang h2 { margin-top: 0.25rem; }
footer { margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.9rem; }
.theme {
  min-width: 44px; min-height: 44px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--card); color: var(--fg); cursor: pointer; font: inherit; font-size: 0.9rem; padding: 0 0.9rem;
}
