:root {
  --bg: #ffffff;
  --fg: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --accent: #2563eb;
  --accent-bg: #eff6ff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --fg: #e2e8f0;
    --muted: #94a3b8;
    --border: #1e293b;
    --accent: #60a5fa;
    --accent-bg: #132236;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Helvetica Neue",
    Arial,
    "Hiragino Sans",
    "Noto Sans JP",
    sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 96px;
}

header.site-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

header.site-header .logo-dot {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: cover;
  overflow: hidden;
  display: inline-block;
}

header.site-header a.brand {
  color: var(--fg);
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.2px;
}

header.site-header nav {
  margin-left: auto;
  display: flex;
  gap: 18px;
}

header.site-header nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

header.site-header nav a.active,
header.site-header nav a:hover {
  color: var(--fg);
}

h1 {
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 8px;
  line-height: 1.25;
}

.last-updated {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 32px;
}

h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 36px 0 12px;
  line-height: 1.35;
}

h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 20px 0 8px;
}

p {
  margin: 0 0 14px;
  color: var(--fg);
}

ul,
ol {
  margin: 0 0 14px;
  padding-left: 22px;
}

li {
  margin-bottom: 6px;
}

a {
  color: var(--accent);
}

.toc {
  background: var(--accent-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  margin: 0 0 28px;
  font-size: 14px;
}

.toc strong {
  display: block;
  margin-bottom: 6px;
  color: var(--fg);
}

.toc ol {
  margin: 0;
  padding-left: 20px;
  columns: 2;
  column-gap: 18px;
}

.toc a {
  text-decoration: none;
}

.toc a:hover {
  text-decoration: underline;
}

footer.site-footer {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

footer.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

footer.site-footer a:hover {
  color: var(--fg);
}

@media (max-width: 560px) {
  .container {
    padding: 28px 18px 64px;
  }
  .toc ol {
    columns: 1;
  }
  h1 {
    font-size: 24px;
  }
}
