:root {
  --bg: #fafaf7;
  --surface: #f0f1ec;
  --text: #1c1f1a;
  --muted: #5f645a;
  --border: #dcdfd5;
  --accent: #2f7d1e;
  --lime: #9ccc2c;
  --band: #e4f3c2;
  --grid: rgba(70, 120, 20, 0.16);
  --radius: 14px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #161616;
    --text: #f2f2f0;
    --muted: #a3a59f;
    --border: #2c2c2c;
    --accent: #9ccc2c;
  }
}

/* Header/footer bands stay light in both modes so the logo always reads; the grid nods to the original checkerboard. */
.band {
  background-color: var(--band);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: -1px -1px;
  border-bottom: 6px solid var(--lime);
  color: #1b2a12;
}
.band-footer { border-bottom: 0; border-top: 6px solid var(--lime); }
.band a { color: #2f7d1e; }
.sprite { image-rendering: pixelated; }

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: 2.2rem; margin: 0 0 0.5rem; }
h2 { font-size: 1.4rem; margin: 2.5rem 0 0.75rem; }

.site-header, main, .site-footer { max-width: 980px; margin: 0 auto; padding: 0 16px; }
.site-header {
  display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: space-between;
  padding-top: 12px; padding-bottom: 12px;
}
.brand img { display: block; width: 184px; height: 60px; image-rendering: pixelated; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 0.95rem; font-weight: 500; }
.site-header nav a { color: #3d5a2a; }
.site-header nav a[aria-current] { color: #1b2a12; box-shadow: inset 0 -3px var(--lime); }
main { padding-top: 40px; padding-bottom: 64px; }
.site-footer { display: flex; align-items: flex-end; gap: 12px; padding-top: 16px; padding-bottom: 24px; font-size: 0.85rem; }
.site-footer p { margin: 0; }

.lede { font-size: 1.25rem; color: var(--muted); margin: 0 0 0.5rem; }
.muted { color: var(--muted); }
.hero { display: flex; align-items: center; gap: 24px; margin-bottom: 40px; }
.hero h1 { font-size: 2.6rem; }
.hero > div { flex: 1; }
.hero .sprite { width: 96px; height: 144px; flex: none; }
@media (max-width: 600px) { .hero .sprite { width: 64px; height: 96px; } .hero h1 { font-size: 2rem; } }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 16px; padding: 0; list-style: none; }
.card { display: block; background: var(--surface); border-radius: var(--radius); padding: 20px; color: var(--text); }
.card:hover { text-decoration: none; outline: 1px solid var(--accent); }
.card img { width: 64px; height: 64px; border-radius: 22%; }
.card h2 { font-size: 1.17rem; margin: 12px 0 4px; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.app-hero { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.app-icon { border-radius: 22%; flex: none; }
.store-badge { display: inline-block; margin-top: 8px; }
.store-badge img { display: block; height: 48px; width: auto; }
.badge { display: inline-block; background: var(--surface); border-radius: 980px; padding: 2px 12px; font-size: 0.85rem; color: var(--muted); }
/* App Store-style screenshot row: swipe/scroll sideways, snaps to each shot. */
.gallery { display: flex; align-items: center; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
.gallery:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.gallery > * { flex: none; scroll-snap-align: start; }
.gallery img { display: block; width: auto; height: auto; max-height: 320px; max-width: 100%; border-radius: 10px; border: 1px solid var(--border); }
.gallery a:focus-visible { outline-offset: -3px; }
@media (max-width: 600px) { .gallery img { max-height: 220px; } }

.post { margin-bottom: 48px; }
.post time, .post-list time { color: var(--muted); font-size: 0.9rem; }
.post-list { list-style: none; padding: 0; }
.post-list li { padding: 12px 0; border-bottom: 1px solid var(--border); }
.post-list a { font-weight: 500; }
.prose { max-width: 680px; }
.avatar { border-radius: 50%; float: right; margin: 0 0 16px 16px; }
.email-cta { font-size: 1.25rem; font-weight: 500; }
