
.rb-rf-stw {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 18px;
    margin-left: 6px;
    padding: 0;
    border: 1px solid rgba(182,245,0,.45);
    border-radius: 9px;
    background: rgba(182,245,0,.08);
    color: #b6f500;
    cursor: pointer;
    vertical-align: middle;
    flex: 0 0 auto;
}
.rb-rf-stw:hover,
.rb-rf-stw.is-open {
    background: #b6f500;
    color: #19210d;
}
.rb-rf-stw:focus-visible {
    outline: 2px solid #b6f500;
    outline-offset: 1px;
}
.rb-rf-line.rb-rf-gear,
.rb-rf-line.rb-rf-stw-panel {
    display: block !important;
    white-space: normal !important;
    color: #c9d2c9;
    margin-top: 2px;
}
.rb-rf-line.rb-rf-stw-panel[hidden] { display: none !important; }
.rb-rf-line.rb-rf-stw-panel {
    padding: 0;
    border: 0;
    background: none;
}
.rb-rf-gear-label {
    font-size: .82em;
    font-weight: 800;
    letter-spacing: .4px;
    color: #929e94;
    margin-right: 3px;
}

/* Horse page: show stewards reports and gear in full on their own line. */
#horsePage .historical-note-full {
    display: flex !important;
    gap: 6px !important;
    align-items: baseline !important;
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: none !important;
    white-space: normal !important;
    cursor: default !important;
}
#horsePage .historical-note-full .historical-stewards-text {
    display: inline !important;
    max-width: none !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
}
#horsePage .horse-run-separator:has(+ .historical-note-full) {
    display: none !important;
}


/* RB_PAST_RACE_RANK_V1: race rank beside the rating (Brain Pro). */
.rb-rf-racerank.strong { color: #b6f500 !important; }
.rb-rf-racerank.weak { color: #ff9f7a !important; }

@media screen and (min-width: 901px) {
    .rb-rf-run.has-rating.has-rank {
        grid-template-columns:
            46px minmax(0,1fr) 82px 52px 60px !important;
    }
}

@media screen and (max-width: 900px) {
    /* The mobile runner-card grid (3 columns) was also applied to the
       Recent Form row, squeezing every past run into a 40px column. */
    html body #racePageContent .market-table tbody tr.rb-rf-row {
        display: block !important;
        grid-template-columns: none !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }
    html body #racePageContent .market-table tbody tr.rb-rf-row > td.rb-rf-cell {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    html body #racePageContent .market-table .rb-rf-row .rb-rf-content,
    html body #racePageContent .market-table .rb-rf-row .rb-rf-run {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    html body .market-table .rb-rf-run > .rb-rf-racerank {
        order: 3 !important;
        flex: 0 0 58px !important;
        width: 58px !important;
        min-width: 58px !important;
        max-width: 58px !important;
    }
}



.topbar .rb-header-auth {
    display: flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
    gap: 8px !important;
    white-space: nowrap !important;
}

.topbar .rb-create-account {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #b6ff38;
    color: #101510;
    border: 1px solid #b6ff38;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.2;
}

.topbar .rb-create-account:hover {
    background: #ccff76;
}

.topbar .rb-create-account[hidden] {
    display: none !important;
}

.topbar .rb-create-mobile {
    display: none;
}

@media (min-width: 851px) {

    .topbar .rb-header-auth .sign-in {
        font-size: 12px !important;
        padding: 12px !important;
    }

    .topbar .nav {
        gap: clamp(7px, 0.8vw, 16px) !important;
    }
}

@media (max-width: 850px) {

    .topbar .rb-header-auth {
        gap: 5px !important;
    }

    .topbar .rb-create-account {
        padding: 9px 10px !important;
        font-size: 11px !important;
    }

    .topbar .rb-header-auth .sign-in {
        padding: 9px 8px !important;
        font-size: 11px !important;
    }

    .topbar .rb-create-desktop {
        display: none;
    }

    .topbar .rb-create-mobile {
        display: inline;
    }

    .topbar:has(.rb-create-account:not([hidden])) .brand {
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }

    .topbar:has(.rb-create-account:not([hidden])) .brand img {
        max-width: 100% !important;
        height: auto !important;
    }
}

