:root {
  color-scheme: dark;
  --navy-950: #06102f;
  --navy-900: #091743;
  --navy-800: #102765;
  --blue-500: #4e83f1;
  --blue-300: #8fb4ff;
  --mint-300: #80efc2;
  --text-primary: #f7f9ff;
  --text-secondary: #c7d1e3;
  --text-muted: #91a1bc;
  --border: rgba(163, 188, 239, .15);
  --scrollbar-track: var(--navy-950);
  --scrollbar-thumb: #1e4199;
  --scrollbar-thumb-hover: #1d356d;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  scroll-behavior: smooth;
  background: var(--navy-950);
  font-synthesis: none;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

html::-webkit-scrollbar {
  width: 10px;
}

html::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

html::-webkit-scrollbar-thumb {
  min-height: 44px;
  border: 2px solid var(--scrollbar-track);
  border-radius: 999px;
  background: var(--scrollbar-thumb);
}

html::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text-secondary);
  background:
    radial-gradient(circle at 8% 2%, rgba(68, 119, 229, .20), transparent 30%),
    radial-gradient(circle at 92% 90%, rgba(67, 123, 234, .13), transparent 30%),
    linear-gradient(145deg, #071333 0%, #091943 48%, #06102f 100%);
  font-family: "Century Gothic", "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

.legal-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(6, 16, 47, .78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.legal-header-inner {
  position: relative;
  width: min(800px, calc(100% - 48px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.legal-back {
  position: absolute;
  left: 0;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 999px;
  color: #b9c7dd;
  background: rgba(255,255,255,.045);
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
  text-decoration: none;
  transition: color .25s ease, border-color .25s ease, background .25s ease, transform .25s ease;
}

.legal-back:hover {
  color: #fff;
  border-color: rgba(143,180,255,.28);
  background: rgba(78,131,241,.12);
  transform: translateX(-2px);
}

.legal-back-arrow { font-size: 16px; }
.legal-back-short { display: none; }

.legal-logo {
  display: inline-flex;
  align-items: center;
  color: #fff;
  font-size: 27px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -.8px;
  text-decoration: none;
}

.legal-logo-accent {
  background: linear-gradient(105deg, #8fb4ff, #4e83f1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.legal-logo-dot {
  width: 6px;
  height: 6px;
  margin-left: 5px;
  border-radius: 50%;
  background: var(--blue-500);
  box-shadow: 0 0 12px rgba(78,131,241,.78);
}

.legal-main {
  width: 100%;
  padding: 32px 24px 104px;
}

.legal-document {
  position: relative;
  width: min(800px, 100%);
  margin: 0 auto;
  padding: 58px 60px 62px;
  text-align: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.065), rgba(255,255,255,.028)),
    rgba(8, 21, 57, .72);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.09),
    0 38px 100px rgba(0, 6, 28, .34),
    0 12px 32px rgba(0, 8, 32, .22);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.legal-document::before {
  content: "";
  position: absolute;
  top: 0;
  left: 9%;
  right: 9%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(143,180,255,.78), transparent);
}

.legal-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  color: #a7c1f5;
  font-size: 10.5px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

.legal-kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint-300);
  box-shadow: 0 0 12px rgba(128,239,194,.66);
}

.legal-title {
  max-width: 680px;
  margin: 0;
  color: var(--text-primary);
  font-size: clamp(36px, 6vw, 58px);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -2.2px;
}

.legal-updated {
  margin: 16px 0 0;
  color: var(--text-muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.legal-lead {
  margin: 34px 0 0;
  padding-bottom: 34px;
  border-bottom: 1px solid rgba(255,255,255,.09);
  color: #d9e1ee;
  font-size: 17px;
  line-height: 1.75;
}

.legal-content {
  padding-top: 6px;
  text-align: left;
}

.legal-section {
  padding-top: 34px;
}

.legal-section h2 {
  margin: 0 0 13px;
  color: #f4f7fd;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 750;
  letter-spacing: -.35px;
}

.legal-section p,
.legal-section li {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.72;
}

.legal-section p { margin: 0; }
.legal-section p + p { margin-top: 14px; }

.legal-section ul {
  margin: 13px 0 0;
  padding: 0 0 0 21px;
}

.legal-section li + li { margin-top: 8px; }

.legal-callout {
  margin-top: 22px;
  margin-bottom: 28px;
  padding: 18px 20px;
  border: 1px solid rgba(128,239,194,.17);
  border-radius: 16px;
  color: #d8e7e1;
  background: linear-gradient(135deg, rgba(128,239,194,.085), rgba(78,131,241,.055));
  font-size: 14px;
  line-height: 1.65;
}

.legal-content a {
  color: #a9c7ff;
  text-decoration-color: rgba(169,199,255,.42);
  text-underline-offset: 3px;
}

.legal-content a:hover { color: #fff; }

.legal-document-footer {
  margin-top: 46px;
  padding-top: 26px;
  border-top: 1px solid rgba(255,255,255,.09);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  text-align: left;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}

.legal-document-footer a {
  color: #c1d4f8;
  font-weight: 700;
  text-decoration: none;
}

.legal-document-footer a:hover { color: #fff; }

/* No fluxo de cadastro, a nova aba exibe somente o documento legal. */
html.legal-modo-cadastro .legal-header,
html.legal-modo-cadastro .legal-document-footer {
  display: none;
}

html.legal-modo-cadastro .legal-main {
  padding-top: 32px;
}

a:focus-visible {
  outline: 3px solid rgba(143,180,255,.55);
  outline-offset: 4px;
}

@media (max-width: 640px) {
  .legal-header-inner { width: min(800px, calc(100% - 28px)); min-height: 66px; }
  .legal-back { padding: 9px 11px; }
  .legal-back-long { display: none; }
  .legal-back-short { display: inline; }
  .legal-logo { font-size: 23px; }
  .legal-main { padding: 32px 14px 64px; }
  .legal-document { padding: 36px 24px 40px; border-radius: 22px; }
  .legal-title { font-size: clamp(34px, 11vw, 46px); letter-spacing: -1.5px; }
  .legal-lead { margin-top: 26px; padding-bottom: 28px; font-size: 15.5px; }
  .legal-section { padding-top: 28px; }
  .legal-section h2 { font-size: 18px; }
  .legal-section p,
  .legal-section li { font-size: 14px; line-height: 1.68; }
  .legal-document-footer { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .legal-back { transition: none; }
}
