/* Restyle of the NagishLi accessibility widget (assets/vendor/nagishli, v2.3) to match the site.
   Override only: the vendor JS/CSS is untouched. The widget injects its own <style> at runtime
   (after this file) with !important and ID selectors, so every selector here carries extra
   specificity (html body + [id]) instead of relying on source order.
   Not overridable from CSS: inline !important styles (sprite icons, bar position, overlay box). */

nagishli#NagishLiTag {
  --nl-bg: #1c1814;
  --nl-surface: #2a241c;
  --nl-raise: #342c22;
  --nl-text: #f4efe6;
  --nl-ink: #1c1814;
  --nl-muted: #a89880;
  --nl-accent: #c6a066;
  --nl-accent-hover: #e0bc7a;
  --nl-line: rgb(244 239 230 / 14%);
  --nl-font: "IBM Plex Sans Hebrew", sans-serif;
  --nl-gap: max(16px, env(safe-area-inset-left));
  --nl-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='4.6' r='2.15'/%3E%3Cpath d='M4 9.3h16v2H14.2l.8 3.1 2.2 5.7h-2.2l-1.8-4.6-1.1 4.6h-2.2l1.4-5.8H9.2L7.2 20H5l2.3-5.4.7-3.3H4z'/%3E%3C/svg%3E");
}

/* Typography: the widget forces Arial 18px on every descendant. */
html body nagishli#NagishLiTag * {
  font-family: var(--nl-font) !important;
  font-size: 16px !important;
  line-height: 1.4 !important;
}
html body nagishli#NagishLiTag #NagishLiTitle { font-weight: 600 !important; font-size: 15px !important; }

/* Position: same bottom-left corner, lifted off the edges like the join dock. */
html body nagishli#NagishLiTag > #NagishLiBar[id] {
  margin: 0 0 max(16px, env(safe-area-inset-bottom)) var(--nl-gap);
  max-width: calc(100vw - 2 * var(--nl-gap));
}

/* Closed state: a cream chip, same corners and type as the site buttons.
   The vendor logo is a sprite cell with an inline background, so it cannot be
   redrawn — it is hidden and a crisp icon is painted over that slot. */
html body nagishli#NagishLiTag > #NagishLiBar > #NagishLiBarStrip[id] {
  position: relative;
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px !important;
  color: var(--nl-ink) !important;
  background: var(--nl-text) !important;
  border: 1px solid var(--nl-text) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  text-shadow: none !important;
}
html body nagishli#NagishLiTag > #NagishLiBar > #NagishLiBarStrip[id]::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset-inline-start: 16px;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  background: var(--nl-ink);
  -webkit-mask: var(--nl-icon) center / contain no-repeat;
  mask: var(--nl-icon) center / contain no-repeat;
  pointer-events: none;
}
html body nagishli#NagishLiTag > #NagishLiBar > #NagishLiBarStrip.open[id] {
  display: flex !important;
}
html body nagishli#NagishLiTag > #NagishLiBar > #NagishLiBarStrip[id]:hover {
  background: var(--nl-accent-hover) !important;
  border-color: var(--nl-accent-hover) !important;
}
html body nagishli#NagishLiTag > #NagishLiBar > #NagishLiBarStrip #NagishLiTitle {
  color: var(--nl-ink) !important;
}
html body nagishli#NagishLiTag > #NagishLiBar > #NagishLiBarStrip.open > #NagishLiTitle { flex: 1 1 auto; }

html body nagishli#NagishLiTag #NagishLiLogo {
  opacity: 0 !important;
  filter: none !important;
  pointer-events: none;
}
html body nagishli#NagishLiTag #NagishLiMove {
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
html body nagishli#NagishLiTag #NagishLiMove > span,
html body nagishli#NagishLiTag #NagishLiToggleMenus {
  filter: brightness(0) !important;
}
html body nagishli#NagishLiTag .nl-dropdown-arrow {
  opacity: 0 !important;
  filter: none !important;
}

/* Keep the vendor's absolutely positioned expand-all/collapse-all icon from overlapping the title. */
html body nagishli#NagishLiTag > #NagishLiBar > #NagishLiBarStrip.open > #NagishLiMove { margin-left: 8px !important; }
html body nagishli#NagishLiTag > #NagishLiBar > #NagishLiBarStrip.open > .expand-all,
html body nagishli#NagishLiTag > #NagishLiBar > #NagishLiBarStrip.open > .collapse-all {
  position: static !important;
  flex: 0 0 auto;
  order: 5;
}

/* Open state: panel. */
html body nagishli#NagishLiTag > #NagishLiBar > #NagishLiMenus[id] {
  width: min(345px, calc(100vw - 2 * var(--nl-gap))) !important;
  min-width: 0 !important;
  max-height: calc(100vh - 92px);
  max-height: calc(100dvh - 92px);
  overflow-y: auto !important;
  overflow-x: hidden !important;
  background: var(--nl-bg) !important;
  border: 1px solid var(--nl-line);
  border-top: 0;
  border-radius: 0;
  scrollbar-color: var(--nl-accent) var(--nl-bg) !important;
  overscroll-behavior: contain;
}
html body nagishli#NagishLiTag > #NagishLiBar > #NagishLiMenus[id]::-webkit-scrollbar-track { background: var(--nl-bg) !important; }
html body nagishli#NagishLiTag > #NagishLiBar > #NagishLiMenus[id]::-webkit-scrollbar-thumb {
  background: var(--nl-accent) !important;
  border: 2px solid var(--nl-bg) !important;
}
html body nagishli#NagishLiTag > #NagishLiBar > #NagishLiMenus[id]::-webkit-scrollbar-thumb:hover,
html body nagishli#NagishLiTag > #NagishLiBar > #NagishLiMenus[id]::-webkit-scrollbar-thumb:active { background: var(--nl-accent-hover) !important; }

/* Section headings: same rhythm as the FAQ accordion. */
html body nagishli#NagishLiTag > #NagishLiBar > #NagishLiMenus[id] > .nl-dropdown > .nl-dropdown-toggle {
  position: relative;
  min-height: 52px;
  padding: 14px 16px !important;
  padding-inline-start: 36px !important;
  color: var(--nl-text) !important;
  background: var(--nl-surface) !important;
  border-top: 1px solid var(--nl-line);
  box-shadow: none !important;
  text-shadow: none !important;
  font-weight: 500 !important;
}
html body nagishli#NagishLiTag > #NagishLiBar > #NagishLiMenus[id] > .nl-dropdown > .nl-dropdown-toggle::after {
  content: "";
  position: absolute;
  inset-inline-start: 16px;
  top: 20px;
  width: 7px;
  height: 7px;
  border-inline-end: 1.5px solid var(--nl-muted);
  border-bottom: 1.5px solid var(--nl-muted);
  transform: rotate(45deg);
  pointer-events: none;
}
html body nagishli#NagishLiTag > #NagishLiBar > #NagishLiMenus[id] > .nl-dropdown > .nl-dropdown-toggle .nl-dropdown-title { font-weight: 500 !important; }
html body nagishli#NagishLiTag > #NagishLiBar > #NagishLiMenus[id] > .nl-dropdown > .nl-dropdown-toggle:hover { background: var(--nl-raise) !important; }
html body nagishli#NagishLiTag > #NagishLiBar > #NagishLiMenus[id] > .nl-dropdown > .nl-dropdown-toggle.open { color: var(--nl-accent-hover) !important; }
html body nagishli#NagishLiTag > #NagishLiBar > #NagishLiMenus[id] > .nl-dropdown > .nl-dropdown-toggle.open::after {
  top: 23px;
  border-color: var(--nl-accent-hover);
  transform: rotate(225deg);
}

/* Option rows. */
html body nagishli#NagishLiTag > #NagishLiBar > #NagishLiMenus[id] > .nl-dropdown > .nl-dropdown-menu > li > div {
  min-height: 44px;
  padding: 12px 16px !important;
  color: var(--nl-text) !important;
  background: var(--nl-bg) !important;
  border: 0 !important;
  border-top: 1px solid var(--nl-line) !important;
  box-shadow: none !important;
  text-shadow: none !important;
  font-weight: 400 !important;
}
html body nagishli#NagishLiTag > #NagishLiBar > #NagishLiMenus[id] > .nl-dropdown:last-child > .nl-dropdown-menu > li:last-child > div { border-bottom: 0 !important; }
html body nagishli#NagishLiTag > #NagishLiBar > #NagishLiMenus[id] > .nl-dropdown > .nl-dropdown-menu > li > div:hover { background: var(--nl-raise) !important; }
html body nagishli#NagishLiTag > #NagishLiBar > #NagishLiMenus[id] > .nl-dropdown > .nl-dropdown-menu > li.not-clickable > div:hover { background: var(--nl-bg) !important; }

/* Active option: gold mark on the start edge, gold text, filled surface. */
html body nagishli#NagishLiTag > #NagishLiBar > #NagishLiMenus[id] > .nl-dropdown > .nl-dropdown-menu > li.active > div,
html body nagishli#NagishLiTag > #NagishLiBar > #NagishLiMenus[id] > .nl-dropdown > .nl-dropdown-menu > li > div.active {
  color: var(--nl-accent-hover) !important;
  background: var(--nl-surface) !important;
  box-shadow: inset -3px 0 0 var(--nl-accent) !important;
  font-weight: 700;
}

/* Keyboard focus: gold ring on every widget control (vendor draws none). */
html body nagishli#NagishLiTag [tabindex]:focus-visible,
html body nagishli#NagishLiTag a:focus-visible,
html body nagishli#NagishLiTag select:focus-visible {
  outline: 2px solid var(--nl-accent-hover) !important;
  outline-offset: -3px;
}
html body nagishli#NagishLiTag > #NagishLiBar > #NagishLiBarStrip[tabindex]:focus-visible { outline-offset: 2px; }

/* Misc controls on the dark rows. */
html body nagishli#NagishLiTag select {
  color: var(--nl-text) !important;
  background: var(--nl-bg) !important;
  border: 1px solid var(--nl-accent) !important;
  border-radius: 2px !important;
  padding: 4px 6px !important;
}
html body nagishli#NagishLiTag select option { color: var(--nl-text) !important; background: var(--nl-surface) !important; }
html body nagishli#NagishLiTag select optgroup { color: var(--nl-accent-hover) !important; background: var(--nl-bg) !important; }
html body nagishli#NagishLiTag #NLCustomColors #NLCurrentBG,
html body nagishli#NagishLiTag #NLCustomColors #NLCurrentTXT { border-color: var(--nl-muted) !important; }
html body nagishli#NagishLiTag > #NagishLiBar > #NagishLiMenus > .nl-dropdown > #NagishLiColors > li > #NLCustomColors > ul > li { border-color: var(--nl-muted) !important; }
html body nagishli#NagishLiTag > #NagishLiBar > #NagishLiMenus > .nl-dropdown > #NagishLiColors > li > #NLCustomColors > ul > li:hover,
html body nagishli#NagishLiTag > #NagishLiBar > #NagishLiMenus > .nl-dropdown > #NagishLiColors > li > #NLCustomColors > ul > li.selected { border-color: var(--nl-accent-hover) !important; }
html body nagishli#NagishLiTag > #NagishLiBar > #NagishLiMenus[id] a { color: var(--nl-accent-hover) !important; border-bottom-color: var(--nl-accent) !important; }
html body nagishli#NagishLiTag .help,
html body nagishli#NagishLiTag .notice { color: var(--nl-accent-hover); }

/* Tooltips. */
html body nagishli#NagishLiTag [data-balloon]:after {
  font-family: var(--nl-font) !important;
  font-size: 13px !important;
  color: var(--nl-text);
  background: rgb(6 5 5 / 96%);
  border: 1px solid var(--nl-line);
  border-radius: 2px;
}

/* Information overlays (keyboard shortcuts, how it was made accessible). The vendor box carries
   inline !important white/black/blue, so the paper tone and gold frame are painted over it. */
html body nagishli#NagishLiTag > .NagishLiOverlay[class] { background: rgb(6 5 5 / 82%) !important; }
html body nagishli#NagishLiTag #NagishLiOverlayContent[id] {
  background-image: linear-gradient(var(--nl-text), var(--nl-text));
  border-image: linear-gradient(var(--nl-accent), var(--nl-accent)) 1;
}
html body nagishli#NagishLiTag #NagishLiOverlayContent[id] .nlas-title,
html body nagishli#NagishLiTag #NagishLiOverlayContent[id] .nlas-title[class],
html body nagishli#NagishLiTag #NagishLiOverlayContent[id] > div > a {
  color: #6b4f1d !important;
}
html body nagishli#NagishLiTag #NagishLiOverlayContent[id] > div > .nlas-title { color: #6b4f1d !important; }
html body nagishli#NagishLiTag #NagishLiOverlayContent[id] > div > kbd {
  color: var(--nl-text) !important;
  background-color: var(--nl-bg) !important;
  border-radius: 2px !important;
}
html body nagishli#NagishLiTag #NagishLiOverlayContent[id] > div > a:focus-visible { outline-color: var(--nl-bg) !important; outline-offset: 2px; }

/* Motion: colour fades only, and nothing when the visitor asks for less. */
@media (prefers-reduced-motion: no-preference) {
  html body nagishli#NagishLiTag > #NagishLiBar > #NagishLiBarStrip[id],
  html body nagishli#NagishLiTag > #NagishLiBar > #NagishLiMenus[id] > .nl-dropdown > .nl-dropdown-toggle,
  html body nagishli#NagishLiTag > #NagishLiBar > #NagishLiMenus[id] > .nl-dropdown > .nl-dropdown-menu > li > div {
    transition: background-color 200ms cubic-bezier(0.22, 1, 0.36, 1), border-color 200ms cubic-bezier(0.22, 1, 0.36, 1), color 200ms cubic-bezier(0.22, 1, 0.36, 1);
  }
}
@media (prefers-reduced-motion: reduce) {
  html body nagishli#NagishLiTag *,
  html body nagishli#NagishLiTag *:before,
  html body nagishli#NagishLiTag *:after {
    animation: none !important;
    transition: none !important;
  }
}

/* Phone: keep the closed
   button narrow and let the open panel use the width. */
@media (max-width: 767px) {
  nagishli#NagishLiTag { --nl-gap: max(12px, env(safe-area-inset-left)); }
  html body nagishli#NagishLiTag > #NagishLiBar[id] { margin-bottom: max(10px, env(safe-area-inset-bottom)); }
  html body nagishli#NagishLiTag > #NagishLiBar > #NagishLiBarStrip[id] { padding: 10px 14px !important; }
  html body nagishli#NagishLiTag > #NagishLiBar > #NagishLiBarStrip[id]::before { inset-inline-start: 14px; }
}

/* Below 640px the join dock is shown: the closed chip becomes a 56x56 icon-only square (dock height) so the dock
   fits beside it (the dock reserves 56px + 8px gap in landing.css). The title stays in the
   accessibility tree (visually hidden, not display:none). The open state is unchanged. */
@media (max-width: 639px) {
  html body nagishli#NagishLiTag > #NagishLiBar > #NagishLiBarStrip[id]:not(.open) {
    justify-content: center;
    gap: 0;
    vertical-align: top !important; /* no text baseline left: avoid a descender gap under the chip */
    width: 56px !important;
    height: 56px !important;
    min-height: 56px;
    padding: 0 !important;
  }
  html body nagishli#NagishLiTag > #NagishLiBar > #NagishLiBarStrip[id]:not(.open)::before {
    inset-inline-start: 50%;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    margin-inline-start: -10px;
  }
  html body nagishli#NagishLiTag > #NagishLiBar > #NagishLiBarStrip[id]:not(.open) > #NagishLiLogo {
    position: absolute !important;
  }
  html body nagishli#NagishLiTag > #NagishLiBar > #NagishLiBarStrip[id]:not(.open) > #NagishLiTitle {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }
}
