/* Credit card debt lesson. All rules scoped under .ccd-* */
.ccd-sc { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }

/* tap to pay */
.ccd-buy { height: 280px; }
.ccd-lap { position: relative; width: 210px; }
.ccd-lap img { width: 100%; display: block; }
.ccd-tag { position: absolute; right: -6px; top: 6px; padding: 5px 11px; border-radius: 999px; background: var(--gold); color: #2A1E05; font: 800 15px var(--sans); transform: rotate(6deg); }
.ccd-lap { animation: ccd-in .7s cubic-bezier(.3, .8, .3, 1) both; }
.ccd-tag { animation: ccd-pop .4s .6s both; }
@keyframes ccd-in { from { transform: translateY(24px); opacity: 0; } }
@keyframes ccd-pop { from { transform: rotate(6deg) scale(0); } }
.ccd-card { position: absolute; width: 132px; left: 50%; bottom: 0; transform: translateX(-50%) rotate(-8deg); transition: transform .6s cubic-bezier(.3, .8, .3, 1), opacity .4s .5s; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .35)); }
.ccd-buy.paid .ccd-card { transform: translate(-50%, -120px) rotate(0) scale(.7); opacity: 0; }
.ccd-ok { position: absolute; left: 50%; bottom: 36px; transform: translateX(-50%) scale(.6); opacity: 0; padding: 7px 16px; border-radius: 999px; background: var(--mint); color: var(--mint-ink); font: 800 16px var(--sans); transition: transform .35s .7s, opacity .35s .7s; }
.ccd-buy.paid .ccd-ok { opacity: 1; transform: translateX(-50%) scale(1); }

/* the bill */
.ccd-bill { width: 100%; max-width: 320px; padding: 14px 16px; border-radius: 14px; background: #F4F0E8; color: #23293D; box-shadow: 0 10px 24px rgba(0, 0, 0, .3); display: flex; flex-direction: column; gap: 8px; }
.ccd-bh { display: flex; justify-content: space-between; align-items: baseline; font: 700 13px var(--sans); color: #5A5F70; border-bottom: 1px dashed #B9B3A6; padding-bottom: 8px; }
.ccd-bh span { font: 800 15px var(--sans); color: #23293D; }
.ccd-bl { display: flex; justify-content: space-between; align-items: baseline; font: 600 15px var(--sans); }
.ccd-bl i { font-style: normal; color: #5A5F70; }
.ccd-bl b { font: 800 22px var(--sans); }
.ccd-bn { font: 600 13px/1.35 var(--sans); color: #3E4458; background: #E6E0D2; border-radius: 8px; padding: 8px 10px; }

/* what you owe */
.ccd-owe { width: 100%; max-width: 340px; display: flex; flex-direction: column; gap: 10px; }
.ccd-ot { display: flex; justify-content: space-between; align-items: baseline; }
.ccd-ot i { font: 600 15px var(--sans); color: var(--dim); font-style: normal; }
.ccd-on { font: 800 34px var(--sans); color: var(--text); font-variant-numeric: tabular-nums; }
.ccd-track { position: relative; display: flex; height: 46px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); overflow: visible; }
.ccd-debt { height: 100%; background: var(--violet); border-radius: 9px 0 0 9px; }
.ccd-int { position: relative; height: 100%; background: var(--gold); }
.ccd-int[data-label]:not([data-label=""])::after { content: attr(data-label); position: absolute; right: 0; bottom: -22px; font: 800 14px var(--sans); color: var(--gold); white-space: nowrap; }
.ccd-py { display: grid; grid-template-columns: auto repeat(3, 1fr); gap: 8px; align-items: center; margin-top: 4px; opacity: 0; transform: translateY(10px); transition: opacity .35s, transform .35s; }
.ccd-py.on { opacity: 1; transform: none; }
.ccd-py i { font: 700 14px var(--sans); color: var(--text); font-style: normal; }
.ccd-c { height: 40px; border-radius: 999px; display: flex; align-items: center; justify-content: center; background: var(--mint); color: var(--mint-ink); font: 800 14px var(--sans); transition: background .3s, color .3s, transform .3s; }
.ccd-c.to-int { background: var(--gold); color: #2A1E05; transform: scale(1.04); }
.ccd-c.to-debt { background: var(--violet); color: #fff; transform: scale(1.04); }
.ccd-key { display: flex; gap: 14px; margin-top: 2px; font: 600 13px var(--sans); color: var(--dim); }
.ccd-key span::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.ccd-k1::before { background: var(--violet); }
.ccd-k2::before { background: var(--gold); }
.ccd-note { font-size: 12.5px; color: var(--faint); }

/* lanes */
.ccd-lanes { width: 100%; max-width: 350px; display: flex; flex-direction: column; gap: 12px; }
.ccd-yr { display: grid; grid-template-columns: repeat(7, 1fr) 0; font: 600 12px var(--sans); color: var(--faint); }
.ccd-yr i { font-style: normal; border-left: 1px solid var(--line); padding-left: 3px; height: 16px; }
.ccd-ax { font: 600 12px var(--sans); color: var(--faint); text-align: right; margin-top: -6px; }
.ccd-ln { display: flex; flex-direction: column; gap: 5px; opacity: .45; transition: opacity .3s; }
.ccd-ln.go { opacity: 1; }
.ccd-one .ccd-b { display: none; }
.ccd-lh { display: flex; justify-content: space-between; align-items: baseline; font: 700 14px var(--sans); color: var(--text); }
.ccd-lt { font: 800 14px var(--sans); color: var(--gold); }
.ccd-lb { height: 26px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.ccd-lb span { display: block; height: 100%; width: 0; background: var(--violet); }
.ccd-b .ccd-lb span { background: var(--mint); }
.ccd-lf { font: 600 13px var(--sans); color: var(--dim); min-height: 18px; font-variant-numeric: tabular-nums; }
.ccd-ln.done .ccd-lp { color: var(--text); font-weight: 800; }

/* the 2010 box */
.ccd-warn { width: 100%; max-width: 330px; padding: 14px; border-radius: 12px; background: #F4F0E8; color: #23293D; border: 2px solid #23293D; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 10px 24px rgba(0, 0, 0, .3); }
.ccd-warn > b { font: 800 16px var(--sans); }
.ccd-wr { display: grid; grid-template-columns: 1.4fr 1fr .8fr; gap: 6px; font: 700 14px var(--sans); align-items: baseline; }
.ccd-wr span:last-child { font-weight: 800; font-size: 16px; }
.ccd-wh { font-size: 12.5px; color: #5A5F70; border-bottom: 1px solid #B9B3A6; padding-bottom: 6px; }
.ccd-wh i { font-style: normal; }
.ccd-wl { font: 700 12.5px var(--sans); color: #5A5F70; margin-bottom: -4px; }

@media (max-height: 700px) {
  .ccd-buy { height: 230px; }
  .ccd-lap { width: 170px; }
  .ccd-card { width: 112px; }
  .ccd-bl b { font-size: 19px; }
  .ccd-on { font-size: 28px; }
}
