/* Help pages: the app's daytime look (apps/pr-web/DESIGN.md) between the landing's soot header and
   footer. A pale-eye frame, one white sheet, the folder tab naming the section on its top edge.
   Highlighter appears only on the search button's focus and the current page in the side list.
   Loaded after site.css, which supplies the tokens, the faces and the header and footer. */

.help-top {
  padding: 0 var(--margin) var(--s-4);
  background: var(--soot);
  color: var(--eye);
}

.help-frame {
  padding: var(--s-5) var(--margin) var(--section);
  background: var(--eye);
  color: var(--soot);
}

.help-sheet {
  position: relative;
  max-width: 78rem;
  margin: 0 auto;
  padding: var(--block) var(--item) var(--block);
  background: #fff;
  border: 1px solid #dde3e8;
  border-radius: 1rem;
}

/* The folder tab on the sheet's top edge. */
.help-tab {
  position: absolute;
  top: 0;
  left: var(--item);
  transform: translateY(-100%);
  margin-left: -1px;
  padding: 0.5rem 1.6em 0.55rem;
  background: #fff;
  clip-path: var(--tab);
  font-size: var(--step-small);
  font-weight: 500;
  letter-spacing: var(--track-small);
  line-height: 1.3;
}

.help-grid {
  display: grid;
  grid-template-columns: minmax(11rem, 15rem) minmax(0, 1fr);
  column-gap: clamp(2rem, 1rem + 4vw, 5rem);
  align-items: start;
}

/* ---------- side list ---------- */
.help-side {
  font-size: var(--step-small);
  letter-spacing: var(--track-small);
  line-height: var(--leading-small);
}
.help-side ul {
  display: grid;
  gap: 0.125rem;
}
.help-side a {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 0.75rem;
  border-radius: 0.375rem;
  color: #2c3238;
  text-decoration: none;
}
.help-side a:hover {
  background: #f3f6f8;
}
.help-side a[aria-current="page"] {
  background: var(--hl);
  color: var(--soot);
  font-weight: 500;
}

/* ---------- search ---------- */
.help-search {
  display: flex;
  gap: var(--s-2);
  max-width: 31em;
  margin-bottom: var(--block);
}
.help-search input {
  flex: 1;
  min-width: 0;
  min-height: 2.75rem;
  padding: 0 0.875rem;
  border: 1px solid #b9c2ca;
  border-radius: 0.375rem;
  background: #fff;
  color: var(--soot);
  font-size: var(--step-small);
}
.help-search input:focus-visible {
  outline: 2px solid var(--soot);
  outline-offset: 1px;
}
.help-search button {
  min-height: 2.75rem;
  padding: 0 1.25rem;
  border-radius: 0.375rem;
  background: var(--soot);
  color: var(--eye);
  font-size: var(--step-small);
  font-weight: 500;
}
.help-search button:hover {
  background: var(--wing);
}
.help-search button:focus-visible {
  background: var(--hl);
  color: var(--soot);
  outline: 3px solid var(--soot);
  outline-offset: 2px;
}

/* ---------- reading ---------- */
.help-main {
  min-width: 0;
  font-size: 1.0625rem;
  line-height: var(--leading-body);
}
.help-article {
  max-width: 65ch;
  overflow-wrap: anywhere;
}
.help-article h1 {
  font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.5rem);
  letter-spacing: var(--track-head);
  line-height: var(--leading-head);
  margin-bottom: var(--s-4);
}
.help-article h2 {
  margin-top: var(--block);
  margin-bottom: var(--s-3);
  font-size: clamp(1.375rem, 1.2rem + 0.6vw, 1.75rem);
}
.help-article h3 {
  margin-top: var(--item);
  margin-bottom: var(--s-2);
  font-size: 1.1875rem;
  font-weight: 500;
  line-height: 1.3;
}
.help-article p,
.help-article ul,
.help-article ol,
.help-article blockquote,
.help-article table,
.help-article pre,
.help-article figure {
  margin-top: 0;
  margin-bottom: var(--s-4);
}
.help-article ul,
.help-article ol {
  padding-left: 1.5em;
}
.help-article ul {
  list-style: disc;
}
.help-article ol {
  list-style: decimal;
}
.help-article li + li {
  margin-top: var(--s-2);
}
.help-article a {
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.07em;
}
.help-article a:hover {
  text-decoration-thickness: 0.14em;
}
.help-article img {
  height: auto;
  border: 1px solid #dde3e8;
  border-radius: 0.5rem;
}
.help-article code {
  padding: 0.1em 0.35em;
  border-radius: 0.25rem;
  background: #f3f6f8;
  font-size: 0.92em;
}
.help-article pre {
  overflow-x: auto;
  padding: var(--s-3) var(--s-4);
  border-radius: 0.5rem;
  background: #f3f6f8;
}
.help-article pre code {
  padding: 0;
  background: none;
}
.help-article table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  /* Cells wrap at word boundaries; a table too wide for the screen scrolls inside itself. */
  overflow-wrap: normal;
}
.help-article th,
.help-article td {
  min-width: 7em;
  overflow-wrap: break-word;
  padding: var(--s-2) var(--s-3);
  border-bottom: 1px solid #dde3e8;
  text-align: left;
  vertical-align: top;
}
.help-article blockquote {
  padding: var(--s-3) var(--s-4);
  border-left: 3px solid var(--soot);
  background: #f3f6f8;
}
.help-article blockquote > :last-child {
  margin-bottom: 0;
}

/* Beta and draft lines under the title: plain text, not a badge. */
.help-status {
  color: #2c3238;
  font-weight: 500;
}

/* ---------- index and lists ---------- */
.help-list {
  padding: 0;
  list-style: none;
}
.help-list li + li {
  margin-top: var(--s-4);
}
.help-list a {
  font-weight: 500;
}
.help-list p {
  margin-top: var(--s-1);
  margin-bottom: 0;
  color: #4b545d;
}

.help-group + .help-group {
  margin-top: var(--block);
}
.help-group h2 {
  margin-top: 0;
}
.help-group h2 a {
  text-decoration: none;
}
.help-group h2 a:hover {
  text-decoration: underline;
}
/* The short list that stands in for the side list on narrow screens (a details, no script). */
.help-jump {
  display: none;
}
/* ---------- narrow screens ---------- */
@media (max-width: 52em) {
  .help-sheet {
    padding: var(--block) var(--s-4) var(--block);
  }
  .help-grid {
    grid-template-columns: minmax(0, 1fr);
    row-gap: var(--item);
  }
  .help-side {
    display: none;
  }
  .help-jump {
    display: block;
    margin: var(--item) 0 0;
    font-size: var(--step-small);
    letter-spacing: var(--track-small);
    line-height: var(--leading-small);
  }
  .help-jump {
    margin-bottom: var(--item);
  }
  .help-jump summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 2.75rem;
    padding: 0 0.75rem;
    border-radius: 0.375rem;
    background: #f3f6f8;
    color: #2c3238;
    cursor: pointer;
  }
  .help-jump summary::-webkit-details-marker {
    display: none;
  }
  .help-jump summary::after {
    content: "+";
  }
  .help-jump[open] summary::after {
    content: "\2212";
  }
  .help-jump ul {
    display: grid;
    gap: 0.125rem;
    margin-top: 0.25rem;
  }
  .help-jump a {
    display: flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0 0.75rem;
    border-radius: 0.375rem;
    color: #2c3238;
    text-decoration: none;
  }
  .help-jump a[aria-current="page"] {
    background: var(--hl);
    color: var(--soot);
  }
  .help-search {
    max-width: none;
  }
}

/* The footer here has no name block above its links, so it needs less room at the top. */
.foot {
  padding-top: var(--block);
}
