/* Replace the old nav-tree rules. Keep unrelated nav-flat/nav-inline rules. */
.nav-tree {
    --nt-accent: #aa0808;
    --nt-width: 1400px;
    --nt-columns: 6;
    position: relative;
    z-index: 1001;
    background: #fff;
    color: #171717;
    font-family: var(--nav-font, inherit);
}
.nav-tree *, .nav-tree *::before, .nav-tree *::after { box-sizing: border-box; }
.nav-tree ul { list-style: none; padding: 0; margin: 0; }
.nav-tree a { color: inherit; text-decoration: none; }
.nav-tree button { font: inherit; color: inherit; cursor: pointer; }
.nav-tree a:focus-visible, .nav-tree button:focus-visible { outline: 2px solid var(--nt-accent); outline-offset: -3px; }
.nav-tree [hidden] { display: none !important; }
.nav-tree .nav-head, .nav-tree .nt-mobile { display: none; }
.nav-tree .nav-body { position: static; }
.nav-tree .nav-root {
    display: grid;
    grid-template-columns: repeat(var(--nt-columns), minmax(0, 1fr));
    max-width: var(--nt-width);
    margin: auto;
}
.nav-tree .nav-root > li { display: flex; align-items: stretch; border-bottom: 4px solid transparent; }
.nav-tree .nav-root > li.open { border-color: var(--nt-accent); }
.nav-tree .nav-root > li > a { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 16px 10px; font-size: 13px; font-weight: 700; }
.nav-tree .nav-root > li > a > span { overflow-wrap: anywhere; }
.nav-tree .nav-root > li > a > img { width: 30px; height: 30px; object-fit: contain; }
.nav-tree .nt-expand { border: 0; background: transparent; width: 36px; flex-shrink: 0; }
.nav-tree .nt-expand::before { content: ''; display: inline-block; width: 7px; height: 7px; border-right: 2px solid; border-bottom: 2px solid; transform: rotate(45deg); }
.nav-tree li.open > .nt-expand::before { transform: rotate(225deg); }
.nav-tree .nav-root > li > ul {
    position: absolute;
    top: 100%; left: 0; right: 0;
    display: none;
    grid-template-columns: repeat(var(--nt-columns), minmax(0, 1fr));
    gap: 12px;
    padding: 28px max(20px, calc((100% - var(--nt-width)) / 2));
    background: #fff;
    box-shadow: 0 8px 12px #0002;
    max-height: min(65vh, 650px);
    overflow-y: auto;
    overscroll-behavior: contain;
}
.nav-tree .nav-root > li.open > ul { display: grid; }
.nav-tree .nav-root > li > ul > li > a { display: flex; flex-direction: column; height: 100%; border: 1px solid #d4d4d4; border-radius: 4px; overflow: hidden; }
.nav-tree .nav-root > li > ul > li > a > img { display: block; width: 100%; height: 140px; object-fit: contain; padding: 8px; background: #fff; }
.nav-tree .nav-root > li > ul > li > a > span { display: flex; align-items: center; justify-content: center; flex: 1; padding: 14px 10px; text-align: center; background: #f5f5f5; font-size: 14px; font-weight: 600; }
.nav-tree .nav-root > li > ul > li > a:hover { color: var(--nt-accent); border-color: var(--nt-accent); }
.nav-tree .nav-root ul ul { margin-top: 8px; }
.nav-tree .nav-root ul ul a { display: block; padding: 8px; }
.nav-tree .nav-root > li > ul > li:has(> ul) > a { height: auto; }
.nt-backdrop { position: fixed; inset: 0; z-index: 1000; background: #0009; }
body.nt-scroll-lock { overflow: hidden; }
.nav-tree.nt-small { position: fixed; inset: 0 auto 0 0; width: min(360px, 90vw); height: 100vh; height: 100dvh; background: #eae7e3; transform: translateX(-100%); visibility: hidden; transition: transform .25s, visibility .25s; display: flex; flex-direction: column; }
.nav-tree.nt-small.open { transform: translateX(0); visibility: visible; }
.nav-tree.nt-small .nav-head { display: flex; align-items: center; flex-shrink: 0; min-height: 48px; padding: 4px 12px; gap: 12px; }
.nav-tree.nt-small .nav-head .toggle.close { margin: 0; padding: 8px; font-size: 24px; line-height: 1; }
.nav-tree.nt-small .nav-head .back { margin-left: auto; }
.nav-tree.nt-small .nav-head .logo { max-width: 100px; max-height: 32px; }
.nav-tree .nt-back { margin-left: auto; border: 0; padding: 10px; background: transparent; }
.nav-tree .nt-back::before { content: '<'; margin-right: 8px; }
.nav-tree.nt-small .nav-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 12px 12px; }
.nav-tree.nt-small .nav-root { display: none; }
.nav-tree.nt-small .nt-mobile { display: grid; gap: 7px; }
.nav-tree .nt-mobile > li { display: flex; background: #fff; border-radius: 5px; overflow: hidden; }
.nav-tree .nt-mobile a, .nav-tree .nt-forward { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 12px; text-align: left; font-size: 13px; font-weight: 600; background: transparent; border: 0; }
.nav-tree .nt-mobile img { width: 40px; height: 40px; flex-shrink: 0; object-fit: contain; border-radius: 50%; }
.nav-tree .nt-forward::after { content: '>'; margin-left: auto; padding-left: 8px; }
.nav-tree .nt-all a { font-weight: 400; }
@media (prefers-reduced-motion: reduce) { .nav-tree.nt-small { transition: none; } }

.nav-tree:not(.nt-small) .nt-expand:not(:focus-visible) {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.nav-tree:not(.nt-small) .nt-expand::before {
    display: none;
}

.nav-tree:not(.nt-small) .nt-expand:focus-visible {
    width: auto;
    padding: 8px;
}

.nav-tree:not(.nt-small) .nt-expand:focus-visible::after {
    content: "Open";
}

.main.nav-tree {
    --nt-accent: #ec7167;
}

