/* In-lesson checks and end-of-module quizzes. Theme-agnostic; uses page variables. */
.learn-check,
.module-quiz,
.lesson-next {
  margin: 1.6rem 0;
  padding: 1.1rem 1.15rem 1.25rem;
  border: 2px solid currentColor;
  border-radius: 16px;
  background: var(--card, transparent);
}
.learn-check__kicker,
.module-quiz__kicker,
.lesson-next__kicker {
  margin: 0 0 .45rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.learn-check legend,
.module-quiz legend,
.learn-check__q {
  display: block;
  font-weight: 700;
  font-size: 1.05em;
  margin: 0 0 .7rem;
  padding: 0;
}
.learn-check fieldset,
.module-quiz fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.learn-options {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  margin: 0 0 .85rem;
}
.learn-options label {
  display: flex;
  gap: .65rem;
  align-items: flex-start;
  font-weight: 500;
  margin: 0;
  padding: .7rem .8rem;
  border: 2px solid currentColor;
  border-radius: 10px;
  cursor: pointer;
  line-height: 1.4;
}
.learn-options label:has(input:focus-visible) {
  outline: 3px solid currentColor;
  outline-offset: 2px;
}
.learn-options input {
  margin-top: .2rem;
  flex-shrink: 0;
  width: 1.15rem;
  height: 1.15rem;
}
.learn-check textarea {
  display: block;
  width: 100%;
  min-height: 6rem;
  font: inherit;
  color: inherit;
  background: transparent;
  border: 2px solid currentColor;
  border-radius: 10px;
  padding: .7rem .8rem;
  margin: 0 0 .85rem;
  resize: vertical;
}
.learn-check button,
.module-quiz button,
.lesson-next .btn {
  font: inherit;
  font-weight: 700;
  padding: .8rem 1.15rem;
  min-height: 44px;
  border-radius: 999px;
  border: 2px solid currentColor;
  background: var(--accent, #2F5D4A);
  color: #fff;
  cursor: pointer;
}
.learn-check button,
.module-quiz .quiz-submit {
  color: #fff;
  background: var(--accent, #2F5D4A);
  border-color: var(--accent, #2F5D4A);
}
html[data-theme="youth"] .learn-check button,
html[data-theme="teens"] .learn-check button,
html[data-theme="youth"] .module-quiz .quiz-submit,
html[data-theme="teens"] .module-quiz .quiz-submit {
  color: #111;
}
.module-quiz .quiz-retake {
  background: transparent;
  color: inherit;
  border-color: currentColor;
  margin-left: .4rem;
}
.learn-feedback,
.quiz-score {
  margin: .9rem 0 0;
  padding: .75rem .85rem;
  border-radius: 10px;
  border-left: 5px solid currentColor;
}
.learn-feedback[hidden],
.quiz-results[hidden],
.learn-explain[hidden] {
  display: none !important;
}
.learn-feedback.is-correct,
.quiz-item.is-correct {
  border-left-color: #1F7A4D;
  background: rgba(31, 122, 77, 0.14);
}
.learn-feedback.is-wrong,
.quiz-item.is-wrong {
  border-left-color: #B33B1F;
  background: rgba(179, 59, 31, 0.14);
}
.learn-feedback.is-note {
  border-left-color: currentColor;
  background: rgba(127, 127, 127, 0.12);
}
.learn-options label.is-chosen-correct {
  outline: 2px solid #1F7A4D;
  outline-offset: 0;
}
.learn-options label.is-chosen-wrong {
  outline: 2px solid #B33B1F;
  outline-offset: 0;
}
.module-quiz__lede,
.lesson-next p {
  margin: 0 0 1rem;
}
.module-quiz form {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}
.quiz-item {
  padding: .2rem 0 .2rem;
  border-radius: 10px;
}
.quiz-review {
  margin: 1rem 0 0;
  padding-left: 1.2rem;
}
.quiz-review li {
  margin: 0 0 .8rem;
}
.quiz-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .4rem;
}
.lesson-next {
  border-style: dashed;
}
.lesson-next .btn[aria-disabled="true"] {
  pointer-events: none;
  opacity: .55;
  background: transparent;
  color: inherit;
  border-style: dashed;
  text-decoration: none;
}
.learn-check:focus-within,
.module-quiz:focus-within {
  scroll-margin-top: 1rem;
}
@media (max-width: 640px) {
  .learn-check,
  .module-quiz,
  .lesson-next {
    padding: 1rem .9rem 1.1rem;
    border-radius: 12px;
  }
  .module-quiz .quiz-retake {
    margin-left: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .learn-check,
  .module-quiz,
  .learn-options label {
    transition: none;
  }
}

/* Offer after the first Basics module quiz */
.offer-panel {
  margin: 1.6rem 0 0;
  padding: 1.15rem 1.15rem 1.3rem;
  border: 2px solid currentColor;
  border-radius: 16px;
  background: var(--card, transparent);
}
.offer-panel[hidden],
.offer-notify[hidden] {
  display: none !important;
}
.offer-kicker {
  margin: 0 0 .45rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.offer-panel h2,
.offer-notify h3 {
  margin: 0 0 .6rem;
  font-size: 1.25rem;
}
.offer-panel > p,
.offer-notify > p {
  margin: 0 0 1rem;
}
.offer-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .7rem;
  margin: 0 0 1rem;
}
.offer-choice {
  font: inherit;
  font-weight: 700;
  text-align: left;
  padding: .9rem 1rem;
  min-height: 48px;
  border-radius: 12px;
  border: 2px solid currentColor;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.offer-choice:hover,
.offer-choice:focus-visible,
.offer-choice[aria-pressed="true"] {
  background: var(--accent, #2F5D4A);
  color: #fff;
  border-color: var(--accent, #2F5D4A);
}
html[data-theme="youth"] .offer-choice:hover,
html[data-theme="teens"] .offer-choice:hover,
html[data-theme="youth"] .offer-choice:focus-visible,
html[data-theme="teens"] .offer-choice:focus-visible,
html[data-theme="youth"] .offer-choice[aria-pressed="true"],
html[data-theme="teens"] .offer-choice[aria-pressed="true"] {
  color: #111;
}
.offer-choice small {
  display: block;
  font-weight: 500;
  margin-top: .25rem;
  opacity: .9;
}
.offer-notify {
  margin-top: .4rem;
  padding-top: .4rem;
}
@media (max-width: 800px) {
  .offer-options { grid-template-columns: 1fr; }
}

/* Iris v2 audience keys — aliases for the existing theme hooks. No renderer switch yet. */
html[data-audience="teens-13-17"] .learn-check button,
html[data-audience="teens-13-17"] .module-quiz .quiz-submit,
html[data-audience="teens-13-17"] .offer-choice:hover,
html[data-audience="teens-13-17"] .offer-choice:focus-visible,
html[data-audience="teens-13-17"] .offer-choice[aria-pressed="true"] {
  color: #111;
}
