/* ═══════════════════════════════════════════════════════════════
   ENEM Simulado — design system completo
   ═══════════════════════════════════════════════════════════════ */

/* ── Variáveis ──────────────────────────────────────────────── */
:root {
  --enem-blue:       #005cde;
  --enem-blue-dark:  #0044a8;
  --enem-blue-light: #e8f0fd;
  --enem-green:      #28a745;
  --enem-red:        #dc3545;
  --enem-orange:     #ff9500;
  --enem-gray-1:     #1c1c1e;
  --enem-gray-2:     #3a3a3c;
  --enem-gray-3:     #6e6e73;
  --enem-gray-4:     #aeaeb2;
  --enem-gray-5:     #d1d1d6;
  --enem-gray-6:     #e5e5ea;
  --enem-gray-7:     #f2f2f7;
  --enem-surface:    #ffffff;
  --enem-radius-sm:  8px;
  --enem-radius-md:  12px;
  --enem-radius-lg:  18px;
  --enem-shadow-sm:  0 1px 4px rgba(0,0,0,.07);
  --enem-shadow-md:  0 4px 16px rgba(0,0,0,.10);
  --enem-shadow-lg:  0 8px 32px rgba(0,0,0,.12);
  --enem-transition: 220ms cubic-bezier(.4,0,.2,1);
}

/* ── Reset local ────────────────────────────────────────────── */
.enem-page * { box-sizing: border-box; }
.enem-page button { font-family: inherit; }

/* ── Página inteira ─────────────────────────────────────────── */
.enem-page {
  padding: 0 0 4rem;
  min-height: 80vh;
}

/* ── Steps (animação entre etapas) ─────────────────────────── */
.enem-step {
  display: none;
  animation: stepFadeIn var(--enem-transition) both;
}

.enem-step.active { display: block; }

@keyframes stepFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Breadcrumb ─────────────────────────────────────────────── */
.enem-breadcrumb {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-wrap: wrap;
  font-size: .82rem;
  color: var(--enem-gray-3);
  padding: 1.25rem 0 .75rem;
}

.enem-breadcrumb a { color: var(--enem-blue); text-decoration: none; }
.enem-breadcrumb a:hover { text-decoration: underline; }

/* ── Indicador de etapa ─────────────────────────────────────── */
.enem-stepper {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 1.25rem auto 2rem;
  max-width: 900px;
  user-select: none;
}

.enem-stepper__item {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex: 1;
  position: relative;
}

.enem-stepper__item:not(:last-child)::after {
  content: '';
  flex: 1;
  height: 2px;
  background: var(--enem-gray-6);
  margin: 0 .5rem;
  transition: background var(--enem-transition);
}

.enem-stepper__item.done::after { background: var(--enem-blue); }

.enem-stepper__dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--enem-gray-6);
  color: var(--enem-gray-3);
  font-size: .75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--enem-transition), color var(--enem-transition);
}

.enem-stepper__item.active .enem-stepper__dot {
  background: var(--enem-blue);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(0,92,222,.18);
}

.enem-stepper__item.done .enem-stepper__dot {
  background: var(--enem-blue);
  color: #fff;
}

.enem-stepper__label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--enem-gray-3);
  white-space: nowrap;
}

.enem-stepper__item.active .enem-stepper__label { color: var(--enem-blue); }
.enem-stepper__item.done  .enem-stepper__label  { color: var(--enem-blue-dark); }

@media (max-width: 480px) {
  .enem-stepper__label { display: none; }
}

/* ══════════════════════════════════════════════════════════════
   STEP 1 — Escolha do caderno
   ══════════════════════════════════════════════════════════════ */

.enem-s1__hero {
  text-align: center;
  margin-bottom: 1.5rem;
}

.enem-s1__hero h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--enem-gray-1);
  margin: 0 0 .5rem;
}

@media (max-width: 500px) {
  .enem-s1__hero h1 { font-size: 1.35rem; }
}

.enem-s1__hero p {
  font-size: 1rem;
  color: var(--enem-gray-3);
  margin: 0;
}

.enem-s1__year-section {
  margin-bottom: 3rem;
}

.enem-s1__year-label {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--enem-blue);
  margin: 0 0 1.5rem;
  padding-bottom: .75rem;
  border-bottom: 3px solid var(--enem-blue);
  letter-spacing: .02em;
}

.enem-s1__day-section {
  margin-bottom: 2.5rem;
}

.enem-s1__day-label {
  font-size: 1rem;
  font-weight: 700;
  color: var(--enem-gray-3);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 0 0 1rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--enem-gray-6);
  max-width: 960px;
}

/* ── Grade de cadernos (responsiva → scroll no mobile) ─────── */
.enem-notebooks {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  max-width: 960px;
  margin: 0 auto;
}

/* Tablet: 2 por linha */
@media (max-width: 860px) {
  .enem-notebooks {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile: scroll horizontal snap, 1 por vez */
@media (max-width: 500px) {
  .enem-notebooks {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding-bottom: .5rem;
    /* sem max-width para o flex track se expandir */
    max-width: none;
  }

  .enem-notebooks::-webkit-scrollbar { display: none; }
}

.enem-notebook-card {
  background: var(--enem-surface);
  border: 1.5px solid var(--enem-gray-6);
  border-radius: var(--enem-radius-lg);
  padding: 0;
  cursor: pointer;
  transition: border-color var(--enem-transition),
              box-shadow var(--enem-transition),
              transform var(--enem-transition);
  text-align: left;
  position: relative;
  overflow: hidden;
}

/* No mobile (flex scroll): tamanho fixo para snap de 1 card */
@media (max-width: 500px) {
  .enem-notebook-card {
    flex-shrink: 0;
    width: 88%;
    scroll-snap-align: start;
  }
}

.enem-notebook-card__cover {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--enem-radius-lg);
}

.enem-notebook-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--enem-blue) 0%, #3a7ff5 100%);
  opacity: 0;
  transition: opacity var(--enem-transition);
}

.enem-notebook-card:hover {
  border-color: var(--enem-blue);
  box-shadow: var(--enem-shadow-md);
  transform: translateY(-2px);
}

.enem-notebook-card:hover::before { opacity: 1; }

.enem-notebook-card.disabled {
  opacity: .5;
  cursor: not-allowed;
  pointer-events: none;
}

.enem-notebook-card__badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: .3rem .85rem;
  border-radius: 20px;
  background: var(--enem-blue-light);
  color: var(--enem-blue);
  position: absolute;
  bottom: .85rem;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  box-shadow: var(--enem-shadow-sm);
}

.enem-notebook-card.disabled .enem-notebook-card__badge {
  background: var(--enem-gray-7);
  color: var(--enem-gray-3);
}

.enem-notebook-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--enem-gray-1);
  margin-bottom: .35rem;
}

.enem-notebook-card__sub {
  font-size: .85rem;
  color: var(--enem-gray-3);
  margin-bottom: 1.25rem;
}

.enem-notebook-card__meta {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.enem-notebook-card__meta-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.enem-notebook-card__meta-val {
  font-size: .95rem;
  font-weight: 700;
  color: var(--enem-gray-1);
}

.enem-notebook-card__meta-lbl {
  font-size: .72rem;
  color: var(--enem-gray-4);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.enem-notebook-card__arrow {
  position: absolute;
  right: 1.5rem;
  bottom: 1.75rem;
  font-size: 1.25rem;
  color: var(--enem-gray-5);
  transition: color var(--enem-transition), transform var(--enem-transition);
}

.enem-notebook-card:hover .enem-notebook-card__arrow {
  color: var(--enem-blue);
  transform: translateX(3px);
}

/* ══════════════════════════════════════════════════════════════
   STEP 2 — Escolha dos blocos
   ══════════════════════════════════════════════════════════════ */

.enem-s2__header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 auto 1.75rem;
  max-width: 900px;
  flex-wrap: wrap;
}

.enem-s2__back {
  background: none;
  border: 1.5px solid var(--enem-gray-5);
  border-radius: var(--enem-radius-sm);
  padding: .4rem .9rem;
  font-size: .82rem;
  font-weight: 600;
  color: var(--enem-gray-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: .35rem;
  transition: background var(--enem-transition);
}

.enem-s2__back:hover { background: var(--enem-gray-7); }

.enem-s2__title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--enem-gray-1);
  margin: 0;
}

.enem-s2__sub {
  font-size: .88rem;
  color: var(--enem-gray-3);
  margin: -.75rem auto 1.75rem;
  max-width: 900px;
}

.enem-blocks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin: 0 auto 2rem;
  max-width: 900px;
}

.enem-block-card {
  background: var(--enem-surface);
  border: 2px solid var(--enem-gray-6);
  border-radius: var(--enem-radius-md);
  padding: 1.25rem;
  cursor: pointer;
  transition: border-color var(--enem-transition),
              background var(--enem-transition),
              box-shadow var(--enem-transition);
  position: relative;
  user-select: none;
}

.enem-block-card:hover {
  border-color: var(--enem-blue);
  box-shadow: var(--enem-shadow-sm);
}

.enem-block-card.selected {
  border-color: var(--enem-blue);
  background: var(--enem-blue-light);
}

.enem-block-card__check {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--enem-gray-5);
  background: var(--enem-gray-7);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--enem-transition),
              border-color var(--enem-transition);
  font-size: .7rem;
  color: transparent;
}

.enem-block-card.selected .enem-block-card__check {
  background: var(--enem-blue);
  border-color: var(--enem-blue);
  color: #fff;
}

.enem-block-card__icon {
  font-size: 1.75rem;
  margin-bottom: .65rem;
  display: block;
}

.enem-block-card__title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--enem-gray-1);
  margin-bottom: .25rem;
  padding-right: 1.75rem;
}

.enem-block-card__desc {
  font-size: .8rem;
  color: var(--enem-gray-3);
  margin-bottom: .85rem;
  line-height: 1.45;
}

.enem-block-card__count {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .75rem;
  font-weight: 700;
  color: var(--enem-blue);
  background: var(--enem-blue-light);
  padding: .2rem .6rem;
  border-radius: 20px;
}

.enem-block-card.selected .enem-block-card__count {
  background: rgba(0,92,222,.18);
}

/* Nota de idioma (inglês/espanhol — mutuamente exclusivos) */
.enem-block-card.lang-exclusive { border-style: dashed; }

.enem-lang-note {
  font-size: .78rem;
  color: var(--enem-orange);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .4rem;
  background: #fff8ec;
  padding: .6rem .9rem;
  border-radius: var(--enem-radius-sm);
  border: 1px solid #ffe0a0;
}

/* Footer de seleção */
.enem-s2__footer {
  position: sticky;
  bottom: 0;
  background: var(--enem-surface);
  border-top: 1px solid var(--enem-gray-6);
  padding: 1rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  z-index: 100;
  margin: 1rem auto 0;
  max-width: 900px;
}

.enem-s2__footer-info {
  display: flex;
  flex-direction: column;
}

.enem-s2__footer-count {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--enem-gray-1);
  line-height: 1;
}

.enem-s2__footer-lbl {
  font-size: .78rem;
  color: var(--enem-gray-3);
  margin-top: 2px;
}

.enem-s2__btn-start {
  padding: .7rem 1.75rem;
  background: var(--enem-blue);
  color: #fff;
  border: none;
  border-radius: var(--enem-radius-md);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--enem-transition),
              opacity var(--enem-transition),
              transform var(--enem-transition);
  display: flex;
  align-items: center;
  gap: .5rem;
}

.enem-s2__btn-start:hover:not(:disabled) {
  background: var(--enem-blue-dark);
  transform: translateY(-1px);
}

.enem-s2__btn-start:disabled {
  opacity: .45;
  cursor: not-allowed;
}

/* ══════════════════════════════════════════════════════════════
   STEP 3 — Simulado
   ══════════════════════════════════════════════════════════════ */

/* Topbar fixa */
.sim-topbar {
  position: sticky;
  top: 0;
  z-index: 300;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--enem-gray-6);
  padding: .6rem 1.25rem;
  box-shadow: var(--enem-shadow-sm);
}

/* Inner wrapper constrains conteúdo ao mesmo max-width do .container */
.sim-topbar__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}

.sim-topbar__inner > * { flex-shrink: 0; }
.sim-topbar__inner .sim-topbar__progress { flex-shrink: 1; max-width: 400px; width: 100%; }

.sim-topbar__info {
  display: flex;
  flex-direction: column;
  min-width: 90px;
}

.sim-topbar__exam {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--enem-blue);
}

.sim-topbar__timer {
  font-size: 1.3rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--enem-gray-1);
  letter-spacing: .04em;
  line-height: 1;
}

.sim-topbar__timer.warning { color: var(--enem-orange); }
.sim-topbar__timer.danger  { color: var(--enem-red); }

.sim-topbar__progress {
  flex: 1;
  min-width: 140px;
}

.sim-topbar__bar {
  height: 5px;
  background: var(--enem-gray-6);
  border-radius: 3px;
  overflow: hidden;
}

.sim-topbar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--enem-blue) 0%, #3a7ff5 100%);
  border-radius: 3px;
  transition: width .4s ease;
}

.sim-topbar__stat {
  font-size: .73rem;
  color: var(--enem-gray-3);
  margin-top: 3px;
}

.sim-topbar__btn-end {
  padding: .45rem 1.1rem;
  background: var(--enem-red);
  color: #fff;
  border: none;
  border-radius: var(--enem-radius-sm);
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--enem-transition);
}

.sim-topbar__btn-end:hover { background: #b91c2c; }

/* Layout principal do simulado */
.sim-layout {
  display: flex;
  gap: 1.5rem;
  padding-top: 1.25rem;
  align-items: flex-start;
  max-width: 1100px;
  margin: 0 auto;
}

@media (max-width: 860px) {
  .sim-layout { flex-direction: column; }
}

/* Sidebar de navegação */
.sim-sidebar {
  width: 220px;
  flex-shrink: 0;
  position: sticky;
  top: 72px;
}

@media (max-width: 860px) {
  .sim-sidebar { width: 100%; position: static; }
}

.sim-sidebar__label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--enem-gray-3);
  margin-bottom: .65rem;
}

.sim-nav-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  padding-bottom: .5rem;
}

@media (max-width: 860px) {
  .sim-nav-grid {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    max-height: none;
    padding-bottom: 6px; /* espaço para a scrollbar não sobrepor botões */
  }
}

.sim-nav-btn {
  width: 36px;
  height: 36px;
  flex-shrink: 0; /* mantém tamanho fixo no scroll horizontal mobile */
  border-radius: var(--enem-radius-sm);
  border: 1.5px solid var(--enem-gray-5);
  background: var(--enem-gray-7);
  font-size: .73rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--enem-gray-1);
  transition: all 130ms ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sim-nav-btn:hover        { border-color: var(--enem-blue); background: var(--enem-blue-light); color: var(--enem-blue); }
.sim-nav-btn.current      { border-color: var(--enem-blue); box-shadow: 0 0 0 2px rgba(0,92,222,.22); color: var(--enem-blue); background: var(--enem-blue-light); }
.sim-nav-btn.answered     { background: var(--enem-green); border-color: var(--enem-green); color: #fff; }
.sim-nav-btn.answered.current { box-shadow: 0 0 0 2px rgba(40,167,69,.3); }

/* Conteúdo da questão */
.sim-main { flex: 1; min-width: 0;width: 100%; }

.sim-card {
  background: var(--enem-surface);
  border: 1px solid var(--enem-gray-6);
  border-radius: var(--enem-radius-lg);
  padding: 2rem;
  box-shadow: var(--enem-shadow-sm);
}

@media (max-width: 860px) {
  .sim-alt { padding: .75rem .9rem; gap: .6rem; }
}

@media (max-width: 480px) {
  .sim-card { padding: 1.25rem 1rem; border-radius: var(--enem-radius-md); }
  .sim-alt  { padding: .6rem .75rem; gap: .5rem; }
  .sim-alt__text { font-size: .85rem; }
  .sim-alt__bubble { width: 26px; height: 26px; font-size: .75rem; }
}

/* Cabeçalho da questão */
.sim-card__head {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--enem-gray-6);
}

.sim-card__num {
  font-size: 1rem;
  font-weight: 800;
  color: var(--enem-gray-1);
}

.sim-badge {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: .2rem .65rem;
  border-radius: 20px;
  background: var(--enem-gray-7);
  color: var(--enem-gray-3);
}

.sim-badge--blue { background: var(--enem-blue-light); color: var(--enem-blue); }
.sim-badge--lang { background: #fff3cd; color: #856404; }

.sim-card__stem {
  max-width: 100%;
  display: block;
  margin: 0 0 1.25rem;
  border-radius: var(--enem-radius-sm);
}

/* Alternativas */
.sim-alts { display: flex; flex-direction: column; gap: .5rem; }

.sim-alt {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1.1rem;
  border: 2px solid var(--enem-gray-6);
  border-radius: var(--enem-radius-md);
  cursor: pointer;
  background: var(--enem-surface);
  transition: border-color 130ms ease, background 130ms ease;
  text-align: left;
  width: 100%;
}

.sim-alt:hover       { border-color: var(--enem-blue); background: var(--enem-blue-light); }
.sim-alt.selected    { border-color: var(--enem-blue); background: var(--enem-blue-light); }

.sim-alt__bubble {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--enem-gray-6);
  font-size: .8rem;
  font-weight: 800;
  color: var(--enem-gray-2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 130ms ease, color 130ms ease;
}

.sim-alt.selected .sim-alt__bubble { background: var(--enem-blue); color: #fff; }

.sim-alt__text {
  flex: 1;
  font-size: .9rem;
  line-height: 1.6;
  color: var(--enem-gray-1);
  white-space: pre-wrap;
  text-align: left;
}

/* Navegação prev/next */
.sim-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--enem-gray-6);
  gap: .5rem;
}

.sim-controls__pos {
  font-size: .8rem;
  color: var(--enem-gray-3);
  font-weight: 600;
  text-align: center;
  flex: 1;
}

.sim-btn {
  padding: .55rem 1.25rem;
  border-radius: var(--enem-radius-sm);
  border: 1.5px solid var(--enem-gray-5);
  background: var(--enem-gray-7);
  font-size: .875rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--enem-gray-1);
  transition: background var(--enem-transition), border-color var(--enem-transition);
  display: flex;
  align-items: center;
  gap: .4rem;
  white-space: nowrap;
}

.sim-btn:hover         { background: var(--enem-gray-6); }
.sim-btn:disabled      { opacity: .35; cursor: default; }
.sim-btn--primary      { background: var(--enem-blue); border-color: var(--enem-blue); color: #fff; }
.sim-btn--primary:hover { background: var(--enem-blue-dark); border-color: var(--enem-blue-dark); }

/* ── Tela de resultado ────────────────────────────────────────── */
.sim-result {
  max-width: 540px;
  margin: 3rem auto;
  text-align: center;
}

.sim-result__trophy {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  display: block;
  animation: trophyPop .5s cubic-bezier(.36,.07,.19,.97);
}

@keyframes trophyPop {
  0%   { transform: scale(.4); opacity: 0; }
  70%  { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

.sim-result__title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--enem-gray-1);
  margin-bottom: .35rem;
}

.sim-result__sub {
  font-size: .9rem;
  color: var(--enem-gray-3);
  margin-bottom: 2rem;
}

.sim-result__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (max-width: 480px) {
  .sim-result__grid { grid-template-columns: repeat(2, 1fr); }
}

.sim-result__cell {
  background: var(--enem-surface);
  border: 1px solid var(--enem-gray-6);
  border-radius: var(--enem-radius-md);
  padding: 1.1rem .75rem;
  box-shadow: var(--enem-shadow-sm);
}

.sim-result__cell-val {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--enem-gray-1);
  line-height: 1;
  margin-bottom: .25rem;
}

.sim-result__cell-lbl {
  font-size: .73rem;
  color: var(--enem-gray-3);
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* ── Seções extras do resultado ────────────────────────────── */
.sim-res__section {
  background: var(--enem-gray-7);
  border: 1px solid var(--enem-gray-6);
  border-radius: var(--enem-radius-md);
  padding: 1.25rem;
  margin-bottom: 1rem;
  text-align: left;
}

.sim-res__section-title {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--enem-gray-3);
  margin: 0 0 1rem;
}

/* Barras por bloco */
.sim-res__blocks { display: flex; flex-direction: column; gap: .85rem; }

.sim-res__block-head {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .35rem;
}

.sim-res__block-icon { font-size: 1rem; }

.sim-res__block-label {
  font-size: .85rem;
  font-weight: 600;
  color: var(--enem-gray-1);
  flex: 1;
}

.sim-res__block-frac {
  font-size: .82rem;
  font-weight: 700;
  color: var(--enem-blue);
}

.sim-res__bar-wrap {
  height: 8px;
  background: var(--enem-gray-6);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: .25rem;
}

.sim-res__bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--enem-blue) 0%, #3a7ff5 100%);
  border-radius: 4px;
  transition: width .6s cubic-bezier(.4,0,.2,1);
}

.sim-res__block-sub {
  font-size: .73rem;
  color: var(--enem-gray-3);
}

/* Distribuição de alternativas */
.sim-res__dist { display: flex; flex-direction: column; gap: .55rem; }

.sim-res__dist-row {
  display: flex;
  align-items: center;
  gap: .6rem;
}

.sim-res__dist-lbl {
  width: 18px;
  font-size: .82rem;
  font-weight: 800;
  color: var(--enem-gray-2);
  text-align: center;
  flex-shrink: 0;
}

.sim-res__dist-bar-wrap {
  flex: 1;
  height: 10px;
  background: var(--enem-gray-6);
  border-radius: 5px;
  overflow: hidden;
}

.sim-res__dist-bar-fill {
  height: 100%;
  background: var(--enem-blue);
  border-radius: 5px;
  transition: width .5s cubic-bezier(.4,0,.2,1);
}

.sim-res__dist-val {
  width: 22px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--enem-gray-3);
  text-align: right;
  flex-shrink: 0;
}

/* ── Ações ───────────────────────────────────────────────────── */
.sim-result__actions {
  display: flex;
  gap: .75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.sim-result__btn {
  padding: .7rem 1.6rem;
  border-radius: var(--enem-radius-md);
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid var(--enem-blue);
  transition: background var(--enem-transition), color var(--enem-transition);
}

.sim-result__btn--primary { background: var(--enem-blue); color: #fff; }
.sim-result__btn--primary:hover { background: var(--enem-blue-dark); }
.sim-result__btn--ghost { background: transparent; color: var(--enem-blue); }
.sim-result__btn--ghost:hover { background: var(--enem-blue-light); }

/* ── Loading ─────────────────────────────────────────────────── */
.sim-loading {
  text-align: center;
  padding: 5rem 1rem;
  color: var(--enem-gray-3);
}

.sim-loading__spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--enem-gray-6);
  border-top-color: var(--enem-blue);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════════════════════
   Modal de confirmação de encerramento
   ══════════════════════════════════════════════════════════════ */
.enem-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: stepFadeIn 180ms ease both;
}

.enem-confirm-overlay[hidden] { display: none; }

.enem-confirm-box {
  background: var(--enem-surface);
  border-radius: var(--enem-radius-lg);
  padding: 2.25rem 2rem 1.75rem;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--enem-shadow-lg);
  text-align: center;
}

.enem-confirm-icon {
  font-size: 2.25rem;
  margin-bottom: .75rem;
}

.enem-confirm-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--enem-gray-1);
  margin: 0 0 .6rem;
}

.enem-confirm-msg {
  font-size: .93rem;
  color: var(--enem-gray-3);
  margin: 0 0 1.75rem;
  line-height: 1.5;
}

.enem-confirm-actions {
  display: flex;
  flex-direction: column;
  gap: .65rem;
}

.enem-confirm-btn {
  width: 100%;
  padding: .85rem 1rem;
  border-radius: var(--enem-radius-md);
  font-size: .93rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity var(--enem-transition), background var(--enem-transition);
}

.enem-confirm-btn--cancel {
  background: var(--enem-gray-7);
  color: var(--enem-gray-2);
  border: 1.5px solid var(--enem-gray-5);
}

.enem-confirm-btn--cancel:hover { background: var(--enem-gray-6); }

.enem-confirm-btn--ok {
  background: var(--enem-red);
  color: #fff;
}

.enem-confirm-btn--ok:hover { opacity: .88; }

/* ── Imagem da questão ──────────────────────────────────────── */
.sim-card__stem-wrap {
  width: 100%;
  max-width: 100%; /* impede que a imagem expanda o card pai */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 1.25rem;
}

/* Alternativas ocupam 100% em qualquer tamanho de tela */
.sim-alts { width: 100%; }
.sim-alt  { width: 100%; box-sizing: border-box; }

@media (max-width: 860px) {
  /* Imagem no tamanho natural (2.5× escala) — wrapper dá o scroll em X */
  .sim-card__stem {
    width: auto;
    max-width: none;
    height: auto;
    margin: 0;
    border-radius: 0;
    display: block;
  }
}
