/* ==========================================================================
   Help — searchable per-experiment reference (js/help.js)
   ========================================================================== */

.beta-help-btn {
  position: fixed;
  left: var(--beta-edge);
  bottom: 14px;
  z-index: 700;
  font-family: var(--beta-font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  padding: 6px 10px;
  border: 1px solid var(--beta-fg-muted);
  transition: color 150ms var(--beta-ease), border-color 150ms var(--beta-ease);
}

.beta-help-btn:hover {
  color: var(--beta-accent);
  border-color: var(--beta-accent);
}

/* [hidden] must win over this rule's own `display: flex` below — an
   author rule always beats the UA [hidden]{display:none} default
   regardless of specificity (see the same fix on .beta-keys-panel). */
.beta-help-panel[hidden] {
  display: none;
}

.beta-help-panel {
  position: fixed;
  left: 50%;
  top: 8vh;
  transform: translateX(-50%);
  z-index: 900;
  width: min(92vw, 640px);
  max-height: 84vh;
  display: flex;
  flex-direction: column;
  background: var(--beta-bg);
  border: 1px solid var(--beta-fg);
}

.beta-help-head {
  display: flex;
  align-items: center;
  flex: none;
  border-bottom: 1px solid var(--beta-fg);
}

.beta-help-search {
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
  border: none;
  font-family: var(--beta-font-mono);
  font-size: 13px;
  color: var(--beta-fg);
  background: var(--beta-bg);
}

.beta-help-search:focus-visible {
  outline: none;
}

.beta-help-close {
  flex: none;
  padding: 14px 16px;
  font-size: 16px;
  line-height: 1;
  border-left: 1px solid var(--beta-fg);
}

.beta-help-list {
  overflow-y: auto;
}

.beta-help-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--beta-line);
}

.beta-help-item:last-child {
  border-bottom: none;
}

.beta-help-item:hover {
  background: var(--beta-line);
}

.beta-help-name {
  font-family: var(--beta-font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 700;
}

.beta-help-category {
  font-family: var(--beta-font-mono);
  font-size: 10px;
  color: var(--beta-fg-muted);
  margin-left: 6px;
}

.beta-help-desc {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--beta-fg-muted);
}

.beta-help-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--beta-fg-muted);
  font-size: 12px;
}

@media (max-width: 640px) {
  .beta-help-panel {
    width: 100vw;
    max-height: 100vh;
    top: 0;
    height: 100vh;
    border-left: none;
    border-right: none;
  }
}

