/* =========================================================================
   Centro Palmares — acabamento e microinterações globais
   ========================================================================= */

:root {
    --cp-ui-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --cp-ui-shadow: 0 22px 50px -34px rgba(28, 25, 23, 0.6);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 6rem;
}

/* -------------------------------------------------------------------------
   Progresso de leitura
   ------------------------------------------------------------------------- */

.cp-scroll-progress {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 90;
    height: 2px;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.08);
}

.cp-scroll-progress__bar {
    display: block;
    width: 100%;
    height: 100%;
    transform: scaleX(0);
    transform-origin: 0 50%;
    background: linear-gradient(90deg, #991b1b 0%, #b45309 55%, #d97706 100%);
    box-shadow: 0 0 14px rgba(217, 119, 6, 0.45);
    will-change: transform;
}

/* -------------------------------------------------------------------------
   Header: estado ao rolar + underlines dos links
   ------------------------------------------------------------------------- */

body > header {
    transition:
        background-color 0.35s var(--cp-ui-ease),
        border-color 0.35s var(--cp-ui-ease),
        box-shadow 0.35s var(--cp-ui-ease),
        backdrop-filter 0.35s var(--cp-ui-ease);
}

body > header.cp-header-scrolled {
    background-color: rgba(255, 255, 255, 0.68);
    border-bottom-color: rgba(168, 162, 158, 0.28);
    box-shadow: 0 18px 40px -34px rgba(28, 25, 23, 0.55);
    backdrop-filter: blur(16px) saturate(135%);
    -webkit-backdrop-filter: blur(16px) saturate(135%);
}

body > header > div > a:first-child img {
    transition: scale 0.35s var(--cp-ui-ease);
}

body > header > div > a:first-child:hover img {
    scale: 1.025;
}

body > header nav > a,
body > header nav > div > button {
    position: relative;
}

body > header nav > a::after,
body > header nav > div > button::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: -0.42rem;
    left: 0;
    height: 1px;
    background: currentColor;
    opacity: 0.55;
    transform: scaleX(0);
    transform-origin: 100% 50%;
    transition: transform 0.32s var(--cp-ui-ease);
    pointer-events: none;
}

body > header nav > a:hover::after,
body > header nav > a:focus-visible::after,
body > header nav > div > button:hover::after,
body > header nav > div > button:focus-visible::after {
    transform: scaleX(1);
    transform-origin: 0 50%;
}

/* -------------------------------------------------------------------------
   Feedback de toque / foco
   ------------------------------------------------------------------------- */

:where(a, button, input, select, textarea, summary):focus-visible {
    outline: 2px solid #b45309;
    outline-offset: 3px;
}

@media (prefers-reduced-motion: no-preference) {
    button:not(:disabled):active,
    input[type="submit"]:active,
    .cp-btn:active,
    a[class*="bg-red-700"]:active,
    a[class*="bg-brand-primary"]:active {
        transform: translateY(1px) scale(0.985);
    }
}

/* -------------------------------------------------------------------------
   Cards: elevação suave + sombra
   ------------------------------------------------------------------------- */

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    main .group:not(.animate-indicator) {
        transition:
            translate 0.32s var(--cp-ui-ease),
            box-shadow 0.32s var(--cp-ui-ease),
            background-color 0.32s var(--cp-ui-ease),
            border-color 0.32s var(--cp-ui-ease),
            opacity 0.32s var(--cp-ui-ease);
    }

    main .group:not(.animate-indicator):hover {
        translate: 0 -3px;
        box-shadow: var(--cp-ui-shadow);
    }
}

/* -------------------------------------------------------------------------
   Reveals no scroll (progressive enhancement)
   Só escondem quando o JS inicial marcou <html class="cp-motion">.
   ------------------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
    html.cp-motion:not(.cp-motion-off) main:not(.cp-transp-page) article,
    html.cp-motion:not(.cp-motion-off) main:not(.cp-transp-page) .group:not(.animate-indicator) {
        opacity: 0;
        transform: translateY(18px);
    }

    html.cp-motion:not(.cp-motion-off) main:not(.cp-transp-page) article.cp-inview,
    html.cp-motion:not(.cp-motion-off) main:not(.cp-transp-page) .group.cp-inview {
        animation: cpReveal 0.65s var(--cp-ui-ease) both;
        animation-delay: var(--cp-reveal-delay, 0ms);
    }

    main h1 {
        animation: cpHeadingIn 0.75s var(--cp-ui-ease) both;
    }
}

@keyframes cpReveal {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cpHeadingIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* -------------------------------------------------------------------------
   Voltar ao topo
   ------------------------------------------------------------------------- */

.cp-to-top {
    position: fixed;
    right: max(1rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
    z-index: 40;
    display: grid;
    place-items: center;
    width: 2.85rem;
    height: 2.85rem;
    padding: 0;
    border: 1px solid rgba(120, 113, 108, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.74);
    color: #7f1d1d;
    box-shadow: 0 16px 34px -22px rgba(28, 25, 23, 0.7);
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    opacity: 0;
    translate: 0 12px;
    pointer-events: none;
    cursor: pointer;
    transition:
        opacity 0.3s var(--cp-ui-ease),
        translate 0.3s var(--cp-ui-ease),
        background-color 0.25s var(--cp-ui-ease),
        border-color 0.25s var(--cp-ui-ease),
        box-shadow 0.25s var(--cp-ui-ease);
}

.cp-to-top.is-visible {
    opacity: 1;
    translate: 0 0;
    pointer-events: auto;
}

.cp-to-top:hover {
    background: #fff;
    border-color: rgba(153, 27, 27, 0.35);
    box-shadow: 0 20px 40px -22px rgba(28, 25, 23, 0.75);
}

.cp-to-top svg {
    width: 1.05rem;
    height: 1.05rem;
    transition: transform 0.3s var(--cp-ui-ease);
}

.cp-to-top:hover svg {
    transform: translateY(-2px);
}

.cp-to-top:active {
    transform: scale(0.96);
}

/* -------------------------------------------------------------------------
   Imagem substituta (quando um arquivo falha ao carregar)
   ------------------------------------------------------------------------- */

img.cp-img-fallback {
    object-fit: cover;
    background: #2a2320;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    main article,
    main .group {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }

    .cp-to-top,
    .cp-to-top svg {
        transition: none;
    }
}

/* -------------------------------------------------------------------------
   Alternador de tema
   ------------------------------------------------------------------------- */

.cp-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: #57534e;
    cursor: pointer;
    transition:
        background-color 0.2s var(--cp-ui-ease),
        border-color 0.2s var(--cp-ui-ease),
        color 0.2s var(--cp-ui-ease),
        transform 0.2s var(--cp-ui-ease);
}

.cp-theme-toggle:hover {
    border-color: rgba(120, 113, 108, 0.2);
    background: rgba(120, 113, 108, 0.08);
    color: #1c1917;
}

.cp-theme-toggle:active {
    transform: scale(0.94);
}

.cp-theme-toggle__icon {
    width: 1.05rem;
    height: 1.05rem;
    flex: 0 0 auto;
}

.cp-theme-toggle__icon--sun {
    display: none;
}

.cp-theme-toggle__icon--moon {
    display: block;
}

html.dark .cp-theme-toggle__icon--sun {
    display: block;
}

html.dark .cp-theme-toggle__icon--moon {
    display: none;
}

html.dark .cp-theme-toggle {
    border-color: transparent;
    color: #d6cec3;
}

html.dark .cp-theme-toggle:hover {
    border-color: rgba(240, 180, 90, 0.24);
    background: rgba(240, 180, 90, 0.1);
    color: #f0b45a;
}

.cp-theme-toggle-mobile {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    padding: 0.55rem 0;
    border: 0;
    background: transparent;
    color: #57534e;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-align: left;
    text-transform: uppercase;
    cursor: pointer;
}

.cp-theme-toggle-mobile:hover {
    color: #b45309;
}

.cp-theme-toggle-mobile__icons {
    display: inline-flex;
    width: 1.05rem;
    height: 1.05rem;
    align-items: center;
    justify-content: center;
}

.cp-theme-toggle-mobile__icons .cp-theme-toggle__icon {
    width: 1rem;
    height: 1rem;
}

/* -------------------------------------------------------------------------
   Modal de busca global
   ------------------------------------------------------------------------- */

body.cp-search-open {
    overflow: hidden;
}

.cp-search {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
}

.cp-search:not(.hidden) {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.cp-search .hidden {
    display: none !important;
}

.cp-search__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(12, 10, 9, 0.6);
    backdrop-filter: blur(9px);
    -webkit-backdrop-filter: blur(9px);
    animation: cp-search-fade 0.2s ease both;
}

.cp-search__shell {
    position: relative;
    z-index: 1;
    width: min(calc(100% - 2rem), 72rem);
    margin: min(5vh, 3rem) auto;
}

.cp-search__panel {
    display: flex;
    flex-direction: column;
    max-height: min(88vh, 54rem);
    overflow: hidden;
    border: 1px solid var(--color-border-premium);
    border-radius: 1.5rem;
    background: #fff;
    box-shadow: 0 42px 110px -34px rgba(12, 10, 9, 0.7);
    animation: cp-search-pop 0.24s var(--cp-ui-ease) both;
}

.cp-search__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.45rem 2rem 1rem;
}

.cp-search__eyebrow {
    margin: 0 0 0.3rem;
    color: #b45309;
    font-family: "Montserrat", "Google Sans", ui-sans-serif, system-ui, sans-serif;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.cp-search__title {
    margin: 0;
    color: #1c1917;
    font-family: "Montserrat", "Google Sans", ui-sans-serif, system-ui, sans-serif;
    font-size: clamp(1.15rem, 1rem + 0.7vw, 1.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.cp-search__close {
    display: grid;
    flex: 0 0 auto;
    width: 2.35rem;
    height: 2.35rem;
    place-items: center;
    padding: 0;
    border: 1px solid var(--color-border-premium);
    border-radius: 999px;
    background: transparent;
    color: #78716c;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.cp-search__close svg {
    width: 1rem;
    height: 1rem;
}

.cp-search__close:hover {
    border-color: #d6d3d1;
    background: #f5f5f4;
    color: #1c1917;
}

.cp-search__field-wrap {
    padding: 0 2rem;
}

.cp-search__field {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem 0.9rem;
    border: 1.5px solid #d6d3d1;
    border-radius: 0.9rem;
    background: #fcfbfa;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.cp-search__field:focus-within {
    border-color: #b45309;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(180, 83, 9, 0.11);
}

.cp-search__field-icon {
    width: 1.15rem;
    height: 1.15rem;
    flex: 0 0 auto;
    color: #a8a29e;
}

.cp-search__field input {
    min-width: 0;
    flex: 1;
    padding: 0.1rem 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #1c1917;
    font-family: "Montserrat", "Google Sans", ui-sans-serif, system-ui, sans-serif;
    font-size: 1rem;
    font-weight: 500;
}

.cp-search__field input::placeholder {
    color: #a8a29e;
    font-weight: 400;
}

.cp-search__field input::-webkit-search-cancel-button {
    display: none;
}

.cp-search__clear {
    display: grid;
    width: 1.55rem;
    height: 1.55rem;
    flex: 0 0 auto;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #e7e5e4;
    color: #57534e;
    cursor: pointer;
}

.cp-search__clear svg {
    width: 0.72rem;
    height: 0.72rem;
}

.cp-search__clear:hover {
    background: #d6d3d1;
    color: #1c1917;
}

.cp-search__kbd {
    flex: 0 0 auto;
    padding: 0.25rem 0.4rem;
    border: 1px solid #e7e5e4;
    border-radius: 0.35rem;
    background: #fff;
    color: #a8a29e;
    font-family: "Montserrat", ui-sans-serif, system-ui, sans-serif;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.cp-search__filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    padding: 0.9rem 2rem 0.75rem;
}

.cp-search__types {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.cp-search__types button {
    padding: 0.42rem 0.72rem;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: #78716c;
    font-family: inherit;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.cp-search__types button:hover {
    background: #f5f5f4;
    color: #1c1917;
}

.cp-search__types button.is-active {
    border-color: #1c1917;
    background: #1c1917;
    color: #fff;
}

.cp-search__reset {
    padding: 0.35rem 0;
    border: 0;
    background: transparent;
    color: #b45309;
    font-family: inherit;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cp-search__tags-wrap {
    padding: 0 2rem 1rem;
}

.cp-search__label {
    display: block;
    margin-bottom: 0.48rem;
    color: #a8a29e;
    font-family: "Montserrat", "Google Sans", ui-sans-serif, system-ui, sans-serif;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.cp-search__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    max-height: 4.8rem;
    overflow-y: auto;
    scrollbar-width: thin;
}

.cp-search__tag {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    padding: 0.34rem 0.62rem;
    border: 1px solid #e7e5e4;
    border-radius: 999px;
    background: #fff;
    color: #57534e;
    font-family: inherit;
    font-size: 0.68rem;
    font-weight: 600;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.cp-search__tag:hover {
    border-color: #d6d3d1;
    background: #fafaf9;
    color: #1c1917;
}

.cp-search__tag.is-active {
    border-color: #b45309;
    background: #b45309;
    color: #fff;
}

.cp-search__tag-count {
    opacity: 0.5;
    font-size: 0.9em;
}

.cp-search__body {
    min-height: 0;
    flex: 1;
    overflow-y: auto;
    padding: 0 2rem 1.4rem;
    scrollbar-width: thin;
}

.cp-search__body-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 1.6rem;
    margin-bottom: 0.65rem;
    border-top: 1px solid #f5f5f4;
    padding-top: 0.75rem;
}

.cp-search__meta {
    margin: 0;
    color: #78716c;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.cp-search__shortcut {
    color: #a8a29e;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.cp-search__spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 2.4rem 0;
    color: #78716c;
    font-size: 0.78rem;
}

.cp-search__spinner-dot {
    width: 0.75rem;
    height: 0.75rem;
    border: 2px solid #b45309;
    border-top-color: transparent;
    border-radius: 999px;
    animation: cp-search-spin 0.8s linear infinite;
}

.cp-search__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
}

.cp-search__result {
    min-width: 0;
}

.cp-search__result-link {
    display: grid;
    grid-template-columns: 5.4rem minmax(0, 1fr);
    gap: 0.7rem;
    height: 100%;
    padding: 0.6rem;
    border: 1px solid #e7e5e4;
    border-radius: 0.9rem;
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        transform 0.2s var(--cp-ui-ease),
        box-shadow 0.2s ease;
}

.cp-search__result-link:hover,
.cp-search__result-link:focus-visible {
    border-color: #d6d3d1;
    background: #fcfbfa;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 16px 32px -28px rgba(28, 25, 23, 0.55);
}

.cp-search__thumb {
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 0.65rem;
    background: #f5f5f4;
}

.cp-search__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cp-search__result-main {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
}

.cp-search__badge {
    display: inline-flex;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    background: #f5f5f4;
    color: #57534e;
    font-family: "Montserrat", ui-sans-serif, system-ui, sans-serif;
    font-size: 0.52rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    line-height: 1;
    text-transform: uppercase;
}

.cp-search__badge--noticia {
    background: rgba(185, 28, 28, 0.09);
    color: #991b1b;
}

.cp-search__badge--edital {
    background: rgba(180, 83, 9, 0.1);
    color: #92400e;
}

.cp-search__badge--post {
    background: rgba(61, 79, 99, 0.1);
    color: #3d4f63;
}

.cp-search__result-title {
    display: -webkit-box;
    overflow: hidden;
    color: #1c1917;
    font-family: "Montserrat", "Google Sans", ui-sans-serif, system-ui, sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.cp-search__result-excerpt {
    display: -webkit-box;
    overflow: hidden;
    color: #78716c;
    font-size: 0.7rem;
    font-weight: 400;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.cp-search__result-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.28rem;
    color: #a8a29e;
    font-size: 0.6rem;
    font-weight: 600;
}

.cp-search__result-dot {
    opacity: 0.6;
}

.cp-search__result-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.1rem;
}

.cp-search__result-tag {
    overflow: hidden;
    max-width: 7rem;
    padding: 0.14rem 0.34rem;
    border-radius: 999px;
    background: #f5f5f4;
    color: #78716c;
    font-size: 0.55rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cp-search__result mark {
    border-radius: 0.15em;
    background: rgba(217, 119, 6, 0.22);
    color: inherit;
}

.cp-search__pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 1.1rem 0 0.2rem;
}

.cp-search__page {
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.55rem;
    border: 1px solid #e7e5e4;
    border-radius: 0.5rem;
    background: #fff;
    color: #57534e;
    font-family: inherit;
    font-size: 0.68rem;
    font-weight: 700;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.cp-search__page:hover:not(:disabled) {
    border-color: #d6d3d1;
    background: #fafaf9;
    color: #1c1917;
}

.cp-search__page.is-current {
    border-color: #1c1917;
    background: #1c1917;
    color: #fff;
}

.cp-search__page:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.cp-search__page-gap {
    padding: 0 0.15rem;
    color: #a8a29e;
    font-size: 0.72rem;
}

.cp-search__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 3rem 1rem;
    text-align: center;
}

.cp-search__empty svg {
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: 0.4rem;
    color: #d6d3d1;
}

.cp-search__empty p {
    max-width: 32rem;
    margin: 0;
    color: #78716c;
    font-size: 0.9rem;
}

.cp-search__empty-reset {
    margin-top: 0.55rem;
    padding: 0.6rem 0.9rem;
    border: 1px solid #d6d3d1;
    border-radius: 0.55rem;
    background: #fff;
    color: #1c1917;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease;
}

.cp-search__empty-reset:hover {
    border-color: #b45309;
    background: #fffbf5;
    color: #b45309;
}

.cp-search__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.15rem;
    padding: 0.75rem 2rem;
    border-top: 1px solid #f5f5f4;
    background: #fcfbfa;
    color: #a8a29e;
    font-size: 0.6rem;
    font-weight: 600;
}

.cp-search__foot kbd {
    display: inline-flex;
    min-width: 1.15rem;
    min-height: 1.15rem;
    align-items: center;
    justify-content: center;
    margin-right: 0.15rem;
    padding: 0 0.2rem;
    border: 1px solid #e7e5e4;
    border-radius: 0.25rem;
    background: #fff;
    color: #78716c;
    font-family: inherit;
    font-size: 0.58rem;
}

.cp-search__foot-brand {
    margin-left: auto;
    color: #b45309;
    font-family: "Special Elite", "Montserrat", ui-sans-serif, system-ui, sans-serif;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

@keyframes cp-search-fade {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes cp-search-pop {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes cp-search-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 1023px) {
    .cp-search__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .cp-search__shell {
        width: calc(100% - 1rem);
        margin: 0.5rem auto;
    }

    .cp-search__panel {
        max-height: calc(100vh - 1rem);
        border-radius: 1.1rem;
    }

    .cp-search__head,
    .cp-search__field-wrap,
    .cp-search__filters,
    .cp-search__tags-wrap,
    .cp-search__body,
    .cp-search__foot {
        padding-right: 1.1rem;
        padding-left: 1.1rem;
    }

    .cp-search__head {
        padding-top: 1.1rem;
    }

    .cp-search__grid {
        grid-template-columns: 1fr;
    }

    .cp-search__shortcut,
    .cp-search__foot-brand {
        display: none;
    }

    .cp-search__result-link {
        grid-template-columns: 4.6rem minmax(0, 1fr);
    }

    .cp-search__foot {
        gap: 0.45rem 0.85rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cp-search__backdrop,
    .cp-search__panel,
    .cp-search__spinner-dot {
        animation: none;
    }

    .cp-search__result-link:hover {
        transform: none;
    }
}

/* -------------------------------------------------------------------------
   Tema escuro — base global
   ------------------------------------------------------------------------- */

html.dark {
    --color-surface-base: #0f0d0b;
    --color-surface-page: #12100e;
    --color-surface-card: #1b1613;
    --color-border-premium: #352e27;
    --color-text-main: #f5f1ea;
    --color-text-muted: #b7aea3;
    --color-brand-primary: #b45309;
    --color-brand-secondary: #d97706;
    --color-brand-accent: #f59e0b;
    --cp-ui-shadow: 0 22px 50px -34px rgba(0, 0, 0, 0.8);
    color-scheme: dark;
}

html.dark body {
    background-color: #0f0d0b;
    color: #f5f1ea;
}

html.dark .bg-fluid-curves {
    background-color: #0f0d0b;
    background-image:
        radial-gradient(at 0% 0%, rgba(180, 83, 9, 0.12) 0, transparent 52%),
        radial-gradient(at 100% 28%, rgba(120, 53, 15, 0.16) 0, transparent 58%),
        radial-gradient(at 44% 82%, rgba(87, 83, 78, 0.12) 0, transparent 52%);
}

html.dark ::selection {
    background: rgba(217, 119, 6, 0.36);
    color: #fff;
}

html.dark :where(a, button, input, select, textarea, summary):focus-visible {
    outline-color: #f0b45a;
}

html.dark .cp-brand-logo {
    filter: brightness(0) invert(1);
}

html.dark body > header {
    border-bottom-color: rgba(120, 113, 108, 0.24);
    background-color: rgba(15, 13, 11, 0.72);
}

html.dark body > header.cp-header-scrolled {
    border-bottom-color: rgba(120, 113, 108, 0.28);
    background-color: rgba(15, 13, 11, 0.92);
    box-shadow: 0 18px 40px -34px rgba(0, 0, 0, 0.9);
}

html.dark #menu-toggle span {
    background-color: #f5f1ea;
}

html.dark .bg-white {
    background-color: #161210;
}

html.dark .bg-white\/35 {
    background-color: rgba(15, 13, 11, 0.72);
}

html.dark .bg-white\/80 {
    background-color: rgba(18, 16, 14, 0.84);
}

html.dark .bg-white\/90 {
    background-color: rgba(18, 16, 14, 0.92);
}

html.dark .bg-white\/95 {
    background-color: rgba(18, 16, 14, 0.96);
}

html.dark .bg-stone-50,
html.dark [class*="bg-stone-50/"] {
    background-color: #1b1613;
}

html.dark .bg-stone-100,
html.dark [class*="bg-stone-100/"] {
    background-color: #211b17;
}

html.dark .bg-stone-200,
html.dark [class*="bg-stone-200/"] {
    background-color: #2b241e;
}

html.dark .bg-stone-300 {
    background-color: #372f28;
}

html.dark .text-stone-950,
html.dark .text-stone-900,
html.dark .text-stone-800 {
    color: #f5f1ea;
}

html.dark .text-stone-700,
html.dark .text-stone-600 {
    color: #d6cec3;
}

html.dark .text-stone-500 {
    color: #b7aea3;
}

html.dark .text-stone-400 {
    color: #9b9085;
}

html.dark .text-stone-300 {
    color: #8a7f74;
}

html.dark [class*="border-stone-1"],
html.dark [class*="border-stone-2"],
html.dark [class*="border-stone-3"] {
    border-color: #352e27;
}

html.dark [class*="border-stone-500"] {
    border-color: rgba(120, 113, 108, 0.24);
}

html.dark [class*="hover:bg-white"]:hover,
html.dark [class*="hover:bg-stone-50"]:hover,
html.dark [class*="hover:bg-stone-100"]:hover {
    background-color: #221d18;
}

html.dark [class*="hover:text-stone-900"]:hover,
html.dark [class*="hover:text-stone-800"]:hover {
    color: #f5f1ea;
}

html.dark [class*="hover:border-stone"]:hover {
    border-color: #4a4037;
}

html.dark .text-brand-primary,
html.dark [class*="hover:text-brand-primary"]:hover {
    color: #f0b45a;
}

html.dark .bg-red-50,
html.dark .bg-red-50\/40,
html.dark .bg-red-100 {
    background-color: rgba(248, 113, 113, 0.1);
}

html.dark .bg-amber-50,
html.dark .bg-amber-100 {
    background-color: rgba(251, 191, 36, 0.1);
}

html.dark .bg-emerald-50,
html.dark .bg-emerald-100 {
    background-color: rgba(52, 211, 153, 0.1);
}

html.dark .bg-blue-50,
html.dark .bg-blue-100 {
    background-color: rgba(96, 165, 250, 0.1);
}

html.dark .text-red-700,
html.dark .text-red-800,
html.dark .text-red-900 {
    color: #fca5a5;
}

html.dark .text-red-600 {
    color: #f87171;
}

html.dark .text-amber-600,
html.dark .text-amber-700,
html.dark .text-amber-900 {
    color: #fbbf24;
}

html.dark .text-emerald-700,
html.dark .text-emerald-800 {
    color: #6ee7b7;
}

html.dark .text-blue-700 {
    color: #93c5fd;
}

html.dark .text-neutral-800,
html.dark .text-neutral-900 {
    color: #f5f1ea;
}

html.dark .prose {
    color: #ded6cb;
}

html.dark .prose h1,
html.dark .prose h2,
html.dark .prose h3,
html.dark .prose h4,
html.dark .prose h5,
html.dark .prose h6 {
    color: #f0b45a;
}

html.dark .prose a {
    color: #f0b45a;
}

html.dark .prose strong {
    color: #f5f1ea;
}

html.dark .prose blockquote {
    color: #e7dfd5;
}

html.dark .prose table th,
html.dark .prose table td {
    border-color: #352e27;
}

html.dark input:not([type="checkbox"]):not([type="radio"]),
html.dark select,
html.dark textarea {
    border-color: #3a312a;
    background-color: #1b1613;
    color: #f5f1ea;
}

html.dark input::placeholder,
html.dark textarea::placeholder {
    color: #7f7469;
}

html.dark input[type="checkbox"],
html.dark input[type="radio"] {
    accent-color: #d97706;
}

html.dark option {
    background: #1b1613;
    color: #f5f1ea;
}

html.dark .cp-scroll-progress {
    background: rgba(255, 255, 255, 0.06);
}

html.dark .cp-to-top {
    border-color: rgba(120, 113, 108, 0.35);
    background: rgba(27, 22, 19, 0.82);
    color: #f0b45a;
    box-shadow: 0 16px 34px -22px rgba(0, 0, 0, 0.9);
}

html.dark .cp-to-top:hover {
    border-color: rgba(240, 180, 90, 0.45);
    background: #221d18;
}

html.dark .page-numbers {
    border-color: #352e27;
    background: #1b1613;
    color: #b7aea3;
}

html.dark .page-numbers.current,
html.dark .page-numbers:hover {
    border-color: #b45309;
    background: #b45309;
    color: #fff;
}

html.dark .leaflet-container {
    background: #0f0d0b;
}

html.dark .leaflet-tile-pane {
    filter: invert(1) hue-rotate(180deg) brightness(0.82) contrast(0.92);
}

html.dark .leaflet-popup-content-wrapper,
html.dark .leaflet-popup-tip {
    background: #1b1613;
    color: #f5f1ea;
}

html.dark .leaflet-bar a {
    border-color: #352e27;
    background: #1b1613;
    color: #f5f1ea;
}

/* -------------------------------------------------------------------------
   Tema escuro — modal de busca
   ------------------------------------------------------------------------- */

html.dark .cp-search__backdrop {
    background: rgba(0, 0, 0, 0.74);
}

html.dark .cp-search__panel {
    border-color: #352e27;
    background: #12100e;
    box-shadow: 0 42px 110px -34px rgba(0, 0, 0, 0.95);
}

html.dark .cp-search__title {
    color: #f5f1ea;
}

html.dark .cp-search__eyebrow,
html.dark .cp-search__foot-brand {
    color: #f0b45a;
}

html.dark .cp-search__close {
    border-color: #352e27;
    color: #b7aea3;
}

html.dark .cp-search__close:hover {
    border-color: #4a4037;
    background: #211b17;
    color: #f5f1ea;
}

html.dark .cp-search__field {
    border-color: #3a312a;
    background: #1b1613;
}

html.dark .cp-search__field:focus-within {
    border-color: #f0b45a;
    background: #1b1613;
    box-shadow: 0 0 0 4px rgba(240, 180, 90, 0.1);
}

html.dark .cp-search__field input {
    color: #f5f1ea;
}

html.dark .cp-search__field input::placeholder {
    color: #7f7469;
}

html.dark .cp-search__clear {
    background: #372f28;
    color: #d6cec3;
}

html.dark .cp-search__clear:hover {
    background: #4a4037;
    color: #fff;
}

html.dark .cp-search__kbd,
html.dark .cp-search__foot kbd {
    border-color: #352e27;
    background: #1b1613;
    color: #9b9085;
}

html.dark .cp-search__types button {
    color: #b7aea3;
}

html.dark .cp-search__types button:hover {
    background: #211b17;
    color: #f5f1ea;
}

html.dark .cp-search__types button.is-active {
    border-color: #f0b45a;
    background: #f0b45a;
    color: #1c1917;
}

html.dark .cp-search__reset {
    color: #f0b45a;
}

html.dark .cp-search__label {
    color: #9b9085;
}

html.dark .cp-search__tag {
    border-color: #352e27;
    background: #1b1613;
    color: #d6cec3;
}

html.dark .cp-search__tag:hover {
    border-color: #4a4037;
    background: #211b17;
    color: #f5f1ea;
}

html.dark .cp-search__tag.is-active {
    border-color: #f0b45a;
    background: #f0b45a;
    color: #1c1917;
}

html.dark .cp-search__body-head {
    border-top-color: #2a2420;
}

html.dark .cp-search__meta,
html.dark .cp-search__shortcut,
html.dark .cp-search__spinner {
    color: #9b9085;
}

html.dark .cp-search__result-link {
    border-color: #352e27;
    background: #1b1613;
}

html.dark .cp-search__result-link:hover,
html.dark .cp-search__result-link:focus-visible {
    border-color: #4a4037;
    background: #211b17;
    box-shadow: 0 16px 32px -28px rgba(0, 0, 0, 0.9);
}

html.dark .cp-search__thumb {
    background: #2b241e;
}

html.dark .cp-search__badge {
    background: #2b241e;
    color: #b7aea3;
}

html.dark .cp-search__badge--noticia {
    background: rgba(248, 113, 113, 0.14);
    color: #fca5a5;
}

html.dark .cp-search__badge--edital {
    background: rgba(251, 191, 36, 0.14);
    color: #fbbf24;
}

html.dark .cp-search__badge--post {
    background: rgba(147, 197, 253, 0.12);
    color: #93c5fd;
}

html.dark .cp-search__result-title {
    color: #f5f1ea;
}

html.dark .cp-search__result-excerpt {
    color: #b7aea3;
}

html.dark .cp-search__result-meta {
    color: #8a7f74;
}

html.dark .cp-search__result-tag {
    background: #2b241e;
    color: #b7aea3;
}

html.dark .cp-search__page {
    border-color: #352e27;
    background: #1b1613;
    color: #b7aea3;
}

html.dark .cp-search__page:hover:not(:disabled) {
    border-color: #4a4037;
    background: #211b17;
    color: #f5f1ea;
}

html.dark .cp-search__page.is-current {
    border-color: #f0b45a;
    background: #f0b45a;
    color: #1c1917;
}

html.dark .cp-search__empty svg {
    color: #4a4037;
}

html.dark .cp-search__empty p {
    color: #b7aea3;
}

html.dark .cp-search__empty-reset {
    border-color: #3a312a;
    background: #1b1613;
    color: #f5f1ea;
}

html.dark .cp-search__empty-reset:hover {
    border-color: #f0b45a;
    background: #211b17;
    color: #f0b45a;
}

html.dark .cp-search__foot {
    border-top-color: #2a2420;
    background: #1b1613;
    color: #8a7f74;
}

/* -------------------------------------------------------------------------
   Tema escuro — transparência
   ------------------------------------------------------------------------- */

html.dark .cp-transp-page {
    --cp-ink: #f4f1eb;
    --cp-ink-2: #e3ddd4;
    --cp-muted: #b7aea3;
    --cp-soft: #948b7e;
    --cp-line: #352e27;
    --cp-line-strong: #4a4037;
    --cp-paper: #0f0d0b;
    --cp-card: #1a1613;
    --cp-red: #e05a5f;
    --cp-red-dark: #f07a7d;
    --cp-gold: #d9a441;
    --cp-green: #6bbf96;
    --cp-slate: #8fa8c4;
}

html.dark .cp-btn--light {
    background: #f4f1eb;
    color: #1c1917;
}

html.dark .cp-btn--outline {
    border-color: #4a4037;
    background: #1a1613;
    color: #f4f1eb;
}

html.dark .cp-btn--outline:hover {
    border-color: #8a7f74;
    background: #211b17;
}

html.dark .cp-status-pill,
html.dark .cp-evidence__item,
html.dark .cp-perfil-card,
html.dark .cp-doc-row,
html.dark .cp-filters,
html.dark .cp-report-card {
    border-color: #352e27;
    background: #1a1613;
}

html.dark .cp-field input:focus,
html.dark .cp-field select:focus {
    border-color: #e05a5f;
    background-color: #1b1613;
}

html.dark .cp-pagination .page-numbers {
    border-color: #352e27;
    background: #1a1613;
    color: #b7aea3;
}
