:root {
  --ink: #18202f;
  --muted: #667085;
  --paper: #f5f7fb;
  --panel: rgba(255, 255, 255, 0.92);
  --line: #d9e1ec;
  --brand: #1b766f;
  --brand-dark: #12524d;
  --accent: #e6a23c;
  --correct: #1f8f5f;
  --wrong: #c24132;
  --shadow: 0 22px 50px rgba(24, 32, 47, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(rgba(245, 247, 251, 0.88), rgba(245, 247, 251, 0.96)),
    url("https://images.unsplash.com/photo-1503676260728-1c00da094a0b?auto=format&fit=crop&w=1600&q=80");
  background-size: cover;
  background-position: center;
  font-family: Inter, Arial, Helvetica, sans-serif;
}

button {
  font: inherit;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 40px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.8fr);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 24px;
}

.hero-copy,
.score-card,
.content-section,
.game-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 30px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: var(--brand-dark);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.intro {
  max-width: 720px;
  margin: 18px 0 0;
  color: #3b4558;
  font-size: 1.08rem;
  line-height: 1.65;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-stats span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: #eef7f5;
  color: var(--brand-dark);
  font-weight: 700;
  font-size: 0.92rem;
}

.score-card {
  align-self: stretch;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.score-label {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

#score {
  display: block;
  margin-top: 10px;
  color: var(--brand-dark);
  font-size: 3rem;
  line-height: 1;
}

.score-card p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.content-section {
  margin-top: 22px;
  padding: 28px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.2;
}

.section-heading p {
  max-width: 860px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.theory-grid,
.task-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.theory-card,
.scaffold-panel,
.task-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.card-badge,
.cue-tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: #eef7f5;
  color: var(--brand-dark);
  font-weight: 800;
  font-size: 0.8rem;
}

.theory-card h3,
.scaffold-panel h3,
.task-card h3 {
  margin: 14px 0 10px;
  font-size: 1.08rem;
  line-height: 1.35;
}

.theory-card p,
.scaffold-panel li,
.task-card p,
.task-card li {
  color: #4b5565;
  line-height: 1.7;
}

.scaffold-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
  margin-top: 22px;
}

.scaffold-list {
  margin: 0;
  padding-left: 20px;
}

.scaffold-list li + li {
  margin-top: 12px;
}

.cue-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 8px;
}

.cue-item {
  padding: 14px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid #e7edf5;
}

.cue-item p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.game-panel {
  padding: 28px;
}

.top-bar,
.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.level-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  color: #fff;
  background: var(--brand);
  font-weight: 800;
  font-size: 0.88rem;
}

.progress-text {
  margin: 8px 0 0;
  color: var(--muted);
}

.progress-track {
  margin-top: 16px;
  height: 10px;
  border-radius: 999px;
  background: #e9eef5;
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), #59b6ab);
  transition: width 0.25s ease;
}

.icon-button {
  min-width: 76px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--brand-dark);
  background: #fff;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 800;
}

.question-area {
  min-height: 168px;
  margin-top: 22px;
  padding: 24px;
  border-left: 5px solid var(--accent);
  background: #fff8ec;
  border-radius: 18px;
}

.scenario {
  margin: 0 0 12px;
  color: var(--muted);
  font-weight: 800;
}

.question-area h3 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.28;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.option-button {
  min-height: 72px;
  padding: 14px 16px;
  border: 2px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  text-align: left;
  line-height: 1.4;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.option-button:hover,
.option-button:focus {
  border-color: var(--brand);
  outline: none;
  transform: translateY(-1px);
}

.option-button.correct {
  border-color: var(--correct);
  background: #eaf8f0;
}

.option-button.wrong {
  border-color: var(--wrong);
  background: #fff0ee;
}

.option-button:disabled {
  cursor: default;
  transform: none;
}

.feedback {
  margin-top: 18px;
  padding: 16px;
  border-radius: 16px;
  line-height: 1.6;
}

.feedback strong {
  display: inline-block;
  margin-right: 6px;
}

.feedback.correct {
  color: #155a3e;
  background: #eaf8f0;
}

.feedback.wrong {
  color: #8d2b22;
  background: #fff0ee;
}

.hidden {
  display: none;
}

.actions {
  margin-top: 22px;
  justify-content: flex-end;
}

.primary-button {
  min-width: 124px;
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: var(--brand);
  cursor: pointer;
  font-weight: 800;
}

.primary-button:disabled {
  background: #aab4c1;
  cursor: default;
}

.task-card ul {
  margin: 12px 0 0;
  padding-left: 18px;
}

@media (max-width: 920px) {
  .hero,
  .scaffold-layout,
  .theory-grid,
  .task-grid {
    grid-template-columns: 1fr;
  }

  .score-card {
    text-align: left;
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 20px, 1180px);
    padding: 18px 0 26px;
  }

  .hero-copy,
  .content-section,
  .game-panel {
    padding: 20px;
    border-radius: 20px;
  }

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

  .question-area {
    min-height: 190px;
    padding: 18px;
  }

  .top-bar,
  .actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .primary-button {
    width: 100%;
  }
}
