.quiz-shell {
  width: min(960px, 100%);
  min-height: calc(100vh - 64px);
  margin: 0 auto;
  padding: 38px 24px 56px;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  gap: 48px;
  align-items: center;
  min-height: calc(100vh - 158px);
}

.auth-intro h1 {
  max-width: 620px;
  margin: 14px 0 18px;
  font-size: 48px;
  line-height: 1.2;
}

.auth-intro p {
  max-width: 600px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.eyebrow {
  color: var(--green);
  font-size: 14px;
  font-weight: 750;
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 520px;
  margin-top: 32px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.feature-strip div {
  padding: 20px 12px;
  border-right: 1px solid var(--line);
}

.feature-strip div:first-child {
  padding-left: 0;
}

.feature-strip div:last-child {
  border-right: 0;
}

.feature-strip strong,
.feature-strip span {
  display: block;
}

.feature-strip strong {
  color: var(--green);
  font-size: 25px;
}

.feature-strip span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.login-panel {
  display: grid;
  gap: 19px;
  padding: 30px;
}

.form-heading h2 {
  margin: 0;
  font-size: 24px;
}

.form-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f8f6;
}

.segmented button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
}

.segmented button.active {
  color: #fff;
  background: var(--green);
  font-weight: 650;
}

.login-submit,
.action-btn {
  width: 100%;
  min-height: 48px;
}

.quiz-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.quiz-user {
  font-size: 22px;
  font-weight: 750;
}

.quiz-meta {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.progress-block {
  margin-bottom: 20px;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 5px;
  background: #dbe7df;
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: 5px;
  background: var(--green);
  transition: width 180ms ease;
}

.question-panel {
  padding: 30px;
}

.question-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.question-tags span {
  padding: 6px 9px;
  border-radius: 5px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 12px;
  font-weight: 650;
}

.question-tags span:last-child {
  color: #4d5e53;
  background: #edf1ee;
}

.question-panel h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.55;
}

.options {
  display: grid;
  gap: 13px;
  margin-top: 28px;
}

.option {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 13px;
  align-items: center;
  min-height: 58px;
  padding: 11px 16px;
  border: 2px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fbfcfb;
  text-align: left;
}

.option:hover,
.option.selected {
  border-color: var(--green);
  background: #eef7f1;
}

.option.correct {
  border-color: var(--green);
  background: var(--green-soft);
}

.option.wrong {
  border-color: var(--danger);
  background: var(--danger-soft);
}

.option-key {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: var(--green);
  background: #e4eee7;
  font-weight: 750;
}

.option-text {
  font-size: 16px;
  line-height: 1.5;
}

.feedback {
  margin-top: 18px;
  padding: 22px 24px;
}

.feedback-title {
  font-size: 19px;
  font-weight: 750;
}

.feedback.correct-feedback .feedback-title {
  color: var(--green);
}

.feedback.wrong-feedback .feedback-title {
  color: var(--danger);
}

.answer-text {
  margin-top: 9px;
  font-weight: 650;
}

.feedback p {
  margin: 9px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.action-btn {
  margin-top: 20px;
}

.result-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 20px;
}

.result-score,
.result-details {
  padding: 30px;
}

.result-score > span {
  color: var(--muted);
  font-size: 14px;
}

.result-score div {
  margin-top: 12px;
  color: var(--green);
}

.result-score strong {
  font-size: 74px;
  line-height: 1;
}

.result-score small {
  margin-left: 6px;
  font-size: 18px;
  font-weight: 700;
}

.result-score p {
  margin: 16px 0 0;
  color: var(--muted);
}

.result-details h2,
.review-section h2 {
  margin: 0 0 18px;
  font-size: 20px;
}

.result-details dl {
  margin: 0;
}

.result-details dl div {
  display: flex;
  justify-content: space-between;
  padding: 13px 0;
  border-bottom: 1px solid #edf1ee;
}

.result-details dt {
  color: var(--muted);
}

.result-details dd {
  margin: 0;
  font-weight: 700;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0 34px;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.review-section {
  margin-top: 24px;
}

.review-item {
  margin-bottom: 14px;
  padding: 20px;
}

.review-item h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
}

.review-item p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

@media (max-width: 780px) {
  .quiz-shell {
    min-height: calc(100vh - 58px);
    padding: 22px 16px 42px;
  }

  .auth-layout {
    display: block;
    min-height: 0;
  }

  .auth-intro {
    margin-bottom: 26px;
  }

  .auth-intro h1 {
    margin-top: 10px;
    font-size: 31px;
  }

  .auth-intro p {
    font-size: 15px;
  }

  .feature-strip {
    margin-top: 22px;
  }

  .login-panel {
    padding: 24px 20px;
  }

  .question-panel {
    padding: 22px 18px;
  }

  .question-panel h2 {
    font-size: 20px;
  }

  .option {
    padding: 10px 12px;
  }

  .option-text {
    font-size: 15px;
  }

  .result-grid {
    grid-template-columns: 1fr;
  }

  .result-actions .btn {
    flex: 1 1 140px;
  }
}
