.probability-simulator-card {
    background: #f8fafc;
    border-color: rgba(14, 165, 233, 0.28);
}

.probability-simulator-widget {
    height: 100%;
    min-height: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #0f172a;
}

.prob-shell {
    display: flex;
    height: 100%;
    min-height: 0;
    flex-direction: column;
    gap: 0.75rem;
    border-radius: 1.35rem;
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 48%, #ecfeff 100%);
    padding: clamp(0.85rem, 1.5vw, 1.2rem);
    overflow: hidden;
}

.prob-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.prob-kicker {
    margin: 0 0 0.18rem;
    color: #0369a1;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.prob-header h2 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(1.45rem, 2.8vw, 2.25rem);
    font-weight: 950;
    line-height: 1;
}

.prob-header-actions,
.prob-run-grid,
.prob-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.prob-button,
.prob-run,
.prob-tabs button,
.prob-prompt-close {
    border: 0;
    border-radius: 999px;
    background: #0ea5e9;
    color: #fff;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 900;
    min-height: 2.35rem;
    padding: 0.62rem 0.9rem;
    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.prob-button:hover,
.prob-run:hover,
.prob-tabs button:hover,
.prob-prompt-close:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.18);
}

.prob-button.secondary {
    background: #e0f2fe;
    color: #075985;
}

.prob-tabs {
    align-items: center;
}

.prob-tabs button {
    background: #e2e8f0;
    color: #334155;
}

.prob-tabs button.is-active {
    background: #0f172a;
    color: #fff;
}

.prob-workspace {
    display: grid;
    flex: 1;
    min-height: 0;
    grid-template-columns: minmax(16rem, 0.86fr) minmax(18rem, 1.45fr);
    gap: 0.75rem;
}

.prob-panel {
    min-height: 0;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 1.1rem;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
}

.prob-control-panel {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow: auto;
    padding: 0.9rem;
}

.prob-visual-panel {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow: hidden;
    padding: 0.9rem;
}

.prob-summary-title {
    color: #0f172a;
    font-size: 1rem;
    font-weight: 950;
}

.prob-summary-text,
.prob-latest,
.prob-option,
.prob-total {
    color: #475569;
    font-size: 0.88rem;
    font-weight: 750;
    line-height: 1.45;
}

.prob-outcomes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.65rem;
}

.prob-outcome-chip {
    border-radius: 999px;
    background: #ecfeff;
    color: #155e75;
    font-size: 0.78rem;
    font-weight: 900;
    padding: 0.36rem 0.58rem;
}

.prob-run {
    background: #0284c7;
    flex: 1 1 5.25rem;
}

.prob-option {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 0.9rem;
    background: #f8fafc;
    padding: 0.65rem 0.75rem;
}

.prob-latest {
    border-left: 4px solid #0ea5e9;
    border-radius: 0.8rem;
    background: #f0f9ff;
    padding: 0.75rem;
}

.prob-total {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem;
    border-radius: 0.9rem;
    background: #0f172a;
    color: #fff;
    padding: 0.75rem 0.9rem;
}

.prob-chart {
    display: grid;
    flex: 1;
    min-height: 0;
    align-content: stretch;
    gap: 0.5rem;
    overflow: auto;
}

.prob-bar-row {
    display: grid;
    grid-template-columns: minmax(4.8rem, 7rem) minmax(0, 1fr) minmax(4.4rem, auto);
    align-items: center;
    gap: 0.6rem;
}

.prob-bar-label {
    color: #0f172a;
    font-size: 0.9rem;
    font-weight: 950;
}

.prob-bar-track {
    position: relative;
    height: 2.2rem;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

.prob-expected-marker {
    position: absolute;
    inset-block: 0;
    width: 2px;
    background: #f97316;
    opacity: 0.95;
}

.prob-bar-fill {
    display: flex;
    height: 100%;
    min-width: 0.25rem;
    align-items: center;
    justify-content: flex-end;
    border-radius: inherit;
    background: linear-gradient(90deg, #38bdf8, #2563eb);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 950;
    padding-right: 0.55rem;
    transition: width 0.24s ease;
}

.prob-bar-value {
    color: #334155;
    font-size: 0.78rem;
    font-weight: 900;
    text-align: right;
}

.prob-prompt {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    border: 1px solid rgba(14, 165, 233, 0.25);
    border-radius: 1rem;
    background: #f0f9ff;
    padding: 0.8rem 0.95rem;
}

.prob-prompt[hidden] {
    display: none;
}

.prob-prompt-label {
    margin: 0 0 0.15rem;
    color: #0369a1;
    font-size: 0.7rem;
    font-weight: 950;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.prob-prompt-text {
    margin: 0;
    color: #0f172a;
    font-size: 0.94rem;
    font-weight: 850;
    line-height: 1.35;
}

.prob-prompt-close {
    min-width: 2.25rem;
    padding-inline: 0.75rem;
}

.probability-simulator-card.is-minimized .probability-simulator-widget {
    display: none;
}

.prob-drag-edge-top,
.prob-drag-edge-bottom {
    position: absolute;
    left: 2.5rem;
    right: 2.5rem;
    z-index: 25;
    height: 1.2rem;
    cursor: move;
}

.prob-drag-edge-top { top: 0; }
.prob-drag-edge-bottom { bottom: 0; }

.prob-drag-edge-left,
.prob-drag-edge-right {
    position: absolute;
    bottom: 2.5rem;
    top: 2.5rem;
    z-index: 25;
    width: 1.2rem;
    cursor: move;
}

.prob-drag-edge-left { left: 0; }
.prob-drag-edge-right { right: 0; }

@media (max-width: 760px) {
    .prob-workspace {
        grid-template-columns: 1fr;
    }

    .prob-bar-row {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .prob-bar-value {
        text-align: left;
    }
}
