/*
  AV LÜ™ Public Header Consolidation v2.5.0
  Public route header only. Content, page layouts, forms, and protected routes
  remain governed by their existing stylesheets.
*/

:root {
  --avlu-header-surface: #f8f6ef;
  --avlu-header-ink: #0b1f3a;
  --avlu-header-muted: #52627a;
  --avlu-header-line: rgba(11, 31, 58, 0.2);
  --avlu-header-blue: #3157c8;
  --avlu-header-blue-dark: #23449f;
  --avlu-header-blue-soft: #e8f0fb;
  --avlu-header-button-shadow: 0 4px 0 #183b8c;
  --avlu-header-height: 76px;
}

html[data-theme="dark"] {
  --avlu-header-surface: #071426;
  --avlu-header-ink: #f4f7ff;
  --avlu-header-muted: #aebed8;
  --avlu-header-line: rgba(151, 184, 235, 0.28);
  --avlu-header-blue: #78aaff;
  --avlu-header-blue-dark: #4e82e6;
  --avlu-header-blue-soft: rgba(42, 86, 156, 0.42);
  --avlu-header-button-shadow: 0 4px 0 #142d61;
}

body.research-page,
body.avlu-site-polish:not(.route-login):not(.route-presentation) {
  --avlu-header-content-width: 1280px;
}

body.research-page .research-header,
body.avlu-site-polish:not(.route-login):not(.route-presentation) .v13-header {
  position: relative;
  z-index: 20;
  width: 100%;
  max-width: none;
  min-height: var(--avlu-header-height);
  margin: 0;
  padding: 0 24px;
  border-bottom: 1px solid var(--avlu-header-line);
  background: var(--avlu-header-surface);
  color: var(--avlu-header-ink);
  box-shadow: 0 8px 24px rgba(11, 31, 58, 0.06);
}

body.research-page .research-header {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto minmax(150px, 1fr);
  align-items: center;
  column-gap: 22px;
}

body.avlu-site-polish:not(.route-login):not(.route-presentation) .v13-header {
  backdrop-filter: none;
}

body.avlu-site-polish:not(.route-login):not(.route-presentation) .v13-header__inner {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto minmax(190px, 1fr);
  align-items: center;
  width: min(100%, var(--avlu-header-content-width));
  min-height: var(--avlu-header-height);
  margin-inline: auto;
  padding: 0;
}

body.research-page .brand,
body.avlu-site-polish:not(.route-login):not(.route-presentation) .v13-brand {
  justify-self: start;
  color: var(--avlu-header-ink);
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  line-height: 1;
  text-decoration: none;
  text-shadow: none;
  white-space: nowrap;
}

body.research-page .brand {
  margin-inline: max(0px, calc((100vw - var(--avlu-header-content-width)) / 2));
}

body.research-page .brand span {
  margin-left: 2px;
  font-size: 0.42em;
  letter-spacing: 0;
}

body.research-page .v13-nav,
body.avlu-site-polish:not(.route-login):not(.route-presentation) .v13-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}

body.research-page .v13-nav a,
body.avlu-site-polish:not(.route-login):not(.route-presentation) .v13-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--avlu-header-ink);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.105em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

body.research-page .v13-nav a:hover,
body.research-page .v13-nav a:focus-visible,
body.avlu-site-polish:not(.route-login):not(.route-presentation) .v13-nav a:hover,
body.avlu-site-polish:not(.route-login):not(.route-presentation) .v13-nav a:focus-visible {
  border-color: rgba(49, 87, 200, 0.35);
  background: var(--avlu-header-blue-soft);
  color: var(--avlu-header-blue-dark);
}

body.research-page .v13-nav a[aria-current="page"],
body.avlu-site-polish:not(.route-login):not(.route-presentation) .v13-nav a[aria-current="page"] {
  border-color: rgba(49, 87, 200, 0.42);
  background: var(--avlu-header-blue-soft);
  box-shadow: inset 0 -2px 0 var(--avlu-header-blue);
  color: var(--avlu-header-ink);
}

body.research-page .v13-header__actions,
body.avlu-site-polish:not(.route-login):not(.route-presentation) .v13-header__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

body.research-page .v13-header__actions > a,
body.avlu-site-polish:not(.route-login):not(.route-presentation) .v13-header__actions > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--avlu-header-ink);
  border-radius: 3px;
  color: var(--avlu-header-ink);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

body.research-page .v13-header__actions > a:hover,
body.research-page .v13-header__actions > a:focus-visible,
body.avlu-site-polish:not(.route-login):not(.route-presentation) .v13-header__actions > a:hover,
body.avlu-site-polish:not(.route-login):not(.route-presentation) .v13-header__actions > a:focus-visible {
  border-color: var(--avlu-header-blue);
  color: var(--avlu-header-blue-dark);
}

body.research-page .v13-header__actions > .v13-btn,
body.avlu-site-polish:not(.route-login):not(.route-presentation) .v13-header__actions > .v13-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-color: var(--avlu-header-blue);
  background: var(--avlu-header-blue);
  box-shadow: var(--avlu-header-button-shadow);
  color: #fff;
}

body.research-page .v13-header__actions > .v13-btn:hover,
body.research-page .v13-header__actions > .v13-btn:focus-visible,
body.avlu-site-polish:not(.route-login):not(.route-presentation) .v13-header__actions > .v13-btn:hover,
body.avlu-site-polish:not(.route-login):not(.route-presentation) .v13-header__actions > .v13-btn:focus-visible {
  border-color: var(--avlu-header-blue-dark);
  background: var(--avlu-header-blue-dark);
  color: #fff;
  transform: translateY(-1px);
}

body.research-page .v13-header__actions > .v13-login,
body.avlu-site-polish:not(.route-login):not(.route-presentation) .v13-header__actions > .v13-login {
  border-color: transparent;
  box-shadow: none;
  color: var(--avlu-header-ink);
}

body.research-page .v13-theme-toggle,
body.avlu-site-polish:not(.route-login):not(.route-presentation) .v13-theme-toggle {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  border: 1px solid var(--avlu-header-line);
  border-radius: 50%;
  background: transparent;
  color: var(--avlu-header-ink);
  box-shadow: none;
}

body.research-page .v13-menu,
body.avlu-site-polish:not(.route-login):not(.route-presentation) .v13-menu {
  display: none;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--avlu-header-line);
  border-radius: 3px;
  background: transparent;
  color: var(--avlu-header-ink);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

body.research-page .v13-menu:hover,
body.research-page .v13-menu:focus-visible,
body.avlu-site-polish:not(.route-login):not(.route-presentation) .v13-menu:hover,
body.avlu-site-polish:not(.route-login):not(.route-presentation) .v13-menu:focus-visible {
  border-color: var(--avlu-header-blue);
  background: var(--avlu-header-blue-soft);
}

@media (max-width: 980px) {
  body.research-page .research-header,
  body.avlu-site-polish:not(.route-login):not(.route-presentation) .v13-header__inner {
    column-gap: 12px;
  }

  body.research-page .v13-nav a,
  body.avlu-site-polish:not(.route-login):not(.route-presentation) .v13-nav a {
    padding-inline: 8px;
    font-size: 0.62rem;
  }

  body.research-page .v13-header__actions > a,
  body.avlu-site-polish:not(.route-login):not(.route-presentation) .v13-header__actions > a {
    padding-inline: 10px;
  }
}

@media (max-width: 760px) {
  body.research-page .research-header,
  body.avlu-site-polish:not(.route-login):not(.route-presentation) .v13-header {
    min-height: 66px;
    padding-inline: 14px;
  }

  body.research-page .research-header,
  body.avlu-site-polish:not(.route-login):not(.route-presentation) .v13-header__inner {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  body.research-page .brand,
  body.avlu-site-polish:not(.route-login):not(.route-presentation) .v13-brand {
    font-size: 0.96rem;
    letter-spacing: 0.15em;
  }

  body.research-page .v13-nav,
  body.avlu-site-polish:not(.route-login):not(.route-presentation) .v13-nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 14px;
    left: 14px;
    z-index: 30;
    display: none;
    align-items: stretch;
    justify-content: stretch;
    gap: 2px;
    padding: 8px;
    border: 1px solid var(--avlu-header-line);
    background: var(--avlu-header-surface);
    box-shadow: 0 16px 28px rgba(11, 31, 58, 0.14);
  }

  body.research-page .v13-nav.is-open,
  body.avlu-site-polish:not(.route-login):not(.route-presentation) .v13-nav.is-open {
    display: grid;
  }

  body.research-page .v13-nav a,
  body.avlu-site-polish:not(.route-login):not(.route-presentation) .v13-nav a {
    justify-content: flex-start;
    min-height: 42px;
    padding-inline: 12px;
  }

  body.research-page .v13-header__actions,
  body.avlu-site-polish:not(.route-login):not(.route-presentation) .v13-header__actions {
    gap: 8px;
  }

  body.research-page .v13-header__actions > a,
  body.avlu-site-polish:not(.route-login):not(.route-presentation) .v13-header__actions > a {
    display: none;
  }

  body.research-page .v13-menu,
  body.avlu-site-polish:not(.route-login):not(.route-presentation) .v13-menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.research-page .v13-nav a,
  body.avlu-site-polish:not(.route-login):not(.route-presentation) .v13-nav a {
    transition: none;
  }
}

/* Keep the homepage action in the mobile navigation, not the desktop action row. */
body.research-page .v13-nav a.v13-nav__mobile-action {
  display: none;
}

@media (max-width: 760px) {
  body.research-page .v13-nav a.v13-nav__mobile-action {
    display: inline-flex;
  }
}

