:root {
  --bg: #f6f7fb; --card: #fff; --text: #14161c; --muted: #6b7280; --line: #e5e7ee;
  --accent: #6c5ce7; --yes: #16a34a; --no: #dc2626; --warn: #d97706;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f1115; --card: #181b22; --text: #eceef3; --muted: #9aa1b2; --line: #272b35; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--accent); text-decoration: none; }
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.2; }
h2 { font-size: 1.1rem; margin-top: 1.5rem; }
.wrap { max-width: 640px; margin: 0 auto; padding: 0 16px calc(32px + env(safe-area-inset-bottom)); }
header.top { position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
header.top .wrap { display: flex; align-items: center; gap: 12px; padding-block: 10px; padding-bottom: 10px; }
.brand { font-weight: 800; font-size: 1.15rem; color: var(--text); }
nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
nav a { padding: 6px 10px; border-radius: 8px; color: var(--muted); font-weight: 600; }
nav a.on { background: var(--card); color: var(--text); box-shadow: 0 0 0 1px var(--line); }
.karma { font-weight: 700; font-size: .85rem; padding: 4px 10px; border-radius: 99px; background: var(--card); box-shadow: 0 0 0 1px var(--line); white-space: nowrap; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin: 10px 0; }
.muted { color: var(--muted); font-size: .9rem; }
.tag { display: inline-block; font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.tag.private { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.q { font-size: 1.2rem; font-weight: 650; margin: 8px 0 12px; overflow-wrap: anywhere; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.spread { justify-content: space-between; }
button, .btn { font: inherit; font-weight: 700; border: 0; border-radius: 10px; padding: 10px 16px; cursor: pointer; background: var(--accent); color: #fff; }
button.ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
button.small { padding: 5px 10px; font-size: .85rem; }
button:disabled { opacity: .45; cursor: not-allowed; }
.answers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.answers .yes { background: var(--yes); font-size: 1.15rem; padding: 14px; }
.answers .no { background: var(--no); font-size: 1.15rem; padding: 14px; }
.answers .report { grid-column: 1 / -1; background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); font-weight: 600; padding: 7px; }
.timer { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; margin-bottom: 4px; }
.timer i { display: block; height: 100%; background: var(--accent); transition: width .5s linear; }
.bar { display: flex; height: 26px; border-radius: 8px; overflow: hidden; background: var(--line); font-size: .8rem; font-weight: 700; color: #fff; }
.bar span { display: flex; align-items: center; padding: 0 8px; min-width: 0; }
.bar .y { background: var(--yes); } .bar .n { background: var(--no); }
input, textarea, select { font: inherit; width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
label { display: block; font-weight: 600; font-size: .9rem; margin: 10px 0 4px; }
.stack > * + * { margin-top: 10px; }
.hero { text-align: center; padding: 48px 0 8px; }
.hero h1 { font-size: 2.2rem; }
.empty { text-align: center; color: var(--muted); padding: 24px 0; }
#toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 600; z-index: 10; max-width: 90vw; }
code.link { display: block; padding: 8px 10px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); overflow-wrap: anywhere; font-size: .85rem; }
.landing { padding-top: 16px; }
.actions > button { flex: 1; }
.btn { display: block; text-align: center; }
a.btn.ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
a.q { display: block; color: inherit; text-decoration: none; }
a.q:hover { text-decoration: underline; }
.demo .q { margin-bottom: 8px; }
.pitch { text-align: center; padding: 16px 0 4px; }
.pitch h1 { font-size: 1.6rem; }
.privacy p { margin: 6px 0 0; }
.foot { text-align: center; color: var(--muted); font-size: .9rem; padding: 8px 16px calc(24px + env(safe-area-inset-bottom)); }
