/* Maazan accessibility menu — first-party, never gated behind Premium */
@font-face {
  font-family: "OpenDyslexic";
  src: url("../assets/fonts/OpenDyslexic-Regular.woff2") format("woff2"),
       url("../assets/fonts/OpenDyslexic-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "OpenDyslexic";
  src: url("../assets/fonts/OpenDyslexic-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

html { font-size: calc(20px * var(--a11y-scale, 1)); }

html.a11y-readable,
html.a11y-readable body,
html.a11y-readable button,
html.a11y-readable input,
html.a11y-readable select,
html.a11y-readable textarea {
  font-family: "Alef", "Heebo", "Arial", "Noto Sans Hebrew", "Tahoma", sans-serif;
  letter-spacing: 0.01em;
  word-spacing: 0.04em;
  line-height: 1.65;
}

html.a11y-dyslexia,
html.a11y-dyslexia body,
html.a11y-dyslexia button,
html.a11y-dyslexia input,
html.a11y-dyslexia select,
html.a11y-dyslexia textarea,
html.a11y-dyslexia h1,
html.a11y-dyslexia h2,
html.a11y-dyslexia .brand-name,
html.a11y-dyslexia .ring-number {
  font-family: "OpenDyslexic", "Alef", "Heebo", "Arial", "Noto Sans Hebrew", sans-serif;
  letter-spacing: 0.08em;
  word-spacing: 0.16em;
  line-height: 1.85;
}

html.a11y-spacing,
html.a11y-spacing body,
html.a11y-spacing button,
html.a11y-spacing input,
html.a11y-spacing select,
html.a11y-spacing textarea,
html.a11y-spacing p,
html.a11y-spacing li {
  letter-spacing: 0.08em;
  word-spacing: 0.16em;
  line-height: 1.9;
}
html.a11y-dyslexia.a11y-spacing,
html.a11y-dyslexia.a11y-spacing body {
  letter-spacing: 0.1em;
  word-spacing: 0.2em;
  line-height: 2;
}

html.a11y-contrast {
  --paper: #000000;
  --paper-deep: #111111;
  --surface: #000000;
  --ink: #ffffff;
  --muted: #ffffff;
  --line: #ffe600;
  --accent: #ffe600;
  --accent-soft: #1a1a1a;
  --accent-ink: #ffe600;
  --eat: #ffe600;
  --eat-soft: #1a1a1a;
  --burn: #66d9ff;
  --burn-soft: #1a1a1a;
  --gold: #ffe600;
  --gold-soft: #1a1a00;
  --danger: #ff8a80;
  --ok: #7cff9a;
  --ok-soft: #102010;
  --over: #ff8a80;
  --shadow: none;
  background: #000;
  color: #fff;
}
html.a11y-contrast body { background: #000; color: #fff; }
html.a11y-contrast .btn-primary,
html.a11y-contrast .tab-btn[aria-selected="true"],
html.a11y-contrast .pick[aria-pressed="true"],
html.a11y-contrast .chip[aria-pressed="true"] {
  background: #ffe600;
  color: #000;
  border-color: #ffe600;
}
html.a11y-contrast .btn-gold,
html.a11y-contrast .banner,
html.a11y-contrast .medical-banner {
  background: #ffe600;
  color: #000;
  border-color: #ffe600;
}
html.a11y-contrast a { color: #ffe600; }
html.a11y-contrast .ring-track { stroke: #333; }
html.a11y-contrast .ring-value { stroke: #ffe600; }
html.a11y-contrast .chart-eat { background: #ffe600; }
html.a11y-contrast .chart-burn { background: #66d9ff; }
html.a11y-contrast .water-dot[aria-pressed="true"] { background: #ffe600; box-shadow: none; }

#site-root { min-height: 100vh; }
html.a11y-gray,
html.a11y-gray body { background: #e8e8e8; }
html.a11y-gray #site-root { filter: grayscale(1); }

html.a11y-links a {
  text-decoration: underline;
  text-decoration-thickness: 0.18em;
  text-underline-offset: 0.18em;
  background-color: #ffe600;
  color: #000;
  padding-inline: 0.15em;
  border-radius: 2px;
}
html.a11y-links a.brand { background: transparent; color: inherit; }
html.a11y-contrast.a11y-links a.brand { color: #ffe600; }

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

html.a11y-cursor,
html.a11y-cursor * {
  cursor: url("../assets/cursor-default.png") 4 2, auto !important;
}
html.a11y-cursor a,
html.a11y-cursor button,
html.a11y-cursor input,
html.a11y-cursor select,
html.a11y-cursor textarea,
html.a11y-cursor label,
html.a11y-cursor [role="button"] {
  cursor: url("../assets/cursor-pointer.png") 10 4, pointer !important;
}

.a11y-fab {
  position: fixed;
  left: 1rem;
  bottom: calc(1rem + var(--consent-offset, 0px));
  z-index: 60;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 50%;
  border: 3px solid var(--ink);
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  padding: 0;
}
html.a11y-contrast .a11y-fab {
  background: #ffe600;
  color: #000;
  border-color: #ffe600;
}
.a11y-fab svg { width: 1.7rem; height: 1.7rem; }
.a11y-fab:focus-visible {
  outline: 3px solid #000;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px #ffe600;
}

.a11y-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(0,0,0,0.35);
}
.a11y-overlay.hidden { display: none; }

.a11y-panel {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: calc(5.1rem + var(--consent-offset, 0px));
  z-index: 71;
  width: auto;
  max-width: 24rem;
  max-height: min(34rem, calc(100vh - 7rem - var(--consent-offset, 0px)));
  overflow: auto;
  background: var(--surface);
  color: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 18px;
  padding: 0.9rem 0.9rem 1rem;
  box-shadow: 0 12px 32px rgba(0,0,0,0.2);
  box-sizing: border-box;
}
.a11y-panel.hidden { display: none; }
.a11y-panel h2 { margin: 0; font-size: 1.2rem; }
.a11y-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.a11y-free {
  margin: 0 0 0.7rem;
  font-weight: 600;
  font-size: 0.95rem;
  background: var(--ok-soft);
  color: var(--ink);
  border-radius: 10px;
  padding: 0.45rem 0.6rem;
}
html.a11y-contrast .a11y-free { background: #1a1a1a; color: #ffe600; border: 1px solid #ffe600; }

.a11y-text-row,
.a11y-actions,
.a11y-speak-row {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
  align-items: center;
}
.a11y-text-row .btn { flex: 1; }
.a11y-scale {
  min-width: 4.2rem;
  text-align: center;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  direction: ltr;
  unicode-bidi: isolate;
}
.a11y-speak-row .btn { flex: 1; }
.a11y-speak-status { margin: 0 0 0.6rem; font-weight: 600; min-height: 1.3em; }

.a11y-toggle {
  width: 100%;
  justify-content: space-between;
  border-radius: 14px;
  margin-bottom: 0.4rem;
  text-align: start;
}
.a11y-toggle[aria-pressed="true"] {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
html.a11y-contrast .a11y-toggle[aria-pressed="true"] {
  background: #ffe600;
  color: #000;
  border-color: #ffe600;
}
.a11y-panel .a11y-reset { width: 100%; margin-top: 0.35rem; }
.a11y-panel .a11y-statement-link {
  display: inline-block;
  margin-top: 0.7rem;
  font-weight: 700;
}

.coord-list { list-style: none; padding: 0; margin: 0.6rem 0 1rem; }
.coord-list li {
  margin: 0.45rem 0;
  padding: 0.7rem 0.8rem;
  background: var(--paper);
  border: 2px dashed var(--line);
  border-radius: 12px;
}
.coord-list .label { font-weight: 700; display: block; }
.placeholder-missing {
  display: inline-block;
  margin-top: 0.15rem;
  background: #fff3bf;
  color: #1c211e;
  border: 2px solid #8a6a20;
  border-radius: 8px;
  padding: 0.15rem 0.45rem;
  font-weight: 700;
}
html.a11y-contrast .placeholder-missing {
  background: #ffe600;
  color: #000;
  border-color: #ffe600;
}

.a11y-panel button:disabled { opacity: 0.55; cursor: not-allowed !important; }
.a11y-panel-head h2 { flex: 1; min-width: 0; }
.a11y-panel-head #a11y-close {
  flex: none;
  white-space: nowrap;
  min-height: 44px;
  padding-inline: 0.75rem;
}
.a11y-panel .a11y-toggle,
.a11y-panel .a11y-text-row .btn,
.a11y-panel .a11y-reset,
.a11y-panel .a11y-speak-row .btn {
  min-height: 48px;
  font-size: 1rem;
}

.consent-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 55;
  background: var(--surface);
  color: var(--ink);
  border-top: 3px solid var(--ink);
  padding: 0.9rem 1rem 1.1rem;
  box-shadow: 0 -8px 24px rgba(0,0,0,0.12);
}
.consent-banner.hidden { display: none; }
.consent-inner {
  width: min(52rem, 100%);
  margin-inline: auto;
}
.consent-banner h2 { margin: 0 0 0.35rem; font-size: 1.15rem; }
.consent-banner p { margin: 0 0 0.7rem; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.consent-actions .btn { min-height: 48px; }
