/* The help center's docs frame, after Linear's docs: a quiet sidebar of
   every guide, one readable column, and "On this page" at the right.
   Loaded only by help/ pages (tools/build-site.mjs). Every color is one of
   site.css's tokens, so light and dark follow the site (D-574); nothing
   here declares a color of its own. */

.docs {
  --docs-side: 248px;
  --docs-toc: 200px;
  --docs-col: 720px;
  width: 100%;
  max-width: calc(var(--docs-side) + var(--docs-col) + var(--docs-toc) + 160px + var(--gutter) * 2);
  margin: 0 auto;
  padding: 24px var(--gutter) 96px;
  display: grid;
  gap: 32px;
}
.docs > * { min-width: 0; }
@media (min-width: 1000px) {
  .docs { grid-template-columns: var(--docs-side) minmax(0, 1fr); gap: 56px; padding-top: 40px; }
}
@media (min-width: 1200px) {
  .docs:not(.docs-index) { grid-template-columns: var(--docs-side) minmax(0, var(--docs-col)) var(--docs-toc); gap: 64px; }
}

/* ── The sidebar ──────────────────────────────────────────────── */
.docs-side { display: none; }
@media (min-width: 1000px) {
  .docs-side { display: block; }
  .docs-nav { position: sticky; top: 88px; max-height: calc(100vh - 104px); overflow-y: auto; padding: 0 8px 24px 0; scrollbar-width: thin; }
}
.docs-filter { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; margin-bottom: 16px; border: 1px solid var(--h-line); border-radius: 8px; background: var(--h-surface); color: var(--h-muted); transition: border-color var(--dur-ctl) ease; }
.docs-filter[hidden] { display: none; }
.docs-filter:focus-within { border-color: var(--h-brand); }
.docs-filter svg { width: 15px; height: 15px; flex: none; }
.docs-filter input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 14px; color: var(--h-ink); }
.docs-filter input::placeholder { color: var(--h-muted); }
.docs-home { margin: 0 0 18px; }
.docs-group + .docs-group { margin-top: 20px; }
.docs-group-h { margin: 0 0 6px; padding: 0 10px; font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--h-muted); }
.docs-group ul { list-style: none; margin: 0; padding: 0; }
.docs-nav a, .docs-fold a { display: flex; align-items: center; min-height: 32px; padding: 5px 10px; border-radius: 6px; font-size: 14px; line-height: 1.35; color: var(--h-ink-2); transition: background-color var(--dur-ctl) ease, color var(--dur-ctl) ease; }
.docs-nav a:hover, .docs-fold a:hover { background: var(--h-well); color: var(--h-ink); }
.docs-nav a[aria-current="page"], .docs-fold a[aria-current="page"] { background: var(--h-well); color: var(--h-ink); font-weight: 600; }
.docs-home a { font-weight: 600; color: var(--h-ink); }
.docs-none { padding: 0 10px; font-size: 14px; color: var(--h-muted); }
.docs-none[hidden], [data-docs-group][hidden], li[hidden] { display: none; }

/* Below 1000px the sidebar folds into one disclosure above the article. */
.docs-fold { border: 1px solid var(--h-line); border-radius: 10px; background: var(--h-surface); }
@media (min-width: 1000px) { .docs-fold { display: none; } }
.docs-fold summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 16px; font-size: 15px; font-weight: 600; cursor: pointer; list-style: none; }
.docs-fold summary::-webkit-details-marker { display: none; }
.docs-fold summary::after { content: ""; width: 8px; height: 8px; border-right: 1.6px solid var(--h-muted); border-bottom: 1.6px solid var(--h-muted); transform: rotate(45deg) translateY(-2px); transition: transform var(--dur-ctl) var(--ease-out); }
.docs-fold[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.docs-fold nav { padding: 4px 8px 16px; border-top: 1px solid var(--h-line-soft); }
.docs-fold .docs-home { margin: 8px 0 12px; }

/* ── The article column ───────────────────────────────────────── */
.docs-head .crumbs { font-size: 13px; gap: 2px 8px; }
.docs-head .crumbs a { min-height: 32px; text-decoration: none; }
.docs-head .crumbs a:hover { text-decoration: underline; }
.docs-head h1, .docs-hero h1 { margin-top: 8px; font-size: clamp(30px, 3.4vw, 40px); line-height: 1.12; letter-spacing: -0.022em; font-weight: 600; color: var(--h-ink); }
.docs-dek { margin-top: 12px; font-size: 17px; line-height: 1.55; color: var(--h-muted); max-width: 62ch; }
.docs-meta { margin-top: 14px; font-size: 13px; color: var(--h-muted); }
.docs-head { padding-bottom: 28px; border-bottom: 1px solid var(--h-line); }

.docs-prose { margin-top: 32px; max-width: none; font-size: 16px; line-height: 1.7; }
.docs-prose > * + * { margin-top: 1em; }
.docs-prose h2 { margin-top: 2.4em; padding-top: 4px; font-size: 24px; line-height: 1.3; font-weight: 600; letter-spacing: -0.012em; scroll-margin-top: 96px; }
.docs-prose h3 { margin-top: 1.8em; font-size: 17px; font-weight: 600; scroll-margin-top: 96px; }
.docs-prose li + li { margin-top: .35em; }
.docs-prose table { font-size: 15px; }
.docs-prose th, .docs-prose td { padding: 10px 14px 10px 0; }
.docs-prose th { font-size: 13px; }
.docs-prose .in-product { margin-top: 1.6em; margin-bottom: 1.6em; padding: 16px 18px; border-radius: 10px; font-size: 15px; }
.docs-prose .in-product b { font-size: 13px; }

/* A screenshot: a framed picture of the app, captioned underneath. */
.shot { margin: 28px 0; }
.shot a { display: block; border: 1px solid var(--h-line); border-radius: 10px; overflow: hidden; background: var(--h-surface); box-shadow: var(--shadow-soft); transition: border-color var(--dur-ctl) ease; }
.shot a:hover { border-color: var(--control); }
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption { margin-top: 10px; font-size: 13px; line-height: 1.5; color: var(--h-muted); }
.shot-phone { max-width: 300px; }
.shot-phone a { border-radius: 22px; }

/* Previous and next, as two bordered cards. */
.docs-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 56px; }
.docs-pager a { display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--h-line); border-radius: 10px; color: var(--h-ink); transition: border-color var(--dur-ctl) ease, background-color var(--dur-ctl) ease; }
.docs-pager a:hover { border-color: var(--control); background: var(--h-surface); }
.docs-pager small { font-size: 12px; color: var(--h-muted); }
.docs-pager span { font-size: 15px; font-weight: 600; line-height: 1.35; }
.docs-next { text-align: right; }
@media (max-width: 560px) { .docs-pager { grid-template-columns: 1fr; } .docs-next { text-align: left; } }
.docs-foot { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--h-line); font-size: 13px; line-height: 1.6; color: var(--h-muted); }
.docs-foot a, .docs-help a { color: var(--h-brand); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ── On this page ─────────────────────────────────────────────── */
.docs-toc { display: none; }
@media (min-width: 1200px) {
  .docs-toc { display: block; }
  .docs-toc nav { position: sticky; top: 96px; }
}
.docs-toc p { margin: 0 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--h-muted); }
.docs-toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--h-line); }
.docs-toc a { display: block; padding: 5px 0 5px 12px; margin-left: -1px; border-left: 1px solid transparent; font-size: 13px; line-height: 1.4; color: var(--h-muted); transition: color var(--dur-ctl) ease, border-color var(--dur-ctl) ease; }
.docs-toc a:hover { color: var(--h-ink); }
.docs-toc a[aria-current="true"] { color: var(--h-ink); border-left-color: var(--h-ink); }

/* ── The home page ────────────────────────────────────────────── */
.docs-hero { padding-bottom: 32px; border-bottom: 1px solid var(--h-line); }
.docs-kicker { font-size: 13px; font-weight: 600; color: var(--h-brand); }
.docs-start { margin-top: 20px; }
.docs-start-link { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; font-size: 15px; font-weight: 600; color: var(--h-brand); }
.docs-start-link .ic { width: 16px; height: 16px; transition: transform var(--dur-ctl) var(--ease-out); }
.docs-start-link:hover .ic { transform: translateX(3px); }
.docs-cards { display: grid; gap: 16px; margin-top: 32px; }
@media (min-width: 720px) { .docs-cards { grid-template-columns: 1fr 1fr; } }
.docs-card { display: flex; flex-direction: column; padding: 16px 16px 12px; border: 1px solid var(--h-line); border-radius: 12px; background: var(--h-surface); scroll-margin-top: 96px; }
.docs-card-shot { display: block; margin: -4px -4px 14px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; border: 1px solid var(--h-line-soft); background: var(--h-well); }
.docs-card-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.docs-card h2 { font-size: 17px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
.docs-card > p { margin-top: 4px; font-size: 14px; line-height: 1.5; color: var(--h-muted); }
.docs-card ul { list-style: none; margin: 10px -8px 0; padding: 8px 0 0; border-top: 1px solid var(--h-line-soft); }
.docs-card li a { display: flex; align-items: center; min-height: 32px; padding: 4px 8px; border-radius: 6px; font-size: 14px; color: var(--h-ink-2); transition: background-color var(--dur-ctl) ease; }
.docs-card li a:hover { background: var(--h-well); color: var(--h-ink); }
.docs-help { margin-top: 40px; font-size: 14px; color: var(--h-muted); }

/* A phone's links are fingers' targets (D-11): every link in the frame
   clears 44px under 1000px, where the sidebar has folded away. */
@media (max-width: 999px) {
  .docs-head .crumbs a, .docs-fold a, .docs-fold .docs-home a, .docs-card li a, .docs-start-link { min-height: 44px; }
}
