/* Fermat's Last Theorem (/fermats-last-theorem): only what is the app's own, the number line and the equation.
   Panels, tiles, fields, buttons, the table and the colours come from the app kit (css/app-kit, docs/app-kit.md).
   Loaded only on this page (StylePaths). */

.flt-landing-app .flt-chart {
    height: 168px;
}

.flt-landing-app .flt-legend {
    margin-bottom: 0.35rem;
}

.flt-landing-app .flt-swatch-sum {
    border-radius: 50%;
}

/* The equation under the line, written out as a column subtraction: the sum, cⁿ and their difference, digits in a
   monospace column lined up on the right, so every place value sits under the same place value. Left to right in
   every language (it is maths); long numbers scroll sideways inside the panel instead of wrapping. */
.flt-landing-app .flt-formula {
    margin: 0.75rem 0 0;
    padding-top: 0.75rem;
    border-top: 1px solid var(--ak-border);
    font-size: var(--ak-fs-sm);
    overflow-x: auto;
    overscroll-behavior-x: contain;
}

.flt-landing-app .flt-formula:focus-visible {
    outline: 2px solid var(--ak-accent);
    outline-offset: 2px;
}

.flt-landing-app .flt-eq {
    display: grid;
    grid-template-columns: auto auto auto;
    justify-content: start;
    align-items: baseline;
    column-gap: 0.5rem;
    width: max-content;
}

.flt-landing-app .flt-eq-row {
    display: contents;
}

.flt-landing-app .flt-eq-label {
    justify-self: end;
    white-space: nowrap;
}

.flt-landing-app .flt-eq-sign {
    color: var(--ak-muted);
}

.flt-landing-app .flt-eq-num {
    font-family: var(--ak-font-mono);
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: pre;
    padding: 0.1rem 0;
}

/* The leading digits the sum and cⁿ share, in the colour of the Matching digits tile. */
.flt-landing-app .flt-same {
    color: var(--ak-success);
    background: color-mix(in srgb, var(--ak-series-3) 16%, transparent);
    border-radius: 3px;
}

.flt-landing-app .flt-gap {
    color: var(--ak-muted);
}

/* The difference: under a rule, in the colour of its tile. */
.flt-landing-app .flt-eq-row--diff > * {
    margin-top: 0.2rem;
    padding-top: 0.25rem;
}

.flt-landing-app .flt-eq-row--diff > .flt-eq-num {
    border-top: 1px solid var(--ak-border);
    color: var(--ak-accent);
}

.flt-landing-app .flt-eq-row--diff.is-zero > .flt-eq-num {
    color: var(--ak-success);
}
