:root {
    --ri-bg: #0b0f10;
    --ri-bg-soft: #101516;
    --ri-panel: #121819;
    --ri-panel-2: #161d1e;
    --ri-line: rgba(211, 220, 215, .13);
    --ri-line-strong: rgba(211, 220, 215, .22);
    --ri-text: #f1f4f1;
    --ri-muted: #9ba49f;
    --ri-green: #76d564;
    --ri-warning: #d2aa55;
    --ri-danger: #df6f69;
    --ri-positive: #70cf72;
}

body {
    background: var(--ri-bg);
    color: var(--ri-text);
}

.ri-page {
    min-height: 100vh;
    background:
        linear-gradient(rgba(118, 213, 100, .022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(118, 213, 100, .018) 1px, transparent 1px),
        var(--ri-bg);
    background-size: 72px 72px;
}

.ri-shell {
    max-width: 1920px;
    padding-right: clamp(1rem, 2vw, 2.25rem);
    padding-left: clamp(1rem, 2vw, 2.25rem);
}

/* ---------- Product header ---------- */

.ri-research-header {
    padding: 2rem 0 1.7rem;
    background: linear-gradient(180deg, #0e1314, #0b0f10);
    border-bottom: 1px solid var(--ri-line);
}

.ri-breadcrumb {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1.35rem;
    color: #6f7873;
    font-size: .72rem;
    font-weight: 650;
}

.ri-breadcrumb a {
    color: #919b95;
    text-decoration: none;
}

.ri-breadcrumb a:hover {
    color: var(--ri-green);
}

.ri-breadcrumb strong {
    color: #c8ceca;
}

.ri-header-grid {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) auto;
    align-items: end;
    gap: 3rem;
}

.ri-kicker,
.ri-summary-title {
    color: var(--ri-green);
    font-size: .69rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.ri-title-block h1 {
    margin: .45rem 0 .55rem;
    color: #fff;
    font-family: "Bahnschrift Condensed", "Arial Narrow", sans-serif;
    font-size: clamp(2.6rem, 4vw, 4.2rem);
    font-weight: 700;
    line-height: .98;
    letter-spacing: -.035em;
    text-transform: uppercase;
}

.ri-title-block p {
    max-width: 790px;
    margin: 0;
    color: var(--ri-muted);
    font-size: .9rem;
    line-height: 1.65;
}

.ri-dataset-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(88px, auto));
    margin: 0;
    background: var(--ri-panel);
    border: 1px solid var(--ri-line-strong);
}

.ri-dataset-strip > div {
    min-width: 0;
    padding: .8rem .9rem;
    border-left: 1px solid var(--ri-line);
}

.ri-dataset-strip > div:first-child {
    border-left: 0;
}

.ri-dataset-strip dt {
    margin: 0 0 .2rem;
    color: #747e78;
    font-size: .6rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.ri-dataset-strip dd {
    margin: 0;
    color: #eef1ee;
    font-size: .77rem;
    font-weight: 700;
    white-space: nowrap;
}

/* ---------- Workspace ---------- */

.ri-workspace {
    padding: 1.4rem 0 3rem;
}

.ri-toolbar {
    display: grid;
    grid-template-columns:
        minmax(120px, .5fr)
        minmax(120px, .5fr)
        minmax(240px, 1.4fr)
        minmax(135px, .62fr)
        minmax(155px, .75fr)
        minmax(155px, .72fr)
        auto;
    align-items: end;
    gap: .75rem;
    padding: .9rem;
    background: #101516;
    border: 1px solid var(--ri-line);
}

.ri-search-field,
.ri-filter-field {
    display: grid;
    gap: .35rem;
}

.ri-search-field label,
.ri-filter-field label {
    color: #7d8781;
    font-size: .61rem;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}


.ri-premium-tag {
    display: inline-flex;
    margin-left: .3rem;
    padding: .08rem .28rem;
    color: #d7aa55;
    border: 1px solid rgba(215, 170, 85, .35);
    border-radius: 2px;
    font-size: .47rem;
    letter-spacing: .06em;
    vertical-align: middle;
}

.ri-filter-field--context select:disabled {
    cursor: default;
    opacity: .82;
}

.ri-search-control {
    position: relative;
}

.ri-search-control svg {
    position: absolute;
    top: 50%;
    left: .72rem;
    width: 16px;
    height: 16px;
    fill: none;
    stroke: #7c8680;
    stroke-width: 1.7;
    transform: translateY(-50%);
}

.ri-search-control input,
.ri-filter-field select {
    width: 100%;
    height: 42px;
    color: #e7ebe8;
    background: #151b1c;
    border: 1px solid var(--ri-line-strong);
    border-radius: 4px;
    font: inherit;
    font-size: .77rem;
    outline: none;
}

.ri-search-control input {
    padding: 0 .75rem 0 2.25rem;
}

.ri-filter-field select {
    padding: 0 2rem 0 .72rem;
}

.ri-search-control input:focus,
.ri-filter-field select:focus {
    border-color: rgba(118, 213, 100, .48);
    box-shadow: 0 0 0 2px rgba(118, 213, 100, .08);
}

.ri-reset-button {
    height: 42px;
    padding: 0 1rem;
    color: #c9cfcb;
    background: transparent;
    border: 1px solid var(--ri-line-strong);
    border-radius: 4px;
    font-size: .72rem;
    font-weight: 700;
}

.ri-reset-button:hover {
    color: #fff;
    border-color: rgba(118, 213, 100, .42);
}

.ri-summary-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: .9rem;
    padding: .75rem .9rem;
    background: #141a1b;
    border: 1px solid rgba(211, 220, 215, .16);
    border-bottom: 0;
}

.ri-summary-bar > div:first-child {
    display: flex;
    align-items: baseline;
    gap: .8rem;
}

.ri-summary-bar strong {
    color: #e3e8e5;
    font-size: .75rem;
    font-weight: 650;
}

.ri-summary-actions {
    display: flex;
    gap: .3rem;
}

.ri-view-toggle {
    padding: .35rem .65rem;
    color: #7f8983;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 3px;
    font-size: .67rem;
    font-weight: 700;
}

.ri-view-toggle.is-active {
    color: #eef1ef;
    background: #171e1f;
    border-color: var(--ri-line-strong);
}

/* ---------- Table ---------- */

.ri-table-frame {
    background: #111718;
    border: 1px solid rgba(211, 220, 215, .17);
}

.ri-table-scroll {
    width: 100%;
    max-width: 100%;
    height: clamp(620px, 72vh, 860px);
    overflow: auto;
    scrollbar-color: #3f9138 #090d0e;
    scrollbar-width: auto;
}

.ri-table-scroll::-webkit-scrollbar {
    width: 14px;
    height: 14px;
}

.ri-table-scroll::-webkit-scrollbar-track {
    background: #090d0e;
}

.ri-table-scroll::-webkit-scrollbar-thumb {
    min-width: 60px;
    background: #3f9138;
    border: 3px solid #090d0e;
    border-radius: 999px;
}

.ri-table-scroll::-webkit-scrollbar-thumb:hover {
    background: #70cf72;
}

.ri-main-grid {
    width: max-content;
    min-width: 1735px;
    border-collapse: separate;
    border-spacing: 0;
    color: #d8ded9;
    font-size: .75rem;
    font-weight: 450;
    font-variant-numeric: tabular-nums;
}

.ri-main-grid th,
.ri-main-grid td {
    height: 48px;
    padding: .54rem .78rem;
    text-align: center;
    white-space: nowrap;
    background: #151b1c;
    border-right: 1px solid rgba(221, 228, 224, .07);
    border-bottom: 1px solid rgba(221, 228, 224, .085);
}

.ri-main-grid thead th {
    color: #b8c1bb;
    background: #1b2324;
    font-weight: 600;
}

.ri-group-row th {
    height: 31px;
    color: #aeb9b3;
    background: #111718;
    border-bottom-color: rgba(221, 228, 224, .18);
    font-size: .61rem;
    font-weight: 650;
    letter-spacing: .105em;
    text-transform: uppercase;
}

.ri-column-row th {
    height: 41px;
    color: #b8c1bb;
    background: #1b2324;
    font-size: .68rem;
    font-weight: 600;
}

.ri-column-row button {
    padding: 0;
    color: inherit;
    background: transparent;
    border: 0;
    font: inherit;
    font-weight: inherit;
}

.ri-weekly-group {
    background: #151b1c !important;
}

/* ---------- Section backgrounds ---------- */

/*
    Major analytical sections alternate between two neutral graphite tones.
    Row striping is intentionally not used, so the section grouping remains
    consistent from top to bottom.
*/

.ri-group-row th:nth-child(1),
.ri-column-row th:nth-child(1),
.ri-column-row th:nth-child(2),
.ri-column-row th:nth-child(3),
.ri-main-grid tbody td:nth-child(1),
.ri-main-grid tbody td:nth-child(2),
.ri-main-grid tbody td:nth-child(3) {
    background: #151b1c;
}

.ri-group-row th:nth-child(2),
.ri-column-row th:nth-child(4),
.ri-main-grid tbody td:nth-child(4) {
    background: #181e1f;
}

.ri-group-row th:nth-child(3),
.ri-column-row th:nth-child(5),
.ri-column-row th:nth-child(6),
.ri-column-row th:nth-child(7),
.ri-main-grid tbody td:nth-child(5),
.ri-main-grid tbody td:nth-child(6),
.ri-main-grid tbody td:nth-child(7) {
    background: #151b1c;
}

.ri-group-row th:nth-child(4),
.ri-column-row th:nth-child(8),
.ri-column-row th:nth-child(9),
.ri-column-row th:nth-child(10),
.ri-main-grid tbody td:nth-child(8),
.ri-main-grid tbody td:nth-child(9),
.ri-main-grid tbody td:nth-child(10) {
    background: #181e1f;
}

.ri-group-row th:nth-child(5),
.ri-column-row th:nth-child(11),
.ri-column-row th:nth-child(12),
.ri-column-row th:nth-child(13),
.ri-column-row th:nth-child(14),
.ri-main-grid tbody td:nth-child(11),
.ri-main-grid tbody td:nth-child(12),
.ri-main-grid tbody td:nth-child(13),
.ri-main-grid tbody td:nth-child(14) {
    background: #151b1c;
}

.ri-group-row th:nth-child(6),
.ri-column-row th:nth-child(15),
.ri-column-row th:nth-child(16),
.ri-column-row th:nth-child(17),
.ri-main-grid tbody td:nth-child(15),
.ri-main-grid tbody td:nth-child(16),
.ri-main-grid tbody td:nth-child(17) {
    background: #181e1f;
}

.ri-group-row th:nth-child(7),
.ri-column-row th:nth-child(18),
.ri-column-row th:nth-child(19),
.ri-column-row th:nth-child(20),
.ri-column-row th:nth-child(21),
.ri-column-row th:nth-child(22),
.ri-column-row th:nth-child(23),
.ri-main-grid tbody td:nth-child(18),
.ri-main-grid tbody td:nth-child(19),
.ri-main-grid tbody td:nth-child(20),
.ri-main-grid tbody td:nth-child(21),
.ri-main-grid tbody td:nth-child(22),
.ri-main-grid tbody td:nth-child(23) {
    background: #151b1c;
}

/* ---------- Section separators ---------- */

.ri-group-row th:nth-child(2),
.ri-group-row th:nth-child(3),
.ri-group-row th:nth-child(4),
.ri-group-row th:nth-child(5),
.ri-group-row th:nth-child(6),
.ri-group-row th:nth-child(7),
.ri-column-row th:nth-child(4),
.ri-column-row th:nth-child(5),
.ri-column-row th:nth-child(8),
.ri-column-row th:nth-child(11),
.ri-column-row th:nth-child(15),
.ri-column-row th:nth-child(18),
.ri-main-grid tbody td:nth-child(4),
.ri-main-grid tbody td:nth-child(5),
.ri-main-grid tbody td:nth-child(8),
.ri-main-grid tbody td:nth-child(11),
.ri-main-grid tbody td:nth-child(15),
.ri-main-grid tbody td:nth-child(18) {
    border-left: 2px solid rgba(211, 220, 215, 0.2);
}

.ri-column-row th:nth-child(18) {
    min-width: 92px;
}

.ri-column-row th:nth-child(n+19):nth-child(-n+24) {
    min-width: 74px;
}

/* Freeze the Player column during horizontal scrolling. */
.ri-sticky-col {
    position: sticky !important;
    left: 0;
    z-index: 4 !important;
    min-width: 228px;
    text-align: left !important;
    background: #151b1c;
    box-shadow:
        1px 0 0 rgba(221, 228, 224, .22),
        8px 0 16px rgba(0, 0, 0, .16);
}

/* ---------- Sticky table headers ---------- */

.ri-main-grid thead th {
    position: sticky;
}

.ri-group-row th {
    top: 0;
    z-index: 22;
}

.ri-column-row th {
    top: var(--ri-group-header-height, 55px);
    z-index: 21;
}

/* Header intersections with the frozen Player column. */
.ri-column-row .ri-sticky-col {
    left: 0;
    z-index: 23 !important;
    background: #1b2324;
}


.ri-player-col {
    min-width: 228px;
}

/** Keep semantic section colors consistent across every row. */

.ri-main-grid tbody tr:nth-child(even) .ri-sticky-col {
    background: #171e1f;
}

/* Use a light overlay for row hover instead of replacing section colors. */

.ri-main-grid tbody tr:hover td {
    box-shadow: inset 0 0 0 9999px rgba(255, 255, 255, 0.025);
}

.ri-main-grid tbody tr:hover .ri-sticky-col {
    background: #1c2525;
    box-shadow: inset 0 0 0 9999px rgba(255, 255, 255, 0.025), 1px 0 0 rgba(221, 228, 224, 0.22), 8px 0 16px rgba(0, 0, 0, 0.16);
}

/* ---------- Cells ---------- */

.ri-player-cell {
    display: flex;
    align-items: center;
    gap: .62rem;
}

.ri-player-position {
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    place-items: center;
    color: #fff;
    border: 1px solid transparent;
    border-radius: 5px;
    font-size: .58rem;
    font-weight: 650;
    letter-spacing: .03em;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .08),
        0 1px 2px rgba(0, 0, 0, .18);
}

.ri-player-position--wr {
    background: #2f80ed;
    border-color: #5ea2ff;
}

.ri-player-position--rb {
    background: #34a853;
    border-color: #69d17f;
}

.ri-player-position--te {
    background: #f39c12;
    border-color: #f7c35b;
}

.ri-player-position--qb {
    background: #d64545;
    border-color: #f07070;
}

.ri-player-position--default {
    background: #5b6466;
    border-color: #7b878a;
}

.ri-player-name {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: .08rem;
}

.ri-player-name small {
    color: #8b9690;
    font-size: .61rem;
    font-weight: 600;
}

.ri-player-link,
.ri-team-link,
.ri-rank-link {
    color: #eef2ef;
    text-decoration: none;
}

.ri-player-link {
    color: #fff;
    font-size: .77rem;
    font-weight: 650;
}

.ri-team-link {
    color: #dce3df;
    font-weight: 620;
}

.ri-player-link:hover,
.ri-team-link:hover,
.ri-rank-link:hover {
    color: var(--ri-green);
}

.ri-score {
    color: #f1f4f2;
    font-size: .77rem;
    font-weight: 620;
}

.ri-rank {
    margin-left: .12rem;
    color: #89938d;
    font-size: .61rem;
    font-weight: 480;
}

.ri-number--positive,
.ri-number--negative,
.ri-number--neutral {
    font-size: .73rem;
    font-weight: 560;
}

.ri-number--positive {
    color: #82d681;
}

.ri-number--negative {
    color: #ec827b;
}

.ri-number--neutral {
    color: #8b958f;
}

.ri-trend {
    display: inline-flex;
    min-width: 52px;
    align-items: center;
    justify-content: center;
    gap: .27rem;
    font-size: .75rem;
    font-weight: 520;
}

.ri-trend__arrow {
    font-size: .84rem;
    font-weight: 650;
}

.ri-trend__value {
    color: #d2d8d4;
    font-weight: 540;
}

.ri-trend--positive .ri-trend__arrow {
    color: #78d078;
}

.ri-trend--negative .ri-trend__arrow {
    color: #e87972;
}

.ri-trend--neutral .ri-trend__arrow,
.ri-trend--neutral .ri-trend__value {
    color: #7e8882;
}

.ri-oti {
    color: #b8c0bb;
    font-size: .7rem;
    font-weight: 560;
}

.ri-reliability {
    color: #4e5852;
    font-size: .76rem;
    letter-spacing: .065em;
}

.ri-reliability .is-on {
    color: #c6cec9;
}

.ri-alpha-status,
.ri-change-label {
    display: inline-flex;
    min-height: 25px;
    align-items: center;
    justify-content: center;
    padding: .24rem .42rem;
    border: 1px solid;
    border-radius: 4px;
    font-size: .68rem;
    font-weight: 650;
    line-height: 1;
}

.ri-alpha-status--missing {
    min-width: 50px;
    color: #dfbd72;
    background: rgba(184, 137, 38, .11);
    border-color: rgba(218, 173, 79, .28);
}

.ri-quiet-dash {
    color: #58625c;
    font-size: .78rem;
    font-weight: 450;
}

.ri-change-label {
    min-width: 30px;
    color: #8f9993;
    background: rgba(207, 217, 211, .035);
    border-color: rgba(207, 217, 211, .13);
}

.ri-change-label--strong-positive,
.ri-change-label--positive,
.ri-change-label--increase,
.ri-change-label--strong-increase {
    color: #84d982;
    background: rgba(79, 158, 76, .12);
    border-color: rgba(118, 213, 100, .28);
}

.ri-change-label--strong-negative,
.ri-change-label--negative,
.ri-change-label--decrease,
.ri-change-label--strong-decrease {
    color: #ed847d;
    background: rgba(177, 66, 59, .12);
    border-color: rgba(231, 108, 99, .28);
}

.ri-change-label--mixed {
    color: #dfbf70;
    background: rgba(184, 137, 38, .11);
    border-color: rgba(218, 173, 79, .28);
}

.ri-change-label--stable,
.ri-change-label--neutral,
.ri-change-label--none {
    color: #8f9993;
    background: rgba(207, 217, 211, .035);
    border-color: rgba(207, 217, 211, .13);
}

.ri-sort-active::after {
    content: " ↓";
    color: var(--ri-green);
}

.ri-sort-active--asc::after {
    content: " ↑";
}

/* ---------- Loading and errors ---------- */

.ri-loading-row td,
.ri-data-error td {
    height: 190px;
    padding: 2rem;
    color: var(--ri-muted);
    text-align: center;
}

.ri-loading-row td strong,
.ri-loading-row td small,
.ri-data-error strong,
.ri-data-error small {
    display: block;
}

.ri-loading-row td strong,
.ri-data-error strong {
    margin-top: .75rem;
    color: #dfe4e1;
    font-size: .8rem;
}

.ri-data-error strong {
    color: var(--ri-danger);
}

.ri-loading-row td small,
.ri-data-error small {
    margin-top: .3rem;
    color: #727b76;
}

.ri-loading-mark {
    display: inline-block;
    width: 25px;
    height: 25px;
    border: 2px solid rgba(118, 213, 100, .16);
    border-top-color: var(--ri-green);
    border-radius: 50%;
}

/* ---------- Cards ---------- */

.ri-card-view {
    margin-top: 0;
}

.ri-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(315px, 1fr));
    gap: .75rem;
    padding: .75rem;
    background: #0c1112;
    border: 1px solid var(--ri-line);
}

.ri-player-card {
    padding: .9rem;
    background: #111718;
    border: 1px solid var(--ri-line);
}

.ri-player-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .8rem;
    padding-bottom: .7rem;
    border-bottom: 1px solid var(--ri-line);
}

.ri-player-card__identity {
    display: flex;
    align-items: center;
    gap: .6rem;
}

.ri-player-card__identity strong {
    display: block;
    color: #fff;
    font-size: .84rem;
}

.ri-player-card__identity small {
    color: var(--ri-muted);
    font-size: .64rem;
}

.ri-player-card__overall {
    text-align: right;
}

.ri-player-card__overall strong {
    display: block;
    color: #fff;
    font-size: 1rem;
}

.ri-player-card__overall small {
    color: var(--ri-muted);
    font-size: .61rem;
}

.ri-player-card__metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .45rem;
    margin-top: .7rem;
}

.ri-card-metric {
    padding: .5rem;
    background: #0e1314;
    border: 1px solid rgba(211, 220, 215, .08);
}

.ri-card-metric span,
.ri-card-metric strong {
    display: block;
}

.ri-card-metric span {
    margin-bottom: .15rem;
    color: #717b75;
    font-size: .55rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.ri-card-metric strong {
    color: #e8ece9;
    font-size: .74rem;
}

.ri-card-change-strip {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: .35rem;
    margin-top: .7rem;
    padding-top: .7rem;
    border-top: 1px solid var(--ri-line);
}

.ri-card-change {
    min-width: 0;
    text-align: center;
}

.ri-card-change > span:first-child {
    display: block;
    margin-bottom: .2rem;
    color: #717b75;
    font-size: .52rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.ri-card-change .ri-change-label {
    display: inline-flex;
    width: 42px;
    height: 34px;
    min-width: 42px;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    margin-inline: auto;
    padding: 0;
    font-size: 1.05rem;
    font-weight: 650;
}

.ri-card-change .ri-change-label--mixed,
.ri-card-change .ri-change-label--positive,
.ri-card-change .ri-change-label--negative,
.ri-card-change .ri-change-label--strong-positive,
.ri-card-change .ri-change-label--strong-negative {
    width: auto;
    min-width: 58px;
    padding-inline: .48rem;
    font-size: .68rem;
}

.ri-player-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    margin-top: .7rem;
    padding-top: .65rem;
    border-top: 1px solid var(--ri-line);
    font-size: .64rem;
}

.ri-player-card__footer a {
    color: var(--ri-green);
    font-weight: 700;
    text-decoration: none;
}

.ri-empty-panel,
.ri-no-results {
    padding: 3rem;
    color: var(--ri-muted);
    text-align: center;
    background: #101516;
    border: 1px solid var(--ri-line);
}

/* ---------- Footer ---------- */

.ri-grid-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .85rem .9rem;
    color: #7d8681;
    background: #141a1b;
    border: 1px solid rgba(211, 220, 215, .16);
    border-top: 0;
    font-size: .68rem;
}

.ri-grid-footer p {
    margin: 0;
}

.ri-grid-footer a {
    color: var(--ri-green);
    font-weight: 700;
    text-decoration: none;
}


.ri-grid-footer__links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    text-align: right;
}

.ri-grid-footer__links span {
    color: #7d8681;
}

/* ---------- Responsive ---------- */

@media (max-width: 1350px) {
    .ri-header-grid {
        grid-template-columns: 1fr;
        gap: 1.4rem;
    }

    .ri-dataset-strip {
        width: fit-content;
    }
}

@media (max-width: 900px) {
    .ri-dataset-strip {
        width: 100%;
        grid-template-columns: repeat(3, minmax(95px, 1fr));
    }

    .ri-toolbar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ri-search-field {
        grid-column: 1 / -1;
    }

    .ri-reset-button {
        width: 100%;
    }

    .ri-grid-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 620px) {
    .ri-research-header {
        padding-top: 1.4rem;
    }

    .ri-title-block h1 {
        font-size: 2.7rem;
    }

    .ri-dataset-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ri-toolbar {
        grid-template-columns: 1fr;
    }

    .ri-search-field {
        grid-column: auto;
    }

    .ri-summary-actions {
        display: none;
    }

    .ri-table-frame {
        display: none;
    }

    .ri-card-view[hidden] {
        display: block !important;
    }

    .ri-card-change-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}


/* Baseline expansion */
.ri-card-metric strong .ri-number--positive,
.ri-card-metric strong .ri-number--negative,
.ri-card-metric strong .ri-number--neutral {
    font-size: inherit;
    font-weight: inherit;
}

.ri-column-row th:nth-child(8),
.ri-column-row th:nth-child(9),
.ri-column-row th:nth-child(10) {
    min-width: 78px;
}


/* Slightly tighten low-information columns without removing content. */
.ri-main-grid th:nth-child(3),
.ri-main-grid td:nth-child(3),
.ri-main-grid th:nth-child(6),
.ri-main-grid td:nth-child(6),
.ri-main-grid th:nth-child(7),
.ri-main-grid td:nth-child(7),
.ri-main-grid th:nth-child(12),
.ri-main-grid td:nth-child(12),
.ri-main-grid th:nth-child(13),
.ri-main-grid td:nth-child(13),
.ri-main-grid th:nth-child(16),
.ri-main-grid td:nth-child(16),
.ri-main-grid th:nth-child(17),
.ri-main-grid td:nth-child(17) {
    padding-right: .58rem;
    padding-left: .58rem;
}

/* ---------- League and team context captions ---------- */

.ri-filter-field select:disabled {
    color: #8c9690;
    cursor: not-allowed;
    opacity: .72;
}

.ri-group-row th > span,
.ri-group-row th > small {
    display: block;
}

.ri-group-row th > small {
    display: block;
    margin-top: .18rem;
    color: #8d9791;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: none;
    line-height: 1.2;
}

.ri-player-card__overall > span {
    display: block;
    margin-bottom: .12rem;
    color: #717b75;
    font-size: .5rem;
    font-weight: 800;
    letter-spacing: .065em;
    text-transform: uppercase;
}

.ri-card-change-heading {
    margin-top: .7rem;
    padding-top: .7rem;
    color: #717b75;
    border-top: 1px solid var(--ri-line);
    font-size: .54rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.ri-card-change-heading + .ri-card-change-strip {
    margin-top: .4rem;
    padding-top: 0;
    border-top: 0;
}


.ri-market-group small {
    display: block;
    margin-top: .18rem;
    font-size: .58rem;
    font-weight: 650;
    letter-spacing: .02em;
    text-transform: none;
}


@media (max-width: 760px) {
    .ri-grid-footer__links {
        align-items: flex-start;
        flex-direction: column;
        gap: .4rem;
        text-align: left;
    }
}
