:root {
  --help-bg: var(--bg, var(--theme-bg, #f5faf8));
  --help-surface: var(--panel, var(--theme-surface, #ffffff));
  --help-surface-alt: var(--panel-alt, var(--theme-surface-soft, #eef8f5));
  --help-text: var(--text, var(--theme-text, #17211f));
  --help-muted: var(--muted, var(--theme-muted, #51625e));
  --help-border: var(--border, var(--theme-border, #c9d9d4));
  --help-accent: var(--accent, var(--theme-accent, #087f6f));
  --help-accent-strong: var(--accent-2, var(--theme-accent-strong, #0b5f55));
  --help-danger: var(--danger, var(--theme-danger, #b42318));
  --help-warning-soft: var(--theme-warning-soft, rgba(138, 90, 0, .12));
  --help-info-soft: var(--theme-info-soft, rgba(29, 95, 145, .10));
  --help-shadow: 0 18px 48px rgba(19, 35, 31, .14);
}

.app-shell__help-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  border: 1px solid var(--help-border);
  border-radius: 8px;
  background: var(--help-surface-alt);
  color: var(--help-text);
  font: inherit;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
}

.app-shell__help-button:hover,
.app-shell__help-button:focus-visible {
  border-color: var(--help-accent);
  color: var(--help-accent-strong);
  outline: 2px solid rgba(8, 127, 111, .22);
  outline-offset: 2px;
}

.help-drawer-open {
  overflow: hidden;
}

.help-drawer[hidden] {
  display: none;
}

.help-drawer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  justify-items: end;
  background: rgba(15, 23, 42, .34);
}

.help-drawer__panel {
  width: min(440px, 100%);
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--help-surface);
  color: var(--help-text);
  border-left: 1px solid var(--help-border);
  box-shadow: -16px 0 40px rgba(15, 23, 42, .18);
}

.help-drawer__header,
.help-drawer__footer {
  flex: 0 0 auto;
  padding: 16px;
  border-bottom: 1px solid var(--help-border);
}

.help-drawer__footer {
  border-top: 1px solid var(--help-border);
  border-bottom: 0;
}

.help-drawer__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.help-drawer__heading {
  min-width: 0;
}

.help-drawer__eyebrow,
.help-drawer__summary,
.help-drawer__empty {
  margin: 0;
  color: var(--help-muted);
}

.help-drawer__eyebrow {
  color: var(--help-accent-strong);
  font-size: 13px;
  font-weight: 800;
}

.help-drawer__header h2 {
  margin: 4px 0 0;
  font-size: 22px;
  line-height: 1.25;
}

.help-drawer__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
}

.help-drawer__section {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--help-border);
}

.help-drawer__section h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}

.help-drawer__steps,
.help-drawer__faqs {
  margin: 0;
}

.help-drawer__steps {
  display: grid;
  gap: 8px;
  padding-left: 22px;
}

.help-drawer__faqs {
  display: grid;
  gap: 10px;
}

.help-drawer__faq {
  padding: 12px;
  border: 1px solid var(--help-border);
  border-radius: 8px;
  background: var(--help-surface-alt);
}

.help-drawer__faq dt {
  font-weight: 800;
}

.help-drawer__faq dd {
  margin: 4px 0 0;
  color: var(--help-muted);
}

.help-drawer__close,
.help-drawer__full-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid var(--help-border);
  background: var(--help-surface-alt);
  color: var(--help-text);
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}

.help-drawer__close {
  min-width: 40px;
  padding: 8px 12px;
}

.help-drawer__full-link {
  width: 100%;
  padding: 9px 12px;
  border-color: var(--help-accent);
  color: var(--help-accent-strong);
}

.help-center-page {
  margin: 0;
  min-height: 100dvh;
  background: var(--help-bg);
  color: var(--help-text);
  font: 15px/1.6 Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.help-center-page * {
  box-sizing: border-box;
}

.help-center-page a {
  color: inherit;
}

.help-center {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 32px;
}

.help-center__nav,
.help-center__article {
  background: var(--help-surface);
  border: 1px solid var(--help-border);
  border-radius: 8px;
  box-shadow: var(--help-shadow);
}

.help-center__nav {
  position: sticky;
  top: 16px;
  align-self: start;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 16px;
}

.help-center__home,
.help-center__nav-link,
.help-center__back-link,
.help-center__related-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 8px;
  color: var(--help-text);
  text-decoration: none;
}

.help-center__home {
  width: 100%;
  margin-bottom: 16px;
  padding: 8px 12px;
  border: 1px solid var(--help-border);
  background: var(--help-info-soft);
  color: var(--help-accent-strong);
  font-weight: 700;
}

.help-center__nav-section {
  display: grid;
  gap: 8px;
  padding: 14px 0;
  border-top: 1px solid var(--help-border);
}

.help-center__nav-section h2 {
  margin: 0;
  color: var(--help-muted);
  font-size: 13px;
  font-weight: 700;
}

.help-center__nav-links {
  display: grid;
  gap: 4px;
}

.help-center__nav-link {
  justify-content: flex-start;
  padding: 7px 10px;
  color: var(--help-text);
}

.help-center__nav-link:hover,
.help-center__nav-link:focus-visible {
  background: var(--help-surface-alt);
  outline: 2px solid rgba(8, 127, 111, .16);
  outline-offset: 2px;
}

.help-center__nav-link.is-active {
  background: var(--help-surface-alt);
  color: var(--help-accent-strong);
  font-weight: 700;
}

.help-center__article {
  min-width: 0;
  padding: 28px;
}

.help-center__article-head {
  display: grid;
  gap: 10px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--help-border);
}

.help-center__section {
  margin: 0;
  color: var(--help-accent-strong);
  font-size: 13px;
  font-weight: 800;
}

.help-center__article h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.22;
}

.help-center__intro,
.help-center__article p {
  margin: 0;
  color: var(--help-muted);
}

.help-center__back-link {
  justify-self: start;
  margin-top: 4px;
  padding: 9px 14px;
  border: 1px solid var(--help-accent);
  background: var(--help-surface-alt);
  color: var(--help-accent-strong);
  font-weight: 700;
}

.help-center__back-link.is-disabled {
  border-color: var(--help-border);
  background: var(--help-surface-alt);
  color: var(--help-muted);
  cursor: default;
}

.help-center__section-block {
  display: grid;
  gap: 12px;
  padding: 22px 0;
  border-bottom: 1px solid var(--help-border);
}

.help-center__section-block:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.help-center__section-block h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
}

.help-center__workflow {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
}

.help-center__workflow li {
  padding-left: 4px;
}

.help-center__pairs {
  display: grid;
  gap: 10px;
  margin: 0;
}

.help-center__pair {
  padding: 12px;
  border: 1px solid var(--help-border);
  border-radius: 8px;
  background: var(--help-surface-alt);
}

.help-center__pair dt {
  font-weight: 800;
}

.help-center__pair dd {
  margin: 4px 0 0;
  color: var(--help-muted);
}

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

.help-center__related-link {
  padding: 8px 12px;
  border: 1px solid var(--help-border);
  background: var(--help-warning-soft);
  color: var(--help-text);
}

.help-center__empty,
.help-center__loading {
  color: var(--help-muted);
}

.help-center__loading {
  grid-column: 1 / -1;
  padding: 24px;
  border: 1px solid var(--help-border);
  border-radius: 8px;
  background: var(--help-surface);
}

@media (max-width: 760px) {
  .app-shell__help-button {
    min-width: 44px;
    min-height: 44px;
  }

  .help-drawer {
    justify-items: stretch;
  }

  .help-drawer__panel {
    width: 100%;
    border-left: 0;
  }

  .help-center {
    grid-template-columns: 1fr;
    width: min(100%, calc(100% - 24px));
    gap: 12px;
    padding: 12px 0 24px;
  }

  .help-center__nav {
    position: static;
    max-height: none;
    overflow-x: auto;
  }

  .help-center__nav-section {
    min-width: 0;
  }

  .help-center__article {
    padding: 18px;
  }

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

  .help-center__back-link,
  .help-center__related-link {
    width: 100%;
  }
}
