/* 31UP QR Studio 1.7 — Help tab (manuals). */
.qr31-help { --qh-head: 88px; --qh-top: calc(var(--qh-head) + 78px); color: var(--qr31-ink, #0b1a3a); } /* --qh-head: the theme's sticky header */
.qr31-console .qr31-help { --qh-head: 68px; } /* control center top bar */
body.wp-admin .qr31-help { --qh-head: 46px; } /* wp-admin: only the 32px toolbar */
.qr31-help *, .qr31-help *::before, .qr31-help *::after { box-sizing: border-box; }

/* Toolbar: search, manual switch, print */
.qh-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 18px; position: sticky; top: var(--qh-head); z-index: 6; padding: 10px 0; background: rgba(243, 246, 250, .94); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.qh-search { position: relative; flex: 1 1 280px; min-width: 0; max-width: 520px; display: block; margin: 0; }
.qh-search svg { position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; margin-top: -9px; fill: none; stroke: var(--qr31-muted, #5b6178); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.qh-search input { width: 100%; min-height: 44px; padding: 10px 12px 10px 38px; font: inherit; font-size: 16px; color: inherit; background: #fff; border: 1px solid #d8d8e0; border-radius: 12px; }
.qh-search input:focus { outline: 2px solid var(--qr31-brand, #1673ff); outline-offset: 1px; border-color: transparent; }
.qh-count { font-size: 13px; color: var(--qr31-muted, #5b6178); white-space: nowrap; }
.qh-nav { display: inline-flex; gap: 6px; }
.qh-nav[hidden] { display: none; }
.qh-which { margin-left: auto; }
.qh-print { white-space: nowrap; }

/* Layout: sticky contents + article */
.qh-wrap { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; align-items: start; }
.qh-toc { position: sticky; top: var(--qh-top); max-height: calc(100vh - var(--qh-top) - 16px); overflow: auto; background: #fff; border: 1px solid var(--qr31-line, #e1e4ee); border-radius: 14px; padding: 14px 10px 14px 14px; font-size: 14px; }
.qh-toc summary { font-weight: 800; cursor: pointer; padding: 2px 0 8px; list-style: none; }
.qh-toc summary::-webkit-details-marker { display: none; }
.qh-toc ul { list-style: none; margin: 0; padding: 0; }
.qh-toc li { margin: 0; }
.qh-toc a { display: block; padding: 5px 8px; border-radius: 8px; color: var(--qr31-ink, #0b1a3a); text-decoration: none; line-height: 1.3; }
.qh-toc a:hover, .qh-toc a:focus { background: #eef4ff; color: var(--qr31-brand, #1673ff); }
.qh-toc .is-l2 a { font-weight: 700; margin-top: 4px; }
.qh-toc .is-l3 a { padding-left: 20px; color: var(--qr31-muted, #5b6178); font-size: 13px; }

.qh-doc { min-width: 0; background: #fff; border: 1px solid var(--qr31-line, #e1e4ee); border-radius: 16px; padding: clamp(18px, 3.4vw, 40px); font-size: 16px; line-height: 1.6; overflow-wrap: anywhere; }
.qh-doc > :first-child { margin-top: 0; }
.qh-doc h1 { font-size: clamp(26px, 4vw, 34px); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 12px; }
.qh-doc h2 { font-size: clamp(21px, 3vw, 26px); line-height: 1.2; margin: 40px 0 12px; padding-top: 18px; border-top: 1px solid var(--qr31-line, #e1e4ee); scroll-margin-top: calc(var(--qh-top) + 8px); }
.qh-doc h3 { font-size: 19px; line-height: 1.3; margin: 28px 0 8px; scroll-margin-top: calc(var(--qh-top) + 8px); }
.qh-doc h4 { font-size: 16px; margin: 18px 0 6px; scroll-margin-top: calc(var(--qh-top) + 8px); }
.qh-doc p, .qh-doc ul, .qh-doc ol { margin: 0 0 12px; }
.qh-doc ul, .qh-doc ol { padding-left: 24px; }
.qh-doc li { margin: 4px 0; }
.qh-doc li > ul, .qh-doc li > ol { margin: 4px 0 6px; }
.qh-doc a { color: var(--qr31-brand, #1673ff); }
.qh-doc strong { font-weight: 700; }
.qh-doc code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; background: #f1f3f8; border-radius: 6px; padding: 1px 5px; word-break: break-word; }
.qh-doc pre { background: #0b1a3a; color: #e6ecf8; border-radius: 12px; padding: 14px; overflow-x: auto; font-size: 14px; }
.qh-doc pre code { background: none; padding: 0; color: inherit; }
.qh-doc hr { border: 0; border-top: 1px solid var(--qr31-line, #e1e4ee); margin: 28px 0; }
.qh-tip { margin: 14px 0 16px; padding: 12px 16px; background: #eef7ff; border-left: 4px solid var(--qr31-brand, #1673ff); border-radius: 0 12px 12px 0; }
.qh-tip p:last-child, .qh-tip ul:last-child { margin-bottom: 0; }
.qh-table { overflow-x: auto; margin: 0 0 16px; border: 1px solid var(--qr31-line, #e1e4ee); border-radius: 12px; }
.qh-table table { border-collapse: collapse; width: 100%; font-size: 14px; }
.qh-table th, .qh-table td { text-align: left; vertical-align: top; padding: 8px 12px; border-bottom: 1px solid var(--qr31-line, #e1e4ee); overflow-wrap: normal; }
.qh-table th { background: #f6f8fc; font-weight: 700; }
.qh-table tr:last-child td { border-bottom: 0; }
.qh-shot { margin: 14px 0 18px; }
.qh-shot a { display: inline-block; max-width: 100%; }
.qh-shot img { display: block; max-width: 100%; height: auto; border: 1px solid var(--qr31-line, #e1e4ee); border-radius: 12px; box-shadow: 0 6px 22px rgba(11, 26, 58, .08); }
.qh-shot.is-phone img { width: 320px; }
.qh-shot figcaption { margin-top: 6px; font-size: 13px; color: var(--qr31-muted, #5b6178); }
.qh-inline-img { max-height: 1.4em; vertical-align: middle; }
.qh-hit { background: #fff1a8; color: inherit; border-radius: 3px; padding: 0 1px; }
.qh-hit.is-cur { background: #ffb547; box-shadow: 0 0 0 2px #ffb547; }
.qh-foot { margin-top: 36px; padding-top: 14px; border-top: 1px solid var(--qr31-line, #e1e4ee); font-size: 13px; color: var(--qr31-muted, #5b6178); }

/* Phones and tablets: contents become a collapsible box above the manual */
@media (max-width: 900px) {
  .qr31-help { --qh-top: calc(var(--qh-head) + 12px); }
  .qh-bar { position: static; padding: 0; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .qh-wrap { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .qh-toc { position: static; max-height: none; }
  .qh-toc[open] nav { max-height: 60vh; overflow: auto; }
  .qh-toc summary::after { content: " ▾"; color: var(--qr31-muted, #5b6178); }
  .qh-which { margin-left: 0; }
}
@media (max-width: 640px) { .qr31-help { --qh-head: 70px; } .qr31-console .qr31-help { --qh-head: 64px; } }
@media (max-width: 520px) {
  .qh-bar { gap: 8px; }
  .qh-search { flex-basis: 100%; max-width: none; }
  .qh-doc { border-radius: 12px; padding: 16px; font-size: 15.5px; }
  .qh-doc ul, .qh-doc ol { padding-left: 20px; }
}

/* Print / Save as PDF: only the manual */
@media print {
  .qh-noprint, body.qr31-help-on .qr31-side, body.qr31-help-on .qr31-top, body.qr31-help-on .qr31-scrim-nav, body.qr31-help-on .qr31-dash-top { display: none !important; }
  body.qr31-help-on, body.qr31-help-on .qr31-shell, body.qr31-help-on .qr31-main, body.qr31-help-on .qr31-panel { display: block !important; background: #fff !important; padding: 0 !important; margin: 0 !important; min-height: 0 !important; max-width: none !important; width: auto !important; }
  .qr31-help .qh-bar, .qr31-help .qh-toc { display: none !important; }
  .qr31-help .qh-wrap { display: block; }
  .qr31-help .qh-doc { border: 0; padding: 0; font-size: 11pt; line-height: 1.45; }
  .qr31-help .qh-doc h2 { border-top: 1px solid #ccc; padding-top: 10px; margin-top: 22px; }
  .qr31-help .qh-doc h2, .qr31-help .qh-doc h3, .qr31-help .qh-doc h4 { break-after: avoid; }
  .qr31-help .qh-shot, .qr31-help .qh-tip, .qr31-help .qh-table, .qr31-help tr { break-inside: avoid; }
  .qr31-help .qh-shot img { box-shadow: none; max-height: 9cm; width: auto; }
  .qr31-help .qh-shot.is-phone img { max-height: 12cm; }
  .qr31-help .qh-hit { background: none; box-shadow: none; }
  .qr31-help .qh-doc a { color: inherit; text-decoration: none; }
  @page { margin: 16mm 14mm; }
}
