/* Certificate page. The certificate is sized in cqw (percent of its own width), so screen, phone and A4 print all show the same layout. */

.cert-page{padding-block:20px 40px}
.cert-look{max-width:520px;margin:30px auto;text-align:center}
.cert-look h1{font-size:26px;margin:0 0 10px}
.cert-form{display:flex;gap:8px;margin-top:14px}
.cert-form input{flex:1;min-width:0;padding:10px 12px;border:1px solid var(--line);border-radius:8px;font:inherit;min-height:44px;text-align:center;letter-spacing:.06em;text-transform:uppercase}
.cert-none,.cert-revoked{background:#fef2f2;color:#b91c1c;border-radius:8px;padding:10px 14px;margin:0}
.cert-ok,.cert-sample{border-radius:8px;padding:10px 14px;margin:0 0 12px;font-size:15px}
.cert-ok{background:#ecfdf3;color:#166534}
.cert-ok::before{content:"✓ ";font-weight:800}
.cert-sample{background:#fff7ed;color:#9a3412}
.cert-bar{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 14px}
.cert-bar .btn{min-height:42px}
.cert-ghost{background:#fff;color:var(--ink);box-shadow:inset 0 0 0 1px var(--line)}
.cert-ghost:hover{background:var(--soft);color:var(--ink)}
.cert-more{margin:14px 0 0}

.cert{--a:var(--brand);container-type:inline-size;position:relative;width:100%;max-width:1000px;aspect-ratio:297/210;margin-inline:auto;background:#fffdf8;color:#1f2430;box-shadow:0 10px 34px rgba(16,24,40,.16)}
.cert-in{position:absolute;inset:2.2cqw;display:flex;flex-direction:column;align-items:center;text-align:center;padding:2.6cqw 5cqw 2.2cqw;border:.4cqw solid var(--a);outline:.12cqw solid var(--a);outline-offset:-1cqw}
.cert p,.cert h1,.cert h2{margin:0;font-family:inherit}
.cert-main{margin-block:auto;width:100%;display:flex;flex-direction:column;align-items:center}
.cert-logo{max-height:7cqw;max-width:28cqw;width:auto;height:auto;margin-bottom:.8cqw}
.cert-inst{font-size:2.3cqw;font-weight:600;line-height:1.3}
.cert-h{font-size:6.6cqw;font-weight:800;line-height:1.25;color:var(--a);margin-top:.5cqw!important}
.cert-before,.cert-after{font-size:2.3cqw;line-height:1.4;color:#4a5260}
.cert-before{margin-top:1.2cqw!important}
.cert-name{font-size:5.4cqw;font-weight:800;line-height:1.3;padding:.3cqw 4cqw .5cqw;margin-top:.5cqw!important;border-bottom:.14cqw solid #c9ced8;color:#14171c;overflow-wrap:anywhere}
.cert-name.is-long{font-size:3.9cqw}
.cert-name.is-xlong{font-size:2.9cqw}
.cert-after{margin-top:.9cqw!important}
.cert-course{font-size:3.5cqw;font-weight:700;line-height:1.3;margin-top:.6cqw!important;overflow-wrap:anywhere}
.cert-course.is-long{font-size:2.7cqw}
.cert-course.is-xlong{font-size:2cqw}
.cert-foot{display:grid;grid-template-columns:1fr 1fr 1fr;gap:2cqw;width:100%;align-items:end}
.cert-col{display:flex;flex-direction:column;align-items:center;min-width:0;line-height:1.35;overflow-wrap:anywhere}
.cert-col strong{font-size:1.9cqw;font-weight:700}
.cert-col span{font-size:1.5cqw;color:#4a5260}
.cert-col small{font-size:1.3cqw;color:#6b7280;border-top:.08cqw solid #c9ced8;padding-top:.3cqw;margin-top:.3cqw;align-self:stretch}
.cert-code{letter-spacing:.06em;font-variant-numeric:tabular-nums}
/* The QR sits beside the code, so the footer gets no taller. About 23 mm wide on A4, easy for a phone camera.
   The middle column grows to make room, so the address keeps the width it had without the QR. */
.cert-foot.has-qr{grid-template-columns:1fr 1.6fr 1fr}
.cert-check{flex-direction:row;align-items:flex-end;justify-content:center;gap:1cqw}
.cert-check-t{display:flex;flex-direction:column;align-items:center;min-width:0;flex:1}
.cert-qr{width:7.8cqw;height:7.8cqw;flex:none}
.cert-sig{max-height:4.4cqw;max-width:18cqw;width:auto;height:auto}

@page{size:A4 landscape;margin:0}
@media print{
	html,body{background:#fff!important;margin:0!important;padding:0!important}
	.site-header,.site-footer,.drawer,.bbar,.cert-ok,.cert-sample,.cert-bar,.cert-more,.skip,#wpadminbar{display:none!important}
	body *{visibility:hidden}
	.site-main,.cert-page{margin:0!important;padding:0!important;max-width:none!important}
	.cert,.cert *{visibility:visible}
	.cert{position:fixed;left:0;top:0;width:297mm;max-width:none;height:210mm;aspect-ratio:auto;box-shadow:none;-webkit-print-color-adjust:exact;print-color-adjust:exact}
}
