/* help.css */
.help-fab{ position:fixed; right:16px; bottom:16px; z-index:2000; }
.help-panel .help-content{ line-height:1.6; }
.help-panel .help-content h1,.help-panel .help-content h2,.help-panel .help-content h3{ margin-top:16px; }
.help-panel .help-content p{ margin:8px0; }
.help-panel .help-content ul{ padding-left:18px; }
.help-panel .help-content code{ background:#f7f7f7; padding:2px4px; border-radius:4px; }



/* Base content improvements */
.help-drawer .help-content, .help-dialog .help-content { --help-sticky-offset:0px; font-size:.95rem; line-height:1.6; letter-spacing:.2px; }
.help-drawer .help-content h1, .help-dialog .help-content h1 { font-size:1.5rem; margin:00 .85rem0; }
.help-drawer .help-content h2, .help-dialog .help-content h2 { font-size:1.15rem; margin:1.2rem0 .5rem; border-bottom:1px solid var(--mud-palette-lines-default); padding-bottom:4px; position:relative; }
.help-drawer .help-content h3, .help-dialog .help-content h3 { font-size:1.0rem; margin:1rem0 .4rem; position:relative; }
.help-drawer .help-content p, .help-dialog .help-content p { margin:.5rem0; }
.help-drawer .help-content table, .help-dialog .help-content table { width:100%; border-collapse:collapse; margin:.6rem01.1rem; font-size:.9rem; }
.help-drawer .help-content th, .help-dialog .help-content th, .help-drawer .help-content td, .help-dialog .help-content td { border:1px solid var(--mud-palette-lines-default); padding:6px8px; vertical-align:top; }
.help-drawer .help-content th, .help-dialog .help-content th { background:var(--mud-palette-action-default-hover); font-weight:600; }
.help-drawer .help-content tr:nth-child(even) td, .help-dialog .help-content tr:nth-child(even) td { background: rgba(0,0,0,.02); }
.help-drawer .help-content pre, .help-dialog .help-content pre { background:#1f2937; color:#e5e7eb; padding:10px12px; border-radius:6px; overflow:auto; font-size:.8rem; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
.help-drawer .help-content code, .help-dialog .help-content code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
.help-drawer .help-content blockquote, .help-dialog .help-content blockquote { margin:.7rem0; padding:.5rem .75rem; border-left:4px solid var(--mud-palette-primary); background:rgba(0,0,0,.04); font-size:.9rem; }
.help-drawer .help-content li, .help-dialog .help-content li { margin:.25rem0; }
.help-drawer .help-content a, .help-dialog .help-content a { color: var(--mud-palette-primary); text-decoration:none; }
.help-drawer .help-content a:hover, .help-dialog .help-content a:hover { text-decoration:underline; }



/* Sticky meta header */
.help-dialog .help-content .sticky-meta, .help-drawer .help-content .sticky-meta {
 position: sticky; top:0; z-index:3;
 background: var(--mud-palette-surface);
 border-bottom:1px solid var(--mud-palette-lines-default);
 padding:6px0; margin-bottom:8px;
}
/* Optional shadow when scrolled */
.sticky-meta.stuck { box-shadow:02px6px rgba(0,0,0,.08); }
.no-sticky-shadow .sticky-meta.stuck { box-shadow: none; }
.help-dialog .help-content .meta-line, .help-drawer .help-content .meta-line { font-size: .8rem; color: var(--mud-palette-text-secondary); }
.help-dialog .help-content .meta-desc, .help-drawer .help-content .meta-desc { font-size: .8rem; color: var(--mud-palette-text-secondary); }



/* Sub-TOC (H3 within current H2) and Back-to-top button */
.help-subtoc { position: sticky; top: var(--help-sticky-offset); z-index:2; display:flex; gap:8px; flex-wrap:wrap; padding:6px0; background:var(--mud-palette-surface); border-bottom:1px dashed var(--mud-palette-lines-default); }
.help-subtoc a { font-size:.8rem; color: var(--mud-palette-primary); text-decoration:none; }
.help-subtoc a:hover { text-decoration:underline; }
.help-backtop { position: sticky; bottom:8px; left:0; display:none; align-items:center; gap:4px; background:var(--mud-palette-surface); border:1px solid var(--mud-palette-lines-default); padding:4px8px; border-radius:16px; cursor:pointer; font-size:.8rem; }



/* Heading anchor link icon */
.help-heading-anchor { position:absolute; right:0; top:50%; transform:translateY(-50%); opacity:.4; font-size:.9rem; padding:2px; border-radius:4px; }
.help-heading-anchor:hover { opacity:.9; background:var(--mud-palette-action-default-hover); }



/* Table of contents list indentation */
.help-drawer .toc-item.level-1, .help-dialog .toc-item.level-1 { padding-left:0; }
.help-drawer .toc-item.level-2, .help-dialog .toc-item.level-2 { padding-left:8px; }
.help-drawer .toc-item.level-3, .help-dialog .toc-item.level-3 { padding-left:16px; }
.help-drawer .toc-item.level-4, .help-dialog .toc-item.level-4 { padding-left:24px; }



/* Metadata header spacing */
.help-drawer .help-content .mud-typography-caption, .help-dialog .help-content .mud-typography-caption { color: var(--mud-palette-text-secondary); }


/* Collapsible ToC styles */
.help-toc { border:1px solid var(--mud-palette-lines-default); background: var(--mud-palette-surface); padding:8px10px; margin:10px0; border-radius:6px; }
.help-toc .toc-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:6px; }
.help-toc .toc-title { font-weight:600; font-size:.9rem; color: var(--mud-palette-text-primary); }
.help-toc .toc-toggle { font-size:.8rem; color: var(--mud-palette-primary); background:none; border:none; cursor:pointer; padding:2px6px; border-radius:4px; }
.help-toc .toc-toggle:hover { background: var(--mud-palette-action-default-hover); }
.help-toc ul { list-style: none; margin:0; padding-left:0; }
.help-toc li { margin:2px0; }
.help-toc li.toc-sub { padding-left:12px; font-size: .9em; }


/* Improve readability on narrow screens */
@media (max-width:640px) {
 .help-drawer .help-content, .help-dialog .help-content { font-size:.95rem; }
}
