/* ============================================
   Kink — Documentation page styles
   Matches the light minimal theme of the site.
   ============================================ */

.docs-body {
  font-family: "DM Sans", sans-serif;
  color: #000000;
  background: #ffffff;
}

.docs-layout {
  display: flex;
  max-width: 1440px;
  margin: 0 auto;
  padding-top: 64px; /* header height */
  min-height: calc(100vh - 64px);
}

/* ============================================ Sidebar */
.docs-sidebar {
  position: sticky;
  top: 64px;
  align-self: flex-start;
  width: 260px;
  min-width: 260px;
  height: calc(100vh - 64px);
  overflow-y: auto;
  border-right: 1px solid rgba(0, 0, 0, 0.06);
  padding: 32px 24px 48px;
  background: #ffffff;
}

.docs-sidebar::-webkit-scrollbar {
  width: 6px;
}
.docs-sidebar::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.08);
  border-radius: 3px;
}

.docs-sidebar-section {
  margin-bottom: 28px;
}

.docs-sidebar-heading {
  font-size: 11px;
  font-weight: 600;
  color: #848a93;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 10px 10px;
}

.docs-sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.docs-sidebar-link {
  display: block;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 13.5px;
  color: #525861;
  text-decoration: none;
  line-height: 1.4;
  transition:
    background-color 140ms ease,
    color 140ms ease;
}

.docs-sidebar-link:hover {
  background: rgba(0, 0, 0, 0.04);
  color: #000000;
}

.docs-sidebar-link.is-active {
  background: #000000;
  color: #ffffff;
  font-weight: 500;
}

/* ============================================ Content */
.docs-content {
  flex: 1;
  min-width: 0;
  padding: 48px 56px 120px;
  max-width: 920px;
}

.docs-section {
  padding-top: 32px;
  margin-top: -32px; /* offset for sticky header on anchor scroll */
}

.docs-section + .docs-section {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  margin-top: 48px;
  padding-top: 64px;
}

.docs-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: #848a93;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.docs-h1 {
  font-family: "DM Sans", sans-serif;
  font-size: 42px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #000000;
  margin: 0 0 16px;
}

.docs-h2 {
  font-family: "DM Sans", sans-serif;
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #000000;
  margin: 0 0 12px;
  scroll-margin-top: 80px;
}

.docs-h3 {
  font-family: "DM Sans", sans-serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: #000000;
  margin: 32px 0 10px;
}

.docs-h4 {
  font-family: "DM Sans", sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #000000;
  margin: 24px 0 8px;
}

.docs-lead {
  font-size: 17px;
  line-height: 1.65;
  color: #525861;
  margin: 0 0 28px;
}

.docs-p {
  font-size: 15px;
  line-height: 1.7;
  color: #2f343b;
  margin: 0 0 16px;
}

.docs-p strong,
.docs-li strong {
  color: #000000;
  font-weight: 600;
}

.docs-ul,
.docs-ol {
  margin: 0 0 20px;
  padding-left: 22px;
}

.docs-ul .docs-li,
.docs-ol .docs-li {
  font-size: 15px;
  line-height: 1.65;
  color: #2f343b;
  margin-bottom: 6px;
}

.docs-ul .docs-li::marker {
  color: #848a93;
}

.docs-ol .docs-li::marker {
  color: #848a93;
  font-weight: 600;
  font-family: "Space Grotesk", monospace;
}

/* code */
.docs-code-inline {
  font-family: "Space Grotesk", monospace;
  font-size: 13px;
  background: #f5f5f5;
  color: #000000;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.docs-code-block {
  font-family: "Space Grotesk", monospace;
  font-size: 13px;
  line-height: 1.6;
  background: #f5f5f5;
  color: #000000;
  padding: 16px 18px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  overflow-x: auto;
  margin: 0 0 20px;
  white-space: pre;
}

/* table */
.docs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 24px;
  font-size: 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  overflow: hidden;
}

.docs-table th {
  text-align: left;
  font-weight: 600;
  color: #000000;
  background: #f5f5f5;
  padding: 11px 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.docs-table td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  color: #2f343b;
  vertical-align: top;
}

.docs-table tr:last-child td {
  border-bottom: none;
}

/* callout */
.docs-callout {
  padding: 14px 18px;
  border-radius: 10px;
  background: #f5f5f5;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-left: 3px solid #000000;
  font-size: 14px;
  line-height: 1.6;
  color: #2f343b;
  margin: 0 0 20px;
}

.docs-callout strong {
  color: #000000;
}

/* kbd badges */
.docs-kbd {
  display: inline-block;
  padding: 2px 7px;
  font-family: "Space Grotesk", monospace;
  font-size: 12px;
  font-weight: 500;
  color: #000000;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-bottom-width: 2px;
  border-radius: 5px;
  line-height: 1.4;
  white-space: nowrap;
}

/* next-steps grid */
.docs-next {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 32px;
}

.docs-next-card {
  display: block;
  padding: 18px 20px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #ffffff;
  text-decoration: none;
  color: #000000;
  transition:
    border-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.docs-next-card:hover {
  border-color: rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

.docs-next-title {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
}

.docs-next-desc {
  font-size: 13px;
  color: #525861;
  line-height: 1.5;
}

/* ============================================ Mobile */
.docs-sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 60;
  padding: 12px 18px;
  background: #000000;
  color: #ffffff;
  border: none;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  font-family: "DM Sans", sans-serif;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

@media (max-width: 860px) {
  .docs-layout {
    display: block;
  }

  .docs-sidebar {
    position: fixed;
    top: 64px;
    left: 0;
    height: calc(100vh - 64px);
    width: 280px;
    transform: translateX(-100%);
    transition: transform 240ms cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 55;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  }

  .docs-sidebar.is-open {
    transform: translateX(0);
  }

  .docs-content {
    padding: 28px 20px 100px;
    max-width: 100%;
  }

  .docs-h1 {
    font-size: 32px;
  }
  .docs-h2 {
    font-size: 26px;
  }

  .docs-sidebar-toggle {
    display: inline-block;
  }
}

@media (prefers-reduced-motion: reduce) {
  .docs-sidebar-link,
  .docs-next-card,
  .docs-sidebar {
    transition: none;
  }
}
