/* Data Normalization visualizer - scoped, dark theme */
#dn-root {
    font-family: 'Courier New', monospace;
    color: #e0e0e0;
    background: #111;
    border-radius: 6px;
    max-width: 800px;
    padding: 10px;
    box-sizing: border-box;
}
#dn-root *, #dn-root *::before, #dn-root *::after { box-sizing: border-box; }

#dn-root .dn-layout {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

#dn-root .dn-sidebar {
    flex: 0 0 200px;
    min-width: 180px;
}

#dn-root .dn-viz-column {
    flex: 1;
    min-width: 320px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#dn-root .dn-canvas-label {
    font-size: 11px;
    text-transform: uppercase;
    color: #94a3b8;
    letter-spacing: 0.05em;
    font-weight: bold;
}

#dn-root .dn-viz-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a0a0a;
    border-radius: 6px;
    padding: 8px;
}

#dn-root .dn-viz-wrap-top {
    position: relative;
}

#dn-root .dn-xy-same-scale-frame {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    background: rgba(10, 10, 10, 0.85);
    padding: 6px 10px;
    border-radius: 4px;
}

#dn-root .dn-xy-same-scale-frame .dn-hint {
    margin: -2px 0 0 0;
}

#dn-root .dn-algo-section {
    margin-top: 4px;
}

#dn-root .dn-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

#dn-root .dn-checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    margin-bottom: 4px;
    font-size: 11px;
    color: #94a3b8;
    cursor: pointer;
}

#dn-root .dn-checkbox-row input {
    cursor: pointer;
}

#dn-root .dn-hint {
    font-size: 10px;
    color: #64748b;
    margin: -2px 0 8px 0;
}

#dn-root .dn-gradient-options,
#dn-root .dn-softmax-options {
    margin-top: 6px;
    margin-bottom: 6px;
}

#dn-root .dn-softmax-chart-wrap {
    margin-top: 10px;
    margin-bottom: 6px;
}

#dn-root .dn-softmax-chart-wrap .dn-canvas-label {
    margin-bottom: 6px;
}

#dn-root #dn-softmax-barchart {
    display: block;
    width: 100%;
    max-width: 520px;
    height: 120px;
    background: #0a0a0a;
    border-radius: 4px;
    border: 1px solid #334155;
}

#dn-root .dn-slider-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

#dn-root .dn-slider-row .dn-canvas-label {
    flex-shrink: 0;
    margin-bottom: 0;
}

#dn-root .dn-slider-row .dn-slider {
    flex: 1;
    min-width: 0;
    height: 6px;
    accent-color: #f43f5e;
    cursor: pointer;
}

#dn-root .dn-slider-value {
    font-size: 11px;
    font-family: 'Courier New', monospace;
    color: #94a3b8;
    flex-shrink: 0;
    min-width: 2.5em;
}

#dn-root .dn-select {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    padding: 6px 8px;
    background: #1a1a2e;
    color: #e0e0e0;
    border: 1px solid #444;
    border-radius: 4px;
    min-width: 180px;
}

#dn-root .dn-sidebar-title {
    font-size: 12px;
    font-weight: bold;
    color: #60a5fa;
    margin-bottom: 8px;
}

#dn-root #dn-data-preset {
    margin-bottom: 12px;
    width: 100%;
    max-width: 220px;
}

#dn-root .dn-btn-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

#dn-root .dn-btn {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    padding: 8px 10px;
    border: 1px solid #444;
    border-radius: 4px;
    background: #222;
    color: #e0e0e0;
    cursor: pointer;
    transition: background .15s, border-color .15s;
    text-align: left;
}
#dn-root .dn-btn:hover { background: #333; border-color: #555; }
#dn-root .dn-btn.active { background: #1e3a5f; border-color: #60a5fa; color: #fff; }

#dn-root .dn-stats {
    background: #1a1a2e;
    padding: 8px;
    border-radius: 4px;
    font-size: 11px;
    line-height: 1.5;
    margin-bottom: 8px;
}
#dn-root .dn-stats strong { color: #fbbf24; }
#dn-root .dn-stats .dn-dist { color: #60a5fa; font-weight: bold; }

#dn-root .dn-ranges {
    font-size: 10px;
    color: #888;
    margin-top: 6px;
}

#dn-root canvas {
    display: block;
    border-radius: 4px;
    cursor: crosshair;
    background: #111;
}

#dn-root .dn-caption {
    font-size: 10px;
    color: #888;
    margin-top: 6px;
    font-style: italic;
    max-width: 560px;
}

#dn-root .dn-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
    font-size: 10px;
}
#dn-root .dn-legend span { display: flex; align-items: center; gap: 4px; }
#dn-root .dn-swatch {
    width: 10px; height: 10px;
    border-radius: 50%;
    border: 1px solid #555;
}
