:root {
  --a11y-zoom: 1;
}

html {
  font-size: calc(16px * var(--a11y-zoom));
}

html[data-a11y-font="90"] .text-\[8px\] { font-size: 7.2px !important; }
html[data-a11y-font="90"] .text-\[9px\] { font-size: 8.1px !important; }
html[data-a11y-font="90"] .text-\[10px\] { font-size: 9px !important; }
html[data-a11y-font="90"] .text-\[11px\] { font-size: 9.9px !important; }
html[data-a11y-font="90"] .text-\[12px\] { font-size: 10.8px !important; }
html[data-a11y-font="90"] .text-\[13px\] { font-size: 11.7px !important; }

html[data-a11y-font="110"] .text-\[8px\] { font-size: 8.8px !important; }
html[data-a11y-font="110"] .text-\[9px\] { font-size: 9.9px !important; }
html[data-a11y-font="110"] .text-\[10px\] { font-size: 11px !important; }
html[data-a11y-font="110"] .text-\[11px\] { font-size: 12.1px !important; }
html[data-a11y-font="110"] .text-\[12px\] { font-size: 13.2px !important; }
html[data-a11y-font="110"] .text-\[13px\] { font-size: 14.3px !important; }

html[data-a11y-font="120"] .text-\[8px\] { font-size: 9.6px !important; }
html[data-a11y-font="120"] .text-\[9px\] { font-size: 10.8px !important; }
html[data-a11y-font="120"] .text-\[10px\] { font-size: 12px !important; }
html[data-a11y-font="120"] .text-\[11px\] { font-size: 13.2px !important; }
html[data-a11y-font="120"] .text-\[12px\] { font-size: 14.4px !important; }
html[data-a11y-font="120"] .text-\[13px\] { font-size: 15.6px !important; }

html[data-a11y-font="130"] .text-\[8px\] { font-size: 10.4px !important; }
html[data-a11y-font="130"] .text-\[9px\] { font-size: 11.7px !important; }
html[data-a11y-font="130"] .text-\[10px\] { font-size: 13px !important; }
html[data-a11y-font="130"] .text-\[11px\] { font-size: 14.3px !important; }
html[data-a11y-font="130"] .text-\[12px\] { font-size: 15.6px !important; }
html[data-a11y-font="130"] .text-\[13px\] { font-size: 16.9px !important; }

body {
  transition: background-color 0.2s ease, color 0.2s ease;
}

.a11y-fab,
.a11y-panel,
.a11y-panel * {
  box-sizing: border-box;
}

.a11y-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 9998;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: #4f46e5;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.45);
  cursor: pointer;
  transition: transform 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.a11y-fab:hover,
.a11y-fab:focus-visible {
  background: #6366f1;
  transform: translateY(-2px);
  outline: 3px solid rgba(129, 140, 248, 0.35);
  outline-offset: 3px;
}

.a11y-fab svg {
  width: 30px;
  height: 30px;
}

.a11y-panel {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 9999;
  width: min(330px, calc(100vw - 28px));
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: #0b1224;
  color: #f8fafc;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.a11y-panel[hidden] {
  display: none;
}

.a11y-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.a11y-panel__title {
  margin: 0;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.a11y-panel__close {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

.a11y-panel__group {
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.a11y-panel__label {
  display: block;
  margin-bottom: 9px;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.a11y-theme-options,
.a11y-font-controls {
  display: grid;
  gap: 8px;
}

.a11y-theme-options {
  grid-template-columns: 1fr;
}

.a11y-font-controls {
  grid-template-columns: 52px 1fr 52px;
  align-items: center;
}

.a11y-option,
.a11y-step,
.a11y-reset {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  cursor: pointer;
  font-weight: 800;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.a11y-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px;
  text-align: left;
}

.a11y-option__name {
  font-size: 0.9rem;
}

.a11y-option__hint {
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 700;
}

.a11y-option:hover,
.a11y-step:hover,
.a11y-reset:hover,
.a11y-option.is-active {
  border-color: rgba(129, 140, 248, 0.65);
  background: rgba(99, 102, 241, 0.18);
  color: #ffffff;
}

.a11y-font-value {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
  font-weight: 900;
}

.a11y-reset {
  width: 100%;
  margin-top: 12px;
  color: #f8fafc;
}

html[data-a11y-theme="light"] {
  --background: #eef3f9;
  --foreground: #102033;
  --primary: #4f46e5;
  --secondary: #2563eb;
  --card-bg: rgba(255, 255, 255, 0.9);
  --border-color: rgba(15, 23, 42, 0.1);
}

html[data-a11y-theme="light"] body,
html[data-a11y-theme="light"] .bg-\[\#0f172a\] {
  background-color: #eef3f9 !important;
  color: #102033 !important;
}

html[data-a11y-theme="light"] .glass-card,
html[data-a11y-theme="light"] [class*="bg-white/"] {
  background-color: rgba(255, 255, 255, 0.9) !important;
  border-color: rgba(15, 23, 42, 0.1) !important;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08) !important;
}

html[data-a11y-theme="light"] .text-white,
html[data-a11y-theme="light"] .text-slate-200,
html[data-a11y-theme="light"] .text-slate-300,
html[data-a11y-theme="light"] .text-slate-400,
html[data-a11y-theme="light"] .text-slate-500 {
  color: #0f172a !important;
}

html[data-a11y-theme="light"] #school-name {
  color: #000000 !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
  background: rgba(255, 255, 255, 0.96) !important;
}

html[data-a11y-theme="light"] .border-white\/5,
html[data-a11y-theme="light"] .border-white\/10 {
  border-color: rgba(15, 23, 42, 0.1) !important;
}

html[data-a11y-theme="light"] #testing-notice-modal {
  background: rgba(15, 23, 42, 0.72) !important;
}

html[data-a11y-theme="light"] #testing-notice-modal .testing-notice-panel,
html[data-a11y-theme="contrast"] #testing-notice-modal .testing-notice-panel {
  background: #020617 !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: #e5eefc !important;
}

html[data-a11y-theme="light"] #testing-notice-modal .testing-notice-title,
html[data-a11y-theme="contrast"] #testing-notice-modal .testing-notice-title {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

html[data-a11y-theme="light"] #testing-notice-modal .testing-notice-copy,
html[data-a11y-theme="light"] #testing-notice-modal .testing-notice-copy p,
html[data-a11y-theme="contrast"] #testing-notice-modal .testing-notice-copy,
html[data-a11y-theme="contrast"] #testing-notice-modal .testing-notice-copy p {
  color: #cbd5e1 !important;
}

html[data-a11y-theme="light"] #testing-notice-modal .testing-notice-kicker,
html[data-a11y-theme="contrast"] #testing-notice-modal .testing-notice-kicker {
  color: #6ee7b7 !important;
}

html[data-a11y-theme="light"] #testing-notice-modal .testing-notice-step,
html[data-a11y-theme="contrast"] #testing-notice-modal .testing-notice-step {
  background: rgba(15, 23, 42, 0.78) !important;
  border-color: rgba(148, 163, 184, 0.28) !important;
}

html[data-a11y-theme="light"] #testing-notice-modal .testing-notice-step-label,
html[data-a11y-theme="contrast"] #testing-notice-modal .testing-notice-step-label {
  color: #ffffff !important;
}

html[data-a11y-theme="light"] #testing-notice-modal .testing-notice-close,
html[data-a11y-theme="light"] #testing-notice-modal .testing-notice-secondary,
html[data-a11y-theme="contrast"] #testing-notice-modal .testing-notice-close,
html[data-a11y-theme="contrast"] #testing-notice-modal .testing-notice-secondary {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
  color: #ffffff !important;
}

html[data-a11y-theme="light"] .assessment-period-bar,
html[data-a11y-theme="light"] .assessment-period-modal {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.12) !important;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12) !important;
  color: #0f172a !important;
}

html[data-a11y-theme="light"] .assessment-period-empty {
  background: #fff7ed !important;
  border-color: rgba(217, 119, 6, 0.28) !important;
}

html[data-a11y-theme="light"] .assessment-period-kicker {
  color: #4338ca !important;
}

html[data-a11y-theme="light"] .assessment-period-title,
html[data-a11y-theme="light"] .assessment-period-label {
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a !important;
}

html[data-a11y-theme="light"] .assessment-period-copy {
  color: #475569 !important;
}

html[data-a11y-theme="light"] .assessment-period-input {
  background: #f8fafc !important;
  border-color: rgba(15, 23, 42, 0.16) !important;
  color: #0f172a !important;
}

html[data-a11y-theme="light"] .assessment-period-input option {
  background: #ffffff !important;
  color: #0f172a !important;
}

html[data-a11y-theme="light"] .assessment-period-secondary,
html[data-a11y-theme="light"] .assessment-period-close {
  background: #eef2ff !important;
  border-color: rgba(67, 56, 202, 0.18) !important;
  color: #312e81 !important;
}

html[data-a11y-theme="light"] .assessment-period-move {
  background: #ecfeff !important;
  border-color: rgba(8, 145, 178, 0.28) !important;
  color: #155e75 !important;
}

html[data-a11y-theme="light"] .assessment-period-primary {
  background: #f59e0b !important;
  color: #111827 !important;
}

html[data-a11y-theme="light"] .assessment-period-submit {
  background: #4f46e5 !important;
  color: #ffffff !important;
}

html[data-a11y-theme="light"] .assessment-period-note {
  background: #eff6ff !important;
  border-color: rgba(37, 99, 235, 0.18) !important;
}

html[data-a11y-theme="light"] .assessment-period-note p {
  color: #1e3a8a !important;
}

html[data-a11y-theme="contrast"] .assessment-period-bar,
html[data-a11y-theme="contrast"] .assessment-period-modal {
  background: #000000 !important;
  border-color: #facc15 !important;
  box-shadow: none !important;
  color: #ffffff !important;
}

html[data-a11y-theme="contrast"] .assessment-period-title,
html[data-a11y-theme="contrast"] .assessment-period-label,
html[data-a11y-theme="contrast"] .assessment-period-copy,
html[data-a11y-theme="contrast"] .assessment-period-kicker {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

html[data-a11y-theme="contrast"] .assessment-period-input {
  background: #000000 !important;
  border-color: #facc15 !important;
  color: #ffffff !important;
}

html[data-a11y-theme="contrast"] .assessment-period-input option {
  background: #000000 !important;
  color: #ffffff !important;
}

html[data-a11y-theme="contrast"] .assessment-period-primary,
html[data-a11y-theme="contrast"] .assessment-period-submit,
html[data-a11y-theme="contrast"] .assessment-period-secondary,
html[data-a11y-theme="contrast"] .assessment-period-close,
html[data-a11y-theme="contrast"] .assessment-period-move {
  background: #facc15 !important;
  border-color: #facc15 !important;
  color: #000000 !important;
}

html[data-a11y-theme="contrast"] .assessment-period-note {
  background: #000000 !important;
  border-color: #22d3ee !important;
}

html[data-a11y-theme="contrast"] .assessment-period-note p {
  color: #ffffff !important;
}

html[data-a11y-theme="light"] .bg-\[\#111b31\],
html[data-a11y-theme="light"] .student-menu-popover {
  background: #ffffff !important;
  border-color: rgba(15, 23, 42, 0.14) !important;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.14) !important;
  color: #0f172a !important;
}

html[data-a11y-theme="light"] .student-menu-popover p,
html[data-a11y-theme="light"] .student-menu-popover span,
html[data-a11y-theme="light"] .student-menu-popover label,
html[data-a11y-theme="light"] .student-menu-popover button {
  color: #0f172a !important;
}

html[data-a11y-theme="light"] .student-menu-popover button:hover {
  color: #4338ca !important;
}

html[data-a11y-theme="light"] .student-menu-popover .text-slate-500,
html[data-a11y-theme="light"] .student-menu-popover .text-slate-400,
html[data-a11y-theme="light"] .student-menu-popover .text-slate-300 {
  color: #334155 !important;
}

html[data-a11y-theme="light"] .student-menu-popover input[type="checkbox"] {
  accent-color: #4f46e5;
}

html[data-a11y-theme="light"] #main-content {
  background:
    radial-gradient(circle at top left, rgba(79, 70, 229, 0.08), transparent 30%),
    linear-gradient(180deg, #f6f8fc 0%, #eef3f9 100%) !important;
}

html[data-a11y-theme="light"] #courses-container .group {
  background: #ffffff !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08) !important;
}

html[data-a11y-theme="light"] #courses-container .group .bg-white {
  background: #f8fbff !important;
}

html[data-a11y-theme="light"] #courses-container .group .text-white\/90,
html[data-a11y-theme="light"] #courses-container .group .text-indigo-400,
html[data-a11y-theme="light"] #courses-container .group .text-[9px].font-black.uppercase.tracking-wider {
  color: #000000 !important;
}

html[data-a11y-theme="light"] #courses-container .course-school-badge {
  color: #000000 !important;
  background: rgba(255, 255, 255, 0.98) !important;
  border-color: rgba(15, 23, 42, 0.14) !important;
  text-shadow: none !important;
}

html[data-a11y-theme="light"] #courses-container .course-card-title {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35) !important;
}

html[data-a11y-theme="light"] #courses-container .group .bg-white\/10 {
  background: rgba(255, 255, 255, 0.96) !important;
}

html[data-a11y-theme="light"] #courses-container .group .border-white\/20 {
  border-color: rgba(15, 23, 42, 0.12) !important;
}

html[data-a11y-theme="light"] #courses-container .group .text-white\/70,
html[data-a11y-theme="light"] #courses-container .group .text-white\/80 {
  color: #eff6ff !important;
}

html[data-a11y-theme="light"] #courses-container .group .bg-black\/20 {
  background: rgba(15, 23, 42, 0.3) !important;
}

html[data-a11y-theme="light"] #courses-container .group .from-black\/80 {
  --tw-gradient-from: rgba(15, 23, 42, 0.78) var(--tw-gradient-from-position);
}

html[data-a11y-theme="light"] #courses-container .group .via-black\/20 {
  --tw-gradient-via: rgba(15, 23, 42, 0.22) var(--tw-gradient-via-position);
}

html[data-a11y-theme="light"] #courses-container .group .to-transparent {
  --tw-gradient-to: rgba(15, 23, 42, 0) var(--tw-gradient-to-position);
}

html[data-a11y-theme="light"] .a11y-panel {
  background: #ffffff;
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.16);
}

html[data-a11y-theme="light"] .a11y-panel__title,
html[data-a11y-theme="light"] .a11y-font-value {
  color: #0f172a;
}

html[data-a11y-theme="light"] .a11y-option,
html[data-a11y-theme="light"] .a11y-step,
html[data-a11y-theme="light"] .a11y-reset,
html[data-a11y-theme="light"] .a11y-panel__close {
  background: #f1f5f9;
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.16);
}

html[data-a11y-theme="contrast"] {
  --background: #000000;
  --foreground: #ffffff;
  --primary: #facc15;
  --secondary: #22d3ee;
  --card-bg: #000000;
  --border-color: #facc15;
}

html[data-a11y-theme="contrast"] body,
html[data-a11y-theme="contrast"] .bg-\[\#0f172a\],
html[data-a11y-theme="contrast"] .bg-\[\#12203a\] {
  background-color: #000000 !important;
  color: #ffffff !important;
}

html[data-a11y-theme="contrast"] .glass-card,
html[data-a11y-theme="contrast"] [class*="bg-white/"],
html[data-a11y-theme="contrast"] .a11y-panel {
  background: #000000 !important;
  border-color: #facc15 !important;
  box-shadow: none !important;
}

html[data-a11y-theme="contrast"] .text-white,
html[data-a11y-theme="contrast"] .text-slate-200,
html[data-a11y-theme="contrast"] .text-slate-300,
html[data-a11y-theme="contrast"] .text-slate-400,
html[data-a11y-theme="contrast"] .text-slate-500,
html[data-a11y-theme="contrast"] .text-indigo-400,
html[data-a11y-theme="contrast"] .text-indigo-300 {
  color: #ffffff !important;
}

html[data-a11y-theme="contrast"] .text-amber-500,
html[data-a11y-theme="contrast"] .text-gradient,
html[data-a11y-theme="contrast"] h1,
html[data-a11y-theme="contrast"] h2,
html[data-a11y-theme="contrast"] h3,
html[data-a11y-theme="contrast"] h4 {
  color: #facc15 !important;
  -webkit-text-fill-color: currentColor !important;
  background: none !important;
}

html[data-a11y-theme="contrast"] button,
html[data-a11y-theme="contrast"] a,
html[data-a11y-theme="contrast"] input,
html[data-a11y-theme="contrast"] select {
  outline-color: #facc15;
}

html[data-a11y-theme="contrast"] .btn-primary,
html[data-a11y-theme="contrast"] .a11y-fab,
html[data-a11y-theme="contrast"] .bg-indigo-600,
html[data-a11y-theme="contrast"] .bg-indigo-500 {
  background: #facc15 !important;
  color: #000000 !important;
  box-shadow: none !important;
}

html[data-a11y-theme="contrast"] .border-white\/5,
html[data-a11y-theme="contrast"] .border-white\/10,
html[data-a11y-theme="contrast"] .border-indigo-500\/20,
html[data-a11y-theme="contrast"] .border-indigo-500\/30 {
  border-color: #facc15 !important;
}

@media (max-width: 640px) {
  .a11y-fab {
    right: 14px;
    bottom: 14px;
  }

  .a11y-panel {
    right: 14px;
    bottom: 82px;
  }
}
