* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; background: linear-gradient(180deg, #f6f8fc 0%, #eef3fb 100%); color: #18324a; }
.app-shell { max-width: 1100px; margin: 0 auto; padding: 18px 14px 40px; }
.hero { display: flex; justify-content: space-between; gap: 16px; align-items: stretch; margin-bottom: 16px; }
.eyebrow { display: inline-block; background: #ecf4ff; color: #275786; padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; margin-bottom: 10px; }
h1 { margin: 0 0 8px; font-size: 34px; line-height: 1.12; }
.subtitle { margin: 0; color: #4f6d89; line-height: 1.5; max-width: 760px; }
.score-card, .panel { background: #fff; border: 1px solid #dce7f4; border-radius: 22px; box-shadow: 0 10px 30px rgba(27, 63, 115, 0.08); }
.score-card { min-width: 180px; padding: 18px; }
.score-label { color: #617b95; font-size: 13px; margin-bottom: 8px; }
.score-value { font-size: 34px; font-weight: 800; color: #1f4d79; }
.grade-value { margin-top: 8px; font-size: 18px; font-weight: 700; color: #356a3d; }
.panel { padding: 16px; margin-bottom: 16px; }
.controls { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.controls-left { display: flex; flex-wrap: wrap; gap: 10px; }
.primary-btn, .secondary-btn { border: none; border-radius: 14px; padding: 12px 16px; font-size: 15px; font-weight: 800; cursor: pointer; }
.primary-btn { background: #2f80ed; color: #fff; }
.secondary-btn { background: #e9f1fb; color: #214d74; }
.toggle { display: flex; align-items: center; gap: 10px; font-weight: 700; color: #35546d; }
.intro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fact-box { background: #f8fbff; border: 1px solid #e0ebf8; border-radius: 18px; padding: 14px; line-height: 1.6; color: #36556f; }
.question-card { background: #fff; border: 1px solid #dce7f4; border-radius: 20px; box-shadow: 0 8px 24px rgba(27, 63, 115, 0.06); padding: 16px; margin-bottom: 14px; }
.question-top { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.pill { background: #eef5ff; color: #2f5f90; border-radius: 999px; padding: 6px 10px; font-size: 12px; font-weight: 800; }
.question-title { font-size: 20px; margin: 0 0 14px; line-height: 1.4; font-weight: 800; }
.options { display: grid; gap: 10px; }
.option-btn { width: 100%; text-align: left; border: 1px solid #cfdeef; background: #fff; border-radius: 14px; padding: 13px 14px; font-size: 16px; color: #18324a; font-weight: 600; cursor: pointer; }
.option-btn.selected { background: #eef5ff; border-color: #2f80ed; }
.option-btn.correct { background: #e9f8ee; border-color: #2ea95c; }
.option-btn.wrong { background: #fff0f0; border-color: #d94f4f; }
.option-btn:disabled { cursor: default; color: inherit; }
.text-input, select.inline-select { width: 100%; border: 1px solid #cfdeef; border-radius: 14px; padding: 12px 14px; font-size: 16px; color: #18324a; background: #fff; }
.small-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.match-grid, .blank-grid, .table-grid { display: grid; gap: 10px; }
.line-item { background: #f9fbfe; border: 1px solid #e1ebf8; border-radius: 14px; padding: 12px; }
.line-item label { display: block; font-weight: 700; margin-bottom: 8px; line-height: 1.45; }
.table-row { display: grid; grid-template-columns: 180px 1fr; gap: 12px; align-items: center; }
.table-row .city { font-weight: 800; }
.feedback { margin-top: 10px; font-size: 14px; line-height: 1.45; color: #5d7892; }
.feedback.good { color: #247040; }
.feedback.bad { color: #b74848; }
.results-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.stat { background: #f8fbff; border: 1px solid #e0ebf8; border-radius: 18px; padding: 14px; }
.stat-label { color: #5a7691; font-size: 13px; margin-bottom: 8px; }
.stat-value { font-size: 28px; font-weight: 800; }
.review-card { background: #fbfdff; border: 1px solid #deebf7; border-left: 6px solid #d94f4f; border-radius: 16px; padding: 14px; margin-bottom: 10px; }
.review-card.good { border-left-color: #2ea95c; }
.review-title { font-weight: 800; margin-bottom: 8px; line-height: 1.4; }
.review-line { color: #35536e; line-height: 1.5; }
.exam-mode .feedback { display: none !important; }
@media (max-width: 780px) { .hero, .intro-grid, .small-grid, .results-grid, .table-row { grid-template-columns: 1fr; display: grid; } .score-card { min-width: 0; } }
@media print { body { background: #fff; } .controls, .results-panel, .intro { display: none !important; } .app-shell { max-width: none; padding: 0; } .question-card, .panel, .score-card { box-shadow: none; border: 1px solid #ddd; } }
