html {
    color-scheme: dark;
}

.site-theme-toggle,
.theme-toggle,
.auth-theme-toggle,
.mini-theme-toggle {
    display: none !important;
}

/* Prevent a flash of each page's legacy header before the shared header is mounted. */
body > header:not(.tr-shared-header),
body > .announcement:not(.tr-shared-announcement) {
    display: none !important;
}

.tr-shared-announcement,
.tr-shared-announcement *,
.tr-shared-header,
.tr-shared-header * {
    box-sizing: border-box;
}

body.tr-shared-shell {
    min-height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 0 !important;
}

body.tr-shared-shell > main {
    flex: 1 0 auto;
    min-width: 0;
}

body.tr-shared-shell > main.shell,
body.tr-shared-shell > main.card {
    align-self: center;
    margin-top: clamp(2.5rem, 7vw, 5.5rem);
    margin-bottom: clamp(2.5rem, 7vw, 5.5rem);
}

.tr-shared-announcement {
    width: 100%;
    min-height: 38px;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .7rem;
    padding: .46rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, .08);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    background: #090d12;
    color: #f4f7fb;
    font-size: .74rem;
    font-weight: 750;
    letter-spacing: .02em;
    line-height: 1.25;
    text-align: center;
}

.tr-shared-announcement-badge {
    min-width: 38px;
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .24rem .5rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #ff641f, #ff3d77);
    color: #fff;
    font-size: .7rem;
    font-weight: 950;
    line-height: 1;
}

.tr-shared-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    border-bottom: 1px solid #303947;
    background: rgba(13, 17, 23, .96);
    color: #f4f7fb;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
    backdrop-filter: blur(18px);
}

.tr-shared-header-inner {
    width: min(1200px, calc(100% - 2.5rem));
    min-height: 82px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(190px, 1fr) auto minmax(190px, 1fr);
    align-items: center;
    gap: clamp(1rem, 3vw, 2.4rem);
}

.tr-shared-logo {
    display: inline-flex;
    align-items: center;
    gap: .72rem;
    color: #f4f7fb !important;
    font-size: 1.08rem;
    font-weight: 950;
    letter-spacing: -.04em;
    text-decoration: none !important;
    white-space: nowrap;
    justify-self: start;
}

.tr-shared-logo-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: linear-gradient(135deg, #ff641f, #ff3d77);
    color: #fff;
    font-size: .75rem;
    box-shadow: 0 12px 28px rgba(255, 75, 68, .2);
}

.tr-shared-logo-accent {
    color: #ff5a1f;
}

.tr-shared-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .15rem;
    padding: .3rem;
    border: 1px solid #303947;
    border-radius: 999px;
    background: #0d1117;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
}

.tr-shared-nav a,
.tr-shared-mobile-menu a {
    color: #f4f7fb !important;
    font-size: .78rem;
    font-weight: 850;
    line-height: 1.25;
    text-decoration: none !important;
}

.tr-shared-nav a {
    padding: .72rem .72rem;
    border-radius: 999px;
    white-space: nowrap;
    transition: color .18s ease, background .18s ease;
}

.tr-shared-nav a:hover,
.tr-shared-nav a:focus-visible,
.tr-shared-nav a[aria-current="page"] {
    background: #202936;
    color: #ff8b60 !important;
}

.tr-shared-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .55rem;
    justify-self: end;
}

.tr-shared-actions #accountButton,
.tr-shared-actions #basketButton {
    width: auto !important;
    min-width: 42px !important;
    min-height: 42px !important;
    margin: 0 !important;
    padding: .62rem .78rem !important;
    border-radius: 999px !important;
}

.tr-shared-actions #accountButton .account-avatar,
.tr-shared-actions #accountButton .account-copy,
.tr-shared-actions #accountButton .account-button-avatar,
.tr-shared-actions #accountButton .account-button-label,
.tr-shared-actions #basketButton .basket-copy {
    pointer-events: none;
}

.tr-shared-action,
.tr-shared-menu-button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .42rem;
    border: 1px solid #303947;
    border-radius: 999px;
    background: #151b24;
    color: #f4f7fb !important;
    font: inherit;
    font-size: .74rem;
    font-weight: 900;
    line-height: 1;
    text-decoration: none !important;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(17, 21, 27, .04);
    transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.tr-shared-action {
    padding: .62rem .78rem;
}

.tr-shared-admin-link {
    border-color: rgba(255, 90, 31, .35);
    background: #2c1d18;
}

.tr-shared-admin-link[hidden] {
    display: none !important;
}

.content-nav a.active,
.content-nav a[aria-current="location"],
.about-nav a.active,
.about-nav a[aria-current="location"],
[data-scroll-nav] a.active,
[data-scroll-nav] a[aria-current="location"] {
    background: var(--accent-soft, #fff1ea);
    color: var(--accent, #ff5a1f) !important;
    box-shadow: inset 3px 0 var(--accent, #ff5a1f);
}

.tr-shared-action:hover,
.tr-shared-action:focus-visible,
.tr-shared-menu-button:hover,
.tr-shared-menu-button:focus-visible {
    border-color: #ff8d67;
    transform: translateY(-1px);
    box-shadow: 0 12px 25px rgba(255, 90, 31, .1);
}

.tr-shared-action-icon {
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #202936;
    font-size: .78rem;
}

.tr-shared-action-primary .tr-shared-action-icon {
    background: linear-gradient(135deg, #ff641f, #ff3d77);
    color: #fff;
}

.tr-shared-menu-button {
    display: none;
    width: 42px;
    padding: 0;
    font-size: 1rem;
}

.tr-shared-mobile-menu {
    display: none;
    width: min(100% - 2rem, 560px);
    margin: 0 auto 1rem;
    padding: .65rem;
    border: 1px solid #303947;
    border-radius: 18px;
    background: #151b24;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .25);
}

.tr-shared-mobile-menu.is-open {
    display: grid;
}

.tr-shared-mobile-menu a {
    padding: .85rem .9rem;
    border-radius: 12px;
}

.tr-shared-mobile-menu a:hover,
.tr-shared-mobile-menu a:focus-visible,
.tr-shared-mobile-menu a[aria-current="page"] {
    background: #202936;
    color: #ff8b60 !important;
}

.tr-portal-hook {
    display: none !important;
}

@media (max-width: 1050px) {
    .tr-shared-header-inner {
        grid-template-columns: auto 1fr auto;
    }

    .tr-shared-nav {
        display: none;
    }

    .tr-shared-menu-button {
        display: inline-flex;
    }
}

@media (max-width: 650px) {
    .tr-shared-actions #accountButton,
    .tr-shared-actions #basketButton {
        width: 42px !important;
        min-width: 42px !important;
        padding: 0 !important;
        font-size: 0 !important;
    }

    .tr-shared-actions #accountButton .account-button-label {
        display: none !important;
    }

    .tr-shared-actions #basketButton #basketCount {
        font-size: .72rem !important;
    }

    .tr-shared-announcement {
        gap: .5rem;
        padding-inline: .55rem;
        font-size: .66rem;
    }

    .tr-shared-header-inner {
        width: min(100% - 1.2rem, 560px);
        min-height: 72px;
        gap: .6rem;
    }

    .tr-shared-logo {
        font-size: 1rem;
    }

    .tr-shared-logo-mark {
        width: 38px;
        height: 38px;
        border-radius: 12px;
    }

    .tr-shared-action-label {
        display: none;
    }

    .tr-shared-action {
        width: 42px;
        padding: 0;
    }

    .tr-shared-action-icon {
        background: transparent;
    }
}

@media (max-width: 410px) {
    .tr-shared-logo > span:last-child {
        display: none;
    }
}

/* =========================================================
   TRADESRAFFLE PERMANENT SHARED HEADER CONTROL FIX
   ========================================================= */

.tr-shared-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: .55rem !important;
}

/* Shared pill buttons */
.tr-shared-action,
.tr-shared-actions #accountButton,
.tr-shared-actions #basketButton {
    width: auto !important;
    min-width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;

    margin: 0 !important;
    padding: .62rem .78rem !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: .42rem !important;

    border: 1px solid #303947 !important;
    border-radius: 999px !important;

    background: #151b24 !important;
    background-image: none !important;

    color: #f4f7fb !important;

    font: inherit !important;
    font-size: .74rem !important;
    font-weight: 900 !important;
    line-height: 1 !important;

    text-decoration: none !important;
    box-shadow: none !important;

    cursor: pointer !important;
}

/* Orange account button */
.tr-shared-action-primary,
.tr-shared-actions #accountButton {
    border-color: rgba(255, 90, 31, .55) !important;
    background: #2c1d18 !important;
}

/* Daily Spin and account icon containers */
.tr-shared-spin-icon,
.tr-shared-account-icon,
.tr-shared-actions #accountButton .account-button-avatar {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;

    display: inline-grid !important;
    place-items: center !important;

    flex: 0 0 20px !important;

    margin: 0 !important;
    padding: 0 !important;

    border: 0 !important;
    border-radius: 0 !important;

    background: transparent !important;
    background-image: none !important;

    color: #ffffff !important;

    font-size: 0 !important;
    line-height: 1 !important;

    opacity: 1 !important;
    visibility: visible !important;
}

/* Force identical SVG rendering */
.tr-shared-spin-icon svg,
.tr-shared-account-icon svg,
.tr-shared-actions #accountButton .account-button-avatar svg {
    width: 19px !important;
    height: 19px !important;

    display: block !important;

    margin: 0 !important;
    padding: 0 !important;

    fill: none !important;
    stroke: currentColor !important;

    opacity: 1 !important;
    visibility: visible !important;
}

/* =========================================================
   NOTIFICATION BELL
   ========================================================= */

.tr-notification-center {
    position: relative !important;

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

    flex: 0 0 auto;
}

.tr-notification-center[hidden] {
    display: none !important;
}

.tr-notification-button {
    appearance: none !important;
    -webkit-appearance: none !important;

    width: 42px !important;
    min-width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;

    margin: 0 !important;
    padding: 0 !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    border: 1px solid #303947 !important;
    border-radius: 999px !important;

    background: #151b24 !important;
    background-image: none !important;

    color: #ffffff !important;

    box-shadow: none !important;

    font: inherit !important;
    font-size: 0 !important;
    line-height: 1 !important;

    cursor: pointer !important;
}

.tr-notification-button:hover,
.tr-notification-button:focus-visible {
    border-color: #ff8d67 !important;
    background: #151b24 !important;
    background-image: none !important;
}

.tr-notification-bell {
    width: 20px !important;
    height: 20px !important;

    display: block !important;

    margin: 0 !important;
    padding: 0 !important;

    border: 0 !important;

    background: transparent !important;

    fill: none !important;
    stroke: #ffffff !important;

    opacity: 1 !important;
    visibility: visible !important;
}

/* Red/orange unread counter */
.tr-notification-count {
    position: absolute !important;

    top: -5px !important;
    right: -5px !important;

    min-width: 18px !important;
    height: 18px !important;

    padding: 0 4px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    border: 2px solid #0d1117 !important;
    border-radius: 999px !important;

    background: #ff5a1f !important;

    color: #ffffff !important;

    font-size: 10px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
}

.tr-notification-count[hidden] {
    display: none !important;
}

/* =========================================================
   NOTIFICATION DROP-DOWN
   ========================================================= */

.tr-notification-panel {
    position: absolute !important;

    top: calc(100% + 12px) !important;
    right: 0 !important;

    z-index: 2000 !important;

    width: min(360px, calc(100vw - 24px)) !important;

    padding: 12px !important;

    border: 1px solid #303947 !important;
    border-radius: 16px !important;

    background: #151b24 !important;
    color: #f4f7fb !important;

    box-shadow: 0 18px 50px rgba(0, 0, 0, .45) !important;
}

.tr-notification-panel[hidden] {
    display: none !important;
}

.tr-notification-heading {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;

    gap: 12px !important;

    padding: 4px 4px 10px !important;
}

.tr-notification-heading strong {
    color: #ffffff !important;
}

.tr-notification-heading button {
    width: auto !important;

    margin: 0 !important;
    padding: 5px 8px !important;

    border: 0 !important;

    background: transparent !important;

    color: #ff8b60 !important;

    font-size: .72rem !important;
    font-weight: 800 !important;

    cursor: pointer !important;
}

.tr-notification-list {
    display: grid !important;
    gap: 6px !important;
}

.tr-notification-item {
    display: flex !important;
    align-items: flex-start !important;
    gap: 10px !important;

    padding: 10px !important;

    border-radius: 12px !important;

    background: #0d1117 !important;

    color: #f4f7fb !important;
    text-decoration: none !important;
}

.tr-notification-item.is-unread {
    background: #202936 !important;
}

.tr-notification-type {
    width: 28px !important;
    height: 28px !important;

    display: grid !important;
    place-items: center !important;

    flex: 0 0 28px !important;

    border-radius: 50% !important;

    background: #ff5a1f !important;
    color: #ffffff !important;

    font-size: .72rem !important;
    font-weight: 900 !important;
}

.tr-notification-copy {
    display: grid !important;
    gap: 3px !important;

    min-width: 0 !important;
}

.tr-notification-copy strong {
    color: #ffffff !important;
}

.tr-notification-copy span,
.tr-notification-copy time,
.tr-notification-empty {
    color: #aeb7c4 !important;
    font-size: .72rem !important;
}

.tr-notification-empty {
    margin: 0 !important;
    padding: 15px 8px !important;
    text-align: center !important;
}

.tr-notification-links {
    display: flex !important;
    gap: 8px !important;

    padding-top: 10px !important;
}

.tr-notification-links a {
    flex: 1 !important;

    padding: 8px !important;

    border: 1px solid #303947 !important;
    border-radius: 10px !important;

    background: #0d1117 !important;

    color: #f4f7fb !important;

    font-size: .72rem !important;
    font-weight: 800 !important;

    text-align: center !important;
    text-decoration: none !important;
}

/* =========================================================
   BASKET COUNT
   ========================================================= */

.tr-shared-basket-count,
.tr-shared-actions #basketButton #basketCount {
    min-width: 22px !important;
    height: 22px !important;

    padding: 0 6px !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    border-radius: 999px !important;

    background: #ff5a1f !important;
    color: #ffffff !important;

    font-size: .7rem !important;
    font-weight: 950 !important;
    line-height: 1 !important;
}

/* Keep header controls above page-specific styles */
.tr-shared-header button,
.tr-shared-header a {
    -webkit-tap-highlight-color: transparent;
}

/* Mobile */
@media (max-width: 650px) {

    .tr-shared-actions #accountButton,
    .tr-shared-actions #basketButton,
    .tr-shared-action,
    .tr-notification-button {
        width: 42px !important;
        min-width: 42px !important;
        height: 42px !important;

        padding: 0 !important;
    }

    .tr-shared-action-label,
    .tr-shared-actions #accountButton .account-button-label {
        display: none !important;
    }
}/* Same logged-in initials icon on every page */
.tr-shared-account-icon.tr-shared-account-initials,
.tr-shared-actions #accountButton .account-button-avatar {
    width: 26px !important;
    min-width: 26px !important;
    height: 26px !important;

    display: inline-grid !important;
    place-items: center !important;

    border-radius: 50% !important;

    background: #ff5a1f !important;
    color: #ffffff !important;

    font-size: 10px !important;
    font-weight: 950 !important;
    line-height: 1 !important;

    letter-spacing: 0 !important;
}/* =========================================
   FINAL KM ACCOUNT AVATAR SIZE LOCK
   EXACT SAME ON EVERY PAGE
   ========================================= */

.tr-shared-account-icon,
#sharedAccountLink .tr-shared-account-icon,
#accountButton .account-button-avatar,
.tr-shared-actions #accountButton .account-button-avatar {
    width: 34px !important;
    height: 34px !important;

    min-width: 34px !important;
    min-height: 34px !important;

    max-width: 34px !important;
    max-height: 34px !important;

    flex: 0 0 34px !important;

    display: inline-grid !important;
    place-items: center !important;

    padding: 0 !important;
    margin: 0 !important;

    box-sizing: border-box !important;

    border: 0 !important;
    border-radius: 3px !important;

    background: linear-gradient(
        135deg,
        #ff641f,
        #ff3d77
    ) !important;

    color: #ffffff !important;

    font-size: 12px !important;
    font-weight: 900 !important;
    line-height: 1 !important;

    text-align: center !important;
    box-shadow: none !important;

    transform: none !important;
}/* FINAL KM TEXT LOCK - SAME LETTERS ON EVERY PAGE */
.tr-shared-account-icon,
#sharedAccountLink .tr-shared-account-icon,
#accountButton .account-button-avatar,
.tr-shared-actions #accountButton .account-button-avatar {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system,
        BlinkMacSystemFont, "Segoe UI", sans-serif !important;

    font-size: 12px !important;
    font-weight: 900 !important;
    font-style: normal !important;
    line-height: 1 !important;

    letter-spacing: 0 !important;
    text-transform: uppercase !important;

    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


