/* SPDX-License-Identifier: AGPL-3.0-only */
[data-tool="help"] .tools-content { max-width: 900px; margin-inline: auto; padding: 28px 36px 40px; }
.help-intro { margin-bottom: 24px; color: rgb(var(--nc-text-muted)); font-size: 15px; line-height: 1.9; }
.help-intro p { margin: 0; }
.help-search { position: relative; }
.help-search .tool-field input { min-height: 44px; padding: 10px 96px 10px 14px; border: 1px solid rgb(var(--nc-line) / .12); border-radius: 6px; }
.help-clear { position: absolute; inset: 0 4px 0 auto; padding: 0 12px; border: 0; background: transparent; color: rgb(var(--nc-text)); font: inherit; font-size: 12px; cursor: pointer; }
.help-clear:hover { text-decoration: underline; text-underline-offset: 4px; }
.help-search-status { margin: 16px 0 0; color: rgb(var(--nc-text-muted)); font-size: 13px; }
.help-search-status:empty { display: none; }
.help-topics { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 28px; }
.help-topic { min-height: 44px; max-width: 100%; padding: 9px 14px; border: 1px solid transparent; border-radius: 6px; background: rgb(var(--nc-line) / .045); color: rgb(var(--nc-text-muted)); font: inherit; font-size: 13px; line-height: 1.6; cursor: pointer; transition: background-color .15s, color .15s; }
.help-topic:hover { background: rgb(var(--nc-line) / .09); color: rgb(var(--nc-text)); }
.help-topic[aria-pressed="true"] { border-color: rgb(var(--nc-accent) / .6); background: rgb(var(--nc-composer)); color: rgb(var(--nc-text)); }
.tools-help { overflow-wrap: anywhere; }
.help-chapter { padding-top: 4px; }
.help-chapter:not([hidden]) ~ .help-chapter:not([hidden]) { margin-top: 28px; }
.help-chapter h2 { margin: 0 0 8px; font-size: 17px; font-weight: 600; line-height: 1.6; }
.help-chapter-intro { margin-bottom: 20px; color: rgb(var(--nc-text-muted)); }
.help-article { border-bottom: 1px solid rgb(var(--nc-line) / .14); }
.help-article summary { position: relative; display: flex; align-items: center; min-height: 56px; padding: 14px 40px 14px 12px; box-sizing: border-box; list-style: none; border-radius: 4px; font-size: 15px; line-height: 1.6; cursor: pointer; }
.help-article summary::-webkit-details-marker { display: none; }
.help-article summary::after { content: ''; position: absolute; right: 16px; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); color: rgb(var(--nc-text-muted)); }
.help-article[open] > summary::after { transform: rotate(225deg); }
.help-article summary:hover { background: rgb(var(--nc-line) / .045); }
.help-article[open] > summary { font-weight: 600; }
.help-article > .help-prose { padding: 4px 12px 22px; }
.help-prose { font-size: 15px; line-height: 1.95; }
.help-prose p { margin: 0 0 14px; }
.help-prose > :last-child { margin-bottom: 0; }
.help-prose :is(ul, ol) { margin: 0 0 16px; padding-left: 1.65em; }
.help-prose li + li { margin-top: 8px; }
.help-prose li::marker { color: rgb(var(--nc-text-muted)); }
.help-prose a { color: inherit; text-decoration: underline; text-underline-offset: .24em; text-decoration-color: rgb(var(--nc-line) / .45); }
.help-prose a:hover { color: rgb(var(--nc-accent-hover)); text-decoration-color: currentColor; }
.help-prose code { padding: 2px 5px; border-radius: 3px; background: rgb(var(--nc-composer)); font-size: .9em; }
.help-prose strong { font-weight: 600; }
.help-prose small { color: rgb(var(--nc-text-muted)); font-size: 13px; }
.help-prose table { width: 100%; table-layout: fixed; border-collapse: collapse; margin: 20px 0; font-size: 14px; line-height: 1.8; }
.help-prose :is(th, td) { padding: 12px 14px; border-bottom: 1px solid rgb(var(--nc-line) / .14); text-align: left; vertical-align: top; }
.help-prose th { background: rgb(var(--nc-line) / .045); font-weight: 500; }
.help-prose :is(th, td):first-child { width: 30%; padding-left: 10px; }
.help-footer { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 24px; }
.help-footer a { display: inline-flex; align-items: center; min-height: 44px; color: rgb(var(--nc-text-muted)); font-size: 13px; text-underline-offset: 4px; }
.help-footer a:hover { color: rgb(var(--nc-text)); }
[data-tool="help"] :is(h2, h3):focus-visible { outline: 2px solid rgb(var(--nc-accent)); outline-offset: 4px; }
@media (max-width: 768px) {
  [data-tool="help"] .tools-content { padding: 24px 20px calc(40px + env(safe-area-inset-bottom)); }
  .help-topics { gap: 6px; margin-block: 20px 24px; }
  .help-topic { padding-inline: 11px; }
  .help-article summary { padding-left: 4px; }
  .help-article > .help-prose { padding-inline: 4px; }
  .help-prose :is(th, td) { padding: 10px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .help-topic { transition: none; }
}
