/* help-drawer.css — the help panel beside a running tool (shell only).
   Overlay on the right, never a split (#tool-root reflows badly). Emitted at
   body level so .p-view's overflow clip cannot cut it. Prose inside comes
   from help.css (.help-embed / .help-body), which maps onto the shell's own
   tokens (--accent, --tile, --line …) — nothing re-declared here. */

.pf-help {
  position: fixed;
  top: 66px;                 /* below the sticky .p-tbar */
  right: 0;
  bottom: 0;
  width: min(440px, 100vw);
  z-index: 45;               /* above the tool, below the shell's dropdowns (200) */
  display: flex;
  flex-direction: column;
  background: var(--bg, #0e0f0f);
  border-left: 1px solid var(--line);
  box-shadow: -18px 0 40px rgba(0, 0, 0, .45);
}
.pf-help[hidden] { display: none; }

.pf-help-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 10px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--tile);
  flex: none;
}
.pf-help-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  flex: 1;
}
.pf-help-full {
  font-size: 12.5px;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 4px 9px;
}
.pf-help-full:hover { color: var(--text); border-color: var(--accent); }
.pf-help-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--tile-2);
  color: var(--text);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.pf-help-close:hover { border-color: var(--accent); }
.pf-help-close:focus-visible,
.pf-help-full:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.pf-help-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 20px 40px;
  outline: none;
}
.pf-help-body[aria-busy="true"] { opacity: .5; }
.pf-help-body .help-body img { max-width: 100%; }
.pf-help-body .help-body table { min-width: 0; }
.pf-help-error { color: var(--muted); font-size: 14px; }

/* The topbar "?" button */
.p-tbtn.help[aria-expanded="true"] { color: var(--accent); border-color: var(--accent); }

@media (max-width: 720px) {
  .pf-help { top: 0; width: 100vw; z-index: 210; box-shadow: none; border-left: none; }
}
