/* Tutorial v0 — backward-faded worked examples. Visual language matches Quant Sprint. */

.tut-container {
    max-width: 760px;
    margin: 60px auto 80px;
    padding: 0 20px 80px;
    font-family: 'Inter', system-ui, sans-serif;
    color: #1F2933;
}

.tut-header { margin-bottom: 24px; }
.tut-header h1 { margin: 0 0 6px; font-size: 1.85em; }
/* WCAG fix: #6B7280 on #F2F2F2 bg = 4.32:1, fails 4.5. Use #4B5563 = 5.76:1. */
.tut-subtitle { margin: 0; color: #4B5563; font-size: 0.95em; }
.tut-method-pill {
    display: inline-block;
    padding: 3px 10px;
    background: #EEF2FF;
    color: #4338CA;
    border-radius: 999px;
    font-size: 0.85em;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.tut-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.tut-intro-image {
    margin: 0 0 14px;
    padding: 0;
    text-align: center;
}
.tut-intro-image img {
    max-width: 100%;
    max-height: 240px;
    height: auto;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #E5E7EB;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.tut-intro-image-credit {
    margin: 6px 0 0;
    font-size: 0.72em;
    color: #9CA3AF;
    font-style: italic;
    line-height: 1.4;
}
@media (prefers-color-scheme: dark) {
    .tut-intro-image img {
        background: #1E293B;
        border-color: #334155;
    }
    .tut-intro-image-credit { color: #64748B; }
}

.tut-memory-hook {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 14px 0 4px;
    padding: 12px 14px;
    background: #FEF3C7;
    border-left: 3px solid #F59E0B;
    border-radius: 0 8px 8px 0;
    font-size: 0.92em;
    line-height: 1.5;
}
.tut-memory-hook-label {
    font-size: 0.72em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #92400E;
}
.tut-memory-hook-body {
    color: #1F2937;
}
@media (prefers-color-scheme: dark) {
    .tut-memory-hook {
        background: rgba(245, 158, 11, 0.12);
        border-left-color: #F59E0B;
    }
    .tut-memory-hook-label { color: #FBBF24; }
    .tut-memory-hook-body { color: #E5E7EB; }
}

/* Career-note callout — quant finance use-cases for the pragmatist reader */
.tut-career-note {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 20px 0 4px;
    padding: 12px 14px;
    background: #EFF6FF;
    border-left: 3px solid #2563EB;
    border-radius: 0 8px 8px 0;
    font-size: 0.92em;
    line-height: 1.55;
}
.tut-career-note-label {
    font-size: 0.72em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #1E40AF;
}
.tut-career-note-list {
    margin: 4px 0 0;
    padding-left: 18px;
    color: #1E3A8A;
}
.tut-career-note-list li { margin-bottom: 3px; }
@media (prefers-color-scheme: dark) {
    .tut-career-note {
        background: rgba(37, 99, 235, 0.10);
        border-left-color: #3B82F6;
    }
    .tut-career-note-label { color: #93C5FD; }
    .tut-career-note-list { color: #BFDBFE; }
}

.tut-related {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 12px 0 8px;
    padding: 10px 14px;
    background: #F3F4F6;
    border-radius: 8px;
    font-size: 0.9em;
}
.tut-related-label {
    font-size: 0.78em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #4B5563;
}
.tut-related-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 3px; }
.tut-related-link { color: #2563EB; text-decoration: none; }
.tut-related-link:hover { text-decoration: underline; }
@media (prefers-color-scheme: dark) {
    .tut-related { background: rgba(148, 163, 184, 0.10); }
    .tut-related-label { color: #94A3B8; }
    .tut-related-link { color: #93C5FD; }
}
.tut-review-chip {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.78em;
    font-weight: 600;
    letter-spacing: 0.01em;
}
.tut-review-fresh    { background: #D1FAE5; color: #065F46; }
.tut-review-review   { background: #FEF3C7; color: #92400E; }
.tut-review-due      { background: #FDE68A; color: #92400E; }
.tut-review-overdue  { background: #FECACA; color: #991B1B; }
@media (prefers-color-scheme: dark) {
    .tut-review-fresh    { background: #064E3B; color: #6EE7B7; }
    .tut-review-review   { background: #78350F; color: #FCD34D; }
    .tut-review-due      { background: #78350F; color: #FBBF24; }
    .tut-review-overdue  { background: #7F1D1D; color: #FCA5A5; }
}

.tut-prereq-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 6px;
    row-gap: 10px;    /* visual critic #9 — multi-row chips were running together */
    margin-top: 10px;
    font-size: 0.85em;
}
.tut-prereq-label { color: #6B7280; font-weight: 600; margin-right: 2px; }
.tut-prereq-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.95em;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background-color 0.15s, color 0.15s;
}
.tut-prereq-done {
    background: #D1FAE5;
    color: #065F46;
    border-color: #6EE7B7;
}
.tut-prereq-pending {
    background: #F3F4F6;
    color: #4B5563;
    border-color: #D1D5DB;
}
.tut-prereq-chip:hover {
    text-decoration: underline;
    filter: brightness(0.97);
}
@media (prefers-color-scheme: dark) {
    .tut-prereq-label { color: #94A3B8; }
    .tut-prereq-done {
        background: #064E3B;
        color: #6EE7B7;
        border-color: #047857;
    }
    .tut-prereq-pending {
        background: #1F2937;
        color: #9CA3AF;
        border-color: #374151;
    }
}

.tut-panel {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 14px;
    padding: 22px 24px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    margin-bottom: 18px;
}

.tut-panel.hidden { display: none; }

/* Day-8 widget-primitive styles. Three primitives share these hooks:
   - ParameterPlot   (.pp-*)  sliders driving a chart
   - MonteCarloPanel (.mc-*)  N-slider + resample button driving a chart
   - MarkovChainEditor (.mce-*) editable transition matrix + stationary chip
*/
.pp-wrap, .mc-wrap, .mce-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 8px 0;
}
.pp-formula { font-size: 0.85em; color: #4B5563; font-variant-numeric: tabular-nums; }
.pp-sliders, .mc-controls { display: flex; flex-direction: column; gap: 6px; padding: 0 4px; }
.pp-slider, .mc-slider {
    display: flex; flex-direction: column; gap: 4px;
    font-size: 0.82em; color: #4B5563;
}
.pp-slider-label, .mc-slider-label { display: flex; justify-content: space-between; }
.pp-slider input[type=range], .mc-slider input[type=range] { width: 100%; accent-color: #2563EB; }
.pp-caption, .mc-caption, .mce-caption {
    font-size: 0.78em; color: #6B7280; font-variant-numeric: tabular-nums;
}
.pp-chart-host { min-height: 200px; width: 100%; }
.pp-chart-host svg { min-height: 200px; width: 100%; height: auto; }
.pp-legend {
    display: flex;
    flex-direction: row;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 0.80em;
    color: #4B5563;
    padding: 2px 0;
}
.pp-legend-item { display: flex; align-items: center; gap: 5px; }
.pp-legend-swatch { display: inline-block; width: 20px; height: 3px; border-radius: 1px; }
.mc-rerun {
    align-self: flex-start;
    padding: 4px 10px;
    background: #2563EB;
    color: #FFFFFF;
    border: 0;
    border-radius: 6px;
    font-size: 0.82em;
    cursor: pointer;
}
.mc-rerun:hover { filter: brightness(1.05); }
.mce-matrix {
    border-collapse: collapse;
    font-size: 0.85em;
    font-variant-numeric: tabular-nums;
}
.mce-matrix th, .mce-matrix td { padding: 2px 6px; text-align: center; }
.mce-matrix th { font-weight: 600; color: #4B5563; }
.mce-matrix input[type=number] {
    width: 48px;
    padding: 2px 4px;
    border: 1px solid #D1D5DB;
    border-radius: 4px;
    text-align: center;
}
.mce-stationary, .mce-eigen { font-size: 0.82em; color: #4B5563; }
@media (prefers-color-scheme: dark) {
    .pp-formula, .pp-slider, .mc-slider, .mce-stationary, .mce-eigen { color: #94A3B8; }
    .pp-caption, .mc-caption, .mce-caption { color: #94A3B8; }
    .mce-matrix th { color: #94A3B8; }
    .mce-matrix input[type=number] {
        background: #1F2937;
        border-color: #374151;
        color: #E5E7EB;
    }
    .pp-chart-host svg text,
    .pp-chart-host svg [aria-label="x-axis"] text,
    .pp-chart-host svg [aria-label="y-axis"] text { fill: #94A3B8; }
    .pp-legend { color: #94A3B8; }
}

/* Collapsed (consumed) panel: reduce a fully-read pane to a one-line strip
   so cumulative scroll shrinks. Distinct from .hidden (= not yet revealed). */
.tut-collapsed-strip { display: none; }
.tut-dismiss-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
    padding-top: 8px;
    border-top: 1px dashed #E5E7EB;
}
.tut-collapse-btn {
    font-size: 0.85em;
    padding: 6px 12px;
    opacity: 0.75;
}
.tut-collapse-btn:hover { opacity: 1; }
/* FAB (bottom-right, 40px wide + 14px right) sits at bottom: 14px, right: 14px on
   mobile. Push the collapse button left so it never hides under the FAB. */
@media (max-width: 768px) {
    .tut-collapse-btn {
        margin-right: 60px;
    }
}

.tut-panel.tut-collapsed {
    height: 36px;
    min-height: 36px;
    padding: 8px 14px;
    cursor: pointer;
    background: #F3F4F6;
    font-size: 13px;
    overflow: hidden;
    box-shadow: none;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}
.tut-panel.tut-collapsed > * { display: none; }
.tut-panel.tut-collapsed > .tut-collapsed-strip {
    display: block;
    width: 100%;
    color: #4B5563;
    font-weight: 500;
    line-height: 20px;
    user-select: none;
}
.tut-panel.tut-collapsed:hover { background: #E5E7EB; }

.tut-prelude-framing {
    background: #FEF3C7;
    border-left: 4px solid #F59E0B;
    padding: 10px 14px;
    border-radius: 4px;
    margin: 8px 0 14px;
    font-size: 0.97em;
    line-height: 1.55;
}
.tut-prelude-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
}
.tut-prelude-timer {
    display: inline-block;
    min-width: 96px;
    padding: 6px 12px;
    background: #1F2937;
    color: #F9FAFB;
    border-radius: 999px;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    text-align: center;
}

.tut-stage-label {
    text-transform: uppercase;
    font-size: 0.75em;
    letter-spacing: 0.08em;
    color: #6B7280;
    font-weight: 600;
    margin-bottom: 6px;
}

.tut-prompt {
    font-size: 1.05em;
    line-height: 1.55;
    background: #F9FAFB;
    border-left: 3px solid #2563EB;
    padding: 14px 18px;
    border-radius: 6px;
    margin: 12px 0 16px;
}

.tut-step {
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: 14px 18px;
    margin: 10px 0;
    background: #FAFBFC;
}

.tut-step.locked { opacity: 0.55; }
.tut-step.locked .tut-step-body { display: none; }

.tut-step-heading {
    font-weight: 600;
    color: #1F2933;
    margin-bottom: 6px;
}

.tut-step-body {
    color: #374151;
    line-height: 1.6;
}

.tut-step-blank-marker {
    display: inline-block;
    margin-top: 6px;
    padding: 4px 10px;
    background: #FEF3C7;
    color: #92400E;
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: 600;
}

.tut-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.tut-btn {
    display: inline-block;
    padding: 9px 18px;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.tut-btn.primary {
    background: #2563EB;
    color: #FFFFFF;
}
.tut-btn.primary:hover { background: #1D4ED8; }
.tut-btn.primary:disabled { background: #93C5FD; cursor: not-allowed; }

.tut-btn.secondary {
    background: #F3F4F6;
    color: #374151;
}
.tut-btn.secondary:hover { background: #E5E7EB; }

.tut-progress {
    display: flex;
    justify-content: space-between;
    color: #6B7280;
    font-size: 0.9em;
    margin-bottom: 8px;
}

.tut-answer-row {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    align-items: center;
    flex-wrap: wrap;
}

.tut-answer-input {
    flex: 1 1 200px;
    padding: 10px 14px;
    border: 1.5px solid #D1D5DB;
    border-radius: 8px;
    font-family: 'JetBrains Mono', 'Menlo', monospace;
    font-size: 1em;
    color: #1F2933;
    transition: border-color 0.15s;
}

.tut-answer-input:focus {
    outline: none;
    border-color: #2563EB;
}

.tut-answer-hint {
    color: #6B7280;
    font-size: 0.85em;
    margin-top: 6px;
    font-style: italic;
}

.tut-feedback {
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.95em;
    line-height: 1.5;
}
.tut-feedback.correct { background: #D1FAE5; color: #065F46; border: 1px solid #6EE7B7; }
.tut-feedback.incorrect { background: #FEE2E2; color: #991B1B; border: 1px solid #FCA5A5; }
.tut-feedback.hidden { display: none; }

#tut-worked-answer { padding: 16px 18px; }
.tut-complete-label {
    font-size: 0.78em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #047857;
    margin-bottom: 6px;
}
.tut-complete-answer { font-size: 1.05em; line-height: 1.5; margin-bottom: 8px; }
.tut-complete-cta { font-size: 0.9em; color: #065F46; }
.tut-complete-cta a { color: #047857; font-weight: 600; }
@media (prefers-color-scheme: dark) {
    .tut-complete-label { color: #6EE7B7; }
    .tut-complete-cta { color: #A7F3D0; }
    .tut-complete-cta a { color: #6EE7B7; }
}

.tut-reflection-textarea {
    width: 100%;
    min-height: 110px;
    padding: 12px 14px;
    border: 1.5px solid #D1D5DB;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.97em;
    color: #1F2933;
    resize: vertical;
    box-sizing: border-box;
}
.tut-reflection-textarea:focus {
    outline: none;
    border-color: #2563EB;
}

.tut-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    margin: 14px 0;
}

.tut-summary-cell {
    background: #F9FAFB;
    border-radius: 8px;
    padding: 10px 12px;
    text-align: center;
}

.tut-summary-cell .tut-summary-label {
    color: #6B7280;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.tut-summary-cell .tut-summary-value {
    font-size: 1.5em;
    font-weight: 700;
    color: #1F2933;
    margin-top: 4px;
}

@media (prefers-color-scheme: dark) {
    .tut-answer-input {
        background: #0b1220;
        color: #f1f5f9;
        border-color: #334155;
    }
    .tut-answer-input::placeholder { color: #64748b; }
    .tut-reflection-textarea {
        background: #0b1220;
        color: #f1f5f9;
        border-color: #334155;
    }
    .tut-reflection-textarea::placeholder { color: #64748b; }
    .tut-summary-cell { background: #1e293b; }
    .tut-summary-cell .tut-summary-value { color: #f1f5f9; }
    .tut-summary-cell .tut-summary-label { color: #94a3b8; }

    .tut-dismiss-row { border-top-color: #334155; }
    /* Tutorial panels — were stark white on dark surface (4-star regression
       flagged in post-Batch-8 visual review). Now uses the same slate-800
       surface as other panels. */
    .tut-panel {
        background: #1e293b;
        border-color: #334155;
        color: #E2E8F0;
        box-shadow: none;
    }
    .tut-panel p,
    .tut-panel li,
    .tut-panel .tut-prelude-framing {
        color: #E2E8F0;
    }
    /* Visual critic 2026-05-13: the yellow productive-failure callout had
       light text on a near-white amber background in dark mode. Swap the
       background for a dark amber tint so the text reads. */
    .tut-prelude-framing {
        background: #422006;
        border-left-color: #F59E0B;
        color: #FEF3C7;
    }
    /* Bump 6B7280 (= 4.07:1 on slate-800, fails AA) up to slate-300 (= 8.09:1).
       Affects all the small-caps/secondary labels inside the panels. */
    .tut-panel .tut-stage-label,
    .tut-panel .tut-progress,
    .tut-panel .tut-answer-hint,
    .tut-panel .tut-summary-label {
        color: #cbd5e1;
    }
    .tut-panel.tut-collapsed {
        background: #1e293b;
        border-color: #334155;
    }
    .tut-panel.tut-collapsed:hover { background: #273548; }
    .tut-panel.tut-collapsed > .tut-collapsed-strip { color: #cbd5e1; }

    /* Visual critic 2026-05-13: the worked-prompt and step cards were
       cream-on-light in dark mode, rendering as pale grey text on a near-
       white background — unreadable. Override to slate surfaces. */
    .tut-prompt {
        background: #1e293b;
        color: #E2E8F0;
        border-left-color: #60A5FA;
    }
    .tut-step {
        background: #1e293b;
        border-color: #334155;
        color: #E2E8F0;
    }
    .tut-step-heading { color: #F1F5F9; }
    .tut-step-body { color: #E2E8F0; }
}

/* ── Step-through (Brilliant-style) ───────────────────────────────── */

.tut-step-progress {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    margin: 4px 0 14px;
}
.tut-step-progress.hidden { display: none; }

.tut-step-counter {
    margin-left: 6px;
    font-size: 0.85em;
    color: #6B7280;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}
@media (prefers-color-scheme: dark) {
    .tut-step-counter { color: #94A3B8; }
}

/* Visual critic #10 — dots were 6px pale-blue against dark, easy to miss.
   Bumped to 10px with stronger contrast + accent ring on active. */
.tut-step-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #94A3B8;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.tut-step-dot.seen { background: #60A5FA; }
.tut-step-dot.active {
    background: #2563EB;
    transform: scale(1.35);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.tut-step.tut-step-active {
    border-color: #BFDBFE;
    background: #FFFFFF;
    animation: tut-step-fade 220ms ease-out;
}

@keyframes tut-step-fade {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Inline widgets ───────────────────────────────────────────────── */

.tut-widget {
    margin-top: 14px;
    padding: 14px;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    background: #F9FAFB;
}

/* ── Distribution plotter (dist_plot widget) ── */
.dp-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.dp-sliders {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
    margin-bottom: 4px;
}
@media (max-width: 480px) {
    .dp-sliders { grid-template-columns: 1fr; }
}
.dp-slider {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.78em;
    color: #475569;
}
.dp-slider-label {
    display: flex;
    justify-content: space-between;
    gap: 6px;
}
.dp-slider-val {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: #1F2937;
}
.dp-slider input[type=range] {
    width: 100%;
    accent-color: #2563EB;
}
.dp-svg {
    width: 100%;
    height: auto;
    max-height: 200px;
    display: block;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
}
.dp-axes line {
    stroke: #9CA3AF;
    stroke-width: 1;
}
.dp-tick {
    font-size: 9px;
    fill: #6B7280;
}
.dp-pdf {
    fill: rgba(37, 99, 235, 0.18);
    stroke: #2563EB;
    stroke-width: 1.5;
    stroke-linejoin: round;
}
.dp-bar {
    fill: #2563EB;
    fill-opacity: 0.85;
}
.dp-caption {
    font-size: 0.78em;
    color: #6B7280;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
}
@media (prefers-color-scheme: dark) {
    .dp-slider { color: #94A3B8; }
    .dp-slider-val { color: #F1F5F9; }
    .dp-svg {
        background: #0F172A;
        border-color: #334155;
    }
    .dp-axes line { stroke: #475569; }
    .dp-tick { fill: #94A3B8; }
    .dp-pdf {
        fill: rgba(96, 165, 250, 0.22);
        stroke: #60A5FA;
    }
    .dp-bar { fill: #60A5FA; }
    .dp-caption { color: #94A3B8; }
}

/* ── Path trace widget (path_trace) ── */
.pt-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.pt-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.pt-btn {
    padding: 6px 12px;
    background: #2563EB;
    color: #fff;
    border: 0;
    border-radius: 999px;
    font-size: 0.82em;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}
.pt-btn:hover { background: #1D4ED8; }
.pt-stat {
    font-size: 0.78em;
    color: #6B7280;
    font-variant-numeric: tabular-nums;
}
.pt-svg {
    width: 100%;
    height: auto;
    max-height: 220px;
    display: block;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
}
.pt-axes line { stroke: #9CA3AF; stroke-width: 1; }
.pt-boundary {
    stroke: #DC2626;
    stroke-width: 1;
    stroke-dasharray: 4 3;
    opacity: 0.6;
}
.pt-start {
    stroke: #9CA3AF;
    stroke-width: 0.5;
    stroke-dasharray: 2 3;
    opacity: 0.5;
}
.pt-tick { font-size: 9px; fill: #6B7280; }
.pt-tick-start { fill: #2563EB; font-weight: 700; }
.pt-path { stroke-linejoin: round; stroke-linecap: round; }
.pt-caption {
    font-size: 0.78em;
    color: #6B7280;
}
@media (prefers-color-scheme: dark) {
    .pt-svg { background: #0F172A; border-color: #334155; }
    .pt-axes line { stroke: #475569; }
    .pt-tick { fill: #94A3B8; }
    .pt-tick-start { fill: #60A5FA; }
    .pt-stat { color: #94A3B8; }
    .pt-caption { color: #94A3B8; }
    .pt-boundary { stroke: #F87171; opacity: 0.7; }
    .pt-start { stroke: #6B7280; }
}

/* ── Venn overlap widget (venn_overlap) ── */
.vn-wrap { display: flex; flex-direction: column; gap: 8px; }
.vn-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.vn-svg {
    width: 100%;
    height: auto;
    max-height: 240px;
    display: block;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
}
.vn-universe {
    fill: none;
    stroke: #D1D5DB;
    stroke-dasharray: 4 3;
}
.vn-univ-label {
    font-size: 12px;
    fill: #6B7280;
    font-style: italic;
}
.vn-circle,
.vn-circle-0,
.vn-circle-1,
.vn-circle-2 {
    fill: rgba(229, 231, 235, 0.5);
    stroke: none;
}
.vn-circle-stroke {
    fill: none;
    stroke: #374151;
    stroke-width: 1.5;
}
.vn-label {
    font-size: 14px;
    font-weight: 700;
    fill: #111827;
}
.vn-caption {
    font-size: 0.85em;
    color: #4B5563;
    font-variant-numeric: tabular-nums;
}
.vn-step-label {
    font-weight: 600;
    color: #1F2937;
}
.pt-btn:disabled { background: #9CA3AF; cursor: default; }
@media (prefers-color-scheme: dark) {
    .vn-svg { background: #0F172A; border-color: #334155; }
    .vn-universe { stroke: #475569; }
    .vn-univ-label { fill: #94A3B8; }
    .vn-circle,
    .vn-circle-0,
    .vn-circle-1,
    .vn-circle-2 { fill: rgba(71, 85, 105, 0.4); }
    .vn-circle-stroke { stroke: #94A3B8; }
    .vn-label { fill: #F1F5F9; }
    .vn-caption { color: #CBD5E1; }
    .vn-step-label { color: #F1F5F9; }
}

/* ── Payoff diagram widget (payoff_diagram) ── */
.pd-wrap { display: flex; flex-direction: column; gap: 8px; }
.pd-svg {
    width: 100%;
    height: auto;
    max-height: 240px;
    display: block;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
}
.pd-axes line { stroke: #9CA3AF; stroke-width: 1; }
.pd-zero { stroke: #4B5563; stroke-width: 1; }
.pd-tick { font-size: 9px; fill: #6B7280; }
.pd-axis-label {
    font-size: 10px;
    font-style: italic;
    fill: #6B7280;
}
.pd-line { stroke-linejoin: round; }
.pd-sum { stroke-linejoin: round; }
.pd-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    font-size: 0.78em;
    color: #4B5563;
    align-items: center;
}
.pd-swatch {
    display: inline-block;
    width: 16px;
    height: 3px;
    margin-right: 4px;
    border-radius: 1px;
    vertical-align: middle;
}
.pd-swatch-sum {
    background: #111827;
    height: 4px;
}
.pd-legend-sum {
    font-weight: 700;
    color: #111827;
}
@media (prefers-color-scheme: dark) {
    .pd-svg { background: #0F172A; border-color: #334155; }
    .pd-axes line { stroke: #475569; }
    .pd-zero { stroke: #94A3B8; }
    .pd-tick { fill: #94A3B8; }
    .pd-axis-label { fill: #94A3B8; }
    .pd-legend { color: #CBD5E1; }
    .pd-swatch-sum { background: #F1F5F9; }
    .pd-legend-sum { color: #F1F5F9; }
}

/* ── Scenario compare widget (scenario_compare) ── */
.sc-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.85em;
}
.sc-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 0 4px;
    text-align: center;
}
.sc-port-name {
    color: #1F2937;
}
.sc-formula {
    font-size: 0.8em;
    color: #6B7280;
    font-family: ui-monospace, "JetBrains Mono", monospace;
}
.sc-table {
    display: flex;
    flex-direction: column;
    gap: 4px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    overflow: hidden;
}
.sc-row {
    display: grid;
    grid-template-columns: 80px 1fr 24px 1fr;
    gap: 8px;
    padding: 10px 10px;
    align-items: center;
    border-top: 1px solid #E5E7EB;
}
.sc-row:first-child { border-top: 0; }
.sc-row-match {
    background: rgba(16, 185, 129, 0.08);
}
.sc-row-nomatch {
    background: rgba(239, 68, 68, 0.08);
}
.sc-scenario {
    text-align: center;
}
.sc-scenario-label {
    font-size: 0.78em;
    font-weight: 700;
    color: #4B5563;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.sc-scenario-st {
    font-size: 0.95em;
    font-family: ui-monospace, monospace;
    color: #111827;
    margin-top: 2px;
}
.sc-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-family: ui-monospace, monospace;
    font-size: 0.78em;
    color: #1F2937;
}
.sc-terms {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;
    align-items: baseline;
}
.sc-term { white-space: nowrap; }
.sc-plus { color: #9CA3AF; padding: 0 2px; }
.sc-sum {
    font-weight: 700;
    color: #111827;
}
.sc-eq {
    text-align: center;
    font-size: 1.1em;
    font-weight: 700;
    color: #1F2937;
}
.sc-row-match .sc-eq { color: #047857; }
.sc-row-nomatch .sc-eq { color: #B91C1C; }
.sc-conclusion {
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.92em;
    line-height: 1.45;
}
.sc-conclusion-match {
    background: rgba(16, 185, 129, 0.12);
    color: #065F46;
    border-left: 3px solid #10B981;
}
.sc-conclusion-nomatch {
    background: rgba(239, 68, 68, 0.12);
    color: #991B1B;
    border-left: 3px solid #EF4444;
}
@media (max-width: 480px) {
    .sc-row {
        grid-template-columns: 60px 1fr 20px 1fr;
        gap: 4px;
        padding: 8px 6px;
        font-size: 0.92em;
    }
}
@media (prefers-color-scheme: dark) {
    .sc-port-name { color: #E5E7EB; }
    .sc-formula { color: #94A3B8; }
    .sc-table { border-color: #334155; }
    .sc-row { border-top-color: #334155; }
    .sc-row-match { background: rgba(16, 185, 129, 0.14); }
    .sc-row-nomatch { background: rgba(239, 68, 68, 0.14); }
    .sc-scenario-label { color: #94A3B8; }
    .sc-scenario-st { color: #F1F5F9; }
    .sc-cell { color: #CBD5E1; }
    .sc-plus { color: #64748B; }
    .sc-sum { color: #F1F5F9; }
    .sc-eq { color: #F1F5F9; }
    .sc-row-match .sc-eq { color: #6EE7B7; }
    .sc-row-nomatch .sc-eq { color: #FCA5A5; }
    .sc-conclusion-match {
        background: rgba(16, 185, 129, 0.18);
        color: #6EE7B7;
    }
    .sc-conclusion-nomatch {
        background: rgba(239, 68, 68, 0.18);
        color: #FCA5A5;
    }
}

/* ── Board grid (board_grid) ── */
.bg-wrap { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.bg-grid {
    display: grid;
    gap: 2px;
    width: 100%;
    max-width: 320px;
    aspect-ratio: 1;
    background: #6B7280;
    padding: 2px;
    border-radius: 6px;
}
.bg-cell {
    background: #F3F4F6;
    border-radius: 1px;
}
.bg-cell-removed {
    background: repeating-linear-gradient(45deg, transparent, transparent 3px, #DC2626 3px, #DC2626 4px);
    opacity: 0.4;
}
.bg-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    font-size: 0.78em;
    color: #4B5563;
    justify-content: center;
}
.bg-legend-item { display: inline-flex; align-items: center; gap: 5px; }
.bg-swatch {
    display: inline-block;
    width: 12px; height: 12px;
    border-radius: 2px;
    border: 1px solid #D1D5DB;
}
.bg-caption {
    font-size: 0.82em;
    color: #6B7280;
    text-align: center;
}

/* ── State graph (state_graph) ── */
.sg-wrap { display: flex; flex-direction: column; gap: 8px; }
.sg-svg {
    width: 100%;
    max-height: 240px;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
}
.sg-edge { stroke: #6B7280; stroke-width: 1.5; fill: none; }
.sg-edge-label {
    font-size: 9px;
    fill: #6B7280;
    font-style: italic;
}
.sg-node {
    fill: #DBEAFE;
    stroke: #2563EB;
    stroke-width: 1.5;
}
.sg-node-label {
    font-size: 11px;
    font-weight: 700;
    fill: #1E40AF;
}
.sg-caption {
    font-size: 0.82em;
    color: #6B7280;
    text-align: center;
}

/* ── CLT demo (clt_demo) ── */
.cd-wrap { display: flex; flex-direction: column; gap: 8px; }
.cd-controls { padding: 0 4px; }
.cd-slider { display: flex; flex-direction: column; gap: 4px; font-size: 0.82em; color: #4B5563; }
.cd-slider-label { display: flex; justify-content: space-between; }
.cd-slider input[type=range] { width: 100%; accent-color: #2563EB; }
.cd-svg {
    width: 100%;
    max-height: 220px;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
}
.cd-axis { stroke: #9CA3AF; stroke-width: 1; }
.cd-bar { fill: #2563EB; fill-opacity: 0.85; }
.cd-normal { stroke: #F59E0B; stroke-width: 2; fill: none; }
.cd-tick { font-size: 9px; fill: #6B7280; }
.cd-caption { font-size: 0.78em; color: #6B7280; font-variant-numeric: tabular-nums; }

/* ── Recursion tree (recursion_tree) ── */
.rt-wrap { display: flex; flex-direction: column; gap: 6px; }
.rt-svg {
    width: 100%;
    max-height: 260px;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
}
.rt-edge { stroke: #94A3B8; stroke-width: 1.2; }
.rt-node-internal { fill: #DBEAFE; stroke: #2563EB; stroke-width: 1.5; }
.rt-node-leaf { fill: #D1FAE5; stroke: #10B981; stroke-width: 1.5; }
.rt-label { font-size: 9px; font-weight: 600; fill: #1F2937; }
.rt-caption { font-size: 0.82em; color: #4B5563; text-align: center; font-variant-numeric: tabular-nums; }

/* ── KL overlay (kl_overlay) ── */
.ko-wrap { display: flex; flex-direction: column; gap: 6px; }
.ko-svg {
    width: 100%;
    max-height: 200px;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
}
.ko-bar-p { fill: #2563EB; fill-opacity: 0.85; }
.ko-bar-q { fill: #F59E0B; fill-opacity: 0.85; }
.ko-axis { stroke: #9CA3AF; }
.ko-tick { font-size: 9px; fill: #6B7280; }
.ko-caption { font-size: 0.85em; color: #1F2937; text-align: center; }
.ko-legend { font-size: 0.82em; }
.ko-swatch { display: inline-block; width: 12px; height: 10px; border-radius: 2px; vertical-align: middle; }
.ko-swatch-p { background: #2563EB; }
.ko-swatch-q { background: #F59E0B; }

/* ── Unit square (unit_square) ── */
.us-wrap { display: flex; flex-direction: column; gap: 8px; }
.us-controls { padding: 0 4px; }
.us-svg {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
}
.us-square { fill: #F9FAFB; stroke: #9CA3AF; }
.us-region { fill: #10B981; fill-opacity: 0.35; stroke: #047857; stroke-width: 1.5; }
.us-label { font-size: 10px; fill: #4B5563; }
.us-caption { font-size: 0.82em; color: #6B7280; text-align: center; font-variant-numeric: tabular-nums; }

/* ── Secretary demo (secretary_demo) ── */
.sd-wrap { display: flex; flex-direction: column; gap: 8px; }
.sd-controls { display: flex; flex-direction: column; gap: 6px; }
.sd-slider { display: flex; flex-direction: column; gap: 4px; font-size: 0.82em; color: #4B5563; }
.sd-slider input[type=range] { width: 100%; accent-color: #2563EB; }
.sd-list { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.sd-cand {
    background: #F3F4F6;
    border-radius: 6px;
    padding: 6px 4px;
    text-align: center;
    font-variant-numeric: tabular-nums;
    border: 1px solid #E5E7EB;
}
.sd-cand-reject { opacity: 0.5; }
.sd-cand-hire-best { background: #D1FAE5; border-color: #10B981; }
.sd-cand-hire-suboptimal { background: #FEE2E2; border-color: #EF4444; }
.sd-cand-missed-best { background: #FEF3C7; border-color: #F59E0B; }
.sd-rank { font-size: 0.7em; color: #6B7280; display: block; }
.sd-score { font-size: 1em; font-weight: 700; color: #1F2937; }
.sd-caption { font-size: 0.85em; color: #4B5563; text-align: center; }

/* ── Clock face (clock_face) ── */
.cf-wrap { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.cf-svg {
    width: 100%;
    max-width: 220px;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 50%;
}
.cf-face { fill: #fff; stroke: #1F2937; stroke-width: 2; }
.cf-tick { stroke: #6B7280; stroke-width: 1.5; }
.cf-hour { stroke: #1F2937; stroke-width: 4; stroke-linecap: round; }
.cf-minute { stroke: #2563EB; stroke-width: 2.5; stroke-linecap: round; }
.cf-centre { fill: #1F2937; }
.cf-caption { font-size: 0.85em; color: #4B5563; text-align: center; font-variant-numeric: tabular-nums; }

/* ── Rate ladder (rate_ladder) ── */
.rl-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-family: ui-monospace, monospace;
    font-size: 0.85em;
}
.rl-row {
    display: grid;
    grid-template-columns: 1.5fr 12px 1fr 1fr;
    gap: 8px;
    padding: 6px 10px;
    background: #F9FAFB;
    border-radius: 6px;
    align-items: center;
}
.rl-label { color: #4B5563; font-family: "Inter", sans-serif; }
.rl-times { color: #9CA3AF; text-align: center; }
.rl-value { color: #1F2937; font-weight: 600; text-align: right; }
.rl-units { color: #6B7280; font-size: 0.78em; }
.rl-running { color: #2563EB; font-weight: 700; text-align: right; }
.rl-result {
    padding: 10px 14px;
    background: #DBEAFE;
    color: #1E40AF;
    border-radius: 6px;
    text-align: center;
    font-family: "Inter", sans-serif;
    font-size: 1.05em;
    margin-top: 6px;
}

@media (prefers-color-scheme: dark) {
    .bg-grid { background: #475569; }
    .bg-cell { background: #1E293B; }
    .bg-legend { color: #94A3B8; }
    .bg-swatch { border-color: #475569; }
    .bg-caption { color: #94A3B8; }

    .sg-svg { background: #0F172A; border-color: #334155; }
    .sg-edge { stroke: #94A3B8; }
    .sg-edge-label { fill: #94A3B8; }
    .sg-node { fill: #1E3A8A; stroke: #60A5FA; }
    .sg-node-label { fill: #DBEAFE; }
    .sg-caption { color: #94A3B8; }

    .cd-slider { color: #94A3B8; }
    .cd-svg { background: #0F172A; border-color: #334155; }
    .cd-axis { stroke: #475569; }
    .cd-bar { fill: #60A5FA; }
    .cd-tick { fill: #94A3B8; }
    .cd-caption { color: #94A3B8; }

    .rt-svg { background: #0F172A; border-color: #334155; }
    .rt-edge { stroke: #64748B; }
    .rt-node-internal { fill: #1E3A8A; stroke: #60A5FA; }
    .rt-node-leaf { fill: #064E3B; stroke: #34D399; }
    .rt-label { fill: #F1F5F9; }
    .rt-caption { color: #94A3B8; }

    .ko-svg { background: #0F172A; border-color: #334155; }
    .ko-bar-p { fill: #60A5FA; }
    .ko-bar-q { fill: #FBBF24; }
    .ko-axis { stroke: #475569; }
    .ko-tick { fill: #94A3B8; }
    .ko-caption { color: #E5E7EB; }
    .ko-swatch-p { background: #60A5FA; }
    .ko-swatch-q { background: #FBBF24; }

    .us-svg { background: #0F172A; border-color: #334155; }
    .us-square { fill: #1E293B; stroke: #64748B; }
    .us-region { fill: #34D399; fill-opacity: 0.35; stroke: #6EE7B7; }
    .us-label { fill: #94A3B8; }
    .us-caption { color: #94A3B8; }

    .sd-cand { background: #1E293B; border-color: #334155; }
    .sd-cand-hire-best { background: rgba(16, 185, 129, 0.2); border-color: #34D399; }
    .sd-cand-hire-suboptimal { background: rgba(239, 68, 68, 0.2); border-color: #F87171; }
    .sd-cand-missed-best { background: rgba(245, 158, 11, 0.2); border-color: #FBBF24; }
    .sd-rank { color: #94A3B8; }
    .sd-score { color: #F1F5F9; }
    .sd-caption { color: #CBD5E1; }
    .sd-slider { color: #94A3B8; }

    .cf-svg { background: #0F172A; border-color: #334155; }
    .cf-face { fill: #1E293B; stroke: #94A3B8; }
    .cf-tick { stroke: #94A3B8; }
    .cf-hour { stroke: #F1F5F9; }
    .cf-minute { stroke: #60A5FA; }
    .cf-centre { fill: #F1F5F9; }
    .cf-caption { color: #CBD5E1; }

    .rl-row { background: #1E293B; }
    .rl-label { color: #CBD5E1; }
    .rl-times { color: #64748B; }
    .rl-value { color: #F1F5F9; }
    .rl-units { color: #94A3B8; }
    .rl-running { color: #93C5FD; }
    .rl-result { background: #1E3A8A; color: #DBEAFE; }
}

.bayes-grid-controls {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 12px;
}
.bayes-grid-controls label {
    display: flex;
    flex-direction: column;
    font-size: 0.85em;
    color: #4B5563;
    font-weight: 500;
}
.bayes-grid-controls label > span {
    color: #1F2933;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    margin-left: 6px;
}
.bayes-grid-controls input[type="range"] {
    margin-top: 4px;
    width: 100%;
    accent-color: #2563EB;
}

.bayes-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 4px;
    aspect-ratio: 1 / 1;
    max-width: 320px;
    margin: 8px auto;
}

.bayes-dot {
    border-radius: 4px;
    background: #E5E7EB;
    border: 2px solid transparent;
    transition: background 0.15s, border-color 0.15s;
    aspect-ratio: 1 / 1;
}
.bayes-dot.disease { background: #FBBF24; }
.bayes-dot.test-pos { border-color: #DC2626; }

.bayes-grid-caption {
    margin-top: 12px;
    padding: 10px 14px;
    background: #FFFFFF;
    border-left: 3px solid #2563EB;
    border-radius: 4px;
    font-size: 0.95em;
    line-height: 1.5;
    color: #1F2933;
}

@media (prefers-color-scheme: dark) {
    .tut-step-dot { background: #334155; }
    .tut-step-dot.seen { background: #1d4ed8; }
    .tut-step-dot.active { background: #60a5fa; }

    .tut-step.tut-step-active {
        background: #0f172a;
        border-color: #1e3a8a;
    }

    .tut-widget {
        background: #0f172a;
        border-color: #1e293b;
    }
    .bayes-grid-controls label { color: #94a3b8; }
    .bayes-grid-controls label > span { color: #f1f5f9; }
    .bayes-dot { background: #1e293b; }
    .bayes-dot.disease { background: #F59E0B; }
    .bayes-grid-caption {
        background: #0b1220;
        color: #f1f5f9;
    }
}

@media (min-width: 480px) {
    .bayes-grid-controls {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
    }
}

/* ── markov_mixing_speed widget ────────────────────────────────────── */
.mms-wrap { display: flex; flex-direction: column; gap: 10px; }
.mms-controls { display: flex; flex-direction: column; gap: 8px; }
.mms-slider-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.92em;
    color: #374151;
}
.mms-slider-row input[type="range"] { flex: 1; min-width: 0; }
.mms-slider-label { white-space: nowrap; }
.mms-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.85em;
    color: #4B5563;
}
.mms-stat { display: inline-flex; align-items: center; gap: 6px; }
.mms-swatch {
    display: inline-block;
    width: 14px;
    height: 3px;
    border-radius: 2px;
}
.mms-swatch-main { background: #2563EB; }
.mms-swatch-cmp {
    background: transparent;
    border-top: 2px dashed #94A3B8;
    height: 0;
    width: 14px;
}
.mms-svg {
    width: 100%;
    height: auto;
    background: #F8FAFC;
    border-radius: 6px;
}
.mms-caption {
    font-size: 0.85em;
    color: #6B7280;
    line-height: 1.4;
}

@media (prefers-color-scheme: dark) {
    .mms-slider-row { color: #E2E8F0; }
    .mms-stats { color: #CBD5E1; }
    .mms-svg { background: #0F172A; }
    .mms-caption { color: #94A3B8; }
}

/* ── Bonus examples (free-text-answer extra problems) ─────────────── */
.tut-bonus-intro {
    margin: 4px 0 12px;
    color: #475569;
    font-size: 14px;
    line-height: 1.5;
}
.tut-bonus-list { display: flex; flex-direction: column; gap: 10px; }
.tut-bonus-item {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-left: 3px solid #2563EB;
    border-radius: 8px;
    padding: 12px 14px;
    transition: background 0.12s ease;
}
.tut-bonus-item[open] { background: #FFFFFF; }
.tut-bonus-prompt {
    cursor: pointer;
    list-style: none;
    font-size: 15px;
    line-height: 1.55;
    color: #0F172A;
    font-weight: 500;
}
.tut-bonus-prompt::-webkit-details-marker { display: none; }
.tut-bonus-prompt::before {
    content: "▸ ";
    color: #2563EB;
    font-weight: 700;
    margin-right: 4px;
    display: inline-block;
    transition: transform 0.12s ease;
}
.tut-bonus-item[open] .tut-bonus-prompt::before { content: "▾ "; }
.tut-bonus-answer {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #CBD5E1;
    color: #1E293B;
    font-size: 14px;
    line-height: 1.6;
}
.tut-bonus-answer table {
    border-collapse: collapse;
    margin: 8px 0;
    font-size: 13px;
}
.tut-bonus-answer th, .tut-bonus-answer td {
    border: 1px solid #CBD5E1;
    padding: 4px 8px;
    text-align: left;
}
.tut-bonus-answer th { background: #F1F5F9; }

@media (prefers-color-scheme: dark) {
    .tut-bonus-intro { color: #94A3B8; }
    .tut-bonus-item {
        background: #1E293B;
        border-color: #334155;
        border-left-color: #60A5FA;
    }
    .tut-bonus-item[open] { background: #0F172A; }
    .tut-bonus-prompt { color: #F1F5F9; }
    .tut-bonus-prompt::before { color: #60A5FA; }
    .tut-bonus-answer {
        border-top-color: #475569;
        color: #CBD5E1;
    }
    .tut-bonus-answer th { background: #1E293B; }
    .tut-bonus-answer th, .tut-bonus-answer td { border-color: #334155; }
}
