/* AccessIQ - Frontend Widget Styles
   All selectors scoped to #accessiq-container or .accessiq- prefix */

/* ── CSS Custom Properties — Dark (default) ───────────────────────────── */
#accessiq-container {
  --aiq-w-bg:         #0e1513;
  --aiq-w-surface:    #1a211f;
  --aiq-w-card:       #1e2a27;
  --aiq-w-border:     rgba(255,255,255,0.08);
  --aiq-w-text:       #e2e8f0;
  --aiq-w-muted:      #8a9e99;
  --aiq-w-subtle:     rgba(255,255,255,0.45);
  --aiq-w-hover-bg:   rgba(255,255,255,0.06);
  --aiq-w-toggle-off: rgba(255,255,255,0.15);
  --aiq-w-primary:    #10d98e; /* overridden by JS from config.color */
  --aiq-w-on-primary: #0e1513;
  --aiq-w-danger:     #ef4444;
  --aiq-w-shadow:     0 8px 40px rgba(0,0,0,0.55);
  --aiq-w-font:       system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* ── Light Theme ──────────────────────────────────────────────────────── */
#accessiq-container[data-theme="light"] {
  --aiq-w-bg:         #ffffff;
  --aiq-w-surface:    #f5f7f6;
  --aiq-w-card:       #eef1f0;
  --aiq-w-border:     rgba(0,0,0,0.08);
  --aiq-w-text:       #1a211f;
  --aiq-w-muted:      rgba(0,0,0,0.45);
  --aiq-w-subtle:     rgba(0,0,0,0.45);
  --aiq-w-hover-bg:   rgba(0,0,0,0.04);
  --aiq-w-toggle-off: rgba(0,0,0,0.12);
  --aiq-w-primary:    #0a9e6a;
  --aiq-w-on-primary: #ffffff;
  --aiq-w-shadow:     0 8px 40px rgba(0,0,0,0.15);
}

/* ── System Theme (follows OS preference) ─────────────────────────────── */
@media (prefers-color-scheme: light) {
  #accessiq-container[data-theme="system"] {
    --aiq-w-bg:         #ffffff;
    --aiq-w-surface:    #f5f7f6;
    --aiq-w-card:       #eef1f0;
    --aiq-w-border:     rgba(0,0,0,0.08);
    --aiq-w-text:       #1a211f;
    --aiq-w-muted:      rgba(0,0,0,0.45);
    --aiq-w-subtle:     rgba(0,0,0,0.45);
    --aiq-w-hover-bg:   rgba(0,0,0,0.04);
    --aiq-w-toggle-off: rgba(0,0,0,0.12);
    --aiq-w-primary:    #0a9e6a;
    --aiq-w-on-primary: #ffffff;
    --aiq-w-shadow:     0 8px 40px rgba(0,0,0,0.15);
  }
}
/* dark system inherits defaults — no overrides needed */

/* ── Floating Action Button ───────────────────────────────────────────── */
#accessiq-toggle-btn {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  border: none;
  background: var(--aiq-w-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 1;
}
#accessiq-toggle-btn:hover {
  transform: scale(1.07);
  box-shadow: 0 6px 28px rgba(0,0,0,0.45);
}
#accessiq-toggle-btn:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

/* ── Notification Badge ───────────────────────────────────────────────── */
.accessiq-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--aiq-w-danger);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  font-family: var(--aiq-w-font);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: 2px solid var(--aiq-w-bg);
  pointer-events: none;
}
.accessiq-badge[hidden] { display: none; }

/* ── Panel ────────────────────────────────────────────────────────────── */
#accessiq-panel {
  position: fixed;
  bottom: 88px;
  right: 24px;
  min-width: 260px;
  overflow-y: auto;
  background: var(--aiq-w-bg);
  border: 1px solid var(--aiq-w-border);
  border-radius: 16px;
  box-shadow: var(--aiq-w-shadow);
  overflow: hidden;
  font-family: var(--aiq-w-font);
  color: var(--aiq-w-text);
  transition: opacity 0.2s ease, transform 0.2s ease;
  animation: aiq-w-slide-in 0.2s ease;
  z-index: 999998;
}
#accessiq-panel[hidden] {
  display: none;
}

@keyframes aiq-w-slide-in {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)   scale(1);    }
}

/* Position variants */
#accessiq-container[style*="left:24px"] #accessiq-panel,
#accessiq-container[style*="left: 24px"] #accessiq-panel {
  right: auto;
  left: 24px;
}
#accessiq-container[style*="top:24px"] #accessiq-panel,
#accessiq-container[style*="top: 24px"] #accessiq-panel {
  bottom: auto;
  top: 88px;
}

/* ── Panel Header ─────────────────────────────────────────────────────── */
.accessiq-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--aiq-w-border);
}
.accessiq-panel-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}
.accessiq-panel-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--aiq-w-primary);
  flex-shrink: 0;
}
.accessiq-panel-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--aiq-w-text);
  line-height: 1.2;
}
.accessiq-panel-subtitle {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--aiq-w-primary);
  opacity: 0.75;
  text-transform: uppercase;
  margin-top: 2px;
}
.accessiq-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 6px;
  color: var(--aiq-w-subtle);
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.accessiq-close-btn:hover {
  background: var(--aiq-w-hover-bg);
  color: var(--aiq-w-text);
}
.accessiq-close-btn:focus-visible {
  outline: 2px solid var(--aiq-w-primary);
  outline-offset: 2px;
}

/* ── Theme Switcher ───────────────────────────────────────────────────── */
.accessiq-theme-row {
  display: flex;
  gap: 4px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--aiq-w-border);
}
.accessiq-theme-btn {
  flex: 1;
  padding: 7px;
  border-radius: 8px;
  border: 1px solid var(--aiq-w-border);
  background: transparent;
  color: var(--aiq-w-muted);
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--aiq-w-font);
}
.accessiq-theme-btn:hover {
  background: var(--aiq-w-hover-bg);
  color: var(--aiq-w-text);
}
.accessiq-theme-btn.active {
  background: var(--aiq-w-primary);
  color: var(--aiq-w-on-primary);
  border-color: var(--aiq-w-primary);
}
.accessiq-theme-btn:focus-visible {
  outline: 2px solid var(--aiq-w-primary);
  outline-offset: 2px;
}

/* ── Features List ────────────────────────────────────────────────────── */
.accessiq-features-list {
  padding: 6px 0;
  max-height: 360px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--aiq-w-border) transparent;
}
.accessiq-features-list::-webkit-scrollbar {
  width: 4px;
}
.accessiq-features-list::-webkit-scrollbar-track {
  background: transparent;
}
.accessiq-features-list::-webkit-scrollbar-thumb {
  background: var(--aiq-w-border);
  border-radius: 2px;
}

/* ── Accordion Groups ─────────────────────────────────────────────────── */
.accessiq-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 7px 12px;
  margin: 2px 8px;
  width: calc(100% - 16px);
  border-radius: 20px;
  cursor: pointer;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--aiq-w-border);
  user-select: none;
  transition: background 0.15s;
  font-family: var(--aiq-w-font);
}
#accessiq-container[data-theme="light"] .accessiq-group-header {
  background: rgba(0,0,0,0.03);
}
.accessiq-group-header:hover {
  background: var(--aiq-w-hover-bg);
}
.accessiq-group-header:focus-visible {
  outline: 2px solid var(--aiq-w-primary);
  outline-offset: 2px;
}
.accessiq-group-title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--aiq-w-muted);
}
.accessiq-group-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}
.accessiq-group-count {
  font-size: 10px;
  font-weight: 700;
  background: var(--aiq-w-primary);
  color: var(--aiq-w-on-primary);
  padding: 1px 6px;
  border-radius: 100px;
  line-height: 1.6;
}
.accessiq-group-chevron {
  color: var(--aiq-w-muted);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}
.accessiq-group.open .accessiq-group-chevron {
  transform: rotate(180deg);
}
.accessiq-group-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 4px;
}
.accessiq-group.open .accessiq-group-body {
  max-height: 600px;
}

/* ── Feature Item (toggle row) ────────────────────────────────────────── */
.accessiq-feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  transition: background 0.1s;
  border-radius: 8px;
}
.accessiq-feature-item:hover {
  background: var(--aiq-w-hover-bg);
}

.accessiq-feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--aiq-w-primary);
  flex-shrink: 0;
  width: 20px;
}

.accessiq-feature-label-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.accessiq-feature-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--aiq-w-text);
  line-height: 1.3;
}

/* ── Preview Chips ────────────────────────────────────────────────────── */
.accessiq-preview-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
}
.accessiq-preview-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--aiq-w-muted);
  text-transform: uppercase;
}
.accessiq-preview-chip {
  background: var(--aiq-w-hover-bg);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 11px;
  color: var(--aiq-w-muted);
}
.accessiq-preview-dyslexia {
  font-family: 'Lexend', 'Arial', sans-serif;
  letter-spacing: 0.04em;
}
.accessiq-preview-keyboard {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: #f59e0b;
  padding: 0;
  vertical-align: middle;
}

/* ── Toggle Switch ────────────────────────────────────────────────────── */
.accessiq-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 12px;
  border: none;
  background: var(--aiq-w-toggle-off);
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
  padding: 0;
}
.accessiq-toggle.active {
  background: var(--aiq-w-primary);
}
.accessiq-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
  transition: transform 0.2s;
}
.accessiq-toggle.active .accessiq-toggle-thumb {
  transform: translateX(20px);
}
.accessiq-toggle:focus-visible {
  outline: 2px solid var(--aiq-w-primary);
  outline-offset: 2px;
}

/* ── Range Row ────────────────────────────────────────────────────────── */
.accessiq-range-item {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 12px 14px;
}
.accessiq-range-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.accessiq-range-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--aiq-w-muted);
}
.accessiq-range-value {
  font-size: 12px;
  font-weight: 700;
  color: var(--aiq-w-primary);
  font-variant-numeric: tabular-nums;
}
.accessiq-range-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}
.accessiq-range-btn {
  background: none;
  border: none;
  color: var(--aiq-w-muted);
  font-size: 12px;
  font-weight: 700;
  font-family: var(--aiq-w-font);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  flex-shrink: 0;
  transition: color 0.15s, background 0.15s;
  line-height: 1;
}
.accessiq-range-btn:hover {
  color: var(--aiq-w-text);
  background: var(--aiq-w-hover-bg);
}
.accessiq-range-btn:focus-visible {
  outline: 2px solid var(--aiq-w-primary);
  outline-offset: 2px;
}

/* Native range slider with fill */
.accessiq-range-slider {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(
    to right,
    var(--aiq-w-primary) 0%,
    var(--aiq-w-primary) var(--aiq-fill, 29%),
    var(--aiq-w-toggle-off) var(--aiq-fill, 29%),
    var(--aiq-w-toggle-off) 100%
  );
  cursor: pointer;
  outline: none;
  border: none;
}
.accessiq-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.35);
  cursor: pointer;
  transition: transform 0.15s;
}
.accessiq-range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}
.accessiq-range-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: none;
  box-shadow: 0 1px 4px rgba(0,0,0,0.35);
  cursor: pointer;
}
.accessiq-range-slider::-moz-range-track {
  background: transparent;
}
.accessiq-range-slider:focus-visible {
  outline: 2px solid var(--aiq-w-primary);
  outline-offset: 3px;
}

/* ── Action Button (WCAG Run) ─────────────────────────────────────────── */
.accessiq-action-btn {
  font-size: 11px;
  font-weight: 600;
  color: var(--aiq-w-on-primary);
  background: var(--aiq-w-primary);
  border: none;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity 0.15s;
  font-family: var(--aiq-w-font);
  flex-shrink: 0;
}
.accessiq-action-btn:hover { opacity: 0.85; }
.accessiq-action-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ── Panel Footer ─────────────────────────────────────────────────────── */
.accessiq-panel-footer {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 16px;
  border-top: 1px solid var(--aiq-w-border);
}
.accessiq-panel-footer-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

.accessiq-btn-reset {
  flex: 1;
  background: transparent;
  border: 1px solid var(--aiq-w-border);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--aiq-w-subtle);
  cursor: pointer;
  font-family: var(--aiq-w-font);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.accessiq-btn-reset:hover {
  border-color: var(--aiq-w-muted);
  color: var(--aiq-w-text);
  background: var(--aiq-w-hover-bg);
}
.accessiq-btn-reset:focus-visible {
  outline: 2px solid var(--aiq-w-primary);
  outline-offset: 2px;
}

.accessiq-btn-save {
  flex: 1;
  background: var(--aiq-w-primary);
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--aiq-w-on-primary);
  cursor: pointer;
  font-family: var(--aiq-w-font);
  transition: opacity 0.15s, transform 0.1s;
}
.accessiq-btn-save:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}
.accessiq-btn-save:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* ── Statement Link ───────────────────────────────────────────────────── */
.accessiq-stmt-link {
  display: block;
  text-align: center;
  font-size: 11px;
  color: var(--aiq-w-muted);
  text-decoration: none;
  padding: 2px 0 0;
  transition: color 0.2s;
  letter-spacing: 0.02em;
}
.accessiq-stmt-link:hover {
  color: var(--aiq-w-primary);
  text-decoration: underline;
}

/* ── WCAG Report Modal ────────────────────────────────────────────────── */
#accessiq-wcag-report {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1000000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.accessiq-report-inner {
  background: #1a211f;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  max-width: 500px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 24px;
  font-family: system-ui, sans-serif;
  color: #e2e8f0;
}
.accessiq-report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.accessiq-report-header h2 {
  margin: 0;
  font-size: 18px;
  color: #e2e8f0;
}
.accessiq-report-header button {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #8a9e99;
  transition: color 0.15s;
}
.accessiq-report-header button:hover { color: #e2e8f0; }
#accessiq-wcag-report ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
#accessiq-wcag-report li {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 13px;
  color: #bacac5;
}
#accessiq-wcag-report li:last-child { border-bottom: none; }
#accessiq-wcag-report em { color: #8a9e99; }

/* ── Body Feature Classes ─────────────────────────────────────────────── */

/* High Contrast */
body.accessiq-high-contrast {
  filter: contrast(1.5);
}

/* Dyslexia Font — Lexend loaded via Google Fonts in wp_head */
body.accessiq-dyslexia,
body.accessiq-dyslexia * {
  font-family: 'Lexend', 'Arial', sans-serif !important;
  letter-spacing: 0.05em !important;
  word-spacing: 0.1em !important;
  line-height: 1.75 !important;
}

/* Keyboard Navigation Highlights */
body.accessiq-keyboard-nav *:focus {
  outline: 3px solid #f59e0b !important;
  outline-offset: 3px !important;
  border-radius: 2px !important;
}

/* Screen Reader Mode */
body.accessiq-screen-reader .accessiq-sr-hidden {
  display: none !important;
}

/* ── Responsive / Mobile Bottom Sheet ────────────────────────────────── */
@media (max-width: 480px) {
  #accessiq-container {
    bottom: 0 !important;
    right: 0 !important;
    left: 0 !important;
    top: auto !important;
    width: 100%;
  }

  #accessiq-toggle-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
  }

  #accessiq-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 20px 20px 0 0;
    max-height: 80vh;
    height: auto;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    animation: none; /* disable slide-in on mobile */
  }

  #accessiq-panel:not([hidden]) {
    transform: translateY(0);
  }

  /* Drag handle */
  #accessiq-panel::before {
    content: '';
    display: block;
    width: 36px;
    height: 4px;
    background: var(--aiq-w-border);
    border-radius: 2px;
    margin: 10px auto 4px;
  }
}

/* === BIG CURSOR === */
body.accessiq-cursor-white,
body.accessiq-cursor-white * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'%3E%3Cpath fill='%23ffffff' stroke='%23000000' stroke-width='1.5' d='M5 3l14 9-7 1-4 7z'/%3E%3C/svg%3E") 0 0, auto !important;
}
body.accessiq-cursor-black,
body.accessiq-cursor-black * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'%3E%3Cpath fill='%231a1a1a' stroke='%23ffffff' stroke-width='1.5' d='M5 3l14 9-7 1-4 7z'/%3E%3C/svg%3E") 0 0, auto !important;
}
body.accessiq-cursor-teal,
body.accessiq-cursor-teal * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'%3E%3Cpath fill='%2310d98e' stroke='%23000000' stroke-width='1.5' d='M5 3l14 9-7 1-4 7z'/%3E%3C/svg%3E") 0 0, auto !important;
}
body.accessiq-cursor-red,
body.accessiq-cursor-red * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'%3E%3Cpath fill='%23ef4444' stroke='%23000000' stroke-width='1.5' d='M5 3l14 9-7 1-4 7z'/%3E%3C/svg%3E") 0 0, auto !important;
}

/* Swatch picker UI */
.accessiq-cursor-swatches {
  display: flex;
  gap: 6px;
  align-items: center;
}
.accessiq-cursor-swatch {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.2);
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
  padding: 0;
  flex-shrink: 0;
}
.accessiq-cursor-swatch:hover {
  transform: scale(1.15);
  border-color: rgba(255,255,255,0.5);
}
.accessiq-cursor-swatch.active {
  border-color: var(--aiq-w-primary);
  box-shadow: 0 0 0 2px rgba(16,217,142,0.35);
  transform: scale(1.1);
}

/* === READING MASK === */
#accessiq-mask-top,
#accessiq-mask-bottom {
  position: fixed;
  left: 0;
  width: 100%;
  pointer-events: none;
  z-index: 999997;
  display: none;
  background: rgba(0,0,0,0.6);
}
#accessiq-mask-top {
  top: 0;
}
#accessiq-mask-bottom {
  bottom: 0;
  height: auto;
}

/* === STOP ANIMATIONS === */
body.accessiq-stop-animations *,
body.accessiq-stop-animations *::before,
body.accessiq-stop-animations *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}

/* === HIGHLIGHT TITLES === */
body.accessiq-highlight-titles h1,
body.accessiq-highlight-titles h2,
body.accessiq-highlight-titles h3,
body.accessiq-highlight-titles h4,
body.accessiq-highlight-titles h5,
body.accessiq-highlight-titles h6 {
  border-left: 3px solid #10d98e !important;
  padding-left: 10px !important;
  background: rgba(16,217,142,0.06) !important;
  border-radius: 0 4px 4px 0 !important;
}

/* === HIGHLIGHT LINKS === */
body.accessiq-highlight-links a,
body.accessiq-highlight-links a:visited {
  outline: 2px solid #10d98e !important;
  outline-offset: 2px !important;
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
  border-radius: 2px;
}
body.accessiq-highlight-links a:hover,
body.accessiq-highlight-links a:focus {
  background: rgba(16,217,142,0.12) !important;
}

/* === SATURATION / TRI-STATE === */
.accessiq-tri-group {
  display: flex;
  gap: 4px;
}
.accessiq-tri-btn {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--aiq-w-border);
  background: transparent;
  color: var(--aiq-w-muted);
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--aiq-w-font);
}
.accessiq-tri-btn:hover {
  border-color: var(--aiq-w-muted);
  color: var(--aiq-w-text);
}
.accessiq-tri-btn.active {
  background: var(--aiq-w-primary);
  border-color: var(--aiq-w-primary);
  color: var(--aiq-w-on-primary);
  font-weight: 500;
}

/* === READING LINE === */
#accessiq-reading-line {
  position: fixed;
  left: 0;
  width: 100%;
  height: 2px;
  background: #10d98e;
  opacity: 0.7;
  pointer-events: none;
  z-index: 999997;
  display: none;
  transition: top 0.05s linear;
  box-shadow: 0 0 8px rgba(16,217,142,0.4);
}

/* ── Accessibility Profiles ──────────────────────────────────────────────── */
.accessiq-profiles-section {
  padding: 10px 12px 2px;
  border-bottom: 1px solid var(--aiq-w-border);
}

.accessiq-profiles-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.accessiq-profile-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 6px 6px;
  flex: 1 1 calc(20% - 6px);
  min-width: 52px;
  background: var(--aiq-w-card);
  border: 1.5px solid var(--aiq-w-border);
  border-radius: 8px;
  cursor: pointer;
  color: var(--aiq-w-text-muted);
  transition: border-color 0.18s, background 0.18s, color 0.18s, box-shadow 0.18s;
  font-size: 10px;
  line-height: 1.2;
  text-align: center;
}

.accessiq-profile-btn:hover {
  border-color: var(--aiq-prof-color, var(--aiq-w-primary));
  color: var(--aiq-prof-color, var(--aiq-w-primary));
  background: color-mix(in srgb, var(--aiq-prof-color, var(--aiq-w-primary)) 10%, transparent);
}

.accessiq-profile-btn.is-active {
  border-color: var(--aiq-prof-color, var(--aiq-w-primary));
  background: color-mix(in srgb, var(--aiq-prof-color, var(--aiq-w-primary)) 18%, transparent);
  color: var(--aiq-prof-color, var(--aiq-w-primary));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--aiq-prof-color, var(--aiq-w-primary)) 25%, transparent);
}

.accessiq-profile-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--aiq-prof-color, var(--aiq-w-primary)) 15%, transparent);
  color: var(--aiq-prof-color, var(--aiq-w-primary));
  flex-shrink: 0;
}

.accessiq-profile-btn:not(.is-active) .accessiq-profile-icon {
  background: var(--aiq-w-surface);
  color: var(--aiq-w-text-muted);
}

.accessiq-profile-btn:hover .accessiq-profile-icon,
.accessiq-profile-btn.is-active .accessiq-profile-icon {
  background: color-mix(in srgb, var(--aiq-prof-color, var(--aiq-w-primary)) 20%, transparent);
  color: var(--aiq-prof-color, var(--aiq-w-primary));
}

.accessiq-profile-label {
  font-size: 9px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1.2;
  color: inherit;
}
