/* Certificates and the learning calendar (js/certs.js) */
.cert-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.cert-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 14px; background: var(--bg); }
.cert-item.got { border-color: #d9b75f; background: linear-gradient(135deg, color-mix(in srgb, #f4dc8e 22%, var(--bg)), var(--bg)); }
.cert-badge { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; font: 800 .95rem/1 "Bricolage Grotesque", Rubik, sans-serif; color: var(--muted); background: var(--surface-2, var(--surface)); border: 2px dashed var(--rule); }
.cert-item.got .cert-badge, .cert-badge.big { color: #fffaf0; border: 0; background: radial-gradient(circle at 35% 30%, #f4dc8e, #a8812c); box-shadow: 0 4px 14px rgba(168, 129, 44, .35), inset 0 0 0 3px rgba(255, 255, 255, .45); }
.cert-badge.big { width: 64px; height: 64px; font-size: 1.3rem; }
.cert-meta { display: grid; gap: 4px; min-width: 0; }
.cert-bar { height: 6px; border-radius: 99px; background: var(--rule); overflow: hidden; }
.cert-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #d9b75f); }
.cert-item.got .cert-bar span { background: linear-gradient(90deg, #a8812c, #f4dc8e); }
.cert-won { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px; margin: 14px auto; padding: 16px 18px; max-width: 520px; border-radius: 18px; border: 1px solid #d9b75f; background: linear-gradient(135deg, color-mix(in srgb, #f4dc8e 25%, var(--surface)), var(--surface)); text-align: start; }
.cert-won p { margin: 2px 0 0; }

.cert-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(8, 11, 22, .72); backdrop-filter: blur(6px); animation: cert-in .25s ease-out; }
.cert-sheet { width: min(980px, 100%); display: grid; gap: 14px; }
.cert-canvas { aspect-ratio: 1600 / 1130; border-radius: 10px; overflow: hidden; background: #f6f1e5; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); display: grid; place-items: center; }
.cert-img { width: 100%; height: 100%; display: block; }
.cert-wait { width: 36px; height: 36px; border-radius: 50%; border: 3px solid #d9b75f; border-top-color: transparent; animation: cert-spin .8s linear infinite; }
.cert-acts { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.cert-acts .btn.ghost { background: rgba(255, 255, 255, .92); color: #1d2340; }
@keyframes cert-in { from { opacity: 0; } }
@keyframes cert-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .cert-modal, .cert-wait { animation: none; } }

.cal-grid { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 1fr); gap: 4px; margin-top: 10px; direction: ltr; overflow-x: auto; padding-bottom: 2px; }
.cal-d { width: 100%; min-width: 11px; aspect-ratio: 1; border-radius: 3px; background: var(--rule); }
.cal-d.future { background: transparent; }
.cal-d.l1 { background: color-mix(in srgb, var(--ok) 30%, var(--rule)); }
.cal-d.l2 { background: color-mix(in srgb, var(--ok) 55%, var(--rule)); }
.cal-d.l3 { background: color-mix(in srgb, var(--ok) 80%, var(--rule)); }
.cal-d.l4 { background: var(--ok); box-shadow: 0 0 0 1px color-mix(in srgb, var(--ok) 60%, transparent); }
.cal-key { display: flex; align-items: center; gap: 4px; justify-content: flex-end; margin-top: 8px; direction: ltr; }
.cal-key .cal-d { width: 11px; min-width: 11px; }
[dir="rtl"] .cal-key { flex-direction: row-reverse; justify-content: flex-start; }
