/* Treino rápido (questões comentadas): botão, tela cheia de prova e resultado. Ver treino-rapido.js. */
.btn.btn-treino { background: #051824; color: #fff; }
.btn.btn-treino i { color: #ffc93c; }
.btn.btn-treino:hover { background: #0b2a3c; color: #fff; }
.tr-faixa-lista { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.tr-faixa-lista .btn { margin: 0; }

body.tr-aberto { overflow: hidden; }
.tr-tela {
  position: fixed; inset: 0; z-index: 9990; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: #f4f6f1; color: #1d2a24; font-family: "Open Sans", Arial, sans-serif; font-size: 16px; line-height: 1.55;
}
.tr-tela *, .tr-tela *::before, .tr-tela *::after { box-sizing: border-box; }
.tr-tela h2 { font-size: 24px; font-weight: 800; margin: 6px 0 6px; color: #051824; text-transform: none; }
.tr-tela h4 { font-size: 14px; text-transform: uppercase; letter-spacing: .04em; color: #3d6e1b; margin: 18px 0 6px; }

.tr-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid #cfd9c8; background: #fff; color: #1d2a24; border-radius: 12px; padding: 11px 18px; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; text-decoration: none; }
.tr-btn:disabled { opacity: .5; cursor: default; }
.tr-btn-pri { background: #4f8a24; border-color: #4f8a24; color: #fff; }
.tr-btn-pri:hover:not(:disabled) { background: #3d6e1b; }
.tr-btn-claro { background: transparent; }
.tr-largo { width: 100%; margin-top: 18px; padding: 14px; font-size: 16px; }
.tr-x { position: absolute; top: 10px; right: 12px; border: 0; background: none; font-size: 30px; line-height: 1; color: #6b7a71; cursor: pointer; padding: 4px 8px; }
.tr-nota { font-size: 13px; color: #6b7a71; margin: 12px 0 0; }

/* configuração */
.tr-caixa { position: relative; max-width: 520px; margin: 7vh auto 30px; background: #fff; border-radius: 20px; padding: 30px 26px 24px; box-shadow: 0 16px 40px rgba(5, 24, 36, .12); }
@media (max-width: 560px) { .tr-caixa { margin: 0; min-height: 100%; border-radius: 0; padding-top: 36px; } }
.tr-raio { width: 54px; height: 54px; border-radius: 16px; background: #051824; color: #ffc93c; display: flex; align-items: center; justify-content: center; font-size: 26px; }
.tr-sub { color: #4d5a52; margin: 0 0 12px; }
.tr-filtros { background: #eef4e7; border-radius: 10px; padding: 10px 12px; font-size: 14px; margin: 0 0 18px; }
.tr-rotulo { font-weight: 700; margin-bottom: 8px; }
.tr-qtd { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.tr-qtd button { border: 2px solid #dde4d6; background: #fff; border-radius: 14px; padding: 12px 6px; cursor: pointer; font: inherit; color: #1d2a24; }
.tr-qtd button b { display: block; font-size: 26px; line-height: 1.1; }
.tr-qtd button span { font-size: 12px; color: #6b7a71; }
.tr-qtd button.ativo { border-color: #4f8a24; background: #f0f7e8; box-shadow: inset 0 0 0 1px #4f8a24; }
.tr-check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.tr-check input { margin-top: 5px; width: 18px; height: 18px; flex: none; }

/* prova */
.tr-topo { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: #051824; color: #fff; }
.tr-topo .tr-btn { color: #fff; border-color: rgba(255, 255, 255, .25); padding: 8px 12px; font-size: 14px; }
.tr-progresso { flex: 1; min-width: 0; }
.tr-contador { font-size: 13px; color: #c9d6cf; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-barra { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .18); margin-top: 5px; overflow: hidden; }
.tr-barra span { display: block; height: 100%; background: #89c03b; transition: width .25s; }
.tr-relogio { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 16px; white-space: nowrap; }
.tr-relogio i { color: #ffc93c; }
@media (max-width: 560px) { .tr-topo .tr-btn span { display: none; } }

.tr-corpo { max-width: 860px; margin: 0 auto; padding: 20px 16px 10px; }
.tr-questao { background: #fff; border-radius: 18px; padding: 22px 22px 18px; box-shadow: 0 6px 20px rgba(5, 24, 36, .06); }
@media (max-width: 560px) { .tr-questao { padding: 18px 14px 14px; border-radius: 14px; } }
.tr-q-topo { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 12px; }
.tr-q-num { background: #051824; color: #fff; font-weight: 700; font-size: 13px; padding: 3px 12px; border-radius: 999px; }
.tr-q-origem { color: #3d6e1b; font-weight: 700; font-size: 13px; }
.tr-enunciado { text-align: justify; }
.tr-enunciado img, .tr-com-texto img { max-width: 100%; height: auto; }
.tr-enunciado table, .tr-com-texto table { max-width: 100%; }
.tr-alts { display: grid; gap: 8px; margin-top: 14px; }
.tr-alt { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; border: 2px solid #e2e8dc; background: #fff; border-radius: 12px; padding: 11px 12px; font: inherit; color: inherit; cursor: pointer; transition: border-color .12s, background .12s; }
.tr-alt:hover { border-color: #b9cfa4; }
.tr-alt.marcada { border-color: #051824; background: #eef2f5; }
.tr-letra { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 2px solid #c3cfbb; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; }
.tr-alt.marcada .tr-letra { background: #051824; border-color: #051824; color: #fff; }
.tr-alt-texto { flex: 1; min-width: 0; padding-top: 3px; text-align: justify; }
.tr-alt-texto p { margin: 0; }

.tr-mapa { max-width: 860px; margin: 6px auto 0; padding: 0 16px; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.tr-mapa button { width: 34px; height: 34px; border-radius: 9px; border: 1px solid #d5ddcf; background: #fff; font: inherit; font-size: 13px; font-weight: 700; color: #4d5a52; cursor: pointer; }
.tr-mapa button.feita { background: #dcebcb; border-color: #9fc97a; color: #2f5a14; }
.tr-mapa button.atual { outline: 2px solid #051824; outline-offset: 1px; }
.tr-rodape { position: sticky; bottom: 0; display: flex; justify-content: space-between; gap: 10px; max-width: 860px; margin: 14px auto 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(rgba(244, 246, 241, 0), #f4f6f1 30%); }
.tr-rodape .tr-btn { flex: 1; max-width: 260px; }

/* resultado */
.tr-resultado { position: relative; max-width: 860px; margin: 0 auto; padding: 26px 16px 40px; }
.tr-placar { display: flex; align-items: center; gap: 20px; background: #fff; border-radius: 20px; padding: 22px; box-shadow: 0 8px 24px rgba(5, 24, 36, .08); border-left: 8px solid #4f8a24; }
.tr-placar.medio { border-left-color: #e0a800; }
.tr-placar.baixo { border-left-color: #d64545; }
.tr-pct { font-size: 52px; font-weight: 800; line-height: 1; color: #051824; font-variant-numeric: tabular-nums; }
.tr-placar b { display: block; font-size: 19px; }
.tr-placar span { display: block; color: #4d5a52; }
.tr-tempos { font-size: 14px; margin-top: 4px; }
@media (max-width: 560px) { .tr-placar { flex-direction: column; text-align: center; } }
.tr-acoes { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 4px; }
.tr-lista { display: grid; gap: 10px; margin-top: 18px; }
.tr-item { background: #fff; border-radius: 14px; border-left: 5px solid #c3cfbb; box-shadow: 0 3px 12px rgba(5, 24, 36, .05); }
.tr-item.certa { border-left-color: #4f8a24; }
.tr-item.errada { border-left-color: #d64545; }
.tr-item summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 14px 16px; cursor: pointer; list-style: none; }
.tr-item summary::-webkit-details-marker { display: none; }
.tr-sinal { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #e8ece4; color: #6b7a71; font-weight: 700; }
.tr-item.certa .tr-sinal { background: #4f8a24; color: #fff; }
.tr-item.errada .tr-sinal { background: #d64545; color: #fff; }
.tr-item-titulo { font-weight: 700; }
.tr-item-resp { color: #4d5a52; font-size: 14px; }
.tr-item-ver { margin-left: auto; color: #3d6e1b; font-weight: 700; font-size: 14px; }
.tr-item[open] .tr-item-ver { visibility: hidden; }
.tr-item-corpo { padding: 0 16px 18px; border-top: 1px solid #eef1ea; }
.tr-item-corpo .tr-enunciado { margin-top: 14px; }
.tr-alt-fixa { cursor: default; }
.tr-alt-fixa.certa { border-color: #4f8a24; background: #eef7e6; }
.tr-alt-fixa.certa .tr-letra { background: #4f8a24; border-color: #4f8a24; color: #fff; }
.tr-alt-fixa.errada { border-color: #d64545; background: #fdeeee; }
.tr-alt-fixa.errada .tr-letra { background: #d64545; border-color: #d64545; color: #fff; }
.tr-com-texto { text-align: justify; }
.tr-com-extra { border-top: 1px dashed #dde4d6; margin-top: 12px; padding-top: 12px; }
.tr-video { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; }
.tr-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* modo escuro do site */
html.modo-escuro .tr-tela { background: #0b1a22; color: #e8efe6; }
html.modo-escuro .tr-tela h2 { color: #e8efe6; }
html.modo-escuro .tr-caixa, html.modo-escuro .tr-questao, html.modo-escuro .tr-placar, html.modo-escuro .tr-item, html.modo-escuro .tr-alt, html.modo-escuro .tr-qtd button, html.modo-escuro .tr-mapa button, html.modo-escuro .tr-btn { background: #12252f; color: #e8efe6; border-color: #2a4552; }
html.modo-escuro .tr-btn-pri { background: #4f8a24; border-color: #4f8a24; }
html.modo-escuro .tr-filtros { background: #173040; }
html.modo-escuro .tr-sub, html.modo-escuro .tr-placar span, html.modo-escuro .tr-item-resp { color: #a9b6ad; }
html.modo-escuro .tr-pct { color: #e8efe6; }
html.modo-escuro .tr-alt.marcada { border-color: #9fd15a; background: #173040; }
html.modo-escuro .tr-alt-fixa.certa { background: #1d3a22; }
html.modo-escuro .tr-alt-fixa.errada { background: #3d1f22; }
html.modo-escuro .tr-rodape { background: linear-gradient(rgba(11, 26, 34, 0), #0b1a22 30%); }
html.modo-escuro .tr-item-corpo { border-top-color: #2a4552; }
