:root {
            --color-mean: #a855f7;      /* Purple for Mean & Fulcrum */
            --color-mean-glow: rgba(168, 85, 247, 0.35);
            --color-median: #10b981;    /* Emerald for Median */
            --color-median-glow: rgba(16, 185, 129, 0.35);
            --color-mode: #ffb000;      /* Amber for Mode */
            --color-mode-glow: rgba(255, 176, 0, 0.35);
            
            --color-left-half: #38bdf8; /* Cyan for left of median */
            --color-right-half: #f43f5e; /* Rose for right of median */
        }

        section {
            margin-bottom: 6rem;
            scroll-margin-top: 2rem;
        }

        .section-header {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 1.75rem;
        }

        .section-tag {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.8rem;
            color: var(--color-accent);
            background: rgba(168, 85, 247, 0.1);
            padding: 4px 10px;
            border-radius: 6px;
            border: 1px solid rgba(168, 85, 247, 0.2);
            text-shadow: 0 0 5px var(--color-accent-glow);
        }

        .section-header h2 {
            font-size: 1.75rem;
            font-weight: 700;
        }

        .section-intro {
            color: var(--text-muted);
            margin-bottom: 2rem;
            line-height: 1.6;
            font-size: 1rem;
            max-width: 850px;
        }

        .workspace-grid {
            display: grid;
            grid-template-columns: 1.4fr 1fr;
            gap: 2rem;
            align-items: start;
        }

        @media (max-width: 960px) {
            .workspace-grid {
                grid-template-columns: 1fr;
            }
        }

        /* Dot Plot Sandbox */
        .plot-container {
            position: relative;
            width: 100%;
            height: 320px;
            background: rgba(0, 0, 0, 0.25);
            border-radius: 16px;
            border: 1px solid var(--card-border);
            overflow: hidden;
            touch-action: none;
        }

        #canvasDotPlot {
            display: block;
            width: 100%;
            height: 100%;
            cursor: pointer;
        }

        /* Input Controls */
        .presets-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 6px;
            margin-bottom: 1.25rem;
        }

        .input-row {
            display: flex;
            gap: 8px;
            margin-bottom: 1.25rem;
        }

        .input-text {
            background: #0f121e;
            border: 1px solid var(--card-border);
            border-radius: 8px;
            color: var(--text-color);
            padding: 8px 12px;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.9rem;
            flex-grow: 1;
            outline: none;
            transition: border-color 0.2s ease;
        }

        .input-text:focus {
            border-color: var(--color-accent);
        }

        /* Metrics Display */
        .metrics-grid {
            display: grid;
            grid-template-columns: 1fr;
            gap: 0.75rem;
        }

        .metric-card {
            border-radius: 12px;
            background: rgba(255, 255, 255, 0.02);
            border: 1px solid rgba(255, 255, 255, 0.04);
            padding: 1rem 1.25rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .metric-info h3 {
            font-size: 0.85rem;
            color: var(--text-muted);
            font-weight: 500;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 2px;
        }

        .metric-value {
            font-size: 1.4rem;
            font-weight: 700;
        }

        .legend-row {
            display: flex;
            gap: 12px;
            flex-wrap: wrap;
            margin-top: 1rem;
            font-size: 0.8rem;
            color: var(--text-muted);
        }

        .legend-item {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .legend-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
        }

        /* Solver steps */
        .solver-step {
            margin-bottom: 1.5rem;
            padding-left: 1rem;
            border-left: 2px solid var(--card-border);
        }

        .solver-step:last-child {
            margin-bottom: 0;
        }

        .solver-step-title {
            font-weight: 600;
            font-size: 1rem;
            color: var(--text-color);
            margin-bottom: 0.5rem;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .solver-step-desc {
            font-size: 0.85rem;
            color: var(--text-muted);
            line-height: 1.5;
        }

        .solver-value-list {
            font-family: 'JetBrains Mono', monospace;
            background: rgba(0, 0, 0, 0.15);
            padding: 4px 8px;
            border-radius: 6px;
            border: 1px solid rgba(255, 255, 255, 0.03);
            display: inline-block;
            margin: 4px 0;
            color: var(--text-color);
        }

        /* Quiz elements */
        .quiz-option {
            background: rgba(255, 255, 255, 0.015);
            border: 1px solid var(--card-border);
            border-radius: 12px;
            padding: 1rem 1.25rem;
            margin-bottom: 0.75rem;
            cursor: pointer;
            transition: all var(--transition-speed) ease;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .quiz-option:hover {
            background: rgba(255, 255, 255, 0.04);
            border-color: rgba(255, 255, 255, 0.1);
            transform: translateX(4px);
        }

        .quiz-option.correct {
            background: rgba(16, 185, 129, 0.08);
            border-color: rgba(16, 185, 129, 0.3);
            color: #10b981;
        }

        .quiz-option.incorrect {
            background: rgba(244, 63, 94, 0.08);
            border-color: rgba(244, 63, 94, 0.3);
            color: #f43f5e;
        }

        .quiz-feedback {
            margin-top: 1rem;
            padding: 1rem;
            border-radius: 12px;
            background: rgba(255, 255, 255, 0.02);
            border: 1px solid var(--card-border);
            font-size: 0.9rem;
            line-height: 1.5;
            display: none;
        }

        .canvas-helper-text {
            position: absolute;
            top: 12px;
            right: 12px;
            font-size: 0.7rem;
            color: rgba(255, 255, 255, 0.3);
            font-family: 'JetBrains Mono', monospace;
            pointer-events: none;
        }