:root {
  --bg: #ffffff;
  --surface: #f4f6fa;
  --text: #1a2230;
  --muted: #4a5568;
  --brand: #12345a;
  --accent: #1f6feb;
  --border: #dde3ec;
  --focus: #f59e0b;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1520;
    --surface: #182233;
    --text: #e8edf5;
    --muted: #a9b4c4;
    --brand: #8fb8ff;
    --accent: #6ea8ff;
    --border: #2a3850;
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
}

a { color: var(--accent); text-underline-offset: 2px; }

a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }

.site-header { border-bottom: 1px solid var(--border); }
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: .02em;
}
.brand img { width: 40px; height: 40px; border-radius: 8px; }
.site-header nav a { margin-left: 1rem; }
.site-header nav a:first-child { margin-left: 0; }

main { padding: 2rem 0 3rem; }

h1 { font-size: clamp(1.75rem, 4vw, 2.4rem); line-height: 1.2; color: var(--brand); margin: .5rem 0 1rem; }
h2 { font-size: 1.35rem; line-height: 1.3; margin: 2.25rem 0 .75rem; }
h3 { font-size: 1.1rem; margin: 1.5rem 0 .5rem; }

.lead { font-size: 1.15rem; color: var(--muted); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

ul { padding-left: 1.25rem; }
li { margin: .25rem 0; }

code { font-size: .95em; word-break: break-all; }

details {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .75rem 1rem;
  margin: .75rem 0;
  background: var(--surface);
}
summary { cursor: pointer; font-weight: 600; }
details p { margin: .75rem 0 .25rem; }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0 2rem;
  color: var(--muted);
  font-size: .95rem;
}
.site-footer p { margin: .35rem 0; }
