/* qkvm.com/docs: what the documentation adds to website/site.css. */

.brand small { margin-left: 2px; padding: 2px 8px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }

/* On a phone the bar holds the name and the switch for the colours. The pages are under "All pages",
   and the way to the website and the demo is at the foot of the page. */
.nav .wrap > .theme { margin-left: auto; }  /* (as specific as the site's rule for the bar's icons, and after it) */
@media (max-width: 560px) { .nav nav { display: none; } }

.docs { display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 56px; padding: 44px 0 80px; align-items: start; }
.docs-menu { display: none; }
.docs-side { position: sticky; top: 92px; display: grid; gap: 2px; max-height: calc(100vh - 120px); overflow-y: auto; padding-right: 6px; }
.docs-side a, .docs-menu nav a {
  display: block;
  padding: 7px 12px;
  border-left: 2px solid transparent;
  border-radius: 0 7px 7px 0;
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
}
.docs-side a:hover, .docs-menu nav a:hover { color: var(--text); background: var(--accent-soft); }
.docs-side a[aria-current="page"], .docs-menu nav a[aria-current="page"] { border-left-color: var(--accent-text); color: var(--text); background: var(--accent-soft); font-weight: 650; }

/* qKVM comes as the Web App and the Desktop App: a switch between their pages at the top of the list, which holds
   the pages of the one that is chosen; and on the first page of each, a line that leads to the other. */
.docs-apps { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0 0 12px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.docs-side .docs-apps a, .docs-menu nav .docs-apps a { padding: 7px 6px; border-left: 0; border-radius: 7px; text-align: center; font-size: 13.5px; font-weight: 650; }
.docs-side .docs-apps a[aria-current="true"], .docs-menu nav .docs-apps a[aria-current="true"] { background: var(--accent-soft); color: var(--text); }
.prose .docs-also { margin: -6px 0 26px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); font-size: 15px; line-height: 1.6; }

@media (max-width: 860px) {
  .docs { grid-template-columns: minmax(0, 1fr); gap: 22px; padding-top: 22px; }
  .docs-side { display: none; }
  .docs-menu { display: block; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
  .docs-menu summary { padding: 12px 16px; font-weight: 600; cursor: pointer; }
  .docs-menu nav { display: grid; gap: 2px; padding: 0 10px 12px; }
}

.prose { max-width: 74ch; font-size: 16.5px; line-height: 1.72; }
.prose h1 { margin: 0 0 22px; max-width: none; font-size: clamp(30px, 4vw, 40px); line-height: 1.12; letter-spacing: -.028em; text-align: left; }
.prose h3 { margin: 44px 0 10px; font-size: 21px; font-weight: 650; letter-spacing: -.014em; }
.prose h4 { margin: 30px 0 8px; font-size: 17px; font-weight: 650; }
.prose p { margin: 0 0 16px; color: color-mix(in srgb, var(--text) 88%, var(--muted)); text-wrap: pretty; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 24px; }
.prose li { margin: 7px 0; color: color-mix(in srgb, var(--text) 88%, var(--muted)); }
.prose li > ul, .prose li > ol { margin: 6px 0 2px; }
.prose strong { color: var(--text); font-weight: 650; }
.prose pre { margin: 0 0 20px; }
.prose table { width: 100%; margin: 0 0 20px; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { color: var(--muted); font-size: 12.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }

/* On a phone nothing makes the page scroll sideways: a long line of code (an address, a path, a request) may break
   anywhere, and a table wider than the screen scrolls inside itself. */
.prose :not(pre) > code { overflow-wrap: anywhere; }
@media (max-width: 860px) {
  .prose table { display: block; max-width: 100%; overflow-x: auto; }
}

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 74ch; margin-top: 54px; }
.pager a { padding: 14px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); font-weight: 600; text-decoration: none; }
.pager a:hover { border-color: var(--accent-text); }
.pager a span { display: block; color: var(--faint); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.pager .next { grid-column: 2; text-align: right; }
