* { box-sizing: border-box; }
:root {
  --bg: #f5f7fb; --surface: #fff; --text: #172033; --muted: #697386;
  --primary: #5b4bdb; --primary-dark: #4738bb; --border: #e5e8f0;
  --success: #16805d; --danger: #c43d4b; --shadow: 0 16px 45px rgba(32, 40, 70, .10);
}
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.6; }
.container { width: min(1100px, calc(100% - 32px)); margin: auto; }
.hero { background: linear-gradient(135deg, #211d55, #5b4bdb); color: white; padding: 70px 0 62px; }
.hero h1 { font-size: clamp(2.3rem, 6vw, 4.5rem); line-height: 1; margin: 10px 0 20px; letter-spacing: -2px; }
.hero p:not(.eyebrow) { max-width: 680px; font-size: 1.1rem; opacity: .9; }
.eyebrow { margin: 0; font-size: .75rem; font-weight: 800; letter-spacing: .15em; opacity: .8; }
.nav { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.nav-inner { display: flex; gap: 8px; overflow-x: auto; }
.nav-btn { border: 0; background: transparent; padding: 18px 22px; cursor: pointer; font: inherit; color: var(--muted); font-weight: 700; border-bottom: 3px solid transparent; white-space: nowrap; }
.nav-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.section { display: none; padding: 55px 0 75px; }
.section.active { display: block; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 30px; }
h2 { font-size: clamp(2rem, 4vw, 3rem); margin: 5px 0 0; letter-spacing: -1px; }
.stats, .score { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 9px 15px; color: var(--muted); white-space: nowrap; }
.stats span, .score strong { color: var(--primary); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.filter { padding: 9px 14px; border: 1px solid var(--border); background: var(--surface); border-radius: 999px; cursor: pointer; color: var(--muted); }
.filter.active { background: var(--primary); border-color: var(--primary); color: white; }
.flashcard-wrap { display: grid; grid-template-columns: 50px minmax(0, 700px) 50px; justify-content: center; align-items: center; gap: 18px; }
.arrow { width: 50px; height: 50px; border-radius: 50%; border: 1px solid var(--border); background: white; font-size: 1.4rem; cursor: pointer; box-shadow: 0 5px 15px rgba(0,0,0,.05); }
.flashcard { min-height: 360px; border-radius: 28px; background: var(--surface); box-shadow: var(--shadow); position: relative; cursor: pointer; display: grid; place-items: center; text-align: center; padding: 50px; }
.flashcard.flipped .card-front { display: none; } .flashcard.flipped .card-back { display: block; }
.card-back { display: none; }
.flashcard small { color: var(--muted); font-weight: 800; letter-spacing: .15em; }
.flashcard strong { display: block; font-size: clamp(2.3rem, 7vw, 4.5rem); margin: 10px 0; }
.hint { color: var(--muted); font-size: .9rem; }
.level { position: absolute; top: 22px; right: 25px; color: var(--primary); font-weight: 800; font-size: .8rem; }
#example { color: var(--muted); max-width: 520px; }
.progress { text-align: center; color: var(--muted); margin-top: 18px; }
.quiz-box, .exercise { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: clamp(22px, 5vw, 45px); box-shadow: var(--shadow); }
.quiz-top { display: flex; justify-content: space-between; color: var(--muted); font-weight: 700; font-size: .9rem; }
.quiz-box h3 { font-size: clamp(1.4rem, 4vw, 2.2rem); margin: 35px 0; }
.answers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.answer { text-align: left; padding: 16px; background: var(--surface); border: 2px solid var(--border); border-radius: 13px; cursor: pointer; font: inherit; transition: .15s; }
.answer:hover { border-color: var(--primary); transform: translateY(-1px); }
.answer.correct { border-color: var(--success); background: #eaf8f3; }
.answer.wrong { border-color: var(--danger); background: #fff0f2; }
.feedback { min-height: 28px; margin: 18px 0 4px; font-weight: 700; }
.feedback.good { color: var(--success); } .feedback.bad { color: var(--danger); }
.primary, .secondary { border: 0; border-radius: 12px; padding: 13px 19px; font: inherit; font-weight: 800; cursor: pointer; margin-top: 12px; }
.primary { background: var(--primary); color: white; } .primary:hover { background: var(--primary-dark); }
.secondary { background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.hidden { display: none; }
.exercise-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.exercise-icon { font-size: 2rem; }
.exercise h3 { font-size: 1.3rem; margin: 8px 0; }
.exercise p { min-height: 55px; color: var(--muted); }
input { width: 100%; padding: 14px; border: 2px solid var(--border); border-radius: 11px; font: inherit; outline: none; }
input:focus { border-color: var(--primary); }
.compact { grid-template-columns: 1fr; }
footer { background: #171b2a; color: #aeb5c6; padding: 28px 0; text-align: center; font-size: .9rem; }
@media (max-width: 760px) {
  .hero { padding: 50px 0; } .section-heading { align-items: start; flex-direction: column; }
  .flashcard-wrap { grid-template-columns: 40px minmax(0, 1fr) 40px; gap: 7px; }
  .arrow { width: 40px; height: 40px; } .flashcard { min-height: 330px; padding: 30px 15px; }
  .answers, .exercise-grid { grid-template-columns: 1fr; }
}
