/* ===== תרגול פלוס — עיצוב ===== */
:root {
  --ink: #0A1020;
  --ink-2: #131C31;
  --paper: #F3F6FC;
  --card: #FFFFFF;
  --line: #DDE5F2;
  --text: #0C1526;
  --muted: #56657F;
  --accent: #2563EB;
  --accent-2: #0EA5B7;
  --ok: #128A4B;
  --ok-bg: #E4F7EC;
  --bad: #C81E3A;
  --bad-bg: #FDE8EC;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(12,21,38,.06), 0 10px 30px -12px rgba(12,21,38,.18);
  --shadow-lg: 0 20px 50px -20px rgba(12,21,38,.35);
}

[data-theme="dark"] {
  --ink: #05090F;
  --ink-2: #0D1524;
  --paper: #070C16;
  --card: #101A2C;
  --line: #23324C;
  --text: #F2F6FC;
  --muted: #9FB0C9;
  --ok: #3DDC84;
  --ok-bg: #0C2A1C;
  --bad: #FF6B85;
  --bad-bg: #2E0E17;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 14px 34px -14px rgba(0,0,0,.7);
  --shadow-lg: 0 26px 60px -24px rgba(0,0,0,.8);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: "Heebo", "Assistant", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--paper);
  color: var(--text);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  direction: rtl;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: min(1120px, 92vw); margin: 0 auto; }

/* ---------- top bar ---------- */
.topbar {
  background: var(--ink);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 3px solid var(--accent);
}
.topbar .inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 21px; color: #fff; letter-spacing: -.3px; }
.brand:hover { text-decoration: none; }
.brand .mark {
  width: 36px; height: 36px; border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #2563EB, #0EA5B7);
  font-size: 19px; box-shadow: 0 4px 14px rgba(37,99,235,.5);
}
.spacer { flex: 1; }
.who { font-size: 14px; color: #C8D6EC; }
.who b { color: #fff; font-weight: 700; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1.5px solid transparent; border-radius: 12px;
  padding: 11px 20px; font-size: 16px; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: .15s transform, .15s box-shadow, .15s background;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px -8px var(--accent); }
.btn-primary:hover { background: #1D4ED8; }
.btn-ghost { background: transparent; color: #DCE7F7; border-color: #33445F; }
.btn-ghost:hover { background: #1B263C; color: #fff; }
.btn-light { background: var(--card); color: var(--text); border-color: var(--line); }
.btn-light:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 8px 14px; font-size: 14px; border-radius: 10px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 11px; border: 1.5px solid #33445F;
  background: transparent; color: #DCE7F7; display: grid; place-items: center; cursor: pointer; font-size: 17px;
}
.icon-btn:hover { background: #1B263C; }

/* ---------- login ---------- */
.login-page {
  min-height: 100vh;
  display: grid; place-items: center;
  background:
    radial-gradient(900px 500px at 15% 0%, rgba(37,99,235,.22), transparent 60%),
    radial-gradient(800px 500px at 90% 100%, rgba(14,165,183,.20), transparent 60%),
    var(--ink);
  padding: 24px;
}
.login-card {
  width: min(460px, 100%);
  background: var(--card);
  border-radius: 26px;
  padding: 36px 34px 30px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
  text-align: center;
}
.login-card .mark {
  width: 62px; height: 62px; margin: 0 auto 16px; border-radius: 18px;
  display: grid; place-items: center; font-size: 30px;
  background: linear-gradient(135deg, #2563EB, #0EA5B7);
  box-shadow: 0 12px 28px -8px rgba(37,99,235,.6);
}
.login-card h1 { margin: 0 0 4px; font-size: 27px; letter-spacing: -.5px; }
.login-card p.sub { margin: 0 0 24px; color: var(--muted); font-size: 15.5px; }
.code-input {
  width: 100%;
  font-family: "Heebo", monospace;
  font-size: 24px; font-weight: 800; letter-spacing: 3px;
  text-align: center; text-transform: uppercase;
  padding: 16px 14px; border-radius: 14px;
  border: 2px solid var(--line); background: var(--paper); color: var(--text);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.code-input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(37,99,235,.16); background: var(--card); }
.login-card .btn { width: 100%; margin-top: 14px; padding: 14px; font-size: 17px; }
.err {
  background: var(--bad-bg); color: var(--bad); border: 1px solid rgba(200,30,58,.3);
  padding: 11px 14px; border-radius: 12px; font-size: 15px; font-weight: 600; margin-bottom: 16px; text-align: right;
}
.login-foot { margin-top: 20px; font-size: 13px; color: var(--muted); }

/* ---------- page head ---------- */
.page { padding: 30px 0 60px; }
.page-head { margin-bottom: 24px; }
.page-head h1 { margin: 0 0 6px; font-size: 32px; letter-spacing: -.8px; }
.page-head p { margin: 0; color: var(--muted); }

.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }

/* ---------- stats strip ---------- */
.stat-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 28px; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px 18px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 14px;
}
.stat .n { font-size: 27px; font-weight: 800; letter-spacing: -1px; line-height: 1; }
.stat .l { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.stat .dot { width: 8px; height: 44px; border-radius: 8px; background: var(--accent); }

/* ---------- subject grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.subject-card {
  --accent: #2563EB;
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: .18s transform, .18s box-shadow, .18s border-color;
  display: block; color: inherit;
}
.subject-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 5px;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 45%, #fff));
}
.subject-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--accent); text-decoration: none; }
.subject-card .ico {
  width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center;
  font-size: 25px; background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  margin-bottom: 14px;
}
.subject-card h3 { margin: 0 0 4px; font-size: 21px; letter-spacing: -.3px; }
.subject-card .d { color: var(--muted); font-size: 14.5px; min-height: 42px; }
.subject-card .meta { display: flex; gap: 14px; font-size: 13px; color: var(--muted); margin: 12px 0 12px; }
.bar { height: 8px; border-radius: 99px; background: color-mix(in srgb, var(--text) 8%, transparent); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: var(--accent); transition: width .5s ease; }

/* ---------- topic list ---------- */
.topic-list { display: grid; gap: 12px; }
.topic-row {
  display: flex; align-items: center; gap: 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px 18px; box-shadow: var(--shadow); transition: .15s;
}
.topic-row:hover { border-color: var(--accent); transform: translateX(-2px); }
.topic-row .idx {
  width: 40px; height: 40px; border-radius: 12px; flex: 0 0 auto;
  display: grid; place-items: center; font-weight: 800;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
}
.topic-row .tl { flex: 1; min-width: 0; }
.topic-row .tl h4 { margin: 0 0 3px; font-size: 17.5px; }
.topic-row .tl .small { font-size: 13px; color: var(--muted); }
.topic-row .pct { font-weight: 800; font-size: 14px; color: var(--accent); min-width: 42px; text-align: center; }

/* ---------- practice ---------- */
.play-shell { max-width: 820px; margin: 0 auto; }
.play-top {
  display: flex; align-items: center; gap: 14px; margin-bottom: 16px;
}
.play-top .qcount { font-weight: 800; font-size: 15px; color: var(--muted); }
.play-top .timer {
  font-variant-numeric: tabular-nums; font-weight: 800; color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  padding: 4px 12px; border-radius: 10px; font-size: 14px;
}
.play-progress { height: 10px; background: color-mix(in srgb, var(--text) 8%, transparent); border-radius: 99px; overflow: hidden; margin-bottom: 22px; }
.play-progress > i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #fff)); transition: width .35s ease; }

.qcard {
  background: var(--card); border: 1px solid var(--line); border-radius: 22px;
  box-shadow: var(--shadow-lg); padding: 28px;
}
.qcard .passage {
  background: color-mix(in srgb, var(--accent) 7%, var(--paper));
  border-right: 4px solid var(--accent);
  border-radius: 12px; padding: 16px 18px; margin-bottom: 20px;
  font-size: 16.5px; line-height: 1.75; color: var(--text);
}
.qtext { font-size: 22px; font-weight: 700; line-height: 1.55; margin: 0 0 22px; letter-spacing: -.2px; }
.qtext b { color: var(--accent); }

.answers { display: grid; gap: 11px; }
.ans {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: right;
  background: var(--card); border: 2px solid var(--line); border-radius: 14px;
  padding: 15px 16px; font-size: 17px; font-family: inherit; color: var(--text);
  cursor: pointer; transition: .14s; font-weight: 500;
}
.ans .k {
  width: 32px; height: 32px; flex: 0 0 auto; border-radius: 9px;
  display: grid; place-items: center; font-weight: 800; font-size: 15px;
  background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--muted);
  transition: .14s;
}
.ans:hover:not(:disabled) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 5%, var(--card)); }
.ans:hover:not(:disabled) .k { background: var(--accent); color: #fff; }
.ans:disabled { cursor: default; }
.ans.correct { border-color: var(--ok); background: var(--ok-bg); }
.ans.correct .k { background: var(--ok); color: #fff; }
.ans.wrong { border-color: var(--bad); background: var(--bad-bg); }
.ans.wrong .k { background: var(--bad); color: #fff; }

.feedback { margin-top: 20px; display: none; }
.feedback.show { display: block; animation: pop .2s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.fx-head { font-weight: 800; font-size: 18px; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.fx-head.ok { color: var(--ok); }
.fx-head.bad { color: var(--bad); }
.fx-explain {
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; font-size: 16px; color: var(--text); line-height: 1.65;
}
.play-actions { display: flex; gap: 10px; justify-content: space-between; margin-top: 22px; }

/* ---------- result ---------- */
.result-card { text-align: center; padding: 40px 28px; }
.result-card .big { font-size: 64px; font-weight: 800; letter-spacing: -3px; line-height: 1; }
.result-card .lbl { color: var(--muted); margin-bottom: 18px; }

/* ---------- admin ---------- */
.table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); font-size: 14.5px; }
.table th { background: var(--ink); color: #fff; text-align: right; padding: 11px 12px; font-weight: 700; font-size: 13px; }
.table td { padding: 10px 12px; border-top: 1px solid var(--line); }
.table tr:hover td { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; }
.pill.on { background: var(--ok-bg); color: var(--ok); }
.pill.off { background: var(--bad-bg); color: var(--bad); }
.code-cell { font-family: "Heebo", monospace; font-weight: 800; letter-spacing: 1px; }

.admin-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; align-items: end; background: var(--card); padding: 16px; border-radius: 14px; border: 1px solid var(--line); margin-bottom: 18px; }
.admin-form label { font-size: 12.5px; color: var(--muted); display: block; margin-bottom: 4px; font-weight: 600; }
.admin-form input, .admin-form select {
  width: 100%; padding: 9px 11px; border-radius: 10px; border: 1.5px solid var(--line);
  font-family: inherit; font-size: 14px; background: var(--paper); color: var(--text);
}

/* ---------- misc ---------- */
.empty { text-align: center; color: var(--muted); padding: 40px; }
.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 26px 0 40px; }
.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 12px;
  font-weight: 700; font-size: 15px; opacity: 0; pointer-events: none; transition: .25s; z-index: 99;
  box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 620px) {
  body { font-size: 16px; }
  .page-head h1 { font-size: 25px; }
  .qcard { padding: 20px 16px; }
  .qtext { font-size: 19px; }
  .stat-strip { grid-template-columns: 1fr 1fr; }
  .stat-strip .stat:last-child { grid-column: span 2; }
  .topic-row .pct { display: none; }
  .topbar .who { display: none; }
  .login-card { padding: 28px 20px; }
}


/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 28px; align-items: center;
  background: linear-gradient(135deg, #0A1020 0%, #10203C 55%, #0B2C4A 100%);
  border-radius: 26px; padding: 34px 36px; margin-bottom: 40px;
  box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: auto -60px -120px auto; width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(14,165,183,.35), transparent 65%); pointer-events: none;
}
.hero-text { color: #fff; position: relative; z-index: 1; }
.hero-kicker {
  display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: .6px;
  color: #7DD3FC; background: rgba(125,211,252,.12); border: 1px solid rgba(125,211,252,.3);
  padding: 5px 12px; border-radius: 99px; margin-bottom: 16px;
}
.hero h1 { margin: 0 0 14px; font-size: 42px; line-height: 1.12; letter-spacing: -1.4px; }
.hero h1 .hl { color: #22D3EE; }
.slogan {
  font-size: 18px; color: #C7D8F0; margin-bottom: 22px; min-height: 28px;
  transition: opacity .3s ease; font-weight: 500;
}
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 26px; }
.hero-cta .btn-light { background: #fff; }
.hero-stats { display: flex; gap: 26px; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats b { font-size: 26px; letter-spacing: -1px; }
.hero-stats span { font-size: 12.5px; color: #9DB3D2; }
.hero-art img { width: 100%; height: auto; border-radius: 18px; display: block; }

.section-title { font-size: 25px; margin: 0 0 6px; letter-spacing: -.6px; }
.section-sub { color: var(--muted); margin: 0 0 20px; font-size: 15.5px; }
.card-foot { margin-top: 10px; font-size: 12.5px; color: var(--muted); font-weight: 700; }

/* ---------- tips ---------- */
.tips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 32px 0; }
.tip {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 18px; box-shadow: var(--shadow);
}
.tip span { font-size: 22px; }
.tip b { display: block; margin: 8px 0 4px; font-size: 16.5px; }
.tip p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.6; }

/* ---------- track cards ---------- */
.tracks .track-card {
  display: block; background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: 20px; box-shadow: var(--shadow);
  transition: .16s transform, .16s border-color, .16s box-shadow; color: inherit;
  border-right: 5px solid var(--accent);
}
.tracks .track-card:hover {
  transform: translateY(-3px); border-color: var(--accent);
  box-shadow: var(--shadow-lg); text-decoration: none;
}
.track-head { display: flex; justify-content: space-between; align-items: baseline; }
.track-name { font-size: 20px; font-weight: 800; letter-spacing: -.4px; }
.track-pct { font-size: 14px; font-weight: 800; color: var(--accent); }
.track-sub { font-size: 14px; color: var(--muted); margin: 6px 0 10px; min-height: 40px; }
.track-meta { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.track-go { margin-top: 12px; font-size: 13.5px; font-weight: 700; color: var(--accent); }

.action-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.login-slogan {
  font-size: 14.5px; color: var(--accent); font-weight: 700;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border-radius: 10px; padding: 9px 12px; margin-bottom: 18px;
}
.login-note {
  margin-top: 14px; font-size: 12.5px; line-height: 1.5; color: var(--muted);
  border-top: 1px dashed var(--line); padding-top: 12px;
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding: 26px 22px; }
  .hero h1 { font-size: 30px; }
  .hero-art { order: -1; }
  .tips { grid-template-columns: 1fr; }
  .hero-stats { gap: 18px; }
}


/* ---------- תמונה בשאלה ---------- */
.qimg {
  display: block; width: min(420px, 100%); height: auto; margin: 0 auto 18px;
  border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 6px;
}

/* ---------- אנימציות ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.subject-card, .track-card, .topic-row, .tip { animation: fadeUp .45s ease backwards; }
.subject-card:nth-child(1) { animation-delay: .02s; }
.subject-card:nth-child(2) { animation-delay: .06s; }
.subject-card:nth-child(3) { animation-delay: .10s; }
.subject-card:nth-child(4) { animation-delay: .14s; }
.subject-card:nth-child(5) { animation-delay: .18s; }
.track-card:nth-child(1) { animation-delay: .02s; }
.track-card:nth-child(2) { animation-delay: .05s; }
.track-card:nth-child(3) { animation-delay: .08s; }
.track-card:nth-child(4) { animation-delay: .11s; }
.track-card:nth-child(5) { animation-delay: .14s; }
.track-card:nth-child(6) { animation-delay: .17s; }
.track-card:nth-child(7) { animation-delay: .20s; }
.topic-row:nth-child(2) { animation-delay: .04s; }
.topic-row:nth-child(3) { animation-delay: .08s; }
.topic-row:nth-child(4) { animation-delay: .12s; }
.topic-row:nth-child(5) { animation-delay: .16s; }
.topic-row:nth-child(6) { animation-delay: .20s; }
.topic-row:nth-child(7) { animation-delay: .24s; }

@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.hero-float { animation: floaty 8s ease-in-out infinite; }

@keyframes flashOk {
  0% { box-shadow: var(--shadow-lg); }
  40% { box-shadow: 0 0 0 6px rgba(22,163,74,.18), var(--shadow-lg); }
  100% { box-shadow: var(--shadow-lg); }
}
.qcard.flash-ok { animation: flashOk .55s ease; }

.confetti {
  position: fixed; top: 12%; width: 9px; height: 14px; border-radius: 2px;
  opacity: .95; z-index: 999; pointer-events: none;
  animation: confDrop 1.05s cubic-bezier(.3,.7,.4,1) forwards;
}
@keyframes confDrop {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(72vh) rotate(420deg); opacity: 0; }
}

@keyframes pulseSoft { 0%,100% { transform: scale(1); } 50% { transform: scale(1.04); } }
.hero-stats b { animation: pulseSoft 4s ease-in-out infinite; }

/* ---------- מורה ---------- */
.mini-bar { height: 7px; border-radius: 99px; background: color-mix(in srgb, var(--text) 8%, transparent); overflow: hidden; min-width: 70px; }
.mini-bar > i { display: block; height: 100%; border-radius: 99px; background: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .subject-card, .track-card, .topic-row, .tip, .hero-art img, .hero-stats b { animation: none !important; }
  .confetti { display: none; }
}


/* ---------- רצועת תמונות ---------- */
.photo-band { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 4px 0 10px; }
.photo-band figure {
  margin: 0; position: relative; overflow: hidden; border-radius: 18px;
  border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--card);
}
.photo-band img {
  display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover;
  transition: transform .5s ease;
}
.photo-band figure:hover img { transform: scale(1.06); }
.photo-band figcaption {
  position: absolute; inset: auto 0 0 0; padding: 26px 14px 12px;
  font-size: 14px; font-weight: 700; color: #fff;
  background: linear-gradient(to top, rgba(6,12,24,.82), transparent);
}
.photo-credit { font-size: 11.5px; color: var(--muted); margin: 0 0 26px; }

@media (max-width: 760px) {
  .photo-band { grid-template-columns: 1fr; }
}


/* ---------- הירו: תמונה + איור צף ---------- */
.hero-art { position: relative; padding-block-end: 34px; }
.hero-photo { position: relative; }
.hero-photo > img {
  display: block; width: 100%; aspect-ratio: 4 / 3.5; object-fit: cover;
  border-radius: 26px; border: 1px solid var(--line);
  box-shadow: 0 28px 60px -26px rgba(15,23,42,.45);
}
.hero-chip {
  position: absolute; inset-block-start: 16px; inset-inline-start: 16px;
  display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center;
  background: rgba(255,255,255,.94); border: 1px solid rgba(15,23,42,.06);
  border-radius: 14px; padding: 9px 13px; box-shadow: 0 12px 26px -12px rgba(15,23,42,.3);
  backdrop-filter: blur(8px);
}
.hero-chip .dot { grid-row: 1 / span 2; width: 9px; height: 9px; border-radius: 50%; background: #16A34A; box-shadow: 0 0 0 4px rgba(22,163,74,.16); }
.hero-chip b { font-size: 13px; color: var(--text); line-height: 1.2; }
.hero-chip small { font-size: 11px; color: var(--muted); line-height: 1.2; }
.hero-float {
  position: absolute; inset-inline-start: -28px; inset-block-end: -6px;
  width: 208px; padding: 10px; background: var(--card);
  border: 1px solid var(--line); border-radius: 20px;
  box-shadow: 0 22px 44px -20px rgba(15,23,42,.38);
}
.hero-float img { display: block; width: 100%; height: auto; border-radius: 14px; }

@media (max-width: 860px) {
  .hero-art { padding-block-end: 26px; margin-block-start: 6px; }
  .hero-float { width: 150px; inset-inline-start: -12px; }
}


/* ---------- דרך הפתרון ---------- */
.fx-e { margin: 0 0 12px; font-size: 15px; color: var(--text); }
.sol {
  margin: 12px 0 14px; padding: 14px 16px; border-radius: 14px;
  background: color-mix(in srgb, #2563EB 6%, var(--card));
  border: 1px solid color-mix(in srgb, #2563EB 16%, transparent);
}
.sol-h {
  font-size: 13.5px; font-weight: 800; letter-spacing: .2px; margin-bottom: 8px;
  color: #1D4ED8; display: flex; align-items: center; gap: 6px;
}
.sol-h::before { content: "💡"; }
.steps { margin: 0; padding-inline-start: 22px; }
.steps li { margin: 0 0 7px; font-size: 14.5px; line-height: 1.55; color: var(--text); }
.steps li::marker { color: #2563EB; font-weight: 800; }
.retry { margin-top: 4px; }
.icon-btn.off { opacity: .45; }


/* ---------- יעד יומי ורצף ---------- */
.goal { margin: 18px 0 4px; max-width: 420px; }
.goal-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); margin-bottom: 7px; }
.goal-top b { color: var(--text); }
.streak { opacity: .55; font-weight: 700; }
.streak.on { opacity: 1; color: #EA580C; }
.goal-bar { height: 8px; border-radius: 99px; background: color-mix(in srgb, var(--text) 9%, transparent); overflow: hidden; }
.goal-bar > i {
  display: block; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, #2563EB, #22D3EE);
  transition: width .6s ease;
}

/* ---------- נושאים לחזק ---------- */
.weak-box { margin: 26px 0 30px; padding: 20px 20px 8px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: var(--shadow); }
.weak-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.weak-head h2 { margin: 0 0 4px; font-size: 19px; }
.weak-head p { margin: 0; font-size: 13.5px; color: var(--muted); max-width: 460px; }
.weak-list { display: flex; flex-direction: column; }
.weak-row {
  display: grid; grid-template-columns: minmax(150px, 1.6fr) 1fr auto auto;
  align-items: center; gap: 14px; padding: 11px 0; border-top: 1px solid var(--line);
}
.weak-row:first-child { border-top: none; }
.weak-meta b { display: block; font-size: 15px; }
.weak-meta small { font-size: 12px; color: var(--muted); }
.weak-bar { height: 7px; border-radius: 99px; background: color-mix(in srgb, var(--text) 8%, transparent); overflow: hidden; }
.weak-bar > i { display: block; height: 100%; border-radius: 99px; }
.weak-pct { font-weight: 800; font-size: 14px; min-width: 42px; text-align: center; }

@media (max-width: 640px) {
  .weak-row { grid-template-columns: 1fr auto; row-gap: 8px; }
  .weak-bar { grid-column: 1 / -1; }
  .weak-pct { grid-row: 1; }
}

.login-hours{display:inline-block;margin-top:6px;font-size:12px;opacity:.7;line-height:1.5}


/* ===== הסבר מפורט אחרי טעות ===== */
.why {
  background: #fff5f5; border: 1px solid #f3c9c9; border-radius: 14px;
  padding: 12px 14px; margin: 0 0 12px;
}
.why-h { font-weight: 800; color: #b4232a; font-size: 14.5px; margin-bottom: 5px; }
.why p { margin: 0; font-size: 14.5px; line-height: 1.6; color: #4a2b2b; }
.rule {
  background: #f2f7ff; border: 1px solid #cddcf7; border-radius: 14px;
  padding: 12px 14px; margin: 12px 0 14px;
}
.rule-h { font-weight: 800; color: #1d4ed8; font-size: 14.5px; margin-bottom: 5px; }
.rule p { margin: 0; font-size: 14.5px; line-height: 1.6; color: #22324d; }
[data-theme="dark"] .why { background: #3a1e22; border-color: #6b3239; }
[data-theme="dark"] .why p { color: #f3d9db; }
[data-theme="dark"] .rule { background: #1b2740; border-color: #2f4570; }
[data-theme="dark"] .rule p { color: #d8e2f7; }

/* ============================================================
   מובייל: מניעת גלילה אופקית ותצוגה נוחה עד רוחב 760px
   ============================================================ */
html, body { overflow-x: hidden; overflow-x: clip; }
.wrap { max-width: 100%; }
.qtext, .ans, .passage, .fx-explain, .fx-head, .guide, .tip, .rule p, .why p,
.section-sub, .topic-row .tl, .who, .slogan { overflow-wrap: anywhere; word-break: break-word; }
img, video, iframe, svg { max-width: 100%; }
table { max-width: 100%; }

@media (max-width: 760px) {
  .wrap { width: 100%; padding-inline: 14px; }
  .topbar .inner { flex-wrap: wrap; row-gap: 8px; gap: 10px; padding: 10px 0; }
  .play-top { flex-wrap: wrap; row-gap: 8px; }
  .play-shell { max-width: 100%; }
  .page { padding-top: 16px; }
  .qcard { border-radius: 18px; }
  .qtext { font-size: 18.5px; line-height: 1.6; }
  .ans { font-size: 16px; padding: 13px 14px; gap: 10px; }
  .topic-row { flex-wrap: wrap; row-gap: 8px; }
  .topic-row .bar, .mini-bar { min-width: 0; flex: 1 1 100%; }
  .stat-strip { grid-template-columns: 1fr; gap: 10px; }
  .stat-strip .stat:last-child { grid-column: auto; }
  .tips, .photo-band, .grid-3 { grid-template-columns: 1fr; }
  .btn { max-width: 100%; white-space: normal; }
  .section-title { font-size: 22px; }
  .hero { grid-template-columns: 1fr; padding: 22px 18px; }
  .hero h1 { font-size: 27px; letter-spacing: -.5px; }
  .hero-float { display: none; }
  .login-card { width: 100%; }
}

@media (max-width: 420px) {
  body { font-size: 15px; }
  .qtext { font-size: 17.5px; }
  .brand { font-size: 18px; }
  .stat { padding: 10px 8px; }
}
