/* Fortunest — documentation pages. Extends the site's styles.css
   (loaded first): same Outfit type, palette and hairlines; adds the
   sidebar + article layout, figures, steps and the prev/next pager.
   The chapter list itself lives in docs.js (one manifest for every page). */

/* ---------- layout ---------- */
.docs-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 56px;
  padding-top: 40px;
  padding-bottom: 96px;
}

/* ---------- sidebar ---------- */
.docs-sidebar { font-size: 14px; }
.docs-sidebar-inner { position: sticky; top: 86px; }
.docs-sidebar .docs-side-title {
  font-size: 12px; font-weight: 400; text-transform: uppercase;
  letter-spacing: 0.16em; color: var(--muted); margin-bottom: 14px;
}
.docs-sidebar ol { list-style: none; }
.docs-sidebar li { margin: 0; }
.docs-sidebar a {
  display: block; padding: 6px 10px; border-left: 2px solid transparent;
  color: var(--body); font-weight: 300; border-radius: 0 6px 6px 0;
}
.docs-sidebar a:hover { color: var(--ink); text-decoration: none; background: var(--wash); }
.docs-sidebar li.current > a {
  color: var(--ink); font-weight: 450; border-left-color: var(--accent);
}
/* auto-TOC of the current chapter's h2 sections */
.docs-sidebar .docs-toc { margin: 2px 0 6px; }
.docs-sidebar .docs-toc a {
  padding: 3px 10px 3px 22px; font-size: 13px; color: var(--muted);
  border-left: 2px solid var(--hairline);
}
.docs-sidebar .docs-toc a:hover { color: var(--ink); }

/* phone: sidebar collapses behind a "Chapters" button */
.docs-menu-btn {
  display: none; font: 450 13.5px/1.2 var(--font); color: var(--ink);
  background: none; border: 1px solid var(--grey-line); border-radius: 999px;
  padding: 7px 16px; cursor: pointer;
}
.docs-menu-btn:hover { border-color: var(--ink); }

/* ---------- article ---------- */
.docs-main { min-width: 0; }
.docs-kicker {
  font-size: 12px; font-weight: 400; text-transform: uppercase;
  letter-spacing: 0.16em; color: var(--muted); margin-bottom: 10px;
}
.docs-main h1 { font-size: clamp(36px, 5vw, 54px); margin-bottom: 18px; }
.docs-lead { font-size: 17.5px; font-weight: 300; max-width: 640px; margin-bottom: 8px; }
.docs-main h2 {
  font-size: 24px; font-weight: 350; margin: 46px 0 10px; padding-top: 26px;
  border-top: 1px solid var(--hairline); scroll-margin-top: 86px;
}
.docs-main h3 {
  font-size: 16.5px; font-weight: 450; color: #757470;
  margin: 26px 0 6px; scroll-margin-top: 86px;
}
.docs-main p { margin: 10px 0; max-width: 72ch; }
.docs-main ul, .docs-main ol { margin: 10px 0 10px 22px; max-width: 72ch; }
.docs-main li { margin: 5px 0; }
.docs-main li::marker { color: var(--muted); }
.docs-main kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85em;
  background: var(--wash); border: 1px solid var(--hairline); border-bottom-width: 2px;
  border-radius: 5px; padding: 1px 6px; color: var(--ink); font-weight: 400;
}

/* numbered quick-start steps */
.docs-steps { list-style: none; margin-left: 0; counter-reset: step; }
.docs-steps > li {
  counter-increment: step; position: relative; padding: 4px 0 4px 52px; margin: 18px 0;
}
.docs-steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 4px;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--grey-line); color: var(--ink);
  font-weight: 250; font-size: 17px;
  display: flex; align-items: center; justify-content: center;
}
.docs-steps > li > strong:first-child { display: block; color: var(--ink); font-weight: 450; margin-bottom: 2px; }

/* screenshots & how-to images */
.docs-fig { margin: 18px 0 22px; }
.docs-fig img {
  display: block; max-width: 100%; height: auto;
  border: 1px solid var(--hairline); border-radius: 10px;
  box-shadow: 0 18px 44px -26px rgba(11, 11, 11, 0.28);
}
.docs-fig figcaption { margin-top: 8px; font-size: 12.5px; color: var(--muted); font-weight: 300; }

/* callout */
.docs-note {
  border-left: 2px solid var(--accent); background: var(--wash);
  border-radius: 0 10px 10px 0; padding: 12px 16px; margin: 16px 0; max-width: 72ch;
  font-size: 14.5px;
}
.docs-note p { margin: 4px 0; }

/* small definition tables */
.docs-table-wrap { overflow-x: auto; margin: 14px 0; }
.docs-table { border-collapse: collapse; width: 100%; min-width: 480px; font-size: 14px; font-weight: 250; }
.docs-table th, .docs-table td { padding: 9px 12px; border-bottom: 1px solid var(--hairline); text-align: left; vertical-align: top; }
.docs-table th { font-size: 12.5px; font-weight: 400; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.docs-table td:first-child { color: #757470; font-weight: 350; white-space: nowrap; }

/* ✨ marker for AI-powered features */
.ai-mark { color: var(--accent); font-style: normal; }

/* ---------- prev / next pager ---------- */
.docs-pager {
  margin-top: 64px; padding-top: 22px; border-top: 1px solid var(--hairline);
  display: flex; justify-content: space-between; gap: 16px;
}
.docs-pager a {
  display: block; max-width: 46%; color: var(--body); font-weight: 300;
}
.docs-pager a:hover { color: var(--ink); text-decoration: none; }
.docs-pager a .pager-dir { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.docs-pager a .pager-title { font-size: 15.5px; font-weight: 400; color: var(--accent); }
.docs-pager a.pager-next { margin-left: auto; text-align: right; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .docs-layout { grid-template-columns: 1fr; gap: 0; padding-top: 22px; }
  .docs-menu-btn { display: inline-block; }
  .docs-sidebar { display: none; }
  .docs-sidebar.open {
    display: block; margin: 0 0 22px;
    border: 1px solid var(--hairline); border-radius: 12px; padding: 14px;
    background: #fff;
  }
  .docs-sidebar-inner { position: static; }
  .docs-main h1 { margin-top: 14px; }
}
