/* =============================================================================
   🎲 KOLMOGOROV COMPLEXITY + 🎯 CONFORMAL PREDICTION — Lab page panel CSS.
   Both panels follow the same gold-on-indigo cockpit aesthetic.
   ============================================================================= */

/* ── KC PANEL ───────────────────────────────────────────────────────────── */

.panel-kc {
    background:
        radial-gradient(ellipse at top right, rgba(136,216,176,0.06), transparent 60%),
        linear-gradient(180deg, rgba(28,20,55,0.92), rgba(10,8,24,0.96));
    border: 1px solid rgba(136,216,176,0.20);
    border-radius: 14px;
    padding: 22px 26px;
    margin-top: 22px;
    box-shadow:
        0 10px 32px rgba(0,0,0,0.40),
        inset 0 1px 0 rgba(136,216,176,0.08);
}

.kc-headline-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 10px 0 14px;
}

.kc-headline-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(10,8,24,0.45));
    border: 1px solid rgba(212,175,55,0.16);
    border-radius: 10px;
    padding: 12px 14px;
}

.kc-verdict-card {
    border-color: rgba(136,216,176,0.4);
}

.kc-headline-label {
    font-family: "Times New Roman", Georgia, serif;
    font-size: 10.5px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #b095f5;
    margin-bottom: 4px;
}

.kc-headline-value {
    font-family: "Times New Roman", Georgia, serif;
    font-size: 26px;
    font-weight: 600;
    color: #ffd86b;
    line-height: 1.1;
    letter-spacing: 0.5px;
    font-variant-numeric: tabular-nums;
}

.kc-verdict-card .kc-headline-value {
    font-size: 19px;
    letter-spacing: 1.5px;
}

.kc-headline-sub {
    font-family: "Times New Roman", Georgia, serif;
    font-size: 11px;
    color: #888aa0;
    font-style: italic;
    margin-top: 4px;
}

.kc-drift-strip {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    background: rgba(10,8,24,0.45);
    border: 1px solid rgba(212,175,55,0.12);
    border-radius: 8px;
    margin-bottom: 12px;
    font-family: "Times New Roman", Georgia, serif;
    font-size: 13px;
}

.kc-drift-label {
    color: #b095f5;
    font-style: italic;
}

.kc-drift-value {
    color: #ddc88a;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.kc-drift-verdict {
    margin-left: auto;
    font-weight: 600;
    letter-spacing: 1.5px;
    font-size: 12px;
    text-transform: uppercase;
}

.kc-summary {
    font-family: "Times New Roman", Georgia, serif;
    font-style: italic;
    font-size: 13px;
    color: #ddc88a;
    padding: 10px 4px;
    border-top: 1px dashed rgba(212,175,55,0.16);
    margin-top: 4px;
}

.kc-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
}

.kc-refresh-btn {
    background: rgba(136,216,176,0.10);
    color: #88d8b0;
    border: 1px solid rgba(136,216,176,0.30);
    border-radius: 999px;
    padding: 5px 14px;
    font-family: "Times New Roman", Georgia, serif;
    font-size: 12px;
    cursor: pointer;
    transition: background .15s, transform .15s;
}
.kc-refresh-btn:hover:not(:disabled) {
    background: rgba(136,216,176,0.18);
    transform: translateY(-1px);
}
.kc-refresh-btn:disabled { opacity: 0.55; cursor: progress; }

.kc-foot-note {
    font-family: "Times New Roman", Georgia, serif;
    font-style: italic;
    font-size: 11px;
    color: #888aa0;
}

/* ── CONFORMAL PANEL ─────────────────────────────────────────────────────── */

.panel-conformal {
    background:
        radial-gradient(ellipse at bottom left, rgba(255,216,107,0.06), transparent 60%),
        linear-gradient(180deg, rgba(28,20,55,0.92), rgba(10,8,24,0.96));
    border: 1px solid rgba(255,216,107,0.22);
    border-radius: 14px;
    padding: 22px 26px;
    margin-top: 22px;
    box-shadow:
        0 10px 32px rgba(0,0,0,0.40),
        inset 0 1px 0 rgba(255,216,107,0.08);
}

.conf-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    padding: 10px 12px;
    background: rgba(10,8,24,0.40);
    border: 1px solid rgba(212,175,55,0.14);
    border-radius: 10px;
    margin: 10px 0 14px;
}

.conf-control {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-family: "Times New Roman", Georgia, serif;
    font-size: 11px;
    color: #b095f5;
    letter-spacing: 0.5px;
}

.conf-control select {
    background: rgba(28,20,55,0.6);
    color: #ffd86b;
    border: 1px solid rgba(212,175,55,0.30);
    border-radius: 6px;
    padding: 4px 8px;
    font-family: "Times New Roman", Georgia, serif;
    font-size: 12px;
    cursor: pointer;
}

.conf-refresh-btn {
    margin-left: auto;
    background: rgba(255,216,107,0.10);
    color: #ffd86b;
    border: 1px solid rgba(255,216,107,0.30);
    border-radius: 999px;
    padding: 5px 14px;
    font-family: "Times New Roman", Georgia, serif;
    font-size: 12px;
    cursor: pointer;
}

.conf-refresh-btn:hover:not(:disabled) { background: rgba(255,216,107,0.18); }
.conf-refresh-btn:disabled { opacity: 0.55; cursor: progress; }

.conf-headline-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 14px;
}

.conf-headline-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(10,8,24,0.45));
    border: 1px solid rgba(212,175,55,0.16);
    border-radius: 10px;
    padding: 12px 14px;
}

.conf-headline-label {
    font-family: "Times New Roman", Georgia, serif;
    font-size: 10.5px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #b095f5;
    margin-bottom: 4px;
}

.conf-headline-value {
    font-family: "Times New Roman", Georgia, serif;
    font-size: 26px;
    font-weight: 600;
    color: #ffd86b;
    line-height: 1.1;
}

.conf-headline-sub {
    font-family: "Times New Roman", Georgia, serif;
    font-size: 11px;
    color: #888aa0;
    font-style: italic;
    margin-top: 4px;
}

.conf-set-display {
    background: rgba(10,8,24,0.50);
    border: 1px solid rgba(212,175,55,0.14);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 14px;
}

.conf-set-title {
    font-family: "Times New Roman", Georgia, serif;
    font-size: 12px;
    letter-spacing: 0.5px;
    color: #ddc88a;
    margin-bottom: 10px;
    font-style: italic;
}

.conf-balls {
    display: grid;
    grid-template-columns: repeat(15, 1fr);
    gap: 6px;
}

.conf-ball-chip {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-family: "Times New Roman", Georgia, serif;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid transparent;
    transition: transform .15s, box-shadow .15s;
}

.conf-ball-in {
    background: linear-gradient(180deg, rgba(255,216,107,0.30), rgba(255,216,107,0.10));
    color: #ffd86b;
    border-color: rgba(255,216,107,0.5);
    box-shadow: 0 0 8px rgba(255,216,107,0.20);
}

.conf-ball-out {
    background: rgba(255,255,255,0.02);
    color: #444466;
    border-color: rgba(255,255,255,0.06);
}

.conf-ball-chip:hover { transform: scale(1.1); }

.conf-curve-card {
    background: rgba(10,8,24,0.50);
    border: 1px solid rgba(212,175,55,0.14);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 12px;
}

.conf-curve-title {
    font-family: "Times New Roman", Georgia, serif;
    font-size: 13px;
    color: #ddc88a;
    margin-bottom: 6px;
}

.conf-curve-canvas {
    width: 100%;
    height: 180px;
    display: block;
}

.conf-summary {
    font-family: "Times New Roman", Georgia, serif;
    font-style: italic;
    font-size: 13px;
    color: #ddc88a;
    padding-top: 10px;
    border-top: 1px dashed rgba(212,175,55,0.16);
}

@media (max-width: 1100px) {
    .kc-headline-row     { grid-template-columns: repeat(2, 1fr); }
    .conf-headline-row   { grid-template-columns: 1fr; }
    .conf-balls          { grid-template-columns: repeat(9, 1fr); }
}


/* ─────────────────────────────────────────────────────────────────────
   KC DEEP VIEW (2026-06-09) — pairwise NCD matrix + per-compressor.
   ───────────────────────────────────────────────────────────────────── */

.kc-deep-section {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed rgba(212,175,55,0.18);
}

.kc-deep-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 10px;
}

.kc-deep-card {
    background: rgba(10,8,24,0.55);
    border: 1px solid rgba(212,175,55,0.14);
    border-radius: 10px;
    padding: 12px 14px;
}

.kc-deep-title {
    font-family: "Times New Roman", Georgia, serif;
    font-size: 13px;
    color: #ddc88a;
    letter-spacing: 0.6px;
    margin-bottom: 2px;
}

.kc-deep-sub {
    font-family: "Times New Roman", Georgia, serif;
    font-size: 10.5px;
    color: #888aa0;
    font-style: italic;
    margin-bottom: 10px;
}

/* NCD matrix */

.kc-matrix-canvas {
    width: 100%;
    height: 280px;
    display: block;
    border-radius: 6px;
    background: rgba(0,0,0,0.20);
}

.kc-matrix-legend {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-family: "Times New Roman", Georgia, serif;
    font-size: 10.5px;
    color: #888aa0;
    font-style: italic;
}

.kc-matrix-gradient {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(90deg,
        rgb(28,20,55) 0%,
        rgb(176,149,245) 50%,
        rgb(255,123,157) 100%);
}

.kc-matrix-shifts {
    margin-top: 8px;
    font-family: "Times New Roman", Georgia, serif;
    font-size: 12px;
    font-style: italic;
    color: #88d8b0;
    letter-spacing: 0.3px;
    padding: 6px 8px;
    background: rgba(255,255,255,0.025);
    border-radius: 6px;
}

/* Per-compressor breakdown */

.kc-compressor-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.kc-compressor-row {
    display: grid;
    grid-template-columns: 60px 1fr 180px;
    align-items: center;
    gap: 10px;
    font-family: "Times New Roman", Georgia, serif;
    font-size: 11.5px;
    padding: 6px 0;
    border-bottom: 1px dashed rgba(212,175,55,0.07);
}

.kc-compressor-row:last-child { border-bottom: none; }

.kc-comp-name {
    font-weight: 600;
    color: #ffd86b;
    letter-spacing: 0.8px;
    font-size: 13px;
}

.kc-comp-bar-wrap {
    position: relative;
    height: 14px;
}

.kc-comp-bar {
    position: absolute;
    top: 6px; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        rgba(163,163,216,0.4) 0%,
        rgba(212,175,55,0.3) 50%,
        rgba(255,216,107,0.4) 100%);
    border-radius: 1px;
}

.kc-comp-bar::before {
    content: "";
    position: absolute;
    top: -1px; left: 50%;
    width: 1px; height: 4px;
    background: rgba(212,175,55,0.6);
}

.kc-comp-marker {
    position: absolute;
    top: 1px;
    width: 10px; height: 10px;
    border-radius: 50%;
    margin-left: -5px;
    box-shadow: 0 0 6px currentColor;
    transition: left .25s ease;
}

.kc-comp-vals {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
    font-variant-numeric: tabular-nums;
}

.kc-comp-gain {
    font-weight: 600;
    font-size: 13px;
}

.kc-comp-detail {
    font-size: 10px;
    color: #888aa0;
    font-style: italic;
}

.kc-consensus-strip,
.kc-best-strip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-family: "Times New Roman", Georgia, serif;
    font-size: 11.5px;
    color: #b095f5;
}

.kc-consensus-label, .kc-best-label {
    font-style: italic;
    color: #888aa0;
    font-size: 10.5px;
    letter-spacing: 0.5px;
}

.kc-consensus-value, .kc-best-value {
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 11px;
}

/* Depth summary */
.kc-depth-summary {
    margin-top: 12px;
    padding: 10px 14px;
    background: linear-gradient(90deg, rgba(255,216,107,0.05), transparent 80%);
    border-left: 2px solid rgba(255,216,107,0.4);
    font-family: "Times New Roman", Georgia, serif;
    font-style: italic;
    font-size: 12.5px;
    color: #ddc88a;
}

/* Deep-view button */
.kc-deep-btn {
    background: rgba(255,216,107,0.10);
    color: #ffd86b;
    border: 1px solid rgba(255,216,107,0.30);
    border-radius: 999px;
    padding: 5px 14px;
    font-family: "Times New Roman", Georgia, serif;
    font-size: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 10px;
    transition: background .15s, transform .15s;
}
.kc-deep-btn:hover:not(:disabled) {
    background: rgba(255,216,107,0.20);
    transform: translateY(-1px);
}
.kc-deep-btn:disabled { opacity: 0.55; cursor: progress; }

@media (max-width: 1100px) {
    .kc-deep-row         { grid-template-columns: 1fr; }
    .kc-compressor-row   { grid-template-columns: 40px 1fr 140px; }
}
