/* Docs page layout. Shares tokens and components with styles.css. */
.docs {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 64px;
  align-items: start;
  padding-top: 56px;
  padding-bottom: 96px;
}
.nav-links a[aria-current="page"] { font-weight: 600; }

/* Sidebar */
.toc {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  font-size: 14px;
}
.toc-title { margin: 0 0 10px; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gray-500); }
.toc a { padding: 6px 10px; border-radius: 6px; color: var(--gray-600); text-decoration: none; }
.toc a:hover { background: var(--surface-soft); color: var(--black); }

/* Article */
.doc { max-width: 760px; min-width: 0; }
.doc-head { padding-bottom: 40px; border-bottom: 1px solid var(--line-soft); }
.doc-head h1 { font-size: clamp(36px, 5vw, 52px); line-height: 1.08; letter-spacing: -0.03em; }
.doc-head .lead { margin-top: 18px; }
.doc section { padding-top: 48px; }
.doc h2 { font-size: 28px; line-height: 1.2; margin-bottom: 14px; }
.doc p { color: var(--gray-600); margin: 12px 0 0; }
.doc p a, .doc dd a { color: var(--black); text-underline-offset: 3px; }
.doc strong { color: var(--black); font-weight: 600; }
kbd {
  font-family: var(--font-mono);
  font-size: 0.85em;
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: #fff;
}

/* Copyable code blocks */
.code-block {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 12px 12px 18px;
  background: rgba(136, 136, 136, 0.1);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}
.code-block pre { margin: 0; overflow-x: auto; min-width: 0; }
.code-block code { font-size: 14.5px; line-height: 1.75; color: var(--gray-600); white-space: pre; }

/* Callouts */
.callout {
  padding: 14px 16px;
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--black);
  border-radius: 6px;
  background: var(--surface-card);
  margin-top: 18px !important;
}
.callout.warn { border-left-color: #c2410c; background: #fff7ed; border-color: #fed7aa; }

/* Lists */
.examples, .flags { margin: 14px 0 0; padding-left: 20px; color: var(--gray-600); display: grid; gap: 8px; }
.flags code { white-space: nowrap; }
.tips { margin: 18px 0 0; border-top: 1px solid var(--line-soft); }
.tips dt { font-weight: 600; padding-top: 16px; }
.tips dd { margin: 6px 0 0; padding-bottom: 16px; color: var(--gray-600); border-bottom: 1px solid var(--line-soft); }

/* Tables */
.table-wrap { margin-top: 16px; overflow-x: auto; border: 1px solid var(--line-soft); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; font-size: 13px; font-weight: 600; color: var(--gray-500); background: var(--surface-card); padding: 10px 16px; border-bottom: 1px solid var(--line-soft); }
td { padding: 12px 16px; border-bottom: 1px solid var(--line-soft); color: var(--gray-600); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td:first-child { white-space: nowrap; color: var(--black); }
td code, th code { font-size: 13.5px; }

/* Tablet and phone: drop the sidebar */
@media (max-width: 900px) {
  .docs { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 32px; }
  .toc { display: none; }
}
@media (max-width: 600px) {
  .doc h2 { font-size: 24px; }
  td:first-child { white-space: normal; }
  .code-block code { font-size: 13px; }
}
