:root {
  --bg: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --accent: #243568;
  --primary: #2B3981;
  --secondary: #3A509E;
  --footer: #2B3981;
}

* { box-sizing: border-box; }

body {
  font-family: 'Open Sans', sans-serif;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

.menu-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1001;
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 12px;
}
.menu-toggle:active { transform: scale(0.95); }

.hamburger {
  width: 20px; height: 2px; background: white; position: relative; transition: all 0.3s;
}
.hamburger::before, .hamburger::after {
  content: ''; position: absolute; width: 20px; height: 2px; background: white; transition: all 0.3s;
}
.hamburger::before { top: -6px; }
.hamburger::after { top: 6px; }

.menu-toggle.active .hamburger { background: transparent; }
.menu-toggle.active .hamburger::before { transform: rotate(45deg); top: 0; }
.menu-toggle.active .hamburger::after { transform: rotate(-45deg); top: 0; }

/* Navegação lateral */
nav {
  position: fixed;
  top: 0;
  left: -100%;
  width: 85%;
  max-width: 320px;
  height: 100vh;
  background: #f5f7fa;
  border-right: 3px solid var(--secondary);
  padding: 80px 20px 20px;
  overflow-y: auto;
  z-index: 1000;
  transition: left 0.3s ease;
  box-shadow: 4px 0 12px rgba(0,0,0,0.1);
}
nav.active { left: 0; }

.overlay {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}
.overlay.active { opacity: 1; visibility: visible; }

nav h3 {
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: var(--primary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
nav ul { list-style: none; padding-left: 0; margin: 0; }
nav a {
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
  display: block;
  padding: 10px 12px;
  transition: all 0.2s;
  font-weight: 500;
  border-radius: 6px;
}
nav a:hover { background: rgba(43,57,129,0.1); color: var(--primary); }

/* Conteúdo */
.container { padding: 20px 16px; max-width: 100%; }
header { margin-bottom: 24px; padding-bottom: 16px; border-bottom: 3px solid var(--primary); }
.logo { max-width: 90px; height: auto; margin-bottom: 12px; }
.meta { color: var(--muted); font-size: 12px; margin-top: 8px; }

h1 {
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 18px;
  margin: 16px 0 8px;
  color: var(--primary);
  line-height: 1.4;
}
p.lead { color: var(--muted); margin: 0 0 16px; font-size: 13px; line-height: 1.5; }
section { margin: 24px 0; padding-bottom: 16px; border-bottom: 1px solid #e5e7eb; }
h2 {
  font-family: 'Quicksand', sans-serif;
  font-weight: 700;
  font-size: 16px;
  margin: 0 0 12px;
  color: var(--accent);
  line-height: 1.3;
}
.clause {
  margin: 12px 0;
  padding: 14px;
  border-left: 4px solid var(--secondary);
  background: #f9fafb;
  border-radius: 6px;
}
.clause p, .clause li { margin: 12px 0; font-size: 14px; text-align: justify; line-height: 1.7; }

strong { font-weight: 600; color: var(--text); }
sup { font-weight: bold; color: var(--primary); }

.footnotes {
  background: #f0f4ff;
  border-top: 2px solid var(--secondary);
  padding: 16px;
  margin-top: 32px;
  font-size: 12px;
  color: #374151;
}

footer {
  background: var(--footer);
  color: #fff;
  text-align: center;
  padding: 24px 16px;
  margin-top: 40px;
}
footer p { margin: 6px 0; font-size: 12px; line-height: 1.6; }

#downloadPDF {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--primary);
  color: white;
  border: none;
  padding: 14px 20px;
  border-radius: 10px;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  cursor: pointer;
  z-index: 9999;
  transition: all 0.3s ease;
}
#downloadPDF:hover { background: var(--secondary); transform: scale(1.05); }

@media(min-width: 768px) {
  .menu-toggle { display: none; }
  nav { position: sticky; top: 0; left: 0; width: 280px; height: 100vh; padding: 30px; float: left; }
  .overlay { display: none; }
  .container { margin-left: 280px; padding: 40px; max-width: 1000px; }
  header { display: flex; justify-content: space-between; align-items: flex-start; }
  h1 { font-size: 22px; }
  p.lead, .clause p, .clause li, ol, ul { font-size: 15px; }
}

@media print {
  nav, .menu-toggle, #downloadPDF { display: none !important; }
  body { background: #fff; color: #000; }
}
