/* Simulados Transpetro — Parlatorium / tema OPTA (papel branco, Playfair + Montserrat + Roboto).
   Reescrita visual do DS v1 (azul-noite). Os seletores são os mesmos: o JS não muda. */

@font-face { font-family: "Tiempos Headline"; src: url("/simulados/fonts/TiemposHeadline-Medium.otf") format("opentype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Tiempos Headline"; src: url("/simulados/fonts/TiemposHeadline-Bold.otf") format("opentype"); font-weight: 700; font-display: swap; }

:root {
  /* papel e tinta */
  --paper: #fff; --paper-2: #fafafa; --paper-3: #f4f4f4;
  --ink: #000; --body: #4b4b4b; --muted: #8c8c8c;
  --line: #eaeaea; --line-2: #d5d5d5; --rule: #1a1a1a;

  /* acento do Opta */
  --gold: #d7b065; --gold-deep: #b08d43; --gold-soft: #fae3b5; --gold-wash: #fdf7ec;

  /* semânticos, em tons sóbrios que convivem com o dourado */
  --green: #2f7a4f; --green-wash: #eef6f1;
  --yellow: #b7791f; --yellow-wash: #fdf6e7;
  --red: #b23a3a; --red-wash: #fbf0f0;
  --coral: #b23a3a;
  --primary: #000;

  /* o Opta é retangular */
  --r-sm: 0; --r-md: 0; --r-lg: 0; --r-xl: 0;
  --t-fast: 150ms; --t-mid: 300ms; --t-slow: 600ms;

  --font-display: "Playfair Display", "Tiempos Headline", Georgia, "Times New Roman", serif;
  --font-label: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --font-ui: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  /* compat: nomes antigos ainda citados em regras herdadas */
  --bg: #fff; --bg-deep: #fff; --panel: #fff; --panel-2: #fafafa; --panel-3: #f4f4f4;
  --border: #eaeaea; --border-2: #d5d5d5; --text: #000; --accent: #d7b065;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body {
  margin: 0; background: var(--paper); color: var(--body); font-family: var(--font-ui);
  font-size: 17px; font-weight: 400; line-height: 1.75; overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  animation: pagein var(--t-slow) ease both;
}
/* Só opacidade: um transform no body (mesmo residual) faz dele o bloco de
   contenção de todo position:fixed, e o mapa/drawer param de colar na tela. */
@keyframes pagein { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

::selection { background-color: var(--gold-soft); color: var(--ink); }

.wrap { width: min(1140px, 90vw); margin: 0 auto; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 400; color: var(--ink); line-height: 1.28; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 2.95rem); line-height: 1.24; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.3rem; }
h1 em, h2 em { color: var(--gold-deep); font-style: italic; }
p { margin: 0 0 1.1em; }

a { color: var(--ink); text-decoration: none; transition: color var(--t-fast) linear; }
a:hover { color: var(--gold-deep); }
/* sublinhado que se desenha, marca da casa do Opta */
.hero a, .instrucoes a, .acesso a, .oferta a:not(.btn), .rodape a,
.drawer-corpo a, .rev-just a, .card p a:not(.btn) {
  position: relative; display: inline-block; color: var(--gold-deep); font-weight: 400;
}
.hero a::after, .instrucoes a::after, .acesso a::after, .oferta a:not(.btn)::after, .rodape a::after,
.drawer-corpo a::after, .rev-just a::after, .card p a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 1px;
  background-color: var(--gold); transition: width var(--t-mid);
}
.hero a:hover::after, .instrucoes a:hover::after, .acesso a:hover::after,
.oferta a:not(.btn):hover::after, .rodape a:hover::after, .drawer-corpo a:hover::after,
.rev-just a:hover::after, .card p a:not(.btn):hover::after { width: 100%; }

.muted { color: var(--muted); }
.mini { font-size: .85rem; line-height: 1.6; }
.erro { color: var(--red); font-size: .9rem; }

/* O fundo do tema é papel: os orbs do tema escuro saem de cena. */
.orbs { display: none; }

/* -------------------------------------------------------------------- topo */
/* Opaco de propósito: com fundo translúcido o conteúdo passa por trás e o
   texto do topo fica ilegível na rolagem. */
.topo {
  border-bottom: 1px solid var(--rule); background: var(--paper);
  position: sticky; top: 0; z-index: 10;
}
.topo-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.15rem 0; }
.marca {
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 400; color: var(--ink);
  letter-spacing: .01em; line-height: 1;
}
.marca:hover { color: var(--gold-deep); }
.selo {
  font-family: var(--font-label); font-size: 10px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--body); border: 1px solid var(--line-2);
  border-radius: 0; padding: .5rem .85rem; line-height: 1;
}

/* -------------------------------------------------------------------- hero */
.hero { padding: 5rem 0 2.5rem; max-width: 720px; margin: 0 auto; text-align: center; }
.hero h1 { max-width: 15ch; margin-left: auto; margin-right: auto; }
.hero .sub { color: var(--body); font-size: 1.02rem; line-height: 1.85; margin: 0 auto 1em; text-align: left; }
.fatos { display: flex; flex-wrap: wrap; gap: 0; margin-top: 2.5rem; width: 100%; justify-content: center;
         border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fatos span {
  font-family: var(--font-label); font-size: 10px; font-weight: 400; letter-spacing: 1.6px;
  text-transform: uppercase; color: var(--muted); padding: 1rem 1.4rem; line-height: 1.7;
  border-right: 1px solid var(--line); flex: 1 1 auto; text-align: center;
}
.fatos span:last-child { border-right: 0; }
.fatos strong { display: block; font-family: var(--font-display); font-size: 1.35rem; font-weight: 400;
                letter-spacing: 0; text-transform: none; color: var(--ink); margin-bottom: .15rem; }

/* ------------------------------------------------------------------- cards */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 0; padding: 2.4rem; margin: 2.5rem 0; }
.acesso h2 { margin-top: 0; }
.linha { display: flex; gap: 1.2rem; flex-wrap: wrap; align-items: flex-end; }
.linha input { flex: 1 1 240px; }

/* `:not(.alt)` é obrigatório: as alternativas da prova também são <label>, e
   com o versalete do tema o enunciado das opções vira caixa-alta ilegível. */
label:not(.alt) { display: block; margin-bottom: 1.6rem; font-family: var(--font-label); font-size: 10px;
        font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--ink); }
input {
  width: 100%; margin-top: .5rem; padding: 0 0 .5rem; border: 0; border-bottom: 1px solid var(--body);
  background: transparent; color: var(--ink); border-radius: 0;
  font-family: var(--font-ui); font-size: 18px; font-weight: 300; line-height: 28px;
  transition: border-color var(--t-fast);
}
input::placeholder { color: var(--muted); font-weight: 300; opacity: 1; }
input:hover { border-bottom-color: var(--gold); }
input:focus { outline: none; border-bottom: 2px solid var(--gold); padding-bottom: calc(.5rem - 1px); }

/* botões — o secundário desenha a moldura no hover, como no Opta */
.btn {
  position: relative; display: inline-block; z-index: 1; text-align: center;
  background: transparent; color: var(--ink); border: 0; border-bottom: 2px solid var(--ink);
  border-radius: 0; padding: .7rem 1.6rem; cursor: pointer; text-decoration: none;
  font-family: var(--font-ui); font-size: 17px; font-weight: 300; line-height: 1.5;
  transition: color var(--t-fast);
}
.btn::after {
  content: ""; position: absolute; top: 0; right: 0; width: 0; height: 100%;
  border-top: 2px solid var(--ink); transition: all ease var(--t-mid); z-index: -1;
}
.btn::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 0;
  border-left: 2px solid var(--ink); border-right: 2px solid var(--ink);
  transition: all ease var(--t-mid) .15s; z-index: -1;
}
.btn:hover::before { height: 100%; transition: all ease var(--t-mid); }
.btn:hover::after { left: 0; width: 100%; transition: all ease var(--t-mid) .15s; }

.btn.primario {
  background: var(--ink); color: var(--paper); border-bottom-color: var(--ink);
  font-family: var(--font-label); font-size: 11px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; padding: 1.15rem 2.2rem;
  transition: background var(--t-fast), color var(--t-fast);
}
.btn.primario::before, .btn.primario::after { display: none; }
.btn.primario:hover { background: var(--gold); color: var(--ink); border-bottom-color: var(--gold); }
.btn.largo { width: 100%; }
/* Sem borda nenhuma: com a linha embaixo o botão desligado parecia um campo
   de texto vazio esperando digitação. */
.btn[disabled] {
  color: var(--muted); cursor: not-allowed; border: 0; padding-left: 0; padding-right: 0;
  font-family: var(--font-label); font-size: 10px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; text-align: left;
}
.btn[disabled]::before, .btn[disabled]::after { display: none; }

.ola { margin: 0; font-size: 1rem; }
.ola a { margin-left: .6rem; }

/* ------------------------------------------------------- grade de simulados */
.grade { display: grid; gap: 0; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin: 2.5rem 0;
         border-top: 1px solid var(--rule); }
.sim {
  background: var(--paper); border-bottom: 1px solid var(--line); border-right: 1px solid var(--line);
  border-radius: 0; padding: 2.2rem 2rem; display: flex; flex-direction: column; gap: .8rem;
  transition: background var(--t-mid);
}
.sim:hover { background: var(--paper-2); }
.sim.bloqueado { color: var(--muted); }
.sim.bloqueado h3 { color: var(--muted); }
.sim h3 { margin: 0; font-size: 1.6rem; }
.sim .quando { font-size: .9rem; color: var(--muted); }
.tag {
  display: inline-block; font-family: var(--font-label); font-size: 10px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase; border-radius: 0; padding: .35rem .7rem;
  align-self: flex-start; line-height: 1;
}
.tag.aberto { background: var(--green-wash); color: var(--green); border: 1px solid rgba(47,122,79,.35); }
.tag.fechado { background: var(--paper-3); color: var(--muted); border: 1px solid var(--line-2); }
.tag.feito { background: var(--gold-wash); color: var(--gold-deep); border: 1px solid rgba(215,176,101,.6); }
.contagem { font-variant-numeric: tabular-nums; font-family: var(--font-display); color: var(--gold-deep); }
.sim .rodape-card { margin-top: auto; padding-top: 1rem; }

.oferta { border: 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
          padding: 3.5rem 0; text-align: center; }
.oferta h2 { margin-top: 0; max-width: 20ch; margin-left: auto; margin-right: auto; }
.oferta p { max-width: 62ch; margin-left: auto; margin-right: auto; }
.rodape {
  padding: 3.5rem 0; color: var(--muted); font-size: .8rem; line-height: 1.8;
  margin-top: 1rem; text-align: center;
}
/* Sem a régua quando a oferta logo acima já fechou com uma — duas linhas
   coladas viram um erro visual. */
.oferta + .rodape, .oferta ~ .rodape { border-top: 0; }

/* ------------------------------------------------------------------- prova */
.prova-topo {
  position: sticky; top: 0; z-index: 20; background: var(--paper);
  border-bottom: 1px solid var(--rule); padding: .8rem 0;
}
.prova-topo-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.prova-topo .btn { padding: .45rem 1rem; }
.relogio { font-family: var(--font-display); font-variant-numeric: tabular-nums; font-size: 1.5rem;
           font-weight: 400; letter-spacing: .01em; color: var(--ink); }
.relogio.alerta { color: var(--yellow); }
.relogio.critico { color: var(--red); animation: pulsa 1s ease-in-out infinite; }
@keyframes pulsa { 50% { opacity: .4; } }
.progresso { flex: 1 1 200px; height: 1px; background: var(--line-2); overflow: hidden; min-width: 120px; }
.progresso i { display: block; height: 100%; background: var(--gold); width: 0; transition: width var(--t-mid); }

.texto-base {
  background: var(--paper-2); border: 0; border-left: 2px solid var(--gold);
  border-radius: 0; padding: 1.6rem 1.8rem; margin: 2rem 0; white-space: pre-wrap;
  font-size: .98rem; line-height: 1.9; color: var(--body);
}
.texto-base h3 { font-size: 1.1rem; margin-bottom: .7rem; }

.q { border-top: 1px solid var(--line); padding: 2.4rem 0; }
.q-cab { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.q-num { font-family: var(--font-display); font-size: 2.6rem; font-weight: 400; line-height: 1; color: var(--ink); }
.q-mat { font-family: var(--font-label); font-size: 10px; font-weight: 700; text-transform: uppercase;
         letter-spacing: 2px; color: var(--muted); }
.q-enun { white-space: pre-wrap; margin-bottom: 1.4rem; color: var(--ink); }
.alts { display: grid; gap: 0; border-top: 1px solid var(--line); }
.alt {
  display: flex; gap: 1rem; align-items: flex-start; padding: 1rem .8rem; border-radius: 0;
  border: 0; border-bottom: 1px solid var(--line); background: transparent; cursor: pointer;
  font-family: var(--font-ui); font-size: 1rem; font-weight: 400; letter-spacing: 0;
  text-transform: none; color: var(--body); line-height: 1.7; margin-bottom: 0;
  transition: background var(--t-fast);
}
.alt:hover { background: var(--paper-2); }
.alt input { width: auto; margin: .45rem 0 0; flex: none; border: 0; accent-color: var(--gold-deep); }
.alt.marcada { background: var(--gold-wash); }
.alt b { font-family: var(--font-label); font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
         color: var(--muted); flex: none; padding-top: .25rem; }
.alt.marcada b { color: var(--gold-deep); }

.barra-fim { display: flex; gap: 1.6rem; align-items: center; flex-wrap: wrap; padding: 2.5rem 0 4rem; }

.modal-fundo { position: fixed; inset: 0; background: rgba(255,255,255,.9); display: grid; place-items: center; z-index: 50; padding: 1rem; }
.modal { background: var(--paper); border: 1px solid var(--rule); border-radius: 0; padding: 2.4rem; max-width: 520px; }
.modal h2 { margin-top: 0; }

/* --------------------------------------------------------------- relatório */
.rel-cab { padding: 3.5rem 0 1rem; text-align: center; }
.nota-grande { font-family: var(--font-display); font-weight: 400; font-size: clamp(3.5rem, 13vw, 6.5rem);
               line-height: 1; color: var(--ink); }
.nota-grande small { font-size: .28em; color: var(--muted); font-family: var(--font-label);
                     letter-spacing: 2px; text-transform: uppercase; }
.veredito { border-radius: 0; padding: 1.4rem 1.6rem; margin: 1.5rem 0; border: 1px solid; text-align: left; }
.veredito.aprovado { background: var(--green-wash); border-color: rgba(47,122,79,.4); }
.veredito.eliminado { background: var(--red-wash); border-color: rgba(178,58,58,.4); }
.veredito h3 { margin: 0 0 .4rem; }

.kpis { display: grid; gap: 0; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin: 2.5rem 0;
        border-top: 1px solid var(--rule); border-left: 1px solid var(--line); }
.kpi { background: var(--paper); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
       border-radius: 0; padding: 1.6rem 1.4rem; text-align: center; }
.kpi .v { font-family: var(--font-display); font-size: 2.4rem; font-weight: 400; line-height: 1.1; color: var(--ink); }
.kpi .r { font-family: var(--font-label); font-size: 10px; font-weight: 700; color: var(--muted);
          text-transform: uppercase; letter-spacing: 2px; margin-top: .5rem; }

.barras { display: grid; gap: 1rem; margin: 1.5rem 0; }
.barra-linha { display: grid; grid-template-columns: minmax(120px, 32%) 1fr auto; gap: 1rem; align-items: center; font-size: .92rem; }
.barra-linha .rot { color: var(--body); overflow-wrap: anywhere; }
.trilho { height: 6px; background: var(--paper-3); border-radius: 0; overflow: hidden; position: relative; }
.trilho i { display: block; height: 100%; background: var(--gold); width: 0; transition: width 900ms cubic-bezier(.2,.7,.3,1); }
.trilho i.bom { background: var(--green); }
.trilho i.medio { background: var(--yellow); }
.trilho i.ruim { background: var(--red); }
.trilho .marca-corte { position: absolute; top: -3px; bottom: -3px; width: 1px; background: var(--ink); opacity: .7; }
.barra-linha .val { font-variant-numeric: tabular-nums; font-family: var(--font-display); font-size: 1.05rem;
                    color: var(--ink); min-width: 3.5em; text-align: right; }

.hist { display: flex; align-items: flex-end; gap: 2px; height: 160px; margin: 1.5rem 0 .4rem; }
.hist .col { flex: 1; background: var(--paper-3); border-radius: 0; min-height: 2px; position: relative;
             transition: height 900ms cubic-bezier(.2,.7,.3,1); }
.hist .col.voce { background: var(--gold); }
.hist-eixo { display: flex; justify-content: space-between; font-family: var(--font-label); font-size: 10px;
             letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); }

.tabela { width: 100%; border-collapse: collapse; font-size: .93rem; }
.tabela th, .tabela td { text-align: left; padding: .85rem .6rem; border-bottom: 1px solid var(--line); }
.tabela th { font-family: var(--font-label); color: var(--ink); font-weight: 700; font-size: 10px;
             text-transform: uppercase; letter-spacing: 2px; border-bottom-color: var(--rule); }
.tabela td.num { text-align: right; font-variant-numeric: tabular-nums; }

.rev-q { border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 1.6rem 0 1.6rem 1.2rem;
         margin-bottom: 0; background: transparent; }
.rev-q.errou { border-left: 2px solid var(--red); }
.rev-q.acertou { border-left: 2px solid var(--green); }
.rev-q.branco { border-left: 2px solid var(--line-2); }
.rev-alt { padding: .5rem .8rem; border-radius: 0; margin-bottom: .2rem; font-size: .94rem; }
.rev-alt.certa { background: var(--green-wash); }
.rev-alt.sua { background: var(--red-wash); }
.rev-just { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .94rem; color: var(--body); }
.rev-just strong { color: var(--ink); }

.filtros { display: flex; gap: 1.4rem; flex-wrap: wrap; margin: 1.5rem 0; }
.filtros button { font-size: .9rem; padding: .4rem 0; border-bottom-width: 1px; }
.filtros button::before, .filtros button::after { display: none; }
.filtros button[aria-pressed="true"] { color: var(--gold-deep); border-bottom: 2px solid var(--gold); }

@media (max-width: 640px) {
  .card { padding: 1.5rem; }
  .barra-linha { grid-template-columns: 1fr; gap: .3rem; }
  .barra-linha .val { text-align: left; }
  .fatos span { flex: 1 1 45%; border-bottom: 1px solid var(--line); }
}

@media print {
  body { background: #fff; color: #111; }
  .orbs, .topo, .filtros, .btn, .rodape { display: none !important; }
  .card, .kpi, .rev-q { border-color: #ccc; background: #fff; }
  .muted { color: #555; }
}

/* Revisão colapsável — só as erradas nascem abertas. */
details.rev-q > summary { cursor: pointer; list-style: none; align-items: center; }
details.rev-q > summary::-webkit-details-marker { display: none; }
/* "+/−" e não "×": num relatório de prova, um × ao lado da questão se lê como
   "errei", e não como "fechar". */
details.rev-q > summary::before { content: "+"; color: var(--gold-deep); margin-right: .7rem;
                                  font-size: 1.1em; display: inline-block; }
details.rev-q[open] > summary::before { content: "\2212"; }
details.rev-q > summary:hover { color: var(--gold-deep); }
details.rev-q[open] > summary { margin-bottom: 1rem; }
details.texto-base > summary { cursor: pointer; margin-bottom: 1rem; font-family: var(--font-label);
                               font-size: 10px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; }

/* =========================== prova: instruções, mapa e texto-base ========= */
.eyebrow-sim { font-family: var(--font-label); color: var(--gold-deep); font-size: 10px; font-weight: 700;
               letter-spacing: 2px; text-transform: uppercase; margin-bottom: 1rem; }
.instrucoes { max-width: 720px; margin: 4rem auto; }
.instrucoes h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.aviso-relogio {
  background: var(--gold-wash); border: 0; border-left: 2px solid var(--gold);
  border-radius: 0; padding: 1.3rem 1.5rem; margin: 1.5rem 0 1.8rem;
}
.aviso-relogio strong { font-family: var(--font-label); font-size: 11px; font-weight: 700; letter-spacing: 1.6px;
                        text-transform: uppercase; color: var(--gold-deep); display: block; margin-bottom: .5rem; }
.lista-instrucoes { margin: 0 0 1.5rem; padding-left: 1.2rem; }
.lista-instrucoes li { margin-bottom: .9rem; }
.lista-instrucoes li::marker { color: var(--gold); }

.titulo-prova { font-family: var(--font-display); font-weight: 400; font-size: 1.15rem; color: var(--ink);
                max-width: 26ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-compacto { padding: .45rem 1rem; font-size: .9rem; }
.btn-mini { padding: .25rem .6rem; font-size: 10px; font-family: var(--font-label); font-weight: 700;
            letter-spacing: 1.5px; text-transform: uppercase; border-bottom-width: 1px; }
.btn-mini::before, .btn-mini::after { display: none; }
.btn-mini.ativo { color: var(--gold-deep); border-bottom: 2px solid var(--gold); }

.prova-corpo { display: grid; grid-template-columns: 1fr 232px; gap: 3rem; align-items: start; }
.mapa {
  position: sticky; top: 92px; background: var(--paper); border: 1px solid var(--line);
  border-radius: 0; padding: 1.3rem; max-height: calc(100vh - 120px); overflow-y: auto;
}
.mapa-topo { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.mapa-topo strong { font-family: var(--font-label); font-size: 10px; font-weight: 700; letter-spacing: 2px;
                    text-transform: uppercase; color: var(--ink); }
.mapa-legenda { display: grid; gap: .35rem; font-size: .76rem; color: var(--muted); margin-bottom: 1rem; }
.mapa-legenda i.lg { display: inline-block; width: 10px; height: 10px; border-radius: 0; margin-right: .45rem;
                     vertical-align: -1px; border: 1px solid var(--line-2); }
.lg.respondida { background: var(--ink); border-color: var(--ink); }
.lg.branca { background: var(--paper); }
.lg.revisar { background: var(--gold); border-color: var(--gold); }
.mapa-grade { display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; }
.mq {
  aspect-ratio: 1; border: 1px solid var(--line); background: var(--paper); color: var(--muted);
  border-radius: 0; font-family: var(--font-ui); font-size: .78rem; cursor: pointer; padding: 0;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.mq:hover { border-color: var(--ink); color: var(--ink); }
.mq.respondida { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.mq.revisar { background: var(--gold); border-color: var(--gold); color: var(--ink); font-weight: 700; }
.mapa-resumo { font-size: .78rem; color: var(--muted); margin: 1rem 0 0; }
.no-desktop { display: none; }

.q.marcada-revisar { border-left: 2px solid var(--gold); padding-left: 1.2rem; }
.q-acoes { margin-left: auto; display: flex; gap: 1rem; flex-wrap: wrap; }

.drawer { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 60; display: grid;
          place-items: center; padding: 1rem; }
.drawer-caixa { background: var(--paper); border: 1px solid var(--rule); border-radius: 0;
                max-width: 760px; width: 100%; max-height: 86vh; display: flex; flex-direction: column; }
.drawer-topo { display: flex; justify-content: space-between; align-items: center; gap: 1rem;
               padding: 1.3rem 1.5rem; border-bottom: 1px solid var(--line); }
.drawer-topo strong { font-family: var(--font-display); font-weight: 400; font-size: 1.2rem; color: var(--ink); }
.drawer-corpo { padding: 1.6rem; overflow-y: auto; white-space: pre-wrap; line-height: 1.9; font-size: .98rem; }

.toast {
  position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%);
  background: var(--ink); border: 0; color: var(--paper);
  padding: .9rem 1.6rem; border-radius: 0; z-index: 80;
  font-family: var(--font-label); font-size: 11px; font-weight: 700; letter-spacing: 1.4px;
  text-transform: uppercase; transition: opacity var(--t-mid), transform var(--t-mid);
}
.toast.some { opacity: 0; transform: translateX(-50%) translateY(8px); }

@media (max-width: 900px) {
  .prova-corpo { grid-template-columns: 1fr; gap: 0; }
  .no-desktop { display: inline-block; }
  .mapa {
    position: fixed; top: auto; right: 0; bottom: 0; left: 0;
    max-height: 70vh; border-radius: 0; border: 0; border-top: 1px solid var(--rule);
    box-shadow: 0 -12px 40px rgba(0,0,0,.12);
    transform: translateY(101%); transition: transform var(--t-mid); z-index: 70;
  }
  .mapa.aberto { transform: none; }
  .mapa-grade { grid-template-columns: repeat(8, 1fr); }
  .titulo-prova { display: none; }
  .prova-topo-in { gap: .6rem; }
  .relogio { font-size: 1.2rem; }
}

/* `hidden` precisa ganhar de qualquer display declarado acima (drawer, telas). */
[hidden] { display: none !important; }

/* Vídeo "como funciona" na porta de entrada. */
.video-bloco { position: relative; padding: 0; overflow: hidden; border: 1px solid var(--line); }
.video-bloco h2 { margin-top: 0; }
.video-bloco video {
  width: 100%; display: block; border-radius: 0; background: var(--paper-3);
  border: 0; aspect-ratio: 16 / 9; object-fit: cover;
}
.video-pausa {
  position: absolute; right: 1rem; bottom: 1rem; opacity: .8;
  background: rgba(255,255,255,.92); border: 0; border-bottom: 2px solid var(--ink); color: var(--ink);
  transition: opacity var(--t-fast);
}
.video-pausa::before, .video-pausa::after { display: none; }
.video-bloco:hover .video-pausa, .video-pausa:focus-visible { opacity: 1; }

/* Indicador de salvamento: a pessoa precisa ver que a resposta chegou ao servidor. */
.status-salvo { font-family: var(--font-label); font-size: 9px; font-weight: 700; letter-spacing: 1.4px;
                text-transform: uppercase; padding: .3rem .6rem; border-radius: 0; white-space: nowrap;
                border: 1px solid transparent; line-height: 1; }
.status-salvo.ok { color: var(--green); background: var(--green-wash); border-color: rgba(47,122,79,.3); }
.status-salvo.enviando { color: var(--yellow); background: var(--yellow-wash); border-color: rgba(183,121,31,.3); }
.status-salvo.offline { color: var(--red); background: var(--red-wash); border-color: rgba(178,58,58,.35); }
@media (max-width: 560px) { .status-salvo { font-size: 8px; padding: .25rem .4rem; letter-spacing: 1px; } }

.nota-relogio { margin: -.6rem 0 1.4rem; }

/* Aviso da página de demonstração. */
.aviso-demo { background: var(--gold-wash); border: 0; border-left: 2px solid var(--gold);
              padding: 1.2rem 1.5rem; margin: 2rem 0; font-size: .95rem; }
