/* ============================================================
   SinteFramo — base visual (site e painel)
   Princípios: tipografia faz a hierarquia; superfícies chapadas separadas por fios;
   cor só com função (navegação, links, ação principal); nada decorativo.
   Cores institucionais: roxo #b65db9 (logo), grafite #2B2B2B, vermelho #C70000.
   Temas: claro (padrão) | escuro · alto contraste · fonte legível · menos movimento
   ============================================================ */

:root {
    --roxo: #6B2A70;          /* navegação e botões (contraste AAA com branco) */
    --roxo-escuro: #521f56;
    --roxo-texto: #74307a;    /* links */
    --roxo-claro: #f5eff6;    /* fundo de item selecionado */
    --roxo-marca: #b65db9;    /* só detalhes mínimos */
    --vermelho: #C70000;
    --grafite: #2B2B2B;

    --bg: #ffffff;
    --bg-alt: #f5f3f7;
    --surface: #ffffff;
    --texto: #18131b;
    --texto-2: #3e3743;
    --texto-3: #625a67;
    --fio: #e4e0e8;
    --fio-forte: #c4bdca;

    --primaria: var(--roxo);
    --primaria-hover: var(--roxo-escuro);
    --sobre-primaria: #ffffff;
    --link: var(--roxo-texto);
    --foco: #ffbf47;          /* amarelo de foco, padrão GOV.UK: visível em qualquer fundo */
    --foco-texto: #0b0c0c;

    --sucesso: #1d6b3a;
    --erro: #b3261e;
    --aviso: #7a4b00;
    --info: #1d4f91;

    /* Faixas de cor sólida (destaques, cabeçalhos de página, chamadas) */
    --faixa: #3a1440;
    --faixa-texto: #ffffff;
    --faixa-texto-2: #e9d8ec;
    --faixa-fio: rgba(255, 255, 255, .22);
    --faixa-forte: #8A3A8F;
    --tinta: #f5edf6;
    --tinta-fio: #e3cfe6;

    --raio: 8px;
    --raio-g: 12px;
    --amarelo: #ffcc33;
    --amarelo-hover: #f2b705;
    --sombra: 0 1px 2px rgba(40, 16, 46, .06), 0 2px 6px rgba(40, 16, 46, .05);
    --sombra-hover: 0 4px 10px rgba(40, 16, 46, .08), 0 12px 28px rgba(40, 16, 46, .10);
    --fonte-titulo: 'Public Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --fonte-texto: 'Public Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --largura: 1240px;
    color-scheme: light;
}

[data-tema="escuro"] {
    --roxo: #4f1f53;
    --roxo-escuro: #3c1740;
    --roxo-texto: #e0b6e3;
    --roxo-claro: #2a2230;
    --bg: #121212;
    --bg-alt: #1b1b1b;
    --surface: #181818;
    --texto: #f1f1f1;
    --texto-2: #d4d4d4;
    --texto-3: #a9a9a9;
    --fio: #333333;
    --fio-forte: #555555;
    --primaria: #c991cc;
    --primaria-hover: #ddb3df;
    --sobre-primaria: #1a0b1c;
    --link: #e0b6e3;
    --sucesso: #7fd29c;
    --erro: #ff9d96;
    --aviso: #f1c56b;
    --info: #9cc3ff;
    --faixa: #26112b;
    --faixa-forte: #4a1f50;
    --tinta: #1d1720;
    --tinta-fio: #3a2c3f;
    color-scheme: dark;
}

[data-contraste="alto"] {
    --bg: #fff; --bg-alt: #fff; --surface: #fff;
    --texto: #000; --texto-2: #000; --texto-3: #000;
    --fio: #000; --fio-forte: #000;
    --primaria: #3d0f42; --link: #3d0f42; --roxo: #3d0f42;
    --faixa: #000; --faixa-forte: #000; --tinta: #fff; --tinta-fio: #000;
}
[data-tema="escuro"][data-contraste="alto"] {
    --bg: #000; --bg-alt: #000; --surface: #000;
    --texto: #fff; --texto-2: #fff; --texto-3: #fff;
    --fio: #fff; --fio-forte: #fff;
    --primaria: #ffe08a; --sobre-primaria: #000; --link: #ffe08a; --roxo: #000;
}
[data-contraste="alto"] a { text-decoration: underline !important; }

[data-links="destacar"] a:not(.btn) { text-decoration: underline !important; text-decoration-thickness: 2px !important; background: #fff3bf; color: #000 !important; }
[data-legivel="sim"] { --fonte-titulo: 'Atkinson Hyperlegible', Verdana, sans-serif; --fonte-texto: 'Atkinson Hyperlegible', Verdana, sans-serif; letter-spacing: .02em; word-spacing: .06em; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}
[data-movimento="reduzido"] *, [data-movimento="reduzido"] *::before, [data-movimento="reduzido"] *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }

/* ============================================================
   RESET E TIPOGRAFIA
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
    font-family: var(--fonte-texto); font-size: 1rem; line-height: 1.6;
    color: var(--texto); background: var(--bg);
    -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { font-family: var(--fonte-texto); font-weight: 700; line-height: 1.25; color: var(--texto); overflow-wrap: break-word; }
p, li, dd { overflow-wrap: break-word; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
::selection { background: #ead3ec; color: #18131b; }
html { scrollbar-color: #b9a6bf transparent; }
input, textarea { caret-color: var(--primaria); }
table, time { font-variant-numeric: tabular-nums; }

:focus { outline: none; }
:focus-visible { outline: 3px solid var(--foco); outline-offset: 0; box-shadow: 0 0 0 5px var(--foco-texto); }
a:focus-visible { background: var(--foco); color: var(--foco-texto) !important; box-shadow: 0 -2px var(--foco), 0 4px var(--foco-texto); outline: none; text-decoration: none; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.pular-conteudo { position: absolute; left: 0; top: -100px; z-index: 1000; background: var(--foco); color: var(--foco-texto); padding: .75rem 1rem; font-weight: 700; }
.pular-conteudo:focus { top: 0; }
.container { width: min(var(--largura), 100% - 2.5rem); margin-inline: auto; }
@media (max-width: 600px) { .container { width: calc(100% - 2rem); } }

/* ============================================================
   BOTÕES — retangulares, sem sombra
   ============================================================ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    min-height: 44px; padding: .55rem 1.1rem; border: 2px solid transparent; border-radius: var(--raio);
    font-weight: 600; font-size: .95rem; line-height: 1.2; text-decoration: none; white-space: nowrap; cursor: pointer;
    transition: background-color .12s, border-color .12s, color .12s;
}
.btn i { font-size: .9em; }
.btn-primario { background: var(--primaria); color: var(--sobre-primaria); }
.btn-primario:hover { background: var(--primaria-hover); color: var(--sobre-primaria); }
.btn-destaque { background: var(--primaria); color: var(--sobre-primaria); }
.btn-destaque:hover { background: var(--primaria-hover); color: var(--sobre-primaria); }
.btn-contorno, .btn-claro { background: transparent; color: var(--primaria); border-color: var(--primaria); }
.btn-contorno:hover, .btn-claro:hover { background: var(--roxo-claro); }
.btn-suave { background: var(--bg-alt); color: var(--texto); border-color: var(--fio); }
.btn-suave:hover { border-color: var(--fio-forte); }
.btn-perigo { background: transparent; color: var(--erro); border-color: currentColor; }
.btn-perigo:hover { background: var(--erro); color: #fff; border-color: var(--erro); }
.btn-p { min-height: 36px; padding: .35rem .75rem; font-size: .875rem; }
.btn-g { min-height: 50px; padding: .75rem 1.4rem; font-size: 1rem; }
.btn-icone { width: 40px; min-height: 40px; padding: 0; }
.btn-p.btn-icone { width: 36px; min-height: 36px; }
.btn[disabled] { opacity: .6; pointer-events: none; }
.link-seta { font-weight: 600; text-decoration: none; white-space: nowrap; }
.link-seta:hover { text-decoration: underline; }

/* ============================================================
   FORMULÁRIOS
   ============================================================ */
.campo { display: flex; flex-direction: column; gap: .35rem; }
.campo + .campo { margin-top: 1.1rem; }
.rotulo { font-weight: 600; font-size: .95rem; }
.rotulo .obrigatorio { color: var(--vermelho); }
.rotulo small { font-weight: 400; color: var(--texto-3); }
.ajuda { font-size: .875rem; color: var(--texto-3); line-height: 1.45; }
.entrada {
    width: 100%; min-height: 44px; padding: .55rem .75rem;
    background: var(--surface); color: var(--texto);
    border: 2px solid var(--texto-3); border-radius: var(--raio);
}
.entrada::placeholder { color: var(--texto-3); }
.entrada:focus { outline: 3px solid var(--foco); outline-offset: 0; border-color: var(--texto); box-shadow: inset 0 0 0 1px var(--texto); }
textarea.entrada { min-height: 110px; resize: vertical; line-height: 1.55; }
select.entrada { appearance: none; padding-right: 2.4rem; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 19px) 52%, calc(100% - 13px) 52%; background-size: 6px 6px; background-repeat: no-repeat; }
input[type="color"].entrada { padding: .2rem; width: 72px; }
.check { display: flex; align-items: flex-start; gap: .6rem; cursor: pointer; line-height: 1.45; }
.check input { width: 22px; height: 22px; margin-top: 0; accent-color: var(--primaria); flex-shrink: 0; cursor: pointer; }
.contador { font-size: .8rem; color: var(--texto-3); }
.contador.excedido { color: var(--erro); font-weight: 600; }

/* ============================================================
   RÓTULOS DE TEXTO (sem pílulas coloridas)
   ============================================================ */
.selo { font-size: .875rem; font-weight: 600; white-space: nowrap; color: var(--texto-2); }
.selo i { display: none; }
.selo-publicado { color: var(--sucesso); }
.selo-rascunho { color: var(--aviso); }
.selo-agendado { color: var(--info); }
.selo-erro { color: var(--erro); }
.selo-neutro { color: var(--texto-3); font-weight: 500; }
.chip { font-size: .8rem; font-weight: 600; letter-spacing: .02em; color: var(--texto-3); text-decoration: none; text-transform: uppercase; }
a.chip { color: var(--link); }
a.chip:hover { text-decoration: underline; }

/* ============================================================
   MENSAGENS
   ============================================================ */
.aviso { display: flex; align-items: flex-start; gap: .75rem; padding: .85rem 1rem; border: 2px solid currentColor; border-radius: var(--raio); background: var(--surface); line-height: 1.5; }
.aviso i { margin-top: .2rem; }
.aviso a { color: inherit; font-weight: 700; }
.aviso-texto { flex: 1; color: var(--texto); overflow-wrap: anywhere; }
.aviso-sucesso { color: var(--sucesso); }
.aviso-erro { color: var(--erro); }
.aviso-aviso { color: var(--aviso); }
.aviso-info { color: var(--info); }
.aviso .aviso-fechar { margin-left: auto; background: none; border: 0; color: var(--texto-2); font-size: 1.4rem; line-height: 1; padding: 0 .25rem; }

/* ============================================================
   TEXTO RICO (notícias, eventos, páginas)
   ============================================================ */
.texto-rico { font-size: 1.125rem; line-height: 1.75; color: var(--texto); }
.texto-rico > * + * { margin-top: 1em; }
.texto-rico h2 { font-size: 1.45rem; margin-top: 1.8em; }
.texto-rico h3 { font-size: 1.2rem; margin-top: 1.5em; }
.texto-rico ul, .texto-rico ol { padding-left: 1.3em; }
.texto-rico li + li { margin-top: .35em; }
.texto-rico blockquote { border-left: 4px solid var(--fio-forte); padding: .1rem 0 .1rem 1.1rem; color: var(--texto-2); font-style: italic; }
.texto-rico a { font-weight: 600; }
.texto-rico .ql-align-center { text-align: center; }
.texto-rico .ql-align-right { text-align: right; }
.texto-rico .ql-align-justify { text-align: justify; }

/* ============================================================
   PAGINAÇÃO
   ============================================================ */
.paginacao { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: 2rem; }
.paginacao a, .paginacao span { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 .75rem; text-decoration: none; font-weight: 600; color: var(--link); border-radius: var(--raio); }
.paginacao a:hover { background: var(--bg-alt); text-decoration: underline; }
.paginacao a.active { background: var(--primaria); color: var(--sobre-primaria); }
.paginacao span { color: var(--texto-3); }

/* ============================================================
   DIÁLOGO DE CONFIRMAÇÃO
   ============================================================ */
.dialogo { border: 0; border-radius: var(--raio); padding: 0; width: min(460px, calc(100% - 2rem)); background: var(--surface); color: var(--texto); box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.dialogo::backdrop { background: rgba(0, 0, 0, .55); }
.dialogo-corpo { padding: 1.5rem 1.5rem 1rem; }
.dialogo-icone { display: none; }
.dialogo h2 { font-size: 1.25rem; margin-bottom: .5rem; }
.dialogo p { color: var(--texto-2); }
.dialogo-acoes { display: flex; gap: .75rem; justify-content: flex-end; padding: 0 1.5rem 1.5rem; flex-wrap: wrap; }
.dialogo-acoes .btn-destaque { background: var(--erro); color: #fff; }

/* ============================================================
   ACESSIBILIDADE (botão e painel)
   ============================================================ */
.a11y-botao {
    position: fixed; left: .75rem; bottom: .75rem; z-index: 800;
    width: 48px; height: 48px; border-radius: 50%; border: 2px solid #fff;
    background: var(--grafite); color: #fff; font-size: 1.35rem; display: grid; place-items: center;
}
.a11y-botao:hover { background: #000; }
.a11y-painel {
    position: fixed; left: .75rem; bottom: 4.25rem; z-index: 801;
    width: min(340px, calc(100% - 1.5rem)); max-height: calc(100vh - 6rem); overflow-y: auto;
    background: var(--surface); color: var(--texto); border: 1px solid var(--fio-forte); border-radius: var(--raio);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .18); padding: 1rem 1.1rem;
}
.a11y-painel[hidden] { display: none; }
.a11y-topo { display: flex; align-items: center; justify-content: space-between; margin-bottom: .75rem; }
.a11y-topo h2 { font-size: 1.05rem; }
.a11y-topo h2 i { display: none; }
.a11y-grupo + .a11y-grupo { margin-top: .9rem; padding-top: .9rem; border-top: 1px solid var(--fio); }
.a11y-rotulo { display: flex; justify-content: space-between; font-size: .875rem; font-weight: 700; margin-bottom: .5rem; }
.a11y-opcoes { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: .4rem; }
.a11y-opcoes.coluna { grid-template-columns: 1fr; }
.a11y-opcoes button { display: flex; align-items: center; gap: .45rem; min-height: 42px; padding: .4rem .65rem; background: var(--surface); border: 1px solid var(--fio-forte); border-radius: var(--raio); font-size: .9rem; color: var(--texto); text-align: left; }
.a11y-opcoes:not(.coluna) button { justify-content: center; }
.a11y-opcoes button:hover { border-color: var(--texto); }
.a11y-opcoes button[aria-pressed="true"] { background: var(--primaria); border-color: var(--primaria); color: var(--sobre-primaria); }
.a11y-opcoes button small { color: inherit; opacity: .8; font-weight: 400; }
.a11y-resetar { width: 100%; margin-top: .9rem; }
[vw] { z-index: 790 !important; }

/* ============================================================
   UTILITÁRIOS
   ============================================================ */
.texto-centro { text-align: center; }
.texto-suave { color: var(--texto-3); }
.linha-acoes { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.oculto { display: none !important; }

@media print {
    .a11y-botao, .a11y-painel, [vw], .site-utilidades, .site-nav, .site-rodape, .compartilhar, .site-marca .marca-acoes { display: none !important; }
    body { background: #fff; color: #000; }
}
