/* The manual, over the site's own styles.css (same four colors, same font).
   Generated pages link this from /docs/docs.css; the source is Docs/docs.css
   in the app repo. */

.docs {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 48px;
  padding-top: 8px;
  padding-bottom: 64px;
  align-items: start;
}

/* Sidebar */

.docs-nav {
  position: sticky;
  top: 24px;
  font-size: 15px;
}

.docs-nav h2 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 24px 0 8px;
}

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

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

.docs-nav li { margin: 0; }

.docs-nav a {
  display: block;
  padding: 5px 10px;
  margin: 0 -10px;
  border-radius: 8px;
  color: var(--text);
}

.docs-nav a:hover { background: var(--border); text-decoration: none; }

.docs-nav a[aria-current="page"] {
  color: var(--green);
  font-weight: 600;
}

header.site .nav-link[aria-current="page"] { color: var(--text); font-weight: 600; }

/* Article */

.docs-body { min-width: 0; max-width: 720px; }

.doc h1 {
  font-size: 34px;
  line-height: 1.15;
  margin: 0 0 20px;
}

.doc h2 {
  font-size: 23px;
  margin: 40px 0 12px;
}

.doc h3 {
  font-size: 18px;
  margin: 28px 0 8px;
}

.doc p,
.doc li {
  font-size: 17px;
  line-height: 1.65;
}

.doc p { margin: 0 0 16px; }
.doc ul, .doc ol { padding-left: 24px; margin: 0 0 16px; }
.doc li { margin-bottom: 8px; }

.doc code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.9em;
  background: var(--border);
  padding: 1px 6px;
  border-radius: 5px;
}

.doc img {
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  margin: 20px 0;
}

.doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 24px;
  font-size: 16px;
}

.doc th,
.doc td {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.doc th { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }

.doc blockquote {
  margin: 0 0 16px;
  padding: 12px 18px;
  border-left: 3px solid var(--green);
  background: var(--card);
  border-radius: 0 10px 10px 0;
}

.doc blockquote p:last-child { margin-bottom: 0; }

/* Previous / next */

.pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.pager a {
  display: block;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  font-weight: 600;
  max-width: 48%;
}

.pager a:hover { text-decoration: none; border-color: var(--green); }
.pager a span { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.pager .next { margin-left: auto; text-align: right; }

/* Phone width: the sidebar becomes a block above the article. */

@media (max-width: 800px) {
  .docs { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .docs-nav { position: static; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
  .doc h1 { font-size: 28px; }
}
