.help-page {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.help-header {
  padding: clamp(22px, 3vw, 40px) clamp(20px, 4vw, 56px) 22px;
}

.help-header h2,
.help-intro h2 {
  margin: 0;
}

.help-header h2 {
  font-size: clamp(30px, 4vw, 50px);
  letter-spacing: -0.045em;
}

.help-header p:last-child,
.help-intro p:last-child {
  max-width: 720px;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.65;
}

.help-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0 clamp(20px, 4vw, 56px);
  scrollbar-width: thin;
}

.help-tab-button {
  position: relative;
  flex: 0 0 auto;
  padding: 16px 4px 14px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.help-tab-button + .help-tab-button {
  margin-left: 24px;
}

.help-tab-button::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: transparent;
  transform: scaleX(0.65);
  transition: background 140ms ease, transform 140ms ease;
}

.help-tab-button:hover,
.help-tab-button.active {
  color: var(--ink);
}

.help-tab-button.active::after {
  background: var(--accent);
  transform: scaleX(1);
}

.help-tab-panel {
  padding: clamp(24px, 4vw, 56px);
}

.help-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  padding-bottom: clamp(28px, 4vw, 48px);
}

.help-intro h2 {
  max-width: 760px;
  font-size: clamp(25px, 3.2vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.help-primary-action {
  flex: 0 0 auto;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent);
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  padding: 0 18px;
  font-weight: 900;
  text-decoration: none;
  transition: transform 140ms ease, filter 140ms ease;
}

.help-primary-action:hover {
  filter: brightness(0.93);
  transform: translateY(-1px);
}

.help-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: help-step;
}

.help-step {
  display: grid;
  gap: 26px;
  border-top: 1px solid var(--line);
  padding: clamp(28px, 4vw, 52px) 0;
}

.help-step-with-media {
  grid-template-columns: minmax(260px, 0.8fr) minmax(360px, 1.2fr);
  align-items: start;
}

.help-step-copy {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 18px;
}

.help-step-number {
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.help-step h3 {
  margin: -4px 0 9px;
  font-size: clamp(20px, 2.2vw, 28px);
  letter-spacing: -0.025em;
}

.help-step p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.help-step code {
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 2px 6px;
  font-size: 0.92em;
  font-weight: 800;
}

.help-note {
  margin-top: 18px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  color: #285b56;
  padding: 12px 14px;
  line-height: 1.55;
}

.help-inline-link,
.help-step a:not(.help-primary-action) {
  display: inline-block;
  margin-top: 14px;
  color: var(--accent);
  font-weight: 900;
  text-underline-offset: 3px;
}

.help-figure {
  margin: 0;
}

.help-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #161616;
}

.help-figure-compact,
.help-figure-portrait {
  width: min(100%, 760px);
  justify-self: end;
}

.help-figure-portrait img {
  max-height: 700px;
  object-fit: contain;
}

.help-figure-wide img {
  max-height: 760px;
}

.help-figure figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.help-steps-short .help-step {
  padding: 28px 0;
}

.help-postback-figure {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: clamp(28px, 4vw, 48px);
}

@media (prefers-reduced-motion: no-preference) {
  .help-tab-panel.active .help-intro,
  .help-tab-panel.active .help-step,
  .help-tab-panel.active .help-postback-figure {
    animation: help-reveal 260ms ease both;
  }

  .help-tab-panel.active .help-step:nth-child(2) { animation-delay: 35ms; }
  .help-tab-panel.active .help-step:nth-child(3) { animation-delay: 70ms; }
  .help-tab-panel.active .help-step:nth-child(4) { animation-delay: 105ms; }
  .help-tab-panel.active .help-step:nth-child(5) { animation-delay: 140ms; }
}

@keyframes help-reveal {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 820px) {
  .help-intro {
    display: grid;
  }

  .help-primary-action {
    width: 100%;
  }

  .help-step-with-media {
    grid-template-columns: 1fr;
  }

  .help-figure-compact,
  .help-figure-portrait {
    width: 100%;
    justify-self: stretch;
  }
}

@media (max-width: 520px) {
  .help-header,
  .help-tab-panel {
    padding-right: 18px;
    padding-left: 18px;
  }

  .help-tabs {
    padding-right: 18px;
    padding-left: 18px;
  }

  .help-step-copy {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}
