/* Extracted from pages/leaderboard.html */
/* ── Header ──────────────────────────────────────────── */
.lb-header {
    padding: 3rem 1.5rem 1.5rem;
    border-bottom: 2px solid var(--border);
    text-align: center;
}
.lb-header .eyebrow {
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.15em;
    text-transform: uppercase; color: var(--text-faint); margin-bottom: 1rem;
}
.lb-header h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    letter-spacing: -0.03em; margin-bottom: 1rem;
}
.lb-header p {
    font-size: 0.9rem; color: var(--text-dim);
    max-width: 600px; margin: 0 auto; line-height: 1.6;
}
.lb-header a { color: var(--text); text-decoration: underline; }

/* ── Stats bar ───────────────────────────────────────── */
#stats-bar {
    display: grid; grid-template-columns: repeat(5, 1fr);
    border-bottom: 2px solid var(--border); text-align: center;
}
.stat-cell {
    padding: 1.25rem 0.5rem; border-right: 2px solid var(--border);
}
.stat-cell:last-child { border-right: none; }
.stat-num {
    font-family: var(--font-display); font-weight: 900;
    font-size: clamp(1.5rem, 3vw, 2.2rem); letter-spacing: -0.03em;
    display: block; line-height: 1;
}
.stat-num.critical { color: #ff4444; }
.stat-num.high { color: #ff8833; }
.stat-num.moderate { color: #ccaa00; }
.stat-num.low { color: #3ddc84; }
.stat-lbl {
    font-size: 0.65rem; color: var(--text-faint);
    text-transform: uppercase; letter-spacing: 0.1em;
    display: block; margin-top: 0.35rem;
}

/* ── Controls ────────────────────────────────────────── */
.lb-controls {
    display: flex; flex-wrap: wrap; gap: 0;
    border-bottom: 2px solid var(--border);
}
.lb-controls input, .lb-controls select {
    background: transparent; border: none;
    border-right: 2px solid var(--border);
    color: var(--text); padding: 0.65rem 0.9rem;
    font-family: var(--font-mono); font-size: 0.82rem;
    outline: none;
}
.lb-controls input { flex: 1; min-width: 180px; }
.lb-controls select { min-width: 140px; cursor: pointer; }
.lb-controls select:last-child { border-right: none; }
.lb-controls input::placeholder { color: var(--text-faint); }
.lb-controls input:focus, .lb-controls select:focus {
    background: var(--surface);
}

/* ── Table ───────────────────────────────────────────── */
.lb-table { width: 100%; border-collapse: collapse; font-size: 0.83rem; }
.lb-table th {
    background: var(--surface); border-bottom: 2px solid var(--border);
    padding: 0.55rem 0.6rem; text-align: left;
    font-family: var(--font-mono); font-size: 0.68rem;
    text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--text-faint); cursor: pointer; user-select: none;
    white-space: nowrap;
}
.lb-table th:hover { color: var(--text); }
.lb-table td {
    padding: 0.55rem 0.6rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.lb-table tr:hover td { background: var(--surface); }

.score-cell {
    font-family: var(--font-mono); font-weight: 700; text-align: center;
}
.dim-cell { font-family: var(--font-mono); text-align: center; font-size: 0.8rem; }

.vs-critical { color: #ff4444; }
.vs-high { color: #ff8833; }
.vs-moderate { color: #ccaa00; }
.vs-low { color: #3ddc84; }

.cat-tag {
    font-size: 0.68rem; font-family: var(--font-mono);
    padding: 0.1rem 0.4rem; border: 1px solid var(--border);
    white-space: nowrap;
}

/* Gradient pips */
.g-bar { display: inline-flex; gap: 2px; }
.g-pip { width: 7px; height: 7px; background: var(--border); }
.g-pip.d1 { background: #ccaa00; }
.g-pip.d2 { background: #ff8833; }
.g-pip.d3 { background: #ff4444; }

/* Confidence */
.conf-documented { color: #3ddc84; }
.conf-assessed { color: #ccaa00; }
.conf-estimated { color: var(--text-faint); }

/* ── Expand row ──────────────────────────────────────── */
.expand-row { display: none; }
.expand-row.visible { display: table-row; }
.expand-row td {
    padding: 1.25rem; background: var(--surface);
    border-bottom: 2px solid var(--border);
}
.detail-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 1.25rem; font-size: 0.85rem;
}
.detail-grid dt {
    font-family: var(--font-mono); font-size: 0.68rem;
    text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--text-faint); margin-bottom: 0.25rem;
}
.detail-grid dd { margin: 0 0 0.75rem; color: var(--text-dim); line-height: 1.5; }
.detail-actions {
    margin-top: 1rem; padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    font-size: 0.78rem; color: var(--text-faint);
}
.detail-actions a { color: var(--text); }

/* ── Method note ─────────────────────────────────────── */
.method-note {
    padding: 1.5rem; border-top: 2px solid var(--border);
    font-size: 0.85rem; color: var(--text-dim); line-height: 1.7;
}
.method-note strong { color: var(--text); }
.method-note a { color: var(--text); }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 900px) {
    #stats-bar { grid-template-columns: repeat(3, 1fr); }
    .stat-cell:nth-child(3) { border-right: none; }
    .stat-cell:nth-child(n+4) { border-top: 2px solid var(--border); }
    .stat-cell:nth-child(5) { border-right: none; }
}
@media (max-width: 768px) {
    .lb-table { font-size: 0.75rem; }
    .lb-table th, .lb-table td { padding: 0.4rem 0.3rem; }
    .detail-grid { grid-template-columns: 1fr; }
    .hide-mobile { display: none; }
    .lb-controls { flex-direction: column; }
    .lb-controls input, .lb-controls select {
        border-right: none; border-bottom: 1px solid var(--border);
        width: 100%;
    }
    #stats-bar { grid-template-columns: 1fr 1fr; }
    .stat-cell:nth-child(2n) { border-right: none; }
    .stat-cell:nth-child(3) { border-right: 2px solid var(--border); }
    .stat-cell:nth-child(n+3) { border-top: 2px solid var(--border); }
}
