/* ====================================================
   תעודתא · מערכת עיצוב, גרסה 2
   הטוקנים (צבעים, פונטים, מרווחים, פינות, צללים) נמצאים ב-tokens.css,
   שנטען לפני הקובץ הזה. כאן רק רכיבים. אין כאן ערכי צבע קשיחים: הכל דרך משתנים,
   כדי שהמצב הכהה ומצבי הנגישות יעבדו בכל מקום.
   ================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-ui); line-height: 1.6; min-height: 100vh;
       -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
a { color: var(--primary); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--primary-hover); }
h1, h2, h3, h4, .display { font-family: var(--font-display); font-weight: 700; line-height: 1.2; margin: 0; text-wrap: balance; letter-spacing: -.01em; color: var(--ink); }
h1 { font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.5rem); font-weight: 800; }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); font-weight: 600; }
p { margin: .5rem 0; }
small { font-size: .85rem; }
img { max-width: 100%; }
.fine { color: var(--ink-2); font-size: .9rem; }
.muted { color: var(--ink-2); }
.eyebrow { display: inline-flex; align-items: center; gap: .4rem; font-size: var(--fs-xs); letter-spacing: .04em; color: var(--primary); font-weight: 700; margin: 0 0 .6rem;
           background: var(--primary-soft); padding: .2rem .7rem; border-radius: var(--r-pill); }
.lede { font-size: var(--fs-lg); max-width: 62ch; color: var(--ink-2); }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
::selection { background: var(--primary-soft); color: var(--ink); }

/* ---------- topbar: משטח בהיר עם טשטוש, לוגו בצבע המותג ---------- */
.topbar { position: sticky; top: 0; z-index: 50; height: var(--topbar-h); display: flex; align-items: center; gap: 1.25rem; padding: 0 clamp(1rem, 3vw, 2rem);
          background: color-mix(in srgb, var(--surface) 86%, transparent); color: var(--ink);
          backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
          border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: .75rem; color: var(--primary); text-decoration: none; min-width: 0; }
.brand:hover { color: var(--primary-hover); }
.seal { width: 36px; height: 36px; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; justify-content: center; }
.brand-text b { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; }
.brand-text small { font-size: .72rem; color: var(--ink-3); white-space: nowrap; padding-inline-start: .75rem; border-inline-start: 1px solid var(--line); }
.mainnav { display: flex; gap: .15rem; margin-inline-start: auto; align-items: center; }
.mainnav a { color: var(--ink-2); text-decoration: none; padding: .5rem .85rem; border-radius: var(--r-pill); font-weight: 500; font-size: .95rem;
             transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.mainnav a:hover { background: var(--surface-2); color: var(--ink); }
.mainnav a[aria-current] { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.mainnav a.quiet { color: var(--ink-3); font-weight: 400; }
.mainnav a.quiet:hover { color: var(--ink); }
.mainnav a.lang { font-size: .78rem; font-weight: 600; border: 1px solid var(--line); padding: .3rem .65rem; margin-inline-start: .3rem; }
.navtoggle { display: none; margin-inline-start: auto; background: none; border: 0; padding: .6rem; cursor: pointer; border-radius: var(--r-sm); }
.navtoggle:hover { background: var(--surface-2); }
.navtoggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 4px 0; border-radius: 2px; transition: transform var(--t-base) var(--ease), opacity var(--t-fast); }
.nav-open .navtoggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-open .navtoggle span:nth-child(2) { opacity: 0; }
.nav-open .navtoggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- page ---------- */
.page { max-width: 1140px; margin: 0 auto; padding: clamp(1.25rem, 3vw, 2.5rem) clamp(1rem, 3vw, 2rem) 3.5rem; }
.page.narrow { max-width: 780px; }
.page > h1:first-child, .page > article > h1:first-child { margin-bottom: .5rem; }
.foot { max-width: 1140px; margin: 0 auto; padding: 1.5rem clamp(1rem, 3vw, 2rem) 2.5rem; color: var(--ink-3); font-size: .85rem; border-top: 1px solid var(--line); }
.disclaimer { background: var(--surface); border: 1px solid var(--line); padding: .9rem 1.1rem; color: var(--ink-2); border-radius: var(--r-md); margin: 0 0 1rem;
              display: flex; gap: .7rem; align-items: flex-start; }
.disclaimer::before { content: "i"; flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink);
                      font-family: var(--font-display); font-weight: 800; font-size: .8rem; margin-top: .1rem; }
.foot-meta { display: flex; flex-wrap: wrap; gap: .25rem .2rem; align-items: center; }
.foot-meta a { color: var(--ink-2); text-decoration: none; }
.foot-meta a:hover { color: var(--primary); text-decoration: underline; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; padding: .6rem 1.4rem; border-radius: var(--r-pill);
       border: 1px solid transparent; font-weight: 600; font-size: .98rem; text-decoration: none; cursor: pointer; line-height: 1.2;
       transition: transform var(--t-fast) var(--ease), box-shadow var(--t-base) var(--ease), background var(--t-base) var(--ease), border-color var(--t-base), color var(--t-base); }
.btn:active { transform: scale(.98); }
.btn { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.primary { background: var(--primary); color: var(--primary-ink); border-color: transparent; }
.btn.primary:hover { background: var(--primary-hover); color: var(--primary-ink); box-shadow: 0 6px 20px color-mix(in srgb, var(--primary) 35%, transparent); }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn.ghost:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--line)); color: var(--primary); }
.btn.link { background: none; border-color: transparent; color: var(--ink-2); min-height: 40px; padding-inline: .8rem; }
.btn.link:hover { color: var(--primary); background: var(--surface-2); }
.btn.danger { background: var(--revoked); color: var(--bg); border-color: transparent; }
.btn.danger:hover { filter: brightness(1.08); }
.btn.small { min-height: 36px; padding: .35rem .95rem; font-size: .88rem; }
.btn.block { width: 100%; }
.btn[disabled], .btn[aria-disabled=true] { opacity: .45; cursor: not-allowed; box-shadow: none; transform: none; }
.actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.75rem; }
.actions.column { flex-direction: column; align-items: stretch; max-width: 380px; }

/* ---------- chips ---------- */
.chip { display: inline-flex; align-items: center; gap: .4rem; min-height: 36px; padding: .3rem .95rem; border-radius: var(--r-pill); border: 1px solid var(--line);
        background: var(--surface); color: var(--ink); font-size: .9rem; font-weight: 500; cursor: pointer; white-space: nowrap; text-decoration: none;
        transition: background var(--t-fast) var(--ease), border-color var(--t-fast), color var(--t-fast), box-shadow var(--t-fast); }
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip.on, .chip[aria-pressed=true] { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.chip.profile { border-color: transparent; background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.chip.profile .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.chip.select { appearance: none; -webkit-appearance: none; padding-inline-end: 2rem; font-family: inherit;
               background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23667085' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
               background-repeat: no-repeat; background-position: left .8rem center; }
[dir=ltr] .chip.select { background-position: right .8rem center; }
.chip.quiet { color: var(--ink-2); }

/* ---------- badges & tags: תמיד נקודה + טקסט, לא צבע בלבד ---------- */
.badge { display: inline-flex; align-items: center; gap: .35rem; padding: .15rem .6rem; border-radius: var(--r-pill); font-size: .78rem; font-weight: 600; white-space: nowrap; line-height: 1.5; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.badge.active { color: var(--active); background: var(--active-soft); }
.badge.unknown { color: var(--unknown); background: var(--unknown-soft); }
.badge.expired { color: var(--expired); background: var(--expired-soft); }
.badge.revoked { color: var(--revoked); background: var(--revoked-soft); }
/* פג תוקף ונשללה: איקס במקום נקודה, כדי שלא ייקראו כ"עוד צבע" */
.badge.expired::before, .badge.revoked::before { content: "✕"; width: auto; height: auto; background: none; border-radius: 0; font-size: .72em; font-weight: 800; line-height: 1; }
.tag { display: inline-flex; align-items: center; padding: .05rem .55rem; border: 1px solid var(--line); border-radius: var(--r-xs); font-size: .76rem; font-weight: 500; color: var(--ink-2); background: var(--surface); line-height: 1.6; }
.tag.kitchen-meat { color: var(--meat); border-color: transparent; background: var(--meat-soft); }
.tag.kitchen-dairy { color: var(--dairy); border-color: transparent; background: var(--dairy-soft); }
.tag.kitchen-parve { color: var(--parve); border-color: transparent; background: var(--parve-soft); }
.warn { background: var(--revoked-soft); color: var(--revoked); border: 1px solid color-mix(in srgb, var(--revoked) 30%, transparent); padding: .8rem 1rem; border-radius: var(--r-md); font-weight: 600; }
.note { background: var(--primary-soft); color: var(--ink); border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent); padding: .8rem 1.1rem; border-radius: var(--r-md); }

/* ---------- onboarding ---------- */
.welcome-body { background: var(--bg); }
.welcome { max-width: 680px; margin: 0 auto; padding: clamp(1.5rem, 5vw, 3.5rem) 1.25rem 4rem; }
.welcome h1 { font-size: clamp(1.8rem, 1.4rem + 1.8vw, 2.6rem); margin-bottom: .6rem; }
.welcome h1 b { color: var(--primary); }
.welcome h2 { font-size: var(--fs-lg); margin: 1.5rem 0 .6rem; }
.welcome .step:not([data-step="1"]) { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(1.25rem, 4vw, 2.25rem); box-shadow: var(--shadow-md);
                                         animation: rise var(--t-slow) var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* מסך הפתיחה: גיבור כהה ומלא */
.welcome:has(> .step[data-step="1"]:not([hidden])) { max-width: none; padding: 0; }
.welcome .step[data-step="1"] > * { max-width: 680px; }
.welcome .step[data-step="1"] > .hero-points { max-width: 760px; }
.welcome .step[data-step="1"] { position: relative; isolation: isolate; color: var(--hero-ink); text-align: center; overflow: hidden;
  margin: 0; padding: clamp(2.5rem, 8vw, 5rem) clamp(1.25rem, 5vw, 3rem) clamp(2.5rem, 7vw, 4rem);
  min-height: calc(100svh - var(--topbar-h)); display: flex; flex-direction: column; align-items: center; justify-content: center;
  background:
    radial-gradient(40% 35% at 90% 8%, color-mix(in srgb, var(--pastel-peach) 90%, transparent), transparent 70%),
    radial-gradient(40% 35% at 6% 92%, color-mix(in srgb, var(--pastel-sage) 95%, transparent), transparent 70%),
    radial-gradient(30% 30% at 12% 18%, color-mix(in srgb, var(--pastel-butter) 80%, transparent), transparent 70%),
    var(--hero-gradient); }
.welcome-body:has(.step[data-step="1"]:not([hidden])) { background: var(--bg); }
.welcome .step[data-step="1"] .lede { margin-inline: auto; max-width: 52ch; }
.welcome .step[data-step="1"] .actions { justify-content: center; }
.welcome .step[data-step="1"] .btn.primary { box-shadow: 0 10px 30px color-mix(in srgb, var(--primary) 30%, transparent); }
.welcome .hero-logo { color: var(--primary); margin: .4rem auto 1.2rem; }
.hero-points { list-style: none; padding: 0; margin: 2.2rem auto 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; max-width: 640px; text-align: start; }
.hero-points li { background: color-mix(in srgb, var(--surface) 75%, transparent); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: var(--r-md); padding: .9rem 1rem; font-size: .88rem; color: var(--ink-2); }
.hero-points b { display: block; color: var(--ink); font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; margin-bottom: .15rem; }
.hero-points .ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--pastel-peach); margin-bottom: .6rem; }
.hero-points svg { width: 18px; height: 18px; color: var(--primary); }
.hero-points li:nth-child(2) .ic { background: var(--pastel-sage); } .hero-points li:nth-child(2) svg { color: var(--parve); }
.hero-points li:nth-child(3) .ic { background: var(--pastel-sky); } .hero-points li:nth-child(3) svg { color: var(--dairy); }
@media (max-width: 640px) {
  .hero-points { grid-template-columns: 1fr; gap: .5rem; margin-top: 1.75rem; }
  .hero-points li { display: grid; grid-template-columns: auto 1fr; column-gap: .8rem; align-items: start; padding: .75rem .9rem; }
  .hero-points .ic { grid-row: 1 / span 2; margin: 0; }
}

/* התקדמות בשלבי האונבורדינג */
.welcome .step .eyebrow { margin-bottom: .9rem; }
.choices { display: grid; gap: .6rem; margin-top: 1.1rem; }
.choice { display: flex; align-items: flex-start; gap: .85rem; padding: .95rem 1.1rem; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-md); cursor: pointer;
          transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast); }
.choice:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); }
.choice:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent); }
.choice input { margin-top: .25rem; accent-color: var(--primary); width: 19px; height: 19px; flex: none; }
.choice span { display: flex; flex-direction: column; gap: .1rem; }
.choice b { font-size: 1.05rem; font-weight: 600; font-family: var(--font-display); }
.choice small { color: var(--ink-2); }
.choice.inline { padding: .6rem .9rem; align-items: center; }
.choice.inline span { flex-direction: row; }
.choice.inline + .choice.inline { margin-top: .4rem; }
.choices.compact .choice { padding: .65rem .9rem; }
.branch { margin-top: .75rem; padding: 1rem 1.1rem; background: var(--surface-2); border-radius: var(--r-md); border: 1px solid var(--line-2); }
.branch h2 { margin-top: 0; }
.picker { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .7rem; }
.chip-check { display: inline-flex; position: relative; }
.chip-check input { position: absolute; opacity: 0; }
.chip-check span { display: inline-block; padding: .35rem .85rem; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); font-size: .9rem; cursor: pointer;
                   transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast); }
.chip-check span:hover { border-color: var(--ink-3); }
.chip-check input:checked + span { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.chip-check input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.more { margin-top: 1.2rem; }
.more summary { cursor: pointer; color: var(--ink-2); font-weight: 500; }

/* ---------- map app ---------- */
.map-body { overflow: hidden; }
.map-body .topbar { position: fixed; width: 100%; }
.app { position: fixed; inset: var(--topbar-h) 0 0 0; display: flex; flex-direction: column; }
.filterbar { background: var(--surface); border-bottom: 1px solid var(--line); padding: .7rem clamp(.75rem, 2vw, 1.25rem) .6rem; display: flex; flex-direction: column; gap: .55rem; z-index: 20;
             box-shadow: 0 6px 18px -12px rgba(60,40,20,.2); }
.searchrow { display: flex; gap: .6rem; align-items: center; }
.locbox { position: relative; flex: 1 1 auto; display: flex; align-items: center; gap: .3rem; min-height: 48px; padding: 0 .4rem 0 .9rem; border: 1px solid var(--line); border-radius: var(--r-pill);
          background: var(--surface-2); min-width: 0; transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast); }
[dir=rtl] .locbox { padding: 0 .9rem 0 .4rem; }
.locbox:focus-within { background: var(--surface); border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 15%, transparent); }
.locbox .ico { width: 20px; height: 20px; color: var(--primary); flex-shrink: 0; }
.locbox input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 1rem; padding: .55rem .3rem; color: var(--ink); }
.locbox input::placeholder { color: var(--ink-3); }
.locbox input:focus { outline: none; }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; border: 0; background: none; color: var(--primary); cursor: pointer;
           transition: background var(--t-fast); }
.iconbtn:hover { background: var(--primary-soft); }
.iconbtn svg { width: 22px; height: 22px; }
.iconbtn.small { width: auto; height: 32px; padding: 0 .8rem; font-size: .82rem; font-weight: 600; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-pill); }
.viewtoggle { display: inline-flex; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-pill); }
.viewtoggle button { display: inline-flex; align-items: center; gap: .35rem; border: 0; background: none; padding: .45rem .9rem; cursor: pointer; color: var(--ink-2); border-radius: var(--r-pill); font-weight: 500;
                     transition: background var(--t-fast), color var(--t-fast); }
.viewtoggle button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.viewtoggle svg { width: 18px; height: 18px; }
.chiprow { display: flex; gap: .45rem; overflow-x: auto; scrollbar-width: none; padding: 1px 1px 2px; align-items: center; }
.chiprow::-webkit-scrollbar { display: none; }

.stage { flex: 1; position: relative; display: flex; min-height: 0; }
.map { flex: 1; background: var(--surface-2); position: relative; z-index: 0; }
.panel { width: 420px; flex-shrink: 0; background: var(--bg); border-inline-start: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.panel-head { display: flex; align-items: center; gap: .6rem; padding: .8rem 1rem .6rem; font-size: .88rem; color: var(--ink-2); font-weight: 500; }
.panel-head .handle { display: none; }
.results { list-style: none; margin: 0; padding: 0 .75rem .75rem; overflow-y: auto; flex: 1 1 auto; display: flex; flex-direction: column; gap: .5rem; }
.result { padding: .9rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: .25rem .6rem;
          transition: border-color var(--t-fast), box-shadow var(--t-base) var(--ease), transform var(--t-base) var(--ease); }
.result:hover, .result.hl { border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); box-shadow: var(--shadow-md); }
.result.greyed { opacity: .6; }
.result .name { font-family: var(--font-display); font-size: 1.08rem; font-weight: 600; color: var(--ink); text-decoration: none; line-height: 1.3; }
.result .name:hover { color: var(--primary); }
.result .dist { color: var(--ink-2); font-size: .8rem; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; background: var(--surface-2); padding: .1rem .55rem; border-radius: var(--r-pill); align-self: start; }
.result .addr { grid-column: 1 / -1; color: var(--ink-2); font-size: .86rem; }
.result .certs { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .35rem; }
.result .meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; font-size: .8rem; color: var(--ink-2); }
.result .meta:empty { display: none; }
.result .stars { color: var(--accent-ink); font-weight: 700; }
.result .fraud { grid-column: 1 / -1; color: var(--revoked); font-weight: 600; font-size: .85rem; }
.results:empty { flex: 0 0 auto; padding: 0; }
.empty { padding: 2rem 1.25rem; color: var(--ink-2); text-align: center; }
.count { font-variant-numeric: tabular-nums; }

/* סיכות במפה: טיפה עגולה בצבע הסטטוס, עם נקודה לבנה */
div.pin { position: relative; width: 24px; height: 24px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); border: 2px solid #fff;
          box-shadow: 0 2px 6px rgba(60,40,20,.35); transition: transform var(--t-fast) var(--ease); }
div.pin::after { content: ""; position: absolute; inset: 0; margin: auto; width: 7px; height: 7px; border-radius: 50%; background: #fff; }
.leaflet-marker-icon:hover div.pin { transform: rotate(-45deg) scale(1.15); }
div.pin.active { background: var(--active-pin); } div.pin.unknown { background: var(--unknown-pin); }
div.pin.expired { background: var(--expired-pin); } div.pin.revoked { background: var(--revoked-pin); }
/* סיכות הסטטוס הן SVG אחד (pinSvg ב-map-engine.js), זהה למקרא ולאונבורדינג */
.pin-svg { width: 22px; height: 30px; filter: drop-shadow(0 1px 2px rgba(60,40,20,.35)); transition: transform var(--t-fast) var(--ease); transform-origin: 50% 100%; }
.pin-svg svg { display: block; }
.leaflet-marker-icon:hover .pin-svg { transform: scale(1.15); }
.teu-pin { flex: none; width: 20px; height: 27px; filter: drop-shadow(0 1px 1.5px rgba(60,40,20,.3)); }
div.pin.approx { opacity: .5; border-style: dashed; }
div.pin.me { background: var(--dairy); border-radius: 50%; transform: none; width: 18px; height: 18px; border-width: 3px;
             box-shadow: 0 0 0 6px color-mix(in srgb, var(--dairy) 22%, transparent), 0 2px 6px rgba(60,40,20,.3); animation: pulse 2.4s var(--ease) infinite; }
div.pin.me::after { display: none; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--dairy) 28%, transparent), 0 2px 6px rgba(60,40,20,.3); }
                   50% { box-shadow: 0 0 0 11px color-mix(in srgb, var(--dairy) 0%, transparent), 0 2px 6px rgba(60,40,20,.3); } }
.leaflet-container { font-family: var(--font-ui); background: var(--surface-2); }
.leaflet-tile-pane { filter: saturate(.72) contrast(.98); }
.leaflet-popup-content { font-family: var(--font-ui); direction: rtl; margin: .8rem 1rem; color: var(--ink); }
.leaflet-popup-content .name { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--surface); color: var(--ink); }
.leaflet-popup-content-wrapper { border-radius: var(--r-md); box-shadow: var(--shadow-lg); }
.leaflet-bar { border: 0 !important; box-shadow: var(--shadow-md) !important; border-radius: var(--r-sm) !important; overflow: hidden; }
.leaflet-bar a { background: var(--surface) !important; color: var(--ink) !important; border-color: var(--line) !important; width: 36px !important; height: 36px !important; line-height: 36px !important; }
.leaflet-control-attribution { background: color-mix(in srgb, var(--surface) 80%, transparent) !important; color: var(--ink-3) !important; border-radius: var(--r-xs) 0 0 0; }
.leaflet-control-attribution a { color: var(--ink-2) !important; }

.sheet { position: fixed; inset: 0; z-index: 60; background: rgba(30,20,10,.45); backdrop-filter: blur(3px); display: flex; align-items: flex-end; justify-content: center; animation: fade var(--t-base) var(--ease); }
.sheet-card { background: var(--surface); width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; padding: 1.5rem 1.4rem calc(1.5rem + env(safe-area-inset-bottom));
              border-radius: var(--r-xl) var(--r-xl) 0 0; box-shadow: var(--shadow-lg); animation: slideup var(--t-slow) var(--ease); }
.sheet-card::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: -.6rem auto 1rem; }
.sheet-card h2 { margin-bottom: .3rem; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideup { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
@media (min-width: 720px) { .sheet { align-items: center; } .sheet-card { border-radius: var(--r-lg); } .sheet-card::before { display: none; } }

/* ---------- business page ---------- */
.biz-head { position: relative; display: grid; grid-template-columns: 1fr auto; gap: .6rem 1.5rem; align-items: start; margin-bottom: 1.5rem;
            background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(1.25rem, 3vw, 2rem); box-shadow: var(--shadow-sm); overflow: hidden; }
.biz-head::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--pastel-peach), var(--pastel-butter), var(--pastel-sage)); }
.biz-head h1 { font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.5rem); }
.biz-head .addr { color: var(--ink-2); margin-top: .4rem; display: flex; flex-wrap: wrap; gap: .25rem .5rem; align-items: center; }
.biz-head .addr a { font-weight: 600; text-decoration: none; }
.biz-head .rating-card { text-align: center; min-width: 130px; background: var(--accent-soft); border-color: transparent; }
.biz-links { display: flex; flex-wrap: wrap; gap: .5rem; grid-column: 1 / -1; margin-top: .6rem; }
.biz-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.75rem; align-items: start; }
.biz-main { display: grid; gap: 2rem; min-width: 0; }
.biz-main > section > h2, .section-title { display: flex; align-items: center; gap: .5rem; margin-bottom: .8rem; }
.count-pill { display: inline-grid; place-items: center; min-width: 1.7rem; height: 1.7rem; padding: 0 .45rem; border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink-2);
              font-family: var(--font-ui); font-size: .82rem; font-weight: 700; }
.certs { display: grid; gap: 1rem; }
.cert { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.15rem 1.25rem 1rem; display: grid; grid-template-columns: 1fr auto; gap: .5rem 1rem;
        box-shadow: var(--shadow-sm); overflow: hidden; }
.cert::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 4px; background: var(--expired-pin); }
.cert.active::before { background: var(--active-pin); } .cert.unknown::before { background: var(--unknown-pin); } .cert.revoked::before { background: var(--revoked-pin); }
.cert.not-accepted { opacity: .7; }
.cert.revoked { border-color: color-mix(in srgb, var(--revoked) 35%, var(--line)); }
.cert .body { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.cert .body a { color: inherit; text-decoration: none; }
.cert .body a:hover { color: var(--primary); }
.cert .stamp { grid-row: 1 / span 3; align-self: start; width: 76px; height: 76px; border-radius: 50%; border: 2px solid currentColor; display: flex; flex-direction: column; align-items: center; justify-content: center;
               font-size: .72rem; text-align: center; color: var(--accent-ink); line-height: 1.15; font-weight: 800; font-family: var(--font-display); transform: rotate(-8deg); padding: .4rem;
               box-shadow: inset 0 0 0 4px var(--surface), inset 0 0 0 5px currentColor; background: color-mix(in srgb, currentColor 7%, var(--surface)); }
.cert .stamp.active { color: var(--active); } .cert .stamp.unknown { color: var(--unknown); }
.cert .stamp.expired { color: var(--expired); } .cert .stamp.revoked { color: var(--revoked); }
.cert .row { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; font-size: .9rem; color: var(--ink-2); }
.cert .row b { color: var(--ink); font-weight: 600; margin-inline-end: .2rem; }
.cert .tags { display: flex; flex-wrap: wrap; gap: .3rem; }
/* .cert הוא גריד של עמודה רחבה ועמודה צרה לחותמת. הערה בלי grid-column נפלה לעמודה הצרה והתכווצה למילה בשורה */
.cert > .secondary-note, .cert > .status-note { grid-column: 1 / -1; margin: .1rem 0 0; }
.cert .src { grid-column: 1 / -1; font-size: .83rem; color: var(--ink-3); border-top: 1px solid var(--line-2); padding-top: .65rem; margin-top: .3rem; display: flex; flex-wrap: wrap; gap: .3rem 1rem; }
.side { display: grid; gap: 1rem; position: sticky; top: calc(var(--topbar-h) + 1rem); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.1rem 1.25rem; box-shadow: var(--shadow-sm); }
.card h3 { margin-bottom: .5rem; }
.card > .btn { margin-top: .5rem; }
.rating { font-size: 1.6rem; font-weight: 800; font-family: var(--font-display); color: var(--accent-ink); line-height: 1.2; }
.declaration { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.declaration p { white-space: pre-wrap; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .35rem .9rem; margin: 0; }
.kv dt { color: var(--ink-2); } .kv dd { margin: 0; }
.map-frame { padding: 0; overflow: hidden; }
.map-frame iframe { display: block; border: 0; width: 100%; height: 220px; }

/* ---------- bodies ---------- */
.body-groups { display: grid; gap: 2.25rem; margin-top: 1.5rem; }
.body-groups h2 { margin-bottom: .2rem; }
.body-list { list-style: none; padding: 0; margin: .8rem 0 0; display: grid; gap: .65rem; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.body-item { height: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: .95rem 1.1rem; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 1rem;
             text-decoration: none; color: inherit; box-shadow: var(--shadow-sm); transition: border-color var(--t-fast), box-shadow var(--t-base) var(--ease), transform var(--t-base) var(--ease); }
.body-item:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--line)); box-shadow: var(--shadow-md); transform: translateY(-1px); color: inherit; }
.body-item b { font-family: var(--font-display); font-size: 1.08rem; font-weight: 600; }
.body-item small { color: var(--ink-2); }
.body-item .who { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.body-item .count { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 4.2rem; min-height: 4.2rem; border-radius: var(--r-sm); background: var(--primary-soft);
                    font-family: var(--font-display); font-size: 1.45rem; font-weight: 800; line-height: 1; color: var(--primary); font-variant-numeric: tabular-nums; padding: .4rem; }
.body-item .count small { font-size: .66rem; font-family: var(--font-ui); font-weight: 500; color: var(--ink-2); margin-top: .25rem; }

/* בד"צים בצבע החותם, כדי שיהיו מובחנים מרבנות במבט אחד */
.badatz-group h2 { color: var(--accent-ink); }
.body-item.badatz .count { background: var(--accent-soft); color: var(--accent-ink); }
.body-item.badatz:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); }
.chip.quiet.badatz { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: var(--accent-soft); color: var(--accent-ink); }
.body-hero { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: start; margin-bottom: 1.25rem; }
.stats { display: flex; flex-wrap: wrap; gap: .75rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: .8rem 1rem; min-width: 120px; box-shadow: var(--shadow-sm); }
.stat b { display: block; font-size: 1.7rem; font-weight: 800; font-family: var(--font-display); font-variant-numeric: tabular-nums; line-height: 1.15; }
.stat span { font-size: .8rem; color: var(--ink-2); font-weight: 500; }
.stat.active b { color: var(--active); } .stat.unknown b { color: var(--unknown); }

/* ---------- tables ---------- */
.tscroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-sm); }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data th, table.data td { text-align: right; padding: .65rem .85rem; border-bottom: 1px solid var(--line-2); vertical-align: top; }
[dir=ltr] table.data th, [dir=ltr] table.data td { text-align: left; }
table.data th { background: var(--surface-2); font-weight: 600; font-size: .78rem; color: var(--ink-2); position: sticky; top: 0; letter-spacing: .01em; }
table.data tbody tr { transition: background var(--t-fast); }
table.data tbody tr:hover { background: color-mix(in srgb, var(--primary-soft) 45%, transparent); }
table.data tr:last-child td, table.data tr:last-child th { border-bottom: 0; }
table.data tbody th { background: none; position: static; font-size: .9rem; color: var(--ink); letter-spacing: 0; }
table.data td.num { font-variant-numeric: tabular-nums; }

/* ---------- guide ---------- */
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .75rem; }
.guide-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1rem 1.15rem; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: .25rem;
              box-shadow: var(--shadow-sm); transition: border-color var(--t-fast), box-shadow var(--t-base) var(--ease), transform var(--t-base) var(--ease); }
.guide-card:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); box-shadow: var(--shadow-md); transform: translateY(-1px); color: inherit; }
.guide-card b { font-family: var(--font-display); font-size: 1.08rem; font-weight: 600; }
.guide-card small { color: var(--ink-2); }
.prose { max-width: 68ch; font-size: 1.05rem; }
.prose h1 { margin-bottom: .6rem; }
.prose .name-note { margin-top: -.4rem; font-size: .8rem; color: var(--ink-3); }
.prose h2 { margin: 2rem 0 .5rem; }
.prose h3 { margin: 1.5rem 0 .4rem; }
.prose p, .prose li { line-height: 1.75; }
.prose ul, .prose ol { padding-inline-start: 1.3rem; }
.prose li::marker { color: var(--primary); }
.guide-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 2.5rem; }
.guide-nav { position: sticky; top: calc(var(--topbar-h) + 1rem); font-size: .9rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: .6rem 1rem 1rem; align-self: start; }
.guide-nav a { display: block; padding: .3rem .5rem; margin-inline: -.5rem; border-radius: var(--r-xs); color: var(--ink-2); text-decoration: none; }
.guide-nav a:hover { background: var(--surface-2); color: var(--ink); }
.guide-nav a[aria-current] { color: var(--primary); background: var(--primary-soft); font-weight: 600; }
.guide-nav h4 { margin: .9rem 0 .25rem; font-size: .72rem; letter-spacing: .06em; color: var(--ink-3); font-family: var(--font-ui); font-weight: 700; }

/* ---------- fraud ---------- */
.notice { background: var(--surface); border: 1px solid var(--line); border-inline-start: 4px solid var(--revoked); border-radius: var(--r-md); padding: .9rem 1.1rem; display: grid; gap: .25rem; box-shadow: var(--shadow-sm); }
.notice time { color: var(--ink-3); font-size: .82rem; font-variant-numeric: tabular-nums; }
.notice b { font-family: var(--font-display); font-size: 1.08rem; font-weight: 600; }
.notices { display: grid; gap: .65rem; }

/* ---------- forms ---------- */
.form { display: grid; gap: .9rem; max-width: 640px; }
.form label { display: flex; flex-direction: column; gap: .3rem; font-size: .88rem; font-weight: 500; color: var(--ink-2); }
.form label.row { flex-direction: row; align-items: center; gap: .5rem; }
.form input[type=text], .form input[type=email], .form input[type=password], .form input[type=search], .form input[type=number], .form input[type=date], .form input[type=datetime-local], .form input[type=url], .form input[type=tel], .form input[type=file], .form select, .form textarea {
  font: inherit; font-size: 1rem; padding: .6rem .85rem; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); min-height: 46px; width: 100%;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.form textarea { min-height: 120px; font-family: var(--font-ui); line-height: 1.55; }
.form textarea.code { font-family: var(--font-mono); direction: ltr; font-size: .85rem; }
.form input:hover, .form select:hover, .form textarea:hover { border-color: var(--ink-3); }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 15%, transparent); }
.form .help { font-size: .8rem; color: var(--ink-3); font-weight: 400; }
.form .error { color: var(--revoked); font-weight: 600; }
input[type=checkbox], input[type=radio] { accent-color: var(--primary); }
.auth-card { max-width: 440px; margin: 2rem auto; }

/* ---------- admin ---------- */
.admin-layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 2rem; max-width: 1440px; margin: 0 auto; padding: 1.5rem clamp(1rem, 2vw, 1.75rem) 3rem; }
.admin-nav { position: sticky; top: calc(var(--topbar-h) + 1rem); display: flex; flex-direction: column; gap: 1px; font-size: .9rem; align-self: start;
             max-height: calc(100vh - var(--topbar-h) - 2rem); overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: .6rem; box-shadow: var(--shadow-sm); }
.admin-nav a { color: var(--ink-2); text-decoration: none; padding: .45rem .7rem; border-radius: var(--r-sm); font-weight: 500; transition: background var(--t-fast), color var(--t-fast); }
.admin-nav a:hover { background: var(--surface-2); color: var(--ink); }
.admin-nav a[aria-current] { background: var(--primary); color: var(--primary-ink); }
.admin-main { min-width: 0; }
.admin-main h1 { font-size: 1.75rem; margin-bottom: 1.1rem; }
.admin-main h2 { font-size: 1.15rem; margin: 1.6rem 0 .7rem; }
.toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: 1.1rem; }
.toolbar form { display: flex; gap: .4rem; }
.toolbar input, .toolbar select { font: inherit; padding: .45rem .75rem; border: 1px solid var(--line); border-radius: var(--r-sm); min-height: 40px; background: var(--surface); color: var(--ink); }
.toolbar input:focus, .toolbar select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 15%, transparent); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .75rem; margin-bottom: 1.5rem; }
.inline-form { display: inline; }
.audit { font-size: .85rem; }
.audit td { padding: .35rem .55rem; }
.chat { max-width: 560px; }
.chat .log { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1rem; min-height: 300px; display: flex; flex-direction: column; gap: .5rem; white-space: pre-wrap; }
.chat .log .me { align-self: flex-start; background: var(--primary); color: var(--primary-ink); padding: .5rem .85rem; border-radius: 16px 16px 16px 4px; }
.chat .log .bot { align-self: flex-end; background: var(--surface-2); padding: .5rem .85rem; border-radius: 16px 16px 4px 16px; }

/* ---------- print ---------- */
.print-page { max-width: 900px; margin: 0 auto; padding: 1rem; }
@media print { .topbar, .foot, .noprint, .a11y-widget { display: none !important; } body { background: #fff; color: #000; } .print-page { padding: 0; } }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .biz-grid { grid-template-columns: 1fr; }
  .side { position: static; }
  .guide-layout { grid-template-columns: 1fr; } .guide-nav { position: static; }
}
@media (max-width: 860px) {
  .brand-text small { display: none; }
  .navtoggle { display: block; }
  .mainnav { display: none; position: fixed; top: calc(var(--topbar-h) + 8px); inset-inline: 8px; flex-direction: column; align-items: stretch; background: var(--surface);
             border: 1px solid var(--line); border-radius: var(--r-lg); padding: .5rem; gap: 2px; z-index: 49; box-shadow: var(--shadow-lg); animation: rise var(--t-base) var(--ease); }
  .nav-open .mainnav { display: flex; }
  .mainnav a { padding: .8rem 1rem; border-radius: var(--r-sm); font-size: 1rem; }
  .mainnav a.lang { align-self: flex-start; margin: .3rem .5rem; }
}
@media (max-width: 760px) {
  .viewtoggle button { padding: .45rem .6rem; font-size: .9rem; }
  .stage { flex-direction: column; }
  .panel { width: 100%; position: absolute; inset-inline: 0; bottom: 0; top: 55%; border-inline-start: 0; border-top: 0; border-radius: var(--r-xl) var(--r-xl) 0 0;
           box-shadow: 0 -10px 30px rgba(60,40,20,.18); transition: top var(--t-slow) var(--ease); z-index: 10; }
  .panel.collapsed { top: calc(100% - var(--peek-h)); }
  .panel.full { top: 0; border-radius: 0; }
  .panel.dragging { transition: none; }
  .panel-head { cursor: grab; justify-content: center; position: relative; padding-top: 1.1rem; touch-action: none; user-select: none; -webkit-user-select: none; }
  .panel-head .handle { display: block; width: 72px; height: 22px; padding: 0; border: 0; background: none; position: absolute; top: 0; left: 50%; transform: translateX(-50%); cursor: grab; }
  .panel-head .handle::before { content: ""; display: block; width: 40px; height: 5px; margin: 8px auto 0; border-radius: 3px; background: var(--line); }
  .panel-head .count { margin-top: .2rem; font-weight: 600; color: var(--ink); }
  .app.list-view .map { display: none; }
  .app.list-view .panel { position: static; top: auto; border-radius: 0; box-shadow: none; flex: 1; }
  .biz-head { grid-template-columns: 1fr; }
  .biz-head .rating-card { justify-self: start; }
  .cert { padding: 1rem 1rem .9rem 1.1rem; gap: .45rem .75rem; }
  .cert .stamp { width: 60px; height: 60px; font-size: .62rem; grid-row: 1 / span 2; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- סרגל כשרויות, פופאפ, אייקוני תצוגה ---------- */
.chiprow.kashrut { align-items: center; }
.chiprow .rowlabel { font-size: .78rem; font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.chiprow .sep { width: 1px; height: 22px; background: var(--line); flex-shrink: 0; margin: 0 .25rem; }
.chip.k.on { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.chip.k[disabled] { opacity: .5; cursor: not-allowed; background: var(--surface-2); color: var(--ink-3); border-style: dashed; }
.chip.k[disabled] small { font-size: .68rem; }
.chip.k.other { border-style: dashed; }
@media (max-width: 760px) { .viewtoggle .txt { display: none; } .viewtoggle button { padding: .45rem .6rem; } }
.pp { min-width: 240px; }
.pp-head { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.pp .name { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.pp-type { color: var(--ink-3); font-size: .8rem; }
.pp-addr { color: var(--ink-2); font-size: .85rem; margin: .15rem 0 .45rem; }
.pp-kitchens { margin-bottom: .45rem; display: flex; gap: .25rem; flex-wrap: wrap; }
.pp-kitchens:empty { display: none; }
.pp-certs { list-style: none; margin: 0 0 .45rem; padding: 0; display: grid; gap: .3rem; }
.pp-certs li { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; font-size: .88rem; }
.pp-certs small { color: var(--ink-2); }
.pp-stars { color: var(--accent-ink); font-weight: 700; }
.pp-stars small { color: var(--ink-2); font-weight: 400; }
.pp-note { color: var(--warn-ink); font-size: .8rem; }
.pp .fraud { color: var(--revoked); font-weight: 600; font-size: .85rem; }
.pp-actions { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .7rem; padding-top: .6rem; border-top: 1px solid var(--line-2); }
.pp-actions .btn.small { min-height: 32px; padding: .25rem .75rem; font-size: .82rem; }
@media (max-width: 760px) {
  .searchrow .chip.profile { margin-inline-start: 0; }
}

.impersonation { background: var(--warn-soft); color: var(--warn-ink); text-align: center; padding: .5rem 1rem; font-weight: 600; }

.suggest { position: absolute; top: calc(100% + 6px); inset-inline: 0; margin: 0; padding: .35rem; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
           box-shadow: var(--shadow-lg); z-index: 30; max-height: 340px; overflow-y: auto; }
.suggest li { padding: .55rem .75rem; cursor: pointer; display: flex; gap: .6rem; align-items: baseline; border-radius: var(--r-sm); }
.suggest li:hover, .suggest li.active { background: var(--primary-soft); }
.suggest .kind { font-size: .7rem; font-weight: 600; color: var(--ink-3); min-width: 2.6rem; }

/* ====================================================
   נגישות: קישור דילוג, תוסף הנגישות, ומצבי התצוגה שהוא מפעיל.
   הכל אצלנו, בלי סקריפט חיצוני ובלי מעקב.
   ================================================================== */
.skip-link { position: absolute; inset-inline-start: -9999px; top: .5rem; z-index: 200; background: var(--primary); color: var(--primary-ink); padding: .7rem 1.2rem; border-radius: var(--r-pill); font-weight: 700; box-shadow: var(--shadow-lg); }
.skip-link:focus { inset-inline-start: 1rem; }
#main:focus, #app:focus, #welcome:focus { outline: none; }

.a11y-widget { position: fixed; inset-block-end: 1rem; inset-inline-start: 1rem; z-index: 120; display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; }
.a11y-fab { width: 52px; height: 52px; border-radius: 50%; border: 3px solid var(--surface); background: var(--primary); color: var(--primary-ink); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-lg); transition: transform var(--t-fast) var(--ease), background var(--t-fast); }
.a11y-fab:hover { background: var(--primary-hover); transform: scale(1.05); }
.a11y-panel { width: min(320px, calc(100vw - 2rem)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: .8rem; max-height: min(70vh, 560px); overflow-y: auto; }
.a11y-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; }
.a11y-head b { font-family: var(--font-display); font-size: 1.15rem; }
.a11y-close { background: none; border: 0; font-size: 1rem; cursor: pointer; color: var(--ink-2); padding: .3rem .5rem; }
.a11y-zoomrow { display: flex; align-items: center; gap: .5rem; padding: .4rem .1rem .6rem; border-bottom: 1px solid var(--line-2); }
.a11y-zoomrow span { flex: 1; font-size: .9rem; }
.a11y-zoomrow button { width: 34px; height: 34px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 8px; cursor: pointer; font-size: 1.1rem; line-height: 1; }
.a11y-zoomval { font-variant-numeric: tabular-nums; min-width: 3.2rem; text-align: center; font-size: .9rem; }
.a11y-list { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .15rem; }
.a11y-list label { display: flex; gap: .6rem; align-items: flex-start; padding: .45rem .3rem; border-radius: 8px; cursor: pointer; }
.a11y-list label:hover { background: var(--surface-2); }
.a11y-list input { margin-top: .25rem; width: 18px; height: 18px; accent-color: var(--primary); }
.a11y-list b { display: block; font-size: .92rem; font-weight: 600; }
.a11y-list small { color: var(--ink-2); font-size: .78rem; }
.a11y-foot { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-top: .6rem; padding-top: .6rem; border-top: 1px solid var(--line-2); font-size: .85rem; }
.a11y-foot button { background: none; border: 1px solid var(--line); border-radius: 8px; padding: .35rem .8rem; cursor: pointer; font: inherit; }
.a11y-note { font-size: .75rem; color: var(--ink-2); margin: .5rem 0 0; }
.a11y-guideline { position: fixed; inset-inline: 0; height: 4px; background: var(--accent-ink); opacity: .75; pointer-events: none; z-index: 130; }

/* מצבי התצוגה */
html.a11y-zoom { font-size: calc(100% * var(--a11y-zoom, 1)); }
html.a11y-links a { text-decoration: underline !important; text-underline-offset: 2px; font-weight: 600; }
html.a11y-links a:not(.btn):not(.chip) { background: #fff8d6; color: #0b2b39 !important; }
html.a11y-readable, html.a11y-readable h1, html.a11y-readable h2, html.a11y-readable h3, html.a11y-readable .display,
html.a11y-readable .brand-text b { font-family: Arial, "Segoe UI", sans-serif !important; letter-spacing: 0 !important; }
html.a11y-spacing body { line-height: 2 !important; letter-spacing: .06em; word-spacing: .14em; }
html.a11y-spacing p, html.a11y-spacing li { margin-bottom: .8em; }
html.a11y-cursor, html.a11y-cursor * { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cpath d='M6 2l24 15-11 2 6 12-5 2-6-12-8 7z' fill='%23fff' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E") 4 2, auto; }
html.a11y-nomotion *, html.a11y-nomotion *::before, html.a11y-nomotion *::after {
  animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
html.a11y-contrast { --bg: #ffffff; --surface: #ffffff; --surface-2: #ffffff; --ink: #000000; --ink-2: #1a1a1a; --ink-3: #333333;
  --line: #000000; --line-2: #000000; --primary: #0a2a9e; --primary-hover: #06207e; --primary-ink: #ffffff; --primary-soft: #dfe6ff; --accent-ink: #5c3d00; --accent-soft: #fff4dc;
  --active: #00552f; --unknown: #6b3f00; --expired: #262626; --revoked: #8f0000; }
html.a11y-contrast .card, html.a11y-contrast .chip, html.a11y-contrast .btn, html.a11y-contrast .stat,
html.a11y-contrast table.data th, html.a11y-contrast table.data td { border-color: #000 !important; }
html.a11y-dark { --bg: #000000; --surface: #0d0d0d; --surface-2: #141414; --ink: #ffffff; --ink-2: #e6e6e6; --ink-3: #c9c9c9;
  --line: #ffffff; --line-2: #4d4d4d; --primary: #7fd4ff; --primary-hover: #a6e2ff; --primary-ink: #000000; --primary-soft: #123243; --accent: #ffd479; --accent-ink: #ffd479; --accent-soft: #33290d;
  --active: #7ef2b0; --active-soft: #10331f; --unknown: #ffd479; --unknown-soft: #33290d; --expired: #cccccc; --expired-soft: #262626;
  --revoked: #ff9d95; --revoked-soft: #3d1512; }
html.a11y-dark img:not(.no-invert), html.a11y-dark .leaflet-tile { filter: brightness(.85); }

/* ====================================================
   עמודים חדשים: מצב המקורות, אפליקציה, שימוש
   ================================================================== */
.table-wrap { overflow-x: auto; margin: .6rem 0 1.4rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; margin: .6rem 0 1rem; }
.contact { list-style: none; padding: 0; margin: .5rem 0; display: grid; gap: .3rem; }
.feature-list { padding-inline-start: 1.1rem; display: grid; gap: .45rem; margin: .6rem 0 1.2rem; }
.app-hero { display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center; margin-bottom: 2rem; }
.app-hero .qr { margin: 0; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: .8rem; }
.app-hero .qr img { display: block; width: 180px; height: 180px; }
@media (max-width: 700px) { .app-hero { grid-template-columns: 1fr; } .app-hero .qr { justify-self: start; } }
.spark { display: flex; align-items: flex-end; gap: 2px; height: 90px; margin: .8rem 0 1.2rem; padding: .4rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.spark .bar { flex: 1; min-height: 2px; background: linear-gradient(180deg, var(--primary), color-mix(in srgb, var(--primary) 55%, transparent)); border-radius: 3px 3px 0 0; }

/* ---------- הלוגו ---------- */
/* הלוגו הוא נתיב אחד עם fill: currentColor, ולכן הוא מקבל את צבע ההקשר: לבן בסרגל, כחול על נייר. */
.wordmark { height: 30px; width: auto; flex-shrink: 0; color: currentColor; }
.brand-text { justify-content: center; }
.hero-logo { display: block; width: min(420px, 82vw); height: auto; color: var(--primary); margin: .2rem 0 .8rem; }
.hero-logo.small { width: min(300px, 70vw); }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (max-width: 640px) { .wordmark { height: 24px; } }
html.a11y-contrast .hero-logo { color: #000; }
html.a11y-dark .hero-logo { color: #fff; }

/* ---------- מסכי ניהול: הגדרות ולוגים ---------- */
.presets { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: .6rem 0 .2rem; }
.preset-help { min-height: 1.2em; }
.filter-row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; }
.filter-row label { flex: 0 1 auto; }
.error { background: var(--revoked-soft); border-inline-start: 4px solid var(--revoked); color: var(--revoked); padding: .7rem 1rem; border-radius: 6px; }
.admin-nav h4 { margin: 1rem .7rem .3rem; font-size: .7rem; letter-spacing: .06em; color: var(--ink-3); font-family: var(--font-ui); font-weight: 700; }
.admin-nav h4:first-of-type { margin-top: .6rem; }

/* ---------- תור המיזוגים: שני כרטיסים זה מול זה ---------- */
.bulkbar { position: sticky; top: calc(var(--topbar-h) + .5rem); z-index: 20; display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: .6rem .9rem; margin: .6rem 0 1rem; }
.bulkbar .spacer { flex: 1; }
.review { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); padding: .8rem; margin-bottom: .9rem; }
.review.busy { opacity: .5; pointer-events: none; }
.review.failed { border-color: var(--revoked); }
.review-head { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; margin-bottom: .7rem; padding-bottom: .6rem; border-bottom: 1px solid var(--line-2); }
.review-head .spacer { flex: 1; }
.pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: .8rem; align-items: start; }
.pair-mid { align-self: center; font-size: 1.4rem; color: var(--ink-3); }
.pair-choices { display: grid; gap: .6rem; }
.pair-card { border: 1px solid var(--line); border-radius: 8px; padding: .7rem .8rem; background: var(--surface-2); display: block; }
.pair-card.new { border-inline-start: 4px solid var(--warn-ink); }
.pair-card.keep { cursor: pointer; border-inline-start: 4px solid var(--line); }
.pair-card.keep.chosen { border-inline-start-color: var(--active); background: var(--active-soft); }
.pair-card h3 { font-size: 1.05rem; margin: .2rem 0 .4rem; }
.pair-card dl { display: grid; gap: .15rem; margin: 0 0 .4rem; font-size: .88rem; }
.pair-card dl > div { display: flex; gap: .4rem; }
.pair-card dt { color: var(--ink-2); min-width: 4.5rem; }
.pair-card dd { margin: 0; }
.pick-keep { display: flex; align-items: center; gap: .4rem; }
@media (max-width: 860px) { .pair { grid-template-columns: 1fr; } .pair-mid { display: none; } }
.perms { border: 1px solid var(--line); border-radius: 8px; padding: .7rem .9rem; display: grid; gap: .3rem; }
.perms legend { font-weight: 700; padding: 0 .3rem; }
.perms label span { display: flex; flex-direction: column; }
.perms label small { color: var(--ink-2); font-size: .78rem; }
.nav-note { font-size: .72rem; color: var(--accent-ink); padding: 0 .6rem; }

/* ניווט פנימי בתוך מסך ארוך */
.subnav { display: flex; flex-wrap: wrap; gap: .5rem; margin: .4rem 0 1.2rem; }
.subnav a { font-size: .86rem; font-weight: 500; color: var(--ink-2); text-decoration: none; border: 1px solid var(--line); border-radius: var(--r-pill); padding: .35rem .9rem; background: var(--surface); }
.subnav a:hover { border-color: var(--primary); color: var(--primary); }

.waiting { margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.waiting h3 { font-size: 1rem; margin: 1rem 0 .3rem; color: var(--ink-2); }

/* ---------- מספרים מוצמדים בלוח הבקרה ---------- */
.cards .stat { position: relative; }
.cards .stat a { color: inherit; text-decoration: none; display: block; }
button.pin { position: absolute; inset-block-start: .25rem; inset-inline-end: .35rem; background: none; border: 0; cursor: pointer;
       font-size: .8rem; line-height: 1; opacity: .25; padding: .2rem; border-radius: 4px; }
button.pin:hover, button.pin:focus-visible { opacity: .9; background: var(--surface-2); }
.stat.pinned { grid-column: span 2; background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 40%, transparent); }
.stat.pinned .pin { opacity: .9; }
.stat.pinned b { font-size: 2.6rem; line-height: 1.1; }
.stat.pinned span { font-size: .95rem; color: var(--ink); }
@media (max-width: 560px) { .stat.pinned { grid-column: span 1; } .stat.pinned b { font-size: 2rem; } }
html.a11y-contrast .stat.pinned { background: #fff; }

/* ---------- עמוד התוכנית לעסקים ---------- */
.plan .price { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; margin: .6rem 0 1.2rem; }
.plan .price b { font-family: var(--font-display); font-weight: 800; font-size: 2.6rem; color: var(--primary); }
.plan .price span { color: var(--ink-2); }
.plan .note { background: var(--accent-soft); border-inline-start: 4px solid var(--accent-ink); padding: .8rem 1rem; border-radius: 6px; }

/* ---------- משגיחים ---------- */
.sup-head { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: space-between; align-items: baseline; }
.sup-head b { font-family: var(--font-display); font-size: 1.1rem; }
.answers { display: grid; gap: .3rem; margin: .5rem 0; font-size: .9rem; }
.answers > div { display: flex; gap: .5rem; }
.answers dt { color: var(--ink-2); min-width: 9rem; }
.answers dd { margin: 0; }
fieldset.scale { border: 1px solid var(--line); border-radius: 8px; padding: .6rem .9rem; display: flex; flex-wrap: wrap; gap: .9rem; align-items: center; }
fieldset.scale legend { padding: 0 .3rem; font-size: .9rem; color: var(--ink-2); }

/* מקור משני: צד שלישי שמדווח על הגוף, ולא הגוף עצמו. מסומן בבירור כדי שלא ייקרא כפרסום רשמי */
.secondary-note { margin: .5rem 0 0; padding: .5rem .7rem; border-inline-start: 3px solid var(--warn-ink); background: var(--warn-soft); color: var(--warn-ink); font-size: .87rem; border-radius: var(--r-sm); }

.body-item .count.unknown { color: var(--unknown); }
.body-item .count.unknown small { font-size: .6rem; text-align: center; line-height: 1.15; }

/* אנשי קשר בגופי הכשרות */
.contact-row { padding: .6rem 0; border-top: 1px solid var(--line-2); }
.contact-row > div:first-child { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.contact-row .fine { margin: .2rem 0 0; }
.inline-details { display: inline-block; }
.inline-details > summary { list-style: none; cursor: pointer; }
.inline-details > summary::-webkit-details-marker { display: none; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .6rem; }

/* תקלה טכנית בבדיקת מקור: אדום, כי מידע שמתיישן בשקט מסוכן יותר ממידע חסר */
.badge.broken { color: var(--revoked); background: var(--revoked-soft); }
.body-item.broken { border-color: var(--revoked); }

/* צילומי תעודות מהקהילה */
.photos { margin-top: 0; }
.photo-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; margin: .6rem 0; }
.photo-strip figure { margin: 0; }
.photo-strip img { width: 100%; height: 170px; object-fit: cover; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface-2); }
.photo-strip figcaption { font-size: .78rem; color: var(--ink-2); margin-top: .25rem; }
.photo-review { display: grid; grid-template-columns: 200px 1fr; gap: 1rem; align-items: start; margin-top: .6rem; }
.photo-review img { width: 100%; border-radius: var(--r-md); border: 1px solid var(--line); }
@media (max-width: 620px) { .photo-review { grid-template-columns: 1fr; } }

/* משגיחים בעמוד העסק */
.supervisors-block { margin-top: 0; }
.sup-list { list-style: none; padding: 0; margin: .4rem 0; display: grid; gap: .35rem; }
.sup-list li { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: .5rem .8rem; }
.sup-phone { font-weight: 600; }

/* כניסה והרשמה */
.auth-box { max-width: 420px; margin: 0 auto; }
.auth-box .btn.block { display: block; text-align: center; }
.auth-box .or { display: flex; align-items: center; gap: .8rem; color: var(--ink-3); font-size: .85rem; margin: .9rem 0; }
.auth-box .or::before, .auth-box .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* סינון חי בדף הכשרויות */
.k-filters { display: grid; gap: .6rem; margin: 1rem 0; }
.k-search input { width: 100%; max-width: 480px; min-height: 48px; padding: .6rem 1.1rem; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); color: var(--ink); font: inherit; box-shadow: var(--shadow-sm); }
.k-search input:focus-visible { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 15%, transparent); }
.k-filters #k-count { margin: 0; }

/* סיכת עיר: עסקים שהכתובת שלהם לא זוהתה, מקובצים במרכז העיר */
/* לא סיכה בצבע סטטוס אלא אייקון רשימה: ריבוע מעוגל עם שלוש שורות */
div.pin.city { width: 26px; height: 26px; border-radius: 8px; transform: none; background: var(--surface); border: 2px solid var(--primary); }
.leaflet-marker-icon:hover div.pin.city { transform: scale(1.12); }
div.pin.city::after { width: 12px; height: 12px; border-radius: 0;
  background: linear-gradient(var(--primary), var(--primary)) 0 1px / 100% 2px no-repeat, linear-gradient(var(--primary), var(--primary)) 0 5px / 100% 2px no-repeat, linear-gradient(var(--primary), var(--primary)) 0 9px / 100% 2px no-repeat; }

/* דיווח על עסק חסר: תמיד נגיש מהמפה, כי זה הערוץ שמגלה לנו תקלות */
.missing-link { position: fixed; bottom: 1.5rem; inset-inline-start: 4.75rem; z-index: 900; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill); padding: .45rem 1rem; font-size: .84rem; font-weight: 500; box-shadow: var(--shadow-md); }
.missing-link a { text-decoration: none; }
@media (max-width: 760px) { .missing-link { bottom: 4.6rem; inset-inline-start: .8rem; z-index: 5; } }

/* תעודה מרשימה ישנה: מוצגת, אבל באפור ועם "צריך בדיקה במקום" */
.cert.low-reliability { opacity: .7; filter: grayscale(.5); }
.tag.low { background: var(--surface-2); color: var(--ink-2); border-style: dashed; cursor: help; }

/* הודעות מערכת בלוח הבקרה */
.alert-list { list-style: none; padding: 0; margin: 0 0 .6rem; }
.alert { padding: .7rem .95rem; margin-bottom: .5rem; background: var(--surface); border: 1px solid var(--line); border-inline-start: 4px solid var(--line); border-radius: var(--r-sm); }
.alert.warning { border-inline-start-color: var(--warn); }
.alert.error { border-inline-start-color: var(--revoked-pin); }
.alert form.inline { display: inline; margin-inline-start: .5rem; }
.alert .fine { margin: .25rem 0 0; }

/* מקרא המפה: מה כל צבע אומר */
.map-legend { position: absolute; inset-block-end: 4.5rem; inset-inline-start: .75rem; z-index: 500; max-width: 18rem;
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: var(--r-md); padding: .45rem .85rem;
  box-shadow: var(--shadow-md); font-size: .82rem; color: var(--ink); }
.map-legend summary { cursor: pointer; font-weight: 600; padding: .2rem 0; }
.map-legend ul { list-style: none; margin: .3rem 0; padding: 0; }
.map-legend li { display: flex; gap: .5rem; align-items: flex-start; margin: .3rem 0; line-height: 1.35; }
.map-legend .dot { flex: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.25); margin-top: .1rem; }
.map-legend .dot.active { background: var(--active-pin); } .map-legend .dot.unknown { background: var(--unknown-pin); }
.map-legend .dot.expired { background: var(--expired-pin); } .map-legend .dot.revoked { background: var(--revoked-pin); }
.map-legend li b { font-weight: 700; }
.map-legend li small { display: block; color: var(--ink-2); font-size: .92em; }
.map-legend li { align-items: center; }
.map-legend li.check { display: block; margin-top: .5rem; padding-top: .45rem; border-top: 1px solid var(--line); }
.map-legend li.check ul { margin: .25rem 0 0; }
.map-legend .dot.cluster { width: 18px; height: 18px; background: var(--primary); color: var(--primary-ink); font-size: .65rem;
  display: inline-flex; align-items: center; justify-content: center; }
.map-legend .fine { margin: .2rem 0 .1rem; }
@media (max-width: 760px) { .map-legend { inset-block-end: auto; inset-block-start: .5rem; max-width: 15rem; } }

/* אדמין: מקור המידע של העסק */
.admin-only { border-inline-start: 3px solid var(--accent-ink); }
.pp-sources { margin: .15rem 0; padding-inline-start: 1rem; }

/* שדה מלכודת לבוטים. לא left:-9999px: בעמוד RTL זה מותח את העמוד ב-10,000 פיקסלים הצידה */
.hp-field, .form .hp-field { position: absolute; width: 1px !important; height: 1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); opacity: 0; pointer-events: none; }


/* ---------- ניהול במובייל ----------
   עד 900px: התפריט מקופל מאחורי כפתור, הטבלאות הופכות לכרטיסים, וסרגל קיצורים צמוד לתחתית.
   בדסקטופ שום דבר מכאן לא מוצג, חוץ מהמיון והכרטיסים. */
.admin-bar, .admin-tabs { display: none; }
.sortlink { color: inherit; text-decoration: none; white-space: nowrap; }
.sortlink:hover { color: var(--primary); text-decoration: underline; }
.data td.primary a { font-weight: 600; }
.pager { display: inline-flex; align-items: center; gap: .4rem; }
.todo { margin: 0 0 1.5rem; }
.todo h2 { font-size: 1.1rem; margin-bottom: .6rem; }
.todo-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .6rem; list-style: none; padding: 0; margin: 0; }
.todo-list a { display: flex; align-items: center; gap: .7rem; padding: .75rem .9rem; border: 1px solid var(--line); border-inline-start: 4px solid var(--warn-ink);
               border-radius: var(--r-md); background: var(--surface); color: var(--ink); text-decoration: none; min-height: 60px; box-shadow: var(--shadow-sm); }
.todo-list a:hover { border-color: var(--primary); }
.todo-list b { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; line-height: 1; color: var(--primary); min-width: 2ch; text-align: center; }
.todo-list .urgent a { border-inline-start-color: var(--revoked); }
.todo-done { color: var(--active); font-weight: 600; }
details.stats-more > summary { cursor: pointer; color: var(--ink-2); margin: .4rem 0 1rem; }

@media (max-width: 900px) {
  .admin-layout { grid-template-columns: minmax(0, 1fr); padding: .6rem .75rem 5.5rem; gap: .6rem; }
  .admin-bar { display: flex; position: sticky; top: var(--topbar-h); z-index: 30; background: var(--bg); padding: .5rem 0; }
  .admin-menu-btn { font: inherit; font-weight: 600; display: inline-flex; align-items: center; gap: .5rem; min-height: 44px;
                    padding: .45rem .9rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); cursor: pointer; }
  .admin-nav { display: none; position: static; max-height: none; }
  .admin-layout.nav-shown .admin-nav { display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: .4rem .6rem .8rem; }
  .admin-nav a { padding: .65rem .6rem; }            /* יעד מגע של 44px */
  .admin-main h1 { font-size: 1.35rem; }
  .toolbar form { flex: 1 1 100%; min-width: 0; }
  .toolbar input[type=search] { flex: 1; min-width: 0; }
  .toolbar select { flex: 1; min-width: 0; max-width: 100%; }
  .admin-tabs { display: flex; position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 60; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px);
                border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(20,33,27,.08); padding-bottom: env(safe-area-inset-bottom); }
  .admin-tabs a, .admin-tabs button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem;
                min-height: 56px; font: inherit; font-size: .75rem; color: var(--ink-2); text-decoration: none; background: none; border: 0; cursor: pointer; }
  .admin-tabs span { font-size: 1.15rem; line-height: 1; }
  .admin-tabs [aria-current] { color: var(--primary); font-weight: 700; }
  .admin-tabs [aria-current] span { background: var(--primary-soft); border-radius: var(--r-pill); padding: .15rem .9rem; }
  body:has(.admin-tabs) .a11y-widget { inset-block-end: 4.6rem; }   /* לא מעל הסרגל התחתון */
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
  .tscroll, .table-wrap { overflow-x: auto; }
}

@media (max-width: 760px) {
  /* טבלה -> כרטיס לכל שורה: שם השדה מימין, הערך משמאל */
  table.rowcards, table.rowcards tbody, table.rowcards tr, table.rowcards td { display: block; width: 100%; }
  table.rowcards thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  table.rowcards { border: 0; background: none; }
  table.rowcards tr { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); margin-bottom: .6rem; padding: .4rem .2rem; }
  table.rowcards td { display: flex; justify-content: space-between; gap: 1rem; border: 0; padding: .3rem .7rem; text-align: start; }
  table.rowcards td::before { content: attr(data-label); color: var(--ink-3); font-size: .82rem; flex-shrink: 0; }
  table.rowcards td:empty, table.rowcards td.blank { display: none; }
  table.rowcards td.primary { font-size: 1.05rem; padding-block: .5rem; border-bottom: 1px solid var(--line-2); }
  table.rowcards td.primary::before { display: none; }
  table.rowcards td.primary a { display: block; width: 100%; }
}

/* ---------- מצב כהה: התאמות שלא נפתרות בטוקנים לבד ---------- */
:root.theme-dark .leaflet-tile-pane,
:root.theme-dark .map-frame iframe { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.88) saturate(.45); }
:root.theme-dark div.pin, :root.theme-dark div.pin.me { border-color: #15120f; }
:root.theme-dark .chip.k.on { background: var(--accent); border-color: var(--accent); color: #1a1204; }
:root.theme-dark .topbar { background: color-mix(in srgb, var(--surface) 82%, transparent); }
:root.theme-dark .brand { color: var(--ink); }

/* כפתור בהיר/כהה בסרגל העליון */
.themetoggle { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; margin-inline-start: .3rem; }
.themetoggle:hover { color: var(--ink); border-color: var(--ink-3); }
.themetoggle svg { width: 18px; height: 18px; }
.themetoggle .moon { display: none; }
:root.theme-dark .themetoggle .sun { display: none; } :root.theme-dark .themetoggle .moon { display: block; }
.hero-tagline { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2.1rem); color: var(--ink); margin: 0 0 .8rem; letter-spacing: -.01em; }

/* כשרויות מאחורי "עוד כשרויות" (נקבע באדמין). ‎.chip מגדיר display, ולכן hidden צריך חיזוק */
.chip.k[hidden] { display: none; }
.chip.more-toggle { white-space: nowrap; font-weight: 600; }
details.more-bodies { width: 100%; margin-top: .4rem; }
details.more-bodies summary { cursor: pointer; font-size: .9rem; color: var(--ink-2); margin-bottom: .4rem; }
/* אדמין: מה הציבור רואה */
form.visibility-form { max-width: none; }
.visibility-form .vis-rule { display: flex; flex-direction: row; gap: .75rem; align-items: flex-start; padding: .85rem 1rem; margin: .5rem 0; max-width: 46rem;
            background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); cursor: pointer; }
.vis-rule input { width: 1.15rem; height: 1.15rem; margin-top: .2rem; flex: none; }
.vis-rule b, .vis-rule small { display: block; }
.vis-rule small { color: var(--ink-2); font-size: .88rem; margin-top: .15rem; }
.vis-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.vis-table th, .vis-table td { padding: .5rem .75rem; border-bottom: 1px solid var(--line-2); text-align: start; vertical-align: middle; }
.vis-table thead th { font-size: .8rem; color: var(--ink-2); font-weight: 600; white-space: nowrap; background: var(--surface-2, var(--surface)); }
.vis-table tbody th { font-weight: 600; min-width: 11rem; }
.vis-table tbody th small { display: block; font-weight: 400; }
.vis-table td .badge { white-space: nowrap; }
.vis-table tbody tr:last-child > * { border-bottom: 0; }
.vis-table input[type=checkbox] { width: 1.15rem; height: 1.15rem; }
.vis-rabbanut > summary { cursor: pointer; padding: .5rem 0; }
#vis-find { max-width: 22rem; width: 100%; }
.vis-save { padding: .75rem 0; }
/* בדסקטופ השמירה נשארת בהישג יד לאורך הרשימה הארוכה. במובייל סרגל הקיצורים התחתון תופס את המקום הזה */
@media (min-width: 901px) { .vis-save { position: sticky; bottom: 0; background: var(--bg); border-top: 1px solid var(--line); } }

/* אדמין: אייקון "מקור המידע" והבועה שלו. נטען ומוצג רק למשתמש עם הרשאות ניהול */
.src-i { flex: 0 0 auto; display: inline-grid; place-items: center; inline-size: 1.35rem; block-size: 1.35rem; padding: 0; margin-inline-start: .35rem;
  vertical-align: middle; border-radius: 50%; border: 1.5px solid var(--accent-ink); background: var(--surface); color: var(--accent-ink);
  font: italic 700 .82rem/1 Georgia, 'Times New Roman', serif; cursor: help; }
.src-i:hover, .src-i:focus-visible, .src-i[aria-expanded="true"] { background: var(--accent-ink); color: var(--surface); outline: none; }
.src-tip { position: fixed; z-index: 3000; inline-size: min(22rem, calc(100vw - 16px)); max-block-size: min(26rem, calc(100vh - 16px)); overflow-y: auto;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-inline-start: 3px solid var(--accent-ink);
  border-radius: var(--r-md); box-shadow: var(--shadow-md); padding: .7rem .85rem; font-size: .82rem; line-height: 1.45; text-align: start; }
.src-tip[hidden] { display: none; }
.src-tip .si-head { font-weight: 700; font-size: .9rem; margin-bottom: .35rem; display: flex; gap: .4rem; align-items: center; }
.src-tip .si-list { list-style: none; margin: 0; padding: 0; }
.src-tip .si-list li { padding: .45rem 0; border-top: 1px solid var(--line); }
.src-tip .si-src code { font-size: .72rem; color: var(--ink-2); background: var(--surface-2); padding: 0 .3rem; border-radius: 4px; }
.src-tip .si-row { display: flex; justify-content: space-between; gap: .75rem; }
.src-tip .si-row > span { color: var(--ink-2); white-space: nowrap; }
.src-tip .si-row > b { font-weight: 600; text-align: end; overflow-wrap: anywhere; }
.src-tip .si-row small { font-weight: 400; color: var(--ink-2); }
.src-tip .si-foot { border-top: 1px solid var(--line); padding-top: .45rem; }
.src-tip .si-foot a { display: inline-block; margin-top: .3rem; }
.src-tip .si-empty { margin: 0; color: var(--ink-2); }

/* מכסת גוגל באדמין: מד לכל שירות, ירוק / כתום / אדום */
.quota-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .75rem; margin: .6rem 0; }
.quota { --q: var(--active); border-inline-start: 4px solid var(--q); }
.quota header { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.quota h3 { margin: 0; font-size: 1rem; }
.quota-warn { --q: #c77700; } .quota-danger, .quota-over { --q: var(--revoked); }
.quota-bar { height: 12px; border-radius: 999px; background: color-mix(in srgb, var(--q) 16%, var(--surface)); overflow: hidden; margin: .7rem 0 .4rem; }
.quota-bar span { display: block; height: 100%; min-width: 2px; background: var(--q); border-radius: 999px; }
.quota-num { margin: 0; font-variant-numeric: tabular-nums; } .quota-num b { font-size: 1.4rem; font-family: var(--font-display); }
.badge.quota-ok { background: color-mix(in srgb, var(--active) 15%, transparent); color: var(--active); }
.badge.quota-warn { background: color-mix(in srgb, #c77700 18%, transparent); color: #8a5200; }
.badge.quota-danger, .badge.quota-over { background: color-mix(in srgb, var(--revoked) 15%, transparent); color: var(--revoked); }
.quota-text-warn { color: #8a5200; } .quota-text-danger, .quota-text-over { color: var(--revoked); }

/* ---- אדמין: מקורות מידע ---- */
.src-stats { margin-bottom: .6rem; }
.stat.src-red b { color: var(--revoked); }
.src-attn { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.src-attn li { background: var(--surface); border: 1px solid var(--line); border-inline-start: 4px solid var(--warn); border-radius: var(--r-md); padding: .75rem 1rem; box-shadow: var(--shadow-sm); }
.src-attn li.error { border-inline-start-color: var(--revoked-pin); }
.src-attn-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.src-attn p { margin: .35rem 0 .5rem; color: var(--ink-2); font-size: .92rem; }
.src-attn-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.tag.src-manual { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.src-low { color: var(--warn-ink); }
.tag.src-low { background: var(--warn-soft); border-color: transparent; }
.src-more { margin: .4rem 0 1.2rem; }
.src-more > summary { cursor: pointer; display: inline-flex; list-style: none; }
.src-more > summary::-webkit-details-marker { display: none; }
.src-raw { margin-top: .5rem; font-weight: 400; }
.src-raw pre { white-space: pre-wrap; word-break: break-word; font-size: .78rem; margin: .4rem 0 0; }
#src-table tr[hidden] { display: none; }

/* הכיתוב המתחלף לצד הלוגו (tagline.js) */
.tagline-rotator { transition: opacity .3s ease, transform .3s ease; display: inline-block; }
.tagline-rotator.is-out { opacity: 0; transform: translateY(4px); }
.welcome .hero-rotator { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; color: var(--primary); margin: -.6rem 0 .6rem; min-height: 1.6em; }
.welcome .hero-disclaimer { font-size: .85rem; color: var(--ink-3); margin: .4rem 0 1rem; max-width: 52ch; }
@media (prefers-reduced-motion: reduce) { .tagline-rotator { transition: none; } }

/* ---------- קשרים עם גופי הכשרות ---------- */
.flow { display: inline-flex; align-items: center; padding: .12rem .6rem; border-radius: var(--r-pill); font-size: .78rem; font-weight: 600; white-space: nowrap; line-height: 1.5; background: var(--surface-2); color: var(--ink-2); }
.flow.flow-steady { color: var(--active); background: var(--active-soft); }
.flow.flow-third_party { color: var(--unknown); background: var(--unknown-soft); }
.flow.flow-on_demand, .flow.flow-manual { color: var(--warn-ink); background: var(--warn-soft); }
.flow.flow-none { border: 1px dashed var(--line); background: none; }
.flow.flow-trouble { color: var(--revoked); background: var(--revoked-soft); cursor: help; }
.rel-h { margin-bottom: .5rem; }
.rel-stats { margin-bottom: .4rem; }
button.rel-stat { font: inherit; text-align: start; cursor: pointer; color: inherit; border-top: 4px solid var(--line); }
button.rel-stat:hover, button.rel-stat:focus-visible { border-color: var(--primary); outline: none; }
button.rel-stat small { display: block; font-size: .74rem; color: var(--ink-2); margin-top: .15rem; }
.rel-stat.flow-steady { border-top-color: var(--active); } .rel-stat.flow-third_party { border-top-color: var(--unknown); }
.rel-stat.flow-on_demand, .rel-stat.flow-manual { border-top-color: var(--warn); }
.rel-legend { margin: 0 0 1.2rem; font-size: .9rem; }
.rel-legend summary { cursor: pointer; color: var(--ink-2); }
.rel-legend dl { display: grid; gap: .4rem; margin: .6rem 0 0; }
.rel-legend dl > div { display: flex; flex-wrap: wrap; gap: .5rem; align-items: baseline; }
.rel-legend dd { margin: 0; color: var(--ink-2); }
.rel-clip { max-inline-size: 18rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rel-due { color: var(--revoked); font-weight: 700; }
.tag.rel-cooperating { color: var(--active); background: var(--active-soft); border-color: transparent; }
.tag.rel-promised, .tag.rel-talking { color: var(--accent-ink); background: var(--accent-soft); border-color: transparent; }
.tag.rel-declined { color: var(--revoked); background: var(--revoked-soft); border-color: transparent; }
.rel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; margin-bottom: 1rem; align-items: start; }
.rel-grid .card, .rel-grid + .card, #log.card { margin: 0; }
#log.card, #contacts.card { margin-bottom: 1rem; }
.rel-links { display: flex; flex-wrap: wrap; gap: .9rem; font-size: .9rem; }
.rel-feeds { list-style: none; padding: 0; margin: 0 0 .8rem; display: grid; gap: .6rem; }
.rel-logform { padding-bottom: 1rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.rel-log { list-style: none; padding: 0; margin: 0; display: grid; gap: .9rem; }
.rel-log li { border-inline-start: 3px solid var(--line); padding-inline-start: .9rem; }
.rel-log-head { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.rel-log-head form { margin-inline-start: auto; }
.rel-log p { margin: .3rem 0; white-space: pre-line; }
#rel-table a[href^="tel:"] { white-space: nowrap; }
