/* Shared action menus. Always anchor below the trigger and align trailing edges. */
:root{--ds-menu-gap:8px;--ds-menu-width:240px;--ds-menu-dot:2.5px;--ds-menu-trigger-size:var(--ds-touch)}
html body details.ds-action-menu{position:relative;margin:0;padding:0;border:0;background:transparent;flex:none;overflow:visible}
html body details.ds-action-menu[open]{z-index:70}
html body details.ds-action-menu>.ds-action-panel{position:absolute;inset:auto 0 auto auto;top:calc(100% + var(--ds-menu-gap));width:var(--ds-menu-width);min-width:0;max-width:calc(100vw - 32px);box-sizing:border-box;display:grid;gap:2px;padding:6px;margin:0;background:var(--ds-surface);color:var(--ds-ink);border:1px solid var(--ds-line);border-radius:10px;box-shadow:var(--ds-shadow,0 8px 24px #132a3a20);overflow-y:auto;z-index:70}
html body .ds-overflow-trigger,html body .personal-header .workspace-header-menu>.ds-overflow-trigger{box-sizing:border-box;display:flex;justify-content:center;align-items:center;flex:none;width:var(--ds-menu-trigger-size);height:var(--ds-menu-trigger-size);min-height:var(--ds-menu-trigger-size);margin:0;padding:0;border:1px solid var(--ds-line);border-radius:8px;background:var(--ds-surface);color:var(--ds-ink);list-style:none;cursor:pointer;filter:none;transform:none;box-shadow:none}
html body .ds-overflow-trigger::-webkit-details-marker{display:none}
html body .ds-overflow-trigger:hover,html body details[open]>.ds-overflow-trigger{background:var(--ds-soft);color:var(--ds-ink);border-color:#bac9c5;filter:none;transform:none}
html body .ds-overflow-trigger:focus-visible{outline:2px solid var(--ds-accent);outline-offset:3px}
html body .ds-overflow-dots{display:inline-flex;align-items:center;justify-content:center;gap:3px;width:20px;height:20px;line-height:1;font-size:0}
html body .ds-overflow-dots i{display:block;width:var(--ds-menu-dot);height:var(--ds-menu-dot);border-radius:50%;background:currentColor}
html body .ds-action-panel>button,html body .ds-action-panel>a{box-sizing:border-box;display:flex;justify-content:flex-start;align-items:center;gap:10px;width:100%;min-height:44px;margin:0;padding:10px 12px;border:0;border-radius:6px;background:transparent;color:var(--ds-ink);font:400 13px/1.4 var(--ds-font);text-align:left;text-decoration:none;box-shadow:none}
html body .ds-action-panel>button:hover,html body .ds-action-panel>a:hover{background:var(--ds-soft);color:var(--ds-ink);filter:none}
html body .ds-action-panel>.remove-button,html body .ds-action-panel>.ds-remove{color:var(--ds-danger)}
html body .ds-action-panel[data-floating]{position:fixed;box-sizing:border-box;padding:6px;border:1px solid var(--ds-line);border-radius:10px;background:var(--ds-surface);box-shadow:var(--ds-shadow);overflow-y:auto;z-index:80}
html body details.ds-action-menu>.ds-action-panel{right:0;left:auto;top:calc(100% + var(--ds-menu-gap))}
html body #current-positions .holding-menu-toggle.ds-overflow-trigger{margin:0;padding:0;width:44px;height:44px;background:var(--ds-surface);border:1px solid var(--ds-line)}
html body #current-positions .holding-menu-toggle.ds-overflow-trigger:hover{background:var(--ds-soft)}
/* Menu items are flat actions, including when moved from primary page buttons. */
html body .ds-action-panel>button,html body .ds-action-panel>a{border:0!important;background:transparent!important;box-shadow:none!important;font-weight:400!important;text-align:left!important;justify-content:flex-start!important;padding:10px 12px!important}
html body .ds-action-panel>button:hover,html body .ds-action-panel>a:hover{background:var(--ds-soft)!important;color:var(--ds-ink)!important}

/* Header controls share the compact desktop size; touch layouts retain 44px. */
.personal-header{--ds-menu-trigger-size:var(--ds-control-compact)}
/* Disclosure spacing must never move a menu trigger when opened. */
html body details.ds-action-menu>summary.ds-action-trigger,html body details.ds-action-menu[open]>summary.ds-action-trigger{display:flex;margin:0}
@media(max-width:760px){.personal-header{--ds-menu-trigger-size:var(--ds-touch)}}

/* Match the vertical alignment of neighbouring primary page actions. */
.workspace-shell .page-heading>.page-action-menu{align-self:center}

.workspace-shell .page-actions-with-menu{flex-wrap:nowrap}
