/* FinTrack · Painel de acessibilidade (visão, daltonismo, audição, leitura). Classes aplicadas em <html>. */
:root{--chart-in:#1ed760;--chart-out:#ff8585;--a11y-focus:#ffd400}

/* ---------- botão e painel ---------- */
.a11y-fab{position:fixed;left:16px;bottom:16px;z-index:9998;display:grid;place-items:center;width:44px;height:44px;padding:0;border-radius:50%;border:1px solid rgba(255,255,255,.35);background:#1546b8;color:#fff;box-shadow:0 4px 14px rgba(0,0,0,.35);cursor:pointer;transition:background .15s,border-color .15s,transform .15s}
.a11y-fab svg{display:block}
.a11y-fab:hover,.a11y-fab[aria-expanded="true"]{background:#1d57d6;border-color:rgba(255,255,255,.6);transform:translateY(-1px)}
.a11y-fab:focus-visible{outline:4px solid var(--a11y-focus);outline-offset:3px}
@media(max-width:820px){.a11y-fab{bottom:84px;left:10px}}
.a11y-panel{position:fixed;left:16px;bottom:72px;z-index:9999;width:min(420px,calc(100vw - 32px));max-height:min(80vh,680px);overflow:auto;background:#0f1115;color:#f4f4f4;border:2px solid #3a4258;border-radius:20px;box-shadow:0 18px 50px rgba(0,0,0,.6);padding:16px;font:16px/1.4 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;display:none}
.a11y-panel.open{display:block}
@media(max-width:820px){.a11y-panel{left:8px;right:8px;width:auto;bottom:140px;max-height:68vh}}
.a11y-panel h2{font-size:20px;margin:0}
.a11y-note{font-size:13px;color:#b9c0d0;margin:6px 0 10px}
.a11y-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:12px}
.a11y-close{min-width:44px;height:44px;border-radius:12px;border:1px solid #3a4258;background:#1a1f2b;color:#fff;font-size:20px;cursor:pointer}
.a11y-tabs{display:grid;grid-template-columns:repeat(5,1fr);gap:6px;margin-bottom:12px}
.a11y-tabs button{display:flex;flex-direction:column;align-items:center;gap:4px;min-height:62px;padding:6px 2px;border-radius:12px;border:2px solid #2a3145;background:#161a24;color:#dfe5f5;font-size:12px;font-weight:700;cursor:pointer}
.a11y-tabs button span{font-size:22px}
.a11y-tabs button[aria-selected=true]{background:#1546b8;border-color:#8fb0ff;color:#fff}
.a11y-profiles{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.a11y-profile{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:92px;padding:10px;border-radius:16px;border:2px solid #2a3145;background:#161a24;color:#fff;font-size:15px;font-weight:700;cursor:pointer;text-align:center}
.a11y-profile span{font-size:30px}
.a11y-profile[aria-pressed=true]{background:#123b8f;border-color:#8fb0ff;box-shadow:inset 0 0 0 2px #8fb0ff}
.a11y-profile[aria-pressed=true]::after{content:"✓ Ligado";font-size:12px;color:#cfe0ff}
.a11y-row{display:flex;align-items:center;gap:12px;min-height:56px;padding:6px 4px;border-top:1px solid #22283a}
.a11y-ico{width:30px;font-size:22px;text-align:center}
.a11y-row label{flex:1;cursor:pointer;font-weight:600}
.a11y-row input[type=checkbox]{width:28px;height:28px;accent-color:#5b8cff;cursor:pointer}
.a11y-row select{min-height:44px;background:#1a1f2b;color:#fff;border:1px solid #3a4258;border-radius:10px;padding:0 8px;font-size:15px}
.a11y-btns{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:6px}
.a11y-btns button,.a11y-foot button{min-height:48px;padding:0 16px;border-radius:12px;border:1px solid #3a4258;background:#1a1f2b;color:#fff;font-size:15px;font-weight:700;cursor:pointer}
.a11y-btns button.primary{background:#1546b8;border-color:#1546b8;flex:1}
.a11y-foot{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:14px;padding-top:12px;border-top:1px solid #22283a}
.a11y-foot .a11y-note{margin:0}
.a11y-panel button:focus-visible,.a11y-panel input:focus-visible,.a11y-panel select:focus-visible{outline:3px solid var(--a11y-focus);outline-offset:2px}

/* ---------- visão ---------- */
html.a11y-zoom-115 body{zoom:1.15}html.a11y-zoom-130 body{zoom:1.3}html.a11y-zoom-150 body{zoom:1.5}
html.a11y-contrast{--bg:#000!important;--panel:#000!important;--panel2:#111!important;--text:#fff!important;--muted:#f1f1f1!important;--line:#fff!important;--green:#ffe600!important;--chart-in:#ffe600;--chart-out:#5cd2ff}
html.a11y-contrast body,html.a11y-contrast .card,html.a11y-contrast .side,html.a11y-contrast .dialog,html.a11y-contrast .authbox,html.a11y-contrast .authart{background:#000!important;color:#fff!important}
html.a11y-contrast .card,html.a11y-contrast .btn,html.a11y-contrast input,html.a11y-contrast select,html.a11y-contrast textarea{border-color:#fff!important}
html.a11y-contrast .btn.primary{background:#ffe600!important;color:#000!important}
html.a11y-contrast img:not(.owl):not(.owlbig){filter:contrast(1.15)}
html.a11y-readable-font body,html.a11y-readable-font button,html.a11y-readable-font input,html.a11y-readable-font select,html.a11y-readable-font textarea{font-family:"Atkinson Hyperlegible",Verdana,Tahoma,sans-serif!important}
html.a11y-spacing body *{letter-spacing:.06em!important;word-spacing:.16em!important;line-height:1.75!important}
html.a11y-links a,html.a11y-links button:not(.a11y-fab):not(.a11y-panel button){text-decoration:underline!important;text-underline-offset:3px}
html.a11y-links a{outline:2px dashed var(--a11y-focus);outline-offset:2px}
html.a11y-focus *:focus{outline:4px solid var(--a11y-focus)!important;outline-offset:3px!important;box-shadow:0 0 0 7px #000!important}
html.a11y-cursor,html.a11y-cursor *{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='M3 2l7 19 2.5-7.5L20 11z' fill='%23000' stroke='%23fff' stroke-width='1.6'/%3E%3C/svg%3E") 4 2,auto!important}
html.a11y-motion *,html.a11y-motion *:before,html.a11y-motion *:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
.a11y-guide{position:fixed;left:0;right:0;height:46px;pointer-events:none;z-index:9997;border-top:3px solid var(--a11y-focus);border-bottom:3px solid var(--a11y-focus);background:rgba(255,212,0,.08);display:none}
html.a11y-guide-on .a11y-guide{display:block}
.a11y-speaking{outline:3px solid #5b8cff!important;background:rgba(91,140,255,.15)!important}

/* ---------- daltonismo ---------- */
/* Paleta segura: azul (entrada) × laranja (saída), distinguível nos três tipos de daltonismo, e sempre com símbolo/texto. */
html.a11y-cvd{--green:#3b8bff!important;--red:#ff9f1c!important;--chart-in:#3b8bff;--chart-out:#ff9f1c}
html.a11y-cvd .value.in,html.a11y-cvd .metric.good strong,html.a11y-cvd .badge.good{color:#5aa0ff!important}
html.a11y-cvd .value.out,html.a11y-cvd .metric.bad strong,html.a11y-cvd .badge.bad,html.a11y-cvd .btn.danger{color:#ffb04d!important}
html.a11y-cvd .value.in:before{content:"▲ ";font-size:.8em}html.a11y-cvd .value.out:before{content:"▼ ";font-size:.8em}
html.a11y-cvd .btn.primary{background:#3b8bff!important;color:#fff!important}
html.a11y-filter-gray body{filter:grayscale(1) contrast(1.1)}
html.a11y-filter-saturate body{filter:saturate(1.7)}
html.a11y-filter-protan body{filter:url(#a11y-protan)}html.a11y-filter-deutan body{filter:url(#a11y-deutan)}html.a11y-filter-tritan body{filter:url(#a11y-tritan)}

/* ---------- audição ---------- */
.a11y-transcript{margin-top:12px;padding:12px;border:1px solid var(--line,#333);border-radius:12px;background:var(--panel2,#141414);font-size:14px}
.a11y-transcript summary{cursor:pointer;font-weight:700}
html.a11y-visual-alerts .toast.show{outline:4px solid var(--a11y-focus);animation:a11yflash .6s 2}
@keyframes a11yflash{50%{box-shadow:0 0 0 12px rgba(255,212,0,.5)}}
.sr-only{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* O painel já é grande: não aplica o zoom do texto nele (evita cortar as abas no celular). */
html.a11y-zoom-115 .a11y-panel,html.a11y-zoom-115 .a11y-fab{zoom:calc(1/1.15)}
html.a11y-zoom-130 .a11y-panel,html.a11y-zoom-130 .a11y-fab{zoom:calc(1/1.3)}
html.a11y-zoom-150 .a11y-panel,html.a11y-zoom-150 .a11y-fab{zoom:calc(1/1.5)}
html.a11y-spacing .a11y-panel *{letter-spacing:normal!important;word-spacing:normal!important;line-height:1.35!important}
.a11y-tabs{grid-template-columns:repeat(5,minmax(0,1fr))}
.a11y-tabs button{min-width:0;overflow-wrap:anywhere}
@media(max-width:420px){.a11y-tabs button{font-size:11px;min-height:58px}.a11y-tabs button span{font-size:20px}.a11y-profile{min-height:84px;font-size:14px}}
