/* Help center (templates/support_center.html). The header and .card come
   from the "Tool layout" block in app.css; this file covers the search box,
   topic links, question lists and the "Still stuck?" cards. */

.help-page { max-width: 900px; }

/* Search (shown by help.js; without JavaScript every answer is still on the page) */
.help-search { margin: 8px 0 20px; }
.help-search label { display: block; margin: 0 0 8px; font-weight: 600; color: var(--text-primary); }
.help-search-field { position: relative; }
.help-search-field i {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  color: var(--text-tertiary); pointer-events: none;
}
.help-search-field .tool-input { padding-left: 44px; }
.help-search-count { min-height: 1.5em; margin: 8px 0 0; color: var(--text-secondary); font-size: 0.9rem; }

/* Topic links */
.help-topics { margin: 0 0 32px; }
.help-topics ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.help-topics a {
  display: inline-flex; align-items: center; min-height: 36px; padding: 6px 14px;
  border-radius: 999px; border: 1px solid var(--border-glass); background: var(--bg-card);
  color: var(--text-secondary); font-size: 0.88rem; text-decoration: none;
}
.help-topics a:hover { color: var(--text-primary); border-color: var(--accent-1); }
.help-topics a:focus-visible { outline: 2px solid var(--accent-1); outline-offset: 2px; }

/* Topic sections and questions */
.help-section { margin: 0 0 36px; scroll-margin-top: 96px; }
.help-section h2 {
  display: flex; align-items: center; gap: 10px; margin: 0 0 14px;
  font-family: var(--font-display); font-size: 1.35rem;
}
.help-section h2 i { color: var(--accent-1); }
.help-list { display: flex; flex-direction: column; gap: 8px; }

.help-item {
  border-radius: var(--radius-md); border: 1px solid var(--border-glass);
  background: var(--bg-card); scroll-margin-top: 96px;
}
.help-item[open] { border-color: var(--border-glow); }
.help-item summary {
  position: relative; display: block; padding: 14px 44px 14px 16px; cursor: pointer;
  font-weight: 600; color: var(--text-primary); list-style: none; border-radius: var(--radius-md);
}
.help-item summary::-webkit-details-marker { display: none; }
.help-item summary::after {
  content: ""; position: absolute; right: 18px; top: 50%; width: 8px; height: 8px;
  border-right: 2px solid var(--text-tertiary); border-bottom: 2px solid var(--text-tertiary);
  transform: translateY(-70%) rotate(45deg); transition: transform 0.2s;
}
.help-item[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.help-item summary:hover { color: var(--accent-1); }
.help-item summary:focus-visible { outline: 2px solid var(--accent-1); outline-offset: 2px; }

.help-answer { padding: 0 16px 14px; color: var(--text-secondary); line-height: 1.65; }
.help-answer p { margin: 0 0 10px; }
.help-answer p:last-child { margin-bottom: 0; }
.help-answer ul { margin: 0 0 10px; padding-left: 20px; }
.help-answer li { margin: 0 0 4px; }
.help-answer a { color: var(--accent-1); text-decoration: underline; text-underline-offset: 2px; }
.help-answer code { font-size: 0.9em; }

.help-section[hidden], .help-item[hidden], .help-empty[hidden], .help-search[hidden] { display: none; }
.help-empty { margin: 0 0 36px; padding: 16px; border-radius: var(--radius-md); border: 1px dashed var(--border-glass); color: var(--text-secondary); }

/* Still stuck? */
.help-stuck-lead { margin: 0 0 16px; color: var(--text-secondary); }
.help-stuck-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px;
  margin: 0; padding: 0; list-style: none;
}
.help-stuck-grid .card { display: flex; flex-direction: column; gap: 8px; }
.help-stuck-grid h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 1rem; }
.help-stuck-grid h3 i { color: var(--accent-1); }
.help-stuck-grid p { flex: 1; margin: 0; color: var(--text-secondary); font-size: 0.9rem; }
.help-stuck-grid .btn { align-self: flex-start; overflow-wrap: anywhere; }

@media (prefers-reduced-motion: reduce) {
  .help-item summary::after { transition: none; }
}
