/* The accessibility menu (ו1214, 10/11/2026). ONE component for every page, like Maya's row (maya-row.css).
   Look: style 2 of four, "קרם נקי", chosen by the owner. A cream panel, white cards with a thin border, and the four
   pastels (the tones of the home page's agent cards, home-hub.css .hh-tile--*) ONLY in a thin edge line on a
   profile, a dot beside a group title and the chosen state. A switch that is on is teal.
   Behaviour: a11y-menu.js. Markup and the early script: templates/_a11y_menu.html. Words: server/a11y_menu.py.

   Part 1 is the menu itself. Part 2 is what each setting does to the PAGE: it is written against attributes the
   script puts on <html> (data-a11y-*), and it never touches the menu (.np-a11y-ui), which must stay readable
   whatever the visitor picked. No request leaves this file: no font, no image, no third party. */

/* ---------- 1. the menu ---------- */
.np-a11y-ui {
  --na-navy: #16294a;
  --na-teal: #0f7368;
  --na-btn: #0f6b5f;
  --na-cream: #f6f4f0;
  --na-line: #e8e0d6;
  --na-line-2: #d9d0c4;
  --na-mute: #4f5868;
  --na-off: #8c9790;
  font: 400 16px/1.4 'Assistant', 'Heebo', system-ui, sans-serif;
  direction: rtl;
  text-align: start;
  letter-spacing: normal;
  word-spacing: normal;
  color: var(--na-navy);
  /* the page may be zoomed (text size); the menu is not, so it keeps the size it was designed at */
  zoom: calc(1 / var(--np-a11y-z, 1));
}
[data-tone="mint"]  { --pa: #d3ecdf; --pb: #e8f5ee; --pc: #0f6b5f; --pt: #0c5a50; }
[data-tone="sky"]   { --pa: #d7e5f7; --pb: #eaf1fb; --pc: #1f5fa8; --pt: #1a5293; }
[data-tone="lav"]   { --pa: #e0daf5; --pb: #efecfb; --pc: #5b4bb0; --pt: #4d3f9a; }
[data-tone="peach"] { --pa: #f9dbc9; --pb: #fdece2; --pc: #a8471f; --pt: #8a3815; }

.np-a11y-ui *, .np-a11y-ui *::before, .np-a11y-ui *::after { box-sizing: border-box; }
.np-a11y-ui [hidden] { display: none !important; }
.np-a11y-ui button { font: inherit; color: inherit; margin: 0; cursor: pointer; }
.np-a11y-ui h2, .np-a11y-ui h3, .np-a11y-ui p { margin: 0; padding: 0; letter-spacing: normal; }
.np-a11y-sr {
  /* pinned to the top start corner of its box, margin 0 (ו1367): the live region's containing block is the window,
     and at its static place a -1px margin set its 1px box one pixel past the right edge of a phone (RTL), while a 0
     margin there added a pixel to the page's height (tests_browser: "the form fits a phone", "one screen") */
  position: absolute !important; top: 0; inset-inline-start: 0; width: 1px; height: 1px; margin: 0; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* the floating button: on the left edge (the owner's decision, ו1214). Since 11/11 (ו1221, the owner chose "א" of four
   on the mock-up of 11/11 (its address is in docs/decisions/1221.md), "אני רוצה אייקון עדין יותר") a quiet white disc:
   40px, a thin border and a soft shadow, the person in teal; 44px on a phone, the tap size the rules ask for.
   On a computer it floats at mid-height, clear of a footer or a bar along the bottom; on a phone it rides above
   whatever bar the page keeps along the bottom (a11y-menu.js measures it and sets --na-lift). */
.np-a11y-btn {
  position: fixed; z-index: 2147483000;
  left: 16px; transition: top .2s ease, bottom .2s ease; top: calc(56% + var(--na-shift, 0px)); bottom: auto;
  width: 40px; height: 40px; padding: 0; border-radius: 50%;
  display: grid; place-items: center;
  background: #fff; color: var(--na-btn); border: 1px solid var(--na-line);
  box-shadow: 0 4px 12px rgba(22, 41, 74, .12);
}
.np-a11y-btn:hover { border-color: var(--na-btn); box-shadow: 0 6px 16px rgba(15, 107, 95, .22); }
/* `.np-a11y-ui button { color: inherit }` outranks the class alone, and the person came out navy: the person is teal (ו1221) */
.np-a11y-ui .np-a11y-btn { color: var(--na-btn); }
@media (prefers-reduced-motion: reduce) { .np-a11y-btn { transition: none; } }
.np-a11y-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
html[data-a11y-hidden="1"] .np-a11y-btn { display: none; }
/* a page may seat the button in its own frame (ו1256, data-a11y-seat, a11y-menu.js): the same disc, in the page's flow */
.np-a11y-seat .np-a11y-btn { position: static; flex: none; transition: none; }
@media (max-width: 767px) {
  .np-a11y-btn { top: auto; bottom: calc(24px + var(--na-lift, 0px)); width: 44px; height: 44px; }
}
.np-a11y-panel {
  position: fixed; z-index: 2147483001;
  left: 12px; top: 12px; bottom: 12px; width: 372px; max-width: calc(100% - 24px);
  display: flex; flex-direction: column;
  background: var(--na-cream); color: var(--na-navy);
  border: 1px solid var(--na-line); border-radius: 20px;
  box-shadow: 0 10px 40px rgba(22, 41, 74, .28);
  overflow: hidden;
}
@media (max-width: 767px) {
  .np-a11y-panel { left: 0; right: 0; top: auto; bottom: 0; width: auto; max-width: none; height: 82%; border-radius: 22px 22px 0 0; }
  .np-a11y-panel::before { content: ""; flex: none; width: 44px; height: 5px; border-radius: 9px; background: var(--na-line-2); margin: 8px auto 0; }
}
.np-a11y-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px 12px; background: var(--na-cream); border-bottom: 1px solid var(--na-line); }
.np-a11y-head h2 { font: 800 20px/1.2 'Heebo', 'Assistant', sans-serif; color: var(--na-navy); }
.np-a11y-head p { font-size: 13px; color: var(--na-mute); margin-top: 2px; }
.np-a11y-x { flex: none; width: 44px; height: 44px; padding: 0; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 1px solid #e0d8cc; color: var(--na-navy); }
.np-a11y-x svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.np-a11y-body { flex: 1; min-height: 0; overflow: auto; padding: 12px 12px 8px; display: grid; gap: 10px; align-content: start; overscroll-behavior: contain; }

.np-a11y-grp { background: #fff; border: 1px solid var(--na-line); border-radius: 16px; padding: 0 14px; }
.np-a11y-grp > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; cursor: pointer; }
.np-a11y-grp > summary::-webkit-details-marker { display: none; }
.np-a11y-grp > summary::after { content: "+"; content: "+" / ""; flex: none; width: 28px; text-align: center; font: 800 20px 'Heebo', sans-serif; color: var(--na-navy); }
.np-a11y-grp[open] > summary::after { content: "\2212"; content: "\2212" / ""; }
.np-a11y-grp h3 { display: flex; align-items: center; gap: 8px; font: 800 15px/1.3 'Heebo', 'Assistant', sans-serif; color: var(--na-navy); }
.np-a11y-grp h3::before { content: ""; flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--pc); }
.np-a11y-in { padding: 0 0 12px; display: grid; gap: 4px; }
.np-a11y-hint { font-size: 13px; line-height: 1.5; color: var(--na-mute); margin-bottom: 6px; }

.np-a11y-profs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.np-a11y-prof { position: relative; min-height: 64px; padding: 10px 12px; text-align: start; background: #fff; border: 1px solid var(--na-line); border-radius: 14px; }
.np-a11y-prof::before { content: ""; position: absolute; top: 10px; inset-inline-end: -1px; width: 4px; height: 26px; border-radius: 4px 0 0 4px; background: var(--pc); }
.np-a11y-prof b { display: block; font: 800 14px/1.3 'Heebo', 'Assistant', sans-serif; color: var(--na-navy); }
.np-a11y-prof small { display: block; font-size: 12px; line-height: 1.4; margin-top: 2px; color: var(--na-mute); }
.np-a11y-prof[aria-pressed="true"] { background: var(--pa); border-color: var(--pc); }
.np-a11y-prof[aria-pressed="true"] small { color: #3b4454; }

.np-a11y-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; }
.np-a11y-lab { font: 600 15px/1.3 'Assistant', sans-serif; color: var(--na-navy); display: block; margin-bottom: 4px; }
.np-a11y-row .np-a11y-lab { margin: 0; }
.np-a11y-step { display: flex; align-items: center; gap: 8px; }
.np-a11y-step button { width: 44px; height: 44px; padding: 0; display: grid; place-items: center; border-radius: 12px; background: var(--na-cream); border: 1px solid var(--na-line-2); }
.np-a11y-step svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.np-a11y-step output { min-width: 52px; text-align: center; font: 800 16px 'Heebo', sans-serif; }

.np-a11y-sw { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 48px; padding: 0; background: none; border: 0; text-align: start; }
.np-a11y-t { display: block; }
.np-a11y-t > span { display: block; font: 600 15px/1.3 'Assistant', sans-serif; color: var(--na-navy); }
.np-a11y-t small { display: block; font-size: 12.5px; line-height: 1.4; color: var(--na-mute); }
.np-a11y-track { flex: none; position: relative; width: 52px; height: 30px; border-radius: 99px; background: var(--na-off); transition: background .15s; }
.np-a11y-track::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: inset .15s; }
.np-a11y-sw[aria-checked="true"] .np-a11y-track { background: var(--na-teal); }
.np-a11y-sw[aria-checked="true"] .np-a11y-track::after { inset-inline-start: 25px; }
.np-a11y-sw[disabled] { opacity: .55; cursor: not-allowed; }

.np-a11y-set { padding: 4px 0; }
.np-a11y-seg, .np-a11y-regs { display: flex; flex-wrap: wrap; gap: 6px; }
.np-a11y-seg button { flex: 1 1 0; min-width: 0; min-height: 44px; padding: 0 6px; background: var(--na-cream); border: 1px solid var(--na-line-2); border-radius: 12px; font: 700 13px 'Heebo', 'Assistant', sans-serif; color: var(--na-navy); }
.np-a11y-seg button[aria-pressed="true"] { background: var(--pa); color: var(--pt); outline: 2px solid var(--pc); outline-offset: -2px; border-color: transparent; }
.np-a11y-regs button { min-height: 44px; padding: 0 14px; background: var(--na-cream); border: 1px solid var(--na-line-2); border-radius: 99px; font: 700 13px 'Heebo', 'Assistant', sans-serif; color: var(--na-navy); }

.np-a11y-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.np-a11y-tools button { flex: 1 1 140px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 12px; background: #fff; border: 1px solid var(--na-line); border-radius: 14px; font: 700 13.5px 'Heebo', 'Assistant', sans-serif; color: var(--na-navy); }
.np-a11y-tools svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.np-a11y-foot { flex: none; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; padding: 10px 18px 14px; background: #fff; border-top: 1px solid var(--na-line); }
.np-a11y-reset { min-height: 44px; padding: 0 18px; border: 0; border-radius: 99px; background: #d3ecdf; color: #0c5a50; font: 700 14px 'Heebo', 'Assistant', sans-serif; }
.np-a11y-links { display: flex; flex-wrap: wrap; gap: 0 14px; }
.np-a11y-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px; color: var(--na-teal); font: 600 14px 'Assistant', sans-serif; text-decoration: underline; }

.np-a11y-ui button:focus-visible, .np-a11y-ui a:focus-visible, .np-a11y-ui summary:focus-visible { outline: 3px solid #0b1a33; outline-offset: 2px; box-shadow: 0 0 0 6px #ffd400; }

/* the link at the foot of every page: the way back when the floating button was hidden (ו1214) */
.np-a11y-pagelink { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 6px; background: none; border: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
.np-a11y-strip { display: flex; justify-content: center; padding: 8px 16px 16px; font: 600 14px 'Assistant', sans-serif; color: #4f5868; }
.np-a11y-pagelink:focus-visible { outline: 3px solid #0b1a33; outline-offset: 2px; box-shadow: 0 0 0 6px #ffd400; }

/* the reading bar: dims everything above and below a band that follows the pointer */
.np-a11y-mask { position: fixed; inset: 0; z-index: 2147482990; pointer-events: none; display: none; --y: 40%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, .62) calc(var(--y) - 44px), transparent calc(var(--y) - 44px), transparent calc(var(--y) + 44px), rgba(0, 0, 0, .62) calc(var(--y) + 44px)); }
html[data-a11y-rf="1"] .np-a11y-mask { display: block; }

/* the region the visitor just jumped to */
.np-a11y-flash { outline: 4px solid #ff6a00 !important; outline-offset: 4px !important; }

/* a printed page has no menu on it */
@media print { .np-a11y-ui { display: none !important; } }

@media (prefers-reduced-motion: reduce) { .np-a11y-track, .np-a11y-track::after { transition: none; } }

/* ---------- 2. what each setting does to the page ---------- */
/* text size is a zoom on <html>, set by the early script (templates/_a11y_menu.html): the site is written in pixels,
   so a font-size change would reach almost nothing. */

/* line spacing: running text only, never a control with a fixed height */
html[data-a11y-lh="1"] :is(p, li, dd, dt, blockquote, h1, h2, h3, h4, h5, h6, td, th, label, figcaption):not(.np-a11y-ui *) {
  line-height: 1.9 !important; letter-spacing: .02em !important; word-spacing: .08em !important;
}
/* a plain font: the system's, instead of the site's two */
html[data-a11y-fn="1"] body *:not(.np-a11y-ui):not(.np-a11y-ui *) { font-family: Arial, 'Segoe UI', system-ui, sans-serif !important; letter-spacing: .01em; }
/* headings marked: a dashed frame in the heading's own colour, so it shows on any background */
html[data-a11y-hd="1"] :is(h1, h2, h3, h4, h5, h6):not(.np-a11y-ui *) { outline: 2px dashed currentColor !important; outline-offset: 4px !important; font-weight: 800 !important; }
/* links marked: underlined, thick, on a pale yellow */
html[data-a11y-ul="1"] a:not(.np-a11y-ui *) {
  text-decoration: underline !important; text-decoration-thickness: 2px !important; text-underline-offset: 3px !important;
  background-color: #fff3b0 !important; color: #16294a !important;
}
/* a strong keyboard focus ring: two tones, so it shows on light, dark and photographs */
html[data-a11y-kb="1"] :focus-visible:not(.np-a11y-ui *) { outline: 4px solid #0b1a33 !important; outline-offset: 3px !important; box-shadow: 0 0 0 7px #ffd400 !important; }
/* a large cursor: an arrow, and a teal one over what can be pressed */
html[data-a11y-cur="1"], html[data-a11y-cur="1"] body *:not(.np-a11y-ui *) {
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40'><path d='M6 3l26 14-11 3 7 14-6 3-7-14-8 8z' fill='black' stroke='white' stroke-width='2'/></svg>") 4 3, auto !important;
}
html[data-a11y-cur="1"] :is(a, button, summary, label, [role="button"], [role="switch"], [role="tab"], select, input[type="submit"]):not(.np-a11y-ui *) {
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40'><path d='M6 3l26 14-11 3 7 14-6 3-7-14-8 8z' fill='%230f7368' stroke='white' stroke-width='2'/></svg>") 4 3, pointer !important;
}
/* no motion: animation, transitions and smooth scrolling off (also the starting state for a device that asks for it) */
html[data-a11y-mo="1"] *, html[data-a11y-mo="1"] *::before, html[data-a11y-mo="1"] *::after {
  animation: none !important; transition: none !important; scroll-behavior: auto !important;
}
/* read aloud: the text being read is highlighted, and the text that can be read says so */
html[data-a11y-ra="1"] :is(p, li, h1, h2, h3, h4, h5, h6, td, th, dd, blockquote, figcaption):not(a *, .np-a11y-ui *):hover { outline: 2px dashed #0f7368; outline-offset: 2px; }
.np-a11y-reading { background-color: #fff3b0 !important; color: #16294a !important; outline: 3px solid #0f7368 !important; }

/* colour: the filters are summed in two variables so contrast "dark" and a saturation can be on together */
html[data-a11y-con="dk"] { --na-f-dk: invert(1) hue-rotate(180deg); background: #fff; }
html[data-a11y-sat="1"] { --na-f-sat: saturate(.45); }
html[data-a11y-sat="2"] { --na-f-sat: saturate(2); }
html[data-a11y-sat="3"] { --na-f-sat: grayscale(1); }
html[data-a11y-con="dk"], html[data-a11y-sat="1"], html[data-a11y-sat="2"], html[data-a11y-sat="3"] { filter: var(--na-f-dk, ) var(--na-f-sat, ); }
/* dark is the page turned inside out; what must stay as it was (photographs, video, the map, the menu) is turned back */
html[data-a11y-con="dk"] :is(img:not([src$=".svg"]), video, iframe, .mapboxgl-map, [style*="background-image"]):not(.mapboxgl-map *, [style*="background-image"] *),
html[data-a11y-con="dk"] .np-a11y-btn, html[data-a11y-con="dk"] .np-a11y-panel, html[data-a11y-con="dk"] .np-a11y-mask {
  filter: invert(1) hue-rotate(180deg);
}
/* (the filter goes on the menu's fixed parts, never on .np-a11y-ui: a filter makes its element the home of every
   fixed child, and the button and the panel would then sit at the foot of the page instead of the window) */

/* high contrast: white on black, yellow links. Light: black on white, blue links. Every surface is flattened, so the
   reading does not depend on a colour the page happened to pick. Photographs, video, the map and icons keep theirs. */
html[data-a11y-con="hc"] { background: #000; color: #fff; }
html[data-a11y-con="lt"] { background: #fff; color: #000; }
html[data-a11y-con="hc"] body *:not(.np-a11y-ui, .np-a11y-ui *, img, video, canvas, iframe, picture, svg, svg *, .mapboxgl-map, .mapboxgl-map *, [style*="background-image"]),
html[data-a11y-con="hc"] body {
  background-color: #000 !important; color: #fff !important;
  border-color: #fff !important; box-shadow: none !important; text-shadow: none !important;
}
html[data-a11y-con="lt"] body *:not(.np-a11y-ui, .np-a11y-ui *, img, video, canvas, iframe, picture, svg, svg *, .mapboxgl-map, .mapboxgl-map *, [style*="background-image"]),
html[data-a11y-con="lt"] body {
  background-color: #fff !important; color: #000 !important;
  border-color: #000 !important; box-shadow: none !important; text-shadow: none !important;
}
html[data-a11y-con="hc"] a:not(.np-a11y-ui *), html[data-a11y-con="hc"] a:not(.np-a11y-ui *) * { color: #ffe14d !important; text-decoration: underline !important; }
html[data-a11y-con="lt"] a:not(.np-a11y-ui *), html[data-a11y-con="lt"] a:not(.np-a11y-ui *) * { color: #0000c8 !important; text-decoration: underline !important; }
html[data-a11y-con="hc"] :is(button, [role="button"], input, select, textarea, summary):not(.np-a11y-ui *) { border: 2px solid #fff !important; }
html[data-a11y-con="lt"] :is(button, [role="button"], input, select, textarea, summary):not(.np-a11y-ui *) { border: 2px solid #000 !important; }
html[data-a11y-con="hc"] svg:not(.np-a11y-ui *) { color: #fff; filter: brightness(0) invert(1); }
html[data-a11y-con="lt"] svg:not(.np-a11y-ui *) { color: #000; filter: brightness(0); }
/* what the page draws with a gradient is flattened (the script tags it: a11y-menu.js tagBackgrounds); a small picture
   drawn as a background, a logo or an icon, is made one plain colour so it shows on the flat ground */
html[data-a11y-con="hc"] [data-a11y-bg="grad"], html[data-a11y-con="lt"] [data-a11y-bg="grad"] { background-image: none !important; }
html[data-a11y-con="hc"] body [data-a11y-bg="icon"] { filter: brightness(0) invert(1); background-color: transparent !important; }
html[data-a11y-con="hc"] img[src$=".svg"]:not(.np-a11y-ui *) { filter: brightness(0) invert(1); }
html[data-a11y-con="lt"] body [data-a11y-bg="icon"] { filter: brightness(0); background-color: transparent !important; }
html[data-a11y-con="hc"] body *:not(.np-a11y-ui *)::before, html[data-a11y-con="hc"] body *:not(.np-a11y-ui *)::after,
html[data-a11y-con="lt"] body *:not(.np-a11y-ui *)::before, html[data-a11y-con="lt"] body *:not(.np-a11y-ui *)::after { background-color: transparent !important; box-shadow: none !important; }
html[data-a11y-con="hc"] ::placeholder { color: #d6d6d6 !important; }
html[data-a11y-con="lt"] ::placeholder { color: #444 !important; }
html[data-a11y-con="hc"] :focus-visible:not(.np-a11y-ui *) { outline: 4px solid #ffe14d !important; outline-offset: 3px !important; }
html[data-a11y-con="lt"] :focus-visible:not(.np-a11y-ui *) { outline: 4px solid #000 !important; outline-offset: 3px !important; box-shadow: 0 0 0 7px #ffd400 !important; }
