/* Legal shell follows the consultation page's title and section rhythm. */
.legal-page {
  padding-block-start: clamp(var(--space-6), 3.6vw, var(--space-16));
}

.legal-page h1 {
  margin-block: 0 var(--space-6);
}

.legal-policy h1 {
  overflow-wrap: anywhere;
}

.contract-pages {
  display: grid;
  gap: var(--space-6);
}

.contract-page {
  display: block;
  min-inline-size: 0;
  cursor: zoom-in;
}

.contract-page img {
  inline-size: 100%;
  max-inline-size: 100%;
  block-size: auto;
}

/* Reuse the review dialog shell, palette, safe areas and circular controls.
   Only the document's fitted, movable canvas differs. */
.document-viewport {
  position: relative;
  min-block-size: 0;
  margin-inline: max(var(--space-3), env(safe-area-inset-left)) max(var(--space-3), env(safe-area-inset-right));
  overflow: hidden;
  overscroll-behavior: contain;
  touch-action: none;
}

.document-image {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  max-inline-size: none;
  max-width: none;
  transform-origin: center;
  user-select: none;
}

.document-viewport.is-zoomed {
  cursor: grab;
}

.document-viewport.is-dragging {
  cursor: grabbing;
}

.document-controls {
  gap: var(--space-2);
}

.document-viewer button {
  touch-action: manipulation;
}

.document-reset {
  inline-size: 3.75rem;
  border-radius: var(--radius-sm);
  font-size: var(--fs-small);
}

.document-controls [aria-disabled="true"] {
  opacity: 0.45;
  cursor: default;
}
