:root {
  --bg: #0f1115; --card: #181b22; --inset: #11141a; --line: #2c3240; --text: #eef0f5; --muted: #a7b0c0;
  --accent: #8aa6ff; --accent-ink: #0b0d12; --good: #3ecf8e; --good-bg: #12291f; --bad: #ff7b7b; --bad-bg: #2c1517;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 16px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 18px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
main, footer { max-width: 720px; margin: 0 auto; padding: 0 16px; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
h2 { font-size: 1.4rem; margin: 0 0 12px; }
section { margin: 48px 0; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.hero { text-align: center; padding: 48px 0 8px; }
.logo { width: 76px; height: 76px; }
.brand { margin: 8px 0 0; font-weight: 800; font-size: 1.1rem; color: var(--accent); letter-spacing: .04em; }
.hero h1 { font-size: clamp(2rem, 8vw, 3rem); margin: 8px 0 12px; }
.lede { max-width: 540px; margin: 0 auto 24px; color: var(--muted); }

button, .btn { font: inherit; color: inherit; cursor: pointer; border-radius: 12px; }
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); border: 0; padding: 14px 22px; font-weight: 700; text-decoration: none; min-height: 48px; }
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .7; cursor: default; }
.btn.ghost { background: transparent; color: var(--text); border: 2px solid var(--accent); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; margin-bottom: 16px; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
.section-head h2 { margin: 0; }
.score { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--muted); font-size: .95rem; }
.score b { color: var(--text); }
.mini-die { width: 30px; height: 30px; }
.mini-die rect { fill: none; stroke: var(--accent); stroke-width: 6; }
.mini-die .pip { fill: var(--accent); opacity: 0; transition: opacity .2s; }
.mini-die .pip.on { opacity: 1; }

.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.concept { color: var(--accent); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.reroll { background: var(--inset); border: 1px solid var(--line); padding: 8px 14px; font-size: .95rem; min-height: 44px; }
.reroll:hover { border-color: var(--accent); }
.q { margin: 0 0 14px; font-size: 1.15rem; }
.opts { display: grid; grid-template-columns: 1fr; gap: 8px; }
.opts button { display: flex; align-items: center; gap: 12px; background: var(--inset); border: 2px solid var(--line); padding: 12px; text-align: left; min-height: 52px; }
.opts button:hover:not(:disabled) { border-color: var(--accent); }
.opts button:disabled { cursor: default; }
.opts .letter { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--line); font-size: .85rem; font-weight: 700; }
.opts .right { border-color: var(--good); background: var(--good-bg); }
.opts .wrong { border-color: var(--bad); background: var(--bad-bg); }
.feedback { margin: 12px 0 0; color: var(--muted); }
.feedback:empty { display: none; }
.feedback .ok { color: var(--good); }
.feedback .no { color: var(--bad); }
.link { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; font-weight: 600; }

.grid { display: grid; gap: 12px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.feature h3 { margin: 0 0 4px; font-size: 1.05rem; }
.feature p { margin: 0; color: var(--muted); font-size: .95rem; }
.honest { margin: 16px 0 0; text-align: center; color: var(--muted); font-style: italic; }

form { display: grid; gap: 8px; }
label { font-weight: 600; margin-top: 8px; }
input[type=email], select { width: 100%; font: inherit; color: var(--text); background: var(--inset); border: 2px solid var(--line); border-radius: 10px; padding: 12px; min-height: 50px; }
input[type=email]:focus, select:focus { border-color: var(--accent); }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); }
form .btn { margin-top: 12px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.error { color: var(--bad); margin: 4px 0 0; min-height: 0; }
.error:empty { display: none; }
.thanks h3 { margin: 0 0 4px; font-size: 1.3rem; }

.founding { border-style: dashed; }
.badge { display: inline-block; font-size: .78rem; font-weight: 700; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 2px 10px; margin-bottom: 8px; }
.perks { margin: 0 0 16px; padding-left: 1.2em; }

footer { padding-top: 24px; padding-bottom: 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; text-align: center; }
footer p { margin: 6px 0; }

.doc { padding-top: 32px; padding-bottom: 32px; }
.doc h1 { font-size: 2rem; }
.doc h2 { margin-top: 28px; font-size: 1.2rem; }

@media (min-width: 640px) {
  .opts { grid-template-columns: 1fr 1fr; }
  .grid { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
