/* Lean Public: estilo comum das páginas do portal.
   A página do A3 usa o estilo próprio do protótipo (a3/style.css) e a3/integracao.css. */

:root {
  color-scheme: light;
  --ink: #142d35;
  --muted: #546870;
  --teal: #0c5963;
  --navy: #0c3d46;
  --line: #cddce1;
  --paper: #ffffff;
  --wash: #f3f7f9;
  --blue: #dceff2;
  --gold: #b65a12;
  --gold-wash: #fff2da;
  --sans: "IBM Plex Sans", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --measure: 68ch;
}

* { box-sizing: border-box; }

/* Garante que o atributo hidden prevaleça sobre classes que definem display. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

img, svg { max-width: 100%; }

a { color: var(--teal); text-underline-offset: 0.18em; }
a:hover { color: var(--navy); }

a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.pular {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  background: var(--navy);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 6px;
}
.pular:focus { top: 1rem; color: #fff; }

/* Cabeçalho */
.topo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 2rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.marca {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.marca svg { width: 2.2rem; height: 2.2rem; flex: none; }
.marca b { color: var(--teal); font-weight: 700; }

.topo nav { margin-left: auto; }
.topo nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.topo nav a {
  display: inline-block;
  padding: 0.45rem 0.7rem;
  border-radius: 6px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.97rem;
}
.topo nav a:hover { background: var(--wash); color: var(--navy); }
.topo nav a[aria-current="page"] {
  background: var(--blue);
  color: var(--navy);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--teal);
}

/* Acesso à conta no cabeçalho */
.conta-topo { margin: 0; }
.conta-topo a {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border: 1.5px solid var(--teal);
  border-radius: 6px;
  color: var(--teal);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
}
.conta-topo a:hover { background: var(--wash); color: var(--navy); }

/* Estrutura de página */
main { display: block; }
main:focus { outline: none; }

.abertura {
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1rem, 4vw, 3rem) clamp(2rem, 4vw, 3rem);
  background: var(--wash);
  border-bottom: 1px solid var(--line);
}
.abertura-grade {
  max-width: 54rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: 1.25rem;
  text-align: center;
}
.abertura-grade > * { margin-inline: auto; }
.abertura-grade .rotulo { margin-left: auto; margin-right: auto; }

.rotulo {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 0.9rem;
}

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; color: var(--ink); }
h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); margin: 0 auto 1rem; max-width: 24ch; }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); margin: 0 0 0.9rem; }
h3 { font-size: 1.15rem; margin: 1.6rem 0 0.5rem; }

.lide { font-size: 1.2rem; color: var(--muted); max-width: 52ch; margin: 0 auto; }

p, li { max-width: var(--measure); }

/* Seções em coluna única centrada: rótulo e título ao centro, texto corrido justificado */
.secao {
  max-width: 52rem;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.25rem) clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
}
.secao > .rotulo { text-align: center; max-width: none; }
.secao-corpo > h2 { text-align: center; }
.secao-corpo > :first-child { margin-top: 0; }
.secao-corpo > :last-child { margin-bottom: 0; }
.secao-corpo p, .secao-corpo li, .secao-corpo .nota { max-width: none; }
.secao-corpo p, .secao-corpo li, .nota p, .nota li, .lide-justificada {
  text-align: justify;
  -webkit-hyphens: auto;
  hyphens: auto;
}
/* Exceções: o que precisa ficar à esquerda (campos, mensagens, tabelas) ou ao centro (ações). */
.secao-corpo .formulario p, .secao-corpo .mensagem, .secao-corpo .dica, .secao-corpo td p,
.secao-corpo .filtros p, .senha-temporaria p { text-align: left; -webkit-hyphens: manual; hyphens: manual; }
.centro, .secao-corpo p.centro, .secao-corpo .acao { text-align: center; }

/* Entradas da página inicial */
.entradas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 21rem), 1fr));
  gap: 1.25rem;
}
.entrada {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.6rem 1.6rem 1.4rem;
  border: 1px solid var(--line);
  border-top: 6px solid var(--teal);
  border-radius: 10px;
  background: var(--paper);
}
.entrada.ensinar { border-top-color: var(--gold); }
.entrada h2,
.entrada h3 { margin: 0; font-size: 1.5rem; }
.entrada ul { margin: 0.2rem 0 0.6rem; padding-left: 1.2rem; }
.entrada li { margin: 0.25rem 0; }
.entrada .acao { margin-top: auto; }

/* Página inicial: como usar e as dez etapas */
.passos {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  list-style: none;
  margin: 1.4rem 0 0;
  padding: 0;
  counter-reset: passo;
}
.passos li {
  counter-increment: passo;
  max-width: none;
  padding: 1.3rem 1.2rem 1.2rem;
  border: 1px solid var(--line);
  border-top: 4px solid var(--teal);
  border-radius: 10px;
  text-align: center;
  -webkit-hyphens: manual;
  hyphens: manual;
}
.passos li::before {
  content: counter(passo);
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  margin: 0 auto 0.6rem;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-weight: 700;
}
@media (min-width: 760px) { .passos { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.passos strong { display: block; font-size: 1.1rem; margin-bottom: 0.35rem; }
.passos span { display: block; color: var(--muted); font-size: 0.97rem; }

.etapas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: 0.8rem 1rem;
  list-style: none;
  margin: 1.4rem 0 0;
  padding: 0;
  counter-reset: etapa;
}
.etapas li {
  counter-increment: etapa;
  max-width: none;
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr);
  gap: 0 0.8rem;
  align-items: start;
  padding: 0.85rem 1rem;
  background: var(--wash);
  border-radius: 8px;
  text-align: left;
  -webkit-hyphens: manual;
  hyphens: manual;
}
.etapas li::before {
  content: counter(etapa, decimal-leading-zero);
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border: 2px solid var(--teal);
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--teal);
  background: var(--paper);
}
.etapas strong { line-height: 1.3; }
.etapas span { color: var(--muted); font-size: 0.94rem; }

.acoes-centro { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.7rem; margin: 0.4rem 0 0; }
.autoria { font-weight: 600; color: var(--navy); margin: 0; letter-spacing: 0.01em; }

.botao {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.1rem;
  border-radius: 7px;
  border: 1px solid var(--teal);
  background: var(--teal);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.3;
  transition: background-color 150ms ease;
}
.botao:hover { background: var(--navy); color: #fff; }
.botao.secundario { background: var(--paper); color: var(--teal); }
.botao.secundario:hover { background: var(--wash); color: var(--navy); }
.botao.dourado { background: var(--gold); border-color: var(--gold); }
.botao.dourado:hover { background: #8f460d; }
button.botao { font: inherit; cursor: pointer; }

/* Linha de processo: dez etapas com arco de retorno */
.percurso {
  list-style: none;
  margin: 0;
  padding: 0 0 0 0.2rem;
  counter-reset: etapa;
  position: relative;
}
.percurso li {
  counter-increment: etapa;
  position: relative;
  padding: 0 0 0.95rem 2.6rem;
  margin: 0;
}
.percurso li::before {
  content: counter(etapa, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 1.9rem;
  height: 1.9rem;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--teal);
  background: var(--paper);
  border: 2px solid var(--teal);
  border-radius: 50%;
  z-index: 1;
}
.percurso li::after {
  content: "";
  position: absolute;
  left: 0.9rem;
  top: 1.9rem;
  bottom: 0;
  width: 2px;
  background: var(--line);
}
.percurso li:last-child::after { display: none; }
.percurso strong { display: block; line-height: 1.3; }
.percurso span { display: block; font-size: 0.93rem; color: var(--muted); }
.percurso li.volta::before { border-color: var(--gold); color: var(--gold); }
.retorno {
  margin: 0.4rem 0 0 2.6rem;
  font-size: 0.9rem;
  color: #8f460d;
  font-weight: 600;
}
.retorno::before { content: "\21BA\00a0"; }

/* Carimbos */
.carimbo {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.55rem;
  border: 1.5px solid currentColor;
  border-radius: 4px;
  color: var(--gold);
  background: var(--paper);
  transform: rotate(-1deg);
}
.carimbo.verde { color: var(--teal); }

/* Notas de método e avisos */
.nota {
  border-left: 4px solid var(--gold);
  background: var(--gold-wash);
  padding: 1rem 1.2rem;
  border-radius: 0 8px 8px 0;
  margin: 1.4rem auto;
  max-width: calc(var(--measure) + 2.4rem);
}
.nota > :first-child { margin-top: 0; }
.nota > :last-child { margin-bottom: 0; }
.nota.verde { border-left-color: var(--teal); background: var(--wash); }

.aviso-faixa {
  padding: 0.85rem clamp(1rem, 4vw, 3rem);
  background: var(--gold-wash);
  border-bottom: 1px solid #d1ad6b;
  font-size: 0.97rem;
}
.aviso-faixa strong { font-family: var(--mono); letter-spacing: 0.06em; }

/* Listas de limites */
.limites {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 0.9rem 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.limites li {
  padding-left: 1.6rem;
  position: relative;
}
.limites li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 0.85rem;
  height: 2px;
  background: var(--gold);
}

/* Tabelas */
/* position: relative faz o contêiner recortar também os textos para leitor de tela (absolutos) das células. */
.tabela { overflow-x: auto; position: relative; margin: 1rem 0 1.4rem; }
table { border-collapse: collapse; width: 100%; font-size: 0.97rem; }
caption { text-align: left; font-weight: 600; padding: 0 0 0.5rem; }
th, td { text-align: left; vertical-align: top; padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--line); }
thead th { background: var(--wash); border-bottom: 2px solid var(--teal); font-size: 0.92rem; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Detalhes e respostas */
details {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin: 0.9rem auto;
  max-width: calc(var(--measure) + 2rem);
}
summary { cursor: pointer; font-weight: 600; color: var(--teal); }
details[open] summary { margin-bottom: 0.6rem; }

/* Linhas para escrever na versão impressa */
.campo {
  border-bottom: 1px solid var(--muted);
  min-height: 2.2rem;
  margin: 0.3rem 0 1rem;
  max-width: var(--measure);
}
.campo.alto { min-height: 5rem; border: 1px solid var(--line); border-radius: 6px; }

/* Biblioteca */
.recursos { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.recurso {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem 1.5rem;
  align-items: start;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.recurso h3 { margin: 0 0 0.3rem; }
.recurso p { margin: 0.2rem 0; }
.recurso .meta { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); }
.recurso .acao { align-self: center; }

.referencias { font-size: 0.95rem; padding-left: 1.2rem; }
.referencias li { margin: 0.45rem 0; }

.indice { columns: 2 16rem; padding-left: 1.2rem; }
.abertura .indice { columns: auto; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.3rem 1.3rem; list-style: none; padding: 0; margin: 0 auto; }

/* Conta de aluno: formulários e mensagens */
.abertura.compacta { padding-bottom: clamp(1.5rem, 3vw, 2.25rem); }
.formulario { max-width: 34rem; margin: 0 auto 1.75rem; text-align: left; }
.formulario h2, .formulario h3 { text-align: center; }
.formulario > h2, .formulario > h3 { margin-top: 0; }
.campo-form { margin: 0 0 1.1rem; max-width: none; }
.campo-form label, .filtros label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
.campo-form .dica { display: block; font-size: 0.92rem; color: var(--muted); margin: 0 0 0.35rem; }
.campo-form input, .filtros input, .filtros select {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--muted);
  border-radius: 6px;
  padding: 0.55rem 0.7rem;
  min-height: 2.75rem;
}
.campo-form input:focus-visible, .filtros input:focus-visible, .filtros select:focus-visible,
.campo-check input:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-color: var(--teal);
}
.campo-form input[aria-invalid="true"] { border-color: #a32020; box-shadow: 0 0 0 1px #a32020; }
.campo-check { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.6rem; align-items: start; margin: 0 0 1.2rem; }
.campo-check input { width: 1.25rem; height: 1.25rem; margin: 0.2rem 0 0; accent-color: var(--teal); }
.campo-check input[aria-invalid="true"] { outline: 2px solid #a32020; outline-offset: 2px; }
.acoes-form { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.2rem 0 0; }
button.botao:disabled { opacity: 0.6; cursor: wait; }
.botao.pequeno { padding: 0.35rem 0.65rem; font-size: 0.9rem; }
.botao.perigo { color: #a32020; border-color: #a32020; }
.botao.perigo:hover { background: #fdecec; color: #6e1414; }

.mensagem {
  max-width: 40rem;
  margin: 0 auto 1.1rem;
  padding: 0.8rem 1rem;
  border-left: 4px solid;
  border-radius: 0 6px 6px 0;
}
.mensagem.erro { background: #fdecec; border-color: #a32020; color: #6e1414; }
.mensagem.sucesso { background: var(--wash); border-color: var(--teal); color: var(--navy); }
.mensagem:focus, .senha-temporaria:focus { outline: 3px solid var(--gold); outline-offset: 2px; }

.dados-conta { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.35rem 1.2rem; margin: 0 0 1.4rem; }
.dados-conta dt { font-weight: 600; }
.dados-conta dd { margin: 0; overflow-wrap: anywhere; }

/* Painel do professor */
.filtros { display: flex; flex-wrap: wrap; gap: 0.8rem 1.2rem; align-items: end; margin: 0 0 1rem; }
.filtros p { margin: 0; flex: 1 1 14rem; max-width: 22rem; }
.acoes-linha { white-space: nowrap; }
.senha-temporaria {
  max-width: 44rem;
  margin: 0 0 1.2rem;
  padding: 1rem 1.2rem;
  border: 2px solid var(--gold);
  border-radius: 8px;
  background: var(--gold-wash);
}
.senha-temporaria code {
  font-family: var(--mono);
  font-size: 1.3rem;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  user-select: all;
}

/* Rodapé */
.rodape {
  padding: 2rem clamp(1rem, 4vw, 3rem) 2.5rem;
  background: var(--navy);
  color: #e8f1f3;
  font-size: 0.93rem;
  text-align: center;
}
.rodape p { margin: 0.35rem auto; max-width: 60rem; }
.rodape-autor { font-weight: 600; color: #fff; font-size: 1rem; }
.rodape a { color: #fff; }
.rodape .marca { color: #fff; }
.rodape .marca b { color: #9fd6dc; }

/* Com seis itens no menu (2.0.0), o cabeçalho só cabe numa linha acima de 1000px. Abaixo disso, marca e Entrar
   ficam na primeira linha e o menu inteiro na segunda, em vez de o Entrar cair sozinho para baixo. */
@media (max-width: 1000px) {
  .topo nav { margin-left: 0; width: 100%; order: 3; }
  .conta-topo { margin-left: auto; order: 2; }
}
@media (max-width: 860px) {
  .recurso { grid-template-columns: 1fr; }
  .dados-conta { grid-template-columns: 1fr; }
  .dados-conta dd { margin-bottom: 0.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .topo nav, .conta-topo, .pular, .nao-imprimir, .rodape { display: none !important; }
  body { font-size: 11pt; }
  .abertura { background: none; padding: 0 0 1rem; }
  .secao { padding: 0.8rem 0; break-inside: auto; }
  .nota, .aviso-faixa { background: none; }
  a { color: inherit; text-decoration: none; }
  details { border: 0; padding: 0; }
  details > summary { display: none; }
  h2, h3 { break-after: avoid; }
}

/* Painel do professor: progresso no estudo dirigido */
.so-leitor { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.etapas-mini { display: inline-flex; gap: 2px; vertical-align: middle; margin-right: 0.5rem; }
.etapas-mini span { display: inline-block; width: 1.35rem; height: 1.35rem; line-height: 1.3rem; text-align: center; font-family: var(--mono); font-size: 0.68rem; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); background: var(--paper); }
.etapas-mini span.feita { background: var(--teal); border-color: var(--teal); color: #ffffff; }
.etapas-total { white-space: nowrap; font-variant-numeric: tabular-nums; }
td.sem-registro { color: var(--muted); }
td.etapas-celula { white-space: nowrap; }
.secao.larga { max-width: 72rem; }
.resumo-etapas th[scope="row"] { white-space: nowrap; }
.barra { display: block; height: 0.6rem; min-width: 6rem; background: var(--wash); border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.barra > span { display: block; height: 100%; background: var(--teal); }
@media print { .etapas-mini span.feita { background: none; color: var(--ink); font-weight: 700; border-color: var(--ink); } .barra { display: none; } }

/* Código de recuperação (Criar conta, Recuperar a senha e Minha conta) */
.codigo-recuperacao {
  max-width: 40rem;
  margin: 0 auto 1.4rem;
  padding: 1.1rem 1.3rem;
  border: 2px solid var(--gold);
  border-radius: 8px;
  background: var(--gold-wash);
}
.codigo-recuperacao:focus { outline: none; }
.codigo-recuperacao:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.codigo-recuperacao > h2, .codigo-recuperacao > h3 { margin-top: 0; text-align: center; text-wrap: balance; }
.codigo-recuperacao > :last-child { margin-bottom: 0; }
.codigo-valor, .secao-corpo p.codigo-valor { text-align: center; margin: 0.4rem 0 1rem; -webkit-hyphens: manual; hyphens: manual; }
.codigo-valor code {
  display: inline-block;
  font-family: var(--mono);
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  user-select: all;
  overflow-wrap: anywhere;
}
.aviso-copia { font-size: 0.95rem; color: var(--navy); margin: 0.6rem 0 0; }
@media (max-width: 26rem) {
  .codigo-recuperacao { padding: 1rem 0.9rem; }
  .codigo-valor code { font-size: 1.1rem; letter-spacing: 0.04em; }
}

/* Painel do professor: leitura de uma entrega. */
.leitura-entrega {
  margin: 1.2rem 0;
  padding: 1rem 1.2rem;
  border: 1px solid var(--line);
  border-top: 3px solid var(--teal);
  border-radius: 8px;
  background: var(--paper);
}
.leitura-entrega h3 { margin-top: 0; text-align: left; }
.leitura-entrega .leitura-acoes { text-align: left; }
.sintese-texto {
  max-height: 32rem;
  overflow: auto;
  margin: .8rem 0 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--wash);
  font-family: var(--sans);
  font-size: .95rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  text-align: left;
}

/* v1.11.0: autoavaliação (página própria) e aprendizagem percebida no painel */
.escala-auto { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.3rem 1.2rem; margin: 1rem 0 0; }
.escala-auto dt { font-weight: 600; }
.escala-auto dd { margin: 0; }
.tabela-auto th.nivel { text-align: center; font-size: 0.85rem; line-height: 1.25; }
.tabela-auto th.nivel span { display: block; font-weight: 400; color: var(--muted); }
.tabela-auto td.escolha { text-align: center; vertical-align: middle; padding: 0; }
.tabela-auto td.escolha label { display: block; padding: 0.55rem 0.4rem; cursor: pointer; }
.tabela-auto td.escolha input { width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--teal); cursor: pointer; }
.tabela-auto tbody tr:hover { background: var(--wash); }
/* Celular: só o número do nível no cabeçalho (os nomes estão na escala acima e no rótulo de cada botão),
   para os seis níveis caberem na tela sem rolagem lateral escondida. */
@media (max-width: 36rem) {
  .tabela-auto th, .tabela-auto td { padding-left: 0.3rem; padding-right: 0.3rem; }
  .tabela-auto th.nivel span { display: none; }
  .tabela-auto tbody th { font-size: 0.9rem; }
  .tabela-auto th.nivel, .tabela-auto td.escolha { width: 2.1rem; }
  .tabela-auto td.escolha label { padding: 0.6rem 0.15rem; }
}
.comentarios-etapa { margin: 0 0 0.8rem; }
.comentarios-etapa summary { cursor: pointer; font-weight: 600; }
.comentarios-etapa ul { margin: 0.4rem 0 0.6rem; }

/* v2.0.0: exercícios de fluxo (exercicios.html, assets/fila.js). */
.parametros { display: grid; grid-template-columns: minmax(8rem, max-content) 1fr; gap: 0.35rem 1.2rem; margin: 1rem 0 1.2rem; }
.parametros dt { font-weight: 600; }
.parametros dd { margin: 0; }
@media (max-width: 36rem) { .parametros { grid-template-columns: 1fr; } .parametros dd { margin-bottom: 0.5rem; } }
.rodadas { display: grid; gap: 1rem; margin: 1rem 0 1.4rem; }
@media (min-width: 900px) { .rodadas { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.rodada { border: 1px solid var(--line); border-radius: 8px; padding: 1rem 1.1rem; background: var(--paper); display: flex; flex-direction: column; }
.rodada h3 { margin-top: 0; }
.secao-corpo .rodada p { text-align: left; -webkit-hyphens: manual; hyphens: manual; }
.rodada .acoes-form { margin-top: auto; padding-top: 0.6rem; }
.rodada .filtros { flex-direction: column; align-items: stretch; gap: 0.6rem; }
.rodada .filtros p { max-width: none; flex: none; }
.rodada .filtros select { width: 100%; }
td.vazio { color: var(--muted); font-style: italic; }
.figura-fluxo { margin: 1.2rem 0 1.4rem; }
.figura-fluxo figcaption { color: var(--muted); font-size: 0.92rem; margin-top: 0.3rem; }
.grafico-fluxo { display: block; width: 100%; height: auto; max-width: 52rem; }
.grafico-fluxo .grade { stroke: var(--line); stroke-width: 1; }
.grafico-fluxo .eixo { fill: var(--muted); font-size: 12px; font-family: var(--sans); }
.grafico-fluxo .titulo-eixo { font-size: 13px; }
.grafico-fluxo .linha { fill: none; stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; }
.grafico-fluxo .linha.r1 { stroke: var(--muted); stroke-dasharray: 7 5; }
.grafico-fluxo .linha.r2 { stroke: var(--teal); }
.grafico-fluxo .linha.r3 { stroke: var(--gold); }
.grafico-fluxo .linha.cap { stroke: var(--navy); stroke-dasharray: 7 5; stroke-width: 2; }
.grafico-fluxo .linha.fila { stroke: var(--gold); }
.grafico-fluxo .barra-novos { fill: #a9cdd2; }
.grafico-fluxo .barra-retornos { fill: #e9c39d; }
.legenda-grafico { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; padding: 0; margin: 0.5rem 0 0; font-size: 0.95rem; }
.legenda-grafico li { display: flex; align-items: center; gap: 0.45rem; }
.legenda-grafico .amostra { display: inline-block; width: 1.8rem; height: 0; border-top: 3px solid var(--muted); }
.legenda-grafico .amostra.r1 { border-top-style: dashed; }
.legenda-grafico .amostra.r2 { border-top-color: var(--teal); }
.legenda-grafico .amostra.r3, .legenda-grafico .amostra.fila { border-top-color: var(--gold); }
.legenda-grafico .amostra.cap { border-top: 2px dashed var(--navy); }
.legenda-grafico .amostra.barra-novos, .legenda-grafico .amostra.barra-retornos { width: 0.9rem; height: 0.9rem; border: 0; }
.legenda-grafico .amostra.barra-novos { background: #a9cdd2; }
.legenda-grafico .amostra.barra-retornos { background: #e9c39d; }
.rotulo-campo { font-weight: 600; margin-bottom: 0.3rem; }
.resumo-gerado { display: block; width: 100%; box-sizing: border-box; font: inherit; line-height: 1.5; padding: 0.7rem 0.8rem; border: 1px solid var(--line); border-radius: 6px; background: var(--wash); color: var(--ink); resize: vertical; }
.copia-msg { align-self: center; color: var(--teal); font-weight: 600; }
@media print { .rodada .acoes-form, [data-reiniciar], [data-copiar] { display: none; } }
/* Exercícios: cabeçalhos longos da tabela de cenários podem quebrar linha */
table[data-cenarios] thead th.num { white-space: normal; min-width: 6.5rem; }
/* Exercícios: no celular o desenho encolhe para menos da metade; os rótulos crescem na mesma proporção */
@media (max-width: 560px) {
  .grafico-fluxo .eixo { font-size: 22px; }
  .grafico-fluxo .titulo-eixo { font-size: 19px; }
}
/* Mapeamento: diagrama do exemplo, em coluna no celular e em três colunas a partir de 760px */
.mapa-exemplo { margin: 1.2rem 0 1.4rem; }
.mapa-exemplo figcaption { color: var(--muted); font-size: 0.92rem; margin-top: 0.5rem; }
.mapa-blocos { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.8rem; }
.mapa-passo { position: relative; display: grid; gap: 0.6rem; align-content: center; }
.mapa-passo + .mapa-passo::before { content: "\2193"; position: absolute; top: -1.5rem; left: 50%; transform: translateX(-50%); color: var(--muted); font-size: 1.1rem; line-height: 1; }
@media (min-width: 760px) {
  .mapa-blocos { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 1fr); gap: 2.2rem; }
  .mapa-passo + .mapa-passo::before { content: "\2192"; top: 50%; left: -1.1rem; transform: translate(-50%, -50%); }
}
.bloco { border: 1px solid var(--line); border-radius: 8px; padding: 0.7rem 0.85rem; background: var(--paper); }
.bloco.caminho { border: 2px solid var(--teal); }
.secao-corpo .bloco p, .secao-corpo .paralelo-rotulo { text-align: left; -webkit-hyphens: manual; hyphens: manual; margin: 0; }
.bloco .bloco-nome { font-weight: 600; }
.bloco .bloco-org { color: var(--muted); font-size: 0.9rem; margin: 0.1rem 0 0.5rem; }
.bloco dl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.15rem 0.8rem; margin: 0; font-size: 0.92rem; }
.bloco dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.secao-corpo .paralelo-rotulo { font-size: 0.85rem; color: var(--muted); text-align: center; }
