/* Operant conditioning lesson. All rules scoped under .oc-*. */
.oc-sc { display: flex; flex-direction: column; gap: 12px; }

/* ---------- the pigeon box ---------- */
.oc-pig { display: flex; flex-direction: column; gap: 8px; }
.oc-pigtop { position: relative; }
.oc-box { display: block; width: 100%; height: auto; }
.oc-wall { fill: var(--surface); stroke: var(--line); stroke-width: 2; }
.oc-floor { stroke: var(--line-strong); stroke-width: 2; }
.oc-body, .oc-skull, .oc-neck { fill: #9AA3B8; }
.oc-neck { fill: #7F8FB0; }
.oc-wing { fill: #6F7890; stroke: #56607A; stroke-width: 1; }
.oc-tail { fill: #56607A; }
.oc-beak { fill: var(--gold); }
.oc-eye { fill: #0A0E1A; }
.oc-leg { stroke: #E8927C; stroke-width: 3; stroke-linecap: round; }
.oc-spin { fill: none; stroke: var(--gold); stroke-width: 3; stroke-linecap: round; opacity: 0; }
.oc-spinhead { fill: var(--gold); opacity: 0; }
.oc-seed { fill: var(--gold); animation: ocSeed .7s ease-out both; }
@keyframes ocSeed { 0% { transform: translateY(-50px); opacity: 1; } 70% { transform: translateY(0); opacity: 1; } 100% { opacity: 0; } }
.oc-tray { position: absolute; right: 10px; bottom: 10px; width: 64px; height: 52px; border-radius: 12px; border: 2px solid var(--gold); background: rgba(252,192,80,.14); color: var(--gold); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font: 700 12px var(--sans); cursor: pointer; }
.oc-tray i { width: 30px; height: 8px; border-radius: 0 0 8px 8px; background: var(--gold); }
.oc-tray:active { transform: scale(.95); }
.oc-tray:disabled { opacity: .5; }
.oc-hide { display: none; }
.oc-now { align-self: center; min-height: 26px; padding: 2px 14px; border-radius: 13px; font: 700 15px var(--sans); color: var(--faint); background: transparent; transition: background .15s, color .15s; }
.oc-now.on { color: var(--text); background: var(--raised); }
.oc-bars5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.oc-b5 { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.oc-b5t { width: 100%; height: 56px; display: flex; align-items: flex-end; border-bottom: 1px solid var(--line-strong); }
.oc-b5t i { display: block; width: 100%; border-radius: 4px 4px 0 0; background: var(--violet-bright); transition: height .35s; }
.oc-b5:last-child .oc-b5t i { background: var(--gold); }
.oc-b5.hot .oc-b5t i { box-shadow: 0 0 0 2px var(--mint); }
.oc-b5 span { font-size: 12px; color: var(--dim); white-space: nowrap; }
.oc-cap { font-size: 12px; color: var(--faint); text-align: center; }

/* ---------- the rule ---------- */
.oc-rule { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 0; }
.oc-rule span { padding: 10px 18px; border-radius: 14px; background: var(--surface); border: 2px solid var(--line); font-weight: 700; font-size: 16px; }
.oc-rule .oc-r2 { border-color: var(--gold); color: var(--gold); }
.oc-rule .oc-r3 { border-color: var(--mint); color: var(--mint); }
.oc-rule i { font-style: normal; color: var(--faint); font-size: 18px; }

/* ---------- two dogs ---------- */
.oc-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.oc-who { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 8px; border-radius: 16px; background: var(--surface); border: 2px solid var(--line); text-align: center; }
.oc-who img { height: 118px; width: auto; filter: drop-shadow(0 8px 12px rgba(0,0,0,.45)); }
.oc-who span { font-size: 13px; line-height: 1.25; color: var(--dim); }
.oc-who b { display: block; font-size: 15px; color: var(--text); margin-bottom: 2px; }
.oc-chart { display: flex; flex-direction: column; gap: 12px; }
.oc-cl { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.oc-cl img { width: 30px; height: 30px; object-fit: contain; }
.oc-cl span { font-size: 12px; color: var(--faint); }
.oc-quit { margin-left: auto; font-style: normal; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--mint); border: 2px solid var(--mint); border-radius: 6px; padding: 1px 6px; opacity: 0; transition: opacity .25s; }
.oc-quit.on { opacity: 1; }
.oc-bars { display: flex; align-items: flex-end; gap: 2px; height: 64px; margin-top: 6px; border-bottom: 1px solid var(--line-strong); }
.oc-bars i { flex: 1; height: 0; border-radius: 3px 3px 0 0; background: var(--gold); transition: height .18s; }
.oc-crow:nth-child(2) .oc-bars i { background: var(--violet-bright); }
.oc-bars i.zero { background: var(--line-strong); }
.oc-note { font-size: 12px; color: var(--faint); }

/* ---------- the loud nights ---------- */
.oc-burst { display: flex; flex-direction: column; gap: 8px; }
.oc-cols { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; height: 150px; }
.oc-col { position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; padding: 0 2px 20px; border-radius: 8px; background: rgba(169,155,255,.06); }
.oc-col i { display: block; border-radius: 4px 4px 0 0; background: var(--gold); transition: height .3s; }
.oc-col b { position: absolute; left: 0; right: 0; bottom: 2px; font: 600 12px var(--mono); color: var(--dim); text-align: center; }
.oc-col em { position: absolute; left: 0; right: 0; top: -2px; text-align: center; font-style: normal; font-size: 18px; }
.oc-col.peak { box-shadow: inset 0 0 0 2px var(--gold); }
.oc-col.up i { background: var(--red); }

/* ---------- two machines ---------- */
.oc-mc { display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center; text-align: center; min-height: 120px; padding: 14px 10px; border-radius: 16px; background: var(--surface); border: 2px solid var(--line); }
.oc-mc b { font-size: 17px; }
.oc-mc span { font-size: 14px; color: var(--dim); }
.oc-mc:last-child { border-color: var(--gold); }

@media (max-height: 700px) {
  .oc-box { max-height: 124px; }
  .oc-b5t { height: 44px; }
  .oc-who img { height: 96px; }
  .oc-cols { height: 130px; }
  .oc-bars { height: 52px; }
  .oc-rule { gap: 4px; padding: 0; }
}
