.variable {
    cursor: help;
    color: lightblue;
    position: relative;
    font-weight: bold;
    display: inline-block;
}

.variable::after {
    content: attr(data-desc);
    position: absolute;
    top: 100%;
    left: 0;
    width: max-content;
    max-width: min(300px, 90vw);
    
    padding: 12px 14px;
    background: var(--bg);
    color: var(--text);
    border: 2px solid var(--primary);
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.55;
    letter-spacing: 0.01em;
    white-space: normal;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.12);
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 40;
    pointer-events: none;
}

.variable:hover::after {
    visibility: visible;
    opacity: 1;
}

.detail {
    padding:5px;

}
#scatter-tip {
    padding: 15px;
    text-align: center;
    color: #98c0f4;
    font-weight: bold; 
}

.scatter-axis-title {
    font-size: 20px;
    font-weight: bold;
    fill: hsl(24, 100%, 86%);
    text-anchor: end
}

.scatter-axis {
    fill: hsl(24, 100%, 86%);
    stroke-width: 0.1;
    font-weight: bold;
    font-size: 15px;
}

#lobf {
    stroke: white;
    stroke-width: 2;
    stroke-dasharray: 5,5;
    opacity: 0.5
}


.panel-btn {
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text);
    background: var(--bg);
    border: 2px solid var(--text);
    padding: 0.6rem;
    cursor: pointer;
}

.panel-btn:hover {
    border-color: var(--secondary);
    background: var(--surface);
}

.control-group {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
    margin-top: 10px;
}

.formula-container {
    text-align: center;
    align-content: center;
    gap: 5px;
    font-family: sans-serif;
    max-width: 400px;
    margin: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}


.equation-row {
    display: flex;
    align-items: center;
}

.weight-input {
    width: 70px;
    padding: 6px 8px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    background-color: var(--secondary);
    font-family: 'Courier New', Courier, monospace;
    font-size: 1em;
    font-weight: 600;
    color: var(--surface);
    text-align: center;
    transition: all 0.2s ease;
    outline: none;
}

.weight-input:hover {
    background: white;
}

.weight-input:focus {
    background: white;
}

.operator {
    margin-right: 10px;
    font-weight: bold;
}

.result-label {
    font-size: 1.2em;
    margin-bottom: 10px;
    border-bottom: 2px solid #333;
    padding-bottom: 5px;
}