/* שכבת האתר: מצב בהיר (ברירת המחדל כהה), הגדרות נגישות, כפתורי הכלים הצפים, כותרת תחתונה ועמודי המידע.
   המצב הבהיר מחליף את הטוקנים של style.css, ומתקן את המקומות שבהם צבע כהה כתוב ישירות. הצבעים הבוהקים של המצב הכהה
   הוכהו במצב הבהיר כך שיעמדו בניגודיות AA על רקע לבן. */

:root[data-theme="light"] {
  color-scheme: light;
  --bg-void: #eef3f8;
  --bg-mid: #f6f9fc;
  --panel: rgba(255, 255, 255, 0.96);
  --panel-alt: #f3f7fb;
  --panel-dark: #f7fafd;
  --input-bg: #ffffff;
  --header-bg: rgba(255, 255, 255, 0.97);
  --border-dim: rgba(16, 64, 104, 0.16);
  --border-bright: rgba(10, 108, 181, 0.45);
  --line: rgba(16, 64, 104, 0.1);
  --text-main: #0b1a2b;
  --text-sub: #3a4d63;
  --text-muted: #5f7086;
  --cyan: #075a9c;
  --cyan-dim: rgba(10, 108, 181, 0.1);
  --emerald: #005f52;
  --emerald-dim: rgba(4, 122, 104, 0.1);
  --amber: #7d4b00;
  --amber-dim: rgba(196, 122, 0, 0.13);
  --crimson: #a50f28;
  --crimson-dim: rgba(179, 18, 45, 0.09);
  --violet: #5a3fb8;
  --violet-dim: rgba(90, 63, 184, 0.1);
  --pink: #a2134a;
  --pink-dim: rgba(176, 22, 79, 0.09);
  --blue: #1859b0;
  --blue-dim: rgba(24, 89, 176, 0.09);
  --shadow-card: 0 8px 26px rgba(16, 40, 70, 0.08);
  scrollbar-color: #9fb3c8 var(--bg-void);
}
:root[data-theme="light"] body { background: linear-gradient(180deg, #e9f0f7 0%, #f6f9fc 40%, #eef3f8 100%); }
:root[data-theme="light"] .tactical-grid, :root[data-theme="light"] .scanline { display: none; }
:root[data-theme="light"] .panel::before, :root[data-theme="light"] .panel::after { opacity: 0.35; }
:root[data-theme="light"] h2::before { box-shadow: none; }
:root[data-theme="light"] .btn { color: #0b2a40; background: linear-gradient(180deg, #ffffff, #eaf1f7); border-color: rgba(0, 90, 130, 0.3); }
:root[data-theme="light"] .btn:hover { border-color: var(--cyan); }
:root[data-theme="light"] .btn.primary, :root[data-theme="light"] .tab[aria-selected="true"], :root[data-theme="light"] .range-picker button.active { color: #fff; background: linear-gradient(90deg, var(--cyan), var(--emerald)); border-color: #0a5f9a; box-shadow: none; }
:root[data-theme="light"] .btn.ok { color: #fff; background: linear-gradient(180deg, #0a8a5d, #00744c); border-color: #005c3c; }
:root[data-theme="light"] .btn.danger { color: #fff; background: linear-gradient(180deg, #c9243f, #a50f28); border-color: #8c0c22; }
:root[data-theme="light"] .chip[aria-pressed="true"] { color: var(--text-main); background: color-mix(in srgb, var(--dot, var(--cyan)) 16%, #fff); box-shadow: none; }
:root[data-theme="light"] .chip::before, :root[data-theme="light"] .badge::before { box-shadow: none; }
:root[data-theme="light"] th { background: #e8f0f7; color: #004f72; }
:root[data-theme="light"] .card { background: linear-gradient(150deg, color-mix(in srgb, var(--accent) 9%, #fff), #fff 75%); box-shadow: 0 4px 16px rgba(16, 40, 70, 0.07); }
:root[data-theme="light"] .card .n { color: var(--text-main); text-shadow: none; }
:root[data-theme="light"] .bar { background: #dfe8f1; }
:root[data-theme="light"] .chart .avg { stroke: #0b1a2b; filter: none; }
:root[data-theme="light"] .proc { background: linear-gradient(150deg, var(--violet-dim), #fff 70%); }
:root[data-theme="light"] .logbox { background: #f4f7fa; }
:root[data-theme="light"] .bulkbar .count, :root[data-theme="light"] .hint-bad, :root[data-theme="light"] .logline.err { color: var(--crimson); }
:root[data-theme="light"] .sev-CRITICAL, :root[data-theme="light"] .st-bad { color: var(--crimson); }
:root[data-theme="light"] .sev-EMERGENCY { color: #fff; background: linear-gradient(180deg, #c81d5e, #a50f48); border-color: #8c0c3c; box-shadow: none; }
:root[data-theme="light"] .badge, :root[data-theme="light"] .route-tag { text-shadow: none; }
:root[data-theme="light"] .classified-bar { color: var(--text-sub); }
:root[data-theme="light"] dialog { background: #fff; box-shadow: 0 20px 60px rgba(16, 40, 70, 0.3); }
:root[data-theme="light"] dialog::backdrop { background: rgba(10, 26, 43, 0.45); }
:root[data-theme="light"] .drawer { background: #fff; }
:root[data-theme="light"] .qr { box-shadow: 0 0 0 1px var(--border-dim); }
:root[data-theme="light"] ::-webkit-scrollbar-thumb { background: #9fb3c8; box-shadow: none; }

/* ---------------- נגישות ---------------- */
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.skip-link { position: fixed; top: -60px; inset-inline-start: 12px; z-index: 1000; padding: 10px 16px; color: #000; background: #ffd54a; border-radius: 8px; font-weight: 800; text-decoration: none; }
.skip-link:focus { top: 12px; }
html.a11y-contrast { --text-sub: var(--text-main); --text-muted: var(--text-main); --border-dim: var(--text-main); --border-bright: var(--text-main); }
html.a11y-contrast:not([data-theme="light"]) { --bg-void: #000; --bg-mid: #000; --panel: #000; --panel-alt: #000; --panel-dark: #000; --input-bg: #000; --header-bg: #000; --text-main: #fff; --cyan: #5cf4ff; }
html.a11y-contrast[data-theme="light"] { --bg-void: #fff; --bg-mid: #fff; --panel: #fff; --panel-alt: #fff; --panel-dark: #fff; --input-bg: #fff; --header-bg: #fff; --text-main: #000; --cyan: #004466; }
html.a11y-contrast body { background: var(--bg-void); }
html.a11y-contrast .tactical-grid, html.a11y-contrast .scanline { display: none; }
html.a11y-links a, html.a11y-links button.btn:not(:disabled), html.a11y-links [role="tab"] { text-decoration: underline; text-underline-offset: 3px; outline: 2px dashed var(--amber); outline-offset: 1px; }
html.a11y-readable body, html.a11y-readable input, html.a11y-readable textarea, html.a11y-readable select, html.a11y-readable button { font-family: Arial, "Segoe UI", Tahoma, sans-serif; }
html.a11y-spacing body { letter-spacing: 0.06em; word-spacing: 0.14em; line-height: 1.85; }
html.a11y-spacing p, html.a11y-spacing li, html.a11y-spacing dd { margin-block-end: 1em; }
html.a11y-still *, html.a11y-still *::before, html.a11y-still *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
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='M4 2l26 18-12 2 7 13-5 3-7-13-9 8z' fill='%23000' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E") 4 2, auto !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* כפתורי הכלים הצפים: נגישות ומצב תצוגה. בפינה השמאלית התחתונה, מעל הכותרת התחתונה */
.site-tools { position: fixed; inset-inline-end: max(14px, env(safe-area-inset-left, 0px)); bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 900; display: grid; gap: 10px; }
.site-tool { display: grid; place-items: center; width: 48px; height: 48px; padding: 0; font-size: 1.35rem; color: #fff; background: #1859b0; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); cursor: pointer; }
.site-tool#theme-btn { color: var(--text-main); background: var(--panel); border-color: var(--border-bright); }
.site-tool:hover { transform: scale(1.06); }
.site-tool .ico { display: grid; }
.a11y-panel { position: fixed; inset-inline-end: 74px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 901; width: min(320px, calc(100vw - 96px)); max-height: calc(100vh - 40px); overflow: auto; display: grid; gap: 8px; padding: 16px; color: var(--text-main); background: var(--panel); border: 1px solid var(--border-bright); border-radius: 14px; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45); }
.a11y-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.a11y-head h2 { margin: 0; font-size: 1.1rem; }
.a11y-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.a11y-steps { display: inline-flex; align-items: center; gap: 8px; }
.a11y-toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 10px 12px; color: var(--text-main); background: var(--panel-alt); border: 1px solid var(--border-dim); border-radius: 10px; font: inherit; font-weight: 700; cursor: pointer; text-align: start; }
.a11y-toggle.on { border-color: var(--emerald); background: var(--emerald-dim); }
.a11y-switch { position: relative; flex: none; width: 38px; height: 22px; border-radius: 11px; background: var(--border-dim); }
.a11y-switch::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); }
.a11y-toggle.on .a11y-switch { background: var(--emerald); }
.a11y-toggle.on .a11y-switch::after { inset-inline-start: 19px; }

/* כותרת תחתונה קבועה בכל עמוד */
.site-footer { position: relative; z-index: 2; display: grid; gap: 10px; justify-items: center; margin-top: 32px; padding: 22px 16px calc(80px + env(safe-area-inset-bottom, 0px)); color: var(--text-sub); background: var(--panel-dark); border-top: 1px solid var(--border-dim); font-size: 0.9rem; text-align: center; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; }
.site-footer a { display: inline-block; min-height: 24px; line-height: 24px; color: var(--text-sub); text-decoration: none; }
.site-footer a:hover, .site-footer a:focus-visible { color: var(--cyan); text-decoration: underline; }
.site-footer-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; font-size: 0.82rem; color: var(--text-muted); }

/* עמודי המידע */
.legal .legal-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.legal .legal-nav a { padding: 7px 14px; color: var(--text-sub); text-decoration: none; background: var(--panel-dark); border: 1px solid var(--border-dim); border-radius: 999px; font-weight: 700; font-size: 0.88rem; }
.legal .legal-nav a[aria-current="page"] { color: var(--text-main); border-color: var(--cyan); background: var(--cyan-dim); }
/* המלל על כל רוחב העמוד (החלטת מנכ"ל 11.11) */
.legal-body { line-height: 1.75; }
.legal-body h2 { margin-top: 28px; }
.legal-body h3 { margin: 22px 0 8px; color: var(--cyan); }
.legal-list { padding-inline-start: 22px; display: grid; gap: 6px; }
.legal-dl { display: grid; grid-template-columns: minmax(150px, 230px) 1fr; gap: 8px 18px; margin: 0; }
.legal-dl dt { font-weight: 800; }
.legal-dl dd { margin: 0; color: var(--text-sub); }
@media (max-width: 640px) { .legal-dl { grid-template-columns: 1fr; } .legal-dl dd { margin-bottom: 8px; } }
.legal-updated { margin-top: 26px; }
.contact-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 8px; }
.contact-card { display: grid; gap: 4px; padding: 14px 16px; background: var(--panel-dark); border: 1px solid var(--border-dim); border-radius: 12px; }
.contact-card a, .contact-card .num { color: var(--cyan); font-weight: 800; font-size: 1.05rem; text-decoration: none; }
.contact-card.accent { border-color: var(--emerald); background: var(--emerald-dim); }
.contact-form { display: grid; gap: 12px; }
.contact-form .hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ct-status { font-weight: 700; }
.ct-status.ok { color: var(--emerald); }
.ct-status.bad { color: var(--crimson); }

/* מסך הכניסה בזרימה רגילה, כדי שהכותרת התחתונה תופיע מתחתיו ולא תוסתר מאחוריו */
.auth-layer { position: relative; inset: auto; min-height: 100vh; z-index: 2; }
/* הכלים הצפים בצד ימין, וההודעות הקופצות נשארות בצד שמאל — בלי חפיפה */
.site-tools { inset-inline-end: auto; inset-inline-start: max(14px, env(safe-area-inset-right, 0px)); }
.a11y-panel { inset-inline-end: auto; inset-inline-start: 74px; }
/* פוקוס שהקוד מעביר לתוכן העיקרי (דילוג לתוכן, מעבר עמוד) — בלי מסגרת עבה סביב כל העמוד */
#main:focus:not(:focus-visible), main[tabindex="-1"]:focus { outline: none; }
.legal-dl dt { font-family: var(--font-ui); font-size: 0.98rem; color: var(--text-main); }

input[type="email"] { width: 100%; min-width: 0; height: var(--ctl-h); padding: 0 var(--s3); color: var(--text-main); background: var(--input-bg); border: 1px solid var(--border-dim); border-radius: var(--r-ctl); font: inherit; }
.a11y-list { display: grid; gap: 8px; }
/* הכלים הצפים חוזרים לצד שמאל (לא מסתירים כפתורי שמירה בצד ימין), וההודעות הקופצות עולות מעליהם */
.site-tools { inset-inline-start: auto; inset-inline-end: max(14px, env(safe-area-inset-left, 0px)); }
.a11y-panel { inset-inline-start: auto; inset-inline-end: 74px; }
.toast-box { bottom: calc(136px + env(safe-area-inset-bottom, 0px)); }

.legal-download { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.legal-download .btn { text-decoration: none; display: inline-flex; align-items: center; }

/* שאלות נפוצות בעמוד אודות: שאלה נפתחת, תשובה וצעדים ממוספרים */
.faq h3 { margin-top: 26px; }
.faq-item { margin: 0 0 8px; background: var(--panel-dark); border: 1px solid var(--border-dim); border-radius: 10px; }
.faq-item summary { cursor: pointer; padding: 12px 16px; font-weight: 800; list-style-position: inside; }
.faq-item summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 10px; }
.faq-item[open] summary { border-bottom: 1px solid var(--border-dim); color: var(--cyan); }
.faq-item p, .faq-steps { margin: 10px 16px; }
.faq-steps { padding-inline-start: 22px; display: grid; gap: 4px; }
.site-version { font-variant-numeric: tabular-nums; }

/* מרכז העזרה (public/help.js): חיפוש, נושאים שנפתחים, ובתוך כל נושא הסבר ושאלות. מה שהחיפוש מסתיר מוסתר ב-hidden */
.help [hidden] { display: none !important; }
.help-search { display: grid; gap: 6px; max-width: 560px; margin: 18px 0 6px; }
.help-search label { font-weight: 800; }
.help-status { min-height: 1.5em; margin: 0 0 4px; }
.help-group > h2 { margin-top: 26px; }
.help-topic { margin: 0 0 10px; background: var(--panel-dark); border: 1px solid var(--border-dim); border-radius: 12px; }
.help-topic > summary { cursor: pointer; padding: 12px 16px; list-style-position: inside; border-radius: 12px; }
.help-topic > summary h3 { display: inline; margin: 0; font-size: 1.02rem; color: var(--text-main); }
.help-topic > summary .sub { display: block; margin-top: 2px; }
.help-topic[open] > summary { border-bottom: 1px solid var(--border-dim); border-end-start-radius: 0; border-end-end-radius: 0; }
.help-topic[open] > summary h3 { color: var(--cyan); }
.help-body, .help-faq { padding: 4px 16px 0; }
.help-body > p, .help-body > .legal-list, .help-body > .faq-steps { margin: 8px 0; }
.help-topic h4 { margin: 18px 0 6px; font-size: 0.95rem; color: var(--text-main); }
.help-topic .faq-item { background: var(--panel); }
/* מדריך: כל צעד הוא שורה של "מה עושים", ומתחתיה "מה רואים" בצבע משני. בטלפון הצעדים נשארים בעמודה אחת */
.help-steps { gap: 10px; }
.help-steps > li { padding-inline-start: 2px; }
.help-do, .help-after { display: block; overflow-wrap: anywhere; }
.help-after { margin-top: 2px; color: var(--text-sub); font-size: 0.92rem; }
.help-after > b { color: var(--text-main); font-weight: 700; }
.help-see { margin: 12px 16px 14px; }
.help-faq { padding-bottom: 6px; }
.help-see a { display: inline-block; min-height: 24px; line-height: 24px; }

/* הקישור "? עזרה" שבכל עמוד במערכת, בשתי התצוגות */
.help-q { gap: 6px; text-decoration: none; }
.help-q-mark { display: inline-grid; place-items: center; width: 18px; height: 18px; border: 1.5px solid currentColor; border-radius: 50%; font-size: 0.78rem; font-weight: 800; line-height: 1; }
.help-bar { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.help-bar:empty { display: none; }
.v2-titlerow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
