/* THE DOCS SHELL (gen_learn_pages.docs_shell, and the hand-written /security, which carries the
   same regions). On a wide screen, three columns: every docs page in the sidebar as stations on
   ONE line (the rail's line, turned down the page), the page you are on filled; the article at a
   reading measure, closed by the previous and next page; and On this page, the article's own
   headings on a line of their own, the one you are reading marked as a station. Narrower, On this
   page moves above the article; on a phone both lists fold behind their own control. Colours,
   type and corners come from /sheet.css only. */
.wrap.docs-wrap{max-width:none;padding-top:clamp(26px,4vw,50px);padding-left:clamp(16px,3vw,40px);padding-right:clamp(16px,3vw,40px)}
.docs{display:grid;grid-template-columns:minmax(196px,236px) minmax(0,1fr) minmax(168px,208px);gap:clamp(24px,3.6vw,56px);align-items:start}
.docs-side{grid-column:1;grid-row:1}
.docs-main{grid-column:2;grid-row:1;min-width:0;max-width:74ch}
.docs-toc{grid-column:3;grid-row:1}

/* The article reads the same on every docs page, the hand-written one included (it also loads
   /doc.css, the legal pages' sheet, whose sizes would otherwise win). */
.docs-main .crumb{font-size:14px;color:var(--muted);margin:0}
.docs-main .crumb a{color:var(--muted);text-decoration-color:color-mix(in srgb,var(--muted) 50%,transparent)}
.docs-main .crumb a:hover{color:var(--ink)}
.docs-main h1{font-family:var(--display);font-stretch:106%;font-weight:680;font-size:clamp(30px,4.6vw,46px);line-height:1.06;letter-spacing:-.022em;margin:12px 0 0;text-wrap:balance}
.docs-main h2{font-family:var(--display);font-stretch:104%;font-weight:660;font-size:clamp(22px,2.6vw,26px);line-height:1.18;letter-spacing:-.012em;margin:50px 0 12px;text-wrap:balance}
.docs-side li,.docs-toc li{font-size:inherit;line-height:inherit;margin:0}
/* Code in the docs shows exactly what to type: the code face's ligatures would draw `--mode` as one
   long dash and `=>` as an arrow. */
.docs-main code,.docs-main pre,.docs-find kbd{font-variant-ligatures:none;font-feature-settings:"liga" 0,"calt" 0}

/* A list of commands and what each does (the CLI guide): the command in a code face, its
   sentence beside it, each pair closed by a rule. */
.docs-main .cli-list{display:grid;grid-template-columns:minmax(0,auto) minmax(0,1fr);gap:0 24px;margin:18px 0 0;border-top:1px solid var(--line)}
.docs-main .cli-list dt,.docs-main .cli-list dd{margin:0;padding:11px 0;border-bottom:1px solid var(--line)}
.docs-main .cli-list dt code{white-space:nowrap;font-size:13.5px}
.docs-main .cli-list dd{color:var(--muted)}
@media (max-width:640px){
  .docs-main .cli-list{grid-template-columns:minmax(0,1fr)}
  .docs-main .cli-list dt{padding-bottom:2px;border-bottom:0}
  .docs-main .cli-list dt code{white-space:normal}
  .docs-main .cli-list dd{padding-top:2px}
}

/* ---- the sidebar ---- */
/* Room on every side for a focus ring, which the scrolling box would otherwise cut off. */
.docs-side{position:sticky;top:calc(var(--track-h) + 18px);max-height:calc(100vh - var(--track-h) - 36px);overflow:auto;padding:4px 6px 18px 5px;margin-left:-5px;scrollbar-width:thin}
.docs-gt{margin:0;padding:22px 0 9px;font-family:var(--display);font-stretch:82%;font-weight:650;font-size:11.5px;letter-spacing:.09em;text-transform:uppercase;color:var(--muted)}
/* The line: one route through every docs page. Each station and each group name draws its own
   length of it, so it runs unbroken from the first station's centre to the last's, past the group
   names set beside it. */
.docs-route{--route:color-mix(in srgb,var(--ln) 55%,transparent)}
.docs-route .docs-gt{position:relative;padding-left:24px}
.docs-route .docs-gt::before{content:"";position:absolute;left:5px;top:0;bottom:0;width:2px;background:var(--route)}
.docs-route > .docs-gt:first-child{padding-top:10px}
.docs-route > .docs-gt:first-child::before{display:none}
.docs-line{list-style:none;margin:0;padding:0}
.docs-line a{position:relative;display:block;padding:5px 0 5px 24px;color:var(--muted);text-decoration:none;font-size:14.5px;line-height:1.35;transition:color .16s}
.docs-line a::before{content:"";position:absolute;left:5px;top:0;bottom:0;width:2px;background:var(--route)}
.docs-route > ol:first-of-type > li:first-child > a::before{top:50%}
.docs-route > ol:last-of-type > li:last-child > a::before{bottom:50%}
.docs-line a::after{content:"";position:absolute;left:0;top:50%;width:12px;height:12px;margin-top:-6px;border-radius:50%;border:2px solid var(--ln);background:var(--sheet);box-sizing:border-box;transition:border-color .16s}
.docs-line a:hover{color:var(--ink)}
.docs-line a:hover::after{border-color:var(--mint)}
.docs-line a[aria-current="page"]{color:var(--ink);font-weight:650}
.docs-line a[aria-current="page"]::after{background:var(--ln)}
.docs-gt-else{padding-left:24px}
.docs-else{list-style:none;margin:0;padding:0 0 0 24px}
.docs-else a{display:block;padding:4px 0;color:var(--muted);font-size:14px;line-height:1.35;text-decoration:none}
.docs-else a:hover{color:var(--ink)}
.docs-side a:focus-visible,.docs-toc a:focus-visible,.docs-pager a:focus-visible{outline:2px solid var(--mint);outline-offset:2px}

/* Search, over every docs page (docs-search.js and docs/search.json). Hidden until the script
   that answers it has loaded, so nobody types into a box that cannot reply. */
.docs-find{display:grid;gap:6px;margin:2px 0 6px}
.docs-find[hidden]{display:none}
.docs-find label{font-family:var(--display);font-stretch:82%;font-weight:650;font-size:11.5px;letter-spacing:.09em;text-transform:uppercase;color:var(--muted)}
.docs-find label kbd{font-family:var(--mono);font-size:11px;letter-spacing:0;text-transform:none;padding:0 5px;margin-left:6px;border:1px solid var(--line);border-radius:var(--radius);color:var(--muted)}
.docs-find input{width:100%;font:inherit;font-size:14.5px;color:var(--ink);background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);padding:8px 10px}
.docs-find input::placeholder{color:var(--muted)}
.docs-find input:focus{outline:2px solid var(--mint);outline-offset:1px;border-color:var(--mint)}
.docs-count{margin:2px 0 0;font-size:12.5px;color:var(--muted)}
.docs-count:empty{display:none}
.docs-hits{list-style:none;margin:0;padding:0;display:grid;gap:2px}
.docs-hits:empty{display:none}
.docs-hits a{display:block;padding:7px 9px;border:1px solid transparent;border-radius:var(--radius);text-decoration:none;color:var(--ink);font-size:14px;line-height:1.3}
.docs-hits a small{display:block;margin-top:2px;color:var(--muted);font-size:12px}
.docs-hits a .docs-snip{display:block;margin-top:4px;color:var(--muted);font-size:12.5px;line-height:1.4}
.docs-hits a:hover,.docs-hits a[aria-selected="true"]{background:var(--panel);border-color:var(--line)}
.docs-hits a[aria-selected="true"]{border-color:var(--mint)}

/* The controls that fold a list on a phone: the script shows them. */
.docs-menu,.docs-toc-btn{display:none}

/* ---- On this page ---- */
.docs-toc{position:sticky;top:calc(var(--track-h) + 18px);max-height:calc(100vh - var(--track-h) - 36px);overflow:auto;padding:0 4px 0 2px;font-size:13.5px;scrollbar-width:thin}
.docs-toc .docs-gt{padding-top:10px}
.docs-toc ol{position:relative;list-style:none;margin:0;padding:0 0 0 14px;border-left:1px solid var(--line)}
.docs-toc a{position:relative;display:block;padding:4px 0;color:var(--muted);line-height:1.35;text-decoration:none;transition:color .16s}
.docs-toc a:hover,.docs-toc a.is-here{color:var(--ink)}
/* the heading you are reading: a station on the outline's rule */
.docs-toc a.is-here::before{content:"";position:absolute;left:-18.5px;top:50%;width:8px;height:8px;margin-top:-4px;border-radius:50%;background:var(--ln)}

/* ---- the pager: the previous and the next page, as ruled cells ---- */
.docs-pager{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;margin:60px 0 0;background:var(--line);border:1px solid var(--line)}
.docs-pager a{display:flex;flex-direction:column;gap:3px;padding:14px 18px 15px;background:var(--sheet);color:var(--ink);text-decoration:none;min-width:0;transition:background-color .16s}
.docs-pager a:hover{background:var(--panel)}
.docs-pager small{font-family:var(--display);font-stretch:82%;font-weight:650;font-size:11.5px;letter-spacing:.09em;text-transform:uppercase;color:var(--muted)}
.docs-pager span{font-family:var(--display);font-weight:650;font-size:16px;line-height:1.3}
.docs-next{grid-column:2;align-items:flex-end;text-align:right}

/* A heading after body text takes more room above it than below, so an entry on a page of many
   (/docs/troubleshooting/) starts visibly; one right under its h2 stays close to it. */
.docs-main :is(p,pre,ul,ol,dl,div) + h3{margin-top:30px}
/* A message the product prints, quoted on /docs/troubleshooting/: it wraps where a command block
   scrolls, so the whole of it can be matched against the reader's screen at any width. */
.docs-main pre.said,.docs-main pre.said code{white-space:pre-wrap;overflow-wrap:anywhere}

/* Which CodeTrain is which (/docs/, /developers/): four products by four long fields, too wide
   for the reading measure as columns, where it scrolled and cut words at the edge. Each product
   is a block of labelled fields, as a phone already shows it, two to a row where they fit. */
.docs-main .which table{min-width:0}
.docs-main .which thead{display:none}
.docs-main .which table,.docs-main .which tbody{display:block}
.docs-main .which tr{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px 26px;padding:16px 18px;border-bottom:1px solid var(--line)}
.docs-main .which tr:last-child{border-bottom:none}
.docs-main .which th,.docs-main .which td{display:block;width:auto;margin:0;padding:0;border:none;color:var(--ink)}
.docs-main .which th{grid-column:1 / -1;font-family:var(--display);font-size:17px}
.docs-main .which td::before{content:attr(data-label);display:block;margin-bottom:2px;font-family:var(--display);font-stretch:82%;font-weight:600;font-size:12px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted)}

/* A price schedule (/docs/teams/): five short columns that fit the reading measure, where the
   pages' tables are drawn for wide comparisons (min-width 640px, the last column in the accent).
   Figures sit right in tabular digits, all in ink: no column here is the recommended one. */
.prices table{min-width:0;font-variant-numeric:tabular-nums}
.prices caption{caption-side:top;text-align:left;padding:12px 14px 0;font-size:13px;color:var(--muted)}
.prices th,.prices td{padding:10px 14px;text-align:right;white-space:nowrap}
.prices th:first-child{text-align:left}
.prices thead th{white-space:normal;vertical-align:bottom}
.prices thead th:last-child{color:var(--muted)}
.prices tbody td{color:var(--ink)}
/* A phone: five columns do not fit, so each size becomes a block of four labelled figures. */
@media (max-width:480px){
  .prices thead{display:none}
  .prices table,.prices caption,.prices tbody,.prices tr{display:block}
  .prices tr{padding:12px 14px;border-bottom:1px solid var(--line)}
  .prices tr:last-child{border-bottom:none}
  .prices tbody th{display:block;width:auto;padding:0 0 4px;border:none;text-align:left}
  .prices td{display:flex;justify-content:space-between;gap:12px;padding:3px 0;border:none}
  .prices td::before{content:attr(data-label);color:var(--muted)}
}

/* Narrower: On this page sits above the article, its links across two columns. */
@media (max-width:1180px){
  .docs{grid-template-columns:minmax(188px,224px) minmax(0,1fr)}
  .docs-side{grid-row:1 / span 2}
  .docs-toc{grid-column:2;grid-row:1;position:static;max-height:none;overflow:visible;padding:0 0 18px;border-bottom:1px solid var(--line)}
  .docs-toc .docs-gt{padding-top:0}
  .docs-toc ol{columns:2 200px;column-gap:28px}
  .docs-toc li{break-inside:avoid}
  .docs-main{grid-column:2;grid-row:2}
}
/* A phone: one column, the sidebar, then On this page, then the article; both lists fold. */
@media (max-width:900px){
  .docs{grid-template-columns:minmax(0,1fr);gap:18px}
  .docs-side,.docs-toc,.docs-main{grid-column:1;grid-row:auto}
  .docs-side{position:static;max-height:none;overflow:visible;margin-left:0;padding:0 0 16px;border-bottom:1px solid var(--line)}
  .docs-menu:not([hidden]),.docs-toc-btn:not([hidden]){display:flex;align-items:center;gap:10px;width:100%;margin-top:12px;padding:10px 12px;font:inherit;font-weight:650;font-size:14.5px;color:var(--ink);background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);cursor:pointer;text-align:left}
  .docs-toc-btn:not([hidden]){margin-top:0}
  .docs-menu-at{flex:1;min-width:0;font-weight:500;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .docs-menu:not([hidden])::after,.docs-toc-btn:not([hidden])::after{content:"";flex:0 0 auto;width:7px;height:7px;margin:-4px 4px 0 auto;border-right:1.5px solid var(--mint);border-bottom:1.5px solid var(--mint);transform:rotate(45deg);transition:transform .16s}
  .docs-menu[aria-expanded="true"]::after,.docs-toc-btn[aria-expanded="true"]::after{margin-top:4px;transform:rotate(-135deg)}
  .docs-menu:focus-visible,.docs-toc-btn:focus-visible{outline:2px solid var(--mint);outline-offset:2px}
  .docs-side.is-closed .docs-groups{display:none}
  .docs-toc.has-btn > .docs-gt{display:none}
  .docs-toc.is-closed ol{display:none}
  .docs-toc ol{margin-top:10px}
  .docs-pager{margin-top:44px}
}
@media (prefers-reduced-motion:reduce){.docs-line a,.docs-line a::after,.docs-toc a,.docs-pager a,.docs-menu::after,.docs-toc-btn::after{transition:none}}
