/* Vértice — documentação e páginas legais */

.doc {
  background: var(--bg);
  color: var(--text);
}

.doc-container {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

.doc-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--border);
  background: var(--glass);
  backdrop-filter: blur(14px);
}

.doc-nav-inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.doc-nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 13px;
  color: var(--muted);
}

.doc-nav-links a:hover {
  color: var(--text);
}

.doc-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 56px;
  padding: 56px 0 80px;
}

.doc-toc {
  position: sticky;
  top: 100px;
  align-self: start;
  display: grid;
  gap: 7px;
  font-size: 12.5px;
}

.doc-toc-label {
  margin-bottom: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

.doc-toc a {
  color: var(--muted);
  padding: 3px 0;
}

.doc-toc a:hover {
  color: var(--text);
}

.doc-body {
  max-width: 760px;
}

.doc-body h1 {
  font-size: clamp(34px, 4.4vw, 52px);
  letter-spacing: -0.05em;
  margin: 12px 0 16px;
  line-height: 1.02;
}

.doc-lead {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.65;
  max-width: 66ch;
}

.doc-body section {
  margin-top: 42px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.doc-body h2 {
  font-size: 24px;
  letter-spacing: -0.035em;
  margin-bottom: 12px;
}

.doc-body h3 {
  font-size: 15px;
  margin: 22px 0 6px;
}

.doc-body p,
.doc-body li {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.doc-body p + p {
  margin-top: 10px;
}

.doc-body ul {
  margin: 10px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 5px;
}

.doc-body code {
  font-size: 12px;
}

.doc-callout {
  margin-top: 24px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--warning) 28%, transparent);
  background: var(--warning-soft);
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.6;
}

.doc-callout strong {
  color: var(--text);
}

.doc-table-wrap {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow-x: auto;
  background: var(--surface);
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.doc-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.doc-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border-faint);
  color: var(--muted);
  vertical-align: top;
}

.doc-table tr:last-child td {
  border-bottom: 0;
}

.doc-table td:nth-child(2) {
  white-space: nowrap;
}

.doc-table code {
  background: none;
  border: 0;
  padding: 0;
  color: var(--text-soft);
}

.method {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 500;
}

.method.get {
  color: var(--info);
  background: var(--info-soft);
}

.method.post {
  color: var(--positive);
  background: var(--positive-soft);
}

.method.patch,
.method.put {
  color: var(--warning);
  background: var(--warning-soft);
}

.method.delete {
  color: var(--danger);
  background: var(--danger-soft);
}

.doc-pre {
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid #23272e;
  background: #0a0c10;
  color: #c9cdd4;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.7;
  overflow-x: auto;
}

.doc-pre code {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
}

.doc-note {
  margin-top: 14px;
  font-size: 12px;
  color: var(--faint);
}

.doc-muted {
  font-size: 12px !important;
  color: var(--faint) !important;
}

.doc-link {
  color: var(--accent-strong);
  border-bottom: 1px solid var(--accent-line);
}

.doc-foot {
  margin-top: 44px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--faint) !important;
  font-size: 12.5px !important;
}

.doc-foot a {
  color: var(--muted);
}

.doc-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
  padding: 20px 0;
}

.doc-footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--faint);
  font-size: 11.5px;
}

.doc-footer a {
  color: var(--muted);
}

@media (max-width: 900px) {
  .doc-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding-top: 36px;
  }

  .doc-toc {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
  }

  .doc-toc-label {
    width: 100%;
  }

  .doc-body section {
    margin-top: 32px;
    padding-top: 22px;
  }
}

@media (max-width: 600px) {
  .doc-container {
    width: calc(100% - 32px);
  }

  .doc-nav-links a:not(.btn) {
    display: none;
  }

  .doc-body h1 {
    font-size: 34px;
  }
}
