:root {
  color-scheme: light dark;
  --bg: #f3fafb;
  --surface: #ffffff;
  --text: #17343b;
  --muted: #61767b;
  --accent: #138b9a;
  --line: #d7e7e9;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #102327;
    --surface: #173137;
    --text: #edf8f9;
    --muted: #afc4c8;
    --accent: #65cbd5;
    --line: #315058;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
  line-height: 1.75;
}
header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
nav, main, footer {
  width: min(840px, calc(100% - 40px));
  margin: 0 auto;
}
nav {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand { color: var(--text); font-weight: 700; text-decoration: none; }
.links { display: flex; gap: 18px; }
a { color: var(--accent); }
main { padding: 42px 0 64px; }
h1, h2, h3 { line-height: 1.35; }
h1 { margin: 0 0 8px; font-size: clamp(1.75rem, 5vw, 2.4rem); }
h2 { margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--line); }
.updated, .muted { color: var(--muted); }
.contact {
  margin-top: 28px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}
footer { padding: 24px 0 40px; border-top: 1px solid var(--line); color: var(--muted); }
@media (max-width: 520px) {
  nav { align-items: flex-start; flex-direction: column; padding: 14px 0; gap: 8px; }
  main { padding-top: 30px; }
}
