/* Galton board (/galton-board): what is its own - the canvas stage and what is drawn over it. The buttons and the accent
   come from the app kit (css/app-kit, docs/app-kit.md); the sliders and checkboxes are the shared app controls.
   Loaded only on this app's page (StylePaths). The stage is the canvas's own box, not the kit's padded
   .ak-stage column; the phone layout is the shared one for canvas apps in landing/seo-pages.css. */

.filter-landing-stage.galton-landing-stage {
    position: relative;
    display: block;
    width: 100%;
    min-height: 280px;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    box-shadow: none;
    background-color: #141821;
    background-image: none;
}

.galton-landing-canvas {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
}

.galton-hud {
    position: absolute;
    z-index: 2;
    left: 12px;
    top: 12px;
    width: max-content;
    max-width: min(300px, calc(100% - 24px));
    box-sizing: border-box;
    margin: 0;
    padding: 9px 13px 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(8, 12, 24, 0.72);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: #e2e8f0;
    font-size: 0.78rem;
    line-height: 1.55;
    font-variant-numeric: tabular-nums;
    pointer-events: none;
}

.galton-hud:empty,
.galton-hud[hidden],
.galton-hud [hidden] {
    display: none;
}

.galton-hud-row {
    margin: 0;
}

.galton-hud-label,
.galton-hud-expected,
.galton-hud-note {
    opacity: 0.66;
}

.galton-hud-value {
    color: #f8fafc;
    font-weight: 600;
}

.galton-hud-head .galton-hud-value {
    display: inline-block;
}

.galton-hud-done {
    margin-inline-start: 6px;
    color: #fbbf24;
    font-weight: 600;
}

.galton-hud-note {
    margin-top: 3px;
    font-size: 0.9em;
}

.galton-hud-paused {
    display: inline-block;
    width: 8px;
    height: 10px;
    margin-inline-end: 7px;
    box-sizing: border-box;
    border-left: 3px solid #fbbf24;
    border-right: 3px solid #fbbf24;
    vertical-align: -1px;
}

/* On a phone the readouts run side by side in a short strip, so the board below it keeps its size. */
.galton-landing-stage--compact .galton-hud {
    left: 8px;
    top: 8px;
    display: flex;
    flex-wrap: wrap;
    column-gap: 12px;
    max-width: calc(100% - 16px);
    padding: 5px 9px 6px;
    border-radius: 10px;
    font-size: 0.66rem;
    line-height: 1.45;
}

.galton-landing-stage--compact .galton-hud-note {
    display: none;
}

/* Fixed widths for the readouts, so the strip never re-wraps and grows over the board mid-run. */
.galton-landing-stage--compact .galton-hud-row .galton-hud-value {
    display: inline-block;
    min-width: 5ch;
}

body.filter-app-mode .galton-landing-app .galton-landing-canvas {
    max-width: none;
}

body.filter-app-mode .galton-landing-stage {
    box-shadow: none;
}

.galton-landing-stage.galton-stage--transparent {
    background: var(--component-checkerboard);
}
