/* ===== Accessibility toolbar, skip link, consent checkbox, legal pages ===== */

.skip-link {
  position: fixed; top: 0; inset-inline-start: 50%; transform: translate(50%, -120%);
  z-index: 10000; background: var(--petrol-deep); color: #fff; font-weight: 700;
  padding: 0.8rem 1.4rem; border-radius: 0 0 12px 12px; text-decoration: none;
  transition: transform 0.2s;
}
[dir="rtl"] .skip-link { transform: translate(50%, -120%); }
.skip-link:focus { transform: translate(50%, 0); outline: 3px solid var(--cyan); outline-offset: 2px; }
main:focus { outline: none; }

/* ---------- toolbar ---------- */
.a11y-btn {
  position: fixed; right: 1.1rem; bottom: 1.4rem; z-index: 9990;
  width: 52px; height: 52px; border-radius: 50%; border: 2px solid #fff;
  background: var(--petrol); color: #fff; cursor: pointer; display: grid; place-items: center;
  box-shadow: 0 10px 30px -8px rgba(11, 40, 44, 0.55);
  transition: transform 0.25s, background 0.25s;
}
.a11y-btn:hover { transform: scale(1.08); background: var(--teal-deep); }
.a11y-btn:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }
.a11y-btn svg { width: 28px; height: 28px; fill: currentColor; }

.a11y-panel {
  position: fixed; right: 1.1rem; bottom: 5.2rem; z-index: 9991;
  width: min(360px, calc(100vw - 2.2rem)); max-height: min(78vh, 640px); overflow-y: auto;
  background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 30px 80px -20px rgba(11, 40, 44, 0.5); padding: 1.1rem 1.1rem 1rem;
  font-family: var(--font); font-size: 15px; line-height: 1.5;
}
.a11y-panel[hidden] { display: none; }
.a11y-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.8rem; }
.a11y-head h2 { font-size: 1.1rem; font-weight: 900; margin: 0; }
.a11y-close {
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-ice);
  cursor: pointer; font-size: 1.3rem; line-height: 1; color: var(--ink);
}
.a11y-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.a11y-opt {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.3rem;
  min-height: 74px; padding: 0.6rem 0.4rem; text-align: center; cursor: pointer;
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--bg-ice); color: var(--ink);
  font: inherit; font-size: 0.86rem; font-weight: 700;
}
.a11y-opt:hover { border-color: var(--teal-deep); }
.a11y-opt:focus-visible { outline: 3px solid var(--teal-deep); outline-offset: 2px; }
.a11y-opt[aria-pressed="true"] { background: var(--petrol); border-color: var(--petrol); color: #fff; }
.a11y-opt .ic { font-size: 1.25rem; line-height: 1; font-weight: 900; }
.a11y-foot { display: flex; gap: 0.5rem; margin-top: 0.8rem; flex-wrap: wrap; }
.a11y-foot button, .a11y-foot a {
  flex: 1; min-width: 120px; text-align: center; padding: 0.7rem 0.8rem; border-radius: 10px;
  font: inherit; font-weight: 700; font-size: 0.88rem; cursor: pointer; text-decoration: none;
}
.a11y-reset { background: #fff; border: 1.5px solid var(--petrol); color: var(--petrol); }
.a11y-link { background: var(--bg-ice); border: 1.5px solid var(--line); color: var(--teal-deep); }
.a11y-foot button:focus-visible, .a11y-foot a:focus-visible { outline: 3px solid var(--teal-deep); outline-offset: 2px; }

@media (max-width: 760px) {
  .a11y-btn { bottom: calc(1rem + env(safe-area-inset-bottom)); width: 48px; height: 48px; }
  .a11y-panel { bottom: calc(4.4rem + env(safe-area-inset-bottom)); }
  body:has(.sticky-cta) .a11y-btn { bottom: calc(76px + 1rem + env(safe-area-inset-bottom)); }
  body:has(.sticky-cta) .a11y-panel { bottom: calc(76px + 4.4rem + env(safe-area-inset-bottom)); }
}

/* ---------- toolbar effects (classes live on <html>) ---------- */
html.a11y-text-1 { font-size: 112.5%; }
html.a11y-text-2 { font-size: 125%; }
html.a11y-text-3 { font-size: 150%; }

html.a11y-gray body > *:not(.a11y-panel):not(.a11y-btn) { filter: grayscale(1); }
html.a11y-invert body > *:not(.a11y-panel):not(.a11y-btn) { filter: invert(1) hue-rotate(180deg); }
html.a11y-invert img, html.a11y-invert video { filter: none; }
html.a11y-gray.a11y-invert body > *:not(.a11y-panel):not(.a11y-btn) { filter: invert(1) hue-rotate(180deg) grayscale(1); }

html.a11y-contrast body, html.a11y-contrast main, html.a11y-contrast section,
html.a11y-contrast .footer, html.a11y-contrast .nav, html.a11y-contrast .card,
html.a11y-contrast .form { background: #fff !important; color: #000 !important; }
html.a11y-contrast p, html.a11y-contrast li, html.a11y-contrast span, html.a11y-contrast label,
html.a11y-contrast h1, html.a11y-contrast h2, html.a11y-contrast h3, html.a11y-contrast h4,
html.a11y-contrast .lead { color: #000 !important; text-shadow: none !important; }
html.a11y-contrast a:not(.btn) { color: #0033cc !important; text-decoration: underline !important; }
html.a11y-contrast .btn, html.a11y-contrast .btn-primary { background: #000 !important; color: #fff !important; border: 2px solid #000 !important; box-shadow: none !important; }
html.a11y-contrast .hl, html.a11y-contrast .grad-t { -webkit-text-fill-color: #000 !important; background: none !important; color: #000 !important; }
html.a11y-contrast .subhero::before, html.a11y-contrast .subhero::after,
html.a11y-contrast .chero-bg, html.a11y-contrast .blueprint::after { display: none !important; }
html.a11y-contrast .subhero { background: #fff !important; }
html.a11y-contrast input, html.a11y-contrast select, html.a11y-contrast textarea { border: 2px solid #000 !important; background: #fff !important; color: #000 !important; }

html.a11y-links a { text-decoration: underline !important; text-underline-offset: 3px; }
html.a11y-links a:not(.btn) { font-weight: 700; }

html.a11y-readable body, html.a11y-readable body * { font-family: Arial, "Arial Hebrew", Helvetica, sans-serif !important; letter-spacing: 0.02em; }
html.a11y-readable p, html.a11y-readable li { line-height: 1.9 !important; }

html.a11y-heads h1, html.a11y-heads h2, html.a11y-heads h3, html.a11y-heads h4 {
  outline: 3px solid #f2b705; outline-offset: 4px; background: rgba(242, 183, 5, 0.12);
}

html.a11y-cursor, html.a11y-cursor * {
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'><path d='M4 2l16 9-7 2-3 7z' fill='black' stroke='white' stroke-width='1.6'/></svg>") 4 2, auto !important;
}

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

html.a11y-focus *:focus, html.a11y-focus *:focus-visible { outline: 4px solid #f2b705 !important; outline-offset: 3px !important; }

/* ---------- consent checkbox ---------- */
.consent { display: grid; gap: 0.35rem; }
.consent-row { display: flex; align-items: flex-start; gap: 0.65rem; }
.consent input[type="checkbox"] {
  flex: none; width: 22px; height: 22px; margin: 0.12rem 0 0; accent-color: var(--teal-deep); cursor: pointer;
}
.consent label { font-size: 0.88rem; font-weight: 400; color: var(--body); line-height: 1.5; cursor: pointer; }
.consent label a { color: var(--teal-deep); text-decoration: underline; text-underline-offset: 3px; font-weight: 700; }
.consent .err { display: none; color: #c0392b; font-size: 0.88rem; }
.consent.invalid .err { display: block; }
.consent.invalid input { outline: 2px solid #c0392b; outline-offset: 2px; }

/* ---------- legal pages ---------- */
.legal-hero { padding-block: 9.5rem var(--space-4); background: var(--bg-ice); border-bottom: 1px solid var(--line); }
.legal-hero h1 { font-size: var(--step-4); margin-bottom: 0.6rem; }
.legal-hero p { color: var(--body); max-width: 62ch; }
.legal { padding-block: var(--space-5) var(--space-6); }
.legal .container { max-width: 860px; }
.legal h2 { font-size: var(--step-2); margin: var(--space-4) 0 0.6rem; }
.legal h3 { font-size: var(--step-1); margin: var(--space-3) 0 0.4rem; }
.legal p, .legal li { color: var(--body); line-height: 1.85; font-size: var(--step-0); }
.legal p { margin-bottom: 0.9rem; }
.legal ul { padding-inline-start: 1.4rem; margin-bottom: 1rem; display: grid; gap: 0.35rem; }
.legal a { color: var(--teal-deep); text-decoration: underline; text-underline-offset: 3px; }
.legal .meta { font-size: 0.9rem; color: var(--mute); border-top: 1px solid var(--line); padding-top: var(--space-2); margin-top: var(--space-4); }
.legal .box { background: var(--bg-ice); border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem 1.3rem; margin: 1rem 0 1.4rem; }
.legal .box p:last-child { margin-bottom: 0; }
.legal table { width: 100%; border-collapse: collapse; margin: 0.8rem 0 1.4rem; font-size: 0.95rem; display: block; overflow-x: auto; }
.legal th, .legal td { text-align: right; padding: 0.65rem 0.8rem; border: 1px solid var(--line); vertical-align: top; }
.legal th { background: var(--bg-ice); color: var(--ink); }
.footer-legal { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.footer-legal a { text-decoration: underline; text-underline-offset: 3px; }
