/* AI credits: balance chip + credits screen */
.cr-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: 999px; border: 1.5px solid #d9d2f3; background: #fff; color: #2b2350; font: 700 13.5px var(--font-body); cursor: pointer; transition: transform .12s ease, box-shadow .12s ease; }
.cr-chip:hover { transform: translateY(-1px); box-shadow: 0 4px 14px -6px rgba(43, 35, 80, .45); }
.cr-chip:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.cr-chip b { font-size: 15px; }
.cr-star { color: #d9941a; font-size: 15px; line-height: 1; }
.cr-chip.cr-low { border-color: #f1c27a; background: #fff8e8; }
.cr-chip.cr-empty { border-color: #f0a196; background: #fff1ef; color: #9c2f22; }

.cr-box { max-width: 560px; }
.cr-alert { display: grid; gap: 4px; margin: 4px 0 12px; padding: 12px 14px; border-radius: 12px; background: #fff1ef; border: 1px solid #f0a196; color: #7a2419; font-size: 14px; }
.cr-alert b { font-size: 15.5px; }
.cr-hero { display: flex; align-items: baseline; gap: 10px; margin: 6px 0 10px; }
.cr-num { font: 800 46px/1 var(--font-display); color: var(--accent-deep, #3f2fbf); letter-spacing: -.5px; }
.cr-num.low { color: #b06a00; }
.cr-num.zero { color: #c2402f; }
.cr-sub { color: var(--muted); font-weight: 600; }
.cr-intro { margin: 0 0 14px; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.cr-h { margin: 16px 0 8px; font-size: 14px; }
.cr-costs { display: grid; gap: 4px; }
.cr-cost { display: flex; justify-content: space-between; gap: 12px; padding: 7px 11px; border-radius: 9px; background: #f6f5fc; font-size: 13.5px; }
.cr-cost span:last-child { font-weight: 800; color: var(--accent-deep, #3f2fbf); white-space: nowrap; }
.cr-note { margin: 6px 0 0; color: var(--muted); font-size: 12.5px; }
.cr-soon { margin: 0; padding: 11px 13px; border-radius: 11px; background: #fff8e8; border: 1px dashed #e3b560; color: #6b4b00; font-size: 13.5px; line-height: 1.5; }
.cr-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.cr-plan { display: grid; gap: 3px; padding: 13px; border-radius: 13px; border: 1.5px solid #d9d2f3; background: #fff; }
.cr-plan b { font: 800 26px/1.1 var(--font-display); }
.cr-plan em { font-style: normal; font-weight: 700; }
.cr-plan small { color: var(--muted); }
.cr-plan .btn { justify-self: start; margin-top: 7px; }
.cr-history { display: grid; gap: 2px; }
.cr-row { display: grid; grid-template-columns: 58px 1fr auto; align-items: center; gap: 10px; padding: 7px 4px; border-bottom: 1px solid #efedf7; font-size: 13.5px; }
.cr-row:last-child { border-bottom: 0; }
.cr-delta { font-weight: 800; text-align: right; }
.cr-delta.plus { color: #0f7a55; }
.cr-delta.minus { color: #9c2f22; }
.cr-what { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-when { color: var(--muted); font-size: 12.5px; white-space: nowrap; }

@media print { .cr-chip, .cr-box { display: none !important; } }
.ck-credits { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 0 auto; }
.ck-credits:empty { display: none; }
.ck-cost { color: var(--muted); font-size: 12.5px; font-weight: 600; margin-right: auto; align-self: center; }

/* teacher page: the checker inside the "Check homework" tab */
.check-frame { display: block; width: 100%; height: 900px; border: 0; border-radius: 18px; background: #fff; box-shadow: 0 10px 30px -18px rgba(27,42,91,.35); }
