/* Accessibility menu (bottom corner, opposite the contact buttons) and the
   page-wide modes it switches on. The modes are classes on <html>, set by
   js/accessibility.js. */

.accessibility { position: fixed; inset-inline-end: 1rem; bottom: 1rem; z-index: 7; }

.accessibility-toggle {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.25);
  cursor: pointer;
}
.accessibility-toggle svg { width: 1.6rem; height: 1.6rem; }

.accessibility-panel {
  position: absolute;
  bottom: calc(100% + 0.6rem);
  inset-inline-end: 0;
  display: grid;
  gap: 0.4rem;
  width: 15rem;
  padding: 0.9rem;
  border: 1px solid var(--stainless);
  border-radius: var(--radius-small);
  background: var(--white);
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.2);
}
.accessibility-panel[hidden] { display: none; }

.accessibility-head { display: flex; align-items: center; justify-content: space-between; }
.accessibility-head h2 { font-size: var(--text-large); }
.accessibility-head button { width: 2.25rem; height: 2.25rem; border: 0; border-radius: 50%; background: none; cursor: pointer; }

.accessibility-panel [data-setting], .accessibility-reset {
  min-height: 2.6rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--stainless-dark);
  border-radius: var(--radius-small);
  background: var(--white);
  color: var(--ink);
  font: 500 var(--text-body) / 1.2 var(--font-body);
  text-align: start;
  cursor: pointer;
}
.accessibility-panel [aria-pressed='true'] { background: var(--navy); border-color: var(--navy); color: var(--white); }
.accessibility-reset { text-align: center; }
.accessibility-panel a { justify-self: center; font-size: var(--text-small); }

/* Modes */
html.text-large { font-size: 112.5%; }
html.text-larger { font-size: 125%; }

html.underline-links a { text-decoration: underline !important; text-underline-offset: 3px; }

html.no-motion *, html.no-motion *::before, html.no-motion *::after {
  transition: none !important;
  animation: none !important;
  scroll-behavior: auto !important;
}

/* With animations stopped, the logo row becomes a normal sideways-scrolling row. */
html.no-motion .logo-marquee { overflow-x: auto; mask-image: none; }
html.no-motion .logo-track li[aria-hidden='true'] { display: none; }

/* High contrast: darker greys, pure white surfaces, solid borders. */
html.high-contrast {
  --frost: #ffffff;
  --stainless: #5b6670;
  --stainless-dark: #15212d;
  --ink-soft: #15212d;
  --steel-blue: #0b3d75;
  --mode-cool: #0b4a6e;
  --mode-heat: #6b3a05;
}
html.high-contrast .plate { background: #ffffff; }
html.high-contrast .plate dt, html.high-contrast .plate dd { text-shadow: none; color: #000000; }
