/* Text size accessibility — A / A / A (normal / large / largest) */
html {
  --a11y-scale: 1;
  font-size: calc(100% * var(--a11y-scale));
}
html[data-text-scale="large"] { --a11y-scale: 1.125; }
html[data-text-scale="larger"] { --a11y-scale: 1.25; }

.a11y-scale {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
}
.a11y-scale-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.72);
  padding: 0 6px 0 8px;
  line-height: 1;
}
.a11y-scale-btn {
  border: 0;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  line-height: 1;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}
.a11y-scale-btn--sm { font-size: 11px; }
.a11y-scale-btn--md { font-size: 14px; }
.a11y-scale-btn--lg { font-size: 18px; }

.a11y-scale-btn.is-active,
.a11y-scale-btn[aria-pressed="true"] {
  background: #fff;
  color: #343091;
}
.a11y-scale-btn:hover { background: rgba(255, 255, 255, 0.18); }
.a11y-scale-btn.is-active:hover,
.a11y-scale-btn[aria-pressed="true"]:hover { background: #fff; }

/* App shell (logged-in) variant on light chrome */
.rv-topbar .a11y-scale,
.rv-a11y-wrap .a11y-scale {
  background: #f2f1fa;
  border-color: #dfddea;
}
.rv-topbar .a11y-scale-label,
.rv-a11y-wrap .a11y-scale-label { color: #6b6981; }
.rv-topbar .a11y-scale-btn,
.rv-a11y-wrap .a11y-scale-btn { color: #343091; }
.rv-topbar .a11y-scale-btn.is-active,
.rv-topbar .a11y-scale-btn[aria-pressed="true"],
.rv-a11y-wrap .a11y-scale-btn.is-active,
.rv-a11y-wrap .a11y-scale-btn[aria-pressed="true"] {
  background: #343091;
  color: #fff;
}
.rv-topbar .a11y-scale-btn:hover,
.rv-a11y-wrap .a11y-scale-btn:hover { background: #e8e6f5; }
.rv-topbar .a11y-scale-btn.is-active:hover,
.rv-topbar .a11y-scale-btn[aria-pressed="true"]:hover,
.rv-a11y-wrap .a11y-scale-btn.is-active:hover,
.rv-a11y-wrap .a11y-scale-btn[aria-pressed="true"]:hover {
  background: #292677;
  color: #fff;
}

/* Public nav on purple header */
.nav .a11y-scale {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
}
.nav .a11y-scale-label { color: rgba(255, 255, 255, 0.72); }
.nav .a11y-scale-btn { color: #fff; }
.nav .a11y-scale-btn.is-active,
.nav .a11y-scale-btn[aria-pressed="true"] {
  background: #fff;
  color: #343091;
}

/* Mobile drawer uses light panel */
.mobile-a11y .a11y-scale {
  background: #f2f1fa;
  border-color: #dfddea;
  width: 100%;
  justify-content: flex-start;
}
.mobile-a11y .a11y-scale-label { display: inline; color: #6b6981; }
.mobile-a11y .a11y-scale-btn { color: #343091; }
.mobile-a11y .a11y-scale-btn.is-active,
.mobile-a11y .a11y-scale-btn[aria-pressed="true"] {
  background: #343091;
  color: #fff;
}

.rv-top-actions-slot {
  display: flex;
  align-items: center;
  gap: 12px;
}
.rv-a11y-wrap { display: flex; align-items: center; }
.rv-auth-a11y {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 40;
}

@media (max-width: 1100px) {
  .nav .a11y-scale-label,
  .rv-topbar .a11y-scale-label { display: none; }
}

@media (max-width: 760px) {
  .nav-a11y { display: flex; }
  .mobile-menu-btn { order: 3; }
  .a11y-scale { gap: 1px; padding: 2px; }
  .a11y-scale-btn { width: 28px; height: 28px; }
  .a11y-scale-btn--sm { font-size: 10px; }
  .a11y-scale-btn--md { font-size: 13px; }
  .a11y-scale-btn--lg { font-size: 16px; }
}
