/* Modular clock (/modular-clock): the clock beside the steps (stacked on narrow screens), the a / b pair, and the
   table of the operation with its highlighted row, column and answer. Tiles, panels, fields and the theme come from
   the app kit (css/app-kit, docs/app-kit.md). Loaded only on this app's page (StylePaths). */

.mc-landing-app .mc-main {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: var(--ak-space-3, 1rem);
    align-items: center;
}

@media (max-width: 760px) {
    .mc-landing-app .mc-main { grid-template-columns: minmax(0, 1fr); }
}

.mc-landing-app .mc-clock {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    max-height: 440px;
}

/* The calculation: one line per step in a monospace-like rhythm; the answer in bold. Long power tables scroll. */
.mc-landing-app .mc-steps {
    max-height: 420px;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    list-style: none;
    font-variant-numeric: tabular-nums;
    font-size: var(--ak-fs-sm);
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.mc-landing-app .mc-steps li { padding: 0.1rem 0; border-bottom: 1px solid var(--ak-grid); }
.mc-landing-app .mc-steps li:last-child { border-bottom: 0; }
.mc-landing-app .mc-steps .mc-strong { font-weight: 700; font-size: var(--ak-fs-md, 1.05rem); color: var(--ak-accent); }

.mc-landing-app .mc-euclid-wrap { max-height: 18rem; overflow-y: auto; }

.mc-landing-app .mc-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--ak-space-2);
}

.mc-landing-app .mc-pair > .ak-row { min-width: 0; }
.mc-landing-app .mc-pair:has(> [hidden]) { grid-template-columns: 1fr; }

/* The operation table: small square cells; the row of a, the column of b and the answer stand out, and in the
   multiplication table the 1s (where a number meets its inverse). */
.mc-landing-app .mc-table {
    border-collapse: collapse;
    margin-inline: auto;
    font-size: var(--ak-fs-xs, 0.78rem);
    font-variant-numeric: tabular-nums;
}

.mc-landing-app .mc-table th,
.mc-landing-app .mc-table td {
    min-width: 1.9rem;
    height: 1.9rem;
    padding: 0 0.2rem;
    border: 1px solid var(--ak-grid);
    text-align: center;
}

.mc-landing-app .mc-table th { color: var(--ak-muted); font-weight: 600; background: var(--ak-field); }
.mc-landing-app .mc-table th.is-on { color: var(--ak-on-accent); background: var(--ak-accent); }
.mc-landing-app .mc-table td { cursor: pointer; }
.mc-landing-app .mc-table td:hover { background: var(--ak-hover); }
.mc-landing-app .mc-table td.is-line { background: color-mix(in srgb, var(--ak-accent) 12%, var(--ak-panel)); }
.mc-landing-app .mc-table td.is-one { color: var(--ak-series-2); font-weight: 700; }

.mc-landing-app .mc-table td.is-hit {
    background: var(--ak-accent);
    color: var(--ak-on-accent);
    font-weight: 700;
}
