/* ================================================================
   Practice Quiz (practice.html) — topic picker, one question at a time,
   explanations for every option, the "still wrong" list and retry rounds.
   Colours come from be-shell.css (--purple, --ink, --muted, --card, --line).
   ================================================================ */
.pq-hero { padding: 40px 0 18px; }
.pq-kicker { display: inline-block; font-size: .8125rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
             color: var(--purple); background: rgba(124,58,237,.08); border-radius: 999px; padding: 6px 12px; }
.pq-h1 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); font-weight: 800; margin: 14px 0 8px; line-height: 1.15; }
.pq-h1 .gg { background: linear-gradient(135deg, var(--purple), #ec4899); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pq-lead { color: var(--muted); font-size: 1.05rem; max-width: 640px; margin: 0; }

/* ---- topic picker ---- */
.pq-groups { display: grid; gap: 22px; padding: 14px 0 50px; }
.pq-group h2 { font-size: 1.05rem; font-weight: 800; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.pq-group h2 small { font-weight: 600; color: var(--muted); font-size: .8125rem; }
.pq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.pq-topic { display: flex; align-items: center; gap: 10px; text-align: left; background: var(--card); border: 1.5px solid var(--line);
            border-radius: 16px; padding: 12px 14px; cursor: pointer; font: inherit; color: var(--ink);
            transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.pq-topic:hover, .pq-topic:focus-visible { transform: translateY(-2px); border-color: var(--purple); box-shadow: var(--shadow); outline: none; }
.pq-topic .ic { font-size: 1.4rem; width: 34px; text-align: center; flex: none; }
.pq-topic b { display: block; font-size: .95rem; line-height: 1.25; }
.pq-topic small { color: var(--muted); font-size: .78rem; }
.pq-empty { color: var(--muted); padding: 30px 0; }

/* ---- the practice panel ---- */
.pq-panel { scroll-margin-top: 92px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: 22px; margin: 6px 0 50px; }
.pq-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.pq-top h2 { margin: 0; font-size: 1.25rem; font-weight: 800; }
.pq-top .meta { color: var(--muted); font-size: .875rem; }
.pq-round { display: inline-block; font-size: .75rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #b45309;
            background: #fff7ed; border: 1px solid #fed7aa; border-radius: 999px; padding: 3px 10px; margin-left: 8px; }
.pq-bar { height: 8px; border-radius: 999px; background: rgba(124,58,237,.12); overflow: hidden; margin-bottom: 18px; }
.pq-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--purple), #ec4899); transition: width .35s ease; }

.pq-q { font-size: 1.2rem; font-weight: 700; line-height: 1.5; margin: 0 0 14px; }
.pq-q .blank { display: inline-block; min-width: 3.2em; border-bottom: 3px dashed var(--purple); margin: 0 .15em; }
.pq-opts { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.pq-opt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--bg); border: 2px solid var(--line);
          border-radius: 14px; padding: 12px 14px; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; min-height: 52px;
          transition: border-color .15s ease, transform .15s ease, background .15s ease; }
.pq-opt .k { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 800;
             background: rgba(124,58,237,.1); color: var(--purple); }
.pq-opt:hover:not(:disabled), .pq-opt:focus-visible { border-color: var(--purple); transform: translateY(-1px); outline: none; }
.pq-opt:disabled { cursor: default; }
.pq-opt.is-right { border-color: #059669; background: #ecfdf5; }
.pq-opt.is-right .k { background: #059669; color: #fff; }
.pq-opt.is-wrong { border-color: #dc2626; background: #fef2f2; }
.pq-opt.is-wrong .k { background: #dc2626; color: #fff; }

.pq-fb { margin-top: 16px; border-radius: 16px; padding: 14px 16px; border: 1px solid var(--line); background: var(--bg); }
.pq-fb .verdict { font-weight: 800; font-size: 1.05rem; margin-bottom: 8px; }
.pq-fb .verdict.ok { color: #059669; }
.pq-fb .verdict.bad { color: #dc2626; }
.pq-fb .why { margin: 0 0 10px; line-height: 1.5; }
.pq-fb .why b { color: var(--purple); }
.pq-fb .others { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.pq-fb .others li { font-size: .9375rem; line-height: 1.45; color: var(--ink); padding-left: 1.4em; position: relative; }
.pq-fb .others li::before { content: "✗"; position: absolute; left: 0; color: #dc2626; font-weight: 800; }
.pq-fb .others li b { color: #b91c1c; }
.pq-fb .lbl { font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 10px 0 6px; }

.pq-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.pq-btn { border: 0; border-radius: 999px; padding: 11px 20px; font: inherit; font-weight: 700; cursor: pointer; color: #fff;
          background: linear-gradient(135deg, var(--purple), #ec4899); box-shadow: 0 10px 22px -10px rgba(124,58,237,.6);
          transition: transform .15s ease, box-shadow .15s ease; }
.pq-btn:hover { transform: translateY(-1px); box-shadow: 0 14px 26px -10px rgba(236,72,153,.55); }
.pq-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.pq-btn.ghost { background: transparent; color: var(--purple); box-shadow: none; border: 1.5px solid var(--line); }
.pq-btn.ghost:hover { border-color: var(--purple); }

/* ---- end of round ---- */
.pq-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 14px 0 18px; }
.pq-stat { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 12px; text-align: center; }
.pq-stat b { display: block; font-size: 1.6rem; font-weight: 800; color: var(--purple); line-height: 1.1; }
.pq-stat span { font-size: .78rem; color: var(--muted); font-weight: 600; }
.pq-wrong { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.pq-wrong li { background: #fff7f7; border: 1px solid #fecaca; border-radius: 14px; padding: 12px 14px; }
.pq-wrong .q { font-weight: 700; margin-bottom: 4px; }
.pq-wrong .a { font-size: .9rem; color: var(--ink); }
.pq-wrong .a b { color: #059669; }
.pq-wrong .a s { color: #b91c1c; }
.pq-wrong .a small { display: block; color: var(--muted); margin-top: 3px; }
.pq-done { text-align: center; padding: 18px 0 6px; }
.pq-done .big { font-size: 3rem; line-height: 1; }
.pq-done h3 { margin: 10px 0 4px; font-size: 1.4rem; font-weight: 800; }
.pq-done p { color: var(--muted); margin: 0 0 14px; }
.pq-note { color: var(--muted); font-size: .875rem; margin-top: 10px; }

@media (prefers-reduced-motion: reduce) { .pq-topic, .pq-opt, .pq-btn, .pq-bar i { transition: none; } }
@media (max-width: 560px) { .pq-panel { padding: 16px; scroll-margin-top: 80px; } .pq-q { font-size: 1.1rem; } .pq-opts { grid-template-columns: 1fr; } }
