/* ============================================================
   MK13 Shared Navigation
   ============================================================ */

.mk13-topbar {
    position: relative;
    z-index: 1000;

    width: 100%;

    background: rgba(16, 21, 28, 0.97);

    border-bottom:
        1px solid #30363d;
}

.mk13-topbar-inner {
    display: grid;

    grid-template-columns:
        auto auto 1fr;

    align-items: center;

    width: min(1180px, 100%);
    min-height: 62px;

    margin: 0 auto;
    padding: 0 22px;

    gap: 18px;
}

/* MK13 brand */

.mk13-brand {
    color: #e6edf3;

    font-size: 25px;
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1;

    text-decoration: none;

    white-space: nowrap;
}

.mk13-brand span {
    color: #7ee787;
}

.mk13-brand:hover {
    color: #e6edf3;
}

.mk13-brand:focus-visible {
    outline:
        2px solid #7ee787;

    outline-offset: 5px;
}

/* Current page title */

.mk13-page-title {
    display: flex;
    align-items: baseline;

    min-width: 0;

    gap: 10px;
}

.mk13-page-title strong {
    color: #e6edf3;

    font-size: 15px;
    font-weight: 700;

    white-space: nowrap;
}

.mk13-page-title span {
    overflow: hidden;

    color: #8b949e;

    font-size: 12px;

    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Global menu */

.mk13-menu {
    display: flex;
    align-items: stretch;
    justify-content: flex-end;

    height: 62px;

    gap: 2px;
}

.mk13-menu-item {
    position: relative;

    display: inline-flex;
    align-items: center;

    padding: 0 13px;

    color: #8b949e;

    font-size: 12px;
    font-weight: 600;

    text-decoration: none;

    white-space: nowrap;

    transition:
        color 150ms ease,
        background 150ms ease;
}

.mk13-menu-item:hover {
    color: #e6edf3;

    background:
        rgba(126, 231, 135, 0.045);
}

.mk13-menu-item.active {
    color: #7ee787;
}

.mk13-menu-item.active::after {
    content: "";

    position: absolute;

    right: 12px;
    bottom: 0;
    left: 12px;

    height: 2px;

    background: #7ee787;

    box-shadow:
        0 0 8px rgba(126, 231, 135, 0.32);
}

.mk13-menu-item:focus-visible {
    outline:
        2px solid #7ee787;

    outline-offset: -4px;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 850px) {

    .mk13-topbar-inner {
        grid-template-columns:
            auto 1fr;

        gap:
            8px 16px;

        padding:
            10px 18px 0;
    }

    .mk13-page-title {
        justify-self: start;
    }

    .mk13-page-title span {
        display: none;
    }

    .mk13-menu {
        grid-column: 1 / -1;

        justify-content: flex-start;

        width: 100%;
        height: 40px;

        overflow-x: auto;
        overflow-y: hidden;

        scrollbar-width: none;
    }

    .mk13-menu::-webkit-scrollbar {
        display: none;
    }

    .mk13-menu-item {
        flex: 0 0 auto;

        padding:
            0 12px;

        font-size: 11px;
    }

    .mk13-menu-item:first-child {
        padding-left: 0;
    }

    .mk13-menu-item.active::after {
        right: 8px;
        left: 8px;
    }
}

@media (max-width: 480px) {

    .mk13-topbar-inner {
        padding-right: 14px;
        padding-left: 14px;
    }

    .mk13-brand {
        font-size: 24px;
    }

    .mk13-page-title strong {
        font-size: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .mk13-menu-item {
        transition: none;
    }
}

/* ============================================================
   MK13 Error Navigation
   ============================================================ */

.mk13-error-topbar-inner {
    grid-template-columns:
        auto 1fr auto;
}

.mk13-error-menu {
    justify-self: end;
}

.mk13-error-menu .mk13-menu-item {
    color: #7ee787;
}

@media (max-width: 850px) {

    .mk13-error-topbar-inner {
        grid-template-columns:
            auto 1fr auto;

        padding:
            0 18px;
    }

    .mk13-error-menu {
        grid-column: auto;

        justify-content: flex-end;

        width: auto;
        height: 62px;

        overflow: visible;
    }
}

/* ============================================================
   Full-bleed shared navigation
   Keeps the bar edge-to-edge inside padded pages.
   ============================================================ */

.mk13-topbar {
    width: 100vw;

    margin-right:
        calc(50% - 50vw);

    margin-left:
        calc(50% - 50vw);
}
