:root {
  --bg: #fff;
  --text: #444;
  --heading: #222;
  --muted: #8a8a8a;
  --link: #3273dc;
  --rule: #eee;
  --code-bg: #f4f4f4;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1b1d;
    --text: #d6d6d6;
    --heading: #f2f2f2;
    --muted: #8e8e93;
    --link: #8cb4ff;
    --rule: #2e2e31;
    --code-bg: #26262a;
  }
}

* { box-sizing: border-box; }

body {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px;
  font-family: Verdana, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-wrap: break-word;
}

h1, h2, h3, h4, h5, h6 { color: var(--heading); line-height: 1.3; }

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

header { margin: 16px 0 32px; }
header h1 { margin: 0; font-size: 1.5rem; }
header h1 a { color: var(--heading); text-decoration: none; }

.intro { margin-bottom: 48px; }

article { margin-bottom: 56px; }
article h2 { margin: 0 0 4px; font-size: 1.3rem; }
article h2 a { color: inherit; text-decoration: none; }
article h2 a:hover { text-decoration: underline; }
.date { margin: 0 0 16px; color: var(--muted); font-size: 0.9rem; }
.date a { color: inherit; text-decoration: none; }

img, video { max-width: 100%; height: auto; }

blockquote {
  margin: 1em 0;
  padding-left: 1em;
  border-left: 3px solid var(--rule);
  font-style: italic;
}

code {
  padding: 2px 4px;
  font-size: 0.9em;
  background: var(--code-bg);
  border-radius: 3px;
}
pre {
  padding: 12px 16px;
  overflow-x: auto;
  background: var(--code-bg);
  border-radius: 4px;
}
pre code { padding: 0; background: none; }

hr { border: 0; border-top: 1px solid var(--rule); }

table { border-collapse: collapse; }
th, td { padding: 4px 8px; border: 1px solid var(--rule); }

.pages {
  display: flex;
  justify-content: space-between;
  margin: 32px 0;
}

footer {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.85rem;
}
