:root {
  --text: #1a1a1a;
  --text-muted: #595959;
  --link: #0f63d6;
  --bg: #ffffff;
  --border: #e5e5e5;
  --accent-bg: #fafafa;
  --max-width: 760px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  padding: 32px 20px 80px;
}

main, header, footer {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

header {
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

header .brand {
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
}

header .brand:hover { color: var(--text); }

h1 {
  font-size: 30px;
  margin: 8px 0 4px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 21px;
  margin: 36px 0 8px;
  line-height: 1.35;
  letter-spacing: -0.005em;
}

h3 {
  font-size: 17px;
  margin: 24px 0 6px;
  line-height: 1.4;
}

p { margin: 0 0 14px; }

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

a:hover { text-decoration: none; }

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

li { margin-bottom: 6px; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 14.5px;
}

th, td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  font-weight: 600;
  background: var(--accent-bg);
}

code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 14px;
  background: var(--accent-bg);
  padding: 2px 6px;
  border-radius: 4px;
}

.meta {
  color: var(--text-muted);
  font-size: 14.5px;
  margin-bottom: 8px;
}

.meta strong { color: var(--text); }

.callout {
  border-left: 3px solid var(--link);
  padding: 14px 18px;
  margin: 20px 0;
  background: var(--accent-bg);
  font-size: 15px;
  border-radius: 0 6px 6px 0;
}

.callout p:last-child { margin-bottom: 0; }

.toc {
  background: var(--accent-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 24px 0 32px;
  font-size: 14.5px;
}

.toc strong { display: block; margin-bottom: 8px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }

.toc ol { margin: 0; padding-left: 20px; }

.toc li { margin-bottom: 4px; }

footer {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-muted);
}

footer a { color: var(--text-muted); }

@media (max-width: 600px) {
  body { padding: 20px 16px 64px; }
  h1 { font-size: 26px; }
  h2 { font-size: 19px; }
}
