/* ===== nq.css — שאלונים אינטראקטיביים (בינארי / IP) + דשבורד מורה ===== */
:root {
  --bg: #f4f7fb;
  --bg-grad-1: #e0f2fe;
  --bg-grad-2: #ede9fe;
  --card: #ffffff;
  --ink: #1e293b;
  --ink-soft: #475569;
  --muted: #64748b;
  --line: #e2e8f0;
  --primary: #0ea5e9;
  --primary-ink: #0369a1;
  --primary-soft: #e0f2fe;
  --accent: #7c3aed;
  --accent-soft: #ede9fe;
  --ok: #16a34a;
  --ok-soft: #dcfce7;
  --bad: #dc2626;
  --bad-soft: #fee2e2;
  --warn: #d97706;
  --warn-soft: #fef3c7;
  --radius: 18px;
  --shadow: 0 8px 28px rgba(15, 23, 42, .08);
  --shadow-lg: 0 18px 50px rgba(15, 23, 42, .18);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Assistant", "Rubik", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(900px 500px at 100% -10%, var(--bg-grad-1), transparent 70%),
    radial-gradient(800px 500px at -10% 10%, var(--bg-grad-2), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  line-height: 1.75;
  font-size: 17px;
  min-height: 100vh;
}
button { font-family: inherit; }
a { color: var(--primary-ink); }

/* ---- סרגל עליון ---- */
.nq-top {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nq-top .inner {
  max-width: 980px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.nq-brand { font-weight: 800; font-size: 1.15rem; display: flex; align-items: center; gap: 8px; }
.nq-brand .ico { font-size: 1.5rem; }
.nq-user { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; font-size: .95rem; color: var(--ink-soft); }
.nq-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary-soft); color: var(--primary-ink);
  padding: 4px 12px; border-radius: 999px; font-weight: 700; font-size: .9rem;
}
.nq-link-btn {
  background: none; border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 12px; cursor: pointer; color: var(--ink-soft); font-size: .88rem;
}
.nq-link-btn:hover { background: #f1f5f9; }

/* ---- HUD: התקדמות + ציון ---- */
.nq-hud { max-width: 980px; margin: 0 auto; padding: 12px 16px 0; display: none; }
.nq-hud.show { display: block; }
.hud-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.progress-wrap { flex: 1 1 260px; }
.progress-label { display: flex; justify-content: space-between; font-size: .85rem; color: var(--muted); margin-bottom: 4px; }
.progress {
  height: 12px; border-radius: 999px; background: #e2e8f0; overflow: hidden;
}
.progress > span {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 999px; transition: width .5s ease;
}
.hud-badges { display: flex; gap: 8px; }
.badge {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 6px 14px; text-align: center; box-shadow: var(--shadow); min-width: 92px;
}
.badge b { display: block; font-size: 1.35rem; line-height: 1.2; }
.badge small { color: var(--muted); font-size: .78rem; }
.badge.score b { color: var(--primary-ink); }
.badge.err b { color: var(--bad); }
.badge.pop { animation: pop .45s ease; }
@keyframes pop { 40% { transform: scale(1.12); } }

/* ---- מסגרת ---- */
.nq-main { max-width: 980px; margin: 0 auto; padding: 16px 16px 90px; }
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid var(--line); padding: 26px 28px; margin-bottom: 18px;
}
@media (max-width: 600px) { .card { padding: 18px 16px; } body { font-size: 16px; } }

.slide { animation: slideIn .4s ease; }
@keyframes slideIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.slide-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; flex-wrap: wrap; }
.slide-num {
  background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff;
  border-radius: 12px; padding: 2px 12px; font-weight: 800; font-size: .9rem;
}
.slide-topic { color: var(--muted); font-size: .9rem; font-weight: 600; }
.slide h2 { margin: 4px 0 14px; font-size: 1.65rem; line-height: 1.3; }

/* ---- קטע קריאה ---- */
.reading {
  background: linear-gradient(180deg, #f8fbff, #ffffff);
  border: 1px solid #dbeafe; border-inline-start: 5px solid var(--primary);
  border-radius: 14px; padding: 18px 22px; margin-bottom: 22px;
}
.reading h3 { margin: 14px 0 6px; font-size: 1.15rem; color: var(--primary-ink); }
.reading h3:first-child { margin-top: 0; }
.reading p { margin: 6px 0 10px; }
.reading p .mono, .reading li .mono { overflow-wrap: anywhere; } /* כתובות IPv6 ארוכות לא חורגות מהמסך בטלפון */
.reading ul, .reading ol { margin: 6px 0 10px; padding-inline-start: 22px; }
.reading li { margin: 3px 0; }
.tip {
  background: var(--warn-soft); border-radius: 12px; padding: 10px 14px; margin: 10px 0;
  border: 1px solid #fde68a; font-size: .97rem;
}
.tip::before { content: "💡 "; }
.keybox {
  background: var(--accent-soft); border-radius: 12px; padding: 10px 14px; margin: 10px 0;
  border: 1px solid #ddd6fe; font-size: .97rem;
}
.keybox::before { content: "📌 "; }
.mono, code { font-family: "Consolas", "Courier New", monospace; direction: ltr; unicode-bidi: isolate; }
code { background: #f1f5f9; border-radius: 6px; padding: 1px 6px; font-size: .95em; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* ---- טבלאות ---- */
.tbl-wrap { overflow-x: auto; margin: 10px 0 14px; -webkit-overflow-scrolling: touch; }
table.nq-table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: .95rem; background: #fff; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.nq-table th, .nq-table td { padding: 8px 10px; text-align: center; border-bottom: 1px solid var(--line); }
.nq-table th { background: #f1f5f9; font-weight: 800; color: var(--ink-soft); }
.nq-table tr:last-child td { border-bottom: none; }
.nq-table td.l, .nq-table th.l { text-align: start; }

/* טבלת המרה 128..1 */
table.conv { border-collapse: separate; border-spacing: 4px; direction: ltr; margin: 8px auto; }
.conv td, .conv th {
  min-width: 46px; text-align: center; padding: 6px 4px; border-radius: 10px;
  font-family: "Consolas", monospace; font-size: 1.02rem;
}
.conv th { background: var(--primary-soft); color: var(--primary-ink); font-weight: 800; }
.conv td { background: #f8fafc; border: 1px solid var(--line); font-weight: 700; }
.conv td.on { background: var(--ok-soft); border-color: #86efac; color: #166534; }
.conv td.off { color: #94a3b8; }
.conv td.sum { background: var(--accent-soft); border-color: #c4b5fd; color: #5b21b6; min-width: 70px; }
.conv .lbl { background: none; border: none; font-family: inherit; font-size: .85rem; color: var(--muted); font-weight: 600; min-width: 0; }
.conv .gap { background: none; border: none; min-width: 10px; padding: 0; }
@media (max-width: 520px) { .conv td, .conv th { min-width: 32px; font-size: .9rem; padding: 4px 2px; } }

.tag { display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: .85rem; font-weight: 700; }
.tag.pub { background: #dbeafe; color: #1d4ed8; }
.tag.priv { background: var(--ok-soft); color: #166534; }
.tag.spec { background: var(--warn-soft); color: #92400e; }

/* ---- שאלות ---- */
.q-list-title { font-size: 1.15rem; margin: 6px 0 12px; display: flex; align-items: center; gap: 8px; }
.question {
  border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; margin-bottom: 16px;
  background: #fff; transition: border-color .3s, box-shadow .3s;
}
.question.answered.right { border-color: #86efac; box-shadow: 0 0 0 3px var(--ok-soft); }
.question.answered.wrong { border-color: #fca5a5; box-shadow: 0 0 0 3px var(--bad-soft); }
.q-text { font-weight: 700; margin-bottom: 12px; font-size: 1.05rem; }
.q-text .qn { color: var(--accent); margin-inline-end: 6px; }
.options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 640px) { .options { grid-template-columns: 1fr; } }
.opt {
  display: flex; align-items: center; gap: 10px; text-align: start;
  background: #f8fafc; border: 2px solid var(--line); border-radius: 14px;
  padding: 10px 14px; cursor: pointer; font-size: 1rem; color: var(--ink);
  transition: transform .12s, border-color .2s, background .2s;
}
.opt:hover:not(:disabled) { border-color: var(--primary); background: var(--primary-soft); transform: translateY(-1px); }
.opt .letter {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: .9rem;
  background: #fff; border: 2px solid var(--line); color: var(--ink-soft);
}
.opt .otext { flex: 1; }
.opt:disabled { cursor: default; }
.opt.correct { background: var(--ok-soft); border-color: var(--ok); }
.opt.correct .letter { background: var(--ok); border-color: var(--ok); color: #fff; }
.opt.chosen-wrong { background: var(--bad-soft); border-color: var(--bad); }
.opt.chosen-wrong .letter { background: var(--bad); border-color: var(--bad); color: #fff; }
.opt.dim { opacity: .55; }

.feedback {
  margin-top: 12px; border-radius: 12px; padding: 12px 16px; font-size: .98rem;
  animation: slideIn .3s ease;
}
.feedback.right { background: var(--ok-soft); border: 1px solid #86efac; }
.feedback.wrong { background: var(--bad-soft); border: 1px solid #fca5a5; }
.feedback .fb-title { font-weight: 800; margin-bottom: 4px; font-size: 1.05rem; }
.feedback.right .fb-title { color: #166534; }
.feedback.wrong .fb-title { color: #991b1b; }
.feedback .conv { margin: 8px 0 4px; }

/* ---- ניווט ---- */
.nav {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  margin-top: 8px; flex-wrap: wrap;
}
.nav .hint { color: var(--muted); font-size: .92rem; }
.btn {
  border: none; border-radius: 14px; padding: 12px 24px; font-size: 1.05rem; font-weight: 800;
  cursor: pointer; transition: transform .12s, box-shadow .2s, opacity .2s;
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
}
.btn:hover:not(:disabled) { transform: translateY(-2px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; box-shadow: 0 8px 20px rgba(14, 165, 233, .35); }
.btn-ghost { background: #fff; color: var(--ink); border: 2px solid var(--line); }
.btn-ok { background: var(--ok); color: #fff; }
.btn-bad { background: var(--bad); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: .9rem; border-radius: 10px; }

/* ---- פתיחה ---- */
.intro { text-align: center; }
.intro .big-ico { font-size: 3.6rem; line-height: 1; }
.intro h1 { font-size: 2.1rem; margin: 10px 0 6px; line-height: 1.25; }
.intro .sub { color: var(--ink-soft); font-size: 1.1rem; margin: 0 auto 18px; max-width: 640px; }
.rules { text-align: start; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin: 18px 0 22px; }
.rule { background: #f8fafc; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; font-size: .95rem; }
.rule b { display: block; font-size: 1rem; }
.rule .ri { font-size: 1.4rem; }
.topics-preview { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 20px; }
.topics-preview span { background: var(--primary-soft); color: var(--primary-ink); padding: 4px 12px; border-radius: 999px; font-weight: 700; font-size: .9rem; }

/* ---- חלונות קופצים ---- */
.overlay {
  position: fixed; inset: 0; z-index: 100; background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(4px); display: none; place-items: center; padding: 16px;
}
.overlay.show { display: grid; animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; } }
.modal {
  background: #fff; border-radius: 22px; box-shadow: var(--shadow-lg);
  width: min(460px, 100%); padding: 28px; text-align: center; animation: slideIn .35s ease;
  max-height: 92vh; overflow: auto;
}
.modal h2 { margin: 6px 0 8px; }
.modal .big-ico { font-size: 3rem; line-height: 1; }
.modal p { color: var(--ink-soft); }
.field { text-align: start; margin: 12px 0; }
.field label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: 4px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 14px; border-radius: 12px; border: 2px solid var(--line);
  font-size: 1rem; font-family: inherit; background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); }
.err-msg { color: var(--bad); font-weight: 700; min-height: 1.4em; font-size: .95rem; }
.modal.fail { border-top: 8px solid var(--bad); }

/* ---- סיכום ---- */
.summary-hero { text-align: center; }
.ring {
  --p: 0; --c: var(--primary);
  width: 170px; height: 170px; border-radius: 50%; margin: 6px auto 10px;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), #e2e8f0 0);
  display: grid; place-items: center;
}
.ring > div {
  width: 134px; height: 134px; border-radius: 50%; background: #fff;
  display: grid; place-items: center; align-content: center;
}
.ring b { font-size: 2.6rem; line-height: 1; }
.ring small { color: var(--muted); }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 16px 0; }
.stat { background: #f8fafc; border: 1px solid var(--line); border-radius: 14px; padding: 10px; text-align: center; }
.stat b { display: block; font-size: 1.5rem; }
.stat small { color: var(--muted); }
.topic-bars { display: grid; gap: 10px; margin: 10px 0 6px; }
.tb { display: grid; grid-template-columns: minmax(120px, 210px) 1fr 64px; align-items: center; gap: 10px; font-size: .95rem; }
.tb .bar { height: 14px; background: #e2e8f0; border-radius: 999px; overflow: hidden; }
.tb .bar span { display: block; height: 100%; border-radius: 999px; }
.tb .pct { font-weight: 800; text-align: end; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .tb { grid-template-columns: 1fr 52px; } .tb .bar { grid-column: 1 / -1; grid-row: 2; } }
.lvl-good { background: var(--ok); }
.lvl-mid { background: var(--warn); }
.lvl-low { background: var(--bad); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .two-col { grid-template-columns: 1fr; } }
.box-good, .box-imp { border-radius: 14px; padding: 12px 16px; }
.box-good { background: var(--ok-soft); border: 1px solid #86efac; }
.box-imp { background: var(--warn-soft); border: 1px solid #fde68a; }
.box-good h4, .box-imp h4 { margin: 0 0 6px; }
.box-good ul, .box-imp ul { margin: 0; padding-inline-start: 20px; }
.mistake { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin-bottom: 10px; background: #fff; font-size: .95rem; }
.mistake .mq { font-weight: 700; }
.mistake .mine { color: var(--bad); }
.mistake .ans { color: var(--ok); }
.save-status { text-align: center; font-weight: 700; margin: 8px 0; font-size: .95rem; }
.save-status.ok { color: var(--ok); }
.save-status.bad { color: var(--bad); }
.actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }

.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(120px);
  background: var(--ink); color: #fff; padding: 10px 20px; border-radius: 12px; z-index: 200;
  transition: transform .3s ease, opacity .3s; font-weight: 700; box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; pointer-events: auto; }

/* ---- דשבורד מורה ---- */
.dash-main { max-width: 1200px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px; box-shadow: var(--shadow); }
.kpi small { color: var(--muted); font-weight: 700; }
.kpi b { display: block; font-size: 2rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tab { border: 2px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 16px; cursor: pointer; font-weight: 800; color: var(--ink-soft); font-size: .95rem; }
.tab.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 14px; }
.filters .field { margin: 0; min-width: 160px; }
.filters .field input, .filters .field select { padding: 8px 12px; }
.dash-table td, .dash-table th { white-space: nowrap; }
.dash-table tbody tr { cursor: pointer; }
.dash-table tbody tr:hover td { background: #f8fafc; }
.score-pill { display: inline-block; min-width: 46px; padding: 2px 10px; border-radius: 999px; font-weight: 800; font-variant-numeric: tabular-nums; }
.sp-good { background: var(--ok-soft); color: #166534; }
.sp-mid { background: var(--warn-soft); color: #92400e; }
.sp-low { background: var(--bad-soft); color: #991b1b; }
.sp-none { color: #94a3b8; }
.heat td.cell { font-weight: 800; font-variant-numeric: tabular-nums; min-width: 70px; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.modal.wide { width: min(860px, 100%); text-align: start; }
.row-actions { display: flex; gap: 6px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); margin: 6px 0 10px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; vertical-align: middle; margin-inline-end: 4px; }

@media print {
  .nq-top, .nq-hud, .actions, .nav { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; }
}

/* ---- מצב מורה ---- */
.nq-chip.teacher { background: var(--accent-soft); color: #5b21b6; }
.nq-link-btn { text-decoration: none; display: inline-flex; align-items: center; }
.nq-link-btn.on { background: var(--ok-soft); border-color: #86efac; color: #166534; font-weight: 700; }
.opt.reveal { border: 2px dashed var(--ok); background: #f0fdf4; }
.opt.reveal .letter { border-color: var(--ok); color: var(--ok); }
.feedback.reveal-fb { background: #f0f9ff; border: 1px dashed #7dd3fc; }
.feedback.reveal-fb .fb-title { color: var(--primary-ink); }
.db-badge-on { background: var(--ok-soft); color: #166534; padding: 1px 8px; border-radius: 999px; font-size: .85rem; font-weight: 700; }

/* ---- טבלת המרה אינטראקטיבית ---- */
.cw { background: #fff; border: 2px solid #c7d2fe; border-radius: 16px; padding: 14px 16px; margin: 14px 0; }
.cw-title { font-weight: 800; color: #4338ca; margin-bottom: 4px; }
.cw-title small { font-weight: 600; color: var(--muted); }
.conv td.cw-cell { padding: 0; background: none; border: none; }
.cw-bit {
  width: 100%; min-width: 46px; height: 44px; border-radius: 10px; cursor: pointer;
  font-family: "Consolas", monospace; font-size: 1.15rem; font-weight: 800;
  background: #f8fafc; border: 2px solid var(--line); color: #94a3b8;
  transition: background .15s, border-color .15s, transform .1s;
}
.cw-bit:hover { border-color: var(--primary); transform: translateY(-1px); }
.cw-bit.on { background: var(--ok-soft); border-color: var(--ok); color: #166534; }
.cw-bit:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
@media (max-width: 520px) { .cw-bit { min-width: 32px; height: 40px; font-size: 1rem; } }
.cw-out { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
@media (max-width: 640px) { .cw-out { grid-template-columns: 1fr; } }
.cw-box { background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; padding: 6px 12px; text-align: center; }
.cw-box small { display: block; color: var(--muted); font-weight: 700; font-size: .8rem; }
.cw-box b { font-size: 1.5rem; display: block; line-height: 1.3; }
.cw-sum, .cw-nib { font-size: .85rem; color: var(--ink-soft); font-family: "Consolas", monospace; }
.cw-in { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 12px; font-weight: 700; font-size: .95rem; }
.cw-in input { width: 90px; padding: 6px 10px; border: 2px solid var(--line); border-radius: 10px; font-size: 1rem; margin-inline-start: 6px; }
.cw-in input:focus { outline: none; border-color: var(--primary); }
.cw-steps { margin-top: 8px; font-size: .93rem; }
.cw-steps ol { margin: 4px 0 0; padding-inline-start: 22px; columns: 2; column-gap: 24px; }
@media (max-width: 640px) { .cw-steps ol { columns: 1; } }
.cw-steps li { color: var(--muted); }
.cw-steps li.on { color: #166534; }
.cw-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* ---- כלי עזר צף ---- */
.nq-tool {
  position: fixed; z-index: 60; bottom: 16px; left: 16px; width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 100px); overflow: auto; background: #fff; border-radius: 18px;
  box-shadow: var(--shadow-lg); border: 1px solid var(--line); padding: 12px 14px; display: none;
}
.nq-tool.show { display: block; animation: slideIn .25s ease; }
.nq-tool-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.nq-tool .cw { margin: 8px 0 0; border: none; padding: 0; }
.nq-tool .cw-title b { display: none; }

/* ---- בחירת מצב: תרגול / בחינה ---- */
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; text-align: start; margin: 18px 0 6px; }
@media (max-width: 700px) { .modes { grid-template-columns: 1fr; } }
.mode-card { border: 2px solid var(--line); border-radius: 18px; padding: 16px 18px; background: #fff; display: flex; flex-direction: column; }
.mode-card.practice { border-color: #bae6fd; background: linear-gradient(180deg, #f0f9ff, #fff); }
.mode-card.exam { border-color: #fcd34d; background: linear-gradient(180deg, #fffbeb, #fff); }
.mode-card.exam.locked { border-color: var(--line); background: #f8fafc; }
.mode-head { display: flex; gap: 10px; align-items: center; }
.mode-head h3 { margin: 0; font-size: 1.35rem; }
.mode-head small { color: var(--muted); font-weight: 700; }
.mode-ico { font-size: 2rem; }
.mode-card ul { margin: 10px 0; padding-inline-start: 4px; list-style: none; font-size: .95rem; }
.mode-card li { margin: 4px 0; }
.mode-card .btn { margin-top: auto; justify-content: center; }
.mode-note { margin: 6px 0 10px; font-size: .92rem; background: #f1f5f9; border-radius: 10px; padding: 6px 10px; }
.mode-note.ok { background: var(--ok-soft); color: #166534; }
.mode-note.warn { background: var(--warn-soft); color: #92400e; }
.mode-note.bad { background: var(--bad-soft); color: #991b1b; }
.btn-exam { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; box-shadow: 0 8px 20px rgba(217, 119, 6, .35); }
.exam-confirm { text-align: start; }
.exam-confirm ul { padding-inline-start: 20px; margin: 6px 0 10px; }
.exam-confirm li { margin: 5px 0; color: var(--ink); }

/* ---- במהלך בחינה ---- */
.badge.exam { display: none; }
.nq-hud.exam .badge.exam { display: block; }
.nq-hud.exam .badge.score, .nq-hud.exam .badge.err { display: none; }
.nq-hud.exam .progress > span { background: linear-gradient(90deg, #f59e0b, #d97706); }
.exam-tag { background: var(--warn-soft); color: #92400e; border: 1px solid #fcd34d; border-radius: 999px; padding: 1px 12px; font-weight: 800; font-size: .88rem; }
.exam-tag.big { display: inline-block; font-size: 1rem; padding: 3px 16px; margin-bottom: 6px; }
.exam-slide .reading { border-inline-start-color: #f59e0b; }
.opt.selected { background: #fffbeb; border-color: #f59e0b; }
.opt.selected .letter { background: #f59e0b; border-color: #f59e0b; color: #fff; }
.question.answered.picked { border-color: #fcd34d; }

/* ---- משוב מלא אחרי בחינה ---- */
.review-title { margin: 22px 4px 12px; }
.review { border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; margin-bottom: 12px; border-inline-start-width: 5px; }
.review.right { border-inline-start-color: var(--ok); }
.review.wrong { border-inline-start-color: var(--bad); background: #fffafa; }
.review.skipped { border-inline-start-color: #94a3b8; background: #f8fafc; }
.review-head { font-weight: 800; margin-bottom: 4px; }
.review .mq { font-weight: 700; margin-bottom: 4px; }
.review .mine { color: var(--bad); }
.review .ans { color: var(--ok); }
.review-explain { margin-top: 6px; font-size: .95rem; color: var(--ink-soft); }
.unlock { background: var(--warn-soft); border: 1px solid #fcd34d; border-radius: 14px; padding: 10px 14px; margin: 6px auto 0; max-width: 560px; }

/* ---- תרשימים: צעדים / ספרות הקס ---- */
.sw .conv td.cur { outline: 3px solid var(--primary); outline-offset: 1px; }
.sw .conv td.on { background: var(--ok-soft); border-color: #86efac; color: #166534; }
.sw-msg { background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin-top: 6px; min-height: 2.4em; }
.hp-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; max-width: 460px; margin: 8px auto; direction: ltr; }
.hp-d { height: 40px; border-radius: 10px; border: 2px solid var(--line); background: #f8fafc; font-size: 1.1rem; font-weight: 800; cursor: pointer; }
.hp-d:hover { border-color: var(--primary); }
.hp-d.on { background: var(--accent-soft); border-color: var(--accent); color: #5b21b6; }
.hp .conv td.on { background: var(--ok-soft); border-color: #86efac; color: #166534; }
.w-chips { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.w-chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 3px 12px; cursor: pointer; font-family: "Consolas", monospace; font-size: .9rem; direction: ltr; }
.w-chip:hover { border-color: var(--primary); }
.w-chip.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-ink); font-weight: 700; }

/* ---- תרשימי IP ---- */
.ipw { background: #fff; border: 2px solid #c7d2fe; border-radius: 16px; padding: 14px 16px; margin: 14px 0; }
.w-title { font-weight: 800; color: #4338ca; margin-bottom: 8px; }
.w-title small { font-weight: 600; color: var(--muted); }
.w-row { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-bottom: 8px; }
.w-in { font-weight: 700; }
.w-in input { width: 170px; padding: 6px 10px; border: 2px solid var(--line); border-radius: 10px; font-size: 1rem; margin-inline-start: 6px; }
.w-in input:focus { outline: none; border-color: var(--primary); }
.w-seg { font-weight: 700; }
.w-seg button { border: 2px solid var(--line); background: #fff; border-radius: 10px; padding: 4px 12px; cursor: pointer; font-family: inherit; font-weight: 700; }
.w-seg button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.w-bits { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 4px; direction: ltr; margin: 6px 0; }
.w-dot { font-size: 1.6rem; font-weight: 800; color: var(--muted); align-self: center; }
.w-oct { text-align: center; padding: 6px; border-radius: 12px; border: 2px solid var(--line); background: #f8fafc; }
.w-oct.net { background: #e0f2fe; border-color: #7dd3fc; }
.w-oct.host { background: #ffedd5; border-color: #fdba74; }
.w-oct b { display: block; font-size: 1.2rem; }
.w-oct small { color: var(--muted); font-size: .75rem; direction: rtl; display: block; }
.w-cells { display: flex; gap: 2px; }
.w-cells span { width: 17px; height: 24px; display: grid; place-items: center; font-family: "Consolas", monospace; font-size: .85rem; border-radius: 4px; background: #fff; color: #94a3b8; }
.w-cells span.one { color: var(--ink); font-weight: 800; }
@media (max-width: 520px) { .w-cells span { width: 13px; font-size: .75rem; } .w-dot { display: none; } }
.w-legend { display: flex; gap: 14px; justify-content: center; font-size: .85rem; color: var(--muted); }
.w-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; vertical-align: middle; margin-inline-end: 4px; }
.w-legend .nb { background: #7dd3fc; } .w-legend .hb { background: #fdba74; }
.w-err { color: var(--bad); font-weight: 700; min-height: 1em; font-size: .9rem; }
.w-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-top: 6px; }
.w-card { background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; padding: 6px 10px; text-align: center; }
.w-card.wide { grid-column: 1 / -1; text-align: start; }
.w-card.hl { background: var(--accent-soft); border-color: #c4b5fd; }
.w-card small { display: block; color: var(--muted); font-weight: 700; font-size: .78rem; }
.w-card b { font-size: 1.1rem; }
.w-card u { text-decoration: none; background: #fde68a; border-radius: 3px; }
.w-band { display: flex; height: 26px; border-radius: 8px; overflow: hidden; direction: ltr; color: #fff; font-weight: 800; font-size: .85rem; }
.w-band span { display: grid; place-items: center; min-width: 2px; }
.w-range { width: 100%; direction: ltr; margin: 6px 0 4px; accent-color: var(--accent); }
.w-ruler-out { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
table.ranges tr.hit td { background: #fef08a !important; transition: background .3s; }
table.ranges tr.hit td:first-child { font-weight: 800; }

/* ---- סימולציית APIPA ---- */
.w-switch { font-weight: 800; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.w-switch input { width: 20px; height: 20px; accent-color: var(--ok); }
.ap-net { display: flex; align-items: center; direction: ltr; margin: 8px 0; }
.ap-node { flex: 0 0 auto; width: 110px; text-align: center; border: 2px solid var(--line); border-radius: 14px; padding: 6px 4px; background: #f8fafc; transition: all .3s; }
.ap-node span { font-size: 1.8rem; display: block; line-height: 1.2; }
.ap-node b { display: block; font-size: .9rem; }
.ap-node small { display: block; font-size: .78rem; color: var(--muted); }
.ap-node.srv.off { opacity: .45; filter: grayscale(1); }
.ap-node.pc.ok { border-color: var(--ok); background: var(--ok-soft); }
.ap-node.pc.apipa { border-color: var(--warn); background: var(--warn-soft); }
.ap-wire { flex: 1; height: 4px; background: #cbd5e1; position: relative; border-radius: 4px; min-width: 30px; }
.ap-pkt, .ap-pkt2 { position: absolute; top: -6px; width: 16px; height: 16px; border-radius: 50%; background: var(--primary); opacity: 0; left: 0; }
.ap-pkt.fwd, .ap-pkt2.fwd { animation: pktFwd .6s linear forwards; }
.ap-pkt.back, .ap-pkt2.back { background: var(--ok); animation: pktBack .6s linear forwards; }
@keyframes pktFwd { 0% { left: 0; opacity: 1; } 99% { left: calc(100% - 16px); opacity: 1; } 100% { left: calc(100% - 16px); opacity: 0; } }
@keyframes pktBack { 0% { left: calc(100% - 16px); opacity: 1; } 99% { left: 0; opacity: 1; } 100% { left: 0; opacity: 0; } }
.ap-steps { margin: 6px 0 0; padding-inline-start: 22px; font-size: .95rem; }
.ap-steps li { margin: 4px 0; animation: slideIn .3s ease; }
.ap-steps li.good { color: #166534; } .ap-steps li.warn { color: #92400e; } .ap-steps li.bad { color: #991b1b; }
@media (max-width: 520px) { .ap-node { width: 78px; } .ap-node span { font-size: 1.4rem; } }

/* ---- דשבורד: תרגולים / בחינות ---- */
.mode-switch { display: inline-flex; border: 2px solid var(--line); border-radius: 12px; overflow: hidden; }
.mode-switch button { border: none; background: #fff; padding: 8px 14px; font-family: inherit; font-weight: 800; cursor: pointer; color: var(--ink-soft); }
.mode-switch button.on { background: var(--ink); color: #fff; }
.mode-switch button[data-m="exam"].on { background: #d97706; }
.kpi.exam { border-color: #fcd34d; background: linear-gradient(180deg, #fffbeb, #fff); }
.dash-table th.grp-e, .dash-table td.grp-e { background: #fffbeb; }
.ex-st { display: inline-block; padding: 2px 10px; border-radius: 999px; font-weight: 800; font-size: .85rem; }
.ex-st.ok { background: var(--ok-soft); color: #166534; }
.ex-st.no { color: #94a3b8; }
.ex-st.prog { background: var(--warn-soft); color: #92400e; }
.sub-e { background: #fffbeb; border-radius: 12px; padding: 10px; }
.sub-p { background: #f8fbff; border-radius: 12px; padding: 10px; }

/* ---- דשבורד: פתיחה ושיוך שאלונים ---- */
.stage-title { margin: 22px 4px 10px; color: var(--accent); font-size: 1.1rem; }
.plan-row { display: flex; align-items: center; gap: 12px; background: #f8fafc; border: 1px dashed var(--line); border-radius: 14px; padding: 10px 14px; margin-bottom: 10px; }
.plan-row .pr-n { font-weight: 800; color: var(--muted); min-width: 22px; text-align: center; }
.plan-row .pr-ico { font-size: 1.5rem; }
.plan-row .pr-t { flex: 1; display: flex; flex-direction: column; }
.plan-row .pr-t small { color: var(--muted); }
.quiz-card { border-inline-start: 5px solid var(--primary); }
.assign { margin-top: 12px; background: #f8fbff; border: 1px solid #dbeafe; border-radius: 14px; padding: 10px 14px; }
.as-head { font-weight: 800; margin-bottom: 6px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.as-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.as-chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 6px 3px 12px; font-weight: 700; font-size: .9rem; background: #fff; border: 1px solid var(--line); }
.as-chip.class { background: var(--primary-soft); border-color: #7dd3fc; }
.as-chip.student { background: var(--accent-soft); border-color: #c4b5fd; }
.as-chip button { border: none; background: rgba(0,0,0,.06); border-radius: 50%; width: 22px; height: 22px; cursor: pointer; font-size: .75rem; }
.as-chip button:hover { background: var(--bad-soft); color: var(--bad); }
.as-add { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.as-add select { padding: 6px 10px; border: 2px solid var(--line); border-radius: 10px; font-family: inherit; font-size: .92rem; max-width: 220px; }

/* ---- תרשימי "יסודות התקשורת" ---- */
.bw .bw-svg svg { width: 100%; max-height: 260px; display: block; margin: 4px auto; direction: ltr; }
.bw-link { stroke: #94a3b8; stroke-width: 3; fill: none; }
.bw-link.backbone { stroke: #334155; stroke-width: 6; }
.bw-node { fill: #fff; stroke: #0ea5e9; stroke-width: 3; }
.bw-node.srv { stroke: #7c3aed; }
.bw-node.peer { stroke: #16a34a; }
.bw-lbl { font-size: 11px; font-weight: 700; fill: #475569; font-family: Assistant, sans-serif; }
.bw-dot.req { fill: #0ea5e9; } .bw-dot.res { fill: #f59e0b; }
.bw-cap { text-align: center; margin: 4px 0 0; }
.sort-score { font-weight: 800; margin-bottom: 8px; }
.sort-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.sort-item { border: 2px solid var(--line); border-radius: 12px; padding: 8px 10px; background: #f8fafc; display: flex; flex-direction: column; gap: 6px; }
.sort-item.ok { border-color: #86efac; background: var(--ok-soft); }
.sort-item.bad { border-color: #fca5a5; background: var(--bad-soft); }
.si-name { font-weight: 800; }
.si-btns { display: flex; gap: 4px; flex-wrap: wrap; }
.si-btns button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 3px 8px; font-family: inherit; font-weight: 700; font-size: .85rem; cursor: pointer; }
.si-btns button:hover { border-color: var(--primary); background: var(--primary-soft); }
.si-res { font-size: .88rem; }
.sort-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (max-width: 640px) { .sort-cols { grid-template-columns: 1fr; } }
.sort-col { border-radius: 12px; padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; background: #f8fafc; border: 1px solid var(--line); }
.sort-col.end { background: var(--primary-soft); } .sort-col.mid { background: var(--accent-soft); } .sort-col.media { background: var(--warn-soft); }
.pt-cable { cursor: pointer; }
.pt-cable.sel line:first-child { filter: drop-shadow(0 0 4px rgba(14,165,233,.8)); }
.pt-led { transition: fill .3s; }
.tp-edge, .tp-node.clickable { cursor: pointer; }
.tp-edge.down .bw-link { stroke: #fca5a5; stroke-dasharray: 6 5; }
.tp-edge:hover .bw-link { stroke: #0ea5e9; }
.sc-view { display: grid; grid-template-columns: 170px 1fr; gap: 14px; align-items: center; }
@media (max-width: 560px) { .sc-view { grid-template-columns: 1fr; } }
.sc-circle { width: 160px; height: 160px; display: grid; place-items: center; margin: auto; }
.sc-circle span { display: grid; place-items: center; width: calc(160px * var(--s, .4)); height: calc(160px * var(--s, .4)); border-radius: 50%; font-size: 2rem; transition: all .45s cubic-bezier(.3,1.4,.5,1); }
.sc-circle.lan span { background: radial-gradient(circle, #e0f2fe, #7dd3fc); }
.sc-circle.wan span { background: radial-gradient(circle, #fef3c7, #fbbf24); }
.sc-circle.inet span { background: radial-gradient(circle, #ede9fe, #a78bfa); }
.cable-sw { display: inline-block; width: 70px; vertical-align: middle; }

/* ---- תרשימי "פרוטוקולים ומודל השכבות" ---- */
.pw-c0 { background: #ffe4e6 !important; } .pw-c1 { background: var(--ok-soft) !important; } .pw-c2 { background: var(--primary-soft) !important; }
.pw-c3 { background: #e0e7ff !important; } .pw-c4 { background: var(--warn-soft) !important; } .pw-c5 { background: var(--accent-soft) !important; }
.osi-wrap { display: grid; grid-template-columns: minmax(150px, 210px) 1fr; gap: 14px; align-items: start; }
@media (max-width: 560px) { .osi-wrap { grid-template-columns: 1fr; } }
.osi-stack { display: flex; flex-direction: column; gap: 4px; }
.osi-l { display: grid; grid-template-columns: 26px 1fr; grid-template-rows: auto auto; align-items: center; text-align: start; border: 2px solid var(--c); border-inline-start-width: 8px; background: #fff; border-radius: 10px; padding: 3px 8px; cursor: pointer; font-family: inherit; color: var(--ink); transition: transform .2s, background .2s; }
.osi-l b { grid-row: 1 / span 2; font-size: 1.2rem; color: var(--c); }
.osi-l span { font-weight: 800; line-height: 1.2; }
.osi-l small { color: var(--muted); font-size: .75rem; line-height: 1.1; }
.osi-l:hover { transform: translateX(-4px); }
.osi-l.on { background: var(--c); color: #fff; transform: translateX(-8px) scale(1.03); box-shadow: 0 6px 16px rgba(0,0,0,.15); }
.osi-l.on b, .osi-l.on small { color: #fff; }
.osi-card { border-top: 6px solid var(--c); background: #f8fafc; border-radius: 14px; padding: 10px 14px; animation: slideIn .3s ease; }
.osi-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.osi-h span { width: 36px; height: 36px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1.2rem; }
.osi-h b { font-size: 1.2rem; } .osi-h i { color: var(--muted); font-style: normal; font-weight: 700; }
.osi-card p { margin: 8px 0; }
.osi-q { background: var(--warn-soft); border: 2px dashed #fbbf24; border-radius: 14px; padding: 12px 14px; min-height: 120px; }
.osi-q small { font-weight: 800; color: #92400e; } .osi-q p { font-size: 1.1rem; font-weight: 700; margin: 6px 0; }
.osi-ok { color: #166534 !important; } .osi-bad { color: #991b1b !important; }
.osi-score { font-weight: 800; color: var(--ink-soft); align-self: center; }
.mp-grid { display: grid; grid-template-columns: 1.3fr 1fr; grid-auto-rows: minmax(34px, auto); gap: 4px 10px; }
.mp-h { font-weight: 800; text-align: center; color: var(--ink-soft); grid-row: 1; line-height: 1.2; }
.mp-h b, .mp-h small { display: block; } .mp-h small { color: var(--muted); }
.mp-o { grid-column: 1; border: 2px solid var(--line); border-inline-start: 6px solid var(--c); border-radius: 9px; padding: 3px 10px; background: #fff; display: flex; gap: 6px; align-items: center; transition: all .25s; }
.mp-o b { color: var(--c); } .mp-o small { color: var(--muted); margin-inline-start: auto; }
.mp-o.on { background: #fef9c3; border-color: #facc15; border-inline-start-color: var(--c); transform: scale(1.02); }
.mp-t { grid-column: 2; border: 2px solid var(--c); background: #fff; color: var(--ink); border-radius: 12px; font-family: inherit; font-weight: 800; font-size: 1rem; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; transition: all .25s; }
.mp-t small { font-weight: 600; color: var(--muted); }
.mp-t.on { background: var(--c); color: #fff; box-shadow: 0 6px 16px rgba(0,0,0,.15); } .mp-t.on small { color: #fff; }
.en-wrap { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: start; }
@media (max-width: 560px) { .en-wrap { grid-template-columns: 1fr; } .en-stack { flex-direction: row !important; flex-wrap: wrap; } }
.en-stack { display: flex; flex-direction: column; gap: 4px; text-align: center; }
.en-l { border: 2px solid var(--line); border-radius: 9px; padding: 2px 6px; font-weight: 700; font-size: .9rem; background: #fff; transition: all .25s; }
.en-l small { display: block; color: var(--muted); font-size: .72rem; }
.en-l.on { background: var(--ink); color: #fff; border-color: var(--ink); transform: scale(1.05); } .en-l.on small { color: #cbd5e1; }
.en-arrow { font-size: 1.3rem; color: var(--muted); }
.en-pdu { font-weight: 700; color: var(--ink-soft); margin-bottom: 8px; }
.en-blocks { display: flex; flex-wrap: wrap; direction: ltr; gap: 0; min-height: 64px; align-items: stretch; }
.en-b { display: flex; flex-direction: column; justify-content: center; padding: 6px 10px; background: color-mix(in srgb, var(--c) 18%, #fff); border: 2px solid var(--c); margin-inline-end: -2px; animation: enIn .4s cubic-bezier(.3,1.4,.5,1); text-align: center; }
.en-b:first-child { border-radius: 10px 0 0 10px; } .en-b:last-child { border-radius: 0 10px 10px 0; } .en-b:only-child { border-radius: 10px; }
.en-b b { color: var(--c); font-size: .95rem; } .en-b small { font-family: "Consolas", monospace; font-size: .78rem; color: var(--ink); }
.en-b.data { flex: 1; min-width: 120px; } .en-b.bits { flex: 1; } .en-b.bits small { letter-spacing: 2px; }
@keyframes enIn { from { opacity: 0; transform: translateY(-14px) scale(.9); } to { opacity: 1; transform: none; } }
.en-txt { margin: 10px 0 0; }

/* ---- דשבורד: כיתות ---- */
.cls-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.cls-bar button { border: 2px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; font: inherit; font-weight: 800; cursor: pointer; color: var(--ink-soft); transition: all .2s; }
.cls-bar button small { background: #f1f5f9; border-radius: 999px; padding: 0 8px; margin-inline-start: 4px; font-size: .8rem; }
.cls-bar button:hover { border-color: var(--primary); }
.cls-bar button.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.cls-bar button.on small { background: rgba(255,255,255,.2); }
.cls-bar button.g-י { border-inline-start: 6px solid #7c3aed; }
.cls-bar button.g-יא { border-inline-start: 6px solid #0ea5e9; }
.cls-bar button.g-יב { border-inline-start: 6px solid #f59e0b; }
.cls-bar button.add { border-style: dashed; color: var(--primary-ink); }
.cls-now { background: linear-gradient(135deg, #ede9fe, #e0f2fe); border: 1px solid #c4b5fd; border-radius: 14px; padding: 8px 16px; margin-bottom: 12px; font-size: .95rem; }
.cls-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.cls-card { border-top: 6px solid var(--primary); margin: 0; }
.cls-card.g-י { border-top-color: #7c3aed; } .cls-card.g-יא { border-top-color: #0ea5e9; } .cls-card.g-יב { border-top-color: #f59e0b; }
.cls-card.arch { opacity: .75; }
.cls-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.cls-head h3 { margin: 0; font-size: 1.3rem; }
.cls-head small { color: var(--muted); font-weight: 700; }
.cls-grade { background: var(--accent-soft); color: #5b21b6; border-radius: 999px; padding: 1px 10px; font-weight: 800; font-size: .82rem; }
.cls-card.g-יא .cls-grade { background: var(--primary-soft); color: var(--primary-ink); }
.cls-card.g-יב .cls-grade { background: var(--warn-soft); color: #92400e; }
.cls-stats { color: var(--ink-soft); margin: 6px 0 10px; font-size: .95rem; }
.cls-code { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; background: #f8fafc; border: 2px dashed #c4b5fd; border-radius: 14px; padding: 8px 14px; margin-bottom: 10px; }
.cls-code small { display: block; color: var(--muted); font-weight: 700; font-size: .78rem; }
.cls-code b { font-size: 1.7rem; letter-spacing: 5px; color: #5b21b6; }
.cls-arch-note { color: var(--muted); margin: 0; }
.cls-fix { border: 2px solid #fcd34d; background: #fffbeb; }
.cls-archive { margin-top: 18px; }
.cls-archive summary { cursor: pointer; font-weight: 800; color: var(--ink-soft); margin-bottom: 10px; }
.cls-sw { background: var(--accent-soft); border-radius: 10px; padding: 2px 10px; margin-bottom: 6px; }
.mv-cls { padding: 4px 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: .9rem; max-width: 170px; }

/* ---- משחק בתוך שאלון (type: game) ---- */
.question.game-q { background: linear-gradient(135deg, #f5f3ff, #ecfeff); border-radius: 18px; padding: 14px 16px; border: 2px solid #ddd6fe; }
.question.game-q .g-w { display: inline-block; margin-inline-start: 6px; background: #7c3aed; color: #fff; border-radius: 99px; padding: 1px 10px; font-size: .8rem; vertical-align: middle; }
.nq-game { background: #fff; border-radius: 16px; padding: 12px; box-shadow: 0 6px 18px rgba(124,58,237,.12); }
.feedback.partial { background: #fffbeb; border: 1px solid #fcd34d; }
.feedback.partial .fb-title { color: #92400e; }
.game-res .g-stars { letter-spacing: 2px; margin-inline-start: 6px; }
.game-res small { color: var(--muted); font-weight: 700; }
.game-res .g-sum { font-size: .92rem; color: var(--ink-soft); margin: 4px 0; }
.g-rev-box ul { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 4px; }

/* ---- טאבלט מוגבל בבחינה: כפתור לכל שאלה ---- */
.aid-btn { float: left; margin: -2px 0 6px 8px; border: 2px solid #c7d2fe; background: #eef2ff; color: #3730a3; border-radius: 99px; padding: 3px 12px; font: 800 .88rem "Assistant", sans-serif; cursor: pointer; transition: transform .15s, box-shadow .2s; }
.aid-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(79,70,229,.2); }
.aid-btn.used { background: #dcfce7; border-color: #86efac; color: #166534; }
.aid-btn.dead { background: #f1f5f9; border-color: #e2e8f0; color: #94a3b8; cursor: not-allowed; }
.question.aided { box-shadow: inset 4px 0 0 #22c55e; }
.unlock.timeup { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }
.unlock.aidsum { background: #eef2ff; border-color: #c7d2fe; color: #3730a3; }

/* ---- תמונה בתוך קטע ההסבר ---- */
.rd-fig { float: left; width: min(240px, 42%); margin: 4px 0 12px 18px; }
.rd-fig img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 18px; box-shadow: 0 12px 26px rgba(15,23,42,.22); display: block; transition: transform .4s; }
.rd-fig img:hover { transform: scale(1.03) rotate(-1deg); }
.rd-fig figcaption { font-size: .82rem; color: var(--muted); text-align: center; margin-top: 4px; }
.reading::after { content: ""; display: block; clear: both; }
@media (max-width: 560px) { .rd-fig { float: none; width: 70%; margin: 0 auto 12px; } }

/* בחינה בחומר סגור (012_exam_reading): במקום קטע המידע */
.reading.closed-book { background: #fff7ed; border-color: #fed7aa; color: #9a3412; font-weight: 600; }

/* טאבלט פתוח בבחינה מוגבלת: הבחינה מוסתרת מאחוריו */
html.nq-aid-open #main, html.nq-aid-open .nq-hud { filter: blur(18px); opacity: .35; pointer-events: none; user-select: none; }
