:root {
  --bg: #fdfdfb;
  --text: #23302a;
  --muted: #5f6f66;
  --accent: #2f7d4f;
  --accent-soft: #eaf6ee;
  --border: #dde5df;
  --note-bg: #f4f8f2;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131a16;
    --text: #e4ece7;
    --muted: #9db0a5;
    --accent: #6fc493;
    --accent-soft: #1d2b23;
    --border: #2a3a31;
    --note-bg: #1a241f;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0 auto;
  max-width: 44rem;
  padding: 0 1.25rem;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.7;
  font-size: 1.05rem;
}

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

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 1.5rem 0 1rem;
  border-bottom: 1px solid var(--border);
}
.brand {
  font-weight: 700;
  font-size: 1.2rem;
  text-decoration: none;
  color: var(--text);
}
.site-header nav { display: flex; gap: 1rem; }
.site-header nav a { color: var(--muted); text-decoration: none; }
.site-header nav a:hover { color: var(--accent); }

main { padding: 2rem 0 3rem; }

.hero h1 { font-size: 1.9rem; line-height: 1.3; margin: 0 0 0.5rem; }
.hero p { color: var(--muted); margin-top: 0; }

h1 { font-size: 1.7rem; line-height: 1.3; }
h2 { font-size: 1.3rem; margin-top: 2.2rem; }
h3 { font-size: 1.1rem; }

.post-meta { color: var(--muted); font-size: 0.9rem; }

.post-list ul { list-style: none; padding: 0; }
.post-list li { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.post-list li a { font-weight: 600; font-size: 1.1rem; text-decoration: none; }
.post-list li p { margin: 0.3rem 0 0; color: var(--muted); }
.post-list .post-meta { margin-left: 0.5rem; }

.affiliate-note {
  background: var(--note-bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  font-size: 0.92rem;
  color: var(--muted);
  margin: 1.25rem 0;
}
.affiliate-note strong { color: var(--text); }

table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.25rem 0;
  font-size: 0.95rem;
  display: block;
  overflow-x: auto;
}
th, td {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
th { background: var(--accent-soft); }

img { max-width: 100%; height: auto; border-radius: 6px; }

code {
  background: var(--accent-soft);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  font-size: 0.9em;
}
pre { background: var(--accent-soft); padding: 1rem; border-radius: 6px; overflow-x: auto; }
pre code { background: none; padding: 0; }

blockquote {
  margin: 1.25rem 0;
  padding: 0.25rem 1rem;
  border-left: 4px solid var(--border);
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}
