/* ==========================================================================
   Albertini Tuning — accessibility widget + accessibility state overrides.
   Matches the carbon/brand-blue system; also works standalone on the legal
   pages, which don't load styles.css.
   ========================================================================== */

.a11y-btn,
.a11y-panel { font-family: 'Assistant', system-ui, sans-serif; }

/* ---------- Floating button ----------
   Brand blue rather than ink: the page alternates carbon and near-black
   sections, and an ink-coloured button disappears over them. */
.a11y-btn {
  position: fixed;
  inset-inline-start: 18px;
  bottom: 18px;
  z-index: 9950;
  width: 54px;
  height: 54px;
  padding: 0;
  border: 1.5px solid #245BFF;
  border-radius: 50%;
  background: #245BFF;
  color: #FFFFFF;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 14px 32px -12px rgba(36, 91, 255, .6);
  transition: transform .3s ease, background .3s ease, border-color .3s ease;
}
.a11y-btn:hover { transform: scale(1.07); background: #1741D6; border-color: #1741D6; }
.a11y-btn:focus-visible { outline: 2px solid #5B85FF; outline-offset: 3px; }

/* ---------- Panel ---------- */
.a11y-panel {
  position: fixed;
  inset-inline-start: 18px;
  bottom: 84px;
  z-index: 9951;
  width: 304px;
  max-width: calc(100vw - 36px);
  padding: 21px;
  background: #14161C;
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 34px 74px -30px #000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(.97);
  transform-origin: bottom right;
  transition: opacity .28s ease, transform .28s ease, visibility .28s ease;
}
.a11y-panel.is-open { opacity: 1; visibility: visible; transform: none; }

.a11y-title {
  margin: 0 0 14px;
  font-family: 'Frank Ruhl Libre', Georgia, serif;
  font-weight: 900;
  font-size: 19px;
  letter-spacing: -.02em;
  color: #F4F5F7;
}
.a11y-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  font-size: 14.5px;
  font-weight: 500;
  color: rgba(244, 245, 247, .78);
}
.a11y-seg {
  display: inline-flex;
  padding: 3px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .1);
}
.a11y-chip {
  padding: 6px 12px;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: rgba(244, 245, 247, .55);
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.a11y-chip:hover { color: #fff; }
.a11y-chip[aria-pressed="true"] { background: #245BFF; color: #fff; }
.a11y-chip:focus-visible { outline: 2px solid #5B85FF; outline-offset: 2px; }

.a11y-reset {
  width: 100%;
  margin-top: 14px;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: #F4F5F7;
  cursor: pointer;
  transition: background .2s ease;
}
.a11y-reset:hover { background: rgba(255, 255, 255, .08); }

.a11y-statement {
  display: block;
  margin-top: 10px;
  text-align: center;
  font-size: 13px;
  color: rgba(244, 245, 247, .55);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.a11y-statement:hover { color: #5B85FF; }

/* ==========================================================================
   Accessibility state overrides
   ========================================================================== */

/* Larger text — scales page blocks, never the widget itself. */
[data-text="large"] body > *:not(.a11y-btn):not(.a11y-panel):not(.skip):not(.grain):not(.ldr) { zoom: 1.12; }

/* High contrast — lift the muted inks so body copy passes AA comfortably.
   `html[...]` so these outrank the page's own :root block. */
html[data-contrast="high"] {
  --ink-2: #FFFFFF;
  --ink-3: rgba(255, 255, 255, .88);
  --ink-4: rgba(255, 255, 255, .7);
  --line: rgba(255, 255, 255, .42);
  --line-2: rgba(255, 255, 255, .3);
}
html[data-contrast="high"] .grain { display: none; }
html[data-contrast="high"] .hero__veil {
  background: linear-gradient(to top, #0A0B0D 10%, rgba(10, 11, 13, .94) 45%, rgba(10, 11, 13, .8) 100%);
}

/* Emphasise links */
[data-links="on"] a:not(.a11y-statement) {
  text-decoration: underline !important;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}

/* Stop motion */
[data-motion="off"] { scroll-behavior: auto !important; }
[data-motion="off"] *,
[data-motion="off"] *::before,
[data-motion="off"] *::after {
  animation: none !important;
  transition: none !important;
}

@media (max-width: 480px) {
  .a11y-btn { width: 48px; height: 48px; inset-inline-start: 14px; bottom: 14px; }
  .a11y-panel { inset-inline-start: 14px; bottom: 74px; }
}
