/* ==========================================================================
   אזור הלימוד — נבנה על הטוקנים של site.css
   ========================================================================== */

body.learn { background: #FAFBFA; }

/* ---------- כפתור עגול + מגירה ---------- */
.fab {
  position: fixed; z-index: 70;
  /* env — אחרת בספארי באייפון הכפתור יושב מתחת לסרגל הכתובות התחתון */
  bottom: calc(24px + env(safe-area-inset-bottom));
  inset-inline-end: calc(24px + env(safe-area-inset-right));
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--green); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 8px 26px -8px rgba(15,70,80,.65);
  transition: transform .3s var(--ease), background .25s;
}
/* z-index של ה-FAB גבוה מזה של תפריט הנייד — בלי זה הוא ריחף מעליו כשנפתח */
body.menu-open .fab { opacity: 0; pointer-events: none; }
.fab { transition: transform .3s var(--ease), background .25s, opacity .2s; }
.fab:hover { background: var(--green-deep); transform: scale(1.06); }
.fab:active { transform: scale(.97); }
.fab svg { width: 24px; height: 24px; stroke-width: 2.1; }
.fab__bars { position: relative; width: 22px; height: 16px; }
.fab__bars span {
  position: absolute; inset-inline: 0; height: 2.4px; border-radius: 2px; background: currentColor;
  transition: transform .32s var(--ease), opacity .2s var(--ease);
}
.fab__bars span:nth-child(1) { top: 0; }
.fab__bars span:nth-child(2) { top: 6.8px; }
.fab__bars span:nth-child(3) { top: 13.6px; }
.fab.is-open .fab__bars span:nth-child(1) { transform: translateY(6.8px) rotate(45deg); }
.fab.is-open .fab__bars span:nth-child(2) { opacity: 0; }
.fab.is-open .fab__bars span:nth-child(3) { transform: translateY(-6.8px) rotate(-45deg); }
.fab__label {
  position: absolute; inset-inline-end: 72px; top: 50%; transform: translateY(-50%);
  background: var(--ink); color: #fff; font-size: .8rem; font-weight: 600;
  padding: 7px 14px; border-radius: 99px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .22s var(--ease);
}
.fab:hover .fab__label { opacity: 1; }
.fab.is-open .fab__label { display: none; }

.scrim {
  position: fixed; inset: 0; z-index: 65;
  background: rgba(20,37,30,.42);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none; transition: opacity .3s var(--ease);
}
.scrim.is-open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; z-index: 68; top: 0; bottom: 0;
  inset-inline-end: 0; width: min(340px, 86vw);
  background: #fff; box-shadow: -18px 0 50px -24px rgba(20,37,30,.45);
  transform: translateX(100%);
  transition: transform .38s var(--ease);
  display: flex; flex-direction: column;
  overflow-y: auto;
}
html[dir="rtl"] .drawer { transform: translateX(-100%); }
.drawer.is-open, html[dir="rtl"] .drawer.is-open { transform: none; }

.drawer__head { padding: 26px 24px 20px; border-bottom: 1px solid var(--line); }
.drawer__title { font-size: 1.12rem; margin-bottom: 4px; }
.drawer__sub { font-size: .82rem; color: var(--ink-faint); }

.drawer__nav { padding: 14px 14px 20px; display: flex; flex-direction: column; gap: 3px; }
.drawer__item {
  display: flex; align-items: center; gap: 13px;
  padding: 13px 14px; border-radius: 12px; text-align: start; width: 100%;
  font-size: .95rem; font-weight: 500; color: var(--ink-soft);
  transition: all .2s var(--ease);
}
.drawer__item svg { width: 18px; height: 18px; stroke-width: 1.85; color: var(--ink-faint); transition: color .2s; }
.drawer__item:hover { background: var(--sage); color: var(--ink); }
.drawer__item:hover svg { color: var(--green); }
.drawer__item[aria-current="true"] { background: var(--green-tint); color: var(--green); font-weight: 700; }
.drawer__item[aria-current="true"] svg { color: var(--green); }
.drawer__count {
  margin-inline-start: auto; font-size: .74rem; font-weight: 700;
  color: var(--ink-faint); background: var(--sage); padding: 2px 9px; border-radius: 99px;
}
.drawer__item[aria-current="true"] .drawer__count { background: #fff; color: var(--green); }

/* הכפתור העגול יושב על פינת המגירה — משאירים לו מקום */
.drawer__foot { margin-top: auto; padding: 20px 24px 26px; padding-inline-end: 96px; border-top: 1px solid var(--line); }
.drawer__progress-label { display: flex; justify-content: space-between; font-size: .8rem; color: var(--ink-faint); margin-bottom: 8px; }
.drawer__progress-label strong { color: var(--green); font-weight: 700; }

/* ---------- סרגל ארבעת האזורים ----------
   נדבק מתחת לכותרת האתר. במסך צר גולל לרוחב במקום להישבר. */
.area-nav {
  /* נמדד ב-js/areas.js — קודם היה 58px קשיח מול הדר של 70px */
  position: sticky; top: var(--head-h, 58px); z-index: 55;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid var(--line);
}
/* לא overflow-x כאן — הוא היה חותך את התפריט הנפתח.
   הגלילה לרוחב מופעלת רק במסך צר, שם ממילא אין תפריט נפתח. */
.area-nav__inner { display: flex; align-items: stretch; gap: 4px; }
.area-nav__inner::-webkit-scrollbar { display: none; }
.area-nav__item {
  display: flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 14px 16px; font-size: .95rem; font-weight: 600;
  color: var(--ink-soft); border-bottom: 2.5px solid transparent;
  transition: color .18s, border-color .18s, background .18s;
}
.area-nav__item svg { width: 17px; height: 17px; stroke-width: 1.9; color: var(--ink-faint); transition: color .18s; }
.area-nav__item:hover { color: var(--ink); background: var(--sage); }
.area-nav__item:hover svg { color: var(--green); }
.area-nav__item[aria-current="page"] { color: var(--green); border-bottom-color: var(--green); font-weight: 700; }
.area-nav__item[aria-current="page"] svg { color: var(--green); }

@media (max-width: 700px) {
  .area-nav__inner { overflow-x: auto; scrollbar-width: none; }
  .area-nav__item { padding: 12px 13px; font-size: .88rem; gap: 6px; }
}

/* ---------- שלד האזור ---------- */
.learn-head { background: var(--sage); padding-block: 34px 30px; }
.learn-head__inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.crumb { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--ink-faint); margin-bottom: 8px; }
.crumb a { color: var(--ink-faint); }
.crumb a:hover { color: var(--green); }
.crumb svg { width: 13px; height: 13px; stroke-width: 2.2; }

.learn-main { padding-block: 46px 110px; }
.view { display: none; }
.view.is-active { display: block; animation: viewIn .34s var(--ease) both; }
@keyframes viewIn { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:none; } }

.view-head { margin-bottom: 34px; max-width: var(--measure); }
.view-head .lede { margin-top: 14px; }

/* ---------- Panel / cards ---------- */
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; box-shadow: var(--shadow-sm); }

.progress { height: 7px; border-radius: 99px; background: var(--line); overflow: hidden; margin-block: 16px 10px; }
.progress__fill { height: 100%; border-radius: 99px; background: var(--green); transition: width .6s var(--ease); }

/* ---------- Pills / tabs ---------- */
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; }
.pill {
  padding: 9px 17px; border-radius: 99px; font-family: var(--display);
  font-size: .87rem; font-weight: 700; color: var(--ink-soft);
  background: #fff; border: 1.5px solid var(--line); transition: all .22s var(--ease);
}
.pill:hover { border-color: var(--green); color: var(--green); }
.pill[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fff; }

.tabs { display: flex; gap: 8px; margin-bottom: 28px; flex-wrap: wrap; }
.tab {
  padding: 11px 20px; border-radius: 99px; font-family: var(--display);
  font-size: .93rem; font-weight: 700; color: var(--ink-soft);
  background: #fff; border: 1.5px solid var(--line); transition: all .22s var(--ease);
}
.tab:hover { border-color: var(--green); color: var(--green); }
.tab[aria-selected="true"] { background: var(--green); border-color: var(--green); color: #fff; box-shadow: 0 6px 18px -8px rgba(15,70,80,.5); }
.tabpanel { display: none; }
.tabpanel.is-active { display: block; animation: viewIn .3s var(--ease) both; }

/* ---------- Calculator ---------- */
.calc { display: grid; gap: 22px; }
@media (min-width:1000px) { .calc { grid-template-columns: 340px 1fr; align-items: start; } }

/* המרווחים קוצצו כי הסליידר עצמו גדל מ-6px ל-44px ומביא איתו אוויר */
.field { margin-bottom: 8px; }
.field:last-child { margin-bottom: 0; }
.field__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 0; }
.field__label { font-size: .88rem; color: var(--ink-soft); font-weight: 500; }
.field__value { font-family: var(--display); font-weight: 700; font-size: 1.02rem; font-variant-numeric: tabular-nums; }

.readout { display: grid; gap: 12px; margin-bottom: 16px; }
@media (min-width:560px) { .readout--3 { grid-template-columns: repeat(3,1fr); } }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; box-shadow: var(--shadow-sm); }
.stat-card--hero { background: var(--green-tint); border-color: var(--sage-deep); }
.stat-card__label { font-size: .8rem; color: var(--ink-faint); margin-bottom: 7px; }
.stat-card__num { font-family: var(--display); font-weight: 800; font-size: clamp(1.4rem,3vw,1.75rem); letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.stat-card__num--accent { color: var(--green); }
.stat-card__num--warm { color: var(--gold); }
.stat-card__note { font-size: .75rem; color: var(--ink-faint); margin-top: 6px; }

.chart-shell { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow-sm); }
.chart-canvas { position: relative; height: 290px; }
@media (min-width:1000px) { .chart-canvas { height: 340px; } }
.chart-canvas canvas { position: absolute; inset: 0; }
.chart-note { font-size: .77rem; color: var(--ink-faint); line-height: 1.7; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }

/* ---------- Articles ---------- */
.article-list { display: flex; flex-direction: column; gap: 11px; }
.article { background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: all .26s var(--ease); }
.article:hover { border-color: var(--sage-deep); box-shadow: var(--shadow-sm); }
.article.is-open { border-color: var(--green); box-shadow: var(--shadow-sm); }
.article__head { display: flex; align-items: flex-start; gap: 16px; padding: 20px 22px; width: 100%; text-align: start; }
.article__num {
  font-family: var(--display); font-weight: 800; font-size: .82rem; color: var(--green);
  background: var(--green-tint); width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center; flex: none; font-variant-numeric: tabular-nums;
}
.article.is-open .article__num { background: var(--green); color: #fff; }
.article__col { flex: 1; min-width: 0; }
.article__title { font-size: 1.04rem; margin-bottom: 5px; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.article__preview { font-size: .875rem; color: var(--ink-faint); line-height: 1.65; }
.article__chev { color: var(--ink-faint); padding-top: 6px; transition: transform .3s var(--ease); }
.article__chev svg { width: 18px; height: 18px; stroke-width: 2.1; }
.article.is-open .article__chev { transform: rotate(180deg); color: var(--green); }
.article__content { padding: 0 22px 24px; }
/* ---------- טקסט השיעור ---------- */
.prose {
  max-width: 60ch;                 /* מידה נוחה לקריאה בעברית */
  font-size: 1.06rem;
  line-height: 1.95;
  color: var(--ink);
  border-top: 1px solid var(--line);
  padding-top: 26px;
}
.prose > * + * { margin-top: 1.05em; }

.prose p { text-wrap: pretty; }
.prose > p:first-of-type {          /* פסקת פתיחה מובילה */
  font-size: 1.14rem; line-height: 1.85; color: var(--ink);
}

.prose h4 {
  font-family: var(--display); font-weight: 800;
  font-size: 1.2rem; line-height: 1.35; letter-spacing: -.02em;
  color: var(--ink);
  margin-top: 2.1em; padding-top: .1em;
  position: relative; padding-inline-start: 16px;
}
.prose h4::before {
  content: ''; position: absolute; inset-inline-start: 0; top: .28em; bottom: .28em;
  width: 4px; border-radius: 4px; background: var(--green);
}
.prose > h4:first-child { margin-top: 0; }
.prose h4 + p { margin-top: .7em; }

.prose ol, .prose ul { padding-inline-start: 0; list-style: none; }
.prose li { position: relative; padding-inline-start: 34px; margin-top: .7em; }
.prose ol { counter-reset: li; }
.prose ol > li::before {
  counter-increment: li; content: counter(li);
  position: absolute; inset-inline-start: 0; top: .28em;
  width: 24px; height: 24px; border-radius: 8px;
  background: var(--green-tint); color: var(--green);
  font-family: var(--display); font-weight: 800; font-size: .78rem;
  display: grid; place-items: center;
}
.prose ul > li::before {
  content: ''; position: absolute; inset-inline-start: 8px; top: .82em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--gold);
}

.prose strong { font-weight: 700; color: var(--ink); }

/* מונח מקצועי שהוזכר במרכאות במקור */
/* מונח מהמילון — לחיץ, מוצג כהגדרה בלי לעזוב את השיעור */
.prose .term {
  font: inherit; font-weight: 600; color: var(--green);
  border-bottom: 1.5px dotted var(--green); cursor: help;
  padding: 0; background: none; transition: background .18s var(--ease);
  border-radius: 3px;
}
.prose .term:hover { background: var(--green-tint); }

/* ---------- זמן קריאה ---------- */
.article__meta {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .76rem; color: var(--ink-faint); margin-top: 8px;
}
.article__meta svg { width: 13px; height: 13px; stroke-width: 2; }

/* ---------- לשיעור הבא ---------- */
.next-up {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: start;
  margin-top: 26px; padding: 16px 20px; border-radius: var(--r);
  background: var(--sage); border: 1px solid transparent;
  transition: all .24s var(--ease);
}
.next-up:hover { border-color: var(--green); background: var(--green-tint); }
.next-up__label { font-size: .74rem; color: var(--ink-faint); font-weight: 600; display: block; }
.next-up__title { font-family: var(--display); font-weight: 700; font-size: .97rem; color: var(--ink); }
.next-up > span { flex: 1; min-width: 0; }
.next-up svg { width: 18px; height: 18px; stroke-width: 2.2; color: var(--green); transition: transform .24s var(--ease); }
.next-up:hover svg { transform: translateX(-5px); }

/* ---------- הדפסה ---------- */
@media print {
  .site-head, .area-nav, .fab, .drawer, .scrim, .article__tools, .next-up, .learn-head__inner .btn { display: none !important; }
  .article { break-inside: avoid; border: none; }
  .prose { max-width: none; font-size: 11pt; }
  body.learn { background: #fff; }
}
.article__tools { display: flex; gap: 9px; margin-top: 22px; }

.chip-read {
  display: inline-flex; align-items: center; gap: 5px; font-size: .7rem; font-weight: 700;
  padding: 3px 10px; border-radius: 99px; color: var(--green); background: var(--green-tint);
}
.chip-read svg { width: 11px; height: 11px; stroke-width: 2.8; }

.tool-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 99px;
  font-family: var(--display); font-size: .84rem; font-weight: 700; color: var(--ink-soft);
  background: #fff; border: 1.5px solid var(--line); transition: all .22s var(--ease);
}
.tool-btn svg { width: 15px; height: 15px; stroke-width: 2; }
.tool-btn:hover { border-color: var(--green); color: var(--green); }
.tool-btn[aria-pressed="true"] { background: var(--green-tint); border-color: var(--green); color: var(--green); }
.tool-btn[aria-pressed="true"] svg { fill: currentColor; fill-opacity: .2; }

/* ---------- Search / dictionary ---------- */
.search { position: relative; margin-bottom: 26px; max-width: 440px; }
.search svg { position: absolute; inset-inline-start: 17px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; stroke-width: 2; color: var(--ink-faint); pointer-events: none; }
.search input {
  width: 100%; padding: 14px 48px 14px 18px; font: inherit; font-size: .96rem;
  border-radius: 99px; background: #fff; border: 1.5px solid var(--line); color: var(--ink);
  transition: border-color .22s, box-shadow .22s;
}
.search input::placeholder { color: var(--ink-faint); }
.search input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px var(--green-tint); }

.dict-grid { display: grid; gap: 13px; }
@media (min-width:680px) { .dict-grid { grid-template-columns: repeat(2,1fr); } }
@media (min-width:1060px) { .dict-grid { grid-template-columns: repeat(3,1fr); } }
.dict-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; transition: all .26s var(--ease); }
.dict-card:hover { border-color: var(--green); transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.dict-card__term { font-family: var(--display); font-weight: 700; font-size: 1rem; margin-bottom: 6px; }
.dict-card__def { font-size: .865rem; color: var(--ink-soft); line-height: 1.7; }

/* ---------- Steps ---------- */
.steps { display: flex; flex-direction: column; gap: 10px; }
.step {
  display: flex; align-items: flex-start; gap: 15px; padding: 19px 22px; width: 100%; text-align: start;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r); transition: all .24s var(--ease);
}
.step:hover { border-color: var(--sage-deep); box-shadow: var(--shadow-sm); }
.step.is-done { background: var(--sage); border-color: var(--sage-deep); }
.step__box {
  width: 24px; height: 24px; border-radius: 8px; flex: none; margin-top: 2px;
  border: 2px solid var(--line); display: grid; place-items: center; transition: all .24s var(--ease); background: #fff;
}
.step__box svg { width: 13px; height: 13px; stroke-width: 3.2; color: #fff; opacity: 0; transition: opacity .2s; }
.step.is-done .step__box { background: var(--green); border-color: var(--green); }
.step.is-done .step__box svg { opacity: 1; }
.step__num { font-family: var(--display); font-size: .82rem; font-weight: 800; color: var(--green); min-width: 22px; margin-top: 3px; font-variant-numeric: tabular-nums; }
.step__text { font-size: .96rem; line-height: 1.65; }
.step.is-done .step__text { color: var(--ink-faint); }

/* ---------- Tickers ---------- */
.ticker-group { margin-bottom: 36px; }
.ticker-group__head { margin-bottom: 14px; }
.ticker-group__name { font-size: 1.14rem; margin-bottom: 4px; }
.ticker-group__desc { font-size: .855rem; color: var(--ink-faint); }
.ticker-list { display: flex; flex-direction: column; gap: 9px; }
.ticker {
  display: flex; align-items: center; gap: 16px; padding: 16px 20px; width: 100%; text-align: start;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r); transition: all .24s var(--ease);
}
.ticker:hover { border-color: var(--green); box-shadow: var(--shadow-sm); transform: translateX(-3px); }
.ticker__col { flex: 1; min-width: 0; }
.ticker__name { font-size: .95rem; font-weight: 600; }
.ticker__note { font-size: .78rem; color: var(--ink-faint); margin-top: 2px; }
.ticker__num {
  font-family: var(--display); font-size: 1.02rem; font-weight: 800;
  font-variant-numeric: tabular-nums; letter-spacing: .02em;
  direction: ltr; unicode-bidi: isolate; color: var(--green);
}
.ticker__copy { color: var(--ink-faint); transition: color .24s; }
.ticker__copy svg { width: 17px; height: 17px; stroke-width: 2; }
.ticker:hover .ticker__copy { color: var(--green); }

/* ---------- Quiz ---------- */
.quiz-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: .86rem; color: var(--ink-faint); }
.quiz-meta__count { font-family: var(--display); font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.quiz-q { font-size: clamp(1.16rem,2.6vw,1.44rem); line-height: 1.45; margin-block: 24px 22px; }

.opt {
  display: flex; align-items: flex-start; gap: 14px; width: 100%; text-align: start;
  padding: 17px 20px; margin-bottom: 10px; border-radius: var(--r);
  background: #fff; border: 1.5px solid var(--line); font-size: .96rem; line-height: 1.55;
  transition: all .22s var(--ease);
}
.opt:hover { border-color: var(--green); }
.opt__mark {
  font-family: var(--display); font-size: .8rem; font-weight: 800;
  width: 26px; height: 26px; border-radius: 9px; flex: none; display: grid; place-items: center;
  border: 1.5px solid var(--line); color: var(--ink-faint); transition: all .22s var(--ease);
}
.opt[aria-pressed="true"] { border-color: var(--green); background: var(--green-tint); }
.opt[aria-pressed="true"] .opt__mark { background: var(--green); border-color: var(--green); color: #fff; }
.opt.is-correct { border-color: var(--green); background: var(--green-tint); }
.opt.is-correct .opt__mark { background: var(--green); border-color: var(--green); color: #fff; }
.opt.is-wrong { border-color: var(--coral); background: var(--coral-tint); }
.opt.is-wrong .opt__mark { background: var(--coral); border-color: var(--coral); color: #fff; }
.opt--static { cursor: default; }

.explain { margin-top: 14px; padding: 16px 18px; border-radius: var(--r-sm); background: var(--sand); border-inline-start: 3px solid var(--gold); font-size: .88rem; line-height: 1.7; color: var(--ink-soft); }

.score { text-align: center; padding-block: 30px 8px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.score__ring { position: relative; width: 172px; height: 172px; margin-bottom: 8px; }
.score__ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.score__ring-bg { fill: none; stroke: var(--line); stroke-width: 9; }
.score__ring-fg { fill: none; stroke: var(--green); stroke-width: 9; stroke-linecap: round; transition: stroke-dashoffset 1.1s var(--ease); }
.score__inner { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.score__num { font-family: var(--display); font-size: 3rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; color: var(--green); font-variant-numeric: tabular-nums; }
.score__of { font-size: .82rem; color: var(--ink-faint); margin-top: 6px; }
.score__verdict { font-size: 1rem; color: var(--ink-soft); max-width: 42ch; }

/* ---------- Profile ---------- */
.stat-grid { display: grid; gap: 13px; }
@media (min-width:560px) { .stat-grid { grid-template-columns: repeat(2,1fr); } }
@media (min-width:980px) { .stat-grid { grid-template-columns: repeat(4,1fr); } }

/* ---------- Callout ---------- */
.callout { display: flex; gap: 14px; padding: 19px 22px; border-radius: var(--r); background: var(--sand); border-inline-start: 3px solid var(--gold); }
.callout svg { width: 18px; height: 18px; stroke-width: 1.9; color: var(--gold); margin-top: 4px; flex: none; }
.callout__text { font-size: .87rem; line-height: 1.75; color: var(--ink-soft); }
.callout__text strong { color: var(--ink); font-weight: 600; }

/* ---------- Modal ---------- */
.veil {
  position: fixed; inset: 0; z-index: 90; background: rgba(20,37,30,.5);
  backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
  display: grid; place-items: center; padding: 20px;
  opacity: 0; pointer-events: none; transition: opacity .28s var(--ease);
}
.veil.is-open { opacity: 1; pointer-events: auto; }
.modal {
  max-width: 420px; width: 100%; padding: 30px; border-radius: var(--r-lg);
  background: #fff; box-shadow: var(--shadow-lg);
  transform: translateY(14px) scale(.97); transition: transform .32s var(--ease);
}
.veil.is-open .modal { transform: none; }
.modal__title { font-size: 1.2rem; margin-bottom: 11px; }
.modal__text { font-size: .92rem; color: var(--ink-soft); line-height: 1.75; }
.modal__actions { display: flex; gap: 10px; margin-top: 26px; }

.u-empty { padding: 54px 0; text-align: center; color: var(--ink-faint); font-size: .93rem; }

@media (prefers-reduced-motion: reduce) {
  .view.is-active, .tabpanel.is-active { animation: none; }
}

/* ---------- עצמאות כלכלית ---------- */
@media (min-width:560px) { .readout--4 { grid-template-columns:repeat(2,1fr); } }
@media (min-width:1040px) { .readout--4 { grid-template-columns:repeat(4,1fr); } }

.milestones { display:grid; gap:10px; margin-top:14px; }
@media (min-width:520px) { .milestones { grid-template-columns:repeat(4,1fr); } }
.milestone {
  background:#fff; border:1px solid var(--line); border-radius:var(--r);
  padding:15px 16px; text-align:center; transition:all .25s var(--ease);
}
.milestone--goal { background:var(--green-tint); border-color:var(--sage-deep); }
.milestone.is-done { border-color:var(--green); }
.milestone__pct { font-family:var(--display); font-weight:800; font-size:1.05rem; color:var(--green); line-height:1; }
.milestone__label { font-size:.72rem; color:var(--ink-faint); margin-top:5px; }
.milestone__when { font-family:var(--display); font-weight:700; font-size:.87rem; margin-top:7px; }

/* ---------- כרטיסי תוצאה צבעוניים (בקשת משה: "כמו באפליקציה", "שלא יהיה חיוור") ---------- */
.stat-card--warm {
  background: var(--gold-tint);
  border-color: #E8D4AE;
}
.stat-card--warm .stat-card__label { color: #8A6420; }
.stat-card--warm .stat-card__num   { color: var(--gold); }

.stat-card--fill {
  background: var(--green); border-color: var(--green);
  box-shadow: 0 10px 28px -14px rgba(15,70,80,.65);
}
.stat-card--fill .stat-card__label { color: rgba(255,255,255,.82); }
.stat-card--fill .stat-card__num   { color: #fff; }
.stat-card--fill .stat-card__note  { color: rgba(255,255,255,.72); }
.stat-card--fill .progress         { background: rgba(255,255,255,.25); }
.stat-card--fill .progress__fill   { background: #fff; }

.stat-card--cool {
  background: var(--sky-tint); border-color: var(--sky-line);
}
.stat-card--cool .stat-card__label { color: var(--sky-deep); }
.stat-card--cool .stat-card__num   { color: var(--sky); }

/* קריאה לפעולה בראש המדריך המעשי */
.guide-cta {
  display:flex; align-items:center; gap:14px; flex-wrap:wrap;
  margin-top:20px; padding:18px 20px; border-radius:var(--r);
  background:var(--sage); border:1px solid var(--sage-deep);
}
.guide-cta__note { font-size:.86rem; color:var(--ink-soft); }

/* ==========================================================================
   סרגל קבוע בדסקטופ — משה ביקש שיהיה גלוי, לא כפתור שנפתח.
   בנייד נשארת המגירה עם הכפתור העגול.
   ========================================================================== */
@media (min-width: 1100px) {
  .learn-shell { display: grid; grid-template-columns: 246px 1fr; gap: 34px; align-items: start; }

  .rail-nav {
    position: sticky; top: 88px;
    background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
    padding: 12px; box-shadow: var(--shadow-sm);
  }
  .rail-nav__title {
    font-size: .72rem; font-weight: 700; letter-spacing: .1em; color: var(--ink-faint);
    padding: 8px 12px 10px;
  }
  .rail-nav__item {
    display: flex; align-items: center; gap: 11px; width: 100%; text-align: start;
    padding: 11px 12px; border-radius: 11px; margin-bottom: 2px;
    font-size: .9rem; font-weight: 500; color: var(--ink-soft);
    transition: all .18s var(--ease);
  }
  .rail-nav__item svg { width: 17px; height: 17px; stroke-width: 1.85; color: var(--ink-faint); }
  .rail-nav__item:hover { background: var(--sage); color: var(--ink); }
  .rail-nav__item:hover svg { color: var(--green); }
  .rail-nav__item[aria-current="true"] { background: var(--green); color: #fff; font-weight: 700; }
  .rail-nav__item[aria-current="true"] svg { color: #fff; }
  .rail-nav__count {
    margin-inline-start: auto; font-size: .72rem; font-weight: 700;
    color: var(--ink-faint); background: var(--sage); padding: 2px 8px; border-radius: 99px;
  }
  .rail-nav__item[aria-current="true"] .rail-nav__count { background: rgba(255,255,255,.22); color: #fff; }
  .rail-nav__foot { padding: 14px 12px 8px; margin-top: 8px; border-top: 1px solid var(--line); }
  .rail-nav__foot .progress { margin: 8px 0 0; }
  .rail-nav__pct { display: flex; justify-content: space-between; font-size: .76rem; color: var(--ink-faint); }
  .rail-nav__pct strong { color: var(--green); font-weight: 700; }

  /* בדסקטופ הסרגל מחליף את הכפתור העגול והמגירה */
  .fab, .learn-head__inner > .btn { display: none; }
}
@media (max-width: 1099px) { .rail-nav { display: none; } }

/* ---------- כפתור ירוק משני ---------- */
.btn--ghostgreen { background: var(--green-tint); color: var(--green); border-color: transparent; }
.btn--ghostgreen:hover { background: var(--green); color: #fff; }

/* ---------- מדדים וקרנות: מזמין יותר ---------- */
.ticker-group__head {
  background: linear-gradient(180deg, var(--sage) 0%, transparent 100%);
  border-radius: var(--r) var(--r) 0 0;
  padding: 18px 20px 16px; margin-bottom: 10px;
}
.ticker-group__badge {
  display: inline-block; font-family: var(--display); font-weight: 700; font-size: .7rem;
  color: var(--green); background: #fff; border: 1px solid var(--sage-deep);
  padding: 3px 11px; border-radius: 99px; margin-bottom: 9px;
}
.ticker { position: relative; overflow: hidden; }
.ticker::before {
  content: ''; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 3px;
  background: var(--green); transform: scaleY(0); transform-origin: center;
  transition: transform .25s var(--ease);
}
.ticker:hover::before { transform: scaleY(1); }
.ticker__copy { display: flex; align-items: center; gap: 6px; }
.ticker__copy-label {
  font-family: var(--display); font-size: .74rem; font-weight: 700;
  opacity: 0; transform: translateX(6px); transition: all .22s var(--ease);
}
.ticker:hover .ticker__copy-label { opacity: 1; transform: none; }
@media (max-width: 620px) { .ticker__copy-label { display: none; } }

/* ---------- תוכן לחברים רשומים ----------
   הכותרת נשארת חדה והגוף מעומעם: הגולש צריך להבין מה יש כאן
   כדי שירצה להירשם, אבל לא לקרוא את זה בנוחות. */
.locked__bar {
  display: flex; align-items: center; gap: 9px; width: 100%;
  margin-bottom: 18px; padding: 11px 16px;
  border: 1px solid var(--gold); border-radius: var(--r-sm);
  background: var(--gold-tint); color: #7A5A15;
  font-size: .87rem; font-weight: 700; text-align: start;
}
.locked__bar svg { width: 16px; height: 16px; flex: none; }
.locked__bar:hover { background: #F5E7C8; }

.view.is-locked > *:not(.locked__bar) {
  opacity: .38;
  filter: blur(1.6px);
  pointer-events: none;
  user-select: none;
}
@media (prefers-reduced-motion: reduce) { .view.is-locked > *:not(.locked__bar) { filter: none; } }
