/* Help + Knowledge Center drawer (js/ui/helpCenter.js): over the right side of the map, below the top bar
   and above the main timeline; the map and panels underneath are untouched. Dense and calm. */
.help-drawer {
    position: fixed;
    top: var(--topbar-h);
    bottom: var(--timeline-h);
    right: 0;
    width: min(920px, 100vw);
    display: grid;
    grid-template-columns: 250px 1fr;
    background: var(--panel-bg);
    border-left: 2px solid var(--panel-border);
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.45);
    color: #e6e9ee;
    z-index: 100000;
    font-size: 13px;
}
.help-drawer[hidden] { display: none; }
@media (max-width: 760px) { .help-drawer { grid-template-columns: 1fr; grid-template-rows: 40% 60%; } }

.help-side { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--panel-border); }
.help-side-head { padding: 8px; border-bottom: 1px solid var(--panel-border); }
.help-search { width: 100%; box-sizing: border-box; padding: 6px 8px; background: #11151a; color: inherit;
    border: 1px solid var(--panel-border); border-radius: 4px; font: inherit; }
.help-note { padding: 6px 8px; font-size: 11px; color: #f28c28; border-bottom: 1px solid var(--panel-border); }
.help-list { overflow: auto; padding: 0 0 4px; min-height: 0; }
/* Category headers: mint, with a divider above, and sticky so the current section stays labeled while
   scrolling a long list. */
.help-cat { position: sticky; top: 0; z-index: 1; margin-top: 6px; padding: 7px 10px 5px;
    font-size: 11.5px; font-weight: 800; color: var(--mint, #43d2aa); text-transform: uppercase; letter-spacing: 0.08em;
    background: var(--panel-bg); border-top: 1px solid var(--panel-border); border-bottom: 1px solid rgba(111, 255, 210, 0.18); }
.help-cat:first-child { margin-top: 0; border-top: none; }
.help-item { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; width: 100%; padding: 4px 10px;
    background: none; border: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.help-item:hover, .help-item:focus-visible { background: rgba(255, 255, 255, 0.06); outline: none; }
.help-item.current { background: rgba(67, 210, 170, 0.12); box-shadow: inset 2px 0 0 var(--mint, #43d2aa); }
.help-item-title { font-weight: 600; }
.help-item-sub { flex-basis: 100%; font-size: 11px; color: #a8b0bb; }
.help-draft-dot { font-size: 10px; color: #eab308; }
.help-glossary .help-item-title { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.help-main { position: relative; min-height: 0; display: flex; flex-direction: column; }
.help-close { position: absolute; top: 6px; right: 8px; background: none; border: none; color: #c8ced6; font-size: 16px; cursor: pointer; }
.help-pane { overflow: auto; padding: 12px 20px 20px; min-height: 0; line-height: 1.5; }
.help-title { font-size: 18px; margin: 0 28px 6px 0; }
.help-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.help-chip { font-size: 11px; padding: 1px 7px; border-radius: 10px; background: rgba(255, 255, 255, 0.07); color: #c8ced6; }
.help-draft { background: rgba(234, 179, 8, 0.18); color: #eab308; font-weight: 700; }
.help-reviewed { background: rgba(53, 184, 106, 0.18); color: #35b86a; }
.help-summary { color: #c8ced6; margin: 0 0 10px; }
/* Article section headings (Markdown "#"/"##" -> h2/h3, since the title is the h1): a mint bar and a rule so
   sections are easy to find when scanning; "###" (h4) is a mint subheading. */
.help-body h2, .help-body h3 { font-size: 15.5px; font-weight: 700; color: #fff; margin: 22px 0 8px; padding: 1px 0 4px 10px;
    border-left: 3px solid var(--mint, #43d2aa); border-bottom: 1px solid var(--panel-border); }
.help-body > h2:first-child, .help-body > h3:first-child { margin-top: 8px; }
.help-body h4 { font-size: 13.5px; font-weight: 700; color: var(--mint, #43d2aa); margin: 14px 0 4px; }
.help-body p { margin: 6px 0; }
.help-body ul, .help-body ol { margin: 6px 0; padding-left: 20px; }
.help-body table { border-collapse: collapse; margin: 8px 0; font-size: 12px; }
.help-body th, .help-body td { border: 1px solid var(--panel-border); padding: 3px 8px; text-align: left; vertical-align: top; }
.help-body th { background: rgba(255, 255, 255, 0.05); }
.help-body code, .help-body pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px;
    background: rgba(255, 255, 255, 0.06); border-radius: 3px; }
.help-body code { padding: 0 3px; }
.help-body pre { padding: 8px; overflow: auto; }
.help-body details { margin: 10px 0; padding: 8px 10px; border: 1px solid var(--panel-border);
    border-radius: 6px; background: rgba(255, 255, 255, 0.03); }
.help-body details > summary { cursor: pointer; color: var(--mint, #43d2aa); font-weight: 700; }
.help-body details > *:last-child { margin-bottom: 0; }
.help-drawer a { color: var(--mint, #43d2aa); }
.help-related { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 14px; padding-top: 8px; border-top: 1px solid var(--panel-border); }
.help-related-label { color: #a8b0bb; }
.help-disclaimer { margin-top: 14px; font-size: 11px; color: #a8b0bb; }
.help-glossary-def { font-size: 14px; }
.help-loading, .help-empty, .help-error { padding: 12px; color: #a8b0bb; }
.help-error { color: #f28c28; }

/* Section navigation and optional long-form reading. */
.help-expanded { width: min(1280px, 100vw); top: 8px; bottom: 8px; }
.help-side, .help-main { min-width: 0; }
.help-center-title { display: block; margin-bottom: 8px; }
.help-tabs { display: flex; gap: 4px; margin-bottom: 8px; }
.help-tabs button, .help-toolbar button, .help-filter { font: inherit; color: inherit;
    background: #19232b; border: 1px solid var(--panel-border); border-radius: 4px; padding: 5px 7px; }
.help-tabs button { flex: 1; cursor: pointer; }
.help-tabs [aria-selected="true"] { border-color: var(--mint, #43d2aa); color: var(--mint, #43d2aa); }
.help-filter { margin-top: 6px; width: 100%; }
.help-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 38px 8px 12px;
    border-bottom: 1px solid var(--panel-border); }
.help-toolbar button { cursor: pointer; }
.help-toolbar button:disabled { opacity: .45; cursor: default; }
.help-toolbar [hidden] { display: none; }
.help-pane { overflow-wrap: anywhere; }
.help-body table { display: block; max-width: 100%; overflow-x: auto; }
.help-heading-link { font-size: 12px; }
.help-context { font: inherit; color: var(--mint, #43d2aa); background: transparent;
    border: 1px solid var(--panel-border); border-radius: 4px; cursor: pointer; padding: 2px 5px; }
.help-drawer :focus-visible { outline: 2px solid var(--mint, #43d2aa); outline-offset: 2px; }

.help-review { margin: 6px 0 10px; color: #a8b0bb; font-size: 12px; }
.help-review summary { cursor: pointer; margin-bottom: 5px; }
