/* ===================== HELP CENTER ===================== */

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Hero */
.help-hero {
  padding-top: 56px;
  padding-bottom: 64px;
}

.help-hero-inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.help-hero h1 {
  font-size: clamp(1.85rem, 4vw, 2.6rem);
  font-weight: 800;
  margin-bottom: 12px;
}

.help-hero-lead {
  font-size: 1.05rem;
  color: var(--muted);
  margin: 0 auto 28px;
  max-width: 620px;
}

/* Search */
.help-search {
  display: flex;
  gap: 8px;
  align-items: stretch;
  background: var(--card);
  padding: 8px;
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.help-search-hero {
  max-width: 680px;
  margin: 0 auto;
}

.help-search-input {
  flex: 1;
  min-width: 0;
  border: none;
  box-shadow: none;
  background: transparent;
}

.help-search-input:focus {
  box-shadow: none;
}

.help-search-page-head {
  max-width: 760px;
  margin-bottom: 24px;
}

.help-search-page-head h1 {
  margin-bottom: 20px;
}

.help-search-summary {
  color: var(--muted);
  margin-bottom: 24px;
}

.help-search-inline {
  flex: 1;
  min-width: 220px;
  max-width: 420px;
}

/* Category grid */
.help-cat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.help-cat-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-align: left;
}

.help-cat-card-icon {
  margin-bottom: 4px;
}

.help-cat-card-desc {
  flex: 1;
}

.help-cat-card-count {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 16px;
}

/* Lists */
.help-lists-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.help-list-head {
  margin-bottom: 16px;
}

.help-list-head h2 {
  font-size: 1.15rem;
}

.help-link-list,
.help-article-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.help-link-item + .help-link-item,
.help-article-list-item + .help-article-list-item {
  margin-top: 10px;
}

.help-link-item-anchor {
  display: block;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.help-link-item-anchor:hover {
  border-color: rgba(0, 87, 231, 0.35);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
  color: var(--text);
}

.help-link-item-title {
  display: block;
  font-weight: 600;
  line-height: 1.35;
}

.help-link-item-meta {
  display: block;
  margin-top: 4px;
  font-size: 0.82rem;
  color: var(--muted);
}

/* Search results */
.help-search-result-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
}

.help-search-result-title {
  font-size: 1.1rem;
  margin: 0 0 6px;
}

.help-search-result-title a {
  color: var(--text);
  text-decoration: none;
}

.help-search-result-title a:hover {
  color: var(--primary);
}

.help-search-result-category {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 8px;
}

.help-search-result-snippet {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.help-search-result-snippet mark,
.help-search-result-title mark {
  background: #fff3bf;
  color: inherit;
  padding: 0 2px;
  border-radius: 3px;
}

/* Category page */
.help-category-header {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 28px;
}

.help-category-icon {
  flex-shrink: 0;
}

.help-category-intro h1 {
  margin-bottom: 8px;
}

.help-category-desc {
  color: var(--muted);
  margin-bottom: 8px;
}

.help-category-count {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0;
}

.help-category-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.help-sort-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.help-sort-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition);
}

.help-sort-link:hover,
.help-sort-link.is-active {
  border-color: var(--primary);
  color: var(--primary);
  background: #eef4ff;
}

.help-article-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}

.help-article-card-body {
  flex: 1;
  min-width: 0;
}

.help-article-card-title {
  font-size: 1.05rem;
  margin: 0 0 6px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.help-article-card-title a {
  color: var(--text);
  text-decoration: none;
}

.help-article-card-title a:hover {
  color: var(--primary);
}

.help-article-card-excerpt {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.help-article-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  font-size: 0.82rem;
  color: var(--muted);
}

.help-article-card-meta i {
  margin-right: 4px;
  color: var(--primary);
}

.help-article-card-link {
  flex-shrink: 0;
  white-space: nowrap;
}

/* Badges */
.help-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.help-badge-featured {
  background: #eef4ff;
  color: var(--primary);
  border: 1px solid rgba(0, 87, 231, 0.2);
}

.help-badge-important {
  background: #fff4e5;
  color: #b45309;
  border: 1px solid rgba(180, 83, 9, 0.2);
}

/* Article layout */
.help-article-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.help-article-main {
  min-width: 0;
}

.help-article-header h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 12px;
}

.help-article-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.help-article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 0.86rem;
  color: var(--muted);
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.help-article-meta i {
  margin-right: 4px;
  color: var(--primary);
}

/* TOC */
.help-toc-wrap {
  position: sticky;
  top: 92px;
}

.help-toc {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}

.help-toc-mobile {
  display: none;
}

.help-toc-desktop {
  display: block;
}

.help-toc-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0 0 12px;
}

.help-toc-toggle {
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
  list-style: none;
}

.help-toc-toggle::-webkit-details-marker {
  display: none;
}

.help-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.help-toc-item + .help-toc-item {
  margin-top: 6px;
}

.help-toc-item a {
  display: block;
  font-size: 0.88rem;
  color: var(--muted);
  text-decoration: none;
  line-height: 1.4;
  padding: 4px 0;
  border-left: 2px solid transparent;
  padding-left: 10px;
  transition: color var(--transition), border-color var(--transition);
}

.help-toc-item a:hover {
  color: var(--primary);
  border-left-color: var(--primary);
}

.help-toc-level-3 a {
  padding-left: 22px;
  font-size: 0.84rem;
}

.help-toc-level-4 a {
  padding-left: 34px;
  font-size: 0.82rem;
}

/* Article content */
.help-article-content {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  overflow-wrap: anywhere;
}

.help-article-content h2,
.help-article-content h3,
.help-article-content h4 {
  scroll-margin-top: 96px;
  margin: 1.6em 0 0.6em;
}

.help-article-content p {
  margin: 0 0 1em;
}

.help-article-content ul,
.help-article-content ol {
  margin: 0 0 1em;
  padding-left: 1.4em;
}

.help-article-content a {
  color: var(--primary);
}

.help-article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.2em;
  font-size: 0.92rem;
}

.help-article-content th,
.help-article-content td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
}

.help-article-content th {
  background: #f7f9fc;
}

.help-article-content img {
  border-radius: 12px;
  margin: 0.5em 0 1em;
}

.help-article-content blockquote {
  margin: 0 0 1em;
  padding: 12px 16px;
  border-left: 4px solid var(--primary);
  background: #f7f9fc;
  border-radius: 0 12px 12px 0;
}

/* Info boxes */
.help-box,
.help-article-content .help-box-info,
.help-article-content .help-box-important,
.help-article-content .help-box-warning,
.help-article-content .help-box-tip {
  margin: 0 0 1.2em;
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.help-box-label {
  padding: 8px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.help-box-body {
  padding: 14px 16px;
}

.help-box-body > :last-child {
  margin-bottom: 0;
}

.help-box-info,
.help-article-content .help-box-info {
  background: #eef4ff;
  border-color: rgba(0, 87, 231, 0.2);
}

.help-box-info .help-box-label {
  background: rgba(0, 87, 231, 0.1);
  color: var(--primary-dark);
}

.help-box-important,
.help-article-content .help-box-important {
  background: #fff4e5;
  border-color: rgba(180, 83, 9, 0.25);
}

.help-box-important .help-box-label {
  background: rgba(180, 83, 9, 0.12);
  color: #b45309;
}

.help-box-warning,
.help-article-content .help-box-warning {
  background: #fff1f2;
  border-color: rgba(229, 0, 43, 0.2);
}

.help-box-warning .help-box-label {
  background: rgba(229, 0, 43, 0.1);
  color: var(--accent);
}

.help-box-tip,
.help-article-content .help-box-tip {
  background: #ecfdf5;
  border-color: rgba(16, 185, 129, 0.25);
}

.help-box-tip .help-box-label {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}

/* Code blocks */
.help-code-wrap {
  position: relative;
  margin: 0 0 1.2em;
  max-width: 100%;
}

.help-code-block,
.help-article-content pre,
.help-article-content pre.help-code {
  position: relative;
  margin: 0;
  padding: 16px 18px;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 12px;
  overflow-x: auto;
  max-width: 100%;
  font-size: 0.88rem;
  line-height: 1.55;
  -webkit-overflow-scrolling: touch;
}

.help-article-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.help-article-content :not(pre) > code {
  background: #eef4ff;
  color: var(--primary-dark);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.88em;
}

.help-code-copy {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff !important;
  padding: 6px 12px;
  font-size: 0.78rem;
  border-radius: 8px;
  backdrop-filter: blur(4px);
}

.help-code-copy:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff !important;
}

.help-code-copy.is-copied {
  background: rgba(34, 197, 94, 0.25);
  border-color: rgba(34, 197, 94, 0.45);
}

/* Rating */
.help-rating {
  margin-top: 40px;
  padding: 24px;
  background: #f7f9fc;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.help-rating h2 {
  font-size: 1.1rem;
  margin-bottom: 16px;
}

.help-rating-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.help-rating-comment-wrap {
  margin-top: 16px;
}

.help-rating-comment-wrap label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.help-rating-comment-wrap textarea {
  margin-bottom: 10px;
  resize: vertical;
}

.help-rating-thanks {
  margin: 0;
  color: var(--primary);
  font-weight: 600;
}

/* Prev / next */
.help-article-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.help-article-nav-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.help-article-nav-link:hover {
  border-color: rgba(0, 87, 231, 0.35);
  box-shadow: var(--shadow-sm);
  color: var(--text);
}

.help-article-nav-next {
  text-align: right;
}

.help-article-nav-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.help-article-nav-title {
  font-weight: 600;
  line-height: 1.35;
}

/* Related */
.help-related {
  margin-top: 36px;
}

.help-related h2 {
  font-size: 1.15rem;
  margin-bottom: 14px;
}

/* Empty states */
.help-empty-state {
  text-align: center;
  max-width: 520px;
  margin: 32px auto;
  padding: 32px 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.help-empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #eef4ff;
  color: var(--primary);
  font-size: 1.3rem;
}

.help-empty-state h2 {
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.help-empty-state p {
  color: var(--muted);
  margin-bottom: 12px;
}

.help-empty-note {
  color: var(--muted);
  margin: 0;
}

.help-back-link {
  margin-top: 32px;
}

.help-back-link a {
  font-weight: 600;
}

.help-breadcrumb {
  margin-bottom: 24px;
}

/* Responsive */
@media (max-width: 991px) {
  .help-article-layout {
    grid-template-columns: 1fr;
  }

  .help-toc-wrap {
    position: static;
  }

  .help-toc-mobile {
    display: block;
    margin-bottom: 20px;
  }

  .help-toc-desktop {
    display: none;
  }

  .help-cat-grid,
  .help-lists-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .help-hero {
    padding-top: 40px;
    padding-bottom: 48px;
  }

  .help-search,
  .help-search-hero,
  .help-search-inline {
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    padding: 12px;
  }

  .help-search .form-control,
  .help-search .btn {
    width: 100%;
    max-width: 100%;
  }

  .help-cat-grid,
  .help-lists-grid {
    grid-template-columns: 1fr;
  }

  .help-category-header {
    flex-direction: column;
  }

  .help-category-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .help-search-inline {
    max-width: none;
  }

  .help-article-card {
    flex-direction: column;
    align-items: stretch;
  }

  .help-article-card-link {
    width: 100%;
  }

  .help-article-nav {
    grid-template-columns: 1fr;
  }

  .help-article-nav-next {
    text-align: left;
  }

  .help-code-block,
  .help-article-content pre {
    font-size: 0.82rem;
    padding-top: 42px;
  }
}

@media (max-width: 480px) {
  .help-sort-nav {
    width: 100%;
  }

  .help-sort-link {
    flex: 1 1 calc(50% - 8px);
    justify-content: center;
  }
}

/* ===== Editor images & modern boxes ===== */
.help-article-content .help-image,
.help-article-content figure.help-image {
  margin: 1.25em 0;
  max-width: 100%;
}
.help-article-content .help-image img,
.help-article-content .help-image__img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}
.help-article-content .help-image--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.help-article-content .help-image--center img {
  margin-left: auto;
  margin-right: auto;
}
.help-article-content .help-image--left {
  float: left;
  margin: 0.25em 1.25em 1em 0;
  max-width: 48%;
  text-align: left;
}
.help-article-content .help-image--right {
  float: right;
  margin: 0.25em 0 1em 1.25em;
  max-width: 48%;
  text-align: right;
}
.help-article-content .help-image--full {
  width: 100%;
  max-width: 100%;
  clear: both;
}
.help-article-content .help-image--full img {
  width: 100%;
}
.help-article-content .help-image--size-thumb { max-width: 150px; }
.help-article-content .help-image--size-small { max-width: 320px; }
.help-article-content .help-image--size-medium { max-width: 640px; }
.help-article-content .help-image--size-large { max-width: 1200px; }
.help-article-content .help-image--size-original { max-width: 100%; }
.help-article-content .help-image--size-thumb.help-image--left,
.help-article-content .help-image--size-thumb.help-image--right {
  max-width: 150px;
}
.help-article-content .help-image--size-small.help-image--left,
.help-article-content .help-image--size-small.help-image--right {
  max-width: 320px;
}
.help-article-content figcaption {
  margin-top: 0.5em;
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
}
.help-article-content .help-image-link {
  display: inline-block;
  max-width: 100%;
}
.help-article-content .help-box__title {
  padding: 8px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.help-article-content .help-box__content {
  padding: 14px 16px;
}
.help-article-content .help-box__content > :last-child {
  margin-bottom: 0;
}
.help-article-content .help-box--info {
  background: #eef4ff;
  border-color: rgba(0, 87, 231, 0.2);
}
.help-article-content .help-box--info .help-box__title {
  background: rgba(0, 87, 231, 0.1);
  color: var(--primary-dark);
}
.help-article-content .help-box--important {
  background: #fff4e5;
  border-color: rgba(180, 83, 9, 0.25);
}
.help-article-content .help-box--important .help-box__title {
  background: rgba(180, 83, 9, 0.12);
  color: #b45309;
}
.help-article-content .help-box--warning {
  background: #fff1f2;
  border-color: rgba(229, 0, 43, 0.2);
}
.help-article-content .help-box--warning .help-box__title {
  background: rgba(229, 0, 43, 0.1);
  color: var(--accent);
}
.help-article-content .help-box--tip {
  background: #ecfdf5;
  border-color: rgba(16, 185, 129, 0.25);
}
.help-article-content .help-box--tip .help-box__title {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}
.help-article-content .help-table-wrap,
.help-article-content {
  overflow-wrap: anywhere;
}
.help-article-content table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 0 0 1.2em;
}
.help-article-content th,
.help-article-content td {
  border: 1px solid var(--border);
  padding: 8px 12px;
  text-align: left;
}
.help-article-content thead th {
  background: #f1f5f9;
  font-weight: 700;
}
@media (max-width: 768px) {
  .help-article-content .help-image--left,
  .help-article-content .help-image--right {
    float: none;
    max-width: 100%;
    margin: 1em 0;
  }
}
