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

/* ---------- groups and bars ---------- */
.ii-groups { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.ii-g { display: grid; grid-template-columns: 76px 1fr; gap: 10px; align-items: center; padding: 12px; border-radius: 12px; background: var(--raised); }
.ii-g b { font-size: 15px; }
.ii-g span { font-size: 14px; color: var(--dim); line-height: 1.3; }
.ii-g:last-child { box-shadow: inset 0 0 0 2px var(--gold); }
.ii-bars { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.ii-brow { display: grid; grid-template-columns: 104px 1fr 52px; gap: 8px; align-items: center; font-size: 14px; font-weight: 700; }
.ii-brow div { height: 20px; border-radius: 7px; background: var(--surface); overflow: hidden; }
.ii-brow i { display: block; height: 100%; width: 0; background: #8f89a8; border-radius: 7px; transition: width .8s cubic-bezier(.3,.7,.3,1); }
.ii-brow.ii-hot i { background: var(--gold); }
.ii-brow em { font: 600 14px var(--mono); font-style: normal; text-align: right; opacity: 0; transition: opacity .3s .5s; }
.ii-brow.on em { opacity: 1; }

.ii-sent { width: 100%; padding: 14px; border-radius: 14px; background: #EDE3D3; color: #2a2320; font: 500 16px/1.55 var(--serif); }
.ii-blank { display: inline-block; min-width: 64px; border-bottom: 2px solid #9c8f7a; color: transparent; font-family: var(--sans); font-weight: 700; transition: color .3s; }
.ii-blank.on { color: #5B45C8; }

/* ---------- the if-then card ---------- */
.ii-plan { width: 100%; display: flex; align-items: stretch; gap: 8px; }
.ii-plan > div { flex: 1; min-width: 0; padding: 14px 10px; border-radius: 14px; background: var(--raised); display: flex; flex-direction: column; gap: 6px; transition: box-shadow .3s; }
.ii-plan b { font: 600 13px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--violet-bright); }
.ii-plan span { font-size: 16px; font-weight: 700; line-height: 1.3; }
.ii-arr { flex: none; align-self: center; width: 0; height: 0; border: 9px solid transparent; border-left: 12px solid var(--gold); border-right: 0; }
.ii-plan.ii-fired > div { box-shadow: inset 0 0 0 2.5px var(--mint); }
.ii-plan.ii-missed .ii-if { box-shadow: inset 0 0 0 2.5px var(--faint); }
.ii-plan.ii-open .ii-then span { color: var(--faint); }
.ii-bellico { display: block; width: 30px; height: 30px; }
.ii-bellico svg, .ii-bell svg { width: 100%; height: 100%; display: block; fill: var(--gold); }

.ii-bell { position: absolute; right: 2px; bottom: -4px; width: 48px; height: 48px; padding: 8px; border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.ii-bell.rung { animation: iiRing .6s ease-in-out; background: #143327; box-shadow: inset 0 0 0 2px var(--mint); }
@keyframes iiRing { 20% { rotate: 18deg; } 40% { rotate: -14deg; } 60% { rotate: 9deg; } 80% { rotate: -4deg; } }

/* ---------- studies ---------- */
.ii-proj, .ii-mail, .ii-two { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ii-mail { grid-template-columns: 1fr 1fr 1fr; }
.ii-proj > div, .ii-mail > div, .ii-who { padding: 10px 8px; border-radius: 12px; background: var(--raised); display: flex; flex-direction: column; gap: 3px; text-align: center; transition: box-shadow .3s; }
.ii-proj b, .ii-mail b, .ii-who b { font-size: 14px; }
.ii-proj span, .ii-mail span, .ii-who span { font-size: 12px; color: var(--dim); line-height: 1.3; }
.ii-two { padding: 18px 0; }
.ii-who { padding: 22px 10px; }
.ii-who b { font-size: 16px; }
.ii-who span { font-size: 14px; }
.ii-who.on { box-shadow: inset 0 0 0 2.5px var(--mint); }

/* ---------- Maya's evening ---------- */
.ii-goal { padding: 10px 16px; border-radius: 12px; background: var(--raised); display: flex; gap: 10px; align-items: baseline; }
.ii-goal b { font-size: 13px; color: var(--dim); }
.ii-goal span { font-size: 16px; font-weight: 700; }
.ii-eve { position: relative; width: 100%; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.ii-mo { height: 86px; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 4px; transition: box-shadow .2s, background .2s; }
.ii-mo span { font-size: 13px; font-weight: 700; line-height: 1.2; }
.ii-mo em { font: 600 14px var(--mono); font-style: normal; color: var(--faint); min-height: 18px; }
.ii-mo.scan { box-shadow: inset 0 0 0 2px var(--violet-bright); }
.ii-mo.hit { background: #143327; box-shadow: inset 0 0 0 2.5px var(--mint); }
.ii-mo.hit em { color: var(--mint); }
.ii-scan { display: none; }

@media (max-height: 700px) {
  .ii-hero img { max-height: 28vh; }
  .ii-mo { height: 72px; }
  .ii-sent { font-size: 15px; padding: 10px 12px; }
  .ii-g { padding: 9px 12px; }
}
