/* Documentation — clean layout */

.docs-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 2.5rem;
  width: min(1080px, calc(100% - 2rem));
  margin: 5.5rem auto 3rem;
  align-items: start;
}

.docs-sidebar {
  position: sticky;
  top: 5rem;
  max-height: calc(100vh - 6rem);
  overflow: auto;
  padding: 1rem;
  border-radius: var(--radius-lg);
  background: var(--bg-muted);
  border: 1px solid var(--border);
}

.docs-sidebar h2 {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 1rem 0 0.4rem;
}

.docs-sidebar h2:first-child { margin-top: 0; }

.docs-sidebar a {
  display: block;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  font-size: 0.875rem;
  color: var(--text-soft);
  transition: background 0.15s, color 0.15s;
}

.docs-sidebar a:hover { color: var(--text); background: var(--surface); }

.docs-sidebar a.is-active,
.docs-sidebar a.docs-nav-link.is-active,
.docs-sidebar a.docs-anchor-link.is-active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 500;
}

.docs-nav-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
  margin: 1.25rem 0 1.75rem;
}

.docs-nav-card {
  display: block;
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  transition: border-color 0.15s;
}

.docs-nav-card:hover {
  border-color: var(--border);
  transform: none;
}

.docs-nav-card strong {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.docs-nav-card span {
  font-size: 0.8125rem;
  color: var(--text-soft);
}

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

.docs-main h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.docs-main .docs-lead {
  font-size: 1.05rem;
  color: var(--text-soft);
  margin-bottom: 1.75rem;
  max-width: 60ch;
}

.docs-main h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 2rem 0 0.65rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-soft);
}

.docs-main h2:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.docs-main h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 1.25rem 0 0.4rem;
}

.docs-main p,
.docs-main li {
  font-size: 0.9375rem;
  color: var(--text-soft);
  line-height: 1.65;
}

.docs-main p { margin-bottom: 0.85rem; }

.docs-main ul,
.docs-main ol {
  margin: 0 0 1rem 1.25rem;
}

.docs-main li { margin-bottom: 0.35rem; }

.docs-main a { font-weight: 500; }

.docs-steps {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  counter-reset: step;
}

.docs-steps li {
  counter-increment: step;
  position: relative;
  padding: 0.85rem 0 0.85rem 2.5rem;
  border-bottom: 1px solid var(--border-soft);
}

.docs-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.85rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  display: grid;
  place-items: center;
}

.docs-callout {
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-soft);
  background: var(--bg-muted);
  margin: 1rem 0;
  font-size: 0.875rem;
  color: var(--text-soft);
}

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

.docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin: 1rem 0 1.5rem;
}

.docs-table th,
.docs-table td {
  padding: 0.55rem 0.75rem;
  text-align: left;
  border: 1px solid var(--border-soft);
}

.docs-table th {
  background: var(--bg-muted);
  font-weight: 600;
  color: var(--text);
}

.docs-table td { color: var(--text-soft); }

@media (max-width: 860px) {
  .docs-layout {
    grid-template-columns: 1fr;
    margin-top: 4.5rem;
  }

  .docs-sidebar {
    position: static;
    max-height: none;
  }
}
