/* Plasmid lesson. All rules scoped under .pl-* */
.pl-sc { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.pl-note { font-size: 12.5px; color: var(--faint); text-align: center; line-height: 1.35; max-width: 320px; }
.pl-t { fill: var(--text); font: 600 13px var(--sans); text-anchor: middle; }
.pl-t.dim { fill: var(--dim); }
.pl-t.gold { fill: var(--gold); font-weight: 700; }

/* the two cells and the pilus */
.pl-conj { display: block; width: 100%; max-width: 380px; height: auto; touch-action: none; overflow: visible; }
.pl-cell { stroke-width: 2; }
.pl-cell.don { fill: rgba(123,92,253,.12); stroke: var(--violet-bright); }
.pl-cell.rec { fill: rgba(63,214,154,.10); stroke: var(--mint); transition: stroke-width .2s; }
.pl-conj.near .pl-cell.rec { stroke-width: 4; }
.pl-chr { fill: none; stroke: var(--violet-bright); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: .8; }
.pl-recg .pl-chr { stroke: var(--mint); }
.pl-recg { transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.pl-conj.linked .pl-recg { transform: translateX(-8px); }
.pl-ring { fill: none; stroke: var(--gold); stroke-width: 3.5; }
.pl-grab { fill: transparent; stroke: var(--gold); stroke-width: 1.5; stroke-dasharray: 4 4; opacity: .7; animation: pl-pulse 1.4s ease-in-out 3; }
.pl-conj.drag .pl-grab, .pl-conj.linked .pl-grab { opacity: 0; animation: none; }
@keyframes pl-pulse { 50% { opacity: .15; } }
.pl-pilus { stroke: var(--gold); stroke-width: 3; stroke-linecap: round; }
.pl-conj.drag .pl-pilus { stroke-dasharray: 5 4; }
.pl-trav, .pl-new { opacity: 0; }
.pl-conj.split .pl-trav { opacity: 1; stroke-dasharray: 5 4; }
.pl-conj.split .pl-own { stroke-dasharray: 5 4; }
.pl-conj.rebuilt .pl-own { stroke-dasharray: none; }
.pl-conj.rebuilt .pl-trav { opacity: 0; }
.pl-conj.rebuilt .pl-new { opacity: 1; }
.pl-steps { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.pl-steps span { font-size: 12.5px; font-weight: 700; color: var(--faint); padding: 4px 8px; border-radius: 999px; border: 1px solid var(--line); transition: color .3s, border-color .3s; }
.pl-steps span.on { color: var(--gold); border-color: var(--gold); }
.pl-steps i { color: var(--faint); font-style: normal; }

/* the dish */
.pl-dish { display: block; width: min(100%, 280px, 31vh); height: auto; }
.pl-lab { display: block; width: min(100%, 340px); height: auto; }
.pl-agar { fill: #0d1324; stroke: var(--line-strong); stroke-width: 2; }
.pl-c ellipse { stroke-width: 1.5; transition: opacity .8s; }
.pl-c.sh ellipse { fill: rgba(123,92,253,.35); stroke: var(--violet-bright); }
.pl-c.ec ellipse, .pl-c.lab ellipse { fill: rgba(63,214,154,.28); stroke: var(--mint); }
.pl-c .pl-r { fill: none; stroke: var(--gold); stroke-width: 2.2; opacity: 0; transform: scale(.3); transform-box: fill-box; transform-origin: center; transition: opacity .25s, transform .25s cubic-bezier(.34,1.56,.64,1); }
.pl-c.has .pl-r { opacity: 1; transform: none; }
.pl-c.dead ellipse { opacity: .1; }
.pl-c.dead .pl-r { opacity: 0; }
.pl-links line { stroke: var(--gold); stroke-width: 1.6; stroke-dasharray: 3 2; }
.pl-colony { fill: rgba(63,214,154,.22); stroke: var(--mint); stroke-width: 1.5; }
.pl-legend { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; font-size: 12.5px; font-weight: 700; color: var(--dim); }
.pl-legend span { display: inline-flex; align-items: center; gap: 5px; }
.pl-legend i { flex: none; width: 14px; height: 8px; border-radius: 999px; border: 1.5px solid; }
.pl-legend .sh { border-color: var(--violet-bright); background: rgba(123,92,253,.35); }
.pl-legend .ec { border-color: var(--mint); background: rgba(63,214,154,.28); }
.pl-legend .rg { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--gold); }
.pl-meter { display: flex; gap: 6px; align-items: baseline; min-height: 22px; font-size: 13px; font-weight: 600; color: var(--dim); }
.pl-meter b { font: 700 19px var(--mono); color: var(--gold); }

/* the two species */
.pl-germs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; max-width: 360px; margin: 0 auto; }
.pl-germ { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 8px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.pl-germ svg { width: 90px; height: auto; }
.pl-germ rect { stroke-width: 2.5; }
.pl-germ path { fill: none; stroke-width: 2.5; stroke-linecap: round; }
.pl-germ.sh rect { fill: rgba(123,92,253,.2); stroke: var(--violet-bright); } .pl-germ.sh path { stroke: var(--violet-bright); }
.pl-germ.ec rect { fill: rgba(63,214,154,.16); stroke: var(--mint); } .pl-germ.ec path { stroke: var(--mint); }
.pl-germ b { font-size: 16px; }
.pl-germ span { font-size: 12.5px; color: var(--dim); }
.pl-germ em { font-style: normal; font-size: 12.5px; font-weight: 700; color: var(--red); }
.pl-pills { display: flex; gap: 5px; margin-top: 6px; }
.pl-pills i { position: relative; width: 22px; height: 10px; border-radius: 999px; background: linear-gradient(90deg, var(--text) 50%, var(--dim) 50%); opacity: .8; }
.pl-pills i::after { content: ''; position: absolute; left: -3px; right: -3px; top: 4px; height: 2px; background: var(--red); transform: rotate(-24deg); border-radius: 2px; }

@media (max-height: 700px) {
  .pl-dish { width: min(100%, 280px, 25vh); }
}
