/* Error-correcting codes (/error-correcting-codes): the parity circles beside the row of bits, its explanation and
   buttons (stacked on narrow screens), the bit buttons with parity, data and flipped states, and the two received
   texts. Tiles, panels, editors and buttons come from the app kit (css/app-kit, docs/app-kit.md). Loaded only here. */

.ec-landing-app .ec-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--ak-space-3, 1rem);
    align-items: center;
}

@media (max-width: 860px) { .ec-landing-app .ec-main { grid-template-columns: minmax(0, 1fr); } }

.ec-landing-app .ec-venn { display: block; width: 100%; max-width: 460px; margin-inline: auto; aspect-ratio: 1 / 1; cursor: pointer; }
.ec-landing-app .ec-side { display: flex; flex-direction: column; gap: var(--ak-space-3, 1rem); min-width: 0; }
.ec-landing-app .ec-explain { margin: 0; line-height: 1.5; }

.ec-landing-app .ec-strip { display: flex; flex-wrap: wrap; gap: 0.35rem; justify-content: center; }

.ec-landing-app .ec-bit {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 2.7rem;
    padding: 0.3rem 0.2rem;
    border: 2px solid var(--ak-border);
    border-radius: var(--ak-radius-sm, 8px);
    background: var(--ak-panel);
    color: var(--ak-text);
    font: inherit;
    cursor: pointer;
}

.ec-landing-app .ec-bit--parity { background: var(--ak-field); }
.ec-landing-app .ec-bit--extra { border-style: dashed; }
.ec-landing-app .ec-bit-val { font-size: 1.35rem; font-weight: 700; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.ec-landing-app .ec-bit-name { font-size: var(--ak-fs-xs, 0.75rem); color: var(--ak-muted); font-weight: 600; }
.ec-landing-app .ec-bit-pos { font-size: 0.65rem; color: var(--ak-muted); }
.ec-landing-app .ec-bit.is-flipped { border-color: var(--ak-warning); }
.ec-landing-app .ec-bit.is-flipped .ec-bit-val { color: var(--ak-danger); }
.ec-landing-app .ec-bit.is-fixed { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ak-danger) 40%, transparent); }
.ec-landing-app .ec-bit:focus-visible { outline: 2px solid var(--ak-accent); outline-offset: 2px; }

.ec-landing-app .ec-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ak-space-2, 0.5rem); }

.ec-landing-app .ec-channel { display: flex; flex-direction: column; gap: var(--ak-space-2, 0.5rem); }
.ec-landing-app .ec-outs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--ak-space-3, 1rem); }
@media (max-width: 700px) { .ec-landing-app .ec-outs { grid-template-columns: minmax(0, 1fr); } }
.ak-app.ec-landing-app textarea.ec-out { min-height: 4.5rem; height: 4.5rem; }
.ak-app.ec-landing-app textarea[data-ak-field="text"] { min-height: 5rem; height: 6rem; }
