/* ===========================================================================
   Documentation (operator's reference, 18 November 2026): a docs bar with
   search, grouped navigation for the three products on the left, the article
   in the middle, "On this page" and related links on the right. The layout
   is written around each page by tools/docs-shell.mjs; the page's own text
   is untouched. Tokens, type and tags are the site's (style.css).
   =========================================================================== */

.page--docs {
  --doc-tone: var(--c-green);
  --doc-tone-text: var(--c-green-800);
  --doc-tint: var(--c-green-50);
  --doc-tint-2: var(--c-green-100);
}

.page--docs:has(.docs--rr) {
  --doc-tone: var(--c-cobalt);
  --doc-tone-text: var(--c-cobalt-800);
  --doc-tint: var(--c-cobalt-50);
  --doc-tint-2: var(--c-cobalt-100);
}

.page--docs:has(.docs--md) {
  --doc-tone: var(--c-jade-600);
  --doc-tone-text: var(--c-jade-800);
  --doc-tint: var(--c-jade-50);
  --doc-tint-2: var(--c-jade-100);
}

/* ------------------------------------------------------------- the docs bar */

.docs-bar {
  position: sticky;
  z-index: 20;
  top: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(1.4) blur(10px);
}

.docs-bar__in {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: calc(var(--frame) + 160px);
  height: 56px;
  margin: 0 auto;
  padding: 0 var(--pad);
}

.docs-bar__home {
  flex: none;
  width: 236px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.docs-bar__menu {
  display: none;
}

.docs-search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(480px, 100%);
  height: 38px;
  padding: 0 8px 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  background: #fff;
  color: var(--ink-2);
  font: inherit;
  font-size: 14.5px;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--t-1) var(--ease);
}

.docs-search:hover {
  border-color: rgba(16, 44, 54, 0.28);
}

.docs-search span {
  flex: 1;
}

.docs-search kbd,
.docs-dialog kbd {
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--c-cloud);
  color: var(--ink-2);
  font: 500 12px/1.6 var(--font);
}

.docs-bar .ico,
.docs-search .ico {
  width: 17px;
  height: 17px;
}

/* ---------------------------------------------------------------- the grid */

.docs {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr) 200px;
  column-gap: clamp(32px, 3.4vw, 56px);
  align-items: start;
  max-width: calc(var(--frame) + 160px);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ------------------------------------------------------------ left: the nav */

.docs-nav {
  position: sticky;
  top: 57px;
  max-height: calc(100vh - 57px);
  overflow-y: auto;
  padding: 28px 16px 48px 0;
  border-right: 1px solid var(--line);
  font-size: 14.5px;
  scrollbar-width: thin;
}

.docs-switch {
  display: grid;
  gap: 2px;
  margin: 0 0 22px;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--line);
}

.docs-switch__it {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: var(--r-s);
  color: var(--ink-2);
  font-weight: 500;
  text-decoration: none;
}

.docs-switch__it .app-icon {
  width: 24px;
  height: 24px;
  margin: 0;
  flex: none;
  border-radius: 5px;
}

.docs-switch__it:hover {
  background: var(--c-cloud);
  color: var(--ink);
}

.docs-switch__it[aria-current] {
  background: var(--doc-tint);
  color: var(--ink);
  font-weight: 600;
}

.docs-nav__group {
  margin: 0 0 20px;
}

.docs-nav__title {
  margin: 0 0 6px;
  padding: 0 8px;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
}

.docs-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.docs-nav li,
.docs-results li {
  margin: 0;
  padding: 0;
}

.docs-nav li::before {
  content: none;
}

.docs-nav ul a {
  display: block;
  padding: 5px 8px;
  border-radius: var(--r-s);
  color: var(--ink-2);
  line-height: 1.35;
  text-decoration: none;
}

.docs-nav ul a:hover {
  background: var(--c-cloud);
  color: var(--ink);
}

.docs-nav ul a[aria-current] {
  background: var(--doc-tint);
  box-shadow: inset 2px 0 0 var(--doc-tone);
  color: var(--doc-tone-text);
  font-weight: 600;
}

/* --------------------------------------------------------- middle: article */

.docs-main {
  min-width: 0;
  padding: 32px 0 clamp(64px, 7vw, 104px);
}

.docs-main > .prose,
.docs-main > .label,
.docs-main > h2,
.docs-main > p {
  max-width: 840px;
}

.page--docs .crumbs {
  margin-bottom: 18px;
}

.page--docs h1 {
  margin: 0;
  font-size: clamp(32px, 3.2vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.docs-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 14px 0 0;
  color: var(--ink-2);
  font-size: 14px;
}

.docs-meta__it {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.docs-meta__it + .docs-meta__it::before {
  content: "";
  width: 4px;
  height: 4px;
  margin-right: 13px;
  border-radius: 1px;
  background: var(--doc-tone);
}

.page--docs .lede {
  margin-top: 18px;
}

/* The opening block (title, meta, lede) and the text after it. */
.docs-main > .prose:first-child {
  margin-bottom: 28px;
}

/* The product row under the title duplicates the switcher on the left. */
.docs-main .record__meta {
  display: none;
}

/* Quick cards on a product's first page. */
.docs-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  max-width: 840px;
  margin: 28px 0 8px;
}

.docs-card {
  position: relative;
  display: block;
  padding: 16px 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  transition: border-color var(--t-1) var(--ease), box-shadow var(--t-1) var(--ease);
}

.docs-card:hover {
  border-color: var(--doc-tone);
  box-shadow: 0 10px 24px -16px rgba(16, 44, 54, 0.35);
}

.docs-card .ico {
  width: 28px;
  height: 28px;
  padding: 5px;
  border-radius: var(--r-s);
  background: var(--doc-tint);
  color: var(--doc-tone-text);
}

.docs-card::after {
  content: "\2192";
  position: absolute;
  top: 16px;
  right: 16px;
  color: var(--ink-2);
  transition: translate var(--t-1) var(--ease), color var(--t-1) var(--ease);
}

.docs-card:hover::after {
  color: var(--ink);
  translate: 3px 0;
}

.docs-card b {
  display: block;
  margin-top: 12px;
  font-size: 15.5px;
  font-weight: 600;
}

.docs-card span {
  display: block;
  margin-top: 4px;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.4;
}

/* Sections. */
.page--docs .label {
  margin-top: clamp(48px, 5vw, 72px);
  padding-top: 24px;
  font-size: clamp(24px, 2.2vw, 30px);
  scroll-margin-top: 76px;
}

.page--docs h3[id],
.page--docs h4[id] {
  scroll-margin-top: 76px;
}

/* Steps: a numbered list at the top of a section reads as steps. */
.page--docs .prose > ol {
  counter-reset: step;
  margin: 20px 0 24px;
  padding: 0;
  list-style: none;
}

.page--docs .prose > ol > li {
  position: relative;
  margin: 0;
  padding: 0 0 22px 48px;
  counter-increment: step;
}

.page--docs .prose > ol > li::before {
  content: counter(step);
  position: absolute;
  top: -1px;
  left: 0;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--doc-tint);
  box-shadow: inset 0 0 0 1px var(--doc-tint-2);
  color: var(--doc-tone-text);
  font-size: 14.5px;
  font-weight: 600;
}

.page--docs .prose > ol > li::after {
  content: "";
  position: absolute;
  top: 36px;
  bottom: 6px;
  left: 15px;
  width: 1px;
  background: var(--line);
}

.page--docs .prose > ol > li:last-child::after {
  content: none;
}

/* Screenshots: click to enlarge (docs.js). */
.page--docs .shot img {
  cursor: zoom-in;
}

/* Code: a copy button on every block (docs.js). */
.page--docs pre {
  position: relative;
}

.docs-copy {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  background: #fff;
  color: var(--ink-2);
  font: 500 13px/1.5 var(--font);
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--t-1) var(--ease);
}

.page--docs pre:hover .docs-copy,
.docs-copy:focus-visible,
.docs-copy.is-done {
  opacity: 1;
}

.docs-copy.is-done {
  border-color: var(--doc-tone);
  color: var(--doc-tone-text);
}

/* Previous and next. */
.docs-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  max-width: 840px;
  margin: 64px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.docs-pager a {
  display: block;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  color: var(--ink);
  text-decoration: none;
  transition: border-color var(--t-1) var(--ease);
}

.docs-pager a:hover {
  border-color: var(--doc-tone);
}

.docs-pager span {
  display: block;
  color: var(--ink-2);
  font-size: 13.5px;
}

.docs-pager b {
  display: block;
  margin-top: 2px;
  font-weight: 600;
}

.docs-pager__next {
  text-align: right;
}

/* ------------------------------------------------- right: on this page */

.docs-side {
  position: sticky;
  top: 57px;
  max-height: calc(100vh - 57px);
  overflow-y: auto;
  padding: 32px 0 48px;
  font-size: 14px;
  scrollbar-width: thin;
}

.docs-side .docs-toc {
  position: static;
  max-height: none;
  overflow: visible;
  padding: 0;
}

.docs-related {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.docs-related ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.docs-related li {
  margin: 0;
  padding: 0;
}

.docs-related li::before {
  content: none;
}

.docs-related a {
  display: block;
  padding: 5px 0;
  color: var(--ink-2);
  text-decoration: none;
}

.docs-related a:hover {
  color: var(--ink);
}

.docs-toc a[aria-current="true"] {
  border-left-color: var(--doc-tone);
  background: var(--doc-tint);
  color: var(--doc-tone-text);
}

.docs-toc a[aria-current="true"]::before {
  background: var(--doc-tone);
}

/* Contents for phones, where the right column is not shown. */
.docs-ontoc {
  display: none;
  max-width: 840px;
  margin: 20px 0 0;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  font-size: 15px;
}

.docs-ontoc summary {
  font-weight: 600;
  cursor: pointer;
}

.docs-ontoc ol {
  margin: 10px 0 2px;
  padding: 0 0 0 20px;
}

.docs-ontoc li {
  margin: 4px 0;
}

@media (max-width: 1180px) {
  .docs-ontoc {
    display: block;
  }
}

/* --------------------------------------------------------- the dialogs */

.docs-dialog {
  width: min(640px, calc(100vw - 32px));
  max-height: min(560px, calc(100vh - 96px));
  margin: 72px auto auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow);
}

.docs-dialog::backdrop {
  background: rgba(11, 32, 41, 0.42);
}

.docs-dialog__field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.docs-dialog__field .ico {
  width: 18px;
  height: 18px;
  color: var(--ink-2);
}

.docs-dialog input {
  flex: 1;
  min-width: 0;
  height: 36px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}

.docs-results {
  max-height: 440px;
  margin: 0;
  padding: 8px;
  overflow-y: auto;
  list-style: none;
}

.docs-results li {
  margin: 0;
}

.docs-results li::before {
  content: none;
}

.docs-results a {
  display: block;
  padding: 10px 12px;
  border-radius: var(--r-s);
  color: var(--ink);
  text-decoration: none;
}

.docs-results a[aria-selected="true"],
.docs-results a:hover {
  background: var(--c-cloud);
}

.docs-results b {
  display: block;
  font-weight: 600;
}

.docs-results small {
  display: block;
  margin-top: 2px;
  color: var(--ink-2);
  font-size: 13px;
}

.docs-results mark {
  border-radius: 2px;
  background: var(--c-green-100);
  color: inherit;
}

.docs-results__empty {
  padding: 18px 12px;
  color: var(--ink-2);
}

.docs-zoom {
  width: auto;
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 48px);
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-out;
}

.docs-zoom::backdrop {
  background: rgba(11, 32, 41, 0.78);
}

.docs-zoom img {
  display: block;
  max-width: calc(100vw - 48px);
  max-height: calc(100vh - 48px);
  border-radius: var(--r-m);
  background: #fff;
}

/* ------------------------------------------------------------- smaller */

/* The page's own inline contents list is for phones only: wider screens have the menus. */
@media (min-width: 900px) {
  .page--docs .toc-inline {
    display: none;
  }
}

@media (max-width: 1180px) {
  .docs {
    grid-template-columns: 236px minmax(0, 1fr);
  }
  .docs-side {
    display: none;
  }
}

@media (max-width: 899px) {
  .docs-bar__in {
    gap: 12px;
  }
  .docs-bar__home {
    display: none;
  }
  .docs-bar__menu {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: var(--r-s);
    background: #fff;
    color: var(--ink);
    font: 500 14.5px/1 var(--font);
    cursor: pointer;
  }
  .docs-search kbd {
    display: none;
  }
  .docs {
    display: block;
  }
  /* The navigation becomes a panel under the bar, opened by Menu. */
  .docs-nav {
    position: fixed;
    z-index: 19;
    top: 57px;
    bottom: 0;
    left: 0;
    display: none;
    width: min(320px, 86vw);
    max-height: none;
    padding: 20px 16px 40px;
    border-right: 1px solid var(--line);
    background: #fff;
    box-shadow: var(--shadow);
  }
  .docs-nav.is-open {
    display: block;
  }
  .docs-main {
    padding-top: 24px;
  }
  .docs-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .docs-meta__it + .docs-meta__it::before {
    content: none;
  }
  .docs-meta {
    gap: 4px 16px;
  }
  .docs-cards {
    grid-template-columns: minmax(0, 1fr);
  }
  .docs-pager {
    grid-template-columns: minmax(0, 1fr);
  }
  .page--docs .prose > ol > li {
    padding-left: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .docs-card::after {
    transition: none;
  }
}

@media print {
  .docs-bar,
  .docs-nav,
  .docs-side,
  .docs-pager,
  .docs-cards,
  .docs-copy {
    display: none !important;
  }
  .docs {
    display: block;
  }
}

/* ===========================================================================
   Round 2 (the operator's second reference, 19 Nov): a product dropdown,
   folding groups, a version pill, a hero on the overview, a tabbed example,
   cards for "What do you want to do?", and code on deep ink with line numbers.
   =========================================================================== */

/* ---------------------------------------------------- the product dropdown */
.docs-pick {
  position: relative;
  margin: 0 0 22px;
}

.docs-pick summary span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.docs-pick summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 44, 54, 0.05);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.docs-pick summary::-webkit-details-marker,
.docs-nav__group > summary::-webkit-details-marker {
  display: none;
}

.docs-pick summary::after,
.docs-nav__group > summary::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: auto;
  border-right: 1.5px solid var(--ink-2);
  border-bottom: 1.5px solid var(--ink-2);
  rotate: 45deg;
  translate: 0 -2px;
  transition: rotate var(--t-1) var(--ease), translate var(--t-1) var(--ease);
}

.docs-pick[open] summary::after,
.docs-nav__group[open] > summary::after {
  rotate: 225deg;
  translate: 0 2px;
}

.docs-pick summary .app-icon {
  width: 26px;
  height: 26px;
  margin: 0;
  flex: none;
  border-radius: 6px;
}

.docs-pick__list {
  position: absolute;
  z-index: 5;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  display: grid;
  gap: 2px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  background: #fff;
  box-shadow: var(--shadow);
}

.docs-pick__list .docs-switch__it {
  align-items: flex-start;
}

.docs-pick__list .docs-switch__it b {
  display: block;
  color: var(--ink);
  font-weight: 600;
}

.docs-pick__list .docs-switch__it small {
  display: block;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 400;
}

/* ----------------------------------------------------------- folding groups */
.docs-nav__group {
  margin: 0 0 6px;
}

.docs-nav__group > summary {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 7px 8px;
  border-radius: var(--r-s);
  list-style: none;
  cursor: pointer;
}

.docs-nav__group > summary:hover {
  background: var(--c-cloud);
}

.docs-nav__group[open] > ul {
  margin: 2px 0 10px;
}

.docs-nav__group ul a {
  padding-left: 14px;
}

/* --------------------------------------------------------- the version pill */
.docs-ver {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: var(--r-tag);
  background: var(--doc-tint-2);
  color: var(--doc-tone-text);
  font-size: 13.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.docs-ver + .docs-meta__it::before {
  content: none !important;
}

/* ------------------------------------------------------------ the hero */
.docs-main > .docs-hero {
  position: relative;
  max-width: none;
  margin: -32px 0 8px;
  padding: 32px 32px 30px 0;
  isolation: isolate;
}

.docs-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  right: 0;
  width: min(560px, 70%);
  height: 100%;
  border-radius: 0 0 0 var(--r-l);
  background:
    radial-gradient(120% 90% at 100% 0%, var(--doc-tint-2) 0%, transparent 62%),
    radial-gradient(80% 70% at 85% 10%, var(--doc-tint) 0%, transparent 70%);
  pointer-events: none;
}

.docs-hero h1 {
  max-width: 18em;
  font-size: clamp(34px, 3.6vw, 52px);
  letter-spacing: -0.035em;
}

.docs-hero .lede {
  max-width: 34em;
  margin-top: 14px;
}

.docs-hero .docs-meta {
  margin-top: 16px;
}

/* ------------------------------------------------- the tabbed example */
.docs-ex {
  max-width: 840px;
  margin: 8px 0 22px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  background: linear-gradient(180deg, var(--doc-tint) 0%, #fff 70%);
  box-shadow: 0 1px 2px rgba(16, 44, 54, 0.04), 0 24px 48px -32px rgba(16, 44, 54, 0.35);
}

.docs-ex__tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 12px;
  border-bottom: 1px solid var(--line);
}

.docs-ex__tabs button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: -1px;
  padding: 9px 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: var(--r-s) var(--r-s) 0 0;
  background: transparent;
  color: var(--ink-2);
  font: 600 14.5px/1.2 var(--font);
  cursor: pointer;
}

.docs-ex__tabs button:hover {
  color: var(--ink);
}

.docs-ex__tabs button[aria-selected="true"] {
  border-bottom-color: var(--doc-tone);
  background: #fff;
  color: var(--ink);
}

.docs-ex__tabs .ico {
  width: 16px;
  height: 16px;
  color: var(--doc-tone);
}

.docs-ex__panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 12px;
}

.docs-ex__panel[hidden] {
  display: none;
}

.docs-ex__panel pre {
  margin: 0;
}

.docs-ex .docs-ex__out {
  display: grid;
  place-items: center;
  margin: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  background: #fff;
}

.docs-ex .docs-ex__out img {
  width: auto;
  max-width: 100%;
  max-height: 260px;
  border-radius: 0;
  box-shadow: none;
}

.docs-ex .docs-ex__out figcaption {
  margin-top: 14px;
  text-align: center;
}

/* ------------------------------------------- "What do you want to do?" */
.docs-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-width: 840px;
}

.docs-tile {
  padding: 18px 20px 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  background: #fff;
}

.page--docs .docs-tile h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 10px;
  font-size: 18px;
}

.docs-tile h3 .ico {
  width: 36px;
  height: 36px;
  padding: 8px;
  border-radius: var(--r-m);
  background: var(--doc-tint);
  color: var(--doc-tone-text);
}

.page--docs .docs-tile ul {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
}

.page--docs .docs-tile li {
  margin: 0;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  line-height: 1.4;
}

.page--docs .docs-tile li::before {
  content: none;
}

.page--docs .docs-tile li a {
  font-weight: 500;
}

/* The cards row takes three or four cards. */
.docs-cards {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

/* -------------------------------------------------- code on deep ink */
.page--docs .docs-main pre {
  padding: 16px 18px 16px 0;
  border-radius: var(--r-m);
  background: var(--c-ink-ground);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  color: #e4efed;
  font-size: 14px;
  line-height: 1.7;
}

.page--docs .docs-main pre code {
  display: block;
}

.page--docs .docs-main pre .ln {
  position: relative;
  display: block;
  padding-left: 52px;
}

.page--docs .docs-main pre .ln::before {
  content: attr(data-n);
  position: absolute;
  left: 0;
  width: 36px;
  color: #6b8087;
  text-align: right;
  user-select: none;
}

.page--docs .docs-main pre:not(:has(.ln)) {
  padding-left: 22px;
}

.tk-k {
  color: #5fe3cc;
}

.tk-o {
  color: #9fb4bb;
}

.tk-s {
  color: #ffd38f;
}

.tk-c {
  color: #8da3a9;
  font-style: italic;
}

.page--docs .docs-copy {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #e4efed;
}

.page--docs .docs-copy.is-done {
  border-color: var(--c-jade);
  color: var(--c-jade);
}

@media (max-width: 899px) {
  .docs-main > .docs-hero {
    margin-top: -24px;
    padding: 24px 0 20px;
  }
  .docs-hero::before {
    width: 100%;
  }
  .docs-ex__panel,
  .docs-tiles {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ===========================================================================
   Round 3 (operator's notes, 19 Nov): no right column where a page has few
   headings, a short product label, task rows instead of link lists, and an
   example with labelled bars, Copy and Expand, at one height for both tabs.
   =========================================================================== */

/* ---------------------------------------------- pages without a right column */
.docs--wide {
  grid-template-columns: 236px minmax(0, 1fr);
}

.docs--wide .docs-ex,
.docs--wide .docs-cards,
.docs--wide .docs-tiles,
.docs--wide .docs-pager {
  max-width: 1040px;
}

/* ----------------------------------------------------- the task rows */
.page--docs .docs-tile ul.docs-rows {
  margin: 0 -10px;
}

.page--docs .docs-tile .docs-rows li {
  padding: 0;
  border-top: 0;
}

.page--docs .docs-rows a {
  position: relative;
  display: block;
  padding: 10px 36px 10px 10px;
  border-radius: var(--r-s);
  color: var(--ink);
  text-decoration: none;
  transition: background var(--t-1) var(--ease);
}

.page--docs .docs-rows a:hover {
  background: var(--doc-tint);
}

.page--docs .docs-rows a::after {
  content: "\2192";
  position: absolute;
  top: 50%;
  right: 12px;
  color: var(--ink-2);
  translate: 0 -50%;
  transition: translate var(--t-1) var(--ease), color var(--t-1) var(--ease);
}

.page--docs .docs-rows a:hover::after {
  color: var(--doc-tone-text);
  translate: 3px -50%;
}

.page--docs .docs-rows b {
  display: block;
  font-size: 15.5px;
  font-weight: 600;
}

.page--docs .docs-rows span {
  display: block;
  margin-top: 2px;
  color: var(--ink-2);
  font-size: 14px;
}

.docs-tile__more {
  margin: 8px 0 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.page--docs .docs-tile {
  padding-bottom: 4px;
}

/* ------------------------------------------- the example, one height */
.docs-ex {
  display: grid;
}

.docs-ex__tabs {
  grid-area: 1 / 1;
}

/* Every panel sits in the same cell, so the box keeps the height of the
   taller example and switching tabs moves nothing. */
.docs-ex__panel {
  grid-area: 2 / 1;
}

.docs-ex__panel[hidden] {
  display: grid;
  visibility: hidden;
}

.docs-ex__code {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--r-m);
  background: var(--c-ink-ground);
}

.docs-ex__code pre {
  flex: 1;
  border-radius: 0;
  box-shadow: none;
}

.docs-ex__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  padding: 6px 8px 6px 14px;
  font-size: 13px;
  font-weight: 600;
}

.docs-ex__code .docs-ex__bar {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #e4efed;
}

.docs-ex__bar small {
  color: #9fb4bb;
  font-size: 12.5px;
  font-weight: 400;
}

.page--docs .docs-ex__bar .docs-copy {
  position: static;
  opacity: 1;
}

.docs-ex .docs-ex__out {
  display: flex;
  flex-direction: column;
  padding: 0 0 16px;
  overflow: hidden;
}

.docs-ex__out .docs-ex__bar {
  align-self: stretch;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
}

.docs-ex__out img {
  margin: auto;
  padding: 18px 18px 0;
}

.docs-expand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  background: #fff;
  color: var(--ink);
  font: 500 13px/1.5 var(--font);
  cursor: pointer;
}

.docs-expand::before {
  content: "\2922";
  font-size: 14px;
  line-height: 1;
}

.docs-expand:hover {
  border-color: var(--doc-tone);
}

/* Code copy is always visible on the docs pages: an obvious control. */
.page--docs .docs-copy {
  opacity: 0.86;
}

.page--docs pre:hover .docs-copy,
.page--docs .docs-copy:focus-visible {
  opacity: 1;
}

@media (max-width: 899px) {
  .docs--wide {
    display: block;
  }
}

/* The example's pictures are drawn on white, without the screenshot ground. */
.docs-ex .docs-ex__out img {
  background: transparent;
}

/* On the overview, everything below the hero runs to the same right edge. */
.docs--wide:has(.docs-hero) .docs-main > .prose,
.docs--wide:has(.docs-hero) .docs-main > .label {
  max-width: 1040px;
}

.docs--wide:has(.docs-hero) .docs-main > .prose:not(.docs-hero) > :not(.docs-tiles) {
  max-width: 760px;
}

.docs-ex .docs-ex__out figcaption {
  padding: 0 16px;
}

/* On a phone the halves stack, so each tab keeps its own height. */
@media (max-width: 899px) {
  .docs-ex__panel[hidden] {
    display: none;
  }
}

/* ===========================================================================
   Round 4: the Fable review of 19 Nov (P1 and P2).
   =========================================================================== */

/* P1-3: text at about 75 characters a line; tables, code and pictures wider. */
.docs-main > .prose > :is(p, ul, ol, dl, blockquote, h2, h3, h4),
.docs-main > .label,
.docs-main .docs-ontoc {
  max-width: 680px;
}

.docs-main > .prose > :is(.docs-code, .table-scroll, .shot, figure, .docs-tiles, .docs-cards) {
  max-width: 840px;
}

.docs--wide:has(.docs-hero) .docs-main > .prose > .docs-tiles {
  max-width: 1040px;
}

/* P1-5: every code block has a bar; Copy lives in it, never on the code. */
.docs-code {
  max-width: 840px;
  margin: 0 0 20px;
  overflow: hidden;
  border-radius: var(--r-m);
  background: var(--c-ink-ground);
}

.docs-code__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  padding: 4px 8px 4px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #9fb4bb;
  font-size: 13.5px;
  font-weight: 500;
}

.page--docs .docs-code pre {
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}

.page--docs .docs-code__bar .docs-copy {
  position: static;
  opacity: 1;
}

/* P2-1: a heading reached by an address clears the sticky bar and shows its breadcrumb. */
.page--docs h1[id] {
  scroll-margin-top: 150px;
}

/* P2-2: screenshots at their own size, never stretched. */
.page--docs .docs-main .shot img {
  width: auto;
  max-width: 100%;
  height: auto;
}

/* P2-11: the pager as wide as the text it follows. */
.docs-pager,
.docs--wide .docs-pager {
  max-width: 840px;
}

.docs--wide:has(.docs-hero) .docs-pager {
  max-width: 1040px;
}

/* P2-10: each tab of the example takes its own height. */
.docs-ex__panel[hidden] {
  display: none;
}

/* P2-4: a Close button in both dialogs. */
.docs-dialog__close {
  flex: none;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  background: #fff;
  color: var(--ink);
  font: 500 13.5px/1.4 var(--font);
  cursor: pointer;
}

.docs-zoom__close {
  position: fixed;
  top: 16px;
  right: 16px;
}

.docs-live {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* P2-3: the open phone menu dims the page behind it. */
.docs-scrim {
  position: fixed;
  z-index: 18;
  inset: 0;
  background: rgba(11, 32, 41, 0.42);
}

.docs-scrim[hidden] {
  display: none;
}

/* P2-5: the site header and footer share the docs frame on docs pages: one left edge. */
.page--docs .frame.top__in,
.page--docs .frame.foot__in {
  max-width: calc(var(--frame) + 160px);
}

.page--docs .top .guides,
.page--docs .foot .guides {
  display: none;
}

/* Sub-sections listed with their sections in "On this page" are indented. */
.docs-toc a[href^="#"] {
  padding-left: 14px;
}

@media (max-width: 899px) {
  /* P2-12: on a phone the breadcrumb is only the way up */
  .page--docs .crumbs li:not(:nth-last-child(2)) {
    display: none;
  }
  .page--docs .crumbs li:nth-last-child(2)::before {
    content: "\2190\00a0";
    margin: 0;
  }
  .docs-dialog .docs-dialog__field kbd {
    display: none;
  }
}

/* Some captures carry an inline max-width; on a narrow screen the column still wins. */
.page--docs .docs-main .shot img {
  max-width: 100% !important;
}

/* A small product: the menu does not fold (Fable, section 3). */
.docs-nav__group--flat .docs-nav__title {
  padding: 7px 8px 2px;
}

.docs-nav__group--flat ul {
  margin: 0 0 10px;
}
