/* ═══════════════════════════════════════════════════════
   EU AI Act Exposure Quiz — deck styling
   Vars & type inherit from shared.css (navy #0F1C2E, blue #2563EB)
   Mobile-first · WCAG AA · no framework
   ═══════════════════════════════════════════════════════ */

.quiz-landing,
.quiz-deck,
.quiz-seo { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── landing ── */
/* ── fixed-header clearance: topbar 36px + nav ≈76px (site-wide fixed stack) ── */
.quiz-landing {
  padding: 200px 0 64px;
  background:
    radial-gradient(600px 300px at 85% -10%, rgba(37, 99, 235, .08), transparent 70%),
    linear-gradient(180deg, #F8F9FA 0%, #ffffff 100%);
  border-bottom: 1px solid var(--border-light);
}
.quiz-landing__inner { max-width: 760px; text-align: center; }
.quiz-eyebrow {
  display: inline-block;
  font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--blue); background: rgba(37, 99, 235, .08);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 20px;
}
.quiz-landing h1 {
  font-size: clamp(1.9rem, 4.5vw, 3rem); line-height: 1.15;
  font-weight: 800; color: var(--navy); letter-spacing: -.02em; margin-bottom: 16px;
}
.quiz-landing__sub { font-size: 1.1rem; color: var(--text-secondary); max-width: 620px; margin: 0 auto 28px; }
.quiz-landing__actions { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; }
.quiz-landing__start { font-size: 1.05rem; padding: 14px 32px; }
.quiz-landing__meta { font-size: .9rem; color: var(--text-muted); }
.quiz-noscript { margin-top: 24px; padding: 16px 20px; background: #FEF3C7; border-radius: var(--radius-sm); color: #78350F; }

/* ── deck shell ── */
.quiz-deck {
  padding: 170px 0 72px;
  padding-inline: 16px;
  scroll-margin-top: 130px;
  outline: none;
}
.quiz-deck[hidden] { display: none; }

.quiz-card {
  max-width: 720px; margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: 0 16px 48px rgba(15, 28, 46, .08);
}
@media (max-width: 640px) { .quiz-card { padding: 24px 18px; } }

/* progress */
.quiz-progress { margin-bottom: 28px; }
.quiz-progress__label { font-size: .85rem; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; display: block; }
.quiz-progress__bar { height: 6px; background: var(--border-light); border-radius: 999px; overflow: hidden; }
.quiz-progress__fill { height: 100%; background: var(--blue); border-radius: 999px; transition: width .3s ease; }

/* question */
.quiz-q__prompt { font-size: clamp(1.2rem, 3vw, 1.5rem); font-weight: 700; color: var(--navy); line-height: 1.35; margin-bottom: 24px; }

/* options */
.quiz-options { border: 0; padding: 0; margin: 0 0 18px; display: grid; gap: 12px; }
.quiz-option { position: relative; }
.quiz-option input[type="radio"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.quiz-option__label {
  display: block; cursor: pointer;
  padding: 16px 18px 16px 52px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  font-size: 1rem; color: var(--text-primary); line-height: 1.45;
  transition: border-color .15s ease, background .15s ease;
}
.quiz-option__label::before {
  content: ''; position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--border); background: var(--white);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.quiz-option input[type="radio"]:focus-visible + .quiz-option__label {
  outline: 2px solid var(--blue); outline-offset: 2px;
}
.quiz-option input[type="radio"]:checked + .quiz-option__label {
  border-color: var(--blue); background: rgba(37, 99, 235, .05); font-weight: 600;
}
.quiz-option input[type="radio"]:checked + .quiz-option__label::before {
  border-color: var(--blue); box-shadow: inset 0 0 0 5px var(--blue);
}
.quiz-option.is-locked .quiz-option__label { cursor: default; }
.quiz-option.is-locked:not(.is-correct):not(.is-wrong) .quiz-option__label { opacity: .55; }
.quiz-option.is-correct .quiz-option__label { border-color: #15803D; background: rgba(21, 128, 61, .06); }
.quiz-option.is-wrong .quiz-option__label { border-color: #B91C1C; background: rgba(185, 28, 28, .05); }

/* hint */
.quiz-hint__toggle {
  background: none; border: 0; padding: 0; margin: 4px 0 8px;
  color: var(--blue); font-size: .9rem; font-weight: 600; cursor: pointer; text-decoration: underline;
}
.quiz-hint__toggle:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.quiz-hint__text { font-size: .92rem; color: var(--text-secondary); font-style: italic; margin-bottom: 16px; padding-left: 12px; border-left: 3px solid var(--border); }

/* feedback */
.quiz-feedback { margin-top: 20px; }
.quiz-feedback__verdict { font-weight: 700; margin-bottom: 8px; }
.quiz-feedback__verdict.ok { color: #15803D; }
.quiz-feedback__verdict.bad { color: #B91C1C; }
.quiz-feedback__explain { color: var(--text-secondary); font-size: .98rem; line-height: 1.6; margin-bottom: 20px; }
.quiz-next { padding: 12px 28px; }

/* score */
.quiz-card--score { text-align: center; }
.quiz-score__eyebrow { font-size: .85rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin-bottom: 8px; }
.quiz-score__num { font-size: 4rem; font-weight: 800; color: var(--navy); line-height: 1; margin: 8px 0 12px; letter-spacing: -.03em; }
.quiz-score__of { color: var(--text-muted); font-weight: 600; font-size: 2rem; }
.quiz-score__tier { font-size: 1.5rem; font-weight: 700; margin-bottom: 10px; }
.quiz-tier--informed { color: #15803D; }
.quiz-tier--partial { color: #B45309; }
.quiz-tier--exposed { color: #B91C1C; }
.quiz-score__copy { color: var(--text-secondary); max-width: 480px; margin: 0 auto 28px; }
.quiz-score__cta { padding: 14px 32px; font-size: 1.05rem; }

/* benchmark */
.quiz-bench { max-width: 420px; margin: 0 auto 28px; text-align: left; }
.quiz-bench__title { font-size: .85rem; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; }
.quiz-bench__bar { position: relative; height: 10px; background: var(--border-light); border-radius: 999px; }
.quiz-bench__you { position: absolute; left: 0; top: 0; bottom: 0; background: var(--blue); border-radius: 999px; }
.quiz-bench__avg { position: absolute; top: -4px; bottom: -4px; width: 3px; background: var(--navy); border-radius: 2px; }
.quiz-bench__legend { font-size: .8rem; color: var(--text-muted); margin-top: 8px; }

/* gate */
.quiz-gate__heading { font-size: 1.5rem; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.quiz-gate__sub { color: var(--text-secondary); margin-bottom: 24px; }
.quiz-gate__form { display: grid; gap: 18px; }
.quiz-field { display: grid; gap: 6px; }
.quiz-field__label { font-size: .9rem; font-weight: 600; color: var(--text-primary); }
.quiz-field input {
  font: inherit; padding: 12px 14px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-primary); background: var(--white); width: 100%;
}
.quiz-field input:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; border-color: var(--blue); }
.quiz-field__warn { font-size: .85rem; color: #B45309; }
.quiz-hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }
.quiz-consent { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--text-secondary); cursor: pointer; }
.quiz-consent input[type="checkbox"] { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--blue); flex: none; }
.quiz-consent__text a { color: var(--blue); }
.quiz-gate__error { color: #B91C1C; font-size: .9rem; font-weight: 600; }
.quiz-gate__submit { padding: 13px 28px; justify-self: start; }
.quiz-gate__skip {
  background: none; border: 0; padding: 0;
  color: var(--text-muted); font-size: .9rem; text-decoration: underline; cursor: pointer;
  justify-self: start;
}
.quiz-gate__skip:hover { color: var(--text-secondary); }
.quiz-gate__skip:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* breakdown */
.quiz-bd__heading { font-size: 1.5rem; font-weight: 700; color: var(--navy); margin-bottom: 20px; }
.quiz-bd__item { padding: 18px 0; border-top: 1px solid var(--border-light); }
.quiz-bd__item:first-of-type { border-top: 0; }
.quiz-bd__q { font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
.quiz-bd__verdict { font-size: .85rem; font-weight: 700; margin-bottom: 8px; }
.quiz-bd__item.is-correct .quiz-bd__verdict { color: #15803D; }
.quiz-bd__item.is-wrong .quiz-bd__verdict { color: #B91C1C; }
.quiz-bd__explain { font-size: .95rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 10px; }
.quiz-bd__why { font-size: .95rem; line-height: 1.6; color: var(--text-primary); background: var(--accent-bg); padding: 12px 14px; border-radius: var(--radius-sm); }
.quiz-bd__ctas { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--border); text-align: center; }
.quiz-bd__cta { display: inline-block; padding: 14px 28px; font-size: 1rem; }
.quiz-bd__cta-sub { font-size: .88rem; color: var(--text-muted); margin: 12px auto 16px; max-width: 460px; }
.quiz-bd__secondary { display: inline-block; color: var(--blue); font-weight: 600; text-decoration: underline; }
.quiz-bd__restart {
  display: block; margin: 28px auto 0; background: none; border: 0;
  color: var(--text-muted); font-size: .85rem; text-decoration: underline; cursor: pointer;
}
.quiz-bd__restart:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* seo block — centered */
.quiz-seo { padding: 56px 0 72px; text-align: center; }
.quiz-seo .container { max-width: 800px; }
.quiz-seo h2 { font-size: 1.3rem; font-weight: 700; color: var(--navy); margin-bottom: 12px; }
.quiz-seo p { color: var(--text-secondary); line-height: 1.7; }

/* shared.css fallbacks (page can render before it loads) */
.btn--primary {
  display: inline-block; background: var(--blue); color: #fff;
  border: 0; border-radius: var(--radius-sm); cursor: pointer;
  font-weight: 600; text-decoration: none; text-align: center;
}
.btn--primary:hover { background: var(--blue-hover); }
.btn--primary:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }

/* ── transition clarity (v3): revealed correct answer + unmissable Next ── */
.quiz-option.is-reveal .quiz-option__label::after {
  content: ' — this was the correct one';
  font-style: italic; font-weight: 500; font-size: .85em; color: #15803D;
}
#quiz-feedback { scroll-margin-top: 130px; }
.quiz-next { width: 100%; padding: 14px 24px; font-size: 1rem; }
@media (min-width: 641px) { .quiz-next { width: auto; } }

/* ── gate v4: name/surname row ── */
.quiz-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .quiz-field-row { grid-template-columns: 1fr; gap: 18px; } }
