/* Site header with navigation on all pages (own page headers of the canvas pages and the theme header of guides, check and legal pages): fixed while scrolling, menu button on phones.
   Selectors follow the header structure (header > inner flexbox > logo, nav, right group), not element IDs, so a rebuilt header keeps working.
   :has(> .e-con > nav) keeps article heroes, which are also <header> blocks, out. */
html { scroll-padding-top: 88px; }
header.e-con:has(> .e-con > nav) { position: sticky !important; top: 0; z-index: 1000 !important; }
header.e-con:has(> .e-con > nav) .aen-burger, header.e-con:has(> .e-con > nav) .aen-nav-extra { display: none; }
@media (max-width: 767px) {
  html { scroll-padding-top: 76px; }
  header.e-con:has(> .e-con > nav) > .e-con { flex-wrap: wrap; gap: 8px 12px; padding: 12px 16px; }
  header.e-con:has(> .e-con > nav) > .e-con > img { order: 1; }
  /* On phones the header CTA becomes a bar at the bottom of the screen; it steps aside near the form and the footer. */
  header.e-con:has(> .e-con > nav) > .e-con > div.e-con { position: fixed; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 999; width: auto !important; margin: 0; transition: opacity .2s, visibility .2s, transform .2s; opacity: 0; visibility: hidden; transform: translateY(16px); }
  header.e-con:has(> .e-con > nav).aen-cta-show > .e-con > div.e-con { opacity: 1; visibility: visible; transform: none; }
  header.e-con:has(> .e-con > nav) > .e-con > div.e-con > p { display: none; }
  /* Subpage headers wrap the CTA in an extra block that Elementor hides on phones. */
  header.e-con:has(> .e-con > nav) > .e-con > div.e-con > div { display: block !important; width: 100%; }
  header.e-con:has(> .e-con > nav) > .e-con > div.e-con a { display: block; width: 100%; font-size: 16px; padding: 14px 16px; box-shadow: 0 8px 24px rgba(5,31,63,0.3); }
  header.e-con:has(> .e-con > nav) .aen-burger { order: 2; margin-left: auto; display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; padding: 10px; margin: 0; border: 1px solid rgba(255,255,255,0.25); border-radius: 8px; background: transparent; cursor: pointer; }
  header.e-con:has(> .e-con > nav) .aen-burger span { display: block; height: 2px; width: 100%; border-radius: 1px; background: #FFFFFF; transition: transform .2s, opacity .2s; }
  header.e-con:has(> .e-con > nav).aen-nav-open .aen-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  header.e-con:has(> .e-con > nav).aen-nav-open .aen-burger span:nth-child(2) { opacity: 0; }
  header.e-con:has(> .e-con > nav).aen-nav-open .aen-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  header.e-con:has(> .e-con > nav) > .e-con > nav { order: 4; display: none !important; }
  header.e-con:has(> .e-con > nav).aen-nav-open > .e-con > nav { display: flex !important; flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 0; width: 100% !important; padding: 4px 0 8px; }
  header.e-con:has(> .e-con > nav).aen-nav-open > .e-con > nav > p { display: block; border-top: 1px solid rgba(255,255,255,0.1); }
  header.e-con:has(> .e-con > nav).aen-nav-open > .e-con > nav a { display: block; padding: 13px 0; font-size: 16px; }
}
/* Dropdowns (since 1.6.0, keyboard, touch and phone fixes 1.7.1 to 1.8.0): sub pages below a top-level link. */
header.e-con:has(> .e-con > nav) .aen-has-sub { position: relative; display: flex; align-items: center; gap: 2px; }
header.e-con:has(> .e-con > nav) .aen-sub-toggle { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 0; margin: 0; border: 0; background: transparent; color: inherit; cursor: pointer; }
header.e-con:has(> .e-con > nav) .aen-sub-toggle::before { content: ""; width: 7px; height: 7px; border-right: 2px solid #FFFFFF; border-bottom: 2px solid #FFFFFF; transform: translateY(-2px) rotate(45deg); transition: transform .2s; }
header.e-con:has(> .e-con > nav) .aen-sub-toggle:focus-visible { outline: 2px solid #01CDCA; outline-offset: 2px; border-radius: 4px; }
header.e-con:has(> .e-con > nav) .aen-sub { position: absolute; top: 100%; left: -16px; z-index: 1001; display: flex; flex-direction: column; min-width: 260px; padding: 8px; margin-top: 10px; background: #071F3D; border: 1px solid rgba(255,255,255,0.12); border-radius: 10px; box-shadow: 0 16px 40px rgba(0,0,0,0.35); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .15s, visibility .15s, transform .15s; }
header.e-con:has(> .e-con > nav) .aen-sub::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
header.e-con:has(> .e-con > nav) .aen-sub a { display: block; padding: 10px 12px; border-radius: 6px; color: #FFFFFF !important; font-size: 15px; line-height: 1.3; text-decoration: none !important; white-space: nowrap; }
header.e-con:has(> .e-con > nav) .aen-sub a:hover, header.e-con:has(> .e-con > nav) .aen-sub a:focus-visible, header.e-con:has(> .e-con > nav) .aen-sub a[aria-current="page"] { background: rgba(1,205,202,0.14); color: #01CDCA !important; outline: none; }
@media (min-width: 768px) {
  header.e-con:has(> .e-con > nav) .aen-has-sub.aen-sub-open > .aen-sub { opacity: 1; visibility: visible; transform: none; }
  header.e-con:has(> .e-con > nav) .aen-has-sub.aen-sub-open > .aen-sub-toggle::before { transform: translateY(1px) rotate(-135deg); }
  header.e-con:has(> .e-con > nav) .aen-sub a:focus-visible { outline: 2px solid #01CDCA; outline-offset: -2px; }
}
/* Hover opens only on devices with a real pointer, so a tap on a touch tablet navigates instead of only opening the panel. */
@media (min-width: 768px) and (hover: hover) {
  header.e-con:has(> .e-con > nav) .aen-has-sub:not(.aen-sub-dismissed):hover > .aen-sub { opacity: 1; visibility: visible; transform: none; }
  header.e-con:has(> .e-con > nav) .aen-has-sub:not(.aen-sub-dismissed):hover > .aen-sub-toggle::before { transform: translateY(1px) rotate(-135deg); }
}
@media (min-width: 768px) and (max-width: 1100px) {
  header.e-con:has(> .e-con > nav) .aen-sub { min-width: 220px; max-width: min(300px, calc(100vw - 32px)); }
  header.e-con:has(> .e-con > nav) .aen-sub a { white-space: normal; }
}
@media (max-width: 767px) {
  header.e-con:has(> .e-con > nav) .aen-has-sub { flex-wrap: wrap; }
  header.e-con:has(> .e-con > nav) .aen-has-sub > a { flex: 1; }
  header.e-con:has(> .e-con > nav) .aen-sub-toggle { display: none; }
  /* inline-flex keeps the parent's active underline from spreading to the sub links */
  header.e-con:has(> .e-con > nav) .aen-sub { position: static; display: inline-flex; width: 100%; min-width: 0; margin: 0 0 8px; padding: 0 0 0 16px; background: transparent; border: 0; box-shadow: none; opacity: 1; visibility: visible; transform: none; transition: none; }
  /* The open phone menu scrolls inside the sticky header, and the CTA bar steps aside while it is open. */
  header.e-con:has(> .e-con > nav).aen-nav-open > .e-con > nav { max-height: calc(100dvh - 76px); overflow-y: auto; overscroll-behavior: contain; padding-bottom: 16px !important; }
  header.e-con:has(> .e-con > nav).aen-nav-open > .e-con > div.e-con { opacity: 0 !important; visibility: hidden !important; }
  header.e-con:has(> .e-con > nav) .aen-sub::before { display: none; }
  header.e-con:has(> .e-con > nav).aen-nav-open > .e-con > nav .aen-sub a { padding: 10px 0; font-size: 15px; white-space: normal; opacity: 0.85; }
}
@media (prefers-reduced-motion: reduce) { header.e-con:has(> .e-con > nav) .aen-burger span, header.e-con:has(> .e-con > nav) > .e-con > div.e-con, header.e-con:has(> .e-con > nav) .aen-sub, header.e-con:has(> .e-con > nav) .aen-sub-toggle::before { transition: none; } }
