/* ============================================
   Ada-widget
   Ported verbatim from elevationmtg.com's Astra
   child theme so the marketing site has the same
   floating accessibility toolbar Reed built there.
   ============================================ */
#ada-skip-link {
  position: fixed;
  top: -60px;
  left: 12px;
  background: #1a56db;
  color: #fff;
  padding: 10px 18px;
  border-radius: 6px;
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  z-index: 99999;
  transition: top 0.15s;
}

#ada-skip-link:focus { top: 12px; }

#ada-trigger {
  position: fixed;
  bottom: 28px;
  left: 28px;
  width: 46px;
  height: 46px;
  border-radius: 23px;
  background: #1a56db;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 4px 16px rgba(26,86,219,0.38);
  z-index: 9999;
  transition: background 0.18s, transform 0.15s;
}

#ada-trigger:hover { background: #1245b8; transform: scale(1.04); }

#ada-trigger svg { width: 22px; height: 22px; fill: #fff; flex-shrink: 0; }

#ada-panel {
  position: fixed;
  bottom: 86px;
  left: 28px;
  width: 310px;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.16), 0 1.5px 4px rgba(0,0,0,0.08);
  z-index: 9998;
  font-family: 'Segoe UI', system-ui, sans-serif;
  transition: opacity 0.18s, transform 0.18s;
  opacity: 0;
  transform: translateY(12px) scale(0.97);
  pointer-events: none;
}

#ada-panel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

.ada-header {
  background: #1a56db;
  color: #fff;
  padding: 14px 16px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 2;
}

.ada-header span { font-size: 14px; font-weight: 600; }

.ada-header-right { display: flex; align-items: center; gap: 8px; }

.ada-shortcut-badge {
  font-size: 10px;
  background: rgba(255,255,255,0.18);
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
}

.ada-reset {
  font-size: 12px;
  color: rgba(255,255,255,0.8);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}

.ada-reset:hover { background: rgba(255,255,255,0.18); color: #fff; }

.ada-section { padding: 12px 16px; border-bottom: 1px solid #f0f0f0; }

.ada-section:last-child { border-bottom: none; }

.ada-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #888;
  margin-bottom: 8px;
}

.ada-btn-row { display: flex; gap: 6px; flex-wrap: wrap; }

.ada-btn {
  padding: 7px 12px;
  border-radius: 7px;
  border: 1.5px solid #dde2ed;
  background: #f7f8fc;
  color: #333;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
}

.ada-btn:hover { border-color: #1a56db; background: #eef2fc; }

.ada-btn.active { background: #1a56db; border-color: #1a56db; color: #fff; }

.ada-size-row { display: flex; align-items: center; gap: 8px; }

.ada-size-btn {
  width: 32px; height: 32px;
  border-radius: 7px;
  border: 1.5px solid #dde2ed;
  background: #f7f8fc;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-family: inherit;
}

.ada-size-btn:hover { border-color: #1a56db; background: #eef2fc; }

.ada-size-val { flex: 1; text-align: center; font-size: 13px; font-weight: 600; color: #1a56db; }

.ada-slider-row { margin-bottom: 10px; }

.ada-slider-row:last-child { margin-bottom: 0; }

.ada-slider-label { display: flex; justify-content: space-between; font-size: 12px; color: #555; margin-bottom: 4px; }

.ada-slider-label span { font-weight: 600; color: #1a56db; }

input[type=range].ada-range { width: 100%; height: 4px; cursor: pointer; accent-color: #1a56db; }

.ada-toggle-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }

.ada-toggle-row:last-child { margin-bottom: 0; }

.ada-toggle-label { font-size: 13px; color: #333; font-weight: 500; }

.ada-switch { position: relative; width: 38px; height: 21px; display: inline-block; flex-shrink: 0; }

.ada-switch input { opacity: 0; width: 0; height: 0; }

.ada-switch-slider {
  position: absolute; inset: 0;
  background: #cdd0da;
  border-radius: 21px;
  cursor: pointer;
  transition: background 0.18s;
}

.ada-switch-slider:before {
  content: '';
  position: absolute;
  width: 15px; height: 15px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.18s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.ada-switch input:checked + .ada-switch-slider { background: #1a56db; }

.ada-switch input:checked + .ada-switch-slider:before { transform: translateX(17px); }

.ada-font-select {
  width: 100%;
  padding: 7px 10px;
  border-radius: 7px;
  border: 1.5px solid #dde2ed;
  background: #f7f8fc;
  color: #333;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  outline: none;
}

.ada-font-select:focus { border-color: #1a56db; }

#ada-tts-btn {
  width: 100%;
  padding: 9px 12px;
  border-radius: 7px;
  border: 1.5px solid #dde2ed;
  background: #f7f8fc;
  color: #333;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

#ada-tts-btn:hover { border-color: #1a56db; background: #eef2fc; }

#ada-tts-btn.speaking { background: #1a56db; border-color: #1a56db; color: #fff; }

.ada-footer { padding: 10px 16px; background: #f7f8fc; }

.ada-wcag { font-size: 11px; color: #aaa; text-align: center; }

body.ada-hc { filter: contrast(1.55); }

body.ada-dark { background: #111; color: #f0f0f0; filter: none; }

body.ada-dark a { color: #7fb3ff; }

body.ada-grayscale { filter: grayscale(100%); }

body.ada-hc.ada-grayscale { filter: contrast(1.55) grayscale(100%); }

body.ada-large-cursor * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M5 2l20 13-8 1.5L22 28l-3 1-5-11.5L8 22z' fill='black' stroke='white' stroke-width='1.5'/%3E%3C/svg%3E") 4 2, auto;
}

body.ada-focus-visible *:focus { outline: 3px solid #f59e0b; outline-offset: 3px; }

body.ada-hide-images img { visibility: hidden; }

body.ada-pause-anim *, body.ada-pause-anim *::before, body.ada-pause-anim *::after {
  animation-play-state: paused;
  transition-duration: 0ms;
}

body.ada-highlight-links a {
  text-decoration: underline;
  font-weight: 700;
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

#ada-reading-mask {
  display: none;
  position: fixed;
  left: 0; right: 0;
  height: 48px;
  background: rgba(255, 245, 100, 0.28);
  border-top: 2px solid rgba(200,170,0,0.5);
  border-bottom: 2px solid rgba(200,170,0,0.5);
  pointer-events: none;
  z-index: 99990;
}

body.ada-reading-mask-on #ada-reading-mask { display: block; }
