/* Accessibility pass, 2 December 2026 (docs/accessibility-pass-2026-12-02.md). Small, additive rules. */

/* Text for screen readers only (used for status messages that have no visible twin). */
.a11ySr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* Focus Not Obscured (WCAG 2.4.11): while keyboard focus is on a desktop control behind the windows, the windows step aside. */
body.a11yPeek #windowLayer .osWindow { opacity: 0 !important; pointer-events: none !important; transition: none !important; }

/* fidelity.css restyled the tile's "open in a window" button after desktop.css hid it inside an expanded window, so a no-op
   "Open <app> window" control reappeared inside every widget window and took the first keyboard focus (Freeform). */
.expandedWidget .bar button.openWidget45 { display: none; }

/* Focus indicators that measured under 3:1 against what sits next to them (WCAG 1.4.11), found with tests/e2e/a11y-focus-visible.spec.js. */
/* The dock's frosted glass in the light appearance: a darker blue with a white gap. */
body:not(.dark) .dock button:focus-visible { outline-color: #0b4fb0; box-shadow: 0 0 0 2px #fff; }
/* The assistant button fills its dark tile, so the ring outside it was clipped away: draw it inside, in a light blue. */
.assistantFace:focus-visible { outline: 3px solid #8abaff; outline-offset: -5px; }
/* The Spotify tile is dark in both appearances. */
.spotifyhost :focus-visible { outline-color: #8abaff; }
/* Sticky notes sit on a dark board in the dark appearance and on pastel paper in both: dark blue ring with a white halo works on all of them. */
.sticky :focus-visible, .stickyMenu:focus-visible { outline: 2px solid #0f4fa8; outline-offset: 1px; box-shadow: 0 0 0 4px #fff; }
/* Attribution links over map pictures. */
.tourCredit a:focus-visible, .leaflet-control-attribution a:focus-visible, .pitCreditLink:focus-visible { outline: 2px solid #0f4fa8; outline-offset: 2px; box-shadow: 0 0 0 4px #fff; }

/* Dark appearance: the highlighted Spotlight row and the Overview's primary button are the light accent blue, which white text
   cannot be read on (1.97:1, WCAG 1.4.3). Dark text on the light blue is about 9:1. */
.dark .v06-result[aria-selected="true"], .dark .v06-primary { color: #06152e; }
.dark .v06-result[aria-selected="true"] .v06-result-text small, .dark .v06-result[aria-selected="true"] .v06-result-status { color: #0b2347; }

/* Light appearance: the launcher and Spotlight sit on translucent glass over the blurred desktop, where the muted grey (#656871) measured
   3.7 to 4.4:1 from real pixels (needs 4.5:1). A darker grey there; the highlighted row's second line is plain white on the blue (4.0 -> 5.3:1). */
body:not(.dark) .v06-app > span:last-child:not(.v06-appicon), body:not(.dark) .v06-subtitle, body:not(.dark) .v06-foot, body:not(.dark) .v06-result-text small, body:not(.dark) .v06-result-status { color: #454854; }
body:not(.dark) .v06-result[aria-selected="true"] .v06-result-text small { color: #fff; }

/* WCAG 2.5.8 Target Size (Minimum), found by tests/e2e/a11y-semantics.spec.js in the Ask Shawn and Photos windows. */
.guideAloud8 { display: inline-flex; align-items: center; gap: 8px; min-height: 24px; }
.guideAloud8 input { width: 24px; height: 24px; margin: 0; }
.osWindow #photoClear, #photoClear { min-height: 24px; padding-top: 4px; padding-bottom: 4px; }

/* WebKit draws the Freeform pen-colour input 23px tall (target size, WCAG 2.5.8). */
.drawtools input[type="color"] { min-width: 28px; min-height: 28px; }

/* Menu popovers (workspace menu and open-windows list) always sit above the windows (z 40), the dock (45) and the menu bar (50),
   so they stay reachable while a full-width window is open on a phone (QA decision, 2 December 2026). They are given room
   to scroll if a screen is very short, and their items are at least 44px tall (WCAG 2.5.5 / touch targets), text stays 12px or more. */
#sysPopover, #windowList { z-index: 70; max-height: calc(100% - 48px); overflow-y: auto; overscroll-behavior: contain; }
#sysPopover button, #windowList button { min-height: 44px; }
/* Without the laptop frame the menu bar is sticky: keep the popovers beside it, not at the top of a scrolled page. */
body:not(.framed) #sysPopover, body:not(.framed) #windowList { position: fixed; }
