/* ==========================================================================
   Portal do Expositor
   Complementa o Foundation 6 do tema; não sobrescreve nada do site público.
   ========================================================================== */

:root {
    --portal-bg: #f4f6f9;
    --portal-surface: #ffffff;
    --portal-border: #e2e7ee;
    --portal-text: #23303d;
    --portal-muted: #6b7a8c;
    --portal-accent: #1779ba;
    --portal-accent-dark: #12648f;
    --portal-radius: 10px;
    --portal-shadow: 0 1px 2px rgba(35, 48, 61, .06), 0 4px 16px rgba(35, 48, 61, .06);
}

.portal-body {
    background: var(--portal-bg);
    color: var(--portal-text);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --------------------------------------------------------- header e menu -- */

.portal-header {
    background: var(--portal-surface);
    border-bottom: 1px solid var(--portal-border);
    padding: .75rem 0;
}

.portal-header__logo img {
    max-height: 56px;
    width: auto;
}

.portal-header__tag {
    color: var(--portal-muted);
    font-size: .8125rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.portal-header__user {
    align-items: center;
    display: flex;
    gap: .75rem;
    justify-content: flex-end;
}

.portal-header__name {
    color: var(--portal-text);
    font-weight: 600;
}

.portal-header__exit {
    margin-bottom: 0;
}

/* Link discreto, não botão: a ação principal do cabeçalho é sair. */
.portal-header__account {
    align-items: center;
    color: var(--portal-muted);
    display: inline-flex;
    font-size: .875rem;
    gap: .35rem;
    text-decoration: none;
    white-space: nowrap;
}

.portal-header__account:hover,
.portal-header__account:focus {
    color: var(--portal-accent);
    text-decoration: underline;
}

.portal-nav {
    background: var(--portal-accent);
    position: relative;
}

/* Botão do menu compacto. Escondido no desktop pela media query no fim. */
.portal-nav__toggle {
    align-items: center;
    background: transparent;
    border: 0;
    color: #fff;
    cursor: pointer;
    display: none;
    font-size: 1rem;
    font-weight: 600;
    gap: .75rem;
    padding: .9rem .25rem;
    width: 100%;
}

.portal-nav__toggle-icon {
    background: currentColor;
    border-radius: 2px;
    flex: 0 0 auto;
    height: 2px;
    position: relative;
    width: 22px;
}

.portal-nav__toggle-icon::before,
.portal-nav__toggle-icon::after {
    background: currentColor;
    border-radius: 2px;
    content: '';
    height: 2px;
    left: 0;
    position: absolute;
    transition: transform .2s ease;
    width: 22px;
}

.portal-nav__toggle-icon::before { top: -7px; }
.portal-nav__toggle-icon::after  { top: 7px; }

/* Vira um "X" quando aberto. */
.portal-nav.is-open .portal-nav__toggle-icon { background: transparent; }
.portal-nav.is-open .portal-nav__toggle-icon::before { transform: translateY(7px) rotate(45deg); }
.portal-nav.is-open .portal-nav__toggle-icon::after  { transform: translateY(-7px) rotate(-45deg); }

.portal-nav__toggle-label {
    overflow: hidden;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Traz o reset e a centralização que vinham das classes do Foundation, já que
   o <ul> deixou de usá-las (ver PortalNav.php). */
.portal-nav__list {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

/**
 * Branco em todos os estados.
 *
 * O !important aqui é deliberado: inc/style.phtml monta
 * `.menu li a { color: <header-nav-color> !important }` a partir das cores
 * configuradas no admin. O <ul> do portal já não usa a classe `menu`, mas esse
 * arquivo é gerado por configuração e pode ganhar regras novas — sem o
 * !important, mudar uma cor no admin apagaria o menu do portal de novo.
 */
/* O respiro lateral é .8rem, e não 1rem, para os dez itens caberem numa linha
   só em telas de 1440px — com 1rem o "Enviar Release" descia sozinho para uma
   segunda linha. */
.portal-nav .portal-nav__item > a,
.portal-nav .portal-nav__item > a:link,
.portal-nav .portal-nav__item > a:visited {
    color: #fff !important;
    display: block;
    font-weight: 500;
    padding: .9rem .8rem;
    text-decoration: none;
    transition: background-color .15s ease;
}

.portal-nav .portal-nav__item > a:hover,
.portal-nav .portal-nav__item > a:focus {
    background: rgba(0, 0, 0, .12);
    color: #fff !important;
}

.portal-nav .portal-nav__item.is-active > a {
    background: rgba(0, 0, 0, .2);
    box-shadow: inset 0 -3px 0 #fff;
    color: #fff !important;
}

/* ------------------------------------------------------------- submenu --- */

/**
 * Item de primeiro nível que agrupa outros (hoje, "Credenciamento").
 *
 * A abertura é só CSS: :hover para o mouse e :focus-within para o teclado —
 * quem chega no pai pelo Tab já vê a lista, e o Tab seguinte entra nela. Não há
 * JS envolvido, então nada aqui precisa se sincronizar com o botão do menu
 * compacto.
 */
.portal-nav__item--has-sub {
    position: relative;
}

/* O pai vira <button> quando não tem página própria. Repete o visual do <a>
   irmão em vez de herdá-lo: a regra de cima é uma lista de seletores de
   elemento, e o !important dela vem de inc/style.phtml (ver PortalNav.php). */
.portal-nav .portal-nav__parent {
    background: transparent;
    border: 0;
    color: #fff;
    cursor: pointer;
    display: block;
    font-family: inherit;
    font-size: inherit;
    font-weight: 500;
    line-height: inherit;
    padding: .9rem .8rem;
    transition: background-color .15s ease;
    width: 100%;
}

.portal-nav .portal-nav__parent:hover,
.portal-nav .portal-nav__parent:focus {
    background: rgba(0, 0, 0, .12);
    color: #fff;
}

.portal-nav .portal-nav__item--has-sub.is-active > .portal-nav__parent {
    background: rgba(0, 0, 0, .2);
    box-shadow: inset 0 -3px 0 #fff;
}

/* Seta indicando que há mais coisa embaixo. */
.portal-nav__item--has-sub > a::after,
.portal-nav__item--has-sub > .portal-nav__parent::after {
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    content: '';
    display: inline-block;
    margin-left: .4rem;
    vertical-align: middle;
}

.portal-nav__sub {
    background: var(--portal-accent-dark);
    border-radius: 0 0 var(--portal-radius) var(--portal-radius);
    box-shadow: 0 8px 24px rgba(35, 48, 61, .28);
    display: none;
    left: 0;
    list-style: none;
    margin: 0;
    min-width: 15rem;
    padding: .25rem 0;
    position: absolute;
    top: 100%;
    z-index: 20;
}

.portal-nav__item--has-sub:hover > .portal-nav__sub,
.portal-nav__item--has-sub:focus-within > .portal-nav__sub {
    display: block;
}

.portal-nav .portal-nav__subitem > a,
.portal-nav .portal-nav__subitem > a:link,
.portal-nav .portal-nav__subitem > a:visited {
    color: #fff !important;
    display: block;
    font-weight: 500;
    padding: .7rem 1rem;
    text-decoration: none;
    transition: background-color .15s ease;
    white-space: nowrap;
}

.portal-nav .portal-nav__subitem > a:hover,
.portal-nav .portal-nav__subitem > a:focus {
    background: rgba(0, 0, 0, .18);
    color: #fff !important;
}

.portal-nav .portal-nav__subitem.is-active > a {
    background: rgba(0, 0, 0, .28);
    box-shadow: inset 3px 0 0 #fff;
    color: #fff !important;
}

/* ------------------------------------------------------- main e rodapé --- */

.portal-main {
    flex: 1 0 auto;
    padding: 2rem 0 3rem;
}

.portal-footer {
    background: var(--portal-surface);
    border-top: 1px solid var(--portal-border);
    color: var(--portal-muted);
    font-size: .875rem;
    padding: 1.25rem 0;
}

.portal-footer p {
    margin: 0;
}

.portal-footer__inner {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.5rem;
    justify-content: space-between;
}

.portal-footer__credit a {
    color: var(--portal-muted);
}

.portal-footer__credit a:hover,
.portal-footer__credit a:focus {
    color: var(--portal-accent);
}

/* --------------------------------------------------------------- blocos -- */

/**
 * Abertura da home.
 *
 * Painel, e não texto solto sobre o fundo da página: o texto de abertura tem
 * duas frases e precisa de medida limitada para não passar de 150 caracteres
 * por linha num monitor largo — mas, sem uma superfície atrás, essa coluna
 * estreita ficava encalhada à esquerda, com meia tela vazia ao lado, enquanto
 * todo o resto do portal são cards de largura cheia. O painel ocupa a largura,
 * o texto respira dentro dele, e a home passa a falar a mesma língua visual
 * dos cards logo abaixo.
 */
.portal-hero {
    background: var(--portal-surface);
    border: 1px solid var(--portal-border);
    border-radius: var(--portal-radius);
    box-shadow: var(--portal-shadow);
    margin-bottom: 2rem;
    padding: 1.75rem 2rem;
}

.portal-hero__title {
    font-size: 1.875rem;
    margin-bottom: .25rem;
}

/* Corpo um pouco maior que o padrão: é parágrafo de abertura, não legenda. */
.portal-hero__text {
    color: var(--portal-muted);
    font-size: 1.0625rem;
    line-height: 1.6;
    margin: 0;
    max-width: 68ch;
}

.portal-card {
    background: var(--portal-surface);
    border: 1px solid var(--portal-border);
    border-radius: var(--portal-radius);
    box-shadow: var(--portal-shadow);
    display: block;
    height: 100%;
    padding: 1.5rem;
}

a.portal-card--link {
    color: inherit;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

a.portal-card--link:hover,
a.portal-card--link:focus {
    border-color: var(--portal-accent);
    box-shadow: 0 6px 24px rgba(23, 121, 186, .16);
    transform: translateY(-2px);
}

.portal-card--highlight {
    border-left: 4px solid var(--portal-accent);
}

.portal-card__image {
    display: block;
    margin: -1.5rem -1.5rem 1rem;
    overflow: hidden;
    border-radius: var(--portal-radius) var(--portal-radius) 0 0;
}

.portal-card__image img {
    display: block;
    width: 100%;
    height: auto;
}

/* Card com o ícone numa coluna à esquerda e o texto ao lado. */
a.portal-card--row {
    align-items: center;
    flex-direction: row;
    gap: 1rem;
}

.portal-card__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
}

/* Ícone do card na home do portal. */
.portal-card__icon {
    align-items: center;
    background: rgba(23, 121, 186, .1);
    border-radius: 12px;
    color: var(--portal-accent);
    display: flex;
    flex: 0 0 auto;
    font-size: 1.5rem;
    height: 3rem;
    justify-content: center;
    margin-bottom: 1rem;
    transition: background-color .15s ease, color .15s ease;
    width: 3rem;
}

/* No layout em linha o ícone divide a altura com o texto, sem empurrar. */
a.portal-card--row .portal-card__icon {
    margin-bottom: 0;
}

a.portal-card--row .portal-card__title {
    margin-bottom: .15rem;
}

a.portal-card--row .portal-card__desc {
    margin-bottom: .15rem;
}

/* Sem o margin-top:auto do layout em coluna, que abriria um vão aqui. */
a.portal-card--row .portal-card__cta {
    margin-top: 0;
}

a.portal-card--link:hover .portal-card__icon,
a.portal-card--link:focus .portal-card__icon {
    background: var(--portal-accent);
    color: #fff;
}

.portal-card__title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 .5rem;
}

.portal-card__desc {
    color: var(--portal-muted);
    font-size: .9375rem;
    margin: 0 0 .75rem;
}

.portal-card__badge {
    align-self: flex-start;
    background: rgba(23, 121, 186, .1);
    border-radius: 999px;
    color: var(--portal-accent-dark);
    font-size: .75rem;
    font-weight: 600;
    margin-bottom: .75rem;
    padding: .2rem .65rem;
}

.portal-card__cta {
    color: var(--portal-accent);
    font-size: .875rem;
    font-weight: 600;
    margin-top: auto;
}

.portal-card__cta .fa {
    margin-left: .25rem;
}

/**
 * Card de uma seção que agrupa outras: o card inteiro não é link (seria âncora
 * dentro de âncora), então cada opção é a sua própria linha clicável.
 */
.portal-card--group {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
}

.portal-card--group .portal-card__icon {
    margin-bottom: 0;
}

.portal-card__links {
    list-style: none;
    margin: .25rem 0 0;
    padding: 0;
}

.portal-card__links li + li {
    margin-top: .35rem;
}

.portal-card__links a {
    border-radius: 6px;
    color: var(--portal-accent);
    display: block;
    font-size: .9375rem;
    font-weight: 600;
    margin: 0 -.5rem;
    padding: .4rem .5rem;
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease;
}

.portal-card__links a:hover,
.portal-card__links a:focus {
    background: rgba(23, 121, 186, .1);
    color: var(--portal-accent-dark);
}

.portal-card__links .fa {
    margin-left: .25rem;
}

.portal-empty {
    background: var(--portal-surface);
    border: 1px dashed var(--portal-border);
    border-radius: var(--portal-radius);
    color: var(--portal-muted);
}

.portal-empty p:last-child {
    margin-bottom: 0;
}

/* ------------------------------------------------------------- páginas --- */

.portal-breadcrumb {
    color: var(--portal-muted);
    font-size: .875rem;
    margin-bottom: 1rem;
}

.portal-breadcrumb a {
    color: var(--portal-muted);
}

.portal-breadcrumb span {
    margin: 0 .35rem;
}

.portal-page,
.portal-list {
    background: var(--portal-surface);
    border: 1px solid var(--portal-border);
    border-radius: var(--portal-radius);
    box-shadow: var(--portal-shadow);
    padding: 2rem;
}

.portal-page__header {
    border-bottom: 1px solid var(--portal-border);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
}

.portal-page__title,
.portal-list__title {
    font-size: 1.75rem;
    margin: 0;
}

.portal-page__subtitle {
    color: var(--portal-muted);
    margin: .5rem 0 0;
}

.portal-page__cover {
    margin: 0 0 1.5rem;
}

/* Imagem inteira, sem corte: a altura acompanha a proporção do arquivo. */
.portal-page__cover a {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--portal-radius);
}

.portal-page__cover img {
    border-radius: var(--portal-radius);
    display: block;
    width: 100%;
    height: auto;
}

/* Selo de ampliar, discreto até o hover. */
.portal-page__zoom {
    align-items: center;
    background: rgba(0, 0, 0, .6);
    border-radius: 999px;
    bottom: .75rem;
    color: #fff;
    display: flex;
    font-size: .8125rem;
    gap: .35rem;
    opacity: 0;
    padding: .35rem .8rem;
    position: absolute;
    right: .75rem;
    transition: opacity .15s ease;
}

.portal-page__cover a:hover .portal-page__zoom,
.portal-page__cover a:focus .portal-page__zoom {
    opacity: 1;
}

/* Em telas de toque não há hover: o selo fica sempre visível. */
@media (hover: none) {
    .portal-page__zoom { opacity: 1; }
}

.portal-page__caption {
    color: var(--portal-muted);
    font-size: .875rem;
    margin-top: .5rem;
    text-align: center;
}

.portal-page__content {
    line-height: 1.65;
}

.portal-page__content img {
    height: auto;
    max-width: 100%;
}

.portal-list__header {
    border-bottom: 1px solid var(--portal-border);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
}

.portal-list__desc {
    color: var(--portal-muted);
    margin: .5rem 0 0;
}

/* ------------------------------------------------------------- galeria --- */

.portal-gallery {
    margin-top: 2rem;
    text-align: left;
}

/**
 * Galeria começa pela esquerda.
 *
 * Explícito porque o CSS do tema centraliza por herança em alguns contextos —
 * com poucas fotos elas ficavam no meio da faixa, em vez de seguir o
 * alinhamento do resto do conteúdo.
 */
.portal-gallery .grid-x {
    justify-content: flex-start;
}

.portal-gallery__title,
.downloads__title,
.portal-form__title,
.portal-records__title {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: .02em;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.portal-gallery__item {
    display: block;
    overflow: hidden;
    border-radius: var(--portal-radius);
}

.portal-gallery__item img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform .3s ease;
}

.portal-gallery__item:hover img {
    transform: scale(1.04);
}

/* ----------------------------------------------------------- downloads --- */

.downloads {
    margin-top: 2rem;
}

.downloads__list {
    display: grid;
    gap: .75rem;
    margin: 0;
}

.download-item__link {
    align-items: center;
    background: #fbfcfd;
    border: 1px solid var(--portal-border);
    border-radius: var(--portal-radius);
    color: inherit;
    display: flex;
    gap: 1rem;
    padding: 1rem 1.25rem;
    text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease;
}

.download-item__link:hover,
.download-item__link:focus {
    background: #fff;
    border-color: var(--portal-accent);
    color: inherit;
}

.download-item__icon {
    align-items: center;
    background: rgba(23, 121, 186, .1);
    border-radius: 8px;
    color: var(--portal-accent-dark);
    display: flex;
    flex: 0 0 auto;
    font-size: 1.25rem;
    height: 2.75rem;
    justify-content: center;
    width: 2.75rem;
}

/* Cor por família de arquivo: o Themify não tem um glifo por tipo, então a
   distinção visual vem daqui. */
.download-item--pdf .download-item__icon { background: rgba(204, 75, 55, .12);  color: #b03a26; }
.download-item--doc .download-item__icon { background: rgba(23, 92, 168, .12);  color: #175ca8; }
.download-item--xls .download-item__icon { background: rgba(30, 132, 73, .12);  color: #1e8449; }
.download-item--ppt .download-item__icon { background: rgba(211, 106, 32, .12); color: #c25e14; }
.download-item--zip .download-item__icon { background: rgba(120, 110, 140, .14);color: #5f5773; }
.download-item--img .download-item__icon { background: rgba(125, 60, 152, .12); color: #7d3c98; }

.download-item__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
}

.download-item__name {
    font-weight: 600;
    overflow-wrap: anywhere;
}

.download-item__desc {
    color: var(--portal-muted);
    font-size: .875rem;
}

.download-item__meta {
    color: var(--portal-muted);
    font-size: .75rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.download-item__cta {
    color: var(--portal-accent);
    flex: 0 0 auto;
    font-size: 1.125rem;
}

/* ------------------------------------------------------------ notícias --- */

.portal-news__item {
    border-bottom: 1px solid var(--portal-border);
    padding: 1.5rem 0;
}

.portal-news__item:first-child {
    padding-top: 0;
}

.portal-news__item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.portal-news__thumb {
    display: block;
    overflow: hidden;
    border-radius: var(--portal-radius);
}

.portal-news__thumb img {
    display: block;
    width: 100%;
    height: auto;
}

/* Marcador para publicação sem imagem, quando outras da lista têm. */
.portal-news__thumb--empty {
    align-items: center;
    background: var(--portal-bg);
    border: 1px dashed var(--portal-border);
    border-radius: var(--portal-radius);
    color: #b9c3ce;
    display: flex;
    font-size: 2rem;
    justify-content: center;
    min-height: 8rem;
}

.portal-news__date {
    color: var(--portal-muted);
    font-size: .8125rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.portal-news__title {
    font-size: 1.25rem;
    margin: .25rem 0 .5rem;
}

.portal-news__title a {
    color: inherit;
}

.portal-news__subtitle {
    color: var(--portal-muted);
    font-weight: 500;
    margin-bottom: .5rem;
}

.portal-news__summary {
    color: var(--portal-muted);
    margin-bottom: .5rem;
}

.portal-news__more {
    font-size: .875rem;
    font-weight: 600;
}

.portal-paginator {
    margin-top: 2rem;
}

.portal-paginator .pagination {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.portal-paginator .page-link {
    border: 1px solid var(--portal-border);
    border-radius: 6px;
    color: var(--portal-accent);
    display: block;
    padding: .4rem .75rem;
    text-decoration: none;
}

.portal-paginator .page-item.active .page-link {
    background: var(--portal-accent);
    border-color: var(--portal-accent);
    color: #fff;
}

.portal-paginator .page-link.disabled {
    color: var(--portal-muted);
    opacity: .5;
    pointer-events: none;
}

/* ----------------------------------------------------------- formulário -- */

.portal-form {
    background: #fbfcfd;
    border: 1px solid var(--portal-border);
    border-left: 4px solid var(--portal-accent);
    border-radius: var(--portal-radius);
    margin-top: 2rem;
    padding: 1.75rem;
}

.portal-form__desc {
    color: var(--portal-muted);
    margin-bottom: 1.25rem;
}

.portal-form .required {
    color: #cc4b37;
}

/**
 * Campo de arquivo.
 *
 * O espaçamento é todo do .file-field, e o input por dentro fica com
 * margin-bottom zerado. Antes o input carregava o 1rem do Foundation e a dica
 * caía DEPOIS dessa margem: ficava mais perto do rótulo do campo seguinte do
 * que do campo que ela descreve, e se lia como se pertencesse ao próximo.
 */
.portal-form .file-field {
    display: block;
    margin-bottom: 1rem;
    position: relative;
}

.portal-form .file-field__label {
    display: block;
    margin-bottom: .35rem;
}

.portal-form .file-field input[type="file"] {
    background: #fff;
    border: 1px dashed var(--portal-border);
    border-radius: 6px;
    margin-bottom: 0;
    padding: .75rem;
    width: 100%;
}

.portal-form .file-field.is-dragover input[type="file"] {
    background: rgba(23, 121, 186, .06);
    border-color: var(--portal-accent);
    border-style: dashed;
}

.portal-form .file-field__hint {
    color: var(--portal-muted);
    display: block;
    font-size: .75rem;
    line-height: 1.45;
    margin-top: .4rem;
}

/**
 * Instrução de uso, acima do campo.
 *
 * Fica antes do input e com contraste de verdade — não é "letra miúda". É a
 * única parte do texto que muda o que a pessoa faz: o seletor nativo substitui
 * a seleção anterior, e sem aviso ninguém supõe o contrário.
 */
.portal-form .file-field__howto {
    align-items: flex-start;
    background: rgba(23, 121, 186, .07);
    border-radius: 6px;
    color: var(--portal-text);
    display: flex;
    font-size: .8125rem;
    gap: .5rem;
    line-height: 1.45;
    margin: 0 0 .5rem;
    padding: .5rem .625rem;
}

.portal-form .file-field__howto-icon {
    color: var(--portal-accent);
    flex: 0 0 auto;
    font-weight: 700;
    line-height: 1.45;
}

/* ------------------------------------------------------------ ações ------- */

.file-field__actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem .75rem;
    margin-top: .5rem;
}

.file-field__actions:empty {
    display: none;
}

.portal-form .file-field__add {
    background: transparent;
    border: 1px dashed var(--portal-accent);
    border-radius: 6px;
    color: var(--portal-accent);
    cursor: pointer;
    font-size: .8125rem;
    font-weight: 600;
    padding: .45rem .75rem;
    transition: background-color .15s ease, color .15s ease;
}

.portal-form .file-field__add:hover,
.portal-form .file-field__add:focus {
    background: var(--portal-accent);
    color: #fff;
}

.file-field__count,
.file-field__full {
    color: var(--portal-muted);
    font-size: .75rem;
}

/* ------------------------------------------- lista de arquivos escolhidos -- */

.file-field__list {
    list-style: none;
    margin: .5rem 0 0;
    padding: 0;
}

.file-field__list[hidden] {
    display: none;
}

.file-field__item {
    align-items: center;
    background: #fff;
    border: 1px solid var(--portal-border);
    border-radius: 6px;
    display: flex;
    gap: .625rem;
    margin-bottom: .375rem;
    padding: .5rem .625rem;
}

/* O nome pode ser longo; ele encolhe e corta, e o tamanho e o botão de
   remover ficam sempre visíveis à direita. */
.file-field__name {
    flex: 1 1 auto;
    font-size: .875rem;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-field__size {
    color: var(--portal-muted);
    flex: 0 0 auto;
    font-size: .75rem;
    font-variant-numeric: tabular-nums;
}

.file-field__remove {
    background: transparent;
    border: 0;
    border-radius: 50%;
    color: var(--portal-muted);
    cursor: pointer;
    flex: 0 0 auto;
    font-size: 1.125rem;
    height: 1.5rem;
    line-height: 1;
    padding: 0;
    transition: background-color .15s ease, color .15s ease;
    width: 1.5rem;
}

.file-field__remove:hover,
.file-field__remove:focus {
    background: rgba(204, 75, 55, .12);
    color: #cc4b37;
}

.file-field__error {
    color: #cc4b37;
    display: block;
    font-size: .8125rem;
    font-weight: 600;
    margin-top: .35rem;
}

/* ------------------------------------------------------------- envios ---- */

.portal-records {
    margin-top: 2rem;
}

.portal-records__count {
    background: rgba(23, 121, 186, .12);
    border-radius: 999px;
    color: var(--portal-accent-dark);
    font-size: .8125rem;
    margin-left: .35rem;
    padding: .1rem .55rem;
}

.portal-records__intro {
    color: var(--portal-muted);
}

.portal-records__list {
    display: grid;
    gap: .75rem;
    margin: 0;
}

.portal-records__row {
    border: 1px solid var(--portal-border);
    border-radius: var(--portal-radius);
    overflow: hidden;
}

.portal-records__summary {
    align-items: center;
    background: #fbfcfd;
    cursor: pointer;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: space-between;
    padding: .9rem 1.25rem;
}

.portal-records__headline {
    font-weight: 600;
}

.portal-records__when {
    color: var(--portal-muted);
    font-size: .8125rem;
}

.portal-records__fields {
    display: grid;
    gap: .35rem 1.5rem;
    grid-template-columns: minmax(9rem, 14rem) 1fr;
    margin: 0;
    padding: 1.25rem;
}

.portal-records__fields dt {
    color: var(--portal-muted);
    font-size: .8125rem;
    font-weight: 600;
    text-transform: uppercase;
}

.portal-records__fields dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.portal-records__row .downloads {
    margin: 0;
    padding: 0 1.25rem 1.25rem;
}

/* ---------------------------------------------------------------- conta -- */

/* Formulário curto: largura de leitura, centrado, em vez de esticado na
   coluna inteira do portal. */
.portal-account {
    margin-left: auto;
    margin-right: auto;
    max-width: 34rem;
}

.portal-account__form {
    margin-top: 1.5rem;
}

/* Sobe para junto do campo que descreve, por cima do margin-bottom que o
   Foundation dá ao input. */
.portal-account__hint {
    color: var(--portal-muted);
    font-size: .8125rem;
    margin: -.75rem 0 1rem;
}

.portal-account__show {
    align-items: center;
    color: var(--portal-muted);
    display: flex;
    font-size: .875rem;
    gap: .5rem;
    margin-bottom: 1.25rem;
}

.portal-account__show input[type="checkbox"] {
    margin: 0;
}

.portal-account__back {
    margin-top: 1.25rem;
    text-align: center;
}

/* ---------------------------------------------------------------- login -- */

.portal-login {
    padding: 2rem 0;
}

.portal-login__title {
    font-size: 1.5rem;
    margin-bottom: .25rem;
}

.portal-login__intro {
    color: var(--portal-muted);
    margin-bottom: 1.5rem;
}

.portal-login__help {
    color: var(--portal-muted);
    font-size: .875rem;
    margin: 1rem 0 0;
    text-align: center;
}

/* ------------------------------------------------------------ responsivo -- */

/* Abaixo de 1024px os 9 itens não cabem numa linha: o menu vira painel. */
@media screen and (max-width: 63.9375em) {
    .portal-nav .portal-nav__toggle {
        display: flex;
    }

    /* Fechado por padrão; o .portal-nav na frente evita empate de
       especificidade com a regra base do desktop. */
    .portal-nav .portal-nav__list {
        display: none;
        flex-direction: column;
        flex-wrap: nowrap;
        padding-bottom: .5rem;
    }

    .portal-nav.is-open .portal-nav__list {
        display: flex;
    }

    .portal-nav .portal-nav__item {
        border-top: 1px solid rgba(255, 255, 255, .18);
        width: 100%;
    }

    .portal-nav .portal-nav__item > a {
        padding: .85rem .25rem;
    }

    .portal-nav .portal-nav__item.is-active > a {
        background: rgba(0, 0, 0, .2);
        /* No painel vertical a barra fica à esquerda, não embaixo. */
        box-shadow: inset 3px 0 0 #fff;
        padding-left: .75rem;
    }

    /* No painel não há hover para descobrir: o submenu fica sempre aberto,
       recuado, como uma sublista. */
    .portal-nav .portal-nav__parent {
        padding: .85rem .25rem;
        text-align: left;
    }

    .portal-nav .portal-nav__item--has-sub.is-active > .portal-nav__parent {
        box-shadow: none;
    }

    .portal-nav .portal-nav__sub {
        background: transparent;
        border-radius: 0;
        box-shadow: none;
        display: block;
        min-width: 0;
        padding: 0 0 .35rem;
        position: static;
    }

    .portal-nav .portal-nav__subitem > a {
        opacity: .92;
        padding: .55rem .25rem .55rem 1.25rem;
    }

    .portal-nav .portal-nav__subitem.is-active > a {
        padding-left: 1.25rem;
    }
}

@media screen and (max-width: 39.9375em) {
    .portal-page,
    .portal-list {
        padding: 1.25rem;
    }

    /* Header em duas linhas: logo + marca em cima, usuário embaixo. */
    .portal-header__logo img {
        max-height: 44px;
    }

    /* Três itens (nome, alterar senha, sair) não cabem lado a lado num
       celular estreito: o nome ocupa a linha e as ações vão para a de baixo. */
    .portal-header__user {
        border-top: 1px solid var(--portal-border);
        flex-wrap: wrap;
        gap: .5rem .75rem;
        justify-content: space-between;
        margin-top: .5rem;
        padding-top: .6rem;
    }

    .portal-header__name {
        flex: 1 0 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Mesmo respiro dos cards abaixo: com 2rem o texto do painel começava
       recuado em relação a eles, e a coluna estreita não sobra largura para
       esse luxo. */
    .portal-hero {
        padding: 1.5rem;
    }

    .portal-hero__title {
        font-size: 1.5rem;
    }

    .portal-hero__text {
        font-size: 1rem;
    }

    .portal-page__title,
    .portal-list__title {
        font-size: 1.375rem;
    }

    .portal-records__fields {
        grid-template-columns: 1fr;
    }

    .portal-records__fields dd {
        margin-bottom: .5rem;
    }

    .portal-records__summary {
        align-items: flex-start;
        flex-direction: column;
    }

    /* Alvo de toque confortável e nome de arquivo que não estoura a largura. */
    .download-item__link {
        gap: .75rem;
        padding: .9rem 1rem;
    }

    .download-item__icon {
        height: 2.25rem;
        width: 2.25rem;
    }

    .portal-news__thumb {
        margin-bottom: .75rem;
    }
}
