/* TheoryPrac - tp-quiz-app.css (tp-quiz-app-v1)
   App-like question screen for Practice (car), Motorcycle, LGV and ADI.
   Loaded after quiz-shell.css. Three parts:
     1. Topic list: one look for every card (no FREE badge, no lock).
     2. Topic open: nothing on screen but the quiz, on phone AND desktop.
     3. The question itself - only while html.tp-qapp is set by the script,
        and never for a question with a video (html.tp-qapp-video). */

/* -- 1. Topic list ----------------------------------------------- */
body.tp-qapp-list .tp-practice-topic-free-badge,
body.tp-qapp-list .tp-practice-topic-lock {
  display: none !important;
}
body.tp-qapp-list .tp-practice-topic-btn--locked,
body.tp-qapp-list .tp-practice-topic-btn--free {
  opacity: 1 !important;
  border-color: var(--tp-border, #E2E5EA) !important;
  color: inherit;
}
:root:not(.tp-dark) body.tp-qapp-list .tp-practice-topic-btn--free,
:root:not(.tp-dark) body.tp-qapp-list .tp-practice-topic-btn--locked {
  background: #fff !important;
}
body.tp-qapp-list .tp-practice-topic-btn--locked:hover,
body.tp-qapp-list .tp-practice-topic-btn--free:hover {
  border-color: var(--tp-primary, #1E40AF) !important;
}
/* Locked cards were the only ones without an arrow. */
body.tp-qapp-list .tp-practice-topic-btn--locked::after {
  content: "\2192";
  color: var(--tp-primary, #1E40AF);
  font-weight: 700;
  flex-shrink: 0;
}

/* -- 2. Topic open: only the quiz -------------------------------- */
body.tp-qapp-page .tp-practice-topics,
body.tp-qapp-page .tp-practice-header,
body.tp-qapp-page .tp-practice-start,
body.tp-qapp-page .tp-practice-sidebar,
body.tp-qapp-page .tp-practice-bottom-cta,
body.tp-qapp-page .tp-moto-hero,
body.tp-qapp-page .tp-moto-edge,
body.tp-qapp-page .tp-related-pages,
body.tp-qapp-page .tp-breadcrumbs {
  display: none !important;
}
/* With the sidebar gone the page is one centred column. */
body.tp-qapp-page .tp-practice-layout {
  display: block !important;
}
body.tp-qapp-page .tp-practice-main,
body.tp-qapp-page .tp-practice-wrap {
  max-width: 820px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
@media (max-width: 768px) {
  body.tp-qapp-page .tp-practice-main,
  body.tp-qapp-page .tp-practice-wrap {
    max-width: none !important;
  }
  body.tp-qapp-page .tp-practice-wrap {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  body.tp-qapp-page .tp-practice-quiz-panel {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
  }
  /* Same as the car page's focus mode, for the three new pages too. */
  body.tp-qapp-page .tp-nav,
  body.tp-qapp-page .tp-footer {
    display: none !important;
  }
  body.tp-qapp-page .tp-practice-page {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
}
@media (min-width: 769px) {
  body.tp-qapp-page .tp-practice-page {
    padding-top: 1.25rem !important;
  }
  body.tp-qapp-page .tp-footer {
    display: none !important;
  }
}

/* -- 3. The question --------------------------------------------- */
html.tp-qapp {
  --tp-qa-ok:      var(--sign-green, #00703C);
  --tp-qa-ok-bg:   #E7F4EC;
  --tp-qa-no:      var(--sign-red, #C8102E);
  --tp-qa-no-bg:   #FDECEC;
  --tp-qa-line:    #D7DFDA;
}

/* No "Question 3 of 26" line: the number row and the progress bar already say it. */
html.tp-qapp .tp-qshell-count {
  display: none !important;
}

/* Question */
html.tp-qapp:not(.tp-qapp-video) #tpPracticePanel#tpPracticePanel div.step[data-question-id] .ays_quiz_question {
  border: 0 !important;
  background: transparent !important;
  text-align: left !important;
}
html.tp-qapp:not(.tp-qapp-video) #tpPracticePanel#tpPracticePanel div.step[data-question-id] .ays-image-question-img {
  margin: 0 0 14px !important;
  text-align: center !important;
}
html.tp-qapp:not(.tp-qapp-video) #tpPracticePanel#tpPracticePanel div.step[data-question-id] .ays-image-question-img img {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: 46vh !important;
  object-fit: contain !important;
  border-radius: 14px !important;
  margin: 0 auto !important;
}

/* Text answers: tall, rounded, full width */
html.tp-qapp:not(.tp-qapp-video) #tpPracticePanel#tpPracticePanel div.step[data-question-id] .ays-quiz-answers:not(:has(.ays-field img)) .ays-field {
  position: relative !important;
}
html.tp-qapp:not(.tp-qapp-video) #tpPracticePanel#tpPracticePanel div.step[data-question-id] .ays-quiz-answers:not(:has(.ays-field img)) .ays-field label:not(.ays_answer_image) {
  min-height: 58px !important;
  border: 2px solid var(--tp-qa-line) !important;
  border-radius: 16px !important;
  padding-right: 52px !important;
  box-sizing: border-box !important;
}

/* Text answers: always one under the other, also when a quiz is set to Quiz Maker's grid view */
html.tp-qapp:not(.tp-qapp-video) #tpPracticePanel#tpPracticePanel div.step[data-question-id] .ays-quiz-answers:not(:has(.ays-field img)) {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  grid-template-columns: none !important;
}
html.tp-qapp:not(.tp-qapp-video) #tpPracticePanel#tpPracticePanel div.step[data-question-id] .ays-quiz-answers:not(:has(.ays-field img)) .ays-field {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  float: none !important;
  flex: none !important;
  display: flex !important;
  flex-wrap: wrap !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
html.tp-qapp:not(.tp-qapp-video) #tpPracticePanel#tpPracticePanel div.step[data-question-id] .ays-quiz-answers:not(:has(.ays-field img)) .ays-field label:not(.ays_answer_image) {
  display: flex !important;
  align-items: center !important;
  flex: 1 1 100% !important;
  width: 100% !important;
  min-height: 58px !important;
  padding: 12px 52px 12px 16px !important;
  font-size: 1.06rem !important;
  line-height: 1.4 !important;
  font-weight: 600 !important;
  text-align: left !important;
  color: var(--tp-text, #1C1F26) !important;
  background: #fff;
  opacity: 1 !important;
}

/* Every answer carries an empty picture label from Quiz Maker; on text answers it must take no room */
html.tp-qapp:not(.tp-qapp-video) #tpPracticePanel#tpPracticePanel div.step[data-question-id] .ays-quiz-answers:not(:has(.ays-field img)) .ays-field label.ays_answer_image {
  display: none !important;
}

/* Picture answers: two by two */
html.tp-qapp:not(.tp-qapp-video) #tpPracticePanel#tpPracticePanel div.step[data-question-id] .ays-quiz-answers:has(.ays-field img) {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
}
html.tp-qapp:not(.tp-qapp-video) #tpPracticePanel#tpPracticePanel div.step[data-question-id] .ays-quiz-answers:has(.ays-field img) .ays-field {
  position: relative !important;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  float: none !important;
  flex-wrap: wrap !important;
}
html.tp-qapp:not(.tp-qapp-video) #tpPracticePanel#tpPracticePanel div.step[data-question-id] .ays-quiz-answers:has(.ays-field img) .ays-field label {
  width: 100% !important;
  padding: 8px !important;
  border: 2px solid var(--tp-qa-line) !important;
  border-radius: 16px !important;
  box-sizing: border-box !important;
}
html.tp-qapp:not(.tp-qapp-video) #tpPracticePanel#tpPracticePanel div.step[data-question-id] .ays-quiz-answers:has(.ays-field img) .ays-field img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1 / 1;
  object-fit: contain !important;
  border-radius: 10px !important;
  margin: 0 auto !important;
}

/* Right / wrong: colour plus a tick or cross, no words */
html.tp-qapp:not(.tp-qapp-video) #tpPracticePanel#tpPracticePanel div.step[data-question-id] .ays-field.correct_div label {
  background: var(--tp-qa-ok-bg) !important;
  border-color: var(--tp-qa-ok) !important;
}
html.tp-qapp:not(.tp-qapp-video) #tpPracticePanel#tpPracticePanel div.step[data-question-id] .ays-field.wrong_div label {
  background: var(--tp-qa-no-bg) !important;
  border-color: var(--tp-qa-no) !important;
}
html.tp-qapp:not(.tp-qapp-video) #tpPracticePanel#tpPracticePanel div.step[data-question-id] .ays-field.correct_div::after,
html.tp-qapp:not(.tp-qapp-video) #tpPracticePanel#tpPracticePanel div.step[data-question-id] .ays-field.wrong_div::after {
  position: absolute !important;
  top: 50% !important;
  right: 14px !important;
  transform: translateY(-50%) !important;
  z-index: 2;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: none !important;
  width: 26px !important;
  height: 26px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  color: #fff !important;
  font: 700 15px/1 system-ui, sans-serif !important;
  pointer-events: none;
}
html.tp-qapp:not(.tp-qapp-video) #tpPracticePanel#tpPracticePanel div.step[data-question-id] .ays-field.correct_div::after {
  content: "\2713" !important;
  background: var(--tp-qa-ok) !important;
}
html.tp-qapp:not(.tp-qapp-video) #tpPracticePanel#tpPracticePanel div.step[data-question-id] .ays-field.wrong_div::after {
  content: "\2715" !important;
  background: var(--tp-qa-no) !important;
}
/* On picture answers the mark sits in the top corner of the picture. */
html.tp-qapp:not(.tp-qapp-video) #tpPracticePanel#tpPracticePanel div.step[data-question-id] .ays-quiz-answers:has(.ays-field img) .ays-field.correct_div::after,
html.tp-qapp:not(.tp-qapp-video) #tpPracticePanel#tpPracticePanel div.step[data-question-id] .ays-quiz-answers:has(.ays-field img) .ays-field.wrong_div::after {
  top: 14px !important;
  right: 14px !important;
  transform: none !important;
}

/* Explanation (already ordered under the answers by quiz-shell.css): plain text in a card with a coloured edge */
/* Quiz Maker's own "right / wrong" message line: the colours and the tick or cross already say it. */
html.tp-qapp:not(.tp-qapp-video) #tpPracticePanel#tpPracticePanel div.step[data-question-id] .ays-abs-fs > .right_answer_text,
html.tp-qapp:not(.tp-qapp-video) #tpPracticePanel#tpPracticePanel div.step[data-question-id] .ays-abs-fs > .wrong_answer_text {
  display: none !important;
}
html.tp-qapp:not(.tp-qapp-video) #tpPracticePanel#tpPracticePanel div.step[data-question-id] .ays_questtion_explanation {
  position: static !important;
  inset: auto !important;
  transform: none !important;
  margin: 14px 0 0 !important;
  padding: 14px 16px !important;
  background: #fff !important;
  color: #2E3F37 !important;
  border: 0 !important;
  border-left: 4px solid var(--tp-qa-line) !important;
  border-radius: 14px !important;
  box-shadow: 0 1px 2px rgba(18, 36, 27, .06) !important;
  font-size: 1rem !important;
  line-height: 1.6 !important;
  text-align: left !important;
}
html.tp-qapp:not(.tp-qapp-video) #tpPracticePanel#tpPracticePanel div.step.tp-qapp-right .ays_questtion_explanation {
  border-left-color: var(--tp-qa-ok) !important;
}
html.tp-qapp:not(.tp-qapp-video) #tpPracticePanel#tpPracticePanel div.step.tp-qapp-wrong .ays_questtion_explanation {
  border-left-color: var(--tp-qa-no) !important;
}
html.tp-qapp-explain-off #tpPracticePanel#tpPracticePanel div.step[data-question-id] .ays_questtion_explanation,
html.tp-qshell-explain-off #tpPracticePanel#tpPracticePanel div.step[data-question-id] .ays_questtion_explanation {
  display: none !important;
}

/* -- Gear: the options options button becomes a gear ------------------ */
html.tp-qapp #tpContrastToggle > *,
body.tp-qapp-page #tpContrastToggle > * {
  display: none !important;
}
html.tp-qapp #tpContrastToggle::before,
body.tp-qapp-page #tpContrastToggle::before {
  content: "" !important;
  display: block !important;
  width: 20px !important;
  height: 20px !important;
  background: currentColor !important;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' fill-rule='evenodd' d='M10.3 2h3.4l.5 2.6c.6.2 1.2.5 1.7.9l2.5-.9 1.7 2.9-2 1.8c.1.6.1 1.2 0 1.8l2 1.8-1.7 2.9-2.5-.9c-.5.4-1.1.7-1.7.9l-.5 2.6h-3.4l-.5-2.6c-.6-.2-1.2-.5-1.7-.9l-2.5.9-1.7-2.9 2-1.8a6 6 0 0 1 0-1.8l-2-1.8 1.7-2.9 2.5.9c.5-.4 1.1-.7 1.7-.9L10.3 2zM12 8.6a3.4 3.4 0 1 0 0 6.8 3.4 3.4 0 0 0 0-6.8z'/%3E%3C/svg%3E") center / contain no-repeat !important;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' fill-rule='evenodd' d='M10.3 2h3.4l.5 2.6c.6.2 1.2.5 1.7.9l2.5-.9 1.7 2.9-2 1.8c.1.6.1 1.2 0 1.8l2 1.8-1.7 2.9-2.5-.9c-.5.4-1.1.7-1.7.9l-.5 2.6h-3.4l-.5-2.6c-.6-.2-1.2-.5-1.7-.9l-2.5.9-1.7-2.9 2-1.8a6 6 0 0 1 0-1.8l-2-1.8 1.7-2.9 2.5.9c.5-.4 1.1-.7 1.7-.9L10.3 2zM12 8.6a3.4 3.4 0 1 0 0 6.8 3.4 3.4 0 0 0 0-6.8z'/%3E%3C/svg%3E") center / contain no-repeat !important;
}
/* On a phone the menu opens as a sheet from the bottom, over a dimmed page. */
@media (max-width: 768px) {
  html.tp-qapp .tp-contrast-menu[data-open="true"] {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    max-height: 80vh !important;
    overflow-y: auto !important;
    margin: 0 !important;
    transform: none !important;
    border-radius: 22px 22px 0 0 !important;
    padding: 22px 18px calc(22px + env(safe-area-inset-bottom, 0px)) !important;
    box-shadow: 0 0 0 100vmax rgba(10, 20, 15, .42) !important;
    z-index: 99000 !important;
  }
  html.tp-qapp .tp-contrast-menu[data-open="true"]::before {
    content: "";
    display: block;
    width: 40px;
    height: 4px;
    border-radius: 999px;
    background: #D7DFDA;
    margin: -10px auto 14px;
  }
}

/* -- Continue from question N? -------------------------------- */
.tp-qa-resume {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  z-index: 8600;
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid #CFE0D5;
  box-shadow: 0 8px 24px rgba(18, 36, 27, .18);
  font-size: .95rem;
  color: #12241B;
}
@media (min-width: 769px) {
  .tp-qa-resume { bottom: 24px; }
}
.tp-qa-resume-text { flex: 1 1 160px; font-weight: 600; }
.tp-qa-resume button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.tp-qa-resume-yes { border: 0; background: var(--sign-green, #00703C); color: #fff; }
.tp-qa-resume-no  { border: 1px solid #C9D3CD; background: #fff; color: #12241B; }

/* -- Shared buttons ------------------------------------------- */
.tp-qa-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  margin: 12px 0 0;
  padding: 0 18px;
  border-radius: 14px;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none !important;
  cursor: pointer;
  box-sizing: border-box;
}
.tp-qa-btn--main { border: 0; background: var(--sign-green, #00703C); color: #fff !important; }
.tp-qa-btn--main:hover { background: var(--sign-green-d, #005A30); }
.tp-qa-btn--ghost { border: 1.5px solid #C9D3CD; background: #fff; color: #12241B; }
.tp-qa-link {
  display: block;
  margin: 14px 0 0;
  text-align: center;
  font-weight: 700;
  color: var(--tp-primary, #1E40AF);
}

/* -- End of topic --------------------------------------------- */
.tp-qa-end {
  max-width: 640px;
  margin: 16px auto 28px;
  padding: 20px 18px 22px;
  background: #fff;
  border: 1px solid #E1E7E3;
  border-radius: 20px;
  box-shadow: 0 1px 2px rgba(18, 36, 27, .06);
  color: #12241B;
  box-sizing: border-box;
}
.tp-qa-end-score { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.tp-qa-end-big { font-size: 2rem; font-weight: 800; line-height: 1.1; }
.tp-qa-end-pct { font-size: 1rem; font-weight: 700; color: #4F6158; }
.tp-qa-end-topic { margin: 4px 0 0; color: #4F6158; }
.tp-qa-end-h { margin: 20px 0 8px; font-size: 1.05rem; font-weight: 800; }
.tp-qa-end-list { margin: 0; padding: 0 0 0 1.1em; display: grid; gap: 6px; line-height: 1.45; }
.tp-qa-end-more, .tp-qa-end-note { margin: 8px 0 0; color: #4F6158; }
.tp-qa-end-sell {
  margin-top: 20px;
  padding-top: 4px;
  border-top: 1px solid #EEF2EF;
}
.tp-qa-end-sell p { margin: 0; line-height: 1.55; color: #2E3F37; }

/* -- Practise the wrong ones ---------------------------------- */
html.tp-qa-review-open, html.tp-qa-review-open body { overflow: hidden; }
.tp-qa-review {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  background: #F4F7F5;
  color: #12241B;
}
.tp-qa-review-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #fff;
  border-bottom: 1px solid #E1E7E3;
}
.tp-qa-review-close {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: #F0F4F1;
  color: #12241B;
  font-size: 18px;
  cursor: pointer;
}
.tp-qa-review-title { flex: 1; text-align: center; font-weight: 700; padding-right: 44px; }
.tp-qa-review-body {
  flex: 1;
  overflow-y: auto;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 16px 32px;
  box-sizing: border-box;
}
.tp-qa-review-q {
  background: #fff;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 1px 2px rgba(18, 36, 27, .06);
}
.tp-qa-review-q p { margin: 0; font-size: 1.2rem; font-weight: 700; line-height: 1.4; }
.tp-qa-review-qimg { display: block; width: 100%; max-height: 40vh; object-fit: contain; border-radius: 14px; margin: 0 0 12px; }
.tp-qa-review-answers { display: grid; gap: 10px; margin-top: 12px; }
.tp-qa-review-answers--pics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tp-qa-review-a {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-height: 58px;
  padding: 12px 48px 12px 14px;
  border: 2px solid #D7DFDA;
  border-radius: 16px;
  background: #fff;
  color: #12241B;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
}
.tp-qa-review-answers--pics .tp-qa-review-a { padding: 8px; align-items: stretch; }
.tp-qa-review-a img { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; border-radius: 10px; }
.tp-qa-review-a:disabled { cursor: default; color: #12241B; opacity: 1; }
.tp-qa-review-a.is-right { border-color: var(--sign-green, #00703C); background: #E7F4EC; }
.tp-qa-review-a.is-wrong { border-color: var(--sign-red, #C8102E); background: #FDECEC; }
.tp-qa-review-a.is-right::after,
.tp-qa-review-a.is-wrong::after {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #fff;
  font: 700 15px/26px system-ui, sans-serif;
  text-align: center;
}
.tp-qa-review-a.is-right::after { content: "\2713"; background: var(--sign-green, #00703C); }
.tp-qa-review-a.is-wrong::after { content: "\2715"; background: var(--sign-red, #C8102E); }
.tp-qa-review-x {
  margin: 14px 0 0;
  padding: 14px 16px;
  background: #fff;
  border-left: 4px solid #D7DFDA;
  border-radius: 14px;
  line-height: 1.6;
}
.tp-qa-review-x.is-right { border-left-color: var(--sign-green, #00703C); }
.tp-qa-review-x.is-wrong { border-left-color: var(--sign-red, #C8102E); }
.tp-qa-review-done { font-size: 1.3rem; font-weight: 800; margin: 12px 0 0; }

/* -- Clean-up round (desktop + phone) ------------------------------- */
/* Back button: arrow only, no "Topics" word squeezed in */
body.tp-qapp-page .tp-quiz-bar-back span,
body.tp-qapp-page .tp-quiz-bar-back-label {
  display: none !important;
}
body.tp-qapp-page .tp-quiz-bar-back {
  width: 44px !important;
  min-width: 44px !important;
  height: 44px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 12px !important;
  overflow: hidden !important;
}
/* Topic name without the two vertical lines either side */
body.tp-qapp-page .tp-quiz-bar-title {
  border-left: 0 !important;
  border-right: 0 !important;
  opacity: 1 !important;
  font-size: 1.05rem !important;
}
/* Number row: no grey scrollbar under it */
body.tp-qapp-page .ays-quiz-questions-nav-content,
body.tp-qapp-page .ays-quiz-questions-nav-wrap {
  scrollbar-width: none !important;
}
body.tp-qapp-page .ays-quiz-questions-nav-content::-webkit-scrollbar,
body.tp-qapp-page .ays-quiz-questions-nav-wrap::-webkit-scrollbar {
  display: none !important;
}
/* Question: the heading of the screen */
html.tp-qapp:not(.tp-qapp-video) #tpPracticePanel#tpPracticePanel div.step[data-question-id] .ays_quiz_question,
html.tp-qapp:not(.tp-qapp-video) #tpPracticePanel#tpPracticePanel div.step[data-question-id] .ays_quiz_question p {
  font-family: inherit !important;
  font-size: 1.3rem !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  color: var(--tp-text, #1C1F26) !important;
  text-align: left !important;
}
@media (min-width: 769px) {
  html.tp-qapp:not(.tp-qapp-video) #tpPracticePanel#tpPracticePanel div.step[data-question-id] .ays_quiz_question,
  html.tp-qapp:not(.tp-qapp-video) #tpPracticePanel#tpPracticePanel div.step[data-question-id] .ays_quiz_question p {
    font-size: 1.45rem !important;
  }
}
/* Answers: no extra frame around the four, and dark readable text */
html.tp-qapp:not(.tp-qapp-video) #tpPracticePanel#tpPracticePanel div.step[data-question-id] .ays-quiz-answers {
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  opacity: 1 !important;
}
html.tp-qapp:not(.tp-qapp-video) #tpPracticePanel#tpPracticePanel div.step[data-question-id] .ays-quiz-answers .ays-field,
html.tp-qapp:not(.tp-qapp-video) #tpPracticePanel#tpPracticePanel div.step[data-question-id] .ays-quiz-answers .ays-field label {
  opacity: 1 !important;
  filter: none !important;
}
html.tp-qapp:not(.tp-qapp-video) #tpPracticePanel#tpPracticePanel div.step[data-question-id] .ays-quiz-answers .ays-field label:not(.ays_answer_image),
html.tp-qapp:not(.tp-qapp-video) #tpPracticePanel#tpPracticePanel div.step[data-question-id] .ays-quiz-answers .ays-field label:not(.ays_answer_image) * {
  color: #1C1F26 !important;
  -webkit-text-fill-color: #1C1F26 !important;
}
/* Hover: a soft outline, not a pink fill that looks like a wrong answer */
html.tp-qapp:not(.tp-qapp-video) #tpPracticePanel#tpPracticePanel div.step[data-question-id] .ays-field:not(.correct_div):not(.wrong_div) label:not(.ays_answer_image):hover {
  background: #F4F7F5 !important;
  border-color: #9DB5A7 !important;
}

/* -- Computer: no blue bar ------------------------------------------- */
/* The blue bar held only the bookmark and the gear, and while scrolling it slid over the site menu.
   On a computer it becomes a plain row at the top of the white card. */
@media (min-width: 769px) {
  body.tp-qapp-page .tp-exam-header {
    position: static !important;
    top: auto !important;
    z-index: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 12px 16px 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    color: #1C1F26 !important;
  }
  body.tp-qapp-page .tp-exam-header::before,
  body.tp-qapp-page .tp-exam-header::after {
    display: none !important;
  }
  body.tp-qapp-page .tp-exam-header .tp-exam-header-tools {
    margin-right: auto !important;
  }
  body.tp-qapp-page .tp-exam-header #tpContrastToggle {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    border: 1px solid #D7DFDA !important;
    background: #fff !important;
    color: #1C1F26 !important;
    box-shadow: none !important;
  }
  body.tp-qapp-page .tp-exam-header #tpContrastToggle:hover,
  body.tp-qapp-page .tp-exam-header #tpContrastToggle[aria-expanded="true"] {
    background: #F0F4F1 !important;
  }
  /* bookmark icon was drawn light for the blue background: make it dark on white */
  body.tp-qapp-page .tp-exam-header .ays-navbar-bookmark {
    filter: brightness(0) opacity(.75) !important;
  }
  body.tp-qapp-page .tp-exam-header .tp-bookmark-as-button,
  body.tp-qapp-page .tp-exam-header .ays-quiz-questions-nav-bookmark-box {
    background: #fff !important;
    border: 1px solid #D7DFDA !important;
    border-radius: 50% !important;
    box-shadow: none !important;
  }
}

/* Next / Finish: white text on the green button */
html.tp-qapp #tpPracticePanel#tpPracticePanel .ays_buttons_div .ays_next,
html.tp-qapp #tpPracticePanel#tpPracticePanel .ays_buttons_div .ays_finish,
html.tp-qapp #tpPracticePanel#tpPracticePanel .ays_buttons_div input.ays_next,
html.tp-qapp #tpPracticePanel#tpPracticePanel .ays_buttons_div input.ays_finish {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-weight: 700 !important;
}

/* -- Question pictures: a sensible size, centred ------------------- */
html.tp-qapp:not(.tp-qapp-video) #tpPracticePanel#tpPracticePanel div.step[data-question-id] .ays-image-question-img {
  display: flex !important;
  justify-content: center !important;
  width: 100% !important;
  margin: 0 0 14px !important;
  padding: 0 !important;
  background: transparent !important;
}
html.tp-qapp:not(.tp-qapp-video) #tpPracticePanel#tpPracticePanel div.step[data-question-id] .ays-image-question-img img {
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: 30vh !important;
  object-fit: contain !important;
  margin: 0 auto !important;
  border-radius: 12px !important;
}
@media (min-width: 769px) {
  html.tp-qapp:not(.tp-qapp-video) #tpPracticePanel#tpPracticePanel div.step[data-question-id] .ays-image-question-img img {
    max-height: 220px !important;
    max-width: 70% !important;
  }
}

/* -- Computer: the topic row scrolls away with the page, so it never slides under the site menu -- */
@media (min-width: 769px) {
  body.tp-qapp-page .tp-quiz-bar {
    position: static !important;
    top: auto !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  /* "Continue from question N?" sits in the bottom-right corner, clear of the question */
  .tp-qa-resume {
    left: auto;
    right: 24px;
    margin: 0;
    max-width: 420px;
  }
}

/* -- Topic open on a computer too: no site menu over the quiz --------- */
/* The menu slid back in over the question while scrolling. With a topic open the screen is the quiz only
   (the arrow button goes back to the topics), the same as on a phone. */
body.tp-qapp-page .tp-nav {
  display: none !important;
}
body.tp-qapp-page .tp-practice-page {
  padding-top: 24px !important;
}
@media (max-width: 768px) {
  body.tp-qapp-page .tp-practice-page {
    padding-top: 0 !important;
  }
}
/* Less empty space between a picture and its question */
html.tp-qapp:not(.tp-qapp-video) #tpPracticePanel#tpPracticePanel div.step[data-question-id] .ays-image-question-img + .ays_quiz_question,
html.tp-qapp:not(.tp-qapp-video) #tpPracticePanel#tpPracticePanel div.step[data-question-id] .ays_quiz_question {
  margin-top: 0 !important;
  padding-top: 4px !important;
}
