/* Formulários de aula — mobile-first. Paleta: navy #1A2968, dourado #E8B819,
   fundo #F5F5F5, texto #2D2D2D. Títulos Georgia, corpo sans-serif do sistema. */

:root {
  --navy: #1A2968;
  --dourado: #E8B819;
  --fundo: #F5F5F5;
  --texto: #2D2D2D;
  --texto-suave: #5f6270;
  --branco: #ffffff;
  --borda: #d9dbe3;
  --erro: #b3261e;
  --erro-fundo: #fdecea;
  --ok: #1e7b45;
  --raio: 10px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fundo);
  color: var(--texto);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
h1, h2, h3, legend.rotulo-secao { font-family: Georgia, "Times New Roman", serif; color: var(--navy); }
h1 { font-size: 1.5rem; line-height: 1.25; margin: 0 0 .5rem; }
a { color: var(--navy); }
code { font-size: .9em; background: #ecedf3; padding: .05em .3em; border-radius: 4px; }

.wrap { max-width: 720px; margin: 0 auto; padding: 0 12px; }
body.largo .wrap { max-width: none; }

.topo { background: var(--navy); color: var(--branco); border-bottom: 4px solid var(--dourado); }
.topo .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 48px; }
.marca { color: var(--branco); text-decoration: none; font-family: Georgia, serif; font-size: 1.05rem; }
.usuario { font-size: .85rem; opacity: .85; }

.cartao {
  background: var(--branco);
  border-radius: var(--raio);
  padding: 20px 16px;
  margin: 16px 0;
  box-shadow: 0 1px 3px rgba(26, 41, 104, .08);
}
.cartao.centro { text-align: center; }
.sobretitulo { margin: 0 0 .4rem; font-size: .85rem; color: var(--texto-suave); text-transform: uppercase; letter-spacing: .04em; }
.descricao { margin: 0 0 1rem; color: var(--texto-suave); white-space: pre-line; }
.rodape { color: var(--texto-suave); font-size: .8rem; padding: 12px; text-align: center; }

/* seções e campos */
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.secao { margin: 1.5rem 0 0; padding-top: 1rem; border-top: 1px solid var(--borda); }
.secao > legend {
  font-family: Georgia, serif; color: var(--navy); font-size: 1.2rem; font-weight: bold;
  padding: 0; margin-bottom: .25rem; float: left; width: 100%;
}
.ajuda-secao { clear: both; margin: 0 0 .5rem; color: var(--texto-suave); font-size: .95rem; }
.campo { clear: both; margin: 1rem 0 0; }
.rotulo { display: block; font-weight: 600; margin-bottom: .2rem; padding: 0; }
.obrig { color: var(--erro); font-weight: bold; }
.ajuda { margin: 0 0 .4rem; color: var(--texto-suave); font-size: .9rem; }
.nota-obrig { color: var(--texto-suave); font-size: .85rem; margin: 1.5rem 0 .5rem; }

input[type=text], input[type=number], input[type=date], textarea, select {
  width: 100%;
  font: inherit;
  color: var(--texto);
  background: var(--branco);
  border: 1px solid #b9bcc8;
  border-radius: 8px;
  padding: 12px 12px;
  min-height: 46px;
}
input[type=number] { max-width: 10rem; }
input[type=date] { width: auto; }
textarea { resize: vertical; min-height: 7rem; }
input:focus, textarea:focus, select:focus { outline: 3px solid rgba(232, 184, 25, .55); border-color: var(--navy); }
.com-erro input, .com-erro textarea, .com-erro select { border-color: var(--erro); background: #fff8f7; }
.msg-erro { color: var(--erro); font-size: .9rem; margin: .3rem 0 0; }

.grupo-opcoes .opcao {
  display: flex; align-items: flex-start; gap: .6rem;
  padding: 10px 10px; margin: .25rem 0;
  border: 1px solid var(--borda); border-radius: 8px; background: #fafafc;
  cursor: pointer;
}
.grupo-opcoes .opcao input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--navy); }
.grupo-opcoes .opcao:has(input:checked) { border-color: var(--navy); background: #eef0f8; }

.hp { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }

.alerta { padding: 12px 14px; border-radius: 8px; margin: 1rem 0; }
.alerta.erro { background: var(--erro-fundo); color: var(--erro); border: 1px solid #f0b6b0; }
.alerta ul { margin: .4rem 0 0; padding-left: 1.2rem; }

.botao {
  display: inline-block; width: 100%;
  font: inherit; font-weight: 600; font-size: 1.05rem;
  color: var(--navy); background: var(--dourado);
  border: 0; border-radius: 8px; padding: 14px 20px; min-height: 48px;
  cursor: pointer; text-decoration: none; text-align: center;
}
.botao:hover { filter: brightness(.95); }
.botao.pequeno { width: auto; font-size: .95rem; padding: 8px 14px; min-height: 40px; }
.botao.secundario { background: var(--navy); color: var(--branco); }
.botao.perigo { background: var(--erro); color: var(--branco); }

/* agradecimento */
.registro { font-size: 1.1rem; margin: 1rem 0; }
.nota { margin: 1rem auto; padding: 14px; border-radius: var(--raio); background: #eef0f8; max-width: 16rem; }
.nota-valor { font-family: Georgia, serif; font-size: 2.2rem; color: var(--navy); margin: 0; }
.nota-rotulo { margin: 0; color: var(--texto-suave); text-transform: uppercase; font-size: .8rem; letter-spacing: .05em; }
.gabarito { text-align: left; padding-left: 0; list-style: none; }
.gabarito li { margin: .4rem 0; }
.gabarito .q { display: block; }
.gabarito .r { font-size: .9rem; }
.gabarito .certo .r { color: var(--ok); }
.gabarito .errado .r { color: var(--erro); }

/* listas e admin */
.lista { padding-left: 1.2rem; }
.lista li { margin: .5rem 0; }
.link { color: var(--navy); }
.tag { display: inline-block; font-size: .72rem; padding: .1em .5em; border-radius: 999px; background: #eef0f8; color: var(--navy); vertical-align: middle; }
.tag.ok { background: #e3f3e8; color: var(--ok); }
.tag.falha { background: var(--erro-fundo); color: var(--erro); }

.filtro { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: center; margin: 0 0 1rem; }
.filtro label { display: flex; align-items: center; gap: .4rem; font-size: .95rem; }

.tabela-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -16px; padding: 0 16px; }
.tabela { border-collapse: collapse; width: 100%; font-size: .9rem; }
.tabela th, .tabela td { border-bottom: 1px solid var(--borda); padding: 8px 8px; text-align: left; vertical-align: top; }
.tabela th { background: #eef0f8; color: var(--navy); white-space: nowrap; position: sticky; top: 0; }
.tabela .num { text-align: right; white-space: nowrap; }
.tabela .nowrap { white-space: nowrap; }
.tabela.respostas .celula { max-width: 22rem; max-height: 8rem; overflow: auto; white-space: pre-wrap; min-width: 8rem; }

.detalhe dt { font-weight: 600; margin-top: 1rem; color: var(--navy); }
.detalhe dd { margin: .2rem 0 0; white-space: pre-wrap; }
.apagar { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--borda); display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }

@media (min-width: 640px) {
  .cartao { padding: 28px 32px; }
  h1 { font-size: 1.8rem; }
  .botao { width: auto; min-width: 14rem; }
}

/* --- IVCF-20 preenchível ------------------------------------------------ */
body.ivcf main.wrap { padding-bottom: 96px; }
.secao.dominio legend .sub { float: right; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: .8rem; font-weight: 700; color: var(--navy); background: #EEF0F7; border-radius: 999px; padding: 2px 10px; }
.ivcf-barra { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; color: #fff; background: var(--navy);
  box-shadow: 0 -2px 10px rgba(0,0,0,.15); border-top: 4px solid var(--dourado); }
.ivcf-barra .wrap { display: flex; align-items: center; gap: 16px; padding: 10px 16px; }
.ivcf-barra.baixo { background: #1e7b45; }
.ivcf-barra.moderado { background: #b8860b; }
.ivcf-barra.alto { background: #b3261e; }
.ivcf-num { font-family: Georgia, "Times New Roman", serif; font-size: 1.1rem; white-space: nowrap; }
.ivcf-num strong { font-size: 2rem; line-height: 1; }
.ivcf-txt { font-size: .95rem; line-height: 1.25; }
.ivcf-txt small { opacity: .85; }
.nota.ivcf-baixo .nota-valor { color: #1e7b45; }
.nota.ivcf-moderado .nota-valor { color: #b8860b; }
.nota.ivcf-alto .nota-valor { color: #b3261e; }
.ivcf-dominios { margin: 12px auto 0; max-width: 360px; }
.ivcf-dominios td.n, .ivcf-dominios th.n { text-align: right; }
@media print { .ivcf-barra { position: static; box-shadow: none; } .botao { display: none; } }

/* --- quiz: comentários na página de resultado e relatório no admin (09/09/2026) --- */
.gabarito details summary { cursor: pointer; list-style: none; }
.gabarito details summary::-webkit-details-marker { display: none; }
.gabarito .comentario { margin: .4rem 0 .8rem; padding: .6rem .8rem; border-left: 3px solid var(--borda); background: #f6f7fb; font-size: .9rem; text-align: left; }
.gabarito .errado .comentario { border-left-color: var(--erro); }
.tabela.questoes tr.baixo td { background: var(--erro-fundo); }
.tabela.questoes .enunciado { max-width: 40rem; max-height: 5rem; font-size: .85rem; }
.tabela.marcacoes td { text-align: center; font-size: .85rem; padding: 4px 6px; }
.tabela.marcacoes td.ok { color: var(--ok); }
.tabela.marcacoes td.falha { color: var(--erro); background: var(--erro-fundo); font-weight: 600; }
.detalhe-marcacoes { margin-top: 1rem; }
.detalhe-marcacoes summary { cursor: pointer; color: var(--navy); }
.celula.erradas { min-width: 6rem; }
.admin h2 { font-size: 1.1rem; margin: 1.5rem 0 .5rem; color: var(--navy); }
