:root {
  --bg: #fdfdfb;
  --fg: #222;
  --muted: #666;
  --accent: #2a7a3b;
  --rule: #ddd;
  --code-bg: #f2f2ee;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1d1b;
    --fg: #e4e4e0;
    --muted: #a0a09a;
    --accent: #7fcf8d;
    --rule: #3a3c3a;
    --code-bg: #262826;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0 auto;
  max-width: 46rem;
  padding: 0 1rem;
  background: var(--bg);
  color: var(--fg);
  font: 1.0625rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

.site-header {
  padding: 1.5rem 0 1rem;
  border-bottom: 1px solid var(--rule);
}
.site-title {
  color: var(--fg);
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
}
.site-tagline {
  display: block;
  color: var(--muted);
  font-style: italic;
}
.site-header nav { margin-top: 0.5rem; }
.site-header nav a { margin-right: 1.25rem; }

main { padding: 1rem 0 2rem; }
h1 { line-height: 1.2; }

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

figure { margin: 1.5rem 0; }
figure img { display: block; border-radius: 4px; }
figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 0.35rem; }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.pair figure { margin: 0; }
@media (max-width: 30rem) { .pair { grid-template-columns: 1fr; } }

code { background: var(--code-bg); padding: 0.1em 0.3em; border-radius: 3px; font-size: 0.9em; }
pre { background: var(--code-bg); padding: 0.75rem 1rem; border-radius: 4px; overflow-x: auto; }
pre code { padding: 0; background: none; }

.note {
  border-left: 3px solid var(--accent);
  padding: 0.25rem 1rem;
  color: var(--muted);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: 0.75rem;
}
.gallery figure { margin: 0; }
.gallery img { aspect-ratio: 1; object-fit: cover; width: 100%; }

.steps { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--rule); padding-top: 1rem; margin-top: 2rem; }

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