/* ==========================================================================
   Cabeçalho padrão do site (Mesa de Conselho)
   Um só cabeçalho em todas as páginas: logo à esquerda; à direita as pílulas
   (Ferramentas, Estratégia, Biblioteca), o botão da página, quando houver, e o
   menu ☰. O ☰ abre um painel pequeno, alinhado à direita, com os links da página.
   Para mudar o cabeçalho do site inteiro, mude aqui e em /cabecalho.js.

   Marcação: <nav class="mdc-topo"> … </nav> (veja qualquer página do site).
   Quando a barra não cabe, /cabecalho.js esconde primeiro Ferramentas e
   Estratégia, depois Biblioteca e por fim encurta o texto do botão; o que
   some da barra aparece no painel do ☰.

   Desktop: barra ~78 px · logo 24 px · símbolo 36 px · pílulas 11,84 px
   ========================================================================== */

nav.mdc-topo,
header.mdc-topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 16px;
  padding: 18px 6%;
  margin: 0;
  background: rgba(244, 244, 242, .92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 0;
  border-bottom: 1px solid rgba(23, 24, 26, .08);
  font-family: 'Jost', system-ui, sans-serif;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.7;
  text-align: left;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}
/* páginas que não tinham barra própria (início, diagnósticos, apps): barra presa ao topo */
.mdc-topo.mdc-topo--fixo { position: sticky; top: 0; z-index: 1000; }
.mdc-topo *, .mdc-topo *::before, .mdc-topo *::after { box-sizing: border-box; }

/* logo */
.mdc-topo .nav-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: .04em;
  line-height: 1.7;
  gap: 11.2px;
  color: #17181A;
  text-decoration: none;
  text-transform: none;
  white-space: nowrap;
}
.mdc-topo .nav-logo span { color: #B8924A; }
.mdc-topo .logo-mark { display: block; flex-shrink: 0; width: 36px; height: 36px; color: #B8924A; }

/* lado direito: pílulas, botão e ☰ */
.mdc-topo .mdc-dir {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 14px;
  margin: 0 0 0 auto;
  padding: 0;
}
.mdc-topo .mdc-pill {
  display: inline-block;
  font-family: 'Jost', system-ui, sans-serif;
  font-size: 11.84px;
  letter-spacing: .1em;
  font-weight: 500;
  line-height: 1.7;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  padding: .42em .95em;
  border: 1px solid #B8924A;
  border-radius: 999px;
  background: transparent;
  color: #B8924A;
  transition: background .2s, color .2s, scale .16s cubic-bezier(.23,1,.32,1);
}
.mdc-topo .mdc-pill:hover { background: #B8924A; color: #F4F4F2; }
.mdc-topo .mdc-cta {
  display: inline-block;
  margin-left: 6px;
  font-family: 'Jost', system-ui, sans-serif;
  font-size: 11.52px;
  letter-spacing: .1em;
  font-weight: 600;
  line-height: 1.4;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  padding: 11px 22px;
  border: 0;
  border-radius: 0;
  background: #B8924A;
  color: #17181A;
  transition: background .2s, transform .15s cubic-bezier(.23,1,.32,1), scale .16s cubic-bezier(.23,1,.32,1);
}
@media (hover:hover) and (pointer:fine){.mdc-topo .mdc-cta:hover { background: #D4AF70; color: #17181A; transform: translateY(-1px); }}
.mdc-topo .mdc-cta-curto { display: none; }
.mdc-topo.mdc-cta-curta .mdc-cta-longo { display: none; }
.mdc-topo.mdc-cta-curta .mdc-cta-curto { display: inline; }
.mdc-topo .mdc-burger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  margin: 0 -8px 0 0;
  padding: 8px;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: #17181A;
  line-height: 0;
  cursor: pointer;
}
.mdc-topo .mdc-burger:hover { color: #B8924A; }
.mdc-topo .mdc-burger svg { display: block; width: 24px; height: 24px; }
.mdc-topo .mdc-burger .mdc-ico-fechar { display: none; }
.mdc-topo.mdc-aberto .mdc-burger .mdc-ico-abrir { display: none; }
.mdc-topo.mdc-aberto .mdc-burger .mdc-ico-fechar { display: block; }
.mdc-topo a:focus-visible, .mdc-topo button:focus-visible { outline: 2px solid #B8924A; outline-offset: 3px; }

/* toque: pílulas, botão e ☰ encolhem 3% ao serem pressionados (exceto com "reduzir movimento") */
@media (prefers-reduced-motion: no-preference) {
  .mdc-topo .mdc-pill:active, .mdc-topo .mdc-cta:active, .mdc-topo .mdc-burger:active { scale: .97; }
}
.mdc-topo .mdc-burger { transition: color .2s, scale .16s cubic-bezier(.23, 1, .32, 1); }

/* pílulas que não cabem saem da barra (a ordem é decidida em /cabecalho.js) */
.mdc-topo.mdc-sem-1 .mdc-dir .mdc-pill[data-pill="1"],
.mdc-topo.mdc-sem-2 .mdc-dir .mdc-pill { display: none; }

/* painel do ☰: pequeno, alinhado à direita, logo abaixo da barra */
.mdc-topo .mdc-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 6%;
  z-index: 5;
  width: 300px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 96px);
  max-height: calc(100dvh - 96px);
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0;
  padding: 4px 18px 10px;
  background: #F4F4F2;
  border: 1px solid rgba(23, 24, 26, .1);
  border-top: 2px solid #B8924A;
  box-shadow: 0 18px 40px rgba(23, 24, 26, .16);
  text-align: left;
}
.mdc-topo.mdc-aberto .mdc-menu { display: block; }
/* abre em 0,16 s crescendo a partir do canto do ☰; fecha em 0,12 s */
.mdc-topo .mdc-menu {
  transform-origin: top right;
  opacity: 0;
  scale: .97;
  translate: 0 -4px;
  transition: opacity .12s ease-out, scale .12s ease-out, translate .12s ease-out, display .12s allow-discrete;
}
.mdc-topo.mdc-aberto .mdc-menu {
  opacity: 1;
  scale: 1;
  translate: 0 0;
  transition: opacity .16s cubic-bezier(.23, 1, .32, 1), scale .16s cubic-bezier(.23, 1, .32, 1),
              translate .16s cubic-bezier(.23, 1, .32, 1), display .16s allow-discrete;
}
@starting-style {
  .mdc-topo.mdc-aberto .mdc-menu { opacity: 0; scale: .97; translate: 0 -4px; }
}
@media (prefers-reduced-motion: reduce) {
  .mdc-topo .mdc-menu, .mdc-topo.mdc-aberto .mdc-menu { scale: 1; translate: 0 0; }
}
.mdc-topo .mdc-menu ul { list-style: none; margin: 0; padding: 0; }
.mdc-topo .mdc-menu li { list-style: none; margin: 0; padding: 0; display: block; }
.mdc-topo .mdc-menu li::before, .mdc-topo .mdc-menu li::after { content: none; }
.mdc-topo .mdc-menu li[hidden] { display: none; }
.mdc-topo .mdc-menu a {
  display: block;
  padding: 10px 0;
  border: 0;
  font-family: 'Jost', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .1em;
  line-height: 1.4;
  text-transform: uppercase;
  text-decoration: none;
  white-space: normal;
  background: none;
  color: #17181A;
}
.mdc-topo .mdc-menu li:not([hidden]) ~ li:not([hidden]) > a { border-top: 1px solid rgba(23, 24, 26, .08); }
.mdc-topo .mdc-menu a:hover { color: #B8924A; }
.mdc-topo .mdc-menu a.mdc-destaque,
.mdc-topo .mdc-menu .mdc-plat a { color: #B8924A; font-weight: 500; }
.mdc-topo .mdc-menu a.mdc-destaque:hover,
.mdc-topo .mdc-menu .mdc-plat a:hover { color: #17181A; }
.mdc-topo .mdc-menu-titulo {
  margin: 8px 0 0;
  padding: 12px 0 2px;
  border-top: 1px solid rgba(23, 24, 26, .14);
  font-family: 'Jost', system-ui, sans-serif;
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: .16em;
  line-height: 1.4;
  text-transform: uppercase;
  color: rgba(23, 24, 26, .55);
}
.mdc-topo .mdc-plat small {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: .01em;
  text-transform: none;
  color: rgba(23, 24, 26, .6);
}
.mdc-topo .mdc-plat a[aria-current] { color: rgba(23, 24, 26, .6); }
.mdc-topo .mdc-plat a[aria-current] small::after { content: " · esta página"; }

/* celular */
@media (max-width: 640px) {
  nav.mdc-topo, header.mdc-topo { padding: 14px 5%; gap: 12px; }
  .mdc-topo .nav-logo { font-size: 18.4px; gap: 8px; }
  .mdc-topo .logo-mark { width: 30px; height: 30px; }
  .mdc-topo .mdc-dir { gap: 10px; }
  .mdc-topo .mdc-cta { margin-left: 2px; padding: 9px 14px; font-size: 10.88px; letter-spacing: .08em; }
  .mdc-topo .mdc-menu { right: 5%; }
}
@media (max-width: 420px) {
  .mdc-topo .nav-logo { font-size: 16.32px; gap: 6.4px; }
  .mdc-topo .logo-mark { width: 26px; height: 26px; }
  .mdc-topo .mdc-pill { font-size: 9.6px; letter-spacing: .04em; padding: .4em .7em; }
  .mdc-topo .mdc-cta { padding: 8px 11px; letter-spacing: .04em; }
  .mdc-topo .mdc-burger { margin-right: -6px; padding: 6px; }
}
@media (max-width: 360px) {
  nav.mdc-topo, header.mdc-topo { padding: 12px 4%; gap: 8px; }
  .mdc-topo .nav-logo { font-size: 15.2px; gap: 5.6px; }
  .mdc-topo .logo-mark { width: 22px; height: 22px; }
  .mdc-topo .mdc-dir { gap: 6px; }
  .mdc-topo .mdc-cta { padding: 7px 9px; font-size: 9.6px; letter-spacing: .03em; }
  .mdc-topo .mdc-menu { right: 4%; }
}
/* Celular: área de toque maior nos links pequenos do rodapé (cerca de 40 px de altura),
   sem mudar o layout. Fica aqui porque este arquivo é carregado em todas as páginas. */
@media (max-width: 640px) {
  footer a, footer button, .rodape-nota .link-botao { position: relative; }
  footer a::after, footer button::after, .rodape-nota .link-botao::after {
    content: "";
    position: absolute;
    top: -10px;
    bottom: -10px;
    left: -4px;
    right: -4px;
  }
}
@media print { .mdc-topo { display: none !important; } }
