.portal-shell {
    --portal-tinta: #22302a;
    --portal-texto-suave: #52635a;
    --portal-borda: #e1e8e3;
    --portal-superficie: #f7f9f7;
    --portal-destaque: color-mix(in srgb, var(--cor-primaria, #23734e) 65%, #182c24);
    color: var(--portal-tinta);
    background: #fff;
}

.portal-shell .portal-frame {
    width: min(100%, 80rem);
    margin-inline: auto;
    padding-inline: clamp(16px, 2.4vw, 30px);
}

.portal-skip {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 100;
    padding: 10px 16px;
    border: 2px solid currentColor;
    border-radius: 8px;
    background: #fff;
    color: var(--portal-destaque);
    transform: translateY(-160%);
}

.portal-skip:focus { transform: none; }

.portal-shell .portal-header {
    border-bottom: 1px solid var(--portal-borda);
    box-shadow: 0 3px 12px rgb(30 52 40 / 5%);
}

.portal-utility {
    border-bottom: 1px solid var(--portal-borda);
    background: var(--portal-superficie);
    color: var(--portal-texto-suave);
    font-size: .75rem;
}

.portal-utility .acessibilidade-bar { flex-wrap: wrap; max-width: 100%; }

.portal-utility :is(button, a) {
    min-height: 29px;
    color: var(--portal-destaque);
    border-color: transparent;
    font-weight: 500;
}

.portal-utility :is(button, a):hover {
    background: color-mix(in srgb, var(--portal-destaque) 8%, transparent);
    opacity: 1;
}

.portal-utility :is(button, a):focus-visible,
.portal-header :is(a, button):focus-visible,
.portal-footer a:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.portal-header .portal-brand-row {
    min-height: 86px;
    height: auto;
    gap: clamp(12px, 2vw, 26px);
    padding-block: 12px;
}

.portal-header .civic-brand-link {
    flex-shrink: 1;
    min-width: 0;
    gap: 14px;
}

.portal-header .civic-brand-link img {
    flex: 0 1 auto;
    max-height: 64px;
    max-width: min(170px, 36vw) !important;
}

.portal-header .civic-brand-name { min-width: 0; }

.portal-header .civic-brand-name p:first-child {
    color: var(--portal-tinta);
    font-size: clamp(.9rem, 1.18vw, 1.125rem);
    font-weight: 650;
    line-height: 1.24;
    letter-spacing: -.025em;
    overflow-wrap: anywhere;
}

.portal-header .civic-brand-name p + p {
    margin-top: 3px;
    color: var(--portal-texto-suave);
    font-size: .75rem;
}

.portal-header .portal-search {
    min-height: 44px;
    padding: 5px 5px 5px 13px;
    border: 1px solid var(--portal-borda);
    border-radius: 9px;
    background: var(--portal-superficie);
    box-shadow: none;
}

.portal-header .portal-search:focus-within { border-color: var(--portal-destaque); }

.portal-header .portal-search button {
    padding: 7px 13px;
    border-radius: 6px;
    background: var(--portal-destaque);
    font-weight: 550;
}

.portal-nav .portal-nav-items { flex-wrap: wrap; justify-content: flex-start; }

.portal-nav .portal-nav-link {
    min-height: 46px;
    padding: 10px clamp(9px, 1.1vw, 17px);
    border-bottom: 2px solid transparent;
    font-size: .8125rem;
    font-weight: 550;
    line-height: 1.4;
}

.portal-nav .portal-nav-link:is(:hover, :focus-visible, [aria-current='page']) {
    border-bottom-color: currentColor;
    background: rgb(255 255 255 / 9%);
    opacity: 1;
}

.portal-nav :is(.menu-item, .group):focus-within > .submenu { display: block; }
.portal-nav :is(.menu-item, .group):last-child > .submenu { left: auto; right: 0; }
.portal-nav .submenu { border-radius: 8px; box-shadow: 0 12px 32px rgb(23 45 34 / 14%); }

.portal-page-heading {
    border-bottom: 1px solid var(--portal-borda);
    background: color-mix(in srgb, var(--portal-heading-color, var(--portal-destaque)) 6%, white);
}

.portal-page-heading .portal-page-eyebrow {
    color: var(--portal-destaque);
    font-weight: 550;
}

.portal-page-heading .portal-page-title {
    color: var(--portal-tinta);
    font-weight: 650;
    letter-spacing: -.025em;
}

.portal-page-search {
    border: 1px solid var(--portal-borda);
    background: #fff;
    color: var(--portal-texto-suave);
}

.portal-page-search input { min-width: 0; color: var(--portal-tinta); }
.portal-page-search input::placeholder { color: var(--portal-texto-suave); }
.portal-page-search button { background: var(--portal-destaque); }

.portal-footer {
    border-top: 1px solid var(--portal-borda);
    background: var(--rodape-fundo);
    color: var(--rodape-texto);
    font-size: .8125rem;
    line-height: 1.5;
}

.portal-footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: 18px clamp(18px, 3vw, 42px);
    padding-block: 26px 21px;
}

.portal-footer-grid > * { min-width: 0; }

.portal-footer-brand {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
    color: var(--rodape-titulo);
    font-size: 1rem;
    font-weight: 550;
    line-height: 1.35;
}

.portal-footer-brand img {
    width: auto;
    max-width: min(140px, 100%);
    height: 44px;
    padding: 4px 7px;
    border-radius: 6px;
    background: #fff;
    object-fit: contain;
}

.portal-footer h2 {
    margin-bottom: 8px;
    color: var(--rodape-titulo);
    font-size: .9375rem;
    font-weight: 550;
    line-height: 1.32;
}

.portal-footer a { overflow-wrap: anywhere; }
.portal-footer a:not(.portal-footer-brand) { color: var(--rodape-link); }
.portal-footer a:hover { text-underline-offset: 4px; text-decoration: underline; }
.portal-footer-contact { display: grid; gap: 6px; }
.portal-footer-contact > div { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); gap: 8px; }
.portal-footer-contact dt { color: var(--rodape-titulo); font-weight: 550; }
.portal-footer-contact dd { overflow-wrap: anywhere; }
.portal-footer-links a { display: inline-block; padding-block: 3px; }
.portal-footer-social { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; }
.portal-footer-social a { display: inline-flex; align-items: center; gap: 4px; min-height: 24px; }
.portal-footer-social svg { width: 14px; height: 14px; }

.portal-footer-seals { margin-top: 14px; }
.portal-footer-seals h2 { font-size: .8125rem; }
.portal-footer-seals ul { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.portal-footer-seals img { width: auto; max-width: 130px; height: 42px; padding: 3px; border-radius: 6px; background: #fff; object-fit: contain; }

.portal-footer-bottom {
    border-top: 1px solid color-mix(in srgb, var(--rodape-texto) 20%, transparent);
    background: color-mix(in srgb, var(--rodape-fundo) 88%, black);
    font-size: .75rem;
}

.portal-footer-bottom > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px 18px;
    padding-block: 10px;
}

.portal-footer .civic-icon { width: 15px; height: 15px; }

@media (max-width: 1023px) {
    .portal-header .portal-brand-row { min-height: 76px; }
    .portal-header .civic-brand-link img { max-width: min(115px, 26vw) !important; }
    .portal-header .civic-brand-name { display: block; }
    .portal-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 639px) {
    .portal-header .portal-brand-row { min-height: 70px; gap: 8px; }
    .portal-header .civic-brand-link { gap: 8px; }
    .portal-header .civic-brand-link img { max-height: 48px; }
    .portal-header .civic-brand-name p:first-child { font-size: .8125rem; }
    .portal-header .civic-brand-name p + p { font-size: .6875rem; }
    .portal-footer-grid { padding-block: 20px 15px; }
    .portal-footer-identity, .portal-footer-attendance { grid-column: 1 / -1; }
}
