.gw-help-modal-card {
  width: min(920px, 96vw);
  max-height: min(88vh, 900px);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.gw-help-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.gw-help-modal-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.gw-help-modal-body {
  display: flex;
  min-height: 0;
  flex: 1;
  overflow: hidden;
}

.gw-help-modal-body.is-manual {
  flex-direction: row;
}

.gw-help-nav {
  width: 220px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 10px 8px;
  display: none;
}

.gw-help-modal-body.is-manual .gw-help-nav {
  display: block;
}

.gw-help-nav button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  margin-bottom: 4px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
}

.gw-help-nav button:hover {
  background: var(--surface-muted);
}

.gw-help-nav button.is-active {
  background: rgba(46, 229, 157, 0.12);
  color: var(--ok);
}

.gw-help-content {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px 24px;
  font-size: 14px;
  line-height: 1.55;
}

.gw-help-content h1 { font-size: 1.35rem; margin: 0 0 12px; }
.gw-help-content h2 { font-size: 1.12rem; margin: 20px 0 10px; border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.gw-help-content h3 { font-size: 1rem; margin: 16px 0 8px; }
.gw-help-content p { margin: 0 0 12px; }
.gw-help-content ul, .gw-help-content ol { margin: 0 0 12px 1.2rem; padding: 0; }
.gw-help-content li { margin-bottom: 6px; }
.gw-help-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 16px;
  font-size: 13px;
}
.gw-help-content th, .gw-help-content td {
  border: 1px solid var(--border);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}
.gw-help-content th { background: var(--surface-muted); font-weight: 600; }
.gw-help-content code {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  background: var(--surface-muted);
  padding: 2px 5px;
  border-radius: 4px;
}
.gw-help-content pre {
  background: var(--surface-muted);
  padding: 12px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 12px;
  margin: 12px 0;
}
.gw-help-content pre code { background: none; padding: 0; }
.gw-help-content .mermaid {
  margin: 16px 0;
  text-align: center;
}
.gw-help-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

.gw-help-modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 18px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.help-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--muted);
  cursor: pointer;
  flex-shrink: 0;
  line-height: 1;
}

.help-trigger:hover {
  color: var(--ok);
  border-color: rgba(46, 229, 157, 0.45);
}

.help-trigger svg {
  width: 16px;
  height: 16px;
}

.dash-page-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.dash-page-head .dash-page-title {
  margin: 0;
}

.panel-head .help-trigger,
.section-toolbar .help-trigger,
.panel-actions .help-trigger,
fieldset legend .help-trigger {
  margin-left: 4px;
  vertical-align: middle;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
