:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --ink: #1c2420;
  --muted: #5d6963;
  --line: #dcdcd3;
  --accent: #1f6b45;
  --accent-ink: #ffffff;
  --note: #eef3ec;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131714;
    --surface: #1b211d;
    --ink: #e9ede9;
    --muted: #a0aaa4;
    --line: #2f3832;
    --accent: #58b584;
    --accent-ink: #0d1510;
    --note: #1f2a23;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
img { max-width: 100%; height: auto; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }
header.site { border-bottom: 1px solid var(--line); background: var(--surface); }
header.site .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; padding-top: 14px; padding-bottom: 14px; }
.brand { font-weight: 700; font-size: 1.1rem; color: var(--ink); text-decoration: none; }
nav.main { display: flex; flex-wrap: wrap; gap: 4px 18px; }
nav.main a { color: var(--muted); text-decoration: none; }
nav.main a:hover, nav.main a[aria-current="page"] { color: var(--ink); text-decoration: underline; }
main { padding: 36px 0 56px; }
h1 { font-size: clamp(1.7rem, 4.5vw, 2.4rem); line-height: 1.2; margin: 0 0 12px; }
h2 { font-size: 1.35rem; margin: 40px 0 12px; }
h3 { font-size: 1.05rem; margin: 0 0 6px; }
p { margin: 0 0 14px; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; padding: 0; margin: 0; list-style: none; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.card a.title { color: var(--ink); font-weight: 650; text-decoration: none; }
.card a.title:hover { text-decoration: underline; }
.card p { color: var(--muted); margin: 0; font-size: 0.95rem; }
.card .meta { margin-top: auto; padding-top: 10px; font-weight: 650; }
.tag { display: inline-block; font-size: 0.78rem; letter-spacing: 0.03em; text-transform: uppercase; color: var(--muted); }
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); padding: 12px 22px; border-radius: 8px; font-weight: 650; text-decoration: none; border: 0; font-size: 1rem; cursor: pointer; }
.btn:hover { filter: brightness(1.08); }
.btn.disabled { background: var(--line); color: var(--muted); cursor: default; }
.buy { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 24px 0; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.buy .price { font-size: 1.6rem; font-weight: 700; }
.buy small { color: var(--muted); flex-basis: 100%; }
.note { background: var(--note); border-radius: var(--radius); padding: 14px 16px; font-size: 0.95rem; }
.previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 20px 0; }
.previews img { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.prose { max-width: 70ch; }
.prose ul, .prose ol { padding-left: 22px; }
.prose table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }
.empty { color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); padding: 24px; }
footer.site { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; padding: 24px 0 40px; }
footer.site a { color: var(--muted); }
footer.site .links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 8px; }
#order-status[data-state="error"] { color: #b3261e; }
.testbar { background: #7a4b00; color: #fff; text-align: center; padding: 6px 16px; font-size: 0.9rem; }
