/* ---------- Quiz & brain batch (gq) ---------- */
.gq-intro { text-align: center; padding: 18px 8px 10px; }
.gq-intro h2 { margin: 6px 0 8px; font-size: 1.3rem; }
.gq-intro p { color: var(--ink-2, #374151); margin: 0 auto 12px; max-width: 440px; }
.gq-intro-emoji { font-size: 3rem; line-height: 1; }
.gq-intro-best { font-size: .95rem; }
.gq-intro-best i { color: #f59e0b; }
.gq-intro .btn { min-height: 46px; padding-left: 26px; padding-right: 26px; margin-top: 4px; }
.gq-intro .btn i { margin-right: 6px; }

.gq-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: 600; font-size: .92rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.gq-time b { color: var(--ink); font-size: 1.05rem; }
.gq-hurry .gq-time, .gq-hurry .gq-time b { color: #dc2626; }
.gq-bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin: 8px 0 14px; }
.gq-bar i { display: block; height: 100%; background: var(--c, #2563eb); transform-origin: left center; transform: scaleX(1); }
.gq-hurry .gq-bar i { background: #dc2626; }
.gq-bar-off { opacity: .35; }

/* quiz */
.gq-q { font-size: clamp(1.08rem, 3.6vw, 1.3rem); line-height: 1.45; margin: 0 0 14px; outline: none; }
.gq-opts { display: grid; gap: 10px; }
@media (min-width: 620px) { .gq-opts { grid-template-columns: 1fr 1fr; } }
.gq-opt { display: flex; align-items: center; gap: 10px; min-height: 52px; width: 100%; text-align: left; font: inherit; font-weight: 600; color: var(--ink); background: var(--surface); border: 2px solid var(--border); border-radius: 14px; padding: 8px 12px; cursor: pointer; transition: border-color .15s, background .15s; }
.gq-opt:hover:not(:disabled) { border-color: var(--c, #2563eb); }
.gq-opt:disabled { cursor: default; }
.gq-key { flex: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); font-size: .85rem; }
.gq-txt { flex: 1; line-height: 1.35; }
.gq-mark { flex: none; font-size: 1.1rem; }
.gq-opt.is-ok { border-color: #16a34a; background: color-mix(in srgb, #16a34a 12%, var(--surface)); }
.gq-opt.is-ok .gq-key, .gq-opt.is-ok .gq-mark { color: #16a34a; }
.gq-opt.is-bad { border-color: #dc2626; background: color-mix(in srgb, #dc2626 10%, var(--surface)); }
.gq-opt.is-bad .gq-key, .gq-opt.is-bad .gq-mark { color: #dc2626; }
.gq-opt:disabled:not(.is-ok):not(.is-bad) { opacity: .6; }
.gq-fb { min-height: 8px; }
.gq-fb-in { margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border-left: 4px solid #16a34a; animation: g-fade .2s ease; }
.gq-fb-in.bad { border-left-color: #dc2626; }
.gq-fb-in p { margin: 6px 0 10px; color: var(--ink-2, #374151); line-height: 1.5; }
.gq-ok { color: #15803d; }
.gq-bad { color: #b91c1c; }
html.dark .gq-ok { color: #4ade80; }
html.dark .gq-bad { color: #f87171; }
.gq-streak { font-size: .85rem; font-weight: 600; color: #c2410c; margin-left: 4px; }
html.dark .gq-streak { color: #fb923c; }
.gq-next { min-height: 42px; }
.gq-next i { margin-left: 4px; }

.gq-end { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 16px; }
.gq-end-score { background: var(--surface-2); border-radius: 14px; padding: 12px 6px; text-align: center; }
.gq-end-score b { display: block; font-size: 1.45rem; color: var(--c, #2563eb); font-variant-numeric: tabular-nums; }
.gq-end-score span { font-size: .8rem; color: var(--muted); }
.gq-rev-h { font-size: 1.05rem; margin: 0 0 8px; }
.gq-review { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.gq-review li { border: 1px solid var(--border); border-left: 4px solid #16a34a; border-radius: 12px; padding: 10px 12px; }
.gq-review li.bad { border-left-color: #dc2626; }
.gq-review p { margin: 2px 0; font-size: .92rem; line-height: 1.45; }
.gq-rq { font-weight: 600; display: flex; gap: 8px; }
.gq-ic { flex: none; font-weight: 700; color: #16a34a; }
.bad .gq-ic { color: #dc2626; }
.gq-ra { color: var(--ink-2, #374151); }
.gq-ra s { color: #b91c1c; }
html.dark .gq-ra s { color: #f87171; }
.gq-rx { color: var(--muted); }
.gq-end-btns { text-align: center; margin-top: 14px; }
.gq-end-btns .btn i { margin-right: 6px; }

/* reaction time */
.gq-rt-pad { width: 100%; min-height: 260px; border: 0; border-radius: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 18px; font: inherit; color: #fff; cursor: pointer; touch-action: manipulation; background: #1e40af; transition: background-color .08s; -webkit-tap-highlight-color: transparent; }
.gq-rt-pad[data-s="wait"] { background: #b91c1c; }
.gq-rt-pad[data-s="go"] { background: #15803d; }
.gq-rt-pad[data-s="early"] { background: #c2410c; }
.gq-rt-pad[data-s="result"], .gq-rt-pad[data-s="done"] { background: #334155; }
.gq-rt-ic { font-size: 2.4rem; line-height: 1; }
.gq-rt-big { font-size: clamp(1.5rem, 6vw, 2.2rem); font-weight: 800; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.gq-rt-small { font-size: .95rem; opacity: .92; max-width: 340px; text-align: center; }
.gq-rt-pad:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; }
.gq-rt-rounds { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.gq-rt-rounds li { background: var(--surface-2); border-radius: 10px; text-align: center; padding: 6px 2px; font-variant-numeric: tabular-nums; }
.gq-rt-rounds span { display: block; font-size: .72rem; color: var(--muted); }
.gq-rt-rounds b { font-size: .9rem; }
.gq-rt-rounds li.on b { color: var(--c, #0d9488); }
.gq-rt-chart { margin-top: 16px; }
.gq-rt-chart h3 { font-size: 1rem; margin: 0 0 30px; }
.gq-rt-scale { position: relative; height: 34px; border-radius: 10px; overflow: visible; background: var(--surface-2); }
.gq-rt-band { position: absolute; top: 0; bottom: 0; display: grid; place-items: center; font-size: .7rem; font-weight: 600; color: #0f172a; overflow: hidden; text-align: center; line-height: 1.1; padding: 0 2px; }
.gq-rt-band.b1 { background: #86efac; border-radius: 10px 0 0 10px; }
.gq-rt-band.b2 { background: #bef264; }
.gq-rt-band.b3 { background: #fde68a; }
.gq-rt-band.b4 { background: #fecaca; border-radius: 0 10px 10px 0; }
.gq-rt-mk { position: absolute; top: -6px; bottom: -6px; width: 3px; margin-left: -1.5px; background: #0f172a; border-radius: 2px; }
html.dark .gq-rt-mk { background: #f8fafc; }
.gq-rt-mk b { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: .74rem; padding: 1px 6px; border-radius: 6px; background: #0f172a; color: #fff; margin-bottom: 2px; }
.gq-rt-mk.best { background: #b45309; }
.gq-rt-mk.best b { background: #b45309; bottom: auto; top: 100%; margin: 2px 0 0; }
.gq-rt-mk.you b { background: var(--c, #0d9488); }
.gq-rt-ticks { position: relative; height: 26px; margin-top: 24px; font-size: .7rem; color: var(--muted); }
.gq-rt-ticks span { position: absolute; top: 4px; transform: translateX(-50%); }
.gq-rt-ticks span:first-child { transform: none; }
.gq-rt-ticks span:last-child { transform: translateX(-100%); }
.gq-rt-note { font-size: .84rem; color: var(--muted); margin: 6px 0 0; }

/* maths speed */
.gq-ms-prob { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: clamp(2rem, 9vw, 2.8rem); font-weight: 800; font-variant-numeric: tabular-nums; padding: 14px 6px; border-radius: 16px; background: var(--surface-2); margin-bottom: 12px; flex-wrap: wrap; }
.gq-ms-q { display: flex; gap: 10px; }
.gq-op { color: var(--c, #0d9488); }
.gq-ms-ans { min-width: 2.4em; text-align: center; border-bottom: 4px solid var(--c, #0d9488); padding: 0 6px; }
.gq-ms-ans.empty { color: var(--muted); opacity: .5; }
.gq-ms-prob.ok { animation: gq-ok .35s ease; }
.gq-ms-prob.bad { animation: gq-shake .35s ease; }
@keyframes gq-ok { 0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, .6); } 100% { box-shadow: 0 0 0 14px rgba(22, 163, 74, 0); } }
@keyframes gq-shake { 0%, 100% { transform: none; } 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
@media (prefers-reduced-motion: reduce) { .gq-ms-prob.ok, .gq-ms-prob.bad, .gq-cf-card.bad { animation: none; } }
.gq-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 360px; margin: 0 auto; touch-action: manipulation; }
.gq-pad button { min-height: 56px; font: inherit; font-size: 1.4rem; font-weight: 700; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.gq-pad button:active { background: var(--surface-2); transform: scale(.97); }
.gq-pad button[data-k="del"], .gq-pad button[data-k="skip"] { color: var(--muted); font-size: 1.15rem; }

/* colour focus */
.gq-cf-opt { display: flex; justify-content: center; margin: -4px 0 12px; }
.gq-cf-opt .g-btn { font-size: .88rem; }
.gq-cf-demo, .gq-cf-card { background: #1f2937; border-radius: 18px; display: grid; place-items: center; padding: 18px 10px; margin: 6px auto 12px; }
.gq-cf-demo { max-width: 320px; padding: 12px; }
.gq-cf-card { min-height: 150px; }
.gq-cf-card.bad { animation: gq-shake .3s ease; }
.gq-cf-word { font-size: clamp(2.2rem, 11vw, 3.4rem); font-weight: 900; letter-spacing: .03em; line-height: 1.15; display: inline-flex; align-items: center; gap: .3em; }
.gq-cf-demo .gq-cf-word { font-size: 2rem; }
.gq-sh { font-style: normal; font-size: .7em; }
.gq-cf-btns { display: grid; grid-template-columns: repeat(var(--n, 3), 1fr); gap: 8px; }
@media (max-width: 520px) { .gq-cf-btns { grid-template-columns: repeat(min(var(--n, 3), 3), 1fr); } }
.gq-cf-btn { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 76px; padding: 10px 4px 8px; font: inherit; font-weight: 700; font-size: .92rem; color: var(--ink); background: var(--surface); border: 2px solid var(--border); border-radius: 14px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.gq-cf-btn:hover { border-color: var(--c, #0d9488); }
.gq-cf-btn:active { transform: scale(.97); }
.gq-sw { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #111827; font-size: 1.2rem; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .12); }
.gq-cbmode .gq-sw { border-radius: 8px; background: transparent !important; box-shadow: none; }
.gq-cbmode .gq-cf-btn .gq-sw { font-size: 1.8rem; -webkit-text-stroke: 1px rgba(0, 0, 0, .45); }
.gq-cf-btn kbd { position: absolute; top: 4px; right: 6px; font: inherit; font-size: .68rem; color: var(--muted); font-weight: 600; }
@media (hover: none) { .gq-cf-btn kbd { display: none; } }
.gq-cf-fb { min-height: 1.4em; }
