/* SoftMax Pipeline – local styles, no global collision */

#content_sim {
    overflow: visible;
    max-width: 800px;
    margin: 0 auto;
    font-family: 'Courier New', monospace;
}

#content_sim * {
    box-sizing: border-box;
}

#content_sim .sm-lab {
    max-width: 800px;
    margin: 0 auto;
    background: #0a0a0c;
    color: #e0e0e0;
    padding: 18px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

#content_sim .sm-header {
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#content_sim .sm-formula {
    font-size: 11px;
    color: #8b9bb4;
    margin: 0 0 12px 0;
}

#content_sim .sm-formula .sm-formula-math {
    color: #e0e0e0;
    font-weight: bold;
}

#content_sim .sm-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 24px;
}

#content_sim .sm-ctrl-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
}

#content_sim .sm-ctrl-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

#content_sim .sm-ctrl-row label {
    font-size: 11px;
    color: #8b9bb4;
    min-width: 1.4em;
}

#content_sim .sm-ctrl-row input[type="range"] {
    width: 88px;
    height: 6px;
    accent-color: #00b4d8;
}

#content_sim .sm-ctrl-row .sm-val {
    font-size: 11px;
    color: #00b4d8;
    min-width: 32px;
    text-align: right;
}

#content_sim .sm-pipeline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 16px 20px;
    min-height: 220px;
    margin-bottom: 18px;
    padding: 14px 0;
}

#content_sim .sm-charts-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 12px 16px;
}

#content_sim .sm-charts-row .sm-stage {
    flex: 0 0 auto;
}

#content_sim .sm-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex: 0 1 auto;
    min-width: 160px;
}

#content_sim .sm-stage h3 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #8b9bb4;
    margin: 0;
    font-weight: normal;
    flex-shrink: 0;
}

#content_sim .sm-stage-bars {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    justify-content: center;
    height: 200px;
    width: 100%;
}

#content_sim .sm-stage-bars.sm-stage-logits {
    align-items: center;
    height: auto;
    min-height: 120px;
    justify-content: center;
}

#content_sim .sm-logit-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    min-width: 52px;
}

#content_sim .sm-logit-bar-wrap {
    width: 24px;
    height: 52px;
    position: relative;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px 4px 0 0;
    overflow: hidden;
}

#content_sim .sm-logit-bar-wrap::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    margin-top: -1px;
    z-index: 0;
}

#content_sim .sm-logit-bar {
    position: absolute;
    bottom: 0;
    left: 2px;
    right: 2px;
    width: auto;
    margin: 0;
    background: #4a90d9;
    border-radius: 3px 3px 0 0;
    transition: height 0.2s ease-out;
    z-index: 1;
    min-height: 2px;
}

#content_sim .sm-logit-cell input[type="range"] {
    width: 80px;
    height: 6px;
    accent-color: #4a90d9;
}

#content_sim .sm-logit-cell .sm-logit-label {
    font-size: 10px;
    color: #8b9bb4;
}

#content_sim .sm-logit-cell .sm-logit-val {
    font-size: 10px;
    color: #4a90d9;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

#content_sim .sm-exp-cell,
#content_sim .sm-prob-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    width: 46px;
    min-width: 46px;
    height: 100%;
}

#content_sim .sm-exp-cell {
    overflow: visible;
}

#content_sim .sm-charts-row .sm-stage-bars {
    justify-content: center;
}

#content_sim .sm-exp-bar,
#content_sim .sm-prob-bar {
    width: 42px;
    margin: 0 auto;
    border-radius: 6px 6px 0 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    font-variant-numeric: tabular-nums;
    transition: height 0.25s ease-out, background-color 0.2s, border 0.2s, opacity 0.2s;
    min-height: 6px;
}

#content_sim .sm-exp-bar {
    background: #e07c3c;
    color: #0a0a0c;
}

#content_sim .sm-prob-bar {
    background: #4caf50;
    color: #0a0a0c;
}

#content_sim .sm-prob-bar.is-target {
    border: 3px solid #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

#content_sim .sm-prob-bar.is-noise {
    opacity: 0.75;
    background: #81c784;
}

#content_sim .sm-true-label {
    font-size: 9px;
    color: #8b9bb4;
    margin-top: 6px;
    cursor: pointer;
    user-select: none;
}

#content_sim .sm-true-label input {
    margin-right: 4px;
    accent-color: #ffd700;
    cursor: pointer;
}

#content_sim .sm-operator {
    font-size: 10px;
    color: #6b7280;
    align-self: center;
    flex-shrink: 0;
    padding: 0 4px;
}

#content_sim .sm-math-breakdown {
    font-size: 11px;
    line-height: 1.65;
    color: #8b9bb4;
    padding: 12px 14px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border-left: 4px solid #00b4d8;
    overflow-wrap: break-word;
}

#content_sim .sm-math-breakdown .sm-num {
    color: #fbbf24;
    font-weight: bold;
}

#content_sim .sm-check-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #8b9bb4;
    cursor: pointer;
    user-select: none;
}

#content_sim .sm-check-wrap input {
    accent-color: #00b4d8;
    cursor: pointer;
    width: 14px;
    height: 14px;
}

#content_sim .sm-gradient-hint {
    font-size: 10px;
    color: #6b7280;
    margin-top: 2px;
}

#content_sim .sm-arrow-up,
#content_sim .sm-arrow-down {
    font-size: 12px;
    font-weight: bold;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    animation: sm-fade 0.5s ease-out forwards;
    pointer-events: none;
}

#content_sim .sm-arrow-up { color: #4ade80; top: -18px; }
#content_sim .sm-arrow-down { color: #f87171; top: -18px; }

@keyframes sm-fade {
    0% { opacity: 1; }
    100% { opacity: 0; }
}
