/* ============================================================
   מערכת העיצוב "שחר שקט" (Quiet Dawn) — החיים שלי
   נטענת אחרי style.css. כל הכללים תחת body.ds כדי שנוכל להחיל
   טאב-אחר-טאב בלי לשבור את מה שעדיין לא הומר.
   ============================================================ */

body.ds {
  /* --- צבע: תכלת. לא "כחול UI" אלא הגוון של הים והרקיע ---
     התכלת ההיסטורית (מורקס) היא אינדיגו-שמימי עמוק, #075299 בערך.
     ממנה נגזרה כל הסקאלה: הרקע הוא ים לילי, הכרטיס הוא מים עמוקים,
     והאקסנט הוא הרקיע. "תכלת דומה לים, וים דומה לרקיע,
     ורקיע דומה לכסא הכבוד" (מנחות מג ע"ב) --- */
  --ds-bg: #080f1e;           /* ים בלילה */
  --ds-bg-2: #0b1528;
  --ds-surface: #111c33;      /* מים עמוקים — כרטיס אטום עם נשמה תכולה */
  --ds-surface-2: #182643;
  --ds-line: #24365c;
  --ds-line-soft: #1d2c4c;

  /* טקסט — כל הערכים נמדדו מול הכרטיס והרקע ועוברים WCAG AA */
  --ds-text: #f4f7fd;         /* 15.8:1 */
  --ds-text-2: #c8d4ea;       /* 11.4:1 */
  --ds-text-3: #9aabc7;       /*  7.3:1 */

  /* התכלת עצמה — שלוש עוצמות של אותו גוון */
  --ds-accent: #4aa8e8;       /* רקיע  — 6.5:1  */
  --ds-accent-soft: #7cc4f5;  /* אור   — 8.9:1  */
  --ds-accent-deep: #2a7fc9;  /* ים    — לקישוט בלבד, לא לטקסט */
  --ds-accent-ink: #04182e;   /* דיו על כפתור תכלת — 6.9:1 */
  --ds-accent-bg: #4aa8e81f;
  --ds-glow: 0 0 24px -6px rgba(74, 168, 232, 0.55);

  /* נר — הגוון החם היחיד. שמור לרגעים של משמעות (רצף, יעד שהושג) */
  --ds-gold: #e8c072;         /* 9.9:1 */
  --ds-gold-bg: #e8c07216;

  /* צבעי מצב — נבדקו על הכרטיס */
  --ds-ok: #4ec9a0;
  --ds-warn: #f0a868;
  --ds-danger: #f2789a;
  --ds-nature: #4ec9a0;

  /* --- ריווח: סקאלת 8 נקודות. ארבעה ערכים במקום 36 --- */
  --ds-1: 0.5rem;   /*  8px */
  --ds-2: 1rem;     /* 16px */
  --ds-3: 1.5rem;   /* 24px */
  --ds-4: 2rem;     /* 32px */
  --ds-5: 3rem;     /* 48px */

  /* --- טיפוגרפיה: סקאלה אחת ביחס 1.25, בסיס 16px --- */
  --ds-fs-xs: 0.875rem;  /* 14px — המינימום באתר */
  --ds-fs-sm: 1rem;      /* 16px */
  --ds-fs-md: 1.25rem;   /* 20px */
  --ds-fs-lg: 1.563rem;  /* 25px */
  --ds-fs-xl: 1.953rem;  /* 31px */

  /* --- פינות: שלוש בלבד --- */
  --ds-r-sm: 10px;   /* פקדים */
  --ds-r-md: 16px;   /* כרטיסים */
  --ds-r-full: 999px;

  --ds-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px -18px rgba(0, 0, 0, 0.8);
  --ds-tap: 44px;    /* אזור לחיצה מינימלי */

  background: var(--ds-bg);
  color: var(--ds-text);
  font-size: 16px;
  line-height: 1.65;
}

/* הרקע המונפש והיער נשארים — אבל שקטים יותר, שלא יתחרו בטקסט */
body.ds::before { opacity: 0.42; }
body.ds::after { opacity: 0.4; }

/* אור הרקיע: זוהר תכלת רך שיורד מלמעלה על כל העמוד. לא אנימציה, לא רעש —
   רק תחושה שהאור בא ממקום אחד. */
body.ds {
  background-image:
    radial-gradient(120% 60% at 50% -10%, rgba(74, 168, 232, 0.16) 0%, transparent 60%),
    linear-gradient(180deg, #0a1526 0%, #080f1e 55%);
  background-attachment: fixed;
}

/* ---------- דילוג לתוכן (מקלדת/קורא מסך) ---------- */
.skip-link {
  position: absolute; inset-inline-start: -9999px; top: 0; z-index: 100;
  background: var(--ds-accent); color: var(--ds-accent-ink);
  padding: var(--ds-1) var(--ds-2); border-radius: 0 0 var(--ds-r-sm) 0;
  font-weight: 600;
}
.skip-link { min-height: var(--ds-tap); display: inline-flex; align-items: center; }
.skip-link:focus { inset-inline-start: 0; }

/* תווית שמוסתרת לעין אך נשארת לקוראי מסך — עדיף על hidden */
.ds-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- מצב פוקוס אחיד לכל דבר שאפשר להגיע אליו במקלדת ---------- */
body.ds :focus-visible {
  outline: 3px solid var(--ds-accent);
  outline-offset: 2px;
  border-radius: var(--ds-r-sm);
}
body.ds :focus:not(:focus-visible) { outline: none; }

/* ---------- שלד העמוד ---------- */
body.ds main { max-width: 900px; margin: 0 auto; padding: var(--ds-4) var(--ds-2) var(--ds-5); }

body.ds .topbar {
  background: rgba(11, 17, 28, 0.92);
  border-bottom: 1px solid var(--ds-line);
  backdrop-filter: blur(12px);
  padding: var(--ds-1) var(--ds-2);
  gap: var(--ds-1);
  align-items: center;
  flex-wrap: nowrap;
}
body.ds nav { flex: 1 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
body.ds nav::-webkit-scrollbar { display: none; }
body.ds .nav-search { flex: 0 1 190px; min-width: 120px; }
body.ds .nav-search input { min-height: 44px; font-size: var(--ds-fs-xs); padding: 0.35rem 0.7rem; }
body.ds .logout { flex: 0 0 auto; }
body.ds .logout-btn {
  min-height: 44px; padding: 0 0.9rem; border-radius: var(--ds-r-full);
  border: 1px solid var(--ds-line); background: transparent;
  color: var(--ds-text-3); font: inherit; font-size: var(--ds-fs-xs); cursor: pointer;
}
body.ds .logout-btn:hover { color: var(--ds-text); border-color: var(--ds-text-3); }
body.ds .logo { font-size: var(--ds-fs-md); background: none; -webkit-text-fill-color: var(--ds-text); color: var(--ds-text); }
body.ds nav { gap: 2px; }
body.ds nav a {
  color: var(--ds-text-3);
  font-size: var(--ds-fs-xs);
  padding: 0.6rem 0.75rem;
  min-height: var(--ds-tap);
  display: inline-flex; align-items: center;
  border-radius: var(--ds-r-full);
  border: none;
}
body.ds nav a:hover { color: var(--ds-text); background: var(--ds-surface-2); }
body.ds nav a.active { color: var(--ds-accent-ink); background: var(--ds-accent); font-weight: 600; box-shadow: var(--ds-glow); }
body.ds .observe { border-color: #e8c07255; color: var(--ds-gold); background: var(--ds-gold-bg); font-size: var(--ds-fs-xs); }

/* ---------- כותרת עמוד — מבנה אחיד לכל טאב ---------- */
.ds-head { margin-bottom: var(--ds-4); }
.ds-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--ds-2); flex-wrap: wrap; }
.ds-head h1 {
  font-size: var(--ds-fs-xl); font-weight: 700; line-height: 1.25;
  background: none; -webkit-text-fill-color: currentColor; color: var(--ds-text);
  letter-spacing: -0.01em;
}
.ds-head p { color: var(--ds-text-3); font-size: var(--ds-fs-sm); margin-top: 0.25rem; }
.ds-head h1::after {
  content: ""; display: block; width: 44px; height: 3px; margin-top: 0.6rem;
  border-radius: var(--ds-r-full);
  background: linear-gradient(90deg, var(--ds-accent), transparent);
}

/* ---------- כרטיס ---------- */
.ds-card {
  background: var(--ds-surface);
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-r-md);
  padding: var(--ds-3);
  box-shadow: var(--ds-shadow);
  backdrop-filter: none;
}
.ds-card + .ds-card { margin-top: var(--ds-2); }
.ds-card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--ds-2); margin-bottom: var(--ds-2); }
.ds-card-head h2 { font-size: var(--ds-fs-md); font-weight: 600; }

/* ---------- כותרת מדור ---------- */
.ds-section { display: flex; align-items: baseline; gap: var(--ds-1); margin: var(--ds-4) 0 var(--ds-2); }
.ds-section h2 { font-size: var(--ds-fs-md); font-weight: 600; }
.ds-section .ds-count { color: var(--ds-text-3); font-size: var(--ds-fs-xs); }

/* ---------- כפתורים — סגנון אחד, שלוש וריאציות ---------- */
.ds-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  min-height: var(--ds-tap); padding: 0 var(--ds-3);
  border: 1px solid transparent; border-radius: var(--ds-r-sm);
  background: var(--ds-accent); color: var(--ds-accent-ink);
  font: inherit; font-size: var(--ds-fs-sm); font-weight: 600;
  cursor: pointer; transition: filter 0.15s ease, background 0.15s ease;
}
.ds-btn:hover { filter: brightness(1.08); }
.ds-btn:active { filter: brightness(0.95); }
.ds-btn:not(.ds-btn--ghost):not(.ds-btn--quiet) { box-shadow: var(--ds-glow); }
.ds-btn--ghost { background: transparent; border-color: var(--ds-line); color: var(--ds-text-2); }
.ds-btn--ghost:hover { background: var(--ds-surface-2); color: var(--ds-text); }
.ds-btn--quiet { background: transparent; border-color: transparent; color: var(--ds-text-3); padding: 0 var(--ds-2); }
.ds-btn--quiet:hover { background: var(--ds-surface-2); color: var(--ds-text); }
.ds-btn--danger:hover { background: var(--ds-danger); color: #2a0a12; border-color: transparent; }

/* כפתור אייקון — עגול, תמיד 44px */
.ds-icon-btn {
  width: var(--ds-tap); height: var(--ds-tap); flex: 0 0 var(--ds-tap);
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--ds-line);
  border-radius: var(--ds-r-full); color: var(--ds-text-2);
  font-size: var(--ds-fs-sm); cursor: pointer; transition: all 0.15s ease;
}
.ds-icon-btn:hover { border-color: var(--ds-accent); color: var(--ds-accent); background: var(--ds-accent-bg); }
.ds-icon-btn--check:hover { border-color: var(--ds-ok); color: var(--ds-ok); background: #4ec9a020; }

/* ---------- תגיות ---------- */
.ds-tag {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.2rem 0.7rem; border-radius: var(--ds-r-full);
  background: var(--ds-surface-2); border: 1px solid var(--ds-line);
  color: var(--ds-text-2); font-size: var(--ds-fs-xs); line-height: 1.7;
}
.ds-tag--accent { background: var(--ds-accent-bg); border-color: #4aa8e855; color: var(--ds-accent-soft); }
.ds-tag--gold { background: var(--ds-gold-bg); border-color: #e8c07255; color: var(--ds-gold); }
.ds-tag--warn { background: #fbbf2418; border-color: #fbbf2455; color: var(--ds-warn); }
.ds-tag--danger { background: #fb718518; border-color: #fb718555; color: var(--ds-danger); }

/* ---------- טפסים ---------- */
.ds-field { display: flex; flex-direction: column; gap: 0.35rem; }
.ds-label { font-size: var(--ds-fs-xs); color: var(--ds-text-2); font-weight: 500; }
body.ds input, body.ds select, body.ds textarea {
  width: 100%; min-height: var(--ds-tap);
  padding: 0.6rem 0.8rem;
  background: var(--ds-surface-2);
  border: 1px solid var(--ds-line);
  border-radius: var(--ds-r-sm);
  color: var(--ds-text); font: inherit; font-size: var(--ds-fs-sm);
}
body.ds textarea { min-height: 5rem; line-height: 1.6; }
body.ds input::placeholder, body.ds textarea::placeholder { color: var(--ds-text-3); }
body.ds input:hover, body.ds select:hover, body.ds textarea:hover { border-color: #3c4d70; }
body.ds input:focus, body.ds select:focus, body.ds textarea:focus { border-color: var(--ds-accent); }
.ds-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--ds-2); }
.ds-form-row { display: flex; gap: var(--ds-1); align-items: stretch; }
.ds-form-row input { flex: 1; }
.ds-hint { font-size: var(--ds-fs-xs); color: var(--ds-text-3); }
.ds-form { display: flex; flex-direction: column; gap: var(--ds-2); }
.ds-form label { display: block; font-size: var(--ds-fs-sm); color: var(--ds-text-2); }

/* ---------- טבלה (לוח היארצייטים וכל טבלה עתידית) ---------- */
.ds-table { width: 100%; border-collapse: collapse; font-size: var(--ds-fs-sm); }
.ds-table th {
  text-align: right; color: var(--ds-text-3); font-weight: 500;
  font-size: var(--ds-fs-xs); padding: 0.4rem 0.6rem;
  border-bottom: 1px solid var(--ds-line);
}
.ds-table td { padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--ds-line-soft); white-space: nowrap; }
.ds-table tr:last-child td { border-bottom: none; }
.ds-table a { color: var(--ds-accent-soft); text-decoration: none; }

/* ---------- רשימת פריטים (משימות וכל רשימה עתידית) ---------- */
.ds-list { display: flex; flex-direction: column; gap: var(--ds-1); }
.ds-item {
  display: flex; align-items: flex-start; gap: var(--ds-2);
  background: var(--ds-surface); border: 1px solid var(--ds-line);
  border-radius: var(--ds-r-md); padding: var(--ds-2);
}
.ds-item:hover { border-color: #3c4d70; }
.ds-item--alert { border-inline-start: 3px solid var(--ds-danger); }
.ds-item--warn { border-inline-start: 3px solid var(--ds-warn); }
.ds-item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.ds-item-title { font-size: var(--ds-fs-sm); font-weight: 500; color: var(--ds-text); }
.ds-item-meta { display: flex; flex-wrap: wrap; gap: 0.4rem var(--ds-2); font-size: var(--ds-fs-xs); color: var(--ds-text-3); }
.ds-item-note { font-size: var(--ds-fs-xs); color: var(--ds-text-2); }
.ds-item-why { font-size: var(--ds-fs-xs); color: var(--ds-accent-soft); }
.ds-item-actions { display: flex; gap: 0.25rem; align-items: center; flex-wrap: wrap; }
.ds-item.is-done .ds-item-title { text-decoration: line-through; color: var(--ds-text-3); }

/* ---------- מצב ריק ---------- */
.ds-empty { text-align: center; color: var(--ds-text-3); padding: var(--ds-5) var(--ds-2); font-size: var(--ds-fs-sm); }

/* ---------- מגירה (details) ---------- */
.ds-disclosure > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 0.4rem;
  min-height: var(--ds-tap); padding: 0 var(--ds-2);
  color: var(--ds-text-3); font-size: var(--ds-fs-xs); border-radius: var(--ds-r-sm);
}
.ds-disclosure > summary::-webkit-details-marker { display: none; }
.ds-disclosure > summary:hover { color: var(--ds-text); background: var(--ds-surface-2); }
.ds-disclosure[open] > summary { color: var(--ds-text); }
.ds-panel { margin-top: var(--ds-2); padding-top: var(--ds-2); border-top: 1px solid var(--ds-line); display: flex; flex-direction: column; gap: var(--ds-2); }

/* ---------- מובייל אמיתי ---------- */
@media (max-width: 720px) {
  body.ds main { padding: var(--ds-3) var(--ds-2) var(--ds-5); }
  body.ds .topbar { flex-wrap: wrap; gap: var(--ds-1); }
  body.ds nav { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
  body.ds nav a { white-space: nowrap; }
  body.ds .nav-search { width: 100%; }
  .ds-head h1 { font-size: var(--ds-fs-lg); }
  .ds-form-grid { grid-template-columns: 1fr; }
  .ds-item { flex-wrap: wrap; }
  .ds-item-actions { width: 100%; justify-content: flex-end; }
}

@media (prefers-reduced-motion: reduce) {
  body.ds *, body.ds *::before, body.ds *::after { animation: none !important; transition: none !important; }
}

/* ליטוש שורת העליון: הלוגו לא נשבר, הניווט נגלל בשורה אחת */
body.ds .logo { white-space: nowrap; flex: 0 0 auto; }
body.ds nav { flex-wrap: nowrap; }
body.ds .observe { flex: 0 0 auto; white-space: nowrap; }
body.ds .logo { min-height: var(--ds-tap); display: inline-flex; align-items: center; }
body.ds nav a { white-space: nowrap; }

/* ---------- דף הבית: ברכה, התראות, אריחים, גריד ---------- */
.ds-hero {
  border-radius: var(--ds-r-md); padding: var(--ds-4) var(--ds-3);
  background: linear-gradient(135deg, rgba(42, 127, 201, 0.22), rgba(74, 168, 232, 0.06) 60%, transparent);
  border: 1px solid var(--ds-line); margin-bottom: var(--ds-3);
  background-size: cover; background-position: center;
}
.ds-hero h1 { font-size: var(--ds-fs-xl); font-weight: 700; line-height: 1.2; }
.ds-hero p { color: var(--ds-text-2); font-size: var(--ds-fs-sm); margin-top: 0.35rem; }

.ds-alert {
  display: flex; flex-direction: column; gap: 0.4rem;
  background: #f2789a14; border: 1px solid #f2789a44;
  border-radius: var(--ds-r-md); padding: var(--ds-2) var(--ds-3);
  margin-bottom: var(--ds-3); font-size: var(--ds-fs-sm); color: var(--ds-text-2);
}
.ds-alert strong { color: var(--ds-text); }

.ds-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--ds-2); margin-bottom: var(--ds-3); }
.ds-tile {
  display: flex; flex-direction: column; gap: 0.15rem;
  background: var(--ds-surface); border: 1px solid var(--ds-line);
  border-radius: var(--ds-r-md); padding: var(--ds-2); text-decoration: none;
  min-height: 88px; justify-content: center; transition: border-color 0.15s ease;
}
a.ds-tile:hover { border-color: var(--ds-accent); }
.ds-tile-value { font-size: var(--ds-fs-lg); font-weight: 700; color: var(--ds-text); line-height: 1.1; }
.ds-tile-label { font-size: var(--ds-fs-xs); color: var(--ds-text-3); }
.ds-tile .ds-bar { margin-top: 0.4rem; height: 5px; }

.ds-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--ds-2); align-items: start; }
.ds-grid .ds-card + .ds-card { margin-top: 0; }
.ds-grid-wide { grid-column: 1 / -1; }

.ds-lines { list-style: none; display: flex; flex-direction: column; gap: 0.55rem; }
.ds-lines li { display: flex; align-items: baseline; gap: 0.5rem; font-size: var(--ds-fs-sm); color: var(--ds-text-2); }
.ds-lines strong { color: var(--ds-text); font-weight: 500; }
.ds-link { color: var(--ds-accent-soft); text-decoration: none; font-size: var(--ds-fs-xs); white-space: nowrap; }
.ds-link:hover { text-decoration: underline; }

@media (max-width: 720px) {
  .ds-tiles { grid-template-columns: repeat(2, 1fr); }
  .ds-hero { padding: var(--ds-3) var(--ds-2); }
}

/* ---------- כרטיס החזון בדף הבית ---------- */
.ds-quote { font-size: var(--ds-fs-md); line-height: 1.5; color: var(--ds-text); margin-bottom: var(--ds-2); }
.ds-quote .ds-hint { font-size: var(--ds-fs-xs); }
.ds-goals { display: flex; flex-direction: column; gap: var(--ds-2); }
.ds-goal-line { display: flex; justify-content: space-between; gap: var(--ds-2); font-size: var(--ds-fs-sm); margin-bottom: 0.3rem; }
.ds-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: var(--ds-2); }
.ds-card-foot { display: flex; justify-content: space-between; align-items: center; gap: var(--ds-2);
  flex-wrap: wrap; margin-top: var(--ds-2); padding-top: var(--ds-2); border-top: 1px solid var(--ds-line); }

/* כרטיס ההעצמה בתוך מערכת העיצוב */
body.ds .prac-count, body.ds .prac-sub { color: var(--ds-text-3); }
body.ds .prac-action { color: var(--ds-accent-soft); }
body.ds .prac-row.is-focus { background: var(--ds-accent-bg); box-shadow: inset 3px 0 0 var(--ds-accent); }
body.ds .prac-mark { width: 40px; height: 40px; flex-basis: 40px; font-size: 1.1rem; }
body.ds .prac-row { min-height: var(--ds-tap); }
body.ds .prac-action { display: inline-flex; align-items: center; min-height: var(--ds-tap); padding: 0 0.4rem; }
body.ds .prac-history .lawn-cell { background: rgba(148, 171, 199, 0.14); }
body.ds .prac-history .lawn-cell.lawn-full { background: linear-gradient(135deg, var(--ds-accent-deep), var(--ds-accent-soft)); box-shadow: none; }

/* ---------- יומן: טקסט ארוך, פריט-קישור, שורת פעולות בכותרת ---------- */
.ds-head-actions { display: flex; gap: var(--ds-1); align-items: center; flex-wrap: wrap; }
.ds-head-actions input[type="search"] { min-width: 180px; }
.ds-prose { font-size: var(--ds-fs-sm); line-height: 1.8; color: var(--ds-text-2); }
.ds-prose h1, .ds-prose h2, .ds-prose h3 { color: var(--ds-text); margin: var(--ds-2) 0 var(--ds-1); font-size: var(--ds-fs-md); }
.ds-prose p { margin-bottom: var(--ds-2); }
.ds-prose ul, .ds-prose ol { margin: 0 var(--ds-3) var(--ds-2) 0; }
.ds-prose a { color: var(--ds-accent-soft); }
.ds-pre { white-space: pre-line; }
.ds-audio { width: 100%; margin-top: var(--ds-2); }
a.ds-item--link { text-decoration: none; color: inherit; }
a.ds-item--link:hover { border-color: var(--ds-accent); }
.ds-flash { color: var(--ds-accent-soft); padding: var(--ds-2) var(--ds-3); }

/* ---------- ציר זמן ---------- */
.ds-timeline { list-style: none; position: relative; padding-inline-start: var(--ds-3); margin-top: var(--ds-2); }
.ds-timeline::before { content: ""; position: absolute; inset-inline-start: 5px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(180deg, var(--ds-accent), transparent); opacity: 0.5; }
.ds-tl-item { position: relative; margin-bottom: var(--ds-2); }
.ds-tl-dot { position: absolute; inset-inline-start: calc(-1 * var(--ds-3) + 1px); top: 22px;
  width: 10px; height: 10px; border-radius: 50%; background: var(--ds-accent); box-shadow: var(--ds-glow); }
a.ds-tag { text-decoration: none; }
a.ds-tag:hover { border-color: var(--ds-accent); color: var(--ds-accent-soft); }

/* ---------- לוח החזון ---------- */
.ds-goal-title { font-size: var(--ds-fs-md); font-weight: 600; margin-top: var(--ds-1); }
.ds-goal-line { display: flex; align-items: center; gap: var(--ds-2); }
.ds-goal-line .ds-bar { flex: 1; margin: 0; }
.ds-goal-pct { font-size: var(--ds-fs-xs); color: var(--ds-text-3); min-width: 2.6rem; text-align: left; }
.ds-card.is-paused { opacity: 0.62; }
.ds-btn--win:hover { background: var(--ds-gold); color: #2b1f04; border-color: transparent; }
.ds-card.ds-empty { text-align: center; }
.ds-suggestion { border-color: #4aa8e855; box-shadow: var(--ds-glow), var(--ds-shadow); }
.ds-bar--alert span { background: linear-gradient(90deg, #b8455f, #f2789a); }

/* ---------- עץ יוחסין במערכת העיצוב ---------- */
body.ds .person-node, body.ds .fnode {
  background: var(--ds-surface-2); border: 1px solid var(--ds-line);
  color: var(--ds-text); border-radius: var(--ds-r-sm); min-height: var(--ds-tap);
  display: inline-flex; flex-direction: column; justify-content: center;
  padding: 0.5rem 0.9rem; text-decoration: none; font-size: var(--ds-fs-xs);
}
body.ds .person-node:hover, body.ds .fnode:hover { border-color: var(--ds-accent); }
body.ds .person-node.focus { background: var(--ds-accent-bg); border-color: var(--ds-accent); box-shadow: var(--ds-glow); }
body.ds .person-card { display: flex; flex-direction: column; gap: 0.2rem; padding: var(--ds-2); text-decoration: none; }
body.ds .family-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--ds-1); }
body.ds .tree-connector { background: var(--ds-line); }
body.ds .ftree li::before, body.ds .ftree li::after,
body.ds .ftree ul::before { border-color: var(--ds-line) !important; }

/* ---------- עמוד ההתחברות ---------- */
body.ds.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: var(--ds-2); }
body.ds .login-card {
  background: var(--ds-surface); border: 1px solid var(--ds-line); border-radius: var(--ds-r-md);
  padding: var(--ds-4) var(--ds-3); box-shadow: var(--ds-shadow);
  width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: var(--ds-2);
}
body.ds .login-card h1 { font-size: var(--ds-fs-lg); text-align: center; background: none; -webkit-text-fill-color: var(--ds-text); color: var(--ds-text); }
body.ds .login-card .ds-hint { text-align: center; }
body.ds .login-card .error { color: var(--ds-danger); font-size: var(--ds-fs-xs); text-align: center; }

/* ---------- מפת עץ המשפחה (family-chart) ---------- */
.fmap-card { padding: 0.75rem; }
.fmap { height: 76vh; min-height: 420px; border-radius: var(--r-md, 12px);
        overflow: hidden; background: rgba(7, 20, 38, 0.55); touch-action: none; }
.f3 svg.main_svg { background: transparent !important; }
/* צבעי הכרטיסים — פלטת התכלת של האתר במקום ברירת המחדל */
.f3 .card-male .card-body-rect,
.f3 .card-male .text-overflow-mask { fill: #0b4a7a; }
.f3 .card-female .card-body-rect,
.f3 .card-female .text-overflow-mask { fill: #5b3a86; }
.f3 .card-genderless .card-body-rect,
.f3 .card-genderless .text-overflow-mask { fill: #33506e; }
.f3 div.card-male { background: linear-gradient(160deg, #0b4a7a, #0a3a61); }
.f3 div.card-female { background: linear-gradient(160deg, #5b3a86, #472f6b); }
.f3 div.card-genderless { background: #33506e; }
.f3 .card-main-outline { outline: 2px solid #38bdf8; outline-offset: 2px; border-radius: 8px; }
.f3 .card_cont_1 .card-inner, .f3 .card * { font-family: "Rubik", sans-serif; }
@media (max-width: 640px) { .fmap { height: 70vh; } }

/* תמונות בעץ המשפחה */
.person-photo { width: 72px; height: 72px; border-radius: 50%; object-fit: cover;
                display: block; margin: 0 auto 0.5rem; border: 2px solid rgba(56,189,248,.5); }
.pend-photo { width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
              vertical-align: middle; margin-inline-start: 0.25rem; }
