/* TG 2621 Hitparade (plain CSS, prefixed hp-) */
.hp {
    --hp-bar: #dc2626;
    --hp-line: #e5e7eb;
    --hp-muted: #6b7280;
    font-size: 1rem;
    color: #111827;
}

.hp-loading,
.hp-empty {
    color: var(--hp-muted);
    padding: 1rem 0;
}

.hp-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.hp-tabs {
    display: inline-flex;
    border: 1px solid #d1d5db;
    border-radius: 9999px;
    padding: 2px;
    background: #fff;
}

.hp-tab {
    border: 0;
    background: transparent;
    border-radius: 9999px;
    padding: 0.3125rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
}

.hp-tab:hover {
    background: #f3f4f6;
}

.hp-tab.is-active {
    background: #111827;
    color: #fff;
}

.hp-info {
    margin: 0;
    font-size: 0.875rem;
    color: var(--hp-muted);
}

.hp-info strong {
    color: #111827;
}

.hp-cols,
.hp-row {
    display: grid;
    grid-template-columns: 2.5rem 3rem minmax(10rem, 16rem) 1fr 5rem 4.5rem 3.5rem 5.5rem;
    align-items: center;
    gap: 0.75rem;
}

.hp-cols {
    padding: 0 0.75rem 0.25rem;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--hp-muted);
}

.hp-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hp-row {
    border: 1px solid var(--hp-line);
    border-radius: 0.5rem;
    background: #fff;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.375rem;
    transition: background 0.2s, border-color 0.2s;
}

.hp-row--top {
    border-color: #d1d5db;
}

.hp-row--live {
    background: #fee2e2;
    border-color: #ef4444;
}

.hp-rank {
    font-size: 1.125rem;
    font-weight: 800;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.hp-trend {
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.hp-trend--up { color: #15803d; }
.hp-trend--down { color: #b91c1c; }
.hp-trend--same { color: var(--hp-muted); }

.hp-trend--new {
    color: #1d4ed8;
    text-transform: uppercase;
    font-size: 0.6875rem;
}

.hp-who {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hp-call {
    font-weight: 800;
    letter-spacing: 0.02em;
}

a.hp-call:hover {
    text-decoration: underline;
}

.hp-name {
    color: #374151;
}

.hp-live {
    margin-left: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: #b91c1c;
}

.hp-bar {
    display: block;
    height: 10px;
    background: #f3f4f6;
    border-radius: 4px;
}

.hp-bar__fill {
    display: block;
    height: 100%;
    background: var(--hp-bar);
    border-radius: 0 4px 4px 0;
}

.hp-points {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.hp-points small {
    color: var(--hp-muted);
}

.hp-stat {
    text-align: right;
    font-size: 0.875rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.hp-stat--muted {
    color: var(--hp-muted);
    font-size: 0.8125rem;
}

.hp-explain {
    margin-top: 1rem;
    font-size: 0.8125rem;
    color: var(--hp-muted);
}

@media (max-width: 900px) {
    .hp-cols {
        display: none;
    }

    .hp-row {
        grid-template-columns: 2rem 2.5rem 1fr auto;
        grid-template-areas:
            "rank trend who points"
            "bar bar bar bar"
            "stats stats stats stats";
        row-gap: 0.375rem;
    }

    .hp-rank { grid-area: rank; }
    .hp-trend { grid-area: trend; }
    .hp-who { grid-area: who; }
    .hp-points { grid-area: points; }
    .hp-bar { grid-area: bar; }

    .hp-stat {
        grid-row: 3;
        text-align: left;
    }

    .hp-stat--time { grid-column: 1 / span 2; }
    .hp-stat--talks { grid-column: 3; }
    .hp-stat--ago { grid-column: 4; text-align: right; }
}
