/* Accessibility toolbar — button, panel and the page-wide adjustments it toggles.
   Classes are set on <html> by a11y-widget.js. */

/* ---------- Floating button ---------- */
.a11y-btn {
  position: fixed; inset-block-end: 1rem; inset-inline-end: 1rem; z-index: 100;
  display: grid; place-items: center;
  inline-size: 3.5rem; block-size: 3.5rem; padding: 0;
  color: #fff; background: #0f2042;
  border: 3px solid #fff; border-radius: 50%;
  box-shadow: 0 0 0 2px #0f2042, 0 6px 18px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}
.a11y-btn:hover { background: #1d3566; }
.a11y-btn svg { inline-size: 2rem; block-size: 2rem; }
.a11y-btn:focus-visible { outline: 3px solid #0f2042; outline-offset: 5px; box-shadow: 0 0 0 2px #fff, 0 0 0 8px #0f2042; }

/* ---------- Panel ---------- */
.a11y-panel {
  position: fixed; inset-block-end: 5.25rem; inset-inline-end: 1rem; z-index: 100;
  inline-size: min(22rem, calc(100vw - 2rem));
  max-block-size: calc(100dvh - 6.5rem);
  display: flex; flex-direction: column;
  background: #fff; color: #111827;
  border: 2px solid #0f2042; border-radius: 1rem;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.4);
  font-family: var(--font, Arial, sans-serif); font-size: 1rem; line-height: 1.4;
}
.a11y-panel[hidden] { display: none; }
.a11y-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.75rem 1rem; background: #0f2042; color: #fff; border-start-start-radius: 0.75rem; border-start-end-radius: 0.75rem; }
.a11y-panel__head h2 { margin: 0; font-size: 1.125rem; font-weight: 700; color: #fff; font-family: inherit; }
.a11y-close { inline-size: 2.5rem; block-size: 2.5rem; font: inherit; font-size: 1.5rem; line-height: 1; color: #fff; background: transparent; border: 2px solid #fff; border-radius: 50%; cursor: pointer; }
.a11y-close:hover { background: rgba(255, 255, 255, 0.15); }
.a11y-close:focus-visible, .a11y-panel__head a:focus-visible { outline-color: #fff; box-shadow: 0 0 0 6px #0f2042; }
.a11y-panel__body { overflow-y: auto; padding: 1rem; display: grid; gap: 1rem; }
.a11y-group { margin: 0; padding: 0; border: 0; min-inline-size: 0; }
.a11y-group legend { padding: 0; margin-block-end: 0.5rem; font-weight: 700; }
.a11y-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
.a11y-opt {
  display: flex; align-items: center; justify-content: center; gap: 0.375rem; text-align: center;
  min-block-size: 2.75rem; padding: 0.375rem 0.5rem;
  font: inherit; font-size: 0.9375rem; font-weight: 600; color: #111827;
  background: #fff; border: 2px solid #4b5563; border-radius: 0.5rem; cursor: pointer;
}
.a11y-opt:hover { background: #eef2ff; }
.a11y-opt[aria-pressed="true"] { background: #0f2042; color: #fff; border-color: #0f2042; }
.a11y-opt[aria-pressed="true"]::before { content: "✓"; font-weight: 800; }   /* state is not conveyed by colour alone */
.a11y-opt:disabled { opacity: 0.55; cursor: not-allowed; }
.a11y-size { display: flex; align-items: center; gap: 0.5rem; }
.a11y-size .a11y-opt { flex: 1; }
.a11y-size output { min-inline-size: 3.5rem; text-align: center; font-weight: 700; }
.a11y-reset { background: #fef3f2; border-color: #b42318; color: #7a1a12; }
.a11y-reset:hover { background: #fee4e2; }
.a11y-link { display: inline-block; font-weight: 700; color: #0f2042; text-decoration: none; }
.a11y-link:hover { color: #4a5f8c; }
.a11y-status { margin: 0; font-size: 0.875rem; color: #4b5563; min-block-size: 1.25rem; }

/* ---------- Adjustments ---------- */
html.a11y-gray { filter: grayscale(1); }
html.a11y-invert { filter: invert(1) hue-rotate(180deg); }
html.a11y-invert.a11y-gray { filter: invert(1) hue-rotate(180deg) grayscale(1); }
html.a11y-invert img, html.a11y-invert video { filter: invert(1) hue-rotate(180deg); }

/* High contrast: black background, white text, yellow links */
html.a11y-contrast body, html.a11y-contrast body *:not(svg):not(svg *):not(img) {
  background-color: #000 !important; background-image: none !important;
  color: #fff !important; border-color: #fff !important; box-shadow: none !important; text-shadow: none !important;
}
html.a11y-contrast a, html.a11y-contrast a * { color: #ffff00 !important; }
html.a11y-contrast .btn, html.a11y-contrast .a11y-opt, html.a11y-contrast .control, html.a11y-contrast .sector-card { border: 2px solid #fff !important; }
html.a11y-contrast .btn { color: #fff !important; }
html.a11y-contrast .a11y-opt[aria-pressed="true"] { background-color: #fff !important; color: #000 !important; }
html.a11y-contrast .logo-row img, html.a11y-contrast .brand img, html.a11y-contrast .footer-col--brand img { background: #fff !important; padding: 0.25rem; border-radius: 0.25rem; }
html.a11y-contrast :focus-visible { outline: 4px solid #ffff00 !important; outline-offset: 3px; }
html.a11y-contrast .metric__icon img, html.a11y-contrast .feature__icon img { background: #fff !important; border-radius: 50%; }

html.a11y-links a, html.a11y-links button.link-btn {
  background: #ffff00 !important; color: #000 !important;
  text-decoration: underline !important; text-decoration-thickness: 2px !important;
  outline: 2px solid #000; outline-offset: 1px;
}
html.a11y-headings h1, html.a11y-headings h2, html.a11y-headings h3, html.a11y-headings h4 {
  background: #fff3bf !important; color: #000 !important;
  outline: 3px solid #0f2042; outline-offset: 2px; padding-inline: 0.25em;
}
html.a11y-font, html.a11y-font body, html.a11y-font body * { font-family: Arial, "Arial Hebrew", Helvetica, sans-serif !important; }
html.a11y-spacing body, html.a11y-spacing body * { line-height: 1.9 !important; letter-spacing: 0.04em !important; word-spacing: 0.12em !important; }
html.a11y-align body, html.a11y-align body * { text-align: start !important; }
html.a11y-focus :focus, html.a11y-focus :focus-visible { outline: 4px solid #ff0080 !important; outline-offset: 3px !important; box-shadow: 0 0 0 7px #fff !important; }
html.a11y-cursor, html.a11y-cursor * {
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'><path d='M6 3v34l9-8 6 14 7-3-6-13h13z' fill='black' stroke='white' stroke-width='3' stroke-linejoin='round'/></svg>") 6 3, auto !important;
}
html.a11y-pause *, html.a11y-pause *::before, html.a11y-pause *::after {
  animation: none !important; transition: none !important; scroll-behavior: auto !important;
}
html.a11y-pause video { display: none; }

@media (max-width: 47.99rem) {
  .a11y-btn { inline-size: 3rem; block-size: 3rem; inset-block-end: 0.75rem; inset-inline-end: 0.75rem; }
  .a11y-panel { inset-block-end: 4.5rem; inset-inline-end: 0.5rem; }
}
@media print { .a11y-btn, .a11y-panel { display: none !important; } }

/* keep the transparent, line-free header at the top of the page in high-contrast mode too */
html.a11y-contrast body header.site-header:not(.is-scrolled):not(.x) { border-color: transparent !important; }
