/* Global category menus keep the same order across every vertical. */
.nav-links { position: relative; }
.nav-category > summary { display: inline-flex; list-style: none; }
.nav-category > summary::-webkit-details-marker { display: none; }
.nav-category[open] > summary { background: rgba(255, 255, 255, .2); }
.nav-category > summary:focus-visible,
.nav-category-panel a:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
}
.nav-category-panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 20px;
    max-height: min(65vh, 620px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel);
    color: var(--ink);
    box-shadow: 0 14px 28px rgba(30, 41, 59, .18);
    z-index: 25;
}
.nav-category-section { min-width: 0; }
.nav-category-section h2 {
    margin: 0 0 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
    font-size: .8rem;
    color: var(--muted);
}
.nav .nav-category-panel a,
.nav .nav-category-panel button[type="submit"] {
    display: block;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--ink) !important;
    font: inherit;
    text-align: left;
    white-space: normal;
    cursor: pointer;
    transform: none;
}
.nav .nav-category-panel a:hover,
.nav .nav-category-panel button[type="submit"]:hover {
    background: color-mix(in srgb, var(--primary) 12%, var(--panel));
}
@media (max-width: 900px) {
    .nav-category { width: 100%; }
    .nav-category > summary { width: 100%; justify-content: space-between; }
    .nav-category-panel {
        position: static;
        grid-template-columns: 1fr;
        max-height: 55vh;
        margin-top: 8px;
        padding: 14px;
        gap: 16px;
    }
}
