/**
 * Portfolio Matrix Styles
 */

.pmx-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Filters */
.pmx-filters { margin-bottom: 20px; }

.course-filter {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid #e2e4e7;
    background: #fff;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.filter-btn:hover { border-color: #2271b1; color: #2271b1; }
.filter-btn.active { background: #2271b1; color: #fff; border-color: #2271b1; }

/* Stats */
.pmx-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.stat {
    padding: 15px;
    background: #f6f7f7;
    border-radius: 8px;
    text-align: center;
    border-bottom: 4px solid #c3c4c7;
}

.stat.strong { border-color: #00a32a; background: #edfaef; }
.stat.partial { border-color: #f39c12; background: #fff8e5; }
.stat.weak { border-color: #d63638; background: #fcf0f1; }
.stat.percent { border-color: #2271b1; background: #f0f6fc; }
.stat.percent.good { border-color: #00a32a; background: #edfaef; }
.stat.percent.poor { border-color: #d63638; background: #fcf0f1; }

.num { display: block; font-size: 28px; font-weight: bold; color: #1d2327; }
.lbl { font-size: 11px; color: #646970; text-transform: uppercase; }

/* Gaps */
.pmx-gaps {
    background: #fcf0f1;
    border-left: 4px solid #d63638;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 0 6px 6px 0;
}

.pmx-gaps h4 { margin: 0 0 10px 0; color: #d63638; }
.pmx-gaps ul { margin: 0; padding-left: 20px; }
.pmx-gaps li { margin-bottom: 6px; }
.add { margin-left: 10px; font-size: 12px; color: #2271b1; text-decoration: none; }
.add:hover { text-decoration: underline; }

/* Evidence List */
.pmx-evidence-list { margin-bottom: 25px; }

.pmx-evidence-list h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #1d2327;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e4e7;
}

.evidence-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.evidence-card {
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #c3c4c7;
    background: #f6f7f7;
}

.evidence-card.strong { border-color: #00a32a; background: #edfaef; }
.evidence-card.partial { border-color: #f39c12; background: #fff8e5; }
.evidence-card.weak { border-color: #d63638; background: #fcf0f1; }

.evidence-hdr {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.badge { font-size: 18px; }

.evidence-hdr h4 {
    margin: 0;
    font-size: 14px;
    flex: 1;
}

.evidence-hdr h4 a { color: #1d2327; text-decoration: none; }
.evidence-hdr h4 a:hover { color: #2271b1; }

.framework {
    display: inline-block;
    font-size: 11px;
    background: #e7f3ff;
    color: #0066cc;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.meta { margin-bottom: 8px; }

.just {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
}

.just.yes { background: #d4edda; color: #155724; }
.just.no { background: #f8d7da; color: #721c24; }

.serves { display: flex; gap: 5px; flex-wrap: wrap; }

.pill {
    font-family: monospace;
    font-size: 11px;
    background: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid #c3c4c7;
}

.tip {
    margin-top: 10px;
    padding: 8px;
    background: #fff;
    border-radius: 4px;
    font-size: 12px;
    color: #856404;
}

/* Matrix Table */
.pmx-table-wrap {
    overflow-x: auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.pmx-matrix {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.pmx-matrix th, .pmx-matrix td {
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid #e2e4e7;
}

.corner {
    position: sticky;
    left: 0;
    background: #fff;
    z-index: 10;
    text-align: left;
    font-weight: 600;
    min-width: 140px;
}

.pmx-matrix thead th {
    background: #f6f7f7;
    border-top: 4px solid #666;
    min-width: 60px;
    position: relative;
}

.code {
    font-family: monospace;
    font-weight: bold;
    font-size: 11px;
}

.evidence-title {
    position: sticky;
    left: 0;
    background: #fff;
    z-index: 5;
    text-align: left;
    font-size: 12px;
    font-weight: 500;
}

.mini { margin-right: 6px; font-size: 14px; }

.pmx-matrix td {
    cursor: help;
    transition: transform 0.15s;
}

.pmx-matrix td:hover {
    transform: scale(1.2);
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    z-index: 5;
    position: relative;
}

.cell-strong { background: #d4edda; }
.cell-partial { background: #fff3cd; }
.cell-weak { background: #f8d7da; }
.cell-empty { color: #e2e4e7; }

/* Coverage Row */
.coverage { background: #1d2327; color: #fff; }
.coverage th { color: #fff; font-weight: 600; }

.coverage td {
    position: relative;
    height: 30px;
    padding: 0;
    background: #3c434a;
}

.bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: #00a32a;
}

.coverage td.med .bar { background: #f39c12; }
.coverage td.poor .bar { background: #d63638; }

.pct {
    position: relative;
    z-index: 2;
    font-size: 10px;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

/* Responsive */
@media (max-width: 768px) {
    .pmx-stats { grid-template-columns: repeat(2, 1fr); }
    .evidence-grid { grid-template-columns: 1fr; }
    .pmx-matrix th, .pmx-matrix td { padding: 6px; font-size: 11px; }
}