/* PageWeave Docs — chrome for /docs pages (dark editorial) */

/* ---------- docs bar (header) ---------- */
.docs-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 3.5rem;
  padding: 0 1.5rem;
  border-bottom: 1px solid var(--rule);
  background: rgba(18, 17, 24, 0.85);
  backdrop-filter: blur(8px);
}

.docs-brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 0;
}

.docs-wordmark {
  font-family: "Geist", var(--font-sans);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.docs-wordmark-docs {
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.docs-wordmark em {
  color: var(--iris);
  font-style: normal;
  padding: 0 0.125rem;
}

.docs-bar-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.docs-bar-link {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-dim);
  transition: color 0.15s ease;
}

.docs-bar-link:hover {
  color: var(--iris-soft);
}

@media (max-width: 640px) {
  .docs-bar-link {
    display: none;
  }
  .docs-bar .btn {
    display: none;
  }
  .docs-bar-md {
    display: inline;
  }
}

/* ---------- layout ---------- */
.docs-layout {
  display: grid;
  grid-template-columns: 15.5rem minmax(0, 1fr);
  max-width: 72rem;
  margin: 0 auto;
}

@media (max-width: 1023px) {
  .docs-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .docs-nav {
    display: none;
  }
}

/* ---------- sidebar ---------- */
.docs-nav {
  padding: 2rem 1.5rem 3rem 1.5rem;
  border-right: 1px solid var(--rule);
  position: sticky;
  top: 3.5rem;
  align-self: start;
  max-height: calc(100vh - 3.5rem);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--paper-3) transparent;
}

.docs-nav-head {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-faint);
  margin-bottom: 1.5rem;
}

.docs-nav-section {
  margin-bottom: 1.75rem;
}

.docs-nav-label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ink-faint);
  margin-bottom: 0.5rem;
}

.docs-nav-section ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.docs-nav-section li {
  margin: 0;
}

.docs-nav-section a {
  display: block;
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--ink-dim);
  border-left: 1px solid transparent;
  transition: color 0.15s ease, background 0.15s ease;
}

.docs-nav-section a:hover {
  color: var(--ink);
  background: var(--paper-2);
}

.docs-nav-section a.is-active {
  color: var(--iris-soft);
  border-left-color: var(--iris);
  background: rgba(139, 92, 246, 0.08);
}

/* ---------- main ---------- */
.docs-main {
  min-width: 0;
  padding: 2.5rem 3rem 5rem 3rem;
}

@media (max-width: 767px) {
  .docs-main {
    padding: 1.5rem 1.25rem 3rem 1.25rem;
  }
}

.docs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.docs-kicker {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-faint);
}

.docs-md {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--iris-soft);
}

.docs-md:hover {
  text-decoration: underline;
}

/* ---------- prose (markdownify output) ---------- */
.docs-prose {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink-dim);
}

.docs-prose > :first-child {
  margin-top: 0;
}

.docs-prose h1,
.docs-prose h2,
.docs-prose h3,
.docs-prose h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  letter-spacing: -0.015em;
  color: var(--ink);
  line-height: 1.2;
}

.docs-prose h1 {
  font-size: 2.25rem;
  margin: 0 0 1.25rem 0;
  letter-spacing: -0.02em;
}

.docs-prose h2 {
  font-size: 1.5rem;
  margin: 2.75rem 0 0.875rem 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}

.docs-prose h3 {
  font-size: 1.125rem;
  margin: 2rem 0 0.625rem 0;
}

.docs-prose h4 {
  font-size: 1rem;
  margin: 1.5rem 0 0.5rem 0;
}

.docs-prose p {
  margin: 0 0 1rem 0;
}

.docs-prose ul,
.docs-prose ol {
  margin: 0 0 1rem 0;
  padding-left: 1.5rem;
}

.docs-prose li {
  margin: 0.25rem 0;
}

.docs-prose li::marker {
  color: var(--ink-faint);
}

.docs-prose a {
  color: var(--iris-soft);
  text-decoration: none;
  border-bottom: 1px solid rgba(167, 155, 245, 0.3);
  transition: border-color 0.15s ease;
}

.docs-prose a:hover {
  border-bottom-color: var(--iris-soft);
}

.docs-prose strong {
  color: var(--ink);
  font-weight: 600;
}

.docs-prose em {
  color: var(--ink);
}

.docs-prose code {
  font-family: var(--font-mono);
  font-size: 0.8125em;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 0.25rem;
  padding: 0.125rem 0.375rem;
  color: var(--ink);
}

.docs-prose pre {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  margin: 0 0 1.25rem 0;
  overflow-x: auto;
  line-height: 1.6;
}

.docs-prose pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.8125rem;
  color: var(--ink-dim);
}

.docs-prose blockquote {
  margin: 0 0 1.25rem 0;
  padding: 0.75rem 1.25rem;
  border-left: 2px solid var(--iris);
  background: rgba(139, 92, 246, 0.06);
  border-radius: 0 0.5rem 0.5rem 0;
  color: var(--ink-dim);
}

.docs-prose blockquote p {
  margin: 0;
}

.docs-prose hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 2.5rem 0;
}

.docs-prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.25rem 0;
  font-size: 0.875rem;
  display: block;
  overflow-x: auto;
}

.docs-prose thead th {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  text-align: left;
  padding: 0.625rem 0.875rem;
  border-bottom: 1px solid var(--rule-strong);
  white-space: nowrap;
}

.docs-prose tbody td {
  padding: 0.625rem 0.875rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

.docs-prose img {
  max-width: 100%;
  border-radius: 0.5rem;
  border: 1px solid var(--rule);
  margin: 1rem 0;
}

.docs-prose input[type="checkbox"] {
  accent-color: var(--iris);
  margin-right: 0.5rem;
}

.docs-prose del {
  color: var(--ink-faint);
}

/* ---------- index pages ---------- */
.docs-index {
  max-width: 44rem;
  margin: 0 auto;
  padding: 4rem 1.5rem 5rem 1.5rem;
}

.docs-index-title {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0 0 1rem 0;
}

.docs-index-title em {
  font-style: italic;
  color: var(--iris-soft);
}

.docs-index-lede {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink-dim);
  margin: 0 0 3rem 0;
  max-width: 36rem;
}

.docs-index-lede code {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 0.25rem;
  padding: 0.125rem 0.375rem;
}

.docs-index-section {
  margin-bottom: 2.5rem;
}

.docs-index-section h2,
.docs-index-agents h2 {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-faint);
  margin: 0 0 0.875rem 0;
}

.docs-index-section ul,
.docs-index-agents ul {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.docs-index-link {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--rule);
  transition: padding 0.15s ease;
}

.docs-index-link:hover {
  padding-left: 0.5rem;
}

.docs-index-link-title {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--ink);
  transition: color 0.15s ease;
}

.docs-index-link:hover .docs-index-link-title {
  color: var(--iris-soft);
}

.docs-index-link-desc {
  font-size: 0.875rem;
  color: var(--ink-faint);
}

.docs-index-agents {
  margin-top: 3rem;
  padding: 1.5rem 1.75rem;
  border: 1px solid var(--rule);
  border-radius: 0.5rem;
  background: var(--paper-2);
}

.docs-index-agents h2 {
  margin-bottom: 1rem;
}

.docs-index-agents ul {
  border-top: none;
}

.docs-index-agents li {
  padding: 0.375rem 0;
  font-size: 0.9375rem;
  color: var(--ink-dim);
}

.docs-index-agents a {
  color: var(--iris-soft);
}

/* ---------- docs footer ---------- */
.docs-foot {
  border-top: 1px solid var(--rule);
  background: var(--paper-2);
}

.docs-foot-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem 1.5rem;
}

.docs-foot-brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 1.5rem;
}

.docs-foot-tag {
  font-size: 0.8125rem;
  color: var(--ink-faint);
  max-width: 22rem;
  margin: 0.875rem 0 0 0;
}

.docs-foot-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  max-width: 44rem;
}

@media (max-width: 639px) {
  .docs-foot-cols {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.docs-foot-cols ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.docs-foot-cols li {
  margin: 0 0 0.5rem 0;
}

.docs-foot-cols a {
  font-size: 0.875rem;
  color: var(--ink-dim);
}

.docs-foot-cols a:hover {
  color: var(--iris-soft);
}

.docs-foot-note {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-faint);
  margin: 2.5rem 0 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}
