/* A certificate of completion on the site (courses/certificate.html, and the
   Check a certificate form, ADR 0114): the certificate as a centred, bordered
   sheet in the report PDFs' ink (#16233c) and grey (#5c6672, 5.8:1 on white),
   then its details; and the same sheet alone when printed. Component CSS, so
   `course-certificate__*`. Borders keep their colour in forced-colours mode. */
.course-certificate {
  position: relative;
  max-width: 54rem;
  margin: 1.5rem auto;
  padding: 2.5rem 1.5rem;
  border: 2px solid #16233c;
  background: #fff;
  color: #16233c;
  text-align: center;
}

/* A second, finer rule inside the first: decoration only. */
.course-certificate::before {
  content: "";
  position: absolute;
  inset: 0.5rem;
  border: 1px solid #adb5bd;
  pointer-events: none;
}

.course-certificate__issuer {
  margin: 0 0 1rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #5c6672;
}

.course-certificate__title {
  margin: 0 0 1.5rem;
  font-size: clamp(1.75rem, 1.3rem + 2vw, 2.5rem);
  font-weight: 700;
}

.course-certificate__lead {
  margin: 0 0 0.5rem;
  color: #5c6672;
}

.course-certificate__name {
  display: inline-block;
  max-width: 100%;
  margin: 0 0 1rem;
  padding: 0 1rem 0.25rem;
  border-bottom: 1px solid #adb5bd;
  font-size: clamp(1.75rem, 1.2rem + 3vw, 3rem);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.course-certificate__course {
  margin: 0 0 0.5rem;
  font-size: clamp(1.25rem, 1.1rem + 1vw, 1.75rem);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.course-certificate__meta {
  margin: 0 0 1rem;
  color: #5c6672;
}

.course-certificate__signature {
  display: inline-block;
  min-width: min(14rem, 100%);
  margin: 1.5rem 0 0;
  padding-top: 0.5rem;
  border-top: 1px solid #16233c;
}

.course-certificate__signer {
  margin: 0;
  font-weight: 600;
}

.course-certificate__role {
  margin: 0;
  color: #5c6672;
}

.course-certificate__details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 1rem;
  margin: 2rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid #dee2e6;
}

.course-certificate__details dt {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #5c6672;
}

.course-certificate__details dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.course-certificate--withdrawn {
  text-align: left;
}

.course-certificate--withdrawn::before {
  display: none;
}

.course-certificate__actions {
  margin: 1rem 0;
  text-align: center;
}

.course-certificate-lookup {
  max-width: 36rem;
  margin: 1.5rem auto;
}

@media print {
  @page {
    size: letter landscape;
    margin: 0.5in;
  }

  /* Only the sheet: the site's bars, the notice above it and the buttons below it stay off the paper. */
  #siteNavbar,
  .site-footer,
  #cookieConsentBanner,
  .back-to-top,
  .course-certificate__back,
  .course-certificate__status,
  .course-certificate__actions,
  .course-certificate__check {
    display: none;
  }

  .course-certificate {
    max-width: none;
    margin: 0;
    border-color: #000;
  }
}
