/* Race History — "road to the title", athlete links, and the tier ladder.
   (The mixed-distance view is gone: multi-distance venues always lock onto
   one distance via the pills, so its note/panel/badge classes went with it.) */

/* "Where this race sits" — the tier ladder */
.rh-ladder-section { overflow: hidden; }
.rh-ladder { width: 100%; overflow-x: auto; }
.rh-ladder svg { display: block; }
.rh-ladder-legend {
    display: flex; flex-wrap: wrap; gap: var(--space-6);
    margin-top: var(--space-4); font-size: 11px; color: var(--text-muted);
}
.rh-ladder-legend .rh-leg { display: inline-flex; align-items: center; gap: 5px; }
.rh-leg-diamond {
    width: 9px; height: 9px; display: inline-block;
    transform: rotate(45deg); border: 1px solid var(--chart-halo);
    box-shadow: 0 0 0 1px rgba(0,0,0,.06);
}
.rh-leg-ring {
    width: 12px; height: 12px; display: inline-block; border-radius: 50%;
    border: 2px dashed var(--major-accent);
}

/* NCAA records as a division matrix */
.rh-records--table { display: block; }
.rh-rec-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rh-rec-table th, .rh-rec-table td {
    padding: var(--space-4) var(--space-5); text-align: left; border-bottom: 1px solid var(--line);
    vertical-align: top;
}
.rh-rec-table thead th { font-size: 12px; font-weight: 700; }
.rh-rect-label { font-weight: 600; white-space: nowrap; }
.rh-rect-time { font-variant-numeric: tabular-nums; font-weight: 700; }
.rh-rect-who { font-size: 11px; color: var(--text-muted); margin-top: var(--space-1); }
.rh-rect-empty { color: var(--border-strong); }

/* Heat switcher in the loaded race view (a championship runs in heats) */
.heat-strip {
    display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap;
    margin: 0 0 var(--space-5); padding: var(--space-4) var(--space-5);
    background: var(--surface-sunken); border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.heat-strip-label {
    font-size: 11px; font-weight: 700; letter-spacing: .04em;
    text-transform: uppercase; color: var(--text-muted);
}
.heat-pill {
    border: 1px solid var(--line); background: var(--surface); color: var(--text-2);
    border-radius: var(--radius-pill); padding: 5px var(--space-6); font-size: 13px; font-weight: 600;
    cursor: pointer; display: inline-flex; align-items: center; gap: var(--space-3);
}
.heat-pill:hover { border-color: var(--border-strong); }
.heat-pill.active { background: var(--text); border-color: var(--text); color: var(--bg-app); }
.heat-pill-n {
    font-size: 11px; font-weight: 700; opacity: .7;
    background: rgba(0,0,0,.06); border-radius: var(--radius-pill); padding: 0 var(--space-3);
}
.heat-pill.active .heat-pill-n { background: rgba(255,255,255,.22); opacity: .9; }

/* Division rotation control above the grids */
.rh-heatdiv { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-4); }

/* Achievement / team grids — ranked rows, cells = finishing place.
   Capped height + scroll: the leaders sit in view, the long tail is a scroll
   away for the curious. Header row stays pinned while you scroll. */
.rh-grid-block { margin-bottom: var(--space-8); }
.rh-grid-head { font-size: 12px; font-weight: 700; margin-bottom: var(--space-2); }
.rh-grid-block .rh-grid-host,
.rh-grid-host--capped {
    max-height: 300px; overflow: auto;
    border: 1px solid var(--line); border-radius: 8px;
}
.rh-grid-block thead th,
.rh-grid-host--capped thead th {
    position: sticky; top: 0; z-index: 1;
    background: var(--surface); box-shadow: 0 1px 0 var(--line);
}
.rh-grid--ach { font-variant-numeric: tabular-nums; }
.rh-grid-rank { width: 30px; text-align: center; padding-right: 0; }
.rh-ach-pod { font-size: 10px; font-weight: 700; color: var(--accent-ink); white-space: nowrap; }
.rh-cell-ach {
    text-align: center; font-size: 11px; font-weight: 600; cursor: pointer;
    min-width: 26px;
}
.rh-cell-win { font-weight: 800; box-shadow: inset 0 0 0 2px var(--major-accent); }
.rh-major-card {
    flex: 1 1 180px; min-width: 160px;
    border-radius: var(--radius-lg); padding: var(--space-5) var(--space-6);
    cursor: pointer; transition: transform .12s ease;
    border: 1px solid transparent;
}
.rh-major-card:hover { transform: translateY(-2px); }
/* Border wears the same ink token as the badge inside the card. */
.rh-major-card.rh-major-olympic { background: var(--surface-sunken); border-color: var(--badge-amber-ink); }
.rh-major-card.rh-major-gf      { background: var(--surface-sunken); border-color: var(--badge-violet-ink); }
.rh-major-card.rh-major-worlds  { background: var(--surface-sunken); border-color: var(--badge-blue-ink); }
.rh-major-card.rh-major-olyqual { background: var(--surface-sunken); border-color: var(--badge-cyan-ink); }
.rh-major-head { display: flex; align-items: center; gap: var(--space-3); font-weight: 700; font-size: 13px; }
.rh-major-icon { font-size: 16px; }
.rh-major-title { flex: 1; }
.rh-major-year { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.rh-major-winner { margin-top: var(--space-3); font-size: 12px; color: var(--text-2); }

.rh-major-badge {
    display: inline-flex; align-items: center; gap: 3px;
    font-size: 10px; font-weight: 700; border-radius: var(--radius-pill);
    padding: 1px 7px; margin-left: var(--space-3); vertical-align: middle;
}
.rh-major-badge.rh-major-olympic { background: var(--badge-amber-bg);  color: var(--badge-amber-ink); }
.rh-major-badge.rh-major-gf      { background: var(--badge-violet-bg); color: var(--badge-violet-ink); }
.rh-major-badge.rh-major-worlds  { background: var(--badge-blue-bg);   color: var(--badge-blue-ink); }
.rh-major-badge.rh-major-olyqual { background: var(--badge-cyan-bg);   color: var(--badge-cyan-ink); }

/* Distance filter pills pick up their accent color when active */
.rh-divpill.active[style*="--pill-color"] {
    background: var(--pill-color);
    border-color: var(--pill-color);
    color: #fff;
}

/* Athlete name → profile links, used throughout race history */
.rh-athlete-link {
    background: none; border: none; padding: 0; margin: 0;
    font: inherit; color: var(--accent-ink); cursor: pointer;
    text-decoration: none; font-weight: 600;
}
.rh-athlete-link:hover { text-decoration: underline; }

/* T100 — link to an athlete's full profile from the season drill-down.
   Geometry/hover come from the shared .chip; only the ink is accent. */
.t100-profile-link { color: var(--accent-ink); font-weight: 600; }