/* Shared public research tables for Players, Teams and Coaching. */
.research-shell {
    width: min(var(--max-width), calc(100% - 56px));
    margin: 42px auto 64px;
    padding: 28px;
    background: #fff;
    border: 1px solid rgba(17, 19, 21, .12);
    border-radius: 16px;
    box-shadow: 0 14px 34px rgba(17, 19, 21, .07);
}

.research-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 22px;
}

.research-heading h2 {
    margin: 4px 0 6px;
    color: #111315;
    font-size: clamp(1.55rem, 2.5vw, 2.15rem);
    letter-spacing: -.035em;
}

.research-heading p {
    max-width: 850px;
    margin: 0;
    color: #666d70;
    line-height: 1.6;
}

.research-eyebrow {
    margin: 0;
    color: #8a6900;
    font-size: .7rem;
    font-weight: 900;
    letter-spacing: .115em;
    text-transform: uppercase;
}

.research-controls {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
}

.research-control-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
}

.research-control-row label {
    display: grid;
    gap: 5px;
    min-width: 130px;
    color: #60666a;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .03em;
}

.research-control-row select,
.research-control-row input {
    min-height: 40px;
    padding: 8px 10px;
    color: #17191b;
    background: #fff;
    border: 1px solid rgba(17, 19, 21, .18);
    border-radius: 9px;
    font: inherit;
    font-size: .86rem;
    font-weight: 650;
    letter-spacing: 0;
}

.research-search {
    flex: 1 1 220px;
}

.research-search input {
    width: 100%;
}

.research-scope-buttons {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 4px;
    border: 1px solid rgba(17, 19, 21, .14);
    border-radius: 10px;
    background: #f3f4f2;
}

.research-scope-button,
.research-apply-button {
    min-height: 32px;
    padding: 6px 12px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #555d60;
    font-size: .78rem;
    font-weight: 800;
    cursor: pointer;
}

.research-scope-button.is-active,
.research-apply-button {
    background: #17191b;
    color: #f2c230;
}

.research-status {
    display: flex;
    align-items: center;
    min-height: 28px;
    margin: 3px 0 10px;
    color: #71787b;
    font-size: .78rem;
    font-weight: 650;
}

.research-status.is-loading::before {
    content: "";
    width: 8px;
    height: 8px;
    margin-right: 8px;
    border: 2px solid rgba(17, 19, 21, .22);
    border-top-color: #b78a00;
    border-radius: 50%;
    animation: research-spin .8s linear infinite;
}

@keyframes research-spin { to { transform: rotate(360deg); } }

.research-table-wrap {
    overflow: auto;
    border: 1px solid rgba(17, 19, 21, .11);
    border-radius: 12px;
    background: #fff;
}

.research-table {
    width: 100%;
    min-width: 860px;
    border-collapse: collapse;
    font-size: .82rem;
}

.research-table th,
.research-table td {
    padding: 11px 12px;
    border-bottom: 1px solid rgba(17, 19, 21, .08);
    text-align: right;
    white-space: nowrap;
}

.research-table th:first-child,
.research-table td:first-child,
.research-table th:nth-child(2),
.research-table td:nth-child(2) {
    text-align: left;
}

.research-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f2f3f1;
    color: #575e61;
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .045em;
    text-transform: uppercase;
}

.research-table thead button {
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-transform: inherit;
    letter-spacing: inherit;
    cursor: pointer;
}

.research-table tbody tr:hover {
    background: rgba(242, 194, 48, .055);
}

.research-table tbody tr:last-child td {
    border-bottom: 0;
}

.research-sticky {
    position: sticky;
    left: 0;
    z-index: 1;
    background: #fff;
    box-shadow: 1px 0 rgba(17, 19, 21, .08);
}

.research-table tbody tr:hover .research-sticky {
    background: #fffdf7;
}

.research-entity-link {
    color: #17191b;
    font-weight: 850;
    text-decoration: none;
}

.research-entity-link:hover {
    color: #8a6900;
}

.research-loading,
.research-error,
.research-empty {
    padding: 28px;
    color: #666d70;
    text-align: center;
    line-height: 1.5;
}

.research-error {
    color: #873f34;
    background: #fff8f6;
}

.research-jump-link {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid rgba(242, 194, 48, .34);
    border-radius: 9px;
    color: #f2c230;
    background: rgba(17, 19, 21, .48);
    font-size: .78rem;
    font-weight: 850;
    text-decoration: none;
}

.research-jump-link:hover {
    background: rgba(242, 194, 48, .10);
}

.research-pulse-card span {
    display: block;
    margin-top: 5px;
    color: #81888b;
    font-size: .68rem;
    font-weight: 700;
}

.research-detail-extension {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid rgba(17, 19, 21, .11);
}

.research-detail-heading {
    margin-bottom: 12px;
}

.research-detail-heading h3 {
    margin: 0 0 4px;
    color: #17191b;
    font-size: 1.05rem;
}

.research-detail-heading p {
    margin: 0;
    color: #737a7d;
    font-size: .78rem;
    line-height: 1.5;
}

.research-detail-group {
    max-width: 620px;
}

@media (max-width: 760px) {
    .research-shell {
        width: calc(100% - 28px);
        margin-top: 28px;
        padding: 18px;
    }

    .research-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .research-control-row,
    .research-control-row--scope {
        align-items: stretch;
    }

    .research-control-row label,
    .research-search {
        flex: 1 1 145px;
        min-width: 0;
    }

    .research-scope-buttons {
        flex: 1 1 100%;
    }

    .research-scope-button {
        flex: 1 1 auto;
    }
}

/* Seven compact pulse cards fit cleanly on wide Team pages and wrap naturally
   on smaller viewports after Pass Attempts and Rush Attempts are appended. */
.teams-page .team-pulse-grid {
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
}

/* ========================================================================== 
   Native table parity
   Keep the shared Research Table behavior, but make each table read as part of
   the analytical page that owns it rather than as a separate visual system.
   ========================================================================== */

.research-table td {
    font-variant-numeric: tabular-nums;
}

/* Players ----------------------------------------------------------------- */
.players-page .research-table-wrap {
    border: 1px solid rgba(17, 19, 21, .10);
    border-radius: 15px;
    background: #ffffff;
    box-shadow: 0 16px 38px rgba(17, 19, 21, .075);
}

.players-page .research-table {
    min-width: 960px;
    color: #17191b;
}

.players-page .research-table thead th {
    padding: 15px;
    border-bottom: 2px solid var(--fm-gold, #f2c230);
    background: #17191b;
    color: #c9ced0;
    font-size: .64rem;
    font-weight: 900;
    letter-spacing: .08em;
}

.players-page .research-table thead th:first-child {
    left: 0;
    z-index: 5;
    border-top-left-radius: 13px;
    background: #17191b;
}

.players-page .research-table thead th:last-child {
    border-top-right-radius: 13px;
}

.players-page .research-table thead button:hover {
    color: var(--fm-gold, #f2c230);
}

.players-page .research-table td {
    padding: 16px 15px;
    border-bottom-color: rgba(17, 19, 21, .065);
    background: #ffffff;
    font-size: .82rem;
}

.players-page .research-table tbody tr:nth-child(even) td {
    background: #fbfbf9;
}

.players-page .research-table tbody tr:hover td {
    background: #fff9e7;
}

.players-page .research-table .research-sticky {
    background: #ffffff;
    box-shadow: 7px 0 12px -12px rgba(17, 19, 21, .55);
}

.players-page .research-table tbody tr:nth-child(even) .research-sticky {
    background: #fbfbf9;
}

.players-page .research-table tbody tr:hover .research-sticky {
    background: #fff9e7;
    box-shadow: inset 5px 0 0 var(--fm-gold, #f2c230), 7px 0 12px -12px rgba(17, 19, 21, .55);
}

.players-page .research-entity-link {
    color: #111315;
    font-size: .94rem;
    font-weight: 860;
}

.players-page .research-entity-link:hover {
    color: #8a6800;
}

/* Teams ------------------------------------------------------------------- */
.teams-page .research-table-wrap {
    border: 1px solid var(--team-border, rgba(17, 19, 21, .12));
    border-radius: 11px;
    background: #ffffff;
    box-shadow: none;
}

.teams-page .research-table {
    min-width: 960px;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--team-black, #17191b);
    font-size: .72rem;
}

.teams-page .research-table thead th {
    padding: 11px 12px;
    border-bottom: 2px solid var(--team-yellow, #f2c230);
    background: var(--team-black, #17191b);
    color: #f4f5f3;
    font-size: .59rem;
    font-weight: 900;
    letter-spacing: .055em;
}

.teams-page .research-table thead th:first-child {
    left: 0;
    z-index: 5;
    background: var(--team-black, #17191b);
    box-shadow: 7px 0 12px -12px rgba(17, 19, 21, .55);
}

.teams-page .research-table thead button:hover {
    color: var(--team-yellow, #f2c230);
}

.teams-page .research-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(17, 19, 21, .075);
    background: #ffffff;
    vertical-align: middle;
    font-size: .72rem;
}

.teams-page .research-table tbody tr:nth-child(even) td {
    background: #fffdf7;
}

.teams-page .research-table tbody tr:hover td {
    background: #fff7dd;
}

.teams-page .research-table .research-sticky {
    background: #ffffff;
    box-shadow: 7px 0 12px -12px rgba(17, 19, 21, .55);
}

.teams-page .research-table tbody tr:nth-child(even) .research-sticky {
    background: #fffdf7;
}

.teams-page .research-table tbody tr:hover .research-sticky {
    background: #fff7dd;
}

.teams-page .research-entity-link {
    color: var(--team-black, #17191b);
    font-weight: 850;
}

.teams-page .research-entity-link:hover {
    color: #8a6900;
    text-decoration: underline;
    text-decoration-color: #d6a900;
}

/* Coaching ---------------------------------------------------------------- */
.coaching-page .research-table-wrap {
    border: 1px solid #d8d4c7;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: none;
}

.coaching-page .research-table {
    min-width: 900px;
    color: #111;
    font-size: .85rem;
}

.coaching-page .research-table thead th {
    padding: 12px 13px;
    border-bottom: 0;
    background: #111;
    color: #f3c623;
    font-size: .69rem;
    font-weight: 900;
    letter-spacing: .07em;
}

.coaching-page .research-table thead th:first-child {
    left: 0;
    z-index: 5;
    background: #111;
}

.coaching-page .research-table thead button:hover {
    color: #ffffff;
}

.coaching-page .research-table td {
    padding: 13px;
    border-bottom: 1px solid #ece9df;
    background: #ffffff;
    vertical-align: middle;
    font-size: .85rem;
}

.coaching-page .research-table tbody tr:hover td {
    background: #faf8f1;
}

.coaching-page .research-table .research-sticky {
    background: #ffffff;
    box-shadow: 7px 0 12px -12px rgba(17, 19, 21, .45);
}

.coaching-page .research-table tbody tr:hover .research-sticky {
    background: #faf8f1;
}

.coaching-page .research-entity-link {
    color: #111;
    font-weight: 850;
}

.coaching-page .research-entity-link:hover {
    color: #111;
    text-decoration: underline;
}
