/* The docs at /docs: a list of pages on the left, the page, and its headings on the right.
   It adds to site.css, and keeps its colours, glass header, pills and footer. The pages themselves
   are written by landing/docs/build.ts. */
.vh{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.docs{max-width:1368px;margin:0 auto;padding:108px var(--gut) 5rem;display:grid;grid-template-columns:248px minmax(0,1fr) 208px;gap:56px;align-items:start}
.docs svg{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

/* site.css underlines a link in a list or a paragraph in lime, which is for the page's own words */
.side a,.toc a,.more .menu a,.turn a,.doc h2 a,.doc h3 a{text-decoration:none}

/* the list of pages, and the search above it */
.side{position:sticky;top:92px;max-height:calc(100vh - 108px);display:flex;flex-direction:column;gap:18px;font-size:.92rem}
.search{position:relative}
.find{display:flex;align-items:center;gap:.5rem;height:42px;padding:0 .75rem 0 .85rem;border-radius:999px;background:var(--wash);color:var(--hint);cursor:text}
.find:focus-within{outline:2px solid var(--ink);outline-offset:1px}
.find input{flex:1;min-width:0;border:0;background:none;font:inherit;letter-spacing:inherit;color:var(--ink);outline:none;-webkit-appearance:none;appearance:none}
.find input::-webkit-search-cancel-button{display:none}
.find kbd{flex:none;min-width:22px;padding:1px 6px;border-radius:6px;background:var(--surface);color:var(--hint);font:500 .75rem/1.5 var(--text);text-align:center}
.find:focus-within kbd{display:none}
#hits{position:absolute;z-index:40;top:calc(100% + 8px);left:0;width:min(440px,calc(100vw - 2*var(--gut)));max-height:min(480px,70vh);overflow:auto;padding:6px;border-radius:var(--r);background:var(--surface);box-shadow:0 0 0 1px var(--line),0 18px 50px rgba(30,40,80,.16)}
#hits li{padding:.6rem .75rem;border-radius:12px;cursor:pointer}
#hits li[aria-selected=true]{background:var(--wash)}
#hits b{display:block;font-weight:600;color:var(--ink)}
#hits small{display:block;font-size:.75rem;color:var(--hint)}
#hits span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin-top:.15rem;font-size:.85rem;line-height:1.4;color:var(--ink-2)}
#hits mark{background:var(--accent);color:var(--on-accent);border-radius:3px;padding:0 1px}
#hits .none{cursor:default;color:var(--ink-2)}
.pages{min-height:0;overflow:auto;margin-right:-8px;padding-right:8px}
.pages summary{display:none}
.group+.group{margin-top:1.4rem}
.group h2{margin:0 0 .35rem .75rem;font-size:.75rem;font-weight:600;letter-spacing:0;color:var(--hint)}
.group a{display:block;padding:.38rem .75rem;border-radius:10px;color:var(--ink-2)}
.group a:hover{color:var(--ink);background:var(--wash)}
.group a[aria-current]{color:var(--ink);font-weight:500;background:var(--wash);box-shadow:inset 3px 0 0 var(--accent)}

/* the page */
.doc{min-width:0;max-width:760px;font-size:1rem;line-height:1.6;color:#3a3a3c}
.crumb{display:flex;align-items:center;justify-content:space-between;gap:1rem;min-height:36px;margin-bottom:.9rem;font-size:.85rem;font-weight:600;color:var(--orange)}
.share{display:flex;gap:6px;position:relative;font-weight:400}
.pill{display:inline-flex;align-items:center;gap:.45rem;height:36px;padding:0 .9rem;border:0;border-radius:999px;background:var(--wash);color:var(--ink);font:500 .85rem var(--text);letter-spacing:inherit;cursor:pointer;white-space:nowrap}
.pill:hover{background:#e8e8ed}
.more summary{list-style:none;padding:0 .55rem}
.more summary::-webkit-details-marker{display:none}
.more .menu{position:absolute;z-index:30;right:0;top:calc(100% + 8px);min-width:230px;padding:6px;border-radius:var(--r);background:var(--surface);box-shadow:0 0 0 1px var(--line),0 18px 50px rgba(30,40,80,.16)}
.more .menu a{display:block;padding:.55rem .75rem;border-radius:12px;color:var(--ink);font-size:.9rem}
.more .menu a:hover{background:var(--wash)}
[data-copy-src] .done,[data-copy] .done{display:none}
.copied>svg:not(.done){display:none}
.copied>.done{display:block}

.doc h1{font-size:clamp(2rem,4vw,2.75rem);letter-spacing:-.03em;line-height:1.1;color:var(--ink)}
.doc .lead{margin-top:.8rem;font-size:1.15rem}
.doc h2{margin:2.8rem 0 .2rem;padding-top:.2rem;font-size:1.5rem;letter-spacing:-.022em;line-height:1.2;color:var(--ink)}
.doc h3{margin:1.9rem 0 0;font-size:1.12rem;letter-spacing:-.015em;color:var(--ink)}
.doc h2 a,.doc h3 a{color:inherit}
.doc h2 a:hover::after,.doc h3 a:hover::after{content:" #";color:var(--hint);font-weight:400}
.doc p,.doc ul,.doc ol,.doc pre,.doc .table,.doc .note{margin-top:1rem}
.doc b{color:var(--ink);font-weight:600}
.doc ul{list-style:disc;padding-left:1.25rem}
.doc ol{list-style:decimal;padding-left:1.4rem}
.doc li{padding-left:.2rem}
.doc li+li{margin-top:.4rem}
.doc li>ul,.doc li>ol,.doc li>p{margin-top:.4rem}
.doc li::marker{color:var(--hint)}
.doc code{padding:.12em .38em;border-radius:6px;background:var(--wash);color:var(--ink);font:.86em/1.5 ui-monospace,"SF Mono",Menlo,Consolas,monospace;letter-spacing:0}
.doc pre{position:relative;padding:1.1rem 1.25rem;border-radius:var(--r);background:var(--wash);overflow:auto}
.doc pre code{padding:0;background:none;font-size:.85rem;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere}
.doc pre .pill{position:absolute;top:10px;right:10px;background:var(--surface)}
.doc pre:has(.pill) code{display:block;padding-top:2.2rem}
.doc .table{overflow-x:auto}
.doc table{width:100%;border-collapse:collapse;font-size:.94rem}
.doc th,.doc td{padding:.65rem .9rem .65rem 0;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}
.doc th{font-weight:600;color:var(--ink);white-space:nowrap}
.doc td:first-child{color:var(--ink)}
.doc .note{padding:1rem 1.25rem;border-radius:var(--r);background:var(--wash);color:var(--ink)}
.doc .note>:first-child{margin-top:0}

/* the home page of the docs: the prompt to copy, and where to start */
.agent{display:flex;align-items:center;justify-content:space-between;gap:1.25rem 2rem;flex-wrap:wrap;margin-top:1.75rem;padding:24px 28px;border-radius:var(--r-lg);background:var(--ink);color:#fff}
.agent div{flex:1;min-width:15rem}
.agent b{font-family:var(--display);font-size:1.25rem;font-weight:600;letter-spacing:-.02em;color:#fff}
.agent p{margin-top:.3rem;color:rgba(255,255,255,.72)}
.doc ul.picks{list-style:none;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:12px}
.doc ul.picks li{margin:0;padding:20px 22px;border-radius:var(--r);background:var(--wash);font-size:.94rem;color:var(--ink-2)}
.doc ul.picks li>a:first-child{display:block;margin-bottom:.3rem;font-family:var(--display);font-size:1.08rem;font-weight:600;letter-spacing:-.015em}

.turn{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:3.5rem}
.turn a{padding:16px 20px;border-radius:var(--r);background:var(--wash);color:var(--ink);font-weight:500}
.turn a:hover{background:#e8e8ed}
.turn small{display:block;font-size:.78rem;font-weight:400;color:var(--hint)}
.turn .next{text-align:right}

/* the page's headings */
.toc{position:sticky;top:92px;max-height:calc(100vh - 108px);overflow:auto;font-size:.85rem}
.toc h2{margin-bottom:.5rem;font-size:.75rem;font-weight:600;letter-spacing:0;color:var(--hint)}
.toc a{display:block;padding:.3rem 0 .3rem .8rem;border-left:2px solid var(--line);color:var(--ink-2);line-height:1.35}
.toc a:hover{color:var(--ink)}
.toc a.on{color:var(--ink);border-left-color:var(--ink)}

@media(max-width:1180px){
  .docs{grid-template-columns:232px minmax(0,1fr);gap:40px}
  .toc{display:none}
}
@media(max-width:860px){
  .docs{display:block;padding-top:92px}
  .side{position:static;max-height:none;margin-bottom:1.75rem;gap:10px}
  #hits{width:100%}
  .find kbd{display:none}
  .pages{overflow:visible;margin:0;padding:0;border-radius:var(--r);background:var(--wash)}
  .pages summary{display:flex;align-items:center;justify-content:space-between;padding:.7rem 1rem;font-weight:500;color:var(--ink);cursor:pointer;list-style:none}
  .pages summary::-webkit-details-marker{display:none}
  .pages summary::after{content:"+";color:var(--hint)}
  .pages[open] summary::after{content:"–"}
  .pages nav{padding:0 .25rem .75rem}
  .group a[aria-current]{background:var(--surface)}
  .crumb{flex-wrap:wrap}
}
