/* Backprop Bulletin adapter for the A11yMenu core (AO-A11Y-MENU-001): the entry point in the shared masthead, the menu in the site's colours and type,
   and the site-specific parts of the effects. The core stylesheet (a11y-menu.css) carries the effects themselves. */

/* Entry point (James 2026-11-18): an outlined button with its icon and visible name "Accessibility", at the far right of the navigation row, after the
   topic links and the search field (the same order as the document, so keyboard order follows what is seen); on phones and narrow windows it sits at the
   end of the search row. It is a link to the statement until the adapter turns it into the menu button. The light and dark theme is chosen in the menu. */
/* The touch target is 44px tall; the designed 38px outlined box is drawn inside it (::before), so the target stays at least 44 x 44px. */
html[data-reader-v1="1"] .a11y-entry {
  position: relative; isolation: isolate; display: inline-flex; align-items: center; gap: 8px; flex: none; min-height: 44px; padding: 0 14px 0 11px; margin: 0;
  border: 0; border-radius: 6px; background: transparent; color: #f1f4f2; font: inherit; font-size: 0.8125rem; font-weight: 500; line-height: 1.2; text-decoration: none; cursor: pointer;
}
html[data-reader-v1="1"] .a11y-entry::before { content: ""; position: absolute; inset: 3px 0; z-index: -1; border: 1px solid #34434d; border-radius: 6px; background: #0d141a; }
html[data-reader-v1="1"] .a11y-entry:hover { color: #ffffff; }
html[data-reader-v1="1"] .a11y-entry:hover::before { border-color: #61747d; }
html[data-reader-v1="1"] .a11y-entry svg { display: block; width: 18px; height: 18px; flex: none; }
@media (max-width: 1239px) {
  html[data-reader-v1="1"] .category-bar .a11y-entry { margin: 4px 0 6px; }
}
@media (max-width: 640px) {
  html[data-reader-v1="1"] .category-bar .a11y-entry { margin: 8px 0 12px; gap: 6px; padding: 0 10px 0 9px; font-size: 0.75rem; }
  html[data-reader-v1="1"] .category-bar .a11y-entry::before { inset: 1px 0; }
  html[data-reader-v1="1"] .category-bar .a11y-entry svg { width: 16px; height: 16px; }
}
/* The narrowest phones: the button shows its icon only (its name stays "Accessibility"), so the search field keeps room. */
@media (max-width: 379px) {
  html[data-reader-v1="1"] .category-bar .a11y-entry { width: 44px; padding: 0; justify-content: center; }
  html[data-reader-v1="1"] .a11y-entry-label { 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; }
}

/* The wordmark is a logotype: it keeps its own letter spacing and is never broken inside the word (its size already follows the text-size choice, capped
   at 12vw so it fits a 320px screen). */
html[data-reader-v1="1"][data-a11y-spacing] .brand-word, html[data-reader-v1="1"][data-a11y-spacing] .brand-sub { letter-spacing: 0 !important; }
html[data-reader-v1="1"][data-a11y-text] .brand-word, html[data-reader-v1="1"][data-a11y-spacing] .brand-word { overflow-wrap: normal !important; }

/* The menu in the site's tokens (they follow the light and dark theme). Focus: amber on dark surfaces, a darker amber on light ones (3:1 or more). */
.a11ym {
  --a11ym-bg: var(--card); --a11ym-fg: var(--text); --a11ym-muted: var(--muted); --a11ym-line: var(--line); --a11ym-control: #5b7680;
  --a11ym-accent: var(--teal-dark); --a11ym-accent-fg: #ffffff; --a11ym-focus: #8f4f00;
  --a11ym-font: var(--font); --a11ym-title-font: "Space Grotesk", var(--font);
}
@supports (color: light-dark(#000000, #ffffff)) {
  .a11ym { --a11ym-control: light-dark(#5b7680, #8fb0b8); --a11ym-accent-fg: light-dark(#ffffff, #0a1a22); --a11ym-focus: light-dark(#8f4f00, #f2a900); }
}
.a11ym .a11ym-title { text-transform: uppercase; }
