.lct-wrapper {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 36px 32px 60px;
  background: #ffffff;
  font-family: inherit;
  color: #3d3d3d;
  box-sizing: border-box;
}

.lct-wrapper *,
.lct-wrapper *::before,
.lct-wrapper *::after {
  box-sizing: border-box;
}

.lct-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: flex-start;
  width: 100%;
  justify-items: stretch;
}

/* ===== Intro / Title ===== */
.lct-intro {
  width: 100%;
  max-width: none;
  margin: 0;
}

.lct-intro-hero {
  display: flex !important;
  align-items: flex-start !important;
  gap: 18px !important;
  margin-bottom: 18px;
  width: 100%;
}

.lct-intro-icon {
  flex: 0 0 56px !important;
  width: 56px !important;
  height: 56px !important;
  max-width: 56px !important;
  max-height: 56px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 14px;
  background: linear-gradient(135deg, #edf4ff 0%, #dbeafe 100%);
  color: #003f91;
  box-shadow: 0 10px 24px rgba(0, 63, 145, 0.08);
  overflow: hidden !important;
}

.lct-intro-icon svg {
  width: 28px !important;
  height: 28px !important;
  max-width: 28px !important;
  max-height: 28px !important;
  display: block !important;
  flex: 0 0 auto !important;
}

.lct-intro-content {
  min-width: 0;
  flex: 1 1 auto;
}

.lct-intro h1 {
  margin: 0;
  font-size: clamp(28px, 2.8vw, 42px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: #2f3640;
}

.lct-intro-description {
  margin: 0 0 30px;
  width: 100%;
  max-width: none;
  font-size: 16px;
  line-height: 1.75;
  color: #1f2937;
}

.lct-intro p {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
  color: #333;
}

/* ===== Question Panel ===== */
.lct-panel {
  width: 100%;
  max-width: none;
  margin: 0;
  min-width: 0;
  border: 1px solid #d6d6d6;
  padding: 36px 40px 34px;
  background: #ffffff;
}

.lct-question-box {
  width: 100%;
}

.lct-question-box h2 {
  margin: 0 0 16px;
  font-size: clamp(26px, 2.4vw, 38px);
  line-height: 1.22;
  font-weight: 700;
  color: #2f3640;
}

.lct-progress {
  margin-bottom: 28px;
  color: #003f91;
  font-size: 14px;
  line-height: 1;
  font-weight: 700;
  text-transform: uppercase;
}

.lct-answers {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 24px;
  width: 100%;
}

.lct-answer {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  width: 100%;
  padding: 16px 22px;
  border: 1px solid #c8ced6;
  background: #ffffff;
  color: #3d3d3d;
  cursor: pointer;
  text-align: center;
  transition: 0.2s ease;
  min-width: 0;
  overflow-wrap: break-word;
}

.lct-answer input {
  display: none;
}

.lct-answer span {
  display: block;
  width: 100%;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
}

.lct-answer:hover,
.lct-answer.is-selected {
  border-color: #003f91;
  color: #003f91;
  box-shadow: inset 0 0 0 1px #003f91;
}

.lct-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
  width: 100%;
}

.lct-actions button,
.lct-restart {
  min-width: 128px;
  min-height: 54px;
  border: 1px solid #d6dce3;
  padding: 14px 28px;
  background: #ffffff;
  color: #2874c9;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

.lct-prev {
  border-color: #d6dce3 !important;
  background: #ffffff !important;
  color: #2874c9 !important;
}

.lct-next {
  margin-left: auto;
  border-color: #003f91 !important;
  background: #003f91 !important;
  color: #ffffff !important;
}

.lct-actions button:hover,
.lct-restart:hover {
  opacity: 0.92;
}

/* ===== Result Heading ===== */
.lct-result {
  display: none;
  width: 100%;
}

.lct-result-heading {
  width: 100%;
}

.lct-result-heading h2 {
  margin: 0 0 10px;
  font-size: 30px;
  line-height: 1.2;
  font-weight: 700;
  color: #2f3640;
}

.lct-result-heading p {
  margin: 0 0 26px;
  font-size: 16px;
  line-height: 1.7;
  color: #333;
}

/* ===== Top 3 result cards ===== */
.lct-result-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: 42px;
  margin-bottom: 30px;
  align-items: stretch;
  width: 100%;
}

.lct-result-card {
  position: relative;
  min-height: 360px;
  height: 100%;
  padding: 44px 20px 22px;
  border: 1px solid #b8c9ef;
  text-align: center;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lct-result-card-1 {
  border-color: #003f91;
}

.lct-result-card-2 {
  border-color: #6b7fd7;
}

.lct-result-card-3 {
  border-color: #c8d0ee;
}

.lct-rank-badge {
  position: absolute;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: #003f91;
  color: #ffffff;
  font-weight: 700;
  font-size: 18px;
  line-height: 1;
  z-index: 1;
}

.lct-result-card-2 .lct-rank-badge {
  background: #6576c9;
}

.lct-result-card-3 .lct-rank-badge {
  background: #c6cdeb;
}

.lct-avatar {
  position: absolute;
  top: -22px;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 5px solid #dff0fb;
  background: #f6d36b;
  font-size: 24px;
  line-height: 1;
  z-index: 2;
}

.lct-result-card h3 {
  margin: 22px 0 12px;
  min-height: 62px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 700;
  color: #2f3640;
}

.lct-result-card p {
  margin: 0;
  width: 100%;
  flex: 1 1 auto;
  font-size: 14px;
  line-height: 1.7;
  color: #333;
}

.lct-score {
  margin-top: 16px;
  padding-top: 4px;
  font-weight: 700;
  font-size: 17px;
  color: #003f91;
}

/* ===== Other results list ===== */
.lct-result-list {
  border-top: 1px solid #d8e4ef;
  width: 100%;
}

.lct-result-accordion {
  border-bottom: 1px solid #d8e4ef;
  padding: 0;
}

.lct-result-accordion summary {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto 18px;
  align-items: center;
  column-gap: 16px;
  list-style: none;
  cursor: pointer;
  padding: 18px 0;
}

.lct-result-accordion summary::-webkit-details-marker {
  display: none;
}

.lct-result-accordion summary::after {
  content: "⌄";
  justify-self: end;
  font-size: 22px;
  color: #444;
  line-height: 1;
}

.lct-result-accordion[open] summary::after {
  content: "⌃";
}

.lct-small-avatar {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #dff0fb;
  font-size: 22px;
  line-height: 1;
}

.lct-result-accordion summary strong {
  min-width: 0;
  font-size: 16px;
  line-height: 1.4;
  color: #1f2937;
}

.lct-accordion-score {
  font-weight: 700;
  font-size: 16px;
  color: #003f91;
  white-space: nowrap;
}

.lct-result-accordion p {
  margin: 0 0 18px 60px;
  font-size: 14px;
  line-height: 1.7;
  color: #333;
}

.lct-restart {
  margin-top: 24px;
  background: #003f91;
  border-color: #003f91;
  color: #ffffff;
}

/* ===== Tutor LMS / full width mode ===== */
.tutor-course-single-content-wrapper .lct-wrapper,
.tutor-lesson-content-area .lct-wrapper,
.tutor-course-content .lct-wrapper {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 36px 32px 60px !important;
  overflow: visible !important;
}

.tutor-course-single-content-wrapper .lct-layout,
.tutor-lesson-content-area .lct-layout,
.tutor-course-content .lct-layout {
  grid-template-columns: 1fr !important;
  justify-items: stretch !important;
}

.tutor-course-single-content-wrapper .lct-intro,
.tutor-course-single-content-wrapper .lct-panel,
.tutor-lesson-content-area .lct-intro,
.tutor-lesson-content-area .lct-panel,
.tutor-course-content .lct-intro,
.tutor-course-content .lct-panel {
  max-width: none !important;
  width: 100% !important;
}

.tutor-course-single-content-wrapper .lct-result-cards,
.tutor-lesson-content-area .lct-result-cards,
.tutor-course-content .lct-result-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

/* JS adds this class to the Tutor LMS parent column */
.lct-fullwidth-column {
  width: 100% !important;
}

.lct-fullwidth-column .lct-wrapper {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}

@media (max-width: 991px) {
  .lct-wrapper,
  .tutor-course-single-content-wrapper .lct-wrapper,
  .tutor-lesson-content-area .lct-wrapper,
  .tutor-course-content .lct-wrapper {
    padding: 28px 20px 44px !important;
  }

  .lct-panel {
    padding: 28px 24px 28px;
  }

  .lct-result-cards,
  .tutor-course-single-content-wrapper .lct-result-cards,
  .tutor-lesson-content-area .lct-result-cards,
  .tutor-course-content .lct-result-cards {
    grid-template-columns: 1fr !important;
  }

  .lct-result-card {
    min-height: auto;
    margin-top: 34px;
  }

  .lct-result-card h3 {
    min-height: auto;
  }
}

@media (max-width: 760px) {
  .lct-intro-hero {
    flex-direction: column;
    gap: 14px;
  }

  .lct-intro-icon {
    width: 64px !important;
    height: 64px !important;
    max-width: 64px !important;
    max-height: 64px !important;
    flex-basis: 64px !important;
  }

  .lct-intro-icon svg {
    width: 30px !important;
    height: 30px !important;
    max-width: 30px !important;
    max-height: 30px !important;
  }

  .lct-intro h1 {
    font-size: clamp(28px, 7vw, 40px);
  }

  .lct-question-box h2 {
    font-size: clamp(26px, 7vw, 36px);
  }

  .lct-result-accordion summary {
    grid-template-columns: 44px minmax(0, 1fr) auto;
  }

  .lct-result-accordion summary::after {
    display: none;
  }
}

@media (max-width: 600px) {
  .lct-wrapper,
  .tutor-course-single-content-wrapper .lct-wrapper,
  .tutor-lesson-content-area .lct-wrapper,
  .tutor-course-content .lct-wrapper {
    padding: 22px 14px 36px !important;
  }

  .lct-panel {
    padding: 22px 16px 24px;
  }

  .lct-answer {
    min-height: 58px;
    padding: 14px 16px;
  }

  .lct-answer span {
    font-size: 17px;
  }

  .lct-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .lct-actions button,
  .lct-restart {
    width: 100%;
  }

  .lct-next {
    margin-left: 0;
  }

  .lct-result-accordion summary {
    grid-template-columns: 44px minmax(0, 1fr);
    row-gap: 8px;
  }

  .lct-accordion-score {
    grid-column: 2;
  }

  .lct-result-accordion p {
    margin-left: 0;
  }
}