/* User docs (loads after styles.css): a contents column beside one reading column. */

.docs {
  display: grid;
  grid-template-columns: 220px minmax(0, 760px);
  gap: 56px;
  padding: 6vh var(--pad-x) 12vh;
}

.docs-side { position: sticky; top: 96px; align-self: start; max-height: calc(100vh - 112px); overflow-y: auto; }
.side-head { font-family: var(--display); font-weight: 800; font-size: 15px; letter-spacing: -0.01em; margin-bottom: 4px; }
.side-head + ol, .side-head + ul { margin-bottom: 24px; }
.docs-side ol, .docs-side ul { list-style: none; padding: 0; }
.docs-side a { display: flex; align-items: center; min-height: 36px; color: var(--sub); text-decoration: none; font-size: 14.5px; line-height: 1.35; }
.docs-side a:hover, .docs-side a[aria-current="page"] { color: var(--accent); }

.crumbs ol { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; font-size: 14px; color: var(--sub); }
.crumbs li + li::before { content: "/"; margin-right: 8px; }
.crumbs a { color: var(--accent); }

.docs-body h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin: 12px 0 16px; }
.docs-body h2 { font-size: 1.6rem; margin: 56px 0 8px; padding-top: 24px; border-top: 1px solid var(--line); }
.docs-body p { margin-bottom: 12px; }
.docs-body a { color: var(--accent); }
.docs-body section { padding: 0; }
.intro { font-size: 17.5px; }
.area-lede { color: var(--sub); }

.caps dt { font-weight: 700; margin-top: 22px; }
.caps dd { margin: 4px 0 0; }
.where { color: var(--sub); font-size: 14.5px; margin-top: 4px; }
.where strong { color: var(--ink); font-weight: 600; }

.roles { list-style: none; padding: 0; margin-top: 32px; }
.roles li { padding: 22px 0; border-top: 1px solid var(--line); }
.roles h2 { font-size: 1.5rem; margin: 0 0 4px; padding: 0; border: 0; }
.roles h2 a { color: var(--ink); text-decoration: none; }
.roles h2 a:hover { color: var(--accent); }
.roles p { color: var(--sub); margin: 0; }

@media (max-width: 900px) {
  .docs { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .docs-side { position: static; max-height: none; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
  /* Contents wrap into a short block above the guide; the breadcrumb leads back to the other guides. */
  .docs-side ol { display: flex; flex-wrap: wrap; gap: 0 18px; }
  .docs-side a { min-height: 44px; }
  .docs-side nav[aria-label="Guides"] { display: none; }
  .docs-side:not(:has(ol)) { display: none; }
}
