/* Dream RP — layout stability, navbar clearance and natural document flow.
   No forced scroll-snap or fixed section heights: the footer remains reachable,
   and a section grows naturally whenever its content needs more space. */
html:has(body[data-site-page]) {
  scroll-snap-type: none !important;
  scroll-padding-block-start: 0 !important;
  scroll-behavior: smooth;
}

body[data-site-page] {
  height: auto !important;
  min-height: 100dvh;
  overflow-x: clip !important;
  overflow-y: auto !important;
}

body[data-site-page] #conteudo {
  display: block;
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
}

body[data-site-page] #conteudo > section {
  height: auto !important;
  min-height: max(calc(100dvh - var(--header-h, 80px)), fit-content);
  max-height: none !important;
  box-sizing: border-box;
  overflow: visible !important;
  overscroll-behavior-y: auto;
  scroll-snap-align: none !important;
  scroll-snap-stop: normal !important;
  scroll-margin-block-start: 0 !important;
  scrollbar-gutter: auto;
  -webkit-overflow-scrolling: auto;
}

body[data-site-page] .header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
}

body[data-site-page] footer,
body[data-site-page] .footer,
body[data-site-page] #site-footer {
  position: relative !important;
  inset: auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  scroll-snap-align: none !important;
  scroll-snap-stop: normal !important;
  margin-top: 0;
}

/* Entry sections on every public route begin below the fixed navigation. */
body[data-site-page="home"] #conteudo > #inicio {
  min-height: 100dvh !important;
  height: auto !important;
  max-height: none !important;
  padding-top: calc(var(--header-h, 92px) + clamp(34px, 5vh, 70px)) !important;
  padding-bottom: clamp(18px, 3vh, 42px) !important;
}

body[data-site-page="experiencias"] #conteudo > .cinema,
body[data-site-page="perguntas"] #conteudo > #duvidas,
body[data-site-page="comunidade"] #conteudo > #comunidade,
body[data-site-page="projeto"] #conteudo > #projeto {
  height: auto !important;
  min-height: 100dvh !important;
  max-height: none !important;
  padding-top: calc(var(--header-h, 92px) + clamp(34px, 5vh, 70px)) !important;
  scroll-margin-block-start: 0 !important;
  overflow: visible !important;
}

/* The MTAX introduction and each following subject are independent sections. */
body[data-site-page="mtax"] #conteudo > #mtax {
  height: auto !important;
  min-height: 100dvh !important;
  max-height: none !important;
  padding-top: calc(var(--header-h, 92px) + clamp(30px, 4.5vh, 66px)) !important;
  scroll-margin-block-start: 0 !important;
}

body[data-site-page="mtax"] #conteudo > #ecossistema-mtax,
body[data-site-page="mtax"] #conteudo > #mtax-launcher,
body[data-site-page="mtax"] #conteudo > #mtax-requisitos,
body[data-site-page="mtax"] #conteudo > #mtax-como-jogar {
  height: auto !important;
  min-height: 100dvh !important;
  max-height: none !important;
  overflow: visible !important;
  scroll-margin-block-start: 0 !important;
}

@media (max-width: 960px) {
  body[data-site-page="home"] #conteudo > #inicio {
    padding-top: calc(var(--header-h, 76px) + 28px) !important;
  }
  body[data-site-page="experiencias"] #conteudo > .cinema,
  body[data-site-page="perguntas"] #conteudo > #duvidas,
  body[data-site-page="comunidade"] #conteudo > #comunidade,
  body[data-site-page="projeto"] #conteudo > #projeto {
    padding-top: calc(var(--header-h, 76px) + 28px) !important;
  }
  body[data-site-page="mtax"] #conteudo > #mtax {
    padding-top: calc(var(--header-h, 76px) + 26px) !important;
  }
}

@media (max-width: 640px) {
  body[data-site-page="home"] #conteudo > #inicio {
    padding-top: calc(var(--header-h, 68px) + 22px) !important;
  }
  body[data-site-page="experiencias"] #conteudo > .cinema,
  body[data-site-page="perguntas"] #conteudo > #duvidas,
  body[data-site-page="comunidade"] #conteudo > #comunidade,
  body[data-site-page="projeto"] #conteudo > #projeto {
    padding-top: calc(var(--header-h, 68px) + 22px) !important;
  }
  body[data-site-page="mtax"] #conteudo > #mtax {
    padding-top: calc(var(--header-h, 68px) + 22px) !important;
  }
}

@supports not (height: 100dvh) {
  body[data-site-page] { min-height: 100vh; }
  body[data-site-page] #conteudo > section { min-height: max(calc(100vh - var(--header-h, 80px)), fit-content); }
}

@media (prefers-reduced-motion: reduce) {
  html:has(body[data-site-page]) { scroll-behavior: auto; scroll-snap-type: none !important; }
}


/* MTAX VERTICAL CENTERING v3
   Align each MTAX subject in the usable viewport beneath the fixed navbar.
   Natural flow remains enabled; longer sections grow instead of clipping content.
*/
body[data-site-page="mtax"] #conteudo > #mtax,
body[data-site-page="mtax"] #conteudo > #ecossistema-mtax,
body[data-site-page="mtax"] #conteudo > #mtax-launcher,
body[data-site-page="mtax"] #conteudo > #mtax-requisitos,
body[data-site-page="mtax"] #conteudo > #mtax-como-jogar {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: stretch !important;
  box-sizing: border-box !important;
  height: auto !important;
  min-height: 100dvh !important;
  max-height: none !important;
  padding-top: calc(var(--header-h, 92px) + clamp(18px, 2.5vh, 32px)) !important;
  padding-bottom: clamp(24px, 3vh, 40px) !important;
  overflow: visible !important;
  scroll-snap-align: none !important;
  scroll-snap-stop: normal !important;
  scroll-margin-block-start: 0 !important;
}

body[data-site-page="mtax"] #conteudo > #mtax > .platform__content,
body[data-site-page="mtax"] #conteudo > #ecossistema-mtax > .platform__content,
body[data-site-page="mtax"] #conteudo > .platform-mtax-section > .platform__content {
  flex: 0 0 auto;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* Center as long as the content fits; on dense/short screens, start naturally below the navbar. */
@media (max-height: 760px) and (min-width: 701px) {
  body[data-site-page="mtax"] #conteudo > #mtax,
  body[data-site-page="mtax"] #conteudo > #ecossistema-mtax,
  body[data-site-page="mtax"] #conteudo > #mtax-launcher,
  body[data-site-page="mtax"] #conteudo > #mtax-requisitos,
  body[data-site-page="mtax"] #conteudo > #mtax-como-jogar {
    justify-content: flex-start !important;
    padding-top: calc(var(--header-h, 92px) + 18px) !important;
    padding-bottom: 28px !important;
  }
}

@media (max-width: 700px) {
  body[data-site-page="mtax"] #conteudo > #mtax,
  body[data-site-page="mtax"] #conteudo > #ecossistema-mtax,
  body[data-site-page="mtax"] #conteudo > #mtax-launcher,
  body[data-site-page="mtax"] #conteudo > #mtax-requisitos,
  body[data-site-page="mtax"] #conteudo > #mtax-como-jogar {
    justify-content: center !important;
    padding-top: calc(var(--header-h, 68px) + 18px) !important;
    padding-bottom: 28px !important;
  }
}

/* MTAX GUIDE — ONE SCREEN DESKTOP LAYOUT v5.
   Removes duplicated preparation content and keeps the primary guide inside one
   usable viewport on desktop. Short/tall screens can grow naturally to avoid clipping. */
body[data-site-page="mtax"] #conteudo > #mtax-como-jogar {
  box-sizing: border-box !important;
  min-height: 100dvh !important;
  height: auto !important;
  max-height: none !important;
  padding-top: calc(var(--header-h, 92px) + clamp(12px, 1.6vh, 20px)) !important;
  padding-bottom: clamp(16px, 2vh, 24px) !important;
  overflow: visible !important;
}
body[data-site-page="mtax"] #mtax-como-jogar .platform__content {
  width: min(calc(100% - (var(--layout-gutter, 24px) * 2)), var(--container, 1440px)) !important;
  margin-inline: auto !important;
}
body[data-site-page="mtax"] #mtax-como-jogar .platform__chapter--steps {
  width: 100% !important;
  margin: 0 !important;
}
body[data-site-page="mtax"] #mtax-como-jogar .platform__steps {
  display: grid !important;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1fr) !important;
  align-items: center !important;
  gap: clamp(28px, 4.2vw, 70px) !important;
  margin: 0 !important;
}
body[data-site-page="mtax"] #mtax-como-jogar .platform__steps-title {
  position: static !important;
  align-self: center !important;
  min-width: 0;
}
body[data-site-page="mtax"] #mtax-como-jogar .platform__steps-title h3 {
  margin: 8px 0 0 !important;
  font-size: clamp(34px, 3vw, 54px) !important;
  line-height: 1.08 !important;
  text-wrap: balance;
}
body[data-site-page="mtax"] #mtax-como-jogar .platform__steps-title > p {
  max-width: 48ch;
  margin-top: 14px !important;
  font-size: clamp(13px, .82vw, 15px) !important;
  line-height: 1.7 !important;
}
body[data-site-page="mtax"] #mtax-como-jogar .platform__opening-status {
  margin-top: 18px !important;
  padding: 13px 15px !important;
  gap: 11px !important;
}
body[data-site-page="mtax"] #mtax-como-jogar .platform__opening-status small {
  font-size: 11px !important;
  line-height: 1.55 !important;
}
body[data-site-page="mtax"] #mtax-como-jogar .platform__source {
  margin-top: 17px !important;
  padding-top: 13px !important;
  gap: 7px !important;
  font-size: 10px;
  line-height: 1.55;
}
body[data-site-page="mtax"] #mtax-como-jogar .platform__source span {
  max-width: 58ch;
}
body[data-site-page="mtax"] #mtax-como-jogar .platform__source a {
  font-size: 11px;
  line-height: 1.5;
}
body[data-site-page="mtax"] #mtax-como-jogar .platform__steps-list {
  min-width: 0;
  margin: 0 !important;
}
body[data-site-page="mtax"] #mtax-como-jogar .platform-step {
  grid-template-columns: 24px minmax(0, 1fr) 14px !important;
  align-items: start;
  gap: 13px !important;
  padding: clamp(12px, 1.05vw, 17px) 5px !important;
}
body[data-site-page="mtax"] #mtax-como-jogar .platform-step strong {
  font-size: clamp(11px, .68vw, 12px) !important;
  line-height: 1.45 !important;
}
body[data-site-page="mtax"] #mtax-como-jogar .platform-step p {
  max-width: 60ch;
  margin-top: 6px !important;
  font-size: clamp(12px, .72vw, 13px) !important;
  line-height: 1.62 !important;
}
body[data-site-page="mtax"] #mtax-como-jogar .platform-step a {
  margin-top: 5px !important;
  font-size: 11px !important;
  line-height: 1.45 !important;
}
/* At shorter desktop viewports use the same flow with tighter vertical rhythm. */
@media (min-width: 1101px) and (max-height: 820px) {
  body[data-site-page="mtax"] #conteudo > #mtax-como-jogar {
    padding-top: calc(var(--header-h, 92px) + 8px) !important;
    padding-bottom: 12px !important;
  }
  body[data-site-page="mtax"] #mtax-como-jogar .platform__steps {
    gap: clamp(24px, 3vw, 48px) !important;
  }
  body[data-site-page="mtax"] #mtax-como-jogar .platform__steps-title h3 {
    font-size: clamp(32px, 2.7vw, 46px) !important;
  }
  body[data-site-page="mtax"] #mtax-como-jogar .platform__steps-title > p {
    margin-top: 10px !important;
    line-height: 1.55 !important;
  }
  body[data-site-page="mtax"] #mtax-como-jogar .platform__opening-status {
    margin-top: 12px !important;
  }
  body[data-site-page="mtax"] #mtax-como-jogar .platform__source {
    margin-top: 11px !important;
    padding-top: 9px !important;
  }
  body[data-site-page="mtax"] #mtax-como-jogar .platform-step {
    padding-block: 9px !important;
  }
}
/* Tablets and phones prioritize readable, natural scrolling instead of forcing content into a short screen. */
@media (max-width: 1100px) {
  body[data-site-page="mtax"] #conteudo > #mtax-como-jogar {
    padding-top: calc(var(--header-h, 76px) + 24px) !important;
    padding-bottom: 36px !important;
  }
  body[data-site-page="mtax"] #mtax-como-jogar .platform__steps {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 24px !important;
  }
  body[data-site-page="mtax"] #mtax-como-jogar .platform__steps-title h3 {
    font-size: clamp(36px, 5.4vw, 52px) !important;
  }
  body[data-site-page="mtax"] #mtax-como-jogar .platform-step {
    padding-block: 15px !important;
  }
}
@media (max-width: 700px) {
  body[data-site-page="mtax"] #conteudo > #mtax-como-jogar {
    padding-top: calc(var(--header-h, 68px) + 20px) !important;
    padding-bottom: 28px !important;
  }
  body[data-site-page="mtax"] #mtax-como-jogar .platform__steps-title > p {
    font-size: 13px !important;
  }
  body[data-site-page="mtax"] #mtax-como-jogar .platform-step {
    grid-template-columns: 22px minmax(0, 1fr) 12px !important;
    gap: 10px !important;
  }
}

