/* Unified blue header and glass mobile navigation for every public section. */
html body > header.topbar {
  background: linear-gradient(110deg, #0b5fc4 0%, #0755ad 55%, #064994 100%) !important;
  border-bottom: 1px solid rgba(150, 210, 255, 0.62) !important;
  color: #fff !important;
}
html body > header.topbar .brand-mark,
html body > header.topbar .brand-photo {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.45) !important;
  border-radius: 13px !important;
  background: rgba(5, 24, 48, 0.7) !important;
  box-shadow:
    0 4px 14px rgba(0, 16, 45, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
html body > header.topbar .brand-mark img,
html body > header.topbar .brand-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
html body > header.topbar .brand small,
html body > header.topbar .brand-copy small {
  color: rgba(255, 255, 255, 0.78) !important;
}
html body > header.topbar .menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px auto;
  border-radius: 2px;
  background: #fff;
  transform-origin: center;
}

@media (max-width: 800px) {
  html body > header.topbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 10000 !important;
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    min-height: 68px;
    background: linear-gradient(110deg, #0b5fc4 0%, #0755ad 55%, #064994 100%) !important;
    padding: 9px 14px;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  html body > header.topbar .brand {
    min-width: 0;
    max-width: calc(100% - 68px);
    gap: 10px;
  }
  html body > header.topbar .brand-mark,
  html body > header.topbar .brand-photo {
    flex: 0 0 50px;
    width: 50px;
    height: 50px;
  }
  html body > header.topbar .menu-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 52px;
    width: 52px;
    min-width: 52px;
    height: 52px;
    min-height: 52px;
    margin-left: auto;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 16px;
    color: #fff !important;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.07));
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.22),
      0 7px 18px rgba(0, 20, 55, 0.18);
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition:
      transform 0.22s ease,
      background 0.22s ease,
      border-color 0.22s ease;
  }
  html body > header.topbar .menu-toggle:active {
    transform: scale(0.94);
  }
  html body > header.topbar .menu-toggle span {
    transition:
      transform 0.22s ease,
      opacity 0.18s ease;
  }
  html body > header.topbar .menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  html body > header.topbar .menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }
  html body > header.topbar .menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
  html body > header.topbar nav#main-nav,
  html body > header.topbar nav#death-nav,
  html body > header.topbar nav#site-navigation {
    display: grid !important;
    position: absolute !important;
    top: calc(100% + 9px) !important;
    left: 10px !important;
    right: 10px !important;
    z-index: 10002 !important;
    width: auto !important;
    max-height: min(68dvh, 540px);
    overflow: auto;
    overscroll-behavior: contain;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 8px;
    padding: 13px;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 22px;
    background:
      linear-gradient(135deg, rgba(16, 91, 169, 0.78), rgba(5, 20, 42, 0.76)), rgba(8, 28, 54, 0.72);
    -webkit-backdrop-filter: blur(24px) saturate(155%);
    backdrop-filter: blur(24px) saturate(155%);
    box-shadow:
      0 22px 55px rgba(0, 10, 28, 0.42),
      inset 0 1px 0 rgba(255, 255, 255, 0.18);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-9px) scale(0.985);
    transform-origin: top center;
    transition:
      opacity 0.2s ease,
      transform 0.24s cubic-bezier(0.2, 0.75, 0.25, 1),
      visibility 0.2s ease;
  }
  html body > header.topbar nav#main-nav.open,
  html body > header.topbar nav#death-nav.open,
  html body > header.topbar nav#site-navigation.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }
  html body > header.topbar nav#main-nav a,
  html body > header.topbar nav#death-nav a,
  html body > header.topbar nav#site-navigation a {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 48px;
    padding: 9px 7px;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.13) !important;
    border-radius: 13px !important;
    color: #fff !important;
    background: rgba(255, 255, 255, 0.085) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
    font-size: 12px;
    font-weight: 750;
    line-height: 1.25;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
    transform: none !important;
    touch-action: manipulation;
    transition:
      background 0.18s ease,
      border-color 0.18s ease,
      transform 0.18s ease;
  }
  html body > header.topbar nav#main-nav a.active,
  html body > header.topbar nav#main-nav a[aria-current="page"],
  html body > header.topbar nav#death-nav a.active,
  html body > header.topbar nav#death-nav a[aria-current="page"],
  html body > header.topbar nav#site-navigation a.active,
  html body > header.topbar nav#site-navigation a[aria-current="page"] {
    border-color: rgba(255, 145, 91, 0.75) !important;
    background: linear-gradient(
      135deg,
      rgba(255, 124, 69, 0.28),
      rgba(255, 255, 255, 0.09)
    ) !important;
    box-shadow:
      inset 0 -2px 0 #ff8b58,
      inset 0 1px 0 rgba(255, 255, 255, 0.12);
  }
  html body > header.topbar nav a::after {
    display: none !important;
  }
  html body.mobile-menu-open::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(1, 10, 24, 0.3);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    animation: tv-menu-scrim-in 0.18s ease both;
  }
  html body.mobile-menu-open {
    overflow-x: clip;
  }
}
@media (max-width: 390px) {
  html body > header.topbar nav#main-nav,
  html body > header.topbar nav#death-nav,
  html body > header.topbar nav#site-navigation {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@keyframes tv-menu-scrim-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  html body > header.topbar nav,
  html body > header.topbar nav *,
  html body > header.topbar .menu-toggle,
  html body.mobile-menu-open::before {
    animation: none !important;
    transition: none !important;
  }
}

/* Final cross-page parity pass: match News Details' blue glass treatment. */
html body > header.topbar {
  background: linear-gradient(
    105deg,
    rgba(5, 37, 82, 0.99),
    rgba(11, 95, 196, 0.98) 54%,
    rgba(8, 58, 123, 0.99)
  ) !important;
  border-bottom: 1px solid rgba(124, 229, 242, 0.5) !important;
  box-shadow:
    0 8px 24px rgba(0, 22, 65, 0.22),
    0 1px 0 rgba(255, 124, 69, 0.35) !important;
}
html body > header.topbar .menu-toggle {
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  padding: 0 !important;
  border: 1px solid rgba(124, 229, 242, 0.72) !important;
  border-radius: 18px !important;
  background: linear-gradient(145deg, rgba(18, 104, 190, 0.9), rgba(5, 43, 91, 0.92)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 0 0 1px rgba(124, 229, 242, 0.12),
    0 8px 22px rgba(0, 15, 50, 0.28) !important;
}
html body > header.topbar .menu-toggle span {
  display: block !important;
  flex: 0 0 2px !important;
  width: 25px !important;
  height: 2px !important;
  min-height: 2px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 3px !important;
  background: linear-gradient(90deg, #fff, #c8f6ff) !important;
  box-shadow: 0 0 7px rgba(124, 229, 242, 0.22);
  transform-origin: center !important;
  transition:
    transform 0.24s cubic-bezier(0.2, 0.75, 0.25, 1),
    opacity 0.18s ease !important;
}
html body > header.topbar .menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg) !important;
}
html body > header.topbar .menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0 !important;
  transform: scaleX(0.35) !important;
}
html body > header.topbar .menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg) !important;
}
@media (max-width: 800px) {
  html body > header.topbar nav#main-nav,
  html body > header.topbar nav#death-nav,
  html body > header.topbar nav#site-navigation {
    background:
      linear-gradient(135deg, rgba(10, 73, 139, 0.91), rgba(4, 28, 59, 0.88) 70%),
      rgba(8, 40, 78, 0.86) !important;
    border: 1px solid rgba(124, 229, 242, 0.48) !important;
    border-radius: 24px !important;
    -webkit-backdrop-filter: blur(28px) saturate(170%) !important;
    backdrop-filter: blur(28px) saturate(170%) !important;
    box-shadow:
      0 24px 60px rgba(0, 10, 32, 0.48),
      inset 0 1px 0 rgba(255, 255, 255, 0.2),
      0 0 24px rgba(17, 112, 207, 0.12) !important;
    padding: 14px !important;
    gap: 9px !important;
  }
  html body > header.topbar nav#main-nav a,
  html body > header.topbar nav#death-nav a,
  html body > header.topbar nav#site-navigation a {
    min-height: 49px !important;
    border: 1px solid rgba(151, 216, 255, 0.2) !important;
    border-radius: 15px !important;
    background: linear-gradient(
      145deg,
      rgba(70, 137, 199, 0.24),
      rgba(255, 255, 255, 0.065)
    ) !important;
    color: #f5fbff !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.11) !important;
    font-size: 13px !important;
    font-weight: 750 !important;
    letter-spacing: 0.01em;
  }
  html body > header.topbar nav#main-nav a.active,
  html body > header.topbar nav#main-nav a[aria-current="page"],
  html body > header.topbar nav#death-nav a.active,
  html body > header.topbar nav#death-nav a[aria-current="page"],
  html body > header.topbar nav#site-navigation a.active,
  html body > header.topbar nav#site-navigation a[aria-current="page"] {
    border-color: rgba(255, 145, 91, 0.88) !important;
    background: linear-gradient(
      135deg,
      rgba(255, 124, 69, 0.3),
      rgba(36, 85, 132, 0.28)
    ) !important;
    box-shadow:
      inset 0 -3px 0 #ff8554,
      inset 0 1px 0 rgba(255, 255, 255, 0.15),
      0 0 13px rgba(255, 124, 69, 0.09) !important;
  }
  html body.mobile-menu-open::before {
    background: rgba(1, 12, 32, 0.43) !important;
    -webkit-backdrop-filter: blur(5px) saturate(120%) !important;
    backdrop-filter: blur(5px) saturate(120%) !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  html body > header.topbar .menu-toggle span {
    transition: none !important;
  }
}

/* Smooth close polish: keep panel geometry fixed throughout both directions. */
@media (max-width: 800px) {
  html body > header.topbar nav#main-nav,
  html body > header.topbar nav#death-nav,
  html body > header.topbar nav#site-navigation {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    align-content: start !important;
    will-change: opacity, transform;
    transform: translate3d(0, -8px, 0) scale(0.985) !important;
    transition:
      opacity 240ms cubic-bezier(0.2, 0.7, 0.2, 1),
      transform 280ms cubic-bezier(0.2, 0.75, 0.25, 1),
      visibility 0s linear 280ms !important;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
  }
  html body > header.topbar nav#main-nav.open,
  html body > header.topbar nav#death-nav.open,
  html body > header.topbar nav#site-navigation.open {
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translate3d(0, 0, 0) scale(1) !important;
    transition:
      opacity 240ms cubic-bezier(0.2, 0.7, 0.2, 1),
      transform 280ms cubic-bezier(0.2, 0.75, 0.25, 1),
      visibility 0s linear 0s !important;
  }
  html body > header.topbar nav#main-nav a,
  html body > header.topbar nav#death-nav a,
  html body > header.topbar nav#site-navigation a {
    transition:
      color 180ms ease,
      background-color 200ms ease,
      border-color 200ms ease,
      box-shadow 200ms ease,
      transform 200ms cubic-bezier(0.2, 0.75, 0.25, 1) !important;
    -webkit-tap-highlight-color: transparent;
  }
  html body > header.topbar .menu-toggle {
    will-change: transform;
    transition:
      transform 220ms cubic-bezier(0.2, 0.75, 0.25, 1),
      background 220ms ease,
      border-color 220ms ease,
      box-shadow 220ms ease !important;
  }
  html body.mobile-menu-open::before {
    animation: tv-menu-scrim-in 240ms ease both;
  }
}
@media (max-width: 390px) {
  html body > header.topbar nav#main-nav,
  html body > header.topbar nav#death-nav,
  html body > header.topbar nav#site-navigation {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  html body > header.topbar nav#main-nav,
  html body > header.topbar nav#death-nav,
  html body > header.topbar nav#site-navigation,
  html body > header.topbar nav#main-nav *,
  html body > header.topbar nav#death-nav *,
  html body > header.topbar nav#site-navigation *,
  html body > header.topbar .menu-toggle {
    transition: none !important;
    animation: none !important;
  }
}
