/* src/app/dan/committees.css — ועדות: העיצוב של דן, מועתק.
 * מקור: legacy/community/committees.html · legacy/community/committee-dashboard.html · legacy/community/committees-search.html
 * מסכים: src/app/screens/community-committees.js · src/app/screens/committee.js · src/app/screens/committee-members.js · src/app/screens/committee-meetings.js · src/app/screens/committee-decisions.js · src/app/screens/decisions-search.js — כל אחד עוטף את עצמו ב-`<div class="dan dan-committees dan-<מודול>">`.
 * הנוהל: docs/runbooks/dan-design-port.md · הפלטה (`--d-*`): src/app/dan/dan.css.
 *
 * 🔴 01.10 · גיל: "תעתיק גם את הלוגיקה והפונקציונליות בדף וגם את העיצוב של כל המסכים, פשוט העתקה ממקום למקום.
 *    שיהיה אחד לאחד בכל הדפים." ⟹ זה ה-<style> של שלושת הדפים, מועתק ולא מיובא (ADR 0025).
 *
 * ⚠️ מה שונה מהמקור, ולמה — שמונה דברים:
 *  ① **אין `:root` ואין `body`/`main`.** הפלטה ב-`dan.css` (תחומה ל-`.dan`, קידומת `--d-`); הרקע והריווח של העמוד הם של המעטפת
 *     (`.main__inner`), ו-`max-width:1180px` + ה-padding של `main` בדן — שלה.
 *  ② **קידומת `.dan-committees` לכל כלל.** שלושת הדפים של דן חולקים את רוב ה-CSS (`.topbar` · `.card` · `.tag` · `.dnum` · `table`),
 *     ולכן שישה מסכים נושאים מחלקה משותפת אחת (`dan-committees`, היחידה) לצד זו של המודול (`dan-<מודול>`) — העתק אחד של הכללים, לא שישה.
 *  ③ **שמות מקומיים למחלקות שהמעטפת מגדירה לא-תחומות** (docs/runbooks/dan-design-port.md): `.topbar`→`.ctop` · `.card`→`.ccard` ·
 *     `.empty`→`.cempty` · `.btn`→`.cbtn` · `.rows`→`.crows` · `.row`→`.crow` · `.tag`→`.ctag` · `.pill`→`.cpill`. אחרת `.topbar` של
 *     המעטפת הופך את הכותרת לפס לבן sticky, ו-`.row`/`.card` יורשים מסגרת וריווח שאינם של דן.
 *  ④ **צבע טקסט שנכשל ב-AA הוכהה:** `--dim` (#A3ACA5, ‏2.2:1) שימש בדן לטקסט (`.none` · `.empty` · `.num.zero` · `.tag.cancelled` · `.tag.super` ·
 *     `.person .x`) ⟹ `--d-faint`/`--d-muted` (כבר מוכהים ב-dan.css). `--d-dim` נשאר לקווים בלבד. ו-`a:hover` כתום ⟹ `--d-orange-ink`.
 *     🔴 סבב 2: `--muted` של דן (`.tag.done` · `.held` · `.type` · `.tally span` · `.att select`) **חזר** ל-`--d-muted` — בסבב 1 הוחלף ל-`--d-body` (כהה יותר) בלי תיעוד, אף שאין בו צורך:
 *     `--d-muted` (#5F6E66) על `#F1F0EA` הוא 4.71:1 (AA ≥ 4.5), ועל לבן/mint — 5.37 · 4.74.
 *  ⑤ **container query ולא media query** — רוחב התוכן תלוי במעטפת (סרגל פתוח/סגור), לא בחלון. `@media(max-width:820px)` של הטבלה
 *     ו-`@media(max-width:640px)` של הטפסים ⟹ `@container dcm`. `@media(max-width:900px){ main{…} aside{display:none} }` — של המעטפת.
 *  ⑥ **מחלקות מצב של דן נשמרות כמו שהן** (`.ctag.planned` · `.held` · `.open` · `.in_progress` · `.approved` · `.proposed` · `.force` ·
 *     `.super` …) — המסך פולט אותן מטבלה מקומית של קודי קטלוג, לעולם לא מערך שהגיע מהשרת.
 *  ⑦ 🔴 סבב 2 — **`line-height: normal`.** בדן ה-`body` ללא `line-height` (= normal); המעטפת קובעת `--lh-body: 1.6` על ה-`body` ו-`--lh-tight: 1.25` ל-`h1`/`h2` (`base.css`) — ולכן כל שורת טבלה
 *     · `.crow` · `.cardhead` · `.cbtn` יצאה גבוהה מדן (נמדד על `committees.html` מול המסך באותו תוכן: שורה 72px מול 78.1, `th` 39.5 מול 44.5, `.cname` 19.5 מול 25.6, `h1` 32.5 מול 33.75).
 *     ⟹ `normal` על המכל (מ-01.10 — `.dan` ב-dan.css, לכל המסכים) ועל שני הכותרים (כאן); כלל שמצהיר `line-height` במפורש (`.rsub` 1.55 · `.note` 1.6 · `.purpose` 1.5 · `.meta`) נשאר. ⚠️ **רכיבי kit שבתוך המכל** (דיאלוג · הודעת מצב)
 *     חוזרים ל-`--lh-body` — הם של המעטפת ולא של דן, ואינם אמורים להשתנות. `.cbtn.mini` נשאר ≥ 24px (WCAG 2.2 · 2.5.8): 12.5px × normal + 10 + 2.
 *  ⑧ 🔴 סבב 2 — **`.links`/`.lnk`** (שבבי הקישורים בין החלטות, committee-dashboard.html:93-96) ו-**`.dlink`** (המסמך — כפתור בצורת קישור: ההורדה עוברת ב-fetch ל-Blob, אין `href`);
 *     ו-`form.inline label.chk` (התיבה "להעביר ל-Y" — ה-`style` הפנימי של דן הפך למחלקה).
 */

.dan-committees {
  container: dcm / inline-size;
  display: flex; flex-direction: column; gap: 22px;
  color: var(--d-text);
  font-size: 16px;
  /* ⑦ line-height: normal — על `.dan` ב-dan.css (01.10) */
}
/* ⑦ — הכותרים: `base.css` קובע `--lh-tight` (1.25); בדן — normal. הדיאלוג וההודעה החיה (kit, בתוך המכל) — של המעטפת, חוזרים לשלה. */
.dan-committees .ctop h1, .dan-committees .cardhead h2 { line-height: normal; }
.dan-committees .kit-dialog, .dan-committees .kit-status { line-height: var(--lh-body); }
.dan-committees a { color: var(--d-green); text-decoration: none; }
.dan-committees a:hover { color: var(--d-orange-ink); }

/* ---------- כותרת ---------- */
.dan-committees .ctop { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.dan-committees .ctop--start { align-items: flex-start; }
.dan-committees h1 { font-size: 27px; font-weight: 600; color: var(--d-ink); letter-spacing: -.02em; margin: 0 0 5px; }
.dan-committees .ctop .meta { font-size: 15.5px; color: var(--d-muted); }
.dan-committees .ctop--start .meta { max-width: 64ch; line-height: 1.6; }

/* ---------- רשימת הוועדות (committees.html) ----------
   רשימת הוועדות היא רמה אחת מתחת ל"כל הוועדות" — אותה הזחה+קו מנחה שבהם יושבת רשימת הענפים תחת "כל הענפים". */
.dan-committees .tablewrap { background: #fff; border: 1px solid var(--d-line); border-radius: 18px; overflow-x: auto; box-shadow: var(--d-shadow); }
.dan-committees table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.dan-committees thead th { background: var(--d-cream2); color: var(--d-muted); font-weight: 600; font-size: 12.5px; text-align: right;
  padding: 12px 16px; border-bottom: 1px solid var(--d-line); white-space: nowrap; }
.dan-committees thead th.n { text-align: center; }
.dan-committees tbody td { padding: 14px 16px; border-bottom: 1px solid var(--d-line-soft); vertical-align: middle; }
.dan-committees tbody tr:last-child td { border-bottom: none; }
.dan-committees tbody tr:hover { background: #FCFAF3; }

.dan-committees .cname { font-size: 16px; font-weight: 600; color: var(--d-ink); display: inline-block; }
.dan-committees a.cname:hover { color: var(--d-orange-ink); }
/* המנדט יושב מתחת לשם ולא ב-tooltip: "מה הוועדה הזאת בכלל עושה" היא השאלה הראשונה שנשאלת עליה,
   ותשובה שדורשת ריחוף אינה תשובה. */
.dan-committees .purpose { display: block; font-size: 13px; color: var(--d-muted); line-height: 1.5; margin-top: 4px; max-width: 52ch; }
.dan-committees .cpill { font-size: 11.5px; font-weight: 600; border-radius: 999px; padding: 2px 9px; margin-inline-start: 8px;
  vertical-align: middle; white-space: nowrap; }
.dan-committees .cpill.mine { color: var(--d-green-dark); background: var(--d-mint); }
.dan-committees .cpill.chair { color: var(--d-orange-ink); background: var(--d-orange-soft); }
.dan-committees .who { color: var(--d-text); }
.dan-committees .none { color: var(--d-faint); }
.dan-committees td.n { text-align: center; white-space: nowrap; width: 118px; }
.dan-committees .num { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; color: var(--d-text); }
.dan-committees .num b { font-size: 17px; font-weight: 600; line-height: 1.1; }
.dan-committees .num.zero b { color: var(--d-faint); font-weight: 400; }
.dan-committees .num.warn b { color: var(--d-orange-ink); }
.dan-committees .wsub { font-size: 11.5px; color: var(--d-faint); }

.dan-committees .note { background: #fff; border-radius: 20px; padding: 26px 24px; box-shadow: var(--d-shadow);
  font-size: 15.5px; color: var(--d-muted); line-height: 1.6; }
.dan-committees .legend { font-size: 13px; color: var(--d-faint); line-height: 1.6; }

/* ---------- לוח הוועדה (committee-dashboard.html) ---------- */
.dan-committees .ccard { background: #fff; border: 1px solid var(--d-line); border-radius: 18px; box-shadow: var(--d-shadow); overflow: hidden; }
.dan-committees .cardhead { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 16px 20px; border-bottom: 1px solid var(--d-line-soft); background: var(--d-cream2); }
.dan-committees .cardhead h2 { margin: 0; font-size: 16px; font-weight: 600; color: var(--d-ink); }
.dan-committees .cardbody { padding: 6px 0; }
.dan-committees .cempty { padding: 22px 20px; color: var(--d-faint); font-size: 14.5px; }

.dan-committees .cbtn { font: inherit; font-size: 13.5px; font-weight: 500; border: 1px solid var(--d-line); background: #fff;
  color: var(--d-green-dark); border-radius: 10px; padding: 8px 14px; cursor: pointer; }
.dan-committees .cbtn:hover { border-color: var(--d-green-mid); color: var(--d-green); }
.dan-committees .cbtn.primary { background: var(--d-green); border-color: var(--d-green); color: #fff; }
.dan-committees .cbtn.primary:hover { background: var(--d-green-dark); color: #fff; }
.dan-committees .cbtn.mini { font-size: 12.5px; padding: 5px 10px; }
.dan-committees .cbtn:disabled { opacity: .55; cursor: not-allowed; }

.dan-committees .crows { display: flex; flex-direction: column; }
.dan-committees .crow { display: flex; align-items: flex-start; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--d-line-soft); }
.dan-committees .crow:last-child { border-bottom: none; }
.dan-committees .crow:hover { background: #FCFAF3; }
.dan-committees .crow .grow { flex: 1; min-width: 0; }
.dan-committees .rtitle { font-size: 15px; font-weight: 600; color: var(--d-ink); }
.dan-committees .rsub { font-size: 13px; color: var(--d-muted); margin-top: 3px; line-height: 1.55; white-space: pre-wrap; }
.dan-committees .rmeta { font-size: 12.5px; color: var(--d-faint); margin-top: 4px; }
.dan-committees .cardhead .rmeta { margin-top: 0; }
.dan-committees .when { font-size: 13.5px; color: var(--d-text); font-weight: 500; white-space: nowrap; min-width: 74px; }

.dan-committees .ctag { font-size: 11.5px; font-weight: 600; border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.dan-committees .ctag.open { color: var(--d-orange-ink); background: var(--d-orange-soft); }
.dan-committees .ctag.in_progress { color: var(--d-green-dark); background: var(--d-mint); }
.dan-committees .ctag.done { color: var(--d-muted); background: #F1F0EA; }
.dan-committees .ctag.cancelled { color: var(--d-muted); background: #F1F0EA; text-decoration: line-through; }
.dan-committees .ctag.planned { color: var(--d-green-dark); background: var(--d-mint); }
.dan-committees .ctag.held { color: var(--d-muted); background: #F1F0EA; }
.dan-committees .ctag.overdue { color: #9B2C2C; background: #FCEBEB; }
.dan-committees .ctag.chair { color: var(--d-orange-ink); background: var(--d-orange-soft); }

.dan-committees .people { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 20px; }
.dan-committees .person { display: flex; align-items: center; gap: 8px; border: 1px solid var(--d-line); border-radius: 999px;
  padding: 6px 12px; font-size: 14px; background: #fff; }

.dan-committees form.inline { display: flex; flex-wrap: wrap; gap: 10px; padding: 16px 20px; border-top: 1px solid var(--d-line-soft);
  background: #FDFCF8; }
.dan-committees form.inline label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--d-muted); }
.dan-committees form.inline input, .dan-committees form.inline textarea, .dan-committees form.inline select {
  font: inherit; font-size: 14px; border: 1px solid var(--d-line); border-radius: 10px; padding: 8px 10px;
  background: #fff; color: var(--d-text); min-width: 150px; }
.dan-committees form.inline textarea { min-width: 280px; min-height: 60px; resize: vertical; }
.dan-committees form.inline .wide { flex: 1; min-width: 260px; }
.dan-committees form.inline .actions { display: flex; align-items: flex-end; gap: 8px; }
.dan-committees form.inline label.chk { flex-direction: row; align-items: center; gap: 6px; }
.dan-committees form.inline label.chk input { min-width: 0; }
.dan-committees form.inline .cformerr { flex-basis: 100%; margin: 0; font-size: 13.5px; font-weight: 500; color: var(--d-orange-ink); }

/* שורת ההחלטה נושאת עכשיו מספר, סוג, שני תאריכים והצבעה — לכן גריד ולא flex יחיד. */
.dan-committees .dnum { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; color: var(--d-faint);
  background: var(--d-cream2); border: 1px solid var(--d-line); border-radius: 7px; padding: 2px 7px; white-space: nowrap; }
.dan-committees .dates { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12.5px; color: var(--d-faint); margin-top: 5px; }
.dan-committees .dates b { font-weight: 500; color: var(--d-muted); }
.dan-committees .tally { display: flex; gap: 6px; font-size: 12px; white-space: nowrap; }
.dan-committees .tally span { border-radius: 6px; padding: 2px 7px; background: #F1F0EA; color: var(--d-muted); }
.dan-committees .tally .f { background: var(--d-mint); color: var(--d-green-dark); }
.dan-committees .tally .a { background: #FCEBEB; color: #9B2C2C; }
.dan-committees .links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.dan-committees .lnk { font-size: 12px; color: var(--d-muted); background: #F7F6F1; border: 1px solid var(--d-line); border-radius: 7px; padding: 2px 8px; }
.dan-committees .lnk b { font-weight: 600; color: var(--d-faint); }
.dan-committees .doc { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; margin-top: 6px; color: var(--d-muted); }
/* ⑧ — "📄 שם-קובץ": כפתור בצורת קישור (דן: `<a>` ירוק, בלי קו תחתון). */
.dan-committees .dlink { font: inherit; border: none; background: none; padding: 0; cursor: pointer; color: var(--d-green); text-align: start; }
.dan-committees .dlink:hover { color: var(--d-orange-ink); }
.dan-committees .ctag.force { color: var(--d-green-dark); background: var(--d-mint); }
.dan-committees .ctag.super { color: var(--d-muted); background: #F1F0EA; }
.dan-committees .ctag.board { color: var(--d-orange-ink); background: var(--d-orange-soft); }
.dan-committees .ctag.proposed { color: var(--d-orange-ink); background: var(--d-orange-soft); }
.dan-committees .ctag.approved { color: var(--d-green-dark); background: var(--d-mint); }
.dan-committees .ctag.rejected { color: #9B2C2C; background: #FCEBEB; }
.dan-committees .ctag.withdrawn { color: var(--d-muted); background: #F1F0EA; }
.dan-committees .ctag.type { color: var(--d-muted); background: #F1F0EA; }
.dan-committees .att { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 20px; background: #FDFCF8; border-top: 1px solid var(--d-line-soft); }
.dan-committees .att label { display: flex; align-items: center; gap: 6px; font-size: 13.5px; border: 1px solid var(--d-line);
  border-radius: 999px; padding: 5px 10px; background: #fff; }
.dan-committees .att select { font: inherit; font-size: 12.5px; border: none; background: transparent; color: var(--d-muted); }
.dan-committees .quorum { font-size: 12.5px; }
.dan-committees .quorum.no { color: #9B2C2C; }
.dan-committees .quorum.yes { color: var(--d-green-dark); }

/* 🔴 מקומי לעגור (אין בדן) — נוכחות לפי חבר במסך "הרכב הוועדה": אותם `.crow`/`.rtitle`/`.rmeta` של דן, רק מונה ימני. */
.dan-committees .crow .attn { font-size: 12.5px; font-weight: 600; color: var(--d-green-dark); background: var(--d-mint);
  border-radius: 999px; padding: 2px 10px; white-space: nowrap; align-self: center; }
.dan-committees .crow .attn.low { color: var(--d-orange-ink); background: var(--d-orange-soft); }
/* הודעת מצב חיה (kit-status) בראש כל כרטיס — במקום `alert()` של דן: ליד הפעולה, ולא בראש עמוד שאולי גללו ממנו. מידות ה-kit; כאן רק הריווח. */
.dan-committees .ccard > .kit-status { margin: 0; padding: 10px 20px 0; }
.dan-committees .kit-status:empty { display: none; }

/* ---------- חיפוש החלטות (committees-search.html) ---------- */
.dan-committees .filters { background: #fff; border: 1px solid var(--d-line); border-radius: 18px; box-shadow: var(--d-shadow);
  padding: 16px 20px; display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.dan-committees .filters label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--d-muted); }
.dan-committees .filters input, .dan-committees .filters select { font: inherit; font-size: 14px; border: 1px solid var(--d-line);
  border-radius: 10px; padding: 8px 10px; background: #fff; color: var(--d-text); min-width: 140px; }
.dan-committees .filters .q { min-width: 260px; flex: 1; }
.dan-committees .filters label.chk { flex-direction: row; align-items: center; gap: 6px; }
/* 🔴 סבב 2 — בדף החיפוש של דן `.btn` הוא `padding: 9px 18px` (בלוח הוועדה — `8px 14px`); "חיפוש" ו"ניקוי" הם שני כפתורי הדף הזה. */
.dan-committees .filters .cbtn { padding: 9px 18px; }
.dan-committees .filters label.chk input { min-width: 0; }
.dan-committees .cstack { display: flex; flex-direction: column; gap: 22px; }
.dan-committees .res { display: flex; flex-direction: column; gap: 0; background: #fff; border: 1px solid var(--d-line);
  border-radius: 18px; overflow: hidden; }
/* ⚠️ בדן כל `.hit` נושא border משלו והפינות לפי `:first-child`/`:last-child`; כאן הסינון **מסתיר** שורות (לא מצייר מחדש), ושורה
   מוסתרת עדיין "ילד ראשון". ⟹ המכל נושא את המסגרת והפינות, והקו בין שורות הוא צל של 1px מעל השורה — נחתך במכל כשהיא הראשונה. */
.dan-committees .hit { background: #fff; padding: 15px 20px; display: block; color: inherit; box-shadow: 0 -1px 0 var(--d-line); }
.dan-committees .hit:hover { background: #FCFAF3; }
.dan-committees .hit .top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dan-committees .hit .t { font-size: 15.5px; font-weight: 600; color: var(--d-ink); }
.dan-committees .hit .sn { font-size: 13px; color: var(--d-muted); margin-top: 5px; line-height: 1.55; }
.dan-committees .hit .mt { font-size: 12.5px; color: var(--d-faint); margin-top: 6px; display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- שבירות ---------- */
@container dcm (max-width: 820px) {
  .dan-committees thead { display: none; }
  .dan-committees .tablewrap { border-radius: 16px; }
  .dan-committees tbody tr { display: block; border-bottom: 1px solid var(--d-line); padding: 6px 0; }
  .dan-committees tbody tr:last-child { border-bottom: none; }
  .dan-committees tbody td { display: flex; align-items: center; justify-content: space-between; gap: 14px;
    border: none; padding: 7px 16px; width: auto; }
  .dan-committees tbody td.n { width: auto; }
  .dan-committees tbody td[data-label]::before { content: attr(data-label); color: var(--d-faint); font-size: 12.5px; flex: none; }
  .dan-committees tbody td.name::before { content: none; }
  .dan-committees .num { align-items: flex-start; }
  .dan-committees .purpose { max-width: none; }
}
@container dcm (max-width: 640px) {
  .dan-committees .crow { flex-wrap: wrap; }
  /* ⚠️ `.grow{flex:1;min-width:0}` של דן שוכן באותה שורה עם התאריך, התגיות והכפתורים — ב-375 הוא מתכווץ לעמודה של מילה אחת (נמדד: שורת ישיבה
     נשברה לשבע שורות). בסיס `14rem`: הטקסט תמיד מקבל שורה משלו, וההשאר (תאריך · תגיות · כפתורים) עוטף מתחתיו. */
  .dan-committees .crow .grow { flex: 1 1 14rem; }
  .dan-committees form.inline input, .dan-committees form.inline textarea, .dan-committees form.inline select { min-width: 0; width: 100%; }
  .dan-committees form.inline label { width: 100%; }
  .dan-committees form.inline label.chk input { width: auto; }
  .dan-committees .filters .q { min-width: 0; flex-basis: 100%; }
  .dan-committees .filters input, .dan-committees .filters select { min-width: 0; width: 100%; }
  .dan-committees .filters label { flex: 1 1 140px; }
  .dan-committees .filters label.chk { flex: 0 0 auto; }
  .dan-committees .filters label.chk input { width: auto; }
}
