/* Styles for /search only (from search.html). Moved out of an inline <style> block
   on 2026-10-17 so the Content Security Policy can forbid inline styles. */
.search-field {
    width: 100%; box-sizing: border-box;
    padding: 0.75rem 1rem; font: inherit; font-size: 1rem;
    color: var(--text-primary); background: var(--bg-card);
    border: 1px solid var(--border); border-radius: 8px;
}
.search-field:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
/* Topic and kind filters (js/search.js). The buttons reuse the site's .tag
   pill; pressed is the brand colour, as a current topic is on the Notes pages. */
.search-filters { margin-top: 1.5rem; margin-left: 1rem; padding-bottom: 1rem; }
.search-filters[hidden] { display: none; }
.search-filters summary {
    width: fit-content; cursor: pointer; font-size: 0.85rem; color: var(--text-muted);
    border-radius: 4px; transition: color 0.2s;
}
.search-filters summary:hover, .search-filters[open] summary { color: var(--text-primary); }
.search-filters summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.search-filter-groups { display: grid; gap: 0.6rem; margin-top: 0.75rem; }
.search-filter-group { display: grid; grid-template-columns: 3.5rem 1fr; align-items: baseline; gap: 0.4rem; }
.search-filter-label { font-size: 0.8rem; color: var(--text-muted); }
.search-filter-values { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.search-filters button.tag {
    font: inherit; font-size: 0.8rem; padding: 0.3rem 0.8rem; cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}
.search-filters button.tag:hover { color: var(--brand); border-color: var(--brand); }
.search-filters button.tag[aria-pressed="true"] { color: var(--brand); background: var(--brand-soft); border-color: var(--brand); }
.search-filters button.tag:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.search-status { font-size: 0.875rem; font-weight: 600; color: var(--text-primary); margin: 1.25rem 0 0.5rem; min-height: 1.4em; }
.search-results { list-style: none; margin: 0; padding: 0; }
.search-results li { padding: 1.25rem 0; border-top: 1px solid var(--border); }
.search-results a { font-size: 1.05rem; font-weight: 600; color: var(--brand); text-decoration: none; }
.search-results a:hover { text-decoration: underline; }
.search-results p { margin: 0.35rem 0 0; font-size: 0.9rem; color: var(--text-secondary); }
.search-results mark { background: var(--brand-soft); color: var(--text-primary); border-radius: 3px; padding: 0 0.1em; }
.search-more {
    display: block; width: 100%; margin-top: 0.5rem; padding: 0.6rem 1rem;
    font: inherit; font-size: 0.9rem; font-weight: 600; color: var(--brand);
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; cursor: pointer;
}
.search-more:hover { background: var(--bg-secondary); }
.search-more[hidden] { display: none; }

/* Easter eggs: the Boing Ball (js/boing.js, a search with "amiga" in it) and
   the busy bee (js/bee.js, "atari st"). Faint, under the nav (100), over the
   results; they let clicks through. */
.boing-canvas, .bee-canvas {
    position: fixed; inset: 0; width: 100%; height: 100%;
    z-index: 50; pointer-events: none; opacity: 0.3;
}

/* Easter egg: the ZX Spectrum 48K's rainbow flash (js/spectrum.js, a search
   with "zx spectrum" in it), in the window's bottom-right corner. Four equal
   bands cross the corner from the bottom edge to the right edge, with a
   clear triangle in the corner, as on the case. The colours are the median
   pixels of each band in Wikimedia Commons' ZXSpectrum48k.jpg. Every band
   must start past 50% of the diagonal: a line before the halfway point
   crosses the box's top and left edges, and the band is cut off there
   instead of running out to the edge of the window. */
.spectrum-flash {
    position: fixed; right: 0; bottom: 0;
    width: clamp(120px, 22vmin, 240px); aspect-ratio: 1;
    z-index: 50; pointer-events: none;
    background: linear-gradient(135deg,
        transparent 55%, #ff5530 55% 62%, #edda0d 62% 69%,
        #6ed424 69% 76%, #25f0f2 76% 83%, transparent 83%);
}
