/* Help centre (/help): sticky contents + live filter on the left, sections of expandable answers on the right.
   Flat: white sheets, 1px hairlines, 4px corners, one accent. Uses the tokens from app.css. */
.help { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 20px; align-items: start; }
.help-side { position: sticky; top: calc(var(--head-h) + 16px); display: flex; flex-direction: column; gap: 8px; min-width: 0; max-height: calc(100vh - var(--head-h) - 32px); }
.help-search input { width: 100%; height: 38px; border-radius: 4px; }
.help-count { margin: 0; min-height: 0; }
.help-count:empty { display: none; }

.help-toc { background: var(--sheet); border: 1px solid var(--line); border-radius: 4px; min-height: 0; overflow: auto; }
.help-toc > summary { list-style: none; cursor: pointer; padding: 10px 14px; font-weight: 650; display: flex; justify-content: space-between; align-items: center; }
.help-toc > summary::-webkit-details-marker { display: none; }
.help-toc > summary::after { content: ''; width: 7px; height: 7px; border-right: 1.5px solid var(--ink-2); border-bottom: 1.5px solid var(--ink-2); transform: rotate(45deg); transition: transform .2s var(--ease); }
.help-toc[open] > summary::after { transform: rotate(-135deg); }
.help-toc ul { list-style: none; margin: 0; padding: 6px 0; }
.help-toc li a { display: block; padding: 6px 14px; color: var(--ink-2); font-size: 13.5px; border-left: 2px solid transparent; transition: background .2s var(--ease), color .2s, border-color .2s; }
.help-toc li a:hover { background: var(--sheet-2); color: var(--ink); text-decoration: none; border-left-color: var(--line); }
.help-toc li a:focus-visible { outline-offset: -2px; }
.help-toc li a:active { background: var(--accent-wash); color: var(--accent-ink); border-left-color: var(--accent); }

.help-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.help-sec { background: var(--sheet); border: 1px solid var(--line); border-radius: 4px; scroll-margin-top: calc(var(--head-h) + 16px); }
.help-sec > header { padding: 16px 18px 12px; border-bottom: 1px solid var(--line-2); }
.help-sec > header h2 { font-size: 17px; }
.help-sec > header h2:focus { outline: none; }
.help-sec > header p { margin: 4px 0 0; color: var(--ink-2); }

.help-art { border-top: 1px solid var(--line-2); scroll-margin-top: calc(var(--head-h) + 16px); }
.help-sec > header + .help-art { border-top: 0; }
.help-art > summary { list-style: none; cursor: pointer; padding: 12px 18px 12px 40px; position: relative; font-weight: 600; color: var(--ink); transition: background .2s var(--ease), color .2s; overflow-wrap: anywhere; }
.help-art > summary::-webkit-details-marker { display: none; }
.help-art > summary::before { content: ''; position: absolute; left: 19px; top: 18px; width: 6px; height: 6px; border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3); transform: rotate(-45deg); transition: transform .2s var(--ease); }
.help-art > summary:hover { background: var(--sheet-2); color: var(--accent-ink); }
.help-art > summary:active { background: var(--accent-wash); }
.help-art > summary:focus-visible { outline-offset: -2px; }
.help-art[open] > summary { color: var(--accent-ink); }
.help-art[open] > summary::before { transform: rotate(45deg); top: 16px; border-color: var(--accent); }

.help-body { padding: 0 18px 14px 40px; max-width: 76ch; color: var(--ink); overflow-wrap: anywhere; }
.help-body ol, .help-body ul { margin: 0 0 .7em; padding-left: 20px; }
.help-body li { margin: 3px 0; }
.help-body li::marker { color: var(--ink-3); }
.help-body code { font-size: 12.5px; padding: 1px 5px; border: 1px solid var(--line); border-radius: 4px; background: var(--sheet-2); overflow-wrap: anywhere; }
.help-tip { padding: 8px 12px; border-left: 2px solid var(--accent); background: var(--accent-wash); color: var(--ink); }
.help-chips { display: inline-flex; flex-wrap: wrap; gap: 4px; vertical-align: middle; }
.help-chips span { font-size: 12px; padding: 1px 7px; border: 1px solid var(--line); border-radius: 4px; background: var(--sheet-2); color: var(--ink-2); white-space: nowrap; }
.help-perma { margin: 6px 0 0; }
.help-perma .btn { padding: 0 8px; margin-left: -8px; color: var(--ink-2); }
.help-perma .btn:hover { color: var(--accent-ink); }

.help-none { background: var(--sheet); border: 1px solid var(--line); border-radius: 4px; padding: 28px 18px; text-align: center; }

@media (max-width: 900px) {
  .help { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .help-side { position: static; max-height: none; }
  .help-toc { overflow: visible; }
  .help-toc ul { border-top: 1px solid var(--line-2); }
  .help-art > summary { padding-left: 34px; padding-right: 14px; }
  .help-art > summary::before { left: 14px; }
  .help-body { padding: 0 14px 14px 34px; }
  .help-sec > header { padding: 14px 14px 10px; }
}
@media (min-width: 901px) { .help-toc > summary { display: none; } }
@media (prefers-reduced-motion: reduce) { .help-toc > summary::after, .help-art > summary::before { transition: none; } }
