/* ===== תיק עבודות BI - עיצוב ===== */
:root {
  --page: #0d0d0d;
  --surface: #1a1a19;
  --surface-2: #222220;
  --ink: #ffffff;
  --ink-2: #c3c2b7;
  --ink-3: #898781;
  --grid: #2c2c2a;
  --hairline: rgba(255, 255, 255, 0.08);
  --hairline-2: rgba(255, 255, 255, 0.14);
  --s1: #3987e5;
  --s2: #199e70;
  --s3: #c98500;
  /* s4/critical הובהרו כדי לעבור 4.5:1 מול הרקע (היו 3.93 ו-4.05) */
  --s4: #12b312;
  --s5: #9085e9;
  --s6: #e66767;
  --s7: #d55181;
  --s8: #d95926;
  --good: #0ca30c;
  --critical: #e05555;
  --radius: 14px;
  --radius-s: 10px;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --font: "Heebo", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  font-family: var(--font);
  background: var(--page);
  color: var(--ink);
  line-height: 1.55;
}
a { color: inherit; }
button { font-family: inherit; cursor: pointer; }

/* ---------- ניווט עליון ---------- */
.topnav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 18px;
  padding: 12px 28px;
  background: rgba(13, 13, 13, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}
.topnav .brand { font-weight: 700; font-size: 16px; letter-spacing: 0.2px; }
.topnav .brand span { color: var(--s1); }
.topnav nav { display: flex; gap: 4px; margin-inline-start: auto; }
.topnav nav a {
  text-decoration: none; color: var(--ink-2); font-size: 14px;
  padding: 7px 12px; border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease, transform 0.1s ease-out;
}
.topnav nav a:hover { color: var(--ink); background: var(--surface-2); }
.topnav nav a:active { transform: scale(0.96); }
.contact-menu { position: relative; }
.contact-toggle {
  background: none; border: none; font: inherit;
  text-decoration: none; color: var(--ink-2); font-size: 14px;
  padding: 7px 12px; border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease, transform 0.1s ease-out;
}
.contact-toggle:hover, .contact-toggle[aria-expanded="true"] { color: var(--ink); background: var(--surface-2); }
.contact-toggle:active { transform: scale(0.96); }
.contact-options {
  position: absolute; top: calc(100% + 6px); inset-inline-end: 0;
  display: flex; flex-direction: column; min-width: 200px;
  background: var(--surface-2); border: 1px solid var(--hairline-2);
  border-radius: 10px; padding: 6px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  z-index: 60;
}
.contact-options[hidden] { display: none; }
.contact-options a, .contact-options button {
  display: block; width: 100%; text-align: right; background: none; border: none; font: inherit;
  color: var(--ink-2); text-decoration: none; padding: 9px 10px; border-radius: 6px; font-size: 13.5px;
}
.contact-options a:hover, .contact-options button:hover { color: var(--ink); background: var(--surface); }

/* ---------- באנר "שמח לראות אותך שוב" (מבקר חוזר) ---------- */
.welcome-back {
  max-width: 1180px; margin: 16px auto -8px; padding: 11px 18px;
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(155deg, color-mix(in srgb, var(--s2) 16%, var(--surface)), color-mix(in srgb, var(--s1) 10%, var(--surface)));
  border: 1px solid color-mix(in srgb, var(--s2) 45%, var(--hairline-2));
  border-radius: var(--radius);
  box-shadow: 0 14px 32px -22px color-mix(in srgb, var(--s2) 60%, transparent);
  animation: wbIn 0.5s ease both;
}
.welcome-back[hidden] { display: none; }
.welcome-back .wb-emoji { font-size: 20px; line-height: 1; }
.welcome-back .wb-text { font-weight: 700; color: var(--ink); font-size: 15px; }
.welcome-back .wb-close {
  margin-inline-start: auto; background: none; border: none;
  color: var(--ink-3); font-size: 15px; line-height: 1; border-radius: 6px;
  /* שטח לחיצה 44px למגע, בלי להגדיל את ה-✕ עצמו */
  width: 44px; height: 44px; display: grid; place-items: center; flex: 0 0 44px;
  margin-block: -8px;
}
.welcome-back .wb-close:hover { color: var(--ink); background: var(--surface-2); }
@keyframes wbIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 96px 28px 72px;
  max-width: 1120px; margin: 0 auto;
  text-align: center;
}
.hero::before {
  content: ""; position: absolute; inset: -140px 0 0;
  /* רק s1/s2 - סגול (s5) אסור ליד ה-hero לפי כלל One-Accent-Outside-Charts ב-DESIGN.md */
  background:
    radial-gradient(560px 300px at 68% 8%, rgba(57, 135, 229, 0.16), transparent 70%),
    radial-gradient(420px 260px at 52% 60%, rgba(25, 158, 112, 0.07), transparent 70%);
  pointer-events: none;
}
.hero > * { position: relative; }
.hero-eyebrow {
  margin-bottom: 16px; color: var(--ink-2); font-size: 15px; font-weight: 600;
  letter-spacing: 0.2px; scroll-margin-top: 80px;
}
.hero h1 { font-size: clamp(34px, 6vw, 58px); line-height: 1.12; font-weight: 800; letter-spacing: -0.5px; }
.hero h1 .accent {
  /* צבע ההדגשה זהה לאקסנט האחד של האתר (כפתורים/קישורים/live) - לא צבע שלישי מהפלטה */
  color: var(--s1); font-weight: 800;
}
.hero .sub {
  margin: 20px auto 0; max-width: 58ch;
  color: var(--ink-2); font-size: clamp(16px, 2vw, 18px);
}
.hero .cta { margin-top: 34px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; border-radius: 10px; font-size: 15px; font-weight: 600;
  border: 1px solid var(--hairline-2); background: var(--surface); color: var(--ink);
  text-decoration: none;
  transition: background 0.15s ease, transform 0.12s var(--ease-out);
}
.btn:hover { background: var(--surface-2); transform: translateY(-1px); }
.btn:active { transform: scale(0.97); }
.btn:hover:active { transform: translateY(-1px) scale(0.97); }
/* s1 המקורי מול טקסט לבן היה 3.6:1, וה-hover הבהיר עוד יותר ירד ל-3:1 - שניהם מתחת ל-AA.
   מכהים את שניהם, עם ה-hover כהה מעט יותר מהבסיס (התכהות בלחיצה/הובר, לא הבהרה) */
.btn.primary { background: color-mix(in srgb, var(--s1) 82%, black); border-color: transparent; }
.btn.primary:hover { background: color-mix(in srgb, var(--s1) 70%, black); }

/* ---------- כרטיס אזהרת נתונים ---------- */
.data-note {
  max-width: 860px; margin: 0 auto 8px; padding: 14px 20px;
  display: flex; gap: 12px; align-items: flex-start;
  background: rgba(201, 133, 0, 0.08); border: 1px solid rgba(201, 133, 0, 0.35);
  border-radius: var(--radius-s); color: var(--ink-2); font-size: 13.5px;
}
.data-note .ic { font-size: 17px; line-height: 1.3; }
.data-note b { color: var(--ink); }

/* ---------- סקשנים ---------- */
section.block { max-width: 1120px; margin: 0 auto; padding: 92px 28px; }
@media (max-width: 700px) { section.block { padding: 60px 22px; } }

/* חוצץ עדין בין המקטעים: קו שנמוג לשני הצדדים, לא border קשיח מקצה לקצה.
   ה-hero פותח את העמוד ולכן לא מקבל קו מעליו. */
#page-home > section:not(.hero) { position: relative; }
#page-home > section:not(.hero)::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  /* רוחב יחסי לחלון ולא להורה, כדי שכל החוצצים יהיו באותו אורך
     למרות שהמקטעים עצמם ברוחבים שונים */
  width: min(1064px, calc(100vw - 56px)); height: 1px; pointer-events: none;
  background: linear-gradient(to left, transparent, var(--hairline-2) 22%, var(--hairline-2) 78%, transparent);
}
/* לווידג'ט המבקרים יש מסגרת מעוגלת משלו, ולכן הקו מורם מעליה */
#page-home > section.visitors-live::before { top: -30px; }
.section-head { margin-bottom: 34px; }
.section-head h2 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 800; }
/* 58ch: מעל ~75 תווים לשורה הקריאות בעברית יורדת */
.section-head p { color: var(--ink-2); margin-top: 10px; max-width: 58ch; }

/* ---------- אודות + כישורים ---------- */
.section-head .hl { color: var(--ink); font-weight: 600; }
.skills-open-btn { margin-top: 22px; }

/* חלון "כלים וטכנולוגיות" (dialog אמיתי, נפתח מהכפתור) */
dialog.skills-modal {
  position: fixed; inset: 0; margin: auto;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--hairline-2); border-radius: var(--radius);
  padding: 26px; width: min(720px, 92vw); max-height: 82vh; overflow: auto;
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.7);
  scrollbar-width: thin; scrollbar-color: var(--hairline-2) transparent;
}
dialog.skills-modal::-webkit-scrollbar { width: 8px; }
dialog.skills-modal::-webkit-scrollbar-track { background: transparent; }
dialog.skills-modal::-webkit-scrollbar-thumb { background: var(--hairline-2); border-radius: 8px; }
dialog.skills-modal::-webkit-scrollbar-thumb:hover { background: var(--ink-3); }
dialog.skills-modal::backdrop { background: rgba(0, 0, 0, 0.62); backdrop-filter: blur(2px); }
.skills-modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.skills-modal-head h3 { font-size: 18px; font-weight: 800; }
.skills-modal-close {
  width: 32px; height: 32px; border-radius: 50%; flex: 0 0 auto;
  background: var(--surface-2); border: 1px solid var(--hairline); color: var(--ink-2);
  font-size: 14px; display: grid; place-items: center;
  transition: color 0.15s ease, border-color 0.15s ease, transform 0.1s ease-out;
}
.skills-modal-close:hover { color: var(--ink); border-color: var(--hairline-2); }
.skills-modal-close:active { transform: scale(0.9); }
.skills-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 24px 28px; }
.skills-groups h3 { font-size: 15px; margin-bottom: 14px; color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: 13px; padding: 6px 12px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--hairline); color: var(--ink-2);
}
.chip.main { border-color: rgba(57, 135, 229, 0.5); color: #9ec5f4; background: rgba(57, 135, 229, 0.1); }

/* ---------- גריד פרויקטים ---------- */
.projects-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px;
}
.proj-card {
  position: relative; text-align: start; text-decoration: none;
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: 26px 24px; color: var(--ink);
  display: flex; flex-direction: column; gap: 16px;
  transition: transform 0.25s cubic-bezier(.2,.8,.2,1), border-color 0.25s, box-shadow 0.25s, background 0.25s;
  box-shadow: 0 14px 32px -26px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  animation: cardIn 320ms var(--ease-out) both;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.proj-card:nth-child(1) { animation-delay: 0ms; }
.proj-card:nth-child(2) { animation-delay: 40ms; }
.proj-card:nth-child(3) { animation-delay: 80ms; }
.proj-card:nth-child(4) { animation-delay: 120ms; }
.proj-card:nth-child(5) { animation-delay: 160ms; }
.proj-card:nth-child(n+6) { animation-delay: 200ms; }
.proj-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--accent, var(--s1)), transparent 85%);
}
.proj-card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--accent, var(--s1)) 45%, var(--hairline-2));
  box-shadow: 0 24px 48px -20px rgba(0, 0, 0, 0.85);
  background: var(--surface-2);
}
.proj-card .head { display: flex; align-items: center; gap: 14px; }
.proj-card .emoji {
  font-size: 22px; width: 46px; height: 46px; flex: 0 0 46px;
  display: grid; place-items: center; border-radius: 50%;
  background: color-mix(in srgb, var(--accent, var(--s1)) 16%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent, var(--s1)) 30%, transparent) inset;
  transition: transform 0.25s;
}
.proj-card:hover .emoji { transform: scale(1.08) rotate(-4deg); }
.proj-card h3 { font-size: 18px; font-weight: 700; margin-top: 3px; letter-spacing: -0.1px; }
/* היה text-transform:uppercase על משפט שלם (33-34 תווים) - פוגע בקריאות, במיוחד בעברית/שמות מותג מעורבים */
.proj-card .theme { font-size: 11.5px; color: var(--accent, var(--s1)); font-weight: 700; letter-spacing: 0.2px; }
.proj-card .orig { font-size: 11.5px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.proj-card .orig::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--ink-3); flex: none; }
.proj-card .desc { color: var(--ink-2); font-size: 14px; line-height: 1.7; flex: 1; }
.proj-card .tags { display: flex; flex-wrap: wrap; gap: 7px; }
.proj-card .tags span {
  font-size: 11px; color: var(--ink-2); background: var(--surface-2);
  border: 1px solid var(--hairline); padding: 5px 10px; border-radius: 100px;
  transition: border-color 0.25s;
}
.proj-card:hover .tags span { border-color: var(--hairline-2); }
.proj-card .open {
  margin-top: 6px; display: inline-flex; align-items: center; gap: 6px;
  color: var(--accent, var(--s1)); font-size: 13.5px; font-weight: 700;
  padding: 10px 16px; border-radius: 10px;
  background: color-mix(in srgb, var(--accent, var(--s1)) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent, var(--s1)) 25%, transparent);
  transition: background 0.25s, border-color 0.25s;
}
.proj-card:hover .open {
  background: color-mix(in srgb, var(--accent, var(--s1)) 20%, transparent);
  border-color: color-mix(in srgb, var(--accent, var(--s1)) 50%, transparent);
}
.proj-card .open .arr { transition: transform 0.18s; display: inline-block; }
.proj-card:hover .open .arr { transform: translateX(-4px); }

/* ---------- שירותים ---------- */
.services-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px;
}
.service-card {
  position: relative; background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: 26px 24px; color: var(--ink);
  display: flex; flex-direction: column; gap: 14px;
  transition: transform 0.25s cubic-bezier(.2,.8,.2,1), border-color 0.25s, box-shadow 0.25s;
  box-shadow: 0 14px 32px -26px rgba(0, 0, 0, 0.7);
  animation: cardIn 320ms var(--ease-out) both;
}
.service-card:nth-child(1) { animation-delay: 0ms; }
.service-card:nth-child(2) { animation-delay: 40ms; }
.service-card:nth-child(3) { animation-delay: 80ms; }
.service-card:nth-child(4) { animation-delay: 120ms; }
.service-card:nth-child(5) { animation-delay: 160ms; }
.service-card:nth-child(n+6) { animation-delay: 200ms; }
.service-card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--accent, var(--s1)) 45%, var(--hairline-2));
  box-shadow: 0 24px 48px -20px rgba(0, 0, 0, 0.85);
}
.service-card .head { display: flex; align-items: center; gap: 9px; }
/* אייקון בגודל הכותרת עצמה, בלי מסגרת עיגול - לא tile נפרד */
.service-card .emoji {
  width: 19px; height: 19px; flex: 0 0 19px;
  display: grid; place-items: center;
  color: var(--accent, var(--s1));
}
.service-card h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.1px; }
.service-card .desc { color: var(--ink-2); font-size: 14px; line-height: 1.7; }
.service-card .tags { display: flex; flex-wrap: wrap; gap: 7px; }
.service-card .tags span {
  font-size: 11px; color: var(--ink-2); background: var(--surface-2);
  border: 1px solid var(--hairline); padding: 5px 10px; border-radius: 100px;
}
.service-card .proof-link {
  margin-top: auto; color: var(--accent, var(--s1)); font-size: 13px; font-weight: 700; text-decoration: none;
}
.service-card .proof-link:hover { text-decoration: underline; }

/* גרסה מצומצמת לתצוגה המקדימה בעמוד הבית - כותרת ומשפט אחד, בלי תגיות */
.service-card.mini { padding: 20px 22px; gap: 8px; }
.service-card.mini .desc { font-size: 13.5px; }

/* ---------- הסמכות ---------- */
.cert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.cert-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius-s); padding: 16px 18px;
  text-decoration: none; color: inherit; transition: border-color 0.2s, background 0.2s;
}
a.cert-card:hover { border-color: var(--hairline-2); background: var(--surface-2); }
.cert-card .ic { font-size: 24px; line-height: 1; flex: 0 0 auto; }
.cert-card .name { font-size: 14px; font-weight: 700; color: var(--ink); }
.cert-card .issuer { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
/* כרטיס ממתין לתוכן אמיתי - לא בודים תעודה, מסמנים חזותית שזה בדרך */
.cert-card.pending { border-style: dashed; border-color: var(--hairline-2); background: transparent; }
.cert-card.pending .name { color: var(--ink-2); }

/* ---------- תצוגה מקדימה של פרויקטים/שירותים בעמוד הבית ---------- */
.teaser-more { margin-top: 24px; text-align: center; }
.section-more-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--s1); font-size: 14px; font-weight: 700; text-decoration: none;
  padding: 12px 22px; border-radius: 999px;
  background: color-mix(in srgb, var(--s1) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--s1) 30%, transparent);
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.section-more-link:hover {
  background: color-mix(in srgb, var(--s1) 22%, transparent);
  border-color: color-mix(in srgb, var(--s1) 55%, transparent);
  transform: translateY(-2px);
}

/* ---------- עמוד הפרויקטים המלא ---------- */
.projects-page .projects-intro { color: var(--ink-2); font-size: 14px; line-height: 1.7; max-width: 72ch; margin: 4px 0 20px; }

/* ---------- תהליך עבודה ---------- */
.process-step {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: 20px;
}
.process-step .num { font-size: 13px; font-weight: 800; color: var(--s1); }
.process-step h3 { font-size: 15.5px; margin: 8px 0 6px; }
.process-step p { font-size: 13px; color: var(--ink-2); }

/* ---------- קרוסלה (תלת-ממד, כרטיס במרכז) ---------- */
.process-step:hover { border-color: var(--hairline-2); }
.carousel {
  --card-w: min(300px, 86vw); --gap: 18px;
  display: flex; flex-direction: column; gap: 14px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}
.carousel-track {
  display: flex; gap: var(--gap); padding: 14px 0;
  cursor: grab; user-select: none; will-change: transform;
}
.carousel-track.dragging { cursor: grabbing; }
.carousel-track > * {
  flex: 0 0 auto; width: var(--card-w);
  transition: box-shadow 0.2s, border-color 0.2s;
}

/* ---------- פוטר ---------- */
footer {
  border-top: 1px solid var(--hairline); margin-top: 40px;
  padding: 40px 28px 60px; text-align: center; color: var(--ink-3); font-size: 13.5px;
}
footer .links { display: flex; gap: 18px; justify-content: center; margin-bottom: 14px; }
footer .links a, footer .links button { color: var(--ink-2); text-decoration: none; background: none; border: none; font: inherit; }
footer .links a:hover, footer .links button:hover { color: var(--ink); }
/* ---------- ווידג'ט מבקרים חי (אחרי ה-Hero) ---------- */
.visitors-live {
  max-width: 820px; margin: 30px auto 8px; padding: 22px 26px;
  display: flex; flex-direction: column; gap: 22px;
  background: linear-gradient(155deg, color-mix(in srgb, var(--s1) 12%, var(--surface)), color-mix(in srgb, var(--s5) 9%, var(--surface)));
  border: 1px solid color-mix(in srgb, var(--s1) 35%, var(--hairline-2));
  border-radius: var(--radius);
  box-shadow: 0 18px 40px -22px color-mix(in srgb, var(--s1) 55%, transparent);
}
.visitors-live-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.live-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: color-mix(in srgb, var(--s1) 14%, var(--surface-2));
  border: 1px solid color-mix(in srgb, var(--s1) 35%, transparent);
  border-radius: 100px; padding: 5px 12px;
}
.visitors-live-head .live-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--good);
  animation: gdPulse 1.8s ease-in-out infinite;
}
.visitors-live-head .kicker { color: var(--s1); font-weight: 700; font-size: 11.5px; letter-spacing: 1.3px; }
.visitors-live-head h2 { font-size: 18px; font-weight: 800; }
.visitors-live-body {
  display: flex; align-items: center; gap: 26px; flex-wrap: wrap;
}
.visitor-counts { flex: 0 0 auto; display: flex; gap: 12px; flex-wrap: wrap; }
.visitor-count-big {
  display: flex; flex-direction: column; gap: 3px;
  background: var(--surface-2); border: 1px solid var(--hairline);
  border-radius: 12px; padding: 10px 18px; min-width: 130px;
}
.visitor-count-big b { font-size: 26px; font-weight: 800; color: var(--s1); line-height: 1; }
.visitor-count-big span { font-size: 12px; color: var(--ink-3); display: inline-flex; align-items: center; gap: 4px; }
.visitor-count-big.returning b { color: var(--s2); }
.visitor-count-big.returning .ret-ic { color: var(--s2); }
.visitors-live-divider {
  align-self: stretch; width: 1px; margin: 2px 0;
  background: linear-gradient(180deg, transparent, var(--hairline-2), transparent);
}
.visitor-roles { display: flex; flex-direction: column; align-items: center; gap: 10px; flex: 1 1 240px; text-align: center; }
.visitor-roles-prompt { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.visitor-roles-label { font-size: 14px; color: var(--ink); font-weight: 600; }
.visitor-roles-prompt .seg { justify-content: center; }
.visitor-roles-prompt .seg button {
  background: color-mix(in srgb, var(--s1) 18%, var(--surface-2));
  border-color: color-mix(in srgb, var(--s1) 50%, transparent);
  color: var(--ink); font-weight: 600;
}
.visitor-roles-prompt .seg button:hover {
  background: color-mix(in srgb, var(--s1) 30%, var(--surface-2));
  border-color: color-mix(in srgb, var(--s1) 70%, transparent);
}
.visitor-roles-chart { max-width: 300px; width: 100%; }
.visitor-roles-chart .chart-empty { padding: 4px 0; font-size: 12px; }
@media (max-width: 700px) {
  .visitors-live { padding: 20px; }
  .visitors-live-body { flex-direction: column; align-items: stretch; gap: 20px; }
  .visitor-counts { justify-content: center; }
  .visitors-live-divider { width: auto; height: 1px; margin: 0; background: linear-gradient(90deg, transparent, var(--hairline-2), transparent); }
}

/* ============================================================
   עמוד דשבורד
   ============================================================ */
.page { display: none; }
.page.active {
  display: block;
  opacity: 1;
  transition: opacity 200ms var(--ease-out), display 200ms allow-discrete;
  @starting-style { opacity: 0; }
}

.dash-wrap { max-width: 1240px; margin: 0 auto; padding: 22px 20px 80px; }

.dash-head {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 6px 0 16px;
}
.back-btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface); border: 1px solid var(--hairline-2);
  color: var(--ink-2); border-radius: 10px; padding: 8px 15px; font-size: 13.5px;
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease, transform 0.1s ease-out;
}
.back-btn:hover { color: var(--ink); background: var(--surface-2); }
.back-btn:active { transform: scale(0.96); }
.dash-head .title-box h1 { font-size: clamp(19px, 3vw, 26px); font-weight: 800; }
.dash-head .title-box .sub { font-size: 13px; color: var(--ink-3); }
.dash-head .badge {
  margin-inline-start: auto;
  font-size: 12px; padding: 6px 13px; border-radius: 999px;
  background: rgba(201, 133, 0, 0.12); border: 1px solid rgba(201, 133, 0, 0.4); color: #eda100;
  white-space: nowrap;
}

/* פאנל "על הפרויקט" */
.about-proj {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius); margin-bottom: 18px; overflow: hidden;
}
.about-proj summary {
  list-style: none; cursor: pointer; padding: 14px 20px;
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 14.5px; color: var(--ink);
}
.about-proj summary::-webkit-details-marker { display: none; }
/* התווית חייבת לכווץ/לעטוף בעצמה, אחרת ה-flex גולש מהקופסה ברוחבים צרים */
.about-proj summary .label { flex: 1; min-width: 0; }
.about-proj summary .tw { margin-inline-start: auto; transition: transform 0.2s; color: var(--ink-3); flex: 0 0 auto; }
.about-proj[open] summary .tw { transform: rotate(180deg); }
.about-proj .body {
  padding: 4px 20px 20px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px;
}
.about-proj .col h3 { font-size: 13px; color: var(--accent, var(--s1)); margin-bottom: 6px; }
.about-proj .col p, .about-proj .col li { font-size: 13px; color: var(--ink-2); }
.about-proj .col ul { padding-inline-start: 18px; }
.about-proj .impact {
  grid-column: 1 / -1;
  font-size: 13px; color: var(--ink-2); line-height: 1.6;
  padding: 12px 14px; border-radius: 10px;
  background: color-mix(in srgb, var(--accent, var(--s1)) 8%, transparent);
  border-inline-start: 3px solid var(--accent, var(--s1));
}

/* טאבים של דשבורד */
.dash-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.dash-tabs button {
  background: var(--surface); border: 1px solid var(--hairline);
  color: var(--ink-2); font-size: 13.5px; font-weight: 600;
  padding: 9px 18px; border-radius: 10px;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease, transform 0.1s ease-out;
}
.dash-tabs button:hover { color: var(--ink); }
.dash-tabs button:active { transform: scale(0.96); }
.dash-tabs button.active {
  background: color-mix(in srgb, var(--accent, var(--s1)) 16%, var(--surface));
  border-color: color-mix(in srgb, var(--accent, var(--s1)) 55%, transparent);
  color: var(--ink);
}
.dash-view { display: none; }
.dash-view.active { display: block; }

/* סרגל סלייסרים */
.slicer-bar {
  display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end;
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: 14px 18px; margin-bottom: 16px;
}
.slicer { display: flex; flex-direction: column; gap: 6px; }
.slicer label { font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
.seg { display: flex; flex-wrap: wrap; gap: 5px; }
.seg button {
  background: var(--surface-2); border: 1px solid var(--hairline);
  color: var(--ink-2); font-size: 12.5px; padding: 6px 12px; border-radius: 8px; transition: 0.13s;
}
.seg button:hover { color: var(--ink); border-color: var(--hairline-2); }
.seg button.on {
  background: color-mix(in srgb, var(--accent, var(--s1)) 22%, var(--surface-2));
  border-color: color-mix(in srgb, var(--accent, var(--s1)) 60%, transparent);
  color: var(--ink); font-weight: 600;
}
.slicer select {
  background: var(--surface-2); color: var(--ink); border: 1px solid var(--hairline-2);
  border-radius: 8px; padding: 7px 10px; font-size: 13px; font-family: inherit; min-width: 150px;
}
.slicer-bar .clear-f {
  margin-inline-start: auto; background: none; border: none;
  color: var(--ink-3); font-size: 12.5px; text-decoration: underline;
}
.slicer-bar .clear-f:hover { color: var(--ink); }

/* דף הבית כדשבורד: סלייסר פרויקטים, מונה, חותמת רענון, קריצה */
.home-slicer { margin-bottom: 22px; }
.home-slicer .showing { margin-inline-start: auto; align-self: center; font-size: 12.5px; color: var(--ink-3); }
.section-head .wink { display: block; margin-top: 10px; font-size: 13.5px; color: var(--ink-3); }

/* גריד אריחים */
.tiles { display: grid; gap: 14px; grid-template-columns: repeat(12, 1fr); }
.tile {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: 16px 18px; min-width: 0;
}
.tile .t-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.tile h3 { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.tile .t-sub { font-size: 11.5px; color: var(--ink-3); }
.tile .t-actions { margin-inline-start: auto; display: flex; gap: 4px; }
.tile .t-actions button {
  /* ink-3 על surface-2 היה 4.4:1 - מתחת ל-AA. ink-2 עובר */
  background: var(--surface-2); border: 1px solid var(--hairline); color: var(--ink-2);
  font-size: 11px; padding: 3px 9px; border-radius: 6px;
}
.tile .t-actions button.on { color: var(--ink); border-color: var(--hairline-2); background: var(--grid); }

.col-3 { grid-column: span 3; } .col-4 { grid-column: span 4; }
.col-6 { grid-column: span 6; } .col-8 { grid-column: span 8; }
.col-12 { grid-column: span 12; }
@media (max-width: 980px) {
  .col-3 { grid-column: span 6; } .col-4 { grid-column: span 6; }
  .col-6, .col-8 { grid-column: span 12; }
}
@media (max-width: 620px) {
  .col-3, .col-4 { grid-column: span 12; }
}

/* KPI */
.kpi { display: flex; flex-direction: column; gap: 2px; justify-content: center; }
.kpi .k-label { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.kpi .k-value { font-size: clamp(26px, 3vw, 34px); font-weight: 800; line-height: 1.15; }
.kpi .k-sub { font-size: 12px; color: var(--ink-2); }
.kpi .k-sub .up { color: var(--good); font-weight: 700; }
.kpi .k-sub .down { color: var(--critical); font-weight: 700; }
.kpi.accented .k-value { color: var(--accent, var(--s1)); }

/* מקרא */
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 4px 0 6px; }
.legend .lg { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); }
.legend .sw { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 10px; }

/* טבלה */
.viz-table-wrap { overflow: auto; max-height: 340px; border-radius: 8px; }
/* סימון שהטבלה נגללת לצדדים: פס מתמוסס בקצה + שורת עזר, רק כשבאמת יש גלישה */
.viz-table-scroll { position: relative; }
.viz-table-scroll::after {
  content: ''; position: absolute; inset-block: 0; inset-inline-start: 0; width: 46px;
  background: linear-gradient(to right, var(--surface), transparent);
  pointer-events: none; opacity: 0; transition: opacity 0.2s;
}
[dir="rtl"] .viz-table-scroll::after { background: linear-gradient(to left, var(--surface), transparent); }
.viz-table-scroll.is-overflowing::after { opacity: 1; }
.viz-table-hint {
  display: none; margin-top: 6px; font-size: 11.5px; color: var(--ink-3);
}
.viz-table-scroll.is-overflowing + .viz-table-hint { display: block; }

.contact-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.contact-actions .btn { font-size: 15px; }

/* טבעת פוקוס על אלמנטי SVG לחיצים (פלחי דונאט, מוטות, רצועות hit) */
svg [role="button"]:focus { outline: none; }
svg [role="button"]:focus-visible {
  outline: 2px solid var(--s1); outline-offset: 1px;
}
.viz-table th:focus-visible { outline: 2px solid var(--s1); outline-offset: -2px; }
.legend .lg[role="button"]:focus-visible, [data-k][role="button"]:focus-visible {
  outline: 2px solid var(--s1); outline-offset: 2px; border-radius: 6px;
}

/* דילוג לתוכן: מוסתר עד שמגיעים אליו ב-Tab */
.skip-link {
  position: absolute; inset-inline-start: 50%; transform: translate(50%, -140%);
  z-index: 100;
  /* s1 המקורי מול טקסט לבן נותן רק 3.6:1 - מכהים ל-8:1+ כדי לעבור WCAG AA */
  background: color-mix(in srgb, var(--s1) 60%, black); color: #fff; text-decoration: none;
  padding: 10px 18px; border-radius: 0 0 10px 10px; font-size: 14px; font-weight: 600;
  transition: transform 0.15s;
}
.skip-link:focus { transform: translate(50%, 0); }
table.viz-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.viz-table th {
  position: sticky; top: 0; background: var(--surface-2); color: var(--ink-2);
  text-align: start; padding: 8px 10px; font-weight: 700; cursor: pointer; white-space: nowrap;
  border-bottom: 1px solid var(--hairline-2); user-select: none;
}
table.viz-table th .si { color: var(--s1); font-size: 10px; }
table.viz-table td {
  padding: 7px 10px; border-bottom: 1px solid var(--hairline); color: var(--ink-2);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
table.viz-table tr:hover td { background: rgba(255, 255, 255, 0.03); }
table.viz-table td.num { font-weight: 600; color: var(--ink); }
.pill { font-size: 11px; padding: 2px 9px; border-radius: 999px; font-weight: 700; }
.pill.ok { background: rgba(12, 163, 12, 0.14); color: #2fbf3f; }
.pill.warn { background: rgba(250, 178, 25, 0.14); color: #fab219; }
.pill.bad { background: rgba(208, 59, 59, 0.16); color: #e66767; }

/* Tooltip */
.viz-tip {
  position: fixed; z-index: 200; pointer-events: none; opacity: 0;
  background: #262624; border: 1px solid var(--hairline-2); border-radius: 9px;
  padding: 9px 13px; font-size: 12.5px; color: var(--ink-2);
  box-shadow: 0 10px 28px -8px rgba(0, 0, 0, 0.7);
  transition: opacity 0.1s; max-width: 260px; direction: rtl;
}
.viz-tip b { color: var(--ink); }
.viz-tip .row { display: flex; align-items: center; gap: 7px; margin-top: 3px; }
.viz-tip .row .sw { width: 9px; height: 9px; border-radius: 3px; }

/* SVG כללי */
.chart-box { position: relative; width: 100%; }
.chart-box svg { display: block; width: 100%; height: auto; direction: ltr; }
.chart-box svg text { font-family: var(--font); }
.bar-hit { cursor: pointer; }
.chart-empty { color: var(--ink-3); font-size: 13px; text-align: center; padding: 40px 0; }

/* עץ ארגוני (דשבורד ג'דיי) */
.org-tree { display: flex; flex-direction: column; align-items: center; gap: 0; }
.org-root {
  background: color-mix(in srgb, var(--accent) 15%, var(--surface-2));
  border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent);
  border-radius: 12px; padding: 12px 30px; text-align: center;
}
.org-root b { font-size: 24px; display: block; }
.org-root span { font-size: 12px; color: var(--ink-2); }
.org-branches { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; width: 100%; margin-top: 26px; position: relative; }
.org-branch { display: flex; flex-direction: column; gap: 10px; }
.org-track {
  background: var(--surface-2); border: 1px solid var(--hairline-2);
  border-radius: 10px; padding: 9px 12px; text-align: center;
}
.org-track b { display: block; font-size: 16px; }
.org-track .tn { font-size: 12.5px; color: var(--ink-2); font-weight: 700; }
.org-track .tp { font-size: 11px; color: var(--ink-3); }
.org-ranks { display: flex; flex-direction: column; gap: 7px; }
.org-rank {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: 9px; padding: 7px 12px; display: flex; align-items: center; gap: 8px;
}
.org-rank .rn { font-size: 12px; color: var(--ink-2); flex: 1; }
.org-rank b { font-size: 14.5px; }
.org-rank .rp { font-size: 10.5px; color: var(--ink-3); }
.org-connector { width: 2px; height: 18px; background: var(--grid); margin: 0 auto; }

/* ---------- טוסט "הועתק" ---------- */
.copy-toast {
  position: fixed; bottom: 26px; left: 50%; transform: translate(-50%, 16px);
  z-index: 300; direction: rtl;
  background: #262624; color: var(--ink);
  border: 1px solid rgba(25, 158, 112, 0.5);
  border-radius: 12px; padding: 12px 22px;
  font-size: 14px; font-weight: 600;
  box-shadow: 0 12px 34px -10px rgba(0, 0, 0, 0.8);
  opacity: 0; pointer-events: none;
  transition: opacity 0.22s, transform 0.22s;
}
.copy-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- דשבורד רפאים ברקע ה-Hero ---------- */
.ghost-dash {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none;
  opacity: 0.72;
  -webkit-mask-image: radial-gradient(ellipse 66% 62% at 50% 36%, transparent 16%, #000 82%);
  mask-image: radial-gradient(ellipse 66% 62% at 50% 36%, transparent 16%, #000 82%);
}
.ghost-dash svg { width: 100%; height: 100%; display: block; }

.gd-bar {
  transform-box: fill-box; transform-origin: center bottom;
  animation: gdBar var(--dur, 4s) ease-in-out var(--del, 0s) infinite alternate;
}
@keyframes gdBar {
  from { transform: scaleY(var(--a, 0.4)); }
  to   { transform: scaleY(var(--b, 0.9)); }
}

.gd-line {
  fill: none; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: gdDraw var(--dur, 11s) ease-in-out var(--del, 0s) infinite;
}
@keyframes gdDraw {
  0%   { stroke-dashoffset: 1; opacity: 0; }
  6%   { opacity: 1; }
  52%  { stroke-dashoffset: 0; opacity: 1; }
  78%  { stroke-dashoffset: 0; opacity: 1; }
  92%  { stroke-dashoffset: 0; opacity: 0; }
  100% { stroke-dashoffset: 1; opacity: 0; }
}

.gd-spin {
  transform-box: fill-box; transform-origin: center;
  animation: gdSpin 46s linear infinite;
}
@keyframes gdSpin { to { transform: rotate(360deg); } }

.gd-pulse { animation: gdPulse 2.6s ease-in-out var(--del, 0s) infinite; }
@keyframes gdPulse { 0%, 100% { opacity: 0.25; } 50% { opacity: 0.9; } }

@media (max-width: 700px) { .ghost-dash { opacity: 0.38; } }
@media (prefers-reduced-motion: reduce) {
  .gd-bar, .gd-line, .gd-spin, .gd-pulse { animation: none !important; }
  .gd-line { stroke-dashoffset: 0; }
}

/* מגע נוח במובייל */
@media (max-width: 700px) {
  /* היה 10px/13.5px, יוצא ~41px - מתחת ל-44px. מעלים כדי לעבור את הרף */
  .seg button { padding: 13px 14px; font-size: 13.5px; }
  .dash-tabs button { padding: 12px 18px; }
  .tile .t-actions button { padding: 8px 12px; font-size: 12px; }
  .slicer select { padding: 10px 12px; }
  .topnav { padding: 10px 14px; gap: 8px; }
  .topnav nav a { padding: 8px 8px; font-size: 13px; }
  /* היחיד ששכחנו בסבב הראשון: קישור טקסט קטן בלי padding כלל */
  .slicer-bar .clear-f { padding: 13px 4px; }
}

/* כרטיס הסיפור (התובנה) */
.story-card {
  display: flex; gap: 12px; align-items: flex-start;
  background: color-mix(in srgb, var(--accent, var(--s1)) 8%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent, var(--s1)) 30%, transparent);
  border-radius: var(--radius-s); padding: 13px 18px; margin-bottom: 16px;
  font-size: 13.5px; color: var(--ink-2); line-height: 1.6;
}
.story-card .ic { font-size: 17px; line-height: 1.4; }
.story-card b { color: var(--ink); }

/* נגישות: מוסתר חזותית אבל נשאר לקורא מסך (משמש לתיקון היררכיית כותרות) */
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* נגישות: פוקוס מקלדת */
:focus-visible {
  outline: 2px solid var(--s1); outline-offset: 2px; border-radius: 6px;
}
button, a, select, summary, [role="tab"] { cursor: pointer; }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

/* טעינה / ריק */
::selection { background: rgba(57, 135, 229, 0.4); }
