/* Lipoproteins lesson. All rules scoped under .lpp-* */
.lpp-sc { width: 100%; display: flex; flex-direction: column; align-items: center; }

/* the glass */
.lpp-full { position: relative; flex: 1 1 auto; width: 100%; min-height: 0; overflow: hidden; }
.lpp-cv { position: absolute; left: 0; top: 0; display: block; touch-action: none; cursor: pointer; }

/* bubbles, in the tube and the artery */
.lpp-b { stroke: #a58cff; stroke-width: 1.4; stroke-dasharray: 1.6 1.6; }
.lpp-ch { fill: #fff0c0; }
.lpp-vl { fill: #f5cf72; }
.lpp-ld { fill: #ef9f4a; }
.lpp-hd { fill: #b7a4ff; }

/* the spinning tube */
.lpp-tw { width: min(100%, 290px); }
.lpp-tube { display: block; width: 100%; height: auto; overflow: visible; }
.lpp-glass { fill: none; stroke: rgba(255,255,255,.4); stroke-width: 2.5; }
.lpp-plasma { fill: rgba(240,200,120,.16); }
.lpp-rot { transform-box: view-box; transform-origin: 74px 130px; }
.lpp-spin .lpp-rot { animation: lppSpin 1.5s cubic-bezier(.5,0,.5,1); }
@keyframes lppSpin { to { transform: rotate(1080deg); } }
.lpp-lb { animation: lppIn .4s ease-out both; }
.lpp-lb line { stroke: var(--dim); stroke-width: 1.5; }
.lpp-lb text { font: 800 15px var(--sans); fill: var(--text); }
.lpp-lb text.lpp-ls { font: 600 13.5px var(--sans); fill: var(--dim); }
@keyframes lppIn { from { opacity: 0; transform: translateX(-6px); } }

/* delivery */
.lpp-del { gap: 14px; }
.lpp-vessel { width: min(100%, 330px); height: 92px; border-radius: 46px; background: linear-gradient(180deg, #8e1d31, #5c0d1d); display: flex; align-items: center; justify-content: center; box-shadow: inset 0 -10px 20px rgba(0,0,0,.35); }
.lpp-vl { width: 66px; height: 66px; border-radius: 50%; border: 3px dotted #a58cff; background: radial-gradient(circle at 35% 30%, #fff4c8, #f2c460 60%, #d39a3a); transition: width .6s, height .6s, background .6s; display: flex; align-items: center; justify-content: center; }
.lpp-core { width: 16px; height: 16px; border-radius: 50%; background: #ef9f4a; }
.lpp-vl.lpp-s1 { width: 50px; height: 50px; background: radial-gradient(circle at 35% 30%, #ffe1a8, #f0b25a 60%, #d38a3a); }
.lpp-vl.lpp-s2 { width: 34px; height: 34px; background: radial-gradient(circle at 35% 30%, #ffd09a, #ef9f4a 70%); }
.lpp-cells { display: flex; gap: 12px; align-items: flex-end; justify-content: center; width: min(100%, 330px); }
.lpp-cell { width: 94px; min-height: 96px; padding: 6px 4px; border-radius: 16px; border: 1px solid var(--line); background: var(--raised); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--text); font: 700 12.5px var(--sans); cursor: pointer; transition: border-color .3s, box-shadow .3s; }
.lpp-cell img { width: 60px; height: 56px; object-fit: contain; }
.lpp-fatc { width: 52px; height: 52px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fff6d8, #f3d58a 65%, #c99a45); box-shadow: 0 0 0 3px rgba(243,213,138,.25); transition: transform .5s; }
.lpp-cell.lpp-fed { border-color: var(--gold); box-shadow: 0 0 12px rgba(252,192,80,.35); }
.lpp-fed .lpp-fatc { transform: scale(1.12); }
.lpp-fly { position: absolute; left: 0; top: 0; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 6px rgba(252,192,80,.9); pointer-events: none; }
.lpp-del { position: relative; }
/* the sink gauge: two density bands, the bubble drops from one to the other */
.lpp-mini { position: relative; width: min(100%, 330px); height: 104px; border-radius: 14px; border: 1px dashed var(--line); }
.lpp-mini b { position: absolute; left: 12px; top: 5px; font: 700 12px var(--sans); color: var(--dim); }
.lpp-mini span { position: absolute; left: 6px; right: 6px; height: 34px; padding-left: 50px; border-radius: 9px; display: flex; align-items: center; gap: 8px; font: 800 16px var(--sans); color: var(--text); }
.lpp-mini em { font: 600 13px var(--sans); font-style: normal; color: var(--dim); }
.lpp-m1 { top: 24px; background: rgba(245,207,114,.12); }
.lpp-m2 { top: 63px; background: rgba(239,159,74,.14); }
.lpp-md { position: absolute; left: 20px; top: 30px; width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffd09a, #ef9f4a 70%); border: 2px dotted #a58cff; transition: top .9s cubic-bezier(.5,0,.3,1); }
.lpp-md.lpp-sank { top: 69px; }

/* the artery */
.lpp-art { display: block; width: min(100%, 330px); height: auto; border-radius: 14px; }
.lpp-wall { fill: #c76a7c; }
.lpp-lumen { fill: #6e1022; }
.lpp-plq { fill: #f2c46b; }
.lpp-at { font: 700 13px var(--sans); fill: #fff; }
.lpp-pt { text-anchor: middle; fill: #4a2a00; }

/* the real tube */
.lpp-fig { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.lpp-fig img { height: 300px; width: auto; border-radius: 10px; box-shadow: 0 10px 24px rgba(0,0,0,.4); }
.lpp-fig figcaption { font: 600 12px var(--sans); color: var(--dim); }

@media (max-height: 700px) {
  .lpp-tw { width: min(100%, 262px); }
  .lpp-fig img { height: 236px; }
  .lpp-vessel { height: 80px; }
}
