/* v5.71.0: certificate kind and skill levels. Assessment pages (moddetail), the public
   certificate page, Module Studio's certificate card and "no certificate" notes on cards. */

/* Hero chip: links down to the certificate card. */
.mdhero-facts li.mdcert-chip { padding: 0; }
.mdhero-facts li.mdcert-chip a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; color: inherit; text-decoration: none; }
.mdhero-facts li.mdcert-chip b { font-size: 0.95rem; }
.mdhero-facts li.mdcert-chip.none { border-style: dashed; }

/* The certificate card. */
.mdcert { position: relative; overflow: hidden; border-left: 5px solid #0ea5a4; }
.mdcert.none { border-left-color: #94a3b8; }
.mdcert.completion { border-left-color: #1d4ed8; }
.mdcert-head { display: flex; gap: 14px; align-items: flex-start; }
.mdcert-head h2 { margin: 0 0 6px; }
.mdcert-head p { margin: 0 0 6px; color: var(--muted); }
.mdcert-icon { flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.6rem; background: color-mix(in srgb, #0ea5a4 14%, transparent); animation: mdcert-pop 0.6s ease-out both; }
.mdcert.none .mdcert-icon { background: color-mix(in srgb, #94a3b8 18%, transparent); }
@keyframes mdcert-pop { from { transform: scale(0.6) rotate(-12deg); opacity: 0; } to { transform: none; opacity: 1; } }

.mdcert-levels { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr)); gap: 8px; }
.mdcert-levels li { --h: #0f766e; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--h) 30%, transparent); background: color-mix(in srgb, var(--h) 8%, transparent); animation: mdcert-rise 0.5s ease-out both; }
.mdcert-levels li b { color: var(--h); font-size: 0.98rem; }
.mdcert-levels li small { font-weight: 700; }
.mdcert-levels li em { font-style: normal; font-size: 0.78rem; color: var(--muted); }
.mdcert-levels li.below { --h: #64748b; border-style: dashed; }
.mdcert-levels li.lv1 { --h: #1d4ed8; animation-delay: 0.08s; }
.mdcert-levels li.lv2 { --h: #6d28d9; animation-delay: 0.16s; }
.mdcert-levels li.lv3 { --h: #b45309; animation-delay: 0.24s; }
.mdcert-levels li.lv4 { --h: #be185d; animation-delay: 0.32s; }
.mdcert-levels li.lv5 { --h: #0e7490; animation-delay: 0.4s; }
@keyframes mdcert-rise { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
:where([data-theme="dark"]) .mdcert-levels li b { color: color-mix(in srgb, var(--h) 55%, white); }
@media (prefers-reduced-motion: reduce) { .mdcert-icon, .mdcert-levels li { animation: none; } }

/* Public certificate page: the level under the assessment name. */
.cert-level { margin: 12px 0 0; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.cert-level small { font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: #0ea5a4; font-weight: 700; }
.cert-level b { display: inline-block; padding: 6px 20px; border-radius: 99px; border: 2px solid #1d4ed8; color: #1d4ed8; letter-spacing: 0.14em; text-transform: uppercase; font-size: 1rem; }
.certview.premium .cert-level b { border-color: #b8892b; color: #0a1a3a; }
.cert-levels { margin-top: 6px; }

/* "No certificate" notes on assessment cards. */
.acard-nocert { display: inline-flex; align-items: center; gap: 4px; font-size: 0.8rem; color: var(--muted); margin: 6px 0 0; }

/* Module Studio. */
.certkinds { display: grid; gap: 6px; }
.certkinds .check span small { display: block; }
.certband-table { width: auto; margin: 6px 0; border-collapse: collapse; }
.certband-table th { text-align: left; font-size: 0.8rem; color: var(--muted); padding: 2px 8px 2px 0; }
.certband-table td { padding: 3px 8px 3px 0; }
.certband-table input.w5 { width: 6em; }
.certform:has(input[name="bands_mode"][value="default"]:checked) .certband-table { opacity: 0.5; }
