/* docs layout: 3-pane (sidebar | content | toc) */

.docs-layout {
  align-items: start;
}

.docs-sidebar-col {
  position: sticky;
  top: 6rem;
  max-height: calc(100vh - 7rem);
  overflow-y: auto;
}

.docs-toc-col {
  position: sticky;
  top: 6rem;
}

/* hide right toc col at medium breakpoint (uses mobile drawer instead) */
@media (max-width: 991px) {
  .docs-toc-col {
    display: none;
  }
}

/* collapse sidebar on small screens */
@media (max-width: 767px) {
  .docs-sidebar-col {
    display: none;
  }
}

/* sidebar nav */
.docs-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-bottom: 2rem;
}

.docs-sidebar__group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.docs-sidebar__group-label {
  color: var(--color-neutral-600, #4b5563);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.docs-sidebar__items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.docs-sidebar__link {
  display: block;
  padding: 0.375rem 0.75rem;
  border-radius: 0.25rem;
  color: var(--color-neutral-700, #374151);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
  border-left: 2px solid transparent;
}

.docs-sidebar__link:hover {
  color: var(--color-black, #000);
  background: rgba(0, 0, 0, 0.04);
}

.docs-sidebar__link.is--active,
.docs-sidebar__link[aria-current="page"] {
  color: var(--color-black, #000);
  background: rgba(0, 0, 0, 0.05);
  border-left-color: var(--color-electric, #a1ff62);
  font-weight: 500;
}

/* mermaid blocks */
.mermaid-block {
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.mermaid-block pre.mermaid {
  background: var(--color-neutral-950, #09090b);
  border-radius: 0.5rem;
  padding: 1.5rem;
  max-width: 100%;
  overflow-x: auto;
}

.mermaid-block figcaption {
  font-size: 0.8125rem;
  color: var(--color-neutral-500, #6b7280);
  font-style: italic;
}

/* docs index splash */
.docs-hero__actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.docs-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 999px;
  background: var(--color-purple, #6840ff);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.15s;
}

.docs-cta:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.docs-hero__github {
  color: var(--color-neutral-700, #374151);
  font-size: 0.9375rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}

.docs-hero__github:hover {
  border-bottom-color: currentColor;
}

.docs-cards-wrap {
  padding-top: 2.5rem;
  padding-bottom: 4rem;
}

.docs-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.docs-card {
  border: 1px solid var(--color-neutral-200, #e5e7eb);
  border-radius: 0.75rem;
  padding: 1.5rem;
  background: var(--color-white, #fff);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.docs-card:hover {
  border-color: var(--color-neutral-300, #d1d5db);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.docs-card__eyebrow {
  color: var(--color-neutral-600, #4b5563);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.875rem;
}

.docs-card__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.docs-card__link {
  color: var(--color-neutral-800, #1f2937);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color 0.15s;
}

.docs-card__link:hover {
  color: var(--color-purple, #6840ff);
}

.docs-home-content,
.docs-feature-wrap,
.docs-cards-wrap {
  border-left: 1px solid #8898aa;
  border-right: 1px solid #8898aa;
}

.docs-home-content {
  padding-top: 1rem;
  padding-bottom: 2rem;
}
.docs-home-content .code-block {
  margin-bottom: 1rem;
}

.docs-feature-wrap {
  padding-top: 0.5rem;
  padding-bottom: 2.5rem;
}
.docs-feature-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.docs-feature-card {
  border: 1px solid var(--color-neutral-200, #e5e7eb);
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
  background: var(--color-white, #fff);
}
.docs-feature-card h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}
.docs-feature-card p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--color-neutral-600, #4b5563);
}

/* prev / next pager */

.docs-pager {
  display: flex;
  gap: 1rem;
  margin: 0 0 1.5rem;
}

.docs-pager__link {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.875rem 1rem;
  border: 1px solid var(--color-neutral-200, #e5e7eb);
  border-radius: 0.5rem;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
  min-width: 0;
}

.docs-pager__link:hover {
  border-color: var(--color-neutral-300, #d1d5db);
  background: rgba(0, 0, 0, 0.02);
}

.docs-pager__link.is--next {
  text-align: right;
  margin-left: auto;
}

.docs-pager__dir {
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-neutral-500, #6b7280);
}

.docs-pager__title {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-neutral-800, #1f2937);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* doc-table: simple data table matching ComparisonTable visual language */

.doc-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.doc-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  border-spacing: 0;
  font-size: 0.9375em;
}

.doc-table thead tr {
  background-color: #fff;
  border-bottom: 1px solid #e3e8ee;
}

.doc-table thead th {
  padding: 0.875em 1.25em;
  text-align: left;
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-neutral-600, #4b5563);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-table tbody tr {
  border-bottom: 1px solid #e3e8ee;
}

.doc-table tbody tr:nth-of-type(even) {
  background: #f6f9fc;
}

.doc-table tbody td {
  padding: 0.875em 1.25em;
  vertical-align: middle;
  line-height: 1.4;
  color: var(--color-neutral-800, #1f2937);
  overflow-wrap: break-word;
}

.doc-table tbody td:first-child {
  font-weight: 500;
  color: var(--color-neutral-900, #111827);
}

/* mobile docs-index toggle */

.docs-nav-toggle-btn .tag {
  border-radius: 999px;
  color: #fff;
}

.docs-nav-toggle-btn .tag-bg {
  background-color: var(--color-neutral-900, #111);
}

/* gap between the two toggle buttons in __end */
.nav-product-info__end {
  gap: 0.1rem;
}

/* hide docs-nav toggle on desktop (sidebar already visible) */
@media screen and (min-width: 768px) {
  [data-docs-nav-toggle] {
    display: none;
  }
}
