*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --help-bg: #f5f8fc;
  --help-surface: #ffffff;
  --help-soft: #f0f5fb;
  --help-soft-strong: #e8f0fa;
  --help-text: #142033;
  --help-muted: #62728a;
  --help-line: #dbe4ef;
  --help-primary: #2f6fed;
  --help-primary-soft: #edf4ff;
  --help-warning: #fff7e8;
  --help-warning-line: #f2d19b;
  --help-shadow: 0 18px 48px rgba(30, 48, 76, 0.08);
}

body.help-page {
  min-height: 100vh;
  margin: 0;
  background: var(--help-bg);
  color: var(--help-text);
  font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.help-page .md3-top-app-bar,
.help-page .md3-footer {
  background: rgba(245, 248, 252, 0.94);
}

.help-main {
  width: min(100%, 1240px);
  margin: 0 auto;
  padding: 74px 24px 56px;
}

.help-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  gap: 20px;
  align-items: center;
  margin-bottom: 22px;
  padding: 22px;
  border: 1px solid var(--help-line);
  border-radius: 22px;
  background: var(--help-surface);
  box-shadow: 0 10px 30px rgba(30, 48, 76, 0.05);
}

.help-title-block {
  min-width: 0;
}

.help-title-block h1 {
  margin: 0;
  color: var(--help-text);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0;
}

.help-title-block p {
  margin: 7px 0 0;
  color: var(--help-muted);
  font-size: 14px;
  line-height: 1.6;
}

.help-search-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 7px 7px 7px 16px;
  border: 1px solid var(--help-line);
  border-radius: 18px;
  background: var(--help-soft);
}

.help-search-card > i {
  color: var(--help-muted);
  font-size: 22px;
}

.help-search-input {
  min-width: 0;
  height: 42px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--help-text);
  font-size: 14px;
}

.help-search-input::placeholder {
  color: #91a0b4;
}

.help-search-button {
  min-width: 82px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: var(--help-primary);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.help-search-button:hover {
  filter: brightness(1.04);
}

.help-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  align-items: start;
}

.help-primary-column,
.help-side-panel {
  min-width: 0;
}

.help-search-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #bfd4f8;
  border-radius: 18px;
  background: var(--help-primary-soft);
  color: #285ca8;
  font-size: 14px;
}

.help-search-hint i {
  font-size: 19px;
}

.help-search-hint a {
  margin-left: auto;
  color: var(--help-primary);
  font-weight: 700;
  text-decoration: none;
}

.help-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 14px;
  padding: 0 2px;
}

.help-section-head h2,
.help-side-card h2 {
  margin: 0;
  color: var(--help-text);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.25;
}

.help-section-head p {
  margin: 6px 0 0;
  color: var(--help-muted);
  font-size: 13px;
}

.help-count-pill {
  flex: 0 0 auto;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--help-soft-strong);
  color: var(--help-muted);
  font-size: 12px;
  font-weight: 700;
}

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

.help-faq-card,
.help-empty-card,
.help-side-card {
  border: 1px solid var(--help-line);
  border-radius: 24px;
  background: var(--help-surface);
  box-shadow: 0 10px 30px rgba(30, 48, 76, 0.05);
}

.help-faq-card {
  overflow: hidden;
}

.help-faq-question {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 70px;
  padding: 16px 18px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.help-faq-question:hover {
  background: var(--help-soft);
}

.help-faq-index {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--help-primary-soft);
  color: var(--help-primary);
  font-size: 13px;
  font-weight: 800;
}

.help-faq-title {
  min-width: 0;
  overflow: hidden;
  color: var(--help-text);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.help-faq-extra {
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--help-soft);
  color: var(--help-muted);
  font-size: 12px;
  font-weight: 700;
}

.help-expand-icon {
  color: var(--help-muted);
  font-size: 22px;
  transition: transform 0.2s ease;
}

.help-faq-card.is-open .help-expand-icon {
  transform: rotate(180deg);
}

.help-faq-card.is-open .help-faq-question {
  background: var(--help-soft);
}

.help-faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.22s ease;
}

.help-faq-card.is-open .help-faq-answer {
  grid-template-rows: 1fr;
}

.help-answer-inner {
  min-height: 0;
  overflow: hidden;
  padding: 0 18px;
}

.help-faq-card.is-open .help-answer-inner {
  padding: 14px 18px 18px 68px;
}

.help-answer-panel {
  padding: 16px;
  border: 1px solid var(--help-line);
  border-radius: 18px;
  background: var(--help-soft);
}

.help-answer-text {
  color: #42526a;
  font-size: 14px;
  line-height: 1.85;
  word-break: break-word;
}

.help-warning {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  padding: 11px 12px;
  border: 1px solid var(--help-warning-line);
  border-radius: 14px;
  background: var(--help-warning);
  color: #725018;
  font-size: 12px;
  line-height: 1.7;
}

.help-warning i {
  flex: 0 0 auto;
  color: #c27b12;
  font-size: 19px;
}

.help-images {
  display: grid;
  grid-template-columns: minmax(0, min(100%, 360px));
  justify-content: center;
  justify-items: center;
  gap: 14px;
  margin-top: 16px;
}

.help-images.is-pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-content: stretch;
}

.help-images.is-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  justify-content: stretch;
}

.help-image-link {
  display: inline-flex;
  width: 100%;
  max-width: 360px;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--help-line);
  border-radius: 20px;
  background: var(--help-surface);
  color: var(--help-muted);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 26px rgba(30, 48, 76, 0.06);
}

.help-images.is-pair .help-image-link,
.help-images.is-grid .help-image-link {
  max-width: none;
}

.help-image-link:hover {
  border-color: #bdd0ee;
  color: var(--help-primary);
}

.help-faq-img {
  display: block;
  width: 100%;
  height: clamp(150px, 20vw, 220px);
  object-fit: contain;
  border-radius: 14px;
  background: var(--help-soft);
}

.help-images.is-single .help-faq-img {
  height: clamp(260px, 58vh, 420px);
}

.help-empty-card {
  padding: 54px 24px;
  text-align: center;
}

.help-empty-card i {
  color: #9aabc1;
  font-size: 48px;
}

.help-empty-card h3 {
  margin: 12px 0 6px;
  color: var(--help-text);
  font-size: 18px;
}

.help-empty-card p {
  margin: 0;
  color: var(--help-muted);
  font-size: 14px;
}

.help-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
}

.help-page-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 14px;
  background: var(--help-surface);
  color: var(--help-primary);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.help-page-button:hover {
  background: var(--help-primary);
  color: #fff;
}

.help-page-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--help-muted);
  font-size: 14px;
}

.help-page-indicator strong {
  color: var(--help-text);
}

.help-side-panel {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 14px;
}

.help-side-card {
  padding: 20px;
}

.help-side-card h2 {
  margin-bottom: 14px;
  font-size: 18px;
}

.help-quick-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 12px;
  border-radius: 18px;
  color: var(--help-text);
  text-decoration: none;
}

.help-quick-link:hover {
  background: var(--help-soft);
}

.help-quick-link + .help-quick-link {
  margin-top: 6px;
}

.help-quick-icon {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  background: var(--help-primary-soft);
  color: var(--help-primary);
}

.help-quick-icon i {
  font-size: 22px;
}

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

.help-quick-link strong {
  font-size: 14px;
  line-height: 1.35;
}

.help-quick-link small {
  margin-top: 2px;
  color: var(--help-muted);
  font-size: 12px;
  line-height: 1.4;
}

.help-note-card p {
  margin: 0;
  color: var(--help-muted);
  font-size: 13px;
  line-height: 1.75;
}

@media (max-width: 980px) {
  .help-topbar {
    grid-template-columns: 1fr;
    gap: 16px;
  }

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

  .help-side-panel {
    position: static;
  }
}

@media (max-width: 860px) {
  .help-main {
    padding: 58px 14px 42px;
  }

  .help-topbar {
    gap: 14px;
    padding: 18px;
    border-radius: 20px;
  }

  .help-title-block h1 {
    font-size: 26px;
  }

  .help-title-block p {
    font-size: 13px;
  }

  .help-search-button {
    min-width: 70px;
  }

  .help-section-head {
    align-items: flex-start;
  }

  .help-faq-question {
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 15px;
  }

  .help-faq-extra {
    display: none;
  }

  .help-faq-card.is-open .help-answer-inner {
    padding: 12px 15px 16px;
  }
}

@media (max-width: 560px) {
  .help-main {
    padding-inline: 12px;
  }

  .help-topbar,
  .help-faq-card,
  .help-empty-card,
  .help-side-card {
    border-radius: 20px;
  }

  .help-section-head {
    gap: 10px;
  }

  .help-section-head h2 {
    font-size: 18px;
  }

  .help-faq-title {
    font-size: 14px;
  }

  .help-pagination {
    gap: 8px;
  }

  .help-page-button {
    padding: 0 12px;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --help-bg: #151a22;
    --help-surface: #1c2330;
    --help-soft: #202938;
    --help-soft-strong: #263245;
    --help-text: #edf2fa;
    --help-muted: #a7b5c8;
    --help-line: #303b4d;
    --help-primary: #78a7ff;
    --help-primary-soft: rgba(82, 133, 232, 0.2);
    --help-warning: rgba(158, 105, 20, 0.18);
    --help-warning-line: rgba(226, 167, 76, 0.4);
    --help-shadow: none;
  }

  .help-page .md3-top-app-bar,
  .help-page .md3-footer {
    background: rgba(21, 26, 34, 0.94);
  }

  .help-eyebrow,
  .help-search-hint {
    color: #c7dcff;
  }

  .help-answer-text {
    color: #c6d0df;
  }
}
