/* Primary navigation states keep the original menu geometry and links. */
#ana-menu {
 --nav-ink: #0b1f44;
 --nav-red: #ad0a29;
 --nav-wash: #f9edf0;
}
#ana-menu > ul > li > a {
 position: relative;
 isolation: isolate;
 box-shadow: none;
}
#ana-menu > ul > li > a::before {
 content: "";
 position: absolute;
 z-index: -1;
 inset: 15px 1px;
 border-radius: 9px;
 background: var(--nav-wash);
 opacity: 0;
 transition: opacity 150ms ease, background-color 150ms ease;
}
#ana-menu > ul > li > a::after {
 content: "";
 position: absolute;
 inset: auto 9px 9px;
 height: 2px;
 border-radius: 2px;
 background: currentColor;
 opacity: 0;
 transform: scaleX(.55);
 transition: opacity 150ms ease, transform 180ms ease;
}
#ana-menu > ul > li:is(.current-menu-item,.current-menu-ancestor,.current-menu-parent,.submenu-open) > a,
#ana-menu a[aria-current="page"] { color: var(--nav-red); }
#ana-menu > ul > li:is(.current-menu-item,.current-menu-ancestor,.current-menu-parent,.submenu-open) > a::before,
#ana-menu > ul > li > a:is(:focus-visible,:active)::before { opacity: 1; }
#ana-menu > ul > li:is(.current-menu-item,.current-menu-ancestor,.current-menu-parent,.submenu-open) > a::after {
 opacity: 1;
 transform: scaleX(1);
}
#ana-menu > ul > li > a:active::before { background: #f2d8df; }
#ana-menu :is(a,button):focus-visible,
.site-header .menu-toggle:focus-visible {
 outline: 2px solid #1e5aa8;
 outline-offset: -3px;
}
#ana-menu .submenu-toggle {
 position: absolute;
 inset: 50% 1px auto auto;
 transform: translateY(-50%);
 display: grid;
 place-items: center;
 width: 23px;
 height: 32px;
 padding: 0;
 border: 0;
 border-radius: 7px;
 background: transparent;
 color: var(--nav-ink);
 cursor: pointer;
}
#ana-menu .submenu-toggle::after {
 content: "";
 width: 6px;
 height: 6px;
 border: solid currentColor;
 border-width: 0 1.5px 1.5px 0;
 transform: translateY(-2px) rotate(45deg);
 transition: transform 160ms ease;
}
#ana-menu .submenu-toggle[aria-expanded="true"] { color: var(--nav-red); background: #f2dce3; }
#ana-menu .submenu-toggle[aria-expanded="true"]::after { transform: translateY(2px) rotate(225deg); }
#ana-menu .submenu-toggle:active { background: #ebc9d3; }
#ana-menu > ul > .has-submenu-toggle > a { padding-inline-end: 27px; }
#ana-menu > ul > li > ul {
 padding: 6px;
 border: 1px solid #dce3ee;
 border-radius: 12px;
 background: #fff;
 box-shadow: 0 14px 28px #0b1f4425, 0 3px 8px #0b1f440d;
}
#ana-menu > ul > li > ul > li > a {
 padding: 9px 13px;
 border-radius: 7px;
 white-space: normal;
 color: var(--nav-ink);
 line-height: 1.45;
 box-shadow: none;
 transition: color 150ms ease, background-color 150ms ease;
}
#ana-menu > ul > li > ul :is(a[aria-current="page"],.current-menu-item > a) {
 box-shadow: inset 2px 0 var(--nav-red);
 background: var(--nav-wash);
 color: var(--nav-red);
}
#ana-menu > ul > li > ul a:active { background: #f2d8df; }
@media (hover: hover) {
 #ana-menu > ul > li:hover > a { color: var(--nav-red); }
 #ana-menu > ul > li:hover > a::before { opacity: 1; }
 #ana-menu .submenu-toggle:hover,
 #ana-menu > ul > li > ul a:hover { background: var(--nav-wash); color: var(--nav-red); }
}
@media (min-width: 1241px) {
 #ana-menu > ul > li > ul { top: 100%; left: 0; width: max-content; max-width: min(290px, 40vw); }
 #ana-menu > ul > li:nth-last-child(-n+2) > ul { left: auto; right: 0; }
 #ana-menu.nav-enhanced > ul > li:not(.submenu-open) > ul { display: none; }
 #ana-menu.nav-enhanced > ul > .submenu-open > ul { display: block; animation: hema-menu-in 150ms ease-out; }
}
@media (max-width: 1240px) {
 .site-header .menu-toggle { display: block; min-width: 44px; min-height: 44px; border-radius: 9px; }
 .site-header .menu-toggle[aria-expanded="true"] { background: #f9edf0; color: #ad0a29; }
 .site-header .menu-toggle[aria-expanded="true"]::before { content: "\00d7"; }
 #ana-menu { display: none; position: absolute; inset: 100% 0 auto; margin: 0; z-index: 60; background: #fff; border-top: 1px solid #e4e9f1; }
 #ana-menu > ul { display: block; padding: 5px 14px; }
 #ana-menu.open { display: block; max-height: calc(100dvh - var(--hema-chrome-height, 82px)); overflow-y: auto; box-shadow: 0 14px 24px #0b1f441f; }
 #ana-menu > ul > li > a { min-height: 44px; padding: 10px 12px; font-size: 14px; }
 #ana-menu > ul > li > a::before { inset: 2px 0; }
 #ana-menu > ul > li > a::after { inset: 10px auto 10px 0; width: 2px; height: auto; }
 #ana-menu .submenu-toggle { inset: 0 0 auto auto; transform: none; width: 44px; height: 44px; }
 #ana-menu > ul > .has-submenu-toggle > a { padding-inline-end: 44px; }
 #ana-menu > ul > li > ul { display: block; position: static; margin: 2px 0 7px 12px; box-shadow: none; background: #f6f8fc; min-width: 0; }
 #ana-menu.nav-enhanced > ul > li:not(.submenu-open) > ul { display: none; }
 #ana-menu > ul > li > ul a { min-height: 44px; }
}
@keyframes hema-menu-in {
 from { opacity: 0; transform: translateY(-4px); }
 to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
 #ana-menu *, #ana-menu *::before, #ana-menu *::after { animation: none !important; transition: none !important; }
}
