/* Docs layout: sidebar, a readable column, and an "on this page" list on wide screens. */
.docs-top { border-bottom: 1px solid var(--rule); }
.menu-btn { display: none; appearance: none; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; padding: 4px 2px; }

.docs-grid { display: grid; grid-template-columns: 220px minmax(0, 720px) 200px; gap: 56px; justify-content: center; padding-top: 40px; padding-bottom: 80px; }
.docs-nav, .docs-toc { position: sticky; top: 28px; align-self: start; max-height: calc(100vh - 56px); overflow: auto; }
.nav-head { font-family: var(--hand); text-transform: uppercase; letter-spacing: .28em; font-size: 12px; color: var(--ink-soft); margin: 22px 0 8px; }
.nav-head:first-child { margin-top: 4px; }
.docs-nav ul, .docs-toc ul { list-style: none; margin: 0; padding: 0; }
.docs-nav a { display: block; font-family: var(--hand); font-size: 19px; line-height: 1.25; padding: 5px 0; color: var(--ink-soft); text-decoration: none; }
.docs-nav a:hover { color: var(--ink); }
.docs-nav a[aria-current="page"] { color: var(--ink); }
.docs-nav a[aria-current="page"]::before { content: "~ "; }
.docs-toc a { display: block; font-size: 14px; line-height: 1.35; padding: 4px 0; color: var(--ink-soft); text-decoration: none; }
.docs-toc a:hover { color: var(--ink); }

.page-head { display: flex; align-items: center; gap: 20px; margin-bottom: 26px; }
.page-icon { flex: none; height: 64px; display: block; }
.page-head h1 { font-family: var(--hand); font-weight: 400; font-size: clamp(38px, 4.6vw, 54px); line-height: 1.05; margin: 0 0 6px; }
.lede { margin: 0; color: var(--ink-soft); font-size: 19px; }

.prose { font-size: 18px; line-height: 1.65; }
.prose h2 { font-family: var(--hand); font-weight: 400; font-size: 32px; line-height: 1.1; margin: 46px 0 12px; scroll-margin-top: 24px; }
.prose h3 { font-family: var(--hand); font-weight: 400; font-size: 24px; line-height: 1.15; margin: 32px 0 8px; scroll-margin-top: 24px; }
.prose p { margin: 0 0 14px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 1.3em; }
.prose li { margin-bottom: 6px; }
.prose ul { list-style: none; padding-left: 1.4em; }
.prose ul > li { position: relative; }
.prose ul > li::before { content: "~"; position: absolute; left: -1.15em; color: var(--ink-soft); }
.prose a { text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose :not(pre) > code { font-size: .84em; background: var(--code-bg); padding: 2px 6px; border-radius: 4px; overflow-wrap: anywhere; }

.code { position: relative; margin: 6px 0 20px; }
.code pre { margin: 0; padding: 16px 18px; padding-right: 70px; background: var(--code-bg); border-radius: 8px; overflow-x: auto; font-size: 14px; line-height: 1.6; }
.code .copy {
  position: absolute; top: 10px; right: 10px; appearance: none; cursor: pointer;
  font-family: var(--hand); font-size: 15px; color: var(--ink-soft);
  background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; padding: 3px 10px;
}
.code .copy:hover { color: var(--ink); border-color: var(--ink-soft); }

.callout { border-left: 2px solid var(--ink); padding: 4px 0 4px 18px; margin: 4px 0 22px; }
.callout p { margin: 0 0 8px; }
.callout p:last-child { margin-bottom: 0; }
.callout::before { display: block; font-family: var(--hand); text-transform: uppercase; letter-spacing: .26em; font-size: 12px; color: var(--ink-soft); margin-bottom: 4px; }
.callout.note::before { content: "note"; }
.callout.tip::before { content: "tip"; }
.callout.careful::before { content: "careful"; }
.callout.agent::before { content: "your agent does this"; }

.table { overflow-x: auto; margin: 6px 0 22px; }
.table table { border-collapse: collapse; width: 100%; font-size: 16px; }
.table th { font-family: var(--hand); font-weight: 400; font-size: 18px; text-align: left; border-bottom: 1.5px solid var(--ink); padding: 6px 12px 6px 0; }
.table td { border-bottom: 1px solid var(--rule); padding: 9px 12px 9px 0; vertical-align: top; }

.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 56px; border-top: 1px solid var(--rule); padding-top: 22px; }
.pager a { font-family: var(--hand); font-size: 22px; text-decoration: none; display: flex; flex-direction: column; }
.pager .next { text-align: right; }
.pager span { font-size: 12px; letter-spacing: .26em; text-transform: uppercase; color: var(--ink-soft); }
.for-agents { margin-top: 28px; font-size: 14px; color: var(--ink-soft); }
.docs-foot { border-top: 1px solid var(--rule); padding-top: 18px; padding-bottom: calc(22px + env(safe-area-inset-bottom)); font-size: 13px; color: var(--ink-soft); text-align: center; }

@media (max-width: 1180px) {
  .docs-grid { grid-template-columns: 200px minmax(0, 720px); gap: 44px; }
  .docs-toc { display: none; }
}
@media (max-width: 820px) {
  .docs-grid { grid-template-columns: minmax(0, 1fr); padding-top: 24px; }
  .menu-btn { display: inline-block; }
  .docs-nav { display: none; position: static; max-height: none; border-bottom: 1px solid var(--rule); padding-bottom: 14px; }
  .docs-nav.open { display: block; }
  .page-icon { height: 48px; }
  .prose { font-size: 17px; }
}
