/* v386 — Desktop navigation restore and single-mode header correction
   Purpose: restore the full governance spine nav on desktop/tablet-wide screens,
   keep search compact, keep Request access visible, and prevent the secondary
   burger from appearing underneath the desktop header. */

html body header#tvh-header,
html body #tvh-header{
  width: 100% !important;
  background: #fffaf0 !important;
  border-bottom: 1px solid rgba(10,42,67,.14) !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 1000 !important;
}

/* Desktop and wide tablet: full institutional navigation visible. */
@media (min-width: 1181px){
  html body header#tvh-header .tvh-container.tvh-header-inner,
  html body #tvh-header .tvh-container.tvh-header-inner{
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    padding: 0 clamp(28px, 3vw, 64px) !important;
    min-height: 86px !important;
    height: auto !important;
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto auto !important;
    grid-template-rows: 1fr !important;
    align-items: center !important;
    column-gap: clamp(12px, 1.1vw, 22px) !important;
    row-gap: 0 !important;
    overflow: visible !important;
  }

  html body header#tvh-header .tvh-logo,
  html body #tvh-header .tvh-logo{
    grid-column: 1 !important;
    grid-row: 1 !important;
    min-width: max-content !important;
    max-width: max-content !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 14px !important;
    white-space: nowrap !important;
  }

  html body header#tvh-header .tvh-logo-mark,
  html body #tvh-header .tvh-logo-mark{
    flex: 0 0 40px !important;
  }

  html body header#tvh-header .tvh-logo-name,
  html body #tvh-header .tvh-logo-name{
    display: inline !important;
    white-space: nowrap !important;
  }

  html body header#tvh-header .tvh-logo-tag,
  html body #tvh-header .tvh-logo-tag{
    display: inline !important;
    white-space: nowrap !important;
  }

  html body header#tvh-header .tvh-nav-primary,
  html body #tvh-header .tvh-nav-primary{
    grid-column: 2 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
    width: 100% !important;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: clamp(12px, 1.05vw, 20px) !important;
    overflow: hidden !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
  }

  html body header#tvh-header .tvh-nav-primary a,
  html body #tvh-header .tvh-nav-primary a{
    display: inline-flex !important;
    align-items: center !important;
    white-space: nowrap !important;
    min-width: max-content !important;
    font-size: clamp(13px, .76vw, 16px) !important;
    line-height: 1 !important;
    padding: 10px 0 !important;
  }

  html body header#tvh-header .tvh-search-trigger,
  html body #tvh-header .tvh-search-trigger{
    grid-column: 3 !important;
    grid-row: 1 !important;
    width: 46px !important;
    min-width: 46px !important;
    max-width: 46px !important;
    height: 46px !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    white-space: nowrap !important;
  }

  html body header#tvh-header .tvh-search-trigger svg,
  html body #tvh-header .tvh-search-trigger svg{
    width: 18px !important;
    height: 18px !important;
    flex: 0 0 18px !important;
  }

  html body header#tvh-header .tvh-search-trigger .label,
  html body header#tvh-header .tvh-search-shortcut,
  html body #tvh-header .tvh-search-trigger .label,
  html body #tvh-header .tvh-search-shortcut{
    display: none !important;
  }

  html body header#tvh-header .tvh-nav-actions,
  html body #tvh-header .tvh-nav-actions{
    grid-column: 4 !important;
    grid-row: 1 !important;
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 14px !important;
    white-space: nowrap !important;
    min-width: max-content !important;
  }

  html body header#tvh-header .tvh-nav-actions a,
  html body header#tvh-header .tvh-cta-primary,
  html body header#tvh-header .tvh-link-text,
  html body #tvh-header .tvh-nav-actions a,
  html body #tvh-header .tvh-cta-primary,
  html body #tvh-header .tvh-link-text{
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    flex: 0 0 auto !important;
  }

  html body header#tvh-header .tvh-burger,
  html body #tvh-header .tvh-burger{
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  html body header#tvh-header .tvh-mobile-nav,
  html body #tvh-header .tvh-mobile-nav{
    display: none !important;
  }
}

/* Constrained desktop: keep nav and primary access CTA; hide secondary text. */
@media (min-width: 1181px) and (max-width: 1560px){
  html body header#tvh-header .tvh-logo-tag,
  html body #tvh-header .tvh-logo-tag{
    display: none !important;
  }

  html body header#tvh-header .tvh-container.tvh-header-inner,
  html body #tvh-header .tvh-container.tvh-header-inner{
    padding-left: clamp(22px, 2vw, 34px) !important;
    padding-right: clamp(22px, 2vw, 34px) !important;
    column-gap: 12px !important;
  }

  html body header#tvh-header .tvh-nav-primary,
  html body #tvh-header .tvh-nav-primary{
    gap: clamp(10px, .75vw, 14px) !important;
  }

  html body header#tvh-header .tvh-nav-primary a,
  html body #tvh-header .tvh-nav-primary a{
    font-size: clamp(12px, .85vw, 14px) !important;
  }

  html body header#tvh-header .tvh-nav-actions .tvh-link-text,
  html body #tvh-header .tvh-nav-actions .tvh-link-text{
    display: none !important;
  }

  html body header#tvh-header .tvh-cta-primary,
  html body #tvh-header .tvh-cta-primary{
    min-width: 164px !important;
    padding-left: 22px !important;
    padding-right: 22px !important;
    letter-spacing: .14em !important;
  }
}

/* Narrow desktop: nav remains visible; search is removed to protect Documents. */
@media (min-width: 1181px) and (max-width: 1320px){
  html body header#tvh-header .tvh-container.tvh-header-inner,
  html body #tvh-header .tvh-container.tvh-header-inner{
    grid-template-columns: auto minmax(0,1fr) auto !important;
    column-gap: 12px !important;
  }
  html body header#tvh-header .tvh-search-trigger,
  html body #tvh-header .tvh-search-trigger{
    display: none !important;
  }
  html body header#tvh-header .tvh-nav-actions,
  html body #tvh-header .tvh-nav-actions{
    grid-column: 3 !important;
  }
  html body header#tvh-header .tvh-nav-primary,
  html body #tvh-header .tvh-nav-primary{
    gap: 9px !important;
  }
  html body header#tvh-header .tvh-nav-primary a,
  html body #tvh-header .tvh-nav-primary a{
    font-size: 12px !important;
  }
  html body header#tvh-header .tvh-cta-primary,
  html body #tvh-header .tvh-cta-primary{
    min-width: 146px !important;
    padding-left: 18px !important;
    padding-right: 18px !important;
    font-size: 12px !important;
  }
}

/* True mobile/tablet only: one compact header row, burger on the right, no floating second row. */
@media (max-width: 1180px){
  html body header#tvh-header .tvh-container.tvh-header-inner,
  html body #tvh-header .tvh-container.tvh-header-inner{
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    padding: 0 22px !important;
    min-height: 76px !important;
    display: grid !important;
    grid-template-columns: auto 1fr auto !important;
    grid-template-rows: 1fr !important;
    align-items: center !important;
    column-gap: 16px !important;
    row-gap: 0 !important;
  }

  html body header#tvh-header .tvh-logo,
  html body #tvh-header .tvh-logo{
    grid-column: 1 !important;
    grid-row: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    white-space: nowrap !important;
  }

  html body header#tvh-header .tvh-nav-primary,
  html body header#tvh-header .tvh-search-trigger,
  html body header#tvh-header .tvh-nav-actions,
  html body #tvh-header .tvh-nav-primary,
  html body #tvh-header .tvh-search-trigger,
  html body #tvh-header .tvh-nav-actions{
    display: none !important;
  }

  html body header#tvh-header .tvh-burger,
  html body #tvh-header .tvh-burger{
    grid-column: 3 !important;
    grid-row: 1 !important;
    justify-self: end !important;
    align-self: center !important;
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    width: 48px !important;
    min-width: 48px !important;
    height: 48px !important;
    margin: 0 !important;
  }
}

@media (max-width: 560px){
  html body header#tvh-header .tvh-logo-tag,
  html body #tvh-header .tvh-logo-tag{
    display: none !important;
  }
  html body header#tvh-header .tvh-logo-name,
  html body #tvh-header .tvh-logo-name{
    font-size: 20px !important;
  }
}
