/* site_canonical_v1.css — single authority for shared shell behavior after 2026-03-12 reset.
   Covers header, desktop dropdowns, mobile menu, and shared top spacing.
   Replaces the late override stack that had been steering the site. */

:root{
  --d365-shell-header-bg: rgba(10,14,20,.92);
  --d365-shell-header-border: rgba(255,255,255,.08);
  --d365-shell-header-shadow: 0 12px 32px rgba(0,0,0,.22);
  --d365-shell-dropdown-bg: rgba(10,14,20,.985);
  --d365-shell-dropdown-border: rgba(255,255,255,.10);
  --d365-shell-dropdown-shadow: 0 20px 44px rgba(0,0,0,.36);
  --d365-shell-link: #e7eef8;
  --d365-shell-link-muted: rgba(223,232,245,.66);
  --d365-shell-link-hover: #f4f8ff;
  --d365-shell-pill: rgba(159,183,201,.10);
  --d365-shell-pill-strong: rgba(124,196,255,.12);
}

.site-main > .wrap{
  padding-top: 20px;
}
@media (max-width: 860px){
  .site-main > .wrap{
    padding-top: 14px;
  }
}

header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--d365-shell-header-bg) !important;
  color: var(--d365-shell-link) !important;
  border-bottom: 1px solid var(--d365-shell-header-border);
  box-shadow: var(--d365-shell-header-shadow);
  backdrop-filter: saturate(160%) blur(10px);
}

header .topbar{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  flex-wrap: nowrap;
}

header .brand{
  max-width: 520px;
  flex: 0 1 520px;
}

header .brand .name{
  display: inline-block;
  font-weight: 800;
  letter-spacing: .2px;
  font-size: 20px;
  line-height: 1.06;
  text-decoration: none;
  color: var(--d365-shell-link) !important;
}

header .brand .tag{
  margin-top: 4px;
  font-size: 12.5px;
  line-height: 1.25;
  color: rgba(223,232,245,.78) !important;
}

header .navwrap{
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
}

header nav.navlinks{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

header .navtop{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--d365-shell-link) !important;
  font-weight: 650;
  font-size: 13.5px;
  line-height: 1;
}

header .navtop:hover,
header .navtop:focus-visible{
  background: var(--d365-shell-pill);
  color: var(--d365-shell-link-hover) !important;
  text-decoration: none;
}

header .navcta,
header .navcta:visited{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.16);
  background: linear-gradient(180deg, rgba(79,143,192,.95), rgba(47,111,159,.92));
  color: #07121f !important;
  font-size: 13.5px;
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
  box-shadow: none;
  white-space: nowrap;
}

header .navcta:hover,
header .navcta:focus-visible{
  filter: brightness(1.05);
  text-decoration: none;
}

header .navitem{
  position: relative;
  display: inline-flex;
  align-items: center;
}

header .navitem::after{
  content: "";
  position: absolute;
  left: -6px;
  right: -6px;
  top: 100%;
  height: 12px;
}

header nav.navlinks .navitem > .dropdown::before{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -10px;
  height: 10px;
}

header .menu{
  display: none;
}

header .menu-btn{
  cursor: pointer;
  user-select: none;
}

@media (min-width: 981px){
  header .menu{
    display: none !important;
  }

  header nav.navlinks{
    display: flex !important;
  }

  header nav.navlinks .navitem > .dropdown{
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: auto;
    z-index: 9999;
    box-sizing: border-box;
    background: var(--d365-shell-dropdown-bg);
    border: 1px solid var(--d365-shell-dropdown-border);
    box-shadow: var(--d365-shell-dropdown-shadow);
    border-radius: 14px;
    padding: 10px 12px;
    overflow-x: hidden;
  }

  header nav.navlinks .navitem:hover > .dropdown,
  header nav.navlinks .navitem:focus-within > .dropdown{
    display: block;
  }

  header nav.navlinks .navitem > .dropdown .ddgrid{
    display: grid;
    grid-template-columns: 1fr;
    column-gap: 0;
    row-gap: 0;
  }

  header nav.navlinks .navitem > .dropdown .ddcol{
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    padding: 0;
  }

  header nav.navlinks .navitem > .dropdown .ddh{
    margin: 0 0 6px;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--d365-shell-link-muted) !important;
    white-space: nowrap;
  }

  header nav.navlinks .navitem > .dropdown .ddlink,
  header nav.navlinks .navitem > .dropdown .ddlink:visited{
    display: block;
    width: auto;
    padding: 4px 2px;
    margin: 0;
    border-radius: 8px;
    color: #cfe1f2 !important;
    font-size: 14px;
    line-height: 1.24;
    text-decoration: none;
    white-space: normal;
    overflow-wrap: anywhere;
    background: transparent;
  }

  header nav.navlinks .navitem > .dropdown .ddlink:hover,
  header nav.navlinks .navitem > .dropdown .ddlink:focus-visible{
    background: var(--d365-shell-pill-strong);
    color: var(--d365-shell-link-hover) !important;
    text-decoration: none;
  }

  header nav.navlinks .navitem > .dropdown.dropdown-services{
    width: 316px;
    max-width: min(316px, calc(100vw - 40px));
  }

  header nav.navlinks .navitem > .dropdown.dropdown-process{
    width: 244px;
    max-width: min(244px, calc(100vw - 40px));
  }

  header nav.navlinks .navitem > .dropdown.dropdown-counsel{
    width: 292px;
    max-width: min(292px, calc(100vw - 40px));
  }

  header nav.navlinks .navitem.navitem-resources > .dropdown.dropdown-resources,
  header nav.navlinks .navitem > .dropdown.dropdown-resources{
    width: 270px;
    max-width: min(270px, calc(100vw - 40px));
  }
}

@media (max-width: 980px){
  header .topbar{
    align-items: flex-start;
  }

  header .navlinks{
    display: none !important;
  }

  header .menu{
    display: block !important;
    position: relative !important;
    margin-left: auto !important;
    width: auto !important;
  }

  header .menu > summary{
    list-style: none !important;
  }

  header .menu > summary::-webkit-details-marker{
    display: none !important;
  }

  header .menu-btn{
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 104px;
    height: 44px;
    padding: 0 16px;
    border: 1px solid rgba(124,196,255,.28);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(32,63,95,.98) 0%, rgba(24,49,76,.98) 100%);
    color: #eaf2ff !important;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .02em;
    text-decoration: none;
    box-sizing: border-box;
  }

  header .menu-panel{
    display: none;
    position: fixed;
    top: 76px;
    left: 12px;
    right: 12px;
    max-height: calc(100dvh - 88px);
    overflow: auto;
    margin: 0;
    padding: 14px;
    background: linear-gradient(180deg, rgba(13,22,35,.995) 0%, rgba(9,17,28,.99) 100%);
    border: 1px solid rgba(124,196,255,.16);
    border-radius: 18px;
    box-shadow: 0 24px 48px rgba(0,0,0,.58);
    z-index: 9999;
  }

  header .menu[open] .menu-panel{
    display: block;
  }

  header .menu-panel,
  header .menu-panel *{
    color: #eaf2ff !important;
    -webkit-text-fill-color: #eaf2ff !important;
  }

  header .menusec{
    padding: 10px 0;
    border-top: 1px solid rgba(124,196,255,.10);
  }

  header .menusec:first-child{
    padding-top: 2px;
    border-top: none;
  }

  header .menutitle{
    margin: 0 0 8px;
    color: rgba(223,232,245,.66) !important;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
  }

  header .menu-panel .navlink,
  header .menu-panel .navlink:visited{
    display: block;
    min-height: 44px;
    padding: 12px 14px;
    margin: 0;
    border-radius: 12px;
    background: rgba(124,196,255,.05);
    color: #eaf2ff !important;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.34;
    text-decoration: none;
    border: 1px solid rgba(124,196,255,.08);
  }

  header .menu-panel .navlink + .navlink{
    margin-top: 6px;
  }

  header .menu-panel .navlink:hover,
  header .menu-panel .navlink:focus-visible{
    background: rgba(124,196,255,.12);
    color: #fff !important;
  }
}

@media (max-width: 640px){
  header .brand .name{
    font-size: 17px;
  }

  header .brand .tag:last-of-type{
    max-width: 165px;
    font-size: 10.5px;
  }

  header .menu-btn{
    min-width: 96px;
    padding: 0 14px;
  }

  header .menu-panel{
    top: 72px;
    left: 10px;
    right: 10px;
    padding: 12px;
  }
}
