/* Help Center — Instagram-style hub + articles (MoodMatch accent) */

body.page-help {
  background: #f3f5f4;
  background: linear-gradient(180deg, #f5f7f6 0%, #eef1ef 100%);
}

.help-page {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(24px, 4vw, 40px) 24px clamp(72px, 9vw, 100px);
}

/* Breadcrumb */
.help-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-bottom: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.help-breadcrumb a {
  color: var(--accent-mid);
  text-decoration: none;
}

.help-breadcrumb a:hover {
  color: var(--accent1);
  text-decoration: underline;
}

.help-breadcrumb [aria-current="page"] {
  color: var(--ink-soft);
}

.help-breadcrumb-sep {
  color: var(--muted-light);
  user-select: none;
}

/* Hero + search */
.help-hero {
  text-align: center;
  margin-bottom: clamp(36px, 5vw, 52px);
}

.help-hero h1 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--accent1);
}

.help-hero-lead {
  margin: 0 auto 28px;
  max-width: 520px;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--muted);
}

.help-search-wrap {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
}

.help-search {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px 14px 16px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.help-search:focus-within {
  border-color: rgba(0, 144, 111, 0.45);
  box-shadow: 0 0 0 4px rgba(0, 144, 111, 0.12);
}

.help-search svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--muted-light);
}

.help-search input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--ink);
  outline: none;
}

.help-search input::placeholder {
  color: var(--muted-light);
}

.help-search-results {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: 320px;
  overflow-y: auto;
  margin: 0;
  padding: 8px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: none;
}

.help-search-results.is-open {
  display: block;
}

.help-search-results li {
  margin: 0;
}

.help-search-results a {
  display: block;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background 0.15s ease;
}

.help-search-results a:hover,
.help-search-results a:focus-visible {
  background: rgba(0, 144, 111, 0.08);
}

.help-search-results strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
}

.help-search-results span {
  font-size: 0.8rem;
  color: var(--muted);
}

.help-search-empty {
  padding: 16px;
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
}

/* Topic grid */
.help-section-title {
  margin: 0 0 18px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-mid);
}

.help-topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: clamp(40px, 5vw, 56px);
}

.help-topic-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.2s ease;
}

.help-topic-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 144, 111, 0.2);
  box-shadow: var(--shadow-md);
}

.help-topic-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0, 144, 111, 0.1);
  color: var(--accent-mid);
}

.help-topic-icon svg {
  width: 24px;
  height: 24px;
}

.help-topic-card strong {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.help-topic-card span {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--muted);
}

/* Popular articles */
.help-popular-list {
  margin: 0;
  padding: 0;
  list-style: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.help-popular-list li {
  border-top: 1px solid var(--line);
}

.help-popular-list li:first-child {
  border-top: none;
}

.help-popular-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.help-popular-list a:hover {
  background: rgba(0, 144, 111, 0.06);
  color: var(--accent1);
}

.help-popular-list a svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--accent-mid);
}

/* Contact card */
.help-contact-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  margin-top: clamp(40px, 5vw, 56px);
  padding: clamp(24px, 4vw, 32px);
  background: linear-gradient(135deg, #00534c 0%, #007a5c 50%, #00906f 100%);
  border-radius: var(--radius-lg);
  color: var(--cta-fg);
  box-shadow: var(--shadow-glow);
}

.help-contact-card h2 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  font-weight: 400;
  line-height: 1.2;
}

.help-contact-card p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  opacity: 0.92;
}

.help-contact-card .btn {
  white-space: nowrap;
  background: #fff;
  color: var(--accent1);
  border: none;
  font-weight: 700;
}

.help-contact-card .btn:hover {
  background: #f0faf7;
}

/* Category page */
.help-category-head {
  margin-bottom: 32px;
}

.help-category-head h1 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.5vw, 2.35rem);
  font-weight: 400;
  color: var(--accent1);
}

.help-category-head p {
  margin: 0;
  max-width: 560px;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--muted);
}

.help-article-list {
  margin: 0;
  padding: 0;
  list-style: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.help-article-list li {
  border-top: 1px solid var(--line);
}

.help-article-list li:first-child {
  border-top: none;
}

.help-article-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  transition: background 0.15s ease;
}

.help-article-list a:hover {
  background: rgba(0, 144, 111, 0.06);
  color: var(--accent1);
}

.help-article-list a svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--accent-mid);
}

/* Article layout */
.help-article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 40px;
  align-items: start;
}

.help-article-main {
  padding: clamp(28px, 4vw, 40px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.help-article-main h1 {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.2vw, 2.25rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--accent1);
}

.help-article-meta {
  margin: 0 0 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
  color: var(--muted);
}

.help-article-main h2 {
  margin: 28px 0 12px;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ink);
}

.help-article-main p,
.help-article-main li {
  font-size: 0.95rem;
  line-height: 1.72;
  color: var(--ink-soft);
}

.help-article-main p {
  margin: 0 0 14px;
}

.help-article-main ul,
.help-article-main ol {
  margin: 0 0 16px;
  padding-left: 1.35rem;
}

.help-article-main li {
  margin-bottom: 8px;
}

.help-article-main a {
  color: var(--accent-mid);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.help-article-main a:hover {
  color: var(--accent1);
}

.help-steps {
  margin: 16px 0 20px;
  padding: 0;
  list-style: none;
  counter-reset: help-step;
}

.help-steps li {
  position: relative;
  margin: 0 0 16px;
  padding-left: 44px;
  counter-increment: help-step;
}

.help-steps li::before {
  content: counter(help-step);
  position: absolute;
  left: 0;
  top: 2px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 144, 111, 0.12);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 28px;
  text-align: center;
  color: var(--accent1);
}

.help-tip {
  margin: 20px 0;
  padding: 16px 18px;
  background: rgba(0, 144, 111, 0.08);
  border-left: 3px solid var(--accent-mid);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.help-tip strong {
  color: var(--accent1);
}

/* Sidebar */
.help-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.help-sidebar-card {
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.help-sidebar-card h3 {
  margin: 0 0 14px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-mid);
}

.help-sidebar-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.help-sidebar-links li {
  margin-bottom: 8px;
}

.help-sidebar-links a {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
}

.help-sidebar-links a:hover {
  color: var(--accent-mid);
}

/* Was this helpful */
.help-feedback {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.help-feedback p {
  margin: 0 0 14px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.help-feedback-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.help-feedback-actions .btn {
  min-width: 100px;
  padding: 10px 20px;
  font-size: 0.88rem;
}

.help-feedback-actions .btn-ghost {
  background: #fff;
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
}

@media (max-width: 900px) {
  .help-article-layout {
    grid-template-columns: 1fr;
  }

  .help-sidebar {
    position: static;
  }

  .help-contact-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .help-contact-card .btn {
    justify-self: center;
  }
}

@media (max-width: 640px) {
  .help-topics-grid {
    grid-template-columns: 1fr;
  }
}
