﻿:root {
    --bs-body-font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
    --bs-font-sans-serif: var(--bs-body-font-family);
}

:root, [data-bs-theme=dark] {
    --bs-primary: #512bd4;
    --bs-primary-rgb: 81, 43, 212;
    --bs-primary-text-emphasis: #a995ee;
    --bs-primary-bg-subtle: #1d1546;
    --bs-primary-border-subtle: #3a2690;
    --bs-link-color: #a995ee;
    --bs-link-color-rgb: 169, 149, 238;
}

[data-bs-theme=dark] {
    --bs-body-bg: #0f1114;
    --bs-body-bg-rgb: 15, 17, 20;
    --ql-card: #171a1f;
}

.card {
    --bs-card-bg: var(--ql-card);
}

.metric-table {
    table-layout: fixed;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 5px;
    font-size: .9rem;
}

    .metric-table thead th {
        padding: .3rem .85rem;
        font-size: .78rem;
        font-weight: 600;
        letter-spacing: .03em;
        color: var(--bs-secondary-color);
        border: 0;
    }

    .metric-table td {
        padding: .65rem .85rem;
        border: 0;
        vertical-align: middle;
    }

.metric-row > td {
    background-color: rgba(255, 255, 255, .035);
    transition: background-color .15s;
}

    .metric-row > td:first-child {
        border-radius: .65rem 0 0 .65rem;
    }

    .metric-row > td:last-child {
        border-radius: 0 .65rem .65rem 0;
    }

.metric-row:hover > td {
    background-color: rgba(81, 43, 212, .16);
}

.metric-name {
    font-weight: 500;
}

.metric-formula {
    color: var(--bs-secondary-color);
}

.metric-theory {
    color: var(--bs-blue);
    font-weight: 600;
}

.metric-sim {
    color: var(--bs-primary-text-emphasis);
    font-weight: 600;
}

.metric-error {
    color: var(--bs-secondary-color);
}

.metric-spacer {
    height: 1.1rem;
    padding: 0 !important;
}

.metric-group > td {
    text-align: center;
    padding: .7rem .85rem;
    border-radius: .65rem;
    border: 1px solid rgba(138, 111, 240, .35);
    background: linear-gradient(90deg, rgba(81, 43, 212, .28), rgba(13, 110, 253, .16));
}

.form-control, .form-control:focus {
    background-color: var(--ql-card);
    color: var(--bs-body-color);
}

.btn-primary {
    --bs-btn-bg: #512bd4;
    --bs-btn-border-color: #512bd4;
    --bs-btn-color: #fff;
    --bs-btn-hover-bg: #6340e0;
    --bs-btn-hover-border-color: #6340e0;
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: #4423b8;
    --bs-btn-active-border-color: #4423b8;
    --bs-btn-active-color: #fff;
    --bs-btn-focus-shadow-rgb: 81, 43, 212;
}

.btn-soft {
    --bs-btn-color: var(--bs-primary-text-emphasis);
    --bs-btn-bg: rgba(81, 43, 212, .16);
    --bs-btn-border-color: rgba(138, 111, 240, .35);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: rgba(81, 43, 212, .55);
    --bs-btn-hover-border-color: rgba(138, 111, 240, .7);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: rgba(81, 43, 212, .7);
    --bs-btn-active-border-color: rgba(138, 111, 240, .8);
    --bs-btn-focus-shadow-rgb: 81, 43, 212;
    font-weight: 500;
    border-radius: .6rem;
    transition: background-color .15s, border-color .15s, color .15s;
}

.form-range::-webkit-slider-thumb {
    background-color: #512bd4;
}

.form-range::-moz-range-thumb {
    background-color: #512bd4;
}

.form-control:focus {
    border-color: #7a5fe0;
    box-shadow: 0 0 0 .25rem rgba(81, 43, 212, .3);
}

.stat-box {
    background-color: rgba(81, 43, 212, .20);
    border: 1px solid rgba(138, 111, 240, .35);
}

.w-90 {
    width: 90%;
}

.w-70 {
    width: 70%;
}

.w-78 {
    width: 78%;
}

@media (max-width: 991px) {
    .w-90, .w-70, .w-78 {
        width: 96%;
    }
}

.tnum {
    font-variant-numeric: tabular-nums;
}

.katex {
    font-size: 1.02em;
}

.cv {
    width: 100%;
    display: block;
}

    .cv .tx {
        fill: var(--bs-secondary-color);
        font: 11px var(--bs-body-font-family);
    }

    .cv .hb {
        fill: var(--bs-primary);
        opacity: .95;
    }

    .cv .grid {
        stroke: var(--bs-border-color);
        stroke-width: 1;
    }

    .cv .tl {
        stroke: var(--bs-blue);
        fill: none;
    }

    .cv .ln {
        stroke: var(--bs-primary-text-emphasis);
        stroke-width: 1.6;
        fill: none;
    }

    .cv .bad {
        fill: var(--bs-danger);
        font: 600 12px var(--bs-body-font-family);
    }

    .cv .box {
        fill: none;
        stroke: var(--bs-border-color);
        stroke-width: 1.5;
    }

    .cv .dot {
        fill: var(--bs-secondary-color);
    }

    .cv .srv {
        fill: var(--ql-card);
        stroke: var(--bs-border-color);
        stroke-width: 1.5;
    }

        .cv .srv.on {
            fill: var(--bs-primary-bg-subtle);
            stroke: var(--bs-primary-text-emphasis);
        }

    .cv .track {
        fill: none;
        stroke: var(--bs-border-color);
        stroke-width: 8;
    }

    .cv .arc {
        fill: none;
        stroke: var(--bs-primary-text-emphasis);
        stroke-width: 8;
        stroke-linecap: round;
    }

    .cv .pill {
        fill: var(--bs-primary-bg-subtle);
        stroke: var(--bs-primary-text-emphasis);
        stroke-width: 1;
    }

    .cv .pilltext {
        fill: var(--bs-primary-text-emphasis);
        font: 600 11px var(--bs-body-font-family);
    }

    .cv .pk {
        fill: #fff;
        font: 600 9px var(--bs-body-font-family);
    }

    .cv:not([aria-label]) {
        overflow: visible;
        margin-block: .25rem;
    }

        .cv:not([aria-label]) .tx {
            font-size: 10.5px;
            font-weight: 500;
            letter-spacing: .02em;
            font-variant-numeric: tabular-nums;
        }

        .cv:not([aria-label]) .grid {
            stroke-width: .8px;
            stroke-dasharray: 2 5;
            stroke-linecap: round;
            opacity: .75;
        }

        .cv:not([aria-label]) .hb {
            rx: 4px;
            opacity: .9;
            shape-rendering: geometricPrecision;
            transition: opacity .15s;
        }

            .cv:not([aria-label]) .hb:hover {
                opacity: 1;
            }

        .cv:not([aria-label]) .tl {
            stroke-linecap: round;
            stroke-linejoin: round;
        }

            .cv:not([aria-label]) .tl[style*="stroke-width:2.5"] {
                stroke-width: 3.2px !important;
            }

            .cv:not([aria-label]) .tl[style="stroke-width:2"] {
                stroke-width: 2.8px !important;
            }

            .cv:not([aria-label]) .tl[style*="stroke-dasharray"] {
                stroke-width: 2px !important;
                stroke-dasharray: 8 6 !important;
            }

        .cv:not([aria-label]) .ln {
            stroke-width: 2.4px;
            stroke-linecap: round;
            stroke-linejoin: round;
        }

    .cv:has(#traceClip) .ln {
        stroke-width: 1.8px;
        stroke-linejoin: miter;
        stroke-linecap: butt;
        shape-rendering: crispEdges;
        vector-effect: non-scaling-stroke;
    }

    .cv:has(#traceClip) .tl[style*="stroke-dasharray"] {
        stroke-width: 2.8px !important;
        stroke-dasharray: none !important;
        stroke-linecap: round;
    }

    .cv:has(#traceClip) .grid {
        stroke-dasharray: none;
        stroke-width: .6px;
        opacity: .55;
    }
