* { box-sizing: border-box; }

:root {
  --bg: #f4efe4;
  --card: #fffaf1;
  --ink: #182319;
  --muted: #657064;
  --green: #234c35;
  --green-2: #34694a;
  --line: #ded3bf;
  --danger: #9d2d2d;
  --ok: #27613d;
  --shadow: 0 24px 70px rgba(28, 42, 27, 0.12);
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(52,105,74,.18), transparent 34rem),
    linear-gradient(180deg, #f7f1e6, var(--bg));
}

a { color: inherit; text-decoration: none; }

.site-header { padding: 26px 22px 60px; }
.compact-header { padding: 24px 22px; }

.nav {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--green);
  color: white;
  box-shadow: var(--shadow);
}

.nav-links {
  display: flex;
  gap: 22px;
  color: var(--muted);
  font-weight: 650;
}

.hero {
  max-width: 1120px;
  margin: 78px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
  gap: 34px;
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .76rem;
  color: var(--green-2);
  font-weight: 850;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  font-size: clamp(2.5rem, 7vw, 5.6rem);
  line-height: .92;
  letter-spacing: -.075em;
  margin-bottom: 22px;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
  letter-spacing: -.05em;
  margin-bottom: 14px;
}

h3 {
  font-size: 1.35rem;
  letter-spacing: -.025em;
}

.hero-text, .section-text, .mission p {
  font-size: 1.08rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 720px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.button {
  border: none;
  border-radius: 999px;
  padding: 13px 20px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.button:hover { transform: translateY(-1px); }

.primary {
  background: var(--green);
  color: white;
  box-shadow: 0 14px 30px rgba(35,76,53,.22);
}

.secondary {
  background: #e8decb;
  color: var(--green);
}

.full { width: 100%; }

.hero-card, .panel, .quiz-card, .stat, .mission {
  background: rgba(255, 250, 241, .82);
  border: 1px solid rgba(222, 211, 191, .9);
  border-radius: 30px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.hero-card { padding: 34px; }

.small-label { color: var(--muted); font-weight: 700; }

.big-number {
  font-size: 5rem;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -.08em;
  color: var(--green);
}

.muted { color: var(--muted); }

.section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 48px 22px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.stat { padding: 24px; }

.stat span {
  display: block;
  font-size: 2.3rem;
  font-weight: 900;
  color: var(--green);
}

.stat p {
  color: var(--muted);
  margin-bottom: 0;
  font-weight: 700;
}

.section-heading { margin-bottom: 22px; }

.quiz-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.quiz-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  min-height: 330px;
}

.quiz-card p {
  color: var(--muted);
  line-height: 1.6;
}

.quiz-card-top, .quiz-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.quiz-meta {
  margin-top: auto;
  padding-top: 20px;
  padding-bottom: 16px;
  color: var(--muted);
  font-weight: 750;
  font-size: .92rem;
}

.tag, .difficulty, .progress-pill {
  border-radius: 999px;
  padding: 7px 10px;
  font-size: .78rem;
  font-weight: 850;
}

.tag {
  background: rgba(35,76,53,.12);
  color: var(--green);
}

.difficulty, .progress-pill {
  background: #eee4d1;
  color: var(--muted);
}

.mission {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 30px;
  padding: 34px;
}

.footer {
  padding: 40px 22px;
  text-align: center;
  color: var(--muted);
}

.quiz-page {
  max-width: 900px;
  margin: 30px auto 80px;
  padding: 0 22px;
}

.panel { padding: clamp(24px, 4vw, 42px); }
.hidden { display: none !important; }

.form-row {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

input {
  flex: 1;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  padding: 15px 17px;
  border-radius: 999px;
  font-size: 1rem;
  outline: none;
}

input:focus { border-color: var(--green-2); }

.error {
  color: var(--danger);
  font-weight: 800;
  margin-top: 12px;
}

.quiz-top {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: start;
}

.progress-bar {
  height: 10px;
  background: #e6dcc9;
  border-radius: 999px;
  overflow: hidden;
  margin: 18px 0 34px;
}

#progressFill {
  height: 100%;
  width: 0%;
  background: var(--green);
  transition: width .2s ease;
}

#questionText {
  font-size: clamp(1.45rem, 3vw, 2.4rem);
  line-height: 1.16;
  margin-bottom: 18px;
}

.answers { display: grid; gap: 12px; }

.answer {
  text-align: left;
  border: 1px solid var(--line);
  background: white;
  padding: 17px 18px;
  border-radius: 18px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 750;
}

.answer:hover { border-color: var(--green-2); }
.answer.correct { background: rgba(39,97,61,.12); border-color: var(--ok); }
.answer.wrong { background: rgba(157,45,45,.10); border-color: var(--danger); }
#nextBtn { margin-top: 22px; }

.result-score {
  font-size: 5rem;
  font-weight: 950;
  color: var(--green);
  letter-spacing: -.06em;
}

.review-box {
  display: grid;
  gap: 12px;
  margin-top: 26px;
}

.review-item {
  border: 1px solid var(--line);
  background: white;
  border-radius: 18px;
  padding: 16px;
}

.review-item p { margin: 8px 0 0; }
.review-correct { border-left: 6px solid var(--ok); }
.review-wrong { border-left: 6px solid var(--danger); }

@media (max-width: 840px) {
  .hero, .mission { grid-template-columns: 1fr; }
  .quiz-grid, .stats-grid { grid-template-columns: 1fr; }
  .nav { align-items: flex-start; }
  .nav-links { display: none; }
  .form-row { flex-direction: column; }
}
