.topic-navbar, .topic-navbar .nav-shell, .topic-navbar .navbg, .topic-navbar .col960 { overflow: visible; }
.topic-navbar { position: relative; z-index: 10000; }
.topic-navbar .pull-left { width: 100%; }
#navul.nav-with-topics { position: relative; overflow: visible; flex-wrap: wrap; gap: 4px; }
#navul.nav-with-topics > li { display: flex; align-items: center; position: relative; float: none; margin: 0; border: 0; }
#navul.nav-with-topics > li > .nav-category-link { width: auto; min-width: 0; padding: 0 10px; font-size: 14px; }
#navul.nav-with-topics > li.has-topics > .nav-category-link { padding-right: 4px; border-radius: 10px 0 0 10px; }
#navul.nav-with-topics .nav-topics-toggle { display: flex; align-items: center; justify-content: center; width: 24px; height: 42px; padding: 0; border: 0; border-radius: 0 10px 10px 0; background: transparent; color: #b9cce3; cursor: pointer; font: 18px/1 Arial,sans-serif; }
#navul.nav-with-topics .nav-topics-toggle:hover, #navul.nav-with-topics .nav-topics-toggle[aria-expanded="true"] { color: #5eead4; background: rgba(20,184,166,.14); }
#navul.nav-with-topics .nav-topics-toggle[aria-expanded="true"] span { transform: rotate(180deg); }
#navul.nav-with-topics a:focus-visible, #navul.nav-with-topics button:focus-visible { outline: 2px solid #5eead4; outline-offset: -2px; }
#navul.nav-with-topics > li > .nav-topics-panel {
    display: none;
    grid-template-columns: repeat(5,minmax(0,1fr));
    gap: 7px;
    position: absolute;
    top: 100%;
    left: 0;
    width: 486px;
    max-height: 70vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    min-width: 0;
    margin: 0;
    padding: 12px;
    border: 1px solid #dce6f1;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15,23,42,.18);
    white-space: normal;
    z-index: 10001;
    box-sizing: border-box;
}
#navul.nav-with-topics > li:nth-last-child(-n+3) > .nav-topics-panel { left: auto; right: 0; }
#navul.nav-with-topics > li.is-topics-open > .nav-topics-panel { display: grid; }
#navul.nav-with-topics:not(.topics-ready) > li:hover > .nav-topics-panel,
#navul.nav-with-topics:not(.topics-ready) > li:focus-within > .nav-topics-panel { display: grid; }
#navul.nav-with-topics > li > .nav-topics-panel > li { width: auto; min-width: 0; float: none; margin: 0; border: 0; background: transparent; line-height: 1.4; }
#navul.nav-with-topics > li > .nav-topics-panel > li > a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    height: 36px;
    padding: 0 4px;
    border-radius: 7px;
    color: #334b65;
    background: #f3f7fb;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0;
    white-space: nowrap;
    text-decoration: none;
    box-shadow: none;
    transform: none;
    box-sizing: border-box;
    transition: background-color .15s,color .15s;
}
#navul.nav-with-topics > li > .nav-topics-panel > li > a:hover { background: #dff7f0; color: #087f70; box-shadow: none; transform: none; }
@media (min-width: 831px) {
    #navul.nav-with-topics { width: 100%; justify-content: space-between; }
}
@media (max-width: 830px) {
    .topic-navbar { height: auto; margin: 8px 0 14px; }
    .topic-navbar .nav-shell { display: block; padding: 6px; border-radius: 13px; background: #172334; box-shadow: none; }
    .topic-navbar .pull-left, .topic-navbar .navbg { height: auto; }
    #navul.nav-with-topics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); position: relative; top: auto; left: auto; width: 100%; height: auto; padding: 0; gap: 3px; overflow: visible; background: none; cursor: auto; z-index: 10000; }
    #navul.nav-with-topics > li { position: static; justify-content: center; min-width: 0; background: transparent; }
    #navul.nav-with-topics > li > .nav-category-link { width: auto; min-width: 0; height: 38px; padding: 0 7px; justify-content: center; border-radius: 8px; font-size: 13px; }
    #navul.nav-with-topics > li.has-topics > .nav-category-link { padding-right: 2px; }
    #navul.nav-with-topics .nav-topics-toggle { width: 26px; height: 38px; flex: 0 0 26px; }
    #navul.nav-with-topics > li > .nav-topics-panel,
    #navul.nav-with-topics > li:nth-last-child(-n+3) > .nav-topics-panel { grid-template-columns: repeat(3,minmax(0,1fr)); left: 0; right: auto; top: 100%; width: 100%; max-height: 60vh; overflow-y: auto; padding: 10px; gap: 7px; border-radius: 10px; }
    #navul.nav-with-topics > li > .nav-topics-panel > li > a { height: 40px; font-size: 13px; }
}
@media (max-width: 420px) {
    #navul.nav-with-topics { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (prefers-reduced-motion: reduce) {
    #navul.nav-with-topics > li > .nav-topics-panel > li > a { transition: none; }
}
