:root {
  --bg: #faf9f6;
  --surface: #ffffff;
  --surface-alt: #f4f1ea;
  --text: #1c1917;
  --muted: #57534e;
  --accent: #c45c26;
  --accent-soft: #fef3eb;
  --border: #e7e5e4;
  --code-bg: #f5f5f4;
  --radius: 10px;
}
[data-theme="dark"] {
  --bg: #141312;
  --surface: #1d1b19;
  --surface-alt: #262320;
  --text: #f5f5f4;
  --muted: #a8a29e;
  --accent: #ea8c55;
  --accent-soft: #2e2018;
  --border: #2e2b28;
  --code-bg: #262421;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 1.25rem; }
header.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.nav-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; height: 60px;
}
.brand {
  display: flex; align-items: center; gap: 0.6rem;
  font-weight: 700; color: var(--text); font-size: 1.02rem;
}
.brand:hover { text-decoration: none; }
nav.site-nav { display: flex; align-items: center; gap: 1.1rem; font-size: 0.93rem; }
nav.site-nav a { color: var(--muted); font-weight: 500; }
nav.site-nav a.active, nav.site-nav a:hover { color: var(--accent); text-decoration: none; }
.theme-btn {
  border: 1px solid var(--border); background: var(--surface-alt);
  color: var(--text); border-radius: 6px; padding: 0.3rem 0.6rem;
  cursor: pointer; font-size: 0.82rem;
}
main { padding: 2.25rem 0 4rem; }
.hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.75rem;
}
.badge {
  display: inline-block; font-size: 0.78rem; font-weight: 600;
  color: var(--accent); background: var(--accent-soft);
  padding: 0.2rem 0.6rem; border-radius: 999px; margin-bottom: 0.75rem;
}
.hero h1 { margin: 0 0 0.6rem; font-size: 1.85rem; line-height: 1.25; letter-spacing: -0.02em; }
.hero p { margin: 0; color: var(--muted); max-width: 66ch; }
.grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem; margin-bottom: 1.75rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  display: flex; flex-direction: column; justify-content: space-between;
}
.card h2, .card h3 { margin: 0 0 0.45rem; font-size: 1.1rem; }
.card p { margin: 0 0 0.9rem; color: var(--muted); font-size: 0.94rem; }
.meta { font-size: 0.82rem; color: var(--muted); }
article.prose {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}
article.prose h1 { margin-top: 0; font-size: 1.75rem; line-height: 1.28; }
article.prose h2 { margin-top: 1.8rem; font-size: 1.25rem; border-bottom: 1px solid var(--border); padding-bottom: 0.35rem; }
pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
  font-size: 0.87rem;
  line-height: 1.55;
}
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: var(--code-bg);
  padding: 0.12rem 0.35rem;
  border-radius: 4px;
  font-size: 0.88em;
}
pre code { background: none; padding: 0; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.25rem; }
.filter-btn {
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  padding: 0.35rem 0.75rem; border-radius: 999px; cursor: pointer; font-size: 0.85rem;
}
.filter-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.copy-btn {
  border: 1px solid var(--border); background: var(--surface-alt); color: var(--text);
  padding: 0.25rem 0.6rem; border-radius: 6px; cursor: pointer; font-size: 0.8rem;
}
.prompt-head { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; }
footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.75rem 0;
  color: var(--muted);
  font-size: 0.86rem;
}
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; }
@media (max-width: 640px) {
  .nav-row { flex-wrap: wrap; height: auto; padding: 0.75rem 0; }
  article.prose, .hero { padding: 1.35rem; }
}
