/* Long-form documentation generated by tools/md-to-html.hs. */

.docs-page {
  padding-top: 56px;
  background:
    radial-gradient(circle at 75% 0%, rgba(124, 111, 247, 0.08), transparent 32rem),
    var(--bg);
}

.docs-nav .links a:last-child {
  color: var(--accent2);
}

.docs-shell {
  width: min(100%, 1360px);
  min-height: calc(100vh - 56px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px minmax(0, 860px);
  justify-content: center;
  gap: 4rem;
  padding: 3rem 2rem 6rem;
}

.docs-sidebar {
  position: sticky;
  top: 80px;
  align-self: start;
  max-height: calc(100vh - 104px);
  overflow-y: auto;
  padding: 0.25rem 1.25rem 1.5rem 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.docs-sidebar-title {
  margin-bottom: 0.8rem;
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.docs-sidebar ul {
  list-style: none;
}

.docs-sidebar > ul > li + li {
  margin-top: 0.24rem;
}

.docs-sidebar ul ul {
  margin: 0.2rem 0 0.45rem 0.75rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--border);
}

.docs-sidebar a {
  display: block;
  padding: 0.24rem 0;
  color: var(--text-dim);
  font-size: 0.82rem;
  line-height: 1.35;
}

.docs-sidebar a:hover {
  color: var(--white);
  text-decoration: none;
}

.docs-guide-nav > a {
  margin-bottom: 0.75rem;
  color: var(--text);
  font-weight: 600;
}

.docs-guide-nav {
  position: static;
  inset: auto;
  z-index: auto;
  display: block;
  padding: 0;
  background: transparent;
  border: 0;
}

.docs-guide-part {
  margin: 1rem 0 0.32rem;
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.025em;
}

.docs-guide-chapter {
  margin-left: 0.35rem;
  padding-left: 0.55rem;
  border-left: 1px solid transparent;
}

.docs-guide-chapter > a,
.docs-guide-chapter > .planned {
  display: block;
  padding: 0.2rem 0;
  font-size: 0.78rem;
  line-height: 1.32;
}

.docs-guide-chapter > .planned {
  color: #656573;
}

.docs-guide-chapter.current {
  border-left-color: var(--accent2);
  background: linear-gradient(90deg, rgba(86, 182, 194, 0.08), transparent);
}

.docs-guide-chapter.current > a {
  color: var(--white);
  font-weight: 700;
}

.docs-current-page-toc > ul {
  margin: 0.2rem 0 0.55rem;
  padding: 0;
}

.docs-current-page-toc > ul > li > a {
  display: none;
}

.docs-current-page-toc > ul > li > ul {
  margin: 0;
  padding: 0 0 0.15rem 0.65rem;
  border-left-color: rgba(86, 182, 194, 0.28);
}

.docs-current-page-toc a {
  padding: 0.18rem 0;
  font-size: 0.74rem;
}

.docs-current-page-toc ul ul ul {
  margin-bottom: 0.3rem;
}

.docs-toc-toggle {
  display: none;
}

.docs-main {
  min-width: 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.75;
}

.docs-source-note {
  margin-bottom: 1.4rem;
  color: var(--text-dim);
  font-size: 0.8rem;
}

.docs-main h1,
.docs-main h2,
.docs-main h3,
.docs-main h4,
.docs-main h5,
.docs-main h6 {
  color: var(--white);
  font-family: var(--font-mono);
  line-height: 1.25;
  scroll-margin-top: 80px;
}

.docs-main h1 {
  margin: 0 0 2.25rem;
  font-size: clamp(2.2rem, 6vw, 3.5rem);
  letter-spacing: -0.045em;
}

.docs-main h1::after {
  content: '';
  display: block;
  width: 4.5rem;
  height: 3px;
  margin-top: 1rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}

.docs-main h2 {
  margin: 4rem 0 1.25rem;
  padding-top: 0.5rem;
  font-size: 1.8rem;
  letter-spacing: -0.025em;
  border-top: 1px solid var(--border);
}

.docs-main h3 {
  margin: 2.5rem 0 0.85rem;
  font-size: 1.25rem;
}

.docs-main h4,
.docs-main h5,
.docs-main h6 {
  margin: 2rem 0 0.7rem;
}

.docs-main p,
.docs-main ul,
.docs-main ol,
.docs-main dl,
.docs-main blockquote,
.docs-main table,
.docs-main pre {
  margin: 1rem 0;
}

.docs-main ul,
.docs-main ol {
  padding-left: 1.5rem;
}

.docs-main li + li {
  margin-top: 0.3rem;
}

.docs-main strong {
  color: var(--white);
}

.docs-main :not(pre) > code {
  padding: 0.14rem 0.38rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: rgba(124, 111, 247, 0.09);
  color: #d7d1ff;
  font-family: var(--font-mono);
  font-size: 0.88em;
}

.docs-main div.sourceCode,
.docs-main pre {
  position: relative;
  overflow: visible;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-code);
}

.docs-main div.sourceCode pre,
.docs-main pre {
  overflow-x: auto;
  padding: 1.25rem 1.4rem;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.65;
}

.docs-main div.sourceCode pre {
  margin: 0;
  border: 0;
  background: transparent;
}

.docs-main pre code {
  font-family: inherit;
}

/* Keep generated highlighting consistent with the hand-authored site samples. */
.docs-main code span.kw { color: #c678dd; }
.docs-main code span.dt,
.docs-main code span.bu { color: #e5c07b; }
.docs-main code span.fu { color: #61afef; }
.docs-main code span.st,
.docs-main code span.ch { color: #98c379; }
.docs-main code span.dv,
.docs-main code span.fl { color: #d19a66; }
.docs-main code span.op { color: #56b6c2; }
.docs-main code span.co { color: #5c6370; font-style: italic; }

.docs-copy-code {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 2;
  padding: 0.3rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: rgba(18, 18, 26, 0.92);
  color: var(--text-dim);
  font-family: var(--font-sans);
  font-size: 0.7rem;
  cursor: pointer;
}

.docs-copy-code:hover {
  border-color: var(--accent);
  color: var(--white);
}

.docs-main blockquote {
  padding: 0.7rem 1.25rem;
  border-left: 3px solid var(--accent);
  background: rgba(124, 111, 247, 0.07);
  color: var(--text-dim);
}

.docs-main blockquote > :first-child { margin-top: 0; }
.docs-main blockquote > :last-child { margin-bottom: 0; }

.docs-main table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-spacing: 0;
  border-collapse: collapse;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
}

.docs-main th,
.docs-main td {
  padding: 0.65rem 0.85rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.docs-main th {
  background: rgba(255, 255, 255, 0.035);
  color: var(--white);
  font-weight: 600;
}

.docs-main tr:last-child td { border-bottom: 0; }
.docs-main th:last-child,
.docs-main td:last-child { border-right: 0; }

.docs-main hr {
  margin: 3rem 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.docs-chapter-nav {
  position: static;
  inset: auto;
  z-index: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 5rem;
  padding: 1.5rem 0 0;
  background: transparent;
  border-bottom: 0;
  border-top: 1px solid var(--border);
}

.docs-chapter-nav a {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
}

.docs-chapter-nav a.next { text-align: right; }
.docs-chapter-nav a:hover { border-color: var(--accent); text-decoration: none; }
.docs-chapter-nav span { color: var(--text-dim); font-size: 0.75rem; }
.docs-chapter-nav strong { color: var(--white); font-size: 0.9rem; }

.docs-footer {
  background: rgba(10, 10, 15, 0.7);
}

@media (max-width: 1000px) {
  .docs-shell {
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 2rem;
  }
}

@media (max-width: 760px) {
  .docs-shell {
    display: block;
    padding: 3.5rem 1.2rem 4rem;
  }

  .docs-toc-toggle {
    position: fixed;
    top: 64px;
    left: 1rem;
    z-index: 95;
    display: block;
    padding: 0.45rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-card);
    color: var(--text);
    font: 600 0.78rem var(--font-sans);
  }

  .docs-sidebar {
    position: fixed;
    inset: 56px 0 0 0;
    z-index: 90;
    display: none;
    max-height: none;
    padding: 7rem 1.5rem 2rem;
    background: rgba(10, 10, 15, 0.98);
  }

  .docs-sidebar.open { display: block; }
  .docs-main h2 { margin-top: 3.2rem; }
  .docs-main div.sourceCode pre,
  .docs-main pre { padding: 1rem; font-size: 0.78rem; }
  .docs-copy-code { display: none; }
}

@media print {
  .docs-page { padding-top: 0; background: white; color: black; }
  .docs-nav,
  .docs-sidebar,
  .docs-toc-toggle,
  .docs-copy-code,
  .docs-footer { display: none !important; }
  .docs-shell { display: block; max-width: none; padding: 0; }
  .docs-main { color: black; }
  .docs-main h1,
  .docs-main h2,
  .docs-main h3,
  .docs-main h4 { color: black; }
  .docs-main pre { white-space: pre-wrap; }
}
