/* =====================================================================
   Banco Civil – tema "Pista" (design system de landonorris.com em azul
   e grafite, o mesmo do protótipo do treino-app: tema.css/professor.html).
   ===================================================================== */
:root {
  --blue: #0B5CFF; --sky: #7DB0FF; --black: #0E1116; --slate: #16191E;
  --graphite: #1F232A; --steel: #414854; --fog: #E9ECF0; --white: #F6F7F9; --orange: #ff6b00;
  --ease: cubic-bezier(0.65, 0.05, 0, 1); --dur: 0.75s; --dur-fast: 0.35s;
  --radius: 16px; --radius-btn: 9px; --radius-pill: 100px;
  --ui: "Mona Sans", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", "Times New Roman", serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --tap: 44px;
}
:root[data-theme="dark"] {
  --paper: #16191E; --surface: #1F232A; --surface-2: #282D35;
  --ink: #EEF1F5; --ink-2: #CDD3DC; --muted: #99A2AF;
  --rule: #282D35; --rule-strong: #414854; --contour: rgba(205, 211, 220, 0.07);
  --accent: #0B5CFF; --accent-ink: #FFFFFF; --accent-text: #7DB0FF; --accent-soft: rgba(11, 92, 255, 0.18);
  --ok: #5FC28C; --ok-soft: rgba(95, 194, 140, 0.12); --warn: #ff8a3d; --warn-soft: rgba(255, 107, 0, 0.14);
  --danger: #ff7a66; --danger-soft: rgba(255, 122, 102, 0.12);
  --shadow-lift: 0 10px 30px rgba(0, 0, 0, 0.45);
  --figura-bg: #F6F7F9;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --paper: #E9ECF0; --surface: #F6F7F9; --surface-2: #DDE2E8;
  --ink: #111418; --ink-2: #39404A; --muted: #56606D;
  --rule: #CDD3DB; --rule-strong: #AEB6C1; --contour: rgba(17, 20, 24, 0.08);
  --accent: #0B5CFF; --accent-ink: #FFFFFF; --accent-text: #0B4FDB; --accent-soft: #D6E3FF;
  --ok: #17734A; --ok-soft: #DDEFE5; --warn: #a54600; --warn-soft: #fbe3d0;
  --danger: #a3291c; --danger-soft: #f6dcd8;
  --shadow-lift: 0 10px 30px rgba(17, 20, 24, 0.14);
  --figura-bg: #FFFFFF;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--ui); font-size: 16px; line-height: 1.5;
  font-variation-settings: "wdth" 100; -webkit-font-smoothing: antialiased;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-text); }
img { max-width: 100%; }
p { margin: 0; }
h1, h2, h3 { margin: 0; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 6px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------ tipografia */
.eyebrow { font-size: 11px; font-weight: 650; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.display { font-weight: 820; font-variation-settings: "wdth" 118; text-transform: uppercase; line-height: 0.88; letter-spacing: -0.02em; }
.serif { font-family: var(--serif); font-style: italic; font-weight: 400; text-transform: none; letter-spacing: -0.01em; color: var(--accent-text); font-variation-settings: normal; }
h2.titulo, .widget-head h2 { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }

/* ----------------------------------------------------------------- shell */
.shell { display: flex; min-height: 100dvh; }
.sidebar {
  width: 248px; flex: none; position: sticky; top: 0; height: 100dvh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 26px; padding: 22px 14px;
  border-right: 1px solid var(--rule); background: var(--surface);
  transition: width var(--dur) var(--ease);
}
.sidebar-topo { padding: 0 8px; }
.marca { display: flex; flex-direction: column; line-height: 0.86; text-transform: uppercase; text-decoration: none; color: var(--ink); }
.marca b { font-weight: 850; font-variation-settings: "wdth" 115; font-size: 24px; letter-spacing: -0.01em; }
.marca i { font-family: var(--serif); font-size: 25px; text-transform: none; color: var(--accent-text); }
.marca-curta { display: none; font-weight: 850; font-variation-settings: "wdth" 125; font-size: 22px; text-decoration: none; color: var(--ink); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-rotulo { padding: 14px 12px 6px; }
.nav a {
  display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 12px;
  border-radius: var(--radius-btn); color: var(--ink-2); text-decoration: none; font-size: 14.5px; font-weight: 600;
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a.ativa, .nav a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }
.nav a svg { flex: none; }
.sidebar-foot { margin-top: auto; display: grid; gap: 8px; }
.sidebar-foot .btn { width: 100%; justify-content: flex-start; }
.contagem { padding: 14px; border-radius: 12px; border: 1px solid var(--rule); display: flex; flex-direction: column; gap: 2px; }
.contagem b { font-size: 44px; line-height: 0.85; font-weight: 860; font-variation-settings: "wdth" 122; letter-spacing: -0.03em; color: var(--accent-text); }
.contagem span { font-size: 12.5px; color: var(--muted); }

:root[data-barra="recolhida"] .sidebar { width: 76px; }
:root[data-barra="recolhida"] .nav-texto, :root[data-barra="recolhida"] .nav-rotulo, :root[data-barra="recolhida"] .marca,
:root[data-barra="recolhida"] .btn-texto, :root[data-barra="recolhida"] .contagem span { display: none; }
:root[data-barra="recolhida"] .contagem { padding: 10px 4px; align-items: center; }
:root[data-barra="recolhida"] .contagem b { font-size: 24px; }
:root[data-barra="recolhida"] .marca-curta { display: block; text-align: center; }
:root[data-barra="recolhida"] .nav a { justify-content: center; padding: 0; }
:root[data-barra="recolhida"] .sidebar-foot .btn { justify-content: center; padding: 0; }
:root[data-barra="recolhida"] .btn-recolher svg { transform: rotate(180deg); }

.main { flex: 1; min-width: 0; position: relative; isolation: isolate; overflow-x: clip; }
.page { max-width: 1180px; padding: 0 40px 40px; animation: entra var(--dur) var(--ease); }
@keyframes entra { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.contorno {
  position: absolute; inset: 0 0 auto 0; height: 380px; width: 100%; pointer-events: none; z-index: -1; overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 45%, transparent); mask-image: linear-gradient(#000 45%, transparent);
}
.contorno path { fill: none; stroke: var(--contour); stroke-width: 1.2; }
.carregando { padding: 60px 0; color: var(--muted); }
.rodape { max-width: 1180px; padding: 0 40px 32px; color: var(--muted); font-size: 12.5px; }

.page-head { padding: 44px 0 28px; display: flex; flex-direction: column; gap: 12px; }
.page-head h1 { font-size: clamp(44px, 6vw, 76px); }
.page-head .sub { color: var(--ink-2); font-size: 16px; max-width: 64ch; }
.page-head .linha { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ----------------------------------------------------------------- botões */
.btn {
  min-height: var(--tap); padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--radius-btn); border: 1px solid var(--rule-strong); background: transparent;
  font-size: 13px; font-weight: 750; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink);
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), transform 0.15s ease;
}
.btn:hover { border-color: var(--ink); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn.peq, .btn-sm { min-height: 36px; padding: 0 12px; font-size: 12px; }
.btn.prim, .btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.prim:hover, .btn-primary:hover { border-color: var(--accent); }
.btn.link { border: 0; min-height: 0; padding: 0; color: var(--accent-text); background: none; }
.btn.perigo { color: var(--danger); }
.roll { display: inline-grid; overflow: hidden; height: 1.2em; line-height: 1.2em; }
.roll > span { grid-area: 1 / 1; transition: transform var(--dur) var(--ease); }
.roll > span + span { transform: translateY(110%); }
.btn:hover .roll > span:first-child, .btn:focus-visible .roll > span:first-child { transform: translateY(-110%); }
.btn:hover .roll > span + span, .btn:focus-visible .roll > span + span { transform: translateY(0); }

.seg { display: inline-flex; flex-wrap: wrap; padding: 3px; border-radius: 22px; border: 1px solid var(--rule-strong); gap: 2px; }
.seg button { min-height: 34px; padding: 0 14px; border: 0; border-radius: var(--radius-pill); background: transparent; font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }

.chip {
  display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: var(--radius-pill);
  border: 1px solid var(--rule-strong); font-size: 12px; font-weight: 600; color: var(--ink-2); white-space: nowrap; text-decoration: none;
}
.chip.brand { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip.ok { border-color: var(--ok); color: var(--ok); }
.chip.err { border-color: var(--danger); color: var(--danger); }
.chip.warn { border-color: var(--warn); color: var(--warn); }

/* ------------------------------------------------------------ superfícies */
.painel, .card, .widget { border-radius: var(--radius); background: var(--surface); border: 1px solid var(--rule); }
.secao, .widget { padding: 18px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.secao h2 { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.widget-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* ------------------------------------------------------------- filtros */
.ferramentas { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.ferr-linha { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.busca {
  flex: 1; min-width: 220px; min-height: var(--tap); display: flex; align-items: center; gap: 10px; padding: 0 14px;
  border-radius: var(--radius-btn); border: 1px solid var(--rule-strong); background: var(--surface);
}
.busca input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 15px; }
.busca:focus-within { border-color: var(--accent-text); }
.selects { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.campo label { display: block; margin-bottom: 5px; }
.campo select, .campo input[type=number], .selects select {
  width: 100%; min-height: 40px; padding: 0 10px; border-radius: var(--radius-btn);
  border: 1px solid var(--rule-strong); background: var(--surface); font-size: 14px; color: var(--ink);
}
.campo { margin-bottom: 14px; }
.total-filtro { font-size: 13px; color: var(--muted); }
.total-filtro b { color: var(--ink); font-size: 15px; font-weight: 750; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; }
.cad-ativo { display: flex; align-items: center; gap: 10px; }

/* -------------------------------------------------------- cartão da questão */
.questao { overflow: hidden; }
.q-cab { display: flex; align-items: center; gap: 16px; padding: 16px 18px 14px; border-bottom: 1px solid var(--rule); }
.q-num { font-size: 52px; line-height: 0.8; font-weight: 870; font-variation-settings: "wdth" 125; color: var(--accent-text); letter-spacing: -0.03em; flex: none; }
.q-num small { font-size: 14px; font-weight: 650; color: var(--muted); letter-spacing: 0; margin-left: 2px; font-variation-settings: "wdth" 100; }
.q-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.q-info strong { font-size: 15px; font-weight: 700; line-height: 1.25; }
.q-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.q-id { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.q-ferr { display: flex; gap: 6px; flex: none; align-self: flex-start; }
.icone {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: var(--radius-btn);
  border: 1px solid var(--rule-strong); background: transparent; color: var(--ink-2); text-decoration: none;
  transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.icone:hover { border-color: var(--ink); color: var(--ink); }
.icone.on { color: var(--orange); border-color: var(--orange); }
.icone svg { width: 17px; height: 17px; }
.q-trilha { display: none; }
.q-corpo { padding: 18px 18px 4px; }
.enunciado { font-size: 16px; line-height: 1.65; color: var(--ink); }
.enunciado sup, .alt-txt sup { font-size: .72em; }
.figura { background: var(--figura-bg); border-radius: 12px; padding: 10px; margin: 2px 0 8px; }
.figura img { display: block; width: 100%; height: auto; margin: 0 auto; }
details.apoio { border: 1px dashed var(--rule-strong); border-radius: 12px; margin-bottom: 16px; }
details.apoio summary { cursor: pointer; padding: 10px 14px; font-size: 11px; font-weight: 650; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
details.apoio .figura { margin: 0 10px 10px; }

.alts { list-style: none; padding: 0; margin: 16px 0 6px; display: grid; gap: 8px; }
.alt {
  display: grid; grid-template-columns: 34px 1fr auto; align-items: start; gap: 12px; padding: 10px 12px;
  border-radius: 12px; background: var(--paper); border: 1px solid var(--rule); cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease);
}
.alt:hover { border-color: var(--rule-strong); }
.alt .letra {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: var(--surface-2); font-weight: 850; font-variation-settings: "wdth" 120; font-size: 15px; color: var(--ink);
}
.alt .alt-txt { padding-top: 6px; font-size: 15px; }
.alt .riscar { opacity: 0; border: 0; background: none; color: var(--muted); font-size: 14px; padding: 6px; border-radius: 6px; }
.alt:hover .riscar, .alt.riscada .riscar { opacity: 1; }
.alt.sel { border-color: var(--accent-text); }
.alt.sel .letra { background: var(--accent); color: var(--accent-ink); }
.alt.riscada .alt-txt, .alt.riscada .letra { text-decoration: line-through; opacity: .4; }
.alts.respondida .alt { cursor: default; }
.alt.certa { border-color: var(--ok); background: var(--ok-soft); }
.alt.certa .letra { background: var(--ok); color: #0e1116; }
.alt.errada { border-color: var(--danger); background: var(--danger-soft); }
.alt.errada .letra { background: var(--danger); color: #0e1116; }
.alts.so-letras { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.alts.so-letras .alt { grid-template-columns: 1fr; justify-items: center; }
.alts.so-letras .alt-txt, .alts.so-letras .riscar { display: none; }

.q-rodape { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 18px 18px; }
.feedback { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 2px; }
.feedback .res { font-size: 22px; line-height: 1; font-weight: 850; font-variation-settings: "wdth" 118; text-transform: uppercase; letter-spacing: -0.01em; }
.feedback .res.ok { color: var(--ok); }
.feedback .res.err { color: var(--danger); }
.feedback small { font-size: 13px; color: var(--muted); }
.nota { padding: 0 18px 18px; }
.nota textarea { width: 100%; min-height: 84px; border-radius: var(--radius-btn); border: 1px solid var(--rule-strong); padding: 10px 12px; background: var(--paper); resize: vertical; font-size: 14px; }
.nota textarea:focus { outline: none; border-color: var(--accent-text); }
.nota .dica { font-size: 12px; color: var(--muted); margin-top: 4px; }

.nav-q { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 14px 0; flex-wrap: wrap; }
.nav-q .pos { font-size: 13px; color: var(--muted); }
.mapa { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.mapa button { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--rule); background: var(--surface); font-size: 12px; font-weight: 750; color: var(--ink-2); padding: 0; font-variant-numeric: tabular-nums; }
.mapa button:hover { border-color: var(--rule-strong); }
.mapa button.atual { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.mapa button.ok { border-color: var(--ok); color: var(--ok); }
.mapa button.err { border-color: var(--danger); color: var(--danger); }
.mapa button.feita { border-color: var(--accent-text); color: var(--accent-text); }
.atalhos { font-size: 12px; color: var(--muted); margin-top: 14px; }
kbd { font-family: var(--mono); font-size: 11px; border: 1px solid var(--rule-strong); border-bottom-width: 2px; border-radius: 4px; padding: 0 4px; }
.vazio { padding: 44px 20px; text-align: center; color: var(--ink-2); display: flex; flex-direction: column; align-items: center; gap: 14px; }

/* ----------------------------------------------------------------- stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 12px; }
.stat {
  padding: 18px 18px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: 4px; min-height: 148px; justify-content: flex-end; position: relative;
}
.stat .k { font-size: 11px; font-weight: 650; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); position: absolute; top: 16px; left: 18px; right: 18px; }
.stat .v { font-size: 64px; line-height: 0.85; font-weight: 860; font-variation-settings: "wdth" 122; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat .v small { font-size: 22px; letter-spacing: 0; }
.stat .n { font-size: 13px; color: var(--muted); }
.stat[data-tom="ok"] .v { color: var(--ok); }
.stat[data-tom="warn"] .v { color: var(--warn); }
.stat[data-tom="err"] .v { color: var(--danger); }
.stat[data-tom="accent"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.stat[data-tom="accent"] .k, .stat[data-tom="accent"] .n { color: rgba(255, 255, 255, 0.82); }

.duas { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; }

table.tab { width: 100%; border-collapse: collapse; font-size: 14px; }
.tab th { text-align: left; font-size: 11px; font-weight: 650; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding: 8px; border-bottom: 1px solid var(--rule); }
.tab td { padding: 10px 8px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.tab tr:last-child td { border-bottom: 0; }
.tab td.num, .tab th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tab a { color: var(--ink); text-decoration: none; font-weight: 600; }
.tab a:hover { color: var(--accent-text); }
.barra { height: 8px; border-radius: 8px; background: var(--surface-2); overflow: hidden; display: flex; min-width: 80px; }
.barra i { display: block; height: 100%; transition: width var(--dur) var(--ease); }
.barra .b-ok { background: var(--ok); }
.barra .b-err { background: var(--danger); }
.lista-hist { list-style: none; padding: 0; margin: 0; }
.lista-hist li { display: flex; gap: 12px; align-items: center; padding: 10px 6px; border-radius: 10px; }
.lista-hist li + li { border-top: 1px solid var(--rule); }
.lista-hist a { flex: 1; min-width: 0; text-decoration: none; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; font-weight: 600; }
.lista-hist small { color: var(--muted); font-size: 13px; }
.day-badge { flex: none; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); font-weight: 850; font-variation-settings: "wdth" 120; font-size: 15px; }
.day-badge.ok { background: var(--ok-soft); color: var(--ok); }
.day-badge.err { background: var(--danger-soft); color: var(--danger); }

/* --------------------------------------------------------------- cadernos */
h2.titulo { display: flex; align-items: center; gap: 10px; margin: 8px 0 12px; }
h2.titulo::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.cadernos { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-bottom: 24px; }
.caderno { border-radius: 20px; background: var(--surface); border: 1px solid var(--rule); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.caderno-topo { display: flex; align-items: center; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--rule); }
.caderno-letra { font-size: 52px; line-height: 0.8; font-weight: 870; font-variation-settings: "wdth" 125; color: var(--accent-text); letter-spacing: -0.03em; }
.caderno h3 { font-size: 15px; font-weight: 700; line-height: 1.25; }
.caderno .desc { font-size: 12.5px; color: var(--muted); }
.caderno .acoes { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }

/* ----------------------------------------------------------------- edital */
.edital-lista { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
.edital-lista li { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--rule); font-size: 14.5px; }
.edital-lista .n { flex: none; width: 28px; font-weight: 850; font-variation-settings: "wdth" 120; color: var(--muted); font-variant-numeric: tabular-nums; }
.edital-lista .t { flex: 1; min-width: 0; }

/* --------------------------------------------------------------- simulado */
.simu-conf { max-width: 620px; padding: 20px; }
.simu-barra { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; margin: 28px 0 14px; flex-wrap: wrap; }
.relogio { font-size: 30px; line-height: 1; font-weight: 860; font-variation-settings: "wdth" 122; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--accent-text); }
.relogio.alerta { color: var(--danger); }

.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: var(--radius-btn); font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: .35s var(--ease); z-index: 50; max-width: calc(100% - 32px); }
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ------------------------------------------------------------- responsivo */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .duas { grid-template-columns: 1fr; }
  .selects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .shell { flex-direction: column; }
  .sidebar { transition: none; width: 100% !important; height: auto; position: sticky; top: 0; z-index: 20; flex-direction: row; align-items: center; gap: 8px; padding: 8px 12px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--rule); }
  .sidebar-topo, .nav-rotulo, .btn-recolher, .marca-curta { display: none !important; }
  .nav { flex-direction: row; }
  .nav a { white-space: nowrap; min-height: 38px; }
  .sidebar-foot { margin: 0; display: flex; align-items: center; }
  .sidebar-foot .btn-texto, .contagem span { display: none; }
  .contagem { padding: 4px 10px; flex-direction: row; align-items: baseline; gap: 4px; border-radius: var(--radius-pill); }
  .contagem b { font-size: 20px; }
  .contagem b::after { content: "d"; font-size: 12px; margin-left: 1px; color: var(--muted); }
  .sidebar-foot .btn { width: var(--tap); padding: 0; justify-content: center; }
  .page { padding: 0 16px 40px; }
  .rodape { padding: 0 16px 28px; }
  .page-head { padding-top: 28px; }
  .stat { min-height: 120px; }
  .stat .v { font-size: 48px; }
  .q-num { font-size: 40px; }
  .q-cab { flex-wrap: wrap; }
  .q-ferr { order: 3; width: 100%; }
  .edital-lista { grid-template-columns: 1fr; }
  .tab .ocultar-m { display: none; }
}
@media (max-width: 480px) {
  .selects { grid-template-columns: 1fr; }
  .q-cab, .q-corpo, .q-rodape, .nota { padding-left: 14px; padding-right: 14px; }
  .alts.so-letras { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* texto de apoio (Português/Inglês) aberto direto da prova original */
.apoio-acoes { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 0 14px 12px; }
.apoio-frame iframe { display: block; width: calc(100% - 20px); height: 70vh; min-height: 420px; margin: 0 10px 10px; border: 0; border-radius: 10px; background: var(--figura-bg); }
.apoio-frame:empty { display: none; }
.seg button .muted { font-weight: 600; opacity: .7; margin-left: 2px; }
.seg button[aria-pressed="true"] .muted { color: inherit; }
.veredito.aprova { border-color: var(--ok); }
.veredito.aprova p:first-of-type { color: var(--ok); }
.veredito.reprova { border-color: var(--danger); }
.veredito.reprova p:first-of-type { color: var(--danger); }
@media (max-width: 760px) { .apoio-frame iframe { height: 60vh; min-height: 320px; } }

/* nível de dificuldade estimado: 5 barrinhas */
.nivel { display: inline-flex; align-items: center; gap: 2px; min-height: 26px; padding: 0 10px 0 8px; border-radius: var(--radius-pill); border: 1px solid var(--rule-strong); font-size: 12px; font-weight: 650; color: var(--ink-2); white-space: nowrap; }
.nivel i { display: inline-block; width: 4px; height: 12px; border-radius: 2px; background: var(--surface-2); }
.nivel i:nth-child(5) { margin-right: 5px; }
.nivel.n1 i:nth-child(-n+1), .nivel.n2 i:nth-child(-n+2) { background: var(--ok); }
.nivel.n3 i:nth-child(-n+3) { background: var(--accent-text); }
.nivel.n4 i:nth-child(-n+4), .nivel.n5 i:nth-child(-n+5) { background: var(--warn); }
.nivel.n5 i:nth-child(-n+5) { background: var(--danger); }
select.ordem { min-height: 40px; padding: 0 10px; border-radius: var(--radius-btn); border: 1px solid var(--rule-strong); background: var(--surface); color: var(--ink); font-size: 13.5px; }

/* login (mesmo padrão dos outros painéis) */
.login-fundo { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: var(--paper); }
.login-fundo[hidden] { display: none; }
.login-caixa { width: min(420px, 100%); display: flex; flex-direction: column; gap: 12px; padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--rule); box-shadow: var(--shadow-lift); }
.login-caixa h1 { font-size: 46px; }
.login-caixa input, .form-col input, .form-col select { width: 100%; min-height: 42px; padding: 0 12px; border-radius: var(--radius-btn); border: 1px solid var(--rule-strong); background: var(--paper); color: var(--ink); font-size: 15px; }
.login-caixa input:focus, .form-col input:focus { outline: none; border-color: var(--accent-text); }
.login-caixa .campo, .form-col .campo { margin: 0; display: flex; flex-direction: column; gap: 5px; }
.login-erro { color: var(--danger); font-size: 13.5px; font-weight: 600; }
.login-aviso { color: var(--warn); font-size: 13.5px; font-weight: 600; }
.usuario { display: grid; gap: 6px; }
.usuario .who { display: flex; flex-direction: column; padding: 0 4px; line-height: 1.2; overflow: hidden; }
.usuario .who b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.usuario .who span { font-size: 11.5px; color: var(--muted); }
.who-acoes { display: flex; gap: 4px; flex-wrap: wrap; }
.who-acoes .btn { flex: 1; min-width: 0; padding: 0 6px; font-size: 11px; }
:root[data-barra="recolhida"] .usuario { display: none; }
.modal-fundo { position: fixed; inset: 0; z-index: 55; background: rgba(0,0,0,.55); display: grid; place-items: center; padding: 16px; }
.modal { width: min(560px, 100%); max-height: 88vh; overflow: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.form-col { display: flex; flex-direction: column; gap: 10px; }
/* aulas */
.icone.apagado { opacity: .45; }
.aulas-box:empty { display: none; }
.aulas-q { padding: 0 18px 16px; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--rule); padding-top: 14px; }
.aulas { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.aula { display: flex; align-items: center; gap: 12px; padding: 8px 4px; }
.aula + .aula { border-top: 1px solid var(--rule); }
.aula-play { flex: none; width: 38px; height: 38px; border-radius: 9px; border: 0; background: var(--accent); color: var(--accent-ink); font-size: 15px; }
.aula-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.aula-txt b { font-size: 14.5px; font-weight: 650; }
.aula-txt small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aula-txt .cert-nome, .aula-txt .cert-marcada { color: var(--ok); }
.aula-txt .cert-professor { color: var(--warn); }
.aula-tag select { max-width: 210px; min-height: 34px; border-radius: var(--radius-btn); border: 1px solid var(--rule-strong); background: var(--surface); color: var(--ink); font-size: 12.5px; }
.player { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--rule); background: #000; margin-bottom: 12px; }
.player-cab { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; background: var(--surface); }
.player iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }
@media (max-width: 760px) { .usuario { display: flex; } .usuario .who { display: none; } .who-acoes .btn { flex: none; padding: 0 10px; } .aula-tag { display: none; } }

/* comparar desempenho */
.duelo { position: relative; height: 18px; display: flex; flex-direction: column; gap: 2px; }
.duelo i { display: block; height: 8px; border-radius: 4px; }
.d-a { background: var(--accent); }
.d-b { background: var(--orange); }
.leg-a { color: var(--accent-text); font-size: 12px; font-weight: 700; }
.leg-b { color: var(--orange); font-size: 12px; font-weight: 700; }
.tab td.pos { color: var(--ok); font-weight: 700; }
.tab td.neg { color: var(--danger); font-weight: 700; }
.duelo-stat .duelo-v { display: flex; justify-content: space-between; gap: 10px; align-items: flex-end; }
.duelo-v span { display: flex; flex-direction: column; }
.duelo-v span:last-child { text-align: right; }
.duelo-v b { font-size: 40px; line-height: .9; font-weight: 860; font-variation-settings: "wdth" 122; letter-spacing: -.03em; }
.duelo-v span:first-child b { color: var(--accent-text); }
.duelo-v span:last-child b { color: var(--orange); }
.duelo-v small { font-size: 12px; color: var(--muted); }
.semanas { display: grid; grid-template-columns: repeat(8, 1fr); gap: 10px; align-items: end; height: 170px; }
.sem { display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.sem-barras { flex: 1; width: 100%; display: flex; gap: 3px; align-items: flex-end; justify-content: center; }
.sem-barras i { width: 40%; max-width: 18px; min-height: 2px; border-radius: 4px 4px 2px 2px; }
.sem small { font-size: 11px; color: var(--muted); }
.compartilhar { font-size: 14px; }
.duelo-stat.compacto .duelo-v b { font-size: 28px; white-space: nowrap; }
