html[data-document-format="pdf"] [data-document-html] {
  display: none;
}

.document-pdf-shell {
  width: min(100% - 2rem, 1180px);
  margin: 0 auto clamp(4rem, 8vw, 8rem);
}

.document-pdf-card {
  overflow: hidden;
  border: 1px solid rgba(49, 95, 125, 0.18);
  border-radius: 1rem;
  background: var(--paper, #fffdf8);
  box-shadow: var(--shadow, 0 18px 55px rgba(27, 42, 53, 0.11));
}

.document-pdf-card__toolbar {
  display: flex;
  min-height: 4.25rem;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 0.72rem 0.85rem;
  border-bottom: 1px solid var(--line, #d9e0e3);
  background:
    linear-gradient(135deg, rgba(234, 241, 245, 0.82), rgba(255, 255, 255, 0.96) 58%),
    #fff;
}

.document-pdf-card__identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.7rem;
}

.document-pdf-card__badge {
  display: grid;
  min-width: 2.8rem;
  min-height: 2.2rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(121, 83, 69, 0.2);
  border-radius: 0.55rem;
  background: #f5eae4;
  color: #795345;
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.document-pdf-card__copy {
  min-width: 0;
}

.document-pdf-card__copy h2,
.document-pdf-card__copy p {
  margin: 0;
}

.document-pdf-card__copy h2 {
  color: var(--brand-dark, #244a63);
  font-family: inherit;
  font-size: 0.96rem;
  font-weight: 780;
  line-height: 1.3;
}

.document-pdf-card__copy p {
  margin-top: 0.12rem;
  color: var(--muted, #60717e);
  font-size: 0.72rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.document-pdf-card__action {
  display: inline-flex;
  min-height: 2.5rem;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.48rem 0.78rem;
  border: 1px solid #b8c5cb;
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.88);
  color: var(--brand-dark, #244a63);
  font-size: 0.78rem;
  font-weight: 780;
  line-height: 1.2;
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.document-pdf-card__action:hover {
  border-color: #8ea4af;
  background: #eef4f7;
  box-shadow: 0 5px 16px rgba(27, 42, 53, 0.1);
  color: var(--brand-dark, #244a63);
}

.document-pdf-card__action:focus-visible {
  outline: 3px solid rgba(49, 95, 125, 0.28);
  outline-offset: 2px;
}

.document-pdf-card__action svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.document-pdf-viewer {
  position: relative;
  height: min(80vh, 64rem);
  height: clamp(30rem, 80dvh, 64rem);
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 38%, rgba(181, 139, 58, 0.08), transparent 18rem),
    #e9edef;
}

.document-pdf-viewer__status {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 1rem;
  color: var(--muted, #60717e);
  font-size: 0.86rem;
  font-weight: 700;
  pointer-events: none;
  text-align: center;
}

.document-pdf-viewer__status[hidden] {
  display: none;
}

.document-pdf-viewer__status::before {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  border: 2px solid #cad6dc;
  border-top-color: var(--brand, #315f7d);
  border-radius: 50%;
  animation: document-pdf-spin 0.8s linear infinite;
  content: "";
}

.document-pdf-viewer.has-error .document-pdf-viewer__status::before {
  display: none;
}

.document-pdf-frame {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
  opacity: 0;
  transition: opacity 160ms ease;
}

.document-pdf-viewer.is-loaded .document-pdf-frame {
  opacity: 1;
}

@keyframes document-pdf-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 700px) {
  .document-pdf-shell {
    width: min(100% - 1rem, 1180px);
  }

  .document-pdf-card__toolbar {
    align-items: stretch;
    flex-direction: column;
    padding: 0.65rem;
  }

  .document-pdf-card__action {
    width: 100%;
    min-height: 2.75rem;
  }

  .document-pdf-viewer {
    height: min(72vh, 44rem);
    height: clamp(20rem, 72dvh, 44rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .document-pdf-card__action,
  .document-pdf-frame {
    transition: none;
  }

  .document-pdf-viewer__status::before {
    animation-duration: 1.5s;
  }
}
