/* Index Fund lesson. All rules scoped under .ixf-* */
.ixf-sc { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ixf-note { font-size: 12.5px; color: var(--faint); text-align: center; }

/* the S&P 500 rolling by */
.ixf-roll { width: 100%; max-width: 300px; border-radius: 18px; background: #F3E6C8; color: #2B2112; box-shadow: 0 14px 34px rgba(0,0,0,.45); overflow: hidden; }
.ixf-rh { padding: 10px 16px 8px; font: 900 17px var(--sans); letter-spacing: .04em; border-bottom: 2px solid rgba(43,33,18,.15); }
.ixf-win { position: relative; height: 210px; overflow: hidden; }
.ixf-win::after { content: ''; position: absolute; inset: auto 0 0 0; height: 40px; background: linear-gradient(transparent, #F3E6C8); }
.ixf-names { display: flex; flex-direction: column; padding: 8px 16px 40px; will-change: transform; }
.ixf-names span { font: 700 15px/1.75 var(--serif); border-bottom: 1px dashed rgba(43,33,18,.15); }
.ixf-names .ixf-more { font: 800 15px/2 var(--sans); color: #7A5A1E; border: none; }

/* a fund */
.ixf-jar { position: relative; width: 240px; }
.ixf-jar img { display: block; width: 100%; }
.ixf-drops { position: absolute; left: 10%; right: 30%; top: -36px; height: 60px; }
.ixf-drop { position: absolute; top: 0; width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #FFE7A8, var(--gold) 55%, var(--gold-deep)); animation: ixfDrop 1.1s ease-in infinite; opacity: 0; }
@keyframes ixfDrop { 0% { transform: translateY(-20px); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(70px); opacity: 0; } }

/* the tiny list */
.ixf-list { width: 100%; max-width: 340px; padding: 8px 10px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.ixf-lh { display: flex; justify-content: space-between; font: 700 12px var(--sans); color: var(--dim); padding: 0 2px 2px; }
.ixf-row { display: grid; grid-template-columns: 40px 1fr 70px; align-items: center; gap: 8px; min-height: 46px; transition: opacity .4s, transform .4s; }
.ixf-row img { width: 40px; height: 40px; object-fit: contain; }
.ixf-rn b { display: block; font: 800 13.5px var(--sans); color: var(--text); }
.ixf-sz { height: 8px; border-radius: 4px; background: rgba(255,255,255,.06); margin-top: 4px; }
.ixf-sz i { display: block; height: 100%; border-radius: 4px; background: var(--violet-bright); }
.ixf-amt { font: 800 17px var(--sans); font-style: normal; color: var(--gold); text-align: right; font-variant-numeric: tabular-nums; }
.ixf-row.fill .ixf-sz i { background: linear-gradient(90deg, var(--violet-bright), var(--gold)); }
.ixf-row.out { opacity: .55; }
.ixf-row.out .ixf-rn b { text-decoration: line-through; }
.ixf-row.gone { opacity: 0; transform: translateX(-30px); }
.ixf-row.new { box-shadow: inset 0 0 0 1.5px rgba(63,214,154,.5); border-radius: 10px; padding-right: 4px; }
.ixf-left, .ixf-join { font: 700 12px var(--sans); }
.ixf-left { color: var(--dim); }
.ixf-join { color: var(--mint); }
.ixf-row.dn .ixf-amt { color: var(--red); }

/* three tips */
.ixf-tipsc { gap: 8px; }
.ixf-tipsc .ixf-row { min-height: 30px; }
.ixf-tipsc .ixf-sz, .ixf-tipsc .ixf-lh { display: none; }
.ixf-tipsc .ixf-amt { font-size: 15px; }
.ixf-tipsc .ixf-row img { width: 32px; height: 32px; }
.ixf-tips { width: 100%; max-width: 340px; }
.ixf-tips .choices.ixf-three { display: flex; flex-direction: column; gap: 6px; }
.ixf-three .choice { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; min-height: 48px; padding: 7px 12px; border-radius: 14px 14px 14px 4px; }
.ixf-who { font: 700 12px var(--sans); color: var(--dim); }
.ixf-three .choice b { font: 700 14px/1.25 var(--sans); }

.ixf-photo { margin: 0; width: 100%; max-width: 230px; }
.ixf-photo img { display: block; width: 100%; border-radius: 12px; }
.ixf-photo figcaption { margin-top: 6px; font-size: 12.5px; color: var(--faint); text-align: center; }

/* 2023 */
.ixf-vs { display: flex; align-items: flex-end; justify-content: center; gap: 28px; height: 220px; }
.ixf-b { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; width: 110px; height: 100%; text-align: center; }
.ixf-b i { display: block; width: 74px; height: 0; border-radius: 10px 10px 0 0; transition: height 1.4s cubic-bezier(.2,.8,.2,1); }
.ixf-b.cp i { background: linear-gradient(180deg, var(--violet-bright), var(--violet-deep)); }
.ixf-b.pk i { background: linear-gradient(180deg, #6E7894, #3B4258); }
.ixf-vs .ixf-b em { font: 800 14px var(--sans); font-style: normal; color: var(--text); margin-bottom: 6px; opacity: 0; transition: opacity .4s 1s; }
.ixf-b span { margin-top: 6px; font: 700 12.5px/1.25 var(--sans); color: var(--dim); }
.grow .ixf-b.cp i { height: 150px; }
.grow .ixf-b.pk i { height: 149px; }
.grow .ixf-b em { opacity: 1; }

/* Buffett's letter */
.ixf-letter { width: 100%; max-width: 300px; padding: 18px; border-radius: 6px; background: #F6F1E6; color: #2B2112; box-shadow: 0 6px 14px rgba(0,0,0,.45); rotate: -1.5deg; }
.ixf-letter span { display: block; font: 600 12px var(--sans); color: #6E5A3A; margin-bottom: 10px; }
.ixf-letter b { font: 700 18px/1.35 var(--serif); }

@media (max-height: 700px) {
  .ixf-sc { gap: 8px; }
  .ixf-win { height: 170px; }
  .ixf-row { min-height: 40px; }
  .ixf-row img { width: 34px; height: 34px; }
  .ixf-tipsc .ixf-row { min-height: 26px; }
  .ixf-tipsc .ixf-list { padding: 4px 10px; gap: 2px; }
  .ixf-tips .choices.ixf-three { gap: 4px; }
  .ixf-tipsc .ixf-row img { width: 26px; height: 26px; }
  .ixf-three .choice { min-height: 44px; padding: 5px 12px; }
  .ixf-photo { max-width: 190px; }
  .ixf-vs { height: 190px; }
  .grow .ixf-b.cp i { height: 124px; } .grow .ixf-b.pk i { height: 123px; }
}
