/* Help Center layout. The shared foundation comes from the Travel Rules hub. */

.help-center-page {
  padding-top: 48px;
  padding-bottom: 36px;
}

.help-center-page .help-hero {
  margin-bottom: 34px;
}

.help-center-page .help-hero .hero-copy {
  padding-top: 0;
}

.help-center-page .help-hero h1 {
  margin-top: 0;
}

.help-center-page .help-hero .subtitle {
  max-width: 54ch;
}

.help-center-page .help-hero .search-heading { display: none; }
.help-center-page .help-hero .search-mobile-active .search-heading { display: flex; }

.help-center-page .help-hub-content {
  margin-top: 0;
}

.help-topic-list {
  display: grid;
  gap: 12px;
}

.help-topic {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: color-mix(in srgb, var(--bg-elevated) 62%, transparent);
}

.help-topic[hidden] { display: none !important; }

.help-topic > summary {
  min-height: 54px;
  padding: 14px 44px 14px 18px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  font-size: 0.95rem;
  font-weight: 720;
  line-height: 1.4;
  letter-spacing: -0.015em;
}

.help-topic > summary::-webkit-details-marker { display: none; }

.help-topic > summary h2 {
  margin: 0;
  font: inherit;
}

.help-topic > summary::after {
  content: "";
  position: absolute;
  right: 19px;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--muted-2);
  border-bottom: 1.5px solid var(--muted-2);
  transform: translateY(-2px) rotate(45deg);
  transition: transform 150ms ease;
}

.help-topic[open] > summary::after {
  transform: translateY(2px) rotate(225deg);
}

.help-topic > summary:hover {
  background: color-mix(in srgb, var(--blue) 6%, transparent);
}

.help-topic-count {
  color: var(--muted-2);
  font-size: 0.78rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.help-list {
  border-top: 1px solid var(--line);
}

.help-item {
  position: relative;
  display: block;
  min-height: 64px;
  padding: 14px 44px 14px 18px;
  border-top: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  transition: background 140ms ease;
}

.help-item:first-child { border-top: 0; }
.help-item[hidden] { display: none !important; }

.help-item h3 {
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.4;
  letter-spacing: -0.015em;
}

.help-item p {
  max-width: 72ch;
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.help-item::after,
.help-secondary-link > span:last-child {
  color: var(--muted-2);
  font-size: 1.35rem;
  font-weight: 400;
}

.help-item::after {
  content: "\203A";
  position: absolute;
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
}

.help-item:hover {
  background: color-mix(in srgb, var(--blue) 7%, transparent);
}

.help-item:hover h3 { color: var(--blue); }

.help-secondary-link {
  min-height: 68px;
  margin-top: 18px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: inherit;
  text-decoration: none;
  background: color-mix(in srgb, var(--blue) 5%, transparent);
}

.help-secondary-link strong,
.help-secondary-link small { display: block; }

.help-secondary-link strong {
  color: var(--text);
  font-size: 0.94rem;
}

.help-secondary-link small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.help-secondary-link:hover {
  border-color: var(--line-strong);
  background: color-mix(in srgb, var(--blue) 9%, transparent);
}

.support-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  max-width: 840px;
  margin: 30px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.support-note h2 {
  margin: 0 0 3px;
  color: var(--text);
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.support-note p {
  max-width: 65ch;
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.support-note > a {
  flex: none;
  color: var(--blue);
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
}

.support-note > a:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

@media (max-width: 760px) {
  .help-center-page {
    padding-top: 26px;
    padding-bottom: 0;
  }

  .help-center-page .help-hero {
    margin-bottom: 26px;
    text-align: left;
  }

  .help-center-page .help-hero h1 {
    max-width: none;
    margin-inline: 0;
    font-size: clamp(2rem, 10vw, 2.55rem);
  }

  .help-center-page .help-hero .subtitle {
    margin-inline: 0;
    font-size: 0.98rem;
  }

  .help-center-page .help-hero .library-search-inline {
    max-width: none;
    margin-top: 20px;
  }

  .help-topic-list { gap: 10px; }
  .help-topic > summary { min-height: 56px; }
  .help-topic-count { display: none; }
  .help-item { min-height: 62px; padding-top: 13px; padding-bottom: 13px; }

  .support-note {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
    margin-top: 26px;
  }

  .support-note > a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

@media (max-width: 420px) {
  .help-item p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
}

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

/* Editorial entry point for a first-time visitor. Deliberately not a
   "Popular" list: the ordering is chosen, not derived from analytics. */
.help-start-here {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto 34px;
}
.help-start-here > h2 {
  margin: 0 0 12px;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}
.help-start-here .help-list {
  border: 1px solid color-mix(in srgb, var(--blue) 26%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--blue) 7%, transparent);
  overflow: hidden;
}
@media (max-width: 760px) {
  .help-start-here { width: min(var(--max), calc(100% - 28px)); margin-bottom: 26px; }
}
