/* Shared YetiBets navigation, account controls and design tokens. */
:root {
    --yb-night: #06120f;
    --yb-ridge: #0d211b;
    --yb-slate: #17362c;
    --yb-panel: #102821;
    --yb-panel-strong: #143128;
    --yb-line: #2d5548;
    --yb-line-soft: rgb(111 176 153 / 22%);
    --yb-frost: #f4fbf7;
    --yb-mist: #aec8be;
    --yb-mint: #66e6b1;
    --yb-mint-strong: #37bd8b;
    --yb-mint-ink: #03110b;
    --yb-sun: #f3ca6b;
    --yb-danger: #ff8178;
    --yb-radius-sm: 0.65rem;
    --yb-radius-md: 1rem;
    --yb-radius-lg: 1.5rem;
    --yb-radius-xl: 2rem;
    --yb-shadow-menu: 0 1.5rem 4rem rgb(0 0 0 / 45%);
    --yb-shadow-panel: 0 1.5rem 4rem rgb(0 0 0 / 18%);
    --yb-shell-width: 112rem;
    --yb-page-width: 112rem;
    color-scheme: dark;
}

.yb-status-ribbon {
    padding: 0.6rem 1rem;
    border-bottom: 1px solid rgb(243 201 105 / 24%);
    color: #ddc889;
    background:
        linear-gradient(90deg, rgb(243 201 105 / 7%), transparent 30%, rgb(98 230 174 / 5%)),
        #0c1916;
    font-size: 0.78rem;
    font-weight: 650;
    letter-spacing: 0.015em;
    line-height: 1.45;
}

.yb-skip-link {
    position: fixed;
    z-index: 10000;
    top: 0.5rem;
    left: 0.5rem;
    transform: translateY(-180%);
    padding: 0.7rem 1rem;
    border-radius: var(--yb-radius-sm);
    background: var(--yb-mint);
    color: var(--yb-mint-ink);
    font-weight: 800;
}

.yb-skip-link:focus {
    transform: translateY(0);
}

[data-yb-shell] {
    position: sticky;
    z-index: 1000;
    top: 0;
}

/* Hide raw page-nav HTML until yetibets-shell.js mounts the real shell (avoids FOUC). */
[data-yb-shell]:not([data-shell-ready]) {
    min-height: 5.25rem;
    visibility: hidden;
}

.yb-shell {
    position: relative;
    display: grid;
    grid-template-columns: minmax(14rem, 18.5rem) minmax(0, 1fr);
    max-width: var(--yb-shell-width);
    min-height: 5.25rem;
    margin: 0 auto;
    color: var(--yb-frost);
    background:
        linear-gradient(118deg, rgb(102 230 177 / 11%), transparent 27rem),
        var(--yb-night);
    border-right: 1px solid var(--yb-line);
    border-bottom: 1px solid var(--yb-line);
    border-left: 1px solid var(--yb-line);
    border-radius: 0 0 var(--yb-radius-lg) var(--yb-radius-lg);
    box-shadow: 0 0.5rem 2rem rgb(0 0 0 / 20%);
}

.yb-shell::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0.3rem;
    border-radius: 0 0 0 var(--yb-radius-lg);
    background: linear-gradient(var(--yb-mint), #2b9b79);
    content: "";
}

.yb-shell__summit {
    display: flex;
    min-width: 0;
    padding: 0.85rem 1.25rem 0.85rem 1.55rem;
    align-items: center;
    border-right: 1px solid var(--yb-line);
}

.yb-shell__brand {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 0.85rem;
    color: inherit;
    text-decoration: none;
}

.yb-shell__brand-mark {
    display: inline-grid;
    width: 2.65rem;
    height: 2.65rem;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgb(98 230 174 / 55%);
    border-radius: 0.85rem;
    color: var(--yb-mint);
    background: rgb(98 230 174 / 8%);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.yb-shell__brand-copy {
    display: grid;
    min-width: 0;
    line-height: 1.05;
}

.yb-shell__brand-name {
    color: var(--yb-frost);
    font-size: 1.08rem;
    font-weight: 850;
    letter-spacing: -0.025em;
}

.yb-shell__sport-label {
    margin-top: 0.25rem;
    color: var(--yb-mist);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.yb-shell__menu,
.yb-shell__routes,
.yb-shell__sports,
.yb-shell__page-nav,
.yb-shell__account-summary {
    display: flex;
    align-items: center;
}

.yb-shell__menu {
    min-width: 0;
    padding: 0.75rem 1.25rem;
    justify-content: space-between;
    gap: 1.25rem;
}

.yb-shell__routes {
    min-width: 0;
    gap: 1rem;
}

.yb-shell__sports {
    flex: 0 0 auto;
    gap: 0.15rem;
    padding: 0.25rem;
    border: 1px solid var(--yb-line);
    border-radius: 999px;
    background: rgb(13 33 27 / 82%);
}

.yb-shell__sport-link,
.yb-shell__page-nav .nav-link,
.yb-shell__account-trigger,
.yb-shell__account-menu a,
.yb-shell__logout,
.yb-shell__retry {
    display: inline-flex;
    min-height: 2.75rem;
    padding: 0.55rem 0.78rem;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: var(--yb-radius-sm);
    color: var(--yb-mist);
    background: transparent;
    font: inherit;
    font-size: 0.86rem;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
}

.yb-shell__sport-link {
    border-radius: 999px;
}

.yb-shell__sport-link:hover,
.yb-shell__page-nav .nav-link:hover,
.yb-shell__account-trigger:hover,
.yb-shell__account-menu a:hover,
.yb-shell__logout:hover,
.yb-shell__retry:hover {
    color: var(--yb-frost);
    background: var(--yb-slate);
}

.yb-shell__sport-link[aria-current="page"] {
    color: var(--yb-mint-ink);
    background: var(--yb-mint);
    font-weight: 800;
    box-shadow: 0 0.35rem 1rem rgb(55 189 139 / 14%);
}

.yb-shell__page-nav {
    min-width: 0;
    gap: 0.15rem;
}

.yb-shell__page-nav:empty {
    display: none;
}

.yb-shell .nav-dropdown {
    position: relative;
}

.yb-shell .nav-dropdown-toggle {
    display: inline-flex;
    min-height: 2.8rem;
    padding: 0.6rem 0.9rem;
    align-items: center;
    border: 1px solid transparent;
    border-radius: var(--yb-radius-sm);
    color: var(--yb-mist);
    background: transparent;
    font: inherit;
    font-size: 0.9rem;
    cursor: pointer;
}

.yb-shell .nav-dropdown-toggle:hover,
.yb-shell .nav-dropdown.is-open .nav-dropdown-toggle {
    border-color: var(--yb-line);
    color: var(--yb-frost);
    background: var(--yb-slate);
}

.yb-shell .nav-dropdown-menu {
    position: absolute;
    z-index: 20;
    top: calc(100% + 0.45rem);
    left: 0;
    display: none;
    min-width: 11rem;
    padding: 0.35rem;
    border: 1px solid var(--yb-line);
    border-radius: var(--yb-radius-md);
    background: var(--yb-ridge);
    box-shadow: var(--yb-shadow-menu);
}

.yb-shell .nav-dropdown.is-open .nav-dropdown-menu {
    display: grid;
    gap: 0.2rem;
}

.yb-shell__page-nav .nav-link.active,
.yb-shell__page-nav .nav-link[aria-current="page"] {
    color: var(--yb-frost);
    border-color: var(--yb-line);
    background: var(--yb-slate);
    box-shadow: inset 0 -2px var(--yb-mint);
}

.yb-shell__account {
    position: relative;
    flex: 0 0 auto;
}

.yb-shell__account-trigger {
    gap: 0.5rem;
    border-color: var(--yb-line);
    padding-right: 0.9rem;
    padding-left: 0.9rem;
    background: rgb(13 33 27 / 76%);
}

.yb-shell__identity {
    max-width: 11rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.yb-shell__tier {
    margin-left: 0.45rem;
    padding: 0.16rem 0.45rem;
    border: 1px solid rgb(243 201 105 / 58%);
    border-radius: 999px;
    color: var(--yb-sun);
    font-size: 0.66rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.yb-shell__chevron {
    width: 0.5rem;
    height: 0.5rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-0.12rem) rotate(45deg);
}

.yb-shell__account-menu {
    position: absolute;
    top: calc(100% + 0.55rem);
    right: 0;
    display: none;
    min-width: 15rem;
    padding: 0.55rem;
    border: 1px solid var(--yb-line);
    border-radius: var(--yb-radius-md);
    background: #0b1c17;
    box-shadow: var(--yb-shadow-menu);
}

.yb-shell__account[data-open="true"] .yb-shell__account-menu {
    display: grid;
}

.yb-shell__account-menu a,
.yb-shell__logout,
.yb-shell__retry {
    width: 100%;
    justify-content: flex-start;
}

.yb-shell__upgrade {
    color: var(--yb-sun) !important;
}

.yb-shell__status {
    max-width: 16rem;
    margin: 0;
    color: var(--yb-mist);
    font-size: 0.8rem;
}

.yb-shell__toggle {
    display: none;
    min-width: 2.75rem;
    min-height: 2.75rem;
    margin-left: auto;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--yb-line);
    border-radius: var(--yb-radius-sm);
    color: var(--yb-frost);
    background: var(--yb-ridge);
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}

.yb-shell :focus-visible,
.yb-skip-link:focus-visible {
    outline: 3px solid var(--yb-sun);
    outline-offset: 3px;
    box-shadow: 0 0 0 5px var(--yb-night);
}

@media (max-width: 68.75rem) {
    .yb-shell {
        grid-template-columns: 14rem minmax(0, 1fr);
    }

    .yb-shell__menu,
    .yb-shell__routes {
        gap: 0.5rem;
    }

    .yb-shell__sport-link,
    .yb-shell__page-nav .nav-link {
        padding-right: 0.55rem;
        padding-left: 0.55rem;
    }
}

@media (max-width: 64rem) {
    .yb-shell {
        display: block;
        min-height: 4rem;
        border-right: 0;
        border-left: 0;
        border-radius: 0;
    }

    .yb-shell::before {
        inset: auto 0 0 0;
        width: auto;
        height: 0.2rem;
        border-radius: 0;
    }

    .yb-shell__summit {
        min-height: 4rem;
        padding: 0.55rem 0.9rem;
        border-right: 0;
    }

    .yb-shell__toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .yb-shell__menu {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        display: none;
        max-height: calc(100vh - 4rem);
        padding: 0.85rem;
        overflow-y: auto;
        align-items: stretch;
        border-bottom: 1px solid var(--yb-line);
        background: var(--yb-night);
        box-shadow: var(--yb-shadow-menu);
    }

    .yb-shell[data-menu-open="true"] .yb-shell__menu {
        display: grid;
        gap: 0.8rem;
    }

    .yb-shell__routes {
        display: grid;
        align-items: stretch;
        gap: 0.7rem;
    }

    .yb-shell__sports {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
        border-radius: var(--yb-radius-md);
    }

    .yb-shell__page-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.35rem;
    }

    .yb-shell__page-nav .nav-link {
        width: 100%;
        justify-content: flex-start;
    }

    .yb-shell .nav-dropdown-toggle {
        width: 100%;
        justify-content: flex-start;
    }

    .yb-shell .nav-dropdown-menu {
        position: static;
        margin-top: 0.25rem;
        box-shadow: none;
    }

    .yb-shell__account {
        padding-top: 0.8rem;
        border-top: 1px solid var(--yb-line);
    }

    .yb-shell__account-trigger {
        width: 100%;
        justify-content: space-between;
    }

    .yb-shell__account-menu {
        position: static;
        margin-top: 0.45rem;
        box-shadow: none;
    }
}

@media (max-width: 23.5rem) {
    .yb-shell__page-nav {
        grid-template-columns: 1fr;
    }

    .yb-shell__brand-mark {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .yb-skip-link {
        transition: none;
    }
}
