/* Eudaimonia lesson. Everything scoped under .eu-*. */
.eu-sc { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.eu-hero img { display: block; width: 240px; max-width: 100%; max-height: 28vh; object-fit: contain; margin: 0 auto; filter: drop-shadow(0 18px 30px rgba(123,92,253,.3)); }
.eu-note { text-align: center; font-size: 13px; color: var(--dim); }

/* two lyre players */
.eu-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; max-width: 340px; }
.eu-col { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 6px 10px; border-radius: 16px; background: var(--raised); border: 1.5px solid var(--line); transition: border-color .3s, box-shadow .3s; }
.eu-col.win { border-color: var(--mint); box-shadow: 0 0 0 3px rgba(63,214,154,.18); }
.eu-pl { width: auto; height: min(96px, 14vh); object-fit: contain; filter: drop-shadow(0 10px 18px rgba(123,92,253,.3)); }
.eu-col b { font-size: 15px; color: var(--text); }
.eu-col > span { font-size: 13px; color: var(--dim); }
.eu-pad { position: relative; width: 100%; max-width: 150px; margin-top: 4px; touch-action: none; cursor: pointer; -webkit-user-select: none; user-select: none; }
.eu-pad svg { display: block; width: 100%; height: min(120px, 17vh); }
.eu-frame { fill: none; stroke: var(--gold-deep); stroke-width: 5; stroke-linecap: round; }
.eu-box { fill: var(--gold-deep); opacity: .85; }
.eu-bar { fill: none; stroke: var(--gold-deep); stroke-width: 6; stroke-linecap: round; }
.eu-str { stroke: var(--gold); stroke-width: 1.6; opacity: .75; }
.eu-str.on { animation: eu-twang .6s ease-out; }
@keyframes eu-twang { 0% { stroke: #fff; stroke-width: 4; opacity: 1; } 100% { stroke: var(--gold); stroke-width: 1.6; opacity: .75; } }
.eu-padv { display: block; min-height: 18px; text-align: center; font: 700 13px var(--sans); }
.eu-padv.ok { color: var(--mint); }
.eu-padv.bad { color: var(--red); }

/* the job tiles */
.eu-jobs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; max-width: 330px; }
.eu-job { display: flex; flex-direction: column; gap: 4px; padding: 16px 12px; border-radius: 16px; background: var(--raised); border: 1.5px solid var(--line); text-align: center; }
.eu-job span { font-size: 14px; color: var(--dim); }
.eu-job b { font: 700 19px var(--serif); color: var(--text); }
.eu-job.q { border-color: var(--gold); }
.eu-job.q b { color: var(--gold); font-size: 26px; }

/* plant, horse, human */
.eu-lay { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; width: 100%; max-width: 340px; }
.eu-lh { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.eu-lh img { height: min(80px, 11vh); width: auto; max-width: 100%; object-fit: contain; }
.eu-lh b { font-size: 14px; color: var(--text); }
.eu-lc { min-height: 40px; display: flex; align-items: center; justify-content: center; padding: 4px 6px; border-radius: 10px; font-size: 13px; font-weight: 700; line-height: 1.2; text-align: center; }
.eu-lc.on { background: rgba(123,92,253,.2); border: 1.5px solid rgba(169,155,255,.4); color: var(--text); }
.eu-lc.off { border: 1.5px dashed var(--line); }
.eu-lc.last { background: var(--raised); border: 1.5px dashed var(--gold); color: var(--gold); font-size: 18px; }
.eu-lc.last.gold { background: rgba(252,192,80,.18); border-style: solid; font-size: 13px; animation: eu-pop .4s ease-out; }
@keyframes eu-pop { 0% { transform: scale(.8); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }

/* the definition, piece by piece */
.eu-chain { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; max-width: 300px; }
.eu-chain > i { font: 700 18px var(--sans); font-style: normal; color: var(--faint); opacity: 0; transition: opacity .3s; }
.eu-link { width: 100%; display: flex; justify-content: space-between; align-items: baseline; padding: 9px 14px; border-radius: 12px; background: var(--raised); border: 1.5px solid var(--line); opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s; }
.eu-chain .in { opacity: 1; transform: none; }
.eu-link b { font-size: 15px; color: var(--text); }
.eu-link span { font-size: 13px; color: var(--dim); }
.eu-link.gold { border-color: var(--gold); background: rgba(252,192,80,.12); }
.eu-link.gold b { color: var(--gold); font: 700 18px var(--serif); }
.reduced .eu-link, .reduced .eu-chain > i { transition: none; }

/* the test cases and their three lamps */
.eu-deck { width: 100%; max-width: 340px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.eu-lamps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; width: 100%; }
.eu-lamp { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.eu-lamp i { width: 22px; height: 22px; border-radius: 50%; background: #2a3150; border: 2px solid var(--line-strong); transition: background .25s, box-shadow .25s, border-color .25s; }
.eu-lamp span { font-size: 12px; font-weight: 700; color: var(--dim); line-height: 1.2; }
.eu-lamp.ok i { background: var(--mint); border-color: var(--mint); box-shadow: 0 0 14px rgba(63,214,154,.7); }
.eu-lamp.no i { background: var(--red); border-color: var(--red); box-shadow: 0 0 10px rgba(216,85,85,.5); }
.eu-case { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px; border-radius: 18px; background: var(--raised); border: 1.5px solid var(--line); }
.eu-case.enter { animation: eu-in .45s cubic-bezier(.2,.8,.2,1); }
@keyframes eu-in { from { transform: translateX(40px) rotate(4deg); opacity: 0; } to { transform: none; opacity: 1; } }
.eu-case img { height: min(110px, 15vh); width: auto; max-width: 100%; object-fit: contain; }
.eu-case.wide img { height: min(92px, 13vh); }
.eu-case p { margin: 0; font: 600 16px/1.3 var(--serif); color: var(--text); text-align: center; }

@media (max-height: 700px) {
  .eu-pl { height: 72px; }
  .eu-pad svg { height: 96px; }
  .eu-case img { height: 84px; }
  .eu-case.wide img { height: 70px; }
  .eu-case p { font-size: 15px; }
  .eu-lh img { height: 60px; }
}
