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

/* the twins' jars */
.exr-jars { display: flex; align-items: flex-end; justify-content: center; gap: 18px; width: 100%; }
.exr-jar { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.exr-val { font: 800 19px var(--sans); color: var(--gold); font-variant-numeric: tabular-nums; min-width: 110px; text-align: center; }
.exr-jar span { font: 700 13px var(--sans); color: var(--dim); }
.exr-glass { position: relative; width: 92px; height: 190px; border-radius: 16px 16px 22px 22px; border: 2px solid rgba(255,255,255,.22); background: rgba(255,255,255,.04); overflow: hidden; box-shadow: inset 0 0 18px rgba(169,155,255,.18); }
.exr-glass::before { content: ''; position: absolute; left: 10px; top: 12px; bottom: 16px; width: 6px; border-radius: 3px; background: rgba(255,255,255,.12); z-index: 1; }
.exr-glass i { position: absolute; left: 0; right: 0; bottom: 0; height: 4%; background: repeating-linear-gradient(0deg, var(--gold-deep) 0 3px, var(--gold) 3px 9px); animation: exr-in .7s both; }
.exr-jar.you.short .exr-val { color: var(--text); }
.exr-age { align-self: center; font: 600 13px var(--sans); color: var(--dim); text-align: center; min-width: 64px; }
.exr-age b { display: block; font: 800 26px var(--sans); color: var(--text); font-variant-numeric: tabular-nums; }
@keyframes exr-in { from { transform: translateY(-160px); opacity: 0; } }

/* the price tags */
.exr-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; max-width: 340px; }
.exr-card { position: relative; height: 196px; padding: 0; border: 0; background: none; color: inherit; font: inherit; perspective: 700px; cursor: pointer; }
.exr-face { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 10px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); backface-visibility: hidden; transition: transform .55s cubic-bezier(.3,.7,.3,1); }
.exr-front img { width: 100%; max-width: 120px; height: 90px; object-fit: contain; }
.exr-front b { font: 800 15px var(--sans); color: var(--text); text-align: center; }
.exr-front em { font: 600 12.5px var(--sans); font-style: normal; color: var(--dim); }
.exr-back { transform: rotateY(180deg); border-color: var(--gold); background: var(--raised); }
.exr-back em { font: 700 12.5px var(--sans); font-style: normal; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; }
.exr-back b { font: 800 40px var(--sans); color: var(--gold); font-variant-numeric: tabular-nums; }
.exr-back span { font: 600 13px var(--sans); color: var(--dim); }
.exr-card.on .exr-front { transform: rotateY(-180deg); }
.exr-card.on .exr-back { transform: rotateY(0); }

/* year one */
.exr-tapfig { position: relative; width: 100%; max-width: 320px; }
.exr-tapfig img { display: block; width: 100%; }
.exr-tapfig b { position: absolute; font: 800 15px var(--sans); color: var(--text); padding: 3px 9px; border-radius: 10px; background: rgba(10,14,26,.82); border: 1px solid var(--line-strong); white-space: nowrap; font-variant-numeric: tabular-nums; }
.exr-on-jar { left: 25%; top: 46%; }
.exr-on-cup { left: 58%; bottom: 2%; color: var(--gold) !important; }

/* the piles */
.exr-piles { display: flex; align-items: flex-end; justify-content: center; gap: 30px; height: 236px; width: 100%; }
.exr-pile { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 5px; height: 100%; width: 110px; }
.exr-pile b { font: 800 18px var(--sans); color: var(--gold); font-variant-numeric: tabular-nums; }
.exr-pile.you b { color: var(--text); }
.exr-pile span { font: 700 12.5px var(--sans); color: var(--dim); white-space: nowrap; }
.exr-stack { position: relative; width: 78px; border-radius: 10px 10px 4px 4px; background: repeating-linear-gradient(0deg, var(--gold-deep) 0 3px, var(--gold) 3px 10px); }
.exr-gap { position: absolute; left: -2px; right: -2px; bottom: 100%; height: 0; border: 2px dashed var(--violet-bright); border-bottom: 0; border-radius: 10px 10px 0 0; background: rgba(169,155,255,.16); transition: height .7s ease-out; }
.exr-pile.you.gap .exr-gap { height: calc((100% / 0.682) - 100%); }

/* every fee */
.exr-chart { position: relative; width: 100%; max-width: 340px; display: flex; flex-direction: column; gap: 6px; }
.exr-tot { display: flex; align-items: baseline; justify-content: center; gap: 8px; }
.exr-tot span { font: 600 13px var(--sans); color: var(--dim); }
.exr-tot b { font: 800 22px var(--sans); color: var(--gold); font-variant-numeric: tabular-nums; }
.exr-bars { display: grid; grid-template-columns: repeat(40, minmax(0, 1fr)); gap: 2px; align-items: end; height: 170px; border-bottom: 1px solid var(--line-strong); }
.exr-b { position: relative; height: 100%; }
.exr-b i { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 2px 2px 0 0; }
.exr-b .f { background: var(--gold); z-index: 1; }
.exr-b .g { height: 0; background: rgba(169,155,255,.55); }
.exr-ax { display: flex; justify-content: space-between; font: 600 12px var(--sans); color: var(--faint); }
.exr-lbl { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; font: 600 12.5px var(--sans); color: var(--dim); opacity: 0; transition: opacity .4s; }
.exr-lbl i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.exr-lbl i.f { background: var(--gold); }
.exr-lbl i.g { background: rgba(169,155,255,.75); }
.exr-chart.lbl .exr-lbl { opacity: 1; }

/* your own fee */
.exr-jar.mine .exr-glass { height: 170px; }
.exr-less { font: 600 12.5px var(--sans); font-style: normal; color: var(--violet-bright); min-height: 16px; }
.exr-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; width: calc(100% - 20px); max-width: 320px; }
.exr-chip { min-height: 48px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); color: var(--text); font: 800 16px var(--sans); cursor: pointer; transition: border-color .2s, background .2s; }
.exr-chip.on { border-color: var(--gold); background: var(--raised); color: var(--gold); }
.exr-tot.g b { color: var(--violet-bright); }

/* two funds */
.exr-funds { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; max-width: 340px; }
.exr-fund { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 8px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-align: center; }
.exr-fund b { font: 800 16px var(--sans); color: var(--text); }
.exr-fund span { font: 600 12.5px var(--sans); color: var(--dim); }
.exr-fund em { margin-top: 8px; font: 800 30px var(--sans); font-style: normal; color: var(--gold); font-variant-numeric: tabular-nums; }
.exr-fund small { font: 600 12px var(--sans); color: var(--faint); }

@media (max-height: 700px) {
  .exr-glass { height: 150px; }
  .exr-card { height: 160px; }
  .exr-front img { height: 66px; }
  .exr-piles { height: 200px; }
  .exr-bars { height: 130px; }
  .exr-tapfig { max-width: 260px; }
  .exr-jar.mine .exr-glass { height: 120px; }
}
