/* Help center, "?" panel, Show me walkthroughs, What's new (public/modules/help.js). Tokens from app.css; docs/BRAND.md. */

/* ───────── top bar button ───────── */
.hp-top-btn { width: 36px; padding: 0; justify-content: center; font-family: var(--font-display); font-size: 17px; }
.hp-top-btn[aria-expanded="true"] { background: var(--teal-wash); border-color: var(--teal); color: var(--teal-dark); }

/* ───────── shared bits ───────── */
.hp-new { margin-left: 8px; vertical-align: 1px; }
.hp-has-tour { margin-left: 8px; font-size: 12px; color: var(--steel); border: 1px solid var(--rule); border-radius: 999px; padding: 0 8px; white-space: nowrap; }
.hp-page kbd, .hp-panel kbd, .hp-tour kbd, .hp-wn kbd, .hp-foot kbd {
  font-family: var(--font-ui); font-size: 12px; font-weight: 600; color: var(--graphite); background: var(--paper);
  border: 1px solid var(--rule); border-bottom-width: 2px; border-radius: 4px; padding: 0 6px; line-height: 18px; display: inline-block; min-width: 20px; text-align: center;
}
.hp-keys { white-space: nowrap; }
.hp-plus { color: var(--steel); margin: 0 2px; font-size: 12px; }

/* ───────── search ───────── */
.hp-center-search { max-width: 720px; margin-bottom: 22px; }
.hp-search { position: relative; max-width: 720px; }
.hp-search input { width: 100%; height: 44px; font-size: 16px; padding-left: 14px; }
.hp-search.compact { margin: 0; max-width: none; }
.hp-search.compact input { height: 38px; font-size: 14px; }
.hp-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30; background: var(--paper); border: 1px solid var(--rule);
  border-radius: var(--r-panel); box-shadow: var(--float); max-height: 60vh; overflow: auto; padding: 6px; }
.hp-panel .hp-results { position: static; box-shadow: none; max-height: none; margin-top: 8px; }
.hp-result { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 9px 10px; border-radius: var(--r-ctl); color: var(--graphite); }
.hp-result:hover, .hp-result.hl { background: var(--teal-wash); text-decoration: none; }
.hp-result-title { font-weight: 600; }
.hp-result-cat { font-size: 12px; color: var(--steel); align-self: center; }
.hp-result-snip { grid-column: 1 / -1; font-size: 13px; color: var(--steel); }
.hp-noresult { padding: 12px; color: var(--steel); }

/* ───────── help center ───────── */
.hp-newstrip { margin-bottom: 22px; }
.hp-newstrip h2 { font-size: 16px; margin-bottom: 10px; }
.hp-newlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.hp-newcard { display: flex; flex-direction: column; gap: 4px; background: var(--paper); border: 1px solid var(--rule); border-left: 3px solid var(--teal);
  border-radius: var(--r-panel); padding: 12px 14px; color: var(--graphite); }
.hp-newcard:hover { border-color: var(--teal); text-decoration: none; }
.hp-newcard span { font-size: 13px; color: var(--steel); }
.hp-newcard[hidden] { display: none; }
.hp-newmore { margin-top: 10px; }
.hp-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.hp-cat { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r-panel); padding: 16px 18px 12px; }
.hp-cat h2 { font-size: 18px; }
.hp-cat-blurb { margin: 4px 0 10px; color: var(--steel); font-size: 13px; }
.hp-list { list-style: none; margin: 0; padding: 0; }
.hp-list li { padding: 6px 0; border-top: 1px solid var(--rule-soft); display: flex; align-items: center; flex-wrap: wrap; }
.hp-list li:first-child { border-top: 0; }
.hp-ref { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--rule); }
.hp-ref h3 { font-size: 13px; font-family: var(--font-ui); color: var(--steel); font-weight: 600; margin-bottom: 2px; }
.hp-foot { margin-top: 20px; }
.hp-admin { margin-top: 20px; }
.hp-warnline { color: var(--warn); }

/* ───────── article ───────── */
.hp-crumb { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--steel); margin-bottom: 12px; }
.hp-layout { display: grid; grid-template-columns: minmax(0, 760px) 240px; gap: 32px; align-items: start; }
@media (max-width: 1100px) { .hp-layout { grid-template-columns: minmax(0, 1fr); } .hp-aside { order: -1; } }
.hp-article { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r-panel); padding: 24px 28px 18px; min-width: 0; }
.hp-article-head h1 { display: inline; }
.hp-summary { color: var(--steel); font-size: 16px; margin: 8px 0 14px; }
.hp-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.hp-live { font-size: 12px; color: var(--steel); border-left: 3px solid var(--rule); padding-left: 8px; }
.hp-body { line-height: 1.6; }
.hp-body h2 { font-size: 20px; margin: 26px 0 8px; scroll-margin-top: 80px; }
.hp-body h3 { font-size: 16px; margin: 20px 0 6px; scroll-margin-top: 80px; }
.hp-body p { margin: 0 0 12px; }
.hp-body ul, .hp-body ol { margin: 0 0 12px; padding-left: 24px; }
.hp-body li { margin: 4px 0; }
.hp-body code { font-family: var(--font-mono); font-size: .9em; background: var(--concrete); border-radius: 4px; padding: 1px 5px; }
.hp-body pre { background: var(--concrete); border-radius: var(--r-ctl); padding: 12px; overflow: auto; }
.hp-body pre code { background: none; padding: 0; }
.hp-body hr { border: 0; border-top: 1px solid var(--rule); margin: 20px 0; }
.hp-body blockquote { margin: 0 0 12px; padding: 4px 14px; border-left: 3px solid var(--rule); color: var(--steel); }
.hp-body a.hp-broken { color: var(--bad); text-decoration: line-through; }
.hp-table { overflow-x: auto; margin: 0 0 14px; border: 1px solid var(--rule); border-radius: var(--r-ctl); }
.hp-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.hp-table th { text-align: left; color: var(--steel); font-weight: 600; font-size: 12px; background: #FAFBFC; }
.hp-table th, .hp-table td { padding: 8px 10px; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
.hp-table tr:last-child td { border-bottom: 0; }
.hp-table .hp-right { text-align: right; } .hp-table .hp-center { text-align: center; }
.hp-callout { border-radius: var(--r-ctl); padding: 10px 14px; margin: 0 0 14px; border-left: 3px solid var(--info); background: var(--info-wash); }
.hp-callout > p:last-child { margin-bottom: 0; }
.hp-callout-label { display: block; font-size: 13px; margin-bottom: 2px; }
.hp-callout.hp-tip { border-left-color: var(--ok); background: var(--ok-wash); }
.hp-callout.hp-warning { border-left-color: var(--warn); background: var(--warn-wash); }
.hp-helpful { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--rule); }
.hp-helpful .btn.on { background: var(--teal-wash); border-color: var(--teal); color: var(--teal-dark); }
.hp-pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; }
.hp-pager a { display: flex; flex-direction: column; padding: 8px 12px; border: 1px solid var(--rule); border-radius: var(--r-ctl); max-width: 48%; color: var(--graphite); }
.hp-pager a:hover { border-color: var(--teal); text-decoration: none; }
.hp-pager small { color: var(--steel); }
.hp-next { margin-left: auto; text-align: right; }
.hp-aside { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 18px; }
@media (max-width: 1100px) { .hp-aside { position: static; } }
.hp-aside h2 { font-size: 13px; font-family: var(--font-ui); font-weight: 600; color: var(--steel); margin-bottom: 6px; }
.hp-toc ul, .hp-related ul { list-style: none; margin: 0; padding: 0; }
.hp-toc li, .hp-related li { padding: 3px 0; font-size: 13px; }
.hp-toc li.lvl-3 { padding-left: 12px; }

/* ───────── "?" panel ───────── */
.hp-panel { position: fixed; top: 0; right: 0; bottom: 0; width: 420px; max-width: 100vw; z-index: 90; background: var(--paper);
  border-left: 1px solid var(--rule); box-shadow: var(--float); display: flex; flex-direction: column; }
.hp-panel[hidden] { display: none; }
.hp-panel-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px 10px; border-bottom: 1px solid var(--rule-soft); }
.hp-panel-head h2 { font-size: 18px; }
.hp-panel-search { padding: 12px 14px 4px; }
.hp-panel-body { flex: 1; overflow: auto; padding: 8px 14px 24px; outline: none; }
.hp-panel .hp-ctx h3 { font-size: 13px; font-family: var(--font-ui); font-weight: 600; color: var(--steel); margin: 8px 0 6px; }
.hp-plist { list-style: none; margin: 0; padding: 0; }
.hp-plist a { display: block; padding: 9px 10px; border-radius: var(--r-ctl); color: var(--graphite); }
.hp-plist a:hover { background: var(--teal-wash); text-decoration: none; }
.hp-plist a span { display: block; font-size: 13px; color: var(--steel); }
.hp-ptip { font-size: 12px; margin-top: 16px; }
.hp-back { margin: 6px 0 10px; font-size: 13px; }
.hp-article.in-panel { border: 0; padding: 0; }
.hp-article.in-panel h2#hp-ptitle { display: inline; font-size: 20px; }
.hp-article.in-panel .hp-summary { font-size: 14px; }
.hp-article.in-panel .hp-body h2 { font-size: 17px; }
.hp-article.in-panel .hp-body h3 { font-size: 15px; }
.hp-panel .hp-related { margin-top: 18px; }
.hp-panel .hp-related h3 { font-size: 13px; font-family: var(--font-ui); color: var(--steel); }
@media (min-width: 1500px) { body.hp-panel-open .shell { margin-right: 420px; } }
@media (max-width: 640px) { .hp-panel { width: 100vw; } }

/* ───────── Show me walkthrough ───────── */
.hp-tour { position: fixed; inset: 0; z-index: 150; pointer-events: none; }
.hp-tour-shade { position: absolute; inset: 0; background: transparent; }
.hp-tour.nospot .hp-tour-shade, .hp-tour.waiting .hp-tour-shade { background: rgba(38, 48, 58, .32); }
.hp-tour-spot { position: fixed; border-radius: 8px; box-shadow: 0 0 0 3px var(--gaffer), 0 0 0 9999px rgba(38, 48, 58, .45); pointer-events: none; transition: all .18s ease; }
.hp-tour-spot[hidden] { display: none; }
.hp-tour.waiting .hp-tour-spot, .hp-tour.waiting .hp-tour-pop { visibility: hidden; }
.hp-tour-pop { position: fixed; pointer-events: auto; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r-panel); box-shadow: var(--float);
  padding: 12px 16px 14px; outline: none; }
.hp-tour-head { display: flex; align-items: center; justify-content: space-between; }
.hp-tour-count { font-size: 12px; color: var(--steel); font-weight: 600; }
.hp-tour-pop h2 { font-size: 17px; margin: 2px 0 6px; }
.hp-tour-body { font-size: 14px; }
.hp-tour-body p { margin: 0 0 8px; }
.hp-tour-foot { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
@media (prefers-reduced-motion: reduce) { .hp-tour-spot { transition: none; } }

/* ───────── What's new ───────── */
.hp-wn-rel + .hp-wn-rel { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--rule); }
.hp-wn-rel h3 { font-size: 18px; margin-bottom: 8px; }
.hp-wn .hp-body h3 { font-size: 14px; font-family: var(--font-ui); color: var(--steel); margin: 12px 0 4px; }
.hp-wn-art { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--rule); }
.hp-wn-art h3 { font-size: 16px; margin-bottom: 6px; }
.hp-wn-art ul { margin: 0; padding-left: 20px; }

/* ───────── print ───────── */
@media print {
  .hp-panel, .hp-tour, .hp-aside, .hp-actions, .hp-helpful, .hp-pager, .hp-crumb, .hp-center-search, .hp-admin { display: none !important; }
  .hp-layout { display: block; }
  .hp-article { border: 0; padding: 0; }
  .hp-callout { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .hp-body a[href^="https"]::after { content: " (" attr(href) ")"; font-size: 11px; color: var(--steel); }
}
