/* Euler's totient calculator (/eulers-totient-calculator): the steps of the product formula beside a Copy button, the
   grid of 1 … n, the divisors with their φ(d) as small two-line cells, and the list of n with the same φ(n) as
   buttons. Tiles, panels, charts, fields and the theme come from the app kit (css/app-kit, docs/app-kit.md). Loaded
   only on this app's page (StylePaths). */

.et-landing-app .et-head {
    display: flex;
    gap: var(--ak-space-2, 0.5rem);
    align-items: flex-start;
}

.et-landing-app .et-head > .et-steps { flex: 1 1 auto; min-width: 0; }
.et-landing-app .et-head > .ak-btn { flex: 0 0 auto; }

@media (max-width: 560px) {
    .et-landing-app .et-head { flex-direction: column; }
    .et-landing-app .et-head > .ak-btn { align-self: flex-end; }
}

/* One line per step; the answer in bold. Long products wrap anywhere. */
.et-landing-app .et-steps {
    margin: 0;
    padding: 0;
    list-style: none;
    font-variant-numeric: tabular-nums;
    font-size: var(--ak-fs-sm);
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.et-landing-app .et-steps li { padding: 0.1rem 0; border-bottom: 1px solid var(--ak-grid); }
.et-landing-app .et-steps li:last-child { border-bottom: 0; }
.et-landing-app .et-steps .et-strong { font-weight: 700; font-size: var(--ak-fs-md, 1.05rem); color: var(--ak-accent); }

.et-landing-app .et-grid {
    display: block;
    width: 100%;
    height: 200px;
}

.et-landing-app .et-sieve,
.et-landing-app .et-sum {
    margin: var(--ak-space-2, 0.5rem) 0 0;
    font-size: var(--ak-fs-sm);
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

.et-landing-app .et-sieve { font-weight: 600; text-align: center; }

/* The divisors d over their φ(d). */
.et-landing-app .et-cells {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.et-landing-app .et-cell {
    display: flex;
    flex-direction: column;
    min-width: 2.4rem;
    border: 1px solid var(--ak-border);
    border-radius: var(--ak-radius-sm, 6px);
    background: var(--ak-field);
    font-size: var(--ak-fs-sm);
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.et-landing-app .et-cell > span { padding: 0.1rem 0.4rem; }
.et-landing-app .et-cell > span + span { border-top: 1px solid var(--ak-grid); color: var(--ak-accent); font-weight: 600; }
.et-landing-app .et-cell--head { border-color: transparent; background: none; color: var(--ak-muted); font-style: italic; }
.et-landing-app .et-cell--head > span + span { color: var(--ak-muted); }

/* The n with φ(n) = m. */
.et-landing-app .et-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-height: 18rem;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    list-style: none;
}

.et-landing-app .et-chip {
    padding: 0.15rem 0.5rem;
    border: 1px solid var(--ak-border);
    border-radius: var(--ak-radius-sm, 6px);
    background: var(--ak-field);
    color: var(--ak-text);
    font: inherit;
    font-size: var(--ak-fs-sm);
    font-variant-numeric: tabular-nums;
    cursor: pointer;
}

.et-landing-app .et-chip:hover { background: var(--ak-hover); border-color: var(--ak-accent); }

/* The legend's ring for "your n" on the plot. */
.et-landing-app .et-ring {
    display: inline-block;
    width: 0.8rem;
    height: 0.8rem;
    margin-inline-end: 0.35rem;
    border: 2px solid var(--ak-series-3);
    border-radius: 50%;
    vertical-align: -0.1rem;
}
