/* Rushes Help on the web (help.html): the app's Help, in the site's design.
   help.html is built by scripts/build-help-page.py, which drops the app's own stylesheet
   and loads pages.css and this file. The class names below come from the app's Help
   markup (.shell, .content, .note, .steps, .moment, .ui…); the build stops if it meets
   one this file doesn't style. The drawn moments carry their own tokens. */

.shell {
  padding: 96px var(--pad) 0;
  display: grid; grid-template-columns: 232px minmax(0, 1fr); column-gap: 64px; align-items: start;
}
.shell > main { min-width: 0; }

/* ---------- Search and contents (sticky on desktop; on phones, search over a "Contents" disclosure) ---------- */
.help-side { position: sticky; top: calc(var(--nav-h) + 32px); max-height: calc(100vh - var(--nav-h) - 64px); display: flex; flex-direction: column; gap: 28px; }
.help-toc { position: relative; min-height: 0; overflow-y: auto; padding-bottom: 32px; }
.help-search-side input { padding: 11px 12px; font-size: 15px; }
.help-search-side .help-search-results {
  position: absolute; top: 100%; left: 0; z-index: 30; width: min(560px, calc(100vw - 2 * var(--margin)));
  max-height: calc(100vh - var(--nav-h) - 160px); overflow-y: auto; box-shadow: 0 16px 40px rgba(17,17,17,.14);
}
.help-search-side .help-search-list a { padding: 12px 16px 14px; }
.help-search-side .hs-title { font-size: 16px; }
.help-search-side .hs-snip { font-size: 14px; }
.help-toc > summary { display: none; }
.help-toc .brand, .help-toc .brand-black, .help-toc .brand-color { display: none; } /* the site nav carries the logo */
.help-toc h4 {
  margin: 28px 0 8px; font-family: var(--mono); font-size: 13px; font-weight: 400;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2);
}
.help-toc h4:first-of-type { margin-top: 0; }
.help-toc a {
  display: block; padding: 5px 0 5px 14px; border-left: 2px solid var(--rule-soft);
  font-size: 15px; line-height: 1.35; color: var(--ink-2); text-decoration: none;
}
.help-toc a:hover { color: var(--red); }
.help-toc a[aria-current="true"] { color: var(--ink); font-weight: 600; border-left-color: var(--red); }
.help-toc-support { margin: 32px 0 0; padding-top: 16px; border-top: 1px solid var(--rule-soft); font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.help-toc-support a { display: inline; padding: 0; border: 0; color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.help-toc-support a:hover { color: var(--red); }

/* ---------- Text ---------- */
.content { max-width: 68ch; font-size: 18px; line-height: 1.65; padding-bottom: 32px; }
.content section { scroll-margin-top: 24px; }
.content h3[id] { scroll-margin-top: 24px; }
.content h1 { margin: 0 0 28px; font-size: clamp(44px, 6vw, 88px); line-height: 0.96; letter-spacing: -0.035em; font-weight: 600; }
.content .lede { margin: 0 0 40px; font-size: clamp(19px, 1.6vw, 24px); line-height: 1.4; max-width: 46ch; }
.content h2 {
  margin: 96px 0 20px; padding-top: 32px; border-top: 1px solid var(--rule);
  font-size: clamp(28px, 2.8vw, 40px); line-height: 1.05; letter-spacing: -0.025em; font-weight: 600;
}
.content h3 { margin: 40px 0 10px; font-size: 20px; line-height: 1.25; font-weight: 600; }
.content p { margin: 0 0 16px; }
.content ul, .content ol { margin: 0 0 20px; padding-left: 22px; }
.content li { margin-bottom: 8px; }
.content li > ul, .content li > ol { margin: 8px 0 0; }
.content strong, .content .ui { font-weight: 600; }
.content a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.content a:hover { color: var(--red); }
.content kbd {
  font-family: var(--mono); font-size: 14px; font-weight: 500; padding: 1px 6px;
  border: 1px solid var(--ink); border-bottom-width: 2px; white-space: nowrap;
}
.content code { font-family: var(--mono); font-size: 15px; background: #f0f0f0; padding: 1px 5px; }

/* Callouts: the site's .legal-callout; the gold one is the warning */
.content .note { margin: 24px 0; padding: 20px 24px; border: 1px solid var(--rule); border-left: 6px solid var(--ink); font-size: 17px; line-height: 1.55; }
.content .note.gold { border-left-color: var(--red); }

/* Numbered steps: square ink numbers in Plex Mono */
.content .steps { counter-reset: s; list-style: none; padding-left: 0; }
.content .steps > li { counter-increment: s; position: relative; padding-left: 40px; margin: 14px 0; }
.content .steps > li::before {
  content: counter(s); position: absolute; left: 0; top: 3px; width: 24px; height: 24px;
  background: var(--ink); color: #ffffff; font: 500 13px/24px var(--mono); text-align: center;
}

/* App status words, in the app's own light-mode colors */
.content .green { color: #2f6e3a; font-weight: 600; }
.content .gold-t { color: #8a6a12; font-weight: 600; }
.content .red { color: #8a3434; font-weight: 600; }

/* ---------- Pictures: real screenshots get the ambient shadow; moments sit in their dark tile ---------- */
.content figure { margin: 32px 0; }
.content figure img { max-width: 100%; height: auto; box-shadow: 0 24px 64px rgba(17,17,17,.16), 0 2px 6px rgba(17,17,17,.08); }
.content figure.narrow img { max-width: min(460px, 100%); }
.content figure.tiny img { max-width: min(260px, 100%); }
.content figcaption { margin-top: 16px; font-size: 15px; line-height: 1.45; color: var(--ink-2); }
.content .moment { margin: 32px 0 0; background: #111113; }
.content .moment svg { width: 100%; height: auto; }
.content .moment + figcaption { margin: 12px 0 32px; }

/* ---------- Tables ---------- */
.content table { width: 100%; border-collapse: collapse; margin: 16px 0 28px; font-size: 16px; line-height: 1.45; }
.content th, .content td { text-align: left; vertical-align: top; padding: 10px 16px 10px 0; border-bottom: 1px solid var(--rule-soft); }
.content th {
  font-family: var(--mono); font-size: 13px; font-weight: 400; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-2); border-bottom-color: var(--rule);
}
.content td:first-child { white-space: nowrap; }

/* The Help's trademark line */
.content > footer { margin-top: 96px; padding-top: 16px; border-top: 1px solid var(--rule-soft); font-family: var(--mono); font-size: 13px; line-height: 1.7; color: var(--ink-2); }

/* ---------- Phones ---------- */
@media (max-width: 900px) {
  .shell { display: block; padding-top: 64px; }
  .help-side { position: static; max-height: none; display: block; margin-bottom: 48px; }
  .help-search-side { margin-bottom: 16px; }
  .help-search-side .help-search-results { width: 100%; }
  .help-toc { overflow: visible; padding-bottom: 0; border: 1px solid var(--rule); }
  .help-toc > summary {
    display: flex; justify-content: space-between; align-items: center; min-height: 52px; padding: 0 16px;
    font-weight: 600; cursor: pointer; list-style: none;
  }
  .help-toc > summary::-webkit-details-marker { display: none; }
  .help-toc > summary::after { content: "+"; font-family: var(--mono); font-size: 20px; }
  .help-toc[open] > summary::after { content: "\2212"; }
  .help-toc nav { padding: 4px 16px 20px; border-top: 1px solid var(--rule-soft); }
  .help-toc h4 { margin-top: 20px; }
  .help-toc h4:first-of-type { margin-top: 16px; }
  .help-toc a { padding: 10px 0 10px 14px; }
  .help-toc-support { margin: 0; padding: 14px 16px 18px; }
  .content h2 { margin-top: 72px; }
  .content table { display: block; overflow-x: auto; }
}
