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

:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --text-secondary: #555555;
  --border: #e0e0e0;
  --link: #0066cc;
  --code-bg: #f5f5f5;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1a1a;
    --text: #e0e0e0;
    --text-secondary: #aaaaaa;
    --border: #333333;
    --link: #66aaff;
    --code-bg: #2a2a2a;
  }
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
  padding: 20px;
  max-width: 720px;
  margin: 0 auto;
}

h1 {
  font-size: 1.6rem;
  margin-bottom: 0.5em;
  line-height: 1.3;
}

h2 {
  font-size: 1.35rem;
  margin-top: 2em;
  margin-bottom: 0.5em;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.3em;
}

h3 {
  font-size: 1.15rem;
  margin-top: 1.5em;
  margin-bottom: 0.4em;
}

h4 {
  font-size: 1rem;
  margin-top: 1.2em;
  margin-bottom: 0.3em;
}

p {
  margin-bottom: 1em;
}

ul,
ol {
  margin-bottom: 1em;
  padding-left: 1.5em;
}

li {
  margin-bottom: 0.3em;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

strong {
  font-weight: 600;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2em 0;
}

code {
  background-color: var(--code-bg);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  font-size: 0.9em;
}

.last-updated {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.5em;
}

.nav {
  margin-bottom: 2em;
  padding-bottom: 1em;
  border-bottom: 1px solid var(--border);
}

.nav a {
  margin-right: 1.5em;
}

footer {
  margin-top: 3em;
  padding-top: 1em;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.85rem;
}
