body {
  font-family: 'Montserrat', sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

/* Widget flutuante */
#accessibility-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  font-size: 14px;
  z-index: 9999;
}

#accessibility-widget hr
{
  margin: 5px 0;
}

#toggle-widget {
  background: #1b80a2;
  color: #fff;
  border: none;
  padding: 9px 12px;
  border-radius: 100%;
  cursor: pointer;
  font-size: 20px;
}

.widget-panel {
  display: none;
  margin-top: 10px;
  background: #fff;
  border: 2px solid #1b80a2;
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0px 4px 8px rgba(0,0,0,0.2);
}

#accessibility-widget.active .widget-panel {
  display: block;
}

.widget-panel h3 {
  margin: 0 0 10px 0;
  font-size: 16px;
  color: #003471;
}

.widget-panel button {
  display: block;
  width: 100%;
  margin: 5px 0;
  padding: 8px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background: #1b80a2;
  color: #fff;
  font-size: 14px;
  transition: 0.3s;
}

.widget-panel select 
{
  border-radius: 8px;
  padding: 6px;
}

.widget-panel button:hover {
  background: #3da3a8;
}

/* Modos especiais */

/* Alto contraste (preto/amarelo + links ciano) */
.high-contrast, .high-contrast ul li
{
  background: #000 !important;
  color: #fff !important;
}

.high-contrast .post-slide .post-content /* específico deste site */
{
  background: #000 !important;
}

.high-contrast .post-slide .post-img img /* específico deste site */
{
    border: 7px solid #000;
}

.high-contrast section
{
  background-color: rgba(0, 0, 0, 0.75); /* película preta */
  background-blend-mode: multiply; /* mistura com a imagem */
  box-shadow: none;
}

.high-contrast h1, 
.high-contrast h3,
.high-contrast h5
{
  color: darkorange !important;
}

.high-contrast h2,
.high-contrast h4,
.high-contrast h6
{
  color: orange !important;
}

.high-contrast a 
{ 
  color: #0ff !important; 
}

/* P&B: fundo escuro + texto branco; mídias em cinza */
.grayscale-mode
{
  background: #000 !important;
  color: #fff !important;
}
.grayscale-mode img,
.grayscale-mode nav,
.grayscale-mode section,
.grayscale-mode video,
.grayscale-mode picture,
.grayscale-mode canvas {
  filter: grayscale(100%) contrast(115%) brightness(0.95) !important;
}

/* Espaçamento extra (auxilia dislexia/baixa visão) */
.spacing-mode {
  line-height: 1.9;
  letter-spacing: 0.1em;
  word-spacing: 0.16em;
}

/* Modo TDH – foco no elemento sob interação */
.tdh-mode * 
{
  transition: opacity 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.tdh-mode *:not(:hover):not(:focus) 
{
  opacity: 0.55;
}
.tdh-mode :is(a, button, input, textarea, select, summary, [tabindex]):hover,
.tdh-mode :is(a, button, input, textarea, select, summary, [tabindex]):focus 
{
  background-color: rgba(000, 000, 000, 0.2);
}

/* Cursor virtual (coordenação motora) */
#slow-cursor {
  position: fixed;
  inset: 0 auto auto 0;
  width: 20px;
  height: 20px;
  margin-left: -10px; /* centralizar o ponto */
  margin-top: -10px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 999999;
  background: rgba(0, 123, 255, 0.9);
  box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.25);
  display: none; /* só aparece quando ativado */
  transition: transform 0.08s ease-out;
}

.dyslexia {
  font-family: Arial, sans-serif !important;
  letter-spacing: 0.12em !important;
  word-spacing: 0.16em !important;
  line-height: 1.8 !important;
}

/* Linha de leitura */
.reading-line {
  position: fixed;
  left: 0;
  right: 0;
  height: 30px;
  background: rgba(255, 255, 0, 0.3);
  pointer-events: none;
  z-index: 10000;
  display: none;
}

/* Máscara de leitura: escurece tudo menos uma faixa horizontal */
.reading-mask-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;       /* não bloqueia cliques */
  z-index: 9998;              /* abaixo do widget (9999), acima do conteúdo */
  /* variáveis controladas via JS */
  --lineY: 200px;             /* posição vertical do centro da faixa */
  --bandH: 24px;              /* meia-altura da faixa (faixa total = 2*bandH) */
  --dim: 0.70;                /* opacidade da película (0 a 1) */

  /* duas “tampas” escuras com uma banda central transparente */
  background:
    linear-gradient(
      to bottom,
      rgba(0,0,0,var(--dim)) calc(var(--lineY) - var(--bandH)),
      rgba(0,0,0,0)           calc(var(--lineY) - var(--bandH)),
      rgba(0,0,0,0)           calc(var(--lineY) + var(--bandH)),
      rgba(0,0,0,var(--dim))  calc(var(--lineY) + var(--bandH))
    );
}

/* (opcional) estado do botão pressionado */
.widget-panel button[aria-pressed="true"]#toggle-reading-mask {
  box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px #1b80a2;
}


/* Menu */

nav ul {
  margin: 0;
  padding: 0;
  display: flex;
  gap: 12px;
  list-style: none;
}
nav a {
  text-decoration: none;
  color: var(--brand);
  padding: 6px 8px;
  border-radius: 6px;
}
nav a:focus, nav a:hover {
  background: rgba(0,0,0,0.06);
  outline: 2px solid transparent;
}

figure { margin: 16px 0; }
figcaption { font-size: 0.95em; color: #555; }

/******* ADICIONADO DIA 05/09/2025 *******/

/* 4) Daltonismo (simuladores via SVG filter) */
#acc-filter-scope.colorblind-prot { filter: url(#cb-prot) !important; }
#acc-filter-scope.colorblind-deut { filter: url(#cb-deut) !important; }
#acc-filter-scope.colorblind-trit { filter: url(#cb-trit) !important; }

/* 5) Cursor grande e destacado */
/* Ponteiro SETA grande */
.cursor-large, .cursor-large * {
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48"><path d="M6 4 L6 36 L12 30 L18 44 L24 41 L18 27 L26 27 Z" fill="%23003471" stroke="%231b80a2" stroke-width="1.5"/></svg>') 6 4, auto !important;
}

/* 6) Modo leitura sem distrações (mantém o widget) */
.reader-mode header,
.reader-mode nav,
.reader-mode aside,
.reader-mode footer,
.reader-mode .post-slide,
.reader-mode .sidebar { display: none !important; }

.reader-mode main, .reader-mode #conteudo 
{
  max-width: 70ch;
  margin: 24px auto;
  padding: 0 16px;
  line-height: 1.85;
  font-size: 1.06rem;
}

/* 7) Alto contraste amarelo/preto (variação WCAG) */
.hc-yellow,
.hc-yellow ul li { background: #000 !important; color: #FFD700 !important; }

.hc-yellow a { color: #00FFFF !important; }
.hc-yellow h1, .hc-yellow h3, .hc-yellow h5 { color: #FFD700 !important; }
.hc-yellow h2, .hc-yellow h4, .hc-yellow h6 { color: #ffe34d !important; }
.hc-yellow section { background-color: rgba(0, 0, 0, 0.85); background-blend-mode: multiply; box-shadow: none; }

/* 8) TTS – estado visual opcional (btn pressionado) */
.widget-panel button[aria-pressed="true"] {
  box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px #1b80a2;
}


/* ===== Painel flutuante responsivo (sobrescreve regras anteriores) ===== */
/*
#accessibility-widget { inset: auto 16px 16px auto; }
*/
/*
#accessibility-widget .widget-panel 
{
  position: fixed;                 
  right: 16px;                    
  bottom: 84px;                   
  left: auto;
  width: min(360px, calc(100vw - 32px));
  max-height: clamp(320px, 70vh, 560px);   
  overflow: auto;                 
  -webkit-overflow-scrolling: touch; 
  z-index: 10000;                  
  margin-top: 0 !important;        
  padding: 10px 12px;              
  border-radius: 12px;             
}
*/
/* garante visibilidade quando o widget está ativo */
/*
#accessibility-widget.active .widget-panel { display: block; }
*/
/* ===== Mobile: vira bottom sheet ===== */
/*
@media (max-width: 640px) {
  #accessibility-widget .widget-panel {
    right: 0;
    left: 0;
    bottom: 0;
    width: 100vw;
    max-height: 80dvh;             
    border-radius: 16px 16px 0 0;
  }
}
*/


/* Telas muito baixas: permitir fullscreen */
/*
@media (max-height: 480px) {
  #accessibility-widget .widget-panel {
    max-height: 100dvh;
    border-radius: 0;
  }
}
  */


