/* ============================================================
   חלוקת השיחות — שפת-עיצוב עצמאית.
   הועתקה מהפיילוט כמו שהיא, למעט הגופנים: שם הם הגיעו מ-next/font,
   וכאן הם נטענים כ-link ומוגדרים כטוקנים בשורש.
   ⛔ אין כאן ולו אסימון אחד של מוצר אחר. הטוקנים עומדים בפני עצמם,
   וכל זיווג טקסט/רקע נמדד מול WCAG AA (scripts/check-security.ts).
   ============================================================ */

:root {
  --sh-serif: "Frank Ruhl Libre", Georgia, "Times New Roman", serif;
  --sh-sans: "Assistant", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}

html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
*, *::before, *::after { box-sizing: border-box; }


.sichot-root {
  /* ── קלף ──────────────────────────────────────────── */
  --sh-paper: #F7F2E8;      /* קרקע: טיח חם */
  --sh-paper-2: #EFE7D7;    /* שקע */
  --sh-surface: #FFFDF8;    /* פני-כרטיס */

  /* ── דיו ──────────────────────────────────────────── */
  --sh-ink: #2B2116;        /* 14.13:1 על קלף — טקסט ראשי */
  --sh-text-2: #5A4A35;     /*  7.63:1 — טקסט משני */
  --sh-text-3: #6A5A44;     /*  5.96:1 — טקסט שלישוני, עדיין AA */

  /* ── כחול צפת ─────────────────────────────────────── */
  --sh-blue: #17618F;       /*  5.99:1 על קלף · 6.68:1 ללבן-עליו */
  --sh-blue-deep: #14537D;  /*  7.34:1 — ריחוף ומצב-לחוץ */
  --sh-blue-mark: #2E8BC0;  /*  3.38:1 — ⛔ סימון וקו בלבד, לעולם לא טקסט */
  --sh-blue-tint: #E4EEF6;

  /* ── פליז: מה שנתפס ───────────────────────────────── */
  --sh-brass: #7A5C18;      /*  5.58:1 על קלף */
  --sh-brass-tint: #F6EDD6;

  /* ── חֵמר: שגיאה ──────────────────────────────────── */
  --sh-clay: #8F3524;       /*  6.96:1 */
  --sh-clay-tint: #FBEBE6;

  /* ── קווים ────────────────────────────────────────── */
  --sh-line: #D8CDB8;       /* שערה דקורטיבית */
  --sh-line-strong: #C3B695;/* קו-הפרדה */

  --sh-gap: 14px;
  --sh-radius: 6px;         /* פינות כמעט-ישרות: דף, לא כרטיסיית-ממשק */

  background: var(--sh-paper);
  min-height: 100dvh;
  font-family: var(--sh-sans), system-ui, sans-serif;
  color: var(--sh-ink);
}

.sichot {
  max-width: 680px;
  margin: 0 auto;
  padding: 22px 16px 96px;
  color: var(--sh-ink);
}

/* ── שער-הדף: עמוד-שער של ספר, לא כותרת של דשבורד ───────── */

.sichot-head {
  background: var(--sh-surface);
  border: 1px solid var(--sh-line-strong);
  /* הקו הכפול הוא הסימן-ההיכר. הוא מצוטט מעמוד-שער, ולכן הוא דק
     ופנימי ולא מסגרת כבדה. */
  box-shadow: inset 0 0 0 4px var(--sh-surface), inset 0 0 0 5px var(--sh-line);
  border-radius: var(--sh-radius);
  padding: 26px 22px 20px;
  margin-bottom: var(--sh-gap);
  text-align: center;
}
.sichot-kicker {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--sh-text-2);
}
.sichot-parsha {
  font-family: var(--sh-serif), Georgia, serif;
  font-size: clamp(30px, 8.5vw, 42px);
  font-weight: 700;
  line-height: 1.12;
  margin: 10px 0 6px;
  color: var(--sh-ink);
}
.sichot-sub { font-size: 14px; color: var(--sh-text-2); }

/* המספר שהשאלה האמיתית נשענת עליו: כמה נשאר */
.sichot-stat {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 9px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 2px solid var(--sh-blue-mark);
}
.sichot-stat b {
  font-family: var(--sh-serif), Georgia, serif;
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
  color: var(--sh-blue);
}
.sichot-stat span { font-size: 14px; color: var(--sh-text-2); }
.sichot-stat.is-done b { color: var(--sh-brass); }

/* ── פסי-הודעה ───────────────────────────────────────────── */

.sichot-note {
  border-radius: var(--sh-radius);
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: var(--sh-gap);
  border: 1px solid var(--sh-line-strong);
  border-inline-start: 4px solid var(--sh-line-strong);
  background: var(--sh-surface);
  color: var(--sh-text-2);
}
.sichot-note strong { color: var(--sh-ink); }
.sichot-note.is-demo { background: var(--sh-brass-tint); border-color: var(--sh-brass); }
.sichot-note.is-error { background: var(--sh-clay-tint); border-color: var(--sh-clay); color: var(--sh-clay); }
.sichot-note.is-ok { background: var(--sh-blue-tint); border-color: var(--sh-blue); color: var(--sh-blue-deep); }

/* ── מי אני ──────────────────────────────────────────────── */

.sichot-who {
  background: var(--sh-surface);
  border: 1px solid var(--sh-line-strong);
  border-radius: var(--sh-radius);
  padding: 18px;
  margin-bottom: var(--sh-gap);
}
.sichot-who h2 {
  font-family: var(--sh-serif), Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--sh-ink);
}
.sichot-who p { font-size: 14px; color: var(--sh-text-2); margin: 0 0 14px; line-height: 1.6; }
.sichot-names { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.sichot-name-btn {
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--sh-radius);
  border: 1px solid var(--sh-line-strong);
  background: var(--sh-paper);
  color: var(--sh-ink);
  font: 600 15px var(--sh-sans), sans-serif;
  cursor: pointer;
}
.sichot-name-btn:hover { border-color: var(--sh-blue); color: var(--sh-blue-deep); }
.sichot-row { display: flex; gap: 8px; }
.sichot-row input {
  flex: 1;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: var(--sh-radius);
  border: 1px solid var(--sh-line-strong);
  background: var(--sh-paper);
  font: 400 16px var(--sh-sans), sans-serif; /* 16px — מונע זום ב-iOS */
  color: var(--sh-ink);
}
.sichot-row input::placeholder { color: var(--sh-text-3); }
.sichot-row input:focus-visible { outline: 2px solid var(--sh-blue); outline-offset: 1px; }

.sichot-me {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--sh-text-2);
  margin-bottom: var(--sh-gap);
  padding: 0 4px;
}
.sichot-me strong { color: var(--sh-ink); }

/* ── כרטיס "השיחה שלי" ───────────────────────────────────── */

.sichot-mine {
  background: var(--sh-brass-tint);
  border: 1px solid var(--sh-brass);
  border-inline-start: 5px solid var(--sh-brass);
  border-radius: var(--sh-radius);
  padding: 18px;
  margin-bottom: var(--sh-gap);
}
.sichot-mine .sichot-kicker { color: var(--sh-brass); }
.sichot-mine h2 {
  font-family: var(--sh-serif), Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  margin: 6px 0 12px;
  color: var(--sh-ink);
}

/* ── רשימת השיחות ────────────────────────────────────────── */

.sichot-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }

.sichot-item {
  background: var(--sh-surface);
  border: 1px solid var(--sh-line-strong);
  border-radius: var(--sh-radius);
  padding: 15px;
  display: grid;
  gap: 10px;
}
/* ⛔ "נתפסה" אינו נשען על צבע בלבד: הכרטיס גם דוהה, גם מקבל קו-שוליים,
   וגם נושא את שם הלוקח במילים. */
.sichot-item.is-taken { background: var(--sh-paper-2); border-inline-start: 5px solid var(--sh-line-strong); }
.sichot-item.is-mine { background: var(--sh-brass-tint); border-color: var(--sh-brass); border-inline-start: 5px solid var(--sh-brass); }

.sichot-title {
  font-family: var(--sh-serif), Georgia, serif;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--sh-ink);
}
.sichot-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.sichot-chip {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 3px;
  background: var(--sh-paper);
  color: var(--sh-text-2);
  border: 1px solid var(--sh-line);
}
.sichot-chip.is-free { background: var(--sh-blue-tint); color: var(--sh-blue-deep); border-color: var(--sh-blue); }
.sichot-chip.is-taken { background: var(--sh-surface); color: var(--sh-text-2); }

.sichot-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.sichot-btn {
  min-height: 44px;
  padding: 11px 22px;
  border-radius: var(--sh-radius);
  border: 1px solid transparent;
  font: 700 15px var(--sh-sans), sans-serif;
  cursor: pointer;
  background: var(--sh-blue);
  color: #fff;
}
.sichot-btn:hover { background: var(--sh-blue-deep); }
.sichot-btn:disabled { background: var(--sh-paper-2); color: var(--sh-text-3); border-color: var(--sh-line-strong); cursor: not-allowed; }
.sichot-btn.is-ghost { background: transparent; color: var(--sh-ink); border-color: var(--sh-line-strong); }
.sichot-btn.is-ghost:hover { background: var(--sh-paper); border-color: var(--sh-blue); color: var(--sh-blue-deep); }
.sichot-btn:focus-visible { outline: 2px solid var(--sh-blue); outline-offset: 2px; }

.sichot-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: var(--sh-radius);
  color: var(--sh-blue-deep);
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  border: 1px solid transparent;
}
.sichot-link:hover { background: var(--sh-surface); border-color: var(--sh-line-strong); }
.sichot-link:focus-visible { outline: 2px solid var(--sh-blue); outline-offset: 2px; }

.sichot-taken-by { font-size: 14px; color: var(--sh-text-2); }
.sichot-taken-by b { color: var(--sh-ink); }

/* ── מספר-השיחה ──────────────────────────────────────────── */
/* מקשר בין המסך, דף-ההדפסה ומה שאומרים בקבוצה ("לקחתי את 3"). */
.sichot-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  margin-inline-end: 9px;
  border-radius: 50%;
  border: 1px solid var(--sh-line-strong);
  background: var(--sh-paper);
  color: var(--sh-text-2);
  font-family: var(--sh-sans), sans-serif;
  font-size: 13px;
  font-weight: 700;
  vertical-align: middle;
}
.sichot-item.is-mine .sichot-num { border-color: var(--sh-brass); color: var(--sh-brass); }

/* ── סינון "רק הפנויות" ──────────────────────────────────── */
/* קישורים ולא כפתורי-JS: עובד גם בלי סקריפט, וניתן לשיתוף. */
.sichot-filter {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  padding: 0 2px;
}
.sichot-filter .sichot-chip {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  font-size: 14px;
  text-decoration: none;
  border-radius: var(--sh-radius);
  color: var(--sh-text-2);
}
.sichot-filter .sichot-chip.is-on {
  background: var(--sh-ink);
  color: var(--sh-paper);
  border-color: var(--sh-ink);
}
.sichot-filter .sichot-chip:focus-visible { outline: 2px solid var(--sh-blue); outline-offset: 2px; }

/* כפתור בזמן-המתנה: אומר שהלחיצה נקלטה, כדי שלא ילחצו שוב */
.sichot-btn[data-pending], .sichot-name-btn[data-pending] { opacity: 0.7; cursor: progress; }

/* פס-הודעה ממוקד אחרי פעולה — בלי טבעת כפולה מסביב לטקסט ארוך */
.sichot-note:focus { outline: 2px solid var(--sh-blue); outline-offset: 2px; }
.sichot-note:focus:not(:focus-visible) { outline: none; }

/* ── פקדי-ניהול ──────────────────────────────────────────── */
.sichot-select,
.sichot-input {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: var(--sh-radius);
  border: 1px solid var(--sh-line-strong);
  background: var(--sh-paper);
  font: 400 16px var(--sh-sans), sans-serif;
  color: var(--sh-ink);
}
.sichot-select:focus-visible,
.sichot-input:focus-visible { outline: 2px solid var(--sh-blue); outline-offset: 1px; }

.sichot-check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid var(--sh-line-strong);
  border-radius: var(--sh-radius);
  background: var(--sh-paper);
  font-size: 14px;
  line-height: 1.6;
  color: var(--sh-text-2);
  cursor: pointer;
}
.sichot-check input { inline-size: 22px; block-size: 22px; margin-top: 2px; accent-color: var(--sh-blue); }
.sichot-check strong { color: var(--sh-ink); font-size: 15px; }

.sichot-manager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.sichot-manager em { font-style: normal; color: var(--sh-text-3); font-size: 13px; }

.sichot-token {
  display: inline-block;
  margin: 6px 0;
  padding: 8px 10px;
  background: var(--sh-surface);
  border: 1px solid var(--sh-blue);
  border-radius: 4px;
  font-family: var(--font-mono), monospace;
  font-size: 12px;
  word-break: break-all;
  direction: ltr;
  text-align: left;
  color: var(--sh-ink);
}

/* ── סיכום השנה ──────────────────────────────────────────── */
/* רישום, לא תחרות: בלי מדליות, בלי פודיום, פס-אורך שקט בלבד. */
.sichot-year {
  width: 100%;
  border-collapse: collapse;
  background: var(--sh-surface);
  border: 1px solid var(--sh-line-strong);
  border-radius: var(--sh-radius);
  overflow: hidden;
}
.sichot-year th {
  text-align: right;
  font-size: 13px;
  font-weight: 700;
  color: var(--sh-text-2);
  padding: 10px 14px;
  border-bottom: 1px solid var(--sh-line-strong);
  background: var(--sh-paper);
}
.sichot-year td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--sh-line);
  font-size: 16px;
}
.sichot-year tbody tr:last-child td { border-bottom: 0; }
.sichot-year td.mono-count {
  width: 46%;
  font-weight: 700;
  color: var(--sh-ink);
  position: relative;
  white-space: nowrap;
}
.sichot-bar {
  display: block;
  height: 6px;
  margin-top: 6px;
  border-radius: 3px;
  background: var(--sh-blue-mark);
  min-inline-size: 0;
}

progress.sichot-bar { width: 100%; border: 0; appearance: none; background: var(--sh-paper-2); }
progress.sichot-bar::-webkit-progress-bar { background: var(--sh-paper-2); border-radius: 3px; }
progress.sichot-bar::-webkit-progress-value { background: var(--sh-blue-mark); border-radius: 3px; }
progress.sichot-bar::-moz-progress-bar { background: var(--sh-blue-mark); border-radius: 3px; }
.sichot-row-spaced { margin-top: 12px; }
.sichot-inline { display: inline; }
.sichot-print-tools { padding-bottom: 0; }
.sichot-print-tools .sichot-foot { margin-top: 0; border-top: 0; }

/* טקסט לקוראי-מסך בלבד */
.sr-only {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ── תחתית ───────────────────────────────────────────────── */

.sichot-foot {
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid var(--sh-line-strong);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.sichot-empty {
  background: var(--sh-surface);
  border: 1px dashed var(--sh-line-strong);
  border-radius: var(--sh-radius);
  padding: 30px 20px;
  text-align: center;
  color: var(--sh-text-2);
  font-size: 15px;
  line-height: 1.7;
}

/* ── ניהול ───────────────────────────────────────────────── */

.sichot-admin textarea {
  width: 100%;
  min-height: 190px;
  padding: 12px 14px;
  border-radius: var(--sh-radius);
  border: 1px solid var(--sh-line-strong);
  background: var(--sh-paper);
  font: 400 15px/1.8 var(--sh-sans), sans-serif;
  color: var(--sh-ink);
  resize: vertical;
}
.sichot-admin textarea:focus-visible { outline: 2px solid var(--sh-blue); outline-offset: 1px; }
.sichot-admin label {
  display: block;
  font-family: var(--sh-serif), Georgia, serif;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--sh-ink);
}
.sichot-admin .sichot-who { display: grid; gap: 16px; }
.sichot-preview { display: grid; gap: 6px; margin: 4px 0 0; padding: 0; list-style: none; }
.sichot-preview li {
  font-size: 14px;
  padding: 9px 12px;
  background: var(--sh-paper);
  border-radius: 3px;
  border: 1px solid var(--sh-line);
  color: var(--sh-text-2);
}
.sichot-pre {
  white-space: pre-wrap;
  background: var(--sh-paper);
  border: 1px solid var(--sh-line-strong);
  border-radius: var(--sh-radius);
  padding: 14px;
  margin: 0;
  font: 400 15px/1.8 var(--sh-sans), sans-serif;
  color: var(--sh-ink);
}

/* ============================================================
   דף ההדפסה — A4 בצבע
   ------------------------------------------------------------
   המדפסת של בית-הכנסת צבעונית (הבעלים, 20.9), ולכן הדף משתמש בצבע
   כדי **לדרג מידע**, לא כדי להתקשט: כותרת על רקע דיו, שורות פנויות
   בכחול-צפת, ופסי-קלף שמפרידים בין השורות.

   ⛔ הצבע מוסיף, ולא נושא לבדו: "פנויה" כתוב גם במילים ובקו-מילוי.
   דף שיצא בטעות בשחור-לבן נשאר קריא במלואו.
   ============================================================ */

.sheet {
  max-width: 190mm;
  margin: 0 auto;
  padding: 14mm 12mm;
  background: #fff;
  color: var(--sh-ink);
  font-family: var(--sh-sans), system-ui, sans-serif;
}

.sheet-head {
  text-align: center;
  background: var(--sh-ink);
  color: var(--sh-paper);
  border-radius: 4px;
  padding: 14px 16px 16px;
  margin-bottom: 4mm;
}
.sheet-community { font-size: 12pt; letter-spacing: 0.08em; opacity: 0.85; }
.sheet-title {
  font-family: var(--sh-serif), Georgia, serif;
  font-size: 26pt;
  font-weight: 700;
  margin: 4px 0 6px;
  color: #fff;
}
.sheet-sub {
  font-size: 10.5pt;
  display: inline-block;
  padding: 3px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.sheet-table { width: 100%; border-collapse: collapse; font-size: 11pt; }
.sheet-table th {
  background: var(--sh-blue);
  color: #fff;
  font-weight: 700;
  font-size: 10pt;
  letter-spacing: 0.05em;
  padding: 8px 10px;
  text-align: right;
  border: 1px solid var(--sh-blue);
}
.sheet-table td {
  padding: 9px 10px;
  text-align: right;
  vertical-align: middle;
  border: 1px solid var(--sh-line-strong);
}
/* פס-קלף בשורות זוגיות: מוביל את העין לרוחב הדף בלי קווים כבדים */
.sheet-table tbody tr:nth-child(even) td { background: var(--sh-paper); }

.sheet-table td.num {
  width: 9mm;
  text-align: center;
  font-weight: 800;
  color: var(--sh-blue);
  font-size: 12pt;
}
.sheet-table td.sicha { font-family: var(--sh-serif), Georgia, serif; font-size: 12.5pt; }
.sheet-table td.who { width: 54mm; font-weight: 600; }

/* שורה שנלקחה: הלומד בפליז, והשורה כולה רגועה */
.sheet-row-taken td.who { color: var(--sh-brass); }
/* שורה פנויה: כחול + המילה "פנויה" + קו למילוי ביד. שלושה סימנים. */
.sheet-row-free td { background: var(--sh-blue-tint) !important; }
.sheet-free {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--sh-blue);
  font-weight: 700;
  font-size: 10pt;
}
.sheet-free::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--sh-blue);
  opacity: 0.55;
}

.sheet-foot {
  margin-top: 4mm;
  padding-top: 3mm;
  border-top: 2px solid var(--sh-blue-mark);
  font-size: 9.5pt;
  color: var(--sh-text-2);
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.sheet-foot strong { color: var(--sh-ink); }

@media print {
  @page { size: A4 portrait; margin: 10mm; }
  html, body, .sichot-root { background: #fff !important; }
  .no-print { display: none !important; }
  /* רכיבים גלובליים שאין להם מה לעשות על דף שנתלה על הלוח */
  .a11y-fab, .a11y-panel, .a11y-backdrop, .skip-link { display: none !important; }
  .sheet { padding: 0; max-width: none; }
  .sheet-table { page-break-inside: auto; }
  .sheet-table tr { page-break-inside: avoid; }
  .sheet-head, .sheet-table th, .sheet-row-free td, .sheet-table tbody tr:nth-child(even) td {
    /* בלי זה הדפדפן מפשיט את רקעי-הצבע בהדפסה, והדירוג נעלם */
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* ── 390px: מסך-הייחוס לבדיקות-המובייל ───────────────────── */
@media (max-width: 420px) {
  .sichot { padding: 16px 12px 88px; }
  .sichot-head { padding: 22px 16px 18px; }
  .sichot-actions .sichot-btn { flex: 1 1 auto; }
}
/* ── כמה שיחות ללומד אחד, ושיוך בידי הגבאי ───────────────── */
/* נוסף אחרי שהתברר שבפועל לוקחים 2–3 שיחות, ולא אחת. */

.sichot-mine-row + .sichot-mine-row {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--sh-brass);
}
.sichot-mine-row h2 { margin: 0 0 8px; }
.sichot-mine-more {
  margin: 14px 0 0;
  font-size: 14px;
  color: var(--sh-text-2);
}

.sichot-topics {
  display: grid;
  gap: 8px;
  margin: 0 0 var(--sh-gap);
  padding: 0;
  border: 0;
}
.sichot-topics legend {
  padding: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--sh-ink);
}
.sichot-topics .sichot-check { padding: 10px 12px; }
.sichot-topics em { font-style: normal; color: var(--sh-text-3); font-size: 13px; }

.sichot-assign {
  display: grid;
  gap: 8px;
  padding: 12px;
}
.sichot-assign .sichot-row { flex-wrap: wrap; }
.sichot-assign .sichot-row select,
.sichot-assign .sichot-row input { flex: 1 1 140px; min-inline-size: 0; }
.sichot-inline-form { display: inline-block; }


/* Community identity, drawn from the supplied copper logo and letterhead. */
.sichot-root {
  --sh-paper: #F8F5F0;
  --sh-paper-2: #F0E9E1;
  --sh-surface: #FFFFFF;
  --sh-ink: #472A19;
  --sh-text-2: #655448;
  --sh-text-3: #756355;
  --sh-blue: #824B2B;
  --sh-blue-deep: #62361F;
  --sh-blue-mark: #A97652;
  --sh-blue-tint: #F5EBDF;
  --sh-brass: #326147;
  --sh-brass-tint: #EDF5EE;
  --sh-line: #E5D9CC;
  --sh-line-strong: #D2BCA5;
  --sh-radius: 14px;
}
.sichot { max-width: 880px; padding-top: 16px; }
.community-nav { display:flex; justify-content:center; flex-wrap:wrap; gap:6px 22px; padding:10px 0 18px; font-size:15px; }
.community-nav a { color:var(--sh-text-2); text-decoration:none; padding:6px 0; border-bottom:1px solid transparent; }
.community-nav a:hover { color:var(--sh-blue); border-color:var(--sh-blue); }
.sichot-head { border:0; box-shadow:none; background:transparent; padding:12px 20px 24px; }
.community-logo { display:block; object-fit:contain; width:150px; height:auto; margin:0 auto 14px; mix-blend-mode:multiply; }
.sichot-kicker { letter-spacing:0; }
.sichot-parsha { font-size:clamp(28px,6vw,40px); line-height:1.22; margin:8px 0; }
.sichot-stat { display:grid; grid-template-columns:repeat(3,1fr); gap:0; border:1px solid var(--sh-line); background:#fff; border-radius:14px; padding:16px 8px; max-width:560px; margin:24px auto 0; }
.sichot-stat>div { display:grid; gap:2px; text-align:center; }
.sichot-stat>div+div { border-inline-start:1px solid var(--sh-line); }
.sichot-stat b { color:var(--sh-blue-deep); font-family:var(--sh-sans); font-size:30px; line-height:1.1; }
.sichot-stat span { font-size:14px; }
.sichot-who { border-color:var(--sh-line); padding:22px; }
.sichot-btn { border-radius:9px; min-height:44px; padding:10px 18px; }
.sichot-row input,.sichot-input,.sichot-select,textarea { border-radius:8px; min-height:44px; }
.returning-login { background:var(--sh-paper); padding:12px 16px; border-radius:8px; margin:14px 0; }
summary { cursor:pointer; font-weight:700; }
.returning-login .sichot-row { margin-top:12px; }
.join-label { font-weight:600; }
.board-filters { display:flex; gap:8px; flex-wrap:wrap; margin:24px 0 12px; }
.board-filters a { display:flex; align-items:center; gap:8px; border:1px solid var(--sh-line); background:#fff; border-radius:999px; padding:9px 15px; color:var(--sh-text-2); text-decoration:none; font-size:15px; }
.board-filters a[aria-current] { background:var(--sh-blue-deep); border-color:var(--sh-blue-deep); color:#fff; }
.board-filters span { font-size:13px; opacity:.9; }
.sichot-list { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; scroll-margin-top:16px; }
.talk-group { grid-column:1/-1; padding:8px 2px 0; }
.talk-group h2 { font-size:20px; margin:8px 0; }
.sichot-item { border:1px solid var(--sh-line); padding:18px; gap:8px; align-content:start; }
.sichot-title { margin:0; font-size:23px; }
.talk-detail { margin:0; color:var(--sh-text-2); font-size:15px; line-height:1.5; }
.sichot-item .sichot-actions { margin-top:4px; justify-content:space-between; }
.sichot-item.is-taken { border-inline-start:4px solid #A39586; background:#F0EDE8; }
.sichot-item.is-mine { border-inline-start:4px solid #326147; background:#EDF5EE; }
.sichot-chip.is-free { color:#356247; background:#EDF5EE; border-color:#BAD0BE; }
.sichot-taken-by { font-size:15px; }
#identity { scroll-margin-top:20px; }
.admin-details { background:#fff; border:1px solid var(--sh-line); border-radius:12px; margin:14px 0; }
.admin-details>summary { padding:18px 22px; }
.admin-details>.sichot-who { border:0; margin:0; }
.sichot-admin .community-logo { width:110px; }
.sichot-admin textarea { min-height:250px; }
.sheet { width:210mm; max-width:100%; margin:20px auto; padding:12mm 15mm; background:#fff; color:#472A19; }
.sheet-head { position:relative; background:transparent; color:#472A19; border:0; text-align:center; padding:0 0 5mm; }
.sheet-head .community-logo { width:31mm; margin-bottom:2mm; }
.sheet-bh { position:absolute; inset-inline-start:0; top:0; font-size:10pt; }
.sheet-community { color:#655448; font-size:9pt; letter-spacing:0; }
.sheet-kicker { font-size:11pt; color:#824B2B; margin-top:3mm; font-weight:700; }
.sheet-title { font-size:23pt; line-height:1.15; color:#472A19; margin:1mm 0 2mm; }
.sheet-sub { background:transparent; color:#655448; font-size:9pt; padding:0; }
.sheet-table { font-size:10pt; table-layout:fixed; border:1px solid #BDA38B; }
.sheet-table th { background:#E8DAC8; color:#472A19; padding:2mm; border:1px solid #BDA38B; font-size:11pt; }
.sheet-table td { padding:1.6mm 2.5mm; border:1px solid #D7C7B7; vertical-align:middle; background:#fff !important; }
.sheet-table td.sicha { font-size:11pt; line-height:1.2; width:62%; }
.sheet-table td.who { width:38%; font-size:10pt; text-align:center; }
.sheet-detail { display:block; font-family:var(--sh-sans); font-size:8.5pt; font-weight:400; color:#655448; margin-top:.4mm; }
.sheet-group th { background:#F6F0E8; color:#824B2B; font-size:10pt; padding:1.4mm; text-align:right; }
.sheet-free { color:#B8A38F; font-size:9pt; }
.sheet-free::after { content:none; }
.sheet-foot { font-size:8pt; border-top:0; padding-top:3mm; }
.sheet-brand-foot { border-top:1px solid #A97652; margin-top:4mm; padding-top:2mm; text-align:center; font-size:9pt; color:#824B2B; font-weight:700; }
.sheet-brand-foot span { font-size:8pt; font-weight:400; }
@media(max-width:600px) {
  .sichot-list { grid-template-columns:1fr; }
  .community-logo { width:125px; }
  .sichot { padding:10px 14px 50px; }
  .sichot-head { padding:8px 0 18px; }
  .sichot-who { padding:18px; }
  .board-filters { gap:6px; }
  .board-filters a { padding:8px 11px; font-size:14px; }
  .community-nav { gap:16px; font-size:14px; }
  .sichot-stat { margin-top:18px; }
  .sichot-stat span { font-size:12px; }
}
@media print {
  @page { size:A4 portrait; margin:9mm 12mm; }
  .sheet { width:auto; max-width:none; margin:0; padding:0; }
  .sheet-head .community-logo { width:26mm; }
  .sheet-table td { padding:1.1mm 2mm; }
  .sheet-table td.sicha { font-size:10pt; }
  .sheet-detail { font-size:8pt; }
  .sheet-table thead { display:table-header-group; }
  .sheet-group { break-after:avoid; }
  .sheet-brand-foot,.sheet-foot { break-inside:avoid; }
}
.community-purpose { margin:4px 0 12px; font-size:15px; color:var(--sh-text-2); }
.sichot-stat:not(:has(>div)) { display:flex; justify-content:center; gap:12px; }
@media(max-width:600px) {
  .community-logo { width:104px; margin-bottom:10px; }
  .community-purpose { font-size:14px; margin-bottom:8px; }
  .sichot-parsha { font-size:28px; }
  .sichot-stat { padding:12px 6px; margin-top:14px; }
  .sichot-stat b { font-size:26px; }
}
@media print {
  .sheet-detail { display:inline; margin-inline-start:2mm; font-size:7.5pt; }
  .sheet-head { padding-bottom:3mm; }
  .sheet-table td { padding:1.2mm 2mm; }
}
.board-refresh { font-size:13px; color:var(--sh-text-2); margin:0 2px 14px; }
