/* Base visual. As cores da marca chegam por /marca.css (--cor-primaria, --cor-destaque). */
:root {
  --fundo: #F5F4F1;
  --texto: #191A17;
  --apagado: #76746E;
  --cartao: #FFFFFF;
  --borda: #E3E1DB;
  --cor-primaria: #0B2D6B;   /* azul-marinho */
  --cor-destaque: #FF6A00;   /* laranja: botões e destaques */
  --cor-amarelo: #FFD600;
  --cor-ambar: #FFB000;
  /* Texto sobre o laranja: branco dá 2,9:1 (ilegível); azul-marinho #0B2D6B dá 4,6:1. */
  --sobre-destaque: #0B2D6B;
  --cor-titulo: #0B2D6B;
  --fonte-texto: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fonte-leitura: "Literata", Georgia, serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fundo: #0D0E11;
    --texto: #F2F1EC;
    --apagado: #9A988F;
    --cartao: #17181C;
    --borda: #2A2B30;
    --cor-titulo: #F2F1EC;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--fundo);
  color: var(--texto);
  font-family: var(--fonte-texto);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--cor-primaria); }
@media (prefers-color-scheme: dark) { a { color: var(--cor-destaque); } }
.pular { position: absolute; left: -9999px; }
.pular:focus { left: 16px; top: 8px; background: var(--cartao); padding: 8px; z-index: 10; }
.topo {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 3px solid var(--cor-ambar); background: var(--cartao);
}
.topo-marca { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--texto); font-weight: 700; }
.conteudo { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 24px 16px; }
.cartao { background: var(--cartao); border: 1px solid var(--borda); border-radius: 12px; padding: 20px; }
h1, h2, h3 { font-family: var(--fonte-leitura); line-height: 1.2; color: var(--cor-titulo); }
.destaque { color: var(--apagado); font-size: 1.1rem; }
.botao {
  display: inline-block; background: var(--cor-destaque); color: var(--sobre-destaque); text-decoration: none;
  padding: 12px 20px; border-radius: 8px; font-weight: 600; min-height: 44px;
}
.rodape { padding: 16px; color: var(--apagado); font-size: 0.85rem; text-align: center; border-top: 1px solid var(--borda); }
.rodape p { margin: 4px 0; }
.logo-topo { display: block; height: 36px; width: auto; }
.logo-rodape { display: block; height: 28px; width: auto; margin: 0 auto 8px; }
.rodape-links { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 8px; }
.rodape-links a { color: var(--apagado); }

/* Formulários e menu (F4/F5) */
.menu { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 0.95rem; }
.em-linha { display: inline; margin: 0; }
.link { background: none; border: 0; color: var(--cor-primaria); text-decoration: underline; cursor: pointer; font: inherit; padding: 0; min-height: 44px; }
.formulario { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.formulario input[type=email], .formulario input[type=number], .formulario input[type=date], .formulario input:not([type]) {
  font: inherit; padding: 10px; border: 1px solid var(--borda); border-radius: 8px; background: var(--fundo); color: var(--texto); min-height: 44px; }
.caixa { display: flex; gap: 8px; align-items: flex-start; }
.erro { color: #B3261E; }
.termo { white-space: pre-wrap; max-height: 320px; overflow-y: auto; font-family: var(--fonte-leitura); }
.termo-aberto { max-height: none; overflow-y: visible; }
button.botao { border: 0; cursor: pointer; font: inherit; }
.cartao + .cartao, form.cartao { margin-top: 12px; }

/* Estudo (F6b/F8): pensado para 390 px, alvos de toque de 44 px */
.apagado { color: var(--apagado); }
.fonte { font-size: 0.8rem; }
.largo { display: block; width: 100%; text-align: center; }
.progresso-texto { margin: 0 0 6px; color: var(--apagado); font-size: 0.9rem; }
.barra { height: 10px; background: var(--borda); border-radius: 99px; overflow: hidden; margin-bottom: 12px; }
.barra > span { display: block; height: 100%; background: var(--cor-primaria); border-radius: 99px; }
.barra-0 { width: 0; } .barra-5 { width: 5%; } .barra-10 { width: 10%; } .barra-15 { width: 15%; }
.barra-20 { width: 20%; } .barra-25 { width: 25%; } .barra-30 { width: 30%; } .barra-35 { width: 35%; }
.barra-40 { width: 40%; } .barra-45 { width: 45%; } .barra-50 { width: 50%; } .barra-55 { width: 55%; }
.barra-60 { width: 60%; } .barra-65 { width: 65%; } .barra-70 { width: 70%; } .barra-75 { width: 75%; }
.barra-80 { width: 80%; } .barra-85 { width: 85%; } .barra-90 { width: 90%; } .barra-95 { width: 95%; }
.barra-100 { width: 100%; }
.questao .texto-base { white-space: pre-wrap; font-family: var(--fonte-leitura); background: var(--fundo); border-radius: 8px; padding: 12px; }
.questao .enunciado { font-weight: 600; white-space: pre-wrap; }
.questao-img { max-width: 100%; height: auto; border-radius: 8px; }
.alternativas { border: 0; padding: 0; margin: 12px 0; display: flex; flex-direction: column; gap: 8px; }
.alternativa { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--borda); border-radius: 10px; padding: 12px; min-height: 44px; cursor: pointer; }
.alternativa input { margin-top: 4px; }
.letra { font-weight: 700; min-width: 1.2em; }
.retorno-certo { border-left: 4px solid #2E7D32; }
.retorno-errado { border-left: 4px solid #B3261E; }
.selo { display: inline-block; font-size: 0.75rem; padding: 2px 8px; border-radius: 99px; background: var(--cor-destaque); color: #191A17; }
.passos { list-style: none; padding: 0; margin: 12px 0; display: flex; flex-direction: column; gap: 8px; }
.passo { display: flex; align-items: center; gap: 12px; border: 1px solid var(--borda); border-radius: 12px; padding: 12px; background: var(--cartao); text-decoration: none; color: var(--texto); min-height: 56px; }
.passo .num { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--borda); font-weight: 700; flex: none; }
.passo.feito .num { background: #2E7D32; color: #FFFFFF; }
.passo.atual { border-color: var(--cor-primaria); border-width: 2px; }
.passo small { display: block; color: var(--apagado); }
.aviso-supervisao { font-size: 0.85rem; color: var(--apagado); border-left: 3px solid var(--borda); padding-left: 8px; }
.lista-areas { padding-left: 18px; }
.aula-html { font-family: var(--fonte-leitura); font-size: 1.05rem; overflow-wrap: anywhere; }
.aula-html img, .aula-html table { max-width: 100%; }
.dias { display: flex; flex-wrap: wrap; gap: 8px; }
.dias label { border: 1px solid var(--borda); border-radius: 8px; padding: 8px 10px; min-height: 44px; display: flex; gap: 6px; align-items: center; }
.formulario input[type=time], .formulario input[type=text], .formulario select, .formulario textarea {
  font: inherit; padding: 10px; border: 1px solid var(--borda); border-radius: 8px; background: var(--fundo); color: var(--texto); min-height: 44px; }
.minutos { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; font-size: 0.8rem; }
.minutos span { display: block; }
.minutos .coluna { height: 60px; display: flex; align-items: flex-end; background: var(--fundo); border-radius: 6px; overflow: hidden; }
.minutos .coluna i { display: block; width: 100%; background: var(--cor-primaria); }
.alt-0 { height: 0; } .alt-5 { height: 5%; } .alt-10 { height: 10%; } .alt-15 { height: 15%; } .alt-20 { height: 20%; }
.alt-25 { height: 25%; } .alt-30 { height: 30%; } .alt-35 { height: 35%; } .alt-40 { height: 40%; } .alt-45 { height: 45%; }
.alt-50 { height: 50%; } .alt-55 { height: 55%; } .alt-60 { height: 60%; } .alt-65 { height: 65%; } .alt-70 { height: 70%; }
.alt-75 { height: 75%; } .alt-80 { height: 80%; } .alt-85 { height: 85%; } .alt-90 { height: 90%; } .alt-95 { height: 95%; }
.alt-100 { height: 100%; }
.painel p { margin: 8px 0; }
.saudacao { margin: 0 0 4px; }
.midia { width: 100%; border-radius: 8px; }

/* Cartões de questão: visual do sistema original (site/templates/responder.html) */
:root { --ok: #16A34A; --no: #DC2626; --oliva: #586249; }
@media (prefers-color-scheme: dark) { :root { --oliva: #A8B196; } }
.resp-topo { position: sticky; top: 0; background: var(--fundo); padding: 4px 0 12px; z-index: 5; }
.resp-topo h1 { font-size: 20px; margin: 0 0 6px; font-family: var(--fonte-texto); }
.progresso { font-size: 13px; color: var(--apagado); }
.card-q { background: var(--cartao); border-radius: 16px; padding: 16px; margin: 12px 0; border: .5px solid #0000000f; box-shadow: 0 1px 3px #00000010; scroll-margin-top: 90px; }
.card-q.respondida { opacity: .92; }
.num-q { font-size: 11px; text-transform: uppercase; color: var(--apagado); letter-spacing: .05em; margin-bottom: 6px; }
.texto-base-q { font-size: 14px; color: var(--apagado); margin-bottom: 10px; white-space: pre-wrap; }
.enunciado-q { font-size: 15px; margin-bottom: 12px; white-space: pre-wrap; }
img.questao-img { max-width: 100%; height: auto; aspect-ratio: 8/11; object-fit: contain; border-radius: 10px; margin-bottom: 12px; background: #00000008; }
.form-q { margin: 0; }
.alts { display: flex; flex-direction: column; gap: 8px; }
button.alt { text-align: left; padding: 12px 14px; border-radius: 12px; border: 1.5px solid #0000001a; background: transparent; color: var(--texto); font-size: 14px; cursor: pointer; font-family: inherit; min-height: 44px; }
@media (prefers-color-scheme: dark) { button.alt { border-color: #FFFFFF2a; } }
button.alt:active { transform: scale(0.98); }
button.alt b { margin-right: 8px; color: var(--oliva); }
button.alt.certa { border-color: var(--ok); background: #16A34A18; }
button.alt.errada { border-color: var(--no); background: #DC262618; }
button.alt.marcada { outline: 2px solid #E0B44C; outline-offset: -2px; }
button.alt[disabled] { cursor: default; }
.feedback { margin-top: 10px; font-size: 13px; font-weight: 600; }
.feedback.ok { color: var(--ok); }
.feedback.no { color: var(--no); }
.comentario { margin-top: 9px; padding: 11px 13px; border-radius: 11px; background: #5862490F; border-left: 3px solid var(--oliva); font-size: 13.5px; line-height: 1.55; white-space: pre-wrap; }
@media (prefers-color-scheme: dark) { .comentario { background: #A8B1961A; } }
.aviso-pressa { margin-top: 10px; padding: 10px 12px; border-radius: 10px; font-size: 14px; background: #FBF3DE; color: #8A6A00; border-left: 4px solid #E0B44C; }
.fim-q { text-align: center; padding: 24px 0; color: var(--apagado); font-size: 14px; }
.cta { display: block; text-align: center; margin-top: 16px; padding: 16px; border-radius: 14px; background: var(--oliva); color: #FFFFFF; text-decoration: none; font-weight: 600; font-size: 15px; border: 0; width: 100%; font-family: var(--fonte-texto); cursor: pointer; min-height: 44px; }
@media (prefers-color-scheme: dark) { .cta { color: #0D0E11; } }
.cta:active { opacity: .85; }
/* F11: semana firme (dia completo/mínimo/feriado) e conquistas. Sem estilo embutido (CSP). */
.semana-dias { list-style: none; padding: 0; margin: 12px 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.semana-dias li { text-align: center; border: 1px solid var(--borda); border-radius: 8px; padding: 6px 0; font-size: 0.85rem; }
.semana-dias li small { display: block; font-size: 0.65rem; color: var(--apagado); min-height: 1em; }
.semana-dias li.completo { background: var(--cor-primaria); color: #FFFFFF; border-color: var(--cor-primaria); }
.semana-dias li.completo small { color: #FFFFFF; }
.semana-dias li.minimo { border: 2px solid var(--cor-primaria); }
.semana-dias li.feriado { border-style: dashed; }
.semana-dias li.futuro { color: var(--apagado); }
.selo.conquista { border-left: 4px solid var(--cor-destaque); padding-left: 8px; }
.conquistas { list-style: none; padding: 0; }
.conquistas li { padding: 10px 0; border-bottom: 1px solid var(--borda); }
.conquistas li.falta { color: var(--apagado); }
.semana-dias li.conserto { border: 2px dotted var(--cor-destaque); }
.so-leitor { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.questao-img.recorte { width: 100%; height: auto; }
.aviso-ia { border-left: 4px solid var(--cor-destaque); padding: 8px 12px; font-size: .95em; }
.texto-mensagem { white-space: pre-line; overflow-wrap: anywhere; }
.mensagem-aluno { margin-left: 12%; }
.mensagem-tutor { margin-right: 12%; }
/* F21: plantão dos alertas graves (/admin/tutor) */
.prazo { display: inline-block; padding: 2px 8px; border-radius: 6px; font-weight: 700; }
.prazo-vermelho { background: #B3261E; color: #FFFFFF; }
.prazo-amarelo { background: #F2C94C; color: #191A17; }
.prazo-verde { background: #2E7D32; color: #FFFFFF; }
.prazo-noite { background: #3949AB; color: #FFFFFF; }
.faixa-abuso { background: #B3261E; color: #FFFFFF; font-weight: 700; padding: 14px 16px; border-radius: 10px; margin: 12px 0; }
.alerta-cartao { border-left: 6px solid var(--borda); }
.alerta-novo { border-left-color: #B3261E; }

/* B7: aviso de cookies da página inicial */
.aviso-cookies {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 16px;
  background: var(--cartao); color: var(--texto); border-top: 1px solid var(--borda);
}
.aviso-cookies[hidden] { display: none; }
.aviso-cookies p { margin: 0 0 8px; max-width: 60rem; }
.aviso-cookies-botoes { display: flex; gap: 12px; flex-wrap: wrap; }
.botao.secundario { background: transparent; color: var(--cor-primaria); border: 2px solid var(--cor-primaria); padding: 10px 18px; }
@media (prefers-color-scheme: dark) { .botao.secundario { color: var(--cor-destaque); border-color: var(--cor-destaque); } }
