/* ==========================================================================
   Page — Help (/help: web/custom/help, the app's /support: web/help; markup help-center.html)
   Page hero, FAQ (components/faq.css) with search + topic groups (js/help.js) and the contact form.
   ========================================================================== */

/* ---------- Search above the FAQ ---------- */
.help-search {
  position: relative;
  display: flex; align-items: center; gap: 8px;
  max-width: 560px;
  margin: 0 0 16px;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  transition: border-color .2s, box-shadow .2s;
}
.help-search:focus-within { border-color: var(--primary); box-shadow: var(--ring), var(--shadow-md); }
.help-search__icon { position: absolute; left: 18px; width: 18px; height: 18px; color: var(--subtle); pointer-events: none; }
.help-search__input {
  flex: 1; min-width: 0;
  height: 44px;
  padding: 0 8px 0 40px;
  border: 0; outline: 0;
  background: transparent;
  font-size: 15px;
  color: var(--ink);
}
.help-search__input:focus-visible { outline: 0; }
.help-search__input::placeholder { color: var(--subtle); }
.help-search__btn { height: 44px; }

.help-topics { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.help-topics--hero { justify-content: center; margin-top: 24px; }
.help-topic {
  display: inline-flex; align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: border-color .2s, color .2s;
}
.help-topic svg { width: 16px; height: 16px; color: var(--primary); }
.help-topic:hover { border-color: var(--primary-100); color: var(--primary); }

/* ---------- Sections ---------- */
.help-section { padding-block: 72px; scroll-margin-top: var(--nav-h); }
.help-section--soft { border-top: 1px solid var(--border-soft); background: var(--bg-soft); }
.help-narrow { max-width: 880px; }
.help-section__head { margin-bottom: 24px; }
.help-section__title { font-size: clamp(1.6rem, 3vw, 2rem); line-height: 1.2; font-weight: 800; letter-spacing: -.03em; color: var(--ink); }
.help-section__text { margin-top: 8px; font-size: 16px; color: var(--muted); }

.help-card {
  padding: 8px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-soft);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

/* ---------- FAQ groups (item field "topic") ---------- */
.help-group { margin-top: 28px; scroll-margin-top: calc(var(--nav-h, 64px) + 16px); }
.help-group__title { margin-bottom: 10px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--primary); }
.help-empty { margin-top: 28px; }

/* ---------- Contact ---------- */
.help-contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 56px; align-items: start; }

.help-info { display: flex; flex-direction: column; gap: 20px; margin-top: 32px; }
.help-info__item { display: flex; align-items: flex-start; gap: 14px; }
/* .icon-tile .icon-tile--xl .icon-tile--indigo */
.help-info__label { font-size: 13px; font-weight: 600; color: var(--subtle); }
.help-info__value { font-size: 15px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.help-info__value--link { color: var(--primary); }
.help-info__value--link:hover { text-decoration: underline; }

.help-form-card { display: flex; flex-direction: column; gap: 16px; padding: 28px; }
.help-form__foot {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
}
.help-form__note { flex: 1; min-width: 200px; font-size: 13px; color: var(--muted); }

/* Honeypot: out of sight for people (not display:none — some bots skip hidden fields) */
.help-form__trap { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.help-form { position: relative; }
.help-form__status:not(:has(*)) { display: none; }   /* filled after sending (redirect or js/help.js) */

/* ---------- In the app (/support, layouts.app): no page-wide bands, the content area's own width ---------- */
.help-app .help-section { padding-block: 28px 0; }
.help-app .help-section--soft { border-top: 0; background: transparent; }
.help-app .help-section .container { max-width: none; padding-inline: 0; }
.help-app .help-narrow { max-width: 880px; }
.help-app .help-contact { gap: 32px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .help-contact { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}

@media (max-width: 720px) {
  .help-section { padding-block: 48px; }
  .help-card { padding: 4px 16px; }
  .help-form-card { padding: 20px; }
  .help-search__input { font-size: 16px; }
  /* FAQ topic chips: one row to swipe */
  .help-topics:not(.help-topics--hero) { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding: 2px 16px 6px; scrollbar-width: none; }
  .help-topics:not(.help-topics--hero)::-webkit-scrollbar { display: none; }
  .help-topics:not(.help-topics--hero) .help-topic { flex: none; white-space: nowrap; }
}

@media (max-width: 560px) {
  .help-search__btn { display: none; }
  .help-form__foot > .btn { width: 100%; }
}
