.method { font-size: 0.9rem; color: #555; margin-bottom: 15px; }
.muted { color: #7f8c8d; font-size: 0.85em; }
.table-wrap { overflow-x: auto; }
.section-title { color: var(--primary); margin-top: 35px; font-size: 1.2rem; }

.division-block:first-of-type .section-title { margin-top: 20px; }

/* ==================== TABS ==================== */

.league-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    border-bottom: 2px solid var(--border);
    margin-bottom: 20px;
}

.league-tab {
    background: none;
    border: none;
    padding: 8px 14px;
    font-size: 1.35rem;
    font-weight: 700;
    color: #95a5a6;
    cursor: pointer;
    border-bottom: 4px solid transparent;
    margin-bottom: -2px;
}
.league-tab:hover { color: var(--primary); }
.league-tab.active {
    color: var(--primary);
    border-bottom-color: var(--accent);
}

.league-panel { display: none; }
.league-panel.active { display: block; }

/* ==================== LIVE TABLE ==================== */

.live-status { font-size: 0.9rem; font-weight: 600; margin: 0 0 4px; color: var(--primary); }
.live-status.muted { font-weight: normal; }
.live-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #e74c3c;
    margin-right: 4px;
    animation: livePulse 1.6s ease-in-out infinite;
}
@keyframes livePulse { 50% { opacity: 0.25; } }

.move { font-size: 0.8em; font-weight: bold; margin-left: 5px; }
.move-up { color: #27ae60; }
.move-down { color: #e74c3c; }

.week-cell { white-space: nowrap; font-size: 0.9rem; }
.wl {
    display: inline-block;
    min-width: 1.5em;
    text-align: center;
    font-size: 0.75rem;
    font-weight: bold;
    color: #fff;
    border-radius: 3px;
    padding: 1px 4px;
    margin-right: 4px;
}
.wl-win { background: #27ae60; }
.wl-loss { background: #e74c3c; }

/* ==================== SWITCHES ==================== */

.switches {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 0 14px;
}
.seg {
    display: inline-flex;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}
.seg-btn {
    border: none;
    background: #fff;
    padding: 7px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #7f8c8d;
    cursor: pointer;
}
.seg-btn + .seg-btn { border-left: 1px solid var(--border); }
.seg-btn:hover { color: var(--primary); background: #f4f7f6; }
.seg-btn.active { background: var(--primary); color: #fff; }

/* ==================== ROW COLORS (replace the old text tags) ==================== */

.row-leader { background: #fff6d1; }
.row-leader td:first-child { box-shadow: inset 4px 0 0 #f1c40f; }
.row-wildcard { background: #e4f6e9; }
.row-wildcard td:first-child { box-shadow: inset 4px 0 0 #2ecc71; }

.legend { font-size: 0.85rem; color: #555; margin: 6px 0 0; }
.swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    vertical-align: -2px;
    margin: 0 6px 0 14px;
}
.legend .swatch:first-child { margin-left: 0; }
.swatch-leader { background: #f1c40f; }
.swatch-wc { background: #2ecc71; }

/* ==================== POSITION HISTORY GRAPH ==================== */

.history-scroll { overflow-x: auto; margin: 6px 0; }
.hist-chart { display: block; width: 100%; min-width: 640px; height: auto; }

.hist-grid { stroke: #e6eaee; stroke-width: 1; }
.hist-axis { font-size: 12px; fill: #7f8c8d; }
.hist-label { font-size: 12px; font-weight: 600; }

.hist-team { transition: opacity 0.15s; }
.hist-line { fill: none; stroke-width: 2.75; stroke-linejoin: round; stroke-linecap: round; }
.hist-hit { fill: none; stroke: transparent; stroke-width: 14; pointer-events: stroke; }
.hist-team:hover .hist-line { stroke-width: 4.5; }
.hist-chart:has(.hist-team:hover) .hist-team:not(:hover) { opacity: 0.18; }


/* ==================== DIVISION SHOWDOWN SCOREBOARD ==================== */

.xd-board {
    background: linear-gradient(180deg, #1c2733 0%, #0d141b 100%);
    border: 3px solid #3b4b5a;
    border-radius: 12px;
    padding: 12px 16px 10px;
    margin: 0 0 24px;
    color: #dfe7ee;
}
.xd-title { font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.85rem; color: #aebccb; text-align: center; }
.xd-title span { font-weight: 500; letter-spacing: 0; text-transform: none; color: #7d8b99; margin-left: 8px; }
.xd-row { display: flex; align-items: stretch; justify-content: center; gap: 14px; margin-top: 8px; }
.xd-side { position: relative; flex: 1 1 0; max-width: 340px; text-align: center; padding: 8px 10px 10px; border-radius: 8px; cursor: default; outline: none; }
.xd-side-0 { box-shadow: inset 0 -4px 0 #3498db; }
.xd-side-1 { box-shadow: inset 0 -4px 0 #e74c3c; }
.xd-side:hover, .xd-side:focus { background: rgba(255,255,255,0.06); }
.xd-name { font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.95rem; }
.xd-side-0 .xd-name { color: #6cb4ee; }
.xd-side-1 .xd-name { color: #ee8b80; }
.xd-score {
    display: inline-block; min-width: 2.2em; margin-top: 6px; padding: 2px 14px;
    font: 700 2.6rem/1.2 'Courier New', monospace; color: #ffb400;
    background: #07090c; border: 1px solid #2a3440; border-radius: 6px;
}
.xd-vs { align-self: center; font-weight: 800; color: #7d8b99; }
.xd-hint { text-align: center; font-size: 0.78rem; color: #7d8b99; margin-top: 8px; }

/* the game list: sits flush under its score so the pointer can move onto it without closing it */
.xd-pop {
    display: none; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
    width: min(440px, 88vw); z-index: 20; padding-top: 6px; text-align: left;
}
.xd-side:hover .xd-pop, .xd-side:focus .xd-pop, .xd-side:focus-within .xd-pop { display: block; }
.xd-pop > * { background: #fff; color: #2c3e50; }
.xd-pop-title { padding: 10px 14px 4px; font-weight: 700; font-size: 0.85rem; border-radius: 8px 8px 0 0; border: 1px solid #cfd8dc; border-bottom: none; }
.xd-pop ul { margin: 0; padding: 4px 14px 10px; list-style: none; max-height: 260px; overflow-y: auto; font-size: 0.85rem;
    border: 1px solid #cfd8dc; border-top: none; border-radius: 0 0 8px 8px; box-shadow: 0 8px 20px rgba(0,0,0,0.25); }
.xd-pop li { padding: 4px 0; border-top: 1px solid #eef2f4; }
.xd-pop li:first-child { border-top: none; }
.xd-wk { display: inline-block; min-width: 3.2em; color: #7f8c8d; font-weight: 600; }
.xd-def { color: #7f8c8d; }
