.legal-page {
  min-height: 100vh;
  background: var(--brand-50);
  color: var(--ink);
}

.legal-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(12px);
}

.legal-header__shell {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.legal-brand img {
  width: 168px;
  height: auto;
  max-height: none;
  object-fit: contain;
}

.legal-back { white-space: nowrap; }

.legal-main { min-height: calc(100vh - 82px); }

.legal-intro {
  padding: 58px 0 42px;
  background:
    radial-gradient(circle at 82% 8%, rgba(23,107,77,.08), transparent 28%),
    linear-gradient(180deg, #fbfcfb 0%, var(--brand-50) 100%);
}

.legal-intro__inner { max-width: 980px; }
.legal-intro .eyebrow { margin-bottom: 9px; }

.legal-intro h1 {
  margin: 0 0 15px;
  font-size: clamp(40px, 5vw, 58px);
  line-height: 1.03;
}

.legal-intro__lead {
  max-width: 680px;
  margin: 0;
  color: var(--body);
  font-size: 16px;
  line-height: 1.65;
}

.legal-document-section { padding: 34px 0 76px; }
.legal-document-shell { max-width: 1000px; }

.legal-pdf-viewer {
  display: grid;
  gap: 26px;
}

.legal-loading,
.legal-error {
  min-height: 220px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  text-align: center;
  box-shadow: 0 10px 26px rgba(30,41,37,.06);
}

.legal-loading {
  color: var(--body);
  font-size: 14px;
  font-weight: 800;
}

.legal-loading__spinner {
  width: 34px;
  height: 34px;
  margin-bottom: 4px;
  border: 3px solid var(--brand-100);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: legal-spin .8s linear infinite;
}

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

.legal-pdf-viewer.is-ready .legal-loading { display: none; }

.legal-pdf-page {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(30,41,37,.09);
}

.legal-pdf-page canvas {
  width: 100%;
  height: auto;
  display: block;
  background: #fff;
}

.legal-error {
  color: #7c2530;
  border-color: #ffd7dc;
  background: #fffafb;
}

.legal-error p {
  margin: 0;
  color: var(--muted);
}

.legal-error__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin-top: 6px;
  padding: 0 17px;
  border: 1px solid var(--brand-border);
  border-radius: 999px;
  color: var(--brand);
  background: #fff;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.legal-footer {
  padding: 22px 0;
  background: var(--deep-900);
}

.legal-footer__shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: #c8d7d0;
  font-size: 12px;
}

.legal-footer a {
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 760px) {
  .legal-header__shell { min-height: 68px; }
  .legal-brand img { width: 128px; }

  .legal-back {
    min-height: 38px;
    padding-inline: 13px;
    font-size: 12px;
  }

  .legal-intro { padding: 38px 0 30px; }
  .legal-intro h1 { font-size: 39px; }
  .legal-intro__lead { font-size: 14px; }
  .legal-document-section { padding: 24px 0 54px; }
  .legal-pdf-viewer { gap: 18px; }
  .legal-pdf-page { border-radius: 10px; }

  .legal-footer__shell {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .legal-brand img { width: 116px; }
  .legal-intro h1 { font-size: 35px; }
}
