/* Sellnaut user guide (v22.57): one guide, three places — the public Help centre (/help), the dashboard's
   "User guide" page (#/help) and the "?" panel at the top of every dashboard page. Everything is scoped under .hg. */
.hg, .hg-drawer {
  --hg-ink: #0E1B2C; --hg-ink2: #44506A; --hg-ink3: #6B7690; --hg-line: #E3E7EE; --hg-soft: #F3F5F9; --hg-bg: #FFFFFF;
  --hg-accent: #3D5AFE; --hg-accent-ink: #2A43D6; --hg-accent-soft: #EEF1FF; --hg-mint: #2EE6A6; --hg-mint-ink: #053B29;
  --hg-warn: #B8650A; --hg-warn-soft: #FFF3E6; --hg-good: #12805C; --hg-good-soft: #E8F5EF; --hg-bad: #C7362F; --hg-bad-soft: #FDECEB;
  --hg-mark: #FF4D6D;
  color: var(--hg-ink); font-size: 15px; line-height: 1.65;
}
.hg { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 36px; align-items: start; }
.hg *, .hg-drawer * { box-sizing: border-box; }

/* ---------------------------------------------------------------- table of contents */
.hg-toc { position: sticky; top: var(--hg-top, 84px); max-height: calc(100vh - var(--hg-top, 84px) - 16px); overflow-y: auto; padding: 4px 6px 24px 2px; font-size: 13.5px; scrollbar-width: thin; }
.hg-search { position: relative; margin-bottom: 14px; }
.hg-search input { width: 100%; height: 40px; border: 1px solid var(--hg-line); border-radius: 10px; padding: 0 12px 0 36px; font: inherit; background: var(--hg-bg); color: var(--hg-ink); }
.hg-search input:focus { outline: 2px solid var(--hg-accent); outline-offset: 0; border-color: transparent; }
.hg-search svg { position: absolute; left: 11px; top: 11px; width: 18px; height: 18px; color: var(--hg-ink3); }
.hg-found { font-size: 12.5px; color: var(--hg-ink3); margin: -6px 0 10px 2px; min-height: 1em; }
.hg-toc ol { list-style: none; margin: 0; padding: 0; }
.hg-toc .hg-tp { margin: 14px 0 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--hg-ink3); padding-left: 10px; }
.hg-toc a { display: block; padding: 5px 10px; border-radius: 8px; color: var(--hg-ink2); text-decoration: none; border-left: 2px solid transparent; }
.hg-toc a:hover { background: var(--hg-soft); color: var(--hg-ink); }
.hg-toc a.on { color: var(--hg-accent-ink); background: var(--hg-accent-soft); font-weight: 600; }
.hg-toc a.hg-miss { display: none; }

/* ---------------------------------------------------------------- document */
.hg-main { min-width: 0; }
.hg-intro { background: linear-gradient(135deg, #0A1A45, #1C3690); color: #DCE3F5; border-radius: 18px; padding: 26px 28px; margin-bottom: 28px; }
.hg-intro h2 { color: #fff; margin: 0 0 6px; font-size: 24px; letter-spacing: -.01em; }
.hg-intro p { margin: 0 0 14px; max-width: 760px; }
.hg-path { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: hgp; }
.hg-path li { counter-increment: hgp; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 12px; padding: 12px 12px 12px 44px; position: relative; font-size: 13.5px; }
.hg-path li::before { content: counter(hgp); position: absolute; left: 12px; top: 12px; width: 22px; height: 22px; border-radius: 50%; background: var(--hg-mint); color: var(--hg-mint-ink); font-weight: 700; font-size: 12px; display: grid; place-items: center; }
.hg-path a { color: #fff; font-weight: 600; text-decoration: none; }
.hg-path a:hover { text-decoration: underline; }
.hg-path span { display: block; color: #AFBBDA; font-size: 12.5px; }

.hg-part { margin: 0 0 12px; }
.hg-part > h2 { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--hg-accent-ink); margin: 40px 0 6px; padding-top: 6px; }
.hg-part > p.hg-part-lede { color: var(--hg-ink2); margin: 0 0 14px; max-width: 780px; }
.hg-sec { background: var(--hg-bg); border: 1px solid var(--hg-line); border-radius: 16px; padding: 26px 30px 24px; margin: 0 0 22px; scroll-margin-top: var(--hg-top, 84px); }
.hg-sec.hg-miss { display: none; }
.hg-sec > h3 { font-size: 23px; line-height: 1.25; margin: 0 0 4px; letter-spacing: -.012em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hg-sec > h3 .hg-where { font-size: 12px; font-weight: 600; color: var(--hg-ink3); background: var(--hg-soft); border: 1px solid var(--hg-line); border-radius: 999px; padding: 2px 10px; letter-spacing: 0; }
.hg-sec > .hg-lede { font-size: 16px; color: var(--hg-ink2); margin: 0 0 16px; }
.hg-sec h4 { font-size: 16.5px; margin: 26px 0 8px; }
.hg-sec h5 { font-size: 14.5px; margin: 18px 0 6px; }
.hg-sec p { margin: 0 0 12px; }
.hg-sec ul, .hg-sec ol { margin: 0 0 14px; padding-left: 22px; }
.hg-sec li { margin: 4px 0; }
.hg-sec code { background: var(--hg-soft); border: 1px solid var(--hg-line); border-radius: 6px; padding: 1px 6px; font-size: .9em; }
.hg-sec a { color: var(--hg-accent-ink); }
.hg-ui { display: inline-block; font-weight: 600; font-size: .92em; background: var(--hg-soft); border: 1px solid var(--hg-line); border-radius: 7px; padding: 0 7px; white-space: nowrap; color: var(--hg-ink); }
.hg-open { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; text-decoration: none; margin: 0 0 14px; }

/* numbered steps */
.hg-steps { list-style: none; padding: 0 !important; counter-reset: hgs; margin: 6px 0 18px !important; }
.hg-steps > li { counter-increment: hgs; position: relative; padding: 2px 0 12px 44px; margin: 0 !important; border-left: 2px solid var(--hg-line); margin-left: 15px !important; padding-left: 30px; }
.hg-steps > li:last-child { border-left-color: transparent; padding-bottom: 2px; }
.hg-steps > li::before { content: counter(hgs); position: absolute; left: -16px; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--hg-accent); color: #fff; font-weight: 700; font-size: 13.5px; display: grid; place-items: center; box-shadow: 0 0 0 4px var(--hg-bg); }
.hg-steps > li > b:first-child { display: block; font-size: 15.5px; }

/* figures with numbered callouts */
.hg-fig { margin: 16px 0 18px; }
.hg-shot { display: block; position: relative; border: 1px solid var(--hg-line); border-radius: 12px; overflow: hidden; background: #F6F7FB; box-shadow: 0 14px 34px -22px rgba(14,27,44,.45); cursor: zoom-in; }
.hg-shot img { display: block; width: 100%; height: auto; }
.hg-fig figcaption { font-size: 13px; color: var(--hg-ink3); margin-top: 8px; }
.hg-keys { list-style: none; padding: 0 !important; margin: 12px 0 0 !important; display: grid; gap: 8px; }
.hg-keys li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; margin: 0 !important; font-size: 14px; }
.hg-keys li > i { font-style: normal; width: 24px; height: 24px; border-radius: 50%; background: var(--hg-mark); color: #fff; font-weight: 700; font-size: 12.5px; display: grid; place-items: center; margin-top: 1px; }
.hg-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* callout boxes */
.hg-tip, .hg-note, .hg-warn { border-radius: 12px; padding: 12px 16px 12px 46px; margin: 14px 0; position: relative; font-size: 14.5px; }
.hg-tip { background: var(--hg-good-soft); border: 1px solid #BFE3D2; }
.hg-note { background: var(--hg-accent-soft); border: 1px solid #CBD3FF; }
.hg-warn { background: var(--hg-warn-soft); border: 1px solid #F3D3AC; }
.hg-tip::before, .hg-note::before, .hg-warn::before { position: absolute; left: 14px; top: 12px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: #fff; }
.hg-tip::before { content: '✓'; background: var(--hg-good); }
.hg-note::before { content: 'i'; background: var(--hg-accent); font-family: Georgia, serif; }
.hg-warn::before { content: '!'; background: var(--hg-warn); }
.hg-tip p:last-child, .hg-note p:last-child, .hg-warn p:last-child { margin: 0; }

/* term tables */
.hg-table { width: 100%; border-collapse: collapse; margin: 8px 0 16px; font-size: 14px; }
.hg-table th, .hg-table td { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid var(--hg-line); }
.hg-table th { background: var(--hg-soft); font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--hg-ink3); }
.hg-table td:first-child { font-weight: 600; white-space: nowrap; }
.hg-twrap { overflow-x: auto; border: 1px solid var(--hg-line); border-radius: 12px; margin: 8px 0 16px; }
.hg-twrap .hg-table { margin: 0; }
.hg-twrap .hg-table tr:last-child td { border-bottom: 0; }

/* flow chips (A → B → C) */
.hg-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 16px; padding: 0; list-style: none; }
.hg-flow li { background: var(--hg-bg); border: 1px solid var(--hg-line); border-radius: 10px; padding: 8px 12px; font-size: 13.5px; font-weight: 600; margin: 0 !important; }
.hg-flow li + li::before { content: '→'; color: var(--hg-ink3); margin: 0 10px 0 -2px; font-weight: 400; }
.hg-flow li { display: flex; align-items: center; }

.hg-faq details { border: 1px solid var(--hg-line); border-radius: 12px; padding: 0 16px; margin: 0 0 10px; background: var(--hg-bg); }
.hg-faq summary { cursor: pointer; font-weight: 600; padding: 12px 0; }
.hg-faq details[open] summary { border-bottom: 1px solid var(--hg-line); margin-bottom: 10px; }

.hg-top { display: inline-block; font-size: 12.5px; color: var(--hg-ink3); text-decoration: none; margin-top: 4px; }

/* lightbox */
.hg-lb { position: fixed; inset: 0; z-index: 200; background: rgba(6,16,43,.86); display: grid; place-items: center; padding: 24px; cursor: zoom-out; }
.hg-lb img { max-width: min(1600px, 100%); max-height: 100%; border-radius: 10px; box-shadow: 0 30px 80px rgba(0,0,0,.5); background: #fff; }
.hg-lb button { position: absolute; top: 14px; right: 16px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; color: #0E1B2C; font-size: 22px; cursor: pointer; }

/* ---------------------------------------------------------------- the "?" panel in the dashboard */
.hg-drawer .hg-sec { border: 0; padding: 0; margin: 0; background: none; }
.hg-drawer .hg-sec > h3 { font-size: 20px; }
.hg-drawer .hg-pair { grid-template-columns: 1fr; }
.hg-drawer-foot { position: sticky; bottom: -28px; background: #fff; border-top: 1px solid var(--hg-line); margin: 18px -20px -28px; padding: 12px 20px; display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 980px) {
  .hg { grid-template-columns: 1fr; gap: 0; }
  .hg-toc { position: static; max-height: none; border: 1px solid var(--hg-line); border-radius: 14px; padding: 12px; margin-bottom: 18px; background: var(--hg-bg); }
  .hg-toc details:not([open]) ol { display: none; }
  .hg-sec { padding: 20px 18px; border-radius: 14px; }
  .hg-sec > h3 { font-size: 20px; }
  .hg-pair { grid-template-columns: 1fr; }
  .hg-intro { padding: 20px; }
}
@media (prefers-reduced-motion: no-preference) { html:has(.hg) { scroll-behavior: smooth; } }
.hg-toc summary::-webkit-details-marker { display: none; }
.hg-toc summary.hg-tp::after { content: ' ▾'; }
.hg-toc details[open] > summary.hg-tp::after { content: ' ▴'; }
