:root {
  color-scheme: light dark;
  --bg: #f6f6fc; --panel: #ffffff; --fg: #15151f; --muted: #5b5e70; --line: rgba(90,80,150,.20); --soft: #f0eefb;
  --accent: #6d28d9; --accent2: #0f766e; --accent-fg: #ffffff;
  --ok: #15803d; --exp: #b45309; --no: #6b7280;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #101018; --panel: #181826; --fg: #f0f0f8; --muted: #a3a6bb; --line: rgba(170,160,255,.22); --soft: #1f1d33;
    --accent: #a78bfa; --accent2: #2dd4bf; --accent-fg: #0c0c14; --ok: #4ade80; --exp: #fbbf24; --no: #9ca3af; }
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; overflow-wrap: anywhere; background: var(--bg); color: var(--fg); font: 16px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--accent); }
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.top { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--line); background: var(--panel); }
html { scroll-padding-top: 72px; }
.top .wrap { display: flex; align-items: center; gap: 10px; height: 56px; }
.top a.brand { display: flex; align-items: center; gap: 8px; color: var(--fg); text-decoration: none; font-weight: 700; }
.top nav { margin-left: auto; display: flex; align-items: center; gap: 16px; font-size: 14px; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover { color: var(--fg); }
/* Buy Me a Coffee's own button colours: yellow, black text, black outline (no script, nothing loaded from them) */
.top nav a.nav-coffee { background: #FFDD00; color: #000000; border: 1px solid #000000; }
.top nav a.nav-coffee:hover { background: #FFE433; color: #000000; }
.top nav a.nav-coffee { border-radius: 999px; padding: 2px 10px; font-weight: 600; }
.hero { padding: 72px 0 40px; }
.hero h1 { font-size: clamp(30px, 5.5vw, 50px); line-height: 1.1; margin: 0 0 16px; letter-spacing: -.02em; max-width: 18ch;
  background: linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lede { font-size: 19px; color: var(--muted); max-width: 46ch; margin: 0 0 28px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.btn { display: inline-block; border-radius: 10px; padding: 12px 20px; font-weight: 600; text-decoration: none; border: 1px solid var(--line); color: var(--fg); background: var(--panel); }
.btn.primary { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.small { font-size: 14px; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin: 48px 0; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.card h2, .card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); }
.stores ul { list-style: none; padding: 0; margin: 16px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 8px; }
.stores li { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; white-space: nowrap; }
.stores li > span:first-child { overflow: hidden; text-overflow: ellipsis; }
.stores .tag { flex: none; font-size: 13px; font-weight: 600; }
.tag.working { color: var(--ok); } .tag.experimental { color: var(--exp); } .tag.planned { color: var(--no); }
.try { margin: 32px 0 0; }
.try > p { max-width: 70ch; }
.demo-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 16px 0; }
.demo-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.demo-form input, .demo-form select { font: inherit; font-size: 16px; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.demo-form input { width: 9ch; letter-spacing: .08em; }
.demo-form input:focus, .demo-form select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.demo-form .btn { font: inherit; font-weight: 600; cursor: pointer; }
.demo-out { display: grid; gap: 10px; }
.demo-out p { margin: 0; }
.demo-home { font-weight: 600; color: var(--fg) !important; }
.tier { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.tier-head { display: flex; justify-content: space-between; gap: 12px; }
.tier-head span { color: var(--muted); font-size: 14px; white-space: nowrap; }
.tier .pins { font-size: 14px; margin-top: 4px !important; overflow-wrap: anywhere; }
.demo-sum, .demo-note { font-size: 14px; }
.projects { margin: 0 0 48px; }
.projects h2 { font-size: 20px; margin: 0 0 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card.proj { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--fg); }
.card.proj p { flex: 1; }
.card.proj .go { font-size: 14px; color: var(--accent); }
.card.proj:hover { border-color: var(--accent); }
.shot { margin: 0 0 8px; }
.shot img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); display: block; }
.doc { padding-top: 48px; padding-bottom: 64px; max-width: 760px; }
.doc h1 { font-size: 34px; line-height: 1.2; margin: 0 0 8px; }
.doc h2 { font-size: 20px; margin: 32px 0 8px; }
.doc code { font: 14px ui-monospace, Menlo, monospace; background: var(--soft); padding: 1px 4px; border-radius: 4px; }
footer { border-top: 1px solid var(--line); padding: 24px 0 40px; font-size: 14px; color: var(--muted); }
footer p { margin: 0 0 8px; }
@media (max-width: 640px) { .grid, .grid3 { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .hero { padding-top: 40px; } .top nav { gap: 12px; } .top nav .wide { display: none; } }
