/* ============================================================================
   SiteViewer Help Centre - documentation design system v2 (self-contained).
   Dark chrome + hero, light body. Hub = search + browse-by-topic cards.
   Article = left topic/article sidebar + content + callouts + related + CTA.
   help.js injects the header, the sidebar, the per-article extras and footer.
   ========================================================================== */
:root {
  --hc-ink: #15131c;
  --hc-soft: #4a4658;
  --hc-faint: #6b6781;
  --hc-bg: #f5f4f7;
  --hc-card: #ffffff;
  --hc-line: #e7e5ee;
  --hc-line-soft: #efedf4;
  --hc-purple: #7c3aed;
  --hc-purple-d: #6d28d9;
  --hc-blue: #2563eb;
  --hc-grad: linear-gradient(135deg, #2563eb, #7c3aed);
  --hc-dark: #0e0a18;
  --hc-head: #1b1626;
  --hc-r: 16px;
  --hc-r-sm: 11px;
  --hc-maxw: 1200px;
  --hc-shadow: 0 1px 2px rgba(21,19,28,.04), 0 10px 30px -16px rgba(21,19,28,.18);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--hc-ink);
  background: var(--hc-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
.hc-wrap { max-width: var(--hc-maxw); margin: 0 auto; padding: 0 28px; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 12px; top: 12px; background: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }

/* ---- Header (dark, sticky) ----------------------------------------------- */
.help-header { position: sticky; top: 0; z-index: 60; background: rgba(27,22,38,.92); backdrop-filter: saturate(140%) blur(8px); border-bottom: 1px solid rgba(255,255,255,.07); }
.help-header .bar { display: flex; align-items: center; gap: 16px; height: 64px; }
.help-brand { display: inline-flex; align-items: center; gap: 11px; color: #fff; text-decoration: none; font-weight: 800; font-size: 18px; letter-spacing: -.01em; }
.help-brand .mk { width: 30px; height: 30px; border-radius: 9px; background: var(--hc-grad); display: grid; place-items: center; }
.help-brand .mk svg { width: 17px; height: 17px; color: #fff; }
.help-brand .lbl { font-weight: 500; color: #9b96ab; }
.help-header .spacer { flex: 1; }
.help-nav { display: flex; align-items: center; gap: 6px; }
.help-nav a { color: #d7d4e2; text-decoration: none; font-size: 14.5px; font-weight: 600; padding: 9px 14px; border-radius: 999px; }
.help-nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.help-nav a.ghost { border: 1px solid rgba(255,255,255,.2); }
.help-header .hsearch { display: inline-flex; align-items: center; gap: 9px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); color: #cdc7da; border-radius: 999px; padding: 9px 16px; font-size: 14px; cursor: pointer; }
.help-header .hsearch svg { width: 15px; height: 15px; }
.help-burger { display: none; background: none; border: 0; color: #fff; padding: 8px; cursor: pointer; }
.help-burger svg { width: 24px; height: 24px; }

/* ---- Hero (hub) ---------------------------------------------------------- */
.help-hero { background: radial-gradient(90% 120% at 88% -10%, rgba(124,58,237,.5), transparent 52%), var(--hc-dark); color: #fff; padding: 64px 0 70px; }
.help-hero h1 { font-size: clamp(38px, 6vw, 62px); margin: 0; letter-spacing: -.03em; line-height: 1.02; font-weight: 800; }
.help-hero h1 .g { background: linear-gradient(96deg, #a78bfa, #c084fc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.help-hero p { color: #b6b1c6; font-size: clamp(16px, 2vw, 19px); margin: 18px 0 0; max-width: 42ch; line-height: 1.5; }
.help-searchbox { margin: 30px 0 0; max-width: 700px; position: relative; }
.help-searchbox svg { position: absolute; left: 22px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: #8a8699; }
.help-searchbox input { width: 100%; height: 62px; border-radius: var(--hc-r); border: 0; background: #fff; color: var(--hc-ink); font-size: 17px; padding: 0 22px 0 54px; font-family: inherit; box-shadow: 0 20px 50px -20px rgba(0,0,0,.5); }
.help-searchbox input:focus { outline: 3px solid rgba(124,58,237,.55); }
.help-popular { margin: 20px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.help-popular .lbl { color: #8a8699; font-size: 14px; font-weight: 600; margin-right: 2px; }
.help-popular a { color: #e7e4ef; text-decoration: none; font-size: 14px; font-weight: 600; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 999px; padding: 8px 16px; }
.help-popular a:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.2); }

/* ---- Browse by topic (hub) ----------------------------------------------- */
.help-browse { padding: 52px 0 90px; }
.help-browse .bhead { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 0 0 24px; }
.help-browse .bhead .eyebrow { font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--hc-faint); }
.help-browse .bhead .count { font-size: 14px; color: var(--hc-faint); }
.browse-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 22px; align-items: stretch; }
.browse-card { background: var(--hc-card); border: 1px solid var(--hc-line); border-radius: var(--hc-r); padding: 24px 26px; box-shadow: var(--hc-shadow); display: flex; flex-direction: column; min-height: 336px; }
.browse-card .ch { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 8px; }
.browse-card .ic { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 13px; background: var(--hc-grad); display: grid; place-items: center; box-shadow: 0 8px 18px -8px rgba(124,58,237,.6); }
.browse-card .ic svg { width: 23px; height: 23px; color: #fff; }
.browse-card h3 { font-size: 20px; margin: 0; letter-spacing: -.01em; line-height: 1.15; }
.browse-card .sub { display: block; margin-top: 3px; font-size: 14px; color: var(--hc-faint); font-weight: 500; }
.browse-card ul { list-style: none; margin: 0; padding: 0; }
.browse-card ul li:not(:first-child) { border-top: 1px solid var(--hc-line-soft); }
.browse-card ul a { display: block; color: var(--hc-soft); text-decoration: none; font-size: 15px; line-height: 1.4; padding: 11px 2px; }
.browse-card ul a:hover { color: var(--hc-purple); }
.browse-card .more { margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: 7px; background: none; border: 0; padding: 14px 2px 0; font: inherit; font-size: 14.5px; font-weight: 700; color: var(--hc-purple-d); cursor: pointer; }
.browse-card .more svg { width: 15px; height: 15px; transition: transform .2s; }
.browse-card.expanded .more svg { transform: rotate(-90deg); }
.browse-card[hidden], .browse-card ul li[hidden] { display: none; }
.browse-empty { color: var(--hc-faint); font-size: 15px; margin-top: 8px; }

/* ---- Article layout (left sidebar + content) ----------------------------- */
.hc-article { display: grid; grid-template-columns: 264px minmax(0,1fr); gap: 50px; max-width: var(--hc-maxw); margin: 0 auto; padding: 34px 28px 40px; align-items: start; }
/* sidebar */
.hc-side { position: sticky; top: 88px; }
.hc-side .alltopics { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--hc-faint); text-decoration: none; margin: 0 0 18px; }
.hc-side .alltopics:hover { color: var(--hc-purple); }
.hc-side .alltopics svg { width: 15px; height: 15px; }
.hc-topic { margin: 2px 0; }
.hc-topic > a { display: flex; align-items: center; gap: 11px; padding: 7px 0; color: var(--hc-ink); text-decoration: none; font-weight: 700; font-size: 15px; }
.hc-topic > a .tic { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 9px; background: var(--hc-grad); display: grid; place-items: center; }
.hc-topic > a .tic svg { width: 16px; height: 16px; color: #fff; }
.hc-topic > a:hover { color: var(--hc-purple); }
.hc-topic .arts { list-style: none; margin: 2px 0 8px; padding: 0 0 0 11px; border-left: 1px solid var(--hc-line); margin-left: 14px; display: grid; gap: 1px; }
.hc-topic .arts a { display: block; padding: 7px 12px; font-size: 14px; line-height: 1.4; color: var(--hc-soft); text-decoration: none; border-radius: 8px; }
.hc-topic .arts a:hover { color: var(--hc-ink); background: var(--hc-line-soft); }
.hc-topic .arts a.active { color: var(--hc-purple-d); background: rgba(124,58,237,.1); font-weight: 600; }
/* main doc */
.hc-doc { min-width: 0; max-width: 760px; }
.hc-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; font-size: 13px; color: var(--hc-faint); margin: 0 0 20px; }
.hc-crumb a { color: var(--hc-faint); text-decoration: none; }
.hc-crumb a:hover { color: var(--hc-purple); }
.hc-crumb .sep { opacity: .5; }
.hc-crumb .cur { color: var(--hc-ink); font-weight: 600; }
.hc-doc h1 { font-size: clamp(30px, 4.4vw, 42px); line-height: 1.1; margin: 0; letter-spacing: -.02em; font-weight: 800; }
.hc-sub { font-size: clamp(17px, 2vw, 19px); color: var(--hc-soft); margin: 14px 0 0; line-height: 1.5; }
.hc-meta { margin: 16px 0 0; font-size: 13px; color: var(--hc-faint); }
/* body content (reused class names from the old template so content transfers) */
.hc-body, .art-body { margin-top: 26px; }
.hc-body h2, .art-body h2 { font-size: 23px; margin: 40px 0 0; letter-spacing: -.01em; font-weight: 700; scroll-margin-top: 88px; }
.hc-body h2:first-child, .art-body h2:first-child { margin-top: 4px; }
.hc-body p, .art-body p { font-size: 16.5px; line-height: 1.72; color: var(--hc-soft); margin: 14px 0 0; }
.hc-body p strong, .art-body p strong, .hc-body li strong, .art-body li strong { color: var(--hc-ink); font-weight: 650; }
.hc-body a.inl, .art-body a.inl { color: var(--hc-purple); font-weight: 600; }
/* bold-lead-in check list */
.art-body ul.checks, .hc-body ul.checks { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 13px; }
.art-body ul.checks li, .hc-body ul.checks li { position: relative; padding-left: 30px; font-size: 16px; line-height: 1.6; color: var(--hc-soft); }
.art-body ul.checks li::before, .hc-body ul.checks li::before { content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--hc-grad); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/13px no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/13px no-repeat; }
/* numbered "Step by step" */
.art-body ol.steps, .hc-body ol.steps { list-style: none; margin: 18px 0 0; padding: 0; counter-reset: st; display: grid; gap: 16px; }
.art-body ol.steps > li, .hc-body ol.steps > li { position: relative; padding-left: 46px; font-size: 16.5px; line-height: 1.55; color: var(--hc-soft); counter-increment: st; min-height: 30px; }
.art-body ol.steps > li::before, .hc-body ol.steps > li::before { content: counter(st); position: absolute; left: 0; top: -1px; width: 30px; height: 30px; border-radius: 9px; background: rgba(124,58,237,.1); color: var(--hc-purple-d); font-size: 14px; font-weight: 800; display: grid; place-items: center; }
.art-body ol.steps > li strong, .hc-body ol.steps > li strong { color: var(--hc-ink); }
/* "Good to know" callout */
.art-tip, .hc-tip { margin: 26px 0 0; background: var(--hc-card); border: 1px solid var(--hc-line); border-radius: var(--hc-r); padding: 18px 20px 18px 60px; position: relative; box-shadow: var(--hc-shadow); }
.art-tip::before, .hc-tip::before { content: ""; position: absolute; left: 18px; top: 18px; width: 30px; height: 30px; border-radius: 9px; background: var(--hc-grad); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2l2.2 5.8L20 10l-5.8 2.2L12 18l-2.2-5.8L4 10l5.8-2.2z'/%3E%3C/svg%3E") center/30px no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2l2.2 5.8L20 10l-5.8 2.2L12 18l-2.2-5.8L4 10l5.8-2.2z'/%3E%3C/svg%3E") center/30px no-repeat; }
.art-tip .tip-h, .hc-tip .tip-h { display: inline; font-weight: 700; color: var(--hc-ink); font-size: 16px; }
.art-tip .tip-h::after { content: ": "; }
.art-tip p, .hc-tip p { display: inline; font-size: 16px; line-height: 1.6; color: var(--hc-soft); margin: 0; }
/* dark technical box (kept for the security guide) */
.art-tech { margin: 26px 0 0; background: var(--hc-dark); color: #d7d4e2; border-radius: var(--hc-r); padding: 22px 24px; }
.art-tech h3 { color: #fff; font-size: 15px; margin: 0; }
.art-tech ul { margin: 12px 0 0; padding-left: 18px; }
.art-tech li { font-size: 14.5px; line-height: 1.7; color: #c4c1d4; }
.art-tech li b { color: #fff; }
.art-rule, .hc-rule { border: 0; border-top: 1px solid var(--hc-line); margin: 38px 0 0; }
/* related */
.hc-related { margin: 36px 0 0; }
.hc-related .rh { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--hc-faint); margin: 0 0 14px; }
.hc-related a { display: inline-flex; align-items: center; gap: 10px; color: var(--hc-purple-d); font-weight: 700; font-size: 16px; text-decoration: none; padding: 7px 0; }
.hc-related a svg { width: 16px; height: 16px; }
.hc-related a:hover { text-decoration: underline; }
.hc-related .rl { display: grid; gap: 2px; }
/* was this helpful */
.hc-helpful { margin: 34px 0 0; background: var(--hc-card); border: 1px solid var(--hc-line); border-radius: var(--hc-r); padding: 20px 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; box-shadow: var(--hc-shadow); }
.hc-helpful b { font-size: 16px; }
.hc-helpful .btns { display: flex; gap: 10px; }
.hc-helpful button { display: inline-flex; align-items: center; gap: 7px; font: inherit; font-size: 14px; font-weight: 600; color: var(--hc-soft); background: var(--hc-bg); border: 1px solid var(--hc-line); border-radius: 10px; padding: 9px 16px; cursor: pointer; }
.hc-helpful button:hover { border-color: var(--hc-purple); color: var(--hc-purple); }
.hc-helpful button svg { width: 16px; height: 16px; }
.hc-helpful.done .btns { display: none; }
.hc-helpful .thanks { display: none; color: var(--hc-purple-d); font-weight: 600; font-size: 14px; }
.hc-helpful.done .thanks { display: block; }
/* still stuck CTA */
.hc-stuck { margin: 40px auto 0; max-width: var(--hc-maxw); padding: 0 28px; }
.hc-stuck .in { background: radial-gradient(80% 140% at 85% 0%, rgba(124,58,237,.5), transparent 55%), var(--hc-dark); border-radius: 22px; padding: 34px 36px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.hc-stuck h3 { color: #fff; font-size: 26px; margin: 0; font-weight: 800; letter-spacing: -.01em; }
.hc-stuck p { color: #b6b1c6; margin: 8px 0 0; font-size: 15.5px; line-height: 1.5; max-width: 42ch; }
.hc-stuck .acts { display: flex; flex-wrap: wrap; gap: 12px; }
.hc-stuck .acts a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; font-size: 15px; padding: 12px 20px; border-radius: 11px; }
.hc-stuck .acts a svg { width: 17px; height: 17px; }
.hc-stuck .acts .primary { background: #fff; color: var(--hc-ink); }
.hc-stuck .acts .ghost { background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.2); }

/* ---- Footer -------------------------------------------------------------- */
.help-footer { background: var(--hc-dark); color: #8a8699; padding: 28px 0; margin-top: 50px; }
.help-footer .fin { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; }
.help-footer a { color: #b6b1c6; text-decoration: none; font-size: 14px; font-weight: 600; }
.help-footer a:hover { color: #fff; }
.help-footer .fsp { flex: 1; }
.help-footer .cpy { color: #6b6781; font-size: 13px; width: 100%; margin-top: 8px; }

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 940px) {
  .hc-article { grid-template-columns: 1fr; gap: 24px; }
  .hc-side { position: static; background: var(--hc-card); border: 1px solid var(--hc-line); border-radius: var(--hc-r); padding: 16px 18px; }
  .hc-side .hc-topic .arts { display: none; }
  .hc-side .hc-topic.cur .arts { display: grid; }
}
@media (max-width: 720px) {
  .help-nav, .help-header .hsearch { display: none; }
  .help-burger { display: inline-flex; }
  .help-header.open .help-nav { display: flex; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--hc-head); padding: 8px 18px 16px; gap: 4px; }
  .help-header.open .help-nav a { padding: 12px; }
  .hc-stuck .in { flex-direction: column; align-items: flex-start; }
}
