/* ==========================================================================
   User guide (help.js) — the ? button in the header and the ☰ menu's Help
   section open one full-height panel. Phone-first: the panel is the whole
   screen below 700 px; on a desktop it is a 560 px sheet on the right, so the
   app stays visible beside it.
   ========================================================================== */
.help-panel {
  position: fixed; inset: 0; z-index: 90;
  display: flex; flex-direction: column;
  background: #fff;
}
.help-panel.hidden { display: none; }
.help-head {
  display: flex; align-items: center; gap: 8px;
  height: var(--header-h); padding: 0 10px;
  background: var(--navy); color: #fff;
}
.help-title { flex: 1 1 auto; font-size: 18px; font-weight: 600; }
.help-head .btn.small { min-height: 34px; }
.help-x { color: #fff; }
.help-search {
  margin: 10px 12px 4px; padding: 9px 11px;
  font: inherit; font-size: 16px; /* 16px: iOS does not zoom the page on focus */
  border: 1px solid var(--line); border-radius: 8px;
}
.help-body { flex: 1 1 auto; overflow-y: auto; padding: 4px 12px 60px; -webkit-overflow-scrolling: touch; }

.help-sec { border-bottom: 1px solid var(--line); }
.help-sec > summary {
  list-style: none; cursor: pointer;
  min-height: 44px; display: flex; align-items: center;
  font-size: 16px; font-weight: 600; color: var(--navy);
}
.help-sec > summary::-webkit-details-marker { display: none; }
.help-sec > summary::before { content: '▸'; width: 18px; color: var(--muted); }
.help-sec[open] > summary::before { content: '▾'; }
.help-sec-body { padding: 0 0 12px 18px; font-size: 14.5px; line-height: 1.45; }
.help-sec-body h4 { margin: 12px 0 4px; font-size: 14.5px; color: var(--ink); }
.help-sec-body p { margin: 6px 0; }
.help-sec-body ul, .help-sec-body ol { margin: 4px 0 8px; padding-left: 20px; }
.help-sec-body li { margin: 3px 0; }
.help-lbl {
  display: inline-block; padding: 0 5px; border-radius: 5px;
  background: #eef2f8; color: var(--shir-ink); font-weight: 600; white-space: nowrap;
}
.help-tip {
  margin: 8px 0; padding: 7px 10px; border-radius: 8px;
  background: var(--warn-bg); color: #713f12; font-size: 14px;
}
.help-prompt-box { width: 100%; min-height: 60vh; font: 12px/1.4 ui-monospace, Consolas, monospace; }

#btn-help { font-weight: 700; font-size: 19px; min-width: 40px; min-height: 40px; }

@media (min-width: 700px) {
  .help-panel {
    inset: 0 0 0 auto; width: 560px;
    border-left: 1px solid var(--line); box-shadow: -8px 0 24px rgba(15, 23, 42, .2);
  }
}
