/* Enterprise API docs — Every / lc-page aligned */

/* Override FlexStart `section { overflow: clip }` which breaks sticky TOC / layout */
.edocs.lc-page,
section.edocs {
  padding: 6.5rem 0 3.5rem;
  font-family: "Inter", var(--default-font, system-ui, sans-serif);
  color: #111;
  background: #fff;
  overflow: visible !important;
}

.edocs-head {
  margin-bottom: 2rem;
  max-width: 42rem;
}

.edocs-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7280;
}

.edocs-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 2.4vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0a0a0a;
  line-height: 1.15;
}

.edocs-lead {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: #6b7280;
}

.edocs-lead code,
.edocs-section code {
  font-size: 0.8125rem;
  color: #b91c1c;
  word-break: break-all;
}

.edocs-layout {
  display: grid;
  grid-template-columns: 14rem minmax(0, 1fr);
  gap: 2rem 2.5rem;
  align-items: start;
}

.edocs-toc {
  position: sticky;
  top: 6.5rem;
  max-height: calc(100vh - 7.5rem);
  overflow-y: auto;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 1rem;
  background: #f4f5f7;
}

.edocs-toc-label {
  margin: 0 0 0.75rem;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9ca3af;
}

.edocs-toc-group {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 0.85rem;
}

.edocs-toc-group:last-child {
  margin-bottom: 0;
}

.edocs-toc-group > span {
  margin-bottom: 0.15rem;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #6b7280;
}

.edocs-toc-group a {
  display: block;
  padding: 0.2rem 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  line-height: 1.35;
}

.edocs-toc-group a:hover {
  color: #0a0a0a;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.edocs-main {
  min-width: 0;
}

.edocs-section {
  margin-bottom: 2.5rem;
  scroll-margin-top: 6.5rem;
}

.edocs-section:last-child {
  margin-bottom: 0;
}

.edocs-plan-tag {
  display: inline-block;
  margin: 0 0 0.4rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #f4f5f7;
  border: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #6b7280;
}

.edocs-section h2 {
  margin: 0 0 0.65rem;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: #0a0a0a;
}

.edocs-section h3 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: #111;
}

.edocs-section > p {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: #5b6472;
}

.edocs-list {
  margin: 0 0 0.5rem;
  padding-left: 1.15rem;
  color: #374151;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.edocs-table-wrap {
  overflow-x: auto;
  margin-bottom: 0.5rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.85rem;
  background: #fff;
}

.edocs-table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.875rem;
}

.edocs-table th,
.edocs-table td {
  padding: 0.7rem 0.85rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  word-break: break-word;
}

.edocs-table th {
  background: #f4f5f7;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b7280;
}

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

.edocs-example {
  margin-bottom: 1.25rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.85rem;
  background: #fafafa;
}

.edocs-example:last-child {
  margin-bottom: 0;
}

.edocs-example-label {
  margin: 0 0 0.35rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b7280;
}

.edocs-example-label + .edocs-code + .edocs-example-label,
.edocs-note + .edocs-example-label {
  margin-top: 0.85rem;
}

.edocs-note {
  margin: 0.5rem 0 0.65rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #5b6472;
}

.edocs-code {
  display: block;
  margin: 0;
  padding: 0.65rem 0.75rem;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.5rem;
  background: #0a0a0a;
  color: #f4f5f7;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.edocs-section a {
  color: #0a0a0a;
  font-weight: 500;
  text-underline-offset: 0.15em;
}

.edocs-section a:hover {
  color: #374151;
}

.edocs-steps {
  margin: 0 0 1.15rem;
  padding-left: 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: #374151;
}

.edocs-steps li {
  margin-bottom: 0.35rem;
}

.edocs-callout {
  padding: 0.9rem 1rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.85rem;
  background: #f4f5f7;
}

.edocs-callout-label {
  margin: 0 0 0.35rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b7280;
}

.edocs-plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.edocs-plan {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.85rem;
  background: #fff;
  text-decoration: none !important;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.edocs-plan:hover {
  border-color: rgba(0, 0, 0, 0.2);
  background: #fafafa;
  color: inherit;
}

.edocs-plan-name {
  font-size: 1rem;
  font-weight: 700;
  color: #0a0a0a;
}

.edocs-plan-for {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
}

.edocs-plan-body {
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #5b6472;
}

.edocs-plan-meta {
  margin-top: auto;
  padding-top: 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #111;
}

@media (max-width: 991px) {
  .edocs.lc-page {
    padding-top: 5.75rem;
  }

  .edocs-layout {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .edocs-toc {
    position: static;
    max-height: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem 1rem;
  }

  .edocs-toc-label {
    grid-column: 1 / -1;
    margin-bottom: 0;
  }

  .edocs-toc-group {
    margin-bottom: 0;
  }

  .edocs-section {
    scroll-margin-top: 5.5rem;
  }

  .edocs-plans {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575px) {
  .edocs-toc {
    grid-template-columns: 1fr;
  }
}
