/* The manual at /help/: a sidebar of pages, the page itself and its contents, under the site header. */

.help-shell {
  display: grid;
  gap: var(--s3);
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding: var(--s3) var(--gutter) var(--section);
}

.help-main {
  min-width: 0;
}

@media (min-width: 960px) {
  .help-shell {
    grid-template-columns: 224px minmax(0, 1fr);
    gap: var(--s6);
    padding-top: var(--s6);
  }

  .help-side {
    position: sticky;
    top: calc(var(--header-h) + var(--s3));
    align-self: start;
    max-height: calc(100vh - var(--header-h) - var(--s5));
    margin: -4px;
    padding: 4px 4px var(--s3);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
  }
}

/* Search */

.help-search {
  position: relative;
  display: none;
  margin: 0 0 var(--s2);
}

.js .help-search {
  display: block;
}

@media (min-width: 960px) {
  .help-search {
    margin-bottom: var(--s3);
  }
}

.help-search input {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 0 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: var(--body);
  line-height: 1.25;
}

@media (min-width: 960px) {
  .help-search input {
    min-height: 36px;
    font-size: var(--caption);
  }
}

.help-search input::placeholder {
  color: var(--ink-2);
  opacity: 1;
}

.help-search input:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 0;
  border-color: transparent;
}

.help-search-icon {
  position: absolute;
  top: 14px;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--ink-2);
  pointer-events: none;
}

.help-search-key {
  position: absolute;
  top: 10px;
  right: 10px;
  pointer-events: none;
  color: var(--ink-2);
  font-size: var(--small);
}

@media (min-width: 960px) {
  .help-search-icon {
    top: 10px;
  }

  .help-search-key {
    top: 7px;
  }
}

.help-search input:not(:placeholder-shown) ~ .help-search-key {
  display: none;
}

@media (hover: none), (pointer: coarse) {
  .help-search-key {
    display: none;
  }
}

.help-results {
  margin: var(--s1) 0 0;
  padding: 4px;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--bg);
  box-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.25);
}

.help-results[hidden] {
  display: none;
}

.help-results li {
  margin: 0;
}

.help-results a {
  display: block;
  padding: 8px 10px;
  border-radius: 4px;
  color: var(--ink);
}

.help-results a:hover {
  background: var(--bg-2);
  color: var(--ink);
  text-decoration: none;
}

.help-results [aria-selected="true"] a {
  background: var(--accent);
  color: var(--on-accent);
}

.help-result-title {
  display: block;
  font-size: var(--caption);
  font-weight: 600;
  line-height: 1.3;
}

.help-result-where,
.help-result-snippet {
  display: block;
  margin-top: 2px;
  font-size: var(--small);
  line-height: 1.4;
}

.help-result-where {
  color: var(--ink-2);
}

.help-result-snippet {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  color: var(--ink-2);
}

.help-results [aria-selected="true"] .help-result-where,
.help-results [aria-selected="true"] .help-result-snippet {
  color: inherit;
}

.help-results mark {
  padding: 0 1px;
  border-radius: 2px;
  background: var(--fill);
  color: inherit;
}

.help-results [aria-selected="true"] mark {
  background: rgba(255, 255, 255, 0.24);
}

.help-results-empty {
  padding: 8px 10px;
  color: var(--ink-2);
  font-size: var(--caption);
}

/* Sidebar */

.help-nav--wide {
  display: none;
}

@media (min-width: 960px) {
  .help-nav--wide {
    display: block;
  }

  .help-nav--narrow {
    display: none;
  }
}

.help-group + .help-group {
  margin-top: var(--s3);
}

.help-group-title {
  margin: 0 0 4px;
  padding-inline: 10px;
  color: var(--ink-2);
  font-size: var(--small);
  font-weight: 600;
}

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

.help-nav li + li {
  margin-top: 1px;
}

.help-nav a {
  display: flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 10px;
  border-radius: var(--radius-s);
  color: var(--ink);
  font-size: var(--caption);
  line-height: 1.3;
}

.help-nav a:hover {
  background: var(--bg-2);
  text-decoration: none;
}

.help-nav a:focus-visible {
  outline-offset: 0;
}

.help-nav a[aria-current="page"] {
  background: var(--fill);
  font-weight: 600;
}

@media (pointer: coarse) {
  .help-nav a {
    min-height: 44px;
  }
}

.help-nav--narrow {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.help-nav--narrow summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  color: var(--ink);
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.help-nav--narrow summary::-webkit-details-marker {
  display: none;
}

.help-nav--narrow summary::after,
.help-toc--narrow summary::after {
  content: "";
  width: 7px;
  height: 7px;
  margin: -4px 4px 0 0;
  border: solid var(--ink-2);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

.help-nav--narrow[open] summary::after,
.help-toc--narrow[open] summary::after {
  margin-top: 4px;
  transform: rotate(-135deg);
}

.help-nav--narrow nav {
  padding: 0 0 var(--s2);
}

.help-nav--narrow a {
  min-height: 44px;
  margin-inline: -10px;
}

/* Page head */

.help-crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--ink-2);
  font-size: var(--caption);
}

.help-crumbs li {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
}

.help-crumbs li + li::before {
  content: "";
  width: 5px;
  height: 5px;
  margin: 0 10px 0 6px;
  border: solid currentColor;
  border-width: 1.5px 1.5px 0 0;
  transform: rotate(45deg);
  opacity: 0.6;
}

.help-crumbs a {
  color: var(--ink-2);
}

.help-crumbs a:hover {
  color: var(--ink);
}

@media (max-width: 479px) {
  .help-crumbs li:first-child:not(:last-child) {
    display: none;
  }

  .help-crumbs li:nth-child(2)::before {
    display: none;
  }
}

.help-main h1 {
  margin: var(--s2) 0 0;
  font-size: var(--title);
  line-height: 1.08;
  letter-spacing: -0.022em;
}

.help-updated {
  margin: var(--s2) 0 0;
  color: var(--ink-2);
  font-size: var(--caption);
}

.help-content {
  margin-top: var(--s5);
}

/* Contents of the page: a disclosure above the text, or a column beside it on wide screens */

.help-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.help-toc li {
  break-inside: avoid;
}

.help-toc a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 0;
  color: var(--ink-2);
  font-size: var(--caption);
  line-height: 1.3;
}

.help-toc a:hover {
  color: var(--ink);
  text-decoration: none;
}

.help-toc a[aria-current="true"] {
  color: var(--ink);
  font-weight: 600;
}

.help-toc--wide {
  display: none;
}

.help-toc--narrow {
  margin: 0 0 var(--s5);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.help-toc--narrow summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  color: var(--ink);
  font-size: var(--caption);
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.help-toc--narrow summary::-webkit-details-marker {
  display: none;
}

.help-toc--narrow nav {
  padding: 0 0 var(--s1);
}

@media (min-width: 640px) {
  .help-toc--narrow ol {
    columns: 2;
    column-gap: var(--gap);
  }
}

@media (min-width: 1240px) {
  .help-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 192px;
    gap: var(--s6);
    align-items: start;
  }

  .help-content--single {
    grid-template-columns: minmax(0, 1fr);
  }

  .help-toc--narrow {
    display: none;
  }

  .help-toc--wide {
    position: sticky;
    top: calc(var(--header-h) + var(--s3));
    grid-column: 2;
    grid-row: 1;
    display: block;
    max-height: calc(100vh - var(--header-h) - var(--s6));
    padding: 2px 0 2px var(--s2);
    overflow-y: auto;
    border-left: 1px solid var(--line);
  }

  .help-toc--wide h2 {
    margin: 0 0 var(--s1);
    color: var(--ink-2);
    font-family: var(--font);
    font-size: var(--small);
    font-weight: 600;
    letter-spacing: 0;
  }

  .help-toc--wide a {
    min-height: 0;
    padding: 5px 0;
    font-size: var(--small);
  }

  .help-body {
    grid-column: 1;
    grid-row: 1;
  }
}

/* The page's text */

.help-body {
  min-width: 0;
}

.help-body > * {
  max-width: var(--measure);
}

.help-body > figure,
.help-body > .help-table {
  max-width: none;
}

.help-body > :first-child {
  margin-top: 0;
}

.help-body > p:first-child {
  color: var(--ink-2);
  font-size: var(--headline);
  line-height: 1.42;
  letter-spacing: -0.012em;
}

.help-body h2 {
  margin: var(--s8) 0 0;
  font-size: var(--title-2);
  line-height: 1.2;
  letter-spacing: -0.018em;
}

.help-body h3 {
  margin: var(--s4) 0 0;
  font-size: var(--body);
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.help-body p,
.help-body ul,
.help-body ol {
  margin: var(--s2) 0 0;
}

.help-body h3 + p {
  margin-top: 6px;
}

.help-body ul,
.help-body ol {
  padding-left: 1.2em;
}

.help-body li + li,
.help-body li > ul,
.help-body li > ol {
  margin-top: var(--s1);
}

.help-body li::marker {
  color: var(--ink-2);
}

.help-body a {
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.help-body a:hover {
  text-decoration-color: currentColor;
}

.help-body code {
  white-space: normal;
  overflow-wrap: anywhere;
}

.help-body figure {
  margin: var(--s5) 0 0;
}

.help-body figure picture {
  display: block;
}

.help-body figure img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  background: var(--bg-2);
  box-shadow: 0 0 0 1px var(--shot-ring), 0 12px 32px -12px rgba(0, 0, 0, 0.3);
}

.help-body figcaption {
  max-width: var(--measure);
  margin-top: var(--s2);
  color: var(--ink-2);
  font-size: var(--caption);
  line-height: 1.5;
}

.help-body aside {
  max-width: var(--measure);
  margin: var(--s3) 0 0;
  padding: var(--s2) 20px;
  border-radius: var(--radius);
  background: var(--bg-2);
  color: var(--ink);
  font-size: var(--caption);
  line-height: 1.5;
  text-align: left;
  text-wrap: pretty;
}

.aside-label {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font-size: var(--caption);
  font-weight: 600;
}

.help-body aside.tip .aside-label {
  color: var(--link);
}

.help-body aside > p:first-of-type {
  margin-top: 0;
}

/* Tables */

.help-table {
  margin: var(--s3) 0 0;
  overflow-x: auto;
}

.help-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--caption);
  line-height: 1.5;
}

.help-table th,
.help-table td {
  padding: 10px var(--s2) 10px 0;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.help-table th:last-child,
.help-table td:last-child {
  padding-right: 0;
}

.help-table thead th {
  padding-top: 0;
  border-top: 0;
  color: var(--ink-2);
  font-weight: 600;
  white-space: nowrap;
}

.help-table tbody tr:last-child > * {
  border-bottom: 1px solid var(--line);
}

.help-table tbody th {
  font-weight: 600;
}

.help-table td {
  color: var(--ink-2);
}

.help-table tbody > tr > :first-child {
  color: var(--ink);
}

@media (max-width: 599px) {
  .help-table--stack {
    overflow: visible;
  }

  .help-table--stack thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .help-table--stack table,
  .help-table--stack tbody,
  .help-table--stack tr,
  .help-table--stack th,
  .help-table--stack td {
    display: block;
  }

  .help-table--stack tbody tr {
    padding: 10px 0;
    border-top: 1px solid var(--line);
  }

  .help-table--stack tbody tr:last-child {
    border-bottom: 1px solid var(--line);
  }

  .help-table--stack th,
  .help-table--stack td,
  .help-table--stack tbody tr:last-child > * {
    padding: 2px 0;
    border: 0;
  }

  .help-table--stack tbody > tr > :first-child {
    font-weight: 600;
  }

  .help-table--stack tbody > tr > :not(:first-child)[data-label]::before {
    content: attr(data-label);
    display: block;
    color: var(--ink-2);
    font-size: var(--small);
    font-weight: 600;
  }
}

/* Previous and next */

.help-pager {
  display: grid;
  gap: var(--s2);
  margin-top: var(--s10);
  padding-top: var(--s3);
  border-top: 1px solid var(--line);
}

@media (min-width: 600px) {
  .help-pager {
    grid-template-columns: 1fr 1fr;
  }

  .help-pager-next {
    grid-column: 2;
    text-align: right;
  }
}

.help-pager a {
  display: block;
  padding: var(--s1) 0;
  color: var(--link);
  font-size: var(--headline);
  line-height: 1.3;
  letter-spacing: -0.012em;
}

.help-pager span {
  display: block;
  margin-bottom: 2px;
  color: var(--ink-2);
  font-size: var(--caption);
  letter-spacing: -0.01em;
}

@media (forced-colors: active) {
  .help-nav a[aria-current="page"],
  .help-toc a[aria-current="true"] {
    outline: 1px solid CanvasText;
  }

  .help-results [aria-selected="true"] a {
    outline: 2px solid Highlight;
  }
}

@media print {
  .help-side,
  .help-toc,
  .help-pager {
    display: none;
  }

  .help-shell {
    display: block;
  }
}
