/* The docs' frame (scripts/docs-shell.mjs writes its markup): a bar, a sidebar of every page, the page, and On this
   page. Loaded by the English docs, /use and /guides pages, after styles.css, whose palette it keeps: the web app's
   Paper, one cream, edged by hairlines, nothing lighter than the ground but what you copy. Linear Docs' frame
   (Documentation/DesignChanges/2026-11-25-docs-redesign/). */
.docs-page {
  --d-band: #efebdf;
  --d-hover: #e9e4d6;
  --d-sel: #e1dbca;
  --d-line: #e3ddcf;
  --d-line2: #d8d1c1;
  --d-ink2: #4f534b;
  --d-ink3: #565a51;
  --d-bar: 52px;
  --d-side: 272px;
  --d-toc: 216px;
}

/* ------------------------------------------------------------------ bar */
.docs-bar { border-bottom-color: var(--d-line); background: rgba(245, 242, 232, .94); }
.docs-bar.is-scrolled { border-bottom-color: var(--d-line); }
.docs-bar::after { display: none; }
.docs-bar-inner { height: var(--d-bar); display: flex; align-items: center; gap: 14px; padding: 0 20px; }
.docs-bar .brand span { font-size: 17px; }
.docs-bar-guide {
  padding-left: 14px;
  border-left: 1px solid var(--d-line2);
  font: 500 15px/20px var(--font-system);
  color: var(--d-ink2);
}
.docs-bar-guide[aria-current="page"], .docs-bar-guide:hover { color: var(--ink); }
.docs-search-open {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 260px;
  height: 32px;
  margin-left: 24px;
  padding: 0 8px 0 10px;
  border: 0;
  border-radius: 8px;
  background: var(--d-band);
  color: var(--d-ink3);
  font: 400 13px/1 var(--font-system);
  cursor: pointer;
}
.docs-search-open[hidden] { display: none; }
.docs-search-open:hover { background: var(--d-hover); }
.docs-search-open svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.docs-search-open kbd, .docs-search kbd {
  margin-left: auto;
  padding: 2px 5px;
  border: 1px solid var(--d-line2);
  border-radius: 4px;
  font: 500 11px/1 var(--font-system);
  color: var(--d-ink3);
}
.docs-bar .topnav { gap: 20px; font: 400 14px/20px var(--font-system); }
.docs-bar .topnav a.pill { height: 32px; padding: 0 14px; font: 600 14px/20px var(--font-system); }

/* ---------------------------------------------------------------- frame */
.docs-frame {
  display: grid;
  grid-template-columns: var(--d-side) minmax(0, 1fr) var(--d-toc);
  align-items: start;
}
.docs-side {
  position: sticky;
  top: var(--d-bar);
  height: calc(100vh - var(--d-bar));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px 10px 40px;
  border-right: 1px solid var(--d-line);
  /* More below: the list's foot fades rather than cutting a row in half. */
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 32px), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 32px), transparent);
}
.docs-sheet-side { -webkit-mask-image: none; mask-image: none; }
.docs-side-group + .docs-side-group { margin-top: 14px; }
.docs-side-label {
  margin: 8px 8px 4px;
  font: 500 12px/16px var(--font-system);
  color: var(--d-ink3);
}
.docs-side a {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 30px;
  padding: 5px 8px;
  border-radius: 6px;
  font: 400 13px/18px var(--font-system);
  color: var(--d-ink2);
}
.docs-side a:hover { background: var(--d-hover); color: var(--ink); }
.docs-side a[aria-current="page"] { background: var(--d-sel); color: var(--ink); font-weight: 500; }
.docs-glyph {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--d-ink3);
}
/* One 28 px column for every row's mark, an icon, two or three, or a line glyph, so the names start on one edge. */
.docs-pair { display: inline-flex; flex: none; justify-content: center; width: 28px; }
.docs-pair img { width: 16px; height: 16px; border-radius: 4px; box-shadow: 0 0 0 1.5px var(--canvas); }
.docs-pair img + img { margin-left: -4px; }
.docs-pair img:nth-child(2):not(:last-child), .docs-pair img:nth-child(3) { margin-left: -10px; }
.docs-side .docs-glyph { width: 28px; }
.docs-side a[aria-current="page"] .docs-pair img { box-shadow: 0 0 0 1.5px var(--d-sel); }

/* The page: a column of reading width, the site's footer under it. */
.docs-frame > .wrap.docs, .docs-frame > .wrap.docs.seo-batch2 { max-width: 832px; width: 100%; margin: 0; padding: 0 56px; }
.docs-crumb {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 22px;
  font: 400 13px/18px var(--font-system);
  color: var(--d-ink3);
}
.docs-crumb a { display: inline-flex; align-items: center; min-height: 44px; margin: -6px 0; color: var(--d-ink2); text-decoration: underline; text-decoration-color: var(--d-line2); text-underline-offset: 3px; }
.docs-crumb a:hover { color: var(--ink); text-decoration-color: currentColor; }

/* The masthead: title, lead and facts in one column; the eyebrow is the crumb's job now. */
.docs-frame .masthead,
.docs-frame .masthead-research { display: block; padding: 6px 0 0; }
.docs-frame .masthead .eyebrow { display: none; }
.docs-frame .masthead h1,
.docs-frame .masthead-research h1 {
  margin: 0 0 10px;
  max-width: none;
  font: 600 30px/36px var(--font-system);
  letter-spacing: -0.02em;
}
.docs-frame .page-updated { margin: 0 0 14px; font: 400 13px/18px var(--font-system); color: var(--d-ink3); }
.docs-frame .masthead .lead,
.docs-frame .masthead-research .lead { margin: 0; max-width: none; font: 400 16px/26px var(--font-system); color: var(--d-ink2); }
.docs-frame .requirement { margin-top: 12px; font-size: 13px; line-height: 18px; color: var(--d-ink3); }
.docs-frame .masthead .facts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin-top: 16px;
  padding: 0;
  border: 0;
}
.docs-frame .masthead .facts > div { display: flex; gap: 6px; }
.docs-frame .masthead .facts dt { font: 400 13px/20px var(--font-system); color: var(--d-ink3); }
.docs-frame .masthead .facts dd { font: 500 13px/20px var(--font-system); color: var(--ink); }

/* Sections: a heading, its § quiet before it, and no rule under it. */
.docs-frame .section-study { padding: 40px 0 0; scroll-margin-top: calc(var(--d-bar) + 16px); }
.docs-frame [id] { scroll-margin-top: calc(var(--d-bar) + 16px); }
.docs-frame .section-head {
  justify-content: flex-start;
  gap: 10px;
  padding: 0;
  border: 0;
}
.docs-frame .section-head h2,
.docs-frame main h2 { margin: 0; font: 600 21px/28px var(--font-system); letter-spacing: -0.01em; color: var(--ink); }
/* No §1, §2 …: On this page and the headings' own words do that work (the picked option A had none). */
.docs-frame .section-head .eyebrow { display: none; }
.docs-frame .prose { max-width: none; margin-top: 12px; }
.docs-frame .prose p, .docs-frame .caveats li, .docs-frame .docs-steps, .docs-frame .docs-list {
  font-size: 15.5px;
  line-height: 26px;
  color: var(--d-ink2);
}
.docs-frame .prose p { margin-bottom: 14px; }
.docs-frame .docs-client { max-width: none; margin-top: 28px; padding-top: 0; border-top: 0; }
.docs-frame .docs-client .headline { font: 600 16px/24px var(--font-system); }
.docs-frame .caveats { max-width: none; margin-top: 16px; gap: 10px; }
.docs-frame .caveats li span:first-child { color: var(--d-ink3); }
.docs-frame .rule-grid > div { border-color: var(--d-line); }
.docs-frame .table-card { margin-top: 20px; }

/* Steps: a numbered circle each, and a line from one to the next. */
.docs-frame .docs-steps { list-style: none; margin: 14px 0 16px; padding: 0; counter-reset: docs-step; }
.docs-frame .docs-steps[start="2"] { counter-reset: docs-step 1; }
.docs-frame .docs-steps[start="3"] { counter-reset: docs-step 2; }
.docs-frame .docs-steps[start="4"] { counter-reset: docs-step 3; }
.docs-frame .docs-steps > li { position: relative; padding: 0 0 14px 38px; counter-increment: docs-step; }
.docs-frame .docs-steps > li + li { margin-top: 0; }
.docs-frame .docs-steps > li::before {
  content: counter(docs-step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--ink);
  display: grid;
  place-items: center;
  font: 600 12px/1 var(--font-system);
  color: var(--ink);
}
.docs-frame .docs-steps > li::after {
  content: "";
  position: absolute;
  left: 11.5px;
  top: 30px;
  bottom: 2px;
  width: 1px;
  background: var(--d-line2);
}
.docs-frame .docs-steps > li:last-child::after { display: none; }

/* What you paste or send: on paper, with Copy inside once docs.js is there. */
.docs-frame .prose .docs-paste {
  position: relative;
  padding: 12px 76px 12px 14px;
  border: 1px solid var(--d-line2);
  border-radius: 10px;
  background: var(--paper);
  font: 400 13.5px/22px ui-monospace, SFMono-Regular, Menlo, monospace;
}
.docs-frame .prose .docs-message { font: 400 15px/24px var(--font-system); }
.docs-copy {
  position: absolute;
  top: 8px;
  right: 8px;
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--d-line2);
  font: 500 12px/1 var(--font-system);
  color: var(--d-ink2);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
.docs-copy:hover { background: var(--d-band); color: var(--ink); }
.docs-copy::after { content: ""; position: absolute; inset: -8px; }

/* A pair page's figure: who hands what to whom, on your list, and when each picks it up. */
.docs-fig {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.35fr) auto minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  margin: 24px 0 0;
  padding: 22px 22px 20px;
  border: 1px solid var(--d-line);
  border-radius: 12px;
  background: linear-gradient(var(--canvas), var(--d-band));
}
.docs-fig-agent { text-align: center; }
.docs-fig-agent img { display: block; width: 44px; height: 44px; margin: 0 auto 8px; border-radius: 11px; }
.docs-fig-agent b { display: block; font: 600 14px/20px var(--font-system); color: var(--ink); }
.docs-fig-agent span { display: block; font: 400 12.5px/17px var(--font-system); color: var(--d-ink3); }
.docs-fig-arrow { align-self: center; font: 400 18px/1 var(--font-system); color: var(--d-ink3); }
.docs-fig-list { align-self: center; padding: 10px 12px; border: 1px solid var(--d-line2); border-radius: 10px; background: var(--canvas); }
.docs-fig-list p { margin: 0 0 4px; font: 600 11.5px/16px var(--font-system); color: var(--d-ink3); }
.docs-fig-list ul { list-style: none; margin: 0; padding: 0; }
.docs-fig-list li { display: flex; align-items: center; gap: 8px; min-height: 26px; font: 400 13px/17px var(--font-system); color: var(--ink); }
.docs-fig-list li > span:first-of-type { flex: 1; min-width: 0; }
.docs-fig-list li i { flex: none; width: 13px; height: 13px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--d-ink3); }
.docs-fig-list li img { flex: none; width: 16px; height: 16px; border-radius: 4px; }
.docs-fig-also { grid-column: 1 / -1; display: flex; justify-content: center; align-items: center; gap: 8px; font: 400 12.5px/17px var(--font-system); color: var(--d-ink3); }
.docs-fig-also img { width: 18px; height: 18px; border-radius: 5px; }
.docs-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------------------------------------------------------- On this page */
.docs-toc {
  position: sticky;
  top: var(--d-bar);
  max-height: calc(100vh - var(--d-bar));
  overflow-y: auto;
  padding: 28px 16px 24px 8px;
}
.docs-toc .docs-side-label { margin: 0 0 8px; }
.docs-toc a {
  display: block;
  padding: 5px 0 5px 12px;
  border-left: 1px solid var(--d-line2);
  font: 400 12.5px/17px var(--font-system);
  color: var(--d-ink3);
}
.docs-toc a:hover { color: var(--ink); }
.docs-toc a[aria-current="true"] { color: var(--ink); border-left: 2px solid var(--ink); padding-left: 11px; }

/* The footer sits under the page, in its column, in one grey on every page. */
.docs-frame .site-footer { margin-top: 72px; }
.docs-frame .site-footer .colophon { color: var(--d-ink3); }

/* A box to paste, or a form's fields, that a step introduces stands under the step's words, not under its number. */
.docs-frame .docs-steps + .docs-paste, .docs-frame .docs-steps + .docs-fields { margin-left: 38px; }

/* --------------------------------------------------------------- search */
.docs-search {
  width: min(600px, calc(100vw - 32px));
  max-height: min(520px, calc(100vh - 120px));
  margin: 12vh auto 0;
  padding: 0;
  border: 1px solid var(--d-line2);
  border-radius: 12px;
  background: var(--canvas);
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(28, 31, 28, .22);
  overflow: hidden;
}
.docs-search::backdrop { background: rgba(28, 31, 28, .3); }
.docs-search[open] { display: flex; flex-direction: column; }
.docs-search-field { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--d-line); }
.docs-search-field svg { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--d-ink3); stroke-width: 1.5; }
.docs-search input {
  flex: 1;
  min-width: 0;
  height: 50px;
  border: 0;
  outline: none;
  background: transparent;
  font: 400 16px/1 var(--font-system);
  color: var(--ink);
}
.docs-search input::placeholder { color: var(--d-ink3); }
.docs-search ul { list-style: none; margin: 0; padding: 6px; overflow-y: auto; }
.docs-search li a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--ink);
}
.docs-search li a[aria-selected="true"] { background: var(--d-sel); }
.docs-search li b { font: 500 14px/19px var(--font-system); }
.docs-search li small { display: block; font: 400 12.5px/17px var(--font-system); color: var(--d-ink3); }
.docs-search .docs-search-none { padding: 18px 14px; font: 400 14px/20px var(--font-system); color: var(--d-ink3); }

/* ---------------------------------------------------------------- sizes */
.docs-menu .docs-sheet-side, .docs-menu .docs-sheet-site { display: none; }
@media (max-width: 1239px) {
  .docs-frame { grid-template-columns: var(--d-side) minmax(0, 1fr); }
  .docs-toc { display: none; }
}
@media (max-width: 1099px) {
  .docs-search-open { width: auto; }
  .docs-search-open span, .docs-search-open kbd { display: none; }
  .docs-bar .topnav { gap: 16px; }
}
/* Below the width where the bar's row folds (topbar.js closes the menu above it), the sidebar folds into the menu. */
@media (max-width: 880px) {
  .docs-frame { display: block; }
  .docs-frame > .docs-side { display: none; }
  .docs-frame > .wrap.docs, .docs-frame > .wrap.docs.seo-batch2 { padding: 0 20px; }
  .docs-bar-inner { padding: 0 16px; gap: 12px; }
  .docs-search-open { flex: none; margin-left: auto; width: 44px; height: 44px; justify-content: center; padding: 0; background: none; }
  .docs-search-open svg { width: 18px; height: 18px; color: var(--ink); }
  .docs-bar .topnav { margin-left: 0; }
  .docs-menu .topmenu-sheet {
    max-height: calc(100vh - var(--d-bar));
    overflow-y: auto;
    padding: 4px 12px 24px;
  }
  .docs-menu .docs-sheet-side { display: block; position: static; height: auto; overflow: visible; padding: 0; border: 0; }
  .docs-menu .topmenu-sheet .docs-sheet-side a {
    height: auto;
    min-height: 44px;
    font: 400 16px/22px var(--font-system);
    color: var(--d-ink2);
  }
  .docs-menu .topmenu-sheet .docs-sheet-side a[aria-current="page"] { color: var(--ink); font-weight: 500; }
  .docs-menu .topmenu-sheet .docs-sheet-side a + a { border-top: 0; }
  .docs-menu .docs-sheet-site { display: flex; flex-wrap: wrap; gap: 0 20px; align-items: center; margin-top: 14px; padding: 10px 8px 0; border-top: 1px solid var(--d-line); }
  .docs-menu .topmenu-sheet .docs-sheet-site a { height: 44px; font: 400 15px/20px var(--font-system); color: var(--d-ink2); border: 0; }
  .docs-frame .masthead h1, .docs-frame .masthead-research h1 { font-size: 26px; line-height: 32px; }
  .docs-fig { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 12px; padding: 18px 14px; }
  .docs-fig-arrow { display: none; }
  .docs-fig-agent { align-self: start; }
  .docs-fig-list { grid-column: 1 / -1; grid-row: 2; }
}
@media print {
  .docs-bar, .docs-side, .docs-toc { display: none; }
  .docs-frame { display: block; }
}

/* Every section of a page stands the same distance from the one before it, the first under the masthead too; and a list
   of links is one rhythm, whatever each link's own padding was. */
.docs-frame main > section { padding-top: 40px; }
.guides-index .docs-frame main > section { padding-top: 0; }
.docs-frame .docs-list li + li { margin-top: 2px; }
.docs-frame .docs-list a, .docs-frame .docs-list .use-tap { display: inline-block; padding: 4px 0; }

/* Some pages carry their own rules for the site's old bar (a wrapping row for enlarged text); the docs' bar is one row at
   every width, and its search, pill and menu keep their sizes. */
body.docs-page .docs-bar .topnav { flex-wrap: nowrap; max-width: none; justify-content: flex-start; }
body.docs-page .docs-bar .topnav a.pill { height: 32px; min-height: 0; padding-block: 0; white-space: nowrap; }
body.docs-page .docs-bar .brand { min-height: 0; }
