.cert-wrap { display: flex; justify-content: center; }
.certificate {
  width: min(210mm, 100%);
  background: #fdfcf7;
  color: #1c1915;
  font-family: "Iowan Old Style", Palatino, Georgia, serif;
  padding: 18mm 16mm;
  border: 1px solid var(--line);
  position: relative;
}
.certificate .corner {
  position: absolute; width: 18mm; height: 18mm;
  border: 2px solid #6d5010; pointer-events: none;
}
.certificate .corner.tl { top: 8mm; left: 8mm; border-right: 0; border-bottom: 0; }
.certificate .corner.tr { top: 8mm; right: 8mm; border-left: 0; border-bottom: 0; }
.certificate .corner.bl { bottom: 8mm; left: 8mm; border-right: 0; border-top: 0; }
.certificate .corner.br { bottom: 8mm; right: 8mm; border-left: 0; border-top: 0; }
.cert-inner { border: 1px solid #c9bfa3; padding: 10mm; }
.cert-eyebrow, .cert-label {
  font-family: var(--sans);
  font-size: .8rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #6d5010;
  text-align: center;
}
.cert-title {
  text-align: center;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 8px 0 18px;
}
.cert-dl { margin: 0; }
.cert-dl div { display: grid; grid-template-columns: 9rem 1fr; gap: 8px; padding: 6px 0; border-bottom: 1px solid #e6dcc4; }
.cert-dl dt { color: #5c5348; font-family: var(--sans); font-size: .85rem; }
.cert-dl dd { margin: 0; word-break: break-all; }
.cert-expired { text-align: center; color: #8a3b12; font-weight: 700; }
#status.is-bad { color: var(--bad); }
#status.is-ok { color: var(--ok); }

@page { size: A4 portrait; margin: 12mm; }
@media print {
  .nav, .foot, .rail, .field, .skip, .no-print { display: none !important; }
  body, .certificate { background: #fff; }
  .certificate { border: 0; width: 100%; box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
