:root {
  --bg: #0d1117;
  --bg-surface: #161b22;
  --bg-inset: #0d1117;
  --border: #30363d;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --text-link: #58a6ff;
  --accent: #58a6ff;
  --code-bg: #1c2128;
  --table-row-alt: #161b22;
  --green: #3fb950;
  --yellow: #d29922;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  font-size: 16px;
}

/* Header */
header { margin-bottom: 2rem; }

h1 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

p { margin-bottom: 1rem; }

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

strong { font-weight: 600; }

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

/* Code */
code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.875em;
  background: var(--code-bg);
  padding: 0.15em 0.4em;
  border-radius: 6px;
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
  margin-bottom: 1rem;
  line-height: 1.5;
}

pre code {
  background: none;
  padding: 0;
  font-size: 0.85em;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

th, td {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  text-align: left;
}

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

tr:nth-child(even) {
  background: var(--table-row-alt);
}

/* Lists */
ul, ol {
  margin-bottom: 1rem;
  padding-left: 1.75rem;
}

li { margin-bottom: 0.25rem; }
li > ul, li > ol { margin-top: 0.25rem; margin-bottom: 0; }

/* Blockquote (metadata at top) */
blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.5rem 1rem;
  margin-bottom: 1rem;
  color: var(--text-muted);
  background: var(--bg-surface);
  border-radius: 0 6px 6px 0;
}

blockquote p { margin-bottom: 0.25rem; }
blockquote p:last-child { margin-bottom: 0; }

/* Inline styles for status markers */
code:has(+ em), strong code {
  color: var(--green);
}
