
:root {
  --blue-900: #0f3f68;
  --blue-700: #176ba5;
  --blue-500: #34a9e6;
  --blue-100: #dff4ff;
  --blue-50: #f1fbff;
  --gold: #d6a72a;
  --white: #ffffff;
  --text: #172033;
  --muted: #617086;
  --line: #d9e7f0;
  --danger: #c2413b;
  --success: #177245;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--blue-100), #ffffff 42%);
  color: var(--text);
}
button, input { font: inherit; }
button { cursor: pointer; }
.shell { width: min(1180px, 100%); margin: 0 auto; padding: 16px; }
.topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.76);
  border-radius: 8px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 18px 45px rgba(15,63,104,.12);
}
.brand-badge {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 8px;
  background: var(--blue-700);
  color: var(--white);
  font-weight: 950;
}
.eyebrow { margin: 0 0 2px; color: var(--blue-700); font-size: .78rem; font-weight: 850; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin: 0; font-size: clamp(1.1rem, 2.2vw, 1.65rem); letter-spacing: 0; color: var(--blue-900); }
.brand-right { display: grid; gap: 2px; text-align: right; color: var(--blue-900); font-size: .9rem; }
.brand-right span { color: var(--gold); font-weight: 950; }
#app { margin-top: 18px; }
.screen, .quiz-header, .question-card, .panel, .result-hero, .answer-review {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 18px 48px rgba(15,63,104,.1);
}
.screen { padding: clamp(18px, 4vw, 34px); }
.start-grid { display: grid; grid-template-columns: 1fr 420px; gap: 24px; align-items: start; }
.hero-title { font-size: clamp(2.1rem, 8vw, 5rem); line-height: .95; margin-bottom: 12px; color: var(--blue-900); }
.hero-title span { color: var(--blue-500); display: block; }
.slogan { display: inline-flex; padding: 8px 12px; border-radius: 8px; background: #fff5cc; color: #6a4d00; font-weight: 950; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 22px 0; }
.stat { padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--blue-50); }
.stat strong { display: block; color: var(--blue-700); font-size: 1.5rem; }
.stat span { color: var(--muted); font-size: .88rem; }
.notice { color: var(--muted); line-height: 1.55; }
.panel { padding: 16px; }
.field { display: grid; gap: 7px; margin-bottom: 12px; }
.field label { font-weight: 850; color: var(--blue-900); }
.field input { width: 100%; min-height: 46px; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.quiz-list { display: grid; gap: 10px; max-height: 540px; overflow: auto; padding-right: 3px; }
.quiz-card, .resume-card {
  width: 100%;
  min-height: 68px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  padding: 13px;
  text-align: left;
}
.quiz-card:hover, .resume-card:hover { border-color: var(--blue-500); background: var(--blue-50); }
.quiz-card strong, .resume-card strong { display: block; color: var(--blue-900); }
.quiz-card span, .resume-card span { display: block; color: var(--muted); font-size: .9rem; margin-top: 4px; }
.quiz-header { padding: 16px; margin-bottom: 16px; }
.quiz-headline { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.quiz-headline h2 { margin-bottom: 3px; color: var(--blue-900); }
.quiz-headline p { margin-bottom: 0; color: var(--muted); }
.timer { padding: 10px 12px; border-radius: 8px; background: var(--blue-900); color: var(--white); font-weight: 950; min-width: 112px; text-align: center; }
.progress-track { height: 10px; margin-top: 13px; border-radius: 999px; background: var(--blue-100); overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--blue-500), var(--gold)); }
.question-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
.question-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 10px; color: var(--muted); font-size: .92rem; }
.question-count { color: var(--blue-900); font-weight: 950; }
.question-card { padding: 14px; }
.page-note { color: var(--blue-900); font-weight: 800; margin-bottom: 10px; }
.page-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.page-viewer { max-height: 72vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: #edf6fb; }
.page-viewer img { display: block; width: 100%; height: auto; }
.page-viewer.zoomed img { width: min(1180px, 180%); max-width: none; }
.answer-box { margin-top: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--blue-50); }
.answer-title { margin-bottom: 10px; color: var(--blue-900); font-weight: 900; }
.options { display: grid; grid-template-columns: repeat(5, minmax(44px, 1fr)); gap: 8px; }
.option-btn { min-height: 48px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--blue-900); font-weight: 950; }
.option-btn:hover { border-color: var(--blue-500); }
.option-btn.selected { border-color: var(--gold); background: #fff6cf; box-shadow: 0 0 0 3px rgba(214,167,42,.16); }
.question-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.btn { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 8px; padding: 10px 14px; font-weight: 900; text-decoration: none; }
.btn:disabled { cursor: not-allowed; opacity: .55; }
.btn-primary { background: var(--blue-700); color: var(--white); }
.btn-gold { background: linear-gradient(135deg, var(--gold), #f2cb4b); color: #2d2104; }
.btn-ghost { border-color: var(--line); background: var(--white); color: var(--blue-700); }
.btn-whatsapp { background: #128c7e; color: var(--white); }
.side-panel { display: grid; gap: 14px; align-content: start; }
.map-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.map-btn { min-height: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--blue-900); font-weight: 900; }
.map-btn.current { border-color: var(--blue-500); background: var(--blue-100); }
.map-btn.done { border-color: rgba(214,167,42,.65); background: #fff6d2; }
.legend { display: grid; gap: 7px; color: var(--muted); font-size: .88rem; }
.dot { display: inline-block; width: 11px; height: 11px; margin-right: 6px; border-radius: 3px; vertical-align: -1px; }
.dot-gold { background: var(--gold); }
.dot-blue { background: var(--blue-500); }
.result-hero { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; padding: 28px; background: linear-gradient(135deg, var(--blue-900), var(--blue-700)); color: var(--white); }
.result-hero h2 { color: var(--white); font-size: clamp(1.6rem, 5vw, 3rem); margin-bottom: 8px; }
.score-ring { display: grid; place-items: center; width: 126px; height: 126px; border-radius: 50%; background: var(--white); color: var(--blue-900); font-size: 2rem; font-weight: 950; border: 8px solid var(--gold); }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.answer-review { padding: 16px; }
.review-card { border: 1px solid var(--line); border-radius: 8px; padding: 13px; margin-top: 10px; }
.review-card.correct { border-left: 5px solid var(--success); }
.review-card.wrong { border-left: 5px solid var(--danger); }
.review-title { display: flex; justify-content: space-between; gap: 8px; font-weight: 950; color: var(--blue-900); }
.tag { border-radius: 999px; padding: 4px 8px; font-size: .82rem; }
.tag.correct { background: #dcfce7; color: var(--success); }
.tag.wrong { background: #fee2e2; color: var(--danger); }
.review-meta, .review-comment { color: var(--muted); line-height: 1.5; margin: 8px 0 0; }
@media (max-width: 880px) {
  .topbar { grid-template-columns: auto 1fr; }
  .brand-right { grid-column: 1 / -1; text-align: left; }
  .start-grid, .question-layout, .result-hero { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .quiz-headline { align-items: flex-start; flex-direction: column; }
  .timer { width: 100%; }
  .question-top { display: grid; }
  .side-panel { order: -1; }
  .result-actions { display: grid; }
  .score-ring { width: 110px; height: 110px; }
}
@media (max-width: 520px) {
  .shell { padding: 10px; }
  .screen, .panel, .quiz-header, .question-card, .answer-review { padding: 12px; }
  .options { grid-template-columns: repeat(5, 1fr); gap: 6px; }
  .option-btn { min-height: 44px; }
  .page-viewer { max-height: 66vh; }
  .question-nav { grid-template-columns: 1fr; }
}
