.nav-shell {
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    padding: 12px 0;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    max-width: calc(var(--page-max-width, var(--pui-breakpoint-xl, 1280px)) + (var(--page-gutter-x, var(--pui-space-5, 1rem)) * 2));
    margin: 0 auto;
    padding-inline: var(--page-gutter-x, var(--pui-space-5, 1rem));
    width: 100%;
    box-sizing: border-box;
}

.nav-brand img {
    height: 36px;
    display: block;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    border: 0;
    padding: 6px;
}

.nav-toggle span {
    width: 22px;
    height: 2px;
    background: var(--text);
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex: 1;
}

.nav-scrim {
    display: none;
}

.nav-close {
    display: none;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 18px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-list a {
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: 14px;
}

.nav-list a:hover {
    color: var(--accent);
}

.nav-list a.nav-leading-link {
    display: inline-flex;
    align-items: center;
    font-size: 15px;
    font-weight: 700;
    line-height: 24px;
    letter-spacing: normal;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.nav-actions .mud-button-root {
    min-width: 0;
}
.nav-actions .mud-button-root.mud-button-filled,
.nav-actions .mud-button-root.mud-button-outlined {
    padding-inline: 0.75rem;
}

.nav-actions .theme-toggle-button {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface_alt);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.nav-actions .theme-toggle-button:hover {
    background: var(--state_hover_bg);
}

.nav-actions .theme-toggle-icon {
    width: 18px;
    height: 18px;
    display: block;
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 12px;
}

.nav-dropdown-button {
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-weight: 600;
    font-size: 14px;
}

.products-button {
    font-size: 15px;
    font-weight: 700;
}

.nav-dropdown-button:hover {
    color: var(--accent);
}

.nav-caret {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
}

.nav-sublist {
    position: absolute;
    top: 100%;
    margin-top: 10px;
    left: 0;
    display: none;
    flex-direction: column;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 14px 12px;
    min-width: 180px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    z-index: 20;
}

.nav-sublist.open,
.nav-dropdown:hover .nav-sublist {
    display: flex;
}

.nav-sublist a,
.nav-sublist button {
    color: var(--text);
    font-weight: 600;
    font-size: 14px;
    background: none;
    border: 0;
    padding: 0;
    text-align: left;
}

.nav-sublist a:hover,
.nav-sublist button:hover {
    color: var(--accent);
}

.nav-sublist-back {
    display: none;
}

.nav-status-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
}

.nav-status-dot--success {
    background: #4caf50;
}

.nav-status-dot--warning {
    background: #f59e0b;
}

.nav-status-dot--danger {
    background: #ef4444;
}

.nav-status-text {
    color: var(--text);
}

.nav-status-label {
    color: var(--text_muted);
    font-size: 12px;
    font-weight: 600;
}

.footer-shell {
    margin-top: 20px;
    color: var(--text_muted);
}

.footer-shell hr,
.footer-top,
.footer-legal {
    box-sizing: border-box;
    max-width: calc(var(--page-max-width, var(--pui-breakpoint-xl, 1280px)) + (var(--page-gutter-x, var(--pui-space-5, 1rem)) * 2));
    margin-inline: auto;
    width: 100%;
}

.footer-top,
.footer-legal {
    padding-inline: var(--page-gutter-x, var(--pui-space-5, 1rem));
}

.footer-top {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 24px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 8px;
}

.footer-column h4 {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text_muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.footer-links a {
    color: var(--text_muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.footer-links a:hover,
.footer-terms:hover {
    color: var(--accent);
}

.footer-legal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
    margin-top: 12px;
    font-size: 14px;
    color: var(--text_muted);
}

.footer-terms {
    color: var(--text_muted);
    text-decoration: none;
    font-weight: 600;
}

.footer-bar {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    text-align: center;
    height: 40px;
    background-color: var(--surface_alt);
    border-top: 1px solid var(--border);
}

.footer-bar-container {
    height: 100%;
    padding: 5px 0;
    max-width: calc(var(--page-max-width, var(--pui-breakpoint-xl, 1280px)) + (var(--page-gutter-x, var(--pui-space-5, 1rem)) * 2));
    margin: 0 auto;
    padding-inline: var(--page-gutter-x, var(--pui-space-5, 1rem));
    box-sizing: border-box;
}

.footer-shell--wrapped .footer-top {
    align-items: start;
}

.footer-shell--wrapped .footer-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-shell--wrapped .footer-column h4 {
    margin: 0;
}

.footer-shell--wrapped .footer-links {
    flex-flow: row wrap;
    gap: 8px 16px;
}

.footer-shell--wrapped .footer-links li {
    display: flex;
}

@media (max-width: 768px) {
    .footer-shell--wrapped .footer-links {
        flex-direction: column;
        gap: 8px;
    }

    .footer-shell--wrapped .footer-links li {
        display: block;
    }
}

@media (max-width: 900px) {
    .nav-container {
        flex-wrap: wrap;
    }

    .nav-toggle {
        display: flex;
        margin-left: auto;
    }

    .nav-scrim {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(17, 24, 39, 0.45);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
        z-index: 1000;
    }

    .nav-scrim.open {
        opacity: 1;
        pointer-events: auto;
    }

    .nav-links {
        position: fixed;
        inset: 0 0 0 auto;
        height: 100vh;
        height: 100dvh;
        max-height: 100vh;
        max-height: 100dvh;
        width: min(320px, 85vw);
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        display: flex;
        padding: 20px;
        background: color-mix(in srgb, var(--surface) 88%, transparent);
        -webkit-backdrop-filter: blur(6px);
        backdrop-filter: blur(6px);
        transform: translateX(100%);
        transition: transform 0.2s ease;
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        pointer-events: none;
        visibility: hidden;
        will-change: transform;
        contain: layout paint;
        z-index: 1001;
    }

    .nav-links.open {
        transform: translateX(0);
        pointer-events: auto;
        visibility: visible;
    }

    .nav-close {
        display: inline-flex;
        align-self: flex-end;
        background: none;
        border: 0;
        font-size: 26px;
        line-height: 1;
        padding: 4px;
    }

    .nav-list {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .nav-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .nav-status-dot {
        display: none;
    }

    .nav-sublist {
        position: static;
        display: none;
        width: 100%;
        margin-top: 8px;
        box-shadow: none;
    }

    .nav-sublist-back {
        display: block;
    }
}
