/* Linear transformations (/linear-transformations): the transformed plane fills a focus stage, with the five tiles in the floating
   panel beside it (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 the tips of î, ĵ, v and Av on the plane; the script sets the cursor. No scrolling or zooming while a finger drags. */
.lt-landing-app .lt-canvas {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.lt-landing-app .lt-canvas:focus-visible {
    outline: 2px solid var(--ak-accent, #2563eb);
    outline-offset: -2px;
}

/* The tiles: the determinant blue like the area it measures, the eigenvalues pink like the eigenvector lines. */
.lt-landing-app .lt-stat-det {
    --ak-stat-color: #3b82f6;
}

.lt-landing-app .lt-stat-eigen {
    --ak-stat-color: #db2777;
}

/* A matrix as a 2 × 2 grid of cells between brackets; the columns in the colours of î (green) and ĵ (red) in the picture. */
.lt-landing-app .lt-matrix {
    position: relative;
    display: grid;
    width: fit-content;
    max-width: 100%;
    grid-template-columns: repeat(2, 6.5rem);
    gap: 0.35rem 0.5rem;
    padding: 0.2rem 0.65rem;
    justify-content: start;
}

.lt-landing-app .lt-matrix::before,
.lt-landing-app .lt-matrix::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 0.4rem;
    border: 2px solid var(--ak-text, currentColor);
    opacity: 0.7;
}

.lt-landing-app .lt-matrix::before {
    left: 0;
    border-right: 0;
    border-radius: 3px 0 0 3px;
}

.lt-landing-app .lt-matrix::after {
    right: 0;
    border-left: 0;
    border-radius: 0 3px 3px 0;
}

.lt-landing-app .lt-cell {
    min-width: 0;
    text-align: center;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

/* The column colours win over the kit's field colour (its selector carries the :not() list too). */
.lt-landing-app .lt-matrix input.lt-cell.lt-col1:not([type="color"]):not([type="range"]):not([type="checkbox"]):not([type="file"]) {
    color: #15803d;
}

.lt-landing-app .lt-matrix input.lt-cell.lt-col2:not([type="color"]):not([type="range"]):not([type="checkbox"]):not([type="file"]) {
    color: #b91c1c;
}

.lt-landing-app[data-theme="dark"] .lt-matrix input.lt-cell.lt-col1:not([type="color"]):not([type="range"]):not([type="checkbox"]):not([type="file"]) {
    color: #4ade80;
}

.lt-landing-app[data-theme="dark"] .lt-matrix input.lt-cell.lt-col2:not([type="color"]):not([type="range"]):not([type="checkbox"]):not([type="file"]) {
    color: #f87171;
}

.lt-landing-app .ak-row[hidden] {
    display: none;
}

/* Phones: a square picture. */
@media (max-width: 640px) {
    .lt-landing-app .lt-canvas {
        aspect-ratio: 1 / 1;
    }
}
