/* Layout: one narrow column of single-question cards on a cool blue-grey ground; results are stacked cards with plain bars. */
:root{
  --bg:#EEF1F6; --surface:#FFFFFF; --ink:#101B33; --muted:#56637E; --line:#D3DAE8;
  --accent:#2B5CE6; --accent-ink:#FFFFFF; --soft:#E2E9FC; --good:#1E8E5A; --warn:#A86B0A; --bad:#C0392B;
  --display:"Avenir Next","Segoe UI Variable Display","Segoe UI",system-ui,sans-serif;
  --body:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  color-scheme:light;
}
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]){
    --bg:#0C1220; --surface:#151D31; --ink:#E8EDF8; --muted:#9AA6C2; --line:#26314D;
    --accent:#7EA2FF; --accent-ink:#0C1220; --soft:#1C2845; --good:#4CC38A; --warn:#E0B050; --bad:#FF8A7A;
    color-scheme:dark;
  }
}
:root[data-theme="dark"]{
  --bg:#0C1220; --surface:#151D31; --ink:#E8EDF8; --muted:#9AA6C2; --line:#26314D;
  --accent:#7EA2FF; --accent-ink:#0C1220; --soft:#1C2845; --good:#4CC38A; --warn:#E0B050; --bad:#FF8A7A;
  color-scheme:dark;
}
*{box-sizing:border-box}
html,body{margin:0}
body{
  background:var(--bg); color:var(--ink);
  font:16px/1.5 var(--body);
  padding-block:20px 40px;
  padding-left:max(16px,env(safe-area-inset-left,0px));
  padding-right:max(16px,env(safe-area-inset-right,0px));
}
.wrap{max-width:640px;margin:0 auto;display:flex;flex-direction:column;gap:16px;min-width:0}
.top{display:flex;align-items:center;justify-content:space-between;gap:12px}
.brand{font:600 .8rem/1 var(--body);letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.prog{height:6px;border-radius:99px;background:var(--line);overflow:hidden}
.prog>i{display:block;height:100%;width:0;background:var(--accent);border-radius:99px}
.card{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:22px 20px;display:flex;flex-direction:column;gap:16px;min-width:0}
.eyebrow{margin:0;font:600 .78rem/1 var(--body);letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
h1,h2{font-family:var(--display);margin:0;text-wrap:balance;letter-spacing:-.02em;line-height:1.1}
h1{font-size:clamp(1.9rem,7vw,2.6rem);font-weight:800}
h2{font-size:1.5rem;font-weight:800}
.bigname{font-size:clamp(2.3rem,10vw,3.6rem);font-weight:800;overflow-wrap:anywhere}
p{margin:0}
.q{font-size:1.1rem;font-weight:600}
.help{color:var(--muted);font-size:.95rem}
fieldset{border:0;padding:0;margin:0;min-width:0}
.sp{height:10px}
.opts{display:flex;flex-direction:column;gap:8px}
.opt{display:flex;align-items:center;gap:12px;padding:13px 14px;border:1.5px solid var(--line);border-radius:12px;cursor:pointer;background:var(--surface);min-height:48px}
.opt input{width:20px;height:20px;accent-color:var(--accent);flex:none;margin:0}
.opt span{min-width:0;overflow-wrap:anywhere}
.opt.on{border-color:var(--accent);background:var(--soft)}
.opt:focus-within{outline:3px solid var(--accent);outline-offset:2px}
.row{display:flex;gap:10px;flex-wrap:wrap}
.btn{font:600 1rem/1 var(--body);padding:14px 22px;border-radius:12px;border:1.5px solid var(--accent);background:var(--accent);color:var(--accent-ink);cursor:pointer;min-height:48px}
.btn.ghost{background:transparent;color:var(--accent)}
.btn:disabled{opacity:.45;cursor:not-allowed}
.btn:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
textarea,select,input[type=password],input[type=text]{width:100%;font:inherit;color:var(--ink);background:var(--surface);border:1.5px solid var(--line);border-radius:12px;padding:12px 14px}
textarea{min-height:96px;resize:vertical}
.list{margin:0;padding-left:1.2em;display:flex;flex-direction:column;gap:8px}
.note{font-size:.9rem;color:var(--muted)}
.foot{font-size:.85rem;color:var(--muted);text-align:center}
.foot a{color:var(--accent)}
.msg{padding:10px 12px;border-radius:10px;background:var(--soft);font-size:.95rem}
.msg.bad{color:var(--bad)}
.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:10px}
.stat{border:1px solid var(--line);border-radius:12px;padding:10px 12px;background:var(--surface)}
.stat b{display:block;font:800 1.6rem/1.1 var(--display)}
.stat span{font-size:.8rem;color:var(--muted)}
.res{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:16px;display:flex;flex-direction:column;gap:12px;min-width:0}
.res h3{margin:0;font:800 1.5rem/1.1 var(--display);overflow-wrap:anywhere}
.m{display:flex;flex-direction:column;gap:4px}
.m .l{display:flex;justify-content:space-between;gap:12px;font-size:.88rem}
.m .l b{font-variant-numeric:tabular-nums;font-weight:600}
.bar{height:8px;border-radius:99px;background:var(--line);overflow:hidden}
.bar>i{display:block;height:100%;width:0;border-radius:99px}
.bar.fav>i{background:var(--accent)}
.bar.tr>i{background:var(--good)}
.bar.sf>i{background:var(--warn)}
.bar.mis>i{background:var(--bad)}
details{font-size:.9rem}
summary{cursor:pointer;color:var(--muted)}
details ul{margin:8px 0 0;padding-left:1.2em}
@media (prefers-reduced-motion:no-preference){.prog>i{transition:width .25s ease}.bar>i{transition:width .3s ease}}

.tip{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:12px 14px;font-size:.95rem}
.tip summary{cursor:pointer;font-weight:600;min-height:24px}
.tip p{margin:10px 0 6px}
.tip ul{margin:0;padding-left:1.2em;display:flex;flex-direction:column;gap:6px}
