/* ===========================================================================
   „10 Години МАКСИМА" — the quiz.

   Loaded only on /kviz, after style.css, so every token, the type, the focus
   ring and the reduced-motion rule are already in force. Nothing is redefined
   here that the site already defines: no colours of its own, no second easing
   curve, no second font. The stand-alone version had all three, which is why
   it read as a different product.
   =========================================================================== */

.mx-kviz{position:relative;padding:var(--mx-y) 0 calc(var(--mx-y) + 20px)}
.mx-kviz-inner{max-width:620px}

.mx-kviz-confetti{position:fixed;inset:0;z-index:99;pointer-events:none}

/* ── head: the badge and the progress rail ─────────────────────────────── */
.mx-kviz-head{display:flex;align-items:center;justify-content:space-between;gap:16px;
  margin-bottom:18px}
.mx-kviz-badge{display:inline-flex;align-items:center;gap:8px;padding:7px 14px;
  color:#4A2E00;background:linear-gradient(135deg,var(--gold),var(--gold-l));
  border-radius:999px;font-family:'Onest',sans-serif;font-size:12px;font-weight:800;
  letter-spacing:.06em;text-transform:uppercase;box-shadow:0 6px 16px -8px rgba(232,163,43,.9)}
.mx-kviz-dots{display:flex;gap:6px}
.mx-kviz-dots b{width:26px;height:5px;border-radius:99px;background:rgba(91,33,122,.16);
  transition:background .3s var(--ease)}
.mx-kviz-dots b.on{background:var(--pur)}
.mx-kviz-dots b.done{background:var(--gold)}

/* ── the card ──────────────────────────────────────────────────────────── */
.mx-kviz-card{padding:clamp(24px,4vw,40px);background:var(--paper);
  border:1px solid var(--line);border-radius:28px;box-shadow:var(--sh)}
.mx-kviz-screen{display:none}
.mx-kviz-screen.on{display:block;animation:mx-kviz-in .34s var(--ease) both}
/* `hidden` wins over `.on` whatever order they end up in: a screen that is out of
   the tab order must never be on the page. */
.mx-kviz-screen[hidden]{display:none}
@keyframes mx-kviz-in{from{opacity:0;translate:0 12px}to{opacity:1;translate:0 0}}

.mx-kviz h1{margin:6px 0 12px;font-family:'Onest',sans-serif;color:var(--pur-d);
  font-size:clamp(28px,4.4vw,42px);font-weight:800;line-height:1.02;letter-spacing:-.035em;
  text-wrap:balance}
.mx-kviz h2{margin:6px 0 18px;font-family:'Onest',sans-serif;color:var(--pur-d);
  font-size:clamp(21px,2.6vw,28px);font-weight:800;line-height:1.2;letter-spacing:-.02em;
  text-wrap:balance}
.mx-kviz-sub{max-width:52ch;color:var(--ink-2);font-size:15.5px;line-height:1.65;
  margin:0 0 22px;text-wrap:pretty}
/* --muted is 3.91:1 on the white card, and this is 12.5px: --ink-2 is 7.93:1. */
.mx-kviz-fine{margin:14px 0 0;color:var(--ink-2);font-size:12.5px;text-align:center}

/* ── fields ────────────────────────────────────────────────────────────── */
.mx-kviz-field{margin-bottom:18px}
.mx-kviz-field label{display:block;margin-bottom:7px;font-family:'Onest',sans-serif;
  color:var(--ink);font-size:13.5px;font-weight:800}
.mx-kviz-field input{width:100%;padding:14px 16px;color:var(--ink);font-family:inherit;
  font-size:16.5px;background:#FCFAFE;border:2px solid rgba(91,33,122,.14);border-radius:14px;
  transition:border-color .2s,background .2s}
.mx-kviz-field input:focus{border-color:var(--pur-l);background:var(--paper);outline:none}
.mx-kviz-field input.mx-bad{border-color:var(--no)}
.mx-kviz-err{margin:8px 0 0;color:var(--no);font-size:13px;font-weight:700}

/* ── consent ───────────────────────────────────────────────────────────────
   The tick is a real 22px target, not a 13px one: this is the control the whole
   lawful basis rests on and it is pressed with a thumb. */
.mx-kviz-consent{margin-top:22px}
.mx-kviz-consent label{display:flex;align-items:flex-start;gap:11px;margin-bottom:0;
  font-size:13.5px;font-weight:600;line-height:1.5;color:var(--ink-2);cursor:pointer}
.mx-kviz-consent input[type=checkbox]{flex:0 0 auto;width:22px;height:22px;margin-top:1px;
  accent-color:var(--pur);cursor:pointer}
.mx-kviz-consent input[type=checkbox]:focus-visible{outline:3px solid var(--pur-l);outline-offset:2px}
.mx-kviz-consent input[type=checkbox].mx-bad{outline:3px solid var(--no);outline-offset:2px}
.mx-kviz-fine a{color:var(--pur);font-weight:700;text-decoration:underline;text-underline-offset:2px}
.mx-kviz-fine a:hover{color:var(--pur-d)}

/* ── buttons ───────────────────────────────────────────────────────────── */
.mx-kviz-btn{display:block;width:100%;padding:16px;color:#fff;font-family:'Onest',sans-serif;
  font-size:16.5px;font-weight:800;text-align:center;text-decoration:none;cursor:pointer;
  background:linear-gradient(135deg,var(--pur),var(--pur-l));border:0;border-radius:16px;
  box-shadow:0 14px 30px -16px rgba(91,33,122,.9);transition:transform .18s var(--ease),filter .2s}
.mx-kviz-btn:hover{filter:brightness(1.06);transform:translateY(-2px)}
.mx-kviz-btn[disabled]{opacity:.45;cursor:default;box-shadow:none;transform:none;filter:none}
.mx-kviz-btn--gold{color:#4A2E00;background:linear-gradient(135deg,var(--gold),var(--gold-l));
  box-shadow:0 14px 30px -16px rgba(232,163,43,.95)}
.mx-kviz-btn--ghost{margin-top:12px;color:var(--pur);background:none;box-shadow:none;
  font-size:14.5px;font-weight:700;text-decoration:underline;text-underline-offset:3px}
.mx-kviz-btn--ghost:hover{color:var(--pur-d);transform:none;filter:none}
.mx-kviz-next{margin-top:18px}

/* ── answers ───────────────────────────────────────────────────────────── */
.mx-kviz-opts{display:grid;gap:10px}
.mx-kviz-opt{display:flex;align-items:center;gap:13px;width:100%;padding:15px 16px;
  color:var(--ink);font-family:inherit;font-size:16.5px;font-weight:600;text-align:left;
  background:#FCFAFE;border:2px solid rgba(91,33,122,.12);border-radius:15px;cursor:pointer;
  transition:border-color .18s,background .18s,transform .18s var(--ease)}
.mx-kviz-opt:hover{border-color:var(--pur-l);transform:translateY(-2px)}
.mx-kviz-key{flex:0 0 32px;height:32px;display:grid;place-items:center;border-radius:10px;
  color:var(--pur);background:rgba(91,33,122,.09);font-family:'Onest',sans-serif;
  font-size:14px;font-weight:800}
.mx-kviz-opt.is-ok{border-color:var(--ok);background:#EAF7EF}
.mx-kviz-opt.is-ok .mx-kviz-key{color:#fff;background:var(--ok)}
.mx-kviz-opt.is-no{border-color:var(--no);background:#FDEDEC}
.mx-kviz-opt.is-no .mx-kviz-key{color:#fff;background:var(--no)}
.mx-kviz-opt[disabled]{cursor:default;transform:none}
.mx-kviz-fb{min-height:24px;margin:14px 0 0;font-size:15px;font-weight:700}
.mx-kviz-fb.is-ok{color:var(--ok)}
.mx-kviz-fb.is-no{color:var(--no)}

/* ── the languages, wearing the same landmarks as the junction ─────────── */
.mx-kviz-langs{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px}
.mx-kviz-lang{display:flex;align-items:center;gap:11px;padding:13px 15px;color:var(--ink);
  font-family:'Onest',sans-serif;font-size:15px;font-weight:700;text-align:left;
  background:#FCFAFE;border:2px solid rgba(91,33,122,.12);border-radius:15px;cursor:pointer;
  transition:border-color .18s,background .18s,transform .18s var(--ease)}
.mx-kviz-lang:hover{border-color:var(--pur-l);transform:translateY(-2px)}
.mx-kviz-mark{flex:0 0 32px;height:32px;display:grid;place-items:center;border-radius:10px;
  background:rgba(91,33,122,.09)}
.mx-kviz-mark svg{width:21px;height:21px;fill:var(--pur)}
.mx-kviz-mark i{color:var(--pur);font-size:15px}

/* ── gifts ─────────────────────────────────────────────────────────────── */
.mx-kviz-gifts{display:grid;gap:11px;margin-bottom:22px}
.mx-kviz-gift{display:flex;align-items:center;gap:14px;width:100%;padding:15px 16px;
  text-align:left;background:#FCFAFE;border:2px solid rgba(91,33,122,.12);border-radius:16px;
  cursor:pointer;transition:border-color .18s,background .18s,transform .18s var(--ease)}
.mx-kviz-gift:hover{border-color:var(--pur-l);transform:translateY(-2px)}
.mx-kviz-gift[aria-pressed="true"]{border-color:var(--pur);background:#F6EFFB}
.mx-kviz-gift-icn{flex:0 0 46px;height:46px;display:grid;place-items:center;border-radius:14px;
  color:#fff;background:linear-gradient(135deg,var(--pur),var(--pur-l));font-size:18px}
/* Block, not inline: as inline spans the title and the description ran together
   into one line of text — „Бесплатен учебникУчебникот е на наша сметка". */
.mx-kviz-gift-txt{display:block;min-width:0}
.mx-kviz-gift-txt strong{display:block;font-family:'Onest',sans-serif;color:var(--ink);
  font-size:16px;font-weight:800;line-height:1.25}
.mx-kviz-gift-txt small{display:block;margin-top:3px;color:var(--ink-2);font-size:13px}

/* ── the ticket and the scratch panel ──────────────────────────────────── */
.mx-kviz-ticket{padding:20px;margin-bottom:16px;border:2px dashed var(--gold);border-radius:20px;
  background:linear-gradient(160deg,#FFF8EC,var(--paper))}
.mx-kviz-trow{display:flex;justify-content:space-between;gap:12px;padding:8px 0;font-size:14px;
  border-bottom:1px solid rgba(232,163,43,.22)}
.mx-kviz-trow:last-of-type{border-bottom:0}
.mx-kviz-trow span:first-child{color:var(--ink-2)}
.mx-kviz-trow span:last-child{font-weight:800;text-align:right}

.mx-kviz-scratchbox{position:relative;height:126px;margin:14px 0 8px;border-radius:16px;
  overflow:hidden;background:var(--paper)}
.mx-kviz-codeface{position:absolute;inset:0;display:grid;place-content:center;gap:5px;
  justify-items:center;background:linear-gradient(135deg,#F6EFFB,var(--paper))}
.mx-kviz-codelabel{display:block;color:var(--ink-2);font-size:11px;font-weight:800;
  letter-spacing:.18em;text-transform:uppercase}
.mx-kviz-code{display:block;color:var(--pur-d);font-family:Consolas,ui-monospace,monospace;
  font-size:clamp(26px,5vw,34px);font-weight:900;letter-spacing:.14em}
.mx-kviz-scratch{position:absolute;inset:0;width:100%;height:100%;touch-action:none;cursor:grab}
.mx-kviz-hint{margin:0;color:var(--ink-2);font-size:13px;text-align:center}

.mx-kviz-ticket--done{display:grid;justify-items:center;gap:6px;text-align:center}
.mx-kviz-until{color:var(--ink-2);font-size:13px}
.mx-kviz-tick{display:grid;width:64px;height:64px;place-items:center;margin:0 auto 18px;
  color:#fff;background:var(--ok);border-radius:50%;font-size:24px;
  box-shadow:0 0 0 10px rgba(46,158,91,.12)}

.mx-kviz-note{margin:18px 0 0;padding:13px 15px;color:#6A4E12;background:#FFF7E6;
  border:1px solid #F3DFB0;border-radius:14px;font-size:13.5px;line-height:1.55}

/* „（по избор）" beside a label. Quiet enough not to compete with the field name, dark enough
   to clear 4.5:1 on the card — a child deciding whether to skip a box has to be able to read it. */
.mx-kviz-opt-tag{font-weight:500;font-size:12.5px;color:#6B6470;letter-spacing:.01em}

/* The gift line on the ticket before it is scratched. Wide tracking so „? ? ?" reads as a
   deliberate blank rather than a value that failed to load. */
.mx-kviz-trow [data-mx-t-gift]{letter-spacing:.06em}

/* ── the demo banner ───────────────────────────────────────────────────── */
.mx-kviz-demo{display:flex;align-items:flex-start;gap:12px;margin:20px 0 0;padding:15px 17px;
  color:#7A3B12;background:#FFF1E4;border:1px solid #F0C9A8;border-radius:16px;
  font-size:13.5px;line-height:1.6}
.mx-kviz-demo i{margin-top:2px;color:#C4661F;font-size:15px}

/* ── focus, last as always ─────────────────────────────────────────────── */
.mx-kviz :is(button,a,input):focus-visible{outline:3px solid var(--pur);outline-offset:3px}
.mx-kviz-btn--gold:focus-visible{outline-color:var(--pur-d)}

@media(max-width:575.98px){
  .mx-kviz-card{padding:22px 18px;border-radius:22px}
  .mx-kviz-head{flex-direction:column;align-items:flex-start;gap:10px}
  .mx-kviz-langs{grid-template-columns:1fr 1fr}
  .mx-kviz :is(button,a,input):focus-visible{outline-width:2px;outline-offset:2px}
}
