/* Derivative and integral visualiser (/derivative-integral-visualizer): the graphs fill a focus stage, with the five tiles in the
   floating panel beside them (docs/app-kit.md). Tiles, panels and buttons come from the app kit (css/app-kit, docs/app-kit.md).
   Loaded only on this app's page (StylePaths). */

/* Drag x₀, x₀ + h, a and b or pan the view; the script sets the cursor. No scrolling or zooming while a finger drags. */
.dc-landing-app .dc-canvas {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.dc-landing-app .dc-canvas:focus-visible {
    outline: 2px solid var(--ak-accent, #2563eb);
    outline-offset: -2px;
}

/* The tiles take the colours of their curves in the picture. */
.dc-landing-app .ak-stat--main {
    --ak-stat-color: #2563eb;
}

.dc-landing-app .dc-stat-d {
    --ak-stat-color: #e11d48;
}

.dc-landing-app .dc-stat-sum {
    --ak-stat-color: #d97706;
}

.dc-landing-app .dc-stat-int {
    --ak-stat-color: #059669;
}

/* The formula: monospaced, with its error message under it. */
.dc-landing-app .dc-formula {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.dc-landing-app .dc-formula-msg {
    display: block;
    min-height: 0;
    font-size: 0.8rem;
    color: var(--ak-danger, #dc2626);
}

.dc-landing-app .dc-formula-msg:empty {
    display: none;
}

.dc-landing-app .ak-row[hidden] {
    display: none;
}

/* Phones: a taller picture, so f and the panel under it keep their height. */
@media (max-width: 640px) {
    .dc-landing-app .dc-canvas {
        aspect-ratio: 1 / 1;
    }
}
