/* Snell's Law (/snells-law): 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.snell-landing-stage {
    position: relative;
    display: block;
    width: 100%;
    min-height: 280px;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    box-shadow: none;
    cursor: default;
    touch-action: manipulation;
    background-color: #161a22;
    background-image: none;
}

.snell-landing-stage:focus {
    outline: none;
}

.snell-landing-stage:focus-visible {
    outline: 2px solid rgba(147, 197, 253, 0.7);
    outline-offset: -2px;
}

.snell-landing-stage.is-grabbing {
    cursor: pointer;
}

.snell-landing-canvas {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
}

.snell-hud {
    position: absolute;
    z-index: 2;
    left: 12px;
    top: 12px;
    box-sizing: border-box;
    margin: 0;
    padding: 10px 14px 11px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background: rgba(10, 14, 26, 0.76);
    -webkit-backdrop-filter: blur(8px) saturate(1.2);
    backdrop-filter: blur(8px) saturate(1.2);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    color: #e2e8f0;
    font-size: 0.82rem;
    line-height: 1.45;
    font-variant-numeric: tabular-nums;
    pointer-events: none;
}

.snell-hud[hidden],
.snell-hud:empty {
    display: none;
}

.snell-hud-row {
    margin: 0;
}

.snell-hud-label {
    opacity: 0.66;
}

.snell-hud-value {
    margin-inline-start: auto;
    padding-inline-start: 10px;
    color: #f8fafc;
    font-size: 0.95rem;
    font-weight: 700;
}

.snell-hud-status {
    margin-top: 6px;
    opacity: 0.8;
    font-size: 0.74rem;
}

.snell-hud-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.snell-hud-swatch {
    flex: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.5);
    transform: translateY(1px);
}

.snell-hud-formula {
    display: block;
    margin-top: 6px;
    font-size: 0.74rem;
    opacity: 0.85;
}

.snell-hud-status {
    display: block;
}

/* Show/hide wrappers only: their sliders, selects and checks join the shared panel stack and its gap. */
.snell-group {
    display: contents;
}

.snell-group[hidden],
.snell-landing-controls [data-snell-for][hidden] {
    display: none !important;
}

.snell-hud-status[data-tone="good"] {
    color: #86efac;
    font-weight: 600;
}

.snell-hud-status[data-tone="warn"] {
    color: #fcd34d;
}

.snell-hud-status[data-tone="bad"] {
    color: #fca5a5;
}

/* Below the scene the readouts sit two to a line, and only a warning keeps its status line. */
.snell-hud--below {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, max-content));
    column-gap: 18px;
    padding: 7px 11px 8px;
    font-size: 0.74rem;
    line-height: 1.35;
}

.snell-hud--below .snell-hud-value {
    font-size: 0.85rem;
}

.snell-hud--below .snell-hud-formula,
.snell-hud--below .snell-hud-status {
    grid-column: 1 / -1;
    margin-top: 3px;
}

.snell-hud--below .snell-hud-status:not([data-tone]) {
    display: none;
}

body.filter-app-mode .snell-landing-app .snell-landing-canvas {
    max-width: none;
}

body.filter-app-mode .snell-landing-stage {
    box-shadow: none;
}

@media (max-width: 960px) {
    body.filter-app-mode .snell-landing-stage {
        aspect-ratio: 1 / 1;
    }
}

.snell-landing-stage.snell-stage--transparent {
    background: var(--component-checkerboard);
}
