/* Shared styles for the "Тесты" section quiz engine (le-test.js). */

.le-test {
  max-width: 620px;
  margin: 16px 0 28px;
  scroll-margin-top: 16px;
}

.le-test-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px 12px;
  margin-bottom: 14px;
  font-weight: 700;
  color: #1A1F36;
}

.le-test-tally {
  font-size: 14px;
  color: #64748B;
}

.le-test-progress {
  flex-basis: 100%;
  height: 8px;
  border-radius: 999px;
  background: #E6E9F2;
  overflow: hidden;
}

.le-test-progress-bar {
  height: 100%;
  width: 0;
  background: #4C6EF5;
  transition: width 0.25s ease;
}

.le-test-card {
  background: #fff;
  border: 1px solid #E6E9F2;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 14px rgba(28, 39, 76, 0.08);
}

.le-test-question {
  font-weight: 800;
  font-size: 19px;
  line-height: 1.6;
  color: #1A1F36;
  margin: 0 0 18px;
}

.le-test-gap {
  display: inline-block;
  min-width: 64px;
  border-bottom: 3px solid #C5CCE8;
  margin: 0 3px;
  line-height: 1.2;
  vertical-align: baseline;
}

.le-test-gap.is-filled {
  min-width: 0;
  padding: 0 6px;
  border-bottom-color: #12B76A;
  background: #ECFDF5;
  border-radius: 6px 6px 0 0;
  color: #067647;
}

.le-test-answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.le-test-answer {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 2px solid #E6E9F2;
  background: #F5F7FC;
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 700;
  font-size: 16px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  color: #1A1F36;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.le-test-answer:hover:not(:disabled) {
  border-color: #4C6EF5;
  background: #fff;
}

.le-test-answer:disabled {
  cursor: default;
  opacity: 1;
}

.le-test-letter {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #E6E9F2;
  font-size: 13px;
  font-weight: 800;
  color: #64748B;
}

.le-test-answer.le-correct {
  border-color: #12B76A;
  background: #ECFDF5;
  color: #067647;
}

.le-test-answer.le-correct .le-test-letter {
  background: #12B76A;
  border-color: #12B76A;
  color: #fff;
}

.le-test-answer.le-wrong {
  border-color: #E11D48;
  background: #FEF2F2;
  color: #B42318;
}

.le-test-answer.le-wrong .le-test-letter {
  background: #E11D48;
  border-color: #E11D48;
  color: #fff;
}

.le-test-feedback {
  margin: 16px 0 0;
  padding: 14px 16px;
  border-radius: 12px;
  border-left: 4px solid #12B76A;
  background: #F0FDF6;
}

.le-test-feedback.is-wrong {
  border-left-color: #F25C54;
  background: #FFF4F2;
}

.le-test-verdict {
  margin: 0;
  font-weight: 800;
  color: #067647;
}

.le-test-feedback.is-wrong .le-test-verdict {
  color: #B42318;
}

.le-test-why {
  margin: 6px 0 0;
  color: #1A1F36;
  line-height: 1.5;
  font-size: 15px;
}

.le-test-next {
  margin-top: 16px;
  padding: 11px 26px;
  font-size: 15px;
}

.le-test-result {
  background: #fff;
  border: 1px solid #E6E9F2;
  border-radius: 16px;
  padding: 28px 24px;
  text-align: center;
  box-shadow: 0 4px 14px rgba(28, 39, 76, 0.08);
}

.le-test-ring {
  --pct: 0;
  --ring: #4C6EF5;
  width: 112px;
  height: 112px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: conic-gradient(var(--ring) calc(var(--pct) * 1%), #E6E9F2 0);
  display: flex;
  align-items: center;
  justify-content: center;
}

.le-test-ring.is-high { --ring: #12B76A; }
.le-test-ring.is-mid { --ring: #FFB020; }
.le-test-ring.is-low { --ring: #F25C54; }

.le-test-ring span {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 900;
  color: #1A1F36;
}

.le-test-score {
  font-weight: 700;
  color: #64748B;
  margin: 0 0 6px;
}

.le-test-level {
  font-weight: 900;
  font-size: 22px;
  color: #3B5BDB;
  margin: 0 0 14px;
}

.le-test-advice {
  color: #1A1F36;
  line-height: 1.5;
  margin: 0 0 20px;
}

.le-test-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.le-test-actions .le-btn {
  padding: 11px 24px;
  font-size: 15px;
  text-decoration: none;
}

.le-btn.le-btn-ghost {
  background: #EEF2FF;
  color: #3B5BDB;
}

.le-btn.le-btn-ghost:hover {
  background: #DCE3FF;
}

.le-test-review {
  text-align: left;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #E6E9F2;
}

.le-test-review:empty {
  display: none;
}

.le-test-review-title {
  font-weight: 900;
  font-size: 18px;
  color: #1A1F36;
  margin: 0 0 12px;
  text-align: center;
}

.le-test-review ol {
  margin: 0;
  padding-left: 22px;
}

.le-test-review li {
  padding: 10px 0 12px;
  border-bottom: 1px dashed #E6E9F2;
}

.le-test-review li:last-child {
  border-bottom: 0;
}

.le-test-review-q {
  margin: 0;
  font-weight: 800;
  line-height: 1.6;
}

.le-test-review-yours {
  margin: 2px 0 0;
  font-size: 14px;
  color: #B42318;
}

/* «Шпаргалка» cards above a test (stored in the article body) */
.le-cheats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 820px;
  margin: 12px 0 24px;
}

.le-cheat {
  background: #fff;
  border: 1px solid #E6E9F2;
  border-top: 5px solid var(--cheat, #4C6EF5);
  border-radius: 14px;
  padding: 14px 16px;
}

.le-cheat-will { --cheat: #4C6EF5; }
.le-cheat-going { --cheat: #F25C54; }
.le-cheat-cont { --cheat: #12B76A; }
.le-cheat-simple { --cheat: #FFB020; }

.le-cheat-form {
  margin: 0 0 4px;
  font-weight: 900;
  font-size: 17px;
  color: #1A1F36;
}

.le-cheat-when {
  margin: 0 0 8px;
  color: #64748B;
  font-size: 14px;
  line-height: 1.45;
}

.le-cheat-ex {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
}

.le-cheat-ex em {
  font-weight: 700;
  color: #1A1F36;
}

.le-cheat-ex span {
  display: block;
  color: #64748B;
  font-size: 13px;
}

@media (max-width: 560px) {
  .le-test-card {
    padding: 18px 16px;
  }

  .le-test-question {
    font-size: 18px;
  }

  .le-test-answers,
  .le-cheats {
    grid-template-columns: 1fr;
  }
}

/* Test pages don't load interactive.css: the engine's own buttons are styled here */
.le-test [hidden] {
  display: none !important;
}

.le-test .le-btn {
  display: inline-block;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  font-family: inherit;
  line-height: 1.2;
  cursor: pointer;
  background: #4C6EF5;
  color: #fff;
  transition: background 0.15s ease, transform 0.1s ease;
}

.le-test .le-btn:hover {
  background: #3B5BDB;
}

.le-test .le-btn:active {
  transform: scale(0.97);
}

.le-test .le-btn:focus {
  outline: none;
}

.le-test .le-btn:focus-visible {
  outline: 3px solid #C5CCE8;
  outline-offset: 2px;
}

.le-test .le-btn.le-btn-ghost {
  background: #EEF2FF;
  color: #3B5BDB;
}

.le-test .le-btn.le-btn-ghost:hover {
  background: #DCE3FF;
}
