/* Public help center. Layout only: every colour comes from app.css tokens so
   both themes keep app.css's AA-checked contrast. */
.help-body { background: var(--bg); color: var(--text); margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
.help-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--surface); }
.help-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 600; text-decoration: none; }
.help-nav { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.help-nav a, .help-main a { color: var(--primary-on-surface); }
.help-main { flex: 1; width: 100%; max-width: 720px; box-sizing: border-box; margin: 0 auto; padding: 24px 16px 40px; overflow-wrap: anywhere; }
.help-main h1 { font-size: 28px; line-height: 1.25; margin: 0 0 16px; }
.help-main h2 { font-size: 20px; margin: 28px 0 8px; }
.help-lead, .help-summary, .help-updated, .help-breadcrumb { color: var(--text-muted); }
.help-breadcrumb { font-size: 14px; margin-bottom: 8px; }
.help-list { list-style: none; margin: 0; padding: 0; }
.help-list li { padding: 10px 0; border-bottom: 1px solid var(--border); }
.help-summary { display: block; font-size: 14px; margin-top: 2px; }
.help-article { line-height: 1.65; }
.help-article ul, .help-article ol { padding-left: 24px; }
.help-answer { font-size: 18px; }
.help-updated { font-size: 14px; }
.help-stuck { margin-top: 24px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.help-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; padding: 20px 16px 14px; font-size: 12px; color: var(--text-muted); border-top: 1px solid var(--border); }
.help-footer a { color: var(--text-muted); text-decoration: none; }
.help-footer a:hover, .help-footer a:focus-visible { text-decoration: underline; }
@media (max-width: 480px) { .help-main h1 { font-size: 24px; } }

/* Help button: the "?" opener on every page family. */
.help-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; box-sizing: border-box; min-height: 32px; padding: 0 10px; border-radius: var(--radius-sm); background: var(--surface2); border: 1px solid var(--border); color: var(--text-muted); font: inherit; font-size: 13px; cursor: pointer; flex-shrink: 0; }
.help-btn:hover { background: var(--surface3); color: var(--text); }
.help-btn:focus-visible, .help-drawer button:focus-visible, .help-drawer a:focus-visible, .help-drawer input:focus-visible { outline: 2px solid var(--primary-on-surface); outline-offset: 2px; }
.help-btn--sidebar { width: 32px; padding: 0; }
.help-btn--corner { position: absolute; top: 12px; right: 12px; z-index: 5; }
.help-mobile-bar { display: none; }
.public-header-actions { display: inline-flex; align-items: center; gap: 8px; }
/* Onboarding: the logo stays centred on the page; Help sits at the right edge, level with it. */
.ob-shell > header { position: relative; margin-bottom: 36px; }
.ob-shell > header .ob-header { margin: 0 auto; }
.ob-shell > header .help-btn--header { position: absolute; right: 0; top: 50%; transform: translateY(-50%); }

/* Help drawer: non-modal side panel, above the page but below modals. */
.help-drawer { position: fixed; top: 0; right: 0; height: 100%; width: 380px; max-width: 100%; box-sizing: border-box; z-index: calc(var(--z-modal) - 10); overflow-y: auto; padding: 16px; background: var(--surface-elevated, var(--surface)); color: var(--text); border-left: 1px solid var(--border); box-shadow: var(--shadow-lg); animation: help-drawer-in .2s ease-out; overflow-wrap: anywhere; }
.help-drawer[hidden], .help-drawer [hidden] { display: none; }
.help-drawer h2 { font-size: 20px; margin: 0 40px 12px 0; }
.help-drawer-sub { font-size: 14px; margin: 16px 0 6px; color: var(--text-muted); }
.help-drawer-close { position: absolute; top: 10px; right: 12px; width: 32px; height: 32px; font-size: 22px; line-height: 1; background: none; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); cursor: pointer; }
.help-drawer-label { display: block; font-size: 13px; margin-bottom: 4px; color: var(--text-muted); }
.help-drawer-search, .help-center-search input { width: 100%; box-sizing: border-box; padding: 8px 10px; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.help-drawer-status { min-height: 1.2em; margin: 6px 0; font-size: 13px; color: var(--text-muted); }
.help-drawer-list { list-style: none; margin: 0; padding: 0; }
.help-drawer-list li { padding: 8px 0; border-bottom: 1px solid var(--border); }
.help-drawer a, .help-drawer-back { color: var(--primary-on-surface); }
.help-drawer-back { background: none; border: 0; padding: 4px 0; font: inherit; cursor: pointer; text-decoration: underline; }
.help-drawer-article { margin-top: 8px; }
.help-drawer-article .help-article { line-height: 1.6; margin: 8px 0 12px; }
.help-drawer-tour { margin: 0 0 12px; padding: 8px 10px; font-size: 13px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.help-drawer-foot { margin: 16px 0 8px; }
.help-drawer-contact button { padding: 8px 12px; font: inherit; color: var(--text); background: var(--surface2); border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; }
.help-center-search { margin: 0 0 16px; }
.help-center-search label { display: block; font-size: 14px; margin-bottom: 4px; color: var(--text-muted); }
.help-center-search p { margin: 6px 0 0; font-size: 13px; color: var(--text-muted); min-height: 1.2em; }
@keyframes help-drawer-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .help-drawer { animation: none; } }
@media (max-width: 768px) {
    .help-drawer { width: 100%; border-left: 0; }
    .help-mobile-bar { display: flex; justify-content: flex-end; margin-bottom: 8px; }
    .help-btn--sidebar { display: none; }
}

/* Inline "?" tips: a real button; the note opens beside it. */
.help-tip { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; width: 20px; height: 20px; min-width: 20px; margin-left: 6px; padding: 0; vertical-align: middle; border-radius: 50%; background: var(--surface2); border: 1px solid var(--border); color: var(--text-muted); font: inherit; font-size: 12px; font-weight: 600; line-height: 1; cursor: pointer; }
.help-tip:hover { background: var(--surface3); color: var(--text); }
.help-tip:focus-visible, .help-tip-pop a:focus-visible { outline: 2px solid var(--primary-on-surface); outline-offset: 2px; }
.help-tip-pop { display: block; flex-basis: 100%; max-width: 320px; margin: 6px 0; padding: 8px 12px; box-sizing: border-box; font-size: 13px; font-weight: 400; line-height: 1.5; text-align: left; text-transform: none; letter-spacing: normal; background: var(--surface-elevated, var(--surface)); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); }
.help-tip-pop a { display: inline-block; margin-left: 6px; color: var(--primary-on-surface); }
