/* Um único menu serve os dois formatos. Em telas pequenas, o navegador
   mantém o foco no painel aberto e o devolve ao botão de origem. */
.masthead {
  background: #201b21; color: #f9f4ed; border: 0; z-index: 3;
  box-shadow: inset 0 -1px #ffffff20;
}
.skip { z-index: 5; }
.masthead .wordmark { color: #fff3e6; font-size: 2rem; }
.masthead-inner { min-height: 4.8rem; flex-wrap: nowrap; gap: min(5vw, 4rem); }
.nav-dock { flex: 1; min-width: 0; }
.site-nav, .nav-destinations, .nav-account { display: flex; align-items: center; }
.site-nav { justify-content: space-between; gap: 1rem; }
.nav-destinations, .nav-account { gap: clamp(.7rem, 1.6vw, 1.8rem); }
.site-nav a, .site-nav summary, .site-nav button, .menu-trigger, .sheet-close {
  display: inline-flex; align-items: center; gap: .6rem; min-height: 2.75rem;
  color: inherit; font: 600 1rem/1.35 var(--body); text-decoration: none; cursor: pointer;
}
.site-nav a:hover, .site-nav summary:hover, .site-nav button:hover { color: #ffc497; }
.masthead :focus-visible, .menu-sheet :focus-visible { outline-color: #ffd1ad; }
.site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: .35em; }
.nav-group { position: relative; }
.nav-group summary { list-style: none; padding: 0; }
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary::after { content: ""; width: .46rem; height: .46rem; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); }
.nav-group[open] > summary { color: #ffc497; }
.nav-group[open] > summary::after { transform: translateY(2px) rotate(225deg); }
.nav-flyout {
  position: absolute; top: calc(100% + .2rem); left: -.9rem; z-index: 2;
  display: grid; min-width: 15.5rem; max-width: min(22rem, 92vw); padding: .65rem;
  background: #302930; color: #fff3e7; border: 1px solid #655057;
  border-radius: .85rem; box-shadow: 0 1.5rem 3rem #160f1845;
}
.nav-flyout a, .nav-flyout button { padding: .5rem .85rem; border-radius: .4rem; }
.nav-flyout a:hover, .nav-flyout button:hover { background: #41343b; }
.nav-flyout a.nav-highlight { border-bottom: 1px solid #615057; border-radius: 0; margin-bottom: .3rem; justify-content: space-between; color: #ffc497; font-weight: 700; }
.nav-flyout button { width: 100%; border: 0; background: transparent; text-align: left; }
.account-group .nav-flyout { left: auto; right: 0; }
.site-nav .nav-join, .menu-trigger {
  color: #fff3e6; border: 1px solid #866c68; padding: .5rem 1rem; border-radius: 4rem;
}
.site-nav .nav-join:hover, .menu-trigger:hover { color: #201b21; background: #f4c09a; }
.menu-trigger, .sheet-close { background: none; }
.mobile-shortcut { display: none; }
.menu-trigger[hidden], .menu-sheet:not([open]) { display: none; }
.menu-glyph { display: inline-block; width: 1rem; height: .55rem; border-block: 1.5px solid; }
.menu-sheet {
  position: fixed; inset: 0 0 0 auto; margin: 0; padding: 0 clamp(1.2rem, 5vw, 2rem) 2rem;
  height: 100dvh; max-height: 100dvh; width: min(30rem, 100%); max-width: 100%; border: 0;
  background: #241d24; color: #fff4e7; overscroll-behavior: contain;
}
.menu-sheet::backdrop { background: #171318a8; }
html:has(.menu-sheet[open]) { overflow: hidden; }
.sheet-bar { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #63515b; height: 4.6rem; margin-bottom: 1rem; }
.sheet-bar > span { font: 400 1.8rem/1 var(--editorial); }
.sheet-close { color: #f6c7a3; border: 0; padding: .5rem; }
.sheet-close span { font: 1.6rem/1 var(--body); }
.nav-routes { display: grid; }
.nav-flyout.nav-feature { width: 29rem; max-width: 72vw; grid-template-columns: 1.1fr 1fr; gap: .55rem; }
.nav-flyout .menu-story { display: grid; align-content: start; align-items: start; gap: .6rem; padding: 0; overflow: clip; border-radius: .55rem; background: #423139; }
.menu-story img { display: block; width: 100%; height: 6.1rem; object-fit: cover; }
.menu-story > span { display: flex; justify-content: space-between; gap: .45rem; padding: 0 .75rem .7rem; line-height: 1.2; }
.menu-story b { color: #f1b88c; }
html:has(.page-home, .page-conhecimento) { scroll-padding-top: 4.8rem; }
@media (min-width: 960px) {
  :is(.page-home, .page-conhecimento) .masthead { position: sticky; top: 0; }
}
@media (max-width: 959px) {
  :is(.page-home, .page-conhecimento) .compact-header { position: sticky; top: 0; }
  .nav-flyout.nav-feature { width: 100%; max-width: none; grid-template-columns: 1fr; }
  .nav-flyout .menu-story { display: flex; align-items: center; margin: .25rem .7rem 0; }
  .menu-story img { width: 4rem; height: 3.2rem; }
  .menu-story > span { flex: 1; align-items: center; padding: .4rem .65rem .4rem 0; }
  .masthead-inner { min-height: 4.1rem; flex-wrap: wrap; gap: .2rem 1rem; }
  .compact-header .masthead-inner { flex-wrap: nowrap; }
  .compact-header .nav-dock { display: none; }
  .compact-header .mobile-shortcut { display: inline-flex; align-items: center; min-height: 2.75rem; margin-left: auto; color: #fff3e6; text-decoration: none; font-weight: 600; }
  .compact-header .masthead-inner { column-gap: .75rem; }
  .nav-dock { flex-basis: 100%; }
  .site-nav, .nav-destinations, .nav-account { display: grid; align-items: stretch; gap: 0; }
  .site-nav { justify-content: stretch; }
  .nav-destinations > a, .nav-group > summary {
    width: 100%; padding: .65rem .1rem; justify-content: space-between; font: 400 clamp(1.55rem, 6vw, 2.3rem)/1.15 var(--editorial);
  }
  .nav-destinations > *, .nav-account > details { border-bottom: 1px solid #63515b; }
  .nav-flyout { position: static; min-width: 0; max-width: none; padding: 0 0 .7rem .55rem; border: 0; border-left: 1px solid #a17968; border-radius: 0; box-shadow: none; background: transparent; }
  .nav-flyout a.nav-highlight { border: 0; margin-bottom: 0; justify-content: start; }
  .nav-account { margin-block: 1.3rem; display: flex; flex-wrap: wrap; gap: .6rem 1.1rem; }
  .nav-account .account-group { width: 100%; }
  .nav-account .nav-join { background: #f4bf96; color: #211921; border-color: #f4bf96; }
}
@media (prefers-reduced-motion: no-preference) {
  .menu-sheet[open] { animation: entrar-menu 250ms cubic-bezier(.2,.8,.2,1) both; }
  .nav-group[open] > .nav-flyout { animation: abrir-grupo 160ms ease-out; }
  @keyframes entrar-menu { from { opacity: .4; transform: translateX(22px); } }
  @keyframes abrir-grupo { from { opacity: .3; transform: translateY(-4px); } }
}
@media (forced-colors: active) { .site-nav a[aria-current], .nav-group[open] > summary { text-decoration: underline; } }
