/*
  Urban Chat — Help Center docs layout.
  RoomStamp structure (Resources rail + article) with Urban Chat DNA (red / gold / hard border).
  Surfaces: use sunken near-black plates (not muted warm charcoal — Heat muted reads brown).
*/

#page-help:not(.hidden-page),
#page-help-guides:not(.hidden-page),
#page-help-faq:not(.hidden-page),
#page-help-safety:not(.hidden-page),
#page-help-guidelines:not(.hidden-page),
#page-help-privacy:not(.hidden-page),
#page-accessibility:not(.hidden-page),
#page-terms:not(.hidden-page) {
  /* Sunken = near-neutral black on Heat; muted/soft are warm #1c/#24 red-brown. */
  --uc-help-bg: var(--uc-surface-sunken);
  --uc-help-panel: var(--uc-surface-sunken);
  --uc-help-rail: var(--uc-surface-sunken);
  --uc-help-text: var(--uc-text);
  --uc-help-muted: var(--uc-text-secondary);
  --uc-help-line: var(--uc-border-strong);
  --uc-help-line-soft: var(--uc-border);
  --uc-help-red: var(--uc-primary);
  --uc-help-red-deep: var(--uc-primary-dark);
  --uc-help-gold: var(--uc-gold-dim);
  --uc-help-gold-soft: var(--uc-warning-surface);
  /* Active fill stays the same plate as the rail — border + dual-gold red mark it. */
  --uc-help-active: var(--uc-surface-sunken);
  display: block;
  min-height: 70vh;
  background: var(--uc-surface-sunken);
  color: var(--uc-help-text);
}

#page-help.hidden-page,
#page-help-guides.hidden-page,
#page-help-faq.hidden-page,
#page-help-safety.hidden-page,
#page-help-guidelines.hidden-page,
#page-help-privacy.hidden-page,
#page-accessibility.hidden-page,
#page-terms.hidden-page {
  display: none !important;
}

#page-help > main.container,
#page-help-guides > main.container,
#page-help-faq > main.container,
#page-help-safety > main.container,
#page-help-guidelines > main.container,
#page-help-privacy > main.container,
#page-accessibility > main.container,
#page-terms > main.container {
  max-width: 1280px;
  padding-top: 1rem;
  padding-bottom: 2.25rem;
}

#page-help .uc-help-center-card,
#page-help-guides .uc-help-center-card,
#page-help-faq .uc-help-center-card,
#page-help-safety .uc-help-center-card,
#page-help-guidelines .uc-help-center-card,
#page-help-privacy .uc-help-center-card,
#page-accessibility .uc-help-center-card,
#page-terms .uc-help-center-card,
#page-help .main-card.uc-help-center-card,
#page-help-guides .main-card.uc-help-center-card,
#page-help-faq .main-card.uc-help-center-card,
#page-help-safety .main-card.uc-help-center-card,
#page-help-guidelines .main-card.uc-help-center-card,
#page-help-privacy .main-card.uc-help-center-card,
#page-accessibility .main-card.uc-help-center-card,
#page-terms .main-card.uc-help-center-card {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  overflow: visible !important;
  transform: none !important;
}

#page-help .uc-help-center-card:hover,
#page-help-guides .uc-help-center-card:hover,
#page-help-faq .uc-help-center-card:hover,
#page-help-safety .uc-help-center-card:hover,
#page-help-guidelines .uc-help-center-card:hover,
#page-help-privacy .uc-help-center-card:hover,
#page-accessibility .uc-help-center-card:hover,
#page-terms .uc-help-center-card:hover {
  transform: none !important;
  box-shadow: none !important;
}

.uc-help-center-shell {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0;
  color: var(--uc-help-text, var(--uc-border-strong));
}

.uc-help-center-grid {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: start;
}

.uc-help-center-tabs {
  display: block !important;
  border: 2px solid var(--uc-help-line, var(--uc-border-strong));
  border-radius: 8px;
  padding: 0.85rem;
  background: var(--uc-help-rail, var(--uc-surface-sunken));
  box-shadow: 3px 3px 0 var(--uc-shadow-ink-soft);
}

.uc-help-center-sidegroup + .uc-help-center-sidegroup {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 2px solid var(--uc-help-line-soft, var(--uc-border));
}

.uc-help-center-sidegroup__title {
  display: block !important;
  margin: 0 0 0.45rem;
  color: var(--uc-help-red, var(--uc-primary));
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 900;
}

.uc-help-center-tablist {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 0.22rem !important;
  margin: 0;
  padding: 0;
}

.uc-help-center-tab {
  display: block !important;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid transparent !important;
  border-radius: 6px;
  text-align: left !important;
  text-decoration: none !important;
  background: transparent !important;
  color: var(--uc-help-muted, var(--uc-text-secondary)) !important;
  padding: 0.5rem 0.6rem;
  font: inherit;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}

.uc-help-center-tab:hover,
.uc-help-center-tab:focus-visible {
  background: color-mix(in srgb, var(--uc-gold) 10%, var(--uc-help-rail, var(--uc-surface-sunken))) !important;
  color: var(--uc-help-text, var(--uc-text)) !important;
  border-color: var(--uc-gold-dim) !important;
  outline: none;
}

.uc-help-center-tab.is-active,
.uc-help-center-tab[aria-current="page"] {
  background: var(--uc-help-active, var(--uc-surface-sunken)) !important;
  color: var(--uc-help-text, var(--uc-text)) !important;
  border-color: var(--uc-help-red, var(--uc-primary)) !important;
  box-shadow: inset 4px 0 0 var(--uc-help-red, var(--uc-primary));
}

.uc-help-center-tab.is-active .uc-help-center-tab__title,
.uc-help-center-tab[aria-current="page"] .uc-help-center-tab__title {
  color: var(--uc-help-text, var(--uc-text)) !important;
}

.uc-help-center-tab.is-active .uc-help-center-tab__meta,
.uc-help-center-tab[aria-current="page"] .uc-help-center-tab__meta {
  color: var(--uc-help-muted, var(--uc-text-secondary)) !important;
  opacity: 0.9;
}

.uc-help-center-tab__title {
  display: block !important;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: inherit;
}

.uc-help-center-tab__meta {
  display: block !important;
  margin-top: 0.1rem;
  font-size: 0.72rem;
  line-height: 1.3;
  font-weight: 600;
  color: inherit;
  opacity: 0.82;
}

.uc-help-center-panel-wrap {
  display: block !important;
  min-width: 0;
}

.uc-help-center-panel {
  display: block !important;
  max-width: 820px;
  border: 2px solid var(--uc-help-line, var(--uc-border-strong));
  border-radius: 8px;
  background: var(--uc-help-panel, var(--uc-surface));
  box-shadow: 4px 4px 0 var(--uc-shadow-ink-soft);
  padding: clamp(1rem, 2.4vw, 1.6rem) clamp(1rem, 2.4vw, 1.6rem) clamp(1.25rem, 2.6vw, 1.85rem);
}

.uc-help-center-panel__header--hero {
  display: block !important;
  margin: -0.15rem 0 0;
  padding: 0 0 1rem;
  border-bottom: 3px solid var(--uc-help-red, var(--uc-primary));
}

.uc-help-center-panel__eyebrow {
  display: inline-block !important;
  margin: 0 0 0.45rem;
  padding: 0.18rem 0.5rem;
  background: var(--uc-help-red-deep, var(--uc-primary-dark));
  color: var(--uc-text-on-primary) !important;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  font-weight: 900;
  text-transform: uppercase;
  border-radius: 999px;
}

.uc-help-center-panel__header--hero h1,
.uc-help-center-panel__header--hero h2 {
  display: block !important;
  margin: 0;
  font-size: clamp(1.55rem, 3.4vw, 2.35rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--uc-help-text, var(--uc-border-strong)) !important;
  font-weight: 900;
  text-wrap: balance;
}

.uc-help-center-panel__header--hero > p {
  display: block !important;
  margin: 0.65rem 0 0;
  color: var(--uc-help-muted, var(--uc-text-secondary));
  line-height: 1.55;
  max-width: 62ch;
  font-size: 0.92rem;
  font-weight: 600;
}

.uc-help-center-section {
  display: block !important;
  margin-top: 1.25rem;
}

.uc-help-center-section > h2,
.uc-help-center-section > h3 {
  display: block !important;
  margin: 0 0 0.7rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--uc-help-red, var(--uc-primary)) !important;
  font-weight: 900;
}

.uc-help-center-guides {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

.uc-help-center-guide,
.uc-help-card,
.uc-help-topic {
  display: block !important;
  border: 2px solid var(--uc-help-line, var(--uc-border-strong));
  border-radius: 8px;
  background: var(--uc-help-panel, var(--uc-surface-sunken));
  padding: 0.9rem 1rem;
  text-decoration: none !important;
  color: inherit !important;
  box-sizing: border-box;
  box-shadow: 2px 2px 0 var(--uc-shadow-ink-soft);
}

a.uc-help-center-guide:hover,
a.uc-help-center-guide:focus-visible {
  background: var(--uc-accent-wash);
  outline: none;
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--uc-shadow-ink-soft);
}

.uc-help-center-guide h3,
.uc-help-card h3,
.uc-help-topic h3 {
  display: block !important;
  margin: 0;
  font-size: 0.98rem;
  font-weight: 900;
  color: var(--uc-help-text, var(--uc-border-strong)) !important;
}

.uc-help-center-guide p,
.uc-help-card p,
.uc-help-topic p {
  display: block !important;
  margin: 0.4rem 0 0;
  color: var(--uc-help-muted, var(--uc-text-secondary));
  font-size: 0.86rem;
  line-height: 1.5;
  font-weight: 600;
}

.uc-help-card + .uc-help-card,
.uc-help-topic + .uc-help-topic {
  margin-top: 0.65rem;
}

.uc-help-card ul {
  display: block !important;
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  color: var(--uc-help-muted, var(--uc-text-secondary));
  font-size: 0.86rem;
  line-height: 1.5;
  font-weight: 600;
}

.uc-help-card li + li {
  margin-top: 0.28rem;
}

.uc-help-topic {
  scroll-margin-top: 6rem;
}

.uc-help-topic__kicker {
  display: inline-block !important;
  margin: 0 0 0.35rem;
  padding: 0.12rem 0.42rem;
  background: var(--uc-help-red-deep, var(--uc-primary-dark));
  color: var(--uc-text-on-primary) !important;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 999px;
}

.uc-help-center-footlinks {
  display: block !important;
  margin-top: 1.25rem;
  padding-top: 0.9rem;
  border-top: 2px solid var(--uc-help-line-soft, var(--uc-border));
  color: var(--uc-help-muted, var(--uc-text-secondary));
  font-size: 0.84rem;
  font-weight: 650;
}

.uc-help-center-footlinks--inline {
  margin-top: 0.5rem;
  padding-top: 0;
  border-top: 0;
}

.uc-help-center-footlinks a,
.uc-help-center-footlinks button {
  color: var(--uc-help-gold, var(--uc-gold-dim)) !important;
  font-weight: 900;
  text-decoration: underline;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
}

.uc-help-center-panel a.uc-link-gold,
.uc-help-card a {
  color: var(--uc-help-red, var(--uc-primary)) !important;
  font-weight: 800;
}

@media (max-width: 899px) {
  .uc-help-center-tabs {
    box-shadow: 2px 2px 0 var(--uc-shadow-ink-soft);
    padding: 0.7rem;
  }

  .uc-help-center-tab {
    padding: 0.42rem 0.5rem;
  }

  .uc-help-center-tab__meta {
    font-size: 0.68rem;
  }

  .uc-help-center-panel {
    box-shadow: 3px 3px 0 var(--uc-shadow-ink-soft);
    padding: 0.95rem;
  }

  .uc-help-center-panel__header--hero h1,
  .uc-help-center-panel__header--hero h2 {
    font-size: 1.45rem;
  }
}

@media (min-width: 900px) {
  .uc-help-center-grid {
    grid-template-columns: 240px minmax(0, 1fr) !important;
    gap: 1.25rem;
  }

  .uc-help-center-tabs {
    position: sticky;
    top: 5.25rem;
  }

  .uc-help-center-guides {
    grid-template-columns: 1fr 1fr !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  a.uc-help-center-guide {
    transition: none;
  }
}

/* ==========================================================================
   FAQ Page — searchable questions with collapsible sections
   ========================================================================== */

#page-help-faq .uc-faq-search-wrap {
  margin: 0 0 20px;
}

#page-help-faq .uc-faq-search {
  width: 100%;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 14px;
}

#page-help-faq .uc-faq-search-empty {
  margin: 12px 0 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--uc-text-muted);
}

#page-help-faq .uc-faq-section {
  margin-bottom: 16px;
  border: 1px solid var(--uc-surface-sunken);
  border-radius: 12px;
  overflow: hidden;
  background: var(--uc-surface);
}

#page-help-faq .uc-faq-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 900;
  color: var(--uc-text);
  cursor: pointer;
  user-select: none;
  background: var(--uc-surface-raised);
  border-bottom: 1px solid var(--uc-surface-sunken);
}

#page-help-faq .uc-faq-section-title:hover {
  background: var(--uc-surface-muted);
}

#page-help-faq .uc-faq-section.is-collapsed .uc-faq-section-title {
  border-bottom: 0;
}

#page-help-faq .uc-faq-chevron {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--uc-slate-500);
  border-bottom: 2px solid var(--uc-slate-500);
  transform: rotate(45deg);
  transition: transform 0.15s;
  flex-shrink: 0;
}

#page-help-faq .uc-faq-section.is-collapsed .uc-faq-chevron {
  transform: rotate(-45deg);
}

#page-help-faq .uc-faq-items {
  padding: 8px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#page-help-faq .uc-faq-section.is-collapsed .uc-faq-items {
  display: none;
}

#page-help-faq .uc-faq-item {
  border-bottom: 1px solid var(--uc-surface-muted);
}

#page-help-faq .uc-faq-item:last-child {
  border-bottom: 0;
}

#page-help-faq .uc-faq-item summary {
  padding: 10px 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--uc-text);
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 24px;
}

#page-help-faq .uc-faq-item summary::-webkit-details-marker {
  display: none;
}

#page-help-faq .uc-faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  font-weight: 700;
  color: var(--uc-text-muted);
  transition: transform 0.15s;
}

#page-help-faq .uc-faq-item[open] summary::after {
  content: "\2212";
  color: var(--uc-text-secondary);
}

#page-help-faq .uc-faq-item p {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--uc-text-secondary);
}

#page-help-faq .uc-faq-item.is-hidden {
  display: none;
}

#page-help-faq .uc-faq-section.is-hidden {
  display: none;
}

#page-help-faq .uc-faq-section.is-search-active .uc-faq-items {
  display: flex;
}
