/* Certificate print document */
.cert-page {
  display: grid;
  place-items: center;
  padding: 1.5rem 0 3rem;
}

.cert-document {
  width: min(720px, 100%);
  background: #ffffff;
  color: #1a1a1a;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(205, 205, 205, 0.2);
}

.cert-document__head {
  padding: 2rem 2.25rem 1.5rem;
  background: linear-gradient(180deg, #f5f5f5 0%, #ffffff 100%);
  border-bottom: 1px solid #e8e8e8;
  text-align: center;
}

.cert-document__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
  text-align: left;
}

.cert-document__logo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
}

.cert-document__brand strong {
  display: block;
  font-size: 0.88rem;
  letter-spacing: 0.18em;
  color: #111;
}

.cert-document__brand span {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #666;
  margin-top: 0.15rem;
}

.cert-document__badge {
  margin: 0 0 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #888;
}

.cert-document__head h1 {
  color: #111;
  font-size: 1.65rem;
  margin-bottom: 0.35rem;
}

.cert-document__lede {
  margin: 0;
  color: #555;
  font-size: 0.92rem;
}

.cert-document__preview {
  padding: 1.75rem 2.25rem;
  background: #fafafa;
  text-align: center;
}

.cert-document__frame {
  position: relative;
  display: inline-block;
  max-width: 100%;
  border: 2px solid #cdcdcd;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
  background: #fff;
}

.cert-document__verified {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 0.45rem 0.75rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: center;
  color: #fff;
  background: linear-gradient(180deg, rgba(44, 44, 44, 0.92), rgba(44, 44, 44, 0.78));
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.cert-document__frame img {
  display: block;
  max-width: min(100%, 520px);
  max-height: 340px;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
  padding-top: 1.75rem;
}

.cert-document__video-tag {
  display: block;
  padding: 0.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #666;
  background: #f0f0f0;
}

.cert-document__work-title {
  margin: 1rem 0 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #111;
}

.cert-document__meta {
  padding: 0 2.25rem;
  margin: 0;
}

.cert-document__meta div {
  border-bottom-color: #e5e5e5;
}

.cert-document__meta dt {
  color: #777;
}

.cert-document__meta dd {
  color: #111;
}

.cert-document__foot {
  padding: 1.5rem 2.25rem 2rem;
  border-top: 1px solid #e8e8e8;
}

.cert-document__seal {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #444;
  margin-bottom: 0.75rem;
}

.cert-document__legal {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.6;
  color: #666;
}

.cert-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 12mm;
  }

  body {
    background: #fff !important;
    color: #111 !important;
  }

  .ambient,
  .texture,
  .nav-shell,
  .foot,
  .toasts,
  .cert-actions,
  .no-print {
    display: none !important;
  }

  .shell {
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  main {
    padding: 0 !important;
  }

  .cert-page {
    padding: 0 !important;
  }

  .cert-document {
    width: 100% !important;
    max-width: none !important;
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    border-radius: 8px !important;
    break-inside: avoid;
  }

  .cert-document__frame img {
    max-height: 280px !important;
  }
}
