/* Immune Memory lesson. All rules scoped under .im-* */

.im-sc { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.im-note { font-size: 12.5px; color: var(--faint); text-align: center; line-height: 1.35; max-width: 320px; }
.im-hero { width: min(86%, 320px); }
.im-hero img { width: 100%; display: block; }
.im-t { fill: var(--text); font: 600 13px var(--sans); text-anchor: middle; }
.im-t.dim { fill: var(--dim); }
.im-t.sm { font-size: 12px; }
.im-t.big { font-size: 15px; }

/* the germ */
.im-germ { width: 104px; height: auto; display: block; overflow: visible; }
.im-gbody { fill: rgba(216,85,85,.22); stroke: #FF8A8A; stroke-width: 2.5; }
.im-gsp { stroke: #FF8A8A; stroke-width: 2.5; stroke-linecap: round; }

/* the shapes each cell carries */
.im-gl path { fill: currentColor; }
.im-g { color: var(--gold); }
.im-m { color: var(--mint); }
.im-v { color: var(--violet-bright); }
.im-r { color: #FF8A8A; }

.im-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 46px)); gap: 6px; justify-content: center; width: 100%; }
.im-cell {
  width: 100%; aspect-ratio: 1; min-height: 44px; display: grid; place-items: center; padding: 0;
  background: var(--surface); border: 2px solid var(--line); border-radius: 12px; cursor: pointer;
  transition: border-color .2s, opacity .3s, background .3s;
}
.im-cell.wrong { border-color: var(--red); }
.im-cell.off { opacity: .35; }
.im-cell.right, .im-cell.im-win { border-color: var(--gold); background: rgba(252,192,80,.16); opacity: 1; }
.im-cell.im-new { border-color: var(--gold); background: rgba(252,192,80,.16); animation: imPop .3s ease-out both; }
@keyframes imPop { from { opacity: .3; transform: scale(.7); } }

/* cowpox and smallpox */
.im-two { width: 100%; height: auto; display: block; overflow: visible; }
.im-two .im-cow .im-gbody { fill: rgba(63,214,154,.18); stroke: var(--mint); }
.im-two .im-cow .im-gsp { stroke: var(--mint); }
.im-two.im-fit .im-gl { filter: drop-shadow(0 0 6px rgba(252,192,80,.9)); }

/* how long it lasts */
.im-bars { width: 100%; display: flex; flex-direction: column; gap: 16px; }
.im-brow span { font-size: 13.5px; font-weight: 800; color: var(--text); }
.im-brow small { display: block; margin-top: 4px; font-size: 12.5px; color: var(--dim); }
.im-bt { margin-top: 6px; height: 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.im-bt i { display: block; height: 100%; border-radius: 999px; background: var(--violet); transition: background .4s; }
.im-bt i.im-up { background: var(--gold); }

@media (max-height: 700px) {
  .im-hero { width: min(70%, 240px); }
  .im-grid { grid-template-columns: repeat(6, minmax(0, 44px)); gap: 5px; }
}
