:root {
  --maroon: #4d0e12;
  --maroon-dark: #3e090d;
  --cream: #fcfaf0;
  --pale-yellow: #f5efc6;
  --border: #e9dfc8;
  --text: #39241f;
  --muted: #7e716b;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--text);
  font-family: "DM Sans", sans-serif;
}

button, a {
  font: inherit;
}

.site-header {
  height: 84px;
  background: #fff;
  border-bottom: 1px solid #eee7d7;
  position: sticky;
  top: 0;
  z-index: 20;
}

.nav-wrap {
  width: min(1450px, 88%);
  height: 100%;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: #111;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  background: var(--maroon);
  color: white;
  border-radius: 14px;
  font-size: 24px;
}

.brand-words {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  letter-spacing: 2px;
}

.brand-words strong {
  font-size: 18px;
  font-weight: 800;
}

.brand-words small {
  font-size: 10px;
  margin-top: 5px;
  letter-spacing: 3px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 30px);
}

.main-nav a {
  color: #170f0d;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.main-nav a:hover {
  color: var(--maroon);
}

.main-nav .nav-pill {
  padding: 12px 21px;
  border-radius: 28px;
  border: 1px solid transparent;
}

.main-nav .signup {
  background: var(--pale-yellow);
}

.main-nav .login {
  border-color: var(--border);
}

.main-nav .started {
  background: var(--maroon);
  color: white;
}

.menu-toggle {
  display: none;
  background: var(--maroon);
  color: white;
  border: 0;
  border-radius: 9px;
  padding: 10px 12px;
  cursor: pointer;
}

/* INTRODUCTION */
.intro-band {
  background: var(--pale-yellow);
  border-bottom: 1px solid #e9dfb5;
  min-height: 165px;
  display: flex;
  align-items: center;
}

.intro-inner {
  width: min(1235px, 76%);
  margin: auto;
  padding: 25px 0 28px;
}

.overline, .quiz-eyebrow {
  color: var(--maroon);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  margin: 0 0 8px;
}

.intro-inner h1 {
  font-size: clamp(30px, 3vw, 40px);
  margin: 0 0 8px;
  color: var(--maroon);
}

.intro-inner p:last-child {
  max-width: 740px;
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: #59463d;
}

/* REVIEWER CARDS */
.reviewer-section {
  width: min(1235px, 76%);
  margin: auto;
  padding: 38px 0 70px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 31px;
}

.filter-btn {
  border: 1px solid var(--border);
  background: white;
  color: var(--text);
  padding: 11px 20px;
  border-radius: 28px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--maroon);
  color: white;
  border-color: var(--maroon);
}

.reviewer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 23px;
}

.review-card {
  min-height: 378px;
  padding: 27px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: white;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}

.review-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px #4d0e120b;
}

.review-card[hidden] {
  display: none !important;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 22px;
}

.card-label {
  font-size: 10px;
  letter-spacing: 1.8px;
  color: var(--maroon);
  font-weight: 800;
}

.card-icon {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: var(--maroon);
  font-size: 22px;
}

.icon-yellow { background: var(--pale-yellow); }
.icon-blue { background: #a5bcd6; }
.icon-tan { background: #e9dfd5; color: #4b2c20; }
.icon-pale-blue { background: #edf4f8; }
.icon-white { background: white; color: #321b14; }

.review-card h2 {
  font-size: 22px;
  line-height: 1.35;
  margin: 0 0 13px;
  color: #422b25;
  font-weight: 700;
}

.review-card > p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
  margin: 0 0 25px;
}

.card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 19px;
  color: #8a7770;
  font-size: 11px;
  margin-top: auto;
  margin-bottom: 19px;
}

.card-meta i {
  color: var(--maroon);
  margin-right: 5px;
}

.start-review {
  width: 100%;
  min-height: 45px;
  border: 0;
  border-radius: 10px;
  background: var(--maroon);
  color: white;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}

.start-review i {
  margin-left: 8px;
}

.start-review:hover {
  background: var(--maroon-dark);
  transform: translateY(-1px);
}

/* FOOTER */
.site-footer {
  background: white;
  border-top: 1px solid var(--border);
  padding: 22px 15px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

.site-footer p {
  margin: 0;
}

/* QUIZ POPUP */
.quiz-overlay[hidden],
#quizResult[hidden] {
  display: none !important;
}

.quiz-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 18px;
  background: rgba(35, 18, 15, .72);
  overflow-y: auto;
}

.quiz-dialog {
  position: relative;
  width: min(650px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 34px;
  box-shadow: 0 24px 70px #0003;
}

.quiz-close {
  position: absolute;
  top: 12px;
  right: 17px;
  width: 35px;
  height: 35px;
  border: 0;
  background: transparent;
  color: var(--maroon);
  font-size: 32px;
  cursor: pointer;
}

.quiz-dialog h2 {
  color: var(--maroon);
  font-size: 25px;
  margin: 0 40px 20px 0;
}

.quiz-progress-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.progress-track {
  height: 7px;
  background: #e8dfc8;
  border-radius: 20px;
  overflow: hidden;
  margin: 12px 0 25px;
}

#progressFill {
  width: 0;
  height: 100%;
  background: var(--maroon);
  border-radius: 20px;
  transition: width .2s ease;
}

#questionText {
  font-size: 18px;
  line-height: 1.55;
  margin: 0 0 18px;
  color: var(--text);
}

.answer-option {
  width: 100%;
  display: block;
  text-align: left;
  padding: 13px 15px;
  margin: 9px 0;
  background: white;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.5;
  cursor: pointer;
}

.answer-option:hover:not(:disabled) {
  border-color: var(--maroon);
  background: #fffdf5;
}

.answer-option:disabled {
  cursor: default;
}

.answer-option.correct {
  border: 2px solid #4b8a58;
  background: #e7f4e8;
  color: #245b30;
  font-weight: 700;
}

.answer-option.incorrect {
  border: 2px solid #c46c6c;
  background: #f9e5e5;
  color: #8b2020;
  font-weight: 700;
}

#answerFeedback {
  min-height: 24px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
  margin: 15px 0;
}

#answerFeedback.correct-text {
  color: #286a36;
}

#answerFeedback.wrong-text {
  color: #9b2424;
}

.quiz-next,
.quiz-back {
  display: block;
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  margin-top: 10px;
}

.quiz-next {
  border: 1px solid var(--maroon);
  background: var(--maroon);
  color: white;
}

.quiz-next:hover:not(:disabled) {
  background: var(--maroon-dark);
}

.quiz-next:disabled {
  opacity: .48;
  cursor: not-allowed;
}

.quiz-back {
  border: 1px solid var(--border);
  background: white;
  color: var(--maroon);
}

#quizResult {
  text-align: center;
  padding: 14px 0 0;
}

#quizResult h2 {
  margin: 5px 0 15px;
}

.result-icon {
  display: block;
  font-size: 42px;
  color: var(--maroon);
  margin-bottom: 12px;
}

.result-score {
  color: var(--maroon);
  font-size: 34px;
  font-weight: 800;
  margin: 15px 0;
}

#resultMessage {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

/* RESPONSIVE */
@media (max-width: 1100px) {
  .reviewer-section,
  .intro-inner {
    width: 86%;
  }

  .review-card {
    padding: 23px;
  }

  .review-card h2 {
    font-size: 20px;
  }

  .main-nav {
    gap: 13px;
  }

  .main-nav .nav-pill {
    padding: 10px 15px;
  }
}

@media (max-width: 800px) {
  .site-header {
    height: 74px;
  }

  .nav-wrap {
    width: 90%;
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 74px;
    left: 0;
    right: 0;
    background: white;
    padding: 18px 5%;
    box-shadow: 0 10px 20px #0001;
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    text-align: center;
  }

  .reviewer-section,
  .intro-inner {
    width: 88%;
  }

  .reviewer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .intro-band {
    min-height: 150px;
  }

  .reviewer-section {
    padding-top: 27px;
  }

  .filter-row {
    gap: 8px;
  }

  .filter-btn {
    padding: 10px 14px;
    font-size: 12px;
  }

  .reviewer-grid {
    grid-template-columns: 1fr;
  }

  .review-card {
    min-height: 345px;
  }

  .quiz-dialog {
    padding: 28px 19px;
  }

  .quiz-dialog h2 {
    font-size: 21px;
  }

  #questionText {
    font-size: 16px;
  }
}