/* The public help center (help/**). Built by tools/build-help.mjs; colours come from site.css. */
.help { padding: 40px 0 72px; }
.help-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; align-items: start; }
.help-main { min-width: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* sidebar: a list on wide screens, a "Topics" menu on phones */
/* Wide screens: like the header, the footer is locked to the bottom of the screen. The topic list is pinned between
   them and scrolls on its own; the article scrolls the page underneath. --footer-h is the footer's height, set by
   js/help.js (it grows when its links wrap). */
@media (min-width: 861px) {
  .help-page { --footer-h: 40px; padding-bottom: var(--footer-h); }
  /* Same see-through dark as the header, so the top and bottom strips match. */
  .help-page .site-footer { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: rgb(3 9 15 / .78); backdrop-filter: blur(12px); }
  /* The list still scrolls (wheel, trackpad, keyboard), but its scrollbar is never drawn. */
  .help-topics { position: fixed; top: 109px; bottom: calc(var(--footer-h) + 16px); width: 240px; overflow-y: auto; overscroll-behavior: contain; padding-right: 6px; box-sizing: border-box; scrollbar-width: none; }
  .help-topics::-webkit-scrollbar { display: none; }
}
.help-topics summary { display: none; }
.help-topics > ul, .help-topics ul ul { list-style: none; margin: 0; padding: 0; }
.help-topics > ul > li { border-bottom: 1px solid var(--line); }
.help-topic-link { display: block; padding: 12px 4px; color: var(--ink); font-weight: 700; text-decoration: none; }
.help-topics ul ul { padding: 0 0 10px 10px; }
.help-topics ul ul a { display: block; padding: 6px 8px; border-radius: 8px; color: var(--muted); font-size: 15px; text-decoration: none; }
.help-topics a:hover { color: var(--cyan); }
.help-topics a[aria-current="page"] { color: var(--cyan); }
.help-topics ul ul a[aria-current="page"] { background: rgb(64 196 255 / .1); }

/* home */
.help-hero { padding: 8px 0 32px; border: 0; }
.help-hero h1 { margin: 0 0 20px; font-size: clamp(32px, 5vw, 48px); }
.help-search { position: relative; max-width: 640px; }
.help-search input {
  width: 100%; padding: 15px 18px; border-radius: 14px; border: 1px solid rgb(120 190 230 / .35);
  background: #06121b; color: var(--ink); font: inherit;
}
.help-search input:focus { outline: 2px solid var(--cyan); outline-offset: 1px; }
.help-results {
  position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none;
  border-radius: 14px; border: 1px solid var(--line); background: #071521; box-shadow: 0 20px 50px rgb(0 0 0 / .5);
}
.help-results a { display: block; padding: 10px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.help-results a:hover, .help-results a:focus { background: rgb(64 196 255 / .1); outline: none; }
.help-results span { display: block; color: var(--muted); font-size: 14px; }
.help-results .empty { padding: 10px 12px; color: var(--muted); }

.help-cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.help-card { display: flex; flex-direction: column; }
.help-card h2 { margin: 0 0 8px; font-size: 22px; }
.help-card h2 a { color: var(--ink); text-decoration: none; }
.help-card ul { margin: 16px 0 20px; padding: 16px 0 0 20px; border-top: 1px solid var(--line); display: grid; gap: 8px; flex: 1; }
.help-card li a { color: var(--ink); text-decoration: none; }
.help-card li a:hover { color: var(--cyan); }
.help-all { align-self: flex-start; padding: 8px 16px; font-size: 14px; }

.help-new { margin-top: 48px; padding: 0; border: 0; }
.help-new h2 { font-size: 26px; }
.help-new ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.help-new li { padding: 14px 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); }
.help-new li .muted { display: block; font-size: 13px; font-weight: 700; letter-spacing: .5px; }

/* topic and article pages */
.help-crumbs { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.help-crumbs a { color: var(--muted); }
.help-main > h1, .help-article h1 { margin: 0 0 10px; font-size: clamp(30px, 4.5vw, 42px); }
.help-lead { margin: 0 0 28px; color: var(--muted); font-size: 19px; }
.help-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.help-list a { display: block; padding: 18px 20px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; }
.help-list a:hover { border-color: rgb(64 196 255 / .45); }
.help-list span { display: block; color: var(--muted); font-size: 15px; }

.help-article { max-width: 760px; }
.help-article h2 { margin: 36px 0 10px; font-size: 24px; }
.help-article p, .help-article li { color: #c8dce6; }
.help-article strong { color: var(--ink); }
.help-article ul { padding-left: 22px; display: grid; gap: 8px; }
.help-article .video-frame { margin: 0 0 28px; }
.help-steps { margin: 0; padding: 0; list-style: none; counter-reset: help-step; display: grid; gap: 12px; }
.help-steps > li {
  counter-increment: help-step; position: relative; padding: 14px 18px 14px 58px;
  border-radius: 14px; border: 1px solid var(--line); background: var(--card);
}
.help-steps > li::before {
  content: counter(help-step); position: absolute; left: 16px; top: 13px; display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, var(--cyan), var(--teal));
  color: #041019; font-weight: 900; font-size: 14px;
}
.help-steps ul { margin: 8px 0; }
.help-next {
  display: block; max-width: 760px; margin-top: 36px; padding: 16px 20px; border-radius: 14px;
  border: 1px solid rgb(64 196 255 / .35); color: var(--ink); font-weight: 700; text-decoration: none;
}
.help-next .muted { display: block; font-size: 13px; font-weight: 700; letter-spacing: .5px; }
.help-next:hover { border-color: var(--cyan); }
.help-checked { margin: 28px 0 0; font-size: 14px; }
.help-contact { margin-top: 18px; color: var(--muted); font-size: 15px; }

@media (max-width: 860px) {
  .help { padding-top: 20px; }
  .help-layout { grid-template-columns: 1fr; gap: 20px; }
  .help-sidebar { position: static; }
  .help-topics { border: 1px solid var(--line); border-radius: 14px; background: var(--card); padding: 0 14px; }
  .help-topics summary { display: block; padding: 12px 0; font-weight: 700; cursor: pointer; }
  .help-topics > ul { padding-bottom: 6px; }
  .help-topics > ul > li:last-child { border-bottom: 0; }
}

.help-walkthrough > li > div { min-width: 0; }
.help-walkthrough > li p { margin: 0 0 12px; }
.help-screenshot { display: block; width: fit-content; max-width: 100%; }
.help-screenshot img { display: block; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; }

/* Tutorials: groups on the Tutorials page, parts still to come, and the clip or screenshot at the top of a part. */
.help-group { margin: 0 0 36px; padding: 0; border: 0; }
.help-group h2 { margin: 0 0 4px; font-size: 24px; }
.help-group h2 a { color: var(--ink); text-decoration: none; }
.help-group h2 a:hover { color: var(--cyan); }
.help-group > p { margin: 0 0 14px; }
.help-soon > div { padding: 14px 20px; border-radius: 16px; border: 1px dashed var(--line); color: var(--muted); }
.help-soon strong { color: var(--muted); font-weight: 600; }
.help-media { display: block; width: 100%; height: auto; margin: 0 0 28px; border: 1px solid var(--line); border-radius: 10px; background: #000; }
.help-media-shot { margin: 0 0 28px; }

/* Tutorials sidebar: the open group (e.g. Dashboard) reads as a heading, and its pages sit under it as bullets. */
.help-topics ul ul > li:has(> ul) > a { color: var(--ink); font-weight: 700; }
.help-topics ul ul ul { list-style: disc; padding: 2px 0 10px 32px; }
.help-topics ul ul ul li::marker { color: var(--cyan); }
.help-topics ul ul ul a { padding: 4px 8px; font-size: 14px; }
