:focus-visible {
  outline: 3px solid #005fcc !important;
  outline-offset: 3px !important;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 10001;
  top: 8px;
  right: 8px;
  transform: translateY(calc(-100% - 12px));
  padding: 12px 16px;
  border: 2px solid #fff;
  border-radius: 8px;
  background: #102e2a;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.skip-link:focus {
  transform: translateY(0);
}

.accessibility-tools {
  position: fixed;
  z-index: 10000;
  bottom: max(16px, env(safe-area-inset-bottom));
  left: max(16px, env(safe-area-inset-left));
  direction: rtl;
  font-family: Arial, "Noto Sans Hebrew", sans-serif;
}

.signature-dialog > .accessibility-tools,
.building-code-dialog > .accessibility-tools {
  position: relative;
  inset: auto;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 0 0 10px;
}

.accessibility-trigger {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  min-height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(145deg, #0782ed 0%, #0065c5 55%, #00488f 100%);
  color: #fff;
  box-shadow: 0 7px 18px #064d9952, inset 0 1px 1px #ffffff30;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.accessibility-trigger svg {
  width: 30px;
  height: 30px;
  fill: #fff;
}

.accessibility-trigger svg .icon-wheel {
  fill: none;
  stroke: #fff;
  stroke-width: 2.4;
}

.accessibility-trigger svg .icon-head {
  fill: #fff;
}

.accessibility-trigger:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px #064d9966, inset 0 1px 1px #ffffff30;
}

.accessibility-trigger:active {
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .accessibility-trigger {
    transition: none;
  }
}

.accessibility-panel {
  width: min(320px, calc(100vw - 32px));
  margin-bottom: 10px;
  padding: 16px;
  border: 2px solid #253b34;
  border-radius: 12px;
  background: #fff;
  color: #17211d;
  box-shadow: 0 8px 28px #0004;
}

.accessibility-panel h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.accessibility-panel [data-accessibility-option],
.accessibility-reset {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
  padding: 9px 12px;
  border: 1px solid #40574d;
  border-radius: 7px;
  background: #fff;
  color: #17211d;
  text-align: right;
  font-size: 15px;
  cursor: pointer;
}

.accessibility-panel [aria-pressed="true"] {
  border: 2px solid #064e38;
  background: #e8f5ed;
  font-weight: 700;
}

.accessibility-reset {
  border-color: #6b3933;
  color: #722c26;
}

html[data-a11y-text="large"] .security-gate,
html[data-a11y-text="large"] .app-shell,
html[data-a11y-text="large"] body > main,
html[data-a11y-text="large"] body > header,
html[data-a11y-text="large"] body > footer,
html[data-a11y-text="large"] dialog {
  zoom: 1.15;
}

html[data-a11y-font="high"] body,
html[data-a11y-font="high"] input,
html[data-a11y-font="high"] select,
html[data-a11y-font="high"] button,
html[data-a11y-font="high"] textarea {
  font-family: Arial, "Noto Sans Hebrew", Tahoma, sans-serif !important;
  letter-spacing: 0.02em;
  line-height: 1.7 !important;
  word-spacing: 0.1em;
}

.accessibility-statement-link {
  display: block;
  margin-top: 12px;
  color: #003c8f;
  font-size: 15px;
  text-decoration: underline;
}

.signature-footer {
  margin: 24px 0 72px;
  text-align: center;
}

.prefill-notice {
  padding: 10px 12px;
  border: 1px solid #0b5cad;
  border-radius: 8px;
  background: #eaf3fd;
  color: #0b2f55;
}

html[data-a11y-contrast="high"] body {
  background: #fff !important;
  color: #111 !important;
}

html[data-a11y-contrast="high"] p,
html[data-a11y-contrast="high"] label,
html[data-a11y-contrast="high"] small,
html[data-a11y-contrast="high"] span,
html[data-a11y-contrast="high"] li,
html[data-a11y-contrast="high"] td,
html[data-a11y-contrast="high"] th,
html[data-a11y-contrast="high"] h1,
html[data-a11y-contrast="high"] h2,
html[data-a11y-contrast="high"] h3 {
  color: #111 !important;
}

html[data-a11y-contrast="high"] .card,
html[data-a11y-contrast="high"] .panel,
html[data-a11y-contrast="high"] article,
html[data-a11y-contrast="high"] section:not(.hero),
html[data-a11y-contrast="high"] input,
html[data-a11y-contrast="high"] select,
html[data-a11y-contrast="high"] textarea {
  border-color: #333 !important;
}

html[data-a11y-contrast="high"] a {
  color: #003c8f !important;
}

html[data-a11y-links="high"] a {
  text-decoration: underline !important;
  text-decoration-thickness: 2px !important;
  text-underline-offset: 3px !important;
}

html[data-a11y-motion="high"] *,
html[data-a11y-motion="high"] *::before,
html[data-a11y-motion="high"] *::after {
  scroll-behavior: auto !important;
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 520px) {
  .accessibility-tools {
    bottom: max(10px, env(safe-area-inset-bottom));
    left: max(10px, env(safe-area-inset-left));
  }
}

.statement { max-width: 760px; margin: 0 auto; padding: 24px; line-height: 1.8; font-size: 18px; }
.statement-noscript { padding: 16px; }
