/* Leptin lesson. All rules scoped under .lep-* */

/* the bench: a mouse each side, a bowl between */
.lep-bench { position: relative; width: min(100%, 330px); height: 236px; margin: 0 auto; }
.lep-tube { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.lep-pipe, .lep-flow { fill: none; stroke-linecap: round; }
.lep-pipe { stroke: #8a2236; stroke-width: 7; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 1s ease-out; }
.lep-flow { stroke: #ff8a8a; stroke-width: 3; stroke-dasharray: 1.5 5; opacity: 0; transition: opacity .4s .8s; }
.lep-joined .lep-pipe { stroke-dashoffset: 0; }
.lep-joined .lep-flow { opacity: .9; animation: lepFlow 1.4s linear 8; }
@keyframes lepFlow { to { stroke-dashoffset: -13; } }

.lep-m { position: absolute; bottom: 0; width: 150px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.lep-l { left: 0; } .lep-r { right: 0; }
.lep-m .lep-pic { height: 150px; display: flex; align-items: flex-end; justify-content: center; transform-origin: 50% 100%; transition: transform .45s cubic-bezier(.3,.7,.2,1); }
.lep-m.lep-fat img, .lep-m.lep-fat2 img { width: 132px; }
.lep-m.lep-lean img { width: 92px; transform: scaleX(-1); transition: filter .6s, opacity .6s, transform .6s; }
.lep-fat2 img { filter: sepia(.55) saturate(1.4) hue-rotate(-12deg); }
.lep-m > span { font: 700 12px/1.2 var(--sans); color: var(--dim); white-space: nowrap; }
.lep-starve.lep-lean img { filter: grayscale(1) brightness(.7); opacity: .55; transform: scaleX(-1) scale(.8); transform-origin: 50% 100%; }
.lep-tag { min-height: 22px; padding: 3px 9px; border-radius: 11px; font: 800 12px/16px var(--sans); color: var(--text); background: var(--raised); border: 1.5px solid var(--line-strong);
  opacity: 0; transform: translateY(4px); transition: opacity .3s, transform .3s; white-space: nowrap; }
.lep-tag.lep-on { opacity: 1; transform: none; }
.lep-tag.lep-ok { border-color: var(--mint); color: var(--mint); }
.lep-tag.lep-hi { border-color: var(--gold); color: var(--gold); }
.lep-tag.lep-bad { border-color: var(--red); color: #ff8a8a; }

.lep-bowl { position: absolute; left: 50%; bottom: 52px; width: 58px; height: 22px; margin-left: -29px; border-radius: 4px 4px 29px 29px;
  background: linear-gradient(180deg, #8f7ce8, #5b45c8); box-shadow: 0 6px 12px rgba(0,0,0,.35); }
.lep-bowl i { position: absolute; top: -5px; width: 9px; height: 9px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #e8b97a, #9a6431); }
.lep-bowl i:nth-child(1) { left: 6px; } .lep-bowl i:nth-child(2) { left: 14px; top: -8px; } .lep-bowl i:nth-child(3) { left: 22px; }
.lep-bowl i:nth-child(4) { left: 30px; top: -9px; } .lep-bowl i:nth-child(5) { left: 38px; } .lep-bowl i:nth-child(6) { left: 45px; top: -6px; }
.lep-bowl i:nth-child(7) { left: 18px; top: -2px; } .lep-bowl i:nth-child(8) { left: 34px; top: -2px; } .lep-bowl i:nth-child(9) { left: 26px; top: -13px; }
.lep-p { position: absolute; left: 0; top: 0; width: 10px; height: 10px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #e8b97a, #9a6431); pointer-events: none; z-index: 3; }

/* the photo */
.lep-photo { margin: 0 auto; width: min(100%, 330px); text-align: center; }
.lep-photo img { width: 100%; border-radius: 16px; display: block; box-shadow: 0 10px 24px rgba(0,0,0,.4); }
.lep-photo figcaption { margin-top: 6px; font: 500 12px/1.3 var(--sans); color: var(--dim); }

/* fat talking to the brain */
.lep-body { position: relative; width: 300px; height: 220px; margin: 0 auto; }
.lep-route { position: absolute; inset: 0; width: 100%; height: 100%; }
.lep-route path { fill: none; stroke: rgba(169,155,255,.28); stroke-width: 3; stroke-dasharray: 4 6; }
.lep-dots { position: absolute; inset: 0; }
.lep-dots i { position: absolute; left: 0; top: 0; width: 11px; height: 11px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #e3dcff, var(--violet)); box-shadow: 0 0 8px rgba(169,155,255,.9);
  offset-path: path('M78 160 C120 70 170 140 222 62'); offset-distance: 0%; animation: lepRide 2.4s linear infinite; transition: opacity .5s; }
.lep-dots i:nth-child(2) { animation-delay: -.3s; } .lep-dots i:nth-child(3) { animation-delay: -.6s; } .lep-dots i:nth-child(4) { animation-delay: -.9s; }
.lep-dots i:nth-child(5) { animation-delay: -1.2s; } .lep-dots i:nth-child(6) { animation-delay: -1.5s; } .lep-dots i:nth-child(7) { animation-delay: -1.8s; } .lep-dots i:nth-child(8) { animation-delay: -2.1s; }
.lep-dots i.lep-off { opacity: 0; }
@keyframes lepRide { from { offset-distance: 0%; } to { offset-distance: 100%; } }
.lep-store { position: absolute; left: 14px; bottom: 0; width: 120px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.lep-ball { width: 104px; height: 104px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fffaf0, #f2d9a6 55%, #c9a35f);
  box-shadow: inset 0 -8px 14px rgba(120,80,20,.35), 0 8px 16px rgba(0,0,0,.3); transition: transform .7s ease-out; }
.lep-store span, .lep-brain span, .lep-meter span { font: 700 12px/1.2 var(--sans); color: var(--dim); }
.lep-brain { position: absolute; right: 34px; top: 0; width: 120px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.lep-brain img { width: 112px; transition: filter .4s; }
.lep-alarm .lep-brain img { filter: drop-shadow(0 0 14px rgba(216,85,85,.95)); }
.lep-read { margin-top: 2px; padding: 3px 10px; border-radius: 11px; font: 800 13px/16px var(--sans); color: #fff; background: var(--red); opacity: 0; transition: opacity .3s; }
.lep-read.lep-on { opacity: 1; }
.lep-meter { position: absolute; right: 0; top: 8px; width: 30px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.lep-meter > i { position: relative; width: 16px; height: 110px; border-radius: 8px; background: rgba(255,255,255,.1); overflow: hidden; }
.lep-meter > i > i { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 8px; background: linear-gradient(180deg, var(--violet-bright), var(--violet)); transition: height .7s ease-out; }
.lep-day { position: absolute; left: 0; top: 4px; font: 800 16px/1 var(--sans); color: var(--gold); }

/* leptin in the blood */
.lep-bars { width: min(100%, 300px); margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 36px; }
.lep-col { width: 112px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.lep-col b { font: 800 20px/1 var(--sans); color: var(--text); }
.lep-trk { height: 150px; width: 62px; display: flex; align-items: flex-end; border-bottom: 2px solid var(--line-strong); }
.lep-trk i { width: 100%; height: 3%; border-radius: 8px 8px 0 0; background: linear-gradient(180deg, var(--violet-bright), var(--violet)); transition: height .9s cubic-bezier(.3,.7,.2,1); }
.lep-ob .lep-trk i { background: linear-gradient(180deg, #ffd88a, var(--gold)); }
.lep-col span { font: 700 13px/1.2 var(--sans); color: var(--text); text-align: center; }
.lep-unit { width: 100%; margin: 8px 0 0; text-align: center; font: 500 12px/1.3 var(--sans); color: var(--dim); }

/* the two fat mice as answers */
.lep-pickwrap { width: min(100%, 340px); margin: 0 auto; }
.choices.lep-duo { flex-direction: row; gap: 10px; }
.lep-duo .choice { flex: 1; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px; padding: 10px 8px; text-align: center; }
.lep-duo .lep-pic img { height: 120px; width: auto; display: block; }
.lep-duo .lep-fat2 img { filter: sepia(.55) saturate(1.4) hue-rotate(-12deg); }
.lep-duo b { font: 800 14px/1.2 var(--sans); }
.lep-duo small { font: 500 12px/1.3 var(--sans); color: var(--dim); }

@media (max-height: 700px) {
  .lep-bench { height: 206px; }
  .lep-m .lep-pic { height: 124px; }
  .lep-m.lep-fat img, .lep-m.lep-fat2 img { width: 110px; }
  .lep-m.lep-lean img { width: 78px; }
  .lep-bowl { bottom: 48px; }
  .lep-photo img { max-height: 200px; object-fit: contain; }
  .lep-trk { height: 120px; }
  .lep-duo .lep-pic img { height: 92px; }
}
