@import url("https://fonts.googleapis.com/css2?family=Raleway:wght@400;600;700;800&display=swap");

:root {
  --blue: #1a40ff;
  --blue-dark: #0828c7;
  --yellow: #ffcc00;
  --red: #e00000;
  --ink: #1e1e1e;
  --muted: #5d6270;
  --surface: #eef2ff;
  --line: #d8def5;
  /* WCAG 1.4.11: a borda que identifica um campo ou uma opção tem 3:1 com o fundo branco e com o --surface. */
  --borda-controle: #7f89b0;
  --borda-controle-hover: #4f5a85;
  /* WCAG 1.4.3: o placeholder tem 4,5:1 com o fundo branco. */
  --placeholder: #6a7083;
  --white: #ffffff;
  --green: #08783f;
  /* Contêiner único: todas as telas usam a mesma largura e as mesmas margens laterais. */
  --container: 1440px;
  --gutter: clamp(20px, 4vw, 64px);
  --gap: clamp(16px, 1.6vw, 24px);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 64, .05), 0 1px 3px rgba(16, 24, 64, .06);
  --shadow-md: 0 10px 28px -8px rgba(16, 24, 64, .16), 0 4px 10px -4px rgba(16, 24, 64, .08);
  --shadow-lg: 0 24px 60px -12px rgba(16, 24, 64, .25);
  --ring: 0 0 0 4px rgba(26, 64, 255, .14);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --rapido: .16s;
  --medio: .26s;
  font-family: "Raleway", sans-serif;
  font-variant-numeric: lining-nums;
  color: var(--ink);
  background: var(--white);
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: #fbfcff; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled, .btn[aria-disabled="true"] { cursor: not-allowed; opacity: .45; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
/* No fundo azul, o contorno azul some (1:1): lá ele é amarelo (4,31:1). */
.section-title :focus-visible, .projection-header :focus-visible, .quiz-head :focus-visible { outline-color: var(--yellow); }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: white; padding: 10px 16px; border-radius: 0 0 10px 10px; font-weight: 800; text-decoration: none; }
.skip-link:focus { top: 0; }
/* O cabeçalho e o selo de privacidade ficam fixos: a rolagem até o conteúdo ou até o foco deixa folga para eles não
   cobrirem o que ganhou o foco. */
html { scroll-padding-top: 130px; scroll-padding-bottom: 80px; }
#conteudo:focus { outline: none; }
.skip-link:focus-visible { outline: 3px solid var(--yellow); outline-offset: 0; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3, strong { font-weight: 800; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.full { width: 100%; }

.btn { min-height: 44px; border: 2px solid transparent; border-radius: 999px; padding: 10px 22px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 14px; font-weight: 800; letter-spacing: .01em; line-height: 1.2; white-space: nowrap; cursor: pointer; transition: background-color var(--rapido) var(--ease), border-color var(--rapido) var(--ease), color var(--rapido) var(--ease), box-shadow var(--medio) var(--ease), transform var(--rapido) var(--ease); }
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0) scale(.98); }
.btn-primary { background: var(--blue); color: white; box-shadow: 0 1px 2px rgba(26, 64, 255, .25); }
.btn-primary:hover:not(:disabled) { background: var(--blue-dark); box-shadow: 0 10px 22px -8px rgba(26, 64, 255, .55); }
.btn-secondary { background: white; border-color: var(--blue); color: var(--blue); }
.btn-secondary:hover:not(:disabled) { background: var(--surface); box-shadow: 0 8px 18px -10px rgba(26, 64, 255, .45); }
.btn-yellow { background: var(--yellow); color: var(--ink); border-color: var(--ink); }
.btn-yellow:hover:not(:disabled) { box-shadow: 4px 4px 0 var(--ink); }
.btn-danger { background: var(--red); color: white; }
.btn-danger:hover:not(:disabled) { background: #b80000; box-shadow: 0 10px 22px -8px rgba(224, 0, 0, .5); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: transparent; }
.btn-ghost:hover:not(:disabled) { background: #e2e8ff; }
.btn-sm { min-height: 36px; padding: 6px 16px; font-size: 13px; }
.icon-cheio { fill: currentColor; stroke: none; }
.icon-button { border: 0; background: var(--surface); width: 38px; height: 38px; border-radius: 50%; font-size: 22px; line-height: 1; display: grid; place-items: center; color: var(--ink); transition: background-color var(--rapido) var(--ease), transform var(--rapido) var(--ease); }
.icon-button:hover { background: #e2e8ff; transform: rotate(90deg); }

header:has(> .header) { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .88); backdrop-filter: saturate(1.6) blur(12px); -webkit-backdrop-filter: saturate(1.6) blur(12px); border-bottom: 1px solid var(--line); }
.header { height: 72px; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { transition: opacity var(--rapido) var(--ease); }
.brand:hover { opacity: .82; }
.brand, .login-brand { border: 0; background: transparent; display: flex; align-items: center; gap: 12px; color: var(--ink); text-align: left; padding: 0; text-decoration: none; }
/* Logotipo: nome em cima, descritor embaixo. O "ó" de Laboratório é um robozinho: cabeça branca de cantos arredondados com contorno fino, orelhinhas
   dos lados e um visor azul arredondado com olhinhos e sorriso, e o acento agudo virou a antena, com a ponta amarela. Ela pisca de
   vez em quando; os olhos acompanham o mouse (marca.js) e, com o mouse na marca, a antena balança. */
.brand strong, .login-brand strong { display: block; font-size: 20px; font-weight: 800; letter-spacing: -.025em; line-height: 1; color: var(--ink); }
.brand small, .login-brand small { display: block; font-size: 11px; font-weight: 600; margin-top: .42em; letter-spacing: .005em; line-height: 1; color: var(--muted); white-space: nowrap; }
.marca-ia { display: inline-block; width: 1.1em; height: 1.24em; margin: 0 -.02em 0 .01em; vertical-align: -.07em; overflow: visible; }
.marca-ia-aro { fill: #fff; stroke: var(--ink); stroke-width: .38; }
.marca-ia-orelha { fill: #8fa2ff; stroke: var(--ink); stroke-width: .38; }
.marca-ia-cabeca { fill: var(--blue); }
.marca-ia-sorriso { fill: none; stroke: #fff; stroke-width: .7; stroke-linecap: round; }
.marca-ia-antena { stroke: var(--ink); stroke-width: 1.5; stroke-linecap: round; fill: none; }
.marca-ia-ponta { fill: var(--yellow); stroke: var(--ink); stroke-width: .6; }
.marca-ia-olhos { fill: #fff; transform-box: fill-box; transform-origin: center; animation: marca-ia-piscar 4.5s infinite; }
.marca-ia-antena-grupo { transform-box: fill-box; transform-origin: 0% 100%; }
.brand:hover .marca-ia-antena-grupo, .login-hero-marca:hover .marca-ia-antena-grupo, .login-hero-marca:focus-visible .marca-ia-antena-grupo { animation: marca-ia-antena .7s var(--ease); }
.marca-ia-olhar { transition: translate .15s linear; }
@keyframes marca-ia-piscar { 0%, 94%, 100% { scale: 1 1; } 97% { scale: 1 .12; } }
@keyframes marca-ia-antena { 0%, 100% { rotate: 0deg; } 30% { rotate: 14deg; } 60% { rotate: -9deg; } 80% { rotate: 4deg; } }
@media (prefers-reduced-motion: reduce) { .marca-ia-olhos, .marca-ia-antena-grupo { animation: none !important; } .marca-ia-olhar { transition: none; } }
.brand-mark { position: relative; width: 37px; height: 37px; border-radius: 50%; background: var(--blue); display: block; overflow: hidden; flex: 0 0 auto; }
.brand-mark:before { content: ""; position: absolute; width: 17px; height: 17px; border-radius: 50%; background: var(--yellow); top: 4px; right: 3px; }
.brand-mark span { position: absolute; width: 22px; height: 16px; background: var(--red); bottom: -4px; left: -3px; transform: rotate(26deg); }
.profile-chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* Menu da conta: avatar, e-mail e perfis na barra; identificação completa e Sair no menu. */
.user-menu { position: relative; }
.user-menu > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 5px 10px 5px 5px; border: 1px solid transparent; border-radius: 999px; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.user-menu > summary::-webkit-details-marker { display: none; }
.user-menu > summary:hover, .user-menu[open] > summary { background: var(--surface); border-color: var(--line); }
.user-identity { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.user-email { font-size: 13px; font-weight: 800; color: var(--ink); max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-roles { font-size: 11px; font-weight: 700; color: var(--muted); max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chevron { width: 16px; height: 16px; color: var(--muted); transition: transform .15s ease; }
.user-menu[open] .user-chevron { transform: rotate(180deg); }
.user-menu[open] .user-menu-panel { animation: surgir var(--medio) var(--ease); transform-origin: top right; }
@keyframes surgir { from { opacity: 0; transform: translateY(-6px) scale(.97); } to { opacity: 1; transform: none; } }
.user-menu-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; width: 290px; background: white; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 45px rgba(16,24,64,.16); padding: 8px; }
.user-menu-head { display: flex; align-items: center; gap: 12px; padding: 12px 10px; }
.user-menu-head > div { min-width: 0; }
.user-menu-label { margin: 0 0 4px; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.user-menu-email { margin: 0; font-size: 13px; font-weight: 800; overflow-wrap: anywhere; }
.user-menu-section { padding: 12px 10px; border-top: 1px solid var(--line); }
.logout-form { margin: 0; padding-top: 6px; border-top: 1px solid var(--line); }
.user-menu-item { transition: background-color var(--rapido) var(--ease); width: 100%; display: flex; align-items: center; gap: 10px; border: 0; border-radius: 10px; background: transparent; padding: 11px 10px; font-size: 13px; font-weight: 800; color: #9c0000; text-align: left; }
.user-menu-item:hover { background: #fff0f0; }
.user-menu-item .icon { width: 18px; height: 18px; }
.demo-label { font-size: 12px; color: var(--muted); font-weight: 700; }
select, input, textarea { border: 1.5px solid var(--borda-controle); border-radius: var(--radius-sm); background: white; color: var(--ink); min-height: 46px; padding: 10px 14px; transition: border-color var(--rapido) var(--ease), box-shadow var(--rapido) var(--ease), background-color var(--rapido) var(--ease); }
select:hover:not(:disabled), input:hover:not(:disabled):not([type="range"]), textarea:hover:not(:disabled) { border-color: var(--borda-controle-hover); }
select:focus, input:focus:not([type="range"]), textarea:focus { outline: 2px solid transparent; border-color: var(--blue); box-shadow: var(--ring); }
input:disabled, select:disabled, textarea:disabled { background: #f4f6fb; color: #8a90a0; cursor: not-allowed; }
::placeholder { color: var(--placeholder); opacity: 1; }
.header select { border-radius: 999px; font-weight: 700; padding-right: 34px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: white; font-weight: 800; font-size: 14px; flex: 0 0 auto; }
.avatar-lg { width: 44px; height: 44px; font-size: 17px; }
.security-notice { min-height: 32px; padding: 6px var(--gutter); text-align: center; background: var(--yellow); display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 12px; font-weight: 800; }
.security-notice span, .access-note span { width: 17px; height: 17px; border: 2px solid currentColor; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11px; }

.page { max-width: var(--container); margin: 0 auto; padding: clamp(28px, 3.5vw, 48px) var(--gutter) 80px; animation: entrar var(--medio) var(--ease) both; }
@keyframes entrar { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.eyebrow { color: var(--blue); font-size: 12px; line-height: 1.3; font-weight: 800; letter-spacing: .12em; margin-bottom: 10px; }
.welcome-row, .step-heading { display: flex; justify-content: space-between; align-items: center; gap: 30px; margin-bottom: 40px; }
.welcome-row h1, .step-heading h1 { font-size: clamp(32px, 3vw, 44px); line-height: 1.05; margin-bottom: 10px; }
.welcome-row p:last-child, .step-heading p:last-child { color: var(--muted); margin-bottom: 0; }
.hint-note { color: var(--muted); }
.hero-action { min-height: 62px; padding-inline: 30px; font-size: 17px; box-shadow: 8px 8px 0 var(--yellow); }
.section-title { background: var(--blue); color: white; min-height: 54px; border-radius: var(--radius) var(--radius) 0 0; padding: 9px 20px 9px 10px; display: flex; align-items: center; justify-content: space-between; margin-top: 40px; }
.section-title-main { display: flex; align-items: center; gap: 12px; }
.section-title-main > span:first-child { width: 36px; flex: 0 0 auto; height: 36px; border-radius: 50%; background: var(--yellow); color: var(--ink); display: grid; place-items: center; font-weight: 800; }
.section-title h2 { font-size: 19px; margin: 0; letter-spacing: -.01em; }
.text-link { border: 0; background: transparent; color: white; display: flex; gap: 5px; font-size: 13px; font-weight: 700; align-items: center; }
.text-link .icon { width: 16px; }
.scenario-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--gap); margin-top: 20px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: white; padding: clamp(20px, 1.8vw, 26px); box-shadow: var(--shadow-sm); }
.scenario-grid .card { position: relative; overflow: hidden; display: flex; flex-direction: column; transition: transform var(--medio) var(--ease), box-shadow var(--medio) var(--ease), border-color var(--medio) var(--ease); }
.scenario-grid .card:has(a.btn):hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #b9c6ff; }
.scenario-grid .card .btn { margin-top: auto; align-self: flex-start; }
.scenario-grid .card > :not(a.btn) { position: relative; z-index: 1; }
.scenario-grid .card > p:last-child { margin-bottom: 0; }
/* O cartão inteiro leva ao destino do botão: área de clique maior, sem mudar o link. */
.scenario-grid .card a.btn::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.scenario-grid .card:hover .card-top .subject-tag { background: #e2e8ff; }
.scenario-grid .card::before { transition: transform .5s var(--ease); }
.scenario-grid .card:hover::before { transform: scale(1.25); }
.scenario-grid .card::before { content: ""; width: 90px; height: 90px; border-radius: 50%; border: 17px solid var(--surface); position: absolute; right: -45px; bottom: -48px; }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 20px; }
.subject-tag { background: var(--surface); color: var(--blue-dark); border-radius: 999px; padding: 6px 12px; font-size: 12px; font-weight: 800; display: inline-block; transition: background-color var(--rapido) var(--ease); }
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 6px 10px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.badge-positive { background: #e1f6e9; color: #075d33; }
.badge-pending { background: var(--yellow); color: var(--ink); }
.badge-danger { background: #ffe2e2; color: #9c0000; }
.badge-neutral { background: #e8e8eb; color: #45454c; }
.badge-ai { background: var(--blue); color: white; }
.scenario-grid h3 { font-size: 20px; margin-bottom: 8px; }
.scenario-grid p { color: var(--muted); font-size: 14px; line-height: 1.55; margin-bottom: 22px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 20px; }
.meta span { background: #f3f5fc; border: 1px solid #e7ebf8; border-radius: 8px; padding: 5px 9px; font-size: 12px; font-weight: 700; color: #3b4152; }
.scenario-grid .card a.btn::after { z-index: 1; }
.table-card { padding: 0; margin-top: 0; overflow: hidden; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 16px 20px; text-align: left; border-bottom: 1px solid var(--line); }
th { white-space: nowrap; background: var(--surface); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background-color var(--rapido) var(--ease); }
tbody tr:hover { background: #f8f9ff; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: var(--gap); margin-top: 20px; }
.stats-grid p { color: var(--muted); margin-bottom: 8px; }
.stats-grid strong { display: block; font-size: 36px; color: var(--blue); }
.stats-grid small { color: var(--muted); }

/* ---------- Login ----------
   À esquerda, a turma numa moldura arredondada; à direita, o formulário sobre fundo claro com as formas da marca.
   A interação (formas do fundo acompanhando o mouse, olho da senha)
   vem do login.js; sem JavaScript ou com movimento reduzido, a tela fica estática e completa. */
.login-page { --mx: 0; --my: 0; --escala: max(15px, 1.15vw); min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); overflow-x: clip; background: #fbfcff; }

.login-hero { --respiro: max(16px, .85vw); padding: var(--respiro) 0 var(--respiro) var(--respiro); }
.login-moldura { position: sticky; top: var(--respiro); height: calc(100vh - 2 * var(--respiro)); min-height: 560px; border-radius: max(28px, 1.5vw); overflow: hidden; isolation: isolate; background: #3d8bf0; color: var(--white); box-shadow: 0 24px 60px -24px rgba(8, 40, 199, .55); }
.login-moldura > img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 78%; }
/* As ilustrações se revezam (login.js): só a que tem .ativa aparece, com 1,6 s de transição entre elas. */
.login-moldura > .login-ilustracao { opacity: 0; transition: opacity 1.6s ease-in-out; }
.login-moldura > .login-ilustracao.ativa { opacity: 1; }
/* Na cena do Santos Dumont o que importa está no alto (a tela com a simulação e o professor), então o corte puxa para cima. */
.login-moldura > .login-ilustracao-alto { object-position: 50% 32%; }
/* As bolinhas pitiquinhas embaixo, numa pílula de vidro; a da imagem atual se alonga. */
.login-bolinhas { position: absolute; left: 50%; bottom: max(16px, 1.4vw); z-index: 1; translate: -50% 0; display: flex; gap: 2px; padding: 4px 6px; border-radius: 999px; background: rgba(5, 22, 90, .28); backdrop-filter: blur(8px); }
.login-bolinhas[hidden] { display: none; }
.login-bolinhas button { width: 22px; height: 22px; padding: 0; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; border-radius: 999px; }
.login-bolinhas button::before { content: ""; width: 7px; height: 7px; border-radius: 999px; background: rgba(255, 255, 255, .55); transition: width .35s var(--ease), background-color .35s var(--ease); }
.login-bolinhas button:hover::before { background: rgba(255, 255, 255, .85); }
.login-bolinhas button[aria-pressed="true"] { width: 30px; }
.login-bolinhas button[aria-pressed="true"]::before { width: 18px; background: var(--white, #fff); }
.login-bolinhas button:focus-visible { outline: 2px solid var(--white, #fff); outline-offset: 1px; }
@media (prefers-reduced-motion: reduce) { .login-moldura > .login-ilustracao, .login-bolinhas button::before { transition: none; } }
/* Esfumado leve: as bordas da ilustração escurecem de leve em direção ao centro, para dar profundidade. */
.login-moldura::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit; background: radial-gradient(ellipse 85% 80% at 50% 55%, transparent 55%, rgba(5, 22, 90, .28) 100%); box-shadow: inset 0 0 3vw rgba(5, 22, 90, .18); }
/* A marca no canto da ilustração, numa pílula de vidro claro que se lê sobre qualquer parte do céu. Fechada,
   mostra só a bolinha; com o mouse em cima (ou o foco do teclado), a pílula abre e o nome aparece. */
.login-hero-marca { position: absolute; top: max(16px, 1.4vw); left: max(16px, 1.4vw); z-index: 1; font-size: var(--escala); gap: 0; padding: .5em; border-radius: 999px; background: rgba(255, 255, 255, .88); border: 1px solid rgba(255, 255, 255, .8); box-shadow: 0 12px 30px -14px rgba(3, 12, 70, .55); backdrop-filter: blur(12px) saturate(1.4); cursor: default; animation: entrar .6s var(--ease) both; }
/* A abertura é como desenrolar: a bolinha gira uma volta inteira, como uma roda, enquanto o nome vai saindo de
   trás dela; ao fechar, ela gira de volta e enrola o nome. */
.login-hero-marca { transition: gap .55s var(--ease), padding .55s var(--ease); }
.login-hero-marca .brand-mark { transition: rotate .55s var(--ease); }
.login-hero-marca-texto { max-width: 0; overflow: hidden; white-space: nowrap; opacity: 0; translate: -1.5em 0; transition: max-width .55s var(--ease), opacity .25s var(--ease), translate .55s var(--ease); }
.login-hero-marca:hover, .login-hero-marca:focus-visible { gap: .75em; padding-right: 1.25em; }
.login-hero-marca:hover .brand-mark, .login-hero-marca:focus-visible .brand-mark { rotate: 360deg; }
.login-hero-marca:hover .login-hero-marca-texto, .login-hero-marca:focus-visible .login-hero-marca-texto { max-width: 18em; opacity: 1; translate: 0 0; transition: max-width .55s var(--ease), opacity .4s .1s var(--ease), translate .55s var(--ease); }
.login-hero-marca:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .login-hero-marca, .login-hero-marca .brand-mark, .login-hero-marca-texto { transition: none; } .login-hero-marca:hover .brand-mark, .login-hero-marca:focus-visible .brand-mark { rotate: none; } }
.login-hero-marca strong { font-size: 1.1em; }
.login-hero-marca small { font-size: .6875em; }
.login-hero-marca .brand-mark { width: 2.3em; height: 2.3em; }
.login-hero-marca .brand-mark::before { width: 1.06em; height: 1.06em; top: .25em; right: .19em; }
.login-hero-marca .brand-mark span { width: 1.375em; height: 1em; bottom: -.25em; left: -.19em; }

/* Robô: fora da tela por enquanto (o markup está comentado em login.html). Parado no céu, flutuando de leve;
   só os olhos acompanham o mouse (login.js). */
.robo { position: absolute; left: 62%; top: 9%; width: clamp(96px, 15vh, 160px); z-index: 1; pointer-events: none; }
.robo-corpo { position: relative; animation: robo-flutuar 3.6s ease-in-out infinite; }
.robo-corpo > img { display: block; width: 100%; height: auto; filter: drop-shadow(0 18px 18px rgba(3, 12, 70, .35)); }
.robo-rosto { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.robo-rosto [data-robo-olhar] { transition: transform .12s linear; }
.robo-olhos-abertos { fill: #7ff4ff; transform-box: fill-box; transform-origin: center; animation: robo-piscar 4.2s infinite; transition: opacity .2s var(--ease); }
.robo-reflexo { fill: #fff; }
.robo-olhos-felizes, .robo-boca { fill: none; stroke: #7ff4ff; stroke-width: 26; stroke-linecap: round; }
.robo-olhos-felizes { opacity: 0; transition: opacity .2s var(--ease); }
.robo-bochechas { fill: none; stroke: #ff7ad9; stroke-width: 10; stroke-linecap: round; opacity: .9; }
/* Sem o mouse por perto (ou quando o cursor encosta nele), o robô fica com os olhinhos fechados de alegria. */
.robo.feliz .robo-olhos-abertos { opacity: 0; }
.robo.feliz .robo-olhos-felizes { opacity: 1; }
@keyframes robo-flutuar { 0%, 100% { translate: 0 0; } 50% { translate: 0 -7px; } }
@keyframes robo-piscar { 0%, 92%, 100% { scale: 1 1; } 95% { scale: 1 .1; } }
/* Lado do formulário. Tudo aqui é medido em em a partir de --escala, que é uma fração da largura da tela, sem
   teto. Com Ctrl − a largura em CSS aumenta na mesma proporção em que o zoom diminui, então o formulário mantém
   o tamanho na tela, igual à ilustração. O piso de 15px só vale em janelas estreitas, para a leitura. */
.login-lado { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; padding: max(28px, 3.4vw) max(24px, 5vw); }
.login-form-area { flex: 1; display: grid; place-items: center; padding: 2em 0; font-size: var(--escala); }
.login-form { width: min(27em, 100%); font-size: var(--escala); animation: entrar .6s .08s var(--ease) both; }
.login-cabecalho { margin-bottom: 2.5em; }
.login-form h1 { font-size: 2.2em; line-height: 1.1; letter-spacing: -.02em; text-transform: uppercase; text-align: center; margin: 0 0 .4em; }
.login-subtitulo { color: var(--muted); line-height: 1.55; text-align: center; margin: 0; }
.login-form form label { font-size: .8125em; font-weight: 700; color: #3a3f4d; margin: 1.35em 0 .55em; }
.login-form form > label:first-child { margin-top: 0; }

.campo { position: relative; }
.campo input { font: inherit; font-size: 1em; min-height: 3.25em; padding: 0 1em 0 2.9em; border-radius: .7em; background: #fff; border-color: var(--borda-controle); }
.campo input::placeholder { color: var(--placeholder); }
.campo input[name="senha"]::placeholder { letter-spacing: .12em; }
.campo svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.campo-icone { position: absolute; left: .95em; top: 50%; translate: 0 -50%; width: 1.25em; height: 1.25em; color: #8b92a6; pointer-events: none; transition: color var(--rapido) var(--ease), scale var(--medio) var(--ease); }
.campo:focus-within .campo-icone { color: var(--blue); scale: 1.1; }
.campo-ok { position: absolute; right: .875em; top: 50%; translate: 0 -50%; width: 1.375em; height: 1.375em; color: var(--green); pointer-events: none; opacity: 0; scale: .4; transition: opacity var(--medio) var(--ease), scale var(--medio) cubic-bezier(.34, 1.56, .64, 1); }
.campo.valido .campo-ok { opacity: 1; scale: 1; }
.campo.valido input { padding-right: 2.75em; }
.campo input[name="senha"] { padding-right: 3.25em; }
.campo-olho { position: absolute; right: .375em; top: 50%; translate: 0 -50%; width: 2.5em; height: 2.5em; min-height: 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #6b7287; display: grid; place-items: center; cursor: pointer; transition: background-color var(--rapido) var(--ease), color var(--rapido) var(--ease); }
.campo-olho:hover { background: var(--surface); color: var(--blue); }
/* O olho só aparece depois que a pessoa começa a digitar a senha (campo sem o placeholder à mostra). */
.campo-olho { transition: background-color var(--rapido) var(--ease), color var(--rapido) var(--ease), opacity var(--medio) var(--ease), scale var(--medio) var(--ease), visibility var(--medio); }
.campo input:placeholder-shown ~ .campo-olho { opacity: 0; scale: .6; visibility: hidden; }
.campo-olho:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.campo-olho svg { width: 1.25em; height: 1.25em; grid-area: 1 / 1; transition: opacity var(--rapido) var(--ease), scale var(--medio) var(--ease); }
.campo-olho .olho-fechado, .campo-olho[aria-pressed="true"] .olho-aberto { opacity: 0; scale: .6; }
.campo-olho[aria-pressed="true"] .olho-fechado { opacity: 1; scale: 1; }
.campo-dica { display: flex; align-items: center; gap: .45em; margin: .65em 0 0; font-size: .78em; font-weight: 700; color: #7a5c00; animation: entrar var(--medio) var(--ease); }
.campo-dica[hidden] { display: none; }
.campo-dica svg { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }

.login-entrar { position: relative; width: 100%; min-height: 3.47em; margin-top: 1.75em; padding: 0 1.5em; gap: .55em; font-size: .9375em; overflow: hidden; }
.login-entrar svg { width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: translate var(--medio) var(--ease); }
.login-entrar:hover .entrar-seta { translate: .25em 0; }
/* Brilho que atravessa o botão ao passar o mouse. */
.login-entrar::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%); translate: -100% 0; transition: translate .7s var(--ease); pointer-events: none; }
.login-entrar:hover::after { translate: 100% 0; }
.entrar-girando { display: none; width: 1.2em; height: 1.2em; border-radius: 50%; border: .16em solid rgba(255, 255, 255, .35); border-top-color: var(--white); animation: girar .7s linear infinite; }
.login-entrar.carregando { pointer-events: none; background: var(--blue-dark); }
.login-entrar.carregando .entrar-seta { display: none; }
.login-entrar.carregando .entrar-girando { display: inline-block; }
@keyframes girar { to { rotate: 360deg; } }

/* Avisos (erro, sessão expirada, saída) e a nota de acesso, na mesma escala do formulário. */
.login-form .login-erro, .login-form .login-aviso, .login-form .success-notice { font-size: .8125em; padding: .85em 1em; gap: .7em; margin: 0 0 1.1em; border-radius: .77em; }
.login-form .login-erro > span, .login-form .login-aviso > span, .login-form .success-notice > span { width: 1.77em; height: 1.77em; }
.login-erro { display: flex; align-items: center; background: #fff0f0; border: 1px solid #f3b4b4; color: #9c0000; font-weight: 700; }
.login-erro > span { border-radius: 50%; background: var(--red); color: var(--white); display: grid; place-items: center; font-weight: 800; flex: 0 0 auto; }
.com-erro .login-form form { animation: tremer .5s .55s var(--ease) both; }
@keyframes tremer { 0%, 100% { translate: 0 0; } 20% { translate: -8px 0; } 40% { translate: 7px 0; } 60% { translate: -5px 0; } 80% { translate: 3px 0; } }
.login-form .access-note { font-size: .75em; gap: .6em; margin-top: 2em; }
.login-form .access-note span { width: 1.4em; height: 1.4em; font-size: .9em; }

/* Formas da marca no fundo do lado do formulário. Duas camadas de movimento que não se atrapalham: o mouse
   desloca cada forma em profundidades diferentes (translate, com a unidade em vw para não encolher com o zoom)
   e, por conta própria, cada uma flutua no seu ritmo (transform, na animação). */
.login-formas { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.login-formas span { position: absolute; transition: translate 1.2s cubic-bezier(.2, .8, .2, 1); animation: forma-flutuar 7s ease-in-out infinite; }
.login-formas span:nth-child(1) { right: max(-90px, -4.7vw); bottom: max(-90px, -4.7vw); width: max(240px, 12.5vw); height: max(240px, 12.5vw); border-radius: 50%; background: var(--yellow); translate: calc(var(--mx) * 3.4vw) calc(var(--my) * 3.4vw); animation-duration: 9s; }
.login-formas span:nth-child(2) { right: -1px; top: 16%; width: max(56px, 2.9vw); height: max(112px, 5.8vw); border-radius: 999px 0 0 999px; background: var(--red); translate: 0 calc(var(--my) * 3vw); animation-name: forma-deslizar; animation-duration: 6s; animation-delay: -2s; }
.login-formas span:nth-child(3) { right: 12%; top: 7%; width: max(54px, 2.8vw); height: max(54px, 2.8vw); border-radius: 50%; border: max(9px, .47vw) solid var(--yellow); translate: calc(var(--mx) * -4.6vw) calc(var(--my) * -3.8vw); animation-name: forma-respirar; animation-duration: 5s; }
.login-formas span:nth-child(4) { left: 8%; bottom: 9%; width: max(18px, .94vw); height: max(18px, .94vw); border-radius: 50%; background: var(--blue); translate: calc(var(--mx) * 5.4vw) calc(var(--my) * 4.2vw); animation-duration: 4.5s; animation-delay: -1.5s; }
@keyframes forma-flutuar { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(.6vw, -1.6vw); } }
@keyframes forma-deslizar { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(2.2vw); } }
@keyframes forma-respirar { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-.8vw, 1vw) scale(1.18); } }
@media (prefers-reduced-motion: reduce) { .login-formas span { animation: none; translate: none; } }

/* Janela estreita: a ilustração vira uma faixa no alto e o formulário vem logo abaixo. */
@media (max-width: 960px) {
  .login-page { --escala: 15px; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .login-hero { padding: 12px 12px 0; }
  .login-moldura { position: relative; top: 0; height: clamp(240px, 50vw, 400px); min-height: 0; border-radius: 22px; }
  .login-moldura > img { object-position: 50% 62%; }
  .login-moldura > .login-ilustracao-alto { object-position: 50% 38%; }
  .login-lado { padding: 36px 20px 40px; }
  .login-form-area { padding: 0; place-items: start center; }
  .login-hero-marca { top: 10px; left: 10px; font-size: 13px; }
  .login-formas span:nth-child(1) { width: 160px; height: 160px; right: -70px; bottom: -70px; }
  .login-formas span:nth-child(3) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .com-erro .login-form form { animation: none; }
}
form label, .modal-body > label, .form-grid label, .quiz-panel label { display: block; font-size: 13px; font-weight: 800; margin: 16px 0 7px; }
form input, .modal-body textarea { width: 100%; }
.access-note { display: flex; justify-content: center; align-items: center; gap: 7px; margin: 24px 0 0; font-size: 12px; color: var(--muted); }

.back-link { border: 0; padding: 6px 0; background: transparent; color: var(--blue); font-size: 14px; font-weight: 800; margin-bottom: 24px; display: inline-flex; align-items: center; gap: 8px; }
.back-link::before { content: ""; width: 7px; height: 7px; border-left: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(45deg); transition: transform var(--rapido) var(--ease); }
.back-link:hover::before { transform: translateX(-3px) rotate(45deg); }
.back-link:hover { color: var(--blue-dark); }
.field-error { color: #b00000; font-weight: 800; font-size: 13px; margin: 0 0 7px; }
.success-notice { animation: entrar var(--medio) var(--ease); background: #e1f6e9; border: 1px solid #99d9b3; border-radius: 10px; padding: 11px 13px; margin-bottom: 14px; display: flex; align-items: center; gap: 9px; color: #075d33; font-weight: 700; font-size: 13px; }
.success-notice > span:first-child { width: 23px; height: 23px; border-radius: 50%; background: var(--green); color: white; display: grid; place-items: center; font-weight: 800; flex: 0 0 auto; }
.login-aviso { background: #fff8d9; border: 1px solid var(--yellow); border-radius: 10px; padding: 11px 13px; margin-bottom: 14px; display: flex; align-items: center; gap: 9px; color: #574500; font-weight: 700; font-size: 13px; }
.login-aviso > span { width: 23px; height: 23px; border: 2px solid currentColor; border-radius: 50%; display: grid; place-items: center; font-weight: 800; flex: 0 0 auto; }


/* ---- Administração e formulários (#21), com as medidas do protótipo ---- */
.library-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 28px; }
.library-heading h1 { font-size: clamp(32px, 3vw, 44px); margin-bottom: 8px; }
.library-heading p:last-child { color: var(--muted); margin: 0; }
a.back-link { display: inline-flex; text-decoration: none; }
a.btn { text-decoration: none; }
.table-actions { display: flex; gap: 7px; align-items: center; }
.table-wrap form { margin: 0; }
.table-wrap form .btn { margin-top: 0; }

.admin-tabs { display: grid; grid-template-columns: repeat(5, 1fr); background: var(--surface); padding: 5px; border-radius: 14px; margin-bottom: 25px; }
.admin-tabs a { border-radius: 10px; padding: 12px; color: var(--muted); font-weight: 800; text-align: center; text-decoration: none; transition: background-color var(--rapido) var(--ease), color var(--rapido) var(--ease), box-shadow var(--rapido) var(--ease); }
.admin-tabs a:hover:not(.active) { color: var(--ink); background: rgba(255, 255, 255, .6); }
.admin-tabs a.active { background: white; color: var(--blue); box-shadow: 0 2px 10px rgba(14,34,130,.1); }
.admin-section-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 15px; }
.admin-section-head h2 { font-size: 23px; margin-bottom: 5px; }
.admin-section-head p { color: var(--muted); font-size: 13px; margin: 0; }
.admin-users td > strong, .admin-users td > small { display: block; }
.admin-users td > small { color: var(--muted); margin-top: 4px; }

/* Estes rótulos ficam dentro de um form, então desfazem o espaçamento geral de "form label". */
.role-options { display: flex; flex-wrap: wrap; gap: 6px; }
.role-options label { position: relative; display: flex; align-items: center; gap: 5px; margin: 0; border: 1px solid var(--borda-controle); border-radius: 999px; padding: 5px 10px; font-size: 11px; white-space: nowrap; transition: background-color var(--rapido) var(--ease), border-color var(--rapido) var(--ease); font-weight: 800; cursor: pointer; }
.role-options input, .profile-selector input, .period-options input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.role-options label > span { color: transparent; }
.role-options label:has(input:checked) { background: var(--surface); border-color: var(--blue); color: var(--blue); }
.role-options input:checked + span { color: var(--blue); }
.role-options label:has(input:focus-visible), .profile-selector > label:has(input:focus-visible), .period-options label:has(input:focus-visible) { outline: 3px solid var(--blue); outline-offset: 2px; }
.user-status { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; }
.user-status i { width: 9px; height: 9px; border-radius: 50%; background: #888; }
.user-status.active i { background: var(--green); }

.no-students-note { display: flex; align-items: center; gap: 8px; background: var(--yellow); padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; font-size: 12px; font-weight: 700; }
.no-students-note > span { width: 21px; height: 21px; border: 2px solid currentColor; border-radius: 50%; display: grid; place-items: center; font-weight: 800; flex: 0 0 auto; }
.no-students-note.prominent { align-items: flex-start; margin-bottom: 18px; }
.no-students-note.prominent p { margin: 3px 0 0; font-size: 11px; }

.parameter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.parameter-grid label { display: block; font-size: 12px; font-weight: 800; margin: 0 0 7px; }
.parameter-grid input { width: 100%; }
.parameter-grid small { display: block; color: var(--muted); margin-top: 7px; }
.parameter-title { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.parameter-title > span { width: 42px; height: 42px; border-radius: 50%; background: var(--yellow); display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: 0 0 auto; }
.parameter-title h3 { margin: 0 0 4px; font-size: 17px; }
.parameter-title p { margin: 0; color: var(--muted); font-size: 11px; }
.parameter-save { display: flex; justify-content: flex-end; align-items: center; gap: 14px; margin-top: 17px; }
.parameter-save .btn { margin-top: 0; }
.saved-label { color: var(--green); font-size: 12px; font-weight: 800; }

.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; align-items: start; }
.complete-form { padding: 0; overflow: hidden; }
.complete-form .section-title { margin-top: 0; border-radius: 0; }
.complete-form .section-title:not(:first-child) { margin-top: 8px; }
.form-content { padding: 22px; }
.form-content > label, .form-content .form-grid label, .period-field legend { display: block; font-size: 12px; font-weight: 800; margin: 0 0 7px; padding: 0; }
.form-content > input, .form-content > select, .form-content .form-grid input, .form-content .form-grid select { width: 100%; }
.form-content > input + label, .form-content > small + label { margin-top: 16px; }
.form-content .form-grid { margin: 0 0 18px; }
.form-content > input + .form-grid { margin-top: 18px; }
.form-content small { display: block; color: var(--muted); margin-top: 5px; }
.period-field { border: 0; margin: 0; padding: 0; min-width: 0; }
.field-description { color: var(--muted); font-size: 12px; margin-bottom: 12px; }
.field-help { font-size: 11px; color: var(--red); margin: 7px 0 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.profile-selector { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.profile-selector > label { position: relative; margin: 0; border: 2px solid var(--borda-controle); border-radius: 12px; padding: 13px; cursor: pointer; }
.profile-selector > label > span { width: 22px; height: 22px; border: 2px solid var(--line); border-radius: 6px; display: grid; place-items: center; color: transparent; margin-bottom: 10px; }
.profile-selector > label:has(input:checked) { border-color: var(--blue); background: #f8f9ff; }
.profile-selector > label:has(input:checked) > span { border-color: var(--blue); background: var(--blue); color: white; }
.profile-selector strong, .profile-selector small { display: block; }
.profile-selector strong { font-size: 12px; }
.profile-selector small { font-size: 10px; line-height: 1.4; margin-top: 0; }

.period-options { display: flex; gap: 9px; }
.period-options label { position: relative; margin: 0; border: 2px solid var(--borda-controle); border-radius: 999px; padding: 9px 17px; font-size: 12px; font-weight: 800; cursor: pointer; display: flex; align-items: center; gap: 7px; }
.period-options label > span { width: 14px; height: 14px; border: 2px solid var(--borda-controle); border-radius: 50%; }
.period-options label:has(input:checked) { border-color: var(--blue); color: var(--blue); background: var(--surface); }
.period-options label:has(input:checked) > span { border: 4px solid var(--blue); }

.form-summary { border: 1px solid var(--line); border-radius: 16px; padding: 19px; position: sticky; top: 18px; }
.form-summary h3 { font-size: 17px; }
.form-summary dl { margin: 0; }
.form-summary dl > div { border-bottom: 1px solid var(--line); padding: 11px 0; }
.form-summary dt { color: var(--muted); font-size: 10px; font-weight: 700; }
.form-summary dd { margin: 4px 0 0; font-size: 12px; font-weight: 700; line-height: 1.5; overflow-wrap: anywhere; }
.form-summary .btn { margin-top: 15px; }

.end-page { max-width: 850px; margin: 0 auto; text-align: center; padding: 46px 30px 70px; }
.success-mark { width: 58px; height: 58px; border-radius: 50%; background: var(--blue); color: white; display: grid; place-items: center; margin: 0 auto 15px; box-shadow: 7px 7px 0 var(--yellow); }
.success-mark .icon { width: 30px; height: 30px; stroke-width: 3; }
.end-page > h1 { font-size: 40px; margin-bottom: 7px; }
.end-page > p:not(.eyebrow) { color: var(--muted); }
.end-page > .btn { margin-top: 25px; }
.summary-card { margin-top: 25px; text-align: left; }
.summary-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.summary-head h2 { font-size: 21px; margin: 12px 0 5px; }
.summary-head p { color: var(--muted); font-size: 13px; margin: 0; }

/* Cenários (RF-05, RF-06): editor em etapas, lista do autor e avisos, como no protótipo. */
.step-pill { padding: 8px 12px; border-radius: 999px; background: var(--surface); color: var(--blue); font-size: 12px; font-weight: 800; }
.privacy-reminder, .danger-callout { margin-top: 22px; border-left: 5px solid var(--yellow); background: #fff8d9; padding: 15px 18px; display: flex; gap: 13px; border-radius: 0 12px 12px 0; }
.privacy-reminder > span, .danger-callout > span { width: 25px; height: 25px; border-radius: 50%; background: var(--yellow); display: grid; place-items: center; flex: 0 0 auto; font-weight: 800; }
.privacy-reminder p, .danger-callout p { margin: 4px 0 0; color: #494949; font-size: 13px; }
.danger-callout { margin: 0; border-left-color: var(--red); background: #fff0f0; }
.danger-callout > span { background: var(--red); color: white; }
.editor-callout { margin-bottom: 18px; }
.card-callout { margin: 0 0 6px; padding: 10px 12px; }
.card-callout p, .editor-callout p { white-space: pre-line; }

.results-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 28px 0 16px; }
.results-bar strong { font-size: 14px; }
.text-button { border: 0; background: transparent; color: var(--blue); font-weight: 800; text-decoration: underline; padding: 0; cursor: pointer; }

/* Busca e filtros da biblioteca (RF-12), como no protótipo. */
.filter-card { display: grid; grid-template-columns: 1.5fr 1fr .75fr 1fr auto; gap: 14px; align-items: end; background: var(--surface); border: 0; }
.filter-card label { margin-top: 0; font-size: 12px; }
.filter-card input, .filter-card select { width: 100%; }
.filter-actions .btn { min-height: 46px; }
.library-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: var(--gap); }
.library-grid .card { display: flex; flex-direction: column; min-height: 280px; transition: transform var(--medio) var(--ease), box-shadow var(--medio) var(--ease), border-color var(--medio) var(--ease); }
.library-grid .card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #b9c6ff; }
.library-grid h2 { font-size: 19px; line-height: 1.25; margin-bottom: 9px; overflow-wrap: anywhere; }
.library-grid .card > p { color: var(--muted); font-size: 13px; line-height: 1.5; flex: 1; }
.library-grid .meta { flex-wrap: wrap; }
.library-card-footer { border-top: 1px solid var(--line); padding-top: 16px; margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.library-card-footer small { color: var(--muted); white-space: nowrap; }
.library-card-footer:has(.card-actions) { flex-wrap: wrap; }
.library-card-footer:has(.card-actions) small { flex: 1 1 100%; }
.library-card-footer .card-actions { flex: 1 1 100%; flex-wrap: nowrap; }
.library-card-footer .card-actions .btn { flex: 1 1 0; }
.library-card-footer .btn { min-height: 36px; padding: 6px 14px; font-size: 12px; text-decoration: none; }
.empty-state { min-height: 330px; border: 2px dashed #cdd5f3; background: white; border-radius: var(--radius); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; position: relative; overflow: hidden; padding: 24px; }
.empty-state p { color: var(--muted); }
.empty-shapes span:first-child { display: block; width: 54px; height: 54px; border-radius: 50%; background: var(--blue); margin: 0 auto 18px; box-shadow: 22px 5px 0 var(--yellow); }

.editor-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 28px; }
.editor-heading h1 { font-size: clamp(32px, 3vw, 44px); margin-bottom: 8px; overflow-wrap: anywhere; }
.editor-heading p:last-child { color: var(--muted); margin: 0; }
.heading-badges { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.editor-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr) 290px; gap: var(--gap); align-items: start; }
.editor-steps { display: flex; flex-direction: column; gap: 6px; }
.editor-steps[hidden], .editor-step[hidden], .editor-nav[hidden], .editor-nav [hidden] { display: none; }
.editor-steps button { transition: background-color var(--rapido) var(--ease), color var(--rapido) var(--ease); border: 0; border-radius: 12px; background: transparent; display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 9px; text-align: left; padding: 10px; color: var(--muted); }
.editor-steps button > span:first-child { width: 28px; height: 28px; border: 2px solid var(--line); border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; }
.editor-steps button strong { font-size: 12px; }
.editor-steps button:hover:not(.active) { background: #f3f5fc; color: var(--ink); }
.editor-steps button.active { background: var(--surface); color: var(--blue); }
.editor-steps button > span:first-child { transition: background-color var(--rapido) var(--ease), border-color var(--rapido) var(--ease), color var(--rapido) var(--ease); }
.editor-steps button.active > span:first-child { background: var(--blue); border-color: var(--blue); color: white; }
.editor-form { min-height: 520px; }
.editor-step { border: 0; margin: 0; padding: 0; min-width: 0; }
.editor-step:not([hidden]) ~ .editor-step:not([hidden]) { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 22px; }
.editor-step h2 { font-size: 26px; margin-bottom: 24px; letter-spacing: -.01em; }
.editor-step:not([hidden]) { animation: entrar var(--medio) var(--ease); }
.editor-step h2:focus { outline: none; }
.form-stack { display: flex; flex-direction: column; }
.form-stack label { display: block; font-size: 12px; font-weight: 800; margin-bottom: 7px; }
.form-stack input:not([type="range"]), .form-stack textarea, .form-stack select { width: 100%; margin-bottom: 17px; }
.form-stack textarea { resize: vertical; }
.form-stack .form-grid label { margin-top: 0; }
.form-stack .field-description { margin-top: -10px; }
.form-stack input[type="range"] { width: 100%; accent-color: var(--blue); min-height: 0; padding: 0; border: 0; margin-top: 12px; }
.skills-title { font-size: 14px; margin: 8px 0 10px; }
.skill-list, .bncc-results { list-style: none; margin: 0; padding: 0; }
.skill-result { animation: entrar var(--medio) var(--ease); display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: 12px; background: var(--surface); padding: 13px; border-radius: 10px; margin-bottom: 10px; }
.skill-result strong { color: var(--blue); }
.skill-result span { color: var(--muted); font-size: 12px; line-height: 1.4; }
.bncc-results { border: 1px solid var(--line); border-radius: 12px; margin: 0 0 18px; max-height: 320px; overflow: auto; }
.bncc-results li { transition: background-color var(--rapido) var(--ease); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 13px; }
.bncc-results li + li { border-top: 1px solid var(--line); }
.bncc-results li:hover { background: #f8f9ff; }
.htmx-request.bncc-results, #bncc-resultados.htmx-request, #sugestao-bncc-resultados.htmx-request { opacity: .6; transition: opacity var(--rapido) var(--ease); }
.bncc-results strong { color: var(--blue); font-size: 13px; margin-right: 6px; }
.bncc-results span { font-size: 12px; line-height: 1.4; }
.bncc-results small { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
.bncc-results .btn { min-height: 36px; padding: 6px 12px; font-size: 11px; flex: 0 0 auto; }
.editor-nav { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 17px; margin-top: 20px; }
.all-steps-note { font-size: 12px; color: var(--muted); font-weight: 700; }
.requirements-card { border: 1px solid var(--line); border-radius: 16px; padding: 18px; position: sticky; top: 18px; background: white; }
.requirements-card h3 { font-size: 17px; margin-bottom: 8px; }
.requirements-card p, .requirements-card > small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.requirements-card ul { list-style: none; padding: 0; margin: 15px 0; }
.requirements-card li { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; padding: 6px 0; }
.requirements-card li span { width: 20px; height: 20px; background: #fff0cc; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; }
.requirements-card li a { color: var(--ink); text-decoration-color: #b9c6ff; text-underline-offset: 3px; transition: color var(--rapido) var(--ease); }
.requirements-card li a:hover { color: var(--blue); text-decoration-color: currentColor; }
.requirements-card { box-shadow: var(--shadow-sm); }
.requirements-card > .btn { margin: 12px 0 0; }
.requirements-card > small { display: block; margin-top: 10px; }
.ready-callout { background: #e1f6e9; border-radius: 10px; padding: 12px; display: flex; gap: 9px; align-items: flex-start; color: #075d33; }
.ready-callout p { margin: 0; font-size: 12px; font-weight: 700; color: #075d33; }

/* Curadoria e biblioteca (RF-08, RF-12): fila, detalhe do cenário e diálogo de devolução. */
.queue-stats { display: flex; gap: 10px; }
.queue-stats span { background: var(--surface); border-radius: 12px; padding: 10px 14px; font-size: 12px; }
.queue-stats strong { color: var(--blue); font-size: 18px; margin-right: 4px; }
.review-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: var(--gap); align-items: start; }
.review-list { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; position: sticky; top: 96px; background: white; box-shadow: var(--shadow-sm); }
.review-list h2 { font-size: 14px; padding: 17px; margin: 0; background: var(--surface); }
.review-list > a { transition: background-color var(--rapido) var(--ease), border-color var(--rapido) var(--ease); border-top: 1px solid var(--line); border-left: 5px solid transparent; background: white; padding: 15px; display: flex; flex-direction: column; align-items: flex-start; gap: 7px; color: var(--ink); text-decoration: none; }
.review-list > a:hover { background: #f8f9ff; }
.review-list > a.active { border-left-color: var(--blue); background: #f8f9ff; }
.review-list > a strong { font-size: 13px; line-height: 1.35; }
.review-list > a small { color: var(--muted); }
.review-list-more { margin: 0; padding: 13px 15px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.review-main { min-width: 0; }
.review-summary { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.review-summary h2 { margin: 10px 0 5px; font-size: 22px; }
.review-summary p { margin: 0; color: var(--muted); font-size: 12px; }
.review-summary .heading-badges { margin-bottom: 0; }

/* Aviso do RN-04 num cenário sugerido pela IA, no estilo das notas do protótipo. */
.ai-callout { background: var(--surface); border-left: 5px solid var(--blue); border-radius: 0 12px 12px 0; padding: 13px 17px; display: flex; gap: 12px; margin: 16px 0 0; }
.ai-callout > span { width: 23px; height: 23px; border-radius: 50%; background: var(--blue); color: white; display: grid; place-items: center; font-weight: 800; flex: 0 0 auto; }
.ai-callout p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }

/* Modo de teste (RF-09), como a seção "Modo teste" do protótipo. A conversa rola sozinha até a pergunta
   mais nova (curadoria.js); enquanto o personagem responde, o HTMX marca a seção com .htmx-request. */
.test-section { margin-top: 28px; }
.test-section .section-title { margin-top: 0; }
.test-counter { background: white; color: var(--blue); border-radius: 999px; padding: 6px 10px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.test-chat { border-radius: 0 0 var(--radius) var(--radius); }
.test-chat-intro, .test-chat-autor, .test-empty { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.test-chat-autor { margin: 0; }
.test-messages { max-height: 420px; overflow-y: auto; padding-right: 4px; }
.mini-message { margin-bottom: 12px; max-width: 80%; }
.mini-message strong { font-size: 11px; color: var(--blue); }
.mini-message p { background: var(--surface); border-radius: 10px; padding: 12px; font-size: 13px; margin: 5px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.mini-message.tester { margin-left: auto; }
.mini-message.tester strong { display: block; text-align: right; }
.mini-message.tester p { background: var(--blue); color: white; }
.test-notice { max-width: 80%; margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; border: 1px dashed var(--line); color: var(--muted); font-size: 12px; }
.test-error { margin: 12px 0 0; }
.test-form { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 4px; }
.test-form-row { display: flex; gap: 10px; }
.test-form-row input { flex: 1; margin: 0; }
.test-form-row .btn { flex: 0 0 auto; }
.test-form small { display: block; color: var(--muted); font-size: 12px; margin-top: 8px; }
.test-waiting { display: none; align-items: center; gap: 8px; color: var(--blue); font-size: 12px; font-weight: 700; margin: 10px 0 0; }
.test-section.htmx-request .test-waiting { display: flex; }
.test-waiting-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); animation: piscar-ponto 1s ease-in-out infinite; }
@keyframes piscar-ponto { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .test-waiting-dot { animation: none; } }
@media (max-width: 620px) { .test-form-row { flex-direction: column; } .mini-message, .test-notice { max-width: 100%; } }
.conflict-warning { margin-top: 16px; }
.review-actions { position: sticky; bottom: 16px; z-index: 2; background: white; border: 1px solid var(--line); border-radius: 14px; padding: 13px; margin-top: 18px; display: flex; justify-content: flex-end; align-items: center; gap: 10px; box-shadow: 0 -8px 25px rgba(26,64,255,.08); }
.review-actions > div { margin-right: auto; }
.review-actions > div strong, .review-actions > div span { display: block; font-size: 11px; }
.review-actions > div span { color: var(--muted); margin-top: 3px; }
.review-actions form { margin: 0; }
.review-actions .btn-primary:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

/* Checklist de revisão (RF-10), como no protótipo: cartões em duas colunas com a caixa desenhada. A caixa
   de verdade continua no formulário, só fica invisível; o foco do teclado aparece no cartão. */
.checklist-section .section-title { margin-top: 40px; }
.review-checklist { border-radius: 0 0 var(--radius) var(--radius); display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.review-checklist label { position: relative; border: 1px solid var(--borda-controle); border-radius: var(--radius-sm); padding: 13px; margin: 0; display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; cursor: pointer; transition: border-color var(--rapido) var(--ease), background-color var(--rapido) var(--ease); }
.review-checklist label:hover { border-color: var(--borda-controle-hover); }
.review-checklist input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; margin: 0; }
.review-checklist label > span { width: 24px; height: 24px; flex: 0 0 auto; border: 2px solid var(--borda-controle); border-radius: 6px; color: transparent; display: grid; place-items: center; font-size: 13px; transition: background-color var(--rapido) var(--ease), border-color var(--rapido) var(--ease); }
.review-checklist label:has(input:checked) { border-color: var(--blue); background: #f8f9ff; }
.review-checklist input:checked + span { background: var(--blue); border-color: var(--blue); color: white; }
.review-checklist label:has(input:focus-visible) { outline: 3px solid var(--blue); outline-offset: 2px; border-color: var(--blue); }

/* Histórico de versões (RF-11), como no protótipo: a lista à esquerda e a comparação à direita, com o
   que saiu em vermelho e riscado e o que entrou em verde e sublinhado. */
.versions-section .section-title { margin-top: 40px; }
.versions { border-radius: 0 0 var(--radius) var(--radius); display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 20px; align-items: start; }
.version-list { list-style: none; margin: 0; padding: 0; }
.version-list > li { border-left: 3px solid var(--line); padding: 0 0 15px 13px; }
.version-list > li:first-child { border-left-color: var(--blue); }
.version-list-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.version-list > li > span { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
.version-list form { margin: 6px 0 0; }
.version-list .text-button { font-size: 12px; }
.versions-note { color: var(--muted); font-size: 12px; margin: 4px 0 0; }
.versions-compare { min-width: 0; }
.compare-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; margin: 0 0 14px; }
.compare-form label { margin-top: 0; }
.compare-form select { width: 100%; }
.comparison-empty { color: var(--muted); font-size: 13px; margin: 0; }
.comparison { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.comparison-row { display: grid; grid-template-columns: 1fr 1fr; }
.comparison-row + .comparison-row { border-top: 1px solid var(--line); }
.comparison-head > span { display: none; }
.comparison-head > strong { padding: 10px 14px; font-size: 11px; background: #fff6f6; }
.comparison-head > strong + strong { background: #effaf3; border-left: 1px solid var(--line); }
.comparison-field { grid-column: 1 / -1; padding: 10px 14px 0; font-size: 11px; font-weight: 800; color: var(--blue-dark); text-transform: uppercase; letter-spacing: .06em; background: white; }
.comparison-field small { display: block; margin-top: 2px; color: var(--muted); font-weight: 700; text-transform: none; letter-spacing: 0; }
.comparison-old, .comparison-new { padding: 8px 14px 12px; background: #fff6f6; font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.comparison-new { background: #effaf3; border-left: 1px solid var(--line); }
.comparison-old p, .comparison-new p { margin: 0; white-space: pre-line; }
.comparison-old ul, .comparison-new ul { margin: 0; padding-left: 18px; }
.comparison-old li + li, .comparison-new li + li { margin-top: 4px; }
.diff-mark { border-radius: 4px; padding: 0 3px; color: inherit; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.comparison-old .diff-mark { background: #ffd4d4; text-decoration: line-through; text-decoration-color: #9c0000; }
.comparison-new .diff-mark { background: #c6efd6; text-decoration: underline; text-decoration-color: var(--green); text-underline-offset: 2px; }
.comparison-none { color: var(--muted); font-style: italic; }
.comparison-same { margin-top: 12px; font-size: 13px; }
.comparison-same summary { cursor: pointer; color: var(--blue); font-weight: 800; }
.comparison-same dl { margin: 10px 0 0; }
.comparison-same dl > div { padding: 8px 0; border-bottom: 1px solid var(--line); }
.comparison-same dt { font-size: 11px; font-weight: 800; color: var(--muted); }
.comparison-same dd { margin: 3px 0 0; overflow-wrap: anywhere; }
.versions-page .versions { margin-bottom: 0; }
.heading-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.heading-actions form { margin: 0; }

.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--gap); align-items: start; }
.detail-card { border-radius: 0 0 16px 16px; }
.detail-card dl, .detail-summary dl { margin: 0; }
.detail-card dl > div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.detail-card dl > div:last-child { border-bottom: 0; }
.detail-summary dl > div { border-bottom: 1px solid var(--line); padding: 11px 0; }
.detail-card dt, .detail-summary dt { color: var(--muted); font-size: 10px; font-weight: 700; }
.detail-card dd, .detail-summary dd { margin: 4px 0 0; font-size: 12px; font-weight: 700; line-height: 1.5; overflow-wrap: anywhere; }
.detail-list { margin: 0; padding-left: 18px; }
.detail-list li + li { margin-top: 4px; }
.texto-longo { white-space: pre-line; }
.detail-summary, .detail-prompts { margin-bottom: 14px; }
.detail-summary h3, .detail-prompts h3 { font-size: 17px; }
.detail-prompts ol { padding-left: 20px; margin: 0; }
.detail-prompts li { font-size: 12px; line-height: 1.5; margin-bottom: 10px; }

dialog.modal { border: 0; padding: 0; border-radius: 20px; box-shadow: var(--shadow-lg); width: min(560px, calc(100% - 32px)); box-shadow: 0 25px 70px rgba(0,0,0,.25); }
dialog.modal::backdrop { background: rgba(8, 12, 30, .55); backdrop-filter: blur(3px); }
dialog.modal[open] { animation: surgir var(--medio) var(--ease); }
dialog.modal[open]::backdrop { animation: escurecer var(--medio) var(--ease); }
@keyframes escurecer { from { opacity: 0; } to { opacity: 1; } }
.modal-head { padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 22px; }
.modal-body { padding: 20px 24px; }
.modal-body > label { display: block; font-size: 13px; font-weight: 800; margin: 16px 0 7px; }
.modal-body textarea { width: 100%; resize: vertical; }
.modal-intro { color: var(--muted); font-size: 14px; }
.modal-footer { padding: 16px 24px; background: #f7f8fc; border-radius: 0 0 18px 18px; display: flex; justify-content: flex-end; gap: 10px; }

/* Pedido de sugestão pela IA (RF-07): mais largo que os outros modais, e só o corpo rola, para o botão de
   gerar ficar sempre à vista. */
dialog.modal-sugestao { width: min(680px, calc(100% - 32px)); max-height: calc(100dvh - 32px); }
.modal-sugestao[open] > form { display: flex; flex-direction: column; max-height: calc(100dvh - 32px); }
.modal-sugestao .modal-head h2 span { color: var(--blue); }
.modal-sugestao .modal-body { overflow-y: auto; }
.modal-sugestao .modal-body > .field-error { margin-top: 0; }
.modal-sugestao .skill-list { display: grid; gap: 8px; margin-top: 12px; }
.modal-sugestao .modal-footer { align-items: center; flex-wrap: wrap; }
.sugestao-gerando { margin: 0 auto 0 0; color: var(--blue); font-size: 12px; font-weight: 700; }
.card-badges { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* Sessão em sala (RF-14 a RF-17): preparação, modo projeção, painel do professor e resumo. */
.card-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.choice-fieldset { border: 0; margin: 0 0 12px; padding: 0; min-width: 0; }
.choice-fieldset > .section-title { border-radius: var(--radius); margin-top: 32px; }
.choice-fieldset > legend { width: 100%; padding: 0; }
.choice-fieldset .legend-text { font-size: 20px; font-weight: 800; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: var(--gap); margin-top: 18px; }
.choice-card { position: relative; border: 2px solid var(--borda-controle); border-radius: var(--radius); padding: 18px 20px; background: white; display: flex; align-items: center; gap: 14px; cursor: pointer; transition: border-color var(--rapido) var(--ease), background-color var(--rapido) var(--ease), box-shadow var(--medio) var(--ease), transform var(--rapido) var(--ease); }
.choice-card:hover { border-color: var(--borda-controle-hover); box-shadow: var(--shadow-md); }
.choice-card:has(input:checked) { border-color: var(--blue); background: #f8f9ff; }
.choice-card:has(input:focus-visible) { outline: 3px solid var(--blue); outline-offset: 3px; }
.choice-card input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; margin: 0; }
.radio-ui { width: 21px; height: 21px; border-radius: 50%; border: 2px solid #9ca6cf; flex: 0 0 auto; }
.radio-ui { transition: border-width var(--rapido) var(--ease), border-color var(--rapido) var(--ease); }
.choice-card input:checked + .radio-ui { border: 6px solid var(--blue); }
.choice-card strong, .choice-card small { display: block; }
.choice-card strong { font-size: 19px; }
.choice-card small { color: var(--muted); margin-top: 4px; }
.scenario-choice { margin-top: 12px; }
.scenario-choice-copy { display: flex; align-items: center; gap: 15px; flex: 1; min-width: 0; }
.scenario-choice-copy strong { overflow-wrap: anywhere; }
.scenario-choice-copy strong { font-size: 16px; }
.setup-footer { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.setup-footer p { margin: 0; color: var(--muted); max-width: 60ch; }

.projection { animation: entrar var(--medio) var(--ease); height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) 370px; background: white; overflow: hidden; }
.projection.panel-hidden { grid-template-columns: 1fr; }
.projection.panel-hidden .teacher-panel { display: none; }
.projected-area { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.projection-header { background: var(--blue); color: white; padding: 20px 34px; min-height: 108px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.projection-kicker { font-size: 13px; font-weight: 800; letter-spacing: .08em; margin-bottom: 7px; }
.projection-header h1 { font-size: clamp(25px, 2.3vw, 34px); margin: 0; }
.immersive-heading { display: flex; align-items: center; gap: 16px; min-width: 0; }
.immersive-home { border: 2px solid rgba(255,255,255,.75); border-radius: 12px; background: white; padding: 6px; flex: 0 0 auto; display: inline-flex; }
.immersive-home .brand-mark { width: 31px; height: 31px; }
.panel-toggle { background: transparent; color: white; border: 1px solid rgba(255, 255, 255, .8); border-radius: 999px; padding: 8px 14px; font-size: 12px; font-weight: 700; white-space: nowrap; transition: background-color var(--rapido) var(--ease); }
.panel-toggle:hover { background: rgba(255, 255, 255, .14); }
.ai-banner { min-height: 47px; background: var(--yellow); padding: 8px 34px; display: flex; align-items: center; gap: 16px; color: var(--ink); position: sticky; top: 0; z-index: 3; }
.ai-banner strong { font-size: 12px; border: 2px solid var(--ink); border-radius: 999px; padding: 3px 8px; white-space: nowrap; }
.ai-banner span { font-size: 17px; font-weight: 800; }
/* RNF-06: no mínimo 28 px e contraste de 7:1 no texto da conversa (#1e1e1e sobre branco ou lilás claro). */
.chat { flex: 1; min-height: 0; overflow-y: auto; padding: 28px 4vw; background: #fafbff; }
.chat:empty::before { content: attr(data-vazio); display: block; color: var(--ink); font-size: 22px; font-weight: 700; text-align: center; margin-top: 12vh; }
.mensagem { max-width: 82%; margin-bottom: 24px; animation: entrar var(--medio) var(--ease); }
.mensagem-autoria { display: block; font-size: 18px; font-weight: 800; color: var(--ink); margin-bottom: 7px; }
.mensagem p { padding: 18px 22px; border-radius: 16px; font-size: clamp(28px, 1.75vw, 40px); line-height: 1.35; margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.mensagem-ia p.mensagem-texto { background: var(--surface); border-left: 6px solid var(--blue); }
.mensagem-ia p.mensagem-texto:empty::after { content: "…"; }
.mensagem-turma { margin-left: auto; }
.mensagem-turma .mensagem-autoria { text-align: right; }
.mensagem-turma p { background: var(--blue-dark); color: white; }
.mensagem-descartada p.mensagem-texto { display: none; }
.mensagem p.aviso:empty { display: none; }
.aviso { border: 3px solid var(--ink); background: #fff8d9; color: var(--ink); padding: 14px 18px; border-radius: 14px; font-weight: 700; font-size: 16px; line-height: 1.4; margin: 0 0 14px; }
.chat .aviso { font-size: 22px; max-width: 82%; }
.mensagem .aviso { margin-top: 8px; }
.mensagem [data-tentar] { margin-top: 10px; }
.composer { border-top: 1px solid var(--line); padding: 15px 30px 17px; background: white; }
.composer label { font-size: 12px; font-weight: 800; display: block; margin-bottom: 7px; }
.composer-row { display: flex; gap: 10px; }
.composer-row { align-items: stretch; }
.composer-row input { flex: 1; width: auto; font-size: 19px; margin: 0; }
.composer-row .btn { min-height: 0; padding-inline: 26px; }
.composer small { display: block; color: var(--muted); margin-top: 6px; }
.composer-row input[aria-invalid="true"] { border-color: #b00000; box-shadow: 0 0 0 3px rgba(176, 0, 0, .14); }

/* #43: o aviso neutro que a turma vê no lugar da resposta, como o "Resposta não exibida" do protótipo. O
   detalhe para o professor fica no painel. */
.filtered-alert { border: 3px solid var(--ink); background: var(--yellow); color: var(--ink); padding: 18px; border-radius: 16px; display: flex; gap: 14px; font-size: 19px; max-width: 100%; animation: entrar var(--medio) var(--ease); }
.filtered-alert > span { width: 34px; height: 34px; border: 3px solid var(--ink); border-radius: 50%; display: grid; place-items: center; font-weight: 800; flex: 0 0 auto; }
.filtered-alert strong { display: block; font-size: 22px; }
.chat .filtered-alert p, .mensagem .filtered-alert p { margin: 6px 0 0; padding: 0; font-size: 19px; line-height: 1.4; background: none; border: 0; border-radius: 0; color: var(--ink); }
.filtered-alert-calmo { background: #fff8d9; }
.chat > .filtered-alert { max-width: 82%; margin-bottom: 24px; }
.mensagem-descartada > .mensagem-autoria { color: var(--muted); }

/* #43: avisos ao professor, só no painel. O mais recente substitui o anterior. */
.avisos-do-professor:empty { display: none; }
.avisos-do-professor .aviso p { margin: 0; }
.avisos-do-professor [data-tentar] { margin-top: 10px; min-height: 36px; padding: 6px 14px; font-size: 13px; }

/* Com o painel oculto, um ponto amarelo no botão indica que chegou um aviso ao professor. */
.panel-toggle.tem-aviso { position: relative; padding-right: 28px; border-color: var(--yellow); }
.panel-toggle.tem-aviso::after { content: ""; position: absolute; right: 11px; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 3px rgba(255, 204, 0, .35); animation: pulsar-aviso 1.6s var(--ease) infinite; }
@keyframes pulsar-aviso { 50% { box-shadow: 0 0 0 6px rgba(255, 204, 0, 0); } }
@media (prefers-reduced-motion: reduce) { .panel-toggle.tem-aviso::after { animation: none; } }

/* RF-23, #43: modal de sinalizar a última resposta, como no protótipo. */
.sinalizacao-na-aula .form-grid label { display: block; font-size: 13px; font-weight: 800; margin: 16px 0 0; }
.sinalizacao-na-aula .form-grid select { width: 100%; margin-top: 7px; }
.sinalizacao-na-aula .modal-body > .field-error, .sinalizacao-na-aula .modal-body > .sinalizacao-feita { margin: 0 0 12px; font-size: 14px; }
.resposta-sinalizada { margin: 14px 0 0; background: var(--surface); border-left: 4px solid var(--blue); border-radius: 0 10px 10px 0; padding: 10px 14px; }
.resposta-sinalizada figcaption { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--blue); margin-bottom: 4px; }
.resposta-sinalizada blockquote { margin: 0; font-size: 14px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.gravidade-criterios { list-style: none; margin: 8px 0 0; padding: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.gravidade-criterios strong { color: var(--ink); }
.modal-ajuda { display: block; color: var(--muted); font-size: 12px; margin-top: 6px; }

.teacher-panel { border-left: 1px solid var(--line); padding: 22px; background: white; overflow-y: auto; }
.panel-title > div { display: flex; align-items: center; justify-content: space-between; }
.panel-title p { font-size: 10px; letter-spacing: .1em; font-weight: 800; color: var(--blue); margin: 0; }
.panel-title h2 { margin: 9px 0 4px; font-size: 22px; }
.panel-title .panel-turma { color: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: 0; margin: 0 0 16px; }
.timer-card { background: var(--surface); border: 0; padding: 16px; }
.timer-top, .timer-meta { display: flex; align-items: center; justify-content: space-between; }
.timer-top span { font-size: 12px; font-weight: 700; }
.timer-top strong { font-size: 23px; font-variant-numeric: tabular-nums; }
.progress { height: 8px; background: white; border-radius: 99px; margin: 13px 0 8px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--blue); border-radius: 99px; transition: width .6s var(--ease); }
.timer-meta { color: var(--muted); font-size: 11px; margin-top: 8px; }
.teacher-panel .aviso { font-size: 13px; border-width: 2px; margin: 0 0 14px; }
.controls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 13px 0 10px; }
.controls .btn:last-child:nth-child(odd) { grid-column: 1 / -1; }
.controls .btn { font-size: 13px; padding: 9px 12px; min-height: 46px; justify-content: flex-start; }
kbd { font-family: inherit; font-size: 10px; border-radius: 4px; padding: 2px 5px; background: rgba(255,255,255,.65); border: 1px solid currentColor; margin-left: auto; }
.atalhos-nota { color: var(--muted); font-size: 11px; }

/* Perguntas disparadoras (RF-18): sugestões que só o professor vê. O clique leva a pergunta ao campo
   de envio; bloqueadas junto com ele, quando a sessão está pausada ou no limite. */
.disparadoras { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 16px; }
.disparadoras h3 { font-size: 15px; margin: 0 0 4px; }
.disparadoras-nota { color: var(--muted); font-size: 12px; margin: 0 0 10px; }
.disparadoras ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.disparadora { width: 100%; text-align: left; font: inherit; font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--ink); background: var(--surface); border: 1px solid transparent; border-radius: var(--radius-sm); padding: 10px 12px; cursor: pointer; transition: border-color var(--rapido) var(--ease), background var(--rapido) var(--ease); }
.disparadora:hover:not(:disabled) { border-color: var(--blue); background: white; }
.disparadora:focus-visible { outline: 2px solid transparent; border-color: var(--blue); box-shadow: var(--ring); }
.disparadora:disabled { cursor: not-allowed; color: var(--muted); opacity: .7; }
@media (prefers-reduced-motion: reduce) { .disparadora { transition: none; } }

.summary-stats { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface); border-radius: 12px; margin-top: 17px; }
.summary-stats div { padding: 15px; text-align: center; border-right: 1px solid var(--line); }
.summary-stats div:last-child { border: 0; }
.summary-stats strong, .summary-stats span { display: block; }
.summary-stats strong { font-size: 22px; color: var(--blue); }
.summary-stats span { font-size: 12px; margin-top: 3px; }
.end-actions { margin-top: 25px; display: flex; justify-content: center; gap: 12px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Por último, para valer sobre as regras de cada tela, como no protótipo. */
@media (max-width: 900px) {
  .form-layout { grid-template-columns: 1fr; }
  .form-summary { position: static; }
  .editor-layout { grid-template-columns: 1fr; }
  .editor-steps { display: grid; grid-template-columns: 1fr 1fr; }
  .requirements-card { position: static; }
  .review-actions { bottom: 0; }
  .review-layout, .detail-layout, .versions { grid-template-columns: 1fr; }
  .filter-card { grid-template-columns: 1fr 1fr; }
  .filter-card .search-field { grid-column: 1 / -1; }
  .review-list { position: static; }
  .projection { grid-template-columns: 1fr; height: auto; overflow: visible; }
  .teacher-panel { border-left: 0; border-top: 1px solid var(--line); }
  .projected-area { min-height: 100vh; }
  .profile-selector { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .user-identity, .user-chevron, .brand small { display: none; }
  .user-menu > summary { padding: 4px; }
  .welcome-row, .step-heading { align-items: stretch; flex-direction: column; }
  .library-heading, .admin-section-head, .editor-heading { align-items: stretch; flex-direction: column; }
  .editor-steps { grid-template-columns: 1fr; }
  .bncc-results li { align-items: stretch; flex-direction: column; }
  .review-summary, .review-actions, .queue-stats { align-items: stretch; flex-direction: column; }
  .review-actions > div { margin-right: 0; }
  .filter-card, .review-checklist, .compare-form { grid-template-columns: 1fr; }
  .comparison-row { grid-template-columns: 1fr; }
  .comparison-head { display: none; }
  .comparison-new { border-left: 0; border-top: 1px dashed var(--line); }
  .comparison-old::before { content: "Antes"; display: block; font-size: 11px; font-weight: 800; }
  .comparison-new::before { content: "Depois"; display: block; font-size: 11px; font-weight: 800; }
  .heading-actions { justify-content: stretch; }
  .heading-actions > * { flex: 1 1 auto; }
  .setup-footer, .end-actions { align-items: stretch; flex-direction: column; }
  .scenario-choice { align-items: flex-start; flex-wrap: wrap; }
  .scenario-choice > .badge { margin-left: 35px; }
  .library-card-footer .card-actions { flex-wrap: wrap; }
  .scenario-choice-copy { display: grid; gap: 6px; }
  .projection-header { padding: 18px; }
  .ai-banner { padding: 10px 18px; align-items: flex-start; flex-direction: column; gap: 5px; }
  .chat { padding: 20px 15px; }
  .mensagem, .chat .aviso { max-width: 94%; }
  .composer { padding: 13px; }
  .composer-row { align-items: stretch; flex-direction: column; }
  .form-grid, .parameter-grid { grid-template-columns: 1fr; }
  .admin-tabs { grid-template-columns: 1fr 1fr; }
  .period-options { align-items: stretch; flex-direction: column; }
}

/* Revisão da conversa e sinalização de erro (RF-23) */
.revisao-conversa { margin-top: 8px; }
.sinalizacao { margin: -4px 0 18px; max-width: 80%; }
.sinalizacao summary { list-style: none; min-height: 34px; padding: 6px 14px; font-size: 12px; }
.sinalizacao summary::-webkit-details-marker { display: none; }
.sinalizacao details[open] summary { margin-bottom: 12px; }
.sinalizacao-form { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; background: var(--surface); }
.sinalizacao-form label { font-size: 12px; font-weight: 800; }
.sinalizacao-form textarea { width: 100%; margin: 6px 0 4px; }
.sinalizacao-form small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 12px; }
/* Radios nativos: desfazem o estilo de campo de texto das regras globais "select, input, textarea"
   (altura 46px, padding, borda) e "form input" (largura 100%), e a de "form label" (display block).
   Os seletores dependem só da classe do formulário, para ganhar delas em especificidade. */
.sinalizacao-form fieldset { border: 0; margin: 0 0 14px; padding: 0; min-width: 0; }
.sinalizacao-form legend { padding: 0; margin-bottom: 6px; font-size: 12px; font-weight: 800; }
.sinalizacao-form label:has(> input[type="radio"]) { display: flex; align-items: center; gap: .5rem; width: auto; margin: 6px 0; font-weight: 600; cursor: pointer; }
.sinalizacao-form label:has(> input[type="radio"] + span small) { align-items: flex-start; }
.sinalizacao-form input[type="radio"] { flex: none; box-sizing: border-box; width: 1.1rem; height: 1.1rem; min-height: 0; padding: 0; margin: 0; border: 0; border-radius: 50%; box-shadow: none; accent-color: var(--blue); }
.sinalizacao-form input[type="radio"]:focus { box-shadow: none; outline: none; }
.sinalizacao-form input[type="radio"]:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.sinalizacao-form label small { display: inline; margin: 0; font-weight: 600; }
.sinalizacao-feita { color: #075d33; font-weight: 800; font-size: 13px; margin: 0 0 7px; }
.sessoes-recentes { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.sessoes-recentes .card-top { margin-bottom: 8px; }
.sessoes-recentes .card-top p { margin: 4px 0 0; }

/* #44: fila do curador com as abas Cenários e Sinalizações (RF-08, RF-24), como no protótipo. */
.queue-heading-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.queue-stats .queue-stat-atrasada { background: #fff2f2; }
.queue-stats .queue-stat-atrasada strong { color: #a80000; }
.tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs a { border-bottom: 4px solid transparent; padding: 13px 17px; font-weight: 800; color: var(--muted); text-decoration: none; white-space: nowrap; transition: color var(--rapido) var(--ease), border-color var(--rapido) var(--ease); }
.tabs a:hover:not(.active) { color: var(--ink); }
.tabs a.active { color: var(--blue); border-bottom-color: var(--blue); }
.tabs a span { margin-left: 6px; background: var(--surface); border-radius: 99px; padding: 3px 7px; font-size: 10px; }
.tabs a span:empty { display: none; }

/* RF-24, RN-24: prazo de triagem e tabela de sinalizações. */
.aviso-de-prazo { margin: -10px 0 22px; font-size: 13px; }
.aviso-de-prazo a { margin-left: 4px; }
.sla-note { background: var(--surface); border-left: 5px solid var(--blue); border-radius: 0 12px 12px 0; padding: 13px 17px; display: flex; gap: 12px; margin-bottom: 15px; }
.sla-note > span { width: 23px; height: 23px; border-radius: 50%; background: var(--blue); color: white; display: grid; place-items: center; font-weight: 800; flex: 0 0 auto; }
.sla-note p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.report-table td > strong, .report-table td > small, .report-table td > span:not(.severity), .log-table td > strong, .log-table td > small { display: block; }
.report-table td > small, .log-table td > small { color: var(--muted); margin-top: 4px; font-size: 12px; }
.overdue-row, .overdue-row:hover { background: #fff2f2; box-shadow: inset 5px 0 0 var(--red); }
.overdue-label { display: block; color: #a80000; font-size: 10px; font-weight: 800; margin-top: 4px; text-transform: uppercase; letter-spacing: .04em; }
.severity { display: inline-block; padding: 5px 8px; border-radius: 99px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.severity-grave { background: #ffdede; color: #990000; }
.severity-moderada { background: #fff0b8; color: #574500; }
.severity-leve { background: var(--surface); color: var(--blue-dark); }
.report-table .table-actions .btn { min-height: 36px; padding: 6px 12px; font-size: 12px; }
.pagination-row { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

/* Modal da triagem: o trecho sinalizado e a gravidade final (RN-22). */
dialog.modal-triagem { width: min(640px, calc(100% - 32px)); max-height: calc(100dvh - 32px); }
.modal-triagem form { display: contents; }
.trecho-resumo { margin: 0 0 12px; }
.trecho-resumo strong { display: block; font-size: 16px; }
.trecho-resumo span { color: var(--muted); font-size: 12px; }
.trecho-da-triagem figure { margin: 0 0 10px; background: var(--surface); border-left: 4px solid var(--line); border-radius: 0 10px 10px 0; padding: 10px 14px; }
.trecho-da-triagem .trecho-resposta { border-left-color: var(--blue); }
.trecho-da-triagem figcaption { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.trecho-da-triagem .trecho-resposta figcaption { color: var(--blue); }
.trecho-da-triagem blockquote { margin: 0; font-size: 14px; line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere; }
.gravidade-final { border: 0; padding: 0; margin: 16px 0 0; }
.gravidade-final legend { font-size: 13px; font-weight: 800; padding: 0; }
.gravidade-final .modal-ajuda { color: var(--muted); font-size: 12px; margin: 4px 0 8px; }
.gravidade-opcao { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; margin: 8px 0 0; cursor: pointer; font-weight: 400; transition: border-color var(--rapido) var(--ease), background-color var(--rapido) var(--ease); }
.gravidade-opcao:hover { border-color: var(--borda-controle-hover); }
.gravidade-opcao:has(input:checked) { border-color: var(--blue); background: #f3f5ff; }
.gravidade-opcao input[type="radio"] { flex: none; box-sizing: border-box; width: 1.1rem; height: 1.1rem; min-height: 0; padding: 0; margin: 2px 0 0; border: 0; border-radius: 50%; box-shadow: none; accent-color: var(--blue); }
.gravidade-opcao input[type="radio"]:focus { box-shadow: none; outline: none; }
.gravidade-opcao input[type="radio"]:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.gravidade-opcao strong { display: block; font-size: 14px; }
.gravidade-opcao small { color: var(--muted); font-size: 12px; }
/* RF-29: participação da turma no modal de encerramento. Como nos rádios da sinalização (#38), os rádios
   desfazem as regras globais "select, input, textarea" (altura 46px, padding, borda) e "form input" (largura
   100%), e o rótulo desfaz "form label" (display block); os seletores começam pela classe do formulário para
   ganhar delas em especificidade. */
.encerramento-form .engajamento { border: 0; margin: 0 0 4px; padding: 0; min-width: 0; }
.encerramento-form .engajamento legend { padding: 0; font-size: 13px; font-weight: 800; }
.encerramento-form .modal-ajuda { color: var(--muted); font-size: 12px; margin: 4px 0 8px; }
.encerramento-form .engajamento-opcao { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; margin: 8px 0 0; cursor: pointer; font-size: 14px; font-weight: 400; transition: border-color var(--rapido) var(--ease), background-color var(--rapido) var(--ease); }
.encerramento-form .engajamento-opcao:hover { border-color: var(--borda-controle-hover); }
.encerramento-form .engajamento-opcao:has(input:checked) { border-color: var(--blue); background: #f3f5ff; }
.engajamento-opcao input[type="radio"] { flex: none; box-sizing: border-box; width: 1.1rem; height: 1.1rem; min-height: 0; padding: 0; margin: 0; border: 0; border-radius: 50%; box-shadow: none; accent-color: var(--blue); }
.engajamento-opcao input[type="radio"]:focus { box-shadow: none; outline: none; }
.engajamento-opcao input[type="radio"]:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.engajamento-opcao small { color: var(--muted); font-size: 12px; margin-left: 6px; }
.encerramento-form .field-error { margin-bottom: 12px; }
/* O "Encerrar sessão" vem primeiro no HTML, para ser o botão do Enter; o rodapé invertido o mantém à direita,
   como nos outros modais. Com row-reverse, flex-start encosta os botões à direita. */
.encerramento-form .modal-footer { flex-direction: row-reverse; justify-content: flex-start; }
.summary-participacao { margin: 16px 0 0; color: var(--muted); font-size: 14px; }
.summary-participacao strong { color: var(--ink); }

/* RF-26: consulta do log, só leitura, com filtros de período, usuário e ação. */
.log-filtros { grid-template-columns: 1fr 1fr 1.3fr 1.3fr auto; margin-bottom: 18px; }
.log-filtros .filter-actions { display: flex; gap: 8px; }
.log-destaque td:first-child { box-shadow: inset 5px 0 0 var(--red); }
.log-table td:nth-child(3) { white-space: nowrap; }

@media (max-width: 760px) {
  .log-filtros { grid-template-columns: 1fr 1fr; }
  .log-filtros .filter-actions { grid-column: 1 / -1; }
  .pagination-row { justify-content: stretch; }
  .pagination-row .btn { flex: 1; }
}

/* Quiz da turma (RF-28), como no protótipo: a questão projetada à esquerda e a contagem do professor à direita. */
.quiz-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) 360px; margin: 0; }
.quiz-projected { background: white; display: flex; flex-direction: column; }
.quiz-head { background: var(--blue); color: white; min-height: 112px; padding: 20px 4vw; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.quiz-head p { font-size: 13px; font-weight: 800; letter-spacing: .11em; margin: 0 0 5px; }
.quiz-head h1 { font-size: 32px; margin: 0; color: white; }
.quiz-dots { display: flex; gap: 10px; }
.quiz-dots span { width: 16px; height: 16px; border: 2px solid white; border-radius: 50%; }
.quiz-dots span.active { background: var(--yellow); border-color: var(--yellow); }
.quiz-questao { flex: 1; display: flex; flex-direction: column; }
.question-block { padding: 34px 4vw 20px; }
.question-block > span { color: var(--blue); font-size: 15px; font-weight: 800; }
.question-block h2 { font-size: clamp(29px, 3vw, 43px); line-height: 1.18; margin: 9px 0 0; max-width: 1000px; }
.answers { padding: 10px 4vw 25px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; flex: 1; align-content: start; }
.answer { border: 3px solid var(--ink); border-radius: 16px; padding: 20px; display: flex; align-items: center; gap: 18px; font-size: clamp(22px, 2.3vw, 32px); font-weight: 700; min-height: 110px; }
.answer strong { width: 55px; height: 55px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center; background: var(--yellow); color: var(--ink); }
.ai-footer { background: var(--yellow); color: var(--ink); text-align: center; font-weight: 800; font-size: 14px; padding: 11px; }
.quiz-panel { border-left: 1px solid var(--line); padding: 28px 24px; background: #fafbff; }
.quiz-panel h2 { font-size: 25px; margin-bottom: 7px; }
.quiz-panel > p:not(.eyebrow):not(.field-error) { color: var(--muted); font-size: 13px; }
.quiz-panel > input { width: 100%; }
.count-list { border: 0; padding: 0; margin: 20px 0 0; min-width: 0; }
.count-list legend { font-size: 13px; font-weight: 800; padding: 0; margin-bottom: 4px; }
.count-row { display: grid; grid-template-columns: 1fr 40px 64px 40px; align-items: center; gap: 7px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.count-row > strong { width: 31px; height: 31px; border-radius: 50%; background: var(--yellow); display: grid; place-items: center; }
.count-row button { width: 38px; height: 38px; border: 1px solid var(--blue); border-radius: 50%; background: white; color: var(--blue); font-size: 22px; cursor: pointer; }
.count-row input { width: 100%; min-height: 38px; padding: 4px; text-align: center; font-size: 18px; font-weight: 800; }
.total-count { background: var(--surface); border-radius: 10px; padding: 13px; display: flex; justify-content: space-between; margin: 17px 0; }
.total-count.invalid { background: #fff0f0; border: 2px solid var(--red); }
.quiz-actions { display: flex; gap: 10px; margin-top: 10px; }
.quiz-voltar { margin: 18px 0 0; }
.quiz-questao[hidden], .count-list[hidden], .quiz-actions [hidden], .count-row button[hidden] { display: none; }
/* Sem JavaScript, os botões de passo ficam ocultos e o campo ocupa a linha. */
.count-row:has(button[hidden]) { grid-template-columns: 1fr 96px; }
@media (max-width: 1000px) {
  .quiz-page { grid-template-columns: 1fr; }
  .quiz-panel { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 700px) {
  .answers { grid-template-columns: 1fr; }
  .quiz-head, .question-block, .answers { padding-left: 20px; padding-right: 20px; }
  .answer { min-height: 90px; }
}

/* RF-30: convite à sessão de controle na página inicial, como no protótipo. */
.control-banner { display: flex; justify-content: space-between; align-items: center; gap: 20px; background: var(--surface); border-left: 6px solid var(--blue); border-radius: 0 14px 14px 0; padding: 15px 18px; margin: 0 0 30px; }
.control-banner strong { font-size: 14px; }
.control-banner p { color: var(--muted); font-size: 12px; margin: 4px 0 0; }
@media (max-width: 700px) { .control-banner { align-items: stretch; flex-direction: column; } }
.modal-aviso { margin: 16px 24px 0; }
.quiz-resumo { display: flex; justify-content: space-between; align-items: center; gap: 16px; text-align: left; }
.quiz-resumo h2 { font-size: 18px; margin: 0 0 4px; }
.quiz-resumo p { color: var(--muted); margin: 0; }

/* Quiz no editor do cenário (RF-27), como no protótipo: o cabeçalho com a contagem e uma ficha por questão. */
.quiz-builder { margin-top: 22px; }
.quiz-builder [hidden] { display: none; }
.quiz-builder-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.quiz-builder-head .skills-title { margin-bottom: 3px; }
.quiz-builder-head small { display: block; color: var(--muted); margin-bottom: 8px; }
.quiz-da-ia { display: grid; gap: 10px; justify-items: start; margin: 10px 0; }
.quiz-questoes { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 14px; }
.quiz-questao-form { border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: white; }
.quiz-questao-form textarea, .quiz-questao-form input:not([type="radio"]) { width: 100%; }
.quiz-questao-topo { display: flex; justify-content: space-between; align-items: center; }
.quiz-alternativas { border: 0; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.quiz-alternativas legend { font-size: 13px; font-weight: 800; margin-bottom: 7px; padding: 0; }
.quiz-alternativa { display: grid; grid-template-columns: 22px 26px 1fr; align-items: center; gap: 8px; }
.quiz-alternativa input[type="radio"] { width: 18px; height: 18px; accent-color: var(--green); }

/* Painel de métricas (RF-31, RF-32), como no protótipo. */
.export-actions { display: flex; align-items: center; gap: 12px; }
.metrics-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; align-items: end; background: var(--surface); border: 0; margin-bottom: 12px; }
.metrics-filters label { display: block; font-size: 12px; font-weight: 800; margin-bottom: 7px; }
.metrics-filters select, .metrics-filters input { width: 100%; }
.metrics-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; grid-column: span 2; }
.metrics-dates[hidden] { display: none; }
.metrics-filters-actions .btn { width: 100%; }
.metrics-filters-error, .metrics-filters-note { grid-column: 1 / -1; margin: 0; }
.metrics-filters-note { color: var(--muted); font-size: 12px; }
.metrics-period { color: var(--muted); font-size: 13px; font-weight: 700; margin: 0 0 14px; }
.metric-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.metric-cards .card { position: relative; overflow: hidden; }
.metric-cards p { color: var(--muted); font-size: 12px; font-weight: 700; margin: 0 0 7px; padding-right: 36px; }
.metric-cards strong { display: block; font-size: 31px; color: var(--blue); }
.metric-cards small { display: block; margin-top: 7px; color: var(--muted); font-size: 11px; }
.metric-icon { position: absolute; right: 14px; top: 14px; width: 30px; height: 30px; border-radius: 50%; background: var(--yellow); display: grid; place-items: center; font-weight: 800; font-size: 10px; }
.metrics-out { color: var(--muted); font-size: 12px; margin: 10px 0 0; }
.insufficient-note { display: flex; gap: 13px; border-left: 5px solid var(--yellow); background: #fff8d9; padding: 15px 18px; border-radius: 0 12px 12px 0; }
.insufficient-note > span { width: 25px; height: 25px; border-radius: 50%; background: var(--yellow); display: grid; place-items: center; flex: 0 0 auto; font-weight: 800; }
.insufficient-note p { margin: 4px 0 0; color: #494949; font-size: 13px; }
.chart-context { font-size: 12px; font-weight: 700; }
.metrics-page .chart-card { border-radius: 0 0 var(--radius) var(--radius); }
.chart-legend { display: flex; justify-content: flex-end; gap: 18px; font-size: 12px; font-weight: 700; }
.chart-legend span { display: flex; align-items: center; gap: 6px; }
.chart-legend i { width: 12px; height: 12px; border-radius: 3px; display: block; }
.legend-simulation { background: var(--blue); }
.legend-lecture { background: var(--yellow); border: 1px solid var(--ink); }
.chart-box { position: relative; height: 310px; margin-top: 18px; }
.chart-insight { margin: 22px 0 0; padding: 12px; background: var(--surface); border-radius: 10px; display: flex; flex-wrap: wrap; gap: 7px; font-size: 13px; }
.chart-insight strong { color: var(--blue); }
.chart-empty, .chart-note { color: var(--muted); font-size: 13px; margin: 0; }
.chart-note { margin-top: 12px; }
.metrics-page th[scope="row"] { text-align: left; text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--ink); background: white; }
.cell-muted { color: var(--muted); font-style: italic; }
.privacy-metrics-note { position: sticky; bottom: 10px; width: fit-content; margin: 24px auto 0; display: flex; align-items: center; gap: 9px; background: var(--yellow); border: 2px solid var(--ink); border-radius: 999px; padding: 10px 16px; font-size: 12px; z-index: 3; }
.privacy-metrics-note span { width: 21px; height: 21px; border: 2px solid currentColor; border-radius: 50%; display: grid; place-items: center; font-weight: 800; flex: 0 0 auto; }
@media (max-width: 960px) { .metric-cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) {
  .metric-cards, .metrics-dates { grid-template-columns: 1fr; }
  .metrics-dates { grid-column: auto; }
  .export-actions { flex-direction: column; align-items: stretch; }
  .chart-box { height: 250px; }
  .privacy-metrics-note { border-radius: 16px; }
}
