/* אזור הלמידה של ScaleAbili. נבנה לפי מותג 3.5.0 */
:root {
  --brand: #6B3FF0;
  --brand-mid: #5B2FE0;
  --brand-deep: #2E1180;
  --brand-light: #8B6BFF;
  --band: #F0EBFF;
  --action: #F0530A;
  --action-deep: #D4340A;
  --ink: #0B2530;
  --ink-soft: #456672;
  --pain: #C00000;
  --ground: #FFFFFF;
  --shadow-md: 0 6px 28px rgba(20, 19, 28, .07);
  --shadow-lg: 0 18px 56px rgba(20, 19, 28, .10);
  --glow: 0 0 18px 2px rgba(107, 63, 240, .45), 0 0 6px 1px rgba(107, 63, 240, .35);
  --course-bg: #FFFFFF;
  --course-ink: #0B2530;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Assistant", "Heebo", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--ground);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.25; margin: 0; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ---------- פס עליון ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px clamp(16px, 3vw, 32px);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 22px rgba(20, 19, 28, .06);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--brand-deep); font-weight: 800; font-size: 18px; }
.brand img { height: 24px; width: auto; }
.topnav { display: flex; align-items: center; gap: 18px; font-size: 16px; }
.topnav a { text-decoration: none; font-weight: 700; }
.topnav .who { color: var(--ink-soft); }
.topnav form { margin: 0; }
.linkish { font: inherit; background: none; border: 0; padding: 0; color: var(--brand); cursor: pointer; font-weight: 700; }

/* ---------- עמוד ---------- */
.page { max-width: 1180px; margin-inline: auto; padding: 40px clamp(16px, 3vw, 32px) 96px; }
.page.narrow { max-width: 640px; }
.page-title { font-size: clamp(30px, 4vw, 44px); font-weight: 800; color: var(--brand-deep); margin-bottom: 28px; }
.page-title.has-sub { margin-bottom: 4px; }
.page-sub { margin: 0 0 28px; font-size: 20px; font-weight: 700; color: var(--brand); }
.empty { color: var(--ink-soft); font-size: 19px; }
.notice { background: var(--band); border-radius: 22px; padding: 32px; text-align: center; }
.notice h1 { font-size: 26px; color: var(--brand-deep); margin-bottom: 10px; }

/* ---------- טפסים וכפתורים ---------- */
.stack { display: grid; gap: 16px; }
label { display: grid; gap: 6px; font-weight: 700; font-size: 16px; color: var(--ink); }
input[type=text], input[type=search], input[type=email], input[type=password], input[type=number], input[type=url], input[type=tel],
input[type=date], select, textarea {
  font: inherit; font-weight: 400; color: var(--ink);
  width: 100%; padding: 12px 14px;
  background: #fff; border: 1.5px solid #DCD6EE; border-radius: 12px;
  outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(107, 63, 240, .14); }
textarea { min-height: 120px; resize: vertical; }
.btn-action {
  font: inherit; font-weight: 800; font-size: 18px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border: 0; border-radius: 100px; cursor: pointer;
  color: #fff; background: linear-gradient(180deg, var(--action), var(--action-deep));
  box-shadow: 0 10px 26px rgba(240, 83, 10, .28);
  text-decoration: none;
}
.btn-action:hover { filter: brightness(1.05); }
.btn-quiet {
  font: inherit; font-weight: 700; font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border-radius: 100px; cursor: pointer; text-decoration: none;
  color: var(--brand); background: transparent; border: 1.5px solid var(--brand);
}
.btn-quiet:hover { background: var(--band); }
.form-error { background: #FDECEC; color: var(--pain); border-radius: 12px; padding: 10px 14px; margin: 0 0 12px; font-weight: 700; }
.form-ok { background: var(--band); color: var(--brand-deep); border-radius: 12px; padding: 12px 16px; margin: 0 0 16px; font-weight: 700; }

/* ---------- כניסה ---------- */
.page-login { background: var(--band); min-height: 100vh; position: relative; overflow-x: hidden; }
.page-login::before {
  content: ""; position: fixed; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(107, 63, 240, .13) 1.4px, transparent 1.4px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
}
.login-wrap { position: relative; min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: min(440px, 100%); background: #fff; border-radius: 26px; padding: 36px 32px; box-shadow: var(--shadow-lg); }
.login-logo { height: 40px; width: auto; margin: 0 auto 18px; }
.login-card h1 { font-size: 30px; font-weight: 800; color: var(--brand-deep); text-align: center; }
.login-card .lede { text-align: center; color: var(--ink-soft); margin: 8px 0 22px; }
.login-card .btn-action { width: 100%; margin-top: 6px; }

/* ---------- המסך הראשי: כרטיסי קורסים ---------- */
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); grid-auto-rows: 1fr; gap: 28px; }
.course-card {
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  background: #fff; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-md);
  transition: transform .25s, box-shadow .25s;
}
.course-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.course-img { aspect-ratio: 16 / 9; background: var(--band); overflow: hidden; }
.course-img img, .course-img video { width: 100%; height: 100%; object-fit: cover; display: block; }
.course-img-empty {
  width: 100%; height: 100%; display: grid; place-items: center; padding: 20px; text-align: center;
  background: linear-gradient(150deg, var(--brand-light), var(--brand-deep));
  color: #fff; font-weight: 800; font-size: 24px; line-height: 1.3;
}
/* כמו בסקולר: כל הכרטיסים באותו גובה, ופס ההתקדמות בתחתית, ולכן באותו גובה גם כשהתיאור ארוך */
.course-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.course-body h2 { font-size: 21px; font-weight: 800; color: var(--brand-deep); }
.course-body p { margin: 0; color: var(--ink-soft); font-size: 16px; }
.progress { display: grid; gap: 6px; margin-top: auto; padding-top: 6px; }
.progress-bar { height: 8px; background: var(--band); border-radius: 100px; overflow: hidden; }
.progress-bar span { display: block; height: 100%; background: var(--brand); border-radius: 100px; }
.progress-num { font-size: 14px; color: var(--ink-soft); }

/* ---------- מסך השיעור ---------- */
.lesson-page { background: var(--course-bg); color: var(--course-ink); }
.lesson-page .topbar { position: static; }
/* שם הקורס וההתקדמות בראש הרשימה שבצד (לירון, 27.9.2026: במקום שורה נפרדת מעל השיעור) */
.side-course { display: grid; grid-template-columns: 34px 1fr; align-items: start; gap: 10px; padding: 2px 4px 16px; }
.side-course .back { text-decoration: none; font-size: 20px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--band); }
.side-course-text { display: grid; gap: 6px; min-width: 0; }
.side-course-title { color: var(--brand-deep); font-size: 18px; font-weight: 800; line-height: 1.3; }
.side-course-progress { font-size: 14px; color: var(--ink-soft); background: var(--band); border-radius: 100px; padding: 2px 12px; width: fit-content; }
.outline-jump { display: none; }

.lesson-layout { display: grid; grid-template-columns: minmax(280px, 360px) 1fr; gap: 0; min-height: calc(100vh - 120px); }
.lesson-side { background: #fff; padding: 20px 14px 40px; box-shadow: -6px 0 28px rgba(20, 19, 28, .04); scroll-margin-top: 12px; }
.side-chapter { margin-bottom: 8px; }
.side-ch-head {
  width: 100%; display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 8px;
  font: inherit; text-align: start; cursor: pointer; border: 0; border-radius: 14px;
  padding: 12px 12px; background: var(--brand-deep); color: #fff;
  box-shadow: 0 8px 22px rgba(46, 17, 128, .22);
}
.side-ch-head:hover { background: #3A1A99; }
.side-ch-head .chev { width: 20px; height: 20px; color: #C9B8FF; transition: transform .2s; transform: rotate(90deg); }
.side-ch-head[aria-expanded="true"] .chev { transform: none; }
.side-ch-title { font-weight: 800; font-size: 16px; line-height: 1.35; }
.side-ch-end { display: inline-flex; align-items: center; gap: 6px; }
.ch-check { display: none; width: 22px; height: 22px; border-radius: 50%; background: #16A34A; place-items: center; }
.ch-check svg { width: 15px; height: 15px; }
.side-ch-head.complete .ch-check { display: grid; }
.side-ch-count { font-size: 13px; font-weight: 700; color: #fff; background: rgba(255, 255, 255, .16); border-radius: 100px; padding: 2px 9px; font-variant-numeric: tabular-nums; }
/* השיעורים שתחת הפרק: בהירים, ומוזחים מעט פנימה כדי שייראו שייכים לו */
.side-lessons { list-style: none; margin: 8px 0 4px; margin-inline-start: 12px; padding: 0; display: grid; gap: 6px; }
.side-lessons[hidden] { display: none; }
.side-lesson {
  display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 14px; text-decoration: none; color: var(--ink);
  background: var(--band); transition: background .15s;
}
.side-lesson:hover { background: #E4DBFF; }
.side-lesson .mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: #fff; color: var(--brand); font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums;
}
.side-lesson .mark svg { width: 20px; height: 20px; }
/* סימוני השלמה בירוק: בקשת לירון, 27.9.2026. במותג ירוק אינו בפלטה, והחריגה מוגבלת לסימוני השלמה בפלטפורמה */
.side-lesson.is-done .mark { box-shadow: inset 0 0 0 2.5px #16A34A; }
.side-lesson.current.is-done .mark { box-shadow: inset 0 0 0 2.5px #4ADE80; }
.side-lesson.is-locked { color: var(--ink-soft); }
.side-lesson.is-locked .mark { color: var(--ink-soft); }
.side-title { font-weight: 700; font-size: 16px; line-height: 1.35; }
.side-lesson .play { width: 18px; height: 18px; color: var(--brand); }
.side-lesson.current { background: var(--brand); color: #fff; box-shadow: var(--glow); }
.side-lesson.current .mark { background: rgba(255, 255, 255, .16); color: #fff; }
.side-lesson.current .play { color: #fff; }

.lesson-main { padding: 36px clamp(16px, 4vw, 56px) 96px; min-width: 0; max-width: 1080px; }
.lesson-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.eyebrow { margin: 0 0 4px; font-weight: 700; color: var(--brand); font-size: 16px; }
.lesson-head h1 { font-size: clamp(17px, 2.2vw, 26px); font-weight: 800; color: var(--course-ink); }
.done-btn {
  font: inherit; font-weight: 800; font-size: 17px; flex: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5.5px 20px; border-radius: 100px; border: 1.5px solid var(--brand); background: #fff; color: var(--brand);
}
.done-btn svg { width: 20px; height: 20px; }
.done-btn[aria-pressed="true"] { background: var(--brand); color: #fff; box-shadow: var(--glow); }

.video-area { margin-bottom: 28px; }
.video-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.video-tab {
  font: inherit; font-weight: 700; font-size: 15px; cursor: pointer;
  border: 0; border-radius: 100px; padding: 8px 16px; background: #fff; color: var(--ink); box-shadow: var(--shadow-md);
}
.video-tab[aria-selected="true"] { background: var(--brand); color: #fff; }
.video-tab.is-done::before { content: "\2713  "; }

.task-box { background: #fff; border-radius: 22px; padding: 20px 22px; box-shadow: var(--shadow-md); margin: 20px 0 0; }
.task-box h3 { font-size: 19px; font-weight: 800; color: var(--brand-deep); margin-bottom: 10px; }
.tasks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.task { display: flex; align-items: center; gap: 12px; font-weight: 600; cursor: pointer; }
.task input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.task .box { flex: none; width: 28px; height: 28px; border-radius: 9px; border: 2px solid var(--brand); display: grid; place-items: center; background: #fff; }
.task input:checked + .box { background: var(--brand); box-shadow: var(--glow); }
.task input:checked + .box::after { content: ""; width: 12px; height: 7px; border: solid #fff; border-width: 0 0 3px 3px; transform: translateY(-2px) rotate(-45deg); }
.task input:focus-visible + .box { outline: 3px solid rgba(107, 63, 240, .35); outline-offset: 2px; }

.lesson-body { font-size: 19px; line-height: 1.75; margin-top: 28px; max-width: 760px; }
.lesson-body p { margin: 0 0 14px; }
/* טקסט מהעורך (לירון, 27.9.2026): תבליטים ומספור כמו בגוגל דוקס, וצ'ק ליסט שהתלמיד מסמן */
.lesson-body.rich ul, .lesson-body.rich ol { margin: 0 0 14px; padding-inline-start: 1.5em; }
.lesson-body.rich li { margin: 4px 0; }
.lesson-body.rich ul:has(> li[data-list]) { list-style: none; padding-inline-start: 0; }
.lesson-body.rich li.check-item { list-style: none; margin: 8px 0; }
.lesson-body.rich .rich-check { font-weight: 400; align-items: flex-start; }
.lesson-body.rich .rich-check .box { margin-top: 1px; }
.lesson-body.rich li.is-checked > .rich-check > span:last-child { text-decoration: line-through; color: var(--ink-soft); }
.lesson-body.rich a { color: var(--brand); font-weight: 700; }
/* "לסמן שהושלם" בסוף השיעור, ממורכז (לירון, 27.9.2026) */
.lesson-done { display: flex; justify-content: center; margin: 30px 0 6px; }
.resources { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.resource { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 14px; background: #fff; box-shadow: var(--shadow-md); text-decoration: none; font-weight: 700; }
.resource svg { width: 20px; height: 20px; color: var(--brand); }

.lesson-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 40px; flex-wrap: wrap; }
.lesson-nav a { max-width: 100%; white-space: normal; text-align: center; line-height: 1.35; }
@media (max-width: 640px) {
  .lesson-nav { flex-direction: column-reverse; align-items: stretch; }
  .lesson-nav a { width: 100%; }
}

.quiz { background: #fff; border-radius: 26px; padding: 26px clamp(18px, 3vw, 32px); box-shadow: var(--shadow-md); margin-top: 28px; }
.quiz-head h2 { font-size: 22px; font-weight: 800; color: var(--brand-deep); }
.quiz-head p { margin: 6px 0 20px; font-size: 15px; }
.quiz-form { display: grid; gap: 18px; }
.quiz-q { border: 0; margin: 0; padding: 18px; border-radius: 18px; background: var(--band); }
.quiz-q legend { float: left; width: 100%; padding: 0; margin-bottom: 12px; display: flex; gap: 10px; font-weight: 700; font-size: 17px; line-height: 1.5; }
.quiz-q legend + * { clear: both; }
.quiz-q .qn { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 14px; font-weight: 800; }
.quiz-opt { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 12px; padding: 11px 14px; margin-top: 8px; cursor: pointer; font-weight: 600; }
.quiz-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.quiz-opt .dot { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--brand); background: #fff; }
.quiz-opt input:checked + .dot { background: radial-gradient(var(--brand) 45%, #fff 50%); }
.quiz-opt input:focus-visible + .dot { outline: 3px solid rgba(107, 63, 240, .35); outline-offset: 2px; }
.quiz-opt:has(input:checked) { box-shadow: 0 0 0 2px var(--brand); }
/* תשובה נכונה: ירוק בסגנון השיעורים שהושלמו (לירון, 27.9.2026). המספר נשאר, עם מסגרת ירוקה */
.quiz-q.ok .qn { background: #fff; color: var(--brand); box-shadow: inset 0 0 0 2.5px #16A34A; }
.quiz-q .quiz-opt.right-answer { box-shadow: 0 0 0 2px #16A34A; }
.quiz-q.bad { box-shadow: 0 0 0 2px var(--pain); }
.quiz-feedback { margin: 10px 0 0; font-weight: 700; font-size: 15px; }
.quiz-q.ok .quiz-feedback { color: var(--brand); }
.quiz-q.bad .quiz-feedback { color: var(--pain); }
.quiz-form .btn-action { justify-self: start; }
.quiz-result { margin-top: 22px; border-radius: 20px; padding: 22px; text-align: center; }
.quiz-result h3 { font-size: 24px; font-weight: 800; margin-bottom: 6px; }
.quiz-result p { margin: 0 0 16px; }
.quiz-result.passed { background: var(--band); }
.quiz-result.passed h3 { color: var(--brand); }
.quiz-result.failed { background: #FDECEC; }
.quiz-result.failed h3 { color: var(--pain); }
/* המנגנון של סקולר: כיתוב מבחן חובה, כוכבית לשאלת חובה, מדיה מתחת לטקסט, וקוד איפוס כשנגמרו הניסיונות */
.quiz-must { margin: 8px 0 0 !important; font-weight: 700; color: var(--brand-deep); background: var(--band); border-radius: 12px; padding: 8px 14px; width: fit-content; }
.quiz-q .req { color: var(--pain); font-weight: 800; margin-inline-end: 4px; }
.quiz-media { display: block; margin: 8px 0 4px; }
.quiz-media img { max-width: min(100%, 520px); max-height: 360px; border-radius: 12px; display: block; }
.quiz-media audio { width: min(100%, 420px); }
.quiz-embed { display: block; position: relative; width: min(100%, 560px); aspect-ratio: 16 / 9; }
.quiz-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 10px; }
.quiz-opt .quiz-media { margin-top: 6px; }
.quiz-note { font-weight: 700; color: var(--brand-deep); background: var(--band); border-radius: 12px; padding: 10px 14px; margin: 0 0 16px; }
.quiz-note.bad { color: var(--pain); background: #FDECEC; }
.quiz-out { margin-top: 18px; background: #FDECEC; border-radius: 18px; padding: 18px; }
.quiz-out p { margin: 0 0 12px; }

.locked-note { background: #fff; border-radius: 26px; padding: 36px 28px; text-align: center; box-shadow: var(--shadow-md); }
.locked-note svg { width: 44px; height: 44px; color: var(--brand); margin-bottom: 10px; }
.locked-note h2 { font-size: 24px; color: var(--brand-deep); margin-bottom: 8px; }
.locked-note p { color: var(--ink-soft); margin: 0 0 20px; }

/* ---------- הנגן הנעול ---------- */
.player { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 10px; overflow: hidden; user-select: none; -webkit-user-select: none; box-shadow: var(--glow); }
.player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.player:fullscreen { border-radius: 0; }
.player:-webkit-full-screen { border-radius: 0; width: 100%; height: 100%; }
.player.pfs { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; aspect-ratio: auto; border-radius: 0; z-index: 2147483647; }
.stage { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.wm { position: absolute; inset-inline: max(.7em, 2%); bottom: max(.55em, 3%); z-index: 3; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: .25em .85em; pointer-events: none; font-family: "Assistant", Arial, sans-serif; font-size: 14px; line-height: 1.3; font-weight: 600; color: #000; direction: rtl; }
.wm .wm-name { margin-inline-start: auto; text-align: left; }
.wm.backed span { background: rgba(255, 255, 255, .62); padding: .05em .5em; border-radius: .45em; }
.big { position: absolute; inset: 0; margin: auto; width: 84px; height: 84px; border-radius: 50%; border: 0; background: rgba(107, 63, 240, .92); color: #fff; cursor: pointer; z-index: 4; display: grid; place-items: center; box-shadow: var(--glow); }
.big svg { width: 34px; height: 34px; margin-inline-start: 4px; }
.big[hidden] { display: none; }
.bar { position: absolute; left: 0; right: 0; bottom: calc(var(--wm-h, 24px) + max(.55em, 3%) + 6px); z-index: 4; pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 8px 12px; direction: ltr; background: linear-gradient(to top, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0)); transition: opacity .25s; }
.bar.idle { opacity: 0; pointer-events: none; }
.bar button { flex: none; width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; color: #fff; cursor: pointer; display: grid; place-items: center; }
.bar button:focus-visible { outline: 2px solid #fff; }
.bar button svg { width: 22px; height: 22px; }
.bar .time { flex: none; color: #fff; font-size: 14px; font-variant-numeric: tabular-nums; min-width: 92px; }
.bar input[type=range] { flex: 1; min-width: 60px; accent-color: var(--brand); }
.bar #gear { width: auto; min-width: 36px; padding: 0 6px; gap: 4px; display: flex; align-items: center; }
.speed-badge { font-size: 12px; font-weight: 800; }
.speed-badge[hidden] { display: none; }
.settings {
  position: absolute; right: 12px; bottom: calc(var(--wm-h, 24px) + max(.55em, 3%) + 58px); z-index: 6;
  pointer-events: auto; direction: rtl; min-width: 220px; max-width: calc(100% - 24px);
  background: rgba(11, 37, 48, .94); color: #fff; border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow-lg);
}
.settings[hidden] { display: none; }
.set-group + .set-group { margin-top: 10px; }
.set-label { display: block; font-size: 13px; font-weight: 800; color: #C9B8FF; margin-bottom: 6px; }
.set-options { display: flex; flex-wrap: wrap; gap: 6px; }
.set-chip { font: inherit; font-size: 14px; font-weight: 700; border: 0; border-radius: 100px; padding: 5px 12px; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; }
.set-chip:hover { background: rgba(255, 255, 255, .22); }
.set-chip[aria-pressed="true"] { background: var(--brand); }
.set-note { font-size: 13px; color: rgba(255, 255, 255, .75); }
.msg { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 24px; background: rgba(11, 37, 48, .92); color: #fff; text-align: center; font-size: 18px; line-height: 1.5; }
.msg[hidden] { display: none; }

@media (max-width: 900px) {
  .outline-jump {
    display: inline-flex; align-items: center; gap: 4px; margin-inline-start: 10px;
    font-weight: 700; font-size: 14px; text-decoration: none; vertical-align: middle;
    border-radius: 100px; padding: 3px 12px; background: var(--band);
  }
  .lesson-layout { grid-template-columns: 1fr; }
  .lesson-side { order: 2; box-shadow: none; }
  .lesson-main { order: 1; padding-top: 22px; }
  .lesson-head { flex-direction: column; gap: 12px; }
}

/* ---------- ניהול ---------- */
.admin-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 26px; background: var(--band); padding: 6px; border-radius: 100px; width: fit-content; }
.admin-nav a { padding: 8px 20px; border-radius: 100px; text-decoration: none; font-weight: 700; color: var(--brand-deep); }
.admin-nav a[aria-current="page"] { background: #fff; box-shadow: var(--shadow-md); color: var(--brand); }
.admin-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.admin-head .page-title { margin-bottom: 0; }
.crumbs { margin: 0 0 6px; color: var(--ink-soft); font-size: 15px; }
.crumbs a { text-decoration: none; }
.admin-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 24px; align-items: start; }
.panel { background: #fff; border-radius: 22px; padding: 24px; box-shadow: var(--shadow-md); }
.panel h2 { font-size: 22px; font-weight: 800; color: var(--brand-deep); margin-bottom: 16px; }
.admin-list { display: grid; gap: 14px; }
.admin-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fff; border-radius: 18px; padding: 12px 16px; box-shadow: var(--shadow-md); }
.admin-item-main { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; min-width: 0; }
.admin-item-main strong { display: block; font-size: 19px; color: var(--brand-deep); }
.admin-item-main small { color: var(--ink-soft); font-size: 14px; }
.thumb { flex: none; width: 96px; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: linear-gradient(150deg, var(--brand-light), var(--brand-deep)); }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.inline-add { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.inline-add input[type=text] { flex: 1; }
.btn-action.small, .btn-quiet.small { font-size: 15px; padding: 9px 18px; white-space: nowrap; }
.chapter-block { background: var(--band); border-radius: 18px; padding: 14px 16px; margin-bottom: 14px; }
.chapter-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.chapter-row strong { font-size: 18px; color: var(--brand-deep); }
.lesson-rows { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; counter-reset: les; }
.lesson-rows li { counter-increment: les; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 10px; background: #fff; border-radius: 12px; padding: 10px 12px; }
.lesson-rows li::before { content: counter(les); width: 26px; height: 26px; border-radius: 50%; background: var(--band); color: var(--brand); display: grid; place-items: center; font-weight: 800; font-size: 14px; grid-row: span 2; }
.lesson-rows li a { font-weight: 700; text-decoration: none; color: var(--ink); }
.lesson-rows li .muted { grid-column: 2; font-size: 14px; }
.lesson-rows li .row-actions { grid-column: 3; grid-row: 1 / span 2; }
.chapter-add { margin-top: 4px; }
.muted { color: var(--ink-soft); }
.row-actions { display: inline-flex; gap: 2px; }
.row-actions form { margin: 0; }
.icon-btn { font: inherit; width: 30px; height: 30px; border-radius: 8px; border: 0; background: transparent; color: var(--ink-soft); cursor: pointer; font-size: 15px; }
.icon-btn:hover { background: var(--band); color: var(--brand); }
.icon-btn.danger:hover { background: #FDECEC; color: var(--pain); }
.status { font-weight: 700; }
.status-processing { color: var(--brand); }
.status-error, .status-empty { color: var(--pain); }
.tag { background: var(--band); color: var(--brand); border-radius: 100px; padding: 1px 10px; font-weight: 700; font-size: 13px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
input[type=color] { width: 100%; height: 44px; padding: 4px; border: 1.5px solid #DCD6EE; border-radius: 12px; background: #fff; }
label.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 600; }
label.check input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--brand); }
.preview { display: block; width: 200px; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; }
.preview img, .preview video { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-row { background: var(--band); border-radius: 18px; padding: 14px 16px; margin-bottom: 14px; }
.video-row .video-status { margin: 4px 0 0; font-size: 15px; }
.task-admin { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 6px; }
.task-admin li { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #fff; border-radius: 12px; padding: 8px 12px; }
.video-row .task-admin { margin: 10px 0 0; }
.field-label { font-weight: 700; font-size: 16px; color: var(--ink); }
/* עורך הטקסט של השיעור (Quill), מימין לשמאל: התבליט עובר לצד ימין של השורה */
.rich-editor { background: #fff; border-radius: 12px; }
.rich-editor .ql-toolbar.ql-snow { border: 1.5px solid #DCD6EE; border-radius: 12px 12px 0 0; direction: rtl; font-family: inherit; }
.rich-editor .ql-container.ql-snow { border: 1.5px solid #DCD6EE; border-top: 0; border-radius: 0 0 12px 12px; font: inherit; font-size: 17px; height: auto; }
.rich-editor .ql-editor { direction: rtl; text-align: right; min-height: 220px; line-height: 1.7; }
.rich-editor .ql-editor li { padding-left: 0; padding-right: 1.5em; }
.rich-editor .ql-editor li > .ql-ui:before { margin-left: .3em; margin-right: -1.5em; text-align: left; }
.rich-editor .ql-editor li.ql-indent-1 { padding-left: 0; padding-right: 4.5em; }
.rich-editor .ql-editor li.ql-indent-2 { padding-left: 0; padding-right: 7.5em; }
.rich-editor .ql-editor li.ql-indent-3 { padding-left: 0; padding-right: 10.5em; }
.rich-editor .ql-snow .ql-picker.ql-font { width: 118px; }
.rich-editor .ql-snow .ql-picker.ql-font .ql-picker-label::before,
.rich-editor .ql-snow .ql-picker.ql-font .ql-picker-item::before { content: 'Assistant'; font-family: Assistant, sans-serif; }
.rich-editor .ql-snow .ql-picker.ql-font .ql-picker-label[data-value="Arial"]::before,
.rich-editor .ql-snow .ql-picker.ql-font .ql-picker-item[data-value="Arial"]::before { content: 'Arial'; font-family: Arial, sans-serif; }
.rich-editor .ql-snow .ql-tooltip { direction: ltr; }

/* מבחנים בניהול, במנגנון של סקולר: ספרייה, עורך שאלות, קודי איפוס ותוצאות */
/* position: relative כדי שתווית נסתרת לקוראי מסך (sr-only) בכותרת הטבלה תישאר בתוך הגלילה ולא תרחיב את הדף בטלפון */
.table-wrap { overflow-x: auto; position: relative; }
.admin-table td { font-size: 15px; }
.admin-table .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.admin-table .row-tools { flex-wrap: nowrap; }
.lesson-add { flex-wrap: wrap; }
.lesson-add select { width: auto; flex: none; max-width: 100%; }
.lesson-add input[type=text] { flex: 1 1 180px; min-width: 0; }
.lesson-add select[name=quiz_id] { flex: 1 1 220px; min-width: 0; }
.row-tools form { margin: 0; }
.btn-quiet.danger { color: var(--pain); }
.small-note { font-size: 14px; margin: 0; }
.panel-sub { margin-top: 26px; }
fieldset.checks { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; }
fieldset.checks legend { font-weight: 700; margin-bottom: 6px; padding: 0; }
.pass-line { align-items: center; }
.pass-line input[type=number] { width: 90px; margin-top: 0; }
.codes .code { font-size: 18px; letter-spacing: 1px; }
.q-edit { background: var(--band); border-radius: 16px; padding: 12px 16px; margin-bottom: 12px; }
.q-edit summary { cursor: pointer; display: flex; align-items: center; gap: 10px; font-weight: 700; list-style: none; }
.q-edit summary::-webkit-details-marker { display: none; }
.q-edit summary .qn { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 14px; }
.q-edit .req { color: var(--pain); font-weight: 800; }
.q-sum { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.q-new summary { color: var(--brand); }
.q-form { margin-top: 14px; }
.q-tools { margin-top: 8px; }
.ans { background: #fff; border-radius: 14px; padding: 12px 14px; display: grid; gap: 8px; }
.ans-right { box-shadow: inset 0 0 0 2px var(--brand); }
.wrong-rows { display: grid; gap: 10px; }
.ans-wrong .danger-link { margin-top: 0; justify-self: start; }
.media-field { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.media-field select { width: auto; }
.media-now .quiz-media { margin: 0; }
.media-now img { max-height: 80px; }
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-bottom: 12px; }
.filters label { display: grid; gap: 4px; font-size: 14px; }
.filters input[type=search] { width: min(100%, 280px); }
.filters select { width: auto; min-width: 180px; }
.verdict { display: inline-block; border-radius: 100px; padding: 1px 10px; font-size: 13px; font-weight: 800; }
.verdict.pass { background: var(--band); color: var(--brand); }
.verdict.fail { background: #FDECEC; color: var(--pain); }
.attempt-list { display: grid; gap: 10px; padding-inline-start: 22px; }
.attempt-list li { background: #fff; border-radius: 14px; padding: 12px 16px; box-shadow: var(--shadow-md); }
.attempt-list p { margin: 6px 0 0; }
.danger-link { color: var(--pain); margin-top: 14px; font-size: 15px; }
.reveal-once { background: #FFF6E5; border-radius: 16px; padding: 16px 18px; margin-bottom: 18px; }
.reveal-once code { font-size: 20px; font-weight: 800; letter-spacing: 1px; direction: ltr; unicode-bidi: embed; }
.table { width: 100%; border-collapse: separate; border-spacing: 0 8px; }
.table th { text-align: start; font-size: 14px; color: var(--ink-soft); font-weight: 700; padding: 0 12px; }
.table td { background: #fff; padding: 12px; vertical-align: middle; }
.table td:first-child { border-radius: 0 12px 12px 0; }
.table td:last-child { border-radius: 12px 0 0 12px; }

/* ---------- כפתור עזרה בוואטסאפ ---------- */
.wa-help {
  position: fixed; inset-inline-start: 20px; bottom: 20px; z-index: 30;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px 10px 14px; border-radius: 100px;
  background: #fff; color: var(--brand-deep); font-weight: 800; text-decoration: none;
  box-shadow: var(--shadow-lg);
}
.wa-help svg { width: 26px; height: 26px; color: var(--brand); }

@media (max-width: 640px) {
  .topnav .who { display: none; }
  .page { padding-top: 28px; padding-bottom: 56px; }
  .login-card { padding: 28px 20px; }
  .wa-help span { display: none; }
  .wa-help { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* מסך התלמידים: רשימה כברירת מחדל, חלון הוספה שנפתח, ודף תלמיד (פידבק לירון, 28.9.2026) */
.add-student { margin-bottom: 22px; }
.add-student summary { cursor: pointer; font-size: 19px; font-weight: 800; color: var(--brand); list-style: none; }
.add-student summary::-webkit-details-marker { display: none; }
.add-student[open] summary { margin-bottom: 16px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
fieldset.course-picks { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; }
fieldset.course-picks legend { font-weight: 700; margin-bottom: 6px; padding: 0; }
.list-filter { display: grid; gap: 4px; font-size: 14px; margin-bottom: 4px; max-width: 320px; }
.students-table td { white-space: nowrap; }
.tag.ended { background: #FDECEC; color: var(--pain); }
.admin-table tr.is-ended td { background: #FBFAFE; color: var(--ink-soft); }
.student-meta { color: var(--ink-soft); margin: -6px 0 20px; }
.back-link { text-decoration: none; font-weight: 700; }
.close-access { display: flex; gap: 6px; align-items: center; }
.close-access input { width: 170px; margin: 0; padding: 7px 10px; font-size: 14px; }
