:root {
  --bg: #fafafa;
  --fg: #1a1a1a;
  --muted: #666;
  --border: #e5e5e5;
  --accent: #0066cc;
  --code-bg: #f4f4f4;
  --max-width: 720px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f0f;
    --fg: #e8e8e8;
    --muted: #999;
    --border: #2a2a2a;
    --accent: #4d9fff;
    --code-bg: #1a1a1a;
  }
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--fg);
  font-size: 16px;
  line-height: 1.7;
  padding: 2rem 1rem;
}

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

.container { max-width: var(--max-width); margin: 0 auto; }

/* Header */
header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
}
header a { color: var(--fg); font-weight: 600; font-size: 1.1rem; }
header .subtitle { color: var(--muted); font-size: 0.85rem; margin-top: 0.2rem; }

/* Index listing */
.note-list { list-style: none; }
.note-list li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.note-list li:last-child { border-bottom: none; }
.note-list .note-title { font-weight: 500; font-size: 1rem; }
.note-list .note-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.2rem;
}
.note-list .note-preview {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.3rem;
}

/* Note page */
.note-header { margin-bottom: 2rem; }
.note-header h1 { font-size: 1.6rem; font-weight: 700; line-height: 1.3; }
.note-header .meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}
.note-header .tags { margin-top: 0.4rem; }
.tag {
  display: inline-block;
  background: var(--code-bg);
  color: var(--muted);
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  margin-right: 0.3rem;
}

/* Content */
.content h2 { font-size: 1.2rem; margin: 2rem 0 0.75rem; }
.content h3 { font-size: 1rem; margin: 1.5rem 0 0.5rem; }
.content p { margin-bottom: 1rem; }
.content ul, .content ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.content li { margin-bottom: 0.3rem; }
.content blockquote {
  border-left: 3px solid var(--border);
  padding-left: 1rem;
  color: var(--muted);
  margin: 1rem 0;
}
.content code {
  background: var(--code-bg);
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
  font-size: 0.875em;
  font-family: "SF Mono", Menlo, monospace;
}
.content pre {
  background: var(--code-bg);
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
  margin-bottom: 1rem;
}
.content pre code { background: none; padding: 0; }
.content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.content th, .content td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  text-align: left;
}
.content th { background: var(--code-bg); font-weight: 600; }
.content hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }

/* Verdict badge */
.verdict {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.verdict.pass { background: #d4edda; color: #155724; }
.verdict.caution { background: #fff3cd; color: #856404; }
.verdict.fail { background: #f8d7da; color: #721c24; }

/* Back link */
.back { margin-bottom: 2rem; font-size: 0.875rem; color: var(--muted); }

footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted);
}
