/* Scoped from in-app help HTML; keeps full manual content without affecting site chrome */
.help-document {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  padding: 0 0 1.5rem;
  line-height: 1.55;
  max-width: none;
  margin: 0 auto;
}

.help-document.theme-dark {
  background: transparent;
  color: #e8eef4;
}

.help-document.theme-dark h1,
.help-document.theme-dark h2,
.help-document.theme-dark h3,
.help-document.theme-dark p,
.help-document.theme-dark div,
.help-document.theme-dark li,
.help-document.theme-dark summary,
.help-document.theme-dark code,
.help-document.theme-dark .summary-title {
  color: #e8eef4;
}

.help-document .help-intro {
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
  opacity: 0.95;
}

.help-document.theme-dark .help-intro {
  color: #c8d4e0;
}

.help-document h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
}

.help-document.theme-dark h1 {
  color: #81d4fa;
  text-shadow: 0 0 20px rgba(129, 212, 250, 0.2);
}

.help-document h2 {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 1.5rem 0 0.6rem;
  padding: 0.4rem 0 0.5rem;
  letter-spacing: 0.01em;
  visibility: visible;
}

.help-document.theme-dark h2 {
  color: #b388ff;
  border-bottom: 2px solid rgba(179, 136, 255, 0.45);
  padding-bottom: 0.35rem;
}

.help-document .help-section-desc {
  font-size: 0.98rem;
  margin-bottom: 0.75rem;
}

.help-document.theme-dark .help-section-desc {
  color: #b0bec5;
}

.help-document.theme-dark strong {
  color: #81d4fa;
  font-weight: 700;
}

.help-document .key {
  font-weight: 600;
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.help-document.theme-dark .key {
  background: rgba(129, 212, 250, 0.12);
  color: #81d4fa;
  border: 1px solid rgba(129, 212, 250, 0.3);
}

.help-document.theme-dark details {
  margin: 0 0 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  box-shadow: none;
}

.help-document.theme-dark details[open] {
  background: #222838;
  border-color: rgba(110, 200, 255, 0.35);
  box-shadow: 0 0 0 1px rgba(110, 200, 255, 0.12);
}

.help-document summary {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0.85rem 1rem;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  user-select: none;
  border-radius: var(--radius-sm);
}

.help-document summary::-webkit-details-marker {
  display: none;
}

.help-document summary::before {
  content: "+";
  flex-shrink: 0;
  width: 1.5em;
  font-weight: 800;
  font-size: 1.15em;
  text-align: left;
  line-height: 1;
}

.help-document.theme-dark summary::before {
  color: #4dd0e1;
  text-shadow: 0 0 10px rgba(77, 208, 225, 0.35);
}

.help-document details[open] > summary::before {
  content: "-";
}

.help-document.theme-dark details[open] > summary::before {
  color: #b388ff;
  text-shadow: 0 0 10px rgba(179, 136, 255, 0.35);
}

.help-document summary .summary-title {
  flex: 1;
  text-align: center;
}

.help-document.theme-dark summary .summary-title {
  color: #e8eef4;
}

.help-document details > div {
  padding: 0.75rem 1rem 1rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  border-top: 1px solid var(--border);
}

.help-document details > div p {
  margin: 0.45rem 0;
}

.help-document details > div p:first-child {
  margin-top: 0;
}

.help-document details > div ul {
  margin: 0.5rem 0 0.6rem;
  padding-left: 1.35rem;
}

.help-document details > div li {
  margin: 0.25rem 0;
}

.help-document .formula {
  font-family: ui-monospace, monospace;
  padding: 0.2em 0.5em;
  border-radius: 4px;
  font-size: 0.95em;
}

.help-document.theme-dark .formula {
  background: #1e2a3a;
  color: #81d4fa;
  border: 1px solid #37474f;
}

.help-document.theme-dark a {
  color: #82b1ff;
}

.help-document.theme-dark code {
  color: #b0bec5;
}
