/* Static Inter faces let the browser embed selectable TrueType text in the PDF. */
@font-face {
  font-family: "Inter Print";
  src: url("assets/fonts/inter-regular.ttf") format("truetype");
  font-weight: 400;
}
@font-face {
  font-family: "Inter Print";
  src: url("assets/fonts/inter-semibold.ttf") format("truetype");
  font-weight: 600;
}
@font-face {
  font-family: "Inter Print";
  src: url("assets/fonts/inter-bold.ttf") format("truetype");
  font-weight: 700;
}
.printing-certificate .certificate-paper { font-family: "Inter Print", var(--font-sans); }

/* A4 proportions keep the printed artwork and live text aligned at every size. */
.certificate-paper {
  position: relative;
  container-type: inline-size;
  width: 100%;
  aspect-ratio: 297 / 210;
  overflow: hidden;
  background: #fffcf3;
  color: #123c2f;
  text-align: center;
}
.certificate-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.certificate-brand {
  position: absolute;
  top: 4.6%;
  left: 41.92%;
  width: 16.16%;
  height: auto;
}
.certificate-paper :is(.certificate-kind, .certificate-title, .certificate-recipient, .certificate-name,
  .certificate-message, .certificate-details, .certificate-score, .certificate-topics) {
  position: absolute;
  margin: 0;
}
.certificate-paper :is(.certificate-kind, .certificate-title, .certificate-recipient, .certificate-message) {
  inset-inline: 10%;
}
.certificate-paper .certificate-kind {
  top: 15.3%;
  color: #123c2f;
  font-size: 3.80cqw;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: .22cqw;
  text-transform: uppercase;
}
.certificate-title {
  top: 45.05%;
  font-size: 2.97cqw;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -.014em;
}
.certificate-recipient {
  top: 24.05%;
  color: #90632c;
  font-size: 1.20cqw;
  font-weight: 600;
  letter-spacing: .18cqw;
  text-transform: uppercase;
  line-height: 1.2;
}
.certificate-name {
  inset-inline: 20.8%;
  top: 26.55%;
  height: 9.8%;
  align-content: center;
  overflow-wrap: anywhere;
  font-size: var(--certificate-name-size, 5.46cqw);
  line-height: 1.08;
  letter-spacing: -.012em;
  font-weight: 700;
}
.certificate-name span { display: block; }
.certificate-score {
  inset: 38.69% 33.73% auto;
  height: 4.2%;
  color: #fbe5b0;
  line-height: 1;
}
.certificate-score :is(span, strong) {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
}
.certificate-score span {
  left: 36.86%;
  font-size: 1.18cqw;
  font-weight: 600;
  letter-spacing: .137cqw;
  text-transform: uppercase;
}
.certificate-score strong {
  left: 81.75%;
  font-size: 1.45cqw;
  font-weight: 700;
}
.certificate-message {
  top: 50.8%;
  color: #425c50;
  font-size: 1.32cqw;
  line-height: 1.46;
}
.certificate-topics {
  inset: 60.05% 8.91% 21.51%;
}
.certificate-topics h3 {
  color: #174e3a;
  font-size: 1.165cqw;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: .147cqw;
  text-transform: uppercase;
}
.certificate-topics ul {
  position: absolute;
  inset: 56% 0 12%;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 1.15cqw;
  font-weight: 600;
  line-height: 1.33;
}
.certificate-details {
  line-height: 1.2;
}
.certificate-details dt {
  font-weight: 600;
  text-transform: uppercase;
}
.certificate-details dd { margin-inline: 0; font-weight: 600; white-space: nowrap; }
.certificate-serial {
  top: 5.93%;
  right: 5.58%;
  text-align: right;
}
.certificate-serial dt {
  color: #425c50;
  font-size: .95cqw;
  letter-spacing: .11cqw;
}
.certificate-serial dd {
  margin-top: .82cqw;
  font-size: 1.25cqw;
  letter-spacing: .014cqw;
}
.certificate-footer {
  inset: 84.45% 7% auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.certificate-footer dt {
  color: #90632c;
  font-size: 1.06cqw;
  letter-spacing: .137cqw;
}
.certificate-footer dd {
  margin-top: .98cqw;
  font-size: 1.615cqw;
}

.certificate-issued { max-width: 990px; }
.certificate-issued .certificate-paper { box-shadow: 0 8px 22px #1b322221; }
.certificate-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 22px;
  margin-top: 20px;
}
.certificate-mobile-summary { display: none; }
.certificate-empty-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: #edf3e4;
  color: var(--green);
}
.certificate-empty-icon .icon { width: 34px; height: 34px; }
.certificate-empty > p { color: var(--muted); }
.certificate-form-error { color: #8f342d !important; }

@media screen and (max-width: 600px) {
  .certificate-mobile-summary {
    display: block;
    margin-top: 15px;
    padding: 15px 0 0;
    border-top: 1px solid var(--line);
  }
  .certificate-mobile-summary p { font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
  .certificate-mobile-summary dl { margin: 9px 0 0; }
  .certificate-mobile-summary dl div {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2px 12px;
    font-size: 13px;
  }
  .certificate-mobile-summary dt { color: var(--muted); }
  .certificate-mobile-summary dd { margin: 0; font-weight: 625; }
  .certificate-actions { margin-top: 16px; }
  .certificate-actions .button { min-height: 44px; }
}

@media print {
  @page exeluno-certificate { size: A4 landscape; margin: 0; }
  body.printing-certificate { page: exeluno-certificate; padding: 0; background: #fff; }
  .printing-certificate :is(.skip-link, .sidebar, .topbar, .app-footer, .mobile-bottom-nav, .page-intro, .certificate-actions, .certificate-mobile-summary, .toast) {
    display: none !important;
  }
  .printing-certificate :is(.app-shell, .main-content, .certificate-issued) {
    width: 100%;
    max-width: none;
    min-height: 0;
    height: auto;
    overflow: visible;
    margin: 0;
    padding: 0;
  }
  .printing-certificate .certificate-paper {
    /* Chromium rounds the A4 sheet down by a fraction of a millimetre. */
    height: 209.7mm;
    break-inside: avoid;
    box-shadow: none;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
