/* 12 types quiz. Everything is scoped under #desc-tabs .quiz-* so the rest of the site is unaffected. */
#desc-tabs .quiz-root { max-width: 860px; margin: 0 auto; overflow-wrap: anywhere; }
#desc-tabs .quiz-title { margin-bottom: 10px; }
#desc-tabs .quiz-sub { font-size: 1.1em; margin-bottom: 14px; }
#desc-tabs .quiz-note { margin-bottom: 8px; }
#desc-tabs .quiz-disclaimer { font-size: .9em; opacity: .8; margin-bottom: 24px; }
#desc-tabs .quiz-stage { background: rgba(255,255,255,.7); border: 1px solid #D1D7DD; border-radius: 6px; padding: 20px; }
#desc-tabs .quiz-heading { font-weight: 700; margin: 0 0 16px; outline: none; }
#desc-tabs .quiz-heading:focus-visible { outline: 3px solid #0a64d0; outline-offset: 4px; }

#desc-tabs .quiz-banner { padding: 10px 12px; border-left: 4px solid #AF9F8C; background: #f4f5f6; margin-bottom: 16px; }
#desc-tabs .quiz-banner.is-warn { border-left-color: #b3261e; }

/* progress */
#desc-tabs .quiz-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; font-size: .95em; margin-bottom: 8px; }
#desc-tabs .quiz-bar { height: 8px; background: #D1D7DD; border-radius: 4px; overflow: hidden; margin-bottom: 20px; }
#desc-tabs .quiz-bar > span { display: block; height: 100%; background: #998B7A; transition: width .25s ease; }

/* question + options */
#desc-tabs .quiz-part { font-size: .85em; letter-spacing: .05em; margin: 0 0 6px; opacity: .8; }
#desc-tabs fieldset.quiz-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
#desc-tabs .quiz-fieldset legend.quiz-heading { float: left; width: 100%; font-size: 1.25em; line-height: 1.4; padding: 0; }
#desc-tabs .quiz-options { clear: both; display: grid; gap: 12px; margin: 0 0 8px; }
#desc-tabs .quiz-option { position: relative; }
#desc-tabs .quiz-option input { position: absolute; opacity: 0; width: 100%; height: 100%; left: 0; top: 0; margin: 0; cursor: pointer; z-index: 1; }
#desc-tabs .quiz-option label { display: flex; gap: 12px; align-items: flex-start; min-height: 56px; margin: 0; padding: 12px 14px;
  border: 2px solid #D1D7DD; border-radius: 6px; background: #fff; cursor: pointer; line-height: 1.45; }
#desc-tabs .quiz-letter { flex: 0 0 28px; height: 28px; line-height: 28px; text-align: center; border-radius: 50%; background: #D1D7DD; font-weight: 700; font-size: .9em; }
#desc-tabs .quiz-option input:hover + label { border-color: #AF9F8C; }
#desc-tabs .quiz-option input:checked + label { border-color: #998B7A; background: #f6f2ec; }
#desc-tabs .quiz-option input:checked + label .quiz-letter { background: #998B7A; color: #fff; }
#desc-tabs .quiz-option input:focus-visible + label { outline: 3px solid #0a64d0; outline-offset: 2px; }
#desc-tabs .quiz-error { color: #b3261e; font-weight: 600; min-height: 1.5em; margin: 8px 0; }

/* buttons */
#desc-tabs .quiz-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: space-between; margin-top: 16px; }
#desc-tabs .quiz-actions .btn { min-height: 48px; min-width: 140px; flex: 1 1 140px; margin: 0; }
#desc-tabs .quiz-actions .btn:focus-visible { outline: 3px solid #0a64d0; outline-offset: 2px; }
#desc-tabs .quiz-actions .btn[disabled] { opacity: .55; cursor: not-allowed; }

/* result */
#desc-tabs .quiz-kicker { letter-spacing: .05em; font-size: .85em; margin: 0; }
#desc-tabs .quiz-type { font-size: 1.1em; font-weight: 700; margin: 0 0 4px; }
#desc-tabs .quiz-restitle { font-size: 1.6em; margin: 0 0 6px; }
#desc-tabs .quiz-tags { margin-bottom: 16px; }
#desc-tabs .quiz-block { margin-bottom: 16px; }
#desc-tabs .quiz-block h4 { font-size: 1.05em; font-weight: 700; margin-bottom: 4px; }
#desc-tabs details.quiz-how { border: 1px solid #D1D7DD; border-radius: 6px; padding: 10px 14px; margin: 16px 0; background: #fff; }
#desc-tabs details.quiz-how summary { cursor: pointer; font-weight: 700; min-height: 32px; }
#desc-tabs details.quiz-how summary:focus-visible { outline: 3px solid #0a64d0; outline-offset: 2px; }
#desc-tabs .quiz-scores { display: grid; gap: 6px; margin: 8px 0 12px; padding: 0; list-style: none; }
#desc-tabs .quiz-scores li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dotted #D1D7DD; padding-bottom: 2px; }
#desc-tabs .quiz-alt { border: 1px solid #D1D7DD; border-radius: 6px; padding: 12px; margin-bottom: 10px; background: #fff; }
#desc-tabs .quiz-alt h5 { font-size: 1em; font-weight: 700; margin: 0 0 4px; }

@media (max-width: 575px) {
  #desc-tabs .quiz-stage { padding: 14px; }
  #desc-tabs .quiz-actions .btn { flex-basis: 100%; }
  #desc-tabs .quiz-actions { flex-direction: column-reverse; }
}
@media (prefers-reduced-motion: reduce) {
  #desc-tabs .quiz-bar > span { transition: none; }
  #desc-tabs .quiz-root * { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

/* readable contrast for the secondary (outline) button inside the quiz */
#desc-tabs .quiz-actions .btn-outline-secondary { color: #232122; border-color: #5b6168; }
