/* ==========================================================================
   Quebrada Network · Documentos legais
   Design language: qprp-ui / tokens --qp-*
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500&display=swap');

:root {
  /* superfícies */
  --qp-bg: #0a0b10;
  --qp-bg-grad: radial-gradient(1200px 620px at 50% -180px, rgba(117, 137, 213, .13), transparent 70%);
  --qp-surface: #101219;
  --qp-surface-2: #161923;
  --qp-border: #1f2230;
  --qp-border-strong: #2b3040;

  /* texto */
  --qp-text: #e9ebf2;
  --qp-text-2: #b4b9c8;
  --qp-muted: #767c8f;

  /* marca */
  --qp-brand: #7589d5;
  --qp-brand-2: #93a3e6;
  --qp-brand-soft: rgba(117, 137, 213, .10);
  --qp-brand-line: rgba(117, 137, 213, .30);

  /* apoio */
  --qp-warn: #d5b475;
  --qp-warn-soft: rgba(213, 180, 117, .10);

  /* forma */
  --qp-r: 14px;
  --qp-r-sm: 8px;
  --qp-maxw: 1200px;

  /* tipografia */
  --qp-font: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, sans-serif;
  --qp-mono: 'Geist Mono', ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, monospace;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 108px; }

body {
  margin: 0;
  background: var(--qp-bg-grad), var(--qp-bg);
  background-repeat: no-repeat;
  color: var(--qp-text);
  font-family: var(--qp-font);
  font-size: 15.5px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--qp-brand-2); text-decoration: none; }
a:hover { color: #b3bff0; text-decoration: underline; text-underline-offset: 3px; }

:focus-visible {
  outline: 2px solid var(--qp-brand);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- barra de progresso de leitura ---------- */
.qp-progress {
  position: fixed;
  inset: 0 auto auto 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--qp-brand), var(--qp-brand-2));
  z-index: 60;
  transition: width .12s linear;
}

/* ---------- topo ---------- */
.qp-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 11, 16, .82);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--qp-border);
}

.qp-header__inner {
  max-width: var(--qp-maxw);
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.qp-brand { display: flex; align-items: center; gap: 11px; color: var(--qp-text); }
.qp-brand:hover { text-decoration: none; }

.qp-brand__mark {
  width: 30px; height: 30px;
  border-radius: 9px;
  display: grid; place-items: center;
  background: linear-gradient(150deg, rgba(117, 137, 213, .30), rgba(117, 137, 213, .08));
  border: 1px solid var(--qp-brand-line);
  font-family: var(--qp-mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--qp-brand-2);
}

.qp-brand__name { font-size: 14px; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; }
.qp-brand__sub {
  display: block;
  font-family: var(--qp-mono);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--qp-muted);
}

.qp-switch { margin-left: auto; display: flex; gap: 6px; padding: 4px; background: var(--qp-surface); border: 1px solid var(--qp-border); border-radius: 11px; }

.qp-switch a {
  padding: 6px 13px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--qp-text-2);
  white-space: nowrap;
  transition: background .15s ease, color .15s ease;
}
.qp-switch a:hover { background: var(--qp-surface-2); color: var(--qp-text); text-decoration: none; }
.qp-switch a[aria-current="page"] { background: var(--qp-brand-soft); color: var(--qp-brand-2); box-shadow: inset 0 0 0 1px var(--qp-brand-line); }

/* ---------- hero ---------- */
.qp-hero {
  max-width: var(--qp-maxw);
  margin: 0 auto;
  padding: 76px 28px 44px;
  border-bottom: 1px solid var(--qp-border);
}

.qp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--qp-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--qp-brand-2);
  padding: 5px 11px;
  border: 1px solid var(--qp-brand-line);
  background: var(--qp-brand-soft);
  border-radius: 999px;
}

.qp-hero h1 {
  margin: 22px 0 0;
  font-size: clamp(2.1rem, 5.4vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -.038em;
  line-height: 1.04;
}

.qp-hero__lead {
  margin: 18px 0 0;
  max-width: 64ch;
  font-size: 16.5px;
  color: var(--qp-text-2);
}

.qp-meta {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.qp-meta span {
  font-family: var(--qp-mono);
  font-size: 11.5px;
  color: var(--qp-muted);
  padding: 6px 12px;
  border: 1px solid var(--qp-border);
  border-radius: 8px;
  background: var(--qp-surface);
}
.qp-meta span b { color: var(--qp-text-2); font-weight: 500; }

/* ---------- layout ---------- */
.qp-layout {
  max-width: var(--qp-maxw);
  margin: 0 auto;
  padding: 44px 28px 96px;
  display: grid;
  grid-template-columns: 258px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

/* ---------- índice ---------- */
.qp-toc { position: sticky; top: 92px; }
.qp-toc > summary { display: none; }

.qp-toc__title {
  font-family: var(--qp-mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--qp-muted);
  padding-bottom: 12px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--qp-border);
}

.qp-toc nav { max-height: calc(100vh - 190px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--qp-border-strong) transparent; }
.qp-toc nav::-webkit-scrollbar { width: 4px; }
.qp-toc nav::-webkit-scrollbar-thumb { background: var(--qp-border-strong); border-radius: 4px; }

.qp-toc a {
  display: flex;
  gap: 10px;
  padding: 7px 12px 7px 11px;
  border-left: 2px solid transparent;
  font-size: 13.2px;
  line-height: 1.45;
  color: var(--qp-muted);
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.qp-toc a:hover { color: var(--qp-text); text-decoration: none; background: var(--qp-surface); }
.qp-toc a::before {
  content: attr(data-n);
  font-family: var(--qp-mono);
  font-size: 11px;
  color: var(--qp-border-strong);
  flex: 0 0 18px;
}
.qp-toc a.is-active { color: var(--qp-brand-2); border-left-color: var(--qp-brand); background: var(--qp-brand-soft); }
.qp-toc a.is-active::before { color: var(--qp-brand); }

/* ---------- conteúdo ---------- */
.qp-doc { max-width: 74ch; }

.qp-doc section { padding-top: 8px; margin-bottom: 52px; scroll-margin-top: 104px; }

.qp-doc h2 {
  position: relative;
  margin: 0 0 16px;
  padding-top: 26px;
  border-top: 1px solid var(--qp-border);
  font-size: 1.32rem;
  font-weight: 600;
  letter-spacing: -.022em;
  line-height: 1.3;
}

.qp-doc h2 .qp-num {
  display: block;
  font-family: var(--qp-mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .1em;
  color: var(--qp-brand);
  margin-bottom: 9px;
}

.qp-doc h2 .qp-anchor {
  margin-left: 8px;
  font-family: var(--qp-mono);
  font-size: 14px;
  color: var(--qp-border-strong);
  opacity: 0;
  transition: opacity .15s ease;
}
.qp-doc h2:hover .qp-anchor { opacity: 1; }
.qp-doc h2 .qp-anchor:hover { color: var(--qp-brand); text-decoration: none; }

.qp-doc h3 {
  margin: 30px 0 10px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--qp-text);
}

.qp-doc p { margin: 0 0 14px; color: var(--qp-text-2); }
.qp-doc strong { color: var(--qp-text); font-weight: 600; }

.qp-doc ul, .qp-doc ol { margin: 0 0 16px; padding-left: 20px; color: var(--qp-text-2); }
.qp-doc li { margin-bottom: 9px; }
.qp-doc li::marker { color: var(--qp-brand); }

.qp-doc code {
  font-family: var(--qp-mono);
  font-size: .86em;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--qp-surface-2);
  border: 1px solid var(--qp-border);
  color: var(--qp-brand-2);
}

/* referência legal — elemento de assinatura */
.qp-ref {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 2px 6px 2px 0;
  font-family: var(--qp-mono);
  font-size: 10.5px;
  letter-spacing: .04em;
  color: var(--qp-muted);
  padding: 3px 9px;
  border: 1px dashed var(--qp-border-strong);
  border-radius: 999px;
  white-space: nowrap;
}
.qp-ref::before { content: '§'; color: var(--qp-brand); }
.qp-refs { margin: -4px 0 18px; display: flex; flex-wrap: wrap; }

/* destaque */
.qp-note {
  margin: 20px 0;
  padding: 18px 20px;
  border: 1px solid var(--qp-border);
  border-left: 2px solid var(--qp-brand);
  border-radius: var(--qp-r-sm);
  background: var(--qp-surface);
}
.qp-note p:last-child { margin-bottom: 0; }
.qp-note__title {
  font-family: var(--qp-mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--qp-brand-2);
  margin-bottom: 9px;
}
.qp-note--warn { border-left-color: var(--qp-warn); }
.qp-note--warn .qp-note__title { color: var(--qp-warn); }

/* resumo em cartões */
.qp-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 22px 0 26px; }
.qp-card { padding: 16px 17px; border: 1px solid var(--qp-border); border-radius: var(--qp-r-sm); background: var(--qp-surface); }
.qp-card h4 { margin: 0 0 6px; font-size: 13.5px; font-weight: 600; letter-spacing: -.01em; }
.qp-card p { margin: 0; font-size: 13px; line-height: 1.6; color: var(--qp-muted); }

/* tabela */
.qp-table-wrap { margin: 20px 0 26px; border: 1px solid var(--qp-border); border-radius: var(--qp-r-sm); overflow: hidden; }
.qp-table { width: 100%; border-collapse: collapse; font-size: 13.2px; }
.qp-table th {
  text-align: left;
  padding: 12px 15px;
  background: var(--qp-surface-2);
  border-bottom: 1px solid var(--qp-border);
  font-family: var(--qp-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--qp-muted);
}
.qp-table td { padding: 13px 15px; border-bottom: 1px solid var(--qp-border); color: var(--qp-text-2); vertical-align: top; line-height: 1.6; }
.qp-table tr:last-child td { border-bottom: 0; }
.qp-table td:first-child { color: var(--qp-text); font-weight: 500; }

/* passos */
.qp-steps { counter-reset: step; list-style: none; padding: 0; margin: 20px 0 26px; }
.qp-steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 0 40px;
  margin-bottom: 16px;
}
.qp-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 1px;
  width: 25px; height: 25px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: var(--qp-brand-soft);
  border: 1px solid var(--qp-brand-line);
  font-family: var(--qp-mono);
  font-size: 11.5px;
  color: var(--qp-brand-2);
}

/* contato */
.qp-contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 20px 0; }
.qp-contact div { padding: 16px 17px; border: 1px solid var(--qp-border); border-radius: var(--qp-r-sm); background: var(--qp-surface); }
.qp-contact dt { font-family: var(--qp-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--qp-muted); margin-bottom: 6px; }
.qp-contact dd { margin: 0; font-size: 14px; color: var(--qp-text); }

/* ---------- rodapé ---------- */
.qp-footer { border-top: 1px solid var(--qp-border); background: rgba(16, 18, 25, .5); }
.qp-footer__inner {
  max-width: var(--qp-maxw);
  margin: 0 auto;
  padding: 34px 28px 46px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px 34px;
  align-items: center;
  font-size: 12.8px;
  color: var(--qp-muted);
}
.qp-footer__inner nav { display: flex; flex-wrap: wrap; gap: 20px; margin-left: auto; }
.qp-footer__inner a { color: var(--qp-text-2); }
.qp-footer__legal { font-family: var(--qp-mono); font-size: 11px; letter-spacing: .03em; }

/* ---------- responsivo ---------- */
@media (max-width: 940px) {
  .qp-layout { grid-template-columns: 1fr; gap: 26px; padding-top: 30px; }
  .qp-hero { padding-top: 52px; }

  .qp-toc {
    position: static;
    border: 1px solid var(--qp-border);
    border-radius: var(--qp-r-sm);
    background: var(--qp-surface);
    padding: 4px 6px;
  }
  .qp-toc > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    list-style: none;
    cursor: pointer;
    padding: 11px 12px;
    font-family: var(--qp-mono);
    font-size: 11px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--qp-text-2);
  }
  .qp-toc > summary::-webkit-details-marker { display: none; }
  .qp-toc > summary::after { content: '+'; color: var(--qp-brand); font-size: 15px; }
  .qp-toc[open] > summary::after { content: '−'; }
  .qp-toc__title { display: none; }
  .qp-toc nav { max-height: 46vh; padding-bottom: 8px; }
  .qp-doc { max-width: none; }
}

@media (max-width: 620px) {
  body { font-size: 15px; }
  .qp-header__inner, .qp-hero, .qp-layout, .qp-footer__inner { padding-left: 18px; padding-right: 18px; }
  .qp-brand__sub { display: none; }
  .qp-switch { width: 100%; margin-left: 0; }
  .qp-switch a { flex: 1; text-align: center; }
  .qp-header__inner { flex-wrap: wrap; gap: 12px; }
  .qp-footer__inner nav { margin-left: 0; }

  .qp-table thead { display: none; }
  .qp-table, .qp-table tbody, .qp-table tr, .qp-table td { display: block; width: 100%; }
  .qp-table tr { border-bottom: 1px solid var(--qp-border); padding: 6px 0; }
  .qp-table tr:last-child { border-bottom: 0; }
  .qp-table td { border: 0; padding: 6px 15px; }
  .qp-cards { grid-template-columns: 1fr; }
  .qp-table td::before {
    content: attr(data-label);
    display: block;
    font-family: var(--qp-mono);
    font-size: 10px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--qp-muted);
    margin-bottom: 3px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* ---------- impressão ---------- */
@media print {
  :root { --qp-text: #000; --qp-text-2: #1a1a1a; --qp-muted: #555; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .qp-progress, .qp-header, .qp-toc, .qp-switch { display: none !important; }
  .qp-layout { display: block; padding: 0; }
  .qp-hero { padding: 0 0 20px; border-color: #ccc; }
  .qp-doc { max-width: none; }
  .qp-doc section { page-break-inside: avoid; margin-bottom: 24px; }
  .qp-doc h2 { border-color: #ccc; }
  .qp-note, .qp-card, .qp-table-wrap, .qp-contact div { border-color: #ccc; background: #fff; }
  a { color: #000; text-decoration: underline; }
}
