/* © 2024-2026 XAGI Labs Private Limited. The footer game, "A little lab experiment".
   Moved from the old style.css. One palette (--footer-*) drives the footer and the canvas scene;
   footer-game.js animates it through daylight and night. Before it runs, it is the site palette. */
.site-footer {
    --footer-bg: var(--bg);
    --footer-ink: var(--text);
    --footer-muted: var(--muted);
    --footer-line: var(--line);
    --footer-chip: var(--soft);
    --footer-chip-hover: color-mix(in srgb, var(--soft), var(--text) 8%);
    --footer-accent: var(--accent);
    --footer-logo-blend: multiply;
    --footer-logo-filter: none;
    background: var(--footer-bg);
    color: var(--footer-ink);
    isolation: isolate;
}
@media (prefers-color-scheme: dark) {
    .site-footer { --footer-logo-blend: screen; --footer-logo-filter: invert(1); }
}
.site-footer .footer-brand img { filter: var(--footer-logo-filter, none); mix-blend-mode: var(--footer-logo-blend, multiply); }
.site-footer .footer-about > p, .site-footer .footer-columns h2, .site-footer .footer-bottom,
.site-footer .footer-credits summary, .site-footer .credits-content, .site-footer .play-score,
.site-footer .play-start, .site-footer .play-jump, .site-footer #play-instructions { color: var(--footer-muted); }
.site-footer .footer-open-source { background: var(--footer-chip); color: var(--footer-ink); }
.site-footer .footer-open-source:hover { background: var(--footer-chip-hover); }
.site-footer a:hover, .site-footer .play-start:hover, .site-footer .play-jump:hover { color: var(--footer-accent); }
.site-footer :focus-visible { outline-color: var(--footer-accent); }

/* The game is a quiet continuation of the footer, not a separate panel. */
.footer-play { position: relative; margin-top: 8px; padding-bottom: 8px; }
.footer-play-heading { position: absolute; right: max(var(--gutter), (100% - var(--max)) / 2); bottom: 14px; pointer-events: none; }
.play-heading { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.play-score { display: flex; gap: 18px; font-size: 11px; opacity: 0; transition: opacity .25s; }
.play-score span { display: flex; gap: 7px; align-items: baseline; }
.play-score output { min-width: 2ch; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--footer-ink); }
.footer-play:hover .play-score, .footer-play:focus-within .play-score,
.footer-play[data-state=running] .play-score, .footer-play[data-state=over] .play-score { opacity: 1; }
.play-field {
    position: relative; isolation: isolate;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent), linear-gradient(0deg, transparent, #000 12%, #000 65%, transparent);
    mask-composite: intersect;
}
.play-field canvas { display: block; width: 100%; height: 165px; touch-action: pan-y; cursor: pointer; outline-offset: -8px; }
.footer-play[data-state=running] canvas { touch-action: manipulation; }
.play-caption { display: flex; align-items: center; gap: 18px; min-height: 40px; width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.play-controls { display: flex; align-items: center; gap: 12px; }
.play-start, .play-jump {
    display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0;
    border: 0; background: transparent; font: inherit; font-size: 12px; cursor: pointer; transition: color .2s;
}
.play-start kbd, .play-jump kbd {
    display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 22px; padding: 0 5px;
    border: 1px solid var(--footer-line); border-bottom-width: 2px; border-radius: 4px;
    font: inherit; font-size: 11px; color: var(--footer-ink);
}
.play-start:active kbd, .play-jump:active kbd { transform: translateY(1px); border-bottom-width: 1px; }
.play-start[hidden], .play-jump[hidden] { display: none; }
#play-instructions { font-size: 11px; }
.play-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.footer-play noscript p { width: min(100% - 2 * var(--gutter), var(--max)); margin: 0 auto 16px; font-size: 13px; color: var(--footer-muted); }
@media (max-width: 760px) {
    .play-field canvas { height: 155px; }
    .play-caption, .play-controls { gap: 10px; }
    .play-start, .play-jump { min-height: 44px; }
    .footer-play-heading { bottom: 22px; }
    .play-score { gap: 10px; }
    .play-score span { gap: 4px; }
    .play-score span:last-child { display: none; }
}
