/**
 * Global shell: main content width, site header (compare nav), footer.
 */
.site-main {
    padding-bottom: 80px;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
}

/* --- Site header (compare nav) — z-index aligns with directory sidebar/dock --- */
header:not(.header-block) {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
    position: sticky;
    top: 0;
    overflow: visible;
}

.navbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
    height: 64px;
    position: relative;
    overflow: visible;
}

.navbar .logo {
    grid-column: 1;
    justify-self: start;
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.03em;
}

.navbar .logo span {
    color: var(--accent-blue);
}

.nav-wrapper {
    display: contents;
}

.nav-links {
    display: flex;
    gap: 24px;
    grid-column: 2;
    justify-self: center;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 14px;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}

.nav-links > a.active {
    font-weight: 600;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    grid-column: 3;
    justify-self: end;
    margin-left: 0;
}

.hamburger-btn {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-primary);
    cursor: pointer;
    padding: 4px;
    margin-left: auto;
}

/* Compare dropdown */
.nav-dropdown {
    position: relative;
    overflow: visible;
}

.nav-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-dropdown-trigger i {
    font-size: 10px;
    transition: transform 0.2s;
}

.nav-dropdown:hover .nav-dropdown-trigger i {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    min-width: 200px;
    padding: 8px 0;
    background: var(--bg-base);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    z-index: 1001;
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-menu a {
    display: block;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
}

.nav-dropdown-menu a:hover {
    background: var(--bg-subtle);
    color: var(--text-primary);
}

.nav-dropdown-menu a.active {
    background: var(--mc-blue-bg);
    color: var(--accent-blue);
    font-weight: 600;
}

@media (max-width: 992px) {
    .navbar {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        gap: 24px;
    }

    .hamburger-btn {
        display: block;
        z-index: 101;
    }

    .nav-wrapper {
        display: flex;
        flex: 1;
        min-width: 0;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-base);
        flex-direction: column;
        padding: 24px;
        border-bottom: 1px solid var(--border-light);
        gap: 24px;
        z-index: 99;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
        display: flex;
    }

    .nav-wrapper.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-links {
        grid-column: auto;
        justify-self: auto;
        flex-direction: column;
        width: 100%;
        text-align: left;
        gap: 20px;
        border-bottom: 1px solid var(--border-light);
        padding-bottom: 24px;
    }

    .nav-links a {
        font-size: 16px;
        font-weight: 600;
        padding: 4px 0;
    }

    .nav-actions {
        grid-column: auto;
        justify-self: auto;
        margin-left: 0;
        width: 100%;
        flex-direction: column;
        gap: 12px;
    }

    .nav-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .nav-actions .btn-outline {
        margin-right: 0 !important;
    }

    .nav-dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        margin-top: 8px;
        padding: 0 0 0 16px;
        border: none;
        box-shadow: none;
        border-left: 2px solid var(--border-light);
    }

    .nav-dropdown.open .nav-dropdown-menu {
        display: block;
    }

    .nav-dropdown-trigger {
        cursor: pointer;
    }
}

/* --- Site footer (dark) — literal colors preserved from inline template --- */
.site-footer {
    background-color: #0b0f19;
    color: #9ca3af;
    padding-top: 80px;
    font-size: 14px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 64px;
}

.footer-brand .logo {
    color: #ffffff;
    font-size: 24px;
    margin-bottom: 16px;
}

.footer-brand p {
    line-height: 1.6;
    margin-bottom: 24px;
    max-width: 300px;
}

.footer-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.03);
    font-size: 12px;
    color: #d1d5db;
    transition: background 0.2s;
    text-decoration: none;
}

.footer-status:hover {
    background: rgba(255, 255, 255, 0.08);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.footer-title {
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-links a {
    color: #9ca3af;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 32px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-legal {
    display: flex;
    gap: 24px;
}

.footer-legal a {
    transition: color 0.2s;
}

.footer-legal a:hover {
    color: #ffffff;
}

.footer-socials {
    display: flex;
    gap: 16px;
}

.footer-socials a {
    color: #9ca3af;
    font-size: 18px;
    transition: color 0.2s;
}

.footer-socials a:hover {
    color: #ffffff;
}

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }

    .footer-brand {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-brand {
        grid-column: span 1;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-legal {
        justify-content: center;
        flex-wrap: wrap;
    }
}
