/* Dollar-cost averaging lesson. All rules scoped under .dca-* */
.dca-sc { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.dca-note { font-size: 12.5px; color: var(--faint); text-align: center; max-width: 320px; }

/* the machine */
.dca-mach { width: 100%; max-width: 340px; display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.dca-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dca-bz { flex: 1; display: flex; justify-content: flex-start; }
.dca-bill { position: relative; z-index: 2; width: 92px; height: 46px; border-radius: 6px; display: grid; place-items: center; background: linear-gradient(135deg, #9fd8a4, #5aa863); border: 2px solid #3e7f47; box-shadow: 0 6px 16px rgba(0,0,0,.35), inset 0 0 0 4px rgba(255,255,255,.18); touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; transition: translate .25s cubic-bezier(.2,.8,.2,1), opacity .3s, scale .3s; }
.dca-bill b { font: 900 18px var(--sans); color: #1d4a24; letter-spacing: .02em; }
.dca-bill.held { transition: none; cursor: grabbing; scale: 1.06; }
.dca-bill.fed { opacity: 0; scale: .5; }
.dca-bill.gone { visibility: hidden; }
.dca-box { position: relative; width: 150px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.dca-box > img { width: 150px; height: 150px; display: block; filter: drop-shadow(0 10px 18px rgba(0,0,0,.4)); }
.dca-lbl { font: 800 12.5px var(--sans); color: var(--dim); letter-spacing: .06em; text-transform: uppercase; }
/* The screen and slot sit on the render's own screen and slot. */
.dca-scr { position: absolute; left: 22%; top: 9%; width: 56%; height: 28%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; }
.dca-scr b { font: 800 26px var(--sans); color: var(--mint); font-variant-numeric: tabular-nums; line-height: 1; }
.dca-scr span { font: 600 12px var(--sans); color: var(--dim); }
.dca-scr.low b { color: var(--gold); }
.dca-slot { position: absolute; left: 20%; top: 41%; width: 15%; height: 9%; border-radius: 6px; transition: box-shadow .2s; }
.dca-slot.hot { box-shadow: 0 0 0 4px rgba(255,200,80,.55), 0 0 22px var(--gold); }
.dca-tray { padding: 8px 12px 10px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; min-height: 92px; }
.dca-th { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font: 600 13px var(--sans); color: var(--dim); }
.dca-th b { font: 800 17px var(--sans); color: var(--text); font-variant-numeric: tabular-nums; }
.dca-toks { display: grid; grid-template-columns: repeat(10, 14px); gap: 4px; justify-content: center; }
.dca-t { width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #D6CCFF, var(--violet-bright) 50%, var(--violet-deep)); }
.dca-t.new { animation: dca-drop .35s cubic-bezier(.3,1.3,.6,1) both; }
.dca-t.lit { background: radial-gradient(circle at 35% 35%, #FFE7A8, var(--gold) 55%, var(--gold-deep)); box-shadow: 0 0 8px rgba(255,200,80,.6); }
@keyframes dca-drop { from { opacity: 0; transform: translateY(-26px); } }
.dca-val b { color: var(--gold); }
.dca-val.up b { font-size: 20px; }

/* the feed */
.dca-feed { width: 100%; max-width: 330px; display: flex; flex-direction: column; gap: 8px; }
.dca-ntf { padding: 10px 14px; border-radius: 16px; background: var(--raised, var(--surface)); border: 1px solid var(--line-strong); display: flex; flex-direction: column; gap: 2px; animation: dca-ntf .45s cubic-bezier(.2,.8,.2,1) both; }
.dca-ntf span { font: 700 12.5px var(--sans); color: var(--faint); text-transform: uppercase; letter-spacing: .04em; }
.dca-ntf b { font: 700 15px var(--sans); color: var(--text); }
@keyframes dca-ntf { from { opacity: 0; transform: translateY(-14px) scale(.97); } }

/* a pile at once */
.dca-two { display: flex; gap: 10px; width: 100%; max-width: 330px; }
.dca-plan { flex: 1; padding: 14px 8px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-align: center; display: flex; flex-direction: column; gap: 2px; transition: border-color .3s; }
.dca-plan b { font: 800 24px var(--sans); color: var(--gold); }
.dca-plan.b b { color: var(--violet-bright); }
.dca-plan span { font: 600 13px var(--sans); color: var(--dim); }
.dca-plan.won { border-color: var(--gold); box-shadow: 0 0 18px rgba(255,200,80,.25); }
.dca-hist { width: 100%; max-width: 330px; display: flex; flex-direction: column; gap: 6px; opacity: 0; transition: opacity .3s; }
.dca-hist.on { opacity: 1; }
.dca-hbar { height: 18px; border-radius: 9px; background: var(--violet-bright); overflow: hidden; }
.dca-hbar i { display: block; height: 100%; width: 0; background: var(--gold); }
.dca-hk { display: flex; justify-content: space-between; font: 600 12.5px var(--sans); color: var(--dim); }

/* a year of paydays */
.dca-year { width: 100%; max-width: 340px; }
.dca-yr.choices { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.dca-yr .choice { min-height: 54px; padding: 4px 2px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; }
.dca-yr .choice b { font: 700 12.5px var(--sans); color: var(--dim); }
.dca-yr .choice span { font: 800 17px var(--sans); color: var(--text); }
.dca-yr .choice em { display: none; font: 700 12px var(--sans); font-style: normal; color: var(--violet-bright); }
.dca-year.shown .choice em { display: block; }
.dca-year.shown .choice em::after { content: ' shares'; }
@media (max-height: 700px) { .dca-box { width: 120px; } .dca-box > img { width: 120px; height: 120px; } .dca-scr b { font-size: 21px; } .dca-tray { min-height: 80px; } }
