/* Help and tours (uifirst's help kit): the help panel, the help section's pages, tour offers, Getting started and the
   tour player. Plain on purpose: it takes its colours from these variables, so set them (or restyle the classes) once
   the app has a visual direction. Every class here starts with help-, tour- or gs-. */
:root {
  --help-page: #fff;
  --help-ink: #1b1d21;
  --help-ink-2: #55585e;
  --help-line: #e2e3e1;
  --help-well: #f4f4f2;
  --help-accent: #0b6bcb;
  --help-accent-wash: #e6f1fb;
  --help-radius: 8px;
  --help-top: 0px;          /* the height of a top bar that stays put, so a lit thing isn't scrolled under it */
  --help-panel-width: 23.5rem;
}
.help-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.help-js { display: none; }
.help-js-on .help-js { display: revert; }

/* The ? and the panel. (.app-top is the bar the kit adds to a layout that had none.) */
.app-top { display: flex; justify-content: flex-end; padding: 8px 12px 0; }
.help-open { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border: 1px solid var(--help-line); border-radius: 50%; background: var(--help-page); color: var(--help-ink-2); font-weight: 600; text-decoration: none; }
.help-open:hover { color: var(--help-accent); border-color: var(--help-accent); }
.help-panel { position: fixed; top: 0; right: 0; bottom: 0; z-index: 45; display: flex; flex-direction: column; width: min(var(--help-panel-width), 100vw); background: var(--help-page); border-left: 1px solid var(--help-line); box-shadow: -10px 0 28px rgb(20 24 40 / 0.08); color: var(--help-ink); }
.help-panel[hidden] { display: none; }
.help-panel:focus { outline: none; }
.help-panel-bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 10px 16px; border-bottom: 1px solid var(--help-line); }
.help-close { width: 2rem; height: 2rem; border: 0; border-radius: 6px; background: none; font-size: 1.25rem; line-height: 1; color: var(--help-ink-2); cursor: pointer; }
.help-close:hover { background: var(--help-well); }
.help-panel-content { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.help-loading { padding: 16px; color: var(--help-ink-2); }
/* Beside the page only where there's room for both; narrower, it lies over the page's right edge. */
@media (min-width: 1500px) {
  .has-help body { margin-right: var(--help-panel-width); }
  .help-panel { box-shadow: none; }
}
.help-body { padding: 16px 16px 20px; }
.help-title { margin: 0 0 6px; font-size: 1.125rem; }
.help-show-me { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 2px 0 12px; font-size: 0.8125rem; color: var(--help-ink-2); }
.help-md { font-size: 0.875rem; line-height: 1.55; }
.help-md h2 { margin: 1.4em 0 0.5em; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--help-ink-2); }
.help-md h3 { margin: 1.1em 0 0.3em; font-size: 0.875rem; font-weight: 600; }
.help-md p, .help-md ul, .help-md ol { margin: 0 0 0.6em; }
.help-md ul, .help-md ol { padding-left: 1.25em; }
.help-md code, kbd { padding: 1px 5px; border: 1px solid var(--help-line); border-radius: 4px; background: var(--help-well); font: 0.8125em/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; }
.help-more { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--help-line); }
.help-more h3 { margin: 0 0 6px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--help-ink-2); }
.help-more ul { margin: 0; padding: 0; list-style: none; font-size: 0.875rem; }
.help-more li { padding: 3px 0; }
.help-foot { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--help-line); font-size: 0.8125rem; }
.help-none h2 { margin: 0 0 4px; font-size: 1rem; }
.help-none p { margin: 0 0 8px; font-size: 0.875rem; color: var(--help-ink-2); }

/* Shared pieces. */
.help-btn { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1px solid var(--help-accent); border-radius: 6px; background: var(--help-accent); color: #fff; font: inherit; font-size: 0.8125rem; font-weight: 600; text-decoration: none; cursor: pointer; }
.help-btn--quiet { border-color: var(--help-line); background: var(--help-page); color: var(--help-ink); }
.help-btn:hover { filter: brightness(0.95); }
.help-link-btn { padding: 0; border: 0; background: none; font: inherit; font-size: 0.8125rem; color: var(--help-ink-2); text-decoration: underline; cursor: pointer; }
.help-tag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 4px; background: var(--help-well); font-size: 0.75rem; font-weight: 500; color: var(--help-ink-2); }
.help-tag--new { background: var(--help-accent-wash); color: var(--help-accent); }
.help-dot { display: inline-block; width: 7px; height: 7px; margin-left: 6px; border-radius: 50%; background: var(--help-accent); }
.help-count { margin-left: 8px; font-size: 0.8125rem; font-weight: 400; color: var(--help-ink-2); }
.help-note { margin: 0 0 8px; font-size: 0.8125rem; color: var(--help-ink-2); }
.help-error { margin: 0; font-size: 0.8125rem; color: #b3261e; }
.help-callout { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0 0 16px; padding: 10px 14px; border: 1px solid var(--help-line); border-radius: var(--help-radius); background: var(--help-page); font-size: 0.875rem; }
.help-callout p { margin: 0; }
.help-callout--error { border-color: #f2c4c6; background: #fdebeb; }
.help-card { margin: 0 0 16px; padding: 14px 16px; border: 1px solid var(--help-line); border-radius: var(--help-radius); background: var(--help-page); }
.help-card-title { margin: 0 0 6px; font-size: 1rem; }
.help-card ul { margin: 6px 0 0; padding: 0; list-style: none; font-size: 0.875rem; }
.help-card li { padding: 3px 0; }
.help-card > p:last-child { margin-bottom: 0; }

/* The help section's pages. */
.help-page { max-width: 64rem; }
.help-page h1 { margin: 0 0 4px; }
.help-crumbs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; font-size: 0.8125rem; color: var(--help-ink-2); }
.help-crumbs > * + *::before { content: "›"; margin: 0 6px 0 2px; color: var(--help-ink-2); }
.help-lead { margin: 0 0 16px; max-width: 60ch; color: var(--help-ink-2); }
.help-find { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; max-width: 44rem; }
.help-find input { flex: 1; min-width: 12rem; padding: 7px 10px; border: 1px solid var(--help-line); border-radius: 6px; font: inherit; }
.help-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 17rem); gap: 16px; align-items: start; }
.help-topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 16px; align-items: start; }
.help-topics > .help-card { margin: 0; }
.help-hit-list { margin: 0; padding: 0; list-style: none; font-size: 0.875rem; }
.help-hit-list li { padding: 8px 0; border-top: 1px solid var(--help-line); }
.help-hit-list li:first-child { border-top: 0; }
.help-hit-list p { margin: 2px 0 0; font-size: 0.8125rem; color: var(--help-ink-2); }
.help-hit-topic { margin-left: 8px; font-size: 0.75rem; color: var(--help-ink-2); }
.help-news-teasers li { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.help-news-teasers li span { flex: none; font-size: 0.75rem; color: var(--help-ink-2); }
.help-news-teasers li.is-new a { font-weight: 600; }
.help-article { padding: 22px 26px 18px; }
.help-article .help-md { max-width: 68ch; margin-top: 16px; font-size: 0.9375rem; }
.help-article-go { display: flex; flex-wrap: wrap; gap: 8px; }
.help-helped { margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--help-line); font-size: 0.875rem; }
.help-helped-form { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 10px; }
.help-helped-form summary { list-style: none; }
.help-helped-form summary::-webkit-details-marker { display: none; }
.help-helped-form details[open] { flex-basis: 100%; }
.help-helped-missing { display: grid; gap: 6px; margin-top: 10px; max-width: 34rem; }
.help-helped-missing textarea { padding: 7px 10px; border: 1px solid var(--help-line); border-radius: 6px; font: inherit; }
.help-helped-missing .help-btn { justify-self: start; }
.help-news-list { margin: 0; padding: 0; list-style: none; }
.help-news-list li { padding: 12px 0; border-top: 1px solid var(--help-line); scroll-margin-top: calc(var(--help-top) + 8px); }
.help-news-list li:first-child { border-top: 0; }
.help-news-list h2 { margin: 2px 0 6px; font-size: 1rem; }
.help-news-links { display: flex; gap: 16px; margin: 0; font-size: 0.8125rem; }
@media (max-width: 900px) { .help-layout { grid-template-columns: minmax(0, 1fr); } .help-article { padding: 16px; } }

/* Tour offers and Getting started. */
.tour-offer-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.gs-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gs-bar { height: 4px; margin: 6px 0 10px; border-radius: 2px; background: var(--help-line); overflow: hidden; }
.gs-bar span { display: block; height: 100%; background: var(--help-accent); }
.gs-steps { margin: 0; padding: 0; list-style: none; }
.gs-steps li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--help-line); }
.gs-tick, .tour-state { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border: 1.5px solid var(--help-line); border-radius: 50%; font-size: 0.75rem; line-height: 1; }
.gs-steps li.is-done .gs-tick, .tour-state--done { border-color: var(--help-accent); background: var(--help-accent); color: #fff; }
.gs-steps li.is-next .gs-tick { border-color: var(--help-accent); }
.tour-state--part { border-color: var(--help-accent); background: linear-gradient(90deg, var(--help-accent) 50%, transparent 50%); }
.gs-what, .tour-what { flex: 1; min-width: 0; }
.gs-what b, .tour-what b { display: block; font-size: 0.875rem; }
.gs-what > span, .tour-what > span { display: block; margin-top: 1px; font-size: 0.8125rem; color: var(--help-ink-2); }
.gs-steps li.is-done .gs-what b { font-weight: 500; color: var(--help-ink-2); }
.gs-actions, .tour-row-actions { flex: none; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

/* Help › Tours, and a tour as a page. */
.tour-list, .tour-step-list { margin: 0; padding: 0; list-style: none; }
.help-card li.tour-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--help-line); }
.help-card li.tour-row:first-child { border-top: 0; }
.tour-offers-setting { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--help-line); font-size: 0.8125rem; color: var(--help-ink-2); }
.tour-step-list { counter-reset: step; }
.help-card .tour-step-list li { position: relative; padding: 10px 0 10px 32px; border-top: 1px solid var(--help-line); counter-increment: step; font-size: 0.875rem; }
.tour-step-list li::before { content: counter(step); position: absolute; left: 0; top: 10px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--help-well); font-size: 0.75rem; font-weight: 600; }
.tour-step-list li p { margin: 2px 0 0; }
@media (max-width: 640px) {
  .gs-steps li, .help-card li.tour-row { flex-wrap: wrap; }
  .gs-actions, .tour-row-actions { flex-basis: 100%; justify-content: flex-start; padding-left: 32px; }
}

/* The tour player: the page dimmed and out of reach, one thing lit, a card beside it. */
[data-tour] { scroll-margin-top: calc(var(--help-top) + 14px); }
.tour-scrim { position: fixed; inset: 0; z-index: 80; background: rgb(20 24 40 / 0.5); }
.tour-ring { position: fixed; z-index: 81; pointer-events: none; border-radius: 8px; box-shadow: 0 0 0 2px var(--help-accent), 0 0 0 6px color-mix(in srgb, var(--help-accent) 28%, transparent); transition: left 0.18s, top 0.18s, width 0.18s, height 0.18s; }
.tour-ring[hidden] { display: none; }
.tour-card { position: fixed; z-index: 82; width: min(22rem, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow-y: auto; padding: 16px 18px 14px; border-radius: var(--help-radius); background: var(--help-page); color: var(--help-ink); box-shadow: 0 0 0 1px rgb(15 15 15 / 0.05), 0 14px 44px rgb(20 24 40 / 0.28); }
.tour-card:focus { outline: none; }
.tour-card--wide { width: min(30rem, calc(100vw - 24px)); }
.tour-card--centre { left: 50%; top: 50%; transform: translate(-50%, -50%); }
.tour-card--dock { left: 12px; right: 12px; top: auto; bottom: 12px; width: auto; max-height: 62vh; transform: none; }
.tour-card--dock.is-top { top: 12px; bottom: auto; }
.tour-count { margin: 0 0 4px; font-size: 0.75rem; color: var(--help-ink-2); }
.tour-card h2 { margin: 0 0 6px; font-size: 1rem; }
.tour-body { color: var(--help-ink-2); }
.tour-body p { margin: 0 0 0.5em; }
.tour-body strong { color: var(--help-ink); }
.tour-picture { display: block; width: 100%; height: auto; margin-top: 10px; border: 1px solid var(--help-line); border-radius: 6px; }
.tour-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.tour-nav { display: flex; gap: 8px; }
.has-tour [data-tour-offer] { display: none; }
@media (prefers-reduced-motion: reduce) { .tour-ring { transition: none; } }
