body.legal-body {
  --legal-orange: #ff5a3d;
  --legal-red: #ff1e56;
  --legal-dark: #0d1117;
  --legal-muted: #64748b;
  --legal-light: #f2f4f7;
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--legal-dark);
  background:
    radial-gradient(circle at 18% 4%, rgba(255, 90, 61, 0.12), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, #f6f8fb 42%, #eef2f7 100%);
  -webkit-font-smoothing: antialiased;
}

body.legal-body * {
  box-sizing: border-box;
}

.legal-page {
  min-height: 100vh;
  min-height: 100dvh;
}

.legal-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(13, 17, 23, 0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.legal-header-inner {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  border-radius: 10px;
}

.legal-brand img {
  display: block;
  width: 150px;
  height: auto;
}

.legal-back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 106, 0, 0.14);
  border-radius: 8px;
  color: #ff6a00;
  background: rgba(255, 106, 0, 0.08);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.legal-back-link:hover {
  background: rgba(255, 106, 0, 0.14);
}

.legal-back-link svg,
.legal-back-link i {
  width: 17px;
  height: 17px;
  color: var(--legal-dark);
}

.legal-main {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(28px, 5vw, 54px) 0 48px;
}

.legal-hero {
  margin-bottom: 18px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid rgba(13, 17, 23, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 20px 70px rgba(13, 17, 23, 0.08);
}

.legal-eyebrow {
  margin: 0 0 10px;
  color: #ff6a00;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-hero h1 {
  margin: 0;
  color: var(--legal-dark);
  font-size: clamp(2rem, 6vw, 3.5rem);
  line-height: 1.05;
  font-weight: 850;
}

.legal-meta {
  margin: 14px 0 0;
  color: var(--legal-muted);
  font-size: 0.96rem;
  line-height: 1.6;
}

.legal-card {
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid rgba(13, 17, 23, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 46px rgba(13, 17, 23, 0.06);
}

.legal-content {
  color: #1f2937;
  font-size: 1rem;
  line-height: 1.75;
}

.legal-content section,
.pedefi-terms-section {
  padding: 20px 0;
  border-top: 1px solid rgba(13, 17, 23, 0.08);
}

.legal-content section:first-child,
.pedefi-terms-section:first-child {
  border-top: 0;
  padding-top: 0;
}

.legal-content h2,
.pedefi-terms-section h3 {
  margin: 0 0 12px;
  color: var(--legal-dark);
  font-size: clamp(1.16rem, 3vw, 1.45rem);
  line-height: 1.25;
}

.legal-content p,
.pedefi-terms-section p,
.pedefi-terms-lead {
  margin: 0 0 12px;
}

.legal-content ul,
.pedefi-terms-list {
  margin: 10px 0 0;
  padding-left: 22px;
}

.legal-content li,
.pedefi-terms-list li {
  margin: 6px 0;
}

.legal-highlight,
.pedefi-terms-section--destaque {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(255, 90, 61, 0.2);
  border-radius: 8px;
  background: rgba(255, 106, 0, 0.06);
}

.legal-contact {
  margin-top: 20px;
}

.legal-footer {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 34px;
  color: rgba(13, 17, 23, 0.5);
  text-align: center;
  font-size: 0.86rem;
}

.legal-footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 18px;
  margin-bottom: 10px;
}

.legal-footer-nav a,
.legal-content a {
  color: #ff6a00;
  font-weight: 700;
  text-decoration: none;
}

.legal-footer-nav a:hover,
.legal-content a:hover {
  text-decoration: underline;
}

.legal-brand:focus-visible,
.legal-back-link:focus-visible,
.legal-footer-nav a:focus-visible,
.legal-content a:focus-visible {
  outline: 3px solid rgba(255, 30, 86, 0.35);
  outline-offset: 3px;
}

@media (max-width: 520px) {
  .legal-header-inner {
    width: min(100% - 24px, 1040px);
    min-height: 66px;
  }

  .legal-brand img {
    width: 126px;
  }

  .legal-back-link span {
    display: none;
  }

  .legal-main,
  .legal-footer {
    width: min(100% - 24px, 920px);
  }

  .legal-hero,
  .legal-card {
    padding: 20px 16px;
  }

  .legal-content {
    font-size: 0.95rem;
    line-height: 1.68;
  }
}
