:root {
  --navy: #022449;
  --navy-hover: #0b3158;
  --orange: #ff6b00;
  --text: #0b1739;
  --body-text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --bg: #f8fafc;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg);
  color: var(--body-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Topbar */
.legal-topbar {
  background-color: var(--navy);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 50;
}

.legal-topbar-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.legal-logo {
  height: 38px;
  width: auto;
  display: block;
}

.legal-back-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.legal-back-button:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Main Container */
.legal-container {
  flex: 1;
  width: 100%;
  max-width: 880px;
  margin: 32px auto 48px;
  padding: 0 20px;
}

.legal-article {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 44px 48px;
  box-shadow: 0 4px 24px rgba(2, 36, 73, 0.05);
}

/* Header */
.legal-header {
  border-bottom: 1px solid var(--border);
  padding-bottom: 24px;
  margin-bottom: 32px;
}

.legal-badge {
  display: inline-block;
  background: rgba(2, 36, 73, 0.07);
  color: var(--navy);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.legal-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.28;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.legal-meta {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.legal-version {
  font-size: 13px;
  color: var(--muted);
}

/* Content Sections */
.legal-section {
  margin-bottom: 30px;
}

.legal-section h2 {
  font-size: 17px;
  font-weight: 600;
  color: var(--navy);
  margin-top: 24px;
  margin-bottom: 12px;
  line-height: 1.35;
}

.legal-section p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--body-text);
  margin-bottom: 14px;
  overflow-wrap: break-word;
}

.legal-list {
  margin: 12px 0 16px 24px;
  padding: 0;
  list-style-type: disc;
}

.legal-list li {
  font-size: 15px;
  line-height: 1.65;
  color: var(--body-text);
  margin-bottom: 8px;
  overflow-wrap: break-word;
}

.legal-section a,
.legal-article a {
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s;
}

.legal-section a:hover,
.legal-article a:hover {
  color: var(--orange);
}

/* Footer */
.legal-footer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.legal-footer-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.legal-footer-nav a {
  color: var(--navy);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

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

.legal-sep {
  color: var(--muted);
}

.legal-footer-copy {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

/* Responsive Media Queries */
@media (max-width: 768px) {
  .legal-container {
    margin: 16px auto 32px;
    padding: 0 12px;
  }

  .legal-article {
    padding: 28px 20px;
    border-radius: 10px;
  }

  .legal-title {
    font-size: 22px;
  }

  .legal-section h2 {
    font-size: 16px;
  }

  .legal-section p,
  .legal-list li {
    font-size: 14.5px;
  }

  .legal-logo {
    height: 32px;
  }

  .legal-back-button span {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .legal-topbar-inner {
    padding: 10px 14px;
  }

  .legal-container {
    margin: 8px auto 24px;
    padding: 0 8px;
  }

  .legal-article {
    padding: 22px 14px;
    border-radius: 8px;
  }

  .legal-title {
    font-size: 20px;
  }

  .legal-section h2 {
    font-size: 15px;
  }

  .legal-section p,
  .legal-list li {
    font-size: 14px;
    line-height: 1.6;
  }

  .legal-list {
    margin-left: 18px;
  }

  .legal-back-button {
    padding: 6px 10px;
  }

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

  .legal-back-button::after {
    content: "Voltar";
    font-size: 12px;
  }
}
