/* Accessibility panel + mode styles (MVP) */

@font-face {
  font-family: "OpenDyslexic";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/opendyslexic/opendyslexic-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "OpenDyslexic";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/opendyslexic/opendyslexic-latin-700-normal.woff2") format("woff2");
}

.inox-a11y {
  /* Stack above .cc-floating-manage (cookie), same left corner. */
  position: fixed;
  z-index: 10046;
  left: max(16px, env(safe-area-inset-left, 0px));
  right: auto;
  /* cookie bottom 32 + icon 48 + gap 18 */
  bottom: max(98px, calc(32px + 48px + 18px + env(safe-area-inset-bottom, 0px)));
  font-family: "Golos Text", system-ui, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.35;
  color: #101418;
}

/* Icon-only FAB (same treatment as .cc-floating-manage). */
.inox-a11y__fab {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #f5f1e8;
  box-shadow: none;
  cursor: pointer;
  font: inherit;
  line-height: 1;
  transition: transform 0.2s ease, color 0.2s ease, filter 0.2s ease;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.9))
    drop-shadow(0 4px 8px rgba(0, 0, 0, 0.75))
    drop-shadow(0 12px 28px rgba(0, 0, 0, 0.55));
}
.inox-a11y__fab:hover {
  transform: translateY(-2px);
  color: #c9a96a;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.9))
    drop-shadow(0 6px 12px rgba(0, 0, 0, 0.75))
    drop-shadow(0 16px 32px rgba(0, 0, 0, 0.6));
}
.inox-a11y__fab:focus-visible {
  outline: 2px solid #c9a96a;
  outline-offset: 3px;
}
.inox-a11y__fab-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  line-height: 0;
}
.inox-a11y__fab-icon svg {
  width: 48px;
  height: 48px;
}
/* Thin ring + lighter figure so limbs don’t merge into the circle. */
.inox-a11y__fab-icon-ua {
  fill: none;
  stroke: none;
  overflow: visible;
}
.inox-a11y__ua-ring {
  fill: #17140f;
  stroke: currentColor;
  stroke-width: 1.2;
}
.inox-a11y__ua-head {
  fill: currentColor;
  stroke: none;
}
.inox-a11y__ua-body {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.inox-a11y__fab-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.inox-a11y__panel {
  position: absolute;
  left: 0;
  right: auto;
  bottom: calc(100% + 10px);
  width: min(320px, calc(100vw - 24px));
  max-height: min(70vh, 560px);
  overflow: auto;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 16, 20, 0.96);
  color: #eef1f4;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.inox-a11y__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.inox-a11y__title {
  font-size: 15px;
  font-weight: 600;
}
.inox-a11y__icon-btn {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}
.inox-a11y__icon-btn:hover,
.inox-a11y__icon-btn:focus-visible {
  background: rgba(240, 180, 120, 0.2);
  outline: none;
}

.inox-a11y__body {
  display: grid;
  gap: 10px;
}
.inox-a11y__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.inox-a11y__row--stack {
  flex-direction: column;
  align-items: stretch;
}
.inox-a11y__row-label {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.75;
}
.inox-a11y__font {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.inox-a11y__font-val {
  min-width: 3.2em;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.inox-a11y__btn,
.inox-a11y__seg-btn,
.inox-a11y__reset {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  cursor: pointer;
  font: inherit;
}
.inox-a11y__btn {
  min-width: 36px;
  min-height: 36px;
  font-weight: 700;
}
.inox-a11y__btn:hover,
.inox-a11y__seg-btn:hover,
.inox-a11y__reset:hover,
.inox-a11y__btn:focus-visible,
.inox-a11y__seg-btn:focus-visible,
.inox-a11y__reset:focus-visible {
  border-color: #f0b478;
  outline: none;
}
.inox-a11y__seg {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.inox-a11y__seg-btn {
  min-height: 34px;
  padding: 6px 8px;
  font-size: 12px;
}
.inox-a11y__seg-btn.is-on {
  background: #f0b478;
  border-color: #f0b478;
  color: #101418;
  font-weight: 600;
}
.inox-a11y__toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  cursor: pointer;
  font-size: 13.5px;
}
.inox-a11y__toggle input {
  width: 18px;
  height: 18px;
  accent-color: #f0b478;
  flex: 0 0 auto;
}
.inox-a11y__reset {
  width: 100%;
  min-height: 40px;
  margin-top: 4px;
  font-weight: 600;
}

.inox-a11y__alt-tip {
  position: fixed;
  z-index: 12060;
  max-width: min(280px, calc(100vw - 24px));
  padding: 8px 10px;
  border-radius: 8px;
  background: #101418;
  color: #f7f3ea;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  font-size: 13px;
  line-height: 1.35;
  pointer-events: none;
}

/* —— Modes —— */
html.inox-a11y-font-125 {
  font-size: 125%;
}
html.inox-a11y-font-150 {
  font-size: 150%;
}
html.inox-a11y-font-175 {
  font-size: 175%;
}
html.inox-a11y-font-200 {
  font-size: 200%;
}

html.inox-a11y-contrast-high,
html.inox-a11y-contrast-high body {
  background: #000 !important;
  color: #ffe600 !important;
}
html.inox-a11y-contrast-high :where(
  p, h1, h2, h3, h4, h5, h6, li, span, a, label, td, th, button, input, textarea, select
) {
  color: #ffe600 !important;
  background-color: transparent;
}
html.inox-a11y-contrast-high a {
  text-decoration: underline;
}
html.inox-a11y-contrast-high :where(.portal-shell, .portal-page, .portal-header, .home-strip, .portal-footer) {
  background: #000 !important;
  color: #ffe600 !important;
}

html.inox-a11y-contrast-invert {
  filter: invert(1) hue-rotate(180deg);
}
html.inox-a11y-contrast-invert img,
html.inox-a11y-contrast-invert video,
html.inox-a11y-contrast-invert picture,
html.inox-a11y-contrast-invert iframe,
html.inox-a11y-contrast-invert canvas,
html.inox-a11y-contrast-invert svg,
html.inox-a11y-contrast-invert .inox-a11y {
  filter: invert(1) hue-rotate(180deg);
}

html.inox-a11y-contrast-mono {
  filter: grayscale(1);
}
html.inox-a11y-contrast-mono .inox-a11y {
  filter: none;
}

html.inox-a11y-readable,
html.inox-a11y-readable body,
html.inox-a11y-readable :where(p, h1, h2, h3, h4, h5, h6, li, a, button, input, textarea, label, span) {
  font-family: Arial, Helvetica, "Segoe UI", sans-serif !important;
  letter-spacing: 0.01em !important;
}

html.inox-a11y-dyslexic,
html.inox-a11y-dyslexic body,
html.inox-a11y-dyslexic :where(p, h1, h2, h3, h4, h5, h6, li, a, button, input, textarea, label, span) {
  font-family: "OpenDyslexic", Arial, Helvetica, sans-serif !important;
  letter-spacing: 0.03em !important;
  word-spacing: 0.08em !important;
}

html.inox-a11y-cursor,
html.inox-a11y-cursor * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath fill='%23000' stroke='%23fff' stroke-width='2' d='M8 4v36l9-9 5 14 6-2-5-14 13-1z'/%3E%3C/svg%3E") 4 4, auto !important;
}

html.inox-a11y-focus :focus,
html.inox-a11y-focus :focus-visible {
  outline: 3px solid #ffe600 !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 6px rgba(255, 230, 0, 0.35) !important;
}

html.inox-a11y-pause *,
html.inox-a11y-pause *::before,
html.inox-a11y-pause *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
html.inox-a11y-pause video {
  animation: none !important;
}

html.inox-a11y-links :where(
  a[href],
  button,
  [role="button"],
  summary,
  input[type="submit"],
  input[type="button"],
  .home-cta,
  .portal-cta
) {
  outline: 2px solid #00e5ff !important;
  outline-offset: 2px !important;
  text-decoration: underline !important;
  text-underline-offset: 0.18em;
}

/* Keep panel usable under filters */
html.inox-a11y-contrast-high .inox-a11y,
html.inox-a11y-contrast-high .inox-a11y * {
  color: #101418 !important;
}
html.inox-a11y-contrast-high .inox-a11y__panel {
  background: #111 !important;
  color: #ffe600 !important;
  border-color: #ffe600 !important;
}
html.inox-a11y-contrast-high .inox-a11y__panel * {
  color: #ffe600 !important;
}
html.inox-a11y-contrast-high .inox-a11y__seg-btn.is-on {
  background: #ffe600 !important;
  color: #000 !important;
}
