/* Frequency Analysis Tool (/frequency-analysis): the cryptogram (cipher letters with the solved letters below), the
   key fields, the clue chips. Tiles, panels, tables, charts and buttons come from the app kit (css/app-kit,
   docs/app-kit.md). Loaded only on this app's page (StylePaths). */

.fa-landing-app .fa-panel { display: flex; flex-direction: column; gap: var(--ak-space-2, 0.6rem); }

/* --- The cryptogram ---------------------------------------------------------------------------------------------- */
.fa-landing-app .fa-crypto {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 0.9rem;
    max-height: 26rem;
    overflow-y: auto;
    padding: 0.2rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.fa-landing-app .fa-word { display: inline-flex; flex-wrap: nowrap; }
.fa-landing-app .fa-break { flex-basis: 100%; height: 0; }
.fa-landing-app .fa-cell {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    min-width: 1.05rem;
    padding: 0.05rem 0.05rem 0.1rem;
    border: 0;
    border-radius: 4px;
    background: none;
    color: inherit;
    font: inherit;
    line-height: 1.15;
    cursor: pointer;
}
.fa-landing-app .fa-cell--other { cursor: default; }
.fa-landing-app .fa-c { font-size: var(--ak-fs-xs, 0.74rem); color: var(--ak-muted); }
.fa-landing-app .fa-p {
    min-width: 0.8rem;
    border-bottom: 1.5px solid transparent;
    font-size: var(--ak-fs-md, 1.05rem);
    font-weight: 700;
    text-align: center;
    color: var(--ak-accent);
}
.fa-landing-app .fa-cell.is-open .fa-p { border-bottom-color: color-mix(in srgb, var(--ak-muted) 55%, transparent); }
.fa-landing-app .fa-cell--other .fa-p { color: var(--ak-text); font-weight: 400; }
.fa-landing-app .fa-cell:hover:not(.fa-cell--other) { background: var(--ak-hover); }
.fa-landing-app .fa-cell.is-selected { background: color-mix(in srgb, var(--ak-accent) 16%, transparent); }
.fa-landing-app .fa-cell.is-wrong .fa-p { color: var(--ak-danger); border-bottom-color: var(--ak-danger); }

.fa-landing-app .fa-status { margin: 0; }
.fa-landing-app .fa-actions { display: flex; flex-wrap: wrap; gap: var(--ak-space-2, 0.5rem); }

/* --- The key ------------------------------------------------------------------------------------------------------ */
.fa-landing-app .fa-key { display: grid; grid-template-columns: repeat(auto-fill, minmax(2.6rem, 1fr)); gap: 0.35rem; }
.fa-landing-app .fa-key-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    padding: 0.25rem 0.15rem;
    border: 1px solid var(--ak-border);
    border-radius: var(--ak-radius, 8px);
    background: var(--ak-field);
    cursor: text;
}
.fa-landing-app .fa-key-cell.is-selected { border-color: var(--ak-accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--ak-accent) 30%, transparent); }
.fa-landing-app .fa-key-cell.is-wrong { border-color: var(--ak-danger); }
.fa-landing-app .fa-key-c { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: var(--ak-fs-xs, 0.75rem); color: var(--ak-muted); }
.fa-landing-app .fa-key-input {
    width: 100%;
    max-width: 2rem;
    padding: 0.1rem 0;
    border: 0;
    border-bottom: 1.5px solid var(--ak-border);
    background: transparent;
    color: var(--ak-accent);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: var(--ak-fs-md, 1.05rem);
    font-weight: 700;
    text-align: center;
    text-transform: lowercase;
}
.fa-landing-app .fa-key-input:focus { outline: none; border-bottom-color: var(--ak-accent); }
.fa-landing-app .fa-key-cell.is-wrong .fa-key-input { color: var(--ak-danger); }
.fa-landing-app .fa-key-n { font-size: 0.68rem; color: var(--ak-muted); }
.fa-landing-app .fa-unused { margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* --- The clues ---------------------------------------------------------------------------------------------------- */
.fa-landing-app .fa-clues td { white-space: normal; }
.fa-landing-app .fa-clues tbody th { white-space: nowrap; font-weight: 600; }
.fa-landing-app .fa-chip {
    display: inline-block;
    margin: 0.1rem 0.4rem 0.1rem 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: var(--ak-fs-sm, 0.86rem);
    white-space: nowrap;
}
.fa-landing-app .fa-chip-p { color: var(--ak-accent); font-weight: 700; }
.fa-landing-app .fa-lang { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: var(--ak-fs-sm, 0.86rem); color: var(--ak-muted); word-spacing: 0.3em; }

.fa-landing-app .fa-input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; resize: vertical; }
