/* VINX MOBILE + THEME FIX — 2026-10-29 */

/* PREV/NEXT: navigazione esterna a main.
   Non deve ereditare lo sfondo bianco dei nav mobile. */
body > nav.event-chronology {
  display: grid !important;
  position: relative !important;
  inset: auto !important;
  transform: none !important;
  background: transparent !important;
  border-bottom: 0 !important;
}

body > nav.event-chronology .event-chronology__link {
  color: inherit !important;
}

html[data-main-theme="dark"] body > nav.event-chronology {
  color: #fff !important;
  background: #000 !important;
  --line: #fff;
}

html[data-main-theme="light"] body > nav.event-chronology {
  color: #000 !important;
  background: #fff !important;
  --line: #000;
}

/* Menu espanso: colori espliciti in entrambi i temi. */
@media (max-width: 1280px) {
  html[data-main-theme="dark"]
  .site-header:not(.site-header-home) > .context-nav.open {
    background: #fff !important;
    color: #000 !important;
  }

  html[data-main-theme="light"]
  .site-header:not(.site-header-home) > .context-nav.open {
    background: #000 !important;
    color: #fff !important;
  }

  .site-header:not(.site-header-home)
  > .context-nav.open a {
    color: inherit !important;
  }
}

@media (max-width: 800px) {

  /* La selezione lingua è un NAV ma deve stare nell'header. */
  .site-header-home > .header-main > nav.lang-switch {
    display: flex !important;
    position: static !important;
    inset: auto !important;
    transform: none !important;
    flex: 0 0 auto !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: .15rem !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    z-index: auto !important;
  }

  .site-header-home > .header-main {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: .5rem !important;
    padding-inline: clamp(12px, 3vw, 20px) !important;
  }

  .site-header-home .brand {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    font-size: clamp(.62rem, 2.7vw, .8rem) !important;
  }

  .site-header-home .theme-toggle {
    flex: 0 0 auto !important;
    margin: 0 !important;
  }

  .site-header-home .lang-switch button {
    font-size: .72rem !important;
  }

  /* Le tab sono NAV, ma devono rimanere nel flusso
     dopo il titolo, non sopra il contenuto. */
  main nav.archive-sheets {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    float: none !important;
    clear: both !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    z-index: auto !important;
  }

  /* ART + TECH: titolo su una riga,
     dimensioni adeguate allo schermo. */
  main .landing-unified .landing-art-tech-title {
    font-size: clamp(2.3rem, 10vw, 4.5rem) !important;
    line-height: 1.08 !important;
    letter-spacing: -.06em !important;
    white-space: nowrap !important;
  }

  main .landing-unified .landing-art-tech-button {
    min-height: 0 !important;
    gap: clamp(1.8rem, 8vw, 3rem) !important;
    padding: clamp(1.25rem, 5vw, 1.75rem) !important;
  }

  main .landing-unified .landing-art-tech-copy {
    margin-top: 0 !important;
    font-size: clamp(1rem, 4.3vw, 1.3rem) !important;
    line-height: 1.3 !important;
  }

  main .landing-unified .landing-profile-copy {
    margin-top: clamp(2.5rem, 7vw, 3.5rem) !important;
  }
}
