/* Action Potential lesson. All rules scoped under .apt-* */
.apt-sc { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.apt-note { font-size: 12.5px; color: var(--faint); text-align: center; }
.apt-t { fill: var(--dim); font: 600 13px var(--sans); }

/* the scope */
.apt-scope { position: relative; width: 100%; max-width: 380px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); padding: 6px 0 4px; }
.apt-cv { display: block; width: 100%; height: 190px; }
.apt-short .apt-cv { height: 160px; }
.apt-holdable { touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.apt-holdable.held { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(252,192,80,.35); }
.apt-spk { position: absolute; right: 10px; top: 8px; width: 30px; height: 30px; }
.apt-spk svg { width: 100%; height: 100%; }
.apt-spk path { fill: none; stroke: var(--dim); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.apt-spk path:first-child { fill: var(--dim); }
.apt-spk .apt-w1, .apt-spk .apt-w2 { opacity: .25; }
.apt-spk.on .apt-w1, .apt-spk.on .apt-w2 { animation: aptPing .18s ease-out; stroke: var(--gold); }
@keyframes aptPing { 0% { opacity: 1; } 100% { opacity: .25; } }

/* inside: the membrane */
.apt-mem { width: 100%; max-width: 360px; display: block; }
.apt-band { fill: rgba(169,155,255,.28); }
.apt-hole { fill: var(--bg); }
.apt-door { fill: var(--violet-bright); transform-box: fill-box; transform-origin: left center; transition: transform .25s ease-out, fill .25s; }
.apt-gate.open .apt-door { transform: rotate(-80deg); fill: var(--gold); }
.apt-na { fill: var(--gold); opacity: .9; }
.apt-k { fill: #6FD6C6; }
.apt-kdoor { fill: #6FD6C6; transform-box: fill-box; transform-origin: left center; transition: transform .25s ease-out; }
.apt-kgate.open .apt-kdoor { transform: rotate(80deg); }
.apt-tna { fill: var(--gold); } .apt-tk { fill: #6FD6C6; }
.apt-memhit { fill: transparent; cursor: pointer; }
.apt-read { fill: var(--violet-bright); font: 800 15px var(--sans); }
.apt-mem.pos .apt-read { fill: var(--gold); }
.apt-mem.pos .apt-band { fill: rgba(252,192,80,.3); }

/* Adrian's rig */
.apt-rig { width: 100%; max-width: 360px; display: block; }
.apt-hook, .apt-str { stroke: var(--dim); stroke-width: 2.5; fill: none; }
.apt-mus { fill: #E59A8C; stroke: rgba(255,255,255,.3); stroke-width: 1; }
.apt-wtb { fill: #8E8A82; stroke: rgba(255,255,255,.35); stroke-width: 1.5; }
.apt-wt { transition: opacity .2s; }
.apt-nerve { fill: none; stroke: var(--gold); stroke-width: 2.5; stroke-dasharray: 2 4; }

/* gentle or hard */
.apt-rows { width: 100%; max-width: 360px; display: block; overflow: visible; }
.apt-row { fill: none; stroke: var(--gold); stroke-width: 2.5; stroke-linejoin: round; }
.apt-sp { opacity: 0; transition: opacity .4s; }
.apt-in .apt-sp { opacity: 1; }
.apt-in .apt-flat { opacity: 0; }

.apt-pic img { display: block; max-width: 100%; max-height: 240px; }

@media (max-height: 700px) {
  .apt-cv { height: 150px; }
  .apt-short .apt-cv { height: 118px; }
  .apt-pic img { max-height: 190px; }
}
