/* HELP shares the active GRiD palette and existing panel/toolbar styling. */
body.help-center-open { overflow: hidden; }
#legend-help.help-center { position:fixed; inset:0; z-index:2000; margin:0; padding:20px; border:0; background:transparent; overflow:hidden; color:var(--text); font:17px/1.6 system-ui,-apple-system,"Segoe UI",sans-serif; isolation:isolate; --help-muted:color-mix(in srgb,var(--text) 70%,var(--muted)); }
#legend-help.help-center:not([hidden]) { display:grid; place-items:center; }
#legend-help .help-center-backdrop { display:block; position:absolute; inset:0; width:100%; height:100%; border:0; border-radius:0; padding:0; background:rgba(0,0,0,.78); cursor:default; z-index:-1; }
#legend-help .help-center-window { width:min(1200px,100%); max-height:calc(100dvh - 40px); min-height:0; display:flex; flex-direction:column; padding:0; background:var(--panel); border:1px solid var(--line); border-radius:12px; box-shadow:0 10px 28px #0003,inset 0 0 9px color-mix(in srgb,var(--cyan) 4%,transparent); overflow:hidden; }
#legend-help .help-center-head { flex:none; display:flex; justify-content:space-between; align-items:flex-start; gap:16px; padding:18px 24px; background:color-mix(in srgb,var(--cyan) 4%,var(--panel)); border-bottom:1px solid var(--line-soft); }
#legend-help .help-center-eyebrow { display:block; color:var(--cyan); font-size:13px; line-height:1.6; font-weight:650; letter-spacing:.09em; margin-bottom:6px; }
#legend-help h2 { color:var(--cyan); font:700 32px/1.2 system-ui,-apple-system,"Segoe UI",sans-serif; margin:0; letter-spacing:-.025em; }
#legend-help .help-center-scroll { min-height:0; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:var(--cyan) var(--panel); padding:20px 28px 26px; }
#legend-help p { margin:0 0 16px; color:var(--text); font-size:17px; line-height:1.6; }
#legend-help .help-center-intro { max-width:75ch; }
#legend-help button,#legend-help input,#legend-help summary,#legend-help a { font:inherit; }
#legend-help button,#legend-help .help-center-nav a { border:1px solid var(--line-soft); border-radius:6px; color:var(--cyan); background:var(--panel-soft); min-height:44px; padding:8px 14px; text-decoration:none; transition:background-color .15s,border-color .15s; }
#legend-help button:hover,#legend-help .help-center-nav a:hover { background:color-mix(in srgb,var(--cyan) 10%,var(--panel)); border-color:var(--pink); color:var(--pink); }
#legend-help :is(button,a,input,summary):focus-visible { outline:3px solid var(--pink); outline-offset:3px; }
#legend-help #legend-help-close { flex:none; width:44px; height:44px; padding:0; color:var(--pink); font-size:28px; line-height:1; }
#legend-help .help-center-search { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; align-items:center; margin:18px 0 10px; }
#legend-help .help-center-search label { grid-column:1/-1; color:var(--text); font-weight:650; }
#legend-help #help-search { display:block; width:100%; min-width:0; height:48px; color:var(--text); background:var(--bg); border:1px solid var(--line); border-radius:6px; padding:10px 14px; font-size:17px; }
#legend-help #help-search::placeholder { color:var(--help-muted); opacity:1; }
#legend-help .help-center-tools { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-bottom:18px; }
#legend-help #help-results { color:var(--help-muted); margin:0 0 0 auto; font-size:15px; }
#legend-help .help-center-layout { display:grid; grid-template-columns:248px minmax(0,1fr); gap:24px; align-items:start; }
#legend-help details.help-center-browse { position:sticky; top:0; padding:0; margin:0; border:0; min-width:0; }
#legend-help .help-center-browse > summary { cursor:pointer; color:var(--cyan); font-size:19px; font-weight:650; padding:8px 0 12px; }
#legend-help .help-center-nav { display:flex; flex-direction:column; gap:5px; padding:0; max-height:min(640px,calc(100dvh - 220px)); overflow-y:auto; scrollbar-width:thin; scrollbar-color:var(--cyan) var(--panel); }
#legend-help .help-center-nav a { display:flex; align-items:center; gap:10px; border-color:transparent; padding:8px 10px; background:transparent; font-size:16px; line-height:1.4; }
#legend-help .help-center-nav i { width:20px; flex:none; color:var(--cyan); text-align:center; }
#legend-help .help-center-nav [aria-current="true"] { background:var(--panel-soft); border-color:var(--line-soft); color:var(--text); }
#legend-help .help-center-categories { min-width:0; }
#legend-help details.help-category { padding:0; margin:0 0 12px; background:var(--panel-soft); border:1px solid var(--line-soft); border-radius:6px; scroll-margin-top:8px; overflow:hidden; }
#legend-help .help-category > summary { list-style:none; display:flex; gap:14px; align-items:center; padding:18px; cursor:pointer; color:var(--text); transition:background-color .15s; }
#legend-help .help-category > summary::-webkit-details-marker { display:none; }
#legend-help .help-category > summary:hover { background:color-mix(in srgb,var(--cyan) 6%,var(--panel)); }
#legend-help .help-category > summary > i { color:var(--cyan); width:24px; font-size:22px; text-align:center; flex:none; }
#legend-help .help-category > summary > span { min-width:0; flex:1; }
#legend-help .help-category > summary strong { display:block; font-size:21px; line-height:1.35; font-weight:650; }
#legend-help .help-category > summary small { display:block; margin-top:5px; color:var(--help-muted); font-size:15px; line-height:1.5; }
#legend-help .help-category > summary::after { content:'+'; color:var(--pink); font-size:25px; line-height:1; flex:none; }
#legend-help .help-category[open] > summary::after { content:'−'; }
#legend-help .help-category[open] > summary { border-bottom:1px solid var(--line-soft); }
#legend-help .help-category-body { padding:20px; }
#legend-help h3 { color:var(--cyan); font:650 19px/1.4 system-ui,-apple-system,"Segoe UI",sans-serif; margin:20px 0 9px; }
#legend-help h3:first-child { margin-top:0; }
#legend-help .help-category-body p:last-child { margin-bottom:0; }
#legend-help .help-show { margin-top:20px; border-color:color-mix(in srgb,var(--pink) 45%,transparent); color:var(--pink); }
#legend-help .help-center-footer { margin-top:22px; border-top:1px solid var(--line-soft); padding-top:18px; color:var(--help-muted); font-size:15px; }
#legend-help .help-center-footer a { color:var(--cyan); text-decoration:underline; text-underline-offset:4px; }
#legend-help .help-center-empty { border:1px solid color-mix(in srgb,var(--pink) 45%,transparent); border-radius:10px; padding:20px; }
#legend-help .help-center-empty p { margin-bottom:0; }
@media(max-width:900px) {
  #legend-help .help-center-layout { grid-template-columns:minmax(0,1fr); gap:18px; }
  #legend-help details.help-center-browse { position:static; }
  #legend-help .help-center-nav { position:static; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px; border-bottom:1px solid var(--line-soft); padding-bottom:18px; max-height:none; overflow:visible; }
}
@media(max-width:600px) {
  #legend-help.help-center { padding:8px; }
  #legend-help .help-center-window { max-height:calc(100dvh - 16px); border-radius:12px; }
  #legend-help .help-center-head { padding:18px 14px; gap:10px; }
  #legend-help h2 { font-size:32px; }
  #legend-help .help-center-scroll { padding:16px 14px 22px; }
  #legend-help .help-center-eyebrow { letter-spacing:.08em; font-size:12px; }
  #legend-help .help-center-nav { grid-template-columns:minmax(0,1fr); }
  #legend-help .help-center-nav a { min-height:44px; }
  #legend-help .help-category > summary { padding:16px 12px; gap:10px; }
  #legend-help .help-category-body { padding:18px 14px; }
  #legend-help #help-results { width:100%; margin:2px 0 0; }
  #legend-help .help-center-tools button { flex:1; padding:8px; }
}
@media(prefers-reduced-motion:reduce) {
  #legend-help * { transition:none !important; scroll-behavior:auto !important; }
}
