/* AQcredix — Today's Quiz styles.
 *
 * Every var() carries a hardcoded fallback, and every <button> sets colour and
 * -webkit-appearance explicitly. Both are standing rules on this project: card
 * titles have gone invisible twice when an external stylesheet failed to load
 * and buttons fell back to the default white face.
 */

.aq-quiz-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 20px 96px;
}

.aq-quiz-head { margin-bottom: 28px; }

.aq-quiz-eyebrow {
  margin: 0 0 6px;
  font-size: 13px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  /* --accent-bright, not --accent: the deep member of the pair is a fill colour and
     measured 3.07:1 as text on the blue theme's near-black ground. */
  color:var(--accent-text);
  font-weight: 600;
}

.aq-quiz-title {
  margin: 0 0 10px;
  font-size: 34px;
  line-height: 1.2;
  color: var(--fg);
  font-weight: 700;
}

.aq-quiz-sub {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  color: var(--fg-muted);
  max-width: 62ch;
}

/* progress */
.aq-quiz-progress {
  height: 4px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
  margin: 0 0 28px;
}

.aq-quiz-progress-fill {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width .25s ease;
}

/* question cards */
.aq-q-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 22px 20px;
  margin: 0 0 18px;
}

.aq-q-num {
  display: block;
  font-size: 12px;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 10px;
  font-weight: 600;
}

.aq-q-text {
  margin: 0 0 18px;
  font-size: 16.5px;
  line-height: 1.62;
  color: var(--fg);
}

.aq-q-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.aq-opt {
  -webkit-appearance: none;
  appearance: none;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 13px 15px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 15px;
  line-height: 1.55;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}

.aq-opt:hover:not(:disabled) {
  border-color: var(--accent);
}

.aq-opt:disabled { cursor: default; }

.aq-opt-letter {
  flex: 0 0 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--border);
  color: var(--fg);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.aq-opt-text { flex: 1 1 auto; color: inherit; }

.aq-opt.is-picked {
  border-color:var(--brand-2);
  background: var(--accent-bright-tint);
}

.aq-opt.is-picked .aq-opt-letter {
  background: var(--accent);
  color: var(--on-brand);
}

.aq-opt.is-correct {
  border-color: var(--ok);
  background: var(--ok-tint);
}

.aq-opt.is-correct .aq-opt-letter { background: var(--ok-tint); color: var(--ok); }

.aq-opt.is-wrong {
  border-color: var(--nc);
  background: var(--nc-tint);
}

.aq-opt.is-wrong .aq-opt-letter { background: var(--nc-tint); color: var(--nc); }

/* explanations */
.aq-q-why { display: none; }

.aq-q-why.is-open {
  display: block;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 10px;
  border-left: 3px solid var(--accent-bright);
  background: var(--accent-bright-tint);
}

.aq-q-why.is-right { border-left-color: var(--ok); background: var(--ok-tint); }
.aq-q-why.is-miss { border-left-color: var(--nc); background: var(--nc-tint); }

.aq-why-tag {
  display: inline-block;
  font-size: 11.5px;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 7px;
  color: var(--fg-muted);
}

.aq-q-why.is-right .aq-why-tag { color: var(--ok); }
.aq-q-why.is-miss .aq-why-tag { color: var(--nc); }

.aq-why-text {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--fg-muted);
}

/* footer + submit */
.aq-quiz-foot { margin-top: 26px; text-align: center; }

.aq-btn {
  -webkit-appearance: none;
  appearance: none;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 26px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--fg);
  cursor: pointer;
  transition: opacity .15s ease, transform .1s ease;
}

.aq-btn:active:not(:disabled) { transform: scale(.98); }

.aq-btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-brand);
}

.aq-btn:disabled { opacity: .45; cursor: not-allowed; }

.aq-quiz-note {
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--fg-muted);
}

/* result */
.aq-quiz-result { display: none; }

.aq-quiz-result.is-open {
  display: block;
  margin-top: 30px;
  padding: 28px 24px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  text-align: center;
}

.aq-quiz-result.is-perfect { border-color: var(--ok); }

.aq-result-score {
  margin: 0 0 8px;
  font-size: 42px;
  font-weight: 700;
  color: var(--fg);
  line-height: 1.1;
}

.aq-quiz-result.is-perfect .aq-result-score { color: var(--ok); }

.aq-result-line {
  margin: 0 auto;
  max-width: 56ch;
  font-size: 15px;
  line-height: 1.65;
  color: var(--fg-muted);
}

.aq-cert-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 20px;
}

.aq-cert-name {
  -webkit-appearance: none;
  appearance: none;
  font: inherit;
  font-size: 15px;
  padding: 12px 16px;
  min-width: 280px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg);
}

.aq-cert-name.is-empty { border-color: var(--nc); }

.aq-cert-preview { margin-top: 24px; }

.aq-cert-preview img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
  margin-bottom: 14px;
}

.aq-cert-meta {
  margin: 0 0 14px;
  font-size: 13px;
  letter-spacing: .4px;
  color: var(--fg-muted);
  font-family: ui-monospace, "Courier New", monospace;
}

@media (max-width: 620px) {
  .aq-quiz-title { font-size: 27px; }
  .aq-q-card { padding: 18px 16px 16px; }
  .aq-cert-name { min-width: 0; width: 100%; }
}
