/*
  The guides (/mintlify-alternatives, /migrate-from-mintlify): long-form pages in the landing page's
  look. Loaded after the kit (system.css) and landing.css; every colour is a kit token (--ink,
  --muted, --line, --surface) or the palette's --p-link and --p-accent, so light and dark follow the
  theme switch. Text is set for reading: 18px, 1.65 leading, about 68 characters a line.
*/
.guide {
  padding-top: calc(var(--nav) + var(--s-8));
  padding-bottom: var(--s-9);
}
.guide__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: var(--s-7);
}
@media (min-width: 1024px) {
  .guide__layout {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gutter);
  }
  .guide__head {
    grid-column: 1 / span 9;
    grid-row: 1;
  }
  .guide__toc {
    grid-column: 1 / span 3;
    grid-row: 2;
    align-self: start;
    position: sticky;
    top: calc(var(--nav) + var(--s-6));
  }
  .guide__body {
    grid-column: 4 / -1;
    grid-row: 2;
  }
}

/* the head: kicker, h1, lead */
.guide__kicker {
  font: 500 var(--t-label)/1.4 var(--font-mono);
  color: var(--muted);
  letter-spacing: 0.02em;
}
.guide__head h1 {
  margin-top: var(--s-4);
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(36px, 2.4vw + 22px, 60px);
  line-height: 1.04;
  letter-spacing: var(--display-tracking);
  text-wrap: balance;
  max-width: 18ch;
}
.guide__lead {
  margin-top: var(--s-5);
  display: grid;
  gap: var(--s-4);
  max-width: 62ch;
}
.guide__lead p {
  font-size: var(--t-lead);
  line-height: 1.55;
  color: var(--ink);
}

/* on this page */
.guide__toc {
  border-top: 1px solid var(--line);
  padding-top: var(--s-4);
}
.guide__toc-title {
  font: 500 var(--t-label)/1.4 var(--font-mono);
  color: var(--muted);
}
.guide__toc ol {
  margin-top: var(--s-3);
  display: grid;
  gap: 0;
  list-style: none;
  padding: 0;
}
.guide__toc a {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: var(--t-small);
  color: var(--muted);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}
.guide__toc a:hover {
  color: var(--ink);
}

/* the text */
.prose {
  min-width: 0;
}
.prose > * + * {
  margin-top: var(--s-5);
}
.prose :is(p, li) {
  font-size: var(--t-lead);
  line-height: 1.65;
  color: var(--ink);
}
.prose :is(p, ul, ol, h2, h3, .answer, .note) {
  max-width: 68ch;
}
.prose h2 {
  margin-top: var(--s-8);
  padding-top: var(--s-6);
  border-top: 1px solid var(--line);
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(26px, 0.8vw + 20px, 34px);
  line-height: 1.15;
  letter-spacing: var(--display-tracking);
  scroll-margin-top: calc(var(--nav) + var(--s-5));
}
.prose > h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.prose h3 {
  margin-top: var(--s-7);
  font-size: 21px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
  scroll-margin-top: calc(var(--nav) + var(--s-5));
}
.prose h2 + *,
.prose h3 + * {
  margin-top: var(--s-4);
}
.prose ul,
.prose ol {
  padding-left: 1.4em;
  display: grid;
  gap: var(--s-3);
}
.prose ul {
  list-style: disc;
}
.prose ol {
  list-style: decimal;
}
.prose li::marker {
  color: var(--muted);
}
.prose strong {
  font-weight: 600;
}
.prose a:not(.btn, .link) {
  color: var(--p-link);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in oklab, currentColor 40%, transparent);
  transition: text-decoration-color var(--dur) var(--ease);
}
.prose a:not(.btn, .link):hover {
  text-decoration-color: currentColor;
}
.prose code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 1px 5px;
}
.prose pre {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--s-4) var(--s-5);
  overflow-x: auto;
  max-width: 100%;
  font: 14px/1.6 var(--font-mono);
  color: var(--ink);
}
.prose pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: inherit;
}

/* the short answer, and asides */
.answer,
.note {
  background: var(--surface);
  border-left: 3px solid var(--p-accent);
  padding: var(--s-5) var(--s-6);
  display: grid;
  gap: var(--s-3);
}
.answer > * + *,
.note > * + * {
  margin-top: 0;
}
.answer h2 {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 21px;
}
.note p {
  font-size: var(--t-body);
}

/* sources */
.sources {
  font-size: var(--t-small);
}
.sources li {
  font-size: var(--t-small);
  line-height: 1.5;
}

/* the closing actions */
.guide__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
  align-items: center;
}
@media (max-width: 639px) {
  .guide {
    padding-top: calc(var(--nav) + var(--s-6));
  }
  .guide__actions .btn {
    width: 100%;
  }
  .answer,
  .note {
    padding: var(--s-4) var(--s-5);
  }
}
