/* ==========================================================================
   Help centre (templates/help/*). Loaded by both of its frames:
   - signed in, inside the app (base.html, which also loads app.css);
   - signed out, inside the website (site/base.html, which loads site.css).
   ========================================================================== */

/* The public frame has none of app.css, so .help-public carries the app's
   tokens and the four house pieces help uses (.page-head, .panel,
   .panel-head, .btn), scoped so they never reach the rest of the site. The
   values are app.css's own; change them there and here together. */
.help-public {
  --panel: #ffffff;
  --panel-2: #f7f8f9;
  --line: #d8dbe0;
  --line-strong: #b9bec7;
  --ink: #1a1d22;
  --ink-2: #4a5058;
  --ink-3: #6b727c;
  --accent: #4c5cf2;
  --accent-dark: #3b50ef;
  --fs-base: 13px;
  --fs-sm: 11px;
  --fs-xs: 9.5px;
  --fs-caption: 8.5px;
  --nav-h: 61px;          /* the site header, sticky at the top */
  margin: 0 auto;
  padding: 24px 14px 60px;
  color: var(--ink);
  font-size: var(--fs-base);
  line-height: 1.35;
}
.help-public *, .help-public *::before, .help-public *::after { box-sizing: border-box; }
.help-public .page-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.help-public .page-head h1 { margin: 0; font-size: var(--fs-sm); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.help-public .panel { background: var(--panel); border: 1px solid var(--line); margin-bottom: 16px; }
.help-public .panel-head {
  background: #eef0f2;
  border-bottom: 1px solid var(--line);
  padding: 5px 9px;
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--ink-2);
}
.help-public .muted { color: var(--ink-3); }
.help-public .btn { background: #fff; border: 1px solid var(--line-strong); padding: 2px 7px; font: inherit; font-size: var(--fs-xs); color: var(--ink); cursor: pointer; }
.help-public .btn:hover { background: #eef0f3; border-color: var(--ink-3); }
.help-public input { font-family: inherit; color: var(--ink); }

/* A home of categories and one page per task, in the house page, panels
   and type; reading text at --fs-base. */
.help-page { max-width: 1120px; }
.help-head h1 { margin: 0; }

.help-find { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; }
.help-find-label { font-size: var(--fs-caption); font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-2); }
.help-filter { width: 280px; max-width: 100%; border: 1px solid var(--line-strong); padding: 4px 7px; font-size: var(--fs-base); background: #fff; }
@media (max-width: 600px), (pointer: coarse) and (max-height: 500px) {
  .help-filter { font-size: 16px; }   /* no iOS zoom on focus (app.css, after the grid-table controls) */
}
.help-count { font-size: var(--fs-xs); }
.help-none { padding: 10px 12px; font-size: var(--fs-sm); color: var(--ink-2); }
.help-none[hidden], .help-start[hidden], .help-cat[hidden], .help-cat-list li[hidden] { display: none; }

.help-start-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.help-start-list li { padding: 10px 12px; border-right: 1px solid var(--line); }
.help-start-list li:last-child { border-right: none; }
.help-start-list a, .help-cat-list a, .help-side-list a, .help-related a { color: var(--accent-dark); }
.help-start-list a { display: block; font-size: var(--fs-sm); font-weight: 600; }
.help-sum { display: block; margin-top: 3px; color: var(--ink-2); font-size: var(--fs-xs); line-height: 1.45; }

.help-cats { columns: 3; column-gap: 16px; }
.help-cat { break-inside: avoid; scroll-margin-top: 12px; }
.help-cat-desc { margin: 0; padding: 8px 12px 0; color: var(--ink-2); font-size: var(--fs-xs); line-height: 1.45; }
.help-cat-list { list-style: none; margin: 0; padding: 6px 12px 10px; }
.help-cat-list li { padding: 2px 0; font-size: var(--fs-sm); line-height: 1.4; }

.help-crumbs { margin: 0 0 10px; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.help-crumbs a { color: var(--ink-2); }
.help-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; align-items: start; }
.help-side { position: sticky; top: calc(var(--nav-h) + 12px); }
.help-side-list { list-style: none; margin: 0; padding: 6px 0; }
.help-side-list a { display: block; padding: 4px 12px; font-size: var(--fs-sm); line-height: 1.35; border-left: 3px solid transparent; }
.help-side-list a[aria-current="page"] { color: var(--ink); font-weight: 600; border-left-color: var(--accent); background: var(--panel-2); }
.help-side-fold { display: none; }

.help-article { padding: 18px 26px 22px; min-width: 0; }
.help-article-head h1 { margin: 0; font-size: var(--fs-base); font-weight: 700; line-height: 1.35; color: var(--ink); }
.help-summary { margin: 3px 0 0; color: var(--ink-2); font-size: var(--fs-sm); }
.help-body-text { container-type: inline-size; margin-top: 14px; color: var(--ink); font-size: var(--fs-base); line-height: 1.55; }
/* Text keeps a reading measure; a picture may use the article's full width
   (cqi: the body's width), so a 780 px shot shows at 1x instead of shrunk by
   a third into the text column, including one inside a step (an <li>, which
   sits 22px in). */
.help-body-text > :not(.help-shot) { max-width: 68ch; }
.help-body-text p { margin: 0 0 10px; }
.help-body-text h2, .help-related h2 { margin: 20px 0 6px; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-2); }
.help-body-text ol, .help-body-text ul { margin: 0 0 12px; padding-left: 22px; }
.help-body-text li { margin: 4px 0; }
.help-body-text li > ul, .help-body-text li > ol { margin: 4px 0 6px; }
.help-body-text a { color: var(--accent-dark); }
.help-body-text a.help-term { color: inherit; text-decoration: underline dotted var(--ink-3); text-underline-offset: 2px; }
.help-body-text kbd { display: inline-block; padding: 0 4px; border: 1px solid var(--line-strong); border-bottom-width: 2px; background: var(--panel-2); font: 600 var(--fs-xs)/1.5 inherit; }
.help-body-text table { border-collapse: collapse; margin: 6px 0 14px; font-size: var(--fs-sm); }
.help-body-text th, .help-body-text td { padding: 5px 9px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.help-body-text th { background: #eef0f2; font-size: var(--fs-caption); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.help-body-text td.num, .help-body-text th.num { text-align: right; font-variant-numeric: tabular-nums; }
.help-contents { margin: 0 0 14px; padding: 8px 12px; border: 1px solid var(--line); background: var(--panel-2); font-size: var(--fs-sm); }
.help-contents ol { margin: 4px 0 0; }

.help-note { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 8px; margin: 12px 0; padding: 8px 10px; border-left: 3px solid var(--line-strong); background: var(--panel-2); font-size: var(--fs-sm); }
.help-note > div > :last-child { margin-bottom: 0; }
.help-note-label { padding-top: 2px; font-size: var(--fs-caption); font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-2); }

.help-shot { width: max-content; max-width: 100cqi; margin: 8px 0 14px; }
.help-body-text li .help-shot { max-width: calc(100cqi - 22px); }
.help-shot img { display: block; max-width: 100%; height: auto; border: 1px solid var(--line-strong); }

.help-related { max-width: 68ch; margin-top: 20px; padding-top: 4px; border-top: 1px solid var(--line); }
.help-related ul { margin: 0; padding-left: 18px; font-size: var(--fs-sm); }
.help-related li { margin: 3px 0; }

@media (max-width: 1100px) {
  .help-cats { columns: 2; }
  .help-start-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .help-start-list li:nth-child(2n) { border-right: none; }
  .help-start-list li:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 820px) {
  .help-cats { columns: 1; }
  .help-layout { display: block; }
  .help-side { display: none; }
  .help-side-fold { display: block; margin-bottom: 10px; }
  .help-side-fold > summary { cursor: pointer; list-style: none; }
  .help-side-fold > summary::-webkit-details-marker { display: none; }
  .help-side-fold > summary::after { content: " ▾"; }
  .help-side-fold[open] > summary::after { content: " ▴"; }
  .help-article { padding: 14px 14px 18px; }
}

@media (max-width: 600px) {
  .help-find { flex-wrap: wrap; }
  .help-filter { flex: 1 1 100%; width: auto; }
  .help-start-list { grid-template-columns: minmax(0, 1fr); }
  .help-start-list li { border-right: none; border-bottom: 1px solid var(--line); }
  .help-start-list li:last-child { border-bottom: none; }
}

