/*
 * NeuroWerk 3.2.3 – contextual page help drawer.
 * Replaces the inline "Kurz erklärt" block with a right-hand, context-aware help panel.
 */
.nw-terminal-page-help-toggle {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid rgba(153, 177, 200, .28);
  border-radius: 6px;
  background: rgba(255,255,255,.025);
  color: #f7f9fb;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease, color .16s ease, transform .16s ease;
}
.nw-terminal-page-help-toggle > span:first-child {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  flex: 0 0 24px;
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 50%;
  color: var(--nw-terminal-red-bright);
  font-size: 14px;
  font-weight: 900;
}
.nw-terminal-page-help-toggle:hover,
.nw-terminal-page-help-toggle[aria-expanded="true"] {
  border-color: rgba(255,255,255,.5);
  background: rgba(255,255,255,.075);
  color: #fff;
}
.nw-terminal-page-help-toggle:focus-visible,
.nw-terminal-page-help-close:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(255,63,104,.28);
}

.nw-terminal-page-help-backdrop {
  position: fixed;
  z-index: 10040;
  inset: var(--nw-terminal-topbar-height) 0 0;
  background: rgba(3, 9, 16, .55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .22s ease, visibility .22s ease;
}
.nw-terminal-page-help {
  position: fixed;
  z-index: 10050;
  top: var(--nw-terminal-topbar-height);
  right: 0;
  bottom: 0;
  width: min(440px, calc(100vw - 24px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-left: 1px solid var(--nw-terminal-line);
  background: var(--nw-premium-panel-gradient);
  color: var(--nw-terminal-ink);
  box-shadow: -24px 0 60px rgba(0,0,0,.34);
  opacity: 0;
  visibility: hidden;
  transform: translate3d(34px,0,0);
  pointer-events: none;
  transition: transform .24s cubic-bezier(.22,.9,.3,1), opacity .2s ease, visibility .24s ease;
}
.nw-terminal-body.is-terminal-help-open {
  overflow: hidden;
}
.nw-terminal-body.is-terminal-help-open .nw-terminal-page-help-backdrop {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.nw-terminal-body.is-terminal-help-open .nw-terminal-page-help {
  opacity: 1;
  visibility: visible;
  transform: translate3d(0,0,0);
  pointer-events: auto;
}
.nw-terminal-page-help-head {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--nw-terminal-line);
  background: color-mix(in srgb, var(--nw-terminal-surface-strong) 82%, transparent);
}
.nw-terminal-page-help-head > div {
  min-width: 0;
}
.nw-terminal-page-help-head span {
  display: block;
  margin-bottom: 3px;
  color: var(--nw-terminal-red-bright);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.nw-terminal-page-help-head h2 {
  margin: 0;
  color: var(--nw-terminal-ink);
  font-size: 23px;
  line-height: 1.15;
  letter-spacing: -.035em;
}
.nw-terminal-page-help-close {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  border: 1px solid var(--nw-terminal-line);
  border-radius: 6px;
  background: var(--nw-terminal-surface-alt);
  color: var(--nw-terminal-muted);
  font: inherit;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.nw-terminal-page-help-close:hover {
  border-color: var(--nw-terminal-red);
  color: var(--nw-terminal-red-bright);
}
.nw-terminal-page-help-scroll {
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.nw-terminal-page-help-scroll > section {
  margin: 0;
  padding: 22px 20px;
  border-bottom: 1px solid var(--nw-terminal-line-soft);
}
.nw-terminal-page-help-scroll h3 {
  margin: 0 0 9px;
  color: var(--nw-terminal-ink);
  font-size: 16px;
  letter-spacing: -.02em;
}
.nw-terminal-page-help-scroll p {
  margin: 0;
  color: var(--nw-terminal-muted);
  line-height: 1.62;
}
.nw-terminal-page-help-eyebrow {
  margin-bottom: 7px !important;
  color: var(--nw-terminal-red-bright) !important;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.nw-terminal-page-help-steps {
  display: grid;
  gap: 11px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nw-terminal-page-help-steps li {
  display: grid;
  grid-template-columns: 34px minmax(0,1fr);
  gap: 11px;
  align-items: start;
  padding: 13px;
  border: 1px solid var(--nw-terminal-line);
  border-radius: 6px;
  background: var(--nw-terminal-surface-alt);
}
.nw-terminal-page-help-steps li > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,63,104,.12);
  color: var(--nw-terminal-red-bright);
  font-weight: 900;
}
.nw-terminal-page-help-steps strong {
  display: block;
  margin: 1px 0 3px;
  color: var(--nw-terminal-ink);
  font-size: 13px;
}
.nw-terminal-page-help-steps p {
  font-size: 13px;
}
.nw-terminal-page-help-warning {
  display: grid;
  grid-template-columns: 36px minmax(0,1fr);
  gap: 12px;
  background: color-mix(in srgb, var(--nw-terminal-warning-soft) 78%, var(--nw-terminal-surface) 22%);
}
.nw-terminal-page-help-warning > span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--nw-terminal-warn) 45%, transparent);
  border-radius: 50%;
  color: var(--nw-terminal-warn);
  font-weight: 900;
}
.nw-terminal-page-help-warning strong {
  display: block;
  margin: 1px 0 4px;
  color: var(--nw-terminal-warn);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.nw-terminal-page-help-more .nw-terminal-primary {
  width: 100%;
  margin-top: 14px;
}

/* The old inline guide is intentionally retired in the terminal. */
.nw-terminal-main > .nw-terminal-context-guide {
  display: none !important;
}

@media (max-width: 980px) {
  .nw-terminal-page-help-backdrop,
  .nw-terminal-page-help {
    top: var(--nw-terminal-topbar-height);
  }
}
@media (max-width: 720px) {
  .nw-terminal-page-help-toggle {
    width: 42px;
    padding: 7px;
  }
  .nw-terminal-page-help-toggle > span:last-child {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .nw-terminal-page-help {
    width: 100%;
    max-width: none;
    border-left: 0;
    clip-path: inset(0 0 0 100%);
    transform: none;
    transition: clip-path .24s cubic-bezier(.22,.9,.3,1), opacity .2s ease, visibility .24s ease;
  }
  .nw-terminal-body.is-terminal-help-open .nw-terminal-page-help {
    clip-path: inset(0);
    transform: none;
  }
}
@media (max-width: 520px) {
  .nw-terminal-page-help-head,
  .nw-terminal-page-help-scroll > section {
    padding-inline: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .nw-terminal-page-help,
  .nw-terminal-page-help-backdrop {
    transition-duration: .01ms !important;
  }
}
