/* ============ Barra de acessibilidade do Portal (TR 1.33) ============ */
:root{--a11y-filter:none}

/* Filtros visuais (escala de cinza / saturação / monocromático) aplicados SÓ ao
   conteúdo do site — nunca ao próprio painel de acessibilidade. */
.ticker,.demo,#nav,#subbar,#app,footer,#totop{filter:var(--a11y-filter,none)}

/* Espaçamento (leitura) */
html.a11y-spacing #app,html.a11y-spacing #nav,html.a11y-spacing footer{letter-spacing:.06em;word-spacing:.16em}
html.a11y-spacing #app *{line-height:1.9 !important}

/* Alto contraste — redefine os tokens do tema. !important vence o --brand inline (aplicarMarca). */
html.a11y-contrast{
  --bg:#000;--surface:#000;--surface2:#0b0b0b;--ink:#fff;--muted:#ffd400;--line:#ffffff;
  --brand:#ffd400 !important;--brand2:#ffd400 !important;--brandSoft:rgba(255,212,0,.20) !important;
  --live:#ff8a8a;--ok:#5be08a;
}
html.a11y-contrast body{background:#000}
html.a11y-contrast .a11y-tgl[aria-pressed="true"]{color:#111}

/* Ocultar imagens (mantém ícones SVG inline e o layout) */
html.a11y-noimg img{visibility:hidden}
html.a11y-noimg [style*="background-image"]{background-image:none !important}

/* Cursor ampliado */
html.a11y-bigcursor,html.a11y-bigcursor *{cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 24 24'%3E%3Cpath d='M4 2l6 16 2.2-6.4L18.6 9.2z' fill='%23000' stroke='%23fff' stroke-width='1.3' stroke-linejoin='round'/%3E%3C/svg%3E") 4 2,auto !important}

/* Guia de leitura */
.a11y-ruler{position:fixed;left:0;right:0;height:34px;pointer-events:none;z-index:390;
  background:rgba(255,225,0,.16);border-top:2px solid rgba(0,0,0,.6);border-bottom:2px solid rgba(0,0,0,.6);display:none}
html.a11y-ruler-on .a11y-ruler{display:block}

/* Botão flutuante (cor fixa, independe do tema, sempre legível) */
.a11y-fab{position:fixed;left:16px;bottom:16px;z-index:400;width:48px;height:48px;border-radius:50%;
  border:2px solid #fff;background:var(--brand,#1a56db);color:#fff;box-shadow:0 8px 24px rgba(0,0,0,.30);
  display:grid;place-items:center;cursor:pointer}
.a11y-fab:focus-visible{outline:3px solid #fff;outline-offset:2px}
/* Alto contraste: a marca vira amarela — força um par legível no botão */
html.a11y-contrast .a11y-fab{background:#000;color:#ffd400;border-color:#ffd400}
.a11y-fab svg{width:26px;height:26px}

/* Painel */
.a11y-panel{position:fixed;left:16px;bottom:74px;z-index:400;width:296px;max-width:calc(100vw - 32px);
  max-height:76vh;overflow:auto;background:var(--surface,#fff);color:var(--ink,#111);
  border:1px solid var(--line,#ddd);border-radius:14px;box-shadow:0 18px 50px rgba(0,0,0,.34);padding:14px;display:none}
.a11y-panel.open{display:block}
.a11y-panel h3{margin:0 0 3px;font-size:1rem;font-weight:800}
.a11y-panel .a11y-sub{font-size:.74rem;color:var(--muted,#666);line-height:1.4;margin-bottom:8px}
.a11y-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 0;border-bottom:1px solid var(--line,#eee)}
.a11y-row:last-of-type{border-bottom:0}
.a11y-row .lbl{font-size:.86rem;font-weight:600}
.a11y-step{display:flex;align-items:center;gap:6px}
.a11y-step button,.a11y-tgl{border:1px solid var(--line,#ccc);background:var(--surface2,#f1f1f1);color:var(--ink,#111);
  border-radius:9px;min-width:36px;height:34px;font-weight:800;font-size:.84rem;cursor:pointer;padding:0 10px}
.a11y-step button:focus-visible,.a11y-tgl:focus-visible{outline:2px solid var(--brand,#1a56db);outline-offset:1px}
.a11y-tgl{min-width:82px}
.a11y-tgl[aria-pressed="true"]{background:var(--brand,#1a56db);color:#fff;border-color:var(--brand,#1a56db)}
.a11y-step .val{min-width:52px;text-align:center;font-size:.8rem;font-weight:700}
.a11y-reset{margin-top:12px;width:100%;border:1px solid var(--line,#ccc);background:transparent;color:var(--ink,#111);
  border-radius:10px;height:38px;font-weight:800;cursor:pointer}
.a11y-reset:hover{background:var(--surface2,#f1f1f1)}
