/* Self-efficacy lesson. All rules scoped under .sef-* */
.sef-sc { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.sef-hero img { width: 280px; max-width: 100%; max-height: 36vh; object-fit: contain; display: block; filter: drop-shadow(0 18px 30px rgba(123,92,253,.35)); }
.sef-note { font-size: 13px; color: var(--dim); text-align: center; }

/* ---------- the track ---------- */
.sef-track { position: relative; width: calc(100% - 28px); height: 64px; border-radius: 32px; background: var(--raised); box-shadow: inset 0 0 0 2px var(--line-strong); margin-top: 18px; }
.sef-zone { position: absolute; top: 0; bottom: 0; background: rgba(252,192,80,.28); box-shadow: inset 0 0 0 2px var(--gold); border-radius: 6px; transition: left .4s cubic-bezier(.3,.7,.3,1), width .4s cubic-bezier(.3,.7,.3,1); }
.sef-dot { position: absolute; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; background: var(--violet-bright); box-shadow: 0 0 0 3px var(--bg), 0 0 14px rgba(169,155,255,.7); }
.sef-track.sef-hit { animation: sefHit .5s ease-out; }
.sef-track.sef-hit .sef-zone { background: rgba(92,225,160,.35); box-shadow: inset 0 0 0 2px var(--mint); }
.sef-track.sef-miss { animation: sefMiss .4s ease-out; }
@keyframes sefHit { 40% { transform: scale(1.03); } }
@keyframes sefMiss { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.sef-lvl { display: flex; gap: 10px; padding-top: 6px; }
.sef-lvl i { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 600 14px var(--mono); font-style: normal; color: var(--dim); background: var(--raised); box-shadow: inset 0 0 0 2px var(--line-strong); transition: background .2s, color .2s; }
.sef-lvl i.on { color: var(--text); box-shadow: inset 0 0 0 2px var(--violet-bright); }
.sef-lvl i.done { background: var(--gold); color: #2A1B00; box-shadow: none; }
.sef-msg { min-height: 22px; font-size: 15px; font-weight: 800; color: var(--dim); }
.sef-msg.ok { color: var(--mint); }
.sef-msg.no { color: var(--red); }

/* ---------- before / after ---------- */
.sef-bars { width: 100%; display: flex; flex-direction: column; gap: 16px; padding-top: 18px; }
.sef-bar { display: grid; grid-template-columns: 1fr 44px; gap: 6px 10px; align-items: center; }
.sef-bar span { grid-column: 1 / 3; font-size: 13px; font-weight: 700; color: var(--dim); }
.sef-bar div { height: 16px; border-radius: 8px; background: var(--raised); overflow: hidden; }
.sef-bar i { display: block; height: 100%; background: var(--violet-bright); }
.sef-bar.sef-b1 i { background: var(--gold); }
.sef-bar b { font: 600 18px var(--mono); text-align: right; }

/* ---------- sources: Bandura's ranking, revealed as bars ---------- */
.sef-rank { display: flex; flex-direction: column; gap: 12px; width: 100%; padding-top: 6px; }
.sef-rank div { display: grid; grid-template-columns: 112px 1fr; align-items: center; gap: 10px; }
.sef-rank span { font-size: 14px; font-weight: 700; color: var(--dim); }
.sef-rank em { display: block; height: 14px; border-radius: 7px; background: var(--raised); overflow: hidden; }
.sef-rank em i { display: block; height: 100%; width: 0; background: var(--gold); transition: width .8s cubic-bezier(.3, .7, .3, 1); }
.sef-rank small { font-size: 12px; color: var(--faint); text-align: center; visibility: hidden; }
.sef-rank.on small { visibility: visible; }

/* ---------- before / after, in the reader's own words ---------- */
.sef-pair { width: 100%; max-width: 340px; display: grid; grid-template-columns: 1fr 28px 1fr; align-items: center; gap: 6px; padding-top: 10px; }
.sef-ans { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 8px; border-radius: 18px; background: var(--surface); border: 2px solid var(--line-strong); text-align: center; animation: sefIn .4s ease-out both; }
.sef-ans small { font-size: 12px; font-weight: 700; color: var(--dim); }
.sef-ans b { font: 700 20px/1.2 var(--serif); }
.sef-a1 { border-color: var(--gold); background: rgba(252, 192, 80, .1); animation-delay: .35s; }
.sef-a1 b { color: var(--gold); }
.sef-arrow { width: 0; height: 0; justify-self: center; border-left: 12px solid var(--gold); border-top: 9px solid transparent; border-bottom: 9px solid transparent; }
@keyframes sefIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- two kids, same skill ---------- */
.sef-kids { width: 100%; max-width: 340px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.sef-kids > small { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); padding: 4px 12px; border-radius: 999px; border: 2px solid var(--line-strong); }
.sef-kids > div { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sef-kid { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px; border-radius: 18px; background: var(--surface); border: 2px solid var(--line); transition: border-color .4s, background .4s; }
.sef-kid i { width: 40px; height: 40px; border-radius: 50%; background: var(--violet-bright); }
.sef-k0 i { background: var(--streak); }
.sef-kid span { font: italic 600 15px/1.25 var(--serif); text-align: center; }
.sef-kids.on .sef-k1 { border-color: var(--gold); background: rgba(252, 192, 80, .1); }
.sef-kids.on .sef-k1::before { content: 'Solved more'; font-size: 13px; font-weight: 800; color: var(--gold); }

/* ---------- Dev's two plans ---------- */
.sef-plans-box { width: 100%; max-width: 340px; }
.sef-plans { display: grid !important; grid-template-columns: 1fr 1fr; gap: 10px; }
.sef-plans .choice { padding: 0; }
.sef-plan { display: flex; flex-direction: column; justify-content: space-between; gap: 10px; width: 100%; min-height: 140px; padding: 14px 10px; }
.sef-runs { display: flex; flex-direction: column; gap: 5px; }
.sef-runs i { display: block; height: 10px; border-radius: 999px; background: var(--violet-bright); }
.sef-plan b { font: 700 15px/1.25 var(--serif); text-align: center; }

@media (max-height: 700px) {
  .sef-hero img { max-height: 30vh; }
  .sef-rank { gap: 8px; }
  .sef-track { margin-top: 10px; }
}
