/* Gabaritô · design system
   Tokens > base > estrutura do app > componentes > páginas. As variáveis antigas (--tx, --mut, --bd,
   --pri...) continuam valendo como apelidos, para os estilos embutidos nos templates.
   Tema: sem escolha, segue o do sistema; a escolha da pessoa vem em <html data-tema="claro|escuro">. Tudo o que
   muda entre os temas é token: estilos novos usam os tokens, nunca cores fixas. */

/* Fontes hospedadas no próprio servidor (SIL OFL 1.1, licenças em static/fontes/): carregá-las do Google Fonts
   enviaria o IP e o navegador de cada visitante a um terceiro no exterior, antes de qualquer aviso (LGPD art. 33). */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fontes/inter.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap;
  src: url("fontes/jetbrains-mono.woff2") format("woff2"); }

:root {
  --ink: #0f172a; --ink-2: #334155; --muted: #5d6d82; --faint: #66768b;
  --risco: #94a3b8;                     /* traços decorativos (cantoneiras, bolinhas): não é texto */
  --bg: #f3f5f9; --surface: #fff; --surface-2: #f8fafc; --line: #e5e9f0; --line-2: #eef1f6;
  --navy: #111827; --navy-2: #1b2435; --navy-3: #273247;
  --brand: #e8590c; --brand-600: #c2410c; --brand-50: #fff5ed; --brand-100: #ffe6d5;
  --ok: #15803d; --ok-50: #ecfdf3; --warn: #b45309; --warn-50: #fffbeb; --err: #b91c1c; --err-50: #fef2f2;
  --info: #1d4ed8; --info-50: #eff6ff; --violet: #6d28d9; --violet-50: #f5f3ff;
  /* borda e texto dos avisos coloridos */
  --ok-line: #bbf7d0; --ok-ink: #14532d; --warn-line: #fde68a; --warn-ink: #78350f;
  --err-line: #fecaca; --err-ink: #7f1d1d; --info-line: #c7d7fe; --info-ink: #1e3a8a;
  --line-3: #cbd5e1;                     /* borda ao passar o mouse */
  --field: #fff; --field-line: #8592a5;  /* campos de formulário: borda com 3:1 sobre o branco (WCAG 1.4.11) */
  --row-hover: #fafbfd;
  --brand-hover: #b23c0b;
  --brand-btn: #cc4b0b;                 /* fundo dos botões: o laranja da marca com texto branco legível (4,6:1) */
  --err-btn: var(--err);                /* fundo do botão de excluir */
  --escuro: var(--navy); --escuro-2: var(--navy-3);  /* botão escuro e item ativo em seletores */
  --navy-line: transparent;              /* separa o menu e as barras escuras do fundo, no tema escuro */
  --paper: var(--surface-2);             /* atrás de logos feitos para papel: fica claro nos dois temas */
  --serie-1: var(--brand); --serie-2: #2a78d6;  /* séries dos gráficos (validadas contra daltonismo nos dois temas) */
  --realce: rgba(15, 23, 42, .05);       /* item de gráfico sob o mouse */
  --so-claro: inline; --so-escuro: none; /* ícones que só aparecem num dos temas */
  /* botão do Google (login): as cores do padrão de marca dele, uma versão por tema */
  --google-bg: #fff; --google-tx: #1f1f1f; --google-line: #747775; --google-hover: #f7f8f8;
  --r: 14px; --r-sm: 9px; --r-xs: 6px;
  --sh-1: 0 1px 2px rgba(15, 23, 42, .05);
  --sh-2: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -12px rgba(15, 23, 42, .12);
  --sh-3: 0 20px 50px -20px rgba(15, 23, 42, .35);
  /* anel de foco sólido (4,7:1 sobre o fundo; WCAG 2.4.7 e 1.4.11), com um respiro da cor da superfície */
  --foco: 0 0 0 2px var(--surface), 0 0 0 4px var(--brand-600);
  --fonte: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --lateral: 256px;
  /* apelidos usados pelos templates */
  --tx: var(--ink); --mut: var(--muted); --bd: var(--line); --pri: var(--brand); --card: var(--surface);
  color-scheme: light;
}

/* Tema escuro: pelo sistema (se a pessoa não escolheu o claro) ou pela escolha dela. Os dois blocos têm os mesmos
   valores: mude sempre os dois. As cores de estado (--ok, --err...) são tons médios porque servem tanto de texto
   sobre o fundo escuro quanto de fundo para texto branco. O menu lateral e as barras continuam azul-marinho. */
@media (prefers-color-scheme: dark) {
  :root:not([data-tema="claro"]) {
    --ink: #e6ebf2; --ink-2: #c3ccd9; --muted: #94a3b8; --faint: #8391a6; --risco: #6b7a90;
    --bg: #0b1120; --surface: #141c2b; --surface-2: #1a2334; --line: #273247; --line-2: #1f2939; --line-3: #3a475d;
    --brand-600: #fb923c; --brand-hover: #b23c0b; --brand-50: #2b1c14; --brand-100: #4a2a16;
    --ok: #16a34a; --ok-50: #0f2a1d; --warn: #f59e0b; --warn-50: #2a2112; --err: #ef4444; --err-50: #2c1618;
    --info: #3b82f6; --info-50: #111f3a; --violet: #a78bfa; --violet-50: #1e1a3a; --err-btn: #dc2626; --info-tx: #60a5fa;
    --ok-line: #166534; --ok-ink: #bbf7d0; --warn-line: #854d0e; --warn-ink: #fde68a;
    --err-line: #7f1d1d; --err-ink: #fecaca; --info-line: #1e3a8a; --info-ink: #bfdbfe;
    --field: #0f1624; --field-line: #5b6b82; --row-hover: #182133;
    --escuro: #334155; --escuro-2: #475569; --navy-line: #243044; --paper: #e8ecf2;
    --serie-2: #3987e5; --realce: rgba(230, 235, 242, .06);
    --so-claro: none; --so-escuro: inline;
    --google-bg: #131314; --google-tx: #e3e3e3; --google-line: #8e918f; --google-hover: #1f2020;
    --sh-1: 0 1px 2px rgba(0, 0, 0, .35);
    --sh-2: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .6);
    --sh-3: 0 20px 50px -20px rgba(0, 0, 0, .8);
    --foco: 0 0 0 2px var(--surface), 0 0 0 4px var(--brand-600);
    color-scheme: dark;
  }
}
:root[data-tema="escuro"] {
  --ink: #e6ebf2; --ink-2: #c3ccd9; --muted: #94a3b8; --faint: #8391a6; --risco: #6b7a90;
  --bg: #0b1120; --surface: #141c2b; --surface-2: #1a2334; --line: #273247; --line-2: #1f2939; --line-3: #3a475d;
  --brand-600: #fb923c; --brand-hover: #b23c0b; --brand-50: #2b1c14; --brand-100: #4a2a16;
  --ok: #16a34a; --ok-50: #0f2a1d; --warn: #f59e0b; --warn-50: #2a2112; --err: #ef4444; --err-50: #2c1618;
  --info: #3b82f6; --info-50: #111f3a; --violet: #a78bfa; --violet-50: #1e1a3a; --err-btn: #dc2626; --info-tx: #60a5fa;
  --ok-line: #166534; --ok-ink: #bbf7d0; --warn-line: #854d0e; --warn-ink: #fde68a;
  --err-line: #7f1d1d; --err-ink: #fecaca; --info-line: #1e3a8a; --info-ink: #bfdbfe;
  --field: #0f1624; --field-line: #5b6b82; --row-hover: #182133;
  --escuro: #334155; --escuro-2: #475569; --navy-line: #243044; --paper: #e8ecf2;
  --serie-2: #3987e5; --realce: rgba(230, 235, 242, .06);
  --so-claro: none; --so-escuro: inline;
  --google-bg: #131314; --google-tx: #e3e3e3; --google-line: #8e918f; --google-hover: #1f2020;
  --sh-1: 0 1px 2px rgba(0, 0, 0, .35);
  --sh-2: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .6);
  --sh-3: 0 20px 50px -20px rgba(0, 0, 0, .8);
  --foco: 0 0 0 2px var(--surface), 0 0 0 4px var(--brand-600);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
/* a página nunca rola de lado: um trecho sem espaço (código ou URL num enunciado) quebra a linha em vez de empurrar a
   tela, e o que ainda sobrar fica cortado (no iPhone, a tela inteira arrastava para a esquerda). Tabelas largas rolam
   dentro de .tabela. clip, e não hidden, para o body não virar área de rolagem e o position: sticky continuar valendo */
html, body { overflow-x: clip; }
body { margin: 0; font-family: var(--fonte); font-size: 14.5px; line-height: 1.5; color: var(--ink); overflow-wrap: break-word;
  background: var(--bg); -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { color: var(--ink); letter-spacing: -.015em; line-height: 1.25; }
h1 { font-size: 24px; font-weight: 700; margin: 0 0 6px; }
h2 { font-size: 16.5px; font-weight: 650; margin: 0 0 12px; }
h3 { font-size: 14.5px; font-weight: 650; margin: 14px 0 6px; }
code { font-family: var(--mono); font-size: .88em; background: var(--line-2); border-radius: 5px; padding: 1px 5px; }
/* fórmulas \( \) dos textos das questões (formulas.py): SVG medido em em, na cor do texto, alinhado pela linha de base */
svg.formula { display: inline-block; overflow: visible; fill: currentColor; }
.formula-bloco { display: block; text-align: center; margin: .45em 0; overflow-x: auto; overflow-y: hidden; }
code.formula-erro { background: var(--err-50); color: var(--err-ink); box-shadow: inset 0 -1px 0 var(--err-line); }
pre.cod { font-family: var(--mono); background: var(--navy); color: #e2e8f0; border-radius: var(--r-sm);
  padding: 12px 14px; font-size: 12.5px; line-height: 1.55; overflow: auto; margin: 8px 0; border: 1px solid var(--navy-line); }
.mut { color: var(--muted); font-size: 13px; }
.ic { width: 18px; height: 18px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.ic.g { width: 22px; height: 22px; }
:focus-visible { outline: none; box-shadow: var(--foco); border-radius: 6px; }
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "›"; display: inline-block; width: 14px; transition: transform .15s; color: var(--faint); font-weight: 700; }
details[open] > summary::before { transform: rotate(90deg); }
::selection { background: var(--brand-100); }

/* ---------- estrutura do app ---------- */
/* dvh = altura realmente visível: no iPhone, 100vh inclui a área atrás da barra do Safari e escondia o rodapé do menu */
.app { display: grid; grid-template-columns: var(--lateral) 1fr; min-height: 100vh; min-height: 100dvh; }
.lateral { position: sticky; top: 0; height: 100vh; height: 100dvh; background: var(--navy); color: #cbd5e1; display: flex;
  flex-direction: column; padding: 18px 14px 0; overflow-y: auto; overscroll-behavior: contain; z-index: 30;
  border-right: 1px solid var(--navy-line); }
.marca { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; color: #fff; text-decoration: none; }
.lateral-topo { display: flex; align-items: flex-start; justify-content: space-between; }
.lateral-topo .marca { padding-right: 0; min-width: 0; }
.lateral-topo .marca small { white-space: nowrap; }
.marca:hover { text-decoration: none; }
.marca img { width: 32px; height: 32px; border-radius: 9px; }
.marca b { font-size: 19px; letter-spacing: -.02em; }
.marca small { display: block; font-size: 11px; color: #94a3b8; font-weight: 500; letter-spacing: .01em; margin-top: -2px; }
.nav-grupo { font-size: 11px; text-transform: uppercase; letter-spacing: .09em; color: #8391a6; font-weight: 700;
  margin: 18px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 9px; color: #cbd5e1;
  font-weight: 500; text-decoration: none; margin-bottom: 2px; transition: background .12s, color .12s; }
.nav a:hover { background: var(--navy-2); color: #fff; }
.nav a.on { background: var(--navy-3); color: #fff; box-shadow: inset 3px 0 0 var(--brand); }
.nav a .cont { margin-left: auto; font-size: 11px; background: var(--brand-btn); color: #fff; border-radius: 999px;
  padding: 1px 7px; font-weight: 700; }
.nav a.destaque { background: linear-gradient(135deg, var(--brand-btn), var(--brand-hover)); color: #fff; margin: 14px 0 4px;
  box-shadow: 0 8px 20px -10px rgba(232, 89, 12, .9); font-weight: 600; }
.nav a.destaque:hover { filter: brightness(1.05); }
/* base do menu (usuário + recolher): presa embaixo (visível mesmo quando o menu rola) e acima da barra de gestos do iPhone */
.lateral-base { position: sticky; bottom: 0; margin-top: auto; background: var(--navy);
  padding-bottom: max(10px, env(safe-area-inset-bottom)); }
.usuario { border-top: 1px solid var(--navy-3); padding: 10px 0 4px; display: flex; align-items: center; gap: 4px; }
.usuario .perfil { flex: 1; min-width: 0; min-height: 48px; display: flex; align-items: center; gap: 10px; padding: 6px 8px;
  border-radius: 10px; color: #fff; text-decoration: none; }
.usuario .perfil:hover, .usuario .perfil:focus-visible { background: var(--navy-2); text-decoration: none; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, #334155, #475569);
  color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
.usuario .quem { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.usuario .quem b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usuario .quem span { font-size: 11.5px; color: #94a3b8; }
.usuario button { width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 0; color: #94a3b8;
  cursor: pointer; border-radius: 10px; flex: none; }
.usuario button:hover { background: var(--navy-2); color: #fff; }
/* telas baixas (notebook com zoom, iPhone SE): menu mais compacto para caber sem rolar */
@media (max-height: 720px) {
  .marca { padding-bottom: 10px; }
  .nav-grupo { margin: 12px 10px 4px; }
  .nav a { padding: 7px 10px; }
  .nav a.destaque { margin: 10px 0 4px; }
}
.corpo-app { min-width: 0; display: flex; flex-direction: column; }
.barra-topo { display: none; }
.conteudo { width: 100%; max-width: 1240px; margin: 0 auto; padding: 28px 32px 60px; }
.conteudo:focus { outline: none; }  /* recebe o foco do "Pular para o conteúdo"; o contorno seria a página inteira */
.sombra-menu { display: none; }
/* "Pular para o conteúdo" (base.html): fora da vista até receber o foco pelo teclado */
.pular { position: fixed; z-index: 90; left: 12px; top: 12px; padding: 10px 16px; border-radius: var(--r-sm); background: var(--surface);
  color: var(--ink); font-weight: 600; box-shadow: var(--sh-3); transform: translateY(-160%); }
.pular:focus { transform: none; outline: none; box-shadow: var(--foco), var(--sh-3); text-decoration: none; }

/* recolher o menu (base.html): no computador, uma faixa só com os ícones; o nome aparece na dica (.dica-menu) */
.nav-recolher { display: flex; align-items: center; gap: 11px; width: 100%; height: 36px; margin: 0; padding: 0 10px; border: 0;
  border-radius: 9px; background: none; color: #8391a6; font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.nav-recolher:hover { background: var(--navy-2); color: #fff; }
.nav-recolher .ic { transition: transform .2s; }
/* ajuda e suporte (base.html, feedback.py): o "?" discreto no canto, com o menu acima dele */
.suporte { position: fixed; z-index: 45; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); }
.suporte-botao { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface);
  color: var(--muted); font-family: inherit; font-size: 17px; font-weight: 700; line-height: 1; cursor: pointer; box-shadow: var(--sh-2); transition: color .12s, border-color .12s; }
.suporte-botao:hover, .suporte-botao[aria-expanded="true"] { color: var(--brand); border-color: var(--brand); }
.suporte-menu { position: absolute; right: 0; bottom: 48px; width: min(300px, calc(100vw - 32px)); padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 16px 40px rgba(15, 23, 42, .18); }
.suporte-menu > * { display: flex; gap: 10px; align-items: flex-start; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px;
  background: none; color: var(--ink); font: inherit; font-size: 14px; text-align: left; text-decoration: none; cursor: pointer; }
.suporte-menu > *:hover, .suporte-menu > *:focus-visible { background: var(--surface-2); text-decoration: none; }
.suporte-menu .ic { flex: none; margin-top: 2px; color: var(--brand); }
.suporte-menu b { display: block; font-weight: 600; }
.suporte-menu small { display: block; color: var(--muted); font-size: 12px; }
/* barra fixa na base da tela (montagem, questão, importação; numa tela nova, marque a barra com data-barra-fixa): no
   computador o "?" sobe acima dela; no celular ela ocupa a largura toda e leva a ação principal ao polegar, então
   o "?" some (antes ficava sobre o canto da barra e sobre os campos) */
body:has(.barra-acoes:not([hidden]), [data-barra-fixa]:not([hidden]), .importacao-acoes) .suporte { bottom: calc(84px + env(safe-area-inset-bottom)); }
@media (max-width: 960px) { body:has(.barra-acoes:not([hidden]), [data-barra-fixa]:not([hidden]), .importacao-acoes) .suporte { display: none; } }
body:has(#aviso-cookies) .suporte { display: none; }
/* no celular, as mesmas opções ficam no fim da gaveta do menu (☰) e o "?" sai: ele cobria barras, campos e botões.
   Só nas telas com o menu lateral (.app); sem ele (captura do celular pareado, corretor), o "?" continua */
.nav-ajuda { display: none; padding-bottom: 8px; }
.nav-ajuda > a, .nav-ajuda > button { display: flex; align-items: flex-start; gap: 11px; width: 100%; padding: 9px 10px; margin-bottom: 2px;
  border: 0; border-radius: 9px; background: none; color: #cbd5e1; font: inherit; font-weight: 500; text-align: left;
  text-decoration: none; cursor: pointer; }
.nav-ajuda > a:hover, .nav-ajuda > button:hover { background: var(--navy-2); color: #fff; text-decoration: none; }
.nav-ajuda .ic { flex: none; margin-top: 2px; }
.nav-ajuda b { display: block; font-weight: 500; }
.nav-ajuda small { display: block; color: #8391a6; font-size: 12px; }
@media (max-width: 760px) { .nav-ajuda { display: block; } .app ~ .suporte { display: none; } }
@media print { .suporte { display: none; } }
.dlg-feedback { max-width: 480px; }
.dlg-feedback textarea { width: 100%; min-height: 130px; }
.dica-menu { position: fixed; z-index: 60; transform: translateY(-50%); pointer-events: none; padding: 6px 10px;
  border-radius: 8px; background: var(--navy-3); color: #fff; font-size: 13px; font-weight: 500; white-space: nowrap;
  box-shadow: var(--sh-2); }
@media (min-width: 961px) {
  :root { --lateral-recolhida: 72px; }
  .app { transition: grid-template-columns .2s ease; }
  .menu-recolhido .app { grid-template-columns: var(--lateral-recolhida) 1fr; }
  .menu-recolhido .lateral { padding: 18px 12px 0; overflow-x: hidden; }
  /* o texto sai da vista, não da página: leitores de tela continuam lendo o nome de cada item */
  .menu-recolhido .lateral .rotulo, .menu-recolhido .lateral .marca span, .menu-recolhido .usuario .quem {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .menu-recolhido .lateral-topo { flex-direction: column; align-items: center; gap: 6px; }
  .menu-recolhido .lateral-topo .marca { padding: 4px 0 4px; }
  .menu-recolhido .nav-busca { justify-content: center; padding: 9px 0; }
  .menu-recolhido .nav-busca kbd { display: none; }
  .menu-recolhido .nav a { justify-content: center; padding: 10px 0; }
  .menu-recolhido .nav a .cont { display: none; }  /* o contador some com o rótulo; volta ao abrir o menu */
  .menu-recolhido .nav-recolher { justify-content: center; padding: 0; }  /* altura fixa: não sai de debaixo do cursor */
  .menu-recolhido .nav-grupo { height: 1px; margin: 12px 8px; overflow: hidden; color: transparent; background: var(--navy-3); }
  .menu-recolhido .nav a.destaque { margin: 12px 0 4px; }
  .menu-recolhido .nav-recolher .ic { transform: scaleX(-1); }
  .menu-recolhido .lateral-rodape { display: none; }
  .menu-recolhido .usuario { flex-direction: column; gap: 2px; }
  .menu-recolhido .usuario .perfil { flex: none; justify-content: center; padding: 6px 0; }
}
@media (min-width: 961px) and (prefers-reduced-motion: reduce) { .app, .nav-recolher .ic { transition: none; } }

@media (max-width: 960px) {
  .nav-recolher, .dica-menu { display: none; }
  .app { display: block; }
  .lateral { position: fixed; left: 0; top: 0; width: min(272px, 85vw); transform: translateX(-100%);
    padding-top: max(18px, env(safe-area-inset-top)); padding-left: max(14px, env(safe-area-inset-left));
    transition: transform .2s ease, visibility 0s .2s; box-shadow: var(--sh-3); visibility: hidden; }
  /* fechada, a gaveta sai também da ordem do Tab e do leitor de tela (antes o foco passava por links fora da tela) */
  .menu-aberto .lateral { transform: none; visibility: visible; transition: transform .2s ease; }
  .menu-aberto .sombra-menu { display: block; position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 20; }
  .barra-topo { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 10;
    background: var(--navy); color: #fff; border-bottom: 1px solid var(--navy-line); padding: max(10px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right))
    10px max(14px, env(safe-area-inset-left)); }
  .barra-topo .marca { padding: 0; }
  .barra-topo .marca img { width: 28px; height: 28px; }
  /* ☰ e busca com alvo de 44 px (uso com uma mão, em pé na sala); a margem negativa mantém a altura da barra */
  .barra-topo button { background: none; border: 0; color: #fff; padding: 0; cursor: pointer; min-width: 44px; min-height: 44px;
    margin-block: -5px; display: grid; place-items: center; border-radius: var(--r-sm); }
  .barra-topo button:first-child { margin-left: -11px; }
  .barra-topo .acao { margin-left: auto; position: relative; }
  .barra-topo .acao::after { content: ""; position: absolute; inset: -7px -3px; }  /* alvo de toque de 44 px sem engrossar o botão */
  /* embaixo, espaço para o fim da página não ficar sob o "?" (38 px a 16 px da borda) */
  .conteudo { padding: 18px max(14px, env(safe-area-inset-right)) calc(72px + env(safe-area-inset-bottom))
    max(14px, env(safe-area-inset-left)); }
}

/* layout sem menu (login, celular pareado) */
.simples .barra-simples { display: flex; align-items: center; gap: 10px; background: var(--navy); color: #fff;
  border-bottom: 1px solid var(--navy-line);
  padding: max(12px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) 12px max(18px, env(safe-area-inset-left)); }
.simples .barra-simples .marca { padding: 0; }
.simples .barra-simples .dir { margin-left: auto; font-size: 12.5px; color: #cbd5e1; display: flex; gap: 10px; align-items: center; }
.simples .barra-simples .sair { background: var(--navy-2); color: #fff; border: 0; border-radius: 8px; padding: 6px 10px; font: inherit; cursor: pointer; }
.simples .conteudo { max-width: 860px; }

/* botão de tema claro/escuro (_tema.html): sempre sobre o azul-marinho do menu, das barras ou da vitrine */
.form-tema { margin: 0; }
.tema-botao { width: 40px; height: 40px; display: grid; place-items: center; background: none; border: 0; border-radius: 10px;
  color: #94a3b8; cursor: pointer; flex: none; }
.tema-botao:hover { background: var(--navy-2); color: #fff; }
.tema-botao .so-claro { display: var(--so-claro); }
.tema-botao .so-escuro { display: var(--so-escuro); }

/* ---------- cabeçalho de página ---------- */
.pagina-topo { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.pagina-topo .sobre { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--brand-600); margin-bottom: 4px; }
.pagina-topo p { margin: 2px 0 0; color: var(--muted); }
.pagina-topo .acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.trilha { font-size: 13px; color: var(--muted); margin-bottom: 10px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.trilha a { color: var(--muted); }
.trilha a:hover { color: var(--ink); }

/* ---------- cartões ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px;
  margin-bottom: 18px; box-shadow: var(--sh-1); }
.card.elevado { box-shadow: var(--sh-2); }
.card > h2:first-child, .card > .card-topo:first-child { margin-top: 0; }
.card-topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.card-topo h2 { margin: 0; display: flex; align-items: center; gap: 8px; min-width: 0; overflow-wrap: anywhere; }  /* e-mail longo como título (conta/email) quebra dentro do cartão */
.card-topo h2 .ic { color: var(--brand); }
details.card > summary { font-weight: 600; }
/* summary com cara de cabeçalho de cartão: a setinha ::before não entra no space-between, e fechado não sobra margem */
summary.card-topo { justify-content: flex-start; }
summary.card-topo > :last-child:not(h2) { margin-left: auto; }
details:not([open]) > summary.card-topo { margin-bottom: 0; }
.divisor { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

/* ---------- grades ---------- */
.grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
.pilha, .card, .grid > * { min-width: 0; }
.grid > .card { margin-bottom: 0; }
/* grade solta na página: mesmo espaçamento de um cartão até o bloco seguinte */
.conteudo > .grid { margin-bottom: 18px; }
@media (min-width: 900px) {
  .grid.dois { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
  .grid.meio { grid-template-columns: 1fr 1fr; }
  .grid.tres { grid-template-columns: repeat(3, 1fr); }
}
/* só campos lado a lado (grid.meio), empilhados no celular: o espaço entre eles fica o do label.campo, sem somar o gap */
@media (max-width: 899px) { .grid.meio:has(> label.campo):not(:has(> :not(label.campo))) { row-gap: 0; } }
.pilha { display: flex; flex-direction: column; gap: 18px; }
.pilha > .card { margin-bottom: 0; }
.linha { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.linha > .cresce { flex: 1; min-width: 180px; }

/* ---------- indicadores ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px;
  box-shadow: var(--sh-1); display: flex; gap: 14px; align-items: flex-start; text-decoration: none; color: inherit; }
a.kpi:hover { text-decoration: none; border-color: var(--line-3); box-shadow: var(--sh-2); }
.kpi .ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; }
.kpi .ico.laranja { background: var(--brand-50); color: var(--brand-600); }
.kpi .ico.verde { background: var(--ok-50); color: var(--ok); }
.kpi .ico.azul { background: var(--info-50); color: var(--info); }
.kpi .ico.roxo { background: var(--violet-50); color: var(--violet); }
.kpi .ico.ambar { background: var(--warn-50); color: var(--warn); }
.kpi .valor { font-size: 26px; font-weight: 750; letter-spacing: -.02em; line-height: 1.1; }
.kpi .rotulo { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.kpi .extra { font-size: 12px; color: var(--faint); margin-top: 2px; }

/* ---------- botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; background: var(--brand-btn); color: #fff;
  border: 1px solid transparent; border-radius: var(--r-sm); padding: 9px 15px; font: inherit; font-size: 14px;
  font-weight: 600; cursor: pointer; text-decoration: none; line-height: 1.2; transition: background .12s, box-shadow .12s, transform .05s;
  box-shadow: 0 1px 2px rgba(194, 65, 12, .25); white-space: nowrap; }
.btn:hover { background: var(--brand-hover); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.sec { background: var(--surface); color: var(--ink); border-color: var(--line); box-shadow: var(--sh-1); }
.btn.sec:hover { background: var(--surface-2); border-color: var(--line-3); }
.btn.fantasma { background: transparent; color: var(--ink-2); box-shadow: none; }
.btn.fantasma:hover { background: var(--line-2); }
.btn.escuro { background: var(--escuro); box-shadow: none; }
.btn.escuro:hover { background: var(--escuro-2); }
.btn.perigo { background: var(--err-btn); box-shadow: none; }
.btn.perigo:hover { background: #991b1b; }
/* ação destrutiva ao lado de outra (Restaurar | Apagar de vez): contorno, texto vermelho; o vermelho cheio fica no diálogo */
.btn.sec.perigo-texto { color: var(--err); }
.btn.peq { padding: 6px 10px; font-size: 13px; border-radius: 8px; }
.btn.grande { padding: 13px 20px; font-size: 15.5px; border-radius: 12px; }
.btn:disabled, .btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.btn .ic { width: 16px; height: 16px; vertical-align: 0; }
/* no celular, botões de ação com 44 px de altura (eram 37) e rótulo longo quebrando a linha em vez de passar da
   tela; os pequenos (.peq), das ações repetidas em listas e tabelas, ficam com 30 px, acima dos 24 px da WCAG 2.5.8 */
@media (max-width: 560px) {
  .btn:not(.peq) { min-height: 44px; max-width: 100%; white-space: normal; text-align: center; }
  .btn.peq { min-height: 30px; }
}
button.link { background: none; border: 0; padding: 0; font: inherit; color: var(--brand-600); cursor: pointer; }

/* ---------- selos ---------- */
.tag { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 2px 9px; font-size: 11.5px;
  font-weight: 600; background: var(--line-2); color: var(--ink-2); line-height: 1.5; white-space: nowrap; }
.tag.ok { background: var(--ok-50); color: var(--ok); }
.tag.err { background: var(--err-50); color: var(--err); }
.tag.warn { background: var(--warn-50); color: var(--warn); }
.tag.info { background: var(--info-50); color: var(--info-tx, var(--info)); }
.tag.roxo { background: var(--violet-50); color: var(--violet); }
.tag.laranja { background: var(--brand-50); color: var(--brand-600); }
.ponto { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: currentColor; }

/* ---------- avisos ---------- */
.msg { position: relative; background: var(--info-50); border: 1px solid var(--info-line); color: var(--info-ink);
  padding: 11px 14px 11px 42px; border-radius: 11px; margin-bottom: 16px; font-size: 14px; }
.msg::before { content: "i"; position: absolute; left: 13px; top: 12px; width: 19px; height: 19px; border-radius: 50%; background: var(--info); color: #fff;
  font-size: 12px; font-weight: 800; display: grid; place-items: center; font-family: Georgia, serif; }
.msg.erro { background: var(--err-50); border-color: var(--err-line); color: var(--err-ink); }
.msg.erro::before { content: "!"; background: var(--err); font-family: var(--fonte); }
.msg.aviso { background: var(--warn-50); border-color: var(--warn-line); color: var(--warn-ink); }
.msg.aviso::before { content: "!"; background: #d97706; font-family: var(--fonte); }
.msg.ok { background: var(--ok-50); border-color: var(--ok-line); color: var(--ok-ink); }
.msg.ok::before { content: "✓"; background: var(--ok); font-family: var(--fonte); }
/* mensagem que já começa com o próprio ícone (faixa da assinatura, avisos com relógio ou alerta): sem o selo
   automático ao lado, que dava dois ícones seguidos */
.msg:has(> svg.ic:first-child) { padding-left: 14px; }
.msg:has(> svg.ic:first-child)::before { content: none; }

/* ---------- formulários ---------- */
label.campo { display: block; margin-bottom: 14px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
label.campo > input, label.campo > select, label.campo > textarea { display: block; width: 100%; margin-top: 6px; font-weight: 400; }
input[type=text], input[type=email], input[type=url], input[type=password], input[type=number], input[type=search], input[type=date], input[type=file], select, textarea {
  border: 1px solid var(--field-line); border-radius: var(--r-sm); padding: 9px 11px; font: inherit; font-size: 14px; color: var(--ink);
  background: var(--field); transition: border-color .12s, box-shadow .12s; max-width: 100%; }
/* placeholder com a cor do tema: o cinza padrão do navegador (#757575) dá 3,9:1 no campo escuro. --muted e não
   --faint porque o campo desativado (--surface-2) baixaria o --faint para 4,4:1 */
::placeholder { color: var(--muted); opacity: 1; }
input[type=file] { padding: 6px; background: var(--surface-2); color: var(--muted); font-size: 13.5px; cursor: pointer; }
input[type=file]::file-selector-button { font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 7px; padding: 6px 12px; margin-right: 10px; cursor: pointer; box-shadow: var(--sh-1); }
input[type=file]::file-selector-button:hover { background: var(--surface-2); border-color: var(--line-3); }
/* data: sem o visual nativo (no iPhone ele fica centralizado e mais baixo que os outros campos) */
input[type=date] { -webkit-appearance: none; appearance: none; min-height: 40px; line-height: 1.4; text-align: left; }
input[type=date]::-webkit-date-and-time-value { text-align: left; }
input[type=date]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .55; }
input[type=date]::-webkit-calendar-picker-indicator:hover { opacity: .9; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--foco); }
input:disabled, select:disabled, textarea:disabled { background: var(--surface-2); color: var(--muted); }
textarea { min-height: 64px; resize: vertical; line-height: 1.5; }
textarea.mono, input.mono { font-family: var(--mono); font-size: 13px; }
/* Em telas de toque, campos com fonte menor que 16 px fazem o Safari do iPhone dar zoom ao tocar no campo (a página
   fica maior que a tela e passa a arrastar para os lados). 16 px evita isso sem bloquear o zoom com os dedos, que
   continua disponível para quem precisa ampliar (acessibilidade). */
@media (pointer: coarse), (max-width: 960px) {
  input[type=text], input[type=email], input[type=url], input[type=password], input[type=number], input[type=search], input[type=date], select,
  textarea, textarea.mono, input.mono { font-size: 16px; }
}
input[type=checkbox], input[type=radio] { accent-color: var(--brand); width: 16px; height: 16px; vertical-align: -3px; }
.opcao { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm);
  margin-bottom: 8px; cursor: pointer; background: var(--surface); font-size: 14px; }
.opcao:hover { border-color: var(--line-3); }
.opcao input { margin-top: 2px; }
.ajuda { font-size: 12.5px; color: var(--muted); font-weight: 400; margin-top: 4px; }

/* ---------- tabelas ---------- */
.tabela { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px;
  /* quando a tabela não cabe, uma sombra na borda avisa que dá para arrastar (some ao chegar no fim) */
  background: linear-gradient(to right, var(--surface) 30%, transparent) left / 40px 100% no-repeat local,
    linear-gradient(to left, var(--surface) 30%, transparent) right / 40px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(15, 23, 42, .18), transparent) left / 14px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(15, 23, 42, .18), transparent) right / 14px 100% no-repeat scroll; }
table { border-collapse: collapse; width: 100%; }
th, td { padding: 11px 12px; border-bottom: 1px solid var(--line-2); text-align: left; font-size: 14px; vertical-align: middle; }
th { font-size: 11.5px; text-transform: uppercase; color: var(--muted); letter-spacing: .06em; font-weight: 650; background: var(--surface-2); }
.tabela tr:last-child td { border-bottom: 0; }
tbody tr:hover td, table.lista tr:hover td { background: var(--row-hover); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- progresso ---------- */
.barra { height: 8px; background: var(--line-2); border-radius: 999px; overflow: hidden; min-width: 90px; }
.barra > i { display: block; height: 100%; background: linear-gradient(90deg, #22c55e, var(--ok)); border-radius: 999px; }
.barra.laranja > i { background: linear-gradient(90deg, #fb923c, var(--brand)); }
.anel { --p: 0; width: 50px; height: 50px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  background: conic-gradient(var(--ok) calc(var(--p) * 1%), var(--line-2) 0); }
.anel::after { content: attr(data-rotulo); width: 40px; height: 40px; border-radius: 50%; background: var(--surface);
  display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--ink-2); }

/* ---------- listas e ações ---------- */
.lista-acoes { display: flex; flex-direction: column; gap: 8px; }
.acao-item { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px;
  color: inherit; text-decoration: none; background: var(--surface); transition: border-color .12s, box-shadow .12s, transform .12s; }
.acao-item:hover { text-decoration: none; border-color: var(--line-3); box-shadow: var(--sh-2); transform: translateY(-1px); }
.acao-item .ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }
.acao-item .txt { flex: 1; min-width: 0; }
.acao-item .txt b { display: block; font-weight: 600; }
.acao-item .txt span { font-size: 12.5px; color: var(--muted); }
.acao-item > .ic { color: var(--faint); }
.tom-laranja .ico, .ico.tom-laranja { background: var(--brand-50); color: var(--brand-600); }
.tom-ambar .ico { background: var(--warn-50); color: var(--warn); }
.tom-roxo .ico { background: var(--violet-50); color: var(--violet); }
.tom-azul .ico { background: var(--info-50); color: var(--info); }
.tom-verde .ico { background: var(--ok-50); color: var(--ok); }
.tom-vermelho .ico { background: var(--err-50); color: var(--err); }

.vazio { text-align: center; padding: 34px 18px; color: var(--muted); }
.vazio .ico { width: 54px; height: 54px; border-radius: 16px; margin: 0 auto 12px; display: grid; place-items: center;
  background: var(--brand-50); color: var(--brand-600); }
.vazio b { display: block; color: var(--ink); font-size: 15.5px; margin-bottom: 4px; }
.vazio p { max-width: 440px; margin: 0 auto 14px; }

/* ---------- roteiro de primeiros passos ---------- */
.roteiro { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.passo { border: 1px dashed var(--line-3); border-radius: 12px; padding: 14px; background: var(--surface); position: relative; }
.passo .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12.5px;
  background: var(--line-2); color: var(--ink-2); margin-bottom: 8px; }
.passo.feito { border-style: solid; border-color: var(--ok-line); background: var(--ok-50); }
.passo.feito .n { background: var(--ok); color: #fff; }
.passo b { display: block; margin-bottom: 2px; }
.passo span { font-size: 12.5px; color: var(--muted); }

/* ---------- etapas (montagem) ---------- */
.etapas { display: flex; gap: 0; margin: 4px 0 0; counter-reset: etapa; overflow-x: auto; }
.etapa { flex: 1; min-width: 150px; display: flex; align-items: center; gap: 10px; padding: 10px 12px; color: var(--muted);
  text-decoration: none; position: relative; font-size: 13.5px; font-weight: 500; }
.etapa:hover { text-decoration: none; color: var(--ink); }
.etapa .n { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center;
  font-weight: 700; font-size: 12.5px; background: var(--surface); flex-shrink: 0; }
.etapa + .etapa::before { content: ""; position: absolute; left: -12px; top: 50%; width: 24px; border-top: 2px solid var(--line); }
.etapa.feita { color: var(--ink-2); }
.etapa.feita .n { background: var(--ok); border-color: var(--ok); color: #fff; }
.etapa.atual { color: var(--ink); font-weight: 650; }
.etapa.atual .n { border-color: var(--brand); color: var(--brand-600); box-shadow: var(--foco); }
/* celular: as 4 etapas cabem na largura (eram 150 px cada e rolavam de lado, com "Gerar PDFs" cortado);
   o número em cima e o rótulo curto embaixo, a linha entre elas na altura do círculo */
@media (max-width: 640px) {
  .etapa { min-width: 0; flex-direction: column; gap: 4px; padding: 6px 2px; text-align: center; font-size: 12px; line-height: 1.25; }
  .etapa + .etapa::before { left: calc(-50% + 18px); width: calc(100% - 36px); top: 20px; }
}

/* ---------- questões ---------- */
.enun { font-size: 14.5px; line-height: 1.6; color: var(--ink); }
.alts { margin: 8px 0 0; padding-left: 0; list-style: none; font-size: 13.5px; display: grid; gap: 3px; }
.alts li { padding: 4px 8px; border-radius: 7px; color: var(--ink-2); }
.alts li.certa { color: var(--ok); font-weight: 600; background: var(--ok-50); }
.alts li.certa code { color: var(--ok-ink); }
.questao-card { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-bottom: 12px; background: var(--surface);
  transition: border-color .12s, box-shadow .12s; }
.questao-card:hover { border-color: var(--line-3); box-shadow: var(--sh-2); }
.questao-card .meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
/* o código interno da questão: para o suporte e a auditoria, no fim da linha e sem disputar atenção com os dados */
.questao-card .cod { font-size: 11.5px; color: var(--muted-2, var(--muted)); opacity: .8; font-variant-numeric: tabular-nums; }
.questao-card .acoes { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.questao-card .acoes form { margin: 0; }
.filtros { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filtros input[type=search] { flex: 1; min-width: 220px; padding-left: 36px;
  background: var(--field) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-5-5'/%3E%3C/svg%3E") 11px center / 17px no-repeat; }
.pag { display: flex; gap: 8px; margin-top: 14px; align-items: center; justify-content: center; }

/* ---------- gráficos simples ---------- */
.histograma { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; align-items: end; height: 150px; padding-top: 8px; }
.histograma .col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.histograma .col i { display: block; width: 100%; background: linear-gradient(180deg, #fb923c, var(--brand)); border-radius: 6px 6px 3px 3px; min-height: 3px; }
.histograma .col i.zero { background: var(--line-2); }
.histograma .col span { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.histograma-eixo { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; font-size: 11px; color: var(--faint); text-align: center; margin-top: 4px; }
.resumo-num { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.resumo-num div { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; }
.resumo-num b { display: block; font-size: 19px; letter-spacing: -.01em; }
.resumo-num div > span { font-size: 12px; color: var(--muted); }
/* desempenho da questão: são 3 números; com 4 colunas, sobrava uma vazia */
@media (min-width: 561px) { #historico .resumo-num { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .resumo-num { grid-template-columns: repeat(2, 1fr); } }

/* ---------- quantos imprimir (montagem e página da prova) ---------- */
/* os blocos crescem até 150 px: com 1 ou 2 modelos não esticam pela linha inteira, e 4 cabem numa coluna estreita */
.imprimir-modelos { display: flex; flex-wrap: wrap; gap: 8px; }
.imprimir-modelo { flex: 1 1 76px; max-width: 150px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1px; padding: 12px 6px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); font-size: 12.5px; color: var(--ink-2); }
.imprimir-modelo .letra { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 4px;
  background: var(--brand-50); color: var(--brand-600); font-weight: 750; font-size: 15px; }
.imprimir-modelo b { font-size: 26px; font-weight: 750; letter-spacing: -.02em; line-height: 1.1; color: var(--ink);
  font-variant-numeric: tabular-nums; }
.imprimir-modelo .pags { color: var(--muted); font-size: 12px; }
.imprimir-nota { margin: 12px 0; font-size: 13.5px; color: var(--ink-2); }
.imprimir .tabela { margin-top: 4px; }
.previa-modelos { margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13.5px; color: var(--ink-2); }

/* ---------- desempenho: mapa de calor e barras ---------- */
.celula { display: inline-block; min-width: 46px; padding: 3px 8px; border-radius: 7px; font-weight: 650; font-size: 13px;
  text-align: center; font-variant-numeric: tabular-nums; background: var(--line-2); color: var(--ink-2); }
.celula.ok { background: var(--ok-50); color: var(--ok); }
.celula.warn { background: var(--warn-50); color: var(--warn); }
.celula.err { background: var(--err-50); color: var(--err); }
.celula.forte { box-shadow: inset 0 0 0 1px currentColor; }
table.calor td { padding-top: 8px; padding-bottom: 8px; }
.legenda { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin: 12px 0 0; }
.legenda > span:not(.celula) { flex: 1 1 220px; }  /* a frase depois das faixas ocupa a linha que sobra em vez de ficar espremida */
.legenda .celula { min-width: 0; font-size: 11.5px; }
.criterio { padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.criterio:last-child { border-bottom: 0; }
.criterio .barra { margin: 6px 0 4px; }
.acao-item .ico b { font-size: 12px; }

/* ---------- gráficos (_graficos.html) ----------
   HTML e CSS com posições em % vindas do servidor: o texto não encolhe com o gráfico e tudo aparece sem script
   (graficos.js só acrescenta a dica). Marcas finas (barras de até 24px com a ponta arredondada, linhas de 2px),
   grade e eixos em linha fina e discreta; o texto usa as cores de texto, e a cor da série fica só na marca. */
.grafico { position: relative; font-size: 12px; line-height: 1.3; color: var(--muted); font-variant-numeric: tabular-nums; }
.grafico [data-dica] { outline: none; }
.grafico [data-dica]:hover, .grafico [data-dica]:focus-visible { background: var(--realce); }
.grafico [data-dica]:focus-visible { box-shadow: var(--foco); }
.gr-eixo-x { position: relative; height: 18px; margin-top: 6px; }
.gr-eixo-x span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
/* linhas de referência: cor de texto a 55%, por opacidade (color-mix() com as variáveis de tema some nos navegadores
   antigos, e a declaração de reserva não vale quando há var() no valor) */
.gr-ref { position: absolute; top: -24px; bottom: 0; pointer-events: none; z-index: 1; }
.gr-ref::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; border-left: 1px solid var(--ink-2); opacity: .55; }
.gr-ref span { position: absolute; top: 0; left: 6px; white-space: nowrap; color: var(--ink-2); line-height: 1; }
.gr-ref.esq span { left: auto; right: 6px; }  /* linha depois do meio: o rótulo vai para a esquerda e não sai do cartão */
/* histograma */
.gr-histo .gr-area { position: relative; height: 170px; margin-top: 46px; display: grid; grid-template-columns: repeat(10, 1fr);
  border-bottom: 1px solid var(--line-3); }
.gr-histo .gr-coluna { position: relative; border-radius: 6px 6px 0 0; }
.gr-histo .gr-coluna i { position: absolute; bottom: 0; left: 50%; width: min(24px, calc(100% - 6px)); height: var(--h);
  transform: translateX(-50%); background: var(--serie-1); border-radius: 4px 4px 0 0; }
.gr-histo .gr-coluna b { position: absolute; left: 0; right: 0; bottom: calc(var(--h) + 4px); text-align: center; color: var(--ink-2);
  font-weight: 600; }
.gr-histo .gr-ref { top: -44px; }  /* rótulo acima da faixa dos números das colunas */
@media (max-width: 520px) { .gr-histo .gr-eixo-x span:nth-child(even) { display: none; } }
/* barras horizontais: a coluna dos nomes tem largura fixa, e o fundo (grade e referência) se alinha a ela */
.gr-barras { --nome: min(45%, 220px); --folga: 40px; padding-top: 24px; }
.gr-barras .gr-fundo { position: absolute; top: 24px; bottom: 24px; left: calc(var(--nome) + 12px); right: var(--folga); pointer-events: none; }
.gr-fundo > i { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--line-2); }
.gr-fundo > i.base { border-color: var(--line-3); }
.gr-item { position: relative; display: grid; grid-template-columns: var(--nome) minmax(0, 1fr); gap: 12px; align-items: center;
  min-height: 34px; padding: 3px 0; border-radius: 6px; }
.gr-nome { min-width: 0; text-align: right; }
/* o nome do assunto quebra em até 2 linhas (entre palavras) em vez de sumir em "…" no meio: "Funções do 1º e do…" */
.gr-nome b, .gr-nome small { display: block; overflow: hidden; }
.gr-nome b { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.25; }
.gr-nome small { text-overflow: ellipsis; white-space: nowrap; }
.gr-nome b { color: var(--ink); font-weight: 600; font-size: 12.5px; }
.gr-nome small { font-size: 11.5px; }
.gr-trilho { position: relative; height: 16px; margin-right: var(--folga); }
.gr-trilho i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--serie-1); border-radius: 0 4px 4px 0; }
/* o valor passa por cima da linha de referência, com um respiro da cor do cartão para não ser cortado por ela */
.gr-trilho em { position: absolute; z-index: 2; top: 50%; transform: translateY(-50%); margin-left: 3px; padding: 0 3px;
  border-radius: 4px; background: var(--surface); font-style: normal; color: var(--ink-2); }
.gr-barras .gr-eixo-x { margin-left: calc(var(--nome) + 12px); margin-right: var(--folga); }
/* linhas prova a prova: o SVG estica com a caixa (vector-effect mantém o traço em 2px); pontos e rótulos são HTML */
.gr-legenda { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 14px; color: var(--ink-2); }
.gr-legenda span { display: inline-flex; align-items: center; gap: 6px; }
.gr-legenda i { width: 14px; height: 2px; border-radius: 2px; background: var(--serie-1); }
.gr-legenda i.s2 { background: var(--serie-2); }
.gr-legenda i.ref { height: 1px; background: var(--ink-2); opacity: .55; }
.gr-linha { --eixo-y: 40px; padding-top: 6px; }
.gr-linha .gr-corpo { position: relative; height: 190px; margin-left: var(--eixo-y); }
.gr-grade { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line-2); }
.gr-grade.base { border-color: var(--line-3); }
.gr-grade span { position: absolute; right: calc(100% + 8px); top: 0; transform: translateY(-50%); font-style: normal; }
.gr-ref-h { position: absolute; left: 0; right: 0; border-top: 1px solid var(--ink-2); opacity: .55; }
.gr-linha svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.gr-linha path { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.gr-linha path.s1 { stroke: var(--serie-1); }
.gr-linha path.s2 { stroke: var(--serie-2); }
.gr-alvo { position: absolute; top: 0; bottom: 0; }
.gr-linha .gr-alvo:hover, .gr-linha .gr-alvo:focus-visible { background: none; }
.gr-alvo::before { content: ""; position: absolute; top: 0; bottom: 0; left: var(--x); border-left: 1px solid var(--ink-2); opacity: 0; }
.gr-alvo:hover::before, .gr-alvo:focus-visible::before { opacity: .4; }
.gr-ponto { position: absolute; left: var(--x); width: 10px; height: 10px; margin: 0 0 -5px -5px; border-radius: 50%;
  background: var(--serie-1); box-shadow: 0 0 0 2px var(--surface); }
.gr-ponto.s2 { background: var(--serie-2); }
.gr-linha .gr-eixo-x { height: 48px; margin-left: var(--eixo-y); }
.gr-linha .gr-eixo-x .grupo { top: 17px; color: var(--ink-2); font-weight: 600; white-space: normal; text-align: center; }
/* dica (graficos.js) */
.dica { position: fixed; z-index: 80; pointer-events: none; background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: var(--sh-3); padding: 8px 11px; font-size: 13px; line-height: 1.4; min-width: 120px; max-width: 260px; }
.dica .dica-titulo { color: var(--muted); font-size: 12px; margin-bottom: 3px; }
.dica .dica-linha { display: flex; align-items: center; gap: 8px; }
.dica .dica-linha i { width: 12px; height: 2px; border-radius: 2px; flex-shrink: 0; }
.dica .dica-linha b { font-size: 14px; font-variant-numeric: tabular-nums; }
.dica .dica-linha span { color: var(--muted); }

/* ---------- entrada (login, cadastro, senha): a mesa e a folha de respostas ---------- */
/* A tela inteira é a mesa do professor (papel quadriculado) e o formulário é uma folha de respostas do Gabaritô, com
   os 4 marcadores pretos nos cantos, como a impressa (folha.py), e o visor da câmera em volta. A folha "se corrige"
   enquanto a pessoa preenche, só com CSS: visto de caneta em cada campo válido e o visor travando nos marcadores
   quando o formulário fica completo; no login, também a nota 10 no selo. Cores só por tokens: no tema escuro a folha
   é o negativo da impressa (papel escuro, marcadores claros). */
.entrada { --mesa: color-mix(in srgb, var(--line) 65%, transparent);
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh;
  background: radial-gradient(800px 560px at 76% 50%, color-mix(in srgb, var(--brand) 8%, transparent), transparent 70%),
    linear-gradient(var(--mesa) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, var(--mesa) 1px, transparent 1px) 0 0 / 28px 28px, var(--bg); }

/* apresentação: direto sobre a mesa, sem painel */
.entrada .vitrine { padding: clamp(24px, 5vh, 48px) clamp(28px, 4vw, 64px); display: flex; flex-direction: column; min-width: 0; }
.entrada .vitrine-topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.entrada .marca { padding: 0; color: var(--ink); }
.entrada .marca small { color: var(--muted); }
.entrada .tema-botao { color: var(--muted); }
.entrada .tema-botao:hover { background: var(--line-2); color: var(--ink); }
.entrada .vitrine h1 { font-size: clamp(30px, min(3.4vw, 5.6vh), 48px); line-height: 1.08; letter-spacing: -.035em; font-weight: 750;
  margin: clamp(18px, 5.5vh, 56px) 0 clamp(10px, 2vh, 18px); max-width: 620px; text-wrap: balance; }
/* marca-texto passado sobre a frase, como numa prova revisada */
.entrada .vitrine h1 em { font-style: normal; padding: 0 .06em; -webkit-box-decoration-break: clone; box-decoration-break: clone;
  background: linear-gradient(transparent 56%, var(--brand-100) 56%, var(--brand-100) 92%, transparent 92%); }
.entrada .vitrine p.lead { font-size: 16.5px; color: var(--ink-2); max-width: 540px; margin: 0 0 clamp(14px, 3vh, 28px); }

/* os benefícios como o gabarito de uma prova de 4 questões */
.gabarito-oficial { max-width: 560px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--sh-2); overflow: hidden; }
.gabarito-topo { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 16px;
  border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.gabarito-topo b { color: var(--ink); }
.gabarito-linhas { list-style: none; margin: 0; padding: 0; }
.gabarito-linhas li { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 14px; align-items: start;
  padding: clamp(8px, 1.5vh, 12px) 16px; }
.gabarito-linhas li + li { border-top: 1px dashed var(--line); }
.gabarito-n { font-family: var(--mono); font-size: 12px; color: var(--faint); padding-top: 2px; font-variant-numeric: tabular-nums; }
.gabarito-bolhas { display: flex; gap: 4px; }
.gabarito-bolhas i { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-3); color: var(--risco);
  font: 600 10px/17px var(--mono); font-style: normal; text-align: center; }
.gabarito-bolhas i.marcada { background: var(--brand); border-color: var(--brand); color: #fff;
  animation: marcar-bolha .45s cubic-bezier(.3, 1.6, .5, 1) backwards; }
.gabarito-linhas li:nth-child(1) i.marcada { animation-delay: .35s; }
.gabarito-linhas li:nth-child(2) i.marcada { animation-delay: .55s; }
.gabarito-linhas li:nth-child(3) i.marcada { animation-delay: .75s; }
.gabarito-linhas li:nth-child(4) i.marcada { animation-delay: .95s; }
@keyframes marcar-bolha { from { transform: scale(.3); background: transparent; color: transparent; } }
.gabarito-texto b { display: block; font-weight: 650; color: var(--ink); font-size: 14px; }
.gabarito-texto span { display: block; font-size: 13px; color: var(--muted); }
.entrada .rodape { margin-top: auto; padding-top: clamp(12px, 3vh, 32px); font-size: 12px; color: var(--muted); }
@media (max-height: 760px) and (min-width: 901px) { .gabarito-texto span { display: none; } }

/* a folha */
.entrada .formulario { display: grid; place-items: center;
  padding: 64px max(36px, env(safe-area-inset-right)) calc(56px + env(safe-area-inset-bottom)) max(36px, env(safe-area-inset-left)); }
.entrada .caixa { --m: 14px; --pos: 14px; position: relative; width: 100%; max-width: 440px; padding: 46px 40px 30px; border-radius: 3px;
  background: linear-gradient(var(--ink), var(--ink)) left var(--pos) top var(--pos) / var(--m) var(--m) no-repeat,
    linear-gradient(var(--ink), var(--ink)) right var(--pos) top var(--pos) / var(--m) var(--m) no-repeat,
    linear-gradient(var(--ink), var(--ink)) left var(--pos) bottom var(--pos) / var(--m) var(--m) no-repeat,
    linear-gradient(var(--ink), var(--ink)) right var(--pos) bottom var(--pos) / var(--m) var(--m) no-repeat, var(--surface);
  /* o maço de folhas embaixo desta */
  box-shadow: 0 0 0 1px var(--line), 6px 6px 0 -1px var(--surface), 6px 6px 0 0 var(--line), 12px 12px 0 -1px var(--surface),
    12px 12px 0 0 var(--line), 0 40px 60px -34px rgba(15, 23, 42, .45); }
/* visor da câmera: cantoneiras que se fecham sobre a folha quando ela está completa */
.entrada .caixa::before { content: ""; position: absolute; inset: -24px; pointer-events: none; color: var(--risco);
  --l: 28px; --w: 2px;
  background: linear-gradient(currentColor, currentColor) left top / var(--l) var(--w) no-repeat,
    linear-gradient(currentColor, currentColor) left top / var(--w) var(--l) no-repeat,
    linear-gradient(currentColor, currentColor) right top / var(--l) var(--w) no-repeat,
    linear-gradient(currentColor, currentColor) right top / var(--w) var(--l) no-repeat,
    linear-gradient(currentColor, currentColor) left bottom / var(--l) var(--w) no-repeat,
    linear-gradient(currentColor, currentColor) left bottom / var(--w) var(--l) no-repeat,
    linear-gradient(currentColor, currentColor) right bottom / var(--l) var(--w) no-repeat,
    linear-gradient(currentColor, currentColor) right bottom / var(--w) var(--l) no-repeat;
  transition: inset .5s cubic-bezier(.2, .9, .2, 1), color .3s; }
.entrada .caixa:has(form:valid label.campo)::before { inset: -14px; color: var(--brand); }
/* leitura ao enviar (login): uma faixa da câmera passa pela folha */
.entrada .caixa::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 64px; opacity: 0; pointer-events: none;
  background: linear-gradient(transparent, color-mix(in srgb, var(--brand) 18%, transparent) 80%, var(--brand) 100%); }
.entrada .caixa.lendo::after { animation: ler-folha 1.2s cubic-bezier(.45, 0, .55, 1) infinite; }
@keyframes ler-folha { 0% { top: 0; transform: translateY(-64px); opacity: 0; } 12%, 88% { opacity: 1; }
  100% { top: 100%; transform: translateY(-64px); opacity: 0; } }

.entrada .caixa h2 { font-size: 26px; letter-spacing: -.03em; margin: 0 0 6px; text-wrap: balance; }
.folha-topo { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; margin-bottom: 14px; }
.folha-tipo { display: block; font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--brand-600); margin-bottom: 4px; }
.folha-instrucao { font-size: 13px; color: var(--ink-2); margin: 0 0 16px; }
.folha-instrucao b { color: var(--ink); }
/* o selo do canto, como o MODELO da folha impressa: aqui a NOTA, escrita à caneta quando o login está completo */
.selo-nota { width: 64px; height: 64px; border: 1.5px solid var(--ink); border-radius: 8px; display: grid; justify-items: center;
  grid-template-rows: auto 1fr; padding-top: 5px; }
.selo-nota small { font-size: 8.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); line-height: 1; }
.selo-nota .caneta { width: 52px; align-self: center; fill: none; stroke: var(--brand); stroke-width: 3; stroke-linecap: round;
  stroke-linejoin: round; overflow: visible; visibility: hidden; }
.selo-nota .caneta path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .25s ease-in; }
.folha-acesso:has(#form-login:valid) .caneta { visibility: visible; }
.folha-acesso:has(#form-login:valid) .caneta path { stroke-dashoffset: 0; transition: stroke-dashoffset .3s ease-out .15s; }
.folha-acesso:has(#form-login:valid) .caneta path:nth-child(2) { transition-delay: .4s; }
.folha-acesso:has(#form-login:valid) .caneta path:nth-child(3) { transition: stroke-dashoffset .5s ease-out .7s; }

/* campos: as caixas com rótulo pequeno do topo da folha impressa, numeradas como questões */
.entrada .caixa form { counter-reset: questao; }
.entrada .caixa label.campo { position: relative; margin: 0; padding: 8px 14px 7px; border: 1px solid var(--field-line);
  background: var(--field); counter-increment: questao; font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); transition: border-color .12s, box-shadow .12s; }
.entrada .caixa label.campo::before { content: counter(questao, decimal-leading-zero); font-family: var(--mono); font-weight: 500;
  color: var(--faint); margin-right: 8px; }
.entrada .caixa label.campo + label.campo { margin-top: -1px; }
.entrada .caixa label.campo:not(label.campo + label.campo) { border-top-left-radius: var(--r-sm); border-top-right-radius: var(--r-sm); }
.entrada .caixa label.campo:not(:has(+ label.campo)) { border-bottom-left-radius: var(--r-sm); border-bottom-right-radius: var(--r-sm); margin-bottom: 14px; }
.entrada .caixa label.campo:focus-within { border-color: var(--brand); box-shadow: var(--foco); z-index: 1; }
/* 44 px de toque (WCAG 2.5.8) sem mudar o desenho: o padding cresce e a margem negativa devolve o espaço à caixa */
.entrada .caixa label.campo input { margin: -7px 0; padding: 10px 0; border: 0; border-radius: 0; background: transparent;
  box-shadow: none; font-size: 16px; font-weight: 450; letter-spacing: normal; text-transform: none; color: var(--ink); }
.entrada .caixa label.campo input:focus { box-shadow: none; }
.entrada .caixa label.campo input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px var(--field) inset; -webkit-text-fill-color: var(--ink); }
.entrada .caixa label.campo > .senha-campo { margin-top: 0; }
.entrada .caixa label.campo .senha-olho { width: 34px; height: 34px; right: -6px; }
.entrada .caixa label.campo .caps-aviso { text-transform: none; letter-spacing: normal; color: var(--brand-600); margin: 0 0 2px; }
.entrada .caixa label.campo .ajuda { display: block; text-transform: none; letter-spacing: normal; font-size: 12px; margin: 0 0 2px; }
/* o visto de caneta na margem, a cada campo obrigatório preenchido */
.entrada .caixa label.campo::after { content: ""; position: absolute; top: 50%; right: -31px; width: 20px; height: 20px; margin-top: -10px;
  background: var(--brand); clip-path: inset(0 100% 0 0); transition: clip-path .2s ease-in;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 13.5l5.5 5L21 4' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 13.5l5.5 5L21 4' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.entrada .caixa label.campo:has(input:required:valid)::after { clip-path: inset(0 0 0 0); transition: clip-path .35s ease-out; }

.entrada .caixa .btn.grande { width: 100%; }
.esqueci { display: block; width: max-content; margin: -4px 0 16px auto; font-size: 13px; }
.entrar .bolha { width: 15px; height: 15px; border-radius: 50%; border: 2px solid currentColor; flex: none;
  transition: background .2s, transform .2s; }
#form-login:valid .entrar .bolha { background: currentColor; transform: scale(1.1); }
.folha-convite { margin: 18px 0 0; font-size: 14px; }
.folha-convite a { display: inline-block; padding: 14px 8px; margin: -14px -8px; }  /* 44 px de toque, mesmo lugar */
/* plano do teste grátis (cadastro e cadastro com o Google) */
/* a outra opção de entrada: "ou" entre dois traços e o botão do Google, da largura do Entrar */
.ou { display: flex; align-items: center; gap: 12px; margin: 16px 0; font-family: var(--mono); font-size: 11px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.ou::before, .ou::after { content: ""; flex: 1; border-top: 1px dashed var(--line-3); }
.btn-google { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 48px;
  padding: 10px 16px; border: 1px solid var(--google-line); border-radius: 12px; background: var(--google-bg);
  color: var(--google-tx); font-size: 15px; font-weight: 500; text-decoration: none; transition: background .12s, box-shadow .12s; }
.btn-google:hover { background: var(--google-hover); text-decoration: none; }
.btn-google:focus-visible { outline: none; box-shadow: var(--foco); }
.btn-google svg { width: 20px; height: 20px; flex: none; }
/* cadastro com o Google: o e-mail confirmado pelo Google, fixo (não é campo) */
.conta-google { margin: 0 0 14px; padding: 10px 14px; border: 1px dashed var(--line-3); border-radius: var(--r-sm);
  background: var(--surface-2); overflow-wrap: anywhere; }
.conta-google small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 2px; }
.folha-rodape { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; padding-top: 12px;
  border-top: 1px solid var(--line-2); font-size: 12px; color: var(--muted); }
.folha-pagina { font-family: var(--mono); font-size: 11px; color: var(--faint); white-space: nowrap; }

/* visor (login): o estado da "câmera" acima da cantoneira */
.visor-hud { position: absolute; left: -24px; top: -50px; margin: 0; display: flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  transition: transform .5s cubic-bezier(.2, .9, .2, 1); }
.visor-hud::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); animation: pulso-visor 1.6s ease-in-out infinite; }
.visor-hud .hud-pronta, .visor-hud .hud-lendo { display: none; }
.folha-acesso:has(#form-login:valid) .visor-hud { transform: translate(10px, 10px); color: var(--brand-600); }
.folha-acesso:has(#form-login:valid) .visor-hud::before { background: var(--brand); animation: none; }
.folha-acesso:has(#form-login:valid) .hud-procura { display: none; }
.folha-acesso:has(#form-login:valid) .hud-pronta { display: inline; }
.folha-acesso.lendo .hud-procura, .folha-acesso.lendo .hud-pronta { display: none; }
.folha-acesso.lendo .hud-lendo { display: inline; }
.folha-acesso.lendo .visor-hud::before { animation: pulso-visor .5s ease-in-out infinite; }
@keyframes pulso-visor { 50% { opacity: .25; } }

@media (max-width: 900px) {
  .entrada { grid-template-columns: 1fr; align-content: start; }
  .entrada .vitrine { padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left)); }
  .entrada .vitrine h1 { font-size: clamp(24px, 6.4vw, 32px); margin: 18px 0 0; }
  .entrada .vitrine p.lead, .gabarito-oficial, .entrada .rodape { display: none; }
  .entrada .formulario { place-items: start center;
    padding: 56px max(20px, env(safe-area-inset-right)) calc(36px + env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); }
  .entrada .caixa { --m: 11px; --pos: 10px; padding: 38px 26px 22px;
    box-shadow: 0 0 0 1px var(--line), 5px 5px 0 -1px var(--surface), 5px 5px 0 0 var(--line), 0 30px 50px -30px rgba(15, 23, 42, .4); }
  .entrada .caixa::before { inset: -12px; --l: 20px; }
  .entrada .caixa:has(form:valid label.campo)::before { inset: -7px; }
  .entrada .caixa label.campo::after { right: -22px; width: 16px; height: 16px; margin-top: -8px; }
  .visor-hud { left: -12px; top: -34px; }
}
@media (prefers-reduced-motion: reduce) {
  .gabarito-bolhas i.marcada, .visor-hud::before, .entrada .caixa.lendo::after { animation: none; }
}

/* ---------- captura ---------- */
.botao-camera { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 28px 18px;
  border-radius: 18px; background: linear-gradient(135deg, var(--brand-btn), var(--brand-hover)); color: #fff; font-size: 19px; font-weight: 700;
  cursor: pointer; box-shadow: 0 16px 30px -16px rgba(232, 89, 12, .9); margin-bottom: 10px; }
.botao-camera .ic { width: 38px; height: 38px; stroke-width: 1.6; }
.botao-camera small { font-size: 13px; font-weight: 500; }
.qr-moldura { display: inline-block; padding: 14px; border-radius: 18px; background: #fff; border: 1px solid var(--line); box-shadow: var(--sh-2); }
.codigo-par { display: flex; gap: 6px; justify-content: center; margin: 16px 0; }
.codigo-par span { width: min(44px, 11vw); height: 56px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface-2);
  display: grid; place-items: center; font-size: 28px; font-weight: 750; font-variant-numeric: tabular-nums; }
.codigo-par span.sep { width: 8px; border: 0; background: none; }
.pedido { border: 1px solid var(--warn-line); background: var(--warn-50); border-radius: 12px; padding: 14px; margin-bottom: 10px; }
.pedido .cod { font-size: 26px; font-weight: 750; letter-spacing: .14em; font-variant-numeric: tabular-nums; }
.pulso { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); display: inline-block; box-shadow: 0 0 0 0 rgba(21, 128, 61, .5);
  animation: pulso 1.8s infinite; }
@keyframes pulso { 70% { box-shadow: 0 0 0 9px rgba(21, 128, 61, 0); } 100% { box-shadow: 0 0 0 0 rgba(21, 128, 61, 0); } }
@media (prefers-reduced-motion: reduce) { .pulso { animation: none; } * { transition: none !important; } }

/* ---------- telas pequenas ---------- */
@media (max-width: 640px) {
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpis > :last-child:nth-child(odd) { grid-column: 1 / -1; }  /* número ímpar de cartões: o último não fica sozinho pela metade */
  .kpi { padding: 12px; gap: 10px; flex-direction: column; }
  .kpi .ico { width: 28px; height: 28px; border-radius: 8px; }  /* empilhado sobre o número: menor, os números sobem */
  .kpi .ico .ic.g { width: 18px; height: 18px; }
  .kpi .valor { font-size: 22px; }
  .card { padding: 16px; }
  .pagina-topo { margin-bottom: 16px; }
  .pagina-topo h1 { font-size: 21px; }
  .pagina-topo .acoes { width: 100%; }
  /* a ação principal vem primeiro (no banco, '+ Objetiva' ficava na 5ª fileira de botões) */
  .pagina-topo .acoes > .btn:not(.sec):not(.fantasma) { order: -1; }
  .pagina-topo .acoes > .btn.principal { flex: 1 1 100%; }  /* a ação da tela ocupa a linha, ao alcance do polegar */
  .some-celular { display: none !important; }
  .filtros select { flex: 1 1 140px; }
  .filtros .btn { flex: 1 1 100%; }
  th, td { padding: 9px 8px; }
}

/* ---------- utilidades ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.centro { text-align: center; }
.dir { margin-left: auto; }
.nowrap { white-space: nowrap; }
.forte { font-weight: 650; }
@media print { .lateral, .barra-topo { display: none; } .app { display: block; } }

/* aviso de sessão prestes a expirar */
.dlg-sessao { border: 1px solid var(--line); border-radius: var(--r); padding: 22px 24px; max-width: 420px;
  width: calc(100% - 32px); background: var(--surface); color: var(--ink); box-shadow: 0 20px 50px rgba(15, 23, 42, .25); }
.dlg-sessao::backdrop { background: rgba(15, 23, 42, .45); }
.dlg-sessao h2 { margin: 0 0 8px; font-size: 18px; }
.dlg-sessao p { margin: 0 0 18px; color: var(--muted); }
/* confirmação antes de excluir/alterar (confirmar() em base.html) */
.dlg-confirmar h2 { margin-bottom: 18px; }
.dlg-confirmar h2:has(+ p:not([hidden])) { margin-bottom: 8px; }
/* no celular, os dois botões não cabem lado a lado com rótulos longos ("Desistir e receber o reembolso"): empilham
   na largura toda, com a ação em cima e o Cancelar embaixo, em vez de quebrar desalinhados */
@media (max-width: 480px) {
  .dlg-confirmar form > .linha { flex-direction: column-reverse; align-items: stretch; }
  .dlg-confirmar form > .linha .btn { width: 100%; }
}
/* compartilhar um cupom (/admin/cupons): a prévia é a própria imagem enviada, desenhada no navegador. A imagem tem as
   cores da marca nos dois temas (é o que chega ao WhatsApp); o resto do diálogo segue os tokens */
.dlg-cupom { max-width: 600px; max-height: calc(100dvh - 32px); overflow: auto; }
.dlg-cupom h2 { overflow-wrap: anywhere; }
.dlg-cupom #cupom-codigo { display: inline-block; font-family: var(--mono); color: var(--brand-600); }  /* não quebra no hífen */
.cupom-previa { position: relative; margin: 0 0 16px; aspect-ratio: 1200 / 630; border-radius: var(--r-sm);
  overflow: hidden; background: var(--brand-100); box-shadow: var(--sh-2); }
.cupom-previa img { display: block; width: 100%; height: 100%; }
.cupom-previa img:not([src]) { visibility: hidden; }
.cupom-previa::after { content: ""; position: absolute; inset: 0; pointer-events: none; transform: translateX(-110%);
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .5) 50%, transparent 65%); }
.dlg-cupom[open] .cupom-previa { animation: cupom-entra .32s cubic-bezier(.2, .8, .2, 1) both; }
.cupom-previa.pronta::after { animation: cupom-brilho .9s .1s ease-out both; }
@keyframes cupom-entra { from { opacity: 0; transform: translateY(8px) scale(.97); } }
@keyframes cupom-brilho { to { transform: translateX(110%); } }
@media (prefers-reduced-motion: reduce) {
  .dlg-cupom[open] .cupom-previa, .cupom-previa.pronta::after { animation: none; }
}
.dlg-cupom textarea { min-height: 104px; resize: vertical; }
.cupom-acoes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cupom-acoes .btn { min-height: 44px; }
.cupom-acoes .cheio { grid-column: 1 / -1; }
@media (max-width: 420px) { .cupom-acoes { grid-template-columns: 1fr; } }
/* dicas a cada acesso (dicas.py) */
.dlg-dicas { max-width: 460px; }
.dicas-topo { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.dicas-topo .ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0;
  background: var(--warn-50); color: var(--warn); }
.dicas-topo .sobre { flex: 1; font-size: 12.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.dicas-x { width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; color: var(--muted); font-size: 22px;
  line-height: 1; cursor: pointer; }
.dicas-x:hover { background: var(--line-2); color: var(--ink); }
.dlg-dicas .dica-item { min-height: 112px; }
.dlg-dicas .dica-item h2 { display: flex; align-items: center; gap: 8px; }
.dlg-dicas .dica-item h2 .ic { color: var(--brand); }
.dlg-dicas .dica-item p { margin: 0 0 10px; }
.dica-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; }
.dicas-rodape { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.dicas-parar { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.dlg-dicas .dicas-aviso { margin: 10px 0 0; font-size: 12.5px; }

/* aviso de cookies (primeira camada, LGPD): informa sem bloquear o uso da página */
.aviso-cookies { position: fixed; left: max(16px, env(safe-area-inset-left)); right: max(16px, env(safe-area-inset-right));
  bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 60; max-width: 760px; margin: 0 auto;
  display: flex; gap: 16px; align-items: center; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r); padding: 14px 18px; box-shadow: 0 12px 36px rgba(15, 23, 42, .18); }
.aviso-cookies p { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.aviso-cookies .btn { flex: none; }
/* no celular o aviso fica numa linha curta e a página ganha espaço embaixo, para ele não cobrir o botão principal */
@media (max-width: 560px) {
  .aviso-cookies { padding: 10px 14px; gap: 12px; align-items: center; }
  .aviso-cookies p { font-size: 12.5px; line-height: 1.4; }
  .cookies-longo { display: none; }
  body:has(#aviso-cookies) { padding-bottom: 96px; }
}
/* no computador o aviso tem até 3 linhas e cobria o botão de enviar das telas curtas (Importar questões); o fim do
   conteúdo sobe acima dele. A montagem (assistente) já calcula o espaço com a barra, que sobe junto com o aviso */
@media (min-width: 561px) { body:not(.assistente):has(#aviso-cookies) .conteudo { padding-bottom: 150px; } }
/* faixa do teste grátis: no celular, só os números e o link (a frase inteira ocupava 15% da primeira tela) */
.assinatura-curto { display: none; }
@media (max-width: 560px) { .aviso-assinatura:not(.fim-do-teste) .assinatura-longo { display: none; } .aviso-assinatura:not(.fim-do-teste) .assinatura-curto { display: inline; margin-left: 4px; font-weight: 600; } }
/* nos 3 últimos dias do teste, a faixa inteira (com o link "Assine" da frase) e em destaque, também no celular */
.aviso-assinatura.fim-do-teste { border-width: 1.5px; font-size: 14.5px; }
/* e-mail ainda não confirmado (cadastro que entra direto): a frase e, ao lado, Reenviar e Corrigir */
.aviso-confirmar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.aviso-confirmar b { overflow-wrap: anywhere; }
.aviso-confirmar-acoes { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.aviso-confirmar-acoes form { margin: 0; }
/* o portão do "Gerar PDFs" na montagem, enquanto o e-mail não é confirmado */
.portao-email { border: 1.5px solid var(--warn-line); background: var(--warn-50); border-radius: 12px; padding: 14px 16px; }
.portao-email h3 { margin: 0 0 6px; font-size: 16px; }
.portao-email .linha { gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.portao-email form { margin: 0; }
.politica { max-width: 820px; }
/* a prosa na medida de leitura (~75 letras: em Inter, 1ch vale uns 1,35 caractere médio, então 65ch dava ~88);
   as tabelas usam o cartão todo */
.politica > p, .politica > ul, .politica > div > p { max-width: 58ch; }
.politica h2 { margin-top: 28px; font-size: 17px; }
.politica td:first-child code { white-space: nowrap; }
/* com o menu aberto, o aviso não cobre o rodapé do menu; em telas baixas (celular deitado) ele fica mais compacto */
.menu-aberto .aviso-cookies { display: none; }
@media (max-height: 500px) {
  .aviso-cookies { padding: 10px 14px; gap: 12px; flex-direction: row; align-items: center; }
  .aviso-cookies p { font-size: 12.5px; line-height: 1.4; }
}

/* senha continua mascarada mesmo se o campo for trocado para type="text" (ver o vigia em base.html) */
input[data-senha] { -webkit-text-security: disc; }

/* olho "pressione e segure" nos campos de senha (script em base.html) */
.senha-campo { position: relative; display: block; }
label.campo > .senha-campo { margin-top: 6px; }
.senha-campo > input { display: block; width: 100%; padding-right: 46px; }
input.senha-visivel { -webkit-text-security: none; }
.senha-olho { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px;
  display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.senha-olho:hover { color: var(--ink); }
.senha-olho[aria-pressed="true"] { color: var(--brand); }
.senha-olho:focus-visible { outline: none; box-shadow: var(--foco); }
.senha-olho[hidden] { display: none; }
/* aviso de Caps Lock dos campos de senha (base.html): vazio, não ocupa espaço */
.caps-aviso { display: block; font-size: 12px; font-weight: 600; color: var(--warn); }
.caps-aviso:not(:empty) { margin-top: 4px; }
.caps-aviso:not(:empty)::before { content: "⇪ "; }

/* montagem da prova: etapas sempre à vista, banco recolhível dentro da etapa 1, seleção flutuante e próximo passo */
.card[id], details.banco { scroll-margin-top: 96px; }
@media (min-width: 961px) { .etapas-fixas { position: sticky; top: 8px; z-index: 15; box-shadow: var(--sh-2); } }
@media (max-width: 960px) { .card[id], details.banco { scroll-margin-top: calc(64px + env(safe-area-inset-top)); } }
details.banco { margin-top: 16px; border: 1px dashed var(--line); border-radius: 12px; background: var(--surface-2); }
details.banco[open] { background: var(--surface); border-style: solid; }
details.banco > summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px;
  padding: 14px 16px; border-radius: 12px; }
details.banco > summary::-webkit-details-marker { display: none; }
@media (hover: hover) { details.banco > summary:hover { background: var(--brand-50); } }
details.banco > summary:focus-visible { outline: none; box-shadow: var(--foco); }
.banco-titulo { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; color: var(--brand-600); }
.banco-corpo { padding: 0 16px 8px; }
.proximo { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between;
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-2); }
/* assistente: uma etapa por vez e a barra de ações fixa na base, com a ação principal da etapa */
[data-etapa][hidden] { display: none !important; }
.assistente .so-sem-js { display: none !important; }
body.assistente .conteudo { padding-bottom: calc(120px + env(safe-area-inset-bottom)); }
.etapa.aberta { background: var(--surface-2); border-radius: 10px; color: var(--ink); }
.barra-acoes { position: fixed; z-index: 40; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom));
  width: min(880px, calc(100% - 32px)); display: flex; align-items: center; gap: 10px 16px; justify-content: space-between;
  background: var(--navy); color: #fff; border: 1px solid var(--navy-line); border-radius: 14px; padding: 10px 10px 10px 18px; box-shadow: 0 16px 40px rgba(15, 23, 42, .35); }
@media (min-width: 961px) { .barra-acoes { left: calc(50% + var(--lateral) / 2); width: min(880px, calc(100% - var(--lateral) - 48px)); } }
.barra-acoes[hidden] { display: none; }
.ba-info { min-width: 0; line-height: 1.35; }
.ba-titulo { font-weight: 650; }
.ba-detalhe { color: #cbd5e1; }
.ba-botoes { display: flex; gap: 8px; flex: none; }
.ba-botoes .btn.sec { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .25); box-shadow: none; }
.ba-botoes .btn[hidden] { display: none; }
.ba-botoes .btn:disabled { opacity: .5; cursor: not-allowed; }
/* voltar: a mesma seta da marca, girada (antes, um '←' de texto em cada tela) */
#ba-voltar .ic, .volta .ic { transform: rotate(180deg); }
@media (max-width: 640px) {
  .barra-acoes { flex-direction: column; align-items: stretch; padding: 12px; gap: 10px; }
  .ba-info { text-align: center; font-size: 13.5px; }
  .ba-botoes .btn { flex: 1; justify-content: center; }
  .ba-botoes #ba-principal { flex: 2; }
  /* empilhada, a barra chega a 116 px (resumo em duas linhas e botões de 44 px): o fim da página não fica sob ela */
  body.assistente .conteudo { padding-bottom: calc(150px + env(safe-area-inset-bottom)); }
}
/* com JavaScript, a barra flutuante substitui o botão no fim da lista (sem JavaScript, ele continua lá) */
#form-banco.com-barra .passos-acao { position: static !important; }
#form-banco.com-barra .passos-acao > .btn { display: none; }

/* ---------- análise por proposição (objetivas no formato I, II, III) ---------- */
.proposicoes-erro { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 5px; font-size: 12.5px; }

/* figura do enunciado (vem do provedor de mídias por /midia/{id}) */
img.figura { display: block; max-height: 360px; margin: 8px auto; border-radius: 8px; background: #fff; border: 1px solid var(--line-2); }
img.figura.mini { display: block; max-width: 220px; max-height: 140px; margin: 6px 0; }
.previa-mermaid { background: #fff; border: 1px solid var(--line-2); border-radius: 8px; padding: 10px; margin-top: 8px; overflow: auto; max-height: 360px; }
.previa-mermaid svg { max-width: 100%; height: auto; }
.assercao p { margin: 4px 0; } .assercao .porque { font-weight: 700; letter-spacing: .08em; margin: 2px 0; }

/* importar prova: modelos para baixar e pedido para uma IA (pedido_ia.py) */
.modelos-baixar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.grid.quatro-ia { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.pedido-ia { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.pedido-ia textarea { font-family: var(--mono); font-size: 12.5px; }
.passos-ia { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0 0 12px; padding-left: 20px; color: var(--ink-2); }
/* diagrama Mermaid vindo de um YAML, ainda sem imagem (desenhado na montagem) */
.figura-pendente { display: block; margin: 8px 0; padding: 10px 12px; border: 1px dashed var(--warn); border-radius: 8px;
  background: var(--warn-50); color: var(--ink-2); font-family: var(--mono); font-size: 12px; white-space: pre-wrap; }
.figura-pendente::before { content: "Diagrama a desenhar"; display: block; margin-bottom: 4px; font-family: var(--fonte);
  font-weight: 600; color: var(--warn); }
.figura-pendente.mini { display: inline-block; margin: 0 0 0 6px; padding: 1px 8px; font-size: 11.5px; }
.figura-pendente.mini::before { content: none; }
.diagramas-pendentes .diag-erro textarea { font-family: var(--mono); font-size: 12.5px; }
/* editor de questões: arrastar ou colar a figura */
.zona-figura { margin: 4px 0 10px; padding: 14px; border: 1.5px dashed var(--line); border-radius: 10px; text-align: center;
  color: var(--muted); font-size: 13.5px; cursor: pointer; }
.zona-figura:focus, .zona-figura.sobre { outline: none; border-color: var(--brand); background: var(--brand-50); color: var(--ink-2); }

/* ---------- metas do período (painel da instituição) ---------- */
.metas { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.meta { display: grid; grid-template-rows: 1fr auto auto; align-items: end; gap: 6px; min-width: 0; }  /* a barra alinha na linha mesmo com título de duas linhas */
.meta > :first-child { align-self: start; }
.barra-meta { position: relative; height: 8px; border-radius: 999px; background: var(--line-2); }
.barra-meta i { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--muted); }
.barra-meta i.ok { background: var(--ok); } .barra-meta i.warn { background: var(--warn); } .barra-meta i.err { background: var(--err); }
.barra-meta b { position: absolute; top: -4px; width: 2px; height: 16px; margin-left: -1px; background: var(--ink); border-radius: 1px; }

/* ---------- transição entre páginas (Chrome/Edge 126+, Safari 18.2+; os outros ignoram) ---------- */
/* Trocar de tela vira uma transição curta: o menu fica parado (mesmo nome nas duas páginas) e só o conteúdo desliza. */
@view-transition { navigation: auto; }
.lateral { view-transition-name: menu; }
.conteudo { view-transition-name: conteudo; }
::view-transition-group(*) { animation-duration: .22s; }
::view-transition-old(conteudo) { animation: .14s ease-in both conteudo-sai; }
::view-transition-new(conteudo) { animation: .24s cubic-bezier(.2, .8, .2, 1) .06s both conteudo-entra; }
@keyframes conteudo-sai { to { opacity: 0; transform: translateY(-6px); } }
@keyframes conteudo-entra { from { opacity: 0; transform: translateY(12px); } }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

/* ---------- "Ir para" (Ctrl+K): base.html ---------- */
kbd { font-family: var(--mono); font-size: 11px; line-height: 1; padding: 3px 5px; border-radius: 5px; border: 1px solid var(--line);
  border-bottom-width: 2px; background: var(--surface); color: var(--muted); }
.nav-busca { display: flex; align-items: center; gap: 9px; width: 100%; margin: 0 0 14px; padding: 8px 10px; border-radius: 10px;
  border: 1px solid var(--navy-3); background: var(--navy-2); color: #94a3b8; font: inherit; font-size: 13.5px; cursor: pointer; text-align: left; }
.nav-busca:hover { color: #fff; border-color: #3a475d; }
.nav-busca kbd { margin-left: auto; background: transparent; border-color: var(--navy-3); color: #94a3b8; }
.busca-topo { background: none; border: 0; color: #cbd5e1; padding: 6px; margin-left: auto; cursor: pointer; display: grid; }
.busca-topo + .acao { margin-left: 4px; }
.dlg-busca { width: min(560px, calc(100vw - 32px)); margin: 12vh auto auto; padding: 0; border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface); color: var(--ink); box-shadow: var(--sh-3); overflow: hidden; }
.dlg-busca::backdrop { background: rgba(15, 23, 42, .45); backdrop-filter: blur(2px); }
.busca-campo { display: flex; align-items: center; gap: 10px; padding: 4px 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.busca-campo input { flex: 1; border: 0; background: none; box-shadow: none; padding: 14px 0; font-size: 17px; color: var(--ink); }
.busca-campo input:focus { box-shadow: none; }
.busca-campo input::-webkit-search-cancel-button { display: none; }
#busca-lista { list-style: none; margin: 0; padding: 6px; max-height: min(52vh, 420px); overflow-y: auto; }
#busca-lista li { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px; cursor: pointer; color: var(--ink-2); }
#busca-lista li small { margin-left: auto; color: var(--faint); font-size: 12px; white-space: nowrap; }
#busca-lista li[aria-selected="true"] { background: var(--brand-50); color: var(--ink); box-shadow: inset 3px 0 0 var(--brand); }
#busca-lista li[aria-selected="true"] .ic { color: var(--brand-600); }
#busca-lista .busca-nada { color: var(--muted); cursor: default; }
.busca-rodape { display: flex; gap: 16px; padding: 9px 16px; border-top: 1px solid var(--line-2); font-size: 12px; color: var(--muted); }
.busca-rodape kbd { margin-right: 3px; }
@media (hover: none) and (pointer: coarse) { .busca-rodape, .nav-busca kbd { display: none; } }

/* ---------- a linguagem da folha no resto do app ---------- */
/* tela vazia com título: uma folha em branco esperando as respostas (marcadores nos cantos, bolinhas por marcar) */
.vazio:has(> b) { position: relative; max-width: 460px; margin: 6px auto; padding: 38px 28px 26px; border: 1px dashed var(--line-3);
  border-radius: 6px; --m: 9px;
  background: linear-gradient(var(--line-3), var(--line-3)) left 10px top 10px / var(--m) var(--m) no-repeat,
    linear-gradient(var(--line-3), var(--line-3)) right 10px top 10px / var(--m) var(--m) no-repeat,
    linear-gradient(var(--line-3), var(--line-3)) left 10px bottom 10px / var(--m) var(--m) no-repeat,
    linear-gradient(var(--line-3), var(--line-3)) right 10px bottom 10px / var(--m) var(--m) no-repeat, var(--surface); }
.vazio:has(> b)::after { content: ""; display: block; width: 106px; height: 16px; margin: 14px auto 0;
  background: radial-gradient(circle, transparent 5.5px, var(--line-3) 6px 7.2px, transparent 7.7px) 0 50% / 22px 16px repeat-x; }
/* moldura de QR (conectar celular, 2FA, consulta de notas): as cantoneiras do visor da câmera, como no login */
.qr-moldura { position: relative; }
.qr-moldura::before { content: ""; position: absolute; inset: -12px; pointer-events: none; color: var(--brand); --l: 22px; --w: 2px;
  background: linear-gradient(currentColor, currentColor) left top / var(--l) var(--w) no-repeat,
    linear-gradient(currentColor, currentColor) left top / var(--w) var(--l) no-repeat,
    linear-gradient(currentColor, currentColor) right top / var(--l) var(--w) no-repeat,
    linear-gradient(currentColor, currentColor) right top / var(--w) var(--l) no-repeat,
    linear-gradient(currentColor, currentColor) left bottom / var(--l) var(--w) no-repeat,
    linear-gradient(currentColor, currentColor) left bottom / var(--w) var(--l) no-repeat,
    linear-gradient(currentColor, currentColor) right bottom / var(--l) var(--w) no-repeat,
    linear-gradient(currentColor, currentColor) right bottom / var(--w) var(--l) no-repeat;
  animation: visor-procura 2.4s ease-in-out infinite; }
@keyframes visor-procura { 50% { inset: -7px; } }
@media (prefers-reduced-motion: reduce) { .qr-moldura::before { animation: none; } }
/* progresso da correção em bolinhas: a barra vira 10 bolhas (10% cada) que vão sendo preenchidas, como na folha */
.barra.bolhas { height: 14px; border-radius: 0; background: var(--line-3); max-width: 300px;
  -webkit-mask: radial-gradient(circle at center, #000 6px, transparent 6.6px) 0 50% / 10% 100% repeat-x;
  mask: radial-gradient(circle at center, #000 6px, transparent 6.6px) 0 50% / 10% 100% repeat-x; }
.barra.bolhas > i { border-radius: 0; background: var(--brand); }

/* ---------- alvos de toque ---------- */
/* Na tela de toque, links soltos, "detalhes" e caixas de marcar ganham área de toque sem mudar o desenho: o
   preenchimento aumenta a área e a margem negativa devolve o espaço, então nada se mexe na página. */
@media (pointer: coarse) {
  details > summary { padding-block: 12px; margin-block: -6px; }
  .trilha a, td a:not(.btn), a.mut { display: inline-block; padding-block: 7px; margin-block: -7px; }
  .esqueci { padding-block: 7px; margin-top: -11px; margin-bottom: 9px; }
  label:not(.campo):not(.opcao):has(> input[type=checkbox], > input[type=radio]) { display: inline-flex; align-items: center; gap: 6px;
    min-height: 32px; }
  input[type=checkbox], input[type=radio] { width: 20px; height: 20px; }
  .alt .op a { display: inline-block; padding-block: 6px; }
}
/* correção das discursivas no celular: a barra estreita e o rótulo da questão em até duas linhas */
@media (max-width: 600px) {
  .disc-progresso { width: 84px !important; }
  .disc-acao { width: auto !important; }
  .disc-acao .mut { white-space: nowrap; }
}

/* ---------- navegação ---------- */
/* rodapé do menu: privacidade e LGPD, longe das telas do dia a dia */
.lateral-rodape { margin-top: auto; display: flex; flex-wrap: wrap; gap: 2px 14px; padding: 12px 12px 10px; font-size: 12px; }
.lateral-rodape a { color: #94a3b8; }
.lateral-rodape a:hover, .lateral-rodape a.on { color: #fff; text-decoration: none; }
.lateral-rodape + .lateral-base { margin-top: 0; }
/* índice das seções das telas longas: rola de lado no celular */
.indice { display: flex; gap: 6px; overflow-x: auto; margin: -4px 0 16px; padding: 2px 0 4px; scrollbar-width: none; }
.indice::-webkit-scrollbar { display: none; }
.indice a { flex: none; font-size: 13px; font-weight: 500; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 12px; white-space: nowrap; }
.indice a:hover { border-color: var(--line-3); color: var(--ink); text-decoration: none; }
section.card[id] { scroll-margin-top: 16px; }
/* na montagem, a barra de etapas fica fixa no topo (desktop): o título da seção aberta pela âncora não pode ficar sob ela */
@media (min-width: 961px) { body:has(.etapas-fixas) section.card[id], body:has(.etapas-fixas) .card[id] { scroll-margin-top: 104px; } }
@media (max-width: 960px) { section.card[id] { scroll-margin-top: 72px; } }
@media (pointer: coarse) { .indice a { padding-block: 9px; } .lateral-rodape a { padding-block: 6px; } }
.provas-filtro { margin-bottom: 12px; }
.provas-filtro input[type=search] { min-width: 0; flex: 3 1 260px; }
.provas-filtro select { flex: 1 1 150px; min-width: 0; }
.provas-nada { margin: 0 0 12px; }

/* importação com IA (questoes_importar.html, importacao_ia.html): a prova que o professor já tem vira questões */
.importar-ia { margin-bottom: 18px; background: linear-gradient(160deg, var(--surface) 55%, var(--brand-50)); }
.importar-ia-topo { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap;
  margin-bottom: 14px; }
.soltar-arquivo { position: relative; display: grid; justify-items: center; gap: 4px; padding: 22px 16px; text-align: center;
  border: 1.5px dashed var(--line-3); border-radius: var(--r); background: var(--field); cursor: pointer;
  transition: border-color .12s, background .12s; }
.soltar-arquivo:hover, .soltar-arquivo:focus-within { border-color: var(--brand); background: var(--surface); }
.soltar-arquivo input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.soltar-icone .ic { width: 26px; height: 26px; color: var(--brand); }
.soltar-nomes { font-size: 13px; overflow-wrap: anywhere; }
.importar-ia-recentes { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.importar-ia-recentes h3 { font-size: 13px; margin: 0 0 6px; }
.importar-ia-recentes ul { margin: 0; padding-left: 18px; font-size: 14px; }
.secao-titulo { font-size: 15px; margin: 6px 0 10px; color: var(--ink-2); }
.lendo-prova { text-align: center; padding: 34px 20px; }
.lendo-folha { position: relative; width: 74px; height: 96px; margin: 0 auto 14px; border: 1.5px solid var(--ink);
  border-radius: 6px; background: var(--surface); overflow: hidden; }
.lendo-folha span { display: block; height: 6px; margin: 12px 10px 0; border-radius: 3px; background: var(--line); }
.lendo-folha::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 26px;
  background: linear-gradient(transparent, color-mix(in srgb, var(--brand) 25%, transparent) 80%, var(--brand) 100%);
  animation: ler-folha 1.4s cubic-bezier(.45, 0, .55, 1) infinite; }
@media (prefers-reduced-motion: reduce) { .lendo-folha::after { animation: none; top: 40%; } }
.importacao-resumo { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.questao-importada { margin-top: 10px; padding: 14px 16px; }
.questao-importada header { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 6px; }
.questao-importada.fora { opacity: .7; }
.opcao-inline { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; }
.enunciado-importado { margin: 4px 0 8px; }
.alternativas-importadas { margin: 0 0 6px; padding-left: 22px; }
.alternativas-importadas li { margin: 2px 0; }
.alternativas-importadas li.correta { color: var(--ok); font-weight: 600; }
.importacao-acoes { position: sticky; bottom: 0; z-index: 2; margin-top: 12px; padding: 12px 0;
  background: var(--bg); border-top: 1px solid var(--line); }
/* os dois botões lado a lado (antes, empilhados e de largura total: 159 px da tela do celular só para a barra) */
.importacao-acoes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.importacao-acoes .btn { flex: 1 1 220px; white-space: normal; }
.importacao-acoes > .mut { flex-basis: 100%; }

/* habilidades (habilidades.html, questao_form.html, desempenho.html): BNCC e matriz da conta */
.habilidades-filtros select { flex: 1 1 170px; min-width: 0; }
.lista-habilidades { list-style: none; margin: 12px 0 0; padding: 0; }
.lista-habilidades li { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px 0;
  border-top: 1px solid var(--line-2); }
.copiar-codigo { font-family: var(--mono); font-size: 12.5px; font-weight: 600; padding: 4px 8px; border-radius: var(--r-xs);
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); cursor: pointer; text-align: left; }
.copiar-codigo:hover { border-color: var(--brand); }
.hab-desc { display: block; font-weight: 400; font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.hab-origem { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.celula-habilidade { min-width: 260px; max-width: 520px; }
.hab-escolhida { margin: -6px 0 14px; font-size: 13px; color: var(--ink-2); }
.hab-escolhida:empty { display: none; }
.fonte-bncc { font-size: 12px; margin: 14px 0 0; }
.matriz-envio { margin-top: 14px; }
@media (max-width: 560px) { .lista-habilidades li { grid-template-columns: 1fr; gap: 6px; }
  .lista-habilidades .copiar-codigo { justify-self: start; min-height: 32px; } }  /* esticado, parecia um campo vazio */

/* extensão do navegador (conta.html, extensao_codigo.html) */
.lista-extensoes { list-style: none; margin: 0 0 12px; padding: 0; }
.lista-extensoes li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0;
  border-top: 1px solid var(--line-2); }
.codigo-extensao .codigo { font-family: var(--mono); font-size: 34px; font-weight: 700; letter-spacing: .12em; margin: 0 0 8px;
  color: var(--ink); }

/* abas da área (plano B do menu, base.html): as telas de cada área, no topo da página; rolam de lado no celular */
.abas-area { display: flex; flex-wrap: wrap; gap: 4px; margin: -8px 0 20px; padding-bottom: 2px;
  border-bottom: 1px solid var(--line); }
@media (max-width: 960px) { .abas-area { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; } }
.abas-area a { display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; border-bottom: 2px solid transparent;
  margin-bottom: -3px; color: var(--muted); font-weight: 600; font-size: 14px; white-space: nowrap; border-radius: 8px 8px 0 0; }
.abas-area a:hover { color: var(--ink); background: var(--surface-2); text-decoration: none; }
.abas-area a.on { color: var(--ink); border-bottom-color: var(--brand); }
.abas-area .cont { font-size: 11px; background: var(--brand-btn); color: #fff; border-radius: 999px; padding: 0 6px; }

/* montagem (montar.html): a barra fixa mede quanto ocupa da base da tela (--barra-ocupa) e o fim do conteúdo e o "?"
   ficam acima dela, em qualquer altura (no celular ela tem duas linhas); conferência antes de gerar; kit da turma.
   Lixeira: aviso com "Desfazer" */
body.assistente .conteudo { padding-bottom: calc(var(--barra-ocupa, 120px) + 24px); }
body.assistente .suporte { bottom: calc(var(--barra-ocupa, 84px) + 10px); }
.conferencia ul { margin: 8px 0 0; padding: 0; list-style: none; }
.conferencia li { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; padding: 5px 0; }
.conferencia-acoes { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.conferencia-acoes form { margin: 0; }
.kit-turma { margin-top: 16px; }
.kit-turma b { font-size: 16px; }
.outros-arquivos > summary { cursor: pointer; font-weight: 600; }
.aviso-desfazer { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.aviso-desfazer form { margin: 0; }

/* ---------- "Nova questão" no banco (questoes.html): um botão e a lista de tipos ---------- */
/* no computador, a lista cai sob o botão, alinhada à direita; no celular, sobe de baixo como folha */
.nova-questao { position: relative; }
.nova-questao > summary { display: flex; margin-block: 0; }  /* é um botão: não entra na margem negativa dos alvos de toque */
.nova-questao > summary::before { content: none; }
.nova-questao > summary::after { content: ""; width: 6px; height: 6px; margin: -3px 1px 0 3px; border: solid currentColor;
  border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .15s; }
.nova-questao[open] > summary::after { margin-top: 3px; transform: rotate(225deg); }
.nova-questao[open] > summary { background: var(--brand-hover); }
.nova-fundo { display: none; }
.nova-lista { position: absolute; z-index: 30; right: 0; top: calc(100% + 6px); width: 340px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 16px 40px rgba(15, 23, 42, .18);
  animation: nova-cai .16s cubic-bezier(.2, .8, .2, 1); }
.nova-cab { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px 4px;
  font-size: 12.5px; font-weight: 600; color: var(--muted); }
.nova-cab .btn { display: none; }
.nova-lista ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.nova-tipo { display: grid; gap: 1px; min-height: 44px; padding: 8px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.nova-tipo b { font-size: 14px; font-weight: 600; }
.nova-tipo span { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.nova-tipo:hover, .nova-tipo:focus-visible { background: var(--surface-2); text-decoration: none; }
.nova-tipo:focus { outline: none; }
.nova-tipo:focus-visible { box-shadow: inset 0 0 0 2px var(--brand-600); }
/* a objetiva, a mais comum, vem primeiro e com o tom da marca */
.nova-tipo.destaque { background: var(--brand-50); }
.nova-tipo.destaque b { color: var(--brand-600); }
.nova-tipo.destaque:hover, .nova-tipo.destaque:focus-visible { background: var(--brand-100); }
.nova-sep { height: 1px; margin: 4px 10px; background: var(--line); }
@keyframes nova-cai { from { opacity: 0; transform: translateY(-4px); } }
@keyframes nova-sobe { from { transform: translateY(100%); } }
@keyframes nova-escurece { from { opacity: 0; } }
@media (max-width: 640px) {
  .pagina-topo .acoes > .nova-questao { order: -1; flex: 1 1 100%; }
  .nova-questao > summary { width: 100%; }
  /* a transição entre páginas faz do conteúdo uma camada própria, abaixo da barra do topo: com a folha aberta ela
     sai, para o fundo escurecido cobrir também a barra */
  body:has(.nova-questao[open]) .conteudo { view-transition-name: none; }
  .nova-fundo { display: block; position: fixed; inset: 0; z-index: 70; background: rgba(15, 23, 42, .45);
    animation: nova-escurece .2s ease-out; }
  .nova-lista { position: fixed; z-index: 71; left: 0; right: 0; top: auto; bottom: 0; width: auto;
    padding: 8px 12px calc(14px + env(safe-area-inset-bottom)); border: 0; border-radius: 18px 18px 0 0;
    box-shadow: 0 -12px 40px rgba(15, 23, 42, .25); animation: nova-sobe .26s cubic-bezier(.2, .8, .2, 1); }
  .nova-lista::before { content: ""; display: block; width: 36px; height: 4px; margin: 2px auto 6px; border-radius: 2px; background: var(--line-3); }
  .nova-cab { padding: 2px 8px 8px; font-size: 15px; color: var(--ink); }
  .nova-cab .btn { display: inline-flex; }
  .nova-cab .btn[hidden] { display: none; }
  .nova-tipo { min-height: 56px; padding: 10px 12px; }
  .nova-tipo b { font-size: 15.5px; }
  .nova-tipo span { font-size: 13.5px; }
}
@media (prefers-reduced-motion: reduce) { .nova-lista, .nova-fundo { animation: none; } }
/* sem JavaScript o fundo não fecha a folha: o botão fica acima dele, e tocar nele de novo fecha */
@media (max-width: 640px) and (scripting: none) { .nova-questao[open] > summary { position: relative; z-index: 72; } }

/* menu de ações de uma linha (painel: ⋯ de cada prova). Um details: abre e fecha sem JavaScript e pelo teclado; o
   alvo de toque tem 44 px; no celular a lista abre como folha no rodapé, ao alcance do polegar */
th.acoes-col, td.acoes-col { width: 48px; text-align: right; padding-left: 0; }
.menu-linha { position: relative; display: inline-block; }
.menu-linha > summary { list-style: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 10px; cursor: pointer; font-size: 22px; line-height: 1; color: var(--muted); }
.menu-linha > summary::-webkit-details-marker { display: none; }
.menu-linha > summary::before { content: none; }  /* sem a seta dos outros details: o ⋯ já é o botão */
.menu-linha > summary { padding-block: 0; margin-block: 0; }
.menu-linha > summary:hover, .menu-linha[open] > summary { background: var(--line-2); color: var(--ink); }
.menu-linha-itens { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 180px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 10px 28px rgba(0, 0, 0, .14); text-align: left; }
.menu-linha-itens a, .menu-linha-itens button { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 8px; background: none; color: var(--ink); font: inherit; text-decoration: none; cursor: pointer; }
.menu-linha-itens a:hover, .menu-linha-itens button:hover { background: var(--line-2); }
.menu-linha-itens form { margin: 0; }
.menu-linha-itens .perigo { color: var(--err); }
@media (max-width: 560px) {
  /* a coluna do ⋯ cabe sem a tabela rolar para o lado: a situação abre mão da largura mínima do computador */
  td.sit-col { min-width: 0 !important; }
  th.acoes-col, td.acoes-col { width: 40px; padding-right: 4px; }
  .menu-linha[open] > .menu-linha-itens { position: fixed; left: 12px; right: 12px; top: auto; bottom: calc(12px + env(safe-area-inset-bottom)); min-width: 0; padding: 8px; }
}

/* valor da prova (montagem): o campo e as duas formas de dividir numa linha; no celular, empilham com alvos de 44 px */
.valor-prova { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2, var(--surface)); }
.valor-prova .valor-campo { margin: 0; }
.valor-prova .valor-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.valor-prova .valor-ajuda { flex-basis: 100%; margin: 0; font-size: 13px; }
@media (max-width: 560px) { .valor-prova .valor-acoes { width: 100%; } .valor-prova .valor-acoes .btn { flex: 1; min-height: 44px; } }

/* Minha conta: aparelhos conectados, um por linha; no celular, o botão desce para baixo do texto */
.lista-aparelhos { list-style: none; margin: 0 0 12px; padding: 0; }
.lista-aparelhos li { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line); }
.lista-aparelhos li:first-child { border-top: 0; }
.lista-aparelhos form { margin: 0; }
.riscos-senha { margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--warn-line, var(--line)); border-radius: 10px; background: var(--warn-50, transparent); }
.riscos-senha > summary { font-weight: 600; }
.riscos-senha ul { margin: 8px 0; padding-left: 18px; }
.riscos-senha li { margin: 4px 0; }

/* Lixeira › Questões: o resumo do enunciado e as ações; no celular, as ações descem para baixo do texto */
.lixeira-questoes { list-style: none; margin: 0; padding: 0; }
.lixeira-questoes li { display: flex; gap: 10px 14px; justify-content: space-between; align-items: center; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--line); }
.lixeira-questoes li:first-child { border-top: 0; }
.lixeira-questoes .lq-texto { flex: 1 1 320px; min-width: 0; }
.lixeira-questoes .lq-resumo { margin: 4px 0 2px; overflow-wrap: anywhere; }
.lixeira-questoes .lq-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.lixeira-questoes form { margin: 0; }

/* ---------- lista de provas do painel (inicio.html) ---------- */
/* a linha inteira abre a prova (o link estica por cima dela); o ⋯ fica acima do link */
.provas-lista tbody tr { position: relative; }
.prova-abrir { color: var(--ink); }
.prova-abrir::after { content: ""; position: absolute; inset: 0; }
.prova-abrir:hover { text-decoration: none; }
.provas-lista tbody tr:hover .prova-abrir { color: var(--brand-600); }
.provas-lista .menu-linha { position: relative; z-index: 1; }
.provas-lista .sit-col { min-width: 190px; }
@media (max-width: 640px) {
  /* no celular, cada prova vira um cartão: nome e média em cima, leitura das folhas embaixo, numa barra */
  .provas-lista, .provas-lista tbody { display: block; }
  .provas-lista thead { display: none; }
  .provas-lista tr { display: grid; grid-template-columns: 1fr auto 44px; grid-template-areas: "prova media acoes" "sit sit sit";
    align-items: center; column-gap: 10px; padding: 12px 4px 12px 14px; border-bottom: 1px solid var(--line-2); }
  .provas-lista tr:last-child { border-bottom: 0; }
  .provas-lista tbody tr:hover { background: var(--row-hover); }
  .provas-lista td { display: block; padding: 0; border: 0; }
  .provas-lista tbody tr:hover td { background: none; }
  .provas-lista .prova-col { grid-area: prova; min-width: 0; }
  .provas-lista .media-col { grid-area: media; }
  .provas-lista .media-col b { font-size: 17px; }
  .provas-lista .acoes-col { grid-area: acoes; }
  .provas-lista .sit-col { grid-area: sit; min-width: 0; margin: 10px 10px 0 0; }
  .provas-lista .sit-col .linha { flex-direction: column; align-items: stretch; gap: 6px !important; }
  .provas-lista .anel { width: 100%; height: 6px; border-radius: 999px;
    background: linear-gradient(to right, var(--ok) calc(var(--p) * 1%), var(--line-2) 0); }
  .provas-lista .anel::after { display: none; }
  .provas-lista .sit-col br { display: none; }
  .provas-lista .sit-col br + .nowrap::before { content: " · "; }
  /* indicadores do painel (data-compacto): uma linha por cartão (ícone ao lado do número); o detalhe fica para o computador */
  .kpis[data-compacto] .kpi { flex-direction: row; align-items: center; padding: 10px 12px; }
  .kpis[data-compacto] .kpi .extra { display: none; }
  .kpis[data-compacto] .kpi .valor { font-size: 20px; }
}

/* ---------- filtros recolhidos e tabelas longas (base.html) ---------- */
/* o botão "Filtros (n)" só existe com JavaScript e só aparece no celular; no computador os seletores ficam sempre à vista */
.filtros-botao { display: none; }
.filtros-botao .cont { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--brand-btn); color: #fff;
  font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
.ver-todos { display: flex; width: 100%; margin-top: 10px; }
@media (max-width: 640px) {
  .filtros-botao { display: inline-flex; flex: none; }
  form.filtros[data-recolher] input[type=search] { min-width: 0; flex: 1 1 140px; }
  form.filtros.recolhido > select, form.filtros.recolhido > label, form.filtros.recolhido > button:not(.filtros-botao) { display: none; }
}
/* imagem que não carregou (base.html): some e dá lugar a um aviso com o texto alternativo */
img[data-falhou] { display: none !important; }
.img-falha { display: flex; align-items: center; justify-content: center; min-height: 64px; padding: 12px 14px; text-align: center;
  border: 1px dashed var(--line-3); border-radius: var(--r-sm); background: var(--surface-2); color: var(--muted); font-size: 13px; }
