/* Shared help UI: light/dark tokens, non-modal desktop panel and mobile sheet. */
.ma-help-toggle,.ma-help-instruction,.ma-help-popover,.ma-help-panel,.ma-help-marker,.ma-help-marker-layer{
  --help-bg:var(--theme-panel,#fffdf9);--help-ink:var(--theme-ink,#223333);--help-muted:var(--theme-muted,#5c6669);
  --help-accent:var(--theme-accent,#0d6067);--help-soft:var(--theme-accent-soft,#e5f3f1);--help-line:var(--theme-line,#e4e5df);
  font-family:var(--font-body,Inter,Arial,sans-serif);color:var(--help-ink);box-sizing:border-box;
}
.ma-help-toggle{display:inline-flex;align-items:center;justify-content:center;gap:7px;flex:none;min-height:40px;padding:8px 11px;border:1px solid var(--help-line);border-radius:var(--radius-control,6px);background:var(--help-bg);font:600 13px/1.3 var(--font-body,Inter,Arial,sans-serif);cursor:pointer;white-space:nowrap}
.ma-help-toggle .icon{width:20px;height:20px;flex:none;color:var(--help-accent)}
.ma-help-toggle .icon,.ma-help-marker .icon,.ma-help-instruction .icon,.ma-help-popover .icon,.ma-help-panel .icon{fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.ma-help-toggle[aria-pressed=true]{background:var(--help-soft);border-color:var(--help-accent);color:var(--help-accent)}
.ma-help-floating-toggle{position:fixed;bottom:20px;right:24px;z-index:100050;box-shadow:0 3px 12px #102c2b18}
body.wp-admin #wpbody-content>.wrap>.ma-help-floating-toggle{position:static;float:right;margin:0 0 12px 12px}
body.wp-admin #wpbody-content>.wrap>.ma-help-floating-toggle+h1{clear:both}
.ma-help-dialog-toolbar{display:flex;justify-content:flex-end;padding:8px 12px}
.ma-admin-dialog>.ma-help-dialog-toolbar{justify-content:flex-start;padding:0 96px 12px 0}
.help-workspace .help-contextual{grid-column:1/-1}
.help-workspace .help-contextual>p{margin:0;padding:20px 28px;font-size:16px;line-height:1.6;color:var(--muted)}
.help-workspace .help-contextual>p+p{padding-top:0}
dialog .ma-help-floating-toggle{top:8px;bottom:auto;right:68px;position:absolute}
.ma-help-instruction{display:flex;align-items:center;gap:10px;background:var(--help-soft);border:1px solid var(--help-line);border-radius:var(--radius-control,6px);padding:7px 12px;margin:-6px 0 22px;min-height:42px;font-size:13px;line-height:1.5;color:var(--help-accent)}
.ma-help-instruction[hidden]{display:none}
.ma-help-instruction>.icon{width:19px;height:19px;flex:none}
.ma-help-exit{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:32px;margin-left:auto;padding:4px 7px;border:0;border-radius:var(--radius-small,4px);background:transparent;color:inherit;white-space:nowrap;font:600 12px/1.4 var(--font-body,Inter,Arial,sans-serif);cursor:pointer}
.ma-help-exit .icon{width:16px;height:16px}
.ma-help-marker-layer{position:fixed;inset:0;pointer-events:none;z-index:100010;overflow:visible}
/* Markers live beside controls for keyboard order; isolate their geometry from container button rules. */
.ma-help-marker[data-ma-help-ui]{position:fixed!important;inset:auto;display:flex!important;align-items:center!important;justify-content:center!important;gap:0!important;width:26px!important;height:26px!important;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;margin:0!important;padding:4px!important;border:0!important;border-radius:var(--radius-circle,50%)!important;background:var(--help-bg)!important;color:var(--help-accent)!important;transform:none!important;box-sizing:border-box!important;pointer-events:auto;cursor:help;line-height:1;box-shadow:0 0 0 1px var(--help-bg)!important}
.ma-help-popover[popover]{inset:auto;margin:0}
.ma-help-panel[popover]{left:auto;height:100dvh;margin:0;padding:0}
.ma-help-marker[data-ma-help-ui]>.icon{width:18px!important;height:18px!important;flex:none!important;padding:0!important;border-radius:0!important;background:transparent!important;color:inherit!important}
.ma-help-marker>span:empty{display:none}
.ma-help-marker[hidden],.ma-help-popover[hidden]{display:none!important}
.ma-help-marker:hover,.ma-help-marker[aria-expanded=true]{background:var(--help-accent)!important;color:var(--help-bg)!important;box-shadow:0 0 0 2px var(--help-bg),0 0 0 4px var(--help-accent)!important}
.ma-help-highlight{outline:2px solid var(--theme-accent,#0d6067)!important;outline-offset:3px}
body.ma-help-active .pl-add{opacity:1!important}
.ma-help-toggle:focus-visible,.ma-help-marker:focus-visible,.ma-help-popover button:focus-visible,.ma-help-panel button:focus-visible,.ma-help-exit:focus-visible{outline:3px solid var(--theme-accent,#0d6067);outline-offset:3px}
.ma-help-popover,.ma-help-panel{position:fixed;z-index:100030;background:var(--help-bg);color:var(--help-ink);font-size:14px;line-height:1.6;overflow-wrap:anywhere;text-align:left;letter-spacing:normal}
.ma-help-popover{width:310px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);overflow:auto;padding:15px 18px 12px;border:1px solid var(--help-line);border-top:3px solid var(--help-accent);border-radius:var(--radius,10px);box-shadow:var(--theme-popover-shadow,0 8px 28px #22333324)}
.ma-help-head{display:flex;align-items:center;gap:8px;font:600 12px/1.4 var(--font-body,Inter,Arial,sans-serif);color:var(--help-muted);margin:0 0 12px;padding:0}
.ma-help-head>.icon{height:19px;width:19px;color:var(--help-accent);flex:none}
.ma-help-dismiss{display:flex;align-items:center;justify-content:center;min-width:32px;min-height:32px;padding:5px;margin:-6px -7px -6px auto;border:0;border-radius:var(--radius-small,4px);background:transparent;color:var(--help-muted);cursor:pointer}
.ma-help-dismiss .icon{height:19px;width:19px}
.ma-help-dismiss>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.ma-help-popover h2{font:700 19px/1.25 var(--font-heading,Georgia,serif);letter-spacing:-.25px;margin:0 0 9px;color:var(--help-ink)}
.ma-help-copy p{font-size:14px;line-height:1.65;margin:0 0 15px;color:var(--help-muted)}
.ma-help-copy p.ma-help-intro{color:var(--help-ink)}
.ma-help-copy h3{font:700 19px/1.3 var(--font-heading,Georgia,serif);margin:27px 0 12px;color:var(--help-ink)}
.ma-help-more{display:flex;align-items:center;gap:7px;border:0;border-top:1px solid var(--help-line);background:transparent;color:var(--help-accent);padding:10px 0 2px;width:100%;font:600 13px/1.5 var(--font-body,Inter,Arial,sans-serif);cursor:pointer}
.ma-help-more>.icon{order:2;width:17px;height:17px}
.ma-help-panel{top:0;right:0;bottom:0;width:376px;max-width:100vw;display:flex;flex-direction:column;border:0;border-left:1px solid var(--help-line);box-shadow:-5px 0 18px #142a2a0a;z-index:100020}
.ma-help-panel>.ma-help-head{flex:none;padding:21px 24px;margin:0;border-bottom:1px solid var(--help-line);font-size:15px;color:var(--help-ink)}
.ma-help-panel>.ma-help-head>.icon{width:25px;height:25px}
.ma-help-panel-body{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:24px}
.ma-help-breadcrumb{font-size:12px;line-height:1.5;color:var(--help-muted);margin:0 0 15px}
.ma-help-panel h2{font:700 29px/1.2 var(--font-heading,Georgia,serif);letter-spacing:-.5px;margin:0 0 18px;color:var(--help-ink)}
.ma-help-note{background:var(--help-soft);padding:12px 14px;border-radius:var(--radius-control,6px);color:var(--help-accent)!important}
.ma-help-visual{padding-bottom:23px;margin-bottom:23px;border-bottom:1px solid var(--help-line)}
.ma-help-visual:first-child h3{margin-top:0}.ma-help-visual:last-child{margin-bottom:0}
.ma-help-visual-items{display:grid;gap:15px;list-style:none;margin:0;padding:0}
.ma-help-visual-item{display:flex;gap:12px;align-items:flex-start;min-width:0}
.ma-help-visual-symbol{display:flex;align-items:center;justify-content:center;flex:0 0 35px;height:35px;border-radius:var(--radius,10px);background:var(--help-soft);color:var(--help-accent);font:600 14px/1 var(--font-body,Inter,Arial,sans-serif)}
.ma-help-visual-symbol .icon{width:20px;height:20px}
.ma-help-visual-copy{min-width:0;padding-top:2px}.ma-help-visual-copy strong{display:block;font-size:14px;line-height:1.4;color:var(--help-ink);margin-bottom:4px}
.ma-help-copy .ma-help-visual-copy p{font-size:13px;line-height:1.6;margin:0;color:var(--help-muted)}
.ma-help-visual-flow .ma-help-visual-items,.ma-help-visual-steps .ma-help-visual-items{gap:0}
.ma-help-visual-flow .ma-help-visual-item,.ma-help-visual-steps .ma-help-visual-item{position:relative;padding-bottom:20px}
.ma-help-visual-flow .ma-help-visual-item:last-child,.ma-help-visual-steps .ma-help-visual-item:last-child{padding-bottom:0}
.ma-help-visual-flow .ma-help-visual-item:not(:last-child)::after,.ma-help-visual-steps .ma-help-visual-item:not(:last-child)::after{content:'';position:absolute;left:17px;top:40px;bottom:5px;border-left:1px solid var(--help-line)}
.ma-help-visual-steps .ma-help-visual-symbol{border-radius:var(--radius-circle,50%);background:var(--help-accent);color:var(--help-bg);flex-basis:30px;height:30px}
.ma-help-visual-steps .ma-help-visual-item:not(:last-child)::after{left:14px;top:35px}
.ma-help-visual-compare .ma-help-visual-items{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.ma-help-visual-compare .ma-help-visual-item{display:block;padding:13px 11px;background:var(--theme-hover,#f2f1ec);border-radius:var(--radius-control,6px)}
.ma-help-visual-compare .ma-help-visual-symbol{margin-bottom:10px;background:var(--help-bg)}
.ma-help-visual-groups .ma-help-visual-item:nth-child(1) .ma-help-visual-symbol{background:var(--theme-coral-soft,#fbe7eb);color:var(--theme-coral,#a83c4b)}
.ma-help-visual-groups .ma-help-visual-item:nth-child(3n) .ma-help-visual-symbol{background:var(--theme-violet-soft,#ede7f6);color:var(--theme-violet,#6b4e9b)}
.ma-help-visual-groups .ma-help-visual-item:last-child .ma-help-visual-symbol{background:var(--theme-gold-soft,#fff1da);color:var(--theme-gold,#9b5a10)}
.ma-help-example-input{padding:13px;border-left:3px solid var(--help-accent);background:var(--help-soft);font-style:italic;color:var(--help-accent)!important;border-radius:0 var(--radius-control,6px) var(--radius-control,6px) 0}
.ma-help-current{display:grid;gap:4px;padding:12px 14px;background:var(--help-soft);border-radius:var(--radius-control,6px)}.ma-help-current span{font-size:11px;text-transform:uppercase;letter-spacing:.4px}.ma-help-current strong{font-size:14px;color:var(--help-accent)}
.ma-help-panel-footer{padding:16px 24px 24px;border-top:1px solid var(--help-line);flex:none}
.ma-help-close-details{width:100%;min-height:42px;padding:8px 14px;background:var(--help-bg);border:1px solid var(--help-line);border-radius:var(--radius-control,6px);color:var(--help-accent);font:600 13px/1.5 var(--font-body,Inter,Arial,sans-serif);cursor:pointer}
@media(min-width:1280px){body.ma-help-details-open:not(.wp-admin) #app{margin-right:376px}body.ma-help-details-open:not(.wp-admin) .main{max-width:calc(100vw - 376px - var(--sidebar,76px))}body.ma-help-details-open .topbar{flex-wrap:wrap}body.ma-help-details-open .top-actions{flex-wrap:wrap}}
@media(min-width:1280px){body.ma-help-details-open .topbar .search-box{display:none!important}body.ma-help-details-open .top-actions .search-button{display:inline-flex!important}}
@media(min-width:1280px){:root dialog.ma-help-details-host{right:376px!important;max-width:calc(100vw - 400px)!important}}
@media(max-width:1279px) and (min-width:701px){.ma-help-panel{box-shadow:var(--theme-dialog-shadow,-10px 0 32px #22333324)}.ma-help-popover{max-width:min(310px,calc(100vw - 24px))}}
@media(max-width:700px){
  .help-workspace .help-contextual>p{padding:16px;font-size:14px}
  .ma-help-toggle{min-height:40px;padding:6px 8px;gap:4px;font-size:12px}.ma-help-toggle .icon{width:18px;height:18px}
  .top-actions{flex-wrap:wrap;max-width:100%}.topbar{flex-wrap:wrap}
  .ma-help-instruction{align-items:flex-start;margin:0 0 20px;padding:10px;font-size:12px;gap:7px}.ma-help-exit{font-size:0;min-width:30px;min-height:30px;margin-top:-4px}
  .ma-help-exit .icon{width:20px;height:20px}
  .ma-help-panel,.ma-help-panel[popover]{top:auto;left:0;right:0;bottom:0;width:100%;height:auto;max-height:78dvh;border:1px solid var(--help-line);border-bottom:0;border-radius:var(--radius-dialog,12px) var(--radius-dialog,12px) 0 0;box-shadow:0 -8px 30px #102c2b26;z-index:100040}
  .ma-help-panel>.ma-help-head{padding:16px 20px}.ma-help-panel-body{padding:20px}.ma-help-panel h2{font-size:27px}
  .ma-help-panel-footer{padding:12px 20px calc(12px + env(safe-area-inset-bottom))}.ma-help-popover{width:310px}
  .ma-help-floating-toggle{right:16px;bottom:calc(80px + env(safe-area-inset-bottom))}
}
@media(pointer:coarse){.ma-help-marker[data-ma-help-ui]{width:36px!important;height:36px!important;padding:9px!important}.ma-help-dismiss{min-width:44px;min-height:44px}.ma-help-more,.ma-help-exit{min-height:44px}}
@media(prefers-reduced-motion:reduce){.ma-help-highlight,.ma-help-panel,.ma-help-popover{scroll-behavior:auto;transition:none}}
@media print{[data-ma-help-ui]{display:none!important}body.ma-help-details-open #app{margin-right:0!important}.ma-help-highlight{outline:none!important}}
