/* Accessibility menu widget: a floating trigger at the bottom-left that opens a
   side panel of preferences. Self-contained and removable — delete this file,
   a11y.js and their tags to drop the feature. Colours follow the site's pink
   palette (--accent), with a fallback for pages that don't define one. */

:root { --a11y-accent: #ff6fa5; }

.a11y-widget { position: fixed; left: 16px; bottom: 16px; z-index: 1000; }
.a11y-trigger {
  background: #2a1a20; color: #ffb3ce; border: 1px solid #5a3646; border-radius: 6px;
  padding: 6px 10px; font-size: 0.9rem; cursor: pointer; user-select: none;
}
.a11y-trigger:hover { border-color: var(--accent, var(--a11y-accent)); }
.a11y-trigger::after { content: ' ▸'; }
.a11y-widget.pinned .a11y-trigger::after { content: ' ▾'; }
/* Icon-only mode: collapse the trigger to just the ♿ glyph. */
.a11y-compact .a11y-trigger-label { display: none; }
.a11y-compact .a11y-trigger::after { content: none; }
.a11y-compact .a11y-trigger { padding: 6px 9px; font-size: 1.1rem; }
.a11y-panel {
  position: absolute; left: 0; bottom: 100%; margin-bottom: 8px; width: 240px;
  background: #1b1216; border: 1px solid #5a3646; border-radius: 8px;
  padding: 12px 14px; display: none; flex-direction: column; gap: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}
.a11y-widget.pinned .a11y-panel { display: flex; }
.a11y-panel h2 { margin: 0; font-size: 1.05rem; color: #ff9ec7; }
.a11y-row { display: flex; align-items: center; gap: 8px; }
.a11y-row label { cursor: pointer; }
.a11y-row .a11y-value { margin-left: auto; color: #ff9ec7; font-variant-numeric: tabular-nums; }
.a11y-panel button {
  background: #2a1a20; color: #ffb3ce; border: 1px solid #5a3646; border-radius: 6px;
  padding: 4px 10px; cursor: pointer;
}
.a11y-panel button:hover { border-color: var(--accent, var(--a11y-accent)); }
.a11y-reset { align-self: flex-start; }
.a11y-statement-link { color: #ff9ec7; font-size: 0.9rem; }
/* Close button (× in the panel corner) and the restore handle shown once hidden. */
.a11y-close {
  position: absolute; top: 8px; right: 8px; width: 24px; height: 24px;
  padding: 0; line-height: 1; font-size: 1.1rem; background: transparent;
  color: #ff9ec7; border: 1px solid #5a3646; border-radius: 6px; cursor: pointer;
}
.a11y-close:hover { border-color: var(--accent, var(--a11y-accent)); }
.a11y-restore {
  display: none; background: #2a1a20; color: #ffb3ce; border: 1px solid #5a3646;
  border-radius: 6px; padding: 4px 8px; font-size: 1rem; cursor: pointer; opacity: 0.6;
}
.a11y-restore:hover { opacity: 1; border-color: var(--accent, var(--a11y-accent)); }
.a11y-widget.a11y-hidden .a11y-trigger,
.a11y-widget.a11y-hidden .a11y-panel { display: none; }
.a11y-widget.a11y-hidden .a11y-restore { display: block; }

/* High-contrast mode: black background, white text, yellow accents, and solid
   borders on the surfaces that are otherwise distinguished only by shade. */
.a11y-contrast body { background: #000; color: #fff; }
.a11y-contrast .a11y-panel,
.a11y-contrast .a11y-panel button,
.a11y-contrast .nav-link,
.a11y-contrast .a11y-trigger { background: #000; color: #fff; border-color: #fff; }
.a11y-contrast .page-title,
.a11y-contrast .statement h2,
.a11y-contrast .a11y-panel h2,
.a11y-contrast .a11y-value,
.a11y-contrast .a11y-statement-link { color: #ff0; }
.a11y-contrast a { color: #ff0; }

.a11y-underline a { text-decoration: underline; }

.a11y-no-motion *,
.a11y-no-motion *::before,
.a11y-no-motion *::after {
  transition: none !important;
  animation: none !important;
  scroll-behavior: auto !important;
}
