/* Accessibility widget + cookie banner (see /js/a11y.js and /js/cookie-banner.js).
   Fogless styling: navy surfaces, 1px hairlines, amber accents, 8px corners, no shadows. */

/* ── TEXT SIZE: the page wrapper is zoomed; the widget and banner sit outside it ── */
.a11y-scale { zoom: var(--a11y-zoom, 1); }

/* ── HIGH CONTRAST: the page is styled inline, so override by matching the inline colors ── */
.a11y-contrast body,
.a11y-contrast .a11y-scale,
.a11y-contrast [style*="background: #0"],
.a11y-contrast [style*="background: #132C50"] { background: #000000 !important; }
.a11y-contrast [style*="color: #94A3B8"],
.a11y-contrast [style*="color: #C3CDDA"],
.a11y-contrast .fl-navlink,
.a11y-contrast .cookie-banner p { color: #FFFFFF !important; }
.a11y-contrast [style*="#1C3152"],
.a11y-contrast [style*="#2E4566"] { border-color: rgba(255, 255, 255, .75) !important; }
.a11y-contrast [style*="background: #1C3152"] { background: rgba(255, 255, 255, .75) !important; }
.a11y-contrast ::placeholder { color: #E2E8F0 !important; }
.a11y-contrast .cookie-banner,
.a11y-contrast .a11y-panel,
.a11y-contrast .a11y-fab { background: #000000; border-color: rgba(255, 255, 255, .75); }
.a11y-contrast :focus-visible { outline: 3px solid #FFFFFF !important; outline-offset: 2px; }

/* ── REDUCE MOTION ── */
.a11y-reduce-motion *,
.a11y-reduce-motion *::before,
.a11y-reduce-motion *::after {
  animation-duration: .001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .001ms !important;
  scroll-behavior: auto !important;
}
.a11y-reduce-motion { scroll-behavior: auto !important; }

/* ── UNDERLINE LINKS (text links only, not buttons) ── */
.a11y-underline-links .a11y-scale a:not(.fl-pill):not(.fl-ghost),
.a11y-underline-links .cookie-banner a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── DYSLEXIA-FRIENDLY FONT ── */
.a11y-dyslexia-font,
.a11y-dyslexia-font * {
  font-family: "Atkinson Hyperlegible", "Hanken Grotesk", ui-sans-serif, system-ui, sans-serif !important;
}

/* ── THE WIDGET ── */
.a11y-vh {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.a11y-widget {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 9998;
  font-family: 'Hanken Grotesk', 'General Sans', ui-sans-serif, system-ui, sans-serif;
}
.a11y-fab {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  border: 1px solid #2E4566;
  background: #0F2340;
  color: #F5A524;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: border-color .15s;
}
.a11y-fab:hover,
.a11y-fab[aria-expanded="true"] { border-color: #F5A524; }
.a11y-panel {
  position: absolute;
  left: 0;
  bottom: calc(100% + 12px);
  width: 272px;
  max-width: calc(100vw - 40px);
  box-sizing: border-box;
  padding: 18px;
  border-radius: 8px;
  border: 1px solid #2E4566;
  background: #0F2340;
  color: #F2F5F8;
}
.a11y-panel[hidden] { display: none; }
.a11y-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.a11y-panel-head h2 {
  margin: 0;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #F5A524;
}
.a11y-panel-close {
  background: transparent;
  border: 0;
  color: #94A3B8;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 8px;
}
.a11y-panel-close:hover { color: #F2F5F8; }
.a11y-row,
.a11y-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid #1C3152;
}
.a11y-row { border-top: 0; padding-top: 0; }
.a11y-toggle-row { cursor: pointer; }
.a11y-row-label { font-size: 14px; color: #F2F5F8; }
.a11y-stepper { display: flex; align-items: center; gap: 4px; }
.a11y-stepper button {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid #2E4566;
  background: transparent;
  color: #F2F5F8;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}
.a11y-stepper button:hover { border-color: #F5A524; }
.a11y-switch { position: relative; display: inline-flex; width: 40px; height: 22px; flex-shrink: 0; }
.a11y-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.a11y-switch span {
  position: absolute;
  inset: 0;
  border-radius: 4px;
  background: #0A1A30;
  border: 1px solid #2E4566;
  transition: background-color .15s, border-color .15s;
}
.a11y-switch span::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 2px;
  background: #94A3B8;
  transition: transform .15s, background-color .15s;
}
.a11y-switch input:checked + span { border-color: #F5A524; }
.a11y-switch input:checked + span::before { transform: translateX(18px); background: #F5A524; }
.a11y-switch input:focus-visible + span { outline: 2px solid #F5A524; outline-offset: 2px; }
.a11y-reset-all {
  width: 100%;
  margin-top: 14px;
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid #FFFFFF;
  background: transparent;
  color: #F2F5F8;
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color .15s;
}
.a11y-reset-all:hover { border-color: #F5A524; }
.a11y-widget button:focus-visible { outline: 2px solid #F5A524; outline-offset: 2px; }

/* ── COOKIE BANNER ── */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  padding: 18px max(16px, calc((100vw - 1200px) / 2 + 16px));
  background: #0F2340;
  border-top: 1px solid #2E4566;
  font-family: 'Hanken Grotesk', 'General Sans', ui-sans-serif, system-ui, sans-serif;
  transition: opacity .26s ease, transform .26s ease;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner.is-dismissing { opacity: 0; transform: translateY(10px); pointer-events: none; }
.cookie-banner p {
  margin: 0;
  flex: 1 1 420px;
  font-size: 14px;
  line-height: 1.6;
  color: #C3CDDA;
}
.cookie-banner a { color: #F2F5F8; text-decoration: none; border-bottom: 1px solid #F5A524; }
.cookie-banner a:hover { color: #F2F5F8; }
.cookie-banner a:focus-visible,
.cookie-banner-btn:focus-visible { outline: 2px solid #F5A524; outline-offset: 2px; }
.cookie-banner-btn {
  flex-shrink: 0;
  min-height: 44px;
  padding: 0 26px;
  border: 0;
  border-radius: 8px;
  background: #FFFFFF;
  color: #0A1A30;
  font-family: inherit;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color .15s ease-out, color .15s ease-out;
}
.cookie-banner-btn:hover { background: #B0141C; color: #FFFFFF; }
@media (max-width: 640px) {
  .a11y-widget { left: 14px; }
  .cookie-banner { padding: 16px; }
  .cookie-banner p { flex-basis: 100%; }
  .cookie-banner-btn { width: 100%; }
}
@media print {
  .a11y-widget, .cookie-banner { display: none !important; }
}
