/* ================================================================
   Experimental Standings (M52-M56)
   ================================================================ */

.sexp-container {
    padding: 0 12px 12px;
}

/* -- Sub-navigation -- */
.sexp-nav {
    display: flex;
    gap: 0;
    margin-bottom: 10px;
}
.sexp-nav-btn {
    font-family: 'JetBrains Mono', monospace;
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 5px 12px;
    border: 1px solid var(--theme-border-strong, #CCC);
    background: #FFFFFF;
    color: var(--text-muted, #666);
    cursor: pointer;
    margin-right: -1px;
    transition: background 0.1s, color 0.1s;
}
.sexp-nav-btn:hover { background: #F5F5F5; color: var(--text-main, #333); }
.sexp-nav-btn.active {
    background: #1A1A1A;
    color: #FFF;
    border-color: #1A1A1A;
}

/* -- Controls row -- */
.sexp-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.sexp-control-label {
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
}
.sexp-select {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    font-weight: 700;
    padding: 3px 6px;
    border: 1px solid #CCC;
    background: #FFF;
    color: #1A1A1A;
    cursor: pointer;
}
.sexp-select:focus {
    outline: none;
    border-color: var(--theme-accent-secondary);
}

/* -- Division filter bar -- */
.sexp-div-bar {
    display: flex;
    gap: 0;
}
.sexp-div-btn {
    font-family: 'JetBrains Mono', monospace;
    font-size: 7px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 10px;
    border: 1px solid #CCC;
    background: #FFF;
    color: #999;
    cursor: pointer;
    margin-right: -1px;
}
.sexp-div-btn:hover { background: #F5F5F5; color: #333; }
.sexp-div-btn.active {
    background: #1A1A1A;
    color: #FFF;
    border-color: #1A1A1A;
}

/* -- Panel -- */
.sexp-panel {
    border: 1px solid var(--theme-border-strong, #CCC);
    background: var(--theme-bg-panel, #F5F5F5);
    box-shadow: inset 1px 1px 0px var(--theme-bg-input, #fff),
                inset -1px -1px 0px var(--gray-400, #A3A3A3);
    margin-bottom: 10px;
}
.sexp-panel-header {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 5px 10px;
    border-bottom: 1px solid var(--theme-border-strong, #CCC);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.sexp-panel-badge {
    font-size: 7px;
    font-weight: 700;
    padding: 1px 6px;
    background: #1A1A1A;
    color: #FFF;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.sexp-panel-body {
    padding: 0;
    background: #FFFFFF;
}

/* -- Date Scrubber (M52) -- */
.sexp-scrubber {
    margin-bottom: 10px;
    border: 1px solid #E0E0E0;
    background: #FAFAFA;
    padding: 8px 12px;
}
.sexp-scrubber-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.sexp-scrubber-date {
    font-size: 11px;
    font-weight: 800;
    color: #1A1A1A;
}
.sexp-scrubber-info {
    font-size: 8px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 8px;
}
.sexp-scrubber-nav {
    display: flex;
    gap: 3px;
}
.sexp-scrubber-btn {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 8px;
    border: 1px solid #CCC;
    background: #FFF;
    color: #666;
    cursor: pointer;
}
.sexp-scrubber-btn:hover { background: #F0F0F0; color: #1A1A1A; }
.sexp-scrubber-btn:disabled { opacity: 0.3; cursor: default; }
.sexp-scrubber-track {
    position: relative;
    height: 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
}
.sexp-scrubber-rail {
    width: 100%;
    height: 3px;
    background: #DDD;
    position: relative;
}
.sexp-scrubber-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--theme-accent-secondary);
    transition: width 0.15s;
}
.sexp-scrubber-thumb {
    position: absolute;
    top: -5px;
    width: 12px;
    height: 12px;
    background: var(--theme-accent-secondary);
    border: 2px solid #FFF;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    transform: translateX(-50%);
    pointer-events: none;
    transition: left 0.15s;
}

/* -- Standings Table (shared across views) -- */
.sexp-table {
    width: 100%;
    border-collapse: collapse;
}
.sexp-table th {
    background: #F0F0F0;
    font-size: 7px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 5px;
    text-align: right;
    border-bottom: 1px solid #DDD;
    color: #666;
    white-space: nowrap;
    cursor: pointer;
}
.sexp-table th:first-child,
.sexp-table th:nth-child(2),
.sexp-table th:nth-child(3) {
    text-align: left;
}
.sexp-table td {
    padding: 4px 5px;
    font-size: 9px;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #F0F0F0;
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.sexp-table td:first-child,
.sexp-table td:nth-child(2),
.sexp-table td:nth-child(3) {
    text-align: left;
}
.sexp-table tr:nth-child(even) td { background: #FAFAFA; }
.sexp-table tr:hover td { background: #F5F5F5; cursor: pointer; }
.sexp-table .team-name { font-weight: 800; color: #1A1A1A; }
.sexp-table .pts-cell { font-weight: 800; color: #1A1A1A; }
.sexp-table tr.playoff-line td { border-bottom: 2px dashed #CCC; }

/* Diff colors */
.sexp-diff-pos { color: #16a34a; }
.sexp-diff-neg { color: #dc2626; }
.sexp-move-up { color: #16a34a; font-size: 8px; font-weight: 800; }
.sexp-move-down { color: #dc2626; font-size: 8px; font-weight: 800; }
.sexp-move-same { color: #CCC; font-size: 8px; }

/* Streak badges */
.sexp-streak {
    display: inline-block;
    font-size: 8px;
    font-weight: 700;
    padding: 1px 4px;
    border: 1px solid;
}
.sexp-streak-W { background: #EBF9EE; color: #16a34a; border-color: #B3E6BD; }
.sexp-streak-L { background: #FEF2F2; color: #dc2626; border-color: #FCA5A5; }
.sexp-streak-O { background: #F5F5F5; color: #666; border-color: #DDD; }

/* -- Bump Chart (M58) -- */
.sexp-race-container {
    padding: 12px;
    position: relative;
}

.bump-layout {
    display: flex;
    align-items: stretch;
}
.bump-y-axis {
    width: 32px;
    flex-shrink: 0;
    position: relative;
}
.bump-y-lbl {
    position: absolute;
    right: 4px;
    font-size: 8px;
    font-weight: 700;
    color: #CCC;
    transform: translateY(-50%);
    white-space: nowrap;
}
.bump-svg-area {
    flex: 1;
    min-height: 280px;
}
.bump-svg {
    width: 100%;
    height: 100%;
    display: block;
}
.bump-right-axis {
    width: 40px;
    flex-shrink: 0;
    position: relative;
}
.bump-right-lbl {
    position: absolute;
    left: 6px;
    font-size: 9px;
    font-weight: 800;
    transform: translateY(-50%);
    white-space: nowrap;
    transition: opacity 0.2s;
}

/* White glow halo behind each colored line */
.bump-glow {
    stroke: #FFFFFF;
    stroke-width: 6;
    stroke-linecap: round;
    fill: none;
    opacity: 0.7;
}
.bump-line {
    stroke-width: 1.5;
    stroke-linecap: round;
    fill: none;
    transition: stroke-width 0.12s;
}

/* 75% base opacity — tangles slightly muted until hovered */
.bump-svg .bump-team {
    opacity: 0.75;
    transition: opacity 0.15s;
}
.bump-svg:hover .bump-team {
    opacity: 0.1;
}
.bump-svg:hover .bump-team:hover {
    opacity: 1;
}
.bump-svg:hover .bump-team:hover .bump-line {
    stroke-width: 2.5;
}

/* Legend below chart */
.sexp-race-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 0 0;
    margin-left: 32px;
}
.sexp-race-legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 8px;
    font-weight: 700;
    color: #666;
}
.sexp-race-legend-dot {
    width: 8px;
    height: 3px;
    display: inline-block;
}

/* -- Team History (M54) -- */
.sexp-hero {
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #F0F0F0;
}
.sexp-hero-logo {
    width: 40px;
    height: 40px;
    background: #F0F0F0;
    border: 1px solid #DDD;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 900;
    color: #333;
}
.sexp-hero-name {
    font-size: 14px;
    font-weight: 900;
    color: #1A1A1A;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.sexp-hero-sub {
    font-size: 8px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.sexp-summary-row {
    display: flex;
    border-bottom: 1px solid #F0F0F0;
}
.sexp-summary-stat {
    flex: 1;
    padding: 8px 10px;
    border-right: 1px solid #F0F0F0;
    text-align: center;
}
.sexp-summary-stat:last-child { border-right: none; }
.sexp-summary-label {
    font-size: 7px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
    margin-bottom: 2px;
}
.sexp-summary-value {
    font-size: 14px;
    font-weight: 900;
    color: #1A1A1A;
}
.sexp-summary-value.accent { color: var(--theme-accent-secondary); }
.sexp-summary-sub {
    font-size: 7px;
    font-weight: 600;
    color: #BBB;
    margin-top: 1px;
}

/* Points bar in history table */
.sexp-pts-bar {
    display: flex;
    align-items: center;
    gap: 6px;
}
.sexp-pts-bar-track {
    flex: 1;
    height: 8px;
    background: #F0F0F0;
    position: relative;
    min-width: 60px;
}
.sexp-pts-bar-fill {
    height: 100%;
    background: #1A1A1A;
}
.sexp-pts-bar-fill.highlight { background: var(--theme-accent-secondary); }
.sexp-pts-bar-value {
    font-size: 9px;
    font-weight: 800;
    color: #1A1A1A;
    min-width: 22px;
    text-align: right;
}

/* Rank badge */
.sexp-rank {
    display: inline-block;
    font-size: 8px;
    font-weight: 800;
    padding: 1px 4px;
    border: 1px solid;
    min-width: 14px;
    text-align: center;
}
.sexp-rank-top { background: #EBF9EE; color: #16a34a; border-color: #B3E6BD; }
.sexp-rank-mid { background: #F5F5F5; color: #666; border-color: #DDD; }
.sexp-rank-low { background: #FEF2F2; color: #dc2626; border-color: #FCA5A5; }

/* -- Snapshot Date Picker (M55) -- */
.sexp-date-picker {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding: 8px 12px;
    border: 1px solid #E0E0E0;
    background: #FAFAFA;
    flex-wrap: wrap;
}
.sexp-date-input {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 800;
    color: #1A1A1A;
    padding: 3px 8px;
    border: 1px solid #CCC;
    background: #FFF;
    width: 120px;
}
.sexp-date-input:focus {
    outline: none;
    border-color: var(--theme-accent-secondary);
}
.sexp-date-context {
    font-size: 8px;
    font-weight: 600;
    color: #999;
}
.sexp-quick-links {
    margin-left: auto;
    display: flex;
    gap: 3px;
}
.sexp-quick-link {
    font-family: 'JetBrains Mono', monospace;
    font-size: 7px;
    font-weight: 700;
    padding: 2px 5px;
    border: 1px solid #DDD;
    background: #FFF;
    color: #999;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.sexp-quick-link:hover {
    color: var(--theme-accent-secondary);
    border-color: var(--theme-accent-secondary);
}

/* Conference/Division headers for snapshot */
.sexp-conf-header {
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #1A1A1A;
    padding: 5px 0;
    border-bottom: 2px solid #1A1A1A;
    margin: 12px 0 6px;
}
.sexp-conf-header:first-child { margin-top: 0; }
.sexp-div-panel {
    border: 1px solid #E0E0E0;
    margin-bottom: 6px;
}
.sexp-div-header {
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 8px;
    background: #F0F0F0;
    border-bottom: 1px solid #E0E0E0;
    color: #666;
}

/* -- Compare Grid (M56) -- */
.sexp-compare-selectors {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid #F0F0F0;
}
.sexp-compare-side {
    flex: 1;
    padding: 10px 14px;
}
.sexp-compare-side:first-child {
    border-right: 1px solid #F0F0F0;
}
.sexp-compare-side-label {
    font-size: 7px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
}
.sexp-compare-team {
    font-size: 14px;
    font-weight: 900;
    color: #1A1A1A;
    text-transform: uppercase;
}
.sexp-compare-season-label {
    font-size: 9px;
    font-weight: 700;
    color: #666;
}
.sexp-compare-vs {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    font-size: 10px;
    font-weight: 900;
    color: #CCC;
    flex-shrink: 0;
}
.sexp-compare-table {
    width: 100%;
    border-collapse: collapse;
}
.sexp-compare-table th {
    background: #F0F0F0;
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 8px;
    border-bottom: 1px solid #DDD;
    color: #666;
}
.sexp-compare-table td {
    padding: 5px 8px;
    font-size: 9px;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #F0F0F0;
    font-variant-numeric: tabular-nums;
}
.sexp-compare-table tr:nth-child(even) td { background: #FAFAFA; }
.sexp-compare-table .stat-label {
    text-align: left;
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
    width: 120px;
}
.sexp-compare-table .val-a { text-align: right; font-weight: 800; color: #1A1A1A; width: 100px; }
.sexp-compare-table .val-diff { text-align: center; width: 80px; }
.sexp-compare-table .val-b { text-align: left; font-weight: 800; color: #1A1A1A; width: 100px; }
.sexp-compare-table .winner { color: #1A1A1A; }
.sexp-compare-table .loser { color: #BBB; }
.sexp-compare-table tr.section-row td {
    background: #F8F8F8;
    font-size: 7px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #BBB;
    padding: 3px 8px;
    border-bottom: 1px solid #E0E0E0;
}
.sexp-diff-pill {
    display: inline-block;
    font-size: 8px;
    font-weight: 800;
    padding: 1px 5px;
    border: 1px solid;
    min-width: 28px;
    text-align: center;
}
.sexp-diff-pill.pos { background: #EBF9EE; color: #16a34a; border-color: #B3E6BD; }
.sexp-diff-pill.neg { background: #FEF2F2; color: #dc2626; border-color: #FCA5A5; }
.sexp-diff-pill.neutral { background: #F5F5F5; color: #666; border-color: #DDD; }

/* -- Mode toggle (compare) -- */
.sexp-mode-toggle {
    display: flex;
    gap: 0;
    margin-left: auto;
}
.sexp-mode-btn {
    font-family: 'JetBrains Mono', monospace;
    font-size: 7px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border: 1px solid #CCC;
    background: #FFF;
    color: #666;
    cursor: pointer;
    margin-right: -1px;
}
.sexp-mode-btn:hover { background: #F5F5F5; }
.sexp-mode-btn.active {
    background: var(--theme-accent-secondary);
    color: #FFF;
    border-color: var(--theme-accent-secondary);
}

/* -- Loading overlay -- */
/* -- Loading -- */
.sexp-loading {
    text-align: center;
    padding: 40px;
    font-size: 9px;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ================================================================
   M59: Swim Lane Grid
   ================================================================ */
.swim-table { width: 100%; border-collapse: collapse; }
.swim-table th {
    background: #F0F0F0;
    font-size: 7px; font-weight: 800; text-transform: uppercase;
    letter-spacing: 0.5px; padding: 4px 3px; text-align: center;
    border-bottom: 1px solid #DDD; color: #999; white-space: nowrap;
}
.swim-table td {
    padding: 0; text-align: center; border-bottom: 1px solid #F0F0F0;
    height: 26px; position: relative;
}
.swim-table tr:nth-child(even) td { background: #FAFAFA; }
.swim-chip {
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 7px; font-weight: 800; color: #FFF;
    padding: 2px 4px; min-width: 24px; letter-spacing: 0.3px;
}

/* ================================================================
   M60: Small Multiples
   ================================================================ */
.sm-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 12px;
}
.sm-card {
    border: 1px solid #E0E0E0;
    padding: 8px;
}
.sm-card:hover { border-color: var(--theme-accent-secondary); }

/* ================================================================
   M65: Bar Chart Race
   ================================================================ */
.bcr-row {
    display: flex;
    align-items: center;
    margin-bottom: 3px;
    height: 26px;
}
.bcr-label {
    width: 36px;
    font-size: 9px;
    font-weight: 800;
    text-align: right;
    padding-right: 8px;
    flex-shrink: 0;
}
.bcr-bar-wrap {
    flex: 1;
    position: relative;
    height: 20px;
}
.bcr-bar {
    height: 100%;
    display: flex;
    align-items: center;
    padding-right: 6px;
    justify-content: flex-end;
    font-size: 9px;
    font-weight: 800;
    color: #FFF;
}
.bcr-pts {
    margin-left: 6px;
    font-size: 10px;
    font-weight: 900;
    color: #1A1A1A;
    position: absolute;
    right: -36px;
    top: 50%;
    transform: translateY(-50%);
}
.bcr-record {
    font-size: 7px;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    margin-right: 4px;
}

/* ================================================================
   M67: Sankey Ribbons
   ================================================================ */
.sankey-ribbon { transition: opacity 0.15s; }
