/* =========================================================================
   HYVE ALPHA — Accessibility layer
   Provides: light mode, 4 colorblind modes, larger-text mode
   Applied via classes on <html>:
     .a11y-light             — bright theme
     .a11y-cb-protanopia     — red-blind filter
     .a11y-cb-deuteranopia   — green-blind filter
     .a11y-cb-tritanopia     — blue-blind filter
     .a11y-cb-achromatopsia  — full color blind (greyscale + high contrast)
     .a11y-large             — +15% font size
   ========================================================================= */

/* ───────── Draggable accessibility button ───────── */
/* Default position is the left edge of the page header. The user can drag it
   anywhere with their mouse and the new position is persisted to localStorage. */
.a11y-fab{
  position:fixed;top:14px;left:14px;z-index:999999;
  width:38px;height:38px;border-radius:50%;
  background:linear-gradient(145deg,#d4af37,#b8941f);
  color:#000;border:2px solid #000;
  font-size:18px;font-weight:900;
  cursor:grab;
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 4px 18px rgba(0,0,0,0.6), 0 0 0 1px rgba(212,175,55,0.35);
  transition:box-shadow 0.15s;
  font-family:system-ui,-apple-system,sans-serif;
  user-select:none;-webkit-user-select:none;
  touch-action:none;
}
.a11y-fab:hover{box-shadow:0 6px 24px rgba(212,175,55,0.45)}
.a11y-fab:active,.a11y-fab.dragging{cursor:grabbing}
.a11y-fab.dragging{box-shadow:0 10px 32px rgba(212,175,55,0.6)}

/* In-nav variant — locked into the page's nav element, not draggable,
   smaller so it fits the nav height cleanly. */
.a11y-fab.a11y-fab-in-nav{
  position:static !important;
  width:28px;height:28px;font-size:14px;
  cursor:pointer;
  margin:0 6px;
  vertical-align:middle;
  display:inline-flex;
  flex-shrink:0;
}

/* ───────── Panel ───────── */
/* Panel position is computed in JS to follow the FAB after drag. */
.a11y-panel{
  position:fixed;top:62px;left:14px;z-index:999998;
  width:300px;max-width:calc(100vw - 36px);
  background:#0a0a0a;
  border:1px solid #2a2a2a;
  border-radius:14px;
  padding:18px 18px 14px;
  box-shadow:0 20px 60px rgba(0,0,0,0.8), 0 0 0 1px rgba(212,175,55,0.2);
  color:#fff;
  font-family:system-ui,-apple-system,sans-serif;
  font-size:13px;
  display:none;
  max-height:calc(100vh - 120px);
  overflow-y:auto;
}
.a11y-panel.open{display:block;animation:a11yIn 0.18s ease-out}
@keyframes a11yIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
.a11y-panel h3{
  font-size:10px;color:#d4af37;text-transform:uppercase;letter-spacing:2px;
  font-weight:800;margin:0 0 10px;
}
.a11y-panel .a11y-section{margin-bottom:14px}
.a11y-panel .a11y-section:last-child{margin-bottom:0}
.a11y-panel label{
  display:block;font-size:9px;color:#888;text-transform:uppercase;
  letter-spacing:1.2px;margin-bottom:6px;font-weight:700;
}
.a11y-row{display:flex;gap:6px;flex-wrap:wrap}
.a11y-btn{
  flex:1;min-width:0;
  padding:9px 10px;
  background:#1a1a1a;
  color:#ccc;
  border:1px solid #2a2a2a;
  border-radius:8px;
  font-size:11px;font-weight:700;
  cursor:pointer;
  transition:all 0.12s;
  font-family:inherit;
  text-align:center;
  line-height:1.2;
}
.a11y-btn:hover{background:#222;color:#fff;border-color:#3a3a3a}
.a11y-btn.active{
  background:#d4af37;color:#000;border-color:#d4af37;
  box-shadow:0 0 0 2px rgba(212,175,55,0.25);
}
.a11y-select{
  width:100%;
  padding:9px 10px;
  background:#1a1a1a;
  color:#fff;
  border:1px solid #2a2a2a;
  border-radius:8px;
  font-size:12px;
  font-family:inherit;
  cursor:pointer;
}
.a11y-close{
  position:absolute;top:10px;right:12px;
  background:transparent;border:none;color:#888;font-size:18px;cursor:pointer;
  width:24px;height:24px;line-height:1;
}
.a11y-close:hover{color:#fff}
.a11y-footer{
  margin-top:10px;padding-top:10px;border-top:1px solid #1a1a1a;
  font-size:9px;color:#555;text-align:center;letter-spacing:0.5px;
}

/* ═══════════════════════════════════════════════════════════════
   LIGHT MODE — aggressive dark-to-light override
   Uses high-specificity universal selectors to catch the thousands
   of hardcoded dark colors without refactoring every stylesheet.
   ═══════════════════════════════════════════════════════════════ */
html.a11y-light{background:#f5f5f5 !important}
html.a11y-light body{background:#f5f5f5 !important;color:#111 !important}

/* Any element with a near-black background gets flipped to white-ish */
html.a11y-light *{
  /* Don't force on everything — we use targeted rules below */
}

/* Backgrounds: map common dark tones to light */
html.a11y-light [style*="background:#000"],
html.a11y-light [style*="background:#010"],
html.a11y-light [style*="background:#020"],
html.a11y-light [style*="background:#050"],
html.a11y-light [style*="background:#0a0"],
html.a11y-light [style*="background:#111"],
html.a11y-light [style*="background:#1a1"],
html.a11y-light [style*="background-color:#000"],
html.a11y-light [style*="background-color:#050"],
html.a11y-light [style*="background-color:#0a"]{
  background:#ffffff !important;
  background-color:#ffffff !important;
}

/* Text: map common light-on-dark tones to dark */
html.a11y-light [style*="color:#fff"],
html.a11y-light [style*="color:#eee"],
html.a11y-light [style*="color:#ddd"],
html.a11y-light [style*="color:#ccc"],
html.a11y-light [style*="color:#bbb"],
html.a11y-light [style*="color:#aaa"],
html.a11y-light [style*="color:#999"],
html.a11y-light [style*="color:#888"],
html.a11y-light [style*="color:#777"]{
  color:#222 !important;
}

/* Muted greys stay readable */
html.a11y-light [style*="color:#666"],
html.a11y-light [style*="color:#555"],
html.a11y-light [style*="color:#444"],
html.a11y-light [style*="color:#333"]{
  color:#555 !important;
}

/* Gold accents darken for contrast on white */
html.a11y-light [style*="color:#d4af37"],
html.a11y-light [style*="color:#c49e2a"],
html.a11y-light [style*="color:#b8941f"]{
  color:#8a6a10 !important;
}

/* CSS-rule-defined elements (not just inline-style) — broad catch */
html.a11y-light nav,
html.a11y-light header,
html.a11y-light footer,
html.a11y-light section,
html.a11y-light article,
html.a11y-light aside,
html.a11y-light main,
html.a11y-light div,
html.a11y-light form{
  background-color:transparent;
}
html.a11y-light body,
html.a11y-light .page,
html.a11y-light .chat-surface,
html.a11y-light .hero,
html.a11y-light .section{
  background:#f5f5f5 !important;
  color:#111 !important;
}

/* Common card containers */
html.a11y-light .card,
html.a11y-light .panel,
html.a11y-light .box,
html.a11y-light .legend,
html.a11y-light .chat-input-row,
html.a11y-light .chat-topbar,
html.a11y-light .chat-disclaimer,
html.a11y-light .chat-msg{
  background:#ffffff !important;
  border-color:#d0d0d0 !important;
  color:#111 !important;
}
html.a11y-light .chat-msg.user{background:#fff5d6 !important;color:#111 !important}
html.a11y-light .chat-msg.assistant{background:#ffffff !important;color:#111 !important}
html.a11y-light .chat-msg.system{background:#fff4e5 !important;color:#8a4a00 !important;border-color:#f0cc8a !important}

html.a11y-light input,
html.a11y-light textarea,
html.a11y-light select{
  background:#ffffff !important;
  color:#111 !important;
  border-color:#c0c0c0 !important;
}
html.a11y-light input::placeholder,
html.a11y-light textarea::placeholder{color:#888 !important}

html.a11y-light button:not(.a11y-btn):not(.a11y-close):not(.a11y-fab){
  color:#111;
}

/* Navbar */
html.a11y-light nav{background:rgba(255,255,255,0.92) !important;border-bottom-color:#e0e0e0 !important}
html.a11y-light nav a{color:#333 !important}
html.a11y-light nav a:hover{color:#000 !important}

/* Links become blue in light mode for discoverability */
html.a11y-light a{color:#0055aa}
html.a11y-light a:visited{color:#663399}
html.a11y-light a:hover{color:#003377}

/* Scrollbar */
html.a11y-light ::-webkit-scrollbar-thumb{background:#bbb !important}
html.a11y-light ::-webkit-scrollbar-track{background:#eee !important}

/* Keep the accessibility panel itself dark-themed for consistency */
html.a11y-light .a11y-panel{
  background:#ffffff !important;
  color:#111 !important;
  border-color:#d0d0d0 !important;
  box-shadow:0 20px 60px rgba(0,0,0,0.25), 0 0 0 1px rgba(212,175,55,0.3) !important;
}
html.a11y-light .a11y-panel h3{color:#8a6a10 !important}
html.a11y-light .a11y-panel label{color:#666 !important}
html.a11y-light .a11y-btn{background:#f0f0f0 !important;color:#333 !important;border-color:#d0d0d0 !important}
html.a11y-light .a11y-btn:hover{background:#e8e8e8 !important;color:#000 !important}
html.a11y-light .a11y-btn.active{background:#d4af37 !important;color:#000 !important;border-color:#b8941f !important}
html.a11y-light .a11y-close{color:#666 !important}
html.a11y-light .a11y-select{background:#fff !important;color:#111 !important;border-color:#d0d0d0 !important}
html.a11y-light .a11y-footer{color:#999 !important;border-top-color:#eee !important}

/* Images and logos: slight darkening to avoid glare */
html.a11y-light img[src*="logo"]{filter:brightness(0.88)}

/* ═══════════════════════════════════════════════════════════════
   COLORBLIND MODES — SVG filters applied to body.
   The FAB, panel, and SVG defs are attached directly to <html>
   (not body) so they sit OUTSIDE the filtered region and are
   always visible regardless of active colorblind mode.
   ═══════════════════════════════════════════════════════════════ */
html.a11y-cb-protanopia   body{filter:url(#a11y-protanopia)}
html.a11y-cb-deuteranopia body{filter:url(#a11y-deuteranopia)}
html.a11y-cb-tritanopia   body{filter:url(#a11y-tritanopia)}
html.a11y-cb-achromatopsia body{filter:grayscale(1) contrast(1.2)}

/* FAB + panel mounted on <html> — force them to still cover the viewport */
html > .a11y-fab,
html > .a11y-panel{position:fixed;z-index:2147483647}

/* ═══════════════════════════════════════════════════════════════════════════
   CUSTOM THEMES — each theme swaps the site's signature gold/black palette
   for a coordinated alternative. All themes use !important overrides so they
   win against hardcoded per-page inline styles. Themes DO NOT replace the
   light/dark base — they stack on top (e.g. html.a11y-theme-forest).
   Active theme classes: midnight, forest, sunset, matrix, lavender, mono.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ───────── 🌌 MIDNIGHT BLUE — dark deep-blue/silver accent ───────── */
html.a11y-theme-midnight body { background: #020614 !important; color: #d4e1ff !important }
html.a11y-theme-midnight nav, html.a11y-theme-midnight header,
html.a11y-theme-midnight .top, html.a11y-theme-midnight .top-bar { background: #030a1e !important; border-bottom-color: rgba(90,150,255,0.2) !important }
html.a11y-theme-midnight a,
html.a11y-theme-midnight [style*="color:#d4af37"], html.a11y-theme-midnight [style*="color: #d4af37"] { color: #7aa8ff !important }
html.a11y-theme-midnight [style*="color:#f5c542"], html.a11y-theme-midnight [style*="color:#ffd76b"] { color: #a8c8ff !important }
html.a11y-theme-midnight [style*="color:#f4e5ba"] { color: #d4e1ff !important }
html.a11y-theme-midnight [style*="color:#e0e0e0"], html.a11y-theme-midnight [style*="color:#ddd"], html.a11y-theme-midnight [style*="color:#ccc"] { color: #b8c8e8 !important }
html.a11y-theme-midnight [style*="color:#bbb"], html.a11y-theme-midnight [style*="color:#aaa"] { color: #8ca0c8 !important }
html.a11y-theme-midnight [style*="color:#888"], html.a11y-theme-midnight [style*="color:#999"] { color: #6878a0 !important }
html.a11y-theme-midnight [style*="color:#666"], html.a11y-theme-midnight [style*="color:#555"] { color: #4a5878 !important }
html.a11y-theme-midnight [style*="background:#080808"], html.a11y-theme-midnight [style*="background:#0a0703"], html.a11y-theme-midnight [style*="background:#050305"], html.a11y-theme-midnight [style*="background:#030306"], html.a11y-theme-midnight [style*="background:#020202"], html.a11y-theme-midnight [style*="background:#000"] { background: #040a20 !important }
html.a11y-theme-midnight button, html.a11y-theme-midnight .btn,
html.a11y-theme-midnight [style*="background:#d4af37"],
html.a11y-theme-midnight [style*="linear-gradient(135deg,#d4af37,#b89830)"],
html.a11y-theme-midnight [style*="linear-gradient(135deg,#ffd76b,#d4af37)"] { background: linear-gradient(135deg,#5a8cff,#2d5ed6) !important; color: #020614 !important }
html.a11y-theme-midnight [style*="border-color:rgba(212,175,55"],
html.a11y-theme-midnight [style*="border: 1px solid rgba(212,175,55"],
html.a11y-theme-midnight [style*="border:1px solid rgba(212,175,55"] { border-color: rgba(90,150,255,0.35) !important }
html.a11y-theme-midnight [style*="background:rgba(212,175,55"] { background: rgba(90,150,255,0.08) !important }

/* ───────── 🌲 FOREST — deep emerald greens ───────── */
html.a11y-theme-forest body { background: #02120a !important; color: #d6eedb !important }
html.a11y-theme-forest nav, html.a11y-theme-forest header,
html.a11y-theme-forest .top, html.a11y-theme-forest .top-bar { background: #041e12 !important; border-bottom-color: rgba(90,196,90,0.25) !important }
html.a11y-theme-forest a,
html.a11y-theme-forest [style*="color:#d4af37"], html.a11y-theme-forest [style*="color: #d4af37"] { color: #5ac45a !important }
html.a11y-theme-forest [style*="color:#f5c542"], html.a11y-theme-forest [style*="color:#ffd76b"] { color: #8dd68d !important }
html.a11y-theme-forest [style*="color:#f4e5ba"] { color: #d6eedb !important }
html.a11y-theme-forest [style*="color:#e0e0e0"], html.a11y-theme-forest [style*="color:#ddd"], html.a11y-theme-forest [style*="color:#ccc"] { color: #b8dcb8 !important }
html.a11y-theme-forest [style*="color:#bbb"], html.a11y-theme-forest [style*="color:#aaa"] { color: #8ab38a !important }
html.a11y-theme-forest [style*="color:#888"], html.a11y-theme-forest [style*="color:#999"] { color: #6a8a6a !important }
html.a11y-theme-forest [style*="color:#666"], html.a11y-theme-forest [style*="color:#555"] { color: #4a6a4a !important }
html.a11y-theme-forest [style*="background:#080808"], html.a11y-theme-forest [style*="background:#0a0703"], html.a11y-theme-forest [style*="background:#050305"], html.a11y-theme-forest [style*="background:#030306"], html.a11y-theme-forest [style*="background:#020202"], html.a11y-theme-forest [style*="background:#000"] { background: #061a10 !important }
html.a11y-theme-forest button, html.a11y-theme-forest .btn,
html.a11y-theme-forest [style*="background:#d4af37"],
html.a11y-theme-forest [style*="linear-gradient(135deg,#d4af37,#b89830)"],
html.a11y-theme-forest [style*="linear-gradient(135deg,#ffd76b,#d4af37)"] { background: linear-gradient(135deg,#5ac45a,#2d8a3c) !important; color: #02120a !important }
html.a11y-theme-forest [style*="border-color:rgba(212,175,55"],
html.a11y-theme-forest [style*="border:1px solid rgba(212,175,55"] { border-color: rgba(90,196,90,0.4) !important }
html.a11y-theme-forest [style*="background:rgba(212,175,55"] { background: rgba(90,196,90,0.1) !important }

/* ───────── 🌅 SUNSET — warm coral/orange ───────── */
html.a11y-theme-sunset body { background: #1a0a08 !important; color: #ffdbc9 !important }
html.a11y-theme-sunset nav, html.a11y-theme-sunset header,
html.a11y-theme-sunset .top, html.a11y-theme-sunset .top-bar { background: #210d0a !important; border-bottom-color: rgba(255,140,90,0.3) !important }
html.a11y-theme-sunset a,
html.a11y-theme-sunset [style*="color:#d4af37"], html.a11y-theme-sunset [style*="color: #d4af37"] { color: #ff9060 !important }
html.a11y-theme-sunset [style*="color:#f5c542"], html.a11y-theme-sunset [style*="color:#ffd76b"] { color: #ffb088 !important }
html.a11y-theme-sunset [style*="color:#f4e5ba"] { color: #ffdbc9 !important }
html.a11y-theme-sunset [style*="color:#e0e0e0"], html.a11y-theme-sunset [style*="color:#ddd"], html.a11y-theme-sunset [style*="color:#ccc"] { color: #ffc0a8 !important }
html.a11y-theme-sunset [style*="color:#bbb"], html.a11y-theme-sunset [style*="color:#aaa"] { color: #d4967a !important }
html.a11y-theme-sunset [style*="color:#888"], html.a11y-theme-sunset [style*="color:#999"] { color: #a07258 !important }
html.a11y-theme-sunset [style*="color:#666"], html.a11y-theme-sunset [style*="color:#555"] { color: #6e4a3a !important }
html.a11y-theme-sunset [style*="background:#080808"], html.a11y-theme-sunset [style*="background:#0a0703"], html.a11y-theme-sunset [style*="background:#050305"], html.a11y-theme-sunset [style*="background:#030306"], html.a11y-theme-sunset [style*="background:#020202"], html.a11y-theme-sunset [style*="background:#000"] { background: #240f0b !important }
html.a11y-theme-sunset button, html.a11y-theme-sunset .btn,
html.a11y-theme-sunset [style*="background:#d4af37"],
html.a11y-theme-sunset [style*="linear-gradient(135deg,#d4af37,#b89830)"],
html.a11y-theme-sunset [style*="linear-gradient(135deg,#ffd76b,#d4af37)"] { background: linear-gradient(135deg,#ff9060,#e34a28) !important; color: #1a0a08 !important }
html.a11y-theme-sunset [style*="border-color:rgba(212,175,55"],
html.a11y-theme-sunset [style*="border:1px solid rgba(212,175,55"] { border-color: rgba(255,140,90,0.4) !important }
html.a11y-theme-sunset [style*="background:rgba(212,175,55"] { background: rgba(255,140,90,0.1) !important }

/* ───────── 🖥️ MATRIX — neon green on pure black ───────── */
html.a11y-theme-matrix body { background: #000 !important; color: #00ff66 !important; font-family: 'Cascadia Code','Consolas',monospace !important }
html.a11y-theme-matrix nav, html.a11y-theme-matrix header,
html.a11y-theme-matrix .top, html.a11y-theme-matrix .top-bar { background: #000 !important; border-bottom-color: #00cc55 !important }
html.a11y-theme-matrix a,
html.a11y-theme-matrix [style*="color:#d4af37"], html.a11y-theme-matrix [style*="color: #d4af37"] { color: #00ff66 !important; text-shadow: 0 0 6px rgba(0,255,102,0.6) !important }
html.a11y-theme-matrix [style*="color:#f5c542"], html.a11y-theme-matrix [style*="color:#ffd76b"] { color: #88ff99 !important }
html.a11y-theme-matrix [style*="color:#f4e5ba"] { color: #aaff99 !important }
html.a11y-theme-matrix [style*="color:#e0e0e0"], html.a11y-theme-matrix [style*="color:#ddd"], html.a11y-theme-matrix [style*="color:#ccc"] { color: #66cc66 !important }
html.a11y-theme-matrix [style*="color:#bbb"], html.a11y-theme-matrix [style*="color:#aaa"] { color: #55aa55 !important }
html.a11y-theme-matrix [style*="color:#888"], html.a11y-theme-matrix [style*="color:#999"] { color: #448844 !important }
html.a11y-theme-matrix [style*="color:#666"], html.a11y-theme-matrix [style*="color:#555"] { color: #336633 !important }
html.a11y-theme-matrix [style*="background:#080808"], html.a11y-theme-matrix [style*="background:#0a0703"], html.a11y-theme-matrix [style*="background:#050305"], html.a11y-theme-matrix [style*="background:#030306"], html.a11y-theme-matrix [style*="background:#020202"] { background: #020 !important; border-color: rgba(0,255,102,0.15) !important }
html.a11y-theme-matrix button, html.a11y-theme-matrix .btn,
html.a11y-theme-matrix [style*="background:#d4af37"],
html.a11y-theme-matrix [style*="linear-gradient(135deg,#d4af37,#b89830)"],
html.a11y-theme-matrix [style*="linear-gradient(135deg,#ffd76b,#d4af37)"] { background: #002211 !important; color: #00ff66 !important; border: 1px solid #00ff66 !important; text-shadow: 0 0 4px rgba(0,255,102,0.8) !important }
html.a11y-theme-matrix [style*="border-color:rgba(212,175,55"],
html.a11y-theme-matrix [style*="border:1px solid rgba(212,175,55"] { border-color: rgba(0,255,102,0.5) !important }
html.a11y-theme-matrix [style*="background:rgba(212,175,55"] { background: rgba(0,255,102,0.08) !important }
html.a11y-theme-matrix input, html.a11y-theme-matrix textarea, html.a11y-theme-matrix select { background: #000 !important; color: #00ff66 !important; border-color: #00ff66 !important; font-family: 'Cascadia Code',monospace !important }

/* ───────── 💜 LAVENDER — soft purple, light-leaning ───────── */
html.a11y-theme-lavender body { background: #1a0f22 !important; color: #e5d5ff !important }
html.a11y-theme-lavender nav, html.a11y-theme-lavender header,
html.a11y-theme-lavender .top, html.a11y-theme-lavender .top-bar { background: #22152e !important; border-bottom-color: rgba(190,130,255,0.3) !important }
html.a11y-theme-lavender a,
html.a11y-theme-lavender [style*="color:#d4af37"], html.a11y-theme-lavender [style*="color: #d4af37"] { color: #c894ff !important }
html.a11y-theme-lavender [style*="color:#f5c542"], html.a11y-theme-lavender [style*="color:#ffd76b"] { color: #dfb6ff !important }
html.a11y-theme-lavender [style*="color:#f4e5ba"] { color: #e5d5ff !important }
html.a11y-theme-lavender [style*="color:#e0e0e0"], html.a11y-theme-lavender [style*="color:#ddd"], html.a11y-theme-lavender [style*="color:#ccc"] { color: #d0bcea !important }
html.a11y-theme-lavender [style*="color:#bbb"], html.a11y-theme-lavender [style*="color:#aaa"] { color: #a38dc0 !important }
html.a11y-theme-lavender [style*="color:#888"], html.a11y-theme-lavender [style*="color:#999"] { color: #7d6898 !important }
html.a11y-theme-lavender [style*="color:#666"], html.a11y-theme-lavender [style*="color:#555"] { color: #554368 !important }
html.a11y-theme-lavender [style*="background:#080808"], html.a11y-theme-lavender [style*="background:#0a0703"], html.a11y-theme-lavender [style*="background:#050305"], html.a11y-theme-lavender [style*="background:#030306"], html.a11y-theme-lavender [style*="background:#020202"], html.a11y-theme-lavender [style*="background:#000"] { background: #1e1226 !important }
html.a11y-theme-lavender button, html.a11y-theme-lavender .btn,
html.a11y-theme-lavender [style*="background:#d4af37"],
html.a11y-theme-lavender [style*="linear-gradient(135deg,#d4af37,#b89830)"],
html.a11y-theme-lavender [style*="linear-gradient(135deg,#ffd76b,#d4af37)"] { background: linear-gradient(135deg,#c894ff,#8c4ed9) !important; color: #1a0f22 !important }
html.a11y-theme-lavender [style*="border-color:rgba(212,175,55"],
html.a11y-theme-lavender [style*="border:1px solid rgba(212,175,55"] { border-color: rgba(200,148,255,0.4) !important }
html.a11y-theme-lavender [style*="background:rgba(212,175,55"] { background: rgba(200,148,255,0.1) !important }

/* ───────── ⚡ HIGH-CONTRAST MONO — pure black + pure white + one gold accent ───────── */
html.a11y-theme-mono body { background: #000 !important; color: #fff !important }
html.a11y-theme-mono nav, html.a11y-theme-mono header,
html.a11y-theme-mono .top, html.a11y-theme-mono .top-bar { background: #000 !important; border-bottom: 2px solid #fff !important }
html.a11y-theme-mono a { color: #ffd700 !important; text-decoration: underline !important }
html.a11y-theme-mono a:visited { color: #ffee88 !important }
html.a11y-theme-mono [style*="color:#d4af37"], html.a11y-theme-mono [style*="color: #d4af37"] { color: #ffd700 !important }
html.a11y-theme-mono [style*="color:#f5c542"], html.a11y-theme-mono [style*="color:#ffd76b"] { color: #fff2a0 !important }
html.a11y-theme-mono [style*="color:#f4e5ba"] { color: #fff !important }
html.a11y-theme-mono [style*="color:#e0e0e0"], html.a11y-theme-mono [style*="color:#ddd"], html.a11y-theme-mono [style*="color:#ccc"] { color: #fff !important }
html.a11y-theme-mono [style*="color:#bbb"], html.a11y-theme-mono [style*="color:#aaa"] { color: #eee !important }
html.a11y-theme-mono [style*="color:#888"], html.a11y-theme-mono [style*="color:#999"] { color: #ccc !important }
html.a11y-theme-mono [style*="color:#666"], html.a11y-theme-mono [style*="color:#555"] { color: #aaa !important }
html.a11y-theme-mono [style*="background:#080808"], html.a11y-theme-mono [style*="background:#0a0703"], html.a11y-theme-mono [style*="background:#050305"], html.a11y-theme-mono [style*="background:#030306"], html.a11y-theme-mono [style*="background:#020202"] { background: #000 !important; border: 2px solid #fff !important }
html.a11y-theme-mono button, html.a11y-theme-mono .btn,
html.a11y-theme-mono [style*="background:#d4af37"],
html.a11y-theme-mono [style*="linear-gradient(135deg,#d4af37,#b89830)"],
html.a11y-theme-mono [style*="linear-gradient(135deg,#ffd76b,#d4af37)"] { background: #ffd700 !important; color: #000 !important; border: 2px solid #ffd700 !important; font-weight: 900 !important }
html.a11y-theme-mono [style*="border-color:rgba(212,175,55"],
html.a11y-theme-mono [style*="border:1px solid rgba(212,175,55"] { border-color: #fff !important; border-width: 2px !important }
html.a11y-theme-mono [style*="background:rgba(212,175,55"] { background: #111 !important }
html.a11y-theme-mono * { font-weight: 700 !important }
html.a11y-theme-mono input, html.a11y-theme-mono textarea, html.a11y-theme-mono select { background: #000 !important; color: #fff !important; border: 2px solid #fff !important }

/* ───────── Large text mode ─────────
   Percent root font-size only affects rem/em based sizes, and this site uses
   hardcoded px everywhere. Use CSS zoom on body (supported in all modern
   browsers including Firefox 126+) to scale everything uniformly. */
html.a11y-large body{zoom:1.2}
/* Safari <16 fallback: transform scale on a wrapper would break layout, so
   we accept that very old Safari misses this one feature. Every current
   browser shipping since 2024 supports zoom. */

/* ───────── Translate widget customization ───────── */
/* Hide Google Translate's default UI clutter */
.goog-te-banner-frame,
#goog-gt-tt,
.goog-te-balloon-frame,
.skiptranslate{display:none !important}
body{top:0 !important}
.goog-tooltip,.goog-tooltip:hover{display:none !important}
.goog-text-highlight{background:transparent !important;box-shadow:none !important}
/* Google Translate needs the host element to actually render to set up its
   combo. Hide it offscreen instead of display:none so it initialises. */
#google_translate_element{position:absolute;left:-9999px;top:0;width:1px;height:1px;overflow:hidden;opacity:0}

/* Our custom translate chip in the panel */
.a11y-translate-note{font-size:9px;color:#666;margin-top:4px;font-style:italic}

/* Mobile tweak */
@media (max-width: 540px){
  .a11y-fab{top:10px;left:10px;width:34px;height:34px;font-size:16px}
  .a11y-panel{top:50px;left:10px;width:calc(100vw - 20px)}
}
