body[data-portal-design] .portal-header > button[data-portal-help] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  flex: none;
  min-height: 44px;
  padding: 0 .65rem;
  border: 1px solid #c6d1c9;
  border-radius: 6px;
  background: #eef3ed;
  color: #254a3f;
  font: 600 .875rem/1.2 Arial, sans-serif;
  white-space: nowrap;
  cursor: pointer;
}

[data-portal-help] > span:first-child {
  display: grid;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  border: 1px solid currentColor;
  border-radius: 50%;
}

#portal-help-dialog {
  width: min(31rem, calc(100% - 1.5rem));
  max-width: none;
  max-height: calc(100dvh - 1.5rem);
  padding: 0;
  border: 1px solid #c6d1c9;
  border-radius: 14px;
  background: #fcfbf8;
  color: #193137;
  box-shadow: 0 18px 60px #10202944;
  font: 1rem/1.5 Arial, sans-serif;
  overflow: auto;
  overscroll-behavior: contain;
}

#portal-help-dialog::backdrop { background: #10202988; }
.portal-help-content { padding: clamp(1rem, 4vw, 1.5rem); }
.portal-help-heading { display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
#portal-help-title { margin: 0; color: inherit; font: 700 1.25rem/1.25 Arial, sans-serif; }

#portal-help-dialog :is(button, a) {
  min-height: 44px;
  border: 1px solid #c6d1c9;
  border-radius: 6px;
  background: #fff;
  color: #254a3f;
  font: 600 .875rem/1.2 Arial, sans-serif;
  cursor: pointer;
}

#portal-help-dialog .portal-help-close { min-width: 44px; flex: none; padding: 0; font-size: 1.5rem; }
.portal-help-form { margin-top: 1rem; }
.portal-help-form label { display: inline-block; margin-bottom: .4rem; font-weight: 600; }
.portal-help-form > div { display: flex; gap: .5rem; }

#portal-help-dialog input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: .55rem .65rem;
  border: 1px solid #81988c;
  border-radius: 6px;
  background: #fff;
  color: #193137;
  font: 1rem/1.2 Arial, sans-serif;
}

#portal-help-dialog button[type="submit"] { padding: .55rem .85rem; background: #254a3f; color: #fff; }
.portal-help-topics:not([hidden]) { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .75rem; }
.portal-help-topics button { padding: .45rem .65rem; }

.portal-help-answer:not(:empty) {
  margin-top: 1rem;
  padding: .85rem;
  border-radius: 8px;
  background: #eef3ed;
  overflow-wrap: anywhere;
}

.portal-help-answer h3 { margin: 0 0 .25rem; color: inherit; font: 700 1rem/1.3 Arial, sans-serif; }
.portal-help-answer p { margin: 0; }
#portal-help-dialog .portal-help-answer :is(a, button) { display: inline-flex; align-items: center; margin-top: .6rem; padding: .45rem .65rem; }
#portal-help-dialog :focus-visible, body[data-portal-design] .portal-header > [data-portal-help]:focus-visible {
  outline: 2px solid #254a3f;
  outline-offset: 2px;
}

@media (max-width: 900px) {
  body[data-portal-design] .portal-header > button[data-portal-help] { width: 44px; padding: 0; }
  [data-portal-help] > span:last-child {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

@media (max-width: 760px) {
  html body[data-portal-design="client"] > .portal-header:has([data-portal-help]),
  html body[data-portal-design="client"].ll-phone-navigation > .portal-header:has(.client-wallet):has([data-portal-help]) {
    grid-template-columns: 44px minmax(0, 1fr) auto auto 44px;
  }
  body[data-portal-design="client"] .portal-header > [data-portal-help] { grid-area: 1 / 5; }
}