.kingman-explorer {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    margin: 40px 0;
    font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.4;
}

.kingman-explorer h3 {
    margin: 0 0 4px 0;
    font-size: 1.1em;
    color: #0c0c0c;
    font-weight: 600;
}

.kingman-explorer .kingman-subtitle {
    margin: 0 0 20px 0;
    font-size: 0.85em;
    color: #888;
}

.kingman-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 16px;
}

.kingman-slider-group {
    flex: 1;
    min-width: 200px;
}

.kingman-slider-group label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
    font-size: 0.9em;
    color: #4b4b4b;
}

.kingman-slider-group label .kingman-val {
    font-weight: 600;
    color: #0c0c0c;
    font-variant-numeric: tabular-nums;
    min-width: 3.5em;
    text-align: right;
}

.kingman-slider-group input[type="range"] {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    cursor: pointer;
}

.kingman-slider-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #1abc9c;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.kingman-slider-group input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #1abc9c;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.kingman-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.kingman-presets button {
    padding: 7px 14px;
    border: 2px solid #1abc9c;
    background: #fff;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.82em;
    color: #0c0c0c;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}

.kingman-presets button:hover {
    background: #e8f8f5;
}

.kingman-presets button.active {
    background: #1abc9c;
    color: #fff;
}

.kingman-chart-wrap {
    position: relative;
    width: 100%;
    height: 300px;
    margin-bottom: 20px;
}

.kingman-chart-wrap canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.kingman-readout {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.kingman-readout-item {
    flex: 1;
    min-width: 120px;
    padding: 14px 12px;
    background: #fff;
    border-radius: 6px;
    text-align: center;
    border: 1px solid #eee;
}

.kingman-readout-item .kingman-readout-label {
    font-size: 0.75em;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.kingman-readout-item .kingman-readout-value {
    font-size: 1.5em;
    font-weight: 700;
    color: #0c0c0c;
    font-variant-numeric: tabular-nums;
}

/* ── Horizontal bar pairs (Jackson, Amdahl) ── */

.qi-bars {
    margin: 20px 0;
}

.qi-bar-row {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.qi-bar-label {
    width: 120px;
    font-size: 0.82em;
    color: #666;
    text-align: right;
    padding-right: 12px;
    flex-shrink: 0;
}

.qi-bar-track {
    flex: 1;
    height: 40px;
    background: #eee;
    border-radius: 5px;
    overflow: hidden;
    position: relative;
}

.qi-bar-fill {
    height: 100%;
    display: flex;
    border-radius: 5px;
    transition: width 0.25s ease;
    overflow: hidden;
}

.qi-bar-fill-solid {
    height: 100%;
    border-radius: 5px;
    transition: width 0.25s ease;
}

.qi-bar-segment {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72em;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    transition: flex 0.25s ease;
    overflow: hidden;
    white-space: nowrap;
    min-width: 0;
}

.qi-bar-num {
    min-width: 52px;
    text-align: left;
    padding-left: 10px;
    font-size: 0.9em;
    font-weight: 600;
    color: #0c0c0c;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

/* ── Priority canvas ── */

.priority-chart-wrap {
    position: relative;
    width: 100%;
    height: 260px;
    margin-bottom: 20px;
}

.priority-chart-wrap canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ── Amdahl legend ── */

.amdahl-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 4px;
    margin-bottom: 16px;
    font-size: 0.78em;
    color: #666;
}

.amdahl-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.amdahl-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    flex-shrink: 0;
}

@media screen and (max-width: 600px) {
    .kingman-explorer {
        padding: 16px;
    }

    .kingman-controls {
        gap: 14px;
    }

    .kingman-slider-group {
        min-width: 100%;
    }

    .kingman-chart-wrap {
        height: 240px;
    }

    .kingman-readout-item .kingman-readout-value {
        font-size: 1.2em;
    }

    .kingman-presets button {
        font-size: 0.78em;
        padding: 6px 10px;
    }

    .qi-bar-label {
        width: 80px;
        font-size: 0.75em;
    }

    .qi-bar-track {
        height: 34px;
    }

    .qi-bar-segment {
        font-size: 0.65em;
    }

    .priority-chart-wrap {
        height: 220px;
    }

    .amdahl-legend {
        gap: 10px;
        font-size: 0.72em;
    }
}
